Merge branch '0.8.X' of https://gitee.com/hdka/klp-oa into 0.8.X

This commit is contained in:
砂糖
2025-11-07 14:35:55 +08:00
5 changed files with 46 additions and 13 deletions

View File

@@ -144,6 +144,16 @@
<p class="coil-detail" v-if="coil.warehouse && coil.warehouse.warehouseName">
库区{{ coil.warehouse.warehouseName }}
</p>
<!-- 显示母卷/子卷关系 -->
<p class="coil-detail" v-if="coil.parentCoilNos && coil.hasMergeSplit === 1">
<el-tag type="warning" size="mini">来自母卷{{ coil.parentCoilNos }}</el-tag>
</p>
<p class="coil-detail" v-if="coil.parentCoilNos && coil.hasMergeSplit === 0 && coil.dataType === 0">
<el-tag type="info" size="mini">分为子卷{{ coil.parentCoilNos }}</el-tag>
</p>
<p class="coil-detail" v-if="coil.parentCoilNos && coil.hasMergeSplit === 2">
<el-tag type="success" size="mini">合并自{{ coil.parentCoilNos }}</el-tag>
</p>
<p class="coil-detail">{{ coil.createTime }}</p>
</div>
</el-card>

View File

@@ -115,6 +115,20 @@
<el-table-column label="班组" align="center" prop="team" />
<el-table-column label="毛重" align="center" prop="grossWeight" />
<el-table-column label="净重" align="center" prop="netWeight" />
<el-table-column label="关联信息" align="center" prop="parentCoilNos" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.parentCoilNos && scope.row.hasMergeSplit === 1">
<el-tag type="warning" size="mini">来自母卷{{ scope.row.parentCoilNos }}</el-tag>
</span>
<span v-else-if="scope.row.parentCoilNos && scope.row.dataType === 0">
<el-tag type="info" size="mini">分为子卷{{ scope.row.parentCoilNos }}</el-tag>
</span>
<span v-else-if="scope.row.parentCoilNos && scope.row.hasMergeSplit === 2">
<el-tag type="success" size="mini">合并自{{ scope.row.parentCoilNos }}</el-tag>
</span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">

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);

View File

@@ -145,16 +145,16 @@ public class WmsProductServiceImpl implements IWmsProductService {
if ("产品".equals(type)) {
// 产品默认属性(根据截图)
defaultAttrs = Arrays.asList(
new String[]{"规格", "0.6 * 1250"},
new String[]{"材质", "SPCC"},
new String[]{"表面处理", "涂油"}
new String[]{"规格", null},
new String[]{"材质", null},
new String[]{"表面处理", null}
);
} else {
// 原料默认属性(根据截图)
defaultAttrs = Arrays.asList(
new String[]{"规格", "4 * 1265"},
new String[]{"材质", "Q195L"},
new String[]{"厂家", "天铁"}
new String[]{"规格", null},
new String[]{"材质", null},
new String[]{"厂家", null}
);
}

View File

@@ -255,16 +255,16 @@ public class WmsRawMaterialServiceImpl implements IWmsRawMaterialService {
if ("产品".equals(type)) {
// 产品默认属性(根据截图)
defaultAttrs = Arrays.asList(
new String[]{"规格", "0.6 * 1250"},
new String[]{"材质", "SPCC"},
new String[]{"表面处理", "涂油"}
new String[]{"规格", null},
new String[]{"材质", null},
new String[]{"表面处理", null}
);
} else {
// 原料默认属性(根据截图)
defaultAttrs = Arrays.asList(
new String[]{"规格", "4 * 1265"},
new String[]{"材质", "Q195L"},
new String[]{"厂家", "天铁"}
new String[]{"规格", null},
new String[]{"材质", null},
new String[]{"厂家", null}
);
}