|
@@ -1,6 +1,8 @@
|
|
|
package com.steerinfo.dil.service.impl;
|
|
|
|
|
|
+import com.steerinfo.dil.mapper.WmspGridMaterialMapper;
|
|
|
import com.steerinfo.dil.mapper.WmspInboundResultMapper;
|
|
|
+import com.steerinfo.dil.model.WmspGridMaterial;
|
|
|
import com.steerinfo.dil.model.WmspInboundResult;
|
|
|
import com.steerinfo.dil.service.IWmsInboundResultService;
|
|
|
import com.steerinfo.dil.util.IDUtils;
|
|
@@ -23,7 +25,8 @@ public class WmsInboundResultServiceImpl implements IWmsInboundResultService {
|
|
|
|
|
|
@Autowired
|
|
|
WmspInboundResultMapper wmspInboundResultMapper;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ WmspGridMaterialMapper wmspGridMaterialMapper;
|
|
|
/**
|
|
|
* 1.展示入库实绩所有信息
|
|
|
* @param mapValue
|
|
@@ -173,6 +176,28 @@ public class WmsInboundResultServiceImpl implements IWmsInboundResultService {
|
|
|
return wmspInboundResultMapper.updateInboundStatus(distributeId);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
+// 根据出库的resultId修改入库实绩的逻辑删除状态和仓储网格的状态
|
|
|
+ @Override
|
|
|
+ public int updateInboundGridStatus(Integer resultId) {
|
|
|
+ int i=0;
|
|
|
+// 根据出库的resultId获取当前的吊刚工扫描结果
|
|
|
+ String resultMaterial = wmspInboundResultMapper.getResultMaterialByResultId(resultId);
|
|
|
+// 根据扫描吊牌得到的物资唯一编码修改对应的入库实绩状态和仓储网格状态
|
|
|
+ List<Map<String ,Object>> list =wmspInboundResultMapper.getInboundResult(resultMaterial);
|
|
|
+ for (Map<String, Object> map:list){
|
|
|
+ BigDecimal inboundId = (BigDecimal) map.get("inboundId");
|
|
|
+ BigDecimal grmId = (BigDecimal) map.get("gmId");
|
|
|
+// 创建入库实绩实体类
|
|
|
+ WmspInboundResult wmspInboundResult = new WmspInboundResult();
|
|
|
+ wmspInboundResult.setInboundId(inboundId);
|
|
|
+ wmspInboundResult.setResultDeleted(new BigDecimal(1));
|
|
|
+ i+= wmspInboundResultMapper.updateByPrimaryKeySelective(wmspInboundResult);
|
|
|
+// 创建仓储网格实体类
|
|
|
+ WmspGridMaterial wmspGridMaterial = new WmspGridMaterial();
|
|
|
+ wmspGridMaterial.setGmId(grmId);
|
|
|
+ wmspGridMaterial.setDeleted(new BigDecimal(1));
|
|
|
+ i+= wmspGridMaterialMapper.updateByPrimaryKeySelective(wmspGridMaterial);
|
|
|
+ }
|
|
|
+ return i;
|
|
|
+ }
|
|
|
}
|