Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
warehouse
概览
Overview
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
苗卫卫
warehouse
Commits
97b26795
提交
97b26795
authored
1 年前
作者:
zhangqiliang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
仓库导出
父级
900b2f1f
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
16 行增加
和
35 行删除
+16
-35
src/main/java/com/boco/nbd/wios/export/Contants.java
+2
-2
src/main/java/com/boco/nbd/wios/export/ExportController.java
+7
-5
src/main/java/com/boco/nbd/wios/export/impl/WarehouseExport.java
+7
-28
没有找到文件。
src/main/java/com/boco/nbd/wios/export/Contants.java
查看文件 @
97b26795
...
@@ -63,9 +63,9 @@ public class Contants {
...
@@ -63,9 +63,9 @@ public class Contants {
public
static
final
String
export_warrantyOrder_field
=
"no,orderId,userName,userPhone,wallboxNo,startTimeStr,endTimeStr"
;
public
static
final
String
export_warrantyOrder_field
=
"no,orderId,userName,userPhone,wallboxNo,startTimeStr,endTimeStr"
;
public
static
final
String
export_wareHouse_title
=
"仓库
名称,仓库级别,所属区域,仓库归属,所属服务商,描述
"
;
public
static
final
String
export_wareHouse_title
=
"仓库
ID,仓库名称,仓库等级ID,仓库归属,区域,安装服务商
"
;
public
static
final
String
export_wareHouse_field
=
"
name,pathName,areaName,attributionName,providerName,msg
"
;
public
static
final
String
export_wareHouse_field
=
"
id,name,warehouseLevenId,warehouseAttribution,area,serviceProvider
"
;
public
static
final
String
export_single_title
=
"调拨单号,创建时间,创建人,说明,调拨类型,调入仓库,调出仓库"
;
public
static
final
String
export_single_title
=
"调拨单号,创建时间,创建人,说明,调拨类型,调入仓库,调出仓库"
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/boco/nbd/wios/export/ExportController.java
查看文件 @
97b26795
...
@@ -107,9 +107,11 @@ public class ExportController {
...
@@ -107,9 +107,11 @@ public class ExportController {
String
fieldStr
=
field
.
get
(
contants
).
toString
();
String
fieldStr
=
field
.
get
(
contants
).
toString
();
Field
title
=
Contants
.
class
.
getDeclaredField
(
"export_"
+
serviceName
+
"_title"
);
Field
title
=
Contants
.
class
.
getDeclaredField
(
"export_"
+
serviceName
+
"_title"
);
String
titleStr
=
title
.
get
(
contants
).
toString
();
String
titleStr
=
title
.
get
(
contants
).
toString
();
String
[][]
titleArray
;
String
scoreSupplier
=
"score_supplier"
;
// String[] titleArray = "score_supplier".equals(serviceName) ? scoreConfigService.getExcelTitles() :
if
(
scoreSupplier
.
equals
(
serviceName
))
{
// titleStr.split(",");
String
[][]
titleArray
=
null
;
if
(
"score_supplier"
.
equals
(
serviceName
))
{
String
[]
excelTitles
=
scoreConfigService
.
getExcelTitles
();
String
[]
excelTitles
=
scoreConfigService
.
getExcelTitles
();
titleArray
=
new
String
[
2
][
excelTitles
.
length
];
titleArray
=
new
String
[
2
][
excelTitles
.
length
];
titleArray
[
0
]
=
excelTitles
;
titleArray
[
0
]
=
excelTitles
;
...
@@ -117,10 +119,10 @@ public class ExportController {
...
@@ -117,10 +119,10 @@ public class ExportController {
newArr
[
5
]
=
"总分"
;
newArr
[
5
]
=
"总分"
;
titleArray
[
1
]
=
newArr
;
titleArray
[
1
]
=
newArr
;
}
else
{
}
else
{
titleArray
=
new
String
[][]{
titleStr
.
split
(
CamsConstant
.
COMMA
)};
titleArray
=
new
String
[][]{
titleStr
.
split
(
","
)};
}
}
String
[]
fieldStrArray
=
fieldStr
.
split
(
CamsConstant
.
COMMA
);
String
[]
fieldStrArray
=
fieldStr
.
split
(
","
);
List
<?>
exportList
=
export
.
getExportList
(
searchJson
);
List
<?>
exportList
=
export
.
getExportList
(
searchJson
);
PoiUtil
.
exportExcelToWebsite
(
response
,
fileName
,
titleArray
,
fieldStrArray
,
exportList
);
PoiUtil
.
exportExcelToWebsite
(
response
,
fileName
,
titleArray
,
fieldStrArray
,
exportList
);
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/boco/nbd/wios/export/impl/WarehouseExport.java
查看文件 @
97b26795
...
@@ -21,42 +21,21 @@ import java.util.Map;
...
@@ -21,42 +21,21 @@ import java.util.Map;
* @version [版本号, 2020年10月28日]
* @version [版本号, 2020年10月28日]
*/
*/
@Service
(
"WareHouseExport"
)
@Service
(
"WareHouseExport"
)
public
class
WarehouseExport
implements
Export
<
Map
<
String
,
Object
>
>
{
public
class
WarehouseExport
implements
Export
<
WarehouseDTO2
>
{
@Autowired
@Autowired
private
WarehouseService
warehouseService
;
private
WarehouseService
warehouseService
;
@SuppressWarnings
(
"unchecked"
)
@SuppressWarnings
(
"unchecked"
)
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getExportList
(
String
json
)
throws
Exception
{
public
List
<
WarehouseDTO2
>
getExportList
(
String
json
)
throws
Exception
{
ObjectMapper
mapper
=
new
ObjectMapper
();
ObjectMapper
mapper
=
new
ObjectMapper
();
mapper
.
configure
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
,
false
);
mapper
.
configure
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
,
false
);
WarehouseQuery2
warehouseQuery
=
mapper
.
readValue
(
json
,
WarehouseQuery2
.
class
);
WarehouseQuery2
condition
=
mapper
.
readValue
(
json
,
WarehouseQuery2
.
class
);
List
<
WarehouseDTO2
>
list
=
new
ArrayList
<>();
condition
.
setIsWarehousePage
(
2
);
int
page
=
1
;
List
<
WarehouseDTO2
>
list
=
warehouseService
.
qryWarehouseDetailList
(
condition
);
int
pagecount
=
10
;
return
list
;
while
(
true
)
{
warehouseQuery
.
setPage
(
page
);
warehouseQuery
.
setPagecount
(
pagecount
);
List
<
WarehouseDTO2
>
list1
=
warehouseService
.
qryWarehouseDetailList
(
warehouseQuery
);
if
(
list1
==
null
||
list1
.
isEmpty
())
{
break
;
}
list
.
addAll
(
list1
);
if
(
list1
.
size
()
<
pagecount
)
{
break
;
}
page
++;
}
List
<
Map
<
String
,
Object
>>
returnList
=
new
ArrayList
<>(
8
);
for
(
WarehouseDTO2
dto
:
list
)
{
Map
<
String
,
Object
>
map
=
mapper
.
readValue
(
mapper
.
writeValueAsString
(
dto
),
Map
.
class
);
if
(!
StringUtils
.
isEmpty
(
dto
.
getWarehouseAttribution
()))
{
map
.
put
(
"attributionName"
,
dto
.
getWarehouseAttribution
().
equals
(
"1"
)
?
"CAMS仓库"
:
"安装服务商仓库"
);
}
returnList
.
add
(
map
);
}
return
returnList
;
}
}
}
}
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论