|
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.Arrays;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
|
|
|
@@ -113,25 +114,26 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
return map.get("orderNumber") + "成功";
|
|
return map.get("orderNumber") + "成功";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ //属于采购订单的订单类型(先计毛后计皮)
|
|
|
|
+ final private List<Integer> judgeOrderTypeList = Arrays.asList(5, 6, 7, 8, 9, 12, 14, 17, 18);
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生成汽运计量实体类
|
|
* 生成汽运计量实体类
|
|
|
|
+ * @Author TXF
|
|
|
|
+ * @Date 2022/1/5 16:41
|
|
* @param map
|
|
* @param map
|
|
* @return
|
|
* @return
|
|
- */
|
|
|
|
|
|
+ **/
|
|
public TmstruckWeightResult generateWeightResult(Map<String, Object> map) throws Exception {
|
|
public TmstruckWeightResult generateWeightResult(Map<String, Object> map) throws Exception {
|
|
TmstruckWeightResult tmstruckWeightResult = new TmstruckWeightResult();
|
|
TmstruckWeightResult tmstruckWeightResult = new TmstruckWeightResult();
|
|
tmstruckWeightResult.setId(DataChange.dataToBigDecimal(map.get("weightTaskResultId")));
|
|
tmstruckWeightResult.setId(DataChange.dataToBigDecimal(map.get("weightTaskResultId")));
|
|
- BigDecimal orderType = DataChange.dataToBigDecimal(map.get("orderTypee"));
|
|
|
|
|
|
+ Integer orderType = DataChange.dataToBigDecimal(map.get("orderTypee")).intValue();
|
|
//磅单号
|
|
//磅单号
|
|
tmstruckWeightResult.setResultPoundNo((String) map.get("resultPoundNo"));
|
|
tmstruckWeightResult.setResultPoundNo((String) map.get("resultPoundNo"));
|
|
String resultCrossWeightTime = (String) map.get("resultCrossWeightTime");
|
|
String resultCrossWeightTime = (String) map.get("resultCrossWeightTime");
|
|
tmstruckWeightResult.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
|
|
tmstruckWeightResult.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
|
|
//如果是采购订单 先计毛再计皮
|
|
//如果是采购订单 先计毛再计皮
|
|
- if("56789".contains(orderType.toString())
|
|
|
|
- || orderType.intValue() == 12
|
|
|
|
- || orderType.intValue() == 14
|
|
|
|
- ){
|
|
|
|
|
|
+ if(judgeOrderTypeList.contains(orderType)){
|
|
//如果毛重数据为空 则是第一次计量为毛重 此时第一次计量时间放皮重时间里面
|
|
//如果毛重数据为空 则是第一次计量为毛重 此时第一次计量时间放皮重时间里面
|
|
if(resultCrossWeightTime == null || resultCrossWeightTime.length() == 0){
|
|
if(resultCrossWeightTime == null || resultCrossWeightTime.length() == 0){
|
|
addMaoWeightResult(tmstruckWeightResult, map);
|
|
addMaoWeightResult(tmstruckWeightResult, map);
|
|
@@ -152,7 +154,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- else if(orderType.intValue() == 10){
|
|
|
|
|
|
+ else if(orderType == 10){
|
|
//查询还有几条没有净重的实绩
|
|
//查询还有几条没有净重的实绩
|
|
Integer resultNum = tmstruckWeightResultMapper.selectNoNetWeightResult((String) map.get("orderNumber"));
|
|
Integer resultNum = tmstruckWeightResultMapper.selectNoNetWeightResult((String) map.get("orderNumber"));
|
|
if(resultNum == 2){
|
|
if(resultNum == 2){
|