|
@@ -209,18 +209,21 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
tmstruckWeightResult.setResultPoundNo((String) map.get("resultPoundNo"));
|
|
|
String resultCrossWeightTime = (String) map.get("resultCrossWeightTime");
|
|
|
|
|
|
- BigDecimal materialId = tmstruckWeightResultMapper.getMaterialId(map);
|
|
|
- if(materialId == null){
|
|
|
- throw new Exception("系统找不到该物资");
|
|
|
- }
|
|
|
- map.put("materialId",materialId);
|
|
|
-
|
|
|
- int netWeightCount = tmstruckWeightResultMapper.getHaveNetWeightByMaterial(map);
|
|
|
- if(netWeightCount != 0){
|
|
|
- throw new Exception("该物资已有净重,不能再次录入");
|
|
|
- }
|
|
|
- tmstruckWeightResult.setMaterialId(materialId);
|
|
|
- tmstruckWeightResult.setMaterialNum(DataChange.dataToBigDecimal(map.get("goodNum")));
|
|
|
+ Object resultNetWeight = map.get("resultNetWeight");
|
|
|
+ if(resultNetWeight != null && !"".equals(resultNetWeight)) {
|
|
|
+ BigDecimal materialId = tmstruckWeightResultMapper.getMaterialId(map);
|
|
|
+ if(materialId == null){
|
|
|
+ throw new Exception("系统找不到该物资");
|
|
|
+ }
|
|
|
+ map.put("materialId",materialId);
|
|
|
+
|
|
|
+ int netWeightCount = tmstruckWeightResultMapper.getHaveNetWeightByMaterial(map);
|
|
|
+ if(netWeightCount != 0){
|
|
|
+ throw new Exception("该物资已有净重,不能再次录入");
|
|
|
+ }
|
|
|
+ tmstruckWeightResult.setMaterialId(materialId);
|
|
|
+ tmstruckWeightResult.setMaterialNum(DataChange.dataToBigDecimal(map.get("goodNum")));
|
|
|
+ }
|
|
|
addWeightResult(tmstruckWeightResult, map);
|
|
|
|
|
|
if(resultCrossWeightTime == null || resultCrossWeightTime.length() == 0){
|
|
@@ -234,7 +237,6 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
List<Map<String, Object>> steelMapList = tmstruckWeightResultMapper.getNoNetWeightResultId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
|
|
|
if(steelMapList.size() >= 2){
|
|
|
Map<String, Object> steelMap = steelMapList.get(1);
|
|
|
- Object resultNetWeight = map.get("resultNetWeight");
|
|
|
if(resultNetWeight != null && !"".equals(resultNetWeight)){
|
|
|
updateSteelAssemble(map, steelMap);
|
|
|
map.put("segmentSqe", steelMap.get("tareSegmentSqe"));
|