Commit 814ad149 authored by zhangyingbin's avatar zhangyingbin

立项修改

parent 9fa30e6b
......@@ -691,7 +691,7 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
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();
boolean isEnd = false;
if( !ValidationUtil.isEmpty(firstName) && ProjectInitiationEnum.安装资料审批.equals(firstName) || ProjectInitiationEnum.设计资料审批.equals(firstName)) {
if(ProjectInitiationEnum.安装资料审批.getName().equals(firstName) || ProjectInitiationEnum.设计资料审批.getName().equals(firstName)) {
return "流程结束!";
} else {
try {
......@@ -758,9 +758,12 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
if(ProjectInitiationEnum.设计资料审核.getName().equals(firstName)){
return ProjectInitiationEnum.设计资料审批.getName();
}
if(ProjectInitiationEnum.监检员审核.getName().equals(firstName)){
return ProjectInitiationEnum.流程结束.getName();
}
}
String taskName = "流程结束!";
String taskName = ProjectInitiationEnum.流程结束.getName();
try {
taskName=dataObject.getString("name");
}catch (Exception e) {
......@@ -817,22 +820,55 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
if (!"流程结束!".equals(taskName) && !ObjectUtils.isEmpty(project.getStatus()) && project.getStatus().contains("/")) {
String azStatus = StringUtils.substringBefore(project.getStatus(), "/");
String sjStatus = StringUtils.substringAfter(project.getStatus(), "/");
String azStatus = StringUtils.substringAfter(project.getStatus(), "/");
String sjStatus = StringUtils.substringBefore(project.getStatus(), "/");
if (taskName.contains("安装")) {
taskName = azStatus + "/" + taskName;
taskName = sjStatus + "/" + taskName;
} else {
taskName = taskName + "/" + sjStatus;
taskName = taskName + "/" + azStatus;
}
}
if ("流程结束!".equals(taskName) && !ObjectUtils.isEmpty(project.getStatus())) {
if (project.getStatus().contains(ProjectInitiationEnum.设计资料审批.getName())) {
//taskName = StringUtils.substringBefore(project.getStatus(), "/");
taskName = StringUtils.substringAfter(project.getStatus(), "/");
} else if (project.getStatus().contains(ProjectInitiationEnum.安装资料审批.getName())) {
taskName = StringUtils.substringBefore(project.getStatus(), "/");
//taskName = StringUtils.substringAfter(project.getStatus(), "/");
}
}
AjaxResult ajaxResult = new AjaxResult();
JSONObject dataObject = new JSONObject();
try {
ajaxResult = Workflow.taskClient.getTaskNoAuth(instanceId);
dataObject = JSON.parseObject(JSON.toJSONString(ajaxResult.get("data")));
taskName=dataObject.getString("name");
}catch (Exception e) {
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(Workflow.taskClient.getTasksForDisposal(instanceId)));
JSONArray jsonArray = jsonObject.getJSONArray("data");
taskName="";
if (jsonArray != null && jsonArray.size()==2) {
for (int i = 0; i < jsonArray.size(); i++) {
if (i==0){
taskName =JSON.parseObject(JSON.toJSONString(jsonArray.get(0))).getString("name");
}else{
taskName +="/"+JSON.parseObject(JSON.toJSONString(jsonArray.get(1))).getString("name");
}
}
// for (Object o : jsonArray) {
// taskName +=JSON.parseObject(JSON.toJSONString(o)).getString("name");
// }
}else {
taskName="流程结束!";
}
}
project.setStatus(taskName);
projectService.updateById(project);
processRelationService.updateState(instanceId,taskName);
......
......@@ -530,7 +530,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
codes.add(String.valueOf(superviseRule.getAdminRegionCode()));
}
} else {
page = projectMapper.queryProjectPage(page, project, roleName, companyId,codes);
page = projectMapper.queryProjectPage(page, project, roleName, companyId,codes);
}
if(!ValidationUtil.isEmpty(codes)){
page = projectMapper.queryProjectPage(page, project, roleName,companyId,codes);
......@@ -562,6 +562,7 @@ public class ProjectServiceImpl extends BaseService<ProjectDto, Project, Project
ArrayList<ProjectDto> list = Lists.newArrayList();
for(ProjectDto projectDto:projects){
if(OrgEnum.安装单位.getKey().equals(orgService.getReginParams().getBusinessInfo().getCompanyType())){
if(projectDto.getExamineProjectState().contains("/")) {
projectDto.setExamineProjectState(StringUtils.substringAfter(projectDto.getExamineProjectState(), "/"));
}
......
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