优化调整
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -37,7 +37,7 @@
|
|||||||
<spring-framework.version>5.3.39</spring-framework.version>
|
<spring-framework.version>5.3.39</spring-framework.version>
|
||||||
<hutool.version>5.8.27</hutool.version>
|
<hutool.version>5.8.27</hutool.version>
|
||||||
<lombok.version>1.18.30</lombok.version>
|
<lombok.version>1.18.30</lombok.version>
|
||||||
<HslCommunication.version>3.7.0</HslCommunication.version>
|
<HslCommunication.version>2.0.0</HslCommunication.version>
|
||||||
<mybatis-plus.version>3.5.2</mybatis-plus.version>
|
<mybatis-plus.version>3.5.2</mybatis-plus.version>
|
||||||
|
|
||||||
</properties>
|
</properties>
|
||||||
|
|||||||
@@ -70,11 +70,12 @@ public interface IRequestLogService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 接收请求,并插入日志
|
* 接收请求,并插入日志
|
||||||
* @param url
|
|
||||||
* @param param
|
* @param param
|
||||||
|
* @param endPoint
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public RequestLog getRequestLog(String url, String param);
|
public RequestLog getRequestLog(String param, String endPoint);
|
||||||
|
|
||||||
|
|
||||||
RequestLog getRequestLog2(String url, String param, String endPoint);
|
RequestLog getRequestLog2(String url, String param, String endPoint);
|
||||||
|
|
||||||
|
|||||||
@@ -481,6 +481,13 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
@Override
|
@Override
|
||||||
public AjaxResult receiveOutMydoJob(StockoutReceive stockoutReceive) {
|
public AjaxResult receiveOutMydoJob(StockoutReceive stockoutReceive) {
|
||||||
|
|
||||||
|
//生成接口记录
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(stockoutReceive), "推送出库作业");
|
||||||
|
requestLog.setResponseBody(JSONUtil.toJsonStr(AjaxResult.success()));
|
||||||
|
requestLog.setResponseStatus("0");
|
||||||
|
requestLog.setIsSuccessful("1");
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
|
||||||
//检查任务是否存在,避免重复生成
|
//检查任务是否存在,避免重复生成
|
||||||
MydoJob job = new MydoJob();
|
MydoJob job = new MydoJob();
|
||||||
job.setWmsTaskNo(stockoutReceive.getTaskCode());
|
job.setWmsTaskNo(stockoutReceive.getTaskCode());
|
||||||
@@ -513,6 +520,8 @@ public class ApiServiceImpl implements IApiService {
|
|||||||
int i = mydoJobService.insertMydoJob(mydoJob);
|
int i = mydoJobService.insertMydoJob(mydoJob);
|
||||||
// boolean success = mydoJobService.saveOrUpdate(mydoJob);
|
// boolean success = mydoJobService.saveOrUpdate(mydoJob);
|
||||||
if (i != 0) {
|
if (i != 0) {
|
||||||
|
requestLog.setResponseStatus("1");
|
||||||
|
requestLogService.updateRequestLog(requestLog);
|
||||||
return AjaxResult.success(
|
return AjaxResult.success(
|
||||||
"【请求成功】wms下发出库作业,下发任务号:" + stockoutReceive.getTaskCode() + ",出库货位:" + stockoutReceive.getSiteCode());
|
"【请求成功】wms下发出库作业,下发任务号:" + stockoutReceive.getTaskCode() + ",出库货位:" + stockoutReceive.getSiteCode());
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ public class RequestLogServiceImpl implements IRequestLogService
|
|||||||
return requestLog;
|
return requestLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @@@ FT568 使用用户自定义的wms请求响应
|
* @@@ FT568 使用用户自定义的wms请求响应
|
||||||
* @param url
|
* @param url
|
||||||
@@ -272,6 +273,8 @@ public class RequestLogServiceImpl implements IRequestLogService
|
|||||||
return requestLog;
|
return requestLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @@@ FT568 将wms自定义的响应格式解析为本地响应格式(减少其他改动)
|
* @@@ FT568 将wms自定义的响应格式解析为本地响应格式(减少其他改动)
|
||||||
* @param responseStr 请求响应字符串
|
* @param responseStr 请求响应字符串
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ package com.ruoyi.common;
|
|||||||
|
|
||||||
public class Constant {
|
public class Constant {
|
||||||
|
|
||||||
public static final String WMS_BASE_URL = "http://192.168.58.10:8082/api2wms";
|
public static final String LOCAL_URL = "http://127.0.0.1:8084";
|
||||||
|
public static final String WMS_BASE_URL = "http://10.88.10.69:8290/service";
|
||||||
public static final String RCS_BASE_URL = "http://192.168.58.101:8182/rcms/services/rest/hikRpcService/";
|
public static final String RCS_BASE_URL = "http://192.168.58.101:8182/rcms/services/rest/hikRpcService/";
|
||||||
|
|
||||||
//#region AGV接口url
|
//#region AGV接口url
|
||||||
|
|||||||
@@ -81,6 +81,10 @@ public class TaskStatusCode {
|
|||||||
*/
|
*/
|
||||||
public static final String TASK_EP_DDJ_FINISH_TIMEOUT = "6_TIMEOUT_FINISH";
|
public static final String TASK_EP_DDJ_FINISH_TIMEOUT = "6_TIMEOUT_FINISH";
|
||||||
|
|
||||||
|
public static final String TASK_EXCEPTION_PUT = "IN_FAULT";
|
||||||
|
|
||||||
|
public static final String TASK_EXCEPTION_PICK = "OUT_FAULT";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务执行阶段 回传wms完成
|
* 任务执行阶段 回传wms完成
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,7 +3,13 @@ package com.ruoyi.device.ddj.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.ruoyi.api.domain.RequestLog;
|
||||||
|
import com.ruoyi.api.service.IRequestLogService;
|
||||||
import com.ruoyi.device.ddj.domain.StackerStatus;
|
import com.ruoyi.device.ddj.domain.StackerStatus;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -24,6 +30,8 @@ import com.ruoyi.device.ddj.service.IMsgDdjService;
|
|||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
import static com.ruoyi.common.Constant.LOCAL_URL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 堆垛机状态表Controller
|
* 堆垛机状态表Controller
|
||||||
*
|
*
|
||||||
@@ -37,6 +45,9 @@ public class MsgDdjController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IMsgDdjService msgDdjService;
|
private IMsgDdjService msgDdjService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRequestLogService requestLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询堆垛机状态表列表
|
* 查询堆垛机状态表列表
|
||||||
*/
|
*/
|
||||||
@@ -108,7 +119,7 @@ public class MsgDdjController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回堆垛机状态的记录类型
|
* 返回堆垛机状态的记录类型 - 中
|
||||||
* @param id 编号
|
* @param id 编号
|
||||||
* @param mode 操作模式
|
* @param mode 操作模式
|
||||||
* @param taskNo 任务号
|
* @param taskNo 任务号
|
||||||
@@ -118,7 +129,7 @@ public class MsgDdjController extends BaseController
|
|||||||
* @param permission 允许下发
|
* @param permission 允许下发
|
||||||
* @param position 当前位置
|
* @param position 当前位置
|
||||||
*/
|
*/
|
||||||
public record StackerStatus(
|
public record StackerStatusContent(
|
||||||
@JsonProperty("堆垛机编号") String id,
|
@JsonProperty("堆垛机编号") String id,
|
||||||
@JsonProperty("操作模式") String mode,
|
@JsonProperty("操作模式") String mode,
|
||||||
@JsonProperty("任务号") String taskNo,
|
@JsonProperty("任务号") String taskNo,
|
||||||
@@ -135,20 +146,22 @@ public class MsgDdjController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/getStackerStatus/{id}")
|
@GetMapping("/getStackerStatus/{id}")
|
||||||
public AjaxResult getStackerStatus(@PathVariable Long id){
|
public AjaxResult getStackerStatus(@PathVariable Long id){
|
||||||
|
|
||||||
//返回堆垛机部分参数的状态映射
|
//返回堆垛机部分参数的状态映射
|
||||||
if (id == 1) {
|
if (id == 1) {
|
||||||
MsgDdj msg = msgDdjService.selectMsgDdjById(id);
|
MsgDdj msg = msgDdjService.selectMsgDdjById(id);
|
||||||
com.ruoyi.device.ddj.domain.StackerStatus status = new com.ruoyi.device.ddj.domain.StackerStatus();
|
// StackerStatus status = new StackerStatus();
|
||||||
|
|
||||||
//操作模式
|
//操作模式
|
||||||
String mode = "其他";
|
String mode;
|
||||||
switch (msg.getCzfs()){
|
switch (msg.getCzfs()){
|
||||||
case 1 -> mode = "手动";
|
case 1 -> mode = "手动";
|
||||||
case 5 -> mode = "联机自动";
|
case 5 -> mode = "联机自动";
|
||||||
|
default -> mode = "其他";
|
||||||
}
|
}
|
||||||
|
|
||||||
//设备状态
|
//设备状态
|
||||||
String deviceStatus = "待机";
|
String deviceStatus;
|
||||||
switch (msg.getSbzt()){
|
switch (msg.getSbzt()){
|
||||||
case 0 -> deviceStatus = "待机";
|
case 0 -> deviceStatus = "待机";
|
||||||
case 1 -> deviceStatus = "运行中";
|
case 1 -> deviceStatus = "运行中";
|
||||||
@@ -156,16 +169,17 @@ public class MsgDdjController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
//执行阶段
|
//执行阶段
|
||||||
String executionPhase = "待机";
|
String executionPhase;
|
||||||
switch (msg.getJdbz()){
|
switch (msg.getJdbz()){
|
||||||
case 1 -> executionPhase = "取货途中";
|
case 1 -> executionPhase = "取货途中";
|
||||||
case 2 -> executionPhase = "取货中";
|
case 2 -> executionPhase = "取货中";
|
||||||
case 3 -> executionPhase = "放货途中";
|
case 3 -> executionPhase = "放货途中";
|
||||||
case 4 -> executionPhase = "放货中";
|
case 4 -> executionPhase = "放货中";
|
||||||
case 5 -> executionPhase = "放货完成";
|
case 5 -> executionPhase = "放货完成";
|
||||||
|
default -> executionPhase = "待机";
|
||||||
}
|
}
|
||||||
|
|
||||||
StackerStatus statusContent = new StackerStatus(
|
StackerStatusContent statusContent = new StackerStatusContent(
|
||||||
String.valueOf(id),
|
String.valueOf(id),
|
||||||
mode,
|
mode,
|
||||||
String.valueOf(msg.getRwh()),
|
String.valueOf(msg.getRwh()),
|
||||||
@@ -175,6 +189,14 @@ public class MsgDdjController extends BaseController
|
|||||||
msg.getYxxf() == 1 ? "允许" : "禁止",
|
msg.getYxxf() == 1 ? "允许" : "禁止",
|
||||||
msg.getCurrentRow() + "排" + msg.getCurrentColumn() + "列" + msg.getCurrentFloor() + "层"
|
msg.getCurrentRow() + "排" + msg.getCurrentColumn() + "列" + msg.getCurrentFloor() + "层"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(String.valueOf(id), "获取指定堆垛机状态");
|
||||||
|
requestLog.setRequestUrl(LOCAL_URL + "/device/ddj/getStackerStatus/" + id);
|
||||||
|
requestLog.setRequestMethod("get");
|
||||||
|
requestLog.setResponseStatus("1");
|
||||||
|
requestLog.setResponseBody(JSON.toJSONString(statusContent));
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
|
||||||
// status.setId(msg.getId());
|
// status.setId(msg.getId());
|
||||||
// status.setMode(msg.getCzfs());
|
// status.setMode(msg.getCzfs());
|
||||||
// status.setTaskNo(msg.getRwh());
|
// status.setTaskNo(msg.getRwh());
|
||||||
@@ -194,4 +216,77 @@ public class MsgDdjController extends BaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回堆垛机状态的记录类型 - 英
|
||||||
|
* @param id 编号
|
||||||
|
* @param mode 操作模式
|
||||||
|
* @param taskNo 任务号
|
||||||
|
* @param deviceStatus 设备状态
|
||||||
|
* @param forkStatus 货叉状态
|
||||||
|
* @param executionPhase 执行阶段
|
||||||
|
* @param permission 允许下发
|
||||||
|
* @param position 当前位置
|
||||||
|
*/
|
||||||
|
public record StackerStatus(
|
||||||
|
Long id,
|
||||||
|
int mode,
|
||||||
|
String taskNo,
|
||||||
|
int deviceStatus,
|
||||||
|
int forkStatus,
|
||||||
|
int executionPhase,
|
||||||
|
int permission,
|
||||||
|
String position){}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求获取堆垛机状态
|
||||||
|
* @param id 堆垛机编号
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getStackerStatus/en/{id}")
|
||||||
|
public AjaxResult getStackerStatusEn(@PathVariable Long id){
|
||||||
|
|
||||||
|
//返回堆垛机部分参数的状态映射
|
||||||
|
if (id == 1) {
|
||||||
|
MsgDdj msg = msgDdjService.selectMsgDdjById(id);
|
||||||
|
|
||||||
|
StackerStatus statusContent = new StackerStatus(
|
||||||
|
id,
|
||||||
|
msg.getCzfs(),
|
||||||
|
String.valueOf(msg.getRwh()),
|
||||||
|
msg.getSbzt(),
|
||||||
|
msg.getHczt(),
|
||||||
|
msg.getJdbz(),
|
||||||
|
msg.getYxxf(),
|
||||||
|
String.format("%02d",msg.getCurrentRow()) + String.format("%02d",msg.getCurrentColumn()) + String.format("%02d",msg.getCurrentFloor())
|
||||||
|
);
|
||||||
|
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(String.valueOf(id), "获取指定堆垛机状态");
|
||||||
|
requestLog.setRequestUrl(LOCAL_URL + "/device/ddj/getStackerStatus/en/" + id);
|
||||||
|
requestLog.setRequestMethod("get");
|
||||||
|
requestLog.setResponseStatus("1");
|
||||||
|
requestLog.setResponseBody(JSON.toJSONString(statusContent));
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
|
||||||
|
// status.setId(msg.getId());
|
||||||
|
// status.setMode(msg.getCzfs());
|
||||||
|
// status.setTaskNo(msg.getRwh());
|
||||||
|
// status.setDeviceStatus(msg.getSbzt());
|
||||||
|
// status.setForkStatus(msg.getHczt());
|
||||||
|
// status.setExecutionPhase(msg.getJdbz());
|
||||||
|
// status.setPermission(msg.getYxxf());
|
||||||
|
// status.setCurrentRow(msg.getCurrentRow());
|
||||||
|
// status.setCurrentColumn(msg.getCurrentColumn());
|
||||||
|
// status.setCurrentFloor(msg.getCurrentFloor());
|
||||||
|
// status.setCurrentRoad(msg.getId());
|
||||||
|
// status.setCurrentPosition(msg.getCurrentRow() + "排" + msg.getCurrentColumn() + "列" + msg.getCurrentFloor() + "层");
|
||||||
|
|
||||||
|
return AjaxResult.success(statusContent);
|
||||||
|
}else{
|
||||||
|
return AjaxResult.error("【查询堆垛机状态】设备编号:" + id + ",查询超出最大索引");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,10 @@ package com.ruoyi.device.ssj.controller;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import com.ruoyi.device.ssj.domain.ConvStatus;
|
import com.ruoyi.api.domain.RequestLog;
|
||||||
|
import com.ruoyi.api.service.IRequestLogService;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
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;
|
||||||
@@ -24,6 +26,8 @@ import com.ruoyi.device.ssj.service.IDeviceSsjService;
|
|||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
import static com.ruoyi.common.Constant.LOCAL_URL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 输送机Controller
|
* 输送机Controller
|
||||||
*
|
*
|
||||||
@@ -37,6 +41,9 @@ public class DeviceSsjController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IDeviceSsjService deviceSsjService;
|
private IDeviceSsjService deviceSsjService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IRequestLogService requestLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询输送机列表
|
* 查询输送机列表
|
||||||
*/
|
*/
|
||||||
@@ -105,10 +112,13 @@ public class DeviceSsjController extends BaseController
|
|||||||
return toAjax(deviceSsjService.deleteDeviceSsjByIds(ids));
|
return toAjax(deviceSsjService.deleteDeviceSsjByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回的输送机状态
|
* 返回的输送机状态 - 中
|
||||||
*/
|
*/
|
||||||
private record ConvStatus(
|
private record ConvStatusContent(
|
||||||
@JsonProperty("输送机编号") String id,
|
@JsonProperty("输送机编号") String id,
|
||||||
@JsonProperty("操作模式") String mode,
|
@JsonProperty("操作模式") String mode,
|
||||||
@JsonProperty("占用状态") String free,
|
@JsonProperty("占用状态") String free,
|
||||||
@@ -122,20 +132,68 @@ public class DeviceSsjController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/getConvStatus/{id}")
|
@GetMapping("/getConvStatus/{id}")
|
||||||
public AjaxResult getConvStatus(@PathVariable String id){
|
public AjaxResult getConvStatus(@PathVariable String id){
|
||||||
|
|
||||||
DeviceSsj msgSsj = deviceSsjService.selectDeviceSsjByDeviceCode(id);
|
DeviceSsj msgSsj = deviceSsjService.selectDeviceSsjByDeviceCode(id);
|
||||||
|
ConvStatusContent status = new ConvStatusContent(
|
||||||
|
id,
|
||||||
|
msgSsj.getMode() == 1 ? "自动" : "手动",
|
||||||
|
msgSsj.getKx() == 1 ? "占用" : "空闲",
|
||||||
|
msgSsj.getDw() == 1 ? "输送到位" : "未到位",
|
||||||
|
// msgSsj.getMode() == 1 ? "1" : "0",
|
||||||
|
// msgSsj.getKx() == 1 ? "1" : "0",
|
||||||
|
// msgSsj.getDw() == 1 ? "1" : "0",
|
||||||
|
String.valueOf(msgSsj.getTaskNo())
|
||||||
|
);
|
||||||
|
|
||||||
if (msgSsj == null) {
|
if (msgSsj == null) {
|
||||||
return AjaxResult.error("【查询输送机状态】设备编号:" + id + ",该设备不存在!");
|
return AjaxResult.error("【查询输送机状态】设备编号:" + id + ",该设备不存在!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(id, "获取指定输送机状态");
|
||||||
|
requestLog.setRequestUrl(LOCAL_URL + "/device/ssj/getConvStatus/" + id);
|
||||||
|
requestLog.setRequestMethod("get");
|
||||||
|
requestLog.setResponseStatus("1");
|
||||||
|
requestLog.setResponseBody(JSON.toJSONString(status));
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
|
||||||
|
return AjaxResult.success(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求返回输送机状态 - 英
|
||||||
|
* @param id 输送机编号
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private record ConvStatus(
|
||||||
|
String id,
|
||||||
|
String mode,
|
||||||
|
String free,
|
||||||
|
String inPosition,
|
||||||
|
int taskNo){}
|
||||||
|
|
||||||
|
@GetMapping("/getConvStatus/en/{id}")
|
||||||
|
public AjaxResult getConvStatusEn(@PathVariable String id){
|
||||||
|
|
||||||
|
DeviceSsj msgSsj = deviceSsjService.selectDeviceSsjByDeviceCode(id);
|
||||||
ConvStatus status = new ConvStatus(
|
ConvStatus status = new ConvStatus(
|
||||||
id,
|
id,
|
||||||
msgSsj.getMode() == 1 ? "自动" : "手动",
|
msgSsj.getMode() == 1 ? "1" : "0",
|
||||||
msgSsj.getKx() == 1 ? "占用" : "空闲",
|
msgSsj.getKx() == 1 ? "1" : "0",
|
||||||
msgSsj.getDw() == 1 ? "输送到位" : "未到位",
|
msgSsj.getDw() == 1 ? "1" : "0",
|
||||||
String.valueOf(msgSsj.getTaskNo())
|
msgSsj.getTaskNo()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (msgSsj == null) {
|
||||||
|
return AjaxResult.error("【查询输送机状态】设备编号:" + id + ",该设备不存在!");
|
||||||
|
}
|
||||||
|
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(id, "获取指定输送机状态");
|
||||||
|
requestLog.setRequestUrl(LOCAL_URL + "/device/ssj/getConvStatus/en/" + id);
|
||||||
|
requestLog.setRequestMethod("get");
|
||||||
|
requestLog.setResponseStatus("1");
|
||||||
|
requestLog.setResponseBody(JSON.toJSONString(status));
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
|
||||||
return AjaxResult.success(status);
|
return AjaxResult.success(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
package com.ruoyi.device.ssj.domain;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@ToString
|
|
||||||
public class ConvStatus {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 输送机编号
|
|
||||||
*/
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 手/自动模式
|
|
||||||
*/
|
|
||||||
private String mode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 0-空闲 1-占用
|
|
||||||
*/
|
|
||||||
private String free;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 0-未到位 1-到位
|
|
||||||
*/
|
|
||||||
private String inPosition;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 任务号
|
|
||||||
*/
|
|
||||||
private String taskNo;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -86,6 +86,9 @@ public class DeviceSsj extends BaseEntity
|
|||||||
@Excel(name="允许放货")
|
@Excel(name="允许放货")
|
||||||
private int allowPut;
|
private int allowPut;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输送状态
|
||||||
|
*/
|
||||||
private int sszt;
|
private int sszt;
|
||||||
|
|
||||||
private int taskNo2;
|
private int taskNo2;
|
||||||
@@ -98,7 +101,7 @@ public class DeviceSsj extends BaseEntity
|
|||||||
/**
|
/**
|
||||||
* 托盘高度
|
* 托盘高度
|
||||||
*/
|
*/
|
||||||
private String height;
|
private int height;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 称重
|
* 称重
|
||||||
|
|||||||
@@ -104,10 +104,5 @@ public class JobCallBackController extends BaseController
|
|||||||
return toAjax(jobCallBackService.deleteJobCallBackByIds(ids));
|
return toAjax(jobCallBackService.deleteJobCallBackByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(fixedDelay=3000)
|
|
||||||
public void jobCallBack() {
|
|
||||||
jobCallBackService.jobCallBack();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,21 +121,4 @@ public class MydoJobController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 处理未正常移除的【堆垛机执行完成】或【出库到位】的遗留任务
|
|
||||||
*/
|
|
||||||
@Scheduled(fixedDelay = 3000)
|
|
||||||
public void mydoJobHandler() {
|
|
||||||
//此处堆垛机执行完成-【TASK_EP_DDJ_FINISH】或出库到位-【TASK_EP_SSJ_STOCKOUT_FINISH】的常量值相同,均可表示任务【已完成】
|
|
||||||
//用其中一种状态查询所有标记为【已完成】的任务
|
|
||||||
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
|
|
||||||
new MydoJob().builder().executionPhase(TASK_EP_DDJ_FINISH).build()
|
|
||||||
);
|
|
||||||
if (!jobs.isEmpty()) {
|
|
||||||
for (MydoJob job : jobs) {
|
|
||||||
mydoJobService.taskFinish(Long.valueOf(job.getTaskNo()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,5 +50,9 @@ public class JobCallBack extends BaseEntity
|
|||||||
@Excel(name = "wms任务编号")
|
@Excel(name = "wms任务编号")
|
||||||
private String taskCode;
|
private String taskCode;
|
||||||
|
|
||||||
|
/** 回传重试次数 */
|
||||||
|
@Excel(name = "重试次数")
|
||||||
|
private int retry;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ public class JobCallBackServiceImpl implements IJobCallBackService
|
|||||||
jobCallBack.setStatus("1");
|
jobCallBack.setStatus("1");
|
||||||
}else{
|
}else{
|
||||||
jobCallBack.setStatus("99");
|
jobCallBack.setStatus("99");
|
||||||
|
jobCallBack.setRetry(jobCallBack.getRetry() + 1);
|
||||||
}
|
}
|
||||||
jobCallBackMapper.updateJobCallBack(jobCallBack);
|
jobCallBackMapper.updateJobCallBack(jobCallBack);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ public class PlcDdj1Read extends Thread {
|
|||||||
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
|
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
|
||||||
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
|
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
|
||||||
|
|
||||||
msgDdj.setCurrentRow(ParseUtil.optInt(26, ddsx));
|
msgDdj.setCurrentRow(ParseUtil.optInt(18, ddsx));
|
||||||
msgDdj.setCurrentColumn(ParseUtil.optInt(26, ddsx));
|
msgDdj.setCurrentColumn(ParseUtil.optInt(18, ddsx));
|
||||||
msgDdj.setCurrentFloor(ParseUtil.optInt(26, ddsx));
|
msgDdj.setCurrentFloor(ParseUtil.optInt(18, ddsx));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +119,8 @@ public class PlcDdj1Read extends Thread {
|
|||||||
|
|
||||||
void closeServer() {
|
void closeServer() {
|
||||||
if (readWriteNet != null) {
|
if (readWriteNet != null) {
|
||||||
readWriteNet.ConnectClose();
|
// readWriteNet.ConnectClose();
|
||||||
|
siemensS7Net.ConnectClose();
|
||||||
}
|
}
|
||||||
setIsConnect(false);
|
setIsConnect(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,8 @@ public class PlcDdj2Read extends Thread {
|
|||||||
|
|
||||||
void closeServer() {
|
void closeServer() {
|
||||||
if (readWriteNet != null) {
|
if (readWriteNet != null) {
|
||||||
readWriteNet.ConnectClose();
|
// readWriteNet.ConnectClose();
|
||||||
|
siemensS7Net.ConnectClose();
|
||||||
}
|
}
|
||||||
setIsConnect(false);
|
setIsConnect(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,9 +108,10 @@ public class PlcSsjRead implements Runnable {
|
|||||||
ssjDevice.setTaskNo(ParseUtil.optDInt(4, ddsx1));
|
ssjDevice.setTaskNo(ParseUtil.optDInt(4, ddsx1));
|
||||||
ssjDevice.setSszt(ParseUtil.optInt(8, ddsx1));
|
ssjDevice.setSszt(ParseUtil.optInt(8, ddsx1));
|
||||||
ssjDevice.setRkqq(ParseUtil.optInt(10, ddsx1));
|
ssjDevice.setRkqq(ParseUtil.optInt(10, ddsx1));
|
||||||
ssjDevice.setTraySize(ParseUtil.optInt(12, ddsx1));
|
ssjDevice.setHeight(ParseUtil.optInt(12, ddsx1));
|
||||||
|
ssjDevice.setTrayCode(ParseUtil.optString(14, ddsx1));
|
||||||
|
ssjDevice.setMode(ParseUtil.optInt(24, ddsx1));//todo 输送机操作模式
|
||||||
ssjDevice.setException(ParseUtil.optInt(28, ddsx1));
|
ssjDevice.setException(ParseUtil.optInt(28, ddsx1));
|
||||||
ssjDevice.setMode(ParseUtil.optInt(30, ddsx1));//todo 输送机操作模式
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +247,8 @@ public class PlcSsjRead implements Runnable {
|
|||||||
|
|
||||||
void closeServer() {
|
void closeServer() {
|
||||||
if (readWriteNet != null) {
|
if (readWriteNet != null) {
|
||||||
readWriteNet.ConnectClose();
|
// readWriteNet.ConnectClose();
|
||||||
|
siemensS7Net.ConnectClose();
|
||||||
}
|
}
|
||||||
setIsConnect(false);
|
setIsConnect(false);
|
||||||
}
|
}
|
||||||
@@ -254,9 +256,13 @@ public class PlcSsjRead implements Runnable {
|
|||||||
public static int writeToSsj(String address, String taskNo, int qx , int completed) {
|
public static int writeToSsj(String address, String taskNo, int qx , int completed) {
|
||||||
|
|
||||||
int jym = Tools.getJYM(Integer.parseInt(taskNo), qx);
|
int jym = Tools.getJYM(Integer.parseInt(taskNo), qx);
|
||||||
|
//任务号
|
||||||
SendData taskNoSendData = new SendData(Tools.DINT, taskNo);
|
SendData taskNoSendData = new SendData(Tools.DINT, taskNo);
|
||||||
|
//去向
|
||||||
SendData qxSendData = new SendData(Tools.INT, qx);
|
SendData qxSendData = new SendData(Tools.INT, qx);
|
||||||
|
//下发完成
|
||||||
SendData completedSendData = new SendData(Tools.INT, completed);
|
SendData completedSendData = new SendData(Tools.INT, completed);
|
||||||
|
//校验码
|
||||||
SendData jymSendData = new SendData(Tools.INT, jym);
|
SendData jymSendData = new SendData(Tools.INT, jym);
|
||||||
byte[] bytes = Tools.sendData(taskNoSendData, qxSendData, completedSendData, jymSendData);
|
byte[] bytes = Tools.sendData(taskNoSendData, qxSendData, completedSendData, jymSendData);
|
||||||
return PlcSsjRead.WriteToSSJ(address, bytes);
|
return PlcSsjRead.WriteToSSJ(address, bytes);
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package com.ruoyi.schedule.scheduleTask;
|
||||||
|
|
||||||
|
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
|
||||||
|
import com.ruoyi.job.domain.MydoJob;
|
||||||
|
import com.ruoyi.job.service.IJobCallBackService;
|
||||||
|
import com.ruoyi.job.service.IMydoJobService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.ruoyi.common.TaskStatusCode.*;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class TaskHandler {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMydoJobService mydoJobService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IJobCallBackService jobCallBackService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBasCargoSpaceService basCargoSpaceService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理未正常移除的【堆垛机执行完成】或【出库到位】的遗留任务
|
||||||
|
*/
|
||||||
|
@Scheduled(fixedDelay = 3000)
|
||||||
|
public void mydoJobHandler() {
|
||||||
|
//此处 - 堆垛机执行完成【TASK_EP_DDJ_FINISH】和出库到位【TASK_EP_SSJ_STOCKOUT_FINISH】的常量值相同,均可表示任务【已完成】
|
||||||
|
//用任意一种状态查询所有标记为【已完成】的任务
|
||||||
|
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
|
||||||
|
new MydoJob().builder().executionPhase(TASK_EP_DDJ_FINISH).build()
|
||||||
|
);
|
||||||
|
if (!jobs.isEmpty()) {
|
||||||
|
for (MydoJob job : jobs) {
|
||||||
|
mydoJobService.taskFinish(Long.valueOf(job.getTaskNo()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 定时扫描未回传或回传异常的任务记录
|
||||||
|
*/
|
||||||
|
@Scheduled(fixedDelay=3000)
|
||||||
|
public void jobCallBack() {
|
||||||
|
jobCallBackService.jobCallBack();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @Scheduled(fixedDelay = 3000)
|
||||||
|
public void stockinExceptionHandler() {
|
||||||
|
List<MydoJob> jobs = mydoJobService.selectInOrOutMydoJobList(
|
||||||
|
new MydoJob().builder().executionPhase(TASK_EXCEPTION_PUT).build()
|
||||||
|
);
|
||||||
|
if (!jobs.isEmpty()) {
|
||||||
|
for (MydoJob job : jobs) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// @Scheduled(fixedDelay = 3000)
|
||||||
|
public void stockoutExceptionHandler() {
|
||||||
|
List<MydoJob> jobs = mydoJobService.selectInOrOutMydoJobList(
|
||||||
|
new MydoJob().builder().executionPhase(TASK_EXCEPTION_PICK).build()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!jobs.isEmpty()) {
|
||||||
|
for (MydoJob job : jobs) {
|
||||||
|
mydoJobService.InvalidMydoJob(Long.valueOf(job.getTaskNo()), Integer.valueOf(job.getRoadwayId()));
|
||||||
|
|
||||||
|
//清空/重置【取货无货】的出库异常货位库存信息
|
||||||
|
basCargoSpaceService.resetCargoSpaceByStockoutException(job.getCargoSpaceId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -31,7 +31,7 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.ruoyi.common.TaskExceptionType.TASK_EXCEPTION_STOCKIN_OCCUPIED;
|
import static com.ruoyi.common.TaskExceptionType.TASK_EXCEPTION_STOCKIN_OCCUPIED;
|
||||||
import static com.ruoyi.common.TaskStatusCode.TASK_EP_DDJ_FINISH;
|
import static com.ruoyi.common.TaskStatusCode.*;
|
||||||
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -155,6 +155,8 @@ public class DdjThread implements Runnable {
|
|||||||
//更新异常类型【FaultFlag】-1
|
//更新异常类型【FaultFlag】-1
|
||||||
if ("0".equals(mydoJob.getFaultFlag()) && "1".equals(ddjDeviceExecutionQueue.getSpare1())) {
|
if ("0".equals(mydoJob.getFaultFlag()) && "1".equals(ddjDeviceExecutionQueue.getSpare1())) {
|
||||||
mydoJob.setStatus("1");
|
mydoJob.setStatus("1");
|
||||||
|
//把执行阶段标记为【入库放货有货】的异常
|
||||||
|
mydoJob.setExecutionPhase(TASK_EXCEPTION_PUT);
|
||||||
mydoJobService.updateMydoJob(mydoJob);
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
|
|
||||||
//上报异常 - 向wms请求重分接口
|
//上报异常 - 向wms请求重分接口
|
||||||
@@ -181,6 +183,7 @@ public class DdjThread implements Runnable {
|
|||||||
//更新任务参数
|
//更新任务参数
|
||||||
mydoJob = mydoJobService.selectMydoJobByTaskNo(rwh);
|
mydoJob = mydoJobService.selectMydoJobByTaskNo(rwh);
|
||||||
mydoJob.setCargoSpaceId(mydoJobReAssign.getSiteCode());
|
mydoJob.setCargoSpaceId(mydoJobReAssign.getSiteCode());
|
||||||
|
mydoJob.setExecutionPhase(TASK_EP_DDJ);
|
||||||
mydoJob.setFaultFlag("2");
|
mydoJob.setFaultFlag("2");
|
||||||
mydoJobService.updateMydoJob(mydoJob);
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
|
|
||||||
@@ -208,6 +211,9 @@ public class DdjThread implements Runnable {
|
|||||||
if (ddj.getCzfs() == 5 && ddj.getSbzt() == 1053 && ddj.getJdbz() < 5) {
|
if (ddj.getCzfs() == 5 && ddj.getSbzt() == 1053 && ddj.getJdbz() < 5) {
|
||||||
Long rwh = ddj.getRwh();
|
Long rwh = ddj.getRwh();
|
||||||
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(rwh);
|
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(rwh);
|
||||||
|
//把执行阶段标记为【出库取货无货】的异常
|
||||||
|
mydoJob.setExecutionPhase(TASK_EXCEPTION_PICK);
|
||||||
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
|
|
||||||
//无货异常处理
|
//无货异常处理
|
||||||
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(rwh,ddj.getId());
|
DdjDeviceExecutionQueue ddjDeviceExecutionQueue = ddjDeviceExecutionQueueService.selectDdjDeviceExecutionQueueByRwh(rwh,ddj.getId());
|
||||||
|
|||||||
@@ -158,9 +158,9 @@ public class PortConvThread implements Runnable {
|
|||||||
paramMap.put("taskTypeCode", WMS_TASK_TYPE_STOCKIN);//todo wms自定义的任务类型编号
|
paramMap.put("taskTypeCode", WMS_TASK_TYPE_STOCKIN);//todo wms自定义的任务类型编号
|
||||||
paramMap.put("reqCode", UUID.randomUUID().toString());//请求码
|
paramMap.put("reqCode", UUID.randomUUID().toString());//请求码
|
||||||
paramMap.put("cntCode", inSsjDevice.getTrayCode());//容器编号
|
paramMap.put("cntCode", inSsjDevice.getTrayCode());//容器编号
|
||||||
String height = inSsjDevice.getHeight();
|
int height = inSsjDevice.getHeight();
|
||||||
// String weight = inSsjDevice.getWeight();//todo 需要直读重量或从plc读值?
|
// String weight = inSsjDevice.getWeight();//todo 需要直读重量或从plc读值?
|
||||||
paramMap.put("weight", getWeight(MOXA_IP, MOXA_PORT, SO_TIMEOUT_MS));//重量
|
paramMap.put("weight", getWeightByMoxa(MOXA_IP, MOXA_PORT, SO_TIMEOUT_MS));//重量
|
||||||
paramMap.put("altimetry", height);//高度
|
paramMap.put("altimetry", height);//高度
|
||||||
String errorMessage = "";
|
String errorMessage = "";
|
||||||
|
|
||||||
@@ -325,7 +325,7 @@ public class PortConvThread implements Runnable {
|
|||||||
* @param timeout 最大等待时间(单位:毫秒),建议 2000~5000
|
* @param timeout 最大等待时间(单位:毫秒),建议 2000~5000
|
||||||
* @return 重量(kg),成功时为非 NaN 的 Double;失败(超时/断连/解析失败)返回 null
|
* @return 重量(kg),成功时为非 NaN 的 Double;失败(超时/断连/解析失败)返回 null
|
||||||
*/
|
*/
|
||||||
public static Double getWeight(String moxaIp, int moxaPort, long timeout) {
|
public static Double getWeightByMoxa(String moxaIp, int moxaPort, long timeout) {
|
||||||
Socket socket = null;
|
Socket socket = null;
|
||||||
try {
|
try {
|
||||||
// 1️⃣ - 建立连接(带连接超时)
|
// 1️⃣ - 建立连接(带连接超时)
|
||||||
|
|||||||
@@ -14,10 +14,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="reqCode" column="req_code" />
|
<result property="reqCode" column="req_code" />
|
||||||
<result property="taskTypeCode" column="task_type_code" />
|
<result property="taskTypeCode" column="task_type_code" />
|
||||||
<result property="taskCode" column="task_code" />
|
<result property="taskCode" column="task_code" />
|
||||||
|
<result property="retry" column="retry" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectJobCallBackVo">
|
<sql id="selectJobCallBackVo">
|
||||||
select id, type, task_no, mydoJob_Id, status, create_time,req_code,task_type_code,task_code from job_call_back
|
select id, type, task_no, mydoJob_Id, status, create_time, req_code, task_type_code, task_code, retry from job_call_back
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectJobCallBackList" parameterType="JobCallBack" resultMap="JobCallBackResult">
|
<select id="selectJobCallBackList" parameterType="JobCallBack" resultMap="JobCallBackResult">
|
||||||
@@ -30,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="reqCode != null and reqCode != ''"> and req_code = #{reqCode}</if>
|
<if test="reqCode != null and reqCode != ''"> and req_code = #{reqCode}</if>
|
||||||
<if test="taskTypeCode != null and taskTypeCode != ''"> and task_type_code = #{taskTypeCode}</if>
|
<if test="taskTypeCode != null and taskTypeCode != ''"> and task_type_code = #{taskTypeCode}</if>
|
||||||
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
<if test="taskCode != null and taskCode != ''"> and task_code = #{taskCode}</if>
|
||||||
|
<if test="retry != null and retry != ''"> and retry = #{retry}</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -39,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</select>
|
</select>
|
||||||
<select id="selectJobCallBackListNoSuccess" resultMap="JobCallBackResult">
|
<select id="selectJobCallBackListNoSuccess" resultMap="JobCallBackResult">
|
||||||
<include refid="selectJobCallBackVo"/>
|
<include refid="selectJobCallBackVo"/>
|
||||||
where status != '1'
|
where status != '1' and retry < 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertJobCallBack" parameterType="JobCallBack" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertJobCallBack" parameterType="JobCallBack" useGeneratedKeys="true" keyProperty="id">
|
||||||
@@ -53,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="reqCode != null">req_code,</if>
|
<if test="reqCode != null">req_code,</if>
|
||||||
<if test="taskTypeCode != null">task_type_code,</if>
|
<if test="taskTypeCode != null">task_type_code,</if>
|
||||||
<if test="taskCode != null">task_code,</if>
|
<if test="taskCode != null">task_code,</if>
|
||||||
|
<if test="retry != null">retry,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="type != null">#{type},</if>
|
<if test="type != null">#{type},</if>
|
||||||
@@ -63,6 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="reqCode != null">#{reqCode},</if>
|
<if test="reqCode != null">#{reqCode},</if>
|
||||||
<if test="taskTypeCode != null">#{taskTypeCode},</if>
|
<if test="taskTypeCode != null">#{taskTypeCode},</if>
|
||||||
<if test="taskCode != null">#{taskCode},</if>
|
<if test="taskCode != null">#{taskCode},</if>
|
||||||
|
<if test="retry != null">#{retry},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@@ -77,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="reqCode != null">req_code = #{reqCode},</if>
|
<if test="reqCode != null">req_code = #{reqCode},</if>
|
||||||
<if test="taskTypeCode != null">task_type_code = #{taskTypeCode},</if>
|
<if test="taskTypeCode != null">task_type_code = #{taskTypeCode},</if>
|
||||||
<if test="taskCode != null">task_code = #{taskCode},</if>
|
<if test="taskCode != null">task_code = #{taskCode},</if>
|
||||||
|
<if test="retry != null">retry = #{retry},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@@ -93,7 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="getTopJobCallBack" resultMap="JobCallBackResult">
|
<select id="getTopJobCallBack" resultMap="JobCallBackResult">
|
||||||
select top(1) id, type, task_no, mydoJob_Id, status, create_time,req_code,task_type_code,task_code from job_call_back
|
select top(1) id, type, task_no, mydoJob_Id, status, create_time,req_code,task_type_code,task_code,retry from job_call_back
|
||||||
where status = '0' and spare1 in ('0','1','2')
|
where status = '0' and spare1 in ('0','1','2')
|
||||||
order by create_time asc
|
order by create_time asc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -119,9 +119,9 @@ public class SecurityConfig
|
|||||||
.antMatchers("/agv/api/**").permitAll()
|
.antMatchers("/agv/api/**").permitAll()
|
||||||
.antMatchers("/device/api/**").permitAll()
|
.antMatchers("/device/api/**").permitAll()
|
||||||
.antMatchers("/wcs2Wms/api/**").permitAll()
|
.antMatchers("/wcs2Wms/api/**").permitAll()
|
||||||
.antMatchers("/largeScreen/monitor/**").permitAll()
|
.antMatchers("/largeScreen/monitor/**").permitAll();
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated();
|
// .anyRequest().authenticated();
|
||||||
})
|
})
|
||||||
// 添加Logout filter
|
// 添加Logout filter
|
||||||
.logout(logout -> logout.logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler))
|
.logout(logout -> logout.logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler))
|
||||||
|
|||||||
Reference in New Issue
Block a user