Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 00042f65
由
LN
编写于
2025-01-13 15:50:53 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
loading 接口增加phase2B相关参数:MBR,REQ,GR,MCL
1 个父辈
216f6313
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
259 行增加
和
67 行删除
src/main/java/com/neotel/smfcore/core/inList/service/po/InList.java
src/main/java/com/neotel/smfcore/custom/micron1053/loading/LoadingController.java
src/main/java/com/neotel/smfcore/custom/micron1053/loading/util/LoadingUtil.java
src/main/resources/config/application-prod.yml
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/inList/service/po/InList.java
查看文件 @
00042f6
...
@@ -25,6 +25,15 @@ public class InList extends BasePo implements Serializable {
...
@@ -25,6 +25,15 @@ public class InList extends BasePo implements Serializable {
setSendEmail
(
sendEmail
);
setSendEmail
(
sendEmail
);
}
}
public
void
SetParam
(
String
mode
,
int
shelfNum
,
String
reqId
,
String
mbrId
,
String
deliveryNote
,
String
purchaseOrder
,
String
operationId
){
this
.
setMode
(
mode
);
this
.
setShelfNum
(
shelfNum
);
this
.
setReqId
(
reqId
);
this
.
setMbrId
(
mbrId
);
this
.
setDeliveryNote
(
deliveryNote
);
this
.
setPurchaseOrder
(
purchaseOrder
);
this
.
setOperationId
(
operationId
);
}
/**
/**
* 入库单名称
* 入库单名称
*/
*/
...
@@ -61,6 +70,23 @@ public class InList extends BasePo implements Serializable {
...
@@ -61,6 +70,23 @@ public class InList extends BasePo implements Serializable {
private
String
operationId
=
""
;
private
String
operationId
=
""
;
/**
* ReqId
*/
private
String
reqId
=
""
;
/**
* mbrId
*/
private
String
mbrId
=
""
;
/**
* Delivery Note ( Packaging Slip)(包装单)
*/
private
String
deliveryNote
=
""
;
/**
* STO # ( Purchase Order)(采购单号)
*/
private
String
purchaseOrder
;
public
boolean
isValidRfid
(
String
rfid
){
public
boolean
isValidRfid
(
String
rfid
){
if
(
rfidList
.
contains
(
rfid
)){
if
(
rfidList
.
contains
(
rfid
)){
return
true
;
return
true
;
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/loading/LoadingController.java
查看文件 @
00042f6
...
@@ -61,10 +61,31 @@ public class LoadingController {
...
@@ -61,10 +61,31 @@ public class LoadingController {
@Autowired
@Autowired
private
TaskService
taskService
;
private
TaskService
taskService
;
private
String
getParam
(
Map
<
String
,
Object
>
params
,
String
key
,
String
defValue
)
{
if
(
params
==
null
){
return
defValue
;
}
Object
value
=
params
.
get
(
key
);
if
(
ObjectUtil
.
isNotNull
(
value
)){
return
value
.
toString
();
}
return
defValue
;
}
private
int
getIntParam
(
Map
<
String
,
Object
>
params
,
String
key
,
int
defValue
)
{
if
(
params
==
null
){
return
defValue
;
}
Object
value
=
params
.
get
(
key
);
if
(
ObjectUtil
.
isNotNull
(
value
)){
return
Integer
.
parseInt
(
value
.
toString
());
}
return
defValue
;
}
@ApiOperation
(
"lOADING页面获取列表数据"
)
@ApiOperation
(
"lOADING页面获取列表数据"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
list
(
HttpServletRequest
servletRequest
)
{
public
ResultBean
list
(
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletRequest
servletRequest
)
{
String
mode
=
getParam
(
params
,
"mode"
,
APIMODE
.
MATRET
)
;
//判断是否验证
//判断是否验证
if
(!
MicronApi
.
isEnable
()){
if
(!
MicronApi
.
isEnable
()){
...
@@ -74,8 +95,14 @@ public class LoadingController {
...
@@ -74,8 +95,14 @@ public class LoadingController {
InList
inList
=
loadingUtil
.
getInlist
();
InList
inList
=
loadingUtil
.
getInlist
();
if
(
inList
==
null
){
if
(
inList
==
null
){
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.nodata"
,
"未找到信息"
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.nodata"
,
"未找到信息"
);
}
else
{
}
else
{
//判断mode是否相同
if
(
inList
.
getMode
().
equals
(
mode
))
{
return
ResultBean
.
newOkResult
(
getList
(
inList
));
return
ResultBean
.
newOkResult
(
getList
(
inList
));
}
else
{
return
ResultBean
.
newErrorResult
(
9
,
"smfcore.micron.otherModeNotEnd"
,
inList
.
getMode
()+
" Loading Not End"
);
}
}
}
}
}
...
@@ -118,12 +145,11 @@ public class LoadingController {
...
@@ -118,12 +145,11 @@ public class LoadingController {
@GetMapping
(
"/detial"
)
@GetMapping
(
"/detial"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
detial
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
public
ResultBean
detial
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
String
mode
=
getParam
(
params
,
"mode"
,
APIMODE
.
MATRET
)
;
//参数:mType 物料类型:pcb/shoebox/pizzaBox/reel/tray
//参数:mType 物料类型:pcb/shoebox/pizzaBox/reel/tray
//参数:state 状态: success/xray/failure/ng
//参数:state 状态: success/xray/failure/ng
String
mType
=
params
.
get
(
"mType"
).
toString
();
String
mType
=
params
.
get
(
"mType"
).
toString
();
String
state
=
params
.
get
(
"state"
).
toString
();
String
state
=
params
.
get
(
"state"
).
toString
();
List
<
MaterialDtialDto
>
dtos
=
new
ArrayList
<>();
List
<
MaterialDtialDto
>
dtos
=
new
ArrayList
<>();
if
(
MicronApi
.
Debug
)
{
if
(
MicronApi
.
Debug
)
{
for
(
int
i
=
1
;
i
<=
5
;
i
++
for
(
int
i
=
1
;
i
<=
5
;
i
++
...
@@ -139,6 +165,9 @@ public class LoadingController {
...
@@ -139,6 +165,9 @@ public class LoadingController {
if
(
inList
==
null
)
{
if
(
inList
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.nodata"
,
"未找到信息"
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.nodata"
,
"未找到信息"
);
}
}
if
(!
inList
.
getMode
().
equals
(
mode
))
{
return
ResultBean
.
newErrorResult
(
9
,
"smfcore.micron.otherModeNotEnd"
,
inList
.
getMode
()+
" Loading Not End"
);
}
for
(
InListItem
item
:
for
(
InListItem
item
:
inList
.
getInListItems
())
{
inList
.
getInListItems
())
{
if
(
item
.
getMType
().
equalsIgnoreCase
(
mType
))
{
if
(
item
.
getMType
().
equalsIgnoreCase
(
mType
))
{
...
@@ -187,68 +216,183 @@ public class LoadingController {
...
@@ -187,68 +216,183 @@ public class LoadingController {
@ApiOperation
(
"loading->入库按钮 输入参数后获取数据"
)
@ApiOperation
(
"loading->ReturnMaterial 输入RFID后获取数据"
)
@PostMapping
(
"/submit"
)
@PostMapping
(
"/returnMaterial"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
returnMaterial
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
public
ResultBean
submit
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
// List<String> rfids = (List<String>) params;
String
numStr
=
params
.
get
(
"num"
).
toString
();
String
mode
=
getParam
(
params
,
"mode"
,
APIMODE
.
MATRET
);
if
(
ObjectUtil
.
isEmpty
((
numStr
)))
{
int
shelfNum
=
Integer
.
MAX_VALUE
;
String
mbrId
=
""
;
String
reqId
=
""
;
String
deliveryNote
=
""
;
String
purchaseOrder
=
""
;
// int reelNumber = 0;
if
(
mode
.
equals
(
APIMODE
.
MATRET
))
{
shelfNum
=
getIntParam
(
params
,
"num"
,
-
1
);
if
(
shelfNum
==
-
1
)
{
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"Num"
});
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"Num"
});
}
}
}
else
if
(
mode
.
equals
(
APIMODE
.
MBR
))
{
mbrId
=
getParam
(
params
,
"mbrId"
,
""
);
if
(
ObjectUtil
.
isEmpty
((
mbrId
)))
{
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"MBR ID "
});
}
}
else
if
(
mode
.
equals
(
APIMODE
.
REQ
))
{
reqId
=
getParam
(
params
,
"reqId"
,
""
);
if
(
ObjectUtil
.
isEmpty
((
reqId
)))
{
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"REQ ID "
});
}
}
else
if
(
mode
.
equals
(
APIMODE
.
GR
))
{
// Delivery Note ( Packaging Slip)(包装单)
// STO # ( Purchase Order)(采购单号)
// 调用/sumbit后传入参数:mode 和 deliveryNote,purchaseOrder
deliveryNote
=
getParam
(
params
,
"deliveryNote"
,
""
);
if
(
ObjectUtil
.
isEmpty
(
deliveryNote
))
{
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"Delivery Note"
});
}
purchaseOrder
=
getParam
(
params
,
"purchaseOrder"
,
""
);
if
(
ObjectUtil
.
isEmpty
(
purchaseOrder
))
{
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"purchaseOrder"
});
}
}
else
if
(
mode
.
equals
(
APIMODE
.
MCL
))
{
int
num
=
Integer
.
valueOf
(
numStr
);
}
log
.
info
(
"submit: mode="
+
mode
+
",shelfNum= "
+
shelfNum
+
",mbrId="
+
mbrId
+
",reqId="
+
reqId
+
",deliveryNote="
+
deliveryNote
+
", purchaseOrder="
+
purchaseOrder
);
log
.
info
(
"returnMaterial: num= "
+
num
);
// String[] rfidArray=rfids.split(",");
InList
inList
=
loadingUtil
.
getInlist
();
InList
inList
=
loadingUtil
.
getInlist
();
if
(
inList
==
null
)
{
if
(
inList
==
null
)
{
//判断是否已有operationID
// 接口获取
LoadingInfo
loadingInfo
=
dataCache
.
getCache
(
Constants
.
CACHE_LOADING
);
String
id
=
MicronApi
.
Api011
(
APIMODE
.
MATRET
,
SecurityUtils
.
getCurrentUsername
(),
""
);
if
(
loadingInfo
==
null
||
ObjectUtil
.
isEmpty
(
loadingInfo
.
getOperationId
()))
{
if
(
ObjectUtil
.
isEmpty
(
id
))
{
// 接口获取
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.api.fail"
,
"Api011获取数据失败"
,
new
String
[]{
"Api011"
});
String
operId
=
MicronApi
.
Api011
(
mode
,
SecurityUtils
.
getCurrentUsername
(),
""
);
if
(
ObjectUtil
.
isEmpty
(
operId
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.api.fail"
,
"Api011获取数据失败"
,
new
String
[]{
"Api011"
});
}
MicronApi
.
ActionUpdate
(
operId
,
MicronApi
.
START
);
loadingInfo
=
new
LoadingInfo
(
mode
,
operId
,
""
,
DateTime
.
now
());
loadingInfo
.
inlistName
=
mode
+
"-"
+
operId
+
"-"
+
DateUtil
.
toDateString
(
loadingInfo
.
startTime
);
dataCache
.
updateCache
(
Constants
.
CACHE_LOADING
,
loadingInfo
);
log
.
info
(
"submit: mode="
+
mode
+
",获取到 OperationId="
+
operId
);
}
else
{
log
.
info
(
"submit: mode="
+
mode
+
",已有 OperationId="
+
loadingInfo
.
getOperationId
());
}
}
MicronApi
.
ActionUpdate
(
id
,
MicronApi
.
START
);
LoadingInfo
loadingInfo
=
new
LoadingInfo
(
APIMODE
.
MATRET
,
id
,
""
,
DateTime
.
now
());
loadingInfo
.
inlistName
=
id
+
"-"
+
DateUtil
.
toDateString
(
loadingInfo
.
startTime
);
dataCache
.
updateCache
(
Constants
.
CACHE_LOADING
,
loadingInfo
);
// int count = rfids.size();
// List<String> list = new ArrayList<>(Arrays.asList(rfidArray));
inList
=
new
InList
(
loadingInfo
.
inlistName
,
INLIST_STATUS
.
WAIT
,
new
ArrayList
<>(),
System
.
currentTimeMillis
(),
false
);
inList
.
setMode
(
loadingInfo
.
mode
);
String
operId
=
loadingInfo
.
getOperationId
();
inList
.
setShelfNum
(
num
);
inList
.
setOperationId
(
loadingInfo
.
getOperationId
());
if
(
APIMODE
.
MBR
.
equals
(
mode
)){
boolean
result
=
MicronApi
.
Api101
(
mbrId
,
operId
,
""
);
if
(!
result
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.api.fail"
,
"Api101获取数据失败"
,
new
String
[]{
"Api101"
});
}
}
else
if
(
APIMODE
.
REQ
.
equals
(
mode
)){
boolean
result
=
MicronApi
.
Api102
(
reqId
,
operId
);
if
(!
result
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.api.fail"
,
"Api101获取数据失败"
,
new
String
[]{
"Api101"
});
}
}
else
if
(
APIMODE
.
GR
.
equals
(
mode
))
{
boolean
result
=
MicronApi
.
Api103
(
deliveryNote
,
purchaseOrder
,
operId
,
""
);
if
(!
result
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.api.fail"
,
"Api103获取数据失败"
,
new
String
[]{
"Api103"
});
}
}
inList
=
new
InList
(
loadingInfo
.
inlistName
,
INLIST_STATUS
.
WAIT
,
new
ArrayList
<>(),
System
.
currentTimeMillis
(),
false
);
inList
.
SetParam
(
loadingInfo
.
mode
,
shelfNum
,
reqId
,
mbrId
,
deliveryNote
,
purchaseOrder
,
loadingInfo
.
getOperationId
());
inList
=
inListManager
.
createWithItems
(
inList
);
inList
=
inListManager
.
createWithItems
(
inList
);
inListCache
.
addInListToMap
(
inList
);
inListCache
.
addInListToMap
(
inList
);
log
.
info
(
"submit:Create Inlist OK. "
+
inList
.
getName
()
+
", mode="
+
mode
+
",shelfNum= "
+
shelfNum
+
",mbrId="
+
mbrId
+
",reqId="
+
reqId
+
",deliveryNote="
+
deliveryNote
+
", purchaseOrder="
+
purchaseOrder
);
return
ResultBean
.
newOkResult
(
getList
(
inList
));
return
ResultBean
.
newOkResult
(
getList
(
inList
));
}
else
{
}
else
{
return
ResultBean
.
newOkResult
(
getList
(
inList
));
return
ResultBean
.
newOkResult
(
getList
(
inList
));
}
}
}
}
@ApiOperation
(
"loading->ReturnMaterial 输入RFID后获取数据"
)
@PostMapping
(
"/returnMaterial"
)
@AnonymousAccess
public
ResultBean
returnMaterial
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
return
submit
(
params
);
// List<String> rfids = (List<String>) params;
// String numStr = params.get("num").toString();
//
// if (ObjectUtil.isEmpty((numStr))) {
// throw new ValidateException("smfcore.valueCanotNull", "{0}不能为空", new String[]{"Num"});
// }
//
// int num = Integer.valueOf(numStr);
//
// log.info("returnMaterial: num= " + num);
//// String[] rfidArray=rfids.split(",");
// InList inList = loadingUtil.getInlist();
// String mode=APIMODE.MATRET;
// if (inList == null) {
//
// LoadingInfo loadingInfo=dataCache.getCache(Constants.CACHE_LOADING);
// if(loadingInfo==null||ObjectUtil.isEmpty(loadingInfo.getOperationId())) {
// // 接口获取
// String operId = MicronApi.Api011(mode, SecurityUtils.getCurrentUsername(), "");
// if (ObjectUtil.isEmpty(operId)) {
// return ResultBean.newErrorResult(-1, "smfcore.api.fail", "Api011获取数据失败", new String[]{"Api011"});
// }
//
// MicronApi.ActionUpdate(operId, MicronApi.START);
// loadingInfo = new LoadingInfo(mode, operId, "", DateTime.now());
// loadingInfo.inlistName = mode + "-" + operId + "-" + DateUtil.toDateString(loadingInfo.startTime);
// dataCache.updateCache(Constants.CACHE_LOADING, loadingInfo);
// log.info("submit: mode=" + mode + ",获取到 OperationId=" + operId);
// }
// else{
// log.info("submit: mode=" + mode + ",已有 OperationId="+loadingInfo.getOperationId());
// }
////
//
//// int count = rfids.size();
//// List<String> list = new ArrayList<>(Arrays.asList(rfidArray));
// inList = new InList(loadingInfo.inlistName, INLIST_STATUS.WAIT, new ArrayList<>(), System.currentTimeMillis(), false);
//
// inList.setMode(loadingInfo.mode);
// inList.setShelfNum(num);
// inList.setOperationId(loadingInfo.getOperationId());
//
// inList = inListManager.createWithItems(inList);
// inListCache.addInListToMap(inList);
// return ResultBean.newOkResult(getList(inList));
// } else {
// return ResultBean.newOkResult(getList(inList));
//
// }
}
@ApiOperation
(
"Retry"
)
@ApiOperation
(
"Retry"
)
@PostMapping
(
"/Retry"
)
@PostMapping
(
"/Retry"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
retry
()
{
public
ResultBean
retry
(
@RequestBody
(
required
=
false
)
Map
<
String
,
Object
>
params
)
{
String
mode
=
getParam
(
params
,
"mode"
,
APIMODE
.
MATRET
);
// String mode=APIMODE.MATRET;
InList
inList
=
loadingUtil
.
getInlist
();
InList
inList
=
loadingUtil
.
getInlist
();
if
(
inList
==
null
)
{
if
(
inList
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
}
else
{
}
else
{
if
(!
inList
.
getMode
().
equals
(
mode
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.modeError"
,
"参数错误,"
+
mode
+
" Loading 还未完成"
);
}
//重试,重发指令
//重试,重发指令
log
.
info
(
"重试:"
+
inList
.
getMode
()+
","
+
inList
.
getOperationId
()+
" "
+
inList
.
getName
());
log
.
info
(
"重试:"
+
inList
.
getMode
()
+
","
+
inList
.
getOperationId
()
+
" "
+
inList
.
getName
());
loadingUtil
.
Retry
();
loadingUtil
.
Retry
();
...
@@ -259,12 +403,16 @@ public class LoadingController {
...
@@ -259,12 +403,16 @@ public class LoadingController {
@ApiOperation
(
"Abort"
)
@ApiOperation
(
"Abort"
)
@PostMapping
(
"/Abort"
)
@PostMapping
(
"/Abort"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
abort
()
{
public
ResultBean
abort
(
@RequestBody
(
required
=
false
)
Map
<
String
,
Object
>
params
)
{
String
mode
=
getParam
(
params
,
"mode"
,
APIMODE
.
MATRET
);
// String mode=APIMODE.MATRET;
InList
inList
=
loadingUtil
.
getInlist
();
InList
inList
=
loadingUtil
.
getInlist
();
if
(
inList
==
null
){
if
(
inList
==
null
){
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
}
else
{
}
else
{
if
(!
inList
.
getMode
().
equals
(
mode
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.modeError"
,
"参数错误,"
+
mode
+
" Loading 还未完成"
);
}
//结束入库
//结束入库
for
(
InListItem
item
:
inList
.
getInListItems
())
{
for
(
InListItem
item
:
inList
.
getInListItems
())
{
if
(
item
.
getState
()
==
INITEM_STATUS
.
PutIn
)
{
if
(
item
.
getState
()
==
INITEM_STATUS
.
PutIn
)
{
...
@@ -301,18 +449,29 @@ public class LoadingController {
...
@@ -301,18 +449,29 @@ public class LoadingController {
@ApiOperation
(
"Finish"
)
@ApiOperation
(
"Finish"
)
@RequestMapping
(
"/finish"
)
@RequestMapping
(
"/finish"
)
@AnonymousAccess
@AnonymousAccess
public
ResultBean
finish
()
{
public
ResultBean
finish
(
@RequestBody
(
required
=
false
)
Map
<
String
,
Object
>
params
)
{
String
mode
=
getParam
(
params
,
"mode"
,
APIMODE
.
MATRET
);
// String mode=APIMODE.MATRET;
InList
inList
=
loadingUtil
.
getInlist
();
InList
inList
=
loadingUtil
.
getInlist
();
if
(
inList
==
null
)
{
if
(
inList
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
}
else
{
}
else
{
if
(!
inList
.
getMode
().
equals
(
mode
))
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.modeError"
,
"参数错误,"
+
mode
+
" Loading 还未完成"
);
}
if
(
inList
.
getStatus
()
==
INLIST_STATUS
.
OK
){
if
(
inList
.
getStatus
()
==
INLIST_STATUS
.
OK
){
log
.
info
(
" 入库单["
+
inList
.
getName
()
+
"]:任务已全部完成,清空当前loadinginfo,更改action=COMPLETE"
);
log
.
info
(
" 入库单["
+
inList
.
getName
()
+
"]:任务已全部完成,清空当前loadinginfo,更改action=COMPLETE"
);
MicronApi
.
ActionUpdate
(
inList
.
getOperationId
(),
MicronApi
.
COMPLETED
);
MicronApi
.
ActionUpdate
(
inList
.
getOperationId
(),
MicronApi
.
COMPLETED
);
dataCache
.
updateCache
(
Constants
.
CACHE_LOADING
,
new
LoadingInfo
());
dataCache
.
updateCache
(
Constants
.
CACHE_LOADING
,
new
LoadingInfo
());
return
ResultBean
.
newOkResult
(
""
);
return
ResultBean
.
newOkResult
(
""
);
}
}
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.inlist.noEnd"
,
"入库单[{0}]未完成"
,
new
String
[]{});
if
(
inList
.
getMode
().
equals
(
APIMODE
.
MATRET
)){
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.inlist.noEnd"
,
"入库单[{0}]未完成"
,
new
String
[]{
inList
.
getName
()});
}
else
{
//除matret,其他的都是手动结束
return
ResultBean
.
newOkResult
(
""
);
}
}
}
}
}
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/loading/util/LoadingUtil.java
查看文件 @
00042f6
...
@@ -59,32 +59,32 @@ public class LoadingUtil {
...
@@ -59,32 +59,32 @@ public class LoadingUtil {
}
}
return
null
;
return
null
;
}
}
//获取库位号成功,增加一个正在入库的
//
//获取库位号成功,增加一个正在入库的
public
void
AddErrorItem
(
String
rfid
,
Barcode
barcode
,
Integer
error
,
String
message
)
{
//
public void AddErrorItem(String rfid, Barcode barcode, Integer error,String message) {
InList
inList
=
getInlist
();
//
InList inList = getInlist();
//
if
(
inList
==
null
)
{
//
if (inList == null) {
return
;
//
return;
}
//
}
inList
.
addRfid
(
rfid
);
//
inList.addRfid(rfid);
inList
.
setStatus
(
INLIST_STATUS
.
ABNORMAL
);
//
inList.setStatus(INLIST_STATUS.ABNORMAL);
//
String
mtype
=
MicronDataCache
.
GetReelType
(
barcode
.
getPlateSize
(),
barcode
.
getHeight
());
//
String mtype = MicronDataCache.GetReelType(barcode.getPlateSize(), barcode.getHeight());
//
log
.
info
(
"为入库单["
+
inList
.
getName
()
+
"]增加一条验证失败信息:barcode["
+
barcode
.
getBarcode
()
+
"],mtype["
+
mtype
+
"],pn["
+
barcode
.
getPartNumber
()
+
"],rfid["
+
rfid
+
"],s["
+
INITEM_STATUS
.
API001NG
+
"],ngMsg["
+
error
+
":"
+
message
+
"]"
);
//
log.info("为入库单[" + inList.getName() + "]增加一条验证失败信息:barcode[" + barcode.getBarcode() + "],mtype[" + mtype + "],pn[" + barcode.getPartNumber() + "],rfid[" + rfid + "],s[" + INITEM_STATUS.API001NG + "],ngMsg["+error+":"+message+"]");
//
InListItem
item
=
InListItem
.
newMItem
(
inList
.
getName
(),
barcode
,
rfid
,
""
,
INITEM_STATUS
.
API001NG
,
mtype
);
//
InListItem item = InListItem.newMItem(inList.getName(), barcode, rfid, "", INITEM_STATUS.API001NG, mtype);
if
(
inList
.
getEndRfidList
()
!=
null
&&
inList
.
getEndRfidList
().
contains
(
rfid
))
{
//
if (inList.getEndRfidList() != null && inList.getEndRfidList().contains(rfid)) {
item
.
setRfidEnd
(
true
);
//
item.setRfidEnd(true);
}
//
}
item
.
setNgMsg
(
error
+
":"
+
message
);
//
item.setNgMsg(error+":"+message);
item
=
inListItemManager
.
save
(
item
);
//
item = inListItemManager.save(item);
List
<
InListItem
>
items
=
inList
.
getInListItems
();
//
List<InListItem> items = inList.getInListItems();
items
.
add
(
item
);
//
items.add(item);
inList
.
setInListItems
(
items
);
//
inList.setInListItems(items);
inListManager
.
save
(
inList
);
//
inListManager.save(inList);
inListCache
.
addInListToMap
(
inList
);
//
inListCache.addInListToMap(inList);
}
//
}
//获取库位号成功,增加一个正在入库的
//获取库位号成功,增加一个正在入库的
public
void
AddInListItem
(
String
rfid
,
Barcode
barcode
,
String
posName
,
String
state
,
Boolean
toXray
)
{
public
void
AddInListItem
(
String
rfid
,
Barcode
barcode
,
String
posName
,
String
state
,
Boolean
toXray
)
{
...
...
src/main/resources/config/application-prod.yml
查看文件 @
00042f6
...
@@ -10,6 +10,7 @@ micron:
...
@@ -10,6 +10,7 @@ micron:
api_name_009
:
material/status
api_name_009
:
material/status
api_name_010
:
material/track-out
api_name_010
:
material/track-out
api_name_011
:
operation?mode={0}&username={1}&source={2}
api_name_011
:
operation?mode={0}&username={1}&source={2}
api_name_012
:
operation/{0}
api_name_101
:
operation/validation/mbr?id={0}&operationId={1}&skipSap={2}
api_name_101
:
operation/validation/mbr?id={0}&operationId={1}&skipSap={2}
api_name_102
:
operation/validation/req?id={0}&operationId={1}
api_name_102
:
operation/validation/req?id={0}&operationId={1}
api_name_103
:
operation/validation/gr?purchaseOrder={0}&packagingSlip={1}&operationId={2}&skipSap={3}
api_name_103
:
operation/validation/gr?purchaseOrder={0}&packagingSlip={1}&operationId={2}&skipSap={3}
...
@@ -35,6 +36,7 @@ spring:
...
@@ -35,6 +36,7 @@ spring:
#备份数据库配置
#备份数据库配置
backup-mongodb
:
backup-mongodb
:
# host: 10.74.40.156
host
:
172.16.10.19
host
:
172.16.10.19
port
:
27017
port
:
27017
database
:
backup_smf
database
:
backup_smf
...
...
src/main/resources/messages.properties
查看文件 @
00042f6
...
@@ -362,6 +362,7 @@ smfcore.error.barcode.hastask=\u6761\u7801[0]\u5DF2\u6709\u5165\u5E93\u4EFB\u52A
...
@@ -362,6 +362,7 @@ smfcore.error.barcode.hastask=\u6761\u7801[0]\u5DF2\u6709\u5165\u5E93\u4EFB\u52A
smfcore.error.barcode.hasOutTask
=
\u
5E8F
\u5217\u
53F7[0]
\u
5DF2
\u6709\u
51FA
\u
5E93
\u
4EFB
\u
52A1
\u
FF0C
\u
51FA
\u
5E93
\u
524D
\u
4E0D
\u
5F97
\u5165\u
5E93
\u
76F8
\u
540C
\u
5E8F
\u5217\u
53F7
\u7269\u6599
smfcore.error.barcode.hasOutTask
=
\u
5E8F
\u5217\u
53F7[0]
\u
5DF2
\u6709\u
51FA
\u
5E93
\u
4EFB
\u
52A1
\u
FF0C
\u
51FA
\u
5E93
\u
524D
\u
4E0D
\u
5F97
\u5165\u
5E93
\u
76F8
\u
540C
\u
5E8F
\u5217\u
53F7
\u7269\u6599
smfcore.error.noRetryReel=No material found to retry
smfcore.error.noRetryReel=No material found to retry
smfcore.micron.inlistCannotAbort
=
\u
64CD
\u
4F5C
\u5931\u
8D25
\u
FF1A
\u
8FD8
\u6709\u5165\u
5E93
\u
4EFB
\u
52A1
\u
672A
\u
5B8C
\u6210
smfcore.micron.inlistCannotAbort
=
\u
64CD
\u
4F5C
\u5931\u
8D25
\u
FF1A
\u
8FD8
\u6709\u5165\u
5E93
\u
4EFB
\u
52A1
\u
672A
\u
5B8C
\u6210
smfcore.micron.modeError
=
\u
53C2
\u6570\u9519\u
8BEF {0}
\u5165\u
5E93
\u
8FD8
\u
672A
\u
5B8C
\u6210
#smfclient.nlp.onlyOneTray=\u4E0D\u53EF\u540C\u65F6\u653E\u5165\u591A\u76D8\u7269\u6599:{0}
#smfclient.nlp.onlyOneTray=\u4E0D\u53EF\u540C\u65F6\u653E\u5165\u591A\u76D8\u7269\u6599:{0}
#smfclient.nlp.cannotFindPos={0}\u672A\u627E\u5230\u5E93\u4F4D:{1}
#smfclient.nlp.cannotFindPos={0}\u672A\u627E\u5230\u5E93\u4F4D:{1}
#smfclient.nlp.inputOk={0}\u5165\u5E93\u5230{1}\u6210\u529F
#smfclient.nlp.inputOk={0}\u5165\u5E93\u5230{1}\u6210\u529F
...
...
src/main/resources/messages_en_US.properties
查看文件 @
00042f6
...
@@ -361,3 +361,4 @@ smfcore.error.barcode.hastask=Serial No.(S)[0] already have storage task
...
@@ -361,3 +361,4 @@ smfcore.error.barcode.hastask=Serial No.(S)[0] already have storage task
smfcore.error.barcode.hasOutTask
=
Serial No.(S)[0] already have retrieval task, cannot store same Serial No. material before retrieval finish
smfcore.error.barcode.hasOutTask
=
Serial No.(S)[0] already have retrieval task, cannot store same Serial No. material before retrieval finish
smfcore.error.noRetryReel
=
No material found to retry
smfcore.error.noRetryReel
=
No material found to retry
smfcore.micron.inlistCannotAbort
=
Operation failed: there are still inbound tasks to be completed
smfcore.micron.inlistCannotAbort
=
Operation failed: there are still inbound tasks to be completed
smfcore.micron.modeError
=
Parameter error. {0} Incoming not finished.
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_ja_JP.properties
查看文件 @
00042f6
...
@@ -356,3 +356,4 @@ smfcore.error.barcode.hastask=Serial No.(S)[0] already have storage task
...
@@ -356,3 +356,4 @@ smfcore.error.barcode.hastask=Serial No.(S)[0] already have storage task
smfcore.error.barcode.hasOutTask
=
Serial No.(S)[0] already have retrieval task, cannot store same Serial No. material before retrieval finish
smfcore.error.barcode.hasOutTask
=
Serial No.(S)[0] already have retrieval task, cannot store same Serial No. material before retrieval finish
smfcore.error.noRetryReel
=
No material found to retry
smfcore.error.noRetryReel
=
No material found to retry
smfcore.micron.inlistCannotAbort
=
\u
64CD
\u
4F5C
\u
306B
\u5931\u6557\u3057\u
307E
\u3057\u
305F
\u
FF1A
\u
5B8C
\u
4E86
\u3059\u3079\u
304D
\u
53D7
\u
4FE1
\u
30BF
\u
30B9
\u
30AF
\u
304C
\u
6B8B
\u3063\u3066\u3044\u
307E
\u3059
smfcore.micron.inlistCannotAbort
=
\u
64CD
\u
4F5C
\u
306B
\u5931\u6557\u3057\u
307E
\u3057\u
305F
\u
FF1A
\u
5B8C
\u
4E86
\u3059\u3079\u
304D
\u
53D7
\u
4FE1
\u
30BF
\u
30B9
\u
30AF
\u
304C
\u
6B8B
\u3063\u3066\u3044\u
307E
\u3059
smfcore.micron.modeError
=
\u
53C2
\u6570\u9519\u
8BEF {0} Loading
\u
8FD8
\u
672A
\u
5B8C
\u6210
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_CN.properties
查看文件 @
00042f6
...
@@ -356,3 +356,4 @@ smfcore.error.barcode.hastask=Serial No.(S)[0] already have storage task
...
@@ -356,3 +356,4 @@ smfcore.error.barcode.hastask=Serial No.(S)[0] already have storage task
smfcore.error.barcode.hasOutTask
=
\u
5E8F
\u5217\u
53F7[0]
\u
5DF2
\u6709\u
51FA
\u
5E93
\u
4EFB
\u
52A1
\u
FF0C
\u
51FA
\u
5E93
\u
524D
\u
4E0D
\u
5F97
\u5165\u
5E93
\u
76F8
\u
540C
\u
5E8F
\u5217\u
53F7
\u7269\u6599
smfcore.error.barcode.hasOutTask
=
\u
5E8F
\u5217\u
53F7[0]
\u
5DF2
\u6709\u
51FA
\u
5E93
\u
4EFB
\u
52A1
\u
FF0C
\u
51FA
\u
5E93
\u
524D
\u
4E0D
\u
5F97
\u5165\u
5E93
\u
76F8
\u
540C
\u
5E8F
\u5217\u
53F7
\u7269\u6599
smfcore.error.noRetryReel
=
\u
6CA1
\u6709\u
53EF
\u
4EE5
\u
91CD
\u
8BD5
\u7684\u7269\u6599
smfcore.error.noRetryReel
=
\u
6CA1
\u6709\u
53EF
\u
4EE5
\u
91CD
\u
8BD5
\u7684\u7269\u6599
smfcore.micron.inlistCannotAbort
=
\u
64CD
\u
4F5C
\u5931\u
8D25
\u
FF1A
\u
8FD8
\u6709\u5165\u
5E93
\u
4EFB
\u
52A1
\u
672A
\u
5B8C
\u6210
smfcore.micron.inlistCannotAbort
=
\u
64CD
\u
4F5C
\u5931\u
8D25
\u
FF1A
\u
8FD8
\u6709\u5165\u
5E93
\u
4EFB
\u
52A1
\u
672A
\u
5B8C
\u6210
smfcore.micron.modeError
=
\u
53C2
\u6570\u9519\u
8BEF {0}
\u5165\u
5E93
\u
8FD8
\u
672A
\u
5B8C
\u6210
\ No newline at end of file
\ No newline at end of file
src/main/resources/messages_zh_TW.properties
查看文件 @
00042f6
...
@@ -357,3 +357,4 @@ smfcore.selfAudit.hasOutTask=\u5E93\u4F4D[{0}]\u5DF2\u6709\u51FA\u5E93\u4EFB\u52
...
@@ -357,3 +357,4 @@ smfcore.selfAudit.hasOutTask=\u5E93\u4F4D[{0}]\u5DF2\u6709\u51FA\u5E93\u4EFB\u52
smfcore.error.barcode.hasOutTask
=
\u
5E8F
\u5217\u
865F[0]
\u
5DF2
\u6709\u
51FA
\u
5EAB
\u
4EFB
\u
52D9
\u
FF0C
\u
51FA
\u
5EAB
\u
524D
\u
4E0D
\u
5F97
\u5165\u
5EAB
\u
76F8
\u
540C
\u
5E8F
\u5217\u
865F
\u7269\u6599
smfcore.error.barcode.hasOutTask
=
\u
5E8F
\u5217\u
865F[0]
\u
5DF2
\u6709\u
51FA
\u
5EAB
\u
4EFB
\u
52D9
\u
FF0C
\u
51FA
\u
5EAB
\u
524D
\u
4E0D
\u
5F97
\u5165\u
5EAB
\u
76F8
\u
540C
\u
5E8F
\u5217\u
865F
\u7269\u6599
smfcore.error.noRetryReel
=
\u
6C92
\u6709\u
53EF
\u
4EE5
\u
91CD
\u
8A66
\u7684\u7269\u6599
smfcore.error.noRetryReel
=
\u
6C92
\u6709\u
53EF
\u
4EE5
\u
91CD
\u
8A66
\u7684\u7269\u6599
smfcore.micron.inlistCannotAbort
=
\u
64CD
\u
4F5C
\u5931\u
8D25
\u
FF1A
\u
8FD8
\u6709\u5165\u
5E93
\u
4EFB
\u
52A1
\u
672A
\u
5B8C
\u6210
smfcore.micron.inlistCannotAbort
=
\u
64CD
\u
4F5C
\u5931\u
8D25
\u
FF1A
\u
8FD8
\u6709\u5165\u
5E93
\u
4EFB
\u
52A1
\u
672A
\u
5B8C
\u6210
smfcore.micron.modeError
=
\u
53C2
\u6570\u9519\u
8BEF {0}
\u5165\u
5E93
\u
8FD8
\u
672A
\u
5B8C
\u6210
\ No newline at end of file
\ No newline at end of file
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论