Commit e1107400 authored by zhangyingbin's avatar zhangyingbin

优化ugp接口

parent 024d282c
......@@ -283,8 +283,10 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
}
SuperviseRule superviseRule = superviseRuleService.getOne(new LambdaQueryWrapper<SuperviseRule>().eq(SuperviseRule::getAdminRegionCode,regionCode));
List<Long> unitIds = new ArrayList<>();
if(!ValidationUtil.isEmpty(superviseRule)) {
unitIds.add(superviseRule.getSuperviseDeptId());
unitIds.add(superviseRule.getInspectionUnitId());
}
//新增企业审核任务信息
taskService.saveOrUpdateTask(null, true, TaskTypeEnum.企业审核.getKey(), new Date(), model.getSequenceNbr(), TaskTypeEnum.企业审核.getKey(), unitIds);
return this.updateById(company);
......
......@@ -52,8 +52,9 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
* @Param sequenceNbr 项目/问题处置的sequenceNbr
* @return
*/
public void saveOrUpdateTask(String InitiationStatus, boolean status, String taskType, Date sendTime, Long sourceId, String type, List<Long> unitIds){
for(Long unitId: unitIds) {
public void saveOrUpdateTask(String InitiationStatus, boolean status, String taskType, Date sendTime, Long sourceId, String type, List<Long> unitIds) {
if (!ValidationUtil.isEmpty(unitIds)) {
for (Long unitId : unitIds) {
Task task = new Task();
String title = "", taskStatus = "";
task.setTaskType(taskType);
......@@ -101,7 +102,7 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
.eq(Task::getSourceId, sourceId)
.eq(Task::getUnitId, unitId);
task = this.getOne(wrapper);
if(ValidationUtil.isEmpty(task)){
if (ValidationUtil.isEmpty(task)) {
return;
}
task.setStatusLabel(TaskTypeEnum.已办.getName());
......@@ -115,4 +116,5 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
this.saveOrUpdate(task);
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment