maven
7 小时以前 ddaad70562d53c68ad80f221755d0ab985da3dee
yys  修改项目利率
已修改8个文件
91 ■■■■ 文件已修改
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDto.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/procurementrecord/mapper/CustomStorageMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/procurementrecord/pojo/CustomStorage.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/procurementrecord/CustomStorageMapper.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/purchase/InvoicePurchaseMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/procurementrecord/dto/ProcurementPageDto.java
@@ -23,6 +23,11 @@
    private Long createUser;
    /**
     * true:去掉剩余库存为0
     */
    private Boolean flag;
    /**
     * 入库类型 1-采购 2-生产
     */
    private Integer type;
src/main/java/com/ruoyi/procurementrecord/mapper/CustomStorageMapper.java
@@ -13,4 +13,6 @@
 */
public interface CustomStorageMapper extends BaseMapper<CustomStorage> {
    IPage<CustomStorage> listPageCopyByCustom(Page page,@Param("req") CustomStorage customStorageLambdaQueryWrapper);
    IPage<CustomStorage> listPageByCustom(Page page,@Param("req") CustomStorage customStorage);
}
src/main/java/com/ruoyi/procurementrecord/pojo/CustomStorage.java
@@ -18,6 +18,9 @@
@Data
public class CustomStorage {
    @TableField(exist = false)
    private Boolean flag;
    private static final long serialVersionUID = 1L;
src/main/java/com/ruoyi/procurementrecord/service/impl/ProcurementRecordServiceImpl.java
@@ -476,21 +476,21 @@
    @Override
    public IPage<CustomStorage> listPageByCustom(Page page, CustomStorage customStorage) {
        LambdaQueryWrapper<CustomStorage> customStorageLambdaQueryWrapper = new LambdaQueryWrapper<>();
        if(customStorage != null){
            if(!StringUtils.isEmpty(customStorage.getSupplierName())){
                customStorageLambdaQueryWrapper.like(CustomStorage::getSupplierName, customStorage.getSupplierName());
            }
            // 筛选入库时间
            if(customStorage.getTimeStr() != null){
                customStorageLambdaQueryWrapper.eq(CustomStorage::getInboundDate, customStorage.getTimeStr());
            }
            if(!StringUtils.isEmpty(customStorage.getProductCategory())){
                customStorageLambdaQueryWrapper.like(CustomStorage::getProductCategory, customStorage.getProductCategory());
            }
        }
        customStorageLambdaQueryWrapper.orderByDesc(CustomStorage::getInboundDate);
        IPage<CustomStorage> procurementPageDtoIPage = customStorageMapper.selectPage(page, customStorageLambdaQueryWrapper);
//        LambdaQueryWrapper<CustomStorage> customStorageLambdaQueryWrapper = new LambdaQueryWrapper<>();
//        if(customStorage != null){
//            if(!StringUtils.isEmpty(customStorage.getSupplierName())){
//                customStorageLambdaQueryWrapper.like(CustomStorage::getSupplierName, customStorage.getSupplierName());
//            }
//            // 筛选入库时间
//            if(customStorage.getTimeStr() != null){
//                customStorageLambdaQueryWrapper.eq(CustomStorage::getInboundDate, customStorage.getTimeStr());
//            }
//            if(!StringUtils.isEmpty(customStorage.getProductCategory())){
//                customStorageLambdaQueryWrapper.like(CustomStorage::getProductCategory, customStorage.getProductCategory());
//            }
//        }
//        customStorageLambdaQueryWrapper.orderByDesc(CustomStorage::getInboundDate);
        IPage<CustomStorage> procurementPageDtoIPage = customStorageMapper.listPageByCustom(page, customStorage);
        procurementPageDtoIPage.getRecords().forEach(item -> item.setInboundNum0(item.getInboundNum()));
        List<CustomStorage> procurementPageDtos = procurementPageDtoIPage.getRecords();
        // 计算待入库数量
src/main/java/com/ruoyi/production/service/impl/SalesLedgerSchedulingServiceImpl.java
@@ -84,9 +84,9 @@
            }
            // 状态 = 数量和完工数量比较
            if(i.getSchedulingNum().compareTo(new BigDecimal(0)) == 0){
            if(i.getSuccessNum().compareTo(new BigDecimal(0)) == 0){
                i.setStatus("未开始");
            } else if(i.getQuantity().compareTo(i.getSchedulingNum()) <= 0){
            } else if(i.getQuantity().compareTo(i.getSuccessNum()) <= 0){
                i.setStatus("已完成");
            }else{
                i.setStatus("生产中");
src/main/resources/mapper/procurementrecord/CustomStorageMapper.xml
@@ -25,4 +25,29 @@
        HAVING availableStock > 0
        order by t1.inbound_date desc
    </select>
    <select id="listPageByCustom" resultType="com.ruoyi.procurementrecord.pojo.CustomStorage">
        select t1.*,
        sum(t1.inbound_num) as inboundNum,
        sum(t1.inbound_num) as inboundNum0,
        sum(t1.tax_inclusive_total_price) as taxInclusiveTotalPrice,
        SUM(t1.inbound_num) - COALESCE(SUM(t2.inbound_num), 0) AS availableStock
        from custom_storage t1
        left join procurement_record_out t2 on t1.id = t2.procurement_record_storage_id and t2.type = 3
        <where>
            <if test="req.productCategory != null and req.productCategory != ''">
                and t1.product_category like  concat('%',#{req.productCategory},'%')
            </if>
            <if test="req.supplierName !=null and req.supplierName != ''">
                and t1.supplier_name like concat('%',#{req.supplierName},'%')
            </if>
            <if test="req.timeStr != null and req.timeStr != ''">
                and t1.inbound_date like concat('%',#{req.timeStr},'%')
            </if>
        </where>
        group by t1.id
        <if test="req.flag != null and req.flag">
            having availableStock > 0
        </if>
        order by t1.inbound_date desc
    </select>
</mapper>
src/main/resources/mapper/procurementrecord/ProcurementRecordMapper.xml
@@ -50,10 +50,12 @@
        t1.create_time,
        t1.update_time,
        t1.create_by,
        t2.warn_num
        t2.warn_num,
        SUM(t1.inbound_num) - COALESCE(SUM(t4.inbound_num), 0) AS availableStock
        from  procurement_record_storage t1
                  left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 2
                  left join purchase_ledger t3 on t3.id = t2.sales_ledger_id
        left join procurement_record_out t4 on t1.id = t4.procurement_record_storage_id and t4.type = 1
        <where>
            t1.type = 1
            <if test="req.supplierName != null and req.supplierName != ''">
@@ -66,6 +68,10 @@
                and t1.create_time like  concat('%',#{req.timeStr},'%')
            </if>
        </where>
        group by t1.id
        <if test="req.flag != null and req.flag">
            having availableStock > 0
        </if>
        order by t1.create_time desc
    </select>
    <select id="list" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDto">
@@ -257,10 +263,12 @@
        t1.create_time,
        t1.update_time,
        t1.create_by,
        t2.warn_num
        t2.warn_num,
        SUM(t1.inbound_num) - COALESCE(SUM(t4.inbound_num), 0) AS availableStock
        from  procurement_record_storage t1
        left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id and t2.type = 1
        left join sales_ledger t3 on t3.id = t2.sales_ledger_id
        left join procurement_record_out t4 on t4.procurement_record_storage_id = t1.id and t1.type = 2
        <where>
            t1.type = 2
            <if test="req.customerName != null and req.customerName != ''">
@@ -273,6 +281,10 @@
                and t1.create_time like  concat('%',#{req.timeStr},'%')
            </if>
        </where>
        group by t1.id
        <if test="req.flag != null and req.flag">
            having availableStock > 0
        </if>
        order by t1.create_time desc
    </select>
    <select id="listPageCopyByProduction" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy">
src/main/resources/mapper/purchase/InvoicePurchaseMapper.xml
@@ -11,7 +11,7 @@
        FORMAT(A.sales_tax_amount - A.purchase_tax_amount, 2) AS balance_amount
        FROM (
        SELECT
        sl.customer_contract_no,
        sl.sales_contract_no as customerContractNo,
        sl.id,
        pl.id AS pl_id,
        sl.customer_name,
@@ -41,9 +41,9 @@
        LEFT JOIN
        sales_ledger_product slp1 ON slp1.sales_ledger_id = pl.id AND slp1.type = 2
        GROUP BY
        sl.customer_contract_no, sl.customer_name, sl.project_name, sl.id, pl.id
        pl.id
        HAVING
        sl.customer_contract_no IS NOT NULL
        customerContractNo IS NOT NULL
        ) A
        <where>
            <if test="c.customerName != null and c.customerName != ''">