<?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>
|