feat(furnace-plan): 添加合同ID字段并实现合同关联功能

- 在 WmsFurnacePlanLocationItemBo 中新增 contractId 字段
- 实现合同ID映射关系构建和数据流转
- 移除二维码步骤类型的空值检查条件
- 完成合同信息在退火加工流程中的传递
This commit is contained in:
2026-06-18 13:34:47 +08:00
parent 759bbbed63
commit 7f1a89eb61
3 changed files with 14 additions and 1 deletions

View File

@@ -18,4 +18,9 @@ public class WmsFurnacePlanLocationItemBo {
@NotNull(message = "逻辑库位不能为空")
private Long warehouseId;
/**
* 合同ID
*/
private Long contractId;
}

View File

@@ -380,6 +380,13 @@ public class WmsFurnacePlanServiceImpl implements IWmsFurnacePlanService {
.collect(java.util.stream.Collectors.toMap(com.klp.domain.bo.WmsFurnacePlanLocationItemBo::getCoilId,
com.klp.domain.bo.WmsFurnacePlanLocationItemBo::getWarehouseId, (a, b) -> a));
java.util.Map<Long, Long> contractIdMap = locations.stream()
.filter(l -> l.getContractId() != null)
.collect(java.util.stream.Collectors.toMap(
com.klp.domain.bo.WmsFurnacePlanLocationItemBo::getCoilId,
com.klp.domain.bo.WmsFurnacePlanLocationItemBo::getContractId,
(a, b) -> a));
for (WmsFurnacePlanCoilVo coil : coils) {
Long targetLocation = locationMap.get(coil.getCoilId());
if (targetLocation == null) {
@@ -407,6 +414,7 @@ public class WmsFurnacePlanServiceImpl implements IWmsFurnacePlanService {
updateBo.setStatus(0);
updateBo.setExportBy(null);
updateBo.setExportTime(null);
updateBo.setContractId(contractIdMap.get(coil.getCoilId()));
materialCoilService.updateByBo(updateBo, "annealing");

View File

@@ -2044,7 +2044,7 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
// }
// 加工操作必须绑定合同
if (bo.getContractId() == null && StringUtils.isBlank(qrcodeStepType)) {
if (bo.getContractId() == null) {
throw new RuntimeException("未填写合同");
}