Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit a67e51bc
由
LN
编写于
2024-10-31 20:14:39 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
Outside Shelf Dispatch 和ControlledDispatch 新界面接口调整
1 个父辈
2ff2619c
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
123 行增加
和
10 行删除
src/main/java/com/neotel/smfcore/common/bean/ResultBean.java
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
src/main/java/com/neotel/smfcore/core/order/listener/DefaultOrderFileListener.java
src/main/java/com/neotel/smfcore/core/order/service/po/LiteOrderItem.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
src/main/java/com/neotel/smfcore/custom/micron1053/loading/dto/MaterialDispatchDto.java
src/main/java/com/neotel/smfcore/custom/micron1053/loading/dto/SelReelDetialDto.java
src/main/java/com/neotel/smfcore/custom/micron1053/task/MicronDispatchController.java
src/main/java/com/neotel/smfcore/common/bean/ResultBean.java
查看文件 @
a67e51b
package
com
.
neotel
.
smfcore
.
common
.
bean
;
package
com
.
neotel
.
smfcore
.
common
.
bean
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
...
@@ -32,8 +33,11 @@ public class ResultBean<T> {
...
@@ -32,8 +33,11 @@ public class ResultBean<T> {
result
.
setMsgKey
(
msgKey
);
result
.
setMsgKey
(
msgKey
);
result
.
setParams
(
params
);
result
.
setParams
(
params
);
result
.
setMsg
(
MessageUtils
.
getText
(
msgKey
,
params
,
new
Locale
(
SecurityUtils
.
getCurrentUserLanguage
()),
msg
));
result
.
setMsg
(
MessageUtils
.
getText
(
msgKey
,
params
,
new
Locale
(
SecurityUtils
.
getCurrentUserLanguage
()),
msg
));
if
(
writeLog
)
{
if
(
writeLog
)
{
log
.
info
(
result
.
getMsg
());
String
showmsg
=
result
.
getMsg
();
if
(
ObjectUtil
.
isNotEmpty
(
showmsg
)){
log
.
info
(
showmsg
);
}
}
}
return
result
;
return
result
;
}
}
...
...
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
a67e51b
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/core/order/listener/DefaultOrderFileListener.java
查看文件 @
a67e51b
...
@@ -123,12 +123,15 @@ public class DefaultOrderFileListener implements IOrderFileListener {
...
@@ -123,12 +123,15 @@ public class DefaultOrderFileListener implements IOrderFileListener {
itemMap
=
readExcelFile
(
fileName
,
orderFile
.
getAbsolutePath
());
itemMap
=
readExcelFile
(
fileName
,
orderFile
.
getAbsolutePath
());
}
}
//新增为一个工单
if
(
ObjectUtil
.
isEmpty
(
reason
)){
String
orderName
=
reason
;
reason
=
""
;
if
(
ObjectUtil
.
isEmpty
(
reason
))
{
List
<
LiteOrder
>
orders
=
liteOrderManager
.
findByQuery
(
new
Query
(
Criteria
.
where
(
"mode"
).
is
(
mode
)));
orderName
=
mode
+
(
orders
.
size
()
+
1
);
}
}
//新增为一个工单
String
orderName
=
mode
+
"_"
+
reason
+
"_"
+
operId
;
// if(ObjectUtil.isEmpty(reason)) {
// List<LiteOrder> orders = liteOrderManager.findByQuery(new Query(Criteria.where("mode").is(mode)));
// orderName = mode + (orders.size() + 1);
// }
LiteOrder
dbOrder
=
liteOrderManager
.
findByOrderNo
(
orderName
);
LiteOrder
dbOrder
=
liteOrderManager
.
findByOrderNo
(
orderName
);
if
(
dbOrder
!=
null
)
{
if
(
dbOrder
!=
null
)
{
...
@@ -137,7 +140,7 @@ public class DefaultOrderFileListener implements IOrderFileListener {
...
@@ -137,7 +140,7 @@ public class DefaultOrderFileListener implements IOrderFileListener {
String
newOrderNo
=
orderName
+
"-"
+
format
.
format
(
new
Date
());
String
newOrderNo
=
orderName
+
"-"
+
format
.
format
(
new
Date
());
dbOrder
=
liteOrderManager
.
findByOrderNo
(
newOrderNo
);
dbOrder
=
liteOrderManager
.
findByOrderNo
(
newOrderNo
);
if
(
dbOrder
==
null
)
{
if
(
dbOrder
==
null
)
{
orderName
=
newOrderNo
;
}
else
{
}
else
{
log
.
info
(
"watchOrderDir,mode=["
+
mode
+
"],reason=["
+
reason
+
"]:数据库中已存在工单号为["
+
orderName
+
"],忽略文件:"
+
orderFile
.
getAbsolutePath
());
log
.
info
(
"watchOrderDir,mode=["
+
mode
+
"],reason=["
+
reason
+
"]:数据库中已存在工单号为["
+
orderName
+
"],忽略文件:"
+
orderFile
.
getAbsolutePath
());
//resultFile = new File(localDir+File.separator + "error",backupFileName);
//resultFile = new File(localDir+File.separator + "error",backupFileName);
...
...
src/main/java/com/neotel/smfcore/core/order/service/po/LiteOrderItem.java
查看文件 @
a67e51b
...
@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.order.service.po;
...
@@ -2,6 +2,7 @@ package com.neotel.smfcore.core.order.service.po;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.neotel.smfcore.common.base.BasePo
;
import
com.neotel.smfcore.common.base.BasePo
;
import
com.neotel.smfcore.custom.micron1053.task.enums.OrderItemStatus
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.data.annotation.Transient
;
import
org.springframework.data.annotation.Transient
;
...
@@ -9,6 +10,7 @@ import org.springframework.data.mongodb.core.index.Indexed;
...
@@ -9,6 +10,7 @@ import org.springframework.data.mongodb.core.index.Indexed;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
org.springframework.data.mongodb.core.mapping.Document
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -120,16 +122,46 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li
...
@@ -120,16 +122,46 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li
* 自定义的附加字段,key=字段名,value=值
* 自定义的附加字段,key=字段名,value=值
*/
*/
public
Map
<
String
,
String
>
appendData
=
new
HashMap
<>();
public
Map
<
String
,
String
>
appendData
=
new
HashMap
<>();
/**
* 添加或更新自定义附加信息
* @param appendKey
* @param appendValue
*/
public
void
updateAppendData
(
String
appendKey
,
String
appendValue
){
appendData
.
put
(
appendKey
,
appendValue
);
}
/**
* 获取自定义附加信息
* @param appendKey
* @param <T>
* @return
*/
public
<
T
>
T
getAppendData
(
String
appendKey
){
Object
value
=
appendData
.
get
(
appendKey
);
if
(
value
!=
null
){
return
(
T
)
value
;
}
return
null
;
}
public
List
<
LiteOrderItem
>
selectItems
;
public
List
<
LiteOrderItem
>
selectItems
;
public
boolean
updateSelItemS
(
String
subItemId
,
String
selItemStatus
,
String
reason
)
{
public
List
<
LiteOrderItem
>
getSelectItems
(){
if
(
selectItems
==
null
){
return
new
ArrayList
<>();
}
return
selectItems
;
}
public
boolean
updateSelItemS
(
String
barcode
,
String
selItemStatus
,
String
reason
)
{
try
{
try
{
if
(
selectItems
==
null
||
selectItems
.
size
()
<=
0
)
{
if
(
selectItems
==
null
||
selectItems
.
size
()
<=
0
)
{
return
false
;
return
false
;
}
}
for
(
int
i
=
0
;
i
<
selectItems
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
selectItems
.
size
();
i
++)
{
if
(
selectItems
.
get
(
i
).
get
Id
().
equals
(
subItemId
))
{
if
(
selectItems
.
get
(
i
).
get
Ri
().
equals
(
barcode
))
{
selectItems
.
get
(
i
).
setStatus
(
selItemStatus
);
selectItems
.
get
(
i
).
setStatus
(
selItemStatus
);
if
(
ObjectUtil
.
isNotEmpty
(
reason
))
{
if
(
ObjectUtil
.
isNotEmpty
(
reason
))
{
selectItems
.
get
(
i
).
setExecutFailReason
(
reason
);
selectItems
.
get
(
i
).
setExecutFailReason
(
reason
);
...
@@ -161,4 +193,24 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li
...
@@ -161,4 +193,24 @@ public class LiteOrderItem extends BasePo implements Serializable ,Comparable<Li
}
}
return
this
.
getId
().
compareTo
(
o
.
getId
());
return
this
.
getId
().
compareTo
(
o
.
getId
());
}
}
public
boolean
isSuccess
(){
return
status
.
equalsIgnoreCase
(
OrderItemStatus
.
executing
)||
status
.
equalsIgnoreCase
(
OrderItemStatus
.
wait
)||
status
.
equalsIgnoreCase
(
OrderItemStatus
.
notify_success
)||
status
.
equalsIgnoreCase
(
OrderItemStatus
.
finish
)
||
status
.
equalsIgnoreCase
(
OrderItemStatus
.
CheckOk
);
}
public
boolean
isNg
()
{
return
status
.
equalsIgnoreCase
(
OrderItemStatus
.
executFail
)||
status
.
equalsIgnoreCase
(
OrderItemStatus
.
CheckFail
)||
status
.
equalsIgnoreCase
(
OrderItemStatus
.
cancel
)
||
status
.
equalsIgnoreCase
(
OrderItemStatus
.
Reserved
);
}
public
boolean
isTranFail
()
{
return
status
.
equalsIgnoreCase
(
OrderItemStatus
.
notify_fail
);
}
}
}
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
查看文件 @
a67e51b
...
@@ -1004,6 +1004,9 @@ public class MicronApi {
...
@@ -1004,6 +1004,9 @@ public class MicronApi {
public
static
boolean
Api012
(
String
operationId
,
String
action
)
{
public
static
boolean
Api012
(
String
operationId
,
String
action
)
{
if
(
Debug
){
return
true
;
}
String
url
=
config
.
getUrl
(
config
.
api_name_012
);
String
url
=
config
.
getUrl
(
config
.
api_name_012
);
url
=
MessageFormat
.
format
(
url
,
operationId
);
url
=
MessageFormat
.
format
(
url
,
operationId
);
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/loading/dto/MaterialDispatchDto.java
0 → 100644
查看文件 @
a67e51b
package
com
.
neotel
.
smfcore
.
custom
.
micron1053
.
loading
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
MaterialDispatchDto
implements
Serializable
{
@ApiModelProperty
(
"物料类型"
)
private
String
materialType
;
@ApiModelProperty
(
"成功盘数"
)
private
int
successQty
;
@ApiModelProperty
(
"NG盘数"
)
private
int
ng
;
@ApiModelProperty
(
"失败盘数"
)
private
int
failure
;
}
src/main/java/com/neotel/smfcore/custom/micron1053/loading/dto/SelReelDetialDto.java
0 → 100644
查看文件 @
a67e51b
package
com
.
neotel
.
smfcore
.
custom
.
micron1053
.
loading
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
SelReelDetialDto
implements
Serializable
{
@ApiModelProperty
(
"PN"
)
private
String
pn
;
@ApiModelProperty
(
"RI"
)
private
String
ri
;
@ApiModelProperty
(
"qty"
)
private
int
qty
;
@ApiModelProperty
(
"状态,CheckOK的不可勾选,Reserved 和CheckFail 的可勾选"
)
private
String
status
;
@ApiModelProperty
(
"执行失败原因"
)
private
String
executFailReason
;
}
src/main/java/com/neotel/smfcore/custom/micron1053/task/MicronDispatchController.java
查看文件 @
a67e51b
此文件的差异被折叠,
点击展开。
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论