|
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -45,6 +46,9 @@ public class WmspOutboundResultServiceImpl implements IWmspOutboundResultServic
|
|
|
@Autowired
|
|
|
private WmspGridMaterialMapper wmspGridMaterialMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ WmspSendReceiveServiceImpl wmspSendReceiveService;
|
|
|
+
|
|
|
@Override
|
|
|
public List<Map<String, Object>> selectResultNumber(Map<String, Object> mapval) {
|
|
|
return wmspOutboundResultMapper.selectResultNumber(mapval);
|
|
@@ -237,13 +241,25 @@ public class WmspOutboundResultServiceImpl implements IWmspOutboundResultServic
|
|
|
int i=0;
|
|
|
for(Map<String,Object> scanMaterial:scanList){
|
|
|
String materialOnlyCode = scanMaterial.get("RESULT_MATERIAL").toString();*/
|
|
|
+
|
|
|
int i=0;
|
|
|
String[] tag1 = materialOnlyCode.split("\\-");
|
|
|
List<Map<String,Object>> listMap = wmspOutboundScanResultMapper.getMaterialSteelId(tag1[7]);
|
|
|
+
|
|
|
for(Map<String,Object> map:listMap) {
|
|
|
- BigDecimal materialId = DataChange.dataToBigDecimal(map.get("materialId"));
|
|
|
+ BigDecimal materialSteelId = DataChange.dataToBigDecimal(map.get("materialId"));
|
|
|
+ if(materialSteelId == null){
|
|
|
+ return -1;
|
|
|
+ }
|
|
|
+ //根据物资钢材id查询仓库id和物资大类id
|
|
|
+ BigDecimal materialId = wmspSendReceiveService.getMaterialId(materialSteelId);
|
|
|
+ Map<String,Object> map1 = new HashMap<>();
|
|
|
+ map1.put("materialId",materialId);
|
|
|
+ map1.put("warehouseId",3);
|
|
|
+ wmspSendReceiveService.addOutBoundSendReceive(map1);
|
|
|
+ wmspSendReceiveService.addThisdayInventorySendReceive(map1);
|
|
|
//将这些物资钢材id进行逻辑删除
|
|
|
- i += wmspGridMaterialMapper.updateByMaterialId(materialId);
|
|
|
+ i += wmspGridMaterialMapper.updateByMaterialId(materialSteelId);
|
|
|
}
|
|
|
|
|
|
return i;
|