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
a10fabb7
Commit
a10fabb7
authored
Aug 25, 2022
by
季圣华
Browse files
给出入库明细接口增加税率和税额字段
parent
57de1c4d
Changes
5
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
a10fabb7
...
...
@@ -126,9 +126,9 @@ public class DepotHeadController {
String
[]
organArray
=
depotHeadService
.
getOrganArray
(
subType
,
""
);
beginTime
=
Tools
.
parseDayToTime
(
beginTime
,
BusinessConstants
.
DAY_FIRST_TIME
);
endTime
=
Tools
.
parseDayToTime
(
endTime
,
BusinessConstants
.
DAY_LAST_TIME
);
List
<
DepotHeadVo4InDetail
>
list
=
depotHeadService
.
find
ByAl
l
(
beginTime
,
endTime
,
type
,
creatorArray
,
organArray
,
List
<
DepotHeadVo4InDetail
>
list
=
depotHeadService
.
find
InDetai
l
(
beginTime
,
endTime
,
type
,
creatorArray
,
organArray
,
StringUtil
.
toNull
(
materialParam
),
depotList
,
oId
,
StringUtil
.
toNull
(
number
),
remark
,
(
currentPage
-
1
)*
pageSize
,
pageSize
);
int
total
=
depotHeadService
.
find
ByAl
lCount
(
beginTime
,
endTime
,
type
,
creatorArray
,
organArray
,
int
total
=
depotHeadService
.
find
InDetai
lCount
(
beginTime
,
endTime
,
type
,
creatorArray
,
organArray
,
StringUtil
.
toNull
(
materialParam
),
depotList
,
oId
,
StringUtil
.
toNull
(
number
),
remark
);
map
.
put
(
"total"
,
total
);
//存放数据json数组
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/DepotHeadMapperEx.java
View file @
a10fabb7
...
...
@@ -61,7 +61,7 @@ public interface DepotHeadMapperEx {
String
findMaterialsListByHeaderId
(
@Param
(
"id"
)
Long
id
);
List
<
DepotHeadVo4InDetail
>
find
ByAl
l
(
List
<
DepotHeadVo4InDetail
>
find
InDetai
l
(
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"type"
)
String
type
,
...
...
@@ -75,7 +75,7 @@ public interface DepotHeadMapperEx {
@Param
(
"offset"
)
Integer
offset
,
@Param
(
"rows"
)
Integer
rows
);
int
find
ByAl
lCount
(
int
find
InDetai
lCount
(
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"type"
)
String
type
,
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4InDetail.java
View file @
a10fabb7
...
...
@@ -26,6 +26,12 @@ public class DepotHeadVo4InDetail {
private
BigDecimal
AllPrice
;
private
BigDecimal
taxRate
;
private
BigDecimal
taxMoney
;
private
BigDecimal
taxLastMoney
;
private
String
SName
;
private
String
DName
;
...
...
@@ -116,6 +122,30 @@ public class DepotHeadVo4InDetail {
AllPrice
=
allPrice
;
}
public
BigDecimal
getTaxRate
()
{
return
taxRate
;
}
public
void
setTaxRate
(
BigDecimal
taxRate
)
{
this
.
taxRate
=
taxRate
;
}
public
BigDecimal
getTaxMoney
()
{
return
taxMoney
;
}
public
void
setTaxMoney
(
BigDecimal
taxMoney
)
{
this
.
taxMoney
=
taxMoney
;
}
public
BigDecimal
getTaxLastMoney
()
{
return
taxLastMoney
;
}
public
void
setTaxLastMoney
(
BigDecimal
taxLastMoney
)
{
this
.
taxLastMoney
=
taxLastMoney
;
}
public
String
getSName
()
{
return
SName
;
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
a10fabb7
...
...
@@ -486,24 +486,24 @@ public class DepotHeadService {
return
result
;
}
public
List
<
DepotHeadVo4InDetail
>
find
ByAl
l
(
String
beginTime
,
String
endTime
,
String
type
,
String
[]
creatorArray
,
public
List
<
DepotHeadVo4InDetail
>
find
InDetai
l
(
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
{
List
<
DepotHeadVo4InDetail
>
list
=
null
;
try
{
list
=
depotHeadMapperEx
.
find
ByAl
l
(
beginTime
,
endTime
,
type
,
creatorArray
,
organArray
,
materialParam
,
depotList
,
oId
,
number
,
remark
,
offset
,
rows
);
list
=
depotHeadMapperEx
.
find
InDetai
l
(
beginTime
,
endTime
,
type
,
creatorArray
,
organArray
,
materialParam
,
depotList
,
oId
,
number
,
remark
,
offset
,
rows
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
list
;
}
public
int
find
ByAl
lCount
(
String
beginTime
,
String
endTime
,
String
type
,
String
[]
creatorArray
,
public
int
find
InDetai
lCount
(
String
beginTime
,
String
endTime
,
String
type
,
String
[]
creatorArray
,
String
[]
organArray
,
String
materialParam
,
List
<
Long
>
depotList
,
Integer
oId
,
String
number
,
String
remark
)
throws
Exception
{
int
result
=
0
;
try
{
result
=
depotHeadMapperEx
.
find
ByAl
lCount
(
beginTime
,
endTime
,
type
,
creatorArray
,
organArray
,
materialParam
,
depotList
,
oId
,
number
,
remark
);
result
=
depotHeadMapperEx
.
find
InDetai
lCount
(
beginTime
,
endTime
,
type
,
creatorArray
,
organArray
,
materialParam
,
depotList
,
oId
,
number
,
remark
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
...
...
jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
a10fabb7
...
...
@@ -21,6 +21,9 @@
<result
column=
"unit_price"
jdbcType=
"DECIMAL"
property=
"UnitPrice"
/>
<result
column=
"oper_number"
jdbcType=
"DECIMAL"
property=
"OperNumber"
/>
<result
column=
"all_price"
jdbcType=
"DECIMAL"
property=
"AllPrice"
/>
<result
column=
"tax_rate"
jdbcType=
"DECIMAL"
property=
"taxRate"
/>
<result
column=
"tax_money"
jdbcType=
"DECIMAL"
property=
"taxMoney"
/>
<result
column=
"tax_last_money"
jdbcType=
"DECIMAL"
property=
"taxLastMoney"
/>
<result
column=
"SName"
jdbcType=
"VARCHAR"
property=
"SName"
/>
<result
column=
"DName"
jdbcType=
"VARCHAR"
property=
"DName"
/>
<result
column=
"OperTime"
jdbcType=
"VARCHAR"
property=
"OperTime"
/>
...
...
@@ -236,9 +239,11 @@
and ifnull(jsh_depot_item.delete_flag,'0') !='1'
</select>
<select
id=
"findByAll"
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,s.supplier SName,d.dName DName,
date_format(dh.oper_time, '%Y-%m-%d') OperTime, concat(dh.sub_type,dh.type) as NewType, concat_ws(' ',dh.remark,di.remark) as newRemark
<select
id=
"findInDetail"
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,
s.supplier SName,d.dName DName, date_format(dh.oper_time, '%Y-%m-%d') OperTime, concat(dh.sub_type,dh.type) as NewType,
concat_ws(' ',dh.remark,di.remark) as newRemark
from jsh_depot_head dh
left join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
left join jsh_material m on m.id=di.material_id and ifnull(m.delete_flag,'0') !='1'
...
...
@@ -292,7 +297,7 @@
</if>
</select>
<select
id=
"find
ByAl
lCount"
resultType=
"java.lang.Integer"
>
<select
id=
"find
InDetai
lCount"
resultType=
"java.lang.Integer"
>
select count(1)
from jsh_depot_head dh
left join jsh_depot_item di on di.header_id=dh.id and ifnull(di.delete_flag,'0') !='1'
...
...
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