|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
package org.dromara.wms.service.impl;
|
|
|
|
|
|
|
|
|
|
import com.sun.mail.imap.IMAPFolder;
|
|
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
@ -17,13 +16,9 @@ import org.dromara.wms.domain.bo.WmsInstockPrintBo;
|
|
|
|
|
import org.dromara.wms.domain.vo.WmsInstockPrintVo;
|
|
|
|
|
import org.dromara.wms.mapper.WmsInstockPrintMapper;
|
|
|
|
|
import org.dromara.wms.service.IWmsInstockPrintService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.mail.Folder;
|
|
|
|
|
import javax.mail.MessagingException;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Collection;
|
|
|
|
@ -39,8 +34,6 @@ import java.util.Collection;
|
|
|
|
|
public class WmsInstockPrintServiceImpl implements IWmsInstockPrintService {
|
|
|
|
|
|
|
|
|
|
private final WmsInstockPrintMapper baseMapper;
|
|
|
|
|
@Autowired
|
|
|
|
|
private Folder inbox;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询入库单-物料打印条码
|
|
|
|
@ -67,14 +60,6 @@ public class WmsInstockPrintServiceImpl implements IWmsInstockPrintService {
|
|
|
|
|
Page<WmsInstockPrintVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
|
|
|
return TableDataInfo.build(result);
|
|
|
|
|
}
|
|
|
|
|
@Async
|
|
|
|
|
public void idle() throws MessagingException {
|
|
|
|
|
// 启用IDLE模式
|
|
|
|
|
System.out.println("开始监听收件箱...");
|
|
|
|
|
while (true) {
|
|
|
|
|
((IMAPFolder) inbox).idle(); // 启用IDLE模式,等待新邮件
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询符合条件的入库单-物料打印条码列表
|
|
|
|
|