Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 08d01a59
由
LN
编写于
2024-10-21 16:49:39 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
库位管理增加导出功能
1 个父辈
05cdb741
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
130 行增加
和
95 行删除
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
src/main/resources/messages.properties
src/main/resources/messages_en_US.properties
src/main/resources/messages_ja_JP.properties
src/main/resources/messages_zh_CN.properties
src/main/resources/messages_zh_TW.properties
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
查看文件 @
08d01a5
...
@@ -114,96 +114,91 @@ public class StoragePosController {
...
@@ -114,96 +114,91 @@ public class StoragePosController {
}
}
return
new
PageData
(
StoragePosDtos
,
pages
.
getTotalElements
());
return
new
PageData
(
StoragePosDtos
,
pages
.
getTotalElements
());
}
}
//
//
// @ApiOperation("导出查找出库列表")
@ApiOperation
(
"导出库位列表"
)
// @GetMapping(value = "/download")
@GetMapping
(
value
=
"/download"
)
// @PreAuthorize("@el.check('checkOut')")
@PreAuthorize
(
"@el.check('storagePos:list')"
)
// public void download(HttpServletResponse response, StoragePosQueryCriteria criteria, Pageable pageable, HttpServletRequest request) throws IOException {
public
void
download
(
HttpServletResponse
response
,
StoragePosQueryCriteria
criteria
,
Pageable
pageable
,
HttpServletRequest
request
)
throws
IOException
{
// if (criteria.getStorageIdList() != null && criteria.getStorageIdList().contains("0")) {
if
(
criteria
.
getStorageIdList
()
!=
null
&&
criteria
.
getStorageIdList
().
contains
(
"0"
))
{
// criteria.setStorageIdList(null);
criteria
.
setStorageIdList
(
null
);
// }
}
// criteria.setStorageIdList(QueryHelp.getGroupStorageIdList(criteria.getStorageIdList()));
criteria
.
setStorageIdList
(
QueryHelp
.
getGroupStorageIdList
(
criteria
.
getStorageIdList
()));
// String blurry = criteria.getBlurry();
String
blurry
=
criteria
.
getBlurry
();
// if(!Strings.isNullOrEmpty(blurry)){
if
(!
Strings
.
isNullOrEmpty
(
blurry
)){
// //去除库位中的SOxxxx
//去除库位中的SOxxxx
// blurry = blurry.substring(blurry.indexOf("-")+1);
blurry
=
blurry
.
substring
(
blurry
.
indexOf
(
"-"
)+
1
);
// criteria.setBlurry(blurry);
criteria
.
setBlurry
(
blurry
);
// }
}
// Locale locale = request.getLocale();
Locale
locale
=
request
.
getLocale
();
//
// String enable=MessageUtils.getText("",locale,"是");
String
enable
=
MessageUtils
.
getText
(
"smfcore.storagePos.yes"
,
locale
,
"是"
);
// String noEnable= MessageUtils.getText("",locale,"否");
String
noEnable
=
MessageUtils
.
getText
(
"smfcore.storagePos.no"
,
locale
,
"否"
);
// Query query = QueryHelp.getQuery(criteria);
Query
query
=
QueryHelp
.
getQuery
(
criteria
);
// FileUtil.downloadExcel(query, pageable, response, new IExcelDownLoad() {
FileUtil
.
downloadExcel
(
query
,
pageable
,
response
,
new
IExcelDownLoad
()
{
// @Override
@Override
// public List<List<String>> getHeader() {
public
List
<
List
<
String
>>
getHeader
()
{
// List<List<String>> header = new ArrayList<>();
List
<
List
<
String
>>
header
=
new
ArrayList
<>();
// Locale locale = request.getLocale();
Locale
locale
=
request
.
getLocale
();
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.barcode",locale,"设备名称")));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.partNumber",locale,"设备")));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.proDate",locale,"列")));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.expireDate",locale,"模组")));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.storageName"
,
locale
,
"设备名称"
)));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.batch",locale,"层")));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.posName"
,
locale
,
"库位号"
)));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.posName",locale,"槽位")));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.column"
,
locale
,
"列"
)));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.lockName",locale,"是否可用")));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.magazine"
,
locale
,
"模组"
)));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.amount",locale,"条码")));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.layer"
,
locale
,
"层"
)));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.putInTime",locale,"物料编号")));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.slot"
,
locale
,
"槽位"
)));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.putInTime",locale,"料盘尺寸")));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.available"
,
locale
,
"是否可用"
)));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.putInTime",locale,"直径")));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.barcode"
,
locale
,
"条码"
)));
// header.add(Lists.newArrayList(MessageUtils.getText("smfcore.storagePos.putInTime",locale,"厚度")));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.partNumber"
,
locale
,
"料件编号"
)));
//
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.plateSize"
,
locale
,
"料盘尺寸"
)));
// return header;
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.w"
,
locale
,
"直径"
)));
// }
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.h"
,
locale
,
"厚度"
)));
//
// @Override
return
header
;
// public List<List<Object>> getPageData(Query query, Pageable pageable) {
}
// List<List<Object>> dataList = new ArrayList<>();
// DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Override
// List<Map<String, Object>> list = new ArrayList<>();
public
List
<
List
<
Object
>>
getPageData
(
Query
query
,
Pageable
pageable
)
{
// PageData<StoragePos> pages = storagePosManager.findByPage(query, pageable);
List
<
List
<
Object
>>
dataList
=
new
ArrayList
<>();
// List<StoragePosDto> StoragePosDtos = storagePosMapper.toDto(pages.getContent());
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
//
PageData
<
StoragePos
>
pages
=
storagePosManager
.
findByPage
(
query
,
pageable
);
// for (int i=0;i<StoragePosDtos.size();i++){
List
<
StoragePosDto
>
StoragePosDtos
=
storagePosMapper
.
toDto
(
pages
.
getContent
());
// Storage storage=dataCache.getStorageById(StoragePosDtos.get(i).getStorageId());
// if(storage!=null){
for
(
int
i
=
0
;
i
<
StoragePosDtos
.
size
();
i
++){
// StoragePosDtos.get(i).setStorageName(storage.getName());
Storage
storage
=
dataCache
.
getStorageById
(
StoragePosDtos
.
get
(
i
).
getStorageId
());
// }
if
(
storage
!=
null
){
// }
StoragePosDtos
.
get
(
i
).
setStorageName
(
storage
.
getName
());
// for (StoragePosDto pos : StoragePosDtos) {
}
//
}
// String proDate = pos.getBarcode().getProduceDate() == null ? "" : dateFormat.format(pos.getBarcode().getProduceDate());
for
(
StoragePosDto
pos
:
StoragePosDtos
)
{
// String expireDate = pos.getBarcode().getExpireDate() == null ? "" : dateFormat.format(pos.getBarcode().getExpireDate());
List
<
Object
>
data
=
new
ArrayList
<>();
//
data
.
add
(
pos
.
getStorageName
());
// String putInTime = (pos.getBarcode().getPutInTime() == -1) ? "" : dateFormat.format(new Date(pos.getBarcode().getPutInTime()));
data
.
add
(
pos
.
getPosName
());
// if(ObjectUtil.isNotEmpty(putInTime)){
data
.
add
(
pos
.
getColumn
());
// putInTime=dateFormat.format(pos.getBarcode().getPutInDate());
data
.
add
(
pos
.
getMagazine
());
// }
data
.
add
(
pos
.
getLayer
());
//
data
.
add
(
pos
.
getSlot
());
// List<Object> data = new ArrayList<>();
data
.
add
(
pos
.
isEnabled
()?(
enable
):
noEnable
);
// data.add(pos.getStorageName());
if
(
pos
.
getBarcode
()!=
null
){
// data.add(pos.getPosName());
// data.add(pos.getColumn());
data
.
add
(
pos
.
getBarcode
().
getBarcode
());
// data.add(pos.getMagazine());
data
.
add
(
pos
.
getBarcode
().
getPartNumber
());
// data.add(pos.getLayer());
data
.
add
(
pos
.
getBarcode
().
getPlateSize
()+
"X"
+
pos
.
getBarcode
().
getHeight
());
// data.add(pos.getSlot());
}
else
{
// data.add(pos.isEnabled()?(enable):noEnable);
data
.
add
(
""
);
// data.add(pos.getBarcode().getBarcode());
data
.
add
(
""
);
// data.add(pos.getBarcode().getPartNumber());
data
.
add
(
""
);
// data.add(proDate);
}
// data.add(expireDate);
data
.
add
(
pos
.
getW
());
// data.add(pos.getBarcode().getBatch());
data
.
add
(
pos
.
getH
());
// data.add(pos.getPosName());
dataList
.
add
(
data
);
// data.add(pos.getBarcode().getLockName());
}
// data.add(pos.getBarcode().getAmount());
return
dataList
;
// data.add(putInTime);
}
// data.add(dateFormat.format(pos.getBarcode().getPutInDate()));
});
// dataList.add(data);
}
// }
// return dataList;
// }
// });
// }
...
...
src/main/resources/messages.properties
查看文件 @
08d01a5
...
@@ -390,4 +390,12 @@ smfcore.order.finished=\u5DE5\u5355[{0}]\u7684\u4EFB\u52A1\u5DF2\u5168\u90E8\u5B
...
@@ -390,4 +390,12 @@ smfcore.order.finished=\u5DE5\u5355[{0}]\u7684\u4EFB\u52A1\u5DF2\u5168\u90E8\u5B
smfcore.spkanban
=
SP
\u
4EEA
\u8868\u
76D8
smfcore.spkanban
=
SP
\u
4EEA
\u8868\u
76D8
smfcore.storagePos.plateSize
=
\u6599\u
76D8
\u
5C3A
\u
5BF8
smfcore.storagePos.plateSize
=
\u6599\u
76D8
\u
5C3A
\u
5BF8
smfcore.storagePos.w
=
\u
76F4
\u
5F84
smfcore.storagePos.w
=
\u
76F4
\u
5F84
smfcore.storagePos.h
=
\u
539A
\u
5EA6
\ No newline at end of file
\ No newline at end of file
smfcore.storagePos.h
=
\u
539A
\u
5EA6
smfcore.storagePos.storageName
=
\u
8BBE
\u5907\u
540D
\u
79F0
smfcore.storagePos.column
=
\u5217
smfcore.storagePos.magazine
=
\u
6A21
\u
7EC4
smfcore.storagePos.layer
=
\u
5C42
smfcore.storagePos.slot
=
\u
69FD
\u
4F4D
smfcore.storagePos.available
=
\u
662F
\u5426\u
53EF
\u7528
smfcore.storagePos.yes=
\u
662F
smfcore.storagePos.no
=
\u5426
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_en_US.properties
查看文件 @
08d01a5
...
@@ -381,4 +381,12 @@ smfcore.order.finished=workorder[{0}] has completed all of its tasks
...
@@ -381,4 +381,12 @@ smfcore.order.finished=workorder[{0}] has completed all of its tasks
smfcore.spkanban
=
SP Dash Board
smfcore.spkanban
=
SP Dash Board
smfcore.storagePos.plateSize
=
Detected Size
smfcore.storagePos.plateSize
=
Detected Size
smfcore.storagePos.w
=
Diameter
smfcore.storagePos.w
=
Diameter
smfcore.storagePos.h
=
Thickness
\ No newline at end of file
\ No newline at end of file
smfcore.storagePos.h
=
Thickness
smfcore.storagePos.storageName
=
Equipment Name
smfcore.storagePos.column
=
Column
smfcore.storagePos.magazine
=
Magazine
smfcore.storagePos.layer
=
Layer
smfcore.storagePos.slot
=
Slot
smfcore.storagePos.available
=
Available
smfcore.storagePos.yes
=
Yes
smfcore.storagePos.no
=
No
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_ja_JP.properties
查看文件 @
08d01a5
...
@@ -377,4 +377,12 @@ smfcore.order.finished=\u30EF\u30FC\u30AF\u30AA\u30FC\u30C0\u30FC[{0}]\u306E\u30
...
@@ -377,4 +377,12 @@ smfcore.order.finished=\u30EF\u30FC\u30AF\u30AA\u30FC\u30C0\u30FC[{0}]\u306E\u30
smfcore.spkanban
=
\u
30C0
\u
30C3
\u
30B7
\u
30E5
\u
30DC
\u
30FC
\u
30C9
smfcore.spkanban
=
\u
30C0
\u
30C3
\u
30B7
\u
30E5
\u
30DC
\u
30FC
\u
30C9
smfcore.storagePos.plateSize
=
\u6599\u
76D8
\u
5C3A
\u
5BF8
smfcore.storagePos.plateSize
=
\u6599\u
76D8
\u
5C3A
\u
5BF8
smfcore.storagePos.w
=
\u
76F4
\u
5F84
smfcore.storagePos.w
=
\u
76F4
\u
5F84
smfcore.storagePos.h
=
\u
539A
\u3055
\ No newline at end of file
\ No newline at end of file
smfcore.storagePos.h
=
\u
539A
\u3055
smfcore.storagePos.storageName
=
\u
8BBE
\u5907\u
540D
\u
79F0
smfcore.storagePos.column
=
\u5217
smfcore.storagePos.magazine
=
\u
6A21
\u
7EC4
smfcore.storagePos.layer
=
\u
5C42
smfcore.storagePos.slot
=
\u
69FD
\u
4F4D
smfcore.storagePos.available
=
\u5229\u7528\u
53EF
\u5426
smfcore.storagePos.yes=
\u
662F
smfcore.storagePos.no
=
\u5426
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
08d01a5
...
@@ -377,4 +377,12 @@ smfcore.order.finished=\u5DE5\u5355[{0}]\u7684\u4EFB\u52A1\u5DF2\u5168\u90E8\u5B
...
@@ -377,4 +377,12 @@ smfcore.order.finished=\u5DE5\u5355[{0}]\u7684\u4EFB\u52A1\u5DF2\u5168\u90E8\u5B
smfcore.spkanban
=
SP
\u
4EEA
\u8868\u
76D8
smfcore.spkanban
=
SP
\u
4EEA
\u8868\u
76D8
smfcore.storagePos.plateSize
=
\u6599\u
76D8
\u
5C3A
\u
5BF8
smfcore.storagePos.plateSize
=
\u6599\u
76D8
\u
5C3A
\u
5BF8
smfcore.storagePos.w
=
\u
76F4
\u
5F84
smfcore.storagePos.w
=
\u
76F4
\u
5F84
smfcore.storagePos.h
=
\u
539A
\u
5EA6
\ No newline at end of file
\ No newline at end of file
smfcore.storagePos.h
=
\u
539A
\u
5EA6
smfcore.storagePos.storageName
=
\u
8BBE
\u5907\u
540D
\u
79F0
smfcore.storagePos.column
=
\u5217
smfcore.storagePos.magazine
=
\u
6A21
\u
7EC4
smfcore.storagePos.layer
=
\u
5C42
smfcore.storagePos.slot
=
\u
69FD
\u
4F4D
smfcore.storagePos.available
=
\u
662F
\u5426\u
53EF
\u7528
smfcore.storagePos.yes
=
\u
662F
smfcore.storagePos.no
=
\u5426
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
08d01a5
...
@@ -377,4 +377,12 @@ smfcore.order.finished=\u5DE5\u55AE[{0}]\u7684\u4EFB\u52D9\u5DF2\u5168\u90E8\u5B
...
@@ -377,4 +377,12 @@ smfcore.order.finished=\u5DE5\u55AE[{0}]\u7684\u4EFB\u52D9\u5DF2\u5168\u90E8\u5B
smfcore.spkanban
=
SP
\u5100\u9336\u
76E4
smfcore.spkanban
=
SP
\u5100\u9336\u
76E4
smfcore.storagePos.plateSize
=
\u6599\u
76D8
\u
5C3A
\u
5BF8
smfcore.storagePos.plateSize
=
\u6599\u
76D8
\u
5C3A
\u
5BF8
smfcore.storagePos.w
=
\u
76F4
\u
5F84
smfcore.storagePos.w
=
\u
76F4
\u
5F84
smfcore.storagePos.h
=
\u
539A
\u
5EA6
\ No newline at end of file
\ No newline at end of file
smfcore.storagePos.h
=
\u
539A
\u
5EA6
smfcore.storagePos.storageName
=
\u
8A2D
\u5099\u
540D
\u
7A31
smfcore.storagePos.column
=
\u5217
smfcore.storagePos.magazine
=
\u
6A21
\u
7D44
smfcore.storagePos.layer
=
\u
5C64
smfcore.storagePos.slot
=
\u
69FD
\u
4F4D
smfcore.storagePos.available
=
\u
662F
\u5426\u
53EF
\u7528
smfcore.storagePos.yes
=
\u
662F
smfcore.storagePos.no
=
\u5426
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论