|
@ -111,7 +111,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
where dict_type = 'processType' |
|
|
where dict_type = 'processType' |
|
|
) as p |
|
|
) as p |
|
|
on s.instance_type = p.dict_value |
|
|
on s.instance_type = p.dict_value |
|
|
left join sys_sales_order_child as c on s.sales_order_code = c.quoteId |
|
|
|
|
|
<where> |
|
|
<where> |
|
|
<if test="salesOrderCode != null and salesOrderCode != ''"> and s.sales_order_code like concat('%', #{salesOrderCode}, '%')</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="salesOrderNumber != null and salesOrderNumber != ''"> and s.sales_order_number like concat('%', #{salesOrderNumber}, '%')</if> |
|
@ -131,12 +130,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
<if test="params.beginCreateTime != null and params.beginCreatTime != '' and params.endCreateTime != null and params.endCreateTime != '' "> |
|
|
<if test="params.beginCreateTime != null and params.beginCreatTime != '' and params.endCreateTime != null and params.endCreateTime != '' "> |
|
|
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} |
|
|
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} |
|
|
</if> |
|
|
</if> |
|
|
<if test="materialCode != null and materialCode != ''"> and c.materialCode like concat('%', #{materialCode}, '%')</if> |
|
|
<if test="materialCode != null and materialCode != '' || materialName!= null and materialName !=''"> |
|
|
|
|
|
and s.sales_order_code in ( |
|
|
|
|
|
select quoteId from sys_sales_order_child as child where |
|
|
|
|
|
quoteId = s.sales_order_code |
|
|
|
|
|
<if test="materialCode != null and materialCode != ''"> |
|
|
|
|
|
and child.materialCode like concat('%',#{materialCode},'%') |
|
|
|
|
|
</if> |
|
|
<if test="materialName != null and materialName != ''"> |
|
|
<if test="materialName != null and materialName != ''"> |
|
|
and c.materialName like concat('%',#{materialName},'%') |
|
|
and child.materialName like concat('%',#{materialName},'%') |
|
|
|
|
|
</if> |
|
|
|
|
|
) |
|
|
</if> |
|
|
</if> |
|
|
</where> |
|
|
</where> |
|
|
group by s.sales_order_id |
|
|
|
|
|
order by s.audit_status asc,s.create_time desc |
|
|
order by s.audit_status asc,s.create_time desc |
|
|
</select> |
|
|
</select> |
|
|
<select id="selectSysSalesOrderById" parameterType="Long" resultMap="SysSalesOrderResult"> |
|
|
<select id="selectSysSalesOrderById" parameterType="Long" resultMap="SysSalesOrderResult"> |
|
@ -196,9 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} |
|
|
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} |
|
|
</if> |
|
|
</if> |
|
|
<if test="materialCode != null and materialCode != ''"> and c.materialCode like concat('%', #{materialCode}, '%')</if> |
|
|
<if test="materialCode != null and materialCode != ''"> and c.materialCode like concat('%', #{materialCode}, '%')</if> |
|
|
<if test="materialName != null and materialName != ''"> |
|
|
<if test="materialName != null and materialName != ''">and c.materialName like concat('%',#{materialName},'%')</if> |
|
|
and c.materialName like concat('%',#{materialName},'%') |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
</where> |
|
|
group by s.sales_order_id |
|
|
group by s.sales_order_id |
|
|
order by s.audit_status asc,s.create_time desc |
|
|
order by s.audit_status asc,s.create_time desc |
|
|