| | |
| | | import com.ruoyi.account.mapper.sales.AccountSalesCollectionMapper; |
| | | import com.ruoyi.account.pojo.sales.AccountInvoiceApplication; |
| | | import com.ruoyi.account.pojo.sales.AccountSalesCollection; |
| | | import com.ruoyi.basic.dto.StorageAttachmentDTO; |
| | | import com.ruoyi.basic.enums.ApplicationTypeEnum; |
| | | import com.ruoyi.basic.enums.RecordTypeEnum; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | |
| | | resultDto.setProductData(products); |
| | | resultDto.setSalesLedgerFiles(salesLedgerFiles); |
| | | } |
| | | |
| | | StorageAttachmentDTO attachmentQuery = new StorageAttachmentDTO(); |
| | | attachmentQuery.setApplication(ApplicationTypeEnum.FILE.getType()); |
| | | attachmentQuery.setRecordType(RecordTypeEnum.SALES_LEDGER.getType()); |
| | | attachmentQuery.setRecordId(salesLedger.getId()); |
| | | resultDto.setStorageBlobVOs(fileUtil.getStorageBlobVOsByApplicationAndRecordTypeAndRecordId(attachmentQuery)); |
| | | return resultDto; |
| | | } |
| | | |
| | |
| | | return totalAmount; |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getPrintData(Long id) { |
| | | SalesLedgerDto dto = new SalesLedgerDto(); |
| | | dto.setId(id); |
| | | SalesLedgerDto ledger = getSalesLedgerWithProducts(dto); |
| | | if (ledger == null) { |
| | | return null; |
| | | } |
| | | SysDept dept = sysDeptMapper.selectDeptById(100L); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("companyName", dept != null ? dept.getDeptName() : ""); |
| | | result.put("ledger", ledger); |
| | | return result; |
| | | } |
| | | } |