Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 465cb7f2
由
LN
编写于
2023-08-14 17:18:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出库功能
1 个父辈
1139993a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
20 个修改的文件
包含
287 行增加
和
35 行删除
src/main/java/com/neotel/smfcore/common/utils/Constants.java
src/main/java/com/neotel/smfcore/common/utils/HttpHelper.java
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
src/main/java/com/neotel/smfcore/core/order/service/po/LiteOrder.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/bean/DispatchId.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/bean/IdInfo.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/bean/Material.java
src/main/java/com/neotel/smfcore/custom/micron1053/api/bean/TrackStatus.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/java/com/neotel/smfcore/custom/micron1053/task/MicronPreTaskController.java
src/main/java/com/neotel/smfcore/custom/micron1053/task/bean/PreTask.java
src/main/java/com/neotel/smfcore/custom/micron1053/task/bean/dto/MaterialDispatchStatus.java
src/main/java/com/neotel/smfcore/custom/micron1053/task/bean/dto/TaskDto.java
src/main/java/com/neotel/smfcore/custom/micron1053/task/enums/OrderItemStatus.java
src/main/resources/log4j2-spring.xml
src/main/resources/messages.properties
修改记录.txt
src/main/java/com/neotel/smfcore/common/utils/Constants.java
查看文件 @
465cb7f
...
@@ -175,4 +175,10 @@ public class Constants {
...
@@ -175,4 +175,10 @@ public class Constants {
*/
*/
public
static
final
String
CACHE_LOADING
=
"CACHE_LOADING_INFO"
;
public
static
final
String
CACHE_LOADING
=
"CACHE_LOADING_INFO"
;
/**
* 当前出库信息:
*/
public
static
final
String
CACHE_DISPATCH
=
"CACHE_DISPATCH_INFO_"
;
}
}
src/main/java/com/neotel/smfcore/common/utils/HttpHelper.java
查看文件 @
465cb7f
...
@@ -170,6 +170,8 @@ public class HttpHelper {
...
@@ -170,6 +170,8 @@ public class HttpHelper {
CloseableHttpResponse
response
=
httpClient
.
execute
(
httpPost
);
CloseableHttpResponse
response
=
httpClient
.
execute
(
httpPost
);
HttpEntity
entity
=
response
.
getEntity
();
HttpEntity
entity
=
response
.
getEntity
();
String
responseContent
=
EntityUtils
.
toString
(
entity
,
CONTENT_CHARSET
);
String
responseContent
=
EntityUtils
.
toString
(
entity
,
CONTENT_CHARSET
);
int
code
=
response
.
getStatusLine
().
getStatusCode
();
log
.
info
(
"Request to ["
+
url
+
"] response: code="
+
code
+
",responseContent="
+
responseContent
);
response
.
close
();
response
.
close
();
httpClient
.
close
();
httpClient
.
close
();
return
responseContent
;
return
responseContent
;
...
@@ -290,6 +292,7 @@ public class HttpHelper {
...
@@ -290,6 +292,7 @@ public class HttpHelper {
//System.out.println(response.getStatusLine().getStatusCode() + "\n");
//System.out.println(response.getStatusLine().getStatusCode() + "\n");
HttpEntity
entity
=
response
.
getEntity
();
HttpEntity
entity
=
response
.
getEntity
();
String
responseContent
=
EntityUtils
.
toString
(
entity
,
CONTENT_CHARSET
);
String
responseContent
=
EntityUtils
.
toString
(
entity
,
CONTENT_CHARSET
);
log
.
info
(
"Request to ["
+
url
+
"] response: code="
+
code
+
",responseContent="
+
responseContent
);
MicronResult
result
=
JsonUtil
.
toObj
(
responseContent
,
MicronResult
.
class
);
MicronResult
result
=
JsonUtil
.
toObj
(
responseContent
,
MicronResult
.
class
);
if
(
result
==
null
)
{
if
(
result
==
null
)
{
result
=
new
MicronResult
();
result
=
new
MicronResult
();
...
...
src/main/java/com/neotel/smfcore/core/device/handler/impl/RobotBoxHandler.java
查看文件 @
465cb7f
...
@@ -425,6 +425,17 @@ public class RobotBoxHandler extends BaseDeviceHandler {
...
@@ -425,6 +425,17 @@ public class RobotBoxHandler extends BaseDeviceHandler {
}
}
log
.
info
(
"preCid="
+
preCid
+
",["
+
barcode
.
getBarcode
()+
"]清除锁定库位"
);
log
.
info
(
"preCid="
+
preCid
+
",["
+
barcode
.
getBarcode
()+
"]清除锁定库位"
);
ReelLockPosUtil
.
removeReelLockPosInfo
(
barcode
.
getBarcode
());
ReelLockPosUtil
.
removeReelLockPosInfo
(
barcode
.
getBarcode
());
if
(
ObjectUtil
.
isEmpty
(
rfid
)){
//从缓存获取是否有rfid
String
nrfid
=
loadingUtil
.
getRfidByBarcode
(
barcode
.
getBarcode
()
);
if
(
ObjectUtil
.
isNotEmpty
(
nrfid
)){
log
.
info
(
"rfid为空,第二次获取库位号,从入库单中查找到rfid:"
+
nrfid
);
rfid
=
nrfid
;
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"取消上个入库任务出错:"
+
e
.
toString
());
log
.
error
(
"取消上个入库任务出错:"
+
e
.
toString
());
...
...
src/main/java/com/neotel/smfcore/core/order/LiteOrderCache.java
查看文件 @
465cb7f
...
@@ -277,7 +277,11 @@ public class LiteOrderCache {
...
@@ -277,7 +277,11 @@ public class LiteOrderCache {
order
.
setOrderItems
(
items
);
order
.
setOrderItems
(
items
);
liteOrderManager
.
save
(
order
);
liteOrderManager
.
save
(
order
);
liteOrderMap
.
put
(
orderNo
,
order
);
liteOrderMap
.
put
(
orderNo
,
order
);
checkoutAgain
(
task
,
order
);
//如果是preTask,不需要重新出库
if
(
ObjectUtil
.
isNotEmpty
(
order
.
getMode
()))
{
checkoutAgain
(
task
,
order
);
}
}
}
else
if
(
task
.
isFinished
())
{
else
if
(
task
.
isFinished
())
{
order
.
setFinishedReelCount
(
order
.
getFinishedReelCount
()
+
1
);
order
.
setFinishedReelCount
(
order
.
getFinishedReelCount
()
+
1
);
...
@@ -323,14 +327,19 @@ public class LiteOrderCache {
...
@@ -323,14 +327,19 @@ public class LiteOrderCache {
order
.
setOrderItems
(
items
);
order
.
setOrderItems
(
items
);
//判断位置信息是否以"-"开头,如果是,则获取相同位置的orderItemId,进行通知
//判断位置信息是否以"-"开头,如果是,则获取相同位置的orderItemId,进行通知
if
(
StringUtils
.
isNotBlank
(
task
.
getLocInfo
())
&&
task
.
getLocInfo
().
startsWith
(
"-"
))
{
// if (StringUtils.isNotBlank(task.getLocInfo()) && task.getLocInfo().startsWith("-")) {
if
(
ObjectUtil
.
isNotEmpty
(
order
.
getMode
())&&
StringUtils
.
isNotBlank
(
task
.
getLocInfo
())
)
{
String
locInfo
=
task
.
getLocInfo
();
String
locInfo
=
task
.
getLocInfo
();
List
<
String
>
itemIdList
=
new
ArrayList
<>();
List
<
String
>
itemIdList
=
new
ArrayList
<>();
for
(
LiteOrderItem
item
:
items
)
{
itemIdList
.
add
(
task
.
getSubSourceId
());
if
(
locInfo
.
contains
(
item
.
getLocInfo
()))
{
// for (LiteOrderItem item : items) {
itemIdList
.
add
(
item
.
getId
());
// if (locInfo.contains(item.getLocInfo())) {
}
// itemIdList.add(item.getId());
}
// }
// }
//先改为单盘上传
List
<
DataLog
>
dataLogList
=
dataLogManager
.
findByQuery
(
new
Query
(
Criteria
.
where
(
"subSourceId"
).
in
(
itemIdList
)));
List
<
DataLog
>
dataLogList
=
dataLogManager
.
findByQuery
(
new
Query
(
Criteria
.
where
(
"subSourceId"
).
in
(
itemIdList
)));
if
(
dataLogList
!=
null
&&
!
dataLogList
.
isEmpty
())
{
if
(
dataLogList
!=
null
&&
!
dataLogList
.
isEmpty
())
{
boolean
isSuccess
=
MicronApi
.
Api007
(
order
.
getOrderNo
(),
order
.
getId
(),
dataLogList
);
boolean
isSuccess
=
MicronApi
.
Api007
(
order
.
getOrderNo
(),
order
.
getId
(),
dataLogList
);
...
@@ -366,9 +375,21 @@ public class LiteOrderCache {
...
@@ -366,9 +375,21 @@ public class LiteOrderCache {
}
}
}
}
}
}
//判断是否发送成功
if
(
ObjectUtil
.
isNotEmpty
(
order
.
getMode
())){
if
(
liteOrderItem
.
getStatus
()==
OrderItemStatus
.
notify_fail
){
closed
=
false
;
break
;
}
}
}
}
if
(
closed
){
if
(
closed
){
order
.
setClosed
(
closed
);
order
.
setClosed
(
closed
);
if
(
ObjectUtil
.
isNotEmpty
(
order
.
getMode
())){
String
key
=
Constants
.
CACHE_DISPATCH
+
order
.
getMode
();
log
.
info
(
" mode="
+
order
.
getMode
()+
"的出库已结束,清空 key="
+
key
+
" 的cache"
);
dataCache
.
updateCache
(
key
,
""
);
}
}
}
}
}
}
else
{
}
else
{
...
...
src/main/java/com/neotel/smfcore/core/order/service/po/LiteOrder.java
查看文件 @
465cb7f
...
@@ -102,6 +102,8 @@ public class LiteOrder extends BasePo implements Serializable {
...
@@ -102,6 +102,8 @@ public class LiteOrder extends BasePo implements Serializable {
private
String
mode
;
private
String
mode
;
private
String
operationId
;
public
void
setClosed
(
boolean
value
){
public
void
setClosed
(
boolean
value
){
this
.
closed
=
value
;
this
.
closed
=
value
;
if
(
value
){
if
(
value
){
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/api/MicronApi.java
查看文件 @
465cb7f
...
@@ -12,16 +12,14 @@ import com.neotel.smfcore.core.device.util.DataCache;
...
@@ -12,16 +12,14 @@ import com.neotel.smfcore.core.device.util.DataCache;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.core.system.service.po.DataLog
;
import
com.neotel.smfcore.custom.micron1053.api.bean.DispatchId
;
import
com.neotel.smfcore.custom.micron1053.api.bean.*
;
import
com.neotel.smfcore.custom.micron1053.api.bean.Material
;
import
com.neotel.smfcore.custom.micron1053.api.bean.MaterialStatus
;
import
com.neotel.smfcore.custom.micron1053.api.bean.TrackStatus
;
import
com.neotel.smfcore.custom.micron1053.bean.MaterialInfo
;
import
com.neotel.smfcore.custom.micron1053.bean.MaterialInfo
;
import
com.neotel.smfcore.custom.micron1053.bean.MicronResult
;
import
com.neotel.smfcore.custom.micron1053.bean.MicronResult
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
java.text.DecimalFormat
;
import
java.text.MessageFormat
;
import
java.text.MessageFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -60,7 +58,7 @@ public class MicronApi {
...
@@ -60,7 +58,7 @@ public class MicronApi {
}
}
public
static
boolean
Debug
=
true
;
public
static
Barcode
API001
(
String
operationId
,
Barcode
barcode
)
throws
ApiException
{
public
static
Barcode
API001
(
String
operationId
,
Barcode
barcode
)
throws
ApiException
{
...
@@ -226,9 +224,82 @@ public class MicronApi {
...
@@ -226,9 +224,82 @@ public class MicronApi {
public
static
List
<
DispatchId
>
Api004
(
String
operationId
)
{
public
static
List
<
DispatchId
>
Api004
(
String
operationId
)
{
String
url
=
config
.
getUrl
(
config
.
api_name_004
);
String
url
=
config
.
getUrl
(
config
.
api_name_004
);
url
=
MessageFormat
.
format
(
url
,
operationId
);
url
=
MessageFormat
.
format
(
url
,
operationId
);
if
(
ObjectUtil
.
isEmpty
(
url
)&&
Debug
){
List
<
DispatchId
>
list
=
new
ArrayList
<>();
DispatchId
id1
=
new
DispatchId
(
"dispatchIds1"
,
new
ArrayList
<>());
List
<
Object
>
atts
=
new
ArrayList
<>();
if
(
operationId
.
contains
(
APIMODE
.
MCLPRETASK
))
{
atts
.
add
(
"PPID1"
);
atts
.
add
(
"PPID2"
);
atts
.
add
(
"PPID3"
);
}
id1
.
getIds
().
add
(
new
IdInfo
(
"dispatchIds1-LineId1"
,
atts
));
id1
.
getIds
().
add
(
new
IdInfo
(
"dispatchIds1-LineId2"
,
atts
));
DispatchId
id2
=
new
DispatchId
(
"dispatchIds2"
,
new
ArrayList
<>());
id2
.
getIds
().
add
(
new
IdInfo
(
"dispatchIds2-LineId1"
,
atts
));
id2
.
getIds
().
add
(
new
IdInfo
(
"dispatchIds2-LineId2"
,
atts
));
list
.
add
(
id1
);
list
.
add
(
id2
);
return
list
;
}
try
{
try
{
log
.
info
(
"调用MES接口 API004: url=["
+
url
+
"]"
);
log
.
info
(
"调用MES接口 API004: url=["
+
url
+
"]"
);
MicronResult
result
=
HttpHelper
.
getMicronJson
(
url
);
MicronResult
result
=
HttpHelper
.
getMicronJson
(
url
);
// dispatchMode: MCLPRETASK|PCBPRETASK|LINEPREP
// Http Status code:
// 200 - Success
// {
// "trasactionId": <TransactionId>,
// "tag":
// [
// <tagKey1> : <tagValue1>,
// <tagKey2> : <tagValue2>,
// ...
// ],
// "dispatchMode": "MCLPRETASK",
// "dispatchIds" :
// [
// {
// lineId: <LineId>,
// Ids:
// [
// {
// "Id": <MCLPRETASK>,
// "Attribute":
// [ <PPID>,<PPID2>,<PPID3>]
// },
// ...
// ]
// }
// ]
// }
//
// Http Status code:
// 200 - Success
// {
// "trasactionId": <TransactionId>,
// "tag":
// [
// <tagKey1> : <tagValue1>,
// <tagKey2> : <tagValue2>,
// ...
// ],
// "dispatchMode": "PCBPRETASK",
// "dispatchIds" :
// [
// {
// lineId: <LineId>,
// Ids:
// [
// {
// "Id": <PCBPRETASK>,
// "Attribute":[<PCB DID><PCB REV>]
// },
// ...
// ]
// }
// ]
// }
return
result
.
getResult
(
"dispatchIds"
);
return
result
.
getResult
(
"dispatchIds"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
url
+
"出错"
,
e
);
log
.
error
(
url
+
"出错"
,
e
);
...
@@ -239,9 +310,14 @@ public class MicronApi {
...
@@ -239,9 +310,14 @@ public class MicronApi {
public
static
List
<
Material
>
Api005
(
String
operationId
,
String
linePrepOrderId
)
{
public
static
List
<
Material
>
Api005
(
String
operationId
,
String
linePrepOrderId
)
{
String
url
=
config
.
getUrl
(
config
.
api_name_005
);
String
url
=
config
.
getUrl
(
config
.
api_name_005
);
url
=
MessageFormat
.
format
(
url
,
operationId
,
linePrepOrderId
);
List
<
Material
>
materialList
=
new
ArrayList
<>();
List
<
Material
>
materialList
=
new
ArrayList
<>();
if
(
ObjectUtil
.
isEmpty
(
url
)&&
Debug
){
materialList
.
add
(
new
Material
(
"serialNum1"
,
"partNumber1"
));
return
materialList
;
}
url
=
MessageFormat
.
format
(
url
,
operationId
,
linePrepOrderId
);
try
{
try
{
log
.
info
(
"调用MES接口 API005: url=["
+
url
+
"]"
);
log
.
info
(
"调用MES接口 API005: url=["
+
url
+
"]"
);
MicronResult
result
=
HttpHelper
.
getMicronJson
(
url
);
MicronResult
result
=
HttpHelper
.
getMicronJson
(
url
);
...
@@ -266,6 +342,12 @@ public class MicronApi {
...
@@ -266,6 +342,12 @@ public class MicronApi {
*/
*/
List
<
Material
>
materialList
=
new
ArrayList
<>();
List
<
Material
>
materialList
=
new
ArrayList
<>();
String
url
=
config
.
getUrl
(
config
.
api_name_006
);
String
url
=
config
.
getUrl
(
config
.
api_name_006
);
if
(
ObjectUtil
.
isEmpty
(
url
)&&
Debug
){
materialList
.
add
(
new
Material
(
"serialNum1"
,
"partNumber1"
));
materialList
.
add
(
new
Material
(
"serialNum2"
,
"partNumber2"
));
return
materialList
;
}
try
{
try
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"operationId"
,
operationId
);
paramMap
.
put
(
"operationId"
,
operationId
);
...
@@ -313,7 +395,6 @@ public class MicronApi {
...
@@ -313,7 +395,6 @@ public class MicronApi {
String
paramStr
=
JsonUtil
.
toJsonStr
(
paramMap
);
String
paramStr
=
JsonUtil
.
toJsonStr
(
paramMap
);
log
.
info
(
"调用MES接口 API007: url=["
+
url
+
"],body=["
+
paramStr
+
"]"
);
log
.
info
(
"调用MES接口 API007: url=["
+
url
+
"],body=["
+
paramStr
+
"]"
);
MicronResult
micronResult
=
HttpHelper
.
postMicronJson
(
url
,
paramMap
);
MicronResult
micronResult
=
HttpHelper
.
postMicronJson
(
url
,
paramMap
);
return
micronResult
.
getStatus
().
equals
(
"Success"
);
return
micronResult
.
getStatus
().
equals
(
"Success"
);
}
catch
(
ApiException
e
)
{
}
catch
(
ApiException
e
)
{
...
@@ -414,12 +495,19 @@ public class MicronApi {
...
@@ -414,12 +495,19 @@ public class MicronApi {
// Mode = "MBR|REQ|MCL|GR|MATRET|RET|NPI|RACK|PCBPRETASK|MCLPRETASK|LINEPREP|CTRLDISPATCH"
// Mode = "MBR|REQ|MCL|GR|MATRET|RET|NPI|RACK|PCBPRETASK|MCLPRETASK|LINEPREP|CTRLDISPATCH"
// Source = toolId, Facility+area for UI
// Source = toolId, Facility+area for UI
String
url
=
config
.
getUrl
(
config
.
api_name_011
);
String
url
=
config
.
getUrl
(
config
.
api_name_011
);
if
(
ObjectUtil
.
isEmpty
(
source
)){
source
=
config
.
api_011_Source
;
}
if
(
ObjectUtil
.
isEmpty
(
url
)&&
Debug
){
return
mode
+
"_test_operationId"
;
}
url
=
MessageFormat
.
format
(
url
,
mode
,
userName
,
source
);
url
=
MessageFormat
.
format
(
url
,
mode
,
userName
,
source
);
try
{
try
{
MicronResult
result
=
HttpHelper
.
getMicronJson
(
url
);
MicronResult
result
=
HttpHelper
.
getMicronJson
(
url
);
String
operationId
=
result
.
getResult
(
"operationId"
);
String
operationId
=
result
.
getResult
(
"operationId"
);
return
operationId
;
return
operationId
;
}
catch
(
ApiException
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
url
+
"出错"
,
e
);
log
.
error
(
url
+
"出错"
,
e
);
}
}
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/api/bean/DispatchId.java
查看文件 @
465cb7f
package
com
.
neotel
.
smfcore
.
custom
.
micron1053
.
api
.
bean
;
package
com
.
neotel
.
smfcore
.
custom
.
micron1053
.
api
.
bean
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
public
class
DispatchId
{
@AllArgsConstructor
@NoArgsConstructor
public
class
DispatchId
implements
Serializable
{
private
String
lineId
;
private
String
lineId
;
private
List
<
Id
>
ids
;
private
List
<
Id
Info
>
ids
;
@Data
static
class
Id
{
private
String
Id
;
private
List
<
Object
>
Attribute
;
}
}
}
src/main/java/com/neotel/smfcore/custom/micron1053/api/bean/IdInfo.java
0 → 100644
查看文件 @
465cb7f
package
com
.
neotel
.
smfcore
.
custom
.
micron1053
.
api
.
bean
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.List
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
IdInfo
implements
Serializable
{
private
String
IdStr
;
private
List
<
Object
>
Attribute
;
}
\ No newline at end of file
\ No newline at end of file
src/main/java/com/neotel/smfcore/custom/micron1053/api/bean/Material.java
查看文件 @
465cb7f
package
com
.
neotel
.
smfcore
.
custom
.
micron1053
.
api
.
bean
;
package
com
.
neotel
.
smfcore
.
custom
.
micron1053
.
api
.
bean
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
@Data
@Data
public
class
Material
{
@AllArgsConstructor
@NoArgsConstructor
public
class
Material
implements
Serializable
{
private
String
serialNum
;
private
String
serialNum
;
private
String
partNumber
;
private
String
partNumber
;
}
}
src/main/java/com/neotel/smfcore/custom/micron1053/api/bean/TrackStatus.java
查看文件 @
465cb7f
...
@@ -2,11 +2,29 @@ package com.neotel.smfcore.custom.micron1053.api.bean;
...
@@ -2,11 +2,29 @@ package com.neotel.smfcore.custom.micron1053.api.bean;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
@Data
public
class
TrackStatus
{
public
class
TrackStatus
implements
Serializable
{
//
// "trackStatus":
// [
// {
// "serialNum": <SerialNum>,
// "partNumber": <PartNumber>
// "materialStatus": "Loading","Available","Reserved","Dispatching","Dispatched",
// "Success": true|False,
// "description": <description>
// },
// {
// ...
// }
// ]
private
String
serialNum
;
private
String
serialNum
;
private
String
partNumber
;
private
String
partNumber
;
private
String
materialStatus
;
private
String
materialStatus
;
private
String
Success
;
private
boolean
Success
;
private
String
description
;
private
String
description
;
}
}
src/main/java/com/neotel/smfcore/custom/micron1053/loading/LoadingController.java
查看文件 @
465cb7f
...
@@ -84,7 +84,7 @@ public class LoadingController {
...
@@ -84,7 +84,7 @@ public class LoadingController {
resultList
.
add
(
dto
);
resultList
.
add
(
dto
);
}
}
if
(
resultList
.
size
()<=
0
)
{
if
(
resultList
.
size
()<=
0
&&
MicronApi
.
Debug
)
{
resultList
.
add
(
new
MaterialLoadingDto
(
MicronDataCache
.
PIZZABOX
,
2
,
5
,
6
));
resultList
.
add
(
new
MaterialLoadingDto
(
MicronDataCache
.
PIZZABOX
,
2
,
5
,
6
));
resultList
.
add
(
new
MaterialLoadingDto
(
MicronDataCache
.
REEL
,
23
,
54
,
6
));
resultList
.
add
(
new
MaterialLoadingDto
(
MicronDataCache
.
REEL
,
23
,
54
,
6
));
resultList
.
add
(
new
MaterialLoadingDto
(
MicronDataCache
.
PCB
,
22
,
52
,
65
));
resultList
.
add
(
new
MaterialLoadingDto
(
MicronDataCache
.
PCB
,
22
,
52
,
65
));
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/loading/util/LoadingUtil.java
查看文件 @
465cb7f
...
@@ -216,4 +216,23 @@ public class LoadingUtil {
...
@@ -216,4 +216,23 @@ public class LoadingUtil {
}
}
return
PushToMes
(
inList
,
posList
);
return
PushToMes
(
inList
,
posList
);
}
}
public
String
getRfidByBarcode
(
String
barcode
)
{
InList
inList
=
getInlist
();
if
(
inList
==
null
)
{
return
""
;
}
List
<
StoragePos
>
posList
=
new
ArrayList
<>();
//查找所有失败的重新推送
for
(
InListItem
item
:
inList
.
getInListItems
())
{
if
(
item
.
getState
()
<=
INITEM_STATUS
.
Success
&&
item
.
getRi
().
equals
(
barcode
))
{
return
item
.
getRfid
();
}
}
return
""
;
}
}
}
src/main/java/com/neotel/smfcore/custom/micron1053/task/MicronPreTaskController.java
查看文件 @
465cb7f
此文件的差异被折叠,
点击展开。
src/main/java/com/neotel/smfcore/custom/micron1053/task/bean/PreTask.java
查看文件 @
465cb7f
...
@@ -2,10 +2,11 @@ package com.neotel.smfcore.custom.micron1053.task.bean;
...
@@ -2,10 +2,11 @@ package com.neotel.smfcore.custom.micron1053.task.bean;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
import
java.util.List
;
@Data
@Data
public
class
PreTask
{
public
class
PreTask
implements
Serializable
{
private
String
mode
;
private
String
mode
;
private
String
operationId
;
private
String
operationId
;
private
List
<
String
>
pretasks
;
private
List
<
String
>
pretasks
;
...
...
src/main/java/com/neotel/smfcore/custom/micron1053/task/bean/dto/MaterialDispatchStatus.java
0 → 100644
查看文件 @
465cb7f
package
com
.
neotel
.
smfcore
.
custom
.
micron1053
.
task
.
bean
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
MaterialDispatchStatus
implements
Serializable
{
@ApiModelProperty
(
"PN"
)
private
String
pn
;
@ApiModelProperty
(
"Required Qty(Units)需求数量(单位:Units)"
)
private
int
requiredCount
;
@ApiModelProperty
(
"Required Qty(S/N)需求数量(按序列号)"
)
private
int
requiredQty
;
@ApiModelProperty
(
"Success Qty(S/N)成功数量(按序列号)"
)
private
int
successQty
;
@ApiModelProperty
(
"NG Qty(S/N)NG数量(按序列号)"
)
private
int
ngQty
;
@ApiModelProperty
(
" 提交失败数量。Count of Transaction Failure Transaction"
)
private
int
tranFailQty
;
}
src/main/java/com/neotel/smfcore/custom/micron1053/task/bean/dto/TaskDto.java
查看文件 @
465cb7f
...
@@ -8,8 +8,10 @@ import java.util.List;
...
@@ -8,8 +8,10 @@ import java.util.List;
@Data
@Data
public
class
TaskDto
{
public
class
TaskDto
{
private
int
type
;
private
int
type
=
1
;
//1=勾选页面勾选数据,2=已开始出库
private
String
mode
;
private
String
operationId
;
private
String
operationId
;
private
List
<
LiteOrderItem
>
itemList
;
private
List
<
LiteOrderItem
>
itemList
;
private
List
<
DispatchId
>
dispatchIdList
;
private
List
<
DispatchId
>
dispatchIdList
;
private
List
<
MaterialDispatchStatus
>
statusList
;
}
}
src/main/java/com/neotel/smfcore/custom/micron1053/task/enums/OrderItemStatus.java
查看文件 @
465cb7f
...
@@ -4,19 +4,24 @@ package com.neotel.smfcore.custom.micron1053.task.enums;
...
@@ -4,19 +4,24 @@ package com.neotel.smfcore.custom.micron1053.task.enums;
public
class
OrderItemStatus
{
public
class
OrderItemStatus
{
//缺料
//缺料
public
static
final
String
shortage
=
"1"
;
public
static
final
String
wait
=
"WAIT"
;
//缺料
public
static
final
String
shortage
=
"SHORTAGE"
;
//MES扣除失败
public
static
final
String
executFail
=
"EXECUTFAIL"
;
//正在执行
//正在执行
public
static
final
String
executing
=
"
2
"
;
public
static
final
String
executing
=
"
EXECUTING
"
;
//通知成功
//通知成功
public
static
final
String
notify_success
=
"
3
"
;
public
static
final
String
notify_success
=
"
SUCCESS
"
;
//通知失败
//通知失败
public
static
final
String
notify_fail
=
"
4
"
;
public
static
final
String
notify_fail
=
"
FAIL
"
;
public
static
final
String
finish
=
"
5
"
;
public
static
final
String
finish
=
"
FINISH
"
;
public
static
final
String
cancel
=
"
6
"
;
public
static
final
String
cancel
=
"
CANCEL
"
;
}
}
src/main/resources/log4j2-spring.xml
查看文件 @
465cb7f
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<PatternLayout
pattern=
"%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%file:%line] - %msg%n"
/>
<PatternLayout
pattern=
"%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%file:%line] - %msg%n"
/>
</Console>
</Console>
<RollingFile
name=
"log"
fileName=
"${LOG_HOME}/${LOG_NAME}.txt"
filePattern=
"${LOG_HOME}/${LOG_NAME}.%d{yyyy-MM-dd}.txt"
append=
"true"
>
<RollingFile
name=
"log"
fileName=
"${LOG_HOME}/${LOG_NAME}.txt"
filePattern=
"${LOG_HOME}/${LOG_NAME}.%d{yyyy-MM-dd}.txt"
append=
"true"
>
<PatternLayout
charset=
"
GB18030
"
pattern=
"%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%file:%line] - %msg%n"
/>
<PatternLayout
charset=
"
UTF-8
"
pattern=
"%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%file:%line] - %msg%n"
/>
<Policies>
<Policies>
<TimeBasedTriggeringPolicy
modulate=
"true"
interval=
"1"
/>
<TimeBasedTriggeringPolicy
modulate=
"true"
interval=
"1"
/>
</Policies>
</Policies>
...
...
src/main/resources/messages.properties
查看文件 @
465cb7f
...
@@ -351,6 +351,7 @@ smfcore.expiration.ameExists=\u8FC7\u671F\u914D\u7F6E[{0}]\u5DF2\u5B58\u5728
...
@@ -351,6 +351,7 @@ smfcore.expiration.ameExists=\u8FC7\u671F\u914D\u7F6E[{0}]\u5DF2\u5B58\u5728
smfcore.expiration.notExist=
\u
8FC7
\u
671F
\u
914D
\u
7F6E[{0}]
\u
4E0D
\u
5B58
\u5728
smfcore.expiration.notExist=
\u
8FC7
\u
671F
\u
914D
\u
7F6E[{0}]
\u
4E0D
\u
5B58
\u5728
smfcore.micron.xray.offline={0}
\u9700\u8981\u
70B9
\u6599\u
FF0C
\u
70B9
\u6599\u
673A
\u
4E0D
\u5728\u
7EBF
smfcore.micron.xray.offline={0}
\u9700\u8981\u
70B9
\u6599\u
FF0C
\u
70B9
\u6599\u
673A
\u
4E0D
\u5728\u
7EBF
smfcore.micron.nodata
=
\u
672A
\u
627E
\u5230\u
4FE1
\u
606F
smfcore.micron.nodata
=
\u
672A
\u
627E
\u5230\u
4FE1
\u
606F
smfcore.api.fail
=
{0} Failed to get data
#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
...
...
修改记录.txt
查看文件 @
465cb7f
...
@@ -30,3 +30,28 @@
...
@@ -30,3 +30,28 @@
20220318:
20220318:
安全库存和 呆滞物料功能
安全库存和 呆滞物料功能
20230809
1053接口修改
1,以下两个获取库位号接口增加参数:rfid
返回增加:返回110=接口验证失败,需要去XRay重新点料
/service/store/robotBox/renewPosForPutin
第二次重新获取新入库库位
POST
/service/store/robotBox/emptyPosForPutin
扫码后获取库位号
2.新增加点料完成接口
POST
/rest/micron/device/updateReelQty
X-Ray点料完成,更新数量,参数:barcode ,qty
3.新增加rfid入库完成接口,料串入库完成时调用
POST
/rest/micron/device/rfidPutInEnd
RFID入库完成,参数:rfid
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论