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
3f1b4410
Commit
3f1b4410
authored
Oct 19, 2022
by
季圣华
Browse files
优化单据列表接口,增加总数量返回字段
parent
b0b1ddf8
Changes
4
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java
View file @
3f1b4410
...
...
@@ -61,6 +61,9 @@ public interface DepotHeadMapperEx {
String
findMaterialsListByHeaderId
(
@Param
(
"id"
)
Long
id
);
BigDecimal
getMaterialCountByHeaderId
(
@Param
(
"id"
)
Long
id
);
List
<
DepotHeadVo4InDetail
>
findInOutDetail
(
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4List.java
View file @
3f1b4410
...
...
@@ -41,6 +41,8 @@ public class DepotHeadVo4List extends DepotHead{
private
BigDecimal
debt
;
private
BigDecimal
materialCount
;
public
String
getProjectName
()
{
return
projectName
;
}
...
...
@@ -176,4 +178,12 @@ public class DepotHeadVo4List extends DepotHead{
public
void
setDebt
(
BigDecimal
debt
)
{
this
.
debt
=
debt
;
}
public
BigDecimal
getMaterialCount
()
{
return
materialCount
;
}
public
void
setMaterialCount
(
BigDecimal
materialCount
)
{
this
.
materialCount
=
materialCount
;
}
}
\ No newline at end of file
jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
3f1b4410
...
...
@@ -151,6 +151,7 @@ public class DepotHeadService {
dh
.
setOperTimeStr
(
getCenternTime
(
dh
.
getOperTime
()));
}
dh
.
setMaterialsList
(
findMaterialsListByHeaderId
(
dh
.
getId
()));
dh
.
setMaterialCount
(
getMaterialCountByHeaderId
(
dh
.
getId
()));
resList
.
add
(
dh
);
}
}
...
...
@@ -486,6 +487,16 @@ public class DepotHeadService {
return
result
;
}
private
BigDecimal
getMaterialCountByHeaderId
(
Long
id
)
{
BigDecimal
result
=
null
;
try
{
result
=
depotHeadMapperEx
.
getMaterialCountByHeaderId
(
id
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
result
;
}
public
List
<
DepotHeadVo4InDetail
>
findInOutDetail
(
String
beginTime
,
String
endTime
,
String
type
,
String
[]
creatorArray
,
String
[]
organArray
,
String
materialParam
,
List
<
Long
>
depotList
,
Integer
oId
,
String
number
,
String
remark
,
Integer
offset
,
Integer
rows
)
throws
Exception
{
...
...
jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
3f1b4410
...
...
@@ -239,6 +239,12 @@
and ifnull(jsh_depot_item.delete_flag,'0') !='1'
</select>
<select
id=
"getMaterialCountByHeaderId"
resultType=
"java.math.BigDecimal"
>
select sum(oper_number) from jsh_depot_item
where header_id = #{id}
and ifnull(delete_flag,'0') !='1'
</select>
<select
id=
"findInOutDetail"
parameterType=
"com.jsh.erp.datasource.entities.DepotItemExample"
resultMap=
"ResultWithInfoExMap"
>
select dh.number,me.bar_code, m.`name` MName,m.model,m.standard,di.unit_price,di.material_unit as mUnit,
di.oper_number,di.all_price, ifnull(di.tax_rate,0) tax_rate, ifnull(di.tax_money,0) tax_money, ifnull(di.tax_last_money,0) tax_last_money,
...
...
@@ -908,5 +914,4 @@
and dh.number!=#{number}
and ifnull(dh.delete_flag,'0') !='1'
</select>
</mapper>
\ No newline at end of file
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