Commit 3a3c6a8d LN

20031锡膏料仓修改:入库单增加ri入库。增加unload接口。

1 个父辈 ef46faa2
...@@ -99,7 +99,7 @@ public class InListController { ...@@ -99,7 +99,7 @@ public class InListController {
if (inListItems.size() <= 0) { if (inListItems.size() <= 0) {
continue; 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); InList dbList = inListManager.findByName(name);
if (dbList != null) { if (dbList != null) {
...@@ -281,7 +281,7 @@ public class InListController { ...@@ -281,7 +281,7 @@ public class InListController {
String pn = lineValues[pnIndex]; String pn = lineValues[pnIndex];
Integer num= Convert.toInt(lineValues[numIndex]); Integer num= Convert.toInt(lineValues[numIndex]);
if(ObjectUtil.isNotEmpty(pn)&&num>0){ 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){ }catch (Exception ex){
......
...@@ -22,6 +22,8 @@ public class InListItemDto implements Serializable { ...@@ -22,6 +22,8 @@ public class InListItemDto implements Serializable {
@ApiModelProperty(value = "入库单名称") @ApiModelProperty(value = "入库单名称")
private String name; private String name;
@ApiModelProperty(value = "唯一码")
private String ri;
@ApiModelProperty(value = "物料编号") @ApiModelProperty(value = "物料编号")
private String PN; private String PN;
......
...@@ -30,4 +30,9 @@ public class InList extends BasePo implements Serializable { ...@@ -30,4 +30,9 @@ public class InList extends BasePo implements Serializable {
* 开始入库单入库时间,超时需要发送邮件 * 开始入库单入库时间,超时需要发送邮件
*/ */
private long startTime=0L; private long startTime=0L;
/**
* 超时未完成,已发送邮件通知
*/
private boolean sendEmail=false;
} }
package com.neotel.smfcore.core.inList.service.po; 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.common.base.BasePo;
import com.neotel.smfcore.core.inList.bean.ItemReelInfo; import com.neotel.smfcore.core.inList.bean.ItemReelInfo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -15,6 +16,13 @@ import java.util.List; ...@@ -15,6 +16,13 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
public class InListItem extends BasePo implements Serializable { 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 { ...@@ -24,20 +32,25 @@ public class InListItem extends BasePo implements Serializable {
* 物料编号 * 物料编号
*/ */
private String PN; 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 { ...@@ -46,8 +59,12 @@ public class InListItem extends BasePo implements Serializable {
public void addReelInfo(ItemReelInfo reelInfo){ public void addReelInfo(ItemReelInfo reelInfo){
if(ObjectUtil.isEmpty(ri)){
inNum+=reelInfo.getInNum();
}else{
inNum=num;
}
reelLists.add(reelInfo); reelLists.add(reelInfo);
inNum+=reelInfo.getInNum();
inReelCount+=1; inReelCount+=1;
} }
......
...@@ -17,6 +17,7 @@ import org.springframework.data.mongodb.core.query.Criteria; ...@@ -17,6 +17,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 java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -60,7 +61,27 @@ public class InListCache { ...@@ -60,7 +61,27 @@ public class InListCache {
inListMap.put(inList.getName(), inList); 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){ public InList getInList(String name){
if(ObjectUtil.isEmpty(name)){
return null;
}
InList inList= inListMap.get(name); InList inList= inListMap.get(name);
if(inList==null){ if(inList==null){
inList=listManager.findByName(name); inList=listManager.findByName(name);
...@@ -87,8 +108,15 @@ public class InListCache { ...@@ -87,8 +108,15 @@ public class InListCache {
for (InListItem item : inList.getInListItems() for (InListItem item : inList.getInListItems()
) { ) {
if (item.getPN().equals(barcode.getPartNumber())) { if(ObjectUtil.isEmpty(item.getRi())) {
updateOk = true; 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())); item.addReelInfo(new ItemReelInfo(barcode.getBarcode(), barcode.getAmount(), new Date(), pos.getPosName()));
listItemManager.save(item); listItemManager.save(item);
log.info("UpdateInList 成功: 入库单[" + inListName + "]posName[" + pos.getPosName() + "]PN[" + barcode.getPartNumber() + "]RI[" + barcode.getBarcode() + "]num[" + barcode.getAmount() + "]"); log.info("UpdateInList 成功: 入库单[" + inListName + "]posName[" + pos.getPosName() + "]PN[" + barcode.getPartNumber() + "]RI[" + barcode.getBarcode() + "]num[" + barcode.getAmount() + "]");
......
...@@ -4,9 +4,9 @@ import cn.hutool.core.convert.Convert; ...@@ -4,9 +4,9 @@ import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
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.po.StoragePos; import com.neotel.smfcore.core.storage.service.po.StoragePos;
import com.neotel.smfcore.custom.micron20031.bean.PosInfoDto; import com.neotel.smfcore.custom.micron20031.bean.dto.PosInfoDto;
import com.neotel.smfcore.custom.micron20031.bean.PosRowDto; import com.neotel.smfcore.custom.micron20031.bean.dto.PosRowDto;
import com.neotel.smfcore.custom.micron20031.bean.PosValueInfo; import com.neotel.smfcore.custom.micron20031.bean.dto.PosValueInfo;
import com.neotel.smfcore.security.annotation.AnonymousAccess; import com.neotel.smfcore.security.annotation.AnonymousAccess;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
......
...@@ -19,10 +19,12 @@ import io.swagger.annotations.ApiOperation; ...@@ -19,10 +19,12 @@ import io.swagger.annotations.ApiOperation;
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.web.bind.annotation.GetMapping; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
@Slf4j @Slf4j
@RestController @RestController
...@@ -62,8 +64,9 @@ public class MicronSpLoadController { ...@@ -62,8 +64,9 @@ public class MicronSpLoadController {
for (DepositMatReqBean bean : for (DepositMatReqBean bean :
beans) { beans) {
InListItem item = new InListItem(); InListItem item = new InListItem();
item.setPN(bean.getMicronPN()); //改为唯一码方式
item.setNum(bean.getQuantity()); item.setRi(bean.getMicronPN());
item.setNum(1);
item.setName(matReqNo); item.setName(matReqNo);
items.add(item); items.add(item);
} }
...@@ -85,7 +88,8 @@ public class MicronSpLoadController { ...@@ -85,7 +88,8 @@ public class MicronSpLoadController {
@ApiOperation("开始入库单 入库") @ApiOperation("开始入库单 入库")
@RequestMapping(value = "/desposit/start") @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); InList inList = inListCache.getInList(matReqNo);
if (inList == null) { if (inList == null) {
return ResultBean.newErrorResult(-1, "smfcore.micron.operationFailure", "操作失败"); return ResultBean.newErrorResult(-1, "smfcore.micron.operationFailure", "操作失败");
......
...@@ -9,7 +9,7 @@ import com.neotel.smfcore.core.storage.bean.InventoryItem; ...@@ -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.dto.InventoryItemDto;
import com.neotel.smfcore.core.storage.rest.mapstruct.InventoryItemMapper; import com.neotel.smfcore.core.storage.rest.mapstruct.InventoryItemMapper;
import com.neotel.smfcore.custom.micron20031.bean.MatOrderBean; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
......
...@@ -7,12 +7,14 @@ import com.neotel.smfcore.common.exception.ValidateException; ...@@ -7,12 +7,14 @@ 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.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.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;
import com.neotel.smfcore.custom.micron20031.bean.dto.SpUnloadDto;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.Data; import lombok.Data;
...@@ -23,6 +25,7 @@ import org.springframework.data.mongodb.core.query.Query; ...@@ -23,6 +25,7 @@ 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.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -46,8 +49,8 @@ public class MicronSpUnloadController { ...@@ -46,8 +49,8 @@ public class MicronSpUnloadController {
@ApiOperation("出库:Withdraw Offline GetEquipIDList") @ApiOperation("Withdraw Offline出库: GetEquipIDList")
@GetMapping(value = "/unload/offlineIdList") @GetMapping(value = "/unload/getEquipIdList")
public ResultBean getEquipIdList() { public ResultBean getEquipIdList() {
try { try {
...@@ -58,9 +61,9 @@ public class MicronSpUnloadController { ...@@ -58,9 +61,9 @@ public class MicronSpUnloadController {
} }
} }
@ApiOperation("出库:Withdraw Offline GetMicronPN") @ApiOperation("Withdraw Offline出库: GetMicronPN")
@GetMapping(value = "/unload/getMicronPN") @GetMapping(value = "/unload/getMicronPN")
public ResultBean GetMicronPN(String lotId,String lineId) { public ResultBean getMicronPN(String lotId,String lineId) {
try { try {
String pn = Micron20031Api.getMicronPN(lotId, lineId); String pn = Micron20031Api.getMicronPN(lotId, lineId);
...@@ -76,7 +79,7 @@ public class MicronSpUnloadController { ...@@ -76,7 +79,7 @@ public class MicronSpUnloadController {
//验证 //验证
Micron20031Api.chkAuthoriseToDispatch(pos.getBarcode(), Micron20031Api.MODE_ENABLE_MAM_SAP, SecurityUtils.getCurrentUsername()); Micron20031Api.chkAuthoriseToDispatch(pos.getBarcode(), Micron20031Api.MODE_ENABLE_MAM_SAP, SecurityUtils.getCurrentUsername());
log.info("unload/getMicronPN [" + pn + "] barcode [" + pos.getBarcode().getBarcode() + "] chkAuthoriseToDispatch 成功"); log.info("unload/getMicronPN [" + pn + "] barcode [" + pos.getBarcode().getBarcode() + "] chkAuthoriseToDispatch 成功");
StoragePosDto dto = storagePosMapper.toDto(pos); SpUnloadDto dto=getUnloadDto(pos,1);
return ResultBean.newOkResult(dto); return ResultBean.newOkResult(dto);
} catch (ApiException ex) { } catch (ApiException ex) {
log.error("unload/getMicronPN [" + pn + "] barcode [" + pos.getBarcode().getBarcode() + "] chkAuthoriseToDispatch 失败:" + ex.toString()); log.error("unload/getMicronPN [" + pn + "] barcode [" + pos.getBarcode().getBarcode() + "] chkAuthoriseToDispatch 失败:" + ex.toString());
...@@ -95,7 +98,14 @@ public class MicronSpUnloadController { ...@@ -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") @PutMapping("/unload/checkout")
public ResultBean checkout( @RequestBody Map<String,String> params) { public ResultBean checkout( @RequestBody Map<String,String> params) {
...@@ -109,7 +119,6 @@ public class MicronSpUnloadController { ...@@ -109,7 +119,6 @@ public class MicronSpUnloadController {
if (storage == null) { if (storage == null) {
throw new ValidateException("smfcore.valueNotExist", "{0}[{1}]不存在", new String[]{"storageId", pos.getStorageId()}); throw new ValidateException("smfcore.valueNotExist", "{0}[{1}]不存在", new String[]{"storageId", pos.getStorageId()});
} }
log.info("出库料仓【" + storage.getName() + "_" + storage.getCid() + "】位置仓位【" + pos.getPosName() + "】"); log.info("出库料仓【" + storage.getName() + "_" + storage.getCid() + "】位置仓位【" + pos.getPosName() + "】");
String outResult = taskService.checkout(storage, pos, true, SecurityUtils.getCurrentUsername()); String outResult = taskService.checkout(storage, pos, true, SecurityUtils.getCurrentUsername());
if (!Strings.isNullOrEmpty(outResult)) { if (!Strings.isNullOrEmpty(outResult)) {
...@@ -117,4 +126,63 @@ public class MicronSpUnloadController { ...@@ -117,4 +126,63 @@ public class MicronSpUnloadController {
} }
return ResultBean.newOkResult(""); 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入库。
} }
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!