| | |
| | | customStorageLambdaQueryWrapper.eq(CustomStorage::getInboundDate, customStorage.getInboundDate()); |
| | | } |
| | | } |
| | | customStorageLambdaQueryWrapper.orderByDesc(CustomStorage::getCreateTime); |
| | | IPage<CustomStorage> procurementPageDtoIPage = customStorageMapper.selectPage(page, customStorageLambdaQueryWrapper); |
| | | procurementPageDtoIPage.getRecords().forEach(item -> item.setInboundNum0(item.getInboundNum())); |
| | | List<CustomStorage> procurementPageDtos = procurementPageDtoIPage.getRecords(); |
| | |
| | | @Override |
| | | public IPage<CustomStorage> listPageCopyByCustom(Page page, CustomStorage customStorage) { |
| | | LambdaQueryWrapper<CustomStorage> customStorageLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | customStorageLambdaQueryWrapper.groupBy(CustomStorage::getSupplierName, CustomStorage::getProductCategory, CustomStorage::getSpecificationModel); |
| | | customStorageLambdaQueryWrapper.groupBy(CustomStorage::getProductCategory, CustomStorage::getSpecificationModel); |
| | | if(customStorage != null){ |
| | | if(!StringUtils.isEmpty(customStorage.getSupplierName())){ |
| | | customStorageLambdaQueryWrapper.like(CustomStorage::getSupplierName, customStorage.getSupplierName()); |
| | |
| | | customStorageLambdaQueryWrapper.eq(CustomStorage::getInboundDate, customStorage.getInboundDate()); |
| | | } |
| | | } |
| | | customStorageLambdaQueryWrapper.orderByDesc(CustomStorage::getCreateTime); |
| | | IPage<CustomStorage> pageList = customStorageMapper.selectPage(page, customStorageLambdaQueryWrapper); |
| | | List<CustomStorage> procurementPageDtoCopyList = pageList.getRecords(); |
| | | // 计算待入库数量 |
| | |
| | | |
| | | // 3.查询上传文件 |
| | | LambdaQueryWrapper<CommonFile> salesLedgerFileWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerFileWrapper.eq(CommonFile::getCommonId, purchaseLedger.getId()); |
| | | salesLedgerFileWrapper.eq(CommonFile::getCommonId, purchaseLedger.getId()) |
| | | .eq(CommonFile::getType, FileNameType.PURCHASE.getValue()); |
| | | List<CommonFile> salesLedgerFiles = commonFileMapper.selectList(salesLedgerFileWrapper); |
| | | |
| | | // 4. 转换 DTO |
| | |
| | | public IPage<PurchaseLedgerDto> selectPurchaseLedgerListPage(IPage ipage, PurchaseLedgerDto purchaseLedger) { |
| | | IPage<PurchaseLedgerDto> purchaseLedgerDtoIPage = purchaseLedgerMapper.selectPurchaseLedgerListPage(ipage, purchaseLedger); |
| | | purchaseLedgerDtoIPage.getRecords().forEach(purchaseLedgerDto -> { |
| | | List<CommonFile> commonFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>().eq(CommonFile::getCommonId, purchaseLedgerDto.getId()).eq(CommonFile::getType, FileNameType.PURCHASELEDGER.getValue())); |
| | | List<CommonFile> commonFiles = commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>().eq(CommonFile::getCommonId, purchaseLedgerDto.getId()).eq(CommonFile::getType, FileNameType.PURCHASE.getValue())); |
| | | purchaseLedgerDto.setSalesLedgerFiles(commonFiles); |
| | | }); |
| | | return purchaseLedgerDtoIPage; |
| | |
| | | private String customerContractNo; |
| | | |
| | | /** |
| | | * 发货车牌号 |
| | | */ |
| | | @Excel(name = "发货车牌号") |
| | | @TableField(exist = false) |
| | | private String shippingCarNumber; |
| | | |
| | | /** |
| | | * 项目名称 |
| | | */ |
| | | @Excel(name = "项目名称") |
| | |
| | | |
| | | // 3.查询上传文件 |
| | | LambdaQueryWrapper<CommonFile> salesLedgerFileWrapper = new LambdaQueryWrapper<>(); |
| | | salesLedgerFileWrapper.eq(CommonFile::getCommonId, salesLedger.getId()); |
| | | salesLedgerFileWrapper.eq(CommonFile::getCommonId, salesLedger.getId()) |
| | | .eq(CommonFile::getType, FileNameType.SALE.getValue()); |
| | | List<CommonFile> salesLedgerFiles = commonFileMapper.selectList(salesLedgerFileWrapper); |
| | | |
| | | // 4. 转换 DTO |
| | |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | </where> |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="list" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDto"> |
| | | select |
| | |
| | | </if> |
| | | </where> |
| | | group by t3.supplier_name,t2.product_category,t2.specification_model |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="listCopy" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy"> |
| | | select |
| | |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | </where> |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="listPageCopyByProduction" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy"> |
| | | select |
| | |
| | | and t1.create_time <= #{req.endDate} |
| | | </if> |
| | | </where> |
| | | group by t3.customer_name,t2.product_category,t2.specification_model |
| | | group by t2.product_category,t2.specification_model |
| | | order by t1.create_time desc |
| | | </select> |
| | | </mapper> |
| | |
| | | pl.project_name,pl.entry_date, |
| | | pl.recorder_name, |
| | | pl.contract_amount |
| | | |
| | | order by pl.entry_date desc |
| | | </select> |
| | | <select id="getPaymentRegistrationDtoById" resultType="com.ruoyi.purchase.dto.PaymentRegistrationDto"> |
| | | SELECT |
| | |
| | | T1.contract_amount, |
| | | T1.execution_date, |
| | | T2.nick_name AS entry_person_name, |
| | | T1.payment_method |
| | | T1.payment_method, |
| | | t3.shipping_car_number |
| | | FROM |
| | | sales_ledger T1 |
| | | LEFT JOIN sys_user T2 ON T1.entry_person = T2.user_id |
| | | left join shipping_info t3 on T1.id = t3.sales_ledger_id |
| | | <where> |
| | | <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' "> |
| | | AND T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%') |
| | |
| | | AND T1.entry_date <= DATE_FORMAT(#{salesLedgerDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | order by T1.entry_date desc |
| | | </select> |
| | | </mapper> |