|
@@ -118,6 +118,28 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
* @return
|
|
|
*/
|
|
|
public String addTruckWeightResult(Map<String, Object> map) {
|
|
|
+ //首先通过运输订单号查询订单类型
|
|
|
+ Map<String, Object> oneMap = utilsMapper.getOrderTypeByOrderNumber((String) map.get("orderNumber"));
|
|
|
+ if(oneMap == null){
|
|
|
+ return map.get("orderNumber") + "系统无此订单";
|
|
|
+ }
|
|
|
+ Integer orderType= DataChange.dataToBigDecimal(oneMap.get("orderType")).intValue();
|
|
|
+// if(orderType == 11){
|
|
|
+// TmstruckWeightResult tmstruckWeightResult = new TmstruckWeightResult();
|
|
|
+// tmstruckWeightResult.setResultPoundNo((String) map.get("resultPoundNo"));
|
|
|
+// tmstruckWeightResult.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
|
|
|
+// //首先查询这个订单号的这个物资ID是否有计量实绩
|
|
|
+// Map<String, Object> twoMap = tmstruckWeightResultMapper.selectResultIdByOrderNoAndMaterialId(map);
|
|
|
+// if(twoMap == null){//如果查出来为空,则进行新增操作
|
|
|
+// tmstruckWeightResult.setId(tmstruckWeightResultMapper.selectMaxId()); //新增主键
|
|
|
+// tmstruckWeightResult.setResultTotalId(DataChange.dataToBigDecimal(oneMap.get("totalId"))); //新增总实绩ID
|
|
|
+// try {
|
|
|
+// addWeightResult(tmstruckWeightResult, map);
|
|
|
+// } catch (Exception e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
//通过运输订单号查询计量实绩Id
|
|
|
Map<String, Object> stringObjectMap = tmstruckWeightResultMapper.selectWeightIdByOrderId(map);
|
|
|
if(stringObjectMap == null){
|
|
@@ -137,7 +159,6 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
//如果含有这个变量则代表是老区订单需要判断是否回传给金蝶
|
|
|
if(map.get("needCheckToKD") != null){
|
|
|
if(map.get("resultNetWeight") != null){
|
|
|
- Integer orderType = DataChange.dataToBigDecimal(stringObjectMap.get("orderTypee")).intValue();
|
|
|
Object resultCrossWeightTime = map.get("resultCrossWeightTime");
|
|
|
if ( orderType == 6 && resultCrossWeightTime != null && !"".equals(resultCrossWeightTime)) {
|
|
|
String resultNetWeight = String.valueOf(map.get("resultNetWeight")); //如果净重不为空 或者净重不为0
|
|
@@ -362,6 +383,17 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @Author TXF
|
|
|
+ * @Date 2022/2/18 9:55
|
|
|
+ * @param tmstruckWeightResult
|
|
|
+ * @param map
|
|
|
+ * @return
|
|
|
+ **/
|
|
|
+ public void insertWeightResultBy11(TmstruckWeightResult tmstruckWeightResult, Map<String, Object> map){
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 添加火车计量实绩
|
|
|
* @param map
|