|
@@ -230,6 +230,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
}
|
|
|
//根据传输过来的物资名称和规格型号
|
|
|
Object resultNetWeight = map.get("resultNetWeight");
|
|
|
+
|
|
|
if(resultNetWeight != null && !"".equals(resultNetWeight)) {
|
|
|
BigDecimal materialId = tmstruckWeightResultMapper.getMaterialId(map);
|
|
|
if(materialId == null){
|
|
@@ -261,6 +262,12 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
}
|
|
|
tmstruckWeightResultMapper.updateOrderMaterial(map);
|
|
|
tmstruckWeightResultMapper.updateSaleMaterialId(saleMaterialId,materialNum,newWeight);
|
|
|
+ }else{
|
|
|
+ //根据运单id查询其中一个物资id,确保报表能有数据
|
|
|
+ BigDecimal materialId = tmstruckWeightResultMapper.getMaterialIdByOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
|
|
|
+ if (materialId != null) {
|
|
|
+ tmstruckWeightResult.setMaterialId(materialId);
|
|
|
+ }
|
|
|
}
|
|
|
addWeightResult(tmstruckWeightResult, map); //添加计量实绩数据
|
|
|
// 更新订单中路段顺序号,如果毛重时间为空则为计皮:也就是销售第一次计皮,反之有毛重时间则为计毛
|