Commit 982ac97b authored by litengwei's avatar litengwei

代码提交

parent 5c742fa7
...@@ -102,7 +102,7 @@ public class ProblemInitiationServiceImpl { ...@@ -102,7 +102,7 @@ public class ProblemInitiationServiceImpl {
} }
qualityProblem.setInstanceId(instanceId); qualityProblem.setInstanceId(instanceId);
try { try {
qualityProblem.setStatus(projectInitiationService.getFlowTaskName(null,false,null,null,null,null,null,null,instanceId)); qualityProblem.setStatus(projectInitiationService.getFlowTaskName(null,null,false,null,null,null,null,null,null,instanceId));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -441,7 +441,7 @@ public class ProblemInitiationServiceImpl { ...@@ -441,7 +441,7 @@ public class ProblemInitiationServiceImpl {
wrapper.eq(QualityProblem::getInstanceId,instanceId); wrapper.eq(QualityProblem::getInstanceId,instanceId);
QualityProblem qualityProblem = qualityProblemService.getOne(wrapper); QualityProblem qualityProblem = qualityProblemService.getOne(wrapper);
try { try {
qualityProblem.setStatus(projectInitiationService.getFlowTaskName(null,false,null,null,null,null,null,null,instanceId)); qualityProblem.setStatus(projectInitiationService.getFlowTaskName(null,null,false,null,null,null,null,null,null,instanceId));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -62,7 +62,7 @@ public class ProcessRelationServiceImpl extends BaseService<ProcessRelationDto, ...@@ -62,7 +62,7 @@ public class ProcessRelationServiceImpl extends BaseService<ProcessRelationDto,
ProcessRelation processRelation = this.getOne(wrapper); ProcessRelation processRelation = this.getOne(wrapper);
try { try {
if(ValidationUtil.isEmpty(taskName)) { if(ValidationUtil.isEmpty(taskName)) {
taskName = projectInitiationService.getFlowTaskName(null,false,null,null,null,null,null,null,instanceId); taskName = projectInitiationService.getFlowTaskName(null,null,false,null,null,null,null,null,null,instanceId);
} }
processRelation.setStatus(taskName); processRelation.setStatus(taskName);
this.updateById(processRelation); this.updateById(processRelation);
......
...@@ -205,7 +205,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -205,7 +205,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
} }
String taskName = null; String taskName = null;
try { try {
taskName = getFlowTaskName(null,false,null,null,null,null,null,null,instanceId); taskName = getFlowTaskName(null,null,false,null,null,null,null,null,null,instanceId);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -315,7 +315,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -315,7 +315,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
taskService.saveOrUpdateTask(taskName, true, taskType, new Date(), project.getSequenceNbr(), TaskTypeEnum.项目立项.getKey(), unitIds,extendId, instanceId); taskService.saveOrUpdateTask(taskName, true, taskType, new Date(), project.getSequenceNbr(), TaskTypeEnum.项目立项.getKey(), unitIds,extendId, instanceId);
//更新project种的status字段,更新关系表中的state字段,表示当前流程下一个执行的任务 //更新project种的status字段,更新关系表中的state字段,表示当前流程下一个执行的任务
boolean bool = updateFlowStatus(project.getStatus(), true, taskType, new Date(), project.getSequenceNbr(), TaskTypeEnum.项目立项.getKey(), unitIds,extendId, instanceId); boolean bool = updateFlowStatus( taskName,project.getStatus(), true, taskType, new Date(), project.getSequenceNbr(), TaskTypeEnum.项目立项.getKey(), unitIds,extendId, instanceId);
//如果更新了status状态 新增任务表的状态 待办 //如果更新了status状态 新增任务表的状态 待办
if(bool) { if(bool) {
...@@ -569,7 +569,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -569,7 +569,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
* @param instanceId * @param instanceId
* @return * @return
*/ */
public String getFlowTaskName(Project project, boolean status, String taskType, Date sendTime, Long sourceId, String type, List<Long> unitIds,Long extendId, String instanceId){ public String getFlowTaskName(String firstName, Project project, boolean status, String taskType, Date sendTime, Long sourceId, String type, List<Long> unitIds,Long extendId, String instanceId){
JSONObject dataObject = new JSONObject(); JSONObject dataObject = new JSONObject();
boolean isEnd = false; boolean isEnd = false;
try { try {
...@@ -599,6 +599,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -599,6 +599,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
taskService.saveOrUpdateTask(ProjectInitiationEnum.设计负责人指定项目负责人.getName(), false, taskType, sendTime, sourceId, TaskTypeEnum.项目立项.getKey(), unitIds,extendId, instanceId); taskService.saveOrUpdateTask(ProjectInitiationEnum.设计负责人指定项目负责人.getName(), false, taskType, sendTime, sourceId, TaskTypeEnum.项目立项.getKey(), unitIds,extendId, instanceId);
} }
} }
if(ProjectInitiationEnum.监检员审核.getName().equals(name)){ if(ProjectInitiationEnum.监检员审核.getName().equals(name)){
isEnd = true; isEnd = true;
} }
...@@ -607,6 +608,33 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -607,6 +608,33 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
return ProjectInitiationEnum.监检员审核.getName(); return ProjectInitiationEnum.监检员审核.getName();
} }
} }
if(null != firstName) {
if(ProjectInitiationEnum.安装负责人指定项目负责人.getName().equals(firstName)){
return ProjectInitiationEnum.安装负责人指定项目资料员.getName();
}
if(ProjectInitiationEnum.安装负责人指定项目资料员.getName().equals(firstName)){
return ProjectInitiationEnum.安装开工资料提交.getName();
}
if(ProjectInitiationEnum.安装开工资料提交.getName().equals(firstName)){
return ProjectInitiationEnum.安装资料审核.getName();
}
if(ProjectInitiationEnum.安装资料审核.getName().equals(firstName)){
return ProjectInitiationEnum.安装资料审批.getName();
}
if(ProjectInitiationEnum.设计负责人指定项目负责人.getName().equals(firstName)){
return ProjectInitiationEnum.设计负责人指定项目资料员.getName();
}
if(ProjectInitiationEnum.设计负责人指定项目资料员.getName().equals(firstName)){
return ProjectInitiationEnum.设计开工资料提交.getName();
}
if(ProjectInitiationEnum.设计开工资料提交.getName().equals(firstName)){
return ProjectInitiationEnum.设计资料审核.getName();
}
if(ProjectInitiationEnum.设计资料审核.getName().equals(firstName)){
return ProjectInitiationEnum.设计资料审批.getName();
}
}
String taskName = "流程结束!"; String taskName = "流程结束!";
try { try {
taskName=dataObject.getString("name"); taskName=dataObject.getString("name");
...@@ -620,7 +648,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -620,7 +648,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
OrgServiceImpl orgService; OrgServiceImpl orgService;
@BusinessIdentify @BusinessIdentify
public boolean updateFlowStatus(String InitiationStatus, boolean status, String taskType, Date sendTime, Long sourceId, String type, List<Long> unitIds,Long extendId, String instanceId){ public boolean updateFlowStatus(String firstTaskName, String InitiationStatus, boolean status, String taskType, Date sendTime, Long sourceId, String type, List<Long> unitIds,Long extendId, String instanceId){
LambdaQueryWrapper<Project> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Project> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Project::getInstanceId,instanceId); wrapper.eq(Project::getInstanceId,instanceId);
Project project = projectService.getOne(wrapper); Project project = projectService.getOne(wrapper);
...@@ -630,7 +658,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD ...@@ -630,7 +658,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
project.setChargePersonId(orgService.getReginParams().getBusinessInfo().getUserSequenceNbr()); project.setChargePersonId(orgService.getReginParams().getBusinessInfo().getUserSequenceNbr());
} }
String taskName = getFlowTaskName(project, status, taskType, sendTime, sourceId, type, unitIds,extendId, instanceId); String taskName = getFlowTaskName(firstTaskName,project, status, taskType, sendTime, sourceId, type, unitIds,extendId, instanceId);
boolean bool = true; boolean bool = true;
if (( project.getStatus().contains(ProjectInitiationEnum.安装资料审批.getName()) || project.getStatus().contains(ProjectInitiationEnum.设计资料审批.getName())) && "流程结束!".equals(taskName)){ if (( project.getStatus().contains(ProjectInitiationEnum.安装资料审批.getName()) || project.getStatus().contains(ProjectInitiationEnum.设计资料审批.getName())) && "流程结束!".equals(taskName)){
bool = false; bool = false;
......
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