| 
					
				 | 
			
			
				@@ -241,6 +241,7 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BeanUtils.copyProperties(purchaseInfoVo, purchaseInfoEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         purchaseInfoEntity.setPurchaseMessage(JSON.toJSONString(purchaseInfoVo.getPurchaseMessage())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         purchaseInfoEntity.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        purchaseInfoEntity.setFlowTaskStatus(FlowTaskStatus.DRAFT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         PurchaseInfoEntity save = purchaseInfoMapper.save(purchaseInfoEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //保存到费用列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CostInfoEntity costInfoEntity = new CostInfoEntity(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -270,7 +271,8 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          * 调用采购费用申请流程的启动 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ResMsg resMsg = purchaseFlowStart(save); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        purchaseInfoVo.setPurchaseId(save.getPurchaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ResMsg resMsg = purchaseFlowStart(purchaseInfoVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (!"200".equals(resMsg.getCode())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return resMsg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -292,13 +294,14 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return infoDetails; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //采购费用申请流程的启动 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            PurchaseInfoEntity save = (PurchaseInfoEntity) infoDetails.getData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ResMsg resMsg = purchaseFlowStart(save); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            PurchaseInfoVo infoVo = (PurchaseInfoVo) infoDetails.getData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ResMsg resMsg = purchaseFlowStart(infoVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (!"200".equals(resMsg.getCode())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return resMsg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            save.setFlowTaskStatus(FlowTaskStatus.SUBMITTED); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            purchaseInfoMapper.save(save); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Optional<PurchaseInfoEntity> byId = purchaseInfoMapper.findById(infoVo.getPurchaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            byId.get().setFlowTaskStatus(FlowTaskStatus.SUBMITTED); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            purchaseInfoMapper.save(byId.get()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return new ResMsg(CodeEnum.OK); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -334,14 +337,16 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (!update.getCode().equals("200")) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return update; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //采购费用申请流程的启动 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         PurchaseInfoEntity save = (PurchaseInfoEntity) update.getData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //调用采购费用申请流程的启动 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ResMsg resMsg = purchaseFlowStart(save); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        purchaseInfoVo.setPurchaseId(save.getPurchaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ResMsg resMsg = purchaseFlowStart(purchaseInfoVo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (!"200".equals(resMsg.getCode())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return resMsg; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        save.setFlowTaskStatus(FlowTaskStatus.SUBMITTED); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        purchaseInfoMapper.save(save); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Optional<PurchaseInfoEntity> byId = purchaseInfoMapper.findById(save.getPurchaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        byId.get().setFlowTaskStatus(FlowTaskStatus.SUBMITTED); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        purchaseInfoMapper.save(byId.get()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return new ResMsg(CodeEnum.OK); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -349,7 +354,7 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 调用采购费用申请流程的启动 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 获取开始节点之后的第一个任务节点的数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public ResMsg purchaseFlowStart(PurchaseInfoEntity purchaseInfoEntity) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public ResMsg purchaseFlowStart(PurchaseInfoVo infoVo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //processDefinitionKey 项目采购费用报销审批流程--流程标识。 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String processDefinitionKey = "projectPurchaseApp"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ResponseResult<FlowEntry> flowEntryResult = flowTaskStart.verifyAndGetFlowEntry(processDefinitionKey); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -371,15 +376,15 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         flowTaskCommentDto.setApprovalType("agree"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //将申请信息添加到流程引擎控制的表中,并添加关联 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         HashMap<String, Object> stringObjectHashMap = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        stringObjectHashMap.put("project_name", purchaseInfoEntity.getProjectName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        stringObjectHashMap.put("purchase_message", purchaseInfoEntity.getPurchaseMessage().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        stringObjectHashMap.put("purchase_date", purchaseInfoEntity.getPurchaseDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        stringObjectHashMap.put("create_user", purchaseInfoEntity.getCreateUser()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        stringObjectHashMap.put("purchase_id", purchaseInfoEntity.getPurchaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        stringObjectHashMap.put("project_name", infoVo.getProjectName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        stringObjectHashMap.put("purchase_message", infoVo.getPurchaseMessage().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        stringObjectHashMap.put("purchase_date", infoVo.getPurchaseDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        stringObjectHashMap.put("create_user", infoVo.getCreateUser()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        stringObjectHashMap.put("purchase_id", infoVo.getPurchaseId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         stringObjectHashMap.put("cost_type", "采购费"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         JSONObject masterData = (JSONObject) JSONObject.toJSON(stringObjectHashMap); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map<String, String> map = flowTaskStart.startAndTakeUserTaskSS(processDefinitionKey, flowTaskCommentDto, null, masterData, null, null).getData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        CostInfoEntity costInfoEntity = costInfoMapper.findByApplyCostIdAndCostType(purchaseInfoEntity.getPurchaseId(), "采购费"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        CostInfoEntity costInfoEntity = costInfoMapper.findByApplyCostIdAndCostType(infoVo.getPurchaseId(), "采购费"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         costInfoEntity.setProcessInstanceId(map.get("processInstanceId")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         costInfoEntity.setProcessDefinitionId(map.get("processDefinitionId")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         costInfoEntity.setFlowTaskStatus(FlowTaskStatus.SUBMITTED); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -393,6 +398,7 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         RestsInfoEntity restsInfoEntity = new RestsInfoEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BeanUtils.copyProperties(restsInfoVo, restsInfoEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         restsInfoEntity.setRestsMessage(JSON.toJSONString(restsInfoVo.getRestsMessage())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        restsInfoEntity.setFlowTaskStatus(FlowTaskStatus.DRAFT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         restsInfoEntity.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         RestsInfoEntity save = restInfoMapper.save(restsInfoEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //保存到费用列表 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -547,6 +553,7 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         TrafficExpenseEntity trafficExpense = new TrafficExpenseEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BeanUtils.copyProperties(trafficExpenseVo, trafficExpense); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         trafficExpense.setSubject(JSON.toJSONString(trafficExpenseVo.getSubject())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        trafficExpense.setFlowTaskStatus(FlowTaskStatus.DRAFT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         trafficExpense.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         TrafficExpenseEntity save = trafficExpenseMapper.save(trafficExpense); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //保存到费用列表 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -697,6 +704,7 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         RepastExpenseEntity repastExpense = new RepastExpenseEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BeanUtils.copyProperties(repastExpenseVo, repastExpense); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         repastExpense.setSubject(JSON.toJSONString(repastExpenseVo.getSubject())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        repastExpense.setFlowTaskStatus(FlowTaskStatus.DRAFT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         repastExpense.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         RepastExpenseEntity save = repastExpenseMapper.save(repastExpense); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //保存到费用列表 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -848,6 +856,7 @@ public class ApplyForCostServiceImpl implements ApplyForCostService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         TravelExpenseEntity travelExpense = new TravelExpenseEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BeanUtils.copyProperties(travelExpenseVo, travelExpense); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         travelExpense.setSubject(JSON.toJSONString(travelExpenseVo.getSubject())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        travelExpense.setFlowTaskStatus(FlowTaskStatus.DRAFT); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         travelExpense.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         TravelExpenseEntity save = travelExpenseMapper.save(travelExpense); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //保存到费用列表 
			 |