luobang 2 years ago
parent
commit
d51815844a

+ 4 - 2
src/main/java/com/steerinfo/dil/controller/WmspOutboundResultController.java

@@ -186,12 +186,14 @@ public class WmspOutboundResultController extends BaseRESTfulController {
     @PostMapping(value = "/insertwmspOutboundScanResult")
     public synchronized RESTfulResult insertwmspOutboundScanResult(@RequestBody(required = false) Map<String, Object> map) throws ParseException {
         //判断物资是否满足要求,目前以下三种不做处理的判断
+
         //获取装卸工扫描吊牌结果   HRB400-14-21706854-9-3049-280-20211001015115-7a63cd87a4095e7f-08010103010100003-4
         String subResultMaterial = map.get("resultMaterial").toString().substring(0,map.get("resultMaterial").toString().length() - 1);
         //获取出库单号
+        String materialOnlyCode=subResultMaterial.split("-")[7];
         BigDecimal resultId = new BigDecimal(map.get("resultId").toString());
         //物资唯一编码
-        String materialOnlyCode=subResultMaterial.split("-")[7];
+
 
         //判断物质是否已经被扫描
         int isScan = wmspOutboundResultService.ExistScanResult(subResultMaterial);
@@ -224,7 +226,7 @@ public class WmspOutboundResultController extends BaseRESTfulController {
 
         if(list.size()>0&&isScan==0&&(materialNumber!=null&&materialNumber!=0)&&(materialNumber>scanCount)){
             //替代操作
-            int result = wmspOutboundResultService.replaceSave(materialOnlyCode);
+            //int result = wmspOutboundResultService.replaceSave(materialOnlyCode);
             //创建扫描实绩
             //通过装卸工工号查询装卸工Id
             BigDecimal personnelId = wmspOutboundResultService.getPersonnelIdByJobnumber(map.get("personnelJobNumber").toString());

+ 1 - 2
src/main/java/com/steerinfo/dil/service/impl/RmsMaterialSteelServiceImpl.java

@@ -152,7 +152,6 @@ public class RmsMaterialSteelServiceImpl implements IRmsMaterialSteelService {
         HashMap<String, Object> mapRmsMaterialSteel = new HashMap<>();
         mapRmsMaterialSteel.put("materialOnlyCode",MaterialOnlyCode);
         Map<String,Object> k =getMaterialSteel(mapRmsMaterialSteel);
-
         //根据物资编码规查找唯一的物资ID
         HashMap<String, Object> mapMaterial = new HashMap<>();
 
@@ -191,7 +190,7 @@ public class RmsMaterialSteelServiceImpl implements IRmsMaterialSteelService {
         //设置物资支数
         //判断支数不为空
         if (materialCount.length()!=0) {
-            rmsMaterialSteel.setMaterialCount(new BigDecimal(materialCount));
+            rmsMaterialSteel.setMaterialCount(new BigDecimal(materialCount.trim()));
         }
         if(MaterialProductionDate.substring(7, MaterialProductionDate.length()-1).length()!=0) {
             //设置物资生产日期,将字符串转换为时间

+ 1 - 1
src/main/java/com/steerinfo/dil/service/impl/WmspGridMaterialServiceImpl.java

@@ -390,7 +390,7 @@ public class WmspGridMaterialServiceImpl  implements IWmspGridMaterialService {
             return -1;
         }else{
             int count = 0;
-//        遍历materialList
+        //遍历materialList
             //创建金蝶报文
             BigDecimal inboundEasId = wmspInboundEasMapper.inboundEasId();
             Map<String, Object> head = new HashMap<>();