Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 6284782a
由
sunke
编写于
2023-01-13 15:15:34 +0800
浏览文件
选项
浏览文件
标签
下载
差异文件
Merge remote-tracking branch 'origin/master'
2 个父辈
c24e222b
cc3a9e06
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
111 行增加
和
24 行删除
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
src/main/java/com/neotel/smfcore/custom/djk20388/DJK20388AGVController.java
src/main/java/com/neotel/smfcore/custom/djk20388/DJK20388Menu.java
src/main/java/com/neotel/smfcore/custom/djk20388/bean/LabelingStatus.java
src/main/java/com/neotel/smfcore/custom/micron20031/Micron20031Api.java
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpApiListener.java
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpUnloadController.java
src/main/java/com/neotel/smfcore/custom/micron20031/manager/MicronSpTimerProcess.java
src/main/java/com/neotel/smfcore/core/kanban/rest/BoxKanbanController.java
查看文件 @
6284782
...
@@ -469,7 +469,7 @@ public class BoxKanbanController {
...
@@ -469,7 +469,7 @@ public class BoxKanbanController {
Integer
warmUseCount
=
dataCache
.
getSpUsePosCount
(
storage
.
getCid
(),
DataCache
.
warmPosUseCount
);
Integer
warmUseCount
=
dataCache
.
getSpUsePosCount
(
storage
.
getCid
(),
DataCache
.
warmPosUseCount
);
Integer
coldingUseCount
=
dataCache
.
getSpUsePosCount
(
storage
.
getCid
(),
DataCache
.
coldingPosUseCount
);
Integer
coldingUseCount
=
dataCache
.
getSpUsePosCount
(
storage
.
getCid
(),
DataCache
.
coldingPosUseCount
);
boxDto
.
getData
().
put
(
DataCache
.
warmPosUseCount
,
warmUseCount
.
toString
());
boxDto
.
getData
().
put
(
DataCache
.
warmPosUseCount
,
warmUseCount
.
toString
());
boxDto
.
getData
().
put
(
DataCache
.
warm
PosUseCount
,
coldingUseCount
.
toString
());
boxDto
.
getData
().
put
(
DataCache
.
colding
PosUseCount
,
coldingUseCount
.
toString
());
}
}
return
boxDto
;
return
boxDto
;
}
}
...
...
src/main/java/com/neotel/smfcore/core/storage/service/manager/impl/StoragePosManagerImpl.java
查看文件 @
6284782
...
@@ -286,7 +286,7 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -286,7 +286,7 @@ public class StoragePosManagerImpl implements IStoragePosManager {
/**
/**
* 根据出库方式获取不同的 Sort
* 根据出库方式获取不同的 Sort
*/
*/
p
rivate
Sort
getSortByCheckOutType
(
CHECKOUT_TYPE
checkoutType
){
p
ublic
Sort
getSortByCheckOutType
(
CHECKOUT_TYPE
checkoutType
){
Sort
sort
=
null
;
Sort
sort
=
null
;
if
(
CHECKOUT_TYPE
.
EXPIRE_FIRST
.
equals
(
checkoutType
)){
//先过期先出
if
(
CHECKOUT_TYPE
.
EXPIRE_FIRST
.
equals
(
checkoutType
)){
//先过期先出
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.expTime"
,
"barcode.expireDate"
,
"canCheckOutTime"
);
sort
=
Sort
.
by
(
Sort
.
Direction
.
ASC
,
"barcode.expTime"
,
"barcode.expireDate"
,
"canCheckOutTime"
);
...
@@ -622,5 +622,4 @@ public class StoragePosManagerImpl implements IStoragePosManager {
...
@@ -622,5 +622,4 @@ public class StoragePosManagerImpl implements IStoragePosManager {
return
getEmptyPos
(
storage
,
barcode
,
excludePosIds
,
true
);
return
getEmptyPos
(
storage
,
barcode
,
excludePosIds
,
true
);
}
}
}
}
src/main/java/com/neotel/smfcore/custom/djk20388/DJK20388AGVController.java
查看文件 @
6284782
...
@@ -5,8 +5,10 @@ import com.google.common.base.Strings;
...
@@ -5,8 +5,10 @@ import com.google.common.base.Strings;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.bean.StatusBean
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.language.util.MessageUtils
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.system.util.DevicesStatusUtil
;
import
com.neotel.smfcore.core.system.util.DevicesStatusUtil
;
import
com.neotel.smfcore.custom.djk20388.bean.AgvLogInfo
;
import
com.neotel.smfcore.custom.djk20388.bean.AgvViewDto
;
import
com.neotel.smfcore.custom.djk20388.bean.AgvViewDto
;
import
com.neotel.smfcore.custom.djk20388.bean.LabelingStatus
;
import
com.neotel.smfcore.custom.djk20388.bean.LabelingStatus
;
import
com.neotel.smfcore.custom.djk20388.util.AgvDataUtil
;
import
com.neotel.smfcore.custom.djk20388.util.AgvDataUtil
;
...
@@ -19,6 +21,9 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -19,6 +21,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Locale
;
import
java.util.Map
;
import
java.util.Map
;
@Slf4j
@Slf4j
...
@@ -40,6 +45,23 @@ public class DJK20388AGVController {
...
@@ -40,6 +45,23 @@ public class DJK20388AGVController {
labelingStatus
.
setMimoCid
(
getMimoCid
());
labelingStatus
.
setMimoCid
(
getMimoCid
());
}
}
labelingStatus
=
AgvDataUtil
.
process
(
labelingStatus
);
labelingStatus
=
AgvDataUtil
.
process
(
labelingStatus
);
//锡膏料仓data中的X16需要返回给贴标机
String
mimoCid
=
labelingStatus
.
getMimoCid
()
;
if
(
ObjectUtil
.
isEmpty
(
mimoCid
)){
mimoCid
=
getMimoCid
();
}
if
(
ObjectUtil
.
isNotEmpty
(
mimoCid
))
{
StatusBean
bean
=
DevicesStatusUtil
.
getStatusBean
(
mimoCid
);
if
(
bean
!=
null
&&
bean
.
getBoxStatus
()
!=
null
&&
(
bean
.
timeOut
()
==
false
))
{
String
X16
=
bean
.
getFromData
(
"X16"
);
Map
<
String
,
String
>
x16Data
=
new
HashMap
<>();
x16Data
.
put
(
"X16"
,
X16
);
labelingStatus
.
addOp
(
x16Data
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
""
,
e
);
log
.
error
(
""
,
e
);
}
}
...
@@ -64,7 +86,16 @@ public class DJK20388AGVController {
...
@@ -64,7 +86,16 @@ public class DJK20388AGVController {
agvViewDto
.
setMimoData
(
bean
.
getData
());
agvViewDto
.
setMimoData
(
bean
.
getData
());
}
}
}
}
agvViewDto
.
setLogList
(
AgvDataUtil
.
getLastLogs
(
10
));
Locale
locale
=
servletRequest
.
getLocale
();
//国际化
List
<
AgvLogInfo
>
logs
=
AgvDataUtil
.
getLastLogs
(
10
);
for
(
int
i
=
0
;
i
<=
logs
.
size
();
i
++){
if
(
ObjectUtil
.
isNotEmpty
(
logs
.
get
(
i
).
getMsgCode
())){
String
msg
=
MessageUtils
.
getText
(
logs
.
get
(
i
).
getMsgCode
(),
logs
.
get
(
i
).
getMsgParams
(),
locale
,
logs
.
get
(
i
).
getMsg
());
logs
.
get
(
i
).
setMsg
(
msg
);
}
}
agvViewDto
.
setLogList
(
logs
);
return
agvViewDto
;
return
agvViewDto
;
}
}
private
String
getMimoCid
()
{
private
String
getMimoCid
()
{
...
...
src/main/java/com/neotel/smfcore/custom/djk20388/DJK20388Menu.java
查看文件 @
6284782
...
@@ -22,7 +22,7 @@ public class DJK20388Menu {
...
@@ -22,7 +22,7 @@ public class DJK20388Menu {
String
menuLabel
=
"20388"
;
String
menuLabel
=
"20388"
;
//AGV
//AGV
MenuInit
.
addMenu
(
menuLabel
,
null
,
163
,
"AGV"
,
"agv"
,
"djk/agv
K
anban/index"
,
"agv"
);
MenuInit
.
addMenu
(
menuLabel
,
null
,
163
,
"AGV"
,
"agv"
,
"djk/agv
k
anban/index"
,
"agv"
);
String
apiName
=
smfApi
.
getApiName
();
String
apiName
=
smfApi
.
getApiName
();
if
(
Strings
.
isNotBlank
(
apiName
)
&&
apiName
.
equals
(
menuLabel
)){
if
(
Strings
.
isNotBlank
(
apiName
)
&&
apiName
.
equals
(
menuLabel
)){
...
...
src/main/java/com/neotel/smfcore/custom/djk20388/bean/LabelingStatus.java
查看文件 @
6284782
...
@@ -71,11 +71,16 @@ public class LabelingStatus implements Serializable {
...
@@ -71,11 +71,16 @@ public class LabelingStatus implements Serializable {
* 添加一些服务器的操作发送到客户端(批量入库)
* 添加一些服务器的操作发送到客户端(批量入库)
* @param opMap
* @param opMap
*/
*/
public
void
addOp
(
Map
<
String
,
String
>
opMap
){
public
void
addOp
(
Map
<
String
,
String
>
opMap
)
{
if
(
opMap
!=
null
&&
!
opMap
.
isEmpty
())
{
if
(
opMap
!=
null
&&
!
opMap
.
isEmpty
())
{
for
(
Map
.
Entry
<
String
,
String
>
op
:
opMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
String
>
op
:
opMap
.
entrySet
())
{
addData
(
op
.
getKey
(),
op
.
getValue
());
// addData(op.getKey(), op.getValue());
log
.
info
(
"LabelingStatus addOp ["
+
op
.
getKey
()+
"]=["
+
op
.
getValue
()+
"]"
);
data
.
put
(
op
.
getKey
(),
op
.
getValue
());
if
(
op
.
getKey
().
equals
(
"X16"
))
{
log
.
debug
(
"LabelingStatus addOp ["
+
op
.
getKey
()
+
"]=["
+
op
.
getValue
()
+
"]"
);
}
else
{
log
.
info
(
"LabelingStatus addOp ["
+
op
.
getKey
()
+
"]=["
+
op
.
getValue
()
+
"]"
);
}
}
}
}
}
}
}
...
@@ -88,14 +93,14 @@ public class LabelingStatus implements Serializable {
...
@@ -88,14 +93,14 @@ public class LabelingStatus implements Serializable {
mimoOpMap
.
put
(
cid
,
opMap
);
mimoOpMap
.
put
(
cid
,
opMap
);
}
}
}
}
private
void
addData
(
String
key
,
String
value
){
//
private void addData(String key, String value){
String
oldValue
=
data
.
get
(
key
);
//
String oldValue = data.get(key);
String
valueStr
=
value
;
//
String valueStr = value;
if
(!
Strings
.
isNullOrEmpty
(
oldValue
)){
//
if(!Strings.isNullOrEmpty(oldValue)){
valueStr
=
valueStr
+
"|"
+
oldValue
;
//
valueStr = valueStr + "|" + oldValue;
}
//
}
data
.
put
(
key
,
valueStr
);
//
data.put(key, valueStr);
}
//
}
}
}
src/main/java/com/neotel/smfcore/custom/micron20031/Micron20031Api.java
查看文件 @
6284782
...
@@ -9,6 +9,8 @@ import com.neotel.smfcore.core.barcode.service.po.Barcode;
...
@@ -9,6 +9,8 @@ import com.neotel.smfcore.core.barcode.service.po.Barcode;
import
com.neotel.smfcore.custom.micron20031.bean.DepositMatReqBean
;
import
com.neotel.smfcore.custom.micron20031.bean.DepositMatReqBean
;
import
com.neotel.smfcore.custom.micron20031.bean.MatOrderBean
;
import
com.neotel.smfcore.custom.micron20031.bean.MatOrderBean
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.*
;
...
@@ -17,6 +19,7 @@ import java.util.*;
...
@@ -17,6 +19,7 @@ import java.util.*;
* @date 2022/12/21 9:11 AM
* @date 2022/12/21 9:11 AM
*/
*/
@Slf4j
@Slf4j
@Service
public
class
Micron20031Api
{
public
class
Micron20031Api
{
public
static
String
MODE_DISABLE_SAP
=
"DISABLE_SAP"
;
public
static
String
MODE_DISABLE_SAP
=
"DISABLE_SAP"
;
public
static
String
MODE_DISABLE_MAM
=
"DISABLE_MAM"
;
public
static
String
MODE_DISABLE_MAM
=
"DISABLE_MAM"
;
...
@@ -28,12 +31,33 @@ public class Micron20031Api {
...
@@ -28,12 +31,33 @@ public class Micron20031Api {
public
static
String
Email_TO
=
""
;
public
static
String
Email_TO
=
""
;
public
static
String
Email_CC
=
""
;
public
static
String
Email_CC
=
""
;
private
static
String
apiAddr
=
""
;
@Value
(
"${micron.email.to:}"
)
public
void
setEmaillTo
(
String
to
)
{
Micron20031Api
.
Email_TO
=
to
;
}
@Value
(
"${micron.email.cc:}"
)
public
void
setEmaillCc
(
String
cc
)
{
Micron20031Api
.
Email_CC
=
cc
;
}
@Value
(
"${micron.apiAddr:}"
)
public
void
setApiaddr
(
String
apiAddr
)
{
Micron20031Api
.
apiAddr
=
apiAddr
;
}
private
static
String
AUTH_TOKEN
=
""
;
private
static
String
AUTH_TOKEN
=
""
;
private
static
String
MATERIAL_TYPE
=
"SOLDER_PASTE"
;
private
static
String
MATERIAL_TYPE
=
"SOLDER_PASTE"
;
public
static
boolean
isEnable
(){
if
(
ObjectUtil
.
isEmpty
(
apiAddr
)){
return
false
;
}
return
true
;
}
public
static
String
getAuthToken
(){
public
static
String
getAuthToken
(){
String
url
=
"https://boapi3testgtwy.micron.com/token"
;
String
url
=
"https://boapi3testgtwy.micron.com/token"
;
try
{
try
{
...
@@ -355,6 +379,7 @@ public class Micron20031Api {
...
@@ -355,6 +379,7 @@ public class Micron20031Api {
List
<
String
>
result
=
new
ArrayList
<
String
>();
List
<
String
>
result
=
new
ArrayList
<
String
>();
result
.
add
(
"test1"
);
result
.
add
(
"test1"
);
result
.
add
(
"test2"
);
result
.
add
(
"test2"
);
return
result
;
}
}
String
auth
=
getAuthToken
();
String
auth
=
getAuthToken
();
Map
<
String
,
String
>
dataMap
=
new
HashMap
<>();
Map
<
String
,
String
>
dataMap
=
new
HashMap
<>();
...
@@ -387,6 +412,9 @@ public class Micron20031Api {
...
@@ -387,6 +412,9 @@ public class Micron20031Api {
*/
*/
public
static
String
getMicronPN
(
String
micronLotId
,
String
equipId
)
throws
ApiException
{
public
static
String
getMicronPN
(
String
micronLotId
,
String
equipId
)
throws
ApiException
{
String
checkStockAvailableUrl
=
""
;
String
checkStockAvailableUrl
=
""
;
if
(
ObjectUtil
.
isEmpty
(
checkStockAvailableUrl
)){
return
"2K.K2275.010"
;
}
String
auth
=
getAuthToken
();
String
auth
=
getAuthToken
();
Map
<
String
,
String
>
dataMap
=
new
HashMap
<>();
Map
<
String
,
String
>
dataMap
=
new
HashMap
<>();
dataMap
.
put
(
"MicronLotID"
,
micronLotId
);
dataMap
.
put
(
"MicronLotID"
,
micronLotId
);
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpApiListener.java
查看文件 @
6284782
...
@@ -21,7 +21,7 @@ public class MicronSpApiListener extends BaseSmfApiListener {
...
@@ -21,7 +21,7 @@ public class MicronSpApiListener extends BaseSmfApiListener {
private
InListCache
inListCache
;
private
InListCache
inListCache
;
@Override
@Override
public
boolean
isForThisApi
(
String
apiName
)
{
public
boolean
isForThisApi
(
String
apiName
)
{
return
false
;
return
Micron20031Api
.
isEnable
()
;
}
}
@Override
@Override
public
Barcode
canPutInAfterResolve
(
String
inCheckUrl
,
CodeValidateParam
params
,
Barcode
barcode
)
throws
ValidateException
{
public
Barcode
canPutInAfterResolve
(
String
inCheckUrl
,
CodeValidateParam
params
,
Barcode
barcode
)
throws
ValidateException
{
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpUnloadController.java
查看文件 @
6284782
package
com
.
neotel
.
smfcore
.
custom
.
micron20031
;
package
com
.
neotel
.
smfcore
.
custom
.
micron20031
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.google.common.base.Strings
;
import
com.google.common.base.Strings
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.bean.ResultBean
;
import
com.neotel.smfcore.common.exception.ApiException
;
import
com.neotel.smfcore.common.exception.ApiException
;
...
@@ -7,10 +8,12 @@ import com.neotel.smfcore.common.exception.ValidateException;
...
@@ -7,10 +8,12 @@ import com.neotel.smfcore.common.exception.ValidateException;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.device.util.DataCache
;
import
com.neotel.smfcore.core.storage.enums.CHECKOUT_TYPE
;
import
com.neotel.smfcore.core.storage.rest.dto.CheckOutDto
;
import
com.neotel.smfcore.core.storage.rest.dto.CheckOutDto
;
import
com.neotel.smfcore.core.storage.rest.dto.StoragePosDto
;
import
com.neotel.smfcore.core.storage.rest.dto.StoragePosDto
;
import
com.neotel.smfcore.core.storage.rest.mapstruct.StoragePosMapper
;
import
com.neotel.smfcore.core.storage.rest.mapstruct.StoragePosMapper
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.storage.service.manager.impl.StoragePosManagerImpl
;
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.util.TaskService
;
import
com.neotel.smfcore.core.system.util.TaskService
;
...
@@ -20,12 +23,14 @@ import io.swagger.annotations.ApiOperation;
...
@@ -20,12 +23,14 @@ import io.swagger.annotations.ApiOperation;
import
lombok.Data
;
import
lombok.Data
;
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.data.domain.Sort
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -42,7 +47,7 @@ public class MicronSpUnloadController {
...
@@ -42,7 +47,7 @@ public class MicronSpUnloadController {
private
TaskService
taskService
;
private
TaskService
taskService
;
@Autowired
@Autowired
private
IStoragePosManager
storagePosManager
;
private
StoragePosManagerImpl
storagePosManager
;
@Autowired
@Autowired
private
StoragePosMapper
storagePosMapper
;
private
StoragePosMapper
storagePosMapper
;
...
@@ -65,13 +70,24 @@ public class MicronSpUnloadController {
...
@@ -65,13 +70,24 @@ public class MicronSpUnloadController {
@GetMapping
(
value
=
"/unload/getMicronPN"
)
@GetMapping
(
value
=
"/unload/getMicronPN"
)
public
ResultBean
getMicronPN
(
String
lotId
,
String
lineId
)
{
public
ResultBean
getMicronPN
(
String
lotId
,
String
lineId
)
{
if
(
ObjectUtil
.
isEmpty
(
lotId
)||
ObjectUtil
.
isEmpty
(
lineId
)){
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
}
try
{
try
{
String
pn
=
Micron20031Api
.
getMicronPN
(
lotId
,
lineId
);
String
pn
=
Micron20031Api
.
getMicronPN
(
lotId
,
lineId
);
Collection
<
String
>
excludePosIds
=
taskService
.
excludePosIds
();
CHECKOUT_TYPE
checkoutType
=
dataCache
.
getCheckOutType
();
//根据PN查找对应的物料,验证成功后返回
//根据PN查找对应的物料,验证成功后返回
Criteria
c
=
Criteria
.
where
(
"used"
).
is
(
true
);
Criteria
c
=
Criteria
.
where
(
"used"
).
is
(
true
);
c
.
and
(
"barcode.partNumber"
).
is
(
pn
);
c
.
and
(
"barcode.partNumber"
).
is
(
pn
);
c
.
and
(
"enable"
).
is
(
true
);
c
.
and
(
"barcode.lockId"
).
is
(
null
);
c
.
and
(
"barcode.appendData.AuthoriseNg"
).
ne
(
true
);
c
.
and
(
"barcode.appendData.AuthoriseNg"
).
ne
(
true
);
c
.
and
(
"id"
).
nin
(
excludePosIds
);
Query
q
=
new
Query
(
c
);
Sort
sort
=
storagePosManager
.
getSortByCheckOutType
(
checkoutType
);
q
.
with
(
sort
);
List
<
StoragePos
>
posList
=
storagePosManager
.
findByQuery
(
new
Query
(
c
));
List
<
StoragePos
>
posList
=
storagePosManager
.
findByQuery
(
new
Query
(
c
));
for
(
StoragePos
pos
:
for
(
StoragePos
pos
:
posList
)
{
posList
)
{
...
@@ -92,7 +108,7 @@ public class MicronSpUnloadController {
...
@@ -92,7 +108,7 @@ public class MicronSpUnloadController {
log
.
info
(
"unload/getMicronPN ["
+
pn
+
"] barcode ["
+
pos
.
getBarcode
().
getBarcode
()
+
"] 标记为NG"
);
log
.
info
(
"unload/getMicronPN ["
+
pn
+
"] barcode ["
+
pos
.
getBarcode
().
getBarcode
()
+
"] 标记为NG"
);
}
}
}
}
return
ResultBean
.
new
OkResult
(
pn
);
return
ResultBean
.
new
ErrorResult
(-
1
,
"smfcore.micron.checkoutByPnFail"
,
"未找到可出库物料"
);
}
catch
(
ApiException
e
)
{
}
catch
(
ApiException
e
)
{
return
ResultBean
.
newErrorResult
(
1
,
e
.
getMessage
(),
e
.
getMessage
());
return
ResultBean
.
newErrorResult
(
1
,
e
.
getMessage
(),
e
.
getMessage
());
}
}
...
@@ -111,6 +127,9 @@ public class MicronSpUnloadController {
...
@@ -111,6 +127,9 @@ public class MicronSpUnloadController {
String
posName
=
params
.
get
(
"posName"
);
String
posName
=
params
.
get
(
"posName"
);
if
(
ObjectUtil
.
isEmpty
(
posName
)){
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
}
StoragePos
pos
=
storagePosManager
.
getByPosName
(
posName
);
StoragePos
pos
=
storagePosManager
.
getByPosName
(
posName
);
if
(
pos
==
null
)
{
if
(
pos
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/manager/MicronSpTimerProcess.java
查看文件 @
6284782
...
@@ -14,6 +14,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
...
@@ -14,6 +14,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.PostConstruct
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -37,7 +38,11 @@ public class MicronSpTimerProcess {
...
@@ -37,7 +38,11 @@ public class MicronSpTimerProcess {
private
boolean
isRunning
=
false
;
private
boolean
isRunning
=
false
;
@PostConstruct
public
void
init
()
{
public
void
init
()
{
if
(!
Micron20031Api
.
isEnable
())
{
return
;
}
if
(!
isRunning
)
{
if
(!
isRunning
)
{
isRunning
=
true
;
isRunning
=
true
;
log
.
info
(
"开始20031入库任务定时处理"
);
log
.
info
(
"开始20031入库任务定时处理"
);
...
@@ -49,7 +54,7 @@ public class MicronSpTimerProcess {
...
@@ -49,7 +54,7 @@ public class MicronSpTimerProcess {
DespositProcess
();
DespositProcess
();
InlistTimeoutProcess
();
InlistTimeoutProcess
();
}
}
},
1
0
,
60
,
TimeUnit
.
SECONDS
);
},
6
0
,
60
,
TimeUnit
.
SECONDS
);
}
}
}
}
...
@@ -68,9 +73,9 @@ public class MicronSpTimerProcess {
...
@@ -68,9 +73,9 @@ public class MicronSpTimerProcess {
for
(
InListItem
item
:
for
(
InListItem
item
:
inList
.
getInListItems
())
{
inList
.
getInListItems
())
{
if
(
item
.
getInNum
()
<=
0
)
{
if
(
item
.
getInNum
()
<=
0
)
{
//发送邮件
//发送邮件
Micron20031Api
.
sendEmail
(
Micron20031Api
.
Email_TO
,
Micron20031Api
.
Email_CC
,
inList
.
getName
(),
item
.
getRi
());
Micron20031Api
.
sendEmail
(
Micron20031Api
.
Email_TO
,
Micron20031Api
.
Email_CC
,
inList
.
getName
(),
item
.
getRi
());
log
.
info
(
"sendEmail ["
+
inList
.
getName
()
+
"] ["
+
item
.
getRi
()
+
"] 给["
+
Micron20031Api
.
Email_TO
+
"]["
+
Micron20031Api
.
Email_CC
+
"] 成功"
);
}
}
}
}
inList
.
setSendEmail
(
true
);
inList
.
setSendEmail
(
true
);
...
@@ -94,11 +99,11 @@ public class MicronSpTimerProcess {
...
@@ -94,11 +99,11 @@ public class MicronSpTimerProcess {
for
(
Barcode
barcode
:
for
(
Barcode
barcode
:
barcodeList
)
{
barcodeList
)
{
//发送邮件
Micron20031Api
.
mATrackOut
(
barcode
);
Micron20031Api
.
mATrackOut
(
barcode
);
barcode
.
updateAppendData
(
"maTrackOut"
,
true
);
barcode
.
updateAppendData
(
"maTrackOut"
,
true
);
barcodeManager
.
saveBarcode
(
barcode
);
barcodeManager
.
saveBarcode
(
barcode
);
log
.
info
(
"DespositProcess barcode=["
+
barcode
.
getBarcode
()
+
"] 调用maTrackOut 成功"
);
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
log
.
info
(
"条码stabilizationEndDate到达后发送 maTrackOut出错:"
+
ex
.
getMessage
());
log
.
info
(
"条码stabilizationEndDate到达后发送 maTrackOut出错:"
+
ex
.
getMessage
());
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论