立库接口
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
|
||||
package org.nl.acs.ext.wms;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.service.ParamService;
|
||||
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
|
||||
/**
|
||||
* ACS连接外部系统工具类:
|
||||
*/
|
||||
public class AcsUtil {
|
||||
public static <W> String notifyAcs(String api, W requestParam) {
|
||||
ParamService paramService = SpringContextHolder.getBean(ParamServiceImpl.class);
|
||||
//判断是否连接立库WCS系统
|
||||
String isConnect = paramService.findByCode("is_connect_liKu_Wcs").getValue();
|
||||
if (StrUtil.equals("0", isConnect)) {
|
||||
throw new BadRequestException("参数配置表中-is_connect_liKu_Wcs为:0");
|
||||
}
|
||||
String liKu_wcs_url = paramService.findByCode("liKu_wcs_url").getValue();
|
||||
try {
|
||||
return HttpRequest
|
||||
.post(liKu_wcs_url + api)
|
||||
.body(String.valueOf(requestParam))
|
||||
.execute()
|
||||
.body();
|
||||
} catch (Exception e) {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("result", "false");
|
||||
result.put("code", "400");
|
||||
result.put("comment", e.getMessage());
|
||||
return String.valueOf(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
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 int state;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 取消任务响应参数 Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class CancelTaskResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 空托盘出库任务下发 请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class EmptyVehicleOutStoreRequest extends BaseStoreRequest {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 空托盘任务下发响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class EmptyVehicleOutStoreResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务上报请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreReportRequest extends BaseStoreReportRequest {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务上报 响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreReportResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务调整请求参数类
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreResetRequest extends BaseStoreRequest {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务调整 响应参数Data类
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreResetResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 入库任务下发响应参数 Data类
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class InStoreResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
/**
|
||||
* 移库上报请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
public class MoveStoreReportRequest extends BaseStoreReportRequest {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移库上报响应参数 Data类
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class MoveStoreReportResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移库任务调整请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class MoveStoreResetRequest extends BaseStoreRequest {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移库任务调整响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class MoveStoreResetResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 移库任务下发响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class MoveStoreResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出库任务上报请求参数类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class OutStoreReportRequest extends BaseStoreReportRequest {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出库任务上报响应参数Data类
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class OutStoreReportResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 出库任务下发响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class OutStoreResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package org.nl.acs.ext.wms.liKuData;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 巷道锁定解锁响应参数Data类
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Data
|
||||
public class RoadWayIsLockResponse extends BaseResponseData {
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
|
||||
package org.nl.acs.ext.wms.rest;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.modules.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;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author ludj
|
||||
* @date 2021-07-21
|
||||
**/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "立库接口")
|
||||
@RequestMapping("/api/liku")
|
||||
@Slf4j
|
||||
public class AcsToLiKuController {
|
||||
private final AcsToLiKuService acsToLiKuService;
|
||||
|
||||
@PostMapping("/inStore")
|
||||
@Log("向立库wcs下发入库任务")
|
||||
@ApiOperation("向立库wcs下发入库任务")
|
||||
public ResponseEntity<Object> inStore(@RequestBody InStoreRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.inStore(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/outStore")
|
||||
@Log("向立库wcs下发出库任务")
|
||||
@ApiOperation("向立库wcs下发出库任务")
|
||||
public ResponseEntity<Object> outStore(@RequestBody OutStoreRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.outStore(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/emptyVehicleOutStore")
|
||||
@Log("向立库wcs下发空托盘出库任务")
|
||||
@ApiOperation("向立库wcs下发空托盘出库任务")
|
||||
public ResponseEntity<Object> emptyVehicleOutStore(@RequestBody EmptyVehicleOutStoreRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.emptyVehicleOutStore(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/moveStore")
|
||||
@Log("向立库wcs下发移库任务")
|
||||
@ApiOperation("向立库wcs下发移库任务")
|
||||
public ResponseEntity<Object> moveStore(@RequestBody MoveStoreRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.moveStore(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/inStoreReset")
|
||||
@Log("向立库wcs下发入库任务调整")
|
||||
@ApiOperation("向立库wcs下发入库任务调整")
|
||||
public ResponseEntity<Object> inStoreReset(@RequestBody InStoreResetRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.inStoreReset(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/moveStoreReset")
|
||||
@Log("向立库wcs下发移库任务调整")
|
||||
@ApiOperation("向立库wcs下发移库任务调整")
|
||||
public ResponseEntity<Object> moveStoreReset(@RequestBody MoveStoreResetRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.moveStoreReset(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/roadWayIsLock")
|
||||
@Log("向立库下发巷道锁定或解锁")
|
||||
@ApiOperation("向立库下发巷道锁定或解锁")
|
||||
public ResponseEntity<Object> roadWayIsLock(@RequestBody RoadWayIsLockRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.roadWayIsLock(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/inStoreReport")
|
||||
@Log("向立库下发入库任务上报")
|
||||
@ApiOperation("向立库下发入库任务上报")
|
||||
public ResponseEntity<Object> inStoreReport(@RequestBody InStoreReportRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.inStoreReport(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/outStoreReport")
|
||||
@Log("向立库下发出库任务上报")
|
||||
@ApiOperation("向立库下发出库任务上报")
|
||||
public ResponseEntity<Object> outStoreReport(@RequestBody OutStoreReportRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.outStoreReport(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/moveStoreReport")
|
||||
@Log("向立库下发移库任务上报")
|
||||
@ApiOperation("向立库下发移库任务上报")
|
||||
public ResponseEntity<Object> moveStoreReport(@RequestBody MoveStoreReportRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.moveStoreReport(requestParam), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/cancelTask")
|
||||
@Log("向立库下发任务取消")
|
||||
@ApiOperation("向立库下发任务取消")
|
||||
public ResponseEntity<Object> cancelTask(@RequestBody CancelTaskRequest requestParam) {
|
||||
return new ResponseEntity<>(acsToLiKuService.cancelTask(requestParam), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package org.nl.acs.ext.wms.service;
|
||||
|
||||
import org.nl.acs.ext.wms.liKuData.*;
|
||||
|
||||
/**
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
public interface AcsToLiKuService {
|
||||
|
||||
/**
|
||||
* 入库任务下发
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* 巷道锁定与解锁
|
||||
* @return
|
||||
*/
|
||||
public Resp<RoadWayIsLockResponse> roadWayIsLock(RoadWayIsLockRequest requestParam);
|
||||
|
||||
|
||||
/**
|
||||
* 入库任务上报
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<InStoreReportResponse> inStoreReport(InStoreReportRequest requestParam);
|
||||
|
||||
/**
|
||||
* 出库任务上报
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<OutStoreReportResponse> outStoreReport(OutStoreReportRequest requestParam);
|
||||
|
||||
/**
|
||||
* 移库任务上报
|
||||
* @param requestParam
|
||||
* @return
|
||||
*/
|
||||
public Resp<MoveStoreReportResponse> moveStoreReport(MoveStoreReportRequest requestParam);
|
||||
|
||||
/**
|
||||
*取消任务
|
||||
* @return
|
||||
*/
|
||||
public Resp<CancelTaskResponse> cancelTask(CancelTaskRequest requestParam);
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package org.nl.acs.ext.wms.service.impl;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.acs.device.address.service.AddressService;
|
||||
import org.nl.acs.ext.wms.RespUtil;
|
||||
import org.nl.acs.ext.wms.AcsUtil;
|
||||
import org.nl.acs.ext.wms.liKuData.*;
|
||||
import org.nl.acs.ext.wms.service.AcsToLiKuService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 立库WCS接口
|
||||
*
|
||||
* @author: geng by
|
||||
* @createDate: 2022/11/24
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class AcsToLiKuServiceImpl implements AcsToLiKuService {
|
||||
|
||||
private final AddressService addressService;
|
||||
|
||||
@Override
|
||||
public Resp<InStoreResponse> inStore(InStoreRequest requestParam) {
|
||||
String api = addressService.findByCode("inStore").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new InStoreResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<OutStoreResponse> outStore(OutStoreRequest requestParam) {
|
||||
String api = addressService.findByCode("outStore").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new OutStoreResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<EmptyVehicleOutStoreResponse> emptyVehicleOutStore(EmptyVehicleOutStoreRequest requestParam) {
|
||||
String api = addressService.findByCode("emptyVehicleOutStore").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new EmptyVehicleOutStoreResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<MoveStoreResponse> moveStore(MoveStoreRequest requestParam) {
|
||||
String api = addressService.findByCode("moveStore").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new MoveStoreResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<InStoreResetResponse> inStoreReset(InStoreResetRequest requestParam) {
|
||||
String api = addressService.findByCode("inStoreReset").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new InStoreResetResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<MoveStoreResetResponse> moveStoreReset(MoveStoreResetRequest requestParam) {
|
||||
String api = addressService.findByCode("moveStoreReset").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new MoveStoreResetResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<RoadWayIsLockResponse> roadWayIsLock(RoadWayIsLockRequest requestParam) {
|
||||
String api = addressService.findByCode("roadWayIsLock").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new RoadWayIsLockResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<InStoreReportResponse> inStoreReport(InStoreReportRequest requestParam) {
|
||||
String api = addressService.findByCode("inStoreReport").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new InStoreReportResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<OutStoreReportResponse> outStoreReport(OutStoreReportRequest requestParam) {
|
||||
String api = addressService.findByCode("outStoreReport").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new OutStoreReportResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<MoveStoreReportResponse> moveStoreReport(MoveStoreReportRequest requestParam) {
|
||||
String api = addressService.findByCode("moveStoreReport").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new MoveStoreReportResponse());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Resp<CancelTaskResponse> cancelTask(CancelTaskRequest requestParam) {
|
||||
String api = addressService.findByCode("cancelTask").getMethods_url();
|
||||
String result = AcsUtil.notifyAcs(api, requestParam);
|
||||
return RespUtil.getResp(result, new CancelTaskResponse());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user