Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
a978a902
Commit
a978a902
authored
Dec 13, 2020
by
季圣华
Browse files
解决库存报表的bug
parent
2099f5a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/mapper_xml/DepotItemMapperEx.xml
View file @
a978a902
...
@@ -154,14 +154,12 @@
...
@@ -154,14 +154,12 @@
<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, m.unit MaterialUnit, m.color MColor,
me.purchase_decimal, u.name unit_name
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
from jsh_material m
from jsh_material m
left join jsh_depot_item di on di.material_id=m.id and ifnull(
m
.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'
left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1'
left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
left join jsh_unit u on m.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
where 1=1
where 1=1
and me.default_flag=1
<if
test=
"name != null"
>
<if
test=
"name != null"
>
and m.name like '%${name}%'
and m.name like '%${name}%'
</if>
</if>
...
@@ -171,8 +169,8 @@
...
@@ -171,8 +169,8 @@
<if
test=
"endTime != null"
>
<if
test=
"endTime != null"
>
and dh.oper_time
<
= '${endTime}'
and dh.oper_time
<
= '${endTime}'
</if>
</if>
and ifnull(
di
.delete_flag,'0') !='1'
and ifnull(
m
.delete_flag,'0') !='1'
group by m.id,m.name, m.model, m.unit, m.color,
me.purchase_decimal,
u.name
group by m.id,m.name, m.model, m.unit, m.color, u.name
order by m.name, m.model asc
order by m.name, m.model asc
<if
test=
"offset != null and rows != null"
>
<if
test=
"offset != null and rows != null"
>
limit #{offset},#{rows}
limit #{offset},#{rows}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment