opt: 二期复用虚拟分切计划

This commit is contained in:
2025-02-15 15:50:12 +08:00
parent 2718097c54
commit b66107bed6
3 changed files with 15 additions and 1 deletions

View File

@@ -129,4 +129,11 @@ public interface IPdmBiSlittingproductionplanService extends IService<PdmBiSlitt
* @return /
*/
List<PdmBiSlittingproductionplan> getByQzzNoByNoStatus(String qzzno);
/**
* 根据子卷号获取一条记录
* @param containerName
* @return
*/
PdmBiSlittingproductionplan getByContainerNameNotStatus(String containerName);
}

View File

@@ -184,4 +184,11 @@ public class PdmBiSlittingproductionplanServiceImpl extends ServiceImpl<PdmBiSli
.eq(PdmBiSlittingproductionplan::getIs_delete, "0");
return pdmBiSlittingproductionplanMapper.selectList(lam);
}
@Override
public PdmBiSlittingproductionplan getByContainerNameNotStatus(String containerName) {
LambdaQueryWrapper<PdmBiSlittingproductionplan> lam = new QueryWrapper<PdmBiSlittingproductionplan>().lambda();
lam.eq(PdmBiSlittingproductionplan::getContainer_name, containerName);
return getOne(lam, false);
}
}

View File

@@ -1946,7 +1946,7 @@ public class SlitterServiceImpl implements SlitterService {
// 虚拟计划
for (int i = 0; i < 4; i++) {
String containerName = area + "虚拟-" + deviceCode + "-" + i;
PdmBiSlittingproductionplan plan = slittingproductionplanService.getByContainerName(containerName);
PdmBiSlittingproductionplan plan = slittingproductionplanService.getByContainerNameNotStatus(containerName);
if (ObjectUtil.isEmpty(plan)) {
plan = new PdmBiSlittingproductionplan();
plan.setWorkorder_id(IdUtil.getSnowflake(1,1).nextIdStr());