优化采购统计、进销存统计的查询逻辑,兼容高版本sql
This commit is contained in:
@@ -482,7 +482,8 @@
|
|||||||
and (dh.sub_type!='采购' and dh.sub_type!='采购退货' and dh.sub_type!='销售' and dh.sub_type!='销售退货')
|
and (dh.sub_type!='采购' and dh.sub_type!='采购退货' and dh.sub_type!='销售' and dh.sub_type!='销售退货')
|
||||||
</if>
|
</if>
|
||||||
and ifnull(dh.delete_flag,'0') !='1'
|
and ifnull(dh.delete_flag,'0') !='1'
|
||||||
group by di.material_id
|
group by di.material_id, me.bar_code, m.name,m.model,m.standard,m.color,m.brand,m.mfrs,
|
||||||
|
mc.name, m.unit, u.basic_unit
|
||||||
<if test="column == 'createTime'">
|
<if test="column == 'createTime'">
|
||||||
order by materialId desc
|
order by materialId desc
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -376,7 +376,9 @@
|
|||||||
and dh.oper_time <= #{endTime}
|
and dh.oper_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
and ifnull(m.delete_flag,'0') !='1'
|
and ifnull(m.delete_flag,'0') !='1'
|
||||||
group by m.id
|
group by m.id, me.bar_code, m.name, m.mfrs, m.model, m.standard, m.brand,
|
||||||
|
m.other_field1,m.other_field2,m.other_field3,m.unit, u.basic_unit, m.color, m.unit_id, u.name,
|
||||||
|
me.purchase_decimal, mcs.current_unit_price
|
||||||
order by m.id desc
|
order by m.id desc
|
||||||
<if test="offset != null and rows != null">
|
<if test="offset != null and rows != null">
|
||||||
limit #{offset},#{rows}
|
limit #{offset},#{rows}
|
||||||
@@ -473,7 +475,8 @@
|
|||||||
and (dh.status = '1' or dh.status = '2' or dh.status = '3')
|
and (dh.status = '1' or dh.status = '2' or dh.status = '3')
|
||||||
</if>
|
</if>
|
||||||
and ifnull(m.delete_flag,'0') !='1'
|
and ifnull(m.delete_flag,'0') !='1'
|
||||||
group by m.id
|
group by m.id, me.bar_code, m.name, m.mfrs, m.model, m.standard,
|
||||||
|
m.other_field1,m.other_field2,m.other_field3, m.unit, u.basic_unit, m.color, m.brand, u.name
|
||||||
order by m.id desc
|
order by m.id desc
|
||||||
<if test="offset != null and rows != null">
|
<if test="offset != null and rows != null">
|
||||||
limit #{offset},#{rows}
|
limit #{offset},#{rows}
|
||||||
|
|||||||
Reference in New Issue
Block a user