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
9441d7e7
Commit
9441d7e7
authored
Sep 12, 2021
by
季圣华
Browse files
优化商品库存流水接口
parent
dc29a727
Changes
3
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
9441d7e7
...
...
@@ -77,7 +77,9 @@ public class DepotItemController {
if
(
list
!=
null
)
{
for
(
DepotItemVo4DetailByTypeAndMId
d:
list
)
{
JSONObject
item
=
new
JSONObject
();
item
.
put
(
"number"
,
d
.
getNumber
());
//商品编号
item
.
put
(
"number"
,
d
.
getNumber
());
//编号
item
.
put
(
"barCode"
,
d
.
getBarCode
());
//条码
item
.
put
(
"materialName"
,
d
.
getMaterialName
());
//名称
String
type
=
d
.
getType
();
String
subType
=
d
.
getSubType
();
if
((
"其它"
).
equals
(
type
))
{
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/DepotItemVo4DetailByTypeAndMId.java
View file @
9441d7e7
...
...
@@ -7,6 +7,10 @@ public class DepotItemVo4DetailByTypeAndMId {
private
String
number
;
private
String
barCode
;
private
String
materialName
;
private
String
type
;
private
String
subType
;
...
...
@@ -25,6 +29,22 @@ public class DepotItemVo4DetailByTypeAndMId {
this
.
number
=
number
;
}
public
String
getBarCode
()
{
return
barCode
;
}
public
void
setBarCode
(
String
barCode
)
{
this
.
barCode
=
barCode
;
}
public
String
getMaterialName
()
{
return
materialName
;
}
public
void
setMaterialName
(
String
materialName
)
{
this
.
materialName
=
materialName
;
}
public
String
getType
()
{
return
type
;
}
...
...
jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml
View file @
9441d7e7
...
...
@@ -4,6 +4,8 @@
<resultMap
id=
"DetailByTypeAndMIdResultMap"
type=
"com.jsh.erp.datasource.entities.DepotItemVo4DetailByTypeAndMId"
>
<result
column=
"number"
jdbcType=
"VARCHAR"
property=
"number"
/>
<result
column=
"bar_code"
jdbcType=
"VARCHAR"
property=
"barCode"
/>
<result
column=
"material_name"
jdbcType=
"VARCHAR"
property=
"materialName"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"sub_type"
jdbcType=
"VARCHAR"
property=
"subType"
/>
<result
column=
"b_num"
jdbcType=
"BIGINT"
property=
"bnum"
/>
...
...
@@ -120,7 +122,7 @@
</select>
<select
id=
"findDetailByTypeAndMaterialIdList"
parameterType=
"com.jsh.erp.datasource.entities.DepotItemExample"
resultMap=
"DetailByTypeAndMIdResultMap"
>
select dh.number,dh.type,dh.sub_type,
select dh.number,
me.bar_code,m.name material_name,
dh.type,dh.sub_type,
case
when type='入库' then ifnull(di.basic_number,0)
when type='出库' then 0-di.basic_number
...
...
@@ -135,7 +137,9 @@
(select name from jsh_depot d where d.id=di.depot_id and ifnull(d.delete_flag,'0') !='1') as depotName,
date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime
from jsh_depot_head dh
INNER JOIN jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1'
left join jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1'
left join jsh_material m on di.material_id=m.id and ifnull(m.delete_flag,'0') !='1'
left join jsh_material_extend me on me.id=di.material_extend_id and ifnull(me.delete_Flag,'0') !='1'
where ((dh.type!='其它' and dh.sub_type!='调拨')
or (dh.type='其它' and dh.sub_type='组装单')
or (dh.type='其它' and dh.sub_type='拆卸单')
...
...
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