| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.dto.ProductModelAnticlockwiseDto; |
| | | import com.ruoyi.basic.service.IProductModelService; |
| | | import com.ruoyi.common.enums.StockInUnQualifiedRecordTypeEnum; |
| | | import com.ruoyi.common.enums.StockOutQualifiedRecordTypeEnum; |
| | | import com.ruoyi.framework.web.domain.R; |
| | |
| | | private StockInventoryMapper stockInventoryMapper; |
| | | @Autowired |
| | | private ProductOrderServiceImpl productOrderServiceImpl; |
| | | @Autowired |
| | | private IProductModelService productModelService; |
| | | |
| | | @Override |
| | | public SalesLedgerProduct selectSalesLedgerProductById(Long id) { |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int addOrUpdateSalesLedgerProduct(SalesLedgerProduct salesLedgerProduct) { |
| | | //先查询基础表有没有 |
| | | ProductModelAnticlockwiseDto productModelAnticlockwiseDto = new ProductModelAnticlockwiseDto(); |
| | | productModelAnticlockwiseDto.setProductName(salesLedgerProduct.getProductCategory()); |
| | | productModelAnticlockwiseDto.setModel(salesLedgerProduct.getSpecificationModel()); |
| | | productModelAnticlockwiseDto.setUnit(salesLedgerProduct.getUnit()); |
| | | productModelAnticlockwiseDto.setSubUnit(salesLedgerProduct.getUnit()); |
| | | productModelAnticlockwiseDto.setId(salesLedgerProduct.getId()); |
| | | Long l = productModelService.productModelAnticlockwise(productModelAnticlockwiseDto); |
| | | salesLedgerProduct.setProductModelId(l); |
| | | |
| | | // 待回款,付款 |
| | | if (salesLedgerProduct.getType().equals(1)) { |
| | | salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getInvoiceTotal())); |