|
@@ -50,6 +50,9 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
@Autowired
|
|
|
private TmstrainTotalResultMapper tmstrainTotalResultMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TmstrainMeasureCommissionServiceImpl tmstrainMeasureCommissionService;
|
|
|
+
|
|
|
/**
|
|
|
* 查看所有装车实绩
|
|
|
* @param map
|
|
@@ -142,6 +145,7 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
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();
|
|
@@ -192,6 +196,7 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
}
|
|
|
loadingTemps.add(temp);
|
|
|
loadingResults.add(result);
|
|
|
+ i += addTotalResult(maxId);
|
|
|
}
|
|
|
//批量插入
|
|
|
tmstrainLoadingTempMapper.batchInsert(loadingTemps);
|
|
@@ -227,9 +232,22 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
tmstrainLoadingResult.setResultId(new BigDecimal(resultId)); //设置要补录的实绩主键
|
|
|
count += tmstrainLoadingResultMapper.updateByPrimaryKeySelective(tmstrainLoadingResult);
|
|
|
}
|
|
|
- //全部补录成功,在此处发送计量委托
|
|
|
- if(resultIdList.size()-count==0)
|
|
|
- System.out.println("发送计量委托");
|
|
|
+ //全部补录成功,发送计量委托
|
|
|
+ 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){
|
|
|
+ Map<String, Object> temp = new HashMap<>();
|
|
|
+ temp.put("resultId",resultId);
|
|
|
+ resultIdList1.add(temp);
|
|
|
+ }
|
|
|
+ map1.put("resultIdList",resultIdList1);
|
|
|
+ int i = tmstrainMeasureCommissionService.batchSendMeasureCommission(map1);
|
|
|
+ if(i==-1){
|
|
|
+ return i;
|
|
|
+ }
|
|
|
+ }
|
|
|
return count;
|
|
|
}
|
|
|
|