Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 115b0ffa
由
zshaohui
编写于
2024-08-13 16:36:02 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1.导出增加其他字段
1 个父辈
7716e5e9
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
49 行增加
和
35 行删除
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
src/main/java/com/neotel/smfcore/core/storage/rest/StoragePosController.java
查看文件 @
115b0ff
...
@@ -9,6 +9,7 @@ import com.neotel.smfcore.common.bean.ResultBean;
...
@@ -9,6 +9,7 @@ import com.neotel.smfcore.common.bean.ResultBean;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.exception.ValidateException
;
import
com.neotel.smfcore.common.utils.*
;
import
com.neotel.smfcore.common.utils.*
;
import
com.neotel.smfcore.core.barcode.bean.CodeBean
;
import
com.neotel.smfcore.core.barcode.bean.CodeBean
;
import
com.neotel.smfcore.core.barcode.enums.BARCODE_STATUS
;
import
com.neotel.smfcore.core.barcode.rest.bean.dto.BarcodeDto
;
import
com.neotel.smfcore.core.barcode.rest.bean.dto.BarcodeDto
;
import
com.neotel.smfcore.core.barcode.rest.bean.dto.CodeDto
;
import
com.neotel.smfcore.core.barcode.rest.bean.dto.CodeDto
;
import
com.neotel.smfcore.core.barcode.rest.bean.mapstruct.CodeMapper
;
import
com.neotel.smfcore.core.barcode.rest.bean.mapstruct.CodeMapper
;
...
@@ -604,16 +605,19 @@ public class StoragePosController {
...
@@ -604,16 +605,19 @@ public class StoragePosController {
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
(
Arrays
.
asList
(
"条码编号"
));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.partNumber"
,
locale
,
"物料编号"
)));
header
.
add
(
Arrays
.
asList
(
"料号"
));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.proDate"
,
locale
,
"生产日期"
)));
//header.add(Arrays.asList("LabelId"));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.expireDate"
,
locale
,
"过期时间"
)));
header
.
add
(
Arrays
.
asList
(
"状态"
));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.posName"
,
locale
,
"库位号"
)));
header
.
add
(
Arrays
.
asList
(
"库别"
));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.lockName"
,
locale
,
"工单号"
)));
header
.
add
(
Arrays
.
asList
(
"批次"
));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.amount"
,
locale
,
"数量"
)));
header
.
add
(
Arrays
.
asList
(
"供应商"
));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.putInTime"
,
locale
,
"首次入库时间"
)));
header
.
add
(
Arrays
.
asList
(
"库位"
));
header
.
add
(
Lists
.
newArrayList
(
MessageUtils
.
getText
(
"smfcore.storagePos.putInDate"
,
locale
,
"入库时间"
)));
header
.
add
(
Arrays
.
asList
(
"DC"
));
header
.
add
(
Arrays
.
asList
(
"卷数"
));
header
.
add
(
Arrays
.
asList
(
"数量"
));
header
.
add
(
Arrays
.
asList
(
"首次入库时间"
));
header
.
add
(
Arrays
.
asList
(
"入库时间"
));
return
header
;
return
header
;
}
}
...
@@ -624,25 +628,40 @@ public class StoragePosController {
...
@@ -624,25 +628,40 @@ public class StoragePosController {
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
StoragePos
>
storagePos
=
storagePosManager
.
findByQuery
(
query
,
pageable
);
List
<
StoragePos
>
storagePos
=
storagePosManager
.
findByQuery
(
query
,
pageable
);
for
(
StoragePos
pos
:
storagePos
)
{
for
(
StoragePos
pos
:
storagePos
)
{
List
<
Object
>
data
=
new
ArrayList
<>();
Barcode
barcode
=
pos
.
getBarcode
();
if
(
barcode
==
null
){
continue
;
}
data
.
add
(
barcode
.
getBarcode
());
data
.
add
(
barcode
.
getPartNumber
());
//data.add(barcode.getLabelId());
String
proDate
=
pos
.
getBarcode
().
getProduceDate
()
==
null
?
""
:
dateFormat
.
format
(
pos
.
getBarcode
().
getProduceDate
());
if
(
barcode
.
getStatus
()
==
BARCODE_STATUS
.
IN_STORE
){
String
expireDate
=
pos
.
getBarcode
().
getExpireDate
()
==
null
?
""
:
dateFormat
.
format
(
pos
.
getBarcode
().
getExpireDate
());
data
.
add
(
"在库"
);
}
else
{
String
putInTime
=
(
pos
.
getBarcode
().
getPutInTime
()
==
-
1
)
?
""
:
dateFormat
.
format
(
new
Date
(
pos
.
getBarcode
().
getPutInTime
()));
data
.
add
(
""
);
if
(
ObjectUtil
.
isEmpty
(
putInTime
)){
putInTime
=
dateFormat
.
format
(
pos
.
getBarcode
().
getCreateDate
());
}
}
List
<
Object
>
data
=
new
ArrayList
<>();
data
.
add
(
barcode
.
getWarehouseCode
());
data
.
add
(
pos
.
getBarcode
().
getBarcode
());
data
.
add
(
barcode
.
getBatch
());
data
.
add
(
pos
.
getBarcode
().
getPartNumber
());
data
.
add
(
barcode
.
getProvider
());
data
.
add
(
proDate
);
data
.
add
(
expireDate
);
data
.
add
(
pos
.
getPosName
());
data
.
add
(
pos
.
getPosName
());
data
.
add
(
pos
.
getBarcode
().
getLockName
());
data
.
add
(
barcode
.
getDateCode
());
data
.
add
(
pos
.
getBarcode
().
getAmount
());
data
.
add
(
1
);
data
.
add
(
putInTime
);
data
.
add
(
barcode
.
getAmount
());
data
.
add
(
dateFormat
.
format
(
pos
.
getBarcode
().
getPutInDate
()));
if
(
barcode
.
getPutInTime
()
!=
-
1
l
){
data
.
add
(
dateFormat
.
format
(
barcode
.
getPutInTime
()));
}
else
{
data
.
add
(
""
);
}
if
(
barcode
.
getPutInDate
()
!=
null
){
data
.
add
(
dateFormat
.
format
(
barcode
.
getPutInDate
()));
}
else
{
data
.
add
(
""
);
}
dataList
.
add
(
data
);
dataList
.
add
(
data
);
}
}
return
dataList
;
return
dataList
;
...
@@ -694,16 +713,11 @@ public class StoragePosController {
...
@@ -694,16 +713,11 @@ public class StoragePosController {
@ApiOperation
(
"解析出库条码"
)
@ApiOperation
(
"解析出库条码"
)
@PutMapping
(
"/resolveCode/{blurry}"
)
@PutMapping
(
"/resolveCode/{blurry}"
)
public
CodeDto
resolveCode
(
@PathVariable
String
blurry
)
{
public
CodeDto
resolveCode
(
@PathVariable
String
blurry
)
{
CodeDto
codeDto
=
new
CodeDto
();
String
barcodeStr
=
blurry
;
codeDto
.
setBarcode
(
blurry
);
Barcode
barcode
=
codeResolve
.
resolveCode
(
barcodeStr
);
codeDto
.
setPartNumber
(
blurry
);
if
(
barcode
==
null
)
{
codeDto
.
setFullCode
(
blurry
);
return
null
;
return
codeDto
;
}
else
{
CodeDto
dto
=
codeMapper
.
toDto
(
barcode
);
log
.
info
(
"resolveCode ["
+
barcodeStr
+
"]=["
+
dto
.
toString
()
+
"]"
);
return
dto
;
}
}
}
@ApiOperation
(
"手动出库解析条码"
)
@ApiOperation
(
"手动出库解析条码"
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论