|
|
|
@ -6381,7 +6381,7 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 导入物料包装属性(每卷数量、每箱卷数、每卷重量、箱重量、箱类型) |
|
|
|
* @Description 导入物料包装属性(每卷数量、每箱卷数、每卷重量、箱重量、箱类型、FSC标签属性) |
|
|
|
* @param file Excel文件 |
|
|
|
* @param buNo 业务单元编码 |
|
|
|
* @param username 用户名 |
|
|
|
@ -6427,6 +6427,18 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
String lengthStr = getCellValueAsString(row.getCell(6), dataFormatter); |
|
|
|
String widthStr = getCellValueAsString(row.getCell(7), dataFormatter); |
|
|
|
String heightStr = getCellValueAsString(row.getCell(8), dataFormatter); |
|
|
|
|
|
|
|
// 读取FSC标签属性字段:P距 排数 1米标签面积 底纸宽度(MM) BOM分配张数 P距-2 排数-2 1米标签面积-2 底纸宽度(MM)-2 BOM分配张数-2 |
|
|
|
String fsc001Str = getCellValueAsString(row.getCell(9), dataFormatter); // P距 |
|
|
|
String fsc002Str = getCellValueAsString(row.getCell(10), dataFormatter); // 排数 |
|
|
|
String fsc003Str = getCellValueAsString(row.getCell(11), dataFormatter); // 1米标签面积 |
|
|
|
String fsc004Str = getCellValueAsString(row.getCell(12), dataFormatter); // 底纸宽度(MM) |
|
|
|
String fsc005Str = getCellValueAsString(row.getCell(13), dataFormatter); // BOM分配张数 |
|
|
|
String fsc00102Str = getCellValueAsString(row.getCell(14), dataFormatter); // P距-2 |
|
|
|
String fsc00202Str = getCellValueAsString(row.getCell(15), dataFormatter); // 排数-2 |
|
|
|
String fsc00302Str = getCellValueAsString(row.getCell(16), dataFormatter); // 1米标签面积-2 |
|
|
|
String fsc00402Str = getCellValueAsString(row.getCell(17), dataFormatter); // 底纸宽度(MM)-2 |
|
|
|
String fsc00502Str = getCellValueAsString(row.getCell(18), dataFormatter); // BOM分配张数-2 |
|
|
|
// 跳过空行 |
|
|
|
if (StringUtils.isBlank(sku)) { |
|
|
|
continue; |
|
|
|
@ -6441,6 +6453,18 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
rowData.put("length", lengthStr); |
|
|
|
rowData.put("width", widthStr); |
|
|
|
rowData.put("height", heightStr); |
|
|
|
|
|
|
|
// FSC标签属性字段 |
|
|
|
rowData.put("fsc001", fsc001Str); |
|
|
|
rowData.put("fsc002", fsc002Str); |
|
|
|
rowData.put("fsc003", fsc003Str); |
|
|
|
rowData.put("fsc004", fsc004Str); |
|
|
|
rowData.put("fsc005", fsc005Str); |
|
|
|
rowData.put("fsc001-02", fsc00102Str); |
|
|
|
rowData.put("fsc002-02", fsc00202Str); |
|
|
|
rowData.put("fsc003-02", fsc00302Str); |
|
|
|
rowData.put("fsc004-02", fsc00402Str); |
|
|
|
rowData.put("fsc005-02", fsc00502Str); |
|
|
|
|
|
|
|
// 验证BU |
|
|
|
if (StringUtils.isBlank(buNo)) { |
|
|
|
@ -6483,10 +6507,16 @@ public class CoDelServiceImpl implements CoDelService { |
|
|
|
boolean hasFail = false; |
|
|
|
int updatedPartCount = 0; |
|
|
|
|
|
|
|
// 处理属性值:每卷数量(ROLLQTY)、每箱卷数(BOXROLLS)、每卷重量(ROLLWEIGHT)、箱重量(BOXWEIGHT) |
|
|
|
String[] itemNos = {"ROLLQTY", "BOXROLLS", "ROLLWEIGHT", "BOXWEIGHT"}; |
|
|
|
String[] itemValues = {rollQtyStr, boxRollsStr, rollWeightStr, boxWeightStr}; |
|
|
|
String[] itemNames = {"每卷数量", "每箱卷数", "每卷重量", "箱重量"}; |
|
|
|
// 处理属性值:每卷数量(ROLLQTY)、每箱卷数(BOXROLLS)、每卷重量(ROLLWEIGHT)、箱重量(BOXWEIGHT)、FSC标签属性 |
|
|
|
String[] itemNos = {"ROLLQTY", "BOXROLLS", "ROLLWEIGHT", "BOXWEIGHT", |
|
|
|
"FSC001", "FSC002", "FSC003", "FSC004", "FSC005", |
|
|
|
"FSC001-02", "FSC002-02", "FSC003-02", "FSC004-02", "FSC005-02"}; |
|
|
|
String[] itemValues = {rollQtyStr, boxRollsStr, rollWeightStr, boxWeightStr, |
|
|
|
fsc001Str, fsc002Str, fsc003Str, fsc004Str, fsc005Str, |
|
|
|
fsc00102Str, fsc00202Str, fsc00302Str, fsc00402Str, fsc00502Str}; |
|
|
|
String[] itemNames = {"每卷数量", "每箱卷数", "每卷重量", "箱重量", |
|
|
|
"P距", "排数", "1米标签面积", "底纸宽度(MM)", "BOM分配张数", |
|
|
|
"P距-2", "排数-2", "1米标签面积-2", "底纸宽度(MM)-2", "BOM分配张数-2"}; |
|
|
|
|
|
|
|
// 为每个匹配的part设置属性 |
|
|
|
for (PartData partData : partList) { |
|
|
|
|