feat(flow): 修改反馈下发功能支持传入部门参数

- 更新 ITsComplaintAcceptService 接口方法 feedbackDispatch,增加 deptIds 参数
- 修改 TsComplaintAcceptController 控制器,调整接口路径并接收部门ID列表参数
- 实现 TsComplaintAcceptServiceImpl 服务类,移除字典查询逻辑改为使用传入的部门ID列表
- 更新反馈下发业务逻辑,直接使用传入的部门ID创建执行反馈记录
- 移除对 flow_coil_objection 字典类型的依赖
- 调整参数验证逻辑,确保接受ID和部门ID列表均不为空
This commit is contained in:
2026-06-22 10:41:59 +08:00
parent 7ec3f49c73
commit 4aba91abd9
3 changed files with 12 additions and 16 deletions

View File

@@ -115,9 +115,9 @@ public class TsComplaintAcceptController extends BaseController {
* @param acceptId 受理单ID * @param acceptId 受理单ID
*/ */
@Log(title = "反馈下发", businessType = BusinessType.UPDATE) @Log(title = "反馈下发", businessType = BusinessType.UPDATE)
@PostMapping("/feedbackDispatch/{acceptId}") @PostMapping("/feedbackDispatch")
public R<Void> feedbackDispatch(@NotNull(message = "主键不能为空") public R<Void> feedbackDispatch(@RequestParam Long acceptId,
@PathVariable Long acceptId) { @RequestParam List<Long> deptIds) {
return toAjax(iTsComplaintAcceptService.feedbackDispatch(acceptId)); return toAjax(iTsComplaintAcceptService.feedbackDispatch(acceptId, deptIds));
} }
} }

View File

@@ -53,7 +53,7 @@ public interface ITsComplaintAcceptService {
Boolean opinionDispatch(Long acceptId); Boolean opinionDispatch(Long acceptId);
/** /**
* 反馈下发修改flow_status=4字典flow_coil_objection部门创建执行反馈记录 * 反馈下发修改flow_status=4传入部门创建执行反馈记录
*/ */
Boolean feedbackDispatch(Long acceptId); Boolean feedbackDispatch(Long acceptId, List<Long> deptIds);
} }

View File

@@ -1,6 +1,7 @@
package com.klp.flow.service.impl; package com.klp.flow.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.klp.common.core.domain.entity.SysDictData;
import com.klp.common.core.page.TableDataInfo; import com.klp.common.core.page.TableDataInfo;
import com.klp.common.core.domain.PageQuery; import com.klp.common.core.domain.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -160,16 +161,11 @@ public class TsComplaintAcceptServiceImpl implements ITsComplaintAcceptService {
/** /**
* 反馈下发 * 反馈下发
* 修改受理单flow_status=4字典flow_coil_objection的部门创建执行反馈记录 * 修改受理单flow_status=4传入部门创建执行反馈记录
*/ */
@Override @Override
public Boolean feedbackDispatch(Long acceptId) { public Boolean feedbackDispatch(Long acceptId, List<Long> deptIds) {
if (acceptId == null) { if (acceptId == null || deptIds == null || deptIds.isEmpty()) {
return false;
}
// 从sys_dict_data直查根据dict_type=flow_coil_objection获取部门ID列表
List<SysDictData> dictList = sysDictDataService.selectDictDataByTypeRealtime("flow_coil_objection");
if (dictList == null || dictList.isEmpty()) {
return false; return false;
} }
// 更新受理单流程状态为4方案下发执行反馈中 // 更新受理单流程状态为4方案下发执行反馈中
@@ -178,10 +174,10 @@ public class TsComplaintAcceptServiceImpl implements ITsComplaintAcceptService {
.set(TsComplaintAccept::getFlowStatus, 4L); .set(TsComplaintAccept::getFlowStatus, 4L);
baseMapper.update(null, uw); baseMapper.update(null, uw);
// 按部门创建执行反馈记录 // 按部门创建执行反馈记录
for (SysDictData dict : dictList) { for (Long deptId : deptIds) {
TsPlanExecuteRel rel = new TsPlanExecuteRel(); TsPlanExecuteRel rel = new TsPlanExecuteRel();
rel.setAcceptId(acceptId); rel.setAcceptId(acceptId);
rel.setDeptId(Long.valueOf(dict.getDictValue())); rel.setDeptId(deptId);
rel.setExecuteStatus(0L); rel.setExecuteStatus(0L);
tsPlanExecuteRelMapper.insert(rel); tsPlanExecuteRelMapper.insert(rel);
} }