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
0dde92a0
Commit
0dde92a0
authored
Jun 06, 2020
by
季圣华
Browse files
优化商品导出功能
parent
761721ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/controller/MaterialController.java
View file @
0dde92a0
...
...
@@ -288,7 +288,7 @@ public class MaterialController {
try
{
List
<
MaterialVo4Unit
>
dataList
=
materialService
.
findByAll
(
StringUtil
.
toNull
(
name
),
StringUtil
.
toNull
(
model
),
StringUtil
.
toNull
(
categoryIds
));
String
[]
names
=
{
"名称"
,
"类型"
,
"型号"
,
"安全存量"
,
"单位"
,
"零售价"
,
"最低售价"
,
"
预计
采购价"
,
"
批发
价"
,
"备注"
,
"状态"
};
String
[]
names
=
{
"名称"
,
"类型"
,
"型号"
,
"安全存量"
,
"单位"
,
"零售价"
,
"最低售价"
,
"采购价"
,
"
销售
价"
,
"备注"
,
"状态"
};
String
title
=
"商品信息"
;
List
<
String
[]>
objects
=
new
ArrayList
<
String
[]>();
if
(
null
!=
dataList
)
{
...
...
@@ -298,11 +298,11 @@ public class MaterialController {
objs
[
1
]
=
m
.
getCategoryName
();
objs
[
2
]
=
m
.
getModel
();
objs
[
3
]
=
m
.
getSafetystock
()
==
null
?
""
:
m
.
getSafetystock
().
toString
();
objs
[
4
]
=
m
.
getUnit
();
objs
[
5
]
=
""
;
objs
[
6
]
=
""
;
objs
[
7
]
=
""
;
objs
[
8
]
=
""
;
objs
[
4
]
=
m
.
get
Commodity
Unit
();
objs
[
5
]
=
m
.
getCommodityDecimal
()
==
null
?
""
:
m
.
getCommodityDecimal
().
toString
()
;
objs
[
6
]
=
m
.
getLowDecimal
()
==
null
?
""
:
m
.
getLowDecimal
().
toString
()
;
objs
[
7
]
=
m
.
getPurchaseDecimal
()
==
null
?
""
:
m
.
getPurchaseDecimal
().
toString
()
;
objs
[
8
]
=
m
.
getWholesaleDecimal
()
==
null
?
""
:
m
.
getWholesaleDecimal
().
toString
()
;
objs
[
9
]
=
m
.
getRemark
();
objs
[
10
]
=
m
.
getEnabled
()
?
"启用"
:
"禁用"
;
objects
.
add
(
objs
);
...
...
src/main/resources/mapper_xml/MaterialMapperEx.xml
View file @
0dde92a0
...
...
@@ -5,6 +5,7 @@
<result
column=
"unitName"
jdbcType=
"VARCHAR"
property=
"unitName"
/>
<result
column=
"categoryName"
jdbcType=
"VARCHAR"
property=
"categoryName"
/>
<result
column=
"bar_code"
jdbcType=
"VARCHAR"
property=
"mBarCode"
/>
<result
column=
"commodity_unit"
jdbcType=
"VARCHAR"
property=
"commodityUnit"
/>
<result
column=
"purchase_decimal"
jdbcType=
"VARCHAR"
property=
"purchaseDecimal"
/>
<result
column=
"commodity_decimal"
jdbcType=
"VARCHAR"
property=
"commodityDecimal"
/>
<result
column=
"wholesale_decimal"
jdbcType=
"VARCHAR"
property=
"wholesaleDecimal"
/>
...
...
@@ -124,11 +125,14 @@
</select>
<select
id=
"findByAll"
parameterType=
"com.jsh.erp.datasource.entities.MaterialExample"
resultMap=
"ResultMapList"
>
select m.*,u.uname unitName, mc.name categoryName
select m.*,u.uname unitName, mc.name categoryName,me.commodity_unit,me.purchase_decimal, me.commodity_decimal,
me.wholesale_decimal, me.low_decimal
FROM jsh_material m
left join jsh_material_extend me on m.id=me.material_id and ifnull(me.delete_Flag,'0') !='1'
left JOIN jsh_unit u on m.UnitId = u.id and ifnull(u.delete_Flag,'0') !='1'
left JOIN jsh_materialcategory mc on m.CategoryId = mc.id and ifnull(mc.status,'0') !='2'
where 1=1
and me.default_flag=1
<if
test=
"name != null"
>
and m.name like '%${name}%'
</if>
...
...
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