| 
					
				 | 
			
			
				@@ -112,6 +112,8 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public int addTmstrainLoadingResult(TmstrainLoadingResult tmstrainLoadingResult) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<String> wagonNoList = tmstrainLoadingResult.getWagonNoList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(tmstrainLoadingResult.getUserId()==null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new Exception("用户id为空,请先登录再操作!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(wagonNoList.size()<=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new Exception("车皮号异常"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -124,7 +126,7 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BigDecimal batchId = tmstrainLoadingResultMapper.getBatchIdByPurOrderId(purchaseOrderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tmstrainLoadingResult.setBatchId(batchId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //添加常规字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        addRegularField(tmstrainLoadingResult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        addRegularField(tmstrainLoadingResult,tmstrainLoadingResult.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //准备插入 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int count = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<Map<String,Object>> resultIdList=new ArrayList<>(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -139,7 +141,6 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             count += tmstrainLoadingResultMapper.insertSelective(tmstrainLoadingResult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //添加火运总实绩 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             count += addTotalResult(maxId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //计量委托实绩list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Map<String, Object> temp = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             temp.put("resultId",maxId); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -160,17 +161,24 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 添加国产矿装车实绩 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * @param list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 国产矿新增导入 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param mapValue 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public int addDomesticLoadResult(List<Map<String, Object>> list) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public int addDomesticLoadResult(Map<String, Object> mapValue) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Map<String, Object>> list= (List<Map<String, Object>>) mapValue.get("list"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String userId=null; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(mapValue.get("userId")!=null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            userId=mapValue.get("userId").toString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new Exception("用户id为空,请先登录再操作!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //装车临时list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<TmstrainLoadingTemp> loadingTemps=new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //装车实绩list 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<TmstrainLoadingResult> loadingResults=new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int i = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for(Map<String,Object> map:list){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //车皮号、发站、到站、发货单位、物资是必要数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             TmstrainLoadingTemp temp=new TmstrainLoadingTemp(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             TmstrainLoadingResult result=new TmstrainLoadingResult(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //设置序列号主键 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -210,7 +218,7 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 result.setSendStationId(sendStationId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //添加常规字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            addRegularField(result); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            addRegularField(result,userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //通过车皮号计算车皮标重 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             result.setResultBillableTonnage(new BigDecimal(calculateWagonWeight(result.getResultWagonNo()))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //通过到站ID匹配计量衡 如果是老区轨道衡或者是新区轨道衡 则匹配轨道衡 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -231,11 +239,11 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 补录采购订单信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 国产矿新增配单补录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param map 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public int updateDomesticLoadResult(Map<String, Object> map){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public int updateDomesticLoadResult(Map<String, Object> map) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //获取要补录的实绩ID 列表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<Integer> resultIdList = (List<Integer>) map.get("resultIdList"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         TmstrainLoadingResult tmstrainLoadingResult = new TmstrainLoadingResult(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -252,15 +260,19 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmstrainLoadingResult.setSendUnitId(supplierId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tmstrainLoadingResult.setPurchaseOrderRailPlanId(purchaseOrderId); //采购订单Id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(map.get("userId")!=null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tmstrainLoadingResult.setUpdateUsername(map.get("userId").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new Exception("用户id为空,请先登录!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int count = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //对每一个实绩id对应的记录修改字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (Integer resultId : resultIdList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmstrainLoadingResult.setResultId(new BigDecimal(resultId)); //设置要补录的实绩主键 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tmstrainLoadingResult.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             count += tmstrainLoadingResultMapper.updateByPrimaryKeySelective(tmstrainLoadingResult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //全部补录成功,发送计量委托 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //配单成功,发送计量委托 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(resultIdList.size()-count==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//            System.out.println("发送计量委托"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Map<String, Object> map1 = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             List<Map<String,Object>> resultIdList1=new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             for(Integer resultId:resultIdList){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -326,9 +338,9 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * 添加常规字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param tmstrainLoadingResult 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public void addRegularField(TmstrainLoadingResult tmstrainLoadingResult){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void addRegularField(TmstrainLoadingResult tmstrainLoadingResult,String userName){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //常规字段插入 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tmstrainLoadingResult.setInsertUsername("admin"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tmstrainLoadingResult.setInsertUsername(userName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tmstrainLoadingResult.setInsertTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tmstrainLoadingResult.setInsertUpdateRemark("无"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tmstrainLoadingResult.setDeleted(new BigDecimal(0)); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -345,10 +357,11 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-     * 修改火运装车实绩 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 修改进口矿国产矿火运装车实绩 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param map 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Transactional(rollbackFor = {Exception.class}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public int updateTmstrainLoadingResult(Map<String,Object> map) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         TmstrainLoadingResult tmstrainLoadingResult=new TmstrainLoadingResult(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -356,15 +369,15 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         BigDecimal resultId=DataChange.dataToBigDecimal(map.get("resultId")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Integer resultType=(Integer) map.get("resultType"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(wagonNo==null || wagonNo.length()!=7 || calculateWagonWeight(wagonNo)<=0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return  -1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new Exception("车皮号异常"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }else if(resultId==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return  -2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new Exception("主键为空"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }else if(resultType==0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return -3; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new Exception("类型异常"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //国产矿未配单仅支持修改部分字段,并且不重新发委托 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<Map<String,Object>> results=tmstrainLoadingResultMapper.selectByResultId(resultId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(resultType==3 && results!=null && results.get(0)!=null && results.get(0).get("purchaseOrderRainPlanId")==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(resultType==3 && results!=null && results.get(0)!=null && results.get(0).get("purchaseOrderNo")==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmstrainLoadingResult.setResultId(resultId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmstrainLoadingResult.setResultWagonNo(wagonNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmstrainLoadingResult.setSendStationId(DataChange.dataToBigDecimal(map.get("sendStationId"))); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -373,7 +386,7 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if(map.get("resultRemarks")!=null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 tmstrainLoadingResult.setResultRemarks(map.get("resultRemarks").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmstrainLoadingResultMapper.updateByPrimaryKeySelective(tmstrainLoadingResult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return -5; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //进口矿字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(resultType!=3){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -384,18 +397,23 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if(map.get("capacityId")!=null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 tmstrainLoadingResult.setCapacityId(DataChange.dataToBigDecimal(map.get("capacityId"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if(map.get("resultBillableTonnage")!=null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                tmstrainLoadingResult.setCapacityId(DataChange.dataToBigDecimal(map.get("resultBillableTonnage"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                tmstrainLoadingResult.setResultBillableTonnage(DataChange.dataToBigDecimal(map.get("resultBillableTonnage"))); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //通过采购订单号查询获得采购订单ID、批次ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //通过采购订单号查询获得采购订单ID、批次ID、物资ID、发货单位ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(map.get("purchaseOrderNo")!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             String purchaseOrderNo = map.get("purchaseOrderNo").toString() ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             BigDecimal purchaseOrderId = tmstrainLoadingResultMapper.getPurchaseOrderIdByPurOrderNo(purchaseOrderNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             BigDecimal batchId = tmstrainLoadingResultMapper.getBatchIdByPurOrderNo(purchaseOrderNo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(purchaseOrderId==null || batchId==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return  -4; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Map<String,Object> record=tmstrainLoadingResultMapper.getRecordByPurOrderId(purchaseOrderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BigDecimal materialId=DataChange.dataToBigDecimal(record.get("materialId")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BigDecimal supplierId=DataChange.dataToBigDecimal(record.get("supplierId")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(purchaseOrderId==null || batchId==null ||materialId==null ||supplierId==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                throw new Exception("采购订单号异常"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmstrainLoadingResult.setBatchId(batchId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmstrainLoadingResult.setPurchaseOrderRailPlanId(purchaseOrderId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tmstrainLoadingResult.setMaterialId(materialId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tmstrainLoadingResult.setSendUnitId(supplierId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //设置其他字段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tmstrainLoadingResult.setResultId(resultId); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -406,18 +424,26 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if(map.get("resultRemarks")!=null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tmstrainLoadingResult.setResultRemarks(map.get("resultRemarks").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tmstrainLoadingResult.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(map.get("userId")!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tmstrainLoadingResult.setUpdateUsername(map.get("userId").toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new Exception("没有用户id,请登录再操作!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //更新 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int count=tmstrainLoadingResultMapper.updateByPrimaryKeySelective(tmstrainLoadingResult); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //更新完成,发送计量委托 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(count > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<Map<String, Object>> resultIdList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            Map<String, Object> map1 = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            Map<String, Object> map2 = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            map1.put("resultId",resultId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            resultIdList.add(map1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            map2.put("resultIdList",resultIdList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            tmstrainMeasureCommissionService.batchSendMeasureCommission(map2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(count <= 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new Exception("修改失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //修改成功,发送计量委托 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Map<String, Object>> resultIdList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Map<String, Object> map1 = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Map<String, Object> map2 = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        map1.put("resultId",resultId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        resultIdList.add(map1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        map2.put("resultIdList",resultIdList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        count = tmstrainMeasureCommissionService.batchSendMeasureCommission(map2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(count<=0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+           throw new Exception("发送计量委托失败"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return count; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |