Преглед на файлове

Merge remote-tracking branch 'origin/master'

‘xugp преди 1 година
родител
ревизия
097e573ee1

+ 6 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/DeptResponsibility.java

@@ -147,6 +147,12 @@ public class DeptResponsibility extends Model {
     private String remark;
 
 
+	/**
+	 * 实例id
+	 */
+	private String instId;
+
+
 
 
 }

+ 5 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/OrganizationEvaluation.java

@@ -143,4 +143,9 @@ public class OrganizationEvaluation extends Model {
     private String remark;
 
 
+	/**
+	 * 流程实例
+	 */
+	private String instId;
+
 }

+ 5 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/flow/FlowResult.java

@@ -22,5 +22,10 @@ public class FlowResult {
 	 */
 	private String code;
 
+	/**
+	 * date
+	 */
+	private String data;
+
 
 }

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/IDeptResponsibilityService.java

@@ -32,7 +32,7 @@ public interface IDeptResponsibilityService extends IService<DeptResponsibility>
 	List<Map> targetValueeport(String id, String dept, HttpServletRequest request);
 
 
-	boolean editState(String id,String state);
+	boolean editState(String id,String state,String instId);
 
 
 

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/IOrganizationEvaluationService.java

@@ -39,7 +39,7 @@ public interface IOrganizationEvaluationService extends IService<OrganizationEva
 	List<OrganizationEvaluation> list(String organizationId, String checkCycle, String year, String month);
 
 
-	boolean editState(String id, String state);
+	boolean editState(String id, String state,String instId);
 
 
 	OrganizationEvaluationResDTO getByidAndInfo(String id, String dept);

+ 14 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/service/custom/WorkflowService.java

@@ -74,6 +74,14 @@ public class WorkflowService {
 		ResponseEntity<String> responseEntity2 = restTemplate.exchange("http://10.65.78.23:8080/bpm/instance/doAction", HttpMethod.POST,param,String.class);
 		log.info("\n code:{}\n header:{}\n body:{}\n", responseEntity2.getStatusCodeValue(), responseEntity2.getHeaders(), responseEntity2.getBody());
 		if(200== responseEntity2.getStatusCodeValue()){
+			FlowResult result = JSON.parseObject(responseEntity2.getBody()).toJavaObject(FlowResult.class);
+
+			if(result.getIsOk()){
+				boolean biz = updateWorkflowState(result.getData(),doAction.getDefKey(),doAction.getBusinessKey(),"");
+				if(biz){
+					log.info("保存流程实例id成功");
+				}
+			}
 			return JSON.parseObject(responseEntity2.getBody());
 		}
 		return null;
@@ -105,7 +113,7 @@ public class WorkflowService {
 		return null;
 	}
 
-
+//440416982620438529
 
 	/**
 	 * 流程审批
@@ -136,7 +144,7 @@ public class WorkflowService {
 
 			FlowResult result = JSON.parseObject(responseEntity2.getBody()).toJavaObject(FlowResult.class);
 			if(result.getIsOk()){
-				boolean biz = updateWorkflowState(isOkAction.getInstanceId(),isOkAction.getDefKey(),isOkAction.getBizKey(),isOkAction.getTaskName());
+				boolean biz = updateWorkflowState("",isOkAction.getDefKey(),isOkAction.getBizKey(),isOkAction.getTaskName());
 				if(biz){
 					log.info("状态修改成功");
 				}
@@ -199,14 +207,14 @@ public class WorkflowService {
 		return null;
 	}
 
-	private boolean updateWorkflowState(String instanceId, String defKey, String bizKey,String taskName) {
+	private boolean updateWorkflowState(String instId, String defKey, String bizKey,String taskName) {
 
 		switch (defKey) {
 			case "dwkpmbqd"://单位考评目标启动
-				deptResponsibilityService.editState(bizKey,taskName);
+				deptResponsibilityService.editState(bizKey,taskName,instId);
 				break;
 			case "yddwkplc"://月度单位考评流程
-				boolean b = organizationEvaluationService.editState(bizKey, taskName);
+				boolean b = organizationEvaluationService.editState(bizKey, taskName,instId);
 				if ("人事部审核".equals(taskName) && b){
 					scoreCalculationSchedule.doTask(bizKey);
 				}
@@ -220,4 +228,5 @@ public class WorkflowService {
 	}
 
 
+
 }

+ 7 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DeptResponsibilityServiceImpl.java

@@ -251,9 +251,14 @@ public class DeptResponsibilityServiceImpl extends ServiceImpl<DeptResponsibilit
 	}
 
 	@Override
-	public boolean editState(String id, String state) {
+	public boolean editState(String id, String state,String instId) {
 		DeptResponsibility responsibility = baseMapper.selectById(id);
-		responsibility.setStage(state);
+		if (StringUtils.isNotEmpty(state)) {
+			responsibility.setStage(state);
+		}
+		if (StringUtils.isNotEmpty(instId)) {
+			responsibility.setInstId(instId);
+		}
 		boolean b = super.saveOrUpdate(responsibility);
 		return b;
 	}

+ 8 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationServiceImpl.java

@@ -469,9 +469,15 @@ public class OrganizationEvaluationServiceImpl extends ServiceImpl<OrganizationE
 	}
 
 	@Override
-	public boolean editState(String id, String state) {
+	public boolean editState(String id, String state,String instId) {
 		OrganizationEvaluation evaluation = baseMapper.selectById(id);
-		evaluation.setStage(state);
+
+		if (StringUtils.isNotEmpty(state)) {
+			evaluation.setStage(state);
+		}
+		if (StringUtils.isNotEmpty(instId)) {
+			evaluation.setInstId(instId);
+		}
 		boolean b = super.saveOrUpdate(evaluation);
 		return b;
 	}