Commit ed5d37b6 authored by zhangyingbin's avatar zhangyingbin

修改ugp流程问题

parent 44f5e17b
...@@ -111,6 +111,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -111,6 +111,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(objectd)); JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(objectd));
Project project = JSON.parseObject(JSONObject.toJSONString(objectd),Project.class); Project project = JSON.parseObject(JSONObject.toJSONString(objectd),Project.class);
if(ValidationUtil.isEmpty(project.getName())){
project = projectService.getById(object.getLong("projectId"));
}
AjaxResult ajaxResult = Workflow.taskClient.getTask(instanceId); AjaxResult ajaxResult = Workflow.taskClient.getTask(instanceId);
JSONObject dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data"))); JSONObject dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")));
ProjectInitiation projectInitiation = new ProjectInitiation(); ProjectInitiation projectInitiation = new ProjectInitiation();
...@@ -121,7 +124,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -121,7 +124,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
projectInitiation.setTaskName(dataObject.getString("name")); projectInitiation.setTaskName(dataObject.getString("name"));
//项目的管辖区域 //项目的管辖区域
String regionCode = object.getString("region"); String regionCode = project.getInstallRegionCode();
LambdaQueryWrapper<SuperviseRule> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<SuperviseRule> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(SuperviseRule :: getAdminRegionCode,regionCode); wrapper.eq(SuperviseRule :: getAdminRegionCode,regionCode);
SuperviseRule superviseRule = superviseRuleService.getOne(wrapper); SuperviseRule superviseRule = superviseRuleService.getOne(wrapper);
...@@ -179,6 +182,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -179,6 +182,9 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
//新增任务表的状态 待办 //新增任务表的状态 待办
project = projectService.getById(object.getLong("sequenceNbr")); project = projectService.getById(object.getLong("sequenceNbr"));
if(ValidationUtil.isEmpty(project)){
project = projectService.getById(object.getLong("projectId"));
}
taskType = getUnitId(unitIds, project, superviseRule); taskType = getUnitId(unitIds, project, superviseRule);
taskService.saveOrUpdateTask(project.getStatus(), false, taskType, new Date(), object.getLong("sequenceNbr"), TaskTypeEnum.项目立项.getKey(), unitIds); taskService.saveOrUpdateTask(project.getStatus(), false, taskType, new Date(), object.getLong("sequenceNbr"), TaskTypeEnum.项目立项.getKey(), unitIds);
} }
......
...@@ -101,10 +101,11 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl ...@@ -101,10 +101,11 @@ public class TaskServiceImpl extends BaseService<TaskDto, Task, TaskMapper> impl
.eq(Task::getTitle, InitiationStatus) .eq(Task::getTitle, InitiationStatus)
.eq(Task::getSourceId, sourceId) .eq(Task::getSourceId, sourceId)
.eq(Task::getUnitId, unitId); .eq(Task::getUnitId, unitId);
task = this.getOne(wrapper); List<Task> taskList = this.list(wrapper);
if (ValidationUtil.isEmpty(task)) { if (ValidationUtil.isEmpty(taskList)) {
return; return;
} }
task = taskList.iterator().next();
task.setStatusLabel(TaskTypeEnum.已办.getName()); task.setStatusLabel(TaskTypeEnum.已办.getName());
taskStatus = "已完成"; taskStatus = "已完成";
} else { } else {
......
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