| 
					
				 | 
			
			
				@@ -236,13 +236,11 @@ public class FtmsorderbillsServiceImpl implements IftmsorderbillsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (StringUtils.isNull(tmsorderbills.getBillStatus())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return AjaxResult.error("未找到单据状态,请确认"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (tmsorderbills.getBillStatus() == 40) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (tmsorderbills.getBillStatus() == 6L) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (StringUtils.isNull(scntrs) || "[]".equals(scntrs)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return AjaxResult.error("未找到计划货量数据,请确认"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmsorderbills.setPostDate(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (tmsorderbills.getBillStatus() == 40) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String status = dataValidation(scntrs, attachs, fees, plans, null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (StringUtils.isNotEmpty(status)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return AjaxResult.error(status); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -279,11 +277,6 @@ public class FtmsorderbillsServiceImpl implements IftmsorderbillsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ftmsorderbillscntrsMapper.deleteftmsorderbillscntrsByPId(pId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ftmsorderbillsplansMapper.deleteftmsorderbillsplansByOrgId(pId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ftmsorderbillsattachsMapper.deleteftmsorderbillsattachsByPId(pId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (tmsorderbills.getBillStatus() == 40) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            tmsorderbills.setBillStatus(6L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            tmsorderbills.setBillStatus(2L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         AjaxResult ajaxResult = updateItem(pId, tmsorderbills.getBillStatus(), scntrs, attachs, fees, plans, loginUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String code = ajaxResult.get("code").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if ("500".equals(code)) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -355,7 +348,7 @@ public class FtmsorderbillsServiceImpl implements IftmsorderbillsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult planStatusChange(Ftmsorderbills ftmsorderbills) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Ftmsorderbills tmsorderbills = ftmsorderbillsMapper.selectftmsorderbillsById(ftmsorderbills.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         boolean billStatus = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (ftmsorderbills.getBillType() == 1000) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (ftmsorderbills.getActId() == 1000) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 计划变更 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             billStatus = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -373,12 +366,6 @@ public class FtmsorderbillsServiceImpl implements IftmsorderbillsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else if (!billStatus && tmsorderbills.getBillStatus() == 90) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return AjaxResult.error("调度单据已在变更中"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Ftmsorderbills tmsorder = new Ftmsorderbills(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tmsorder.setId(ftmsorderbills.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tmsorder.setBillStatus(90L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (ftmsorderbillsMapper.updateftmsorderbills(tmsorder) <= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return AjaxResult.error("更新计划信息失败,若多次出现请联系管理员"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return AjaxResult.success(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -398,7 +385,7 @@ public class FtmsorderbillsServiceImpl implements IftmsorderbillsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult insertPlanChange(String tmsorder, String scntrs, String attachs, String fees, String plans, LoginUser loginUser) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Ftmsorderbills tmsorderbills = JSONArray.parseObject(tmsorder, Ftmsorderbills.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         long pId = tmsorderbills.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tmsorderbills.setBillStatus(40L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tmsorderbills.setBillStatus(6L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Ftmsorderbills ftmsorderbills = ftmsorderbillsMapper.selectftmsorderbillsById(tmsorderbills.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ProjectBillsHistory projectBillsHistory = new ProjectBillsHistory(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         projectBillsHistory.setProjectId(pId); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -643,18 +630,18 @@ public class FtmsorderbillsServiceImpl implements IftmsorderbillsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult planCancel(Ftmsorderbills ftmsorderbills, LoginUser loginUser) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Ftmsorderbills sorderbills = ftmsorderbillsMapper.selectftmsorderbillsById(ftmsorderbills.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         boolean billsStatus = false; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (sorderbills.getBillStatus() == 1000) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (sorderbills.getActId() == 1000) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 计划下达 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             billsStatus = true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (billsStatus && sorderbills.getBillStatus() == 30) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return AjaxResult.error("该计划已撤销"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else if (!billsStatus && sorderbills.getBillStatus() == 70) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return AjaxResult.error("该调度已撤销"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (billsStatus && sorderbills.getBillStatus() == 3L) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return AjaxResult.error("该数据计划已撤销"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if (!billsStatus && sorderbills.getBillStatus() == 30L) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return AjaxResult.error("该数据调度已撤销"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (billsStatus && sorderbills.getBillStatus() < 40) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (billsStatus && sorderbills.getBillStatus() < 6L) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return AjaxResult.error("该计划未提交,不可撤销"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else if (!billsStatus && sorderbills.getBillStatus() < 80) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if (!billsStatus && sorderbills.getBillStatus() < 60L) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return AjaxResult.error("该调度未提交,不可撤销"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Ftmsorderbillsplans tmsorderbillsplans = new Ftmsorderbillsplans(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -663,9 +650,9 @@ public class FtmsorderbillsServiceImpl implements IftmsorderbillsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return AjaxResult.error("该计划已进行调度安排,不可撤销"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (billsStatus) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ftmsorderbills.setBillStatus(30L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ftmsorderbills.setBillStatus(3L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            ftmsorderbills.setBillStatus(70L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ftmsorderbills.setBillStatus(30L); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (ftmsorderbillsMapper.updateftmsorderbills(ftmsorderbills) <= 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); 
			 |