rev:删除无用代码
This commit is contained in:
@@ -1,55 +0,0 @@
|
||||
|
||||
package org.nl.acs.ext.wms;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.common.base.CommonFinalParam;
|
||||
import org.nl.acs.log.service.DeviceExecuteLogService;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.language.LangProcess;
|
||||
import org.nl.config.lucene.service.LuceneExecuteLogService;
|
||||
import org.nl.config.lucene.service.dto.LuceneLogDto;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
|
||||
/**
|
||||
* ACS连接外部系统工具类:
|
||||
*/
|
||||
@Slf4j
|
||||
public class AcsUtil {
|
||||
|
||||
|
||||
public static <W> String notifyAcs(String api, W requestParam) {
|
||||
LuceneExecuteLogService logServer = SpringContextHolder.getBean(LuceneExecuteLogService.class);;
|
||||
ISysParamService paramService = SpringContextHolder.getBean(SysParamServiceImpl.class);
|
||||
//判断是否连接立库WCS系统
|
||||
String isConnect = paramService.findByCode("is_connect_liKu_Wcs").getValue();
|
||||
if (StrUtil.equals("0", isConnect)) {
|
||||
throw new BadRequestException(LangProcess.msg("error_config"));
|
||||
}
|
||||
String liKu_wcs_url = paramService.findByCode("liKu_wcs_url").getValue();
|
||||
try {
|
||||
log.info("下发立库任务请求参数:{}", JSON.toJSONString(requestParam));
|
||||
String body = HttpRequest
|
||||
.post(liKu_wcs_url + api).setConnectionTimeout(3000)
|
||||
.body(JSON.toJSONString(requestParam))
|
||||
.execute()
|
||||
.body();
|
||||
log.info("下发立库任务返回参数:{}", body);
|
||||
logServer.interfaceExecuteLog(new LuceneLogDto(liKu_wcs_url + api, JSON.toJSONString(requestParam), body, "200", JSON.toJSONString(requestParam)));
|
||||
return body;
|
||||
} catch (Exception e) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", CommonFinalParam.ONE);
|
||||
result.put("comment", e.getMessage());
|
||||
log.info("下发立库任务异常返回参数:{}", String.valueOf(result));
|
||||
logServer.interfaceExecuteLog(new LuceneLogDto(liKu_wcs_url + api, JSON.toJSONString(requestParam), JSON.toJSONString(result), "400", JSON.toJSONString(requestParam)));
|
||||
return String.valueOf(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
|
||||
package org.nl.acs.ext.wms;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
|
||||
/**
|
||||
* ACS连接外部系统工具类:
|
||||
*/
|
||||
@Slf4j
|
||||
public class LmsUtil {
|
||||
|
||||
public static <W> String notifyAcs(String api, W requestParam) {
|
||||
ISysParamService paramService = SpringContextHolder.getBean(SysParamServiceImpl.class);
|
||||
//判断是否连接立库WCS系统
|
||||
String isConnect = paramService.findByCode("hasWms").getValue();
|
||||
if (StrUtil.equals("0", isConnect)) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("400", "500");
|
||||
result.put("message", "参数配置表中-hasWms为:0");
|
||||
log.info("请求LMS异常返回参数:{}", String.valueOf(result));
|
||||
return String.valueOf(result);
|
||||
}
|
||||
String liKu_wcs_url = paramService.findByCode("wmsurl").getValue();
|
||||
try {
|
||||
String body = HttpRequest
|
||||
.post(liKu_wcs_url + api).setConnectionTimeout(3000)
|
||||
.body(JSON.toJSONString(requestParam))
|
||||
.execute()
|
||||
.body();
|
||||
return body;
|
||||
} catch (Exception e) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", "500");
|
||||
result.put("message", e.getMessage());
|
||||
return String.valueOf(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package org.nl.acs.ext.wms;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.acs.ext.wms.liKuData.Resp;
|
||||
|
||||
/**
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
public class RespUtil {
|
||||
public static <T> Resp getResp(String result, T t) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
Resp<T> resp = new Resp<>();
|
||||
resp.setData(t);
|
||||
resp = JSONObject.toJavaObject(jsonObject, Resp.class);
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package org.nl.acs.ext.wms;
|
||||
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.utils.RedisUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.retry.annotation.Backoff;
|
||||
import org.springframework.retry.annotation.Recover;
|
||||
import org.springframework.retry.annotation.Retryable;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Slf4j
|
||||
public class RetryableUtil {
|
||||
private static ThreadLocal<Integer> retryTimes = new ThreadLocal<>();
|
||||
@Autowired
|
||||
private RedisUtils redisUtils;
|
||||
@Autowired
|
||||
private AcsToWmsService acsToWmsService;
|
||||
|
||||
/**
|
||||
* 只针对对接系统连接拒绝、连接超时进行重试机制
|
||||
* 如果系统连接成功 但是对方返回失败不进行重试
|
||||
*
|
||||
* @param url
|
||||
* @param param
|
||||
*/
|
||||
@Retryable(maxAttempts = 5, backoff = @Backoff(delay = 15000L, multiplier = 2))
|
||||
public void retryable(String url, String param, String token) {
|
||||
HttpResponse httpResponse = null;
|
||||
String respMessage = null;
|
||||
try {
|
||||
httpResponse =
|
||||
HttpRequest
|
||||
.post(url)
|
||||
.header("Authorization", token).body(String.valueOf(param))
|
||||
.body(param)
|
||||
.timeout(5000)
|
||||
.execute();
|
||||
} catch (Exception e) {
|
||||
respMessage = e.getMessage();
|
||||
}
|
||||
if (retryTimes.get() == null) {
|
||||
retryTimes.set(1);
|
||||
} else {
|
||||
retryTimes.set(retryTimes.get() + 1);
|
||||
}
|
||||
if (httpResponse == null) {
|
||||
log.error("接口进行第{}次重试,请求路径:{},请求参数:{},响应参数:{}", retryTimes.get(), url, JSONObject.parse(param), respMessage);
|
||||
throw new BadRequestException(url + "_" + param + "_" + retryTimes.get());
|
||||
}
|
||||
retryTimes.remove();
|
||||
log.info("接口重试成功,请求路径:{},请求参数:{},重试次数:{}", url, JSONObject.parse(param), retryTimes.get());
|
||||
}
|
||||
|
||||
@Recover
|
||||
public void recover(RuntimeException e) {
|
||||
retryTimes.remove();
|
||||
String[] excMessage = e.getMessage().split("_");
|
||||
log.error("请求路径:{},请求参数:{},已达到最大重试次数:{},停止重试!", excMessage[0], excMessage[1], excMessage[2]);
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nl.acs.agv.AgvUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseRequest {
|
||||
|
||||
/**
|
||||
* 请求号:uuid 唯一,LMS需要返回对应值
|
||||
*/
|
||||
private String requestNo = IdUtil.simpleUUID();
|
||||
|
||||
/**
|
||||
* 请求时间
|
||||
*/
|
||||
private String requestDate = AgvUtil.getDate();
|
||||
|
||||
/**
|
||||
* 请求方法编号
|
||||
*/
|
||||
private String request_medthod_code;
|
||||
|
||||
/**
|
||||
* 请求方法名称
|
||||
*/
|
||||
private String request_medthod_name;
|
||||
|
||||
/**
|
||||
* 设备号
|
||||
*/
|
||||
private String device_code;
|
||||
|
||||
|
||||
/**
|
||||
* 系统编号
|
||||
*/
|
||||
private String systemCode;
|
||||
|
||||
/**
|
||||
* 扩展参数:砖型等
|
||||
*/
|
||||
private Map<String, String> parameters = new HashMap();
|
||||
|
||||
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseResponse {
|
||||
|
||||
/**
|
||||
* 请求号
|
||||
*/
|
||||
private String requestNo;
|
||||
|
||||
/**
|
||||
* 响应时间
|
||||
*/
|
||||
private String responseDate;
|
||||
|
||||
/**
|
||||
* 结果 200成功
|
||||
*/
|
||||
private int code;
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
private String message;
|
||||
|
||||
|
||||
private Map<String, String> parameters = new HashMap();
|
||||
|
||||
private Integer status = 0;
|
||||
private JSONArray errArr = new JSONArray();
|
||||
|
||||
|
||||
|
||||
public Integer getstatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Map<String, String> getParameters() {
|
||||
return this.parameters;
|
||||
}
|
||||
|
||||
public void setParameters(Map<String, String> parameters) {
|
||||
this.parameters = parameters;
|
||||
}
|
||||
|
||||
public Object getParameter(String key) {
|
||||
return this.parameters.get(key);
|
||||
}
|
||||
|
||||
public void putParameter(String key, String object) {
|
||||
this.parameters.put(key, object);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class CancelTaskRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
String vehicle_code;
|
||||
|
||||
/**
|
||||
* 扩展属性
|
||||
*/
|
||||
Map<String, String> params = new HashMap<>();
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CancelTaskRequest{" +
|
||||
"task_code='" + task_code + '\'' +
|
||||
", vehicle_code='" + vehicle_code + '\'' +
|
||||
", params=" + params +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
public class CancelTaskResponse extends BaseResponse {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,208 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import org.nl.acs.common.base.CommonFinalParam;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class CreateTaskRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String task_id;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
|
||||
/**
|
||||
* 取货点1
|
||||
*/
|
||||
String start_device_code;
|
||||
|
||||
/**
|
||||
* 放货点1
|
||||
*/
|
||||
String next_device_code;
|
||||
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
String priority = CommonFinalParam.ONE;
|
||||
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
String vehicle_code;
|
||||
|
||||
/**
|
||||
* 载具类型
|
||||
*/
|
||||
String vehicle_type;
|
||||
|
||||
/**
|
||||
* 扩展属性
|
||||
*/
|
||||
String params2;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
String remark;
|
||||
|
||||
/**
|
||||
* 扩展属性
|
||||
*/
|
||||
Map<String, String> params = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CreateTaskRequest{" +
|
||||
"task_code='" + task_code + '\'' +
|
||||
", start_device_code='" + start_device_code + '\'' +
|
||||
", next_device_code='" + next_device_code + '\'' +
|
||||
", priority='" + priority + '\'' +
|
||||
", vehicle_code='" + vehicle_code + '\'' +
|
||||
", vehicle_type='" + vehicle_type + '\'' +
|
||||
", task_type='" + task_type + '\'' +
|
||||
", remark='" + remark + '\'' +
|
||||
", params=" + params +
|
||||
'}';
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务标识
|
||||
*/
|
||||
private String ext_task_id;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 取货点2
|
||||
*/
|
||||
String start_device_code2;
|
||||
|
||||
/**
|
||||
* 放货点2
|
||||
*/
|
||||
String next_device_code2;
|
||||
|
||||
/**
|
||||
* 烘箱对接位
|
||||
*/
|
||||
String put_device_code;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 路由方案
|
||||
*/
|
||||
String route_plan_code;
|
||||
|
||||
/**
|
||||
* 1、生箔;
|
||||
* 2、分切
|
||||
* 3、普通任务
|
||||
* 4、叉车任务
|
||||
* 5、输送任务
|
||||
* 6、行架
|
||||
* 7、立库
|
||||
* 任务类型
|
||||
*/
|
||||
String task_type;
|
||||
|
||||
/**
|
||||
* 立库任务类型
|
||||
*
|
||||
*/
|
||||
String dtl_type;
|
||||
|
||||
/**
|
||||
* Agv系统类型
|
||||
* 1:1楼叉车系统
|
||||
* 2:2楼1区域AGV系统
|
||||
* 3:2楼2区域AGV系统
|
||||
*/
|
||||
String agv_system_type;
|
||||
|
||||
|
||||
/**
|
||||
* 烘箱时间
|
||||
*/
|
||||
String oven_time;
|
||||
|
||||
/**
|
||||
* 烘箱温度
|
||||
*/
|
||||
String temperature;
|
||||
|
||||
/**
|
||||
* agv取货高度
|
||||
*/
|
||||
private String start_height;
|
||||
|
||||
|
||||
/**
|
||||
* agv放货高度
|
||||
*/
|
||||
private String next_height;
|
||||
|
||||
|
||||
/**
|
||||
* 行架任务类型
|
||||
*/
|
||||
private String truss_type;
|
||||
|
||||
/**
|
||||
* 气涨轴尺寸
|
||||
*/
|
||||
private String size;
|
||||
|
||||
/**
|
||||
* 空轴位
|
||||
*/
|
||||
private String empty_site;
|
||||
|
||||
|
||||
/**
|
||||
* 气胀轴代数
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 是否套管
|
||||
*/
|
||||
private String is_bushing;
|
||||
|
||||
/**
|
||||
* 套管数量
|
||||
*/
|
||||
private String bushing_num;
|
||||
|
||||
private String paper_array;
|
||||
|
||||
/**
|
||||
* 任务扩展字段
|
||||
*/
|
||||
private JSONObject interaction_json;
|
||||
|
||||
/**
|
||||
* 是否拔轴 0/1
|
||||
*/
|
||||
private String is_pulling;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
public class CreateTaskResponse extends BaseResponse {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 调用立库接口统一返回参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class Resp<T> extends BaseResponse {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.cancelTask;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.acs.ext.wms.data.BaseRequest;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class CancelTaskRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 任务标识
|
||||
*/
|
||||
private String ext_task_id;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
String vehicle_code;
|
||||
|
||||
/**
|
||||
* 扩展属性
|
||||
*/
|
||||
Map<String, String> params;
|
||||
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.cancelTask;
|
||||
|
||||
import org.nl.acs.ext.wms.data.BaseResponse;
|
||||
|
||||
public class CancelTaskResponse extends BaseResponse {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.createOrder;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.acs.ext.wms.data.BaseRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CreateOrderRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 任务数组
|
||||
*/
|
||||
private List<OrderDto> list = null;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.createOrder;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import lombok.Data;
|
||||
import org.nl.acs.ext.wms.data.BaseResponse;
|
||||
|
||||
@Data
|
||||
public class CreateOrderResponse extends BaseResponse {
|
||||
|
||||
private JSONArray errArr = new JSONArray();
|
||||
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.createOrder;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OrderDto {
|
||||
/**
|
||||
* 工单编码
|
||||
*/
|
||||
private String workorder_code;
|
||||
/**
|
||||
* 设备编码
|
||||
*/
|
||||
private String device_code;
|
||||
/**
|
||||
* 半成品物料编码 - 工单物料编码
|
||||
*/
|
||||
private String material_code;
|
||||
/**
|
||||
* 产品代号 - 数字
|
||||
*/
|
||||
private String product_code;
|
||||
/**
|
||||
* 配方-型号
|
||||
*/
|
||||
private String formula;
|
||||
/**
|
||||
* 砖型编码- 物料规格
|
||||
*/
|
||||
private String brick_code;
|
||||
/**
|
||||
* 计划数量
|
||||
*/
|
||||
private String plan_qty;
|
||||
/**
|
||||
* a边
|
||||
*/
|
||||
private String a;
|
||||
private String b;
|
||||
private String h;
|
||||
private String w;
|
||||
/**
|
||||
* 尺寸允许误差
|
||||
*/
|
||||
private String size_error;
|
||||
/**
|
||||
* 单重允许误差
|
||||
*/
|
||||
private String single_weight;
|
||||
/**
|
||||
* 图纸地址
|
||||
*/
|
||||
private String drawing_address;
|
||||
/**
|
||||
* 标准尺寸1
|
||||
*/
|
||||
private String standard_size_height1;
|
||||
/**
|
||||
* 标准尺寸2
|
||||
*/
|
||||
private String standard_size_height2;
|
||||
/**
|
||||
* 标准尺寸3
|
||||
*/
|
||||
private String standard_size_height3;
|
||||
/**
|
||||
* 标准尺寸4
|
||||
*/
|
||||
private String standard_size_height4;
|
||||
/**
|
||||
* 标准重量
|
||||
*/
|
||||
private String standard_weight;
|
||||
/**
|
||||
* 检测误差值
|
||||
*/
|
||||
private String detection_error;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.createTask;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.acs.ext.wms.data.BaseRequest;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class CreateTaskRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 任务数组
|
||||
*/
|
||||
private List<TaskDto> list = null;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.createTask;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import lombok.Data;
|
||||
import org.nl.acs.ext.wms.data.BaseResponse;
|
||||
|
||||
@Data
|
||||
public class CreateTaskResponse extends BaseResponse {
|
||||
|
||||
private JSONArray errArr = new JSONArray();
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.putAction;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.acs.ext.wms.data.BaseRequest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PutActionRequest extends BaseRequest {
|
||||
|
||||
private List<SignalData> list;
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.putAction;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import lombok.Data;
|
||||
import org.nl.acs.ext.wms.data.BaseResponse;
|
||||
|
||||
@Data
|
||||
public class PutActionResponse extends BaseResponse {
|
||||
|
||||
private JSONArray errArr = new JSONArray();
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.WmstoAcsData.putAction;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SignalData {
|
||||
|
||||
private String code;
|
||||
|
||||
private String value;
|
||||
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.one;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nl.acs.agv.AgvUtil;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class BaseRequest {
|
||||
|
||||
/**
|
||||
* 请求号:uuid 唯一,LMS需要返回对应值
|
||||
*/
|
||||
private String requestNo = IdUtil.simpleUUID();
|
||||
|
||||
/**
|
||||
* 请求时间
|
||||
*/
|
||||
private String requestDate = AgvUtil.getDate();
|
||||
|
||||
/**
|
||||
* 请求方法编号
|
||||
*/
|
||||
private String request_medthod_code;
|
||||
|
||||
/**
|
||||
* 请求方法名称
|
||||
*/
|
||||
private String request_medthod_name;
|
||||
|
||||
/**
|
||||
* 设备号
|
||||
*/
|
||||
private String device_code;
|
||||
|
||||
|
||||
/**
|
||||
* 系统编号
|
||||
*/
|
||||
private String systemCode;
|
||||
|
||||
/**
|
||||
* 扩展参数:砖型等
|
||||
*/
|
||||
private Map<String, String> parameters = new HashMap();
|
||||
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 设备状态
|
||||
*/
|
||||
private String state;
|
||||
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.one;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class BaseResponse {
|
||||
|
||||
private Integer status = 0;
|
||||
private String message;
|
||||
private JSONArray errArr = new JSONArray();
|
||||
private Map<String, String> parameters = new HashMap();
|
||||
|
||||
public BaseResponse() {
|
||||
}
|
||||
|
||||
public Integer getstatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return this.message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Map<String, String> getParameters() {
|
||||
return this.parameters;
|
||||
}
|
||||
|
||||
public void setParameters(Map<String, String> parameters) {
|
||||
this.parameters = parameters;
|
||||
}
|
||||
|
||||
public Object getParameter(String key) {
|
||||
return this.parameters.get(key);
|
||||
}
|
||||
|
||||
public void putParameter(String key, String object) {
|
||||
this.parameters.put(key, object);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.one;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class CancelTaskRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
String vehicle_code;
|
||||
|
||||
/**
|
||||
* 扩展属性
|
||||
*/
|
||||
Map<String, String> params = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CancelTaskRequest{" +
|
||||
"task_code='" + task_code + '\'' +
|
||||
", vehicle_code='" + vehicle_code + '\'' +
|
||||
", params=" + params +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.one;
|
||||
|
||||
public class CancelTaskResponse extends BaseResponse {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.one;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.acs.common.base.CommonFinalParam;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class CreateTaskRequest extends BaseRequest {
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String task_id;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
|
||||
/**
|
||||
* 取货点1
|
||||
*/
|
||||
String start_device_code;
|
||||
|
||||
/**
|
||||
* 放货点1
|
||||
*/
|
||||
String next_device_code;
|
||||
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
String priority = CommonFinalParam.ONE;
|
||||
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
String vehicle_code;
|
||||
|
||||
/**
|
||||
* 载具类型
|
||||
*/
|
||||
String vehicle_type;
|
||||
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
String task_type;
|
||||
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
String remark;
|
||||
|
||||
/**
|
||||
* 扩展属性
|
||||
*/
|
||||
Map<String, String> params = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CreateTaskRequest{" +
|
||||
"task_code='" + task_code + '\'' +
|
||||
", start_device_code='" + start_device_code + '\'' +
|
||||
", next_device_code='" + next_device_code + '\'' +
|
||||
", priority='" + priority + '\'' +
|
||||
", vehicle_code='" + vehicle_code + '\'' +
|
||||
", vehicle_type='" + vehicle_type + '\'' +
|
||||
", task_type='" + task_type + '\'' +
|
||||
", remark='" + remark + '\'' +
|
||||
", params=" + params +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.one;
|
||||
|
||||
public class CreateTaskResponse extends BaseResponse {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.one.feedBackTaskStatus;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.acs.ext.wms.data.one.BaseRequest;
|
||||
|
||||
@Data
|
||||
public class FeedBackTaskStatusRequest extends BaseRequest {
|
||||
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
private String task_id;
|
||||
|
||||
/**
|
||||
* 任务code
|
||||
*/
|
||||
private String task_code;
|
||||
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
private String task_status;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
private String task_type;
|
||||
|
||||
/**
|
||||
* 车号
|
||||
*/
|
||||
private String car_no;
|
||||
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
private String vehicle_code;
|
||||
|
||||
/**
|
||||
* 动作 1请求取货 2取货完成 3请求放货 4放货完成
|
||||
*/
|
||||
private String action;
|
||||
|
||||
/**
|
||||
* 1-正极板;2-负极板;3-边负极板
|
||||
*/
|
||||
private String material_type;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package org.nl.acs.ext.wms.data.one.feedBackTaskStatus;
|
||||
|
||||
import org.nl.acs.ext.wms.data.one.BaseResponse;
|
||||
|
||||
public class FeedBackTaskStatusResponse extends BaseResponse {
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 响应 data 公共基础类
|
||||
* 1、入库任务下发
|
||||
* 2、出库任务下发
|
||||
* 3、空托盘出库任务下发
|
||||
* 4、移库任务下发
|
||||
* 5、入库任务调整
|
||||
* 6、移库任务调整
|
||||
* 7、入库任务上报
|
||||
* 8、出库任务上报
|
||||
* 9、移库任务上报
|
||||
* 10、任务取消
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class BaseResponseData {
|
||||
public String orderId;
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 任务上报请求参数基础类
|
||||
* 1、入库上报
|
||||
* 2、出库上报
|
||||
* 3、移库上报
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class BaseStoreReportRequest {
|
||||
/**
|
||||
* 任务编号
|
||||
* WCS内部任务编号,本次任务的唯一标识
|
||||
*/
|
||||
public String orderId;
|
||||
/**
|
||||
* 托盘条码信息
|
||||
*/
|
||||
public String palletCode;
|
||||
/**
|
||||
* 原库位号
|
||||
* 托盘的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String srcLocation;
|
||||
/**
|
||||
* 目的库位号
|
||||
* 托盘的目的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String destLocation;
|
||||
/**
|
||||
* 入库任务上报 1 已接收 2 开始执行 3执行完成 4 阻挡 5 空洞
|
||||
* 出库任务上报 1已接收任务,2开始执行,3执行完成
|
||||
* 移库任务上报 1 已接收 2开始执行3 执行完成 4 起点库位有货被阻挡 5目的点库位无货被阻挡
|
||||
*/
|
||||
public String state;
|
||||
|
||||
public String robotId;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 任务下发请求参数基础类
|
||||
* 1、入库任务下发
|
||||
* 2、出库任务-批量下发
|
||||
* 3、空托盘出库任务下发
|
||||
* 4、移库任务-批量下发
|
||||
* 5、入库任务调整
|
||||
* 6、移库任务调整
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class BaseStoreRequest {
|
||||
/**
|
||||
* 任务编号
|
||||
* WCS内部任务编号,本次任务的唯一标识
|
||||
*/
|
||||
public String orderId;
|
||||
/**
|
||||
* 楼层编号
|
||||
*/
|
||||
public int floorNo;
|
||||
/**
|
||||
* 托盘条码信息
|
||||
*/
|
||||
public String palletCode;
|
||||
/**
|
||||
* 原库位号
|
||||
* 托盘的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String srcLocation;
|
||||
/**
|
||||
* 目的库位号
|
||||
* 托盘的目的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String destLocation;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 取消任务请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class CancelTaskRequest {
|
||||
/**
|
||||
* 任务编号
|
||||
* WCS内部任务编号,本次任务的唯一标识
|
||||
*/
|
||||
public String orderId;
|
||||
/**
|
||||
* 托盘条码信息
|
||||
*/
|
||||
public String palletCode;
|
||||
/**
|
||||
* 原库位号
|
||||
* 托盘的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String srcLocation;
|
||||
/**
|
||||
* 目的库位号
|
||||
* 托盘的目的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String destLocation;
|
||||
/**
|
||||
* 任务类型
|
||||
* 1 入库,2 出库,3 移库,4 空托盘入库,5 空托盘出库
|
||||
*/
|
||||
public int taskType;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 取消任务响应参数 Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class CancelTaskResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeviceStatusData {
|
||||
|
||||
String deviceId;
|
||||
|
||||
String x;
|
||||
|
||||
String y;
|
||||
|
||||
/**
|
||||
* 楼层
|
||||
*/
|
||||
String mapId;
|
||||
|
||||
/**
|
||||
* 电量
|
||||
*/
|
||||
String power;
|
||||
|
||||
/**
|
||||
* 托盘
|
||||
*/
|
||||
String pallet;
|
||||
|
||||
/**
|
||||
* 有无货
|
||||
*/
|
||||
String load;
|
||||
|
||||
/**
|
||||
* 报警
|
||||
*/
|
||||
String alarm;
|
||||
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
String taskId;
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DeviceStatusRequest {
|
||||
|
||||
String deviceId;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
public class DeviceStatusResponse {
|
||||
|
||||
String result;
|
||||
|
||||
String code;
|
||||
|
||||
String comment;
|
||||
|
||||
DeviceStatusData data;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 空托盘出库任务下发 请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class EmptyVehicleOutStoreRequest extends BaseStoreRequest {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 空托盘任务下发响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class EmptyVehicleOutStoreResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务上报请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreReportRequest extends BaseStoreReportRequest {
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务上报 响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreReportResponse extends BaseResponseData {
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务下发请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreRequest extends BaseStoreRequest {
|
||||
/**
|
||||
* 任务类型
|
||||
* 1代表正常载货托盘入库,2代表空托盘入库
|
||||
*/
|
||||
public int type;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务调整请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreResetRequest extends BaseStoreRequest {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务调整 响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreResetResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务下发响应参数 Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class InStoreTaskUpdateRequest extends BaseResponseData {
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
* WCS内部任务编号,本次任务的唯一标识
|
||||
*/
|
||||
public String orderId;
|
||||
/**
|
||||
* 托盘条码信息
|
||||
*/
|
||||
public String palletCode;
|
||||
/**
|
||||
* 原库位号
|
||||
* 托盘的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String srcLocation;
|
||||
/**
|
||||
* 目的库位号
|
||||
* 托盘的目的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String destLocation;
|
||||
|
||||
/**
|
||||
* 楼层
|
||||
*/
|
||||
public int floorNo;
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
|
||||
public class InStoreTaskUpdateResponse extends BaseStoreRequest {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
/**
|
||||
* 移库上报请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
public class MoveStoreReportRequest extends BaseStoreReportRequest {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移库上报响应参数 Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class MoveStoreReportResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 移库任务下发请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class MoveStoreRequest {
|
||||
/**
|
||||
* 任务组编号
|
||||
* WCS内部任务组编号,本组任务的唯一标识
|
||||
*/
|
||||
public String groupId;
|
||||
|
||||
/**
|
||||
* 任务信息,可批量下发
|
||||
*/
|
||||
public List<BaseStoreRequest> orderInfos;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移库任务调整请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class MoveStoreResetRequest extends BaseStoreRequest {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移库任务调整响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class MoveStoreResetResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移库任务下发响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class MoveStoreResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MoveStoreTaskUpdateRequest {
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
* WCS内部任务编号,本次任务的唯一标识
|
||||
*/
|
||||
public String orderId;
|
||||
/**
|
||||
* 托盘条码信息
|
||||
*/
|
||||
public String palletCode;
|
||||
/**
|
||||
* 原库位号
|
||||
* 托盘的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String srcLocation;
|
||||
/**
|
||||
* 目的库位号
|
||||
* 托盘的目的存储库位编号。具体库位编号需要双方商定
|
||||
*/
|
||||
public String destLocation;
|
||||
|
||||
/**
|
||||
* 楼层
|
||||
*/
|
||||
public int floorNo;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
|
||||
public class MoveStoreTaskUpdateResponse extends BaseStoreRequest {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出库任务上报请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class OutStoreReportRequest extends BaseStoreReportRequest {
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出库任务上报响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class OutStoreReportResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 出库任务下发请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class OutStoreRequest {
|
||||
|
||||
/**
|
||||
* 任务组编号
|
||||
* WCS内部任务组编号,本组任务的唯一标识
|
||||
*/
|
||||
public String groupId;
|
||||
|
||||
/**
|
||||
* 任务信息,可批量下发
|
||||
*/
|
||||
public List<BaseStoreRequest> orderInfos;
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出库任务下发响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class OutStoreResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 调用立库接口统一返回参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class Resp<T> {
|
||||
/**
|
||||
* 成功返回true,失败返回false
|
||||
*/
|
||||
public String result;
|
||||
|
||||
/**
|
||||
* 错误码(0表示成功)1代表入库目的位置有货,其他更多情况待定
|
||||
*/
|
||||
public String code;
|
||||
|
||||
/**
|
||||
* 错误信息,如果成功则为null
|
||||
*/
|
||||
public String comment;
|
||||
|
||||
/**
|
||||
* 报文携带的数据
|
||||
*/
|
||||
public T data;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 巷道锁定解锁请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class RoadWayIsLockRequest {
|
||||
/**
|
||||
* 楼层编号
|
||||
*/
|
||||
public int floorNo;
|
||||
/**
|
||||
* 是否锁定
|
||||
* true代表锁定,false代表解锁
|
||||
*/
|
||||
public String isLock;
|
||||
/**
|
||||
* 巷道编号
|
||||
* 需要解锁或锁定的巷道编号。具体巷道编号需要双方商定
|
||||
*/
|
||||
public String roadwayNo;
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 巷道锁定解锁响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class RoadWayIsLockResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class putEmptyPalletRequest {
|
||||
|
||||
String deviceId;
|
||||
|
||||
String orderId;
|
||||
|
||||
String type;
|
||||
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
|
||||
package org.nl.acs.ext.wms.rest;
|
||||
|
||||
|
||||
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.ext.wms.liKuData.*;
|
||||
import org.nl.acs.ext.wms.service.AcsToLiKuService;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author ludj
|
||||
* @date 2021-07-21
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/liku")
|
||||
@Slf4j
|
||||
public class AcsToLiKuController {
|
||||
private final AcsToLiKuService acsToLiKuService;
|
||||
|
||||
@PostMapping("/inStore")
|
||||
@Log(value = "下发立库入库任务")
|
||||
public ResponseEntity<Object> inStore(@RequestBody InStoreRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.inStore(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/outStore")
|
||||
@Log(value = "下发立库出库任务")
|
||||
public ResponseEntity<Object> outStore(@RequestBody OutStoreRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.outStore(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/emptyVehicleOutStore")
|
||||
@Log(value = "下发立库空盘出库任务")
|
||||
public ResponseEntity<Object> emptyVehicleOutStore(@RequestBody EmptyVehicleOutStoreRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.emptyVehicleOutStore(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/moveStore")
|
||||
@Log(value = "下发立库移库任务")
|
||||
public ResponseEntity<Object> moveStore(@RequestBody MoveStoreRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.moveStore(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/inStoreReset")
|
||||
@Log(value = "下发立库入库任务调整")
|
||||
public ResponseEntity<Object> inStoreReset(@RequestBody InStoreResetRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.inStoreReset(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/moveStoreReset")
|
||||
@Log(value = "下发立库移库任务调整")
|
||||
public ResponseEntity<Object> moveStoreReset(@RequestBody MoveStoreResetRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.moveStoreReset(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/roadWayIsLock")
|
||||
@Log(value = "下发立库巷道锁定或解锁")
|
||||
public ResponseEntity<Object> roadWayIsLock(@RequestBody RoadWayIsLockRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.roadWayIsLock(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/cancelTask")
|
||||
@Log(value = "取消立库任务")
|
||||
public ResponseEntity<Object> cancelTask(@RequestBody CancelTaskRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.cancelTask(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryCarStatus")
|
||||
@Log(value = "查询四向车状态")
|
||||
public ResponseEntity<Object> queryCarStatus(@RequestBody DeviceStatusRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.queryCarDeviceStatus(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryTsjStatus")
|
||||
@Log(value = "查询提升机状态")
|
||||
public ResponseEntity<Object> queryTsjStatus(@RequestBody DeviceStatusRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.queryTsjDeviceStatus(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/querySsxStatus")
|
||||
@Log(value = "查询提升机状态")
|
||||
public ResponseEntity<Object> querySsxStatus(@RequestBody DeviceStatusRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.queryTsjDeviceStatus(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
|
||||
package org.nl.acs.ext.wms.rest;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.ext.wms.liKuData.InStoreReportRequest;
|
||||
import org.nl.acs.ext.wms.liKuData.MoveStoreReportRequest;
|
||||
import org.nl.acs.ext.wms.liKuData.OutStoreReportRequest;
|
||||
import org.nl.acs.ext.wms.liKuData.putEmptyPalletRequest;
|
||||
import org.nl.acs.ext.wms.service.LiKuToAcsService;
|
||||
//import org.nl.modules.logging.InterfaceLogType;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author wangs
|
||||
* @date 2021-07-21
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/api/likuToACS")
|
||||
@Slf4j
|
||||
public class LiKuToACSController {
|
||||
private final LiKuToAcsService liKuToAcsService;
|
||||
|
||||
@SaIgnore
|
||||
@PostMapping("/inStoreReport")
|
||||
@Log(value = "立库反馈入库任务状态")
|
||||
public ResponseEntity<Object> inStoreReport(@RequestBody InStoreReportRequest requestParam) throws Exception {
|
||||
return new ResponseEntity<>(liKuToAcsService.inStoreReport(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@SaIgnore
|
||||
@PostMapping("/outStoreReport")
|
||||
@Log(value = "立库反馈出库任务状态")
|
||||
public ResponseEntity<Object> outStoreReport(@RequestBody OutStoreReportRequest requestParam) throws Exception {
|
||||
return new ResponseEntity<>(liKuToAcsService.outStoreReport(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@SaIgnore
|
||||
@PostMapping("/moveStoreReport")
|
||||
@Log(value = "立库反馈移库任务状态")
|
||||
public ResponseEntity<Object> moveStoreReport(@RequestBody MoveStoreReportRequest requestParam) throws Exception {
|
||||
return new ResponseEntity<>(liKuToAcsService.moveStoreReport(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@SaIgnore
|
||||
@PostMapping("/putEmptyPallet")
|
||||
@Log(value = "立库请求放空盘")
|
||||
public ResponseEntity<Object> putEmptyPallet(@RequestBody putEmptyPalletRequest requestParam) throws Exception {
|
||||
return new ResponseEntity<>(liKuToAcsService.putEmptyPallet(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
package org.nl.acs.ext.wms.service;
|
||||
|
||||
import org.nl.acs.ext.wms.liKuData.*;
|
||||
import org.nl.acs.instruction.domain.Instruction;
|
||||
|
||||
/**
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
public interface AcsToLiKuService {
|
||||
|
||||
/**
|
||||
* sendInst
|
||||
* @param type
|
||||
* @param inst
|
||||
* @return
|
||||
*/
|
||||
public Resp sendInst(String type, Instruction inst);
|
||||
|
||||
/**
|
||||
* 入库任务下发
|
||||
*
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<InStoreResponse> inStore(InStoreRequest requestParam);
|
||||
|
||||
/**
|
||||
* 出库任务下发
|
||||
*
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<OutStoreResponse> outStore(OutStoreRequest requestParam);
|
||||
|
||||
/**
|
||||
* 空托盘出库任务下发
|
||||
*
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<EmptyVehicleOutStoreResponse> emptyVehicleOutStore(EmptyVehicleOutStoreRequest requestParam);
|
||||
|
||||
|
||||
/**
|
||||
* 移库任务下发
|
||||
*
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<MoveStoreResponse> moveStore(MoveStoreRequest requestParam);
|
||||
|
||||
|
||||
/**
|
||||
* 入库任务调整
|
||||
*
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<InStoreResetResponse> inStoreReset(InStoreResetRequest requestParam);
|
||||
|
||||
|
||||
/**
|
||||
* 移库任务调整
|
||||
*
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<MoveStoreResetResponse> moveStoreReset(MoveStoreResetRequest requestParam);
|
||||
|
||||
/**
|
||||
* 巷道锁定与解锁
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<RoadWayIsLockResponse> roadWayIsLock(RoadWayIsLockRequest requestParam);
|
||||
|
||||
|
||||
/**
|
||||
* 取消任务
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<CancelTaskResponse> cancelTask(CancelTaskRequest requestParam);
|
||||
|
||||
/**
|
||||
* 查询小车设备状态
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<DeviceStatusResponse> queryCarDeviceStatus(DeviceStatusRequest requestParam);
|
||||
|
||||
/**
|
||||
* 查询tsj设备状态
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<DeviceStatusResponse> queryTsjDeviceStatus(DeviceStatusRequest requestParam);
|
||||
|
||||
/**
|
||||
* 查询ssx设备状态
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<DeviceStatusResponse> querySsxDeviceStatus(DeviceStatusRequest requestParam);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package org.nl.acs.ext.wms.service;
|
||||
|
||||
import org.nl.acs.ext.wms.liKuData.*;
|
||||
|
||||
/**
|
||||
* @author: wangs
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
public interface LiKuToAcsService {
|
||||
|
||||
/**
|
||||
* 入库任务上报
|
||||
* @param requestParam
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Resp<InStoreReportResponse> inStoreReport(InStoreReportRequest requestParam) throws Exception;
|
||||
|
||||
/**
|
||||
* 出库任务上报
|
||||
*
|
||||
* @param requestParam
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Resp<OutStoreReportResponse> outStoreReport(OutStoreReportRequest requestParam) throws Exception;
|
||||
|
||||
/**
|
||||
* 移库任务上报
|
||||
*
|
||||
* @param requestParam
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Resp<MoveStoreReportResponse> moveStoreReport(MoveStoreReportRequest requestParam) throws Exception;
|
||||
|
||||
|
||||
/**
|
||||
* 移库任务上报
|
||||
*
|
||||
* @param requestParam
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Resp<DeviceStatusResponse> putEmptyPallet(putEmptyPalletRequest requestParam) throws Exception;
|
||||
|
||||
}
|
||||
@@ -1,288 +0,0 @@
|
||||
package org.nl.acs.ext.wms.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.AcsConfig;
|
||||
import org.nl.acs.address.service.AddressService;
|
||||
import org.nl.acs.common.base.CommonFinalParam;
|
||||
import org.nl.acs.ext.wms.AcsUtil;
|
||||
import org.nl.acs.ext.wms.RespUtil;
|
||||
import org.nl.acs.ext.wms.liKuData.*;
|
||||
import org.nl.acs.ext.wms.service.AcsToLiKuService;
|
||||
import org.nl.acs.instruction.domain.Instruction;
|
||||
import org.nl.system.service.param.ISysParamService;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 立库WCS接口
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class AcsToLiKuServiceImpl implements AcsToLiKuService {
|
||||
|
||||
private final AddressService addressService;
|
||||
|
||||
private String log_file_type = "log_file_type";
|
||||
private String log_type = "ACS请求立库";
|
||||
|
||||
|
||||
@Override
|
||||
public Resp<InStoreResponse> inStore(InStoreRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
String api = addressService.findByCode("inStore").getMethods_url();
|
||||
log.info("inStore-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("inStore-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new InStoreResponse());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<OutStoreResponse> outStore(OutStoreRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("outStore-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("outStore").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("outStore-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new OutStoreResponse());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<EmptyVehicleOutStoreResponse> emptyVehicleOutStore(EmptyVehicleOutStoreRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("emptyVehicleOutStore-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("emptyVehicleOutStore").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("emptyVehicleOutStore-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new EmptyVehicleOutStoreResponse());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<MoveStoreResponse> moveStore(MoveStoreRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("moveStore-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("moveStore").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("moveStore-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new MoveStoreResponse());
|
||||
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<InStoreResetResponse> inStoreReset(InStoreResetRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("inStoreReset-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("inStoreReset").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("inStoreReset-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new InStoreResetResponse());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<MoveStoreResetResponse> moveStoreReset(MoveStoreResetRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("moveStoreReset-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("moveStoreReset").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("moveStoreReset-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new MoveStoreResetResponse());
|
||||
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<RoadWayIsLockResponse> roadWayIsLock(RoadWayIsLockRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("roadWayIsLock-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("roadWayIsLock").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("roadWayIsLock-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new RoadWayIsLockResponse());
|
||||
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Resp<CancelTaskResponse> cancelTask(CancelTaskRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("cancelTask-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("cancelTask").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("cancelTask-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new CancelTaskResponse());
|
||||
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<DeviceStatusResponse> queryCarDeviceStatus(DeviceStatusRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("queryCarDeviceStatus-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("queryCarDeviceStatus").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("queryCarDeviceStatus-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new DeviceStatusRequest());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<DeviceStatusResponse> queryTsjDeviceStatus(DeviceStatusRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("queryTsjDeviceStatus-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("queryTsjDeviceStatus").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("queryTsjDeviceStatus-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new DeviceStatusRequest());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<DeviceStatusResponse> querySsxDeviceStatus(DeviceStatusRequest requestParam) {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("querySsxDeviceStatus-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String api = addressService.findByCode("querySsxDeviceStatus").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
log.info("querySsxDeviceStatus-----输出参数{}", result);
|
||||
return RespUtil.getResp(result, new DeviceStatusRequest());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp sendInst(String type, Instruction dto) {
|
||||
AcsToLiKuService acsToLiKuService = SpringContextHolder.getBean(AcsToLiKuService.class);
|
||||
ISysParamService paramService = SpringContextHolder.getBean(ISysParamService.class);
|
||||
|
||||
Resp resp = new Resp();
|
||||
String instSendLk = paramService.findByCode(AcsConfig.INSTSENDLK).getValue();
|
||||
|
||||
try {
|
||||
if (StrUtil.equals(instSendLk, CommonFinalParam.ONE)) {
|
||||
if (StrUtil.equals(type, CommonFinalParam.ONE)) {
|
||||
InStoreRequest request = new InStoreRequest();
|
||||
request.setFloorNo(Integer.parseInt(dto.getTo_z()));
|
||||
request.setType(1);
|
||||
request.setPalletCode(dto.getVehicle_code());
|
||||
request.setOrderId(dto.getInstruction_code());
|
||||
request.setSrcLocation(dto.getStart_point_code());
|
||||
request.setDestLocation(dto.getNext_point_code());
|
||||
resp = acsToLiKuService.inStore(request);
|
||||
//空托入库
|
||||
} else if (StrUtil.equals(type, "2")) {
|
||||
InStoreRequest request = new InStoreRequest();
|
||||
request.setFloorNo(Integer.parseInt(dto.getTo_z()));
|
||||
request.setType(2);
|
||||
request.setPalletCode(dto.getVehicle_code());
|
||||
request.setOrderId(dto.getInstruction_code());
|
||||
request.setSrcLocation(dto.getStart_point_code());
|
||||
request.setDestLocation(dto.getNext_point_code());
|
||||
resp = acsToLiKuService.inStore(request);
|
||||
//出库
|
||||
} else if (StrUtil.equals(type, "3")) {
|
||||
OutStoreRequest outStore = new OutStoreRequest();
|
||||
BaseStoreRequest baseReq = new BaseStoreRequest();
|
||||
List<BaseStoreRequest> list = new ArrayList();
|
||||
baseReq.setOrderId(dto.getInstruction_code());
|
||||
baseReq.setSrcLocation(dto.getStart_point_code());
|
||||
baseReq.setDestLocation(dto.getNext_point_code());
|
||||
baseReq.setFloorNo(Integer.parseInt(dto.getFrom_z()));
|
||||
baseReq.setPalletCode(dto.getVehicle_code());
|
||||
list.add(baseReq);
|
||||
outStore.setOrderInfos(list);
|
||||
outStore.setGroupId(dto.getInstruction_code());
|
||||
resp = acsToLiKuService.outStore(outStore);
|
||||
//空托出库
|
||||
} else if (StrUtil.equals(type, "4")) {
|
||||
EmptyVehicleOutStoreRequest emptyVehicleOutStoreRequest = new EmptyVehicleOutStoreRequest();
|
||||
emptyVehicleOutStoreRequest.setOrderId(dto.getInstruction_code());
|
||||
emptyVehicleOutStoreRequest.setFloorNo(Integer.parseInt(dto.getFrom_z()));
|
||||
emptyVehicleOutStoreRequest.setSrcLocation(dto.getStart_point_code());
|
||||
emptyVehicleOutStoreRequest.setDestLocation(dto.getNext_point_code());
|
||||
emptyVehicleOutStoreRequest.setPalletCode(dto.getVehicle_code());
|
||||
resp = acsToLiKuService.emptyVehicleOutStore(emptyVehicleOutStoreRequest);
|
||||
//转库
|
||||
} else if (StrUtil.equals(type, "5")) {
|
||||
MoveStoreRequest moveStoreRequest = new MoveStoreRequest();
|
||||
BaseStoreRequest baseReq = new BaseStoreRequest();
|
||||
List<BaseStoreRequest> list = new ArrayList();
|
||||
baseReq.setFloorNo(Integer.parseInt(dto.getFrom_z()));
|
||||
baseReq.setPalletCode(dto.getVehicle_code());
|
||||
baseReq.setOrderId(dto.getInstruction_code());
|
||||
baseReq.setSrcLocation(dto.getStart_point_code());
|
||||
baseReq.setDestLocation(dto.getNext_point_code());
|
||||
list.add(baseReq);
|
||||
moveStoreRequest.setGroupId(dto.getInstruction_code());
|
||||
moveStoreRequest.setOrderInfos(list);
|
||||
resp = acsToLiKuService.moveStore(moveStoreRequest);
|
||||
}
|
||||
} else {
|
||||
resp.setCode("0");
|
||||
resp.setResult("true");
|
||||
resp.setComment("ACS模拟下发成功");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
resp.setCode(CommonFinalParam.ONE);
|
||||
resp.setResult("false");
|
||||
resp.setComment(e.getMessage());
|
||||
}
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,298 +0,0 @@
|
||||
package org.nl.acs.ext.wms.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.address.service.AddressService;
|
||||
import org.nl.acs.common.base.CommonFinalParam;
|
||||
import org.nl.acs.device.device.domain.Device;
|
||||
import org.nl.acs.ext.wms.RespUtil;
|
||||
import org.nl.acs.ext.wms.liKuData.*;
|
||||
import org.nl.acs.ext.wms.service.AcsToLiKuService;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.acs.ext.wms.service.LiKuToAcsService;
|
||||
import org.nl.acs.instruction.domain.Instruction;
|
||||
import org.nl.acs.instruction.enums.InstructionStatusEnum;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.device.device.service.DeviceAppService;
|
||||
import org.nl.acs.device.device.service.impl.DeviceAppServiceImpl;
|
||||
import org.nl.acs.task.enums.TaskStatusEnum;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 立库WCS接口
|
||||
*
|
||||
* @author: wangs
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class LiKuToAcsServiceImpl implements LiKuToAcsService {
|
||||
|
||||
private final AddressService addressService;
|
||||
|
||||
private final TaskService taskService;
|
||||
|
||||
private final InstructionService instructionService;
|
||||
|
||||
private final AcsToWmsService acsToWmsService;
|
||||
|
||||
private final AcsToLiKuService acsToLiKuService;
|
||||
|
||||
|
||||
private String log_file_type = "log_file_type";
|
||||
private String log_type = "立库请求ACS";
|
||||
|
||||
/**
|
||||
* 入库任务状态反馈
|
||||
* @param requestParam
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public Resp<InStoreReportResponse> inStoreReport(InStoreReportRequest requestParam) throws Exception {
|
||||
|
||||
log.info("入库任务状态反馈-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String inst_code = requestParam.getOrderId();
|
||||
String status = requestParam.getState();
|
||||
String carNo = requestParam.getRobotId();
|
||||
Instruction inst = instructionService.findByCodeFromCache(inst_code);
|
||||
if (ObjectUtil.isEmpty(inst)) {
|
||||
InStoreReportResponse inStoreReportResponse = new InStoreReportResponse();
|
||||
inStoreReportResponse.setOrderId(inst_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", "0");
|
||||
result.put("comment", "未找到对应指令");
|
||||
result.put("data", inStoreReportResponse);
|
||||
log.info("入库任务状态反馈-----输出参数{}", result);
|
||||
return RespUtil.getResp(result.toString(), new InStoreReportResponse());
|
||||
}
|
||||
TaskDto task = taskService.findByCodeFromCache(inst.getTask_code());
|
||||
if (ObjectUtil.isEmpty(task)) {
|
||||
InStoreReportResponse inStoreReportResponse = new InStoreReportResponse();
|
||||
inStoreReportResponse.setOrderId(inst_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", "0");
|
||||
result.put("comment", "未找到对应任务");
|
||||
result.put("data", inStoreReportResponse);
|
||||
log.info("入库任务状态反馈-----输出参数{}", result);
|
||||
return RespUtil.getResp(result.toString(), new InStoreReportResponse());
|
||||
}
|
||||
// 1 已接收 2 开始执行 3执行完成 4 5 取消
|
||||
if (StrUtil.equals(status, CommonFinalParam.ONE) || StrUtil.equals(status, "2")) {
|
||||
task.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||
taskService.update(task);
|
||||
inst.setInstruction_status(InstructionStatusEnum.BUSY.getIndex());
|
||||
inst.setExecute_device_code(carNo);
|
||||
inst.setCarno(carNo);
|
||||
instructionService.update(inst);
|
||||
} else if (StrUtil.equals(status, "3")) {
|
||||
inst.setInstruction_status(InstructionStatusEnum.FINISHED.getIndex());
|
||||
instructionService.finish(inst.getInstruction_id());
|
||||
} else if (StrUtil.equals(status, "4")) {
|
||||
|
||||
// 5 取消指令
|
||||
} else if (StrUtil.equals(status, "5")) {
|
||||
|
||||
instructionService.cancel(inst.getInstruction_id());
|
||||
}
|
||||
InStoreReportResponse inStoreReportResponse = new InStoreReportResponse();
|
||||
inStoreReportResponse.setOrderId(inst_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "true");
|
||||
result.put("code", "0");
|
||||
result.put("comment", "");
|
||||
result.put("data", inStoreReportResponse);
|
||||
log.info("入库任务状态反馈-----输出参数{}", result);
|
||||
return RespUtil.getResp(result.toString(), new InStoreReportResponse());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<OutStoreReportResponse> outStoreReport(OutStoreReportRequest requestParam) throws Exception {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("出库任务状态反馈-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String inst_code = requestParam.getOrderId();
|
||||
String status = requestParam.getState();
|
||||
String carNo = requestParam.getRobotId();
|
||||
Instruction inst = instructionService.findByCodeFromCache(inst_code);
|
||||
if (ObjectUtil.isEmpty(inst)) {
|
||||
OutStoreReportResponse outStoreReportResponse = new OutStoreReportResponse();
|
||||
outStoreReportResponse.setOrderId(inst_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", "0");
|
||||
result.put("comment", "未找到对应指令");
|
||||
result.put("data", outStoreReportResponse);
|
||||
log.info("出库任务状态反馈-----输出参数{}", result);
|
||||
return RespUtil.getResp(result.toString(), new OutStoreReportResponse());
|
||||
}
|
||||
TaskDto task = taskService.findByCodeFromCache(inst.getTask_code());
|
||||
if (ObjectUtil.isEmpty(task)) {
|
||||
OutStoreReportResponse outStoreReportResponse = new OutStoreReportResponse();
|
||||
outStoreReportResponse.setOrderId(inst_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", "0");
|
||||
result.put("comment", "未找到对应任务");
|
||||
result.put("data", outStoreReportResponse);
|
||||
log.info("出库任务状态反馈-----输出参数{}", result);
|
||||
return RespUtil.getResp(result.toString(), new OutStoreReportResponse());
|
||||
}
|
||||
// 1 已接收 2 开始执行 3执行完成 4 阻挡 5 空洞
|
||||
if (StrUtil.equals(status, CommonFinalParam.ONE) || StrUtil.equals(status, "2")) {
|
||||
task.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||
taskService.update(task);
|
||||
inst.setInstruction_status(InstructionStatusEnum.BUSY.getIndex());
|
||||
inst.setExecute_device_code(carNo);
|
||||
inst.setCarno(carNo);
|
||||
instructionService.update(inst);
|
||||
} else if (StrUtil.equals(status, "3")) {
|
||||
// inst.setInstruction_status(CommonFinalParam.ONE);
|
||||
// instructionService.finish(inst.getInstruction_id());
|
||||
|
||||
if (StrUtil.equals(task.getTask_type(), "7") && StrUtil.equals(task.getStorage_task_type(), "4")) {
|
||||
inst.setInstruction_status(InstructionStatusEnum.FINISHED.getIndex());
|
||||
instructionService.finish(inst.getInstruction_id());
|
||||
} else {
|
||||
inst.setRemark("立库已反馈完成,待输送上报任务号");
|
||||
instructionService.update(inst);
|
||||
}
|
||||
|
||||
} else if (StrUtil.equals(status, "4")) {
|
||||
//5 取消指令
|
||||
} else if (StrUtil.equals(status, "5")) {
|
||||
instructionService.cancel(inst.getInstruction_id());
|
||||
|
||||
}
|
||||
OutStoreReportResponse outStoreReportResponse = new OutStoreReportResponse();
|
||||
outStoreReportResponse.setOrderId(inst_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "true");
|
||||
result.put("code", "0");
|
||||
result.put("comment", "");
|
||||
result.put("data", outStoreReportResponse);
|
||||
log.info("出库任务状态反馈-----输出参数{}", result);
|
||||
|
||||
return RespUtil.getResp(result.toString(), new OutStoreReportResponse());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 移库任务上报
|
||||
* @param requestParam
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public Resp<MoveStoreReportResponse> moveStoreReport(MoveStoreReportRequest requestParam) throws Exception {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("移库任务上报-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String inst_code = requestParam.getOrderId();
|
||||
String status = requestParam.getState();
|
||||
String carNo = requestParam.getRobotId();
|
||||
Instruction inst = instructionService.findByCodeFromCache(inst_code);
|
||||
if (ObjectUtil.isEmpty(inst)) {
|
||||
MoveStoreReportResponse moveStoreReportResponse = new MoveStoreReportResponse();
|
||||
moveStoreReportResponse.setOrderId(inst_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", "0");
|
||||
result.put("comment", "未找到对应指令");
|
||||
result.put("data", moveStoreReportResponse);
|
||||
log.info("移库任务状态反馈-----输出参数{}", result);
|
||||
return RespUtil.getResp(result.toString(), new MoveStoreReportResponse());
|
||||
}
|
||||
TaskDto task = taskService.findByCodeFromCache(inst.getTask_code());
|
||||
if (ObjectUtil.isEmpty(task)) {
|
||||
MoveStoreReportResponse moveStoreReportResponse = new MoveStoreReportResponse();
|
||||
moveStoreReportResponse.setOrderId(inst_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", "0");
|
||||
result.put("comment", "未找到对应任务");
|
||||
result.put("data", moveStoreReportResponse);
|
||||
log.info("移库任务状态反馈-----输出参数{}", result);
|
||||
return RespUtil.getResp(result.toString(), new MoveStoreReportResponse());
|
||||
} // 1 已接收 2 开始执行 3执行完成 4 阻挡 5 空洞
|
||||
if (StrUtil.equals(status, CommonFinalParam.ONE) || StrUtil.equals(status, "2")) {
|
||||
task.setTask_status(TaskStatusEnum.BUSY.getIndex());
|
||||
taskService.update(task);
|
||||
inst.setInstruction_status(InstructionStatusEnum.BUSY.getIndex());
|
||||
inst.setExecute_device_code(carNo);
|
||||
inst.setCarno(carNo);
|
||||
instructionService.update(inst);
|
||||
|
||||
} else if (StrUtil.equals(status, "3")) {
|
||||
inst.setInstruction_status(InstructionStatusEnum.FINISHED.getIndex());
|
||||
instructionService.finish(inst.getInstruction_id());
|
||||
} else if (StrUtil.equals(status, "4")) {
|
||||
|
||||
|
||||
} else if (StrUtil.equals(status, "5")) {
|
||||
instructionService.cancel(inst.getInstruction_id());
|
||||
}
|
||||
MoveStoreReportResponse moveStoreReportResponse = new MoveStoreReportResponse();
|
||||
moveStoreReportResponse.setOrderId(inst_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "true");
|
||||
result.put("code", "0");
|
||||
result.put("comment", "");
|
||||
result.put("data", moveStoreReportResponse);
|
||||
log.info("移库任务上报-----输出参数{}", result);
|
||||
|
||||
return RespUtil.getResp(result.toString(), new MoveStoreReportResponse());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 请求放空盘
|
||||
* @param requestParam
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public Resp<DeviceStatusResponse> putEmptyPallet(putEmptyPalletRequest requestParam) throws Exception {
|
||||
try {
|
||||
MDC.put(log_file_type, log_type);
|
||||
log.info("请求放空盘-----输入参数{}", JSON.toJSONString(requestParam));
|
||||
String device_code = requestParam.getDeviceId();
|
||||
String type = requestParam.getType();
|
||||
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
|
||||
Device device = appService.findDeviceByCode(device_code);
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("code", "0");
|
||||
log.info("请求放空盘-----输出参数{}", result);
|
||||
return RespUtil.getResp(result.toString(), new DeviceStatusResponse());
|
||||
} finally {
|
||||
MDC.remove(log_file_type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user