maven
6 天以前 b1b59aac99c3d465d51e5fb4f7ab8185ddb733d2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.procurementrecord.mapper.CustomStorageMapper">
 
    <select id="listPageCopyByCustom" resultType="com.ruoyi.procurementrecord.pojo.CustomStorage">
        select *,
               sum(inbound_num) as inboundNum,
               sum(inbound_num) as inboundNum0,
               sum(tax_inclusive_total_price) as taxInclusiveTotalPrice
               from custom_storage
        <where>
            <if test="req.productCategory != null and req.productCategory != ''">
                and product_category like  concat('%',#{req.productCategory},'%')
            </if>
            <if test="req.supplierName !=null and req.supplierName != ''">
                and supplier_name like concat('%',#{req.supplierName},'%')
            </if>
            <if test="req.inboundDate !=null">
                and inbound_date like concat('%',#{req.inboundDate},'%')
            </if>
 
        </where>
        group by product_category, specification_model, tax_inclusive_unit_price
        order by inbound_date desc
    </select>
</mapper>