| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addOrUpdateSalesLedgerProduct(SalesLedgerProduct salesLedgerProduct) { |
| | | |
| | | // 销售台账(type=1)手工录入品名/材质/规格型号时,自动注册到产品维护 |
| | | if (Integer.valueOf(1).equals(salesLedgerProduct.getType()) |
| | | && StringUtils.isNotBlank(salesLedgerProduct.getMaterial())) { |
| | | // 销售台账(type=1)手工录入产品大类/规格型号时,自动注册到产品维护(统一挂「成品」大类下) |
| | | if (Integer.valueOf(1).equals(salesLedgerProduct.getType())) { |
| | | ProductModel productModel = productService.ensureProductHierarchy( |
| | | salesLedgerProduct.getProductCategory(), |
| | | salesLedgerProduct.getMaterial(), |
| | | salesLedgerProduct.getSpecificationModel(), |
| | | salesLedgerProduct.getUnit()); |
| | | if (productModel != null) { |