解决库存报表的bug
This commit is contained in:
@@ -153,8 +153,11 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
|
<select id="findByAll" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultByMaterial">
|
||||||
select m.id MId, m.name MName, m.mfrs MMfrs, m.model MModel, m.unit MaterialUnit, m.color MColor,
|
select m.id MId, m.name MName, m.mfrs MMfrs, m.model MModel,
|
||||||
u.name unit_name, (select purchase_decimal from jsh_material_extend me where me.material_id=m.id and me.default_flag=1) purchase_decimal
|
m.unit MaterialUnit, m.color MColor, u.name unit_name,
|
||||||
|
(select purchase_decimal from jsh_material_extend me
|
||||||
|
where me.material_id=m.id and me.default_flag=1 and ifnull(me.delete_Flag,'0') !='1' limit 0,1)
|
||||||
|
purchase_decimal
|
||||||
from jsh_material m
|
from jsh_material m
|
||||||
left join jsh_depot_item di on di.material_id=m.id and ifnull(di.delete_Flag,'0') !='1'
|
left join jsh_depot_item di on di.material_id=m.id and ifnull(di.delete_Flag,'0') !='1'
|
||||||
left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1'
|
left join jsh_depot_head dh on di.header_id=dh.id and ifnull(dh.delete_flag,'0') !='1'
|
||||||
|
|||||||
Reference in New Issue
Block a user