Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
smf-core
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 3a3c6a8d
由
LN
编写于
2023-01-11 16:37:47 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
20031锡膏料仓修改:入库单增加ri入库。增加unload接口。
1 个父辈
ef46faa2
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
255 行增加
和
22 行删除
src/main/java/com/neotel/smfcore/core/inList/rest/InListController.java
src/main/java/com/neotel/smfcore/core/inList/rest/bean/dto/InListItemDto.java
src/main/java/com/neotel/smfcore/core/inList/service/po/InList.java
src/main/java/com/neotel/smfcore/core/inList/service/po/InListItem.java
src/main/java/com/neotel/smfcore/core/inList/util/InListCache.java
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpController.java
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpLoadController.java
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpOrderController.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/inList/rest/InListController.java
查看文件 @
3a3c6a8
...
...
@@ -99,7 +99,7 @@ public class InListController {
if
(
inListItems
.
size
()
<=
0
)
{
continue
;
}
InList
inList
=
new
InList
(
name
,
INLIST_STATUS
.
WAIT
,
inListItems
,
0L
);
InList
inList
=
new
InList
(
name
,
INLIST_STATUS
.
WAIT
,
inListItems
,
0L
,
false
);
InList
dbList
=
inListManager
.
findByName
(
name
);
if
(
dbList
!=
null
)
{
...
...
@@ -281,7 +281,7 @@ public class InListController {
String
pn
=
lineValues
[
pnIndex
];
Integer
num
=
Convert
.
toInt
(
lineValues
[
numIndex
]);
if
(
ObjectUtil
.
isNotEmpty
(
pn
)&&
num
>
0
){
items
.
add
(
new
InListItem
(
""
,
pn
,
num
,
0
,
0
,
Lists
.
newArrayList
()
));
items
.
add
(
InListItem
.
newPnItem
(
""
,
pn
,
num
));
}
}
catch
(
Exception
ex
){
...
...
src/main/java/com/neotel/smfcore/core/inList/rest/bean/dto/InListItemDto.java
查看文件 @
3a3c6a8
...
...
@@ -22,6 +22,8 @@ public class InListItemDto implements Serializable {
@ApiModelProperty
(
value
=
"入库单名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"唯一码"
)
private
String
ri
;
@ApiModelProperty
(
value
=
"物料编号"
)
private
String
PN
;
...
...
src/main/java/com/neotel/smfcore/core/inList/service/po/InList.java
查看文件 @
3a3c6a8
...
...
@@ -30,4 +30,9 @@ public class InList extends BasePo implements Serializable {
* 开始入库单入库时间,超时需要发送邮件
*/
private
long
startTime
=
0L
;
/**
* 超时未完成,已发送邮件通知
*/
private
boolean
sendEmail
=
false
;
}
src/main/java/com/neotel/smfcore/core/inList/service/po/InListItem.java
查看文件 @
3a3c6a8
package
com
.
neotel
.
smfcore
.
core
.
inList
.
service
.
po
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.neotel.smfcore.common.base.BasePo
;
import
com.neotel.smfcore.core.inList.bean.ItemReelInfo
;
import
lombok.AllArgsConstructor
;
...
...
@@ -15,6 +16,13 @@ import java.util.List;
@NoArgsConstructor
public
class
InListItem
extends
BasePo
implements
Serializable
{
public
static
InListItem
newPnItem
(
String
name
,
String
pn
,
int
num
){
InListItem
item
=
new
InListItem
();
item
.
setName
(
name
);
item
.
setPN
(
pn
);
item
.
setNum
(
num
);
return
item
;
}
/**
* 入库单名称
*/
...
...
@@ -24,20 +32,25 @@ public class InListItem extends BasePo implements Serializable {
* 物料编号
*/
private
String
PN
;
/**
* 唯一码入库
*/
private
String
ri
;
/**
* 目标入库数量
*/
private
Integer
num
;
private
Integer
num
=
0
;
/**
* 已入库数量
*/
private
Integer
inNum
;
private
Integer
inNum
=
0
;
/**
* 已入库盘数
*/
private
Integer
inReelCount
;
private
Integer
inReelCount
=
0
;
/**
* 入库详情
...
...
@@ -46,8 +59,12 @@ public class InListItem extends BasePo implements Serializable {
public
void
addReelInfo
(
ItemReelInfo
reelInfo
){
if
(
ObjectUtil
.
isEmpty
(
ri
)){
inNum
+=
reelInfo
.
getInNum
();
}
else
{
inNum
=
num
;
}
reelLists
.
add
(
reelInfo
);
inNum
+=
reelInfo
.
getInNum
();
inReelCount
+=
1
;
}
...
...
src/main/java/com/neotel/smfcore/core/inList/util/InListCache.java
查看文件 @
3a3c6a8
...
...
@@ -17,6 +17,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -60,7 +61,27 @@ public class InListCache {
inListMap
.
put
(
inList
.
getName
(),
inList
);
}
/**
* 获取未完成的入库单任务
*/
public
List
<
InList
>
getTimeOutInListMap
(
long
timeOutTime
){
List
<
InList
>
inLists
=
new
ArrayList
<>();
for
(
InList
inList
:
inListMap
.
values
())
{
//判断是否超时
if
(
inList
.
getStartTime
()>
0
&&
(
inList
.
getStatus
()!=
INLIST_STATUS
.
OK
)&&(
inList
.
isSendEmail
()==
false
)){
if
(
System
.
currentTimeMillis
()>(
inList
.
getStartTime
()+
timeOutTime
)){
inLists
.
add
(
inList
);
}
}
}
return
inLists
;
}
public
InList
getInList
(
String
name
){
if
(
ObjectUtil
.
isEmpty
(
name
)){
return
null
;
}
InList
inList
=
inListMap
.
get
(
name
);
if
(
inList
==
null
){
inList
=
listManager
.
findByName
(
name
);
...
...
@@ -87,8 +108,15 @@ public class InListCache {
for
(
InListItem
item
:
inList
.
getInListItems
()
)
{
if
(
item
.
getPN
().
equals
(
barcode
.
getPartNumber
()))
{
updateOk
=
true
;
if
(
ObjectUtil
.
isEmpty
(
item
.
getRi
()))
{
if
(
item
.
getPN
().
equals
(
barcode
.
getPartNumber
()))
{
item
.
addReelInfo
(
new
ItemReelInfo
(
barcode
.
getBarcode
(),
barcode
.
getAmount
(),
new
Date
(),
pos
.
getPosName
()));
listItemManager
.
save
(
item
);
log
.
info
(
"UpdateInList 成功: 入库单["
+
inListName
+
"]posName["
+
pos
.
getPosName
()
+
"]PN["
+
barcode
.
getPartNumber
()
+
"]RI["
+
barcode
.
getBarcode
()
+
"]num["
+
barcode
.
getAmount
()
+
"]"
);
updateOk
=
true
;
break
;
}
}
else
if
(
item
.
getRi
().
equals
(
barcode
.
getBarcode
())){
item
.
addReelInfo
(
new
ItemReelInfo
(
barcode
.
getBarcode
(),
barcode
.
getAmount
(),
new
Date
(),
pos
.
getPosName
()));
listItemManager
.
save
(
item
);
log
.
info
(
"UpdateInList 成功: 入库单["
+
inListName
+
"]posName["
+
pos
.
getPosName
()
+
"]PN["
+
barcode
.
getPartNumber
()
+
"]RI["
+
barcode
.
getBarcode
()
+
"]num["
+
barcode
.
getAmount
()
+
"]"
);
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpController.java
查看文件 @
3a3c6a8
...
...
@@ -4,9 +4,9 @@ import cn.hutool.core.convert.Convert;
import
cn.hutool.core.util.ObjectUtil
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.custom.micron20031.bean.PosInfoDto
;
import
com.neotel.smfcore.custom.micron20031.bean.PosRowDto
;
import
com.neotel.smfcore.custom.micron20031.bean.PosValueInfo
;
import
com.neotel.smfcore.custom.micron20031.bean.
dto.
PosInfoDto
;
import
com.neotel.smfcore.custom.micron20031.bean.
dto.
PosRowDto
;
import
com.neotel.smfcore.custom.micron20031.bean.
dto.
PosValueInfo
;
import
com.neotel.smfcore.security.annotation.AnonymousAccess
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpLoadController.java
查看文件 @
3a3c6a8
...
...
@@ -19,10 +19,12 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
@Slf4j
@RestController
...
...
@@ -62,8 +64,9 @@ public class MicronSpLoadController {
for
(
DepositMatReqBean
bean
:
beans
)
{
InListItem
item
=
new
InListItem
();
item
.
setPN
(
bean
.
getMicronPN
());
item
.
setNum
(
bean
.
getQuantity
());
//改为唯一码方式
item
.
setRi
(
bean
.
getMicronPN
());
item
.
setNum
(
1
);
item
.
setName
(
matReqNo
);
items
.
add
(
item
);
}
...
...
@@ -85,7 +88,8 @@ public class MicronSpLoadController {
@ApiOperation
(
"开始入库单 入库"
)
@RequestMapping
(
value
=
"/desposit/start"
)
public
ResultBean
startDesposit
(
String
matReqNo
)
{
public
ResultBean
startDesposit
(
@RequestBody
Map
<
String
,
String
>
params
)
{
String
matReqNo
=
params
.
get
(
"matReqNo"
);
InList
inList
=
inListCache
.
getInList
(
matReqNo
);
if
(
inList
==
null
)
{
return
ResultBean
.
newErrorResult
(-
1
,
"smfcore.micron.operationFailure"
,
"操作失败"
);
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpOrderController.java
查看文件 @
3a3c6a8
...
...
@@ -9,7 +9,7 @@ import com.neotel.smfcore.core.storage.bean.InventoryItem;
import
com.neotel.smfcore.core.storage.rest.dto.InventoryItemDto
;
import
com.neotel.smfcore.core.storage.rest.mapstruct.InventoryItemMapper
;
import
com.neotel.smfcore.custom.micron20031.bean.MatOrderBean
;
import
com.neotel.smfcore.custom.micron20031.bean.OrderInfoDto
;
import
com.neotel.smfcore.custom.micron20031.bean.
dto.
OrderInfoDto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
src/main/java/com/neotel/smfcore/custom/micron20031/MicronSpUnloadController.java
查看文件 @
3a3c6a8
...
...
@@ -7,12 +7,14 @@ import com.neotel.smfcore.common.exception.ValidateException;
import
com.neotel.smfcore.common.utils.SecurityUtils
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.device.util.DataCache
;
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.mapstruct.StoragePosMapper
;
import
com.neotel.smfcore.core.storage.service.manager.IStoragePosManager
;
import
com.neotel.smfcore.core.storage.service.po.Storage
;
import
com.neotel.smfcore.core.storage.service.po.StoragePos
;
import
com.neotel.smfcore.core.system.util.TaskService
;
import
com.neotel.smfcore.custom.micron20031.bean.dto.SpUnloadDto
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
...
...
@@ -23,6 +25,7 @@ import org.springframework.data.mongodb.core.query.Query;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -46,8 +49,8 @@ public class MicronSpUnloadController {
@ApiOperation
(
"
出库:Withdraw Offline
GetEquipIDList"
)
@GetMapping
(
value
=
"/unload/
offline
IdList"
)
@ApiOperation
(
"
Withdraw Offline出库:
GetEquipIDList"
)
@GetMapping
(
value
=
"/unload/
getEquip
IdList"
)
public
ResultBean
getEquipIdList
()
{
try
{
...
...
@@ -58,9 +61,9 @@ public class MicronSpUnloadController {
}
}
@ApiOperation
(
"
出库:Withdraw Offline
GetMicronPN"
)
@ApiOperation
(
"
Withdraw Offline出库:
GetMicronPN"
)
@GetMapping
(
value
=
"/unload/getMicronPN"
)
public
ResultBean
G
etMicronPN
(
String
lotId
,
String
lineId
)
{
public
ResultBean
g
etMicronPN
(
String
lotId
,
String
lineId
)
{
try
{
String
pn
=
Micron20031Api
.
getMicronPN
(
lotId
,
lineId
);
...
...
@@ -76,7 +79,7 @@ public class MicronSpUnloadController {
//验证
Micron20031Api
.
chkAuthoriseToDispatch
(
pos
.
getBarcode
(),
Micron20031Api
.
MODE_ENABLE_MAM_SAP
,
SecurityUtils
.
getCurrentUsername
());
log
.
info
(
"unload/getMicronPN ["
+
pn
+
"] barcode ["
+
pos
.
getBarcode
().
getBarcode
()
+
"] chkAuthoriseToDispatch 成功"
);
S
toragePosDto
dto
=
storagePosMapper
.
toDto
(
pos
);
S
pUnloadDto
dto
=
getUnloadDto
(
pos
,
1
);
return
ResultBean
.
newOkResult
(
dto
);
}
catch
(
ApiException
ex
)
{
log
.
error
(
"unload/getMicronPN ["
+
pn
+
"] barcode ["
+
pos
.
getBarcode
().
getBarcode
()
+
"] chkAuthoriseToDispatch 失败:"
+
ex
.
toString
());
...
...
@@ -95,7 +98,14 @@ public class MicronSpUnloadController {
}
}
@ApiOperation
(
"开始出库"
)
private
SpUnloadDto
getUnloadDto
(
StoragePos
pos
,
int
unloadState
)
{
SpUnloadDto
dto
=
new
SpUnloadDto
(
pos
.
getId
(),
pos
.
getStorageId
(),
pos
.
getPosName
(),
pos
.
getBarcode
().
getBarcode
(),
pos
.
getBarcode
().
getPartNumber
(),
pos
.
getBarcode
().
getAmount
(),
unloadState
);
return
dto
;
}
@ApiOperation
(
"Withdraw Offline 开始出库"
)
@PutMapping
(
"/unload/checkout"
)
public
ResultBean
checkout
(
@RequestBody
Map
<
String
,
String
>
params
)
{
...
...
@@ -109,7 +119,6 @@ public class MicronSpUnloadController {
if
(
storage
==
null
)
{
throw
new
ValidateException
(
"smfcore.valueNotExist"
,
"{0}[{1}]不存在"
,
new
String
[]{
"storageId"
,
pos
.
getStorageId
()});
}
log
.
info
(
"出库料仓【"
+
storage
.
getName
()
+
"_"
+
storage
.
getCid
()
+
"】位置仓位【"
+
pos
.
getPosName
()
+
"】"
);
String
outResult
=
taskService
.
checkout
(
storage
,
pos
,
true
,
SecurityUtils
.
getCurrentUsername
());
if
(!
Strings
.
isNullOrEmpty
(
outResult
))
{
...
...
@@ -117,4 +126,63 @@ public class MicronSpUnloadController {
}
return
ResultBean
.
newOkResult
(
""
);
}
@ApiOperation
(
"removal 开始出库"
)
@PutMapping
(
"/removal"
)
public
ResultBean
removal
(
@RequestBody
CheckOutDto
checkOutDto
)
{
if
(
checkOutDto
.
getPids
()
==
null
)
{
throw
new
ValidateException
(
"smfcore.valueCanotNull"
,
"{0}不能为空"
,
new
String
[]{
"ID"
});
}
if
(
checkOutDto
.
getSingleOut
()
==
null
)
{
checkOutDto
.
setSingleOut
(
true
+
""
);
}
String
isSingleOutStr
=
checkOutDto
.
getSingleOut
();
boolean
isSingleOut
=
Boolean
.
valueOf
(
isSingleOutStr
);
List
<
SpUnloadDto
>
dtoResult
=
new
ArrayList
<>();
for
(
String
pid
:
checkOutDto
.
getPids
())
{
StoragePos
pos
=
storagePosManager
.
get
(
pid
);
if
(
pos
==
null
)
{
continue
;
}
Storage
storage
=
dataCache
.
getStorageById
(
pos
.
getStorageId
());
if
(
storage
==
null
)
{
throw
new
ValidateException
(
"smfcore.valueNotExist"
,
"{0}[{1}]不存在"
,
new
String
[]{
"storageId"
,
pos
.
getStorageId
()});
}
int
unloakOk
=
0
;
try
{
//接口验证能否出库
Barcode
barcode
=
Micron20031Api
.
returnMaterial
(
pos
.
getBarcode
(),
Micron20031Api
.
EXPIRED_DISPOSAL
,
SecurityUtils
.
getCurrentUsername
());
if
(
barcode
!=
null
)
{
log
.
info
(
"removal 料仓【"
+
storage
.
getName
()
+
"_"
+
storage
.
getCid
()
+
"】仓位【"
+
pos
.
getPosName
()
+
"】 returnMaterial 成功,开始出库"
);
try
{
String
outResult
=
taskService
.
checkout
(
storage
,
pos
,
isSingleOut
,
SecurityUtils
.
getCurrentUsername
());
if
(!
Strings
.
isNullOrEmpty
(
outResult
))
{
// throw new ValidateException("smfcore.error", outResult);
log
.
error
(
"removal 料仓【"
+
storage
.
getName
()
+
"_"
+
storage
.
getCid
()
+
"】仓位【"
+
pos
.
getPosName
()
+
"】 returnMaterial 成功,出库失败: "
+
outResult
);
}
else
{
unloakOk
=
1
;
}
}
catch
(
Exception
ex
){
log
.
error
(
"removal 料仓【"
+
storage
.
getName
()
+
"_"
+
storage
.
getCid
()
+
"】仓位【"
+
pos
.
getPosName
()
+
"】 returnMaterial 成功,出库失败: "
+
ex
.
getMessage
());
}
}
}
catch
(
ApiException
e
)
{
log
.
info
(
"removal 料仓【"
+
storage
.
getName
()
+
"_"
+
storage
.
getCid
()
+
"】 仓位【"
+
pos
.
getPosName
()
+
"】returnMaterial 失败"
);
}
dtoResult
.
add
(
getUnloadDto
(
pos
,
unloakOk
));
}
return
ResultBean
.
newOkResult
(
dtoResult
);
}
//查找出库,勾选选择的物料后,点开始出库,然后每个料盘调用ReturnMaterial判断成功了才可以出库。页面显示出库结果带yesNO
//MaTrackOut接口:入库验证时返回了StabilizationEndDate,根据此字段定时判断到达时间点后,自动发送MaTrackOut接口
//邮件:入库单开始一小时后如果未入库成功,一个一个发送邮件
//入库单根据RI入库。
}
src/main/java/com/neotel/smfcore/custom/micron20031/manager/MicronSpTimerProcess.java
0 → 100644
查看文件 @
3a3c6a8
package
com
.
neotel
.
smfcore
.
custom
.
micron20031
.
manager
;
import
com.neotel.smfcore.core.barcode.service.manager.IBarcodeManager
;
import
com.neotel.smfcore.core.barcode.service.po.Barcode
;
import
com.neotel.smfcore.core.inList.enums.INLIST_STATUS
;
import
com.neotel.smfcore.core.inList.service.manager.IInListManager
;
import
com.neotel.smfcore.core.inList.service.po.InList
;
import
com.neotel.smfcore.core.inList.service.po.InListItem
;
import
com.neotel.smfcore.core.inList.util.InListCache
;
import
com.neotel.smfcore.custom.micron20031.Micron20031Api
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.ScheduledExecutorService
;
import
java.util.concurrent.TimeUnit
;
@Service
@Slf4j
public
class
MicronSpTimerProcess
{
@Autowired
private
InListCache
inListCache
;
@Autowired
private
IInListManager
inListManager
;
@Autowired
private
IBarcodeManager
barcodeManager
;
private
ScheduledExecutorService
scheduledThreadPool
=
Executors
.
newScheduledThreadPool
(
1
);
private
boolean
isRunning
=
false
;
public
void
init
()
{
if
(!
isRunning
)
{
isRunning
=
true
;
log
.
info
(
"开始20031入库任务定时处理"
);
//10 秒之后执行,每10秒钟执行一次
scheduledThreadPool
.
scheduleAtFixedRate
(
new
Runnable
()
{
@Override
public
void
run
()
{
DespositProcess
();
InlistTimeoutProcess
();
}
},
10
,
60
,
TimeUnit
.
SECONDS
);
}
}
public
void
InlistTimeoutProcess
()
{
//当前开始的入库单,如果超过一小时还未完成,发送邮件
try
{
long
timeOutTime
=
60
*
60
*
1000
;
List
<
InList
>
lists
=
inListCache
.
getTimeOutInListMap
(
timeOutTime
);
List
<
InList
>
inLists
=
new
ArrayList
<>();
for
(
InList
inList
:
inLists
)
{
//判断是否超时
if
(
inList
.
getStartTime
()
>
0
&&
(
inList
.
getStatus
()
!=
INLIST_STATUS
.
OK
)
&&
(
inList
.
isSendEmail
()
==
false
))
{
if
(
System
.
currentTimeMillis
()
>
(
inList
.
getStartTime
()
+
timeOutTime
))
{
for
(
InListItem
item
:
inList
.
getInListItems
())
{
if
(
item
.
getInNum
()
<=
0
)
{
//发送邮件
Micron20031Api
.
sendEmail
(
Micron20031Api
.
Email_TO
,
Micron20031Api
.
Email_CC
,
inList
.
getName
(),
item
.
getRi
());
}
}
inList
.
setSendEmail
(
true
);
inListManager
.
save
(
inList
);
inListCache
.
addInListToMap
(
inList
);
}
}
}
}
catch
(
Exception
ex
)
{
log
.
info
(
"入库单超时未完成发送邮件出错:"
+
ex
.
getMessage
());
}
}
public
void
DespositProcess
()
{
try
{
//入库验证时返回了StabilizationEndDate,已经开始入库的入库单任务,自动发送 MaTrackOut 接口
Date
now
=
new
Date
(
System
.
currentTimeMillis
());
Criteria
c
=
Criteria
.
where
(
"appendData.stabilizationEndDate"
).
exists
(
true
).
lt
(
now
);
c
.
and
(
"appendData.maTrackOut"
).
ne
(
true
);
List
<
Barcode
>
barcodeList
=
barcodeManager
.
findByQuery
(
new
Query
(
c
));
for
(
Barcode
barcode
:
barcodeList
)
{
//发送邮件
Micron20031Api
.
mATrackOut
(
barcode
);
barcode
.
updateAppendData
(
"maTrackOut"
,
true
);
barcodeManager
.
saveBarcode
(
barcode
);
}
}
catch
(
Exception
ex
)
{
log
.
info
(
"条码stabilizationEndDate到达后发送 maTrackOut出错:"
+
ex
.
getMessage
());
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论