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
cc314e6b
Commit
cc314e6b
authored
Oct 12, 2021
by
季圣华
Browse files
移除导出供应商excel的接口
parent
de658e32
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/controller/SupplierController.java
View file @
cc314e6b
...
...
@@ -208,57 +208,6 @@ public class SupplierController {
return
arr
;
}
/**
* 生成excel表格
* @param supplier
* @param type
* @param phonenum
* @param telephone
* @param request
* @param response
* @return
*/
@GetMapping
(
value
=
"/exportExcel"
)
public
void
exportExcel
(
@RequestParam
(
"supplier"
)
String
supplier
,
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"phonenum"
)
String
phonenum
,
@RequestParam
(
"telephone"
)
String
telephone
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
try
{
List
<
Supplier
>
dataList
=
supplierService
.
findByAll
(
supplier
,
type
,
phonenum
,
telephone
);
String
[]
names
=
{
"名称"
,
"类型"
,
"联系人"
,
"电话"
,
"电子邮箱"
,
"预收款"
,
"期初应收"
,
"期初应付"
,
"备注"
,
"传真"
,
"手机"
,
"地址"
,
"纳税人识别号"
,
"开户行"
,
"账号"
,
"税率"
,
"状态"
};
String
title
=
"信息报表"
;
List
<
String
[]>
objects
=
new
ArrayList
<
String
[]>();
if
(
null
!=
dataList
)
{
for
(
Supplier
s
:
dataList
)
{
String
[]
objs
=
new
String
[
17
];
objs
[
0
]
=
s
.
getSupplier
();
objs
[
1
]
=
s
.
getType
();
objs
[
2
]
=
s
.
getContacts
();
objs
[
3
]
=
s
.
getPhoneNum
();
objs
[
4
]
=
s
.
getEmail
();
objs
[
5
]
=
s
.
getAdvanceIn
()
==
null
?
""
:
s
.
getAdvanceIn
().
toString
();
objs
[
6
]
=
s
.
getBeginNeedGet
()
==
null
?
""
:
s
.
getBeginNeedGet
().
toString
();
objs
[
7
]
=
s
.
getBeginNeedPay
()
==
null
?
""
:
s
.
getBeginNeedPay
().
toString
();
objs
[
8
]
=
s
.
getDescription
();
objs
[
9
]
=
s
.
getFax
();
objs
[
10
]
=
s
.
getTelephone
();
objs
[
11
]
=
s
.
getAddress
();
objs
[
12
]
=
s
.
getTaxNum
();
objs
[
13
]
=
s
.
getBankName
();
objs
[
14
]
=
s
.
getAccountNumber
();
objs
[
15
]
=
s
.
getTaxRate
()
==
null
?
""
:
s
.
getTaxRate
().
toString
();
objs
[
16
]
=
s
.
getEnabled
()
?
"启用"
:
"禁用"
;
objects
.
add
(
objs
);
}
}
File
file
=
ExcelUtils
.
exportObjectsWithoutTitle
(
title
,
names
,
title
,
objects
);
ExportExecUtil
.
showExec
(
file
,
file
.
getName
(),
response
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
* 导入excel表格
* @param 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