|
|
@ -107,11 +107,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
s.apply_time,p.dict_value as instance_type_name |
|
|
|
from sys_sales_order as s |
|
|
|
left join( |
|
|
|
select dict_value,dict_label from sys_dict_data |
|
|
|
where dict_type = 'processType' |
|
|
|
select dict_value,dict_label from sys_dict_data |
|
|
|
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="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> |
|
|
@ -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 != '' "> |
|
|
|
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime} |
|
|
|
</if> |
|
|
|
<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 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 != ''"> |
|
|
|
and child.materialName like concat('%',#{materialName},'%') |
|
|
|
</if> |
|
|
|
) |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
group by s.sales_order_id |
|
|
|
order by s.audit_status asc,s.create_time desc |
|
|
|
</select> |
|
|
|
<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} |
|
|
|
</if> |
|
|
|
<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> |
|
|
|
<if test="materialName != null and materialName != ''">and c.materialName like concat('%',#{materialName},'%')</if> |
|
|
|
</where> |
|
|
|
group by s.sales_order_id |
|
|
|
order by s.audit_status asc,s.create_time desc |
|
|
|