文本优化,部分接口地址修正

This commit is contained in:
CTOS
2026-04-29 13:32:49 +08:00
parent af7b65f6dd
commit 671a83b493
8 changed files with 29 additions and 24 deletions

View File

@@ -23,6 +23,7 @@ import com.ruoyi.api.domain.wcs2wms.exception.TaskExceptionReceive;
import com.ruoyi.api.domain.wcs2wms.exception.TaskExceptionRequest;
import com.ruoyi.api.domain.wcs2wms.stockout.StockoutReceive;
import com.ruoyi.api.service.IApiService;
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
import com.ruoyi.bas.port.domain.WcsPort;
import com.ruoyi.bas.port.service.IWcsPortService;
import com.ruoyi.common.GoodsType;
@@ -65,7 +66,8 @@ public class ApiServiceImpl implements IApiService {
private IMydoJobService mydoJobService;
@Autowired
private IWcsPortService wcsPortService;
@Autowired
private IBasCargoSpaceService basCargoSpaceService;
/**
@@ -507,6 +509,9 @@ public class ApiServiceImpl implements IApiService {
mydoJob.setTaskNo(mydoJobService.getTaskNo("3"));
mydoJob.setWmsTaskNo(stockoutReceive.getTaskCode());
mydoJob.setCargoSpaceId(stockoutReceive.getSiteCode());
mydoJob.setRoadwayId(
basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(stockoutReceive.getSiteCode()).getRoadwayId()
);
mydoJob.setTraySize(GoodsType.TYPE_DEFAULT);//默认
mydoJob.setExitId(CONV_STOCKOUT);
mydoJob.setInOrOut("2");

View File

@@ -72,9 +72,9 @@ public class PlcDdj1Read extends Thread {
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
msgDdj.setCurrentRow(ParseUtil.optInt(18, ddsx));
msgDdj.setCurrentColumn(ParseUtil.optInt(18, ddsx));
msgDdj.setCurrentFloor(ParseUtil.optInt(18, ddsx));
msgDdj.setCurrentRow(ParseUtil.optInt(12, ddsx));
msgDdj.setCurrentColumn(ParseUtil.optInt(14, ddsx));
msgDdj.setCurrentFloor(ParseUtil.optInt(16, ddsx));
}
}

View File

@@ -110,7 +110,7 @@ public class PlcSsjRead implements Runnable {
ssjDevice.setRkqq(ParseUtil.optInt(10, ddsx1));
ssjDevice.setHeight(ParseUtil.optInt(12, ddsx1));
ssjDevice.setTraySize(ParseUtil.optInt(12, ddsx1)); //此处不修改device_ssj表,把托盘尺寸值当作高度使用
ssjDevice.setTrayCode(ParseUtil.optString(14, ddsx1));
ssjDevice.setTrayCode(ParseUtil.optString(14, ddsx1).replaceAll("\\s", ""));
ssjDevice.setMode(ParseUtil.optInt(24, ddsx1));//todo 输送机操作模式
ssjDevice.setException(ParseUtil.optInt(28, ddsx1));
}

View File

@@ -46,7 +46,7 @@ public class ParseUtil {
*/
public static String optString(int start, String data) {
byte[] bytes = SoftBasic.HexStringToBytes(data.substring(start * 2, (start + 10) * 2));
byte[] bytes = SoftBasic.HexStringToBytes(data.substring(start * 2, (start + 7) * 2));
return Tools.bytetostringtool(bytes);
}

View File

@@ -123,7 +123,7 @@ public class DdjThread implements Runnable {
mydoJobService.updateMydoJob(mydoJob);
//回传完成信号 - 方法在存储过程【proc_mydojob_finish】中
ddjTaskFinish(rwh, ddj.getId());
log.info("【堆垛机入库】堆垛机:"+ddj.getId()+"任务完成,任务号:"+ddj.getRwh());
log.info("【堆垛机入库】堆垛机编号:" + ddj.getId() + " 执行完成,任务结束,任务号:"+ddj.getRwh());
}
}
@@ -318,9 +318,9 @@ public class DdjThread implements Runnable {
ddjDeviceExecutionQueue.setXfsj(DateUtil.formatDateTime(DateUtil.date()));
ddjDeviceExecutionQueue.setDdjxf("1");
ddjDeviceExecutionQueueService.updateDdjDeviceExecutionQueue(ddjDeviceExecutionQueue);
log.info("【执行成功】堆垛机下发任务成功 rwh:{}", ddjDeviceExecutionQueue.getRwh());
log.info("【堆垛机入库】下发任务成功,任务执行中, 任务号:{}", ddjDeviceExecutionQueue.getRwh());
} else {
log.error("【执行异常】堆垛机下发任务失败!!!!!!!");
log.error("【堆垛机入库】执行异常, 堆垛机下发任务失败!");
}
}
}

View File

@@ -155,10 +155,10 @@ public class PortConvThread implements Runnable {
private void requestMydoJob(DeviceSsj inSsjDevice){
//请求成功已经生成该任务则不继续执行
boolean isEmpty = mydoJobService.selectInOrOutMydoJobList(
int count = mydoJobService.selectInOrOutMydoJobList(
new MydoJob().builder().trayCode(inSsjDevice.getTrayCode()).build()
).isEmpty();
if (!isEmpty) return;
).size();
if (count > 0) return;
String errorMessage = "";
@@ -168,7 +168,7 @@ public class PortConvThread implements Runnable {
HashMap<String, Object> paramMap = new HashMap<>();
paramMap.put("taskTypeCode", WMS_TASK_TYPE_STOCKIN);//wms自定义的任务类型编号
paramMap.put("reqCode", UUID.randomUUID().toString());//请求码
paramMap.put("cntCode", inSsjDevice.getTrayCode());//容器编号
paramMap.put("cntCode", inSsjDevice.getTrayCode().trim());//容器编号
int height = inSsjDevice.getHeight();
// String weight = inSsjDevice.getWeight();//不需要直读重量或从plc读值,wms不需要该参数
// paramMap.put("weight", getWeightByMoxa(MOXA_IP, MOXA_PORT, SO_TIMEOUT_MS));//重量
@@ -262,7 +262,7 @@ public class PortConvThread implements Runnable {
mydoJobStockin.setStatus(TASK_STATUS_RUNNING);
mydoJobStockin.setExecutionPhase(TASK_EP_SSJ);
mydoJobService.updateMydoJob(mydoJobStockin);
log.info("【更新状态】G1004入口输送机下发任务号成功:{}", mydoJobStockin.getTaskNo());
log.info("【更新状态】G1004入口输送机下发成功,任务号:{},入库执行中", mydoJobStockin.getTaskNo());
}
}