| | |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.common.enums.FileNameType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | |
| | | |
| | | List<SalesLedgerProduct> updateList = partitionedProducts.get(true); |
| | | List<SalesLedgerProduct> insertList = partitionedProducts.get(false); |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(salesLedgerId); |
| | | |
| | | // 执行更新操作 |
| | | if (!updateList.isEmpty()) { |
| | |
| | | if (!insertList.isEmpty()) { |
| | | for (SalesLedgerProduct salesLedgerProduct : insertList) { |
| | | salesLedgerProduct.setType(type); |
| | | salesLedgerProduct.setRegisterDate(salesLedger.getEntryDate().toString()); |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | } |
| | | } |
| | |
| | | } |
| | | // 创建并填充DTO |
| | | PurchaseLedgerDto resultDto = new PurchaseLedgerDto(); |
| | | resultDto.setSalesLedgerId(purchaseLedger.getSalesLedgerId()); |
| | | resultDto.setSalesContractNoId(purchaseLedger.getSalesLedgerId()); |
| | | resultDto.setSalesContractNo(purchaseLedger.getSalesContractNo()); |
| | | resultDto.setSupplierName(purchaseLedger.getSupplierName()); |
| | |
| | | public PurchaseLedgerDto getPurchaseNoById(Long id) { |
| | | PurchaseLedgerDto purchaseLedgerDto = new PurchaseLedgerDto(); |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(id); |
| | | |
| | | BeanUtils.copyProperties(purchaseLedger, purchaseLedgerDto); |
| | | // TicketRegistration ticketRegistration = ticketRegistrationMapper.selectOne(new LambdaQueryWrapper<TicketRegistration>().eq(TicketRegistration::getPurchaseLedgerId, id)); |
| | | // if (ticketRegistration != null) { |