|
|
@ -72,6 +72,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="applyTitle" column="apply_title" /> |
|
|
|
<result property="applyUser" column="apply_user" /> |
|
|
|
<result property="applyTime" column="apply_time" /> |
|
|
|
<result property="materialCode" column="materialCode" /> |
|
|
|
<result property="materialName" column="materialName" /> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectSysSalesOrderVo"> |
|
|
@ -108,8 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
where dict_type = 'processType' |
|
|
|
) as p |
|
|
|
on s.instance_type = p.dict_value |
|
|
|
left join sys_sales_order_child as c on s.sales_order_code = c.quoteId |
|
|
|
<where> |
|
|
|
<if test="createBy != null and createBy !=''"> and s.create_by = #{createBy}</if> |
|
|
|
<if test="salesOrderCode != null and salesOrderCode != ''"> and s.sales_order_code like concat('%', #{salesOrderCode}, '%')</if> |
|
|
|
<if test="salesOrderNumber != null and salesOrderNumber != ''"> and s.sales_order_number like concat('%', #{salesOrderNumber}, '%')</if> |
|
|
|
<if test="enterpriseCode != null and enterpriseCode != ''"> and s.enterprise_code like concat('%', #{enterpriseCode}, '%')</if> |
|
|
@ -124,18 +127,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<if test="deliveryStatus != null and deliveryStatus != ''"> and s.delivery_status = #{deliveryStatus}</if> |
|
|
|
<if test="closeStatus != null and closeStatus != ''"> and s.close_status = #{closeStatus}</if> |
|
|
|
<if test="invoice != null and invoice != ''"> and s.invoice = #{invoice}</if> |
|
|
|
<if test="instanceType != null and instanceType != ''"> and s.instance_type = #{instanceType}</if> |
|
|
|
<if test="instanceId != null and instanceId != ''"> and s.instance_id = #{instanceId}</if> |
|
|
|
<if test="applyUser != null and applyUser != ''"> and s.apply_user = #{applyUser}</if> |
|
|
|
<if test="applyTime != null and applyTime != ''"> and s.apply_time = #{applyTime}</if> |
|
|
|
<if test="applyTitle != null and applyTitle != ''"> and s.apply_title = #{applyTitle}</if> |
|
|
|
<if test="applyUsers != null and applyUsers != ''"> and s.apply_user in |
|
|
|
<foreach item="user" index="index" collection="applyUsers" open="(" separator="," close=")"> |
|
|
|
#{user} |
|
|
|
</foreach> |
|
|
|
<if test="materialCode != null and materialCode != ''"> and c.materialCode like concat('%', #{materialCode}, '%')</if> |
|
|
|
<if test="materialName != null and materialName != ''"> |
|
|
|
and c.materialName like concat('%',#{materialName},'%') |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
order by s.audit_status,s.create_time desc |
|
|
|
group by s.sales_order_id |
|
|
|
order by s.audit_status asc,s.create_time desc |
|
|
|
</select> |
|
|
|
<select id="selectSysSalesOrderById" parameterType="Long" resultMap="SysSalesOrderResult"> |
|
|
|
<include refid="selectSysSalesOrderVo"/> |
|
|
|