|
|
|
@ -58,6 +58,7 @@ import com.spring.modules.test.vo.TestInformationVo; |
|
|
|
import ifs.fnd.ap.APException; |
|
|
|
import ifs.fnd.ap.Server; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.poi.ss.usermodel.Cell; |
|
|
|
import org.apache.poi.xssf.usermodel.XSSFRow; |
|
|
|
import org.apache.poi.xssf.usermodel.XSSFSheet; |
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
|
|
|
@ -626,7 +627,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
partRevision.setEngRevision("1"); |
|
|
|
partInformationMapper.saveRevision(partRevision); |
|
|
|
// 新增物料的属性 |
|
|
|
if (!data.getPartItemList().isEmpty()) { |
|
|
|
if (data.getPartItemList() != null &&!data.getPartItemList().isEmpty()) { |
|
|
|
savePartItemInfo(data); |
|
|
|
} |
|
|
|
// 创建该物料的bom默认版本 |
|
|
|
@ -3366,7 +3367,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
throw new RuntimeException("请维护编码生成规则(TransNoControl)!"); |
|
|
|
} |
|
|
|
task.setPartNo(no + "A01"); // 物料编码 |
|
|
|
task.setBuNo(row.getCell(0).getStringCellValue()); // BU |
|
|
|
/* task.setBuNo(row.getCell(0).getStringCellValue()); // BU |
|
|
|
task.setPartDesc(row.getCell(1).getStringCellValue()); // 物料描述 |
|
|
|
task.setCustomerPartNo(row.getCell(2).getStringCellValue()); // 客户料号 |
|
|
|
task.setPartType(row.getCell(3).getStringCellValue()); // 零件类型 |
|
|
|
@ -3376,7 +3377,14 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
task.setCodeNo(""); |
|
|
|
} else { |
|
|
|
task.setCodeNo(row.getCell(6).getStringCellValue()); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
task.setBuNo(getCellValueAsString(row.getCell(0))); |
|
|
|
task.setPartDesc(getCellValueAsString(row.getCell(1))); |
|
|
|
task.setCustomerPartNo(getCellValueAsString(row.getCell(2))); |
|
|
|
task.setPartType(getCellValueAsString(row.getCell(3))); |
|
|
|
task.setProductGroupId4(getCellValueAsString(row.getCell(4))); |
|
|
|
task.setUmId(getCellValueAsString(row.getCell(5))); |
|
|
|
task.setCodeNo(getCellValueAsString(row.getCell(6))); |
|
|
|
task.setUomForWeightNet("kg"); |
|
|
|
task.setUomForVolumeNet("m3"); |
|
|
|
task.setActive("Y"); |
|
|
|
@ -3406,6 +3414,27 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private static String getCellValueAsString(Cell cell) { |
|
|
|
if (cell == null) { |
|
|
|
return ""; |
|
|
|
} |
|
|
|
|
|
|
|
switch (cell.getCellType()) { |
|
|
|
case STRING: |
|
|
|
return cell.getStringCellValue().trim(); |
|
|
|
case NUMERIC: |
|
|
|
return String.valueOf(cell.getNumericCellValue()).replace(".0", ""); |
|
|
|
case BOOLEAN: |
|
|
|
return String.valueOf(cell.getBooleanCellValue()); |
|
|
|
case FORMULA: |
|
|
|
return cell.getCellFormula(); |
|
|
|
case BLANK: |
|
|
|
return ""; |
|
|
|
default: |
|
|
|
return ""; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询文件ID |
|
|
|
* @param data |
|
|
|
|