fix:分配仓库修改

This commit is contained in:
zhangzq
2026-10-27 14:14:36 +08:00
parent 5914101484
commit 3374de5a08
2 changed files with 12 additions and 14 deletions

View File

@@ -21,15 +21,9 @@ import java.util.Map;
public interface WmsToZDWmdService {
public static Map<String,String> ZD_LOS_MAPPING = MapOf.of(
"EP2","6.002"
,"E501", "6.007",
"E502", "6.007",
"E503", "6.007",
"E504", "6.007",
"E505", "6.007",
"E506", "6.007",
"MiniLoad", "7.017",
"E507", "6.007");
"EP2","R001",
"MiniLoad", "R001"
);
/**
* 生产领料需求单下发

View File

@@ -14,6 +14,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.MapOf;
import org.nl.wms.basedata_manage.service.IMdMeMaterialbaseService;
import org.nl.wms.basedata_manage.service.IStructattrService;
import org.nl.wms.basedata_manage.service.dao.MdMeMaterialbase;
@@ -303,7 +304,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
DemandInventryDto demandDto = new DemandInventryDto();
demandDto.setSkuCode(skuCode);
demandDto.setQty(BigDecimal.ZERO);
demandDto.setHouseCode("6.011");
demandDto.setHouseCode("R002");
demandDto.setHouseName("'五期装配原材料平库'");
}
ResponseEntity<List<ZDInventory>> responseEntity = wmsToZDWmdService.queryInventory(skuCode);
@@ -315,12 +316,15 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
demandDto.setSkuName(null);
demandDto.setQty(item.getQty());
//中鼎库存有映射
String houseMapping = WmsToZDWmdService.ZD_LOS_MAPPING.get(item.getHouseCode());
final HashMap<String,String> map = MapOf.of(
"EP2", "R001",
"MiniLoad立库", "R001");
String houseMapping = map.get(item.getHouseCode());
if (StringUtils.isEmpty(houseMapping)){
throw new BadRequestException("分配失败,当前中鼎仓库编码未配置映射");
}
demandDto.setHouseCode(houseMapping);
demandDto.setHouseName("五期原材料立库6.002");
demandDto.setHouseName("五期原材料立库R001");
resultList.add(demandDto);
}
}else {
@@ -328,8 +332,8 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
demandDto.setSkuCode(skuCode);
demandDto.setSkuName(null);
demandDto.setQty(BigDecimal.ZERO);
demandDto.setHouseCode("6.002");
demandDto.setHouseName("五期原材料立库6.002");
demandDto.setHouseCode("R001");
demandDto.setHouseName("五期原材料立库R001");
resultList.add(demandDto);
}
return resultList.stream().filter(i-> !i.getHouseName().contains("线边库")).collect(Collectors.toList());