|
@@ -89,7 +89,6 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
|
*/
|
|
|
public int addMaoMeasureCommission(Map<String, Object> map){
|
|
|
int i = 0;
|
|
|
- addMeasureCommission(map);
|
|
|
|
|
|
int orderType = DataChange.dataToBigDecimal(map.get("orderTypee")).intValue();
|
|
|
if(orderType == 10){
|
|
@@ -119,7 +118,6 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
|
*/
|
|
|
public int addXSMeasureCommission(Map<String, Object> map){
|
|
|
int i = 0;
|
|
|
- addMeasureCommission(map);
|
|
|
|
|
|
|
|
|
Integer shipperId = tmstruckMeasureCommissionMapper.getShipperIdByOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
|
|
@@ -188,7 +186,6 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
|
i = sendDXMeasureCommissionMes(map);
|
|
|
}
|
|
|
}
|
|
|
- addMeasureCommission(map);
|
|
|
return i;
|
|
|
}
|
|
|
|
|
@@ -323,10 +320,12 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
|
measureCommission.put("isInsert",true);
|
|
|
measureCommission.put("deliveryMethod", "磅重交货");
|
|
|
measureCommission.put("packagesNum", 0);
|
|
|
-
|
|
|
}
|
|
|
+ if(measureCommission != null)
|
|
|
+ map.put("materialId", measureCommission.get("materialId"));
|
|
|
+ addMeasureCommission(map);
|
|
|
+ System.out.println(measureCommission);
|
|
|
|
|
|
- System.out.println(measureCommission == null ? "没有查询出委托" : measureCommission);
|
|
|
return 1;
|
|
|
|
|
|
|
|
@@ -412,6 +411,9 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
+ if(measureCommission != null)
|
|
|
+ map.put("materialId", measureCommission.get("item"));
|
|
|
+ addMeasureCommission(map);
|
|
|
|
|
|
return sendMesToDXMeasure(measureCommission);
|
|
|
}
|
|
@@ -479,13 +481,36 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
+ @Transactional
|
|
|
public int sendMeasureCommssion(Map<String, Object> map){
|
|
|
+ if(map.get("deletedCommission") != null){
|
|
|
+
|
|
|
+ List<Integer> commission = tmstruckMeasureCommissionMapper.checkoutWeightCommission(map);
|
|
|
+ if(commission.size() != 0){
|
|
|
+ return 2;
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+
|
|
|
+ Integer alreadySentMaterialId = tmstruckMeasureCommissionMapper.getAlreadySentMaterialId(map);
|
|
|
+ if(alreadySentMaterialId != null){
|
|
|
+ map.put("checkMaterialId", alreadySentMaterialId);
|
|
|
+
|
|
|
+ Map<String, Object> checkoutMesMap = tmstruckMeasureCommissionMapper.checkoutWeightCommission2(map);
|
|
|
+ if(checkoutMesMap == null){
|
|
|
+ return 4;
|
|
|
+ }else {
|
|
|
+
|
|
|
+ if(checkoutMesMap.get("resultNetWeight") == null){
|
|
|
+ return 4;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
int i=0;
|
|
|
|
|
|
BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
|
|
|
- BigDecimal orderType = utilsMapper.getOrderTypeByOrderId(orderId);
|
|
|
- map.put("orderTypee", orderType);
|
|
|
+ map.putAll(utilsMapper.getOrderMesByOrderId(orderId));
|
|
|
+ BigDecimal orderType = DataChange.dataToBigDecimal(map.get("orderTypee"));
|
|
|
|
|
|
switch (orderType.intValue()){
|
|
|
case 1:
|
|
@@ -521,6 +546,13 @@ public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCom
|
|
|
case 18:
|
|
|
i+=addMaoMeasureCommission(map);
|
|
|
}
|
|
|
+ if(i == 1){
|
|
|
+
|
|
|
+ tmstruckMeasureCommissionMapper.updateOmsTruckMaterial(map);
|
|
|
+ if(map.get("deletedCommission") != null){
|
|
|
+ i = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
return i;
|
|
|
}
|
|
|
|