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
a7d6c71e
Commit
a7d6c71e
authored
Aug 07, 2021
by
季圣华
Browse files
给报表中增加单位
parent
491a74e4
Changes
4
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/DepotItemController.java
View file @
a7d6c71e
...
...
@@ -287,7 +287,7 @@ public class DepotItemController {
String
materialOther
=
getOtherInfo
(
mpArr
,
diEx
);
item
.
put
(
"materialOther"
,
materialOther
);
item
.
put
(
"materialColor"
,
diEx
.
getMColor
());
item
.
put
(
"unitName"
,
getUName
(
diEx
.
getMaterialUnit
()
,
diEx
.
getUnitName
())
);
item
.
put
(
"unitName"
,
diEx
.
getMaterialUnit
());
item
.
put
(
"prevSum"
,
depotItemService
.
getStockByParam
(
depotId
,
mId
,
null
,
timeA
));
item
.
put
(
"inSum"
,
depotItemService
.
getInNumByParam
(
depotId
,
mId
,
timeA
,
timeB
));
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/vo/DepotHeadVo4InOutMCount.java
View file @
a7d6c71e
...
...
@@ -17,6 +17,8 @@ public class DepotHeadVo4InOutMCount {
private
String
categoryName
;
private
String
materialUnit
;
private
BigDecimal
numSum
;
private
BigDecimal
priceSum
;
...
...
@@ -71,6 +73,14 @@ public class DepotHeadVo4InOutMCount {
this
.
categoryName
=
categoryName
;
}
public
String
getMaterialUnit
()
{
return
materialUnit
;
}
public
void
setMaterialUnit
(
String
materialUnit
)
{
this
.
materialUnit
=
materialUnit
;
}
public
BigDecimal
getNumSum
()
{
return
numSum
;
}
...
...
jshERP-boot/src/main/resources/mapper_xml/DepotHeadMapperEx.xml
View file @
a7d6c71e
...
...
@@ -30,6 +30,7 @@
<result
column=
"Model"
jdbcType=
"VARCHAR"
property=
"Model"
/>
<result
column=
"standard"
jdbcType=
"VARCHAR"
property=
"standard"
/>
<result
column=
"categoryName"
jdbcType=
"VARCHAR"
property=
"categoryName"
/>
<result
column=
"materialUnit"
jdbcType=
"VARCHAR"
property=
"materialUnit"
/>
<result
column=
"numSum"
jdbcType=
"DECIMAL"
property=
"numSum"
/>
<result
column=
"priceSum"
jdbcType=
"DECIMAL"
property=
"priceSum"
/>
</resultMap>
...
...
@@ -228,7 +229,7 @@
</select>
<select
id=
"findInOutMaterialCount"
parameterType=
"com.jsh.erp.datasource.entities.DepotItemExample"
resultMap=
"ResultInOutMaterialCount"
>
select di.material_id, m.bar_code, m.mName,m.Model,m.standard,m.categoryName,
select di.material_id, m.bar_code, m.mName,m.Model,m.standard,m.categoryName,
m.materialUnit,
(select sum(jdi.basic_number) numSum from jsh_depot_head jdh
INNER JOIN jsh_depot_item jdi on jdh.id=jdi.header_id and ifnull(jdi.delete_flag,'0') !='1'
where jdi.material_id=di.material_id
...
...
@@ -255,8 +256,10 @@
) priceSum
from jsh_depot_head dh
INNER JOIN jsh_depot_item di on dh.id=di.header_id and ifnull(di.delete_flag,'0') !='1'
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, me.bar_code, Model, standard, jsh_material_category.`Name` categoryName
INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, me.bar_code, Model, standard,
jsh_material_category.`Name` categoryName, concat_ws('', jsh_material.unit, u.basic_unit) materialUnit
from jsh_material
left join jsh_unit u on jsh_material.unit_id=u.id and ifnull(u.delete_Flag,'0') !='1'
left join jsh_material_extend me on me.material_id=jsh_material.id and ifnull(me.delete_Flag,'0') !='1'
LEFT JOIN jsh_material_category on jsh_material.category_id=jsh_material_category.Id and ifnull(jsh_material_category.delete_flag,'0') !='1'
where me.default_flag=1 and ifnull(jsh_material.delete_Flag,'0') !='1'
...
...
jshERP-boot/src/main/resources/mapper_xml/DepotItemMapperEx.xml
View file @
a7d6c71e
...
...
@@ -178,7 +178,7 @@
<select
id=
"findByAll"
parameterType=
"com.jsh.erp.datasource.entities.DepotItemExample"
resultMap=
"ResultByMaterial"
>
select m.id MId, me.bar_code, m.name MName, m.mfrs MMfrs, m.model MModel, m.standard MStandard,
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,
m.unit
MaterialUnit, m.color MColor, u.name unit_name,
concat_ws('', m.unit, u.basic_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
...
...
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