Commit e1107400 authored by zhangyingbin's avatar zhangyingbin

优化ugp接口

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