三级前后端页面修改

This commit is contained in:
2025-11-07 14:33:28 +08:00
parent 8117421531
commit e26a80dd3d
3 changed files with 34 additions and 1 deletions

View File

@@ -541,7 +541,13 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
generateRecordService.updateByBo(oldQrBo);
}
// 2. 将原始钢卷标记为历史数据(已在上面完成)
// 2. 将原始钢卷标记为历史数据,并记录所有子卷号
// 在母卷的 parent_coil_nos 字段中记录所有子卷号(用逗号分隔)
String childCoilNos = String.join(",", allNewCoilNos);
LambdaUpdateWrapper<WmsMaterialCoil> motherUpdateWrapper = new LambdaUpdateWrapper<>();
motherUpdateWrapper.eq(WmsMaterialCoil::getCoilId, oldCoil.getCoilId())
.set(WmsMaterialCoil::getParentCoilNos, childCoilNos); // 记录子卷号
baseMapper.update(null, motherUpdateWrapper);
// 3. 为每个分卷后的子钢卷生成独立的二维码并插入数据库
for (WmsMaterialCoilBo newCoilBo : bo.getNewCoils()) {
@@ -562,6 +568,9 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
newCoil.setWarehouseId(oldCoil.getWarehouseId());
newCoil.setActualWarehouseId(oldCoil.getActualWarehouseId());
}
// 在子卷的 parent_coil_nos 字段中记录母卷号
newCoil.setParentCoilNos(oldCoil.getCurrentCoilNo());
// 为每个子钢卷生成独立二维码
Long newQrcodeId = generateQrcodeForSplit(oldCoil, newCoilBo, allNewCoilNos);