|
@@ -119,7 +119,9 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
tmstrainLoadingResult.setBatchId(batchId);
|
|
|
//添加常规字段
|
|
|
addRegularField(tmstrainLoadingResult);
|
|
|
+ //准备插入
|
|
|
int count = 0;
|
|
|
+ List<Map<String,Object>> resultIdList=new ArrayList<>();
|
|
|
for (String wagonNo : wagonNoList) {
|
|
|
tmstrainLoadingResult.setResultWagonNo(wagonNo);
|
|
|
BigDecimal maxId = tmstrainLoadingResultMapper.selectMaxId();
|
|
@@ -131,6 +133,21 @@ public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultS
|
|
|
count += tmstrainLoadingResultMapper.insertSelective(tmstrainLoadingResult);
|
|
|
//添加火运总实绩
|
|
|
count += addTotalResult(maxId);
|
|
|
+ //计量委托实绩list
|
|
|
+ Map<String, Object> temp = new HashMap<>();
|
|
|
+ temp.put("resultId",maxId);
|
|
|
+ resultIdList.add(temp);
|
|
|
+ }
|
|
|
+ //新增完成,发送计量委托
|
|
|
+ if(resultIdList.size()==wagonNoList.size()){
|
|
|
+ Map<String, Object> map = new HashMap<>();
|
|
|
+ map.put("resultIdList",resultIdList);
|
|
|
+ int i = tmstrainMeasureCommissionService.batchSendMeasureCommission(map);
|
|
|
+ if(i==-1){
|
|
|
+ return i;
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ return -1;
|
|
|
}
|
|
|
return count;
|
|
|
}
|