liu
5 天以前 a5f66f55b2c176e8504b8a077e00acfe2dfb4b00
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
27
28
29
<?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.production.mapper.ProductionCostingStandardMapper">
 
    <select id="selectStandardList" resultType="com.ruoyi.production.pojo.ProductionCostingStandard">
        select s.id, s.dept_type, s.process_id, s.product_model_id, s.standard_quantity, s.unit, s.remark,
               s.create_user, s.create_time, s.update_user, s.update_time,
               too.name as processName,
               pm.model as modelName
        from production_costing_standard s
        left join technology_operation too on too.id = s.process_id
        left join product_model pm on pm.id = s.product_model_id
        <where>
            <if test="c != null">
                <if test="c.deptType != null">
                    and s.dept_type = #{c.deptType}
                </if>
                <if test="c.processId != null">
                    and s.process_id = #{c.processId}
                </if>
                <if test="c.productModelId != null">
                    and s.product_model_id = #{c.productModelId}
                </if>
            </if>
        </where>
        order by s.dept_type asc, s.process_id asc, s.product_model_id asc
    </select>
 
</mapper>