|
@@ -91,10 +91,14 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public String addTruckWeightResult(Map<String, Object> map) {
|
|
public String addTruckWeightResult(Map<String, Object> map) {
|
|
- //通过传来的运输订单号 与 物资ID查询计重实绩ID
|
|
|
|
- Map<String, Object> stringObjectMap = tmstruckWeightResultMapper.selectTotalIdByOrderNo(map);
|
|
|
|
|
|
+ //通过运输订单号查询计量实绩Id
|
|
|
|
+ Map<String, Object> stringObjectMap = tmstruckWeightResultMapper.selectWeightIdByOrderId(map);
|
|
if(stringObjectMap == null){
|
|
if(stringObjectMap == null){
|
|
- return map.get("orderNumber") + "没有此订单信息或物资信息(" + map.get("materialId") + ")错误";
|
|
|
|
|
|
+ //如果都有净重了 通过传来的运输订单号 与 物资ID查询计重实绩ID
|
|
|
|
+ stringObjectMap = tmstruckWeightResultMapper.selectTotalIdByOrderNo(map);
|
|
|
|
+ if(stringObjectMap == null){
|
|
|
|
+ return map.get("orderNumber") + "没有此订单信息或物资信息(" + map.get("materialId") + ")错误";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
map.putAll(stringObjectMap);
|
|
map.putAll(stringObjectMap);
|
|
TmstruckWeightResult tmstruckWeightResult = null;
|
|
TmstruckWeightResult tmstruckWeightResult = null;
|
|
@@ -123,6 +127,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
//磅单号
|
|
//磅单号
|
|
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")));
|
|
//如果是采购订单 先计毛再计皮
|
|
//如果是采购订单 先计毛再计皮
|
|
if("5678".contains(orderType.toString()) || orderType.intValue() == 12 || orderType.intValue() == 14){
|
|
if("5678".contains(orderType.toString()) || orderType.intValue() == 12 || orderType.intValue() == 14){
|
|
//如果毛重数据为空 则是第一次计量为毛重 此时第一次计量时间放皮重时间里面
|
|
//如果毛重数据为空 则是第一次计量为毛重 此时第一次计量时间放皮重时间里面
|