|
@@ -1,14 +1,13 @@
|
|
|
package com.steerinfo.dil.service.impl;
|
|
|
|
|
|
import com.steerinfo.dil.feign.TmstruckFeign;
|
|
|
+import com.steerinfo.dil.mapper.WmspGridMaterialMapper;
|
|
|
import com.steerinfo.dil.mapper.WmspOutboundResultMapper;
|
|
|
import com.steerinfo.dil.mapper.WmspOutboundScanResultMapper;
|
|
|
-import com.steerinfo.dil.model.WmspInboundResult;
|
|
|
import com.steerinfo.dil.model.WmspOutboundResult;
|
|
|
import com.steerinfo.dil.model.WmspOutboundScanResult;
|
|
|
import com.steerinfo.dil.service.IWmspOutboundResultService;
|
|
|
-import com.steerinfo.framework.mapper.IBaseMapper;
|
|
|
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
|
|
|
+import com.steerinfo.dil.util.DataChange;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -42,6 +41,10 @@ public class WmspOutboundResultServiceImpl implements IWmspOutboundResultServic
|
|
|
|
|
|
@Autowired
|
|
|
private TmstruckFeign tmstruckFeign;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private WmspGridMaterialMapper wmspGridMaterialMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public List<Map<String, Object>> selectResultNumber(Map<String, Object> mapval) {
|
|
|
return wmspOutboundResultMapper.selectResultNumber(mapval);
|
|
@@ -224,4 +227,24 @@ public class WmspOutboundResultServiceImpl implements IWmspOutboundResultServic
|
|
|
public int getOutboundStatus(BigDecimal orderId) {
|
|
|
return wmspOutboundResultMapper.getOutboundStatus(orderId);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int deleteGridMaterial(Integer resultId) {
|
|
|
+ //获取扫描的物资
|
|
|
+ List<Map<String,Object>> scanList = wmspOutboundScanResultMapper.getResultMaterial(resultId);
|
|
|
+ //根据扫描的吊牌数据查询钢材物资id
|
|
|
+ List<Map<String,Object>> listMap = null;
|
|
|
+ int i=0;
|
|
|
+ for(Map<String,Object> scanMaterial:scanList){
|
|
|
+ String materialOnlyCode = scanMaterial.get("RESULT_MATERIAL").toString();
|
|
|
+ String[] tag1 = materialOnlyCode.split("\\-");
|
|
|
+ listMap = wmspOutboundScanResultMapper.getMaterialSteelId(tag1[7]);
|
|
|
+ for(Map<String,Object> map:listMap) {
|
|
|
+ BigDecimal materialId = DataChange.dataToBigDecimal(map.get("materialId"));
|
|
|
+ //将这些物资钢材id进行逻辑删除
|
|
|
+ i += wmspGridMaterialMapper.updateByMaterialId(materialId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return i;
|
|
|
+ }
|
|
|
}
|