入库优化
This commit is contained in:
@@ -31,6 +31,6 @@ public class RuoYiApplication
|
||||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 福来瑞达WCS系统启动成功 ლ(´ڡ`ლ)゙ ");
|
||||
System.out.println("(♥◠‿◠)ノ゙ 福莱瑞达WCS系统启动成功 ლ(´ڡ`ლ)゙ ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,6 +116,8 @@ public class PortConvThread implements Runnable {
|
||||
// inSsjDevice.setException(0);
|
||||
// inSsjDevice.setRkqq(1);
|
||||
|
||||
//输送机状态
|
||||
if (!convChecked(inSsjDevice)) return;
|
||||
//更新入库任务阶段
|
||||
updateMydoJob(inSsjDevice);
|
||||
//请求wms获取入库任务
|
||||
@@ -133,11 +135,13 @@ public class PortConvThread implements Runnable {
|
||||
|
||||
boolean flag = false;
|
||||
//---------------------------入口取输送机(叉车取放货位置)---------------------------
|
||||
//输送机【非空闲】、【输送到位】、【入库请求?】
|
||||
if (inSsjDevice.getKx() != 0) return flag;
|
||||
//输送机【条码】空
|
||||
if (inSsjDevice.getTrayCode() == "" || inSsjDevice.getTrayCode() == null) return flag;
|
||||
|
||||
//【入库请求】,表示输送到位和空闲
|
||||
if (inSsjDevice.getRkqq() != 1) return flag;
|
||||
|
||||
//【输送高度】
|
||||
if (inSsjDevice.getHeight() == 0) return flag;
|
||||
|
||||
return true;
|
||||
@@ -150,7 +154,11 @@ public class PortConvThread implements Runnable {
|
||||
*/
|
||||
private void requestMydoJob(DeviceSsj inSsjDevice){
|
||||
|
||||
if (!convChecked(inSsjDevice)) return;
|
||||
//请求成功已经生成该任务则不继续执行
|
||||
boolean isEmpty = mydoJobService.selectInOrOutMydoJobList(
|
||||
new MydoJob().builder().trayCode(inSsjDevice.getTrayCode()).build()
|
||||
).isEmpty();
|
||||
if (!isEmpty) return;
|
||||
|
||||
String errorMessage = "";
|
||||
|
||||
@@ -178,6 +186,7 @@ public class PortConvThread implements Runnable {
|
||||
log.warn("【警告】该托盘号已有库存,托盘条码:{}",inSsjDevice.getTrayCode());
|
||||
}
|
||||
|
||||
|
||||
/*-----------------请求生成wcs任务----------------- */
|
||||
ajaxResult = apiService.createMydoJobForStockin(paramMap);
|
||||
if (ajaxResult.isSuccess()) {
|
||||
@@ -236,12 +245,10 @@ public class PortConvThread implements Runnable {
|
||||
*/
|
||||
private void updateMydoJob(DeviceSsj inSsjDevice){
|
||||
|
||||
if (!convChecked(inSsjDevice)) return;
|
||||
|
||||
//检查是否有已经创建成功的任务(请求成功的入库任务) - 更新到下一个执行阶段
|
||||
MydoJob mydoJobStockin = new MydoJob().builder()
|
||||
.trayCode(inSsjDevice.getTrayCode())
|
||||
.status(TASK_EP_CREATED)
|
||||
.status(TASK_STATUS_CREATED)
|
||||
.executionPhase(TASK_EP_CREATED)
|
||||
.build();
|
||||
if(!mydoJobService.selectMydoJobList(mydoJobStockin).isEmpty()){
|
||||
@@ -264,6 +271,7 @@ public class PortConvThread implements Runnable {
|
||||
|
||||
/**
|
||||
* 输送机出库到位 - 任务出库完成
|
||||
* 出库完成在升降位置,即【TD1001】判断完成
|
||||
* @param outSsjDevice
|
||||
*/
|
||||
private void finishStockoutMydoJob(DeviceSsj outSsjDevice){
|
||||
@@ -422,10 +430,18 @@ public class PortConvThread implements Runnable {
|
||||
|
||||
public void outDispatch(DeviceSsj ssjDevice) {
|
||||
|
||||
//出库完成
|
||||
finishStockoutMydoJob(ssjDevice);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private static final Map<String, Pattern> PATTERNS = createPatterns();
|
||||
|
||||
private static Map<String, Pattern> createPatterns() {
|
||||
|
||||
Reference in New Issue
Block a user