|
@@ -156,6 +156,7 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
|
|
|
map.putAll(selectMap);
|
|
|
BigDecimal orderType = DataChange.dataToBigDecimal(map.get("orderTypee"));
|
|
|
BigDecimal lineSqe = DataChange.dataToBigDecimal(map.get("segmentSqe"));
|
|
|
+ BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
|
|
|
i += updateEnFactoryResultByPDA(map); //添加进厂实绩
|
|
|
//修改路段顺序号
|
|
|
i += utilsService.updateOrderLineSequence(map);
|
|
@@ -172,7 +173,7 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
|
|
|
mesMap.put("materialId",mapList.get(0).get("materialId"));
|
|
|
map.put("materialId", mapList.get(0).get("materialId"));
|
|
|
mesMap.put("nature", 1);
|
|
|
- mesMap.put("orderId", map.get("orderId"));
|
|
|
+ mesMap.put("orderId", orderId);
|
|
|
//计算计皮汽车衡
|
|
|
int tarePlaceId = rulesService.calculateWeighbridge(mesMap);
|
|
|
mesMap.put("tarePlaceId", tarePlaceId);
|
|
@@ -207,31 +208,48 @@ public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryRes
|
|
|
case 8:
|
|
|
case 9:
|
|
|
//计算计毛汽车衡并更新计量实绩 (暂时无法计算汽车衡) 需要写一个单独的方法 先计皮再计毛的
|
|
|
- map.put("grossPlaceId", 18);
|
|
|
- i += tmstruckWeightResultService.updateWeightResult(map);
|
|
|
+ HashMap<String, Object> calculateMap56789 = new HashMap<>();
|
|
|
+ calculateMap56789.put("orderId", map.get("orderId"));
|
|
|
+ calculateMap56789.put("orderType", orderType);
|
|
|
+ //计算计量汽车衡
|
|
|
+ int grossPlaceId = rulesService.calculateWeighbridge(calculateMap56789);
|
|
|
+ calculateMap56789.put("grossPlaceId", grossPlaceId);
|
|
|
+ i += tmstruckWeightResultService.updateWeightResult(calculateMap56789);
|
|
|
//通过订单ID查询物资Id
|
|
|
List<Integer> materialIdList = utilsMapper.getMaterialIdByOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
|
|
|
map.put("materialId", materialIdList.get(0));
|
|
|
checkMeasureCommission = tmstruckMeasureCommissionService.addMaoMeasureCommission(map); //添加计毛委托 并发送计毛委托
|
|
|
break;
|
|
|
- case 10: // 采购内转(老区-厂内) 没有进厂
|
|
|
- if(lineSqe.intValue() == 1){
|
|
|
- //计算计皮汽车衡并更新计量实绩
|
|
|
- map.put("tarePlaceId",15);
|
|
|
- i += tmstruckWeightResultService.updateWeightResult(map);
|
|
|
- checkMeasureCommission = tmstruckMeasureCommissionService.addMaoMeasureCommission(map); //添加计量委托
|
|
|
- }else{
|
|
|
- map.put("grossPlaceId",18);
|
|
|
- i += tmstruckWeightResultService.updateWeightResult(map);
|
|
|
- checkMeasureCommission = tmstruckMeasureCommissionService.addMaoMeasureCommission(map); //添加计量委托
|
|
|
-
|
|
|
+ case 10:
|
|
|
+ HashMap<String, Object> calculateMap10 = new HashMap<>();
|
|
|
+ calculateMap10.put("orderId", map.get("orderId"));
|
|
|
+ calculateMap10.put("orderType", orderType);
|
|
|
+ //计算计量汽车衡并更新计量实绩
|
|
|
+ int placeId = rulesService.calculateWeighbridge(calculateMap10);
|
|
|
+ if(placeId == 15){ //第一次计量
|
|
|
+ calculateMap10.put("tarePlaceId", placeId); //皮重
|
|
|
+ }else {
|
|
|
+ calculateMap10.put("grossPlaceId", placeId); //毛重
|
|
|
}
|
|
|
+ i += tmstruckWeightResultService.updateWeightResult(calculateMap10);
|
|
|
+ checkMeasureCommission = tmstruckMeasureCommissionService.addMaoMeasureCommission(map); //添加计量委托
|
|
|
break;
|
|
|
case 11:
|
|
|
break;
|
|
|
case 12:
|
|
|
case 13:
|
|
|
//无法确定汽车衡
|
|
|
+ HashMap<String, Object> calculateMap1213 = new HashMap<>();
|
|
|
+ calculateMap1213.put("orderId", map.get("orderId"));
|
|
|
+ calculateMap1213.put("orderType", orderType);
|
|
|
+ //计算计量汽车衡并更新计量实绩
|
|
|
+ int placeId1213 = rulesService.calculateWeighbridge(calculateMap1213);
|
|
|
+ if(orderType.intValue() == 12){
|
|
|
+ calculateMap1213.put("grossPlaceId", placeId1213);
|
|
|
+ }else {
|
|
|
+ calculateMap1213.put("tarePlaceId", placeId1213);
|
|
|
+ }
|
|
|
+ i += tmstruckWeightResultService.updateWeightResult(calculateMap1213);
|
|
|
//发送计量委托
|
|
|
Integer materialId = utilsMapper.getLxFirstMaterialId(DataChange.dataToBigDecimal(map.get("orderId")));
|
|
|
map.put("materialId", materialId);
|