diff --git a/src/main/java/com/wms/controller/RecordController.java b/src/main/java/com/wms/controller/RecordController.java index cba98fe..214eef9 100644 --- a/src/main/java/com/wms/controller/RecordController.java +++ b/src/main/java/com/wms/controller/RecordController.java @@ -52,7 +52,7 @@ public class RecordController { @PostMapping("/getTaskRecordByPage") @ResponseBody @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) - public String getGoodsInfoByPage(@RequestBody TaskRecordQuery taskRecordQuery){ + public String getTaskRecordByPage(@RequestBody TaskRecordQuery taskRecordQuery){ logger.info("接收到查询任务记录请求:{},请求ip:{}", convertJsonString(taskRecordQuery), HttpUtils.getIpAddr(servletRequest)); ResponseEntity response = new ResponseEntity(); try { @@ -73,9 +73,9 @@ public class RecordController { } catch (Exception e) { // 回滚事务 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); - logger.error("查询物料信息发生异常"); + logger.error("查询任务记录发生异常"); response.setCode(ResponseCode.ERROR.getCode()); - response.setMessage("查询物料发生异常"); + response.setMessage("查询任务记录发生异常"); return convertJsonString(response); } } diff --git a/src/main/java/com/wms/controller/SystemController.java b/src/main/java/com/wms/controller/SystemController.java index 7511608..ae14ed4 100644 --- a/src/main/java/com/wms/controller/SystemController.java +++ b/src/main/java/com/wms/controller/SystemController.java @@ -1,10 +1,17 @@ package com.wms.controller; +import com.wms.annotation.MyLog; +import com.wms.constants.enums.LocationStatus; import com.wms.constants.enums.ResponseCode; import com.wms.entity.app.ResponseEntity; +import com.wms.entity.app.dto.LocationDto; +import com.wms.entity.app.request.LocationQuery; import com.wms.entity.app.request.UserQuery; +import com.wms.entity.table.Location; +import com.wms.service.LocationService; import com.wms.system_service.ISystemService; import lombok.RequiredArgsConstructor; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -14,6 +21,9 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; + import static com.wms.utils.StringUtils.convertJsonString; @Controller @@ -26,6 +36,10 @@ public class SystemController { * 系统服务 */ private final ISystemService systemService; + /** + * 库位服务 + */ + private final LocationService locationService; /** * 重启系统 @@ -36,6 +50,7 @@ public class SystemController { @PostMapping("/restartSystem") @ResponseBody @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + @MyLog(logTitle = "重启系统", logMethod = "restartSystem") public String restartSystem(@RequestBody UserQuery user) { logger.info("接收到重启系统请求:{}", convertJsonString(user)); ResponseEntity response = new ResponseEntity(); @@ -66,6 +81,7 @@ public class SystemController { @PostMapping("/reloadConfig") @ResponseBody @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + @MyLog(logTitle = "重载配置", logMethod = "reloadConfig") public String reloadConfig(@RequestBody UserQuery user) { logger.info("接收到重载配置请求:{}", convertJsonString(user)); ResponseEntity response = new ResponseEntity(); @@ -86,4 +102,62 @@ public class SystemController { } return convertJsonString(response); } + + /** + * 生成库位 + * + * @param locationQuery 库位信息 + * @return 结果 + */ + @PostMapping("/genLocations") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + @MyLog(logTitle = "生成库位", logMethod = "genLocations") + public String reloadConfig(@RequestBody LocationQuery locationQuery) { + logger.info("接收到生成库位请求:{}", convertJsonString(locationQuery)); + ResponseEntity response = new ResponseEntity(); + if (locationQuery.getWRow() == null || locationQuery.getWCol() == null || locationQuery.getWLayer() == null || locationQuery.getWDepth() == null) { + logger.error("参数不正确"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("参数不正确"); + return convertJsonString(response); + } + List locations = new ArrayList<>(); + for (int wRow = 1; wRow <= locationQuery.getWRow(); wRow++) { + String prefixString = ""; + if (wRow == 2) { + prefixString = "E-"; + } else { + prefixString = "F-"; + } + for (int wCol = 1; wCol <= locationQuery.getWCol(); wCol++) { + for (int wLayer = 1; wLayer <= locationQuery.getWLayer(); wLayer++) { + for (int wDepth = 1; wDepth <= locationQuery.getWDepth(); wDepth++) { + Location tempLocation = new Location(); + tempLocation.setLocationId(prefixString + StringUtils.leftPad(String.valueOf(wCol), 2, "0") + "-" + StringUtils.leftPad(String.valueOf(wLayer), 2, "0") + "-" + StringUtils.leftPad(String.valueOf(wDepth), 2, "0")); + tempLocation.setLocationStatus(LocationStatus.EMPTY.getCode()); + tempLocation.setEquipmentId(3); + tempLocation.setLocationType(1); + tempLocation.setAreaId(2); + tempLocation.setIsLock(0); + tempLocation.setWRow(wRow); + tempLocation.setWCol(wCol); + tempLocation.setWLayer(wLayer); + tempLocation.setWDepth(wDepth); + locations.add(tempLocation); + } + } + } + } + if (locationService.saveBatch(locations)) { + logger.error("生成库位成功"); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("生成库位成功"); + } else { + logger.error("生成库位失败"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("生成库位失败"); + } + return convertJsonString(response); + } } diff --git a/src/main/java/com/wms/controller/TaskController.java b/src/main/java/com/wms/controller/TaskController.java index dcace28..714fa58 100644 --- a/src/main/java/com/wms/controller/TaskController.java +++ b/src/main/java/com/wms/controller/TaskController.java @@ -4,24 +4,24 @@ import cn.hutool.core.bean.BeanUtil; import com.alibaba.fastjson2.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.wms.annotation.MyLog; import com.wms.constants.enums.*; import com.wms.entity.app.*; +import com.wms.entity.app.dto.PageDto; import com.wms.entity.app.dto.TaskDto; import com.wms.entity.app.dto.extend.StockDetailInfo; import com.wms.entity.app.dto.extend.TaskDetailInfo; -import com.wms.entity.app.request.GoodsInRequest; -import com.wms.entity.app.request.TaskInRequest; -import com.wms.entity.app.request.TaskOutRequest; -import com.wms.entity.app.request.WcsTaskResultRequest; +import com.wms.entity.app.request.*; +import com.wms.entity.app.vo.TaskRecordVO; +import com.wms.entity.app.vo.TaskVO; import com.wms.entity.table.*; import com.wms.service.*; import com.wms.utils.HttpUtils; import com.wms.utils.StringUtils; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -50,7 +50,6 @@ import static com.wms.utils.WmsUtils.generateId; @CrossOrigin @RequiredArgsConstructor(onConstructor = @__(@Autowired)) @RequestMapping(value = "/wms/task") -@Api(value = "WMS任务控制类") public class TaskController { private final Logger logger = LoggerFactory.getLogger(this.getClass()); /** @@ -96,7 +95,6 @@ public class TaskController { @ResponseBody @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) @MyLog(logTitle = "入库请求", logMethod = "requestIn") - @ApiOperation(value = "请求入库") public String receiveTaskInRequest(@RequestBody TaskInRequest taskInRequest) { logger.info("接收到入库请求:{},ip地址:{}", JSON.toJSONString(taskInRequest), HttpUtils.getIpAddr(servletRequest)); // 创建响应信息 @@ -332,7 +330,6 @@ public class TaskController { @ResponseBody @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) @MyLog(logTitle = "出库请求", logMethod = "requestOut") - @ApiOperation(value = "请求入库") public String receiveTaskOutRequest(@RequestBody TaskOutRequest taskOutRequest) { logger.info("接收到出库请求:{},ip地址:{}", JSON.toJSONString(taskOutRequest), HttpUtils.getIpAddr(servletRequest)); // 创建响应信息 @@ -928,4 +925,70 @@ public class TaskController { } return TaskResultValidationEnum.OK.getErrorMessage(); } + + /** + * 查找所有物料 + */ + @PostMapping("/getTasksByPage") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getTasksByPage(@RequestBody TaskQuery taskQuery){ + ResponseEntity response = new ResponseEntity(); + try { + Page page = taskQuery.toMpPage(); + //更新条件 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() + .eq(taskQuery.getTaskType() != null, Task::getTaskType, taskQuery.getTaskType()) + .eq(taskQuery.getTaskStatus() != null, Task::getTaskStatus, taskQuery.getTaskStatus()) + .like(StringUtils.isNotEmpty(taskQuery.getVehicleId()), Task::getVehicleId, taskQuery.getVehicleId()) + .apply(StringUtils.isNotEmpty(taskQuery.getGoodsId()), "goods_related ->> '$.goodsId' like concat('%', {0}, '%')", taskQuery.getGoodsId()) + .apply(StringUtils.isNotEmpty(taskQuery.getGoodsName()), "goods_related ->> '$.goodsName' like concat('%', {0}, '%')", taskQuery.getGoodsName()); + Page tasksPage = taskService.page(page, lambdaQueryWrapper); + // 生成数据 + PageDto pageDto = PageDto.of(tasksPage, tasks -> BeanUtil.copyProperties(tasks, TaskVO.class)); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("查询成功"); + response.setReturnData(pageDto); + return convertJsonString(response); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("查询任务发生异常"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("查询任务发生异常"); + return convertJsonString(response); + } + } + + /** + * 根据 + */ + @PostMapping("/getTasks") + @ResponseBody + @Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED) + public String getTasks(@RequestBody TaskQuery taskQuery){ + ResponseEntity response = new ResponseEntity(); + try { + //更新条件 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper() + .eq(taskQuery.getTaskType() != null, Task::getTaskType, taskQuery.getTaskType()) + .eq(taskQuery.getTaskStatus() != null, Task::getTaskStatus, taskQuery.getTaskStatus()) + .eq(taskQuery.getIsPicking() != null, Task::getIsPicking, taskQuery.getIsPicking()) + .like(StringUtils.isNotEmpty(taskQuery.getVehicleId()), Task::getVehicleId, taskQuery.getVehicleId()) + .apply(StringUtils.isNotEmpty(taskQuery.getGoodsId()), "goods_related ->> '$.goodsId' like concat('%', {0}, '%')", taskQuery.getGoodsId()) + .apply(StringUtils.isNotEmpty(taskQuery.getGoodsName()), "goods_related ->> '$.goodsName' like concat('%', {0}, '%')", taskQuery.getGoodsName()); + List tasks = taskService.list(lambdaQueryWrapper); + response.setCode(ResponseCode.OK.getCode()); + response.setMessage("查询成功"); + response.setReturnData(tasks.isEmpty() ? new ArrayList() : tasks); + return convertJsonString(response); + } catch (Exception e) { + // 回滚事务 + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + logger.error("查询任务发生异常"); + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("查询任务发生异常"); + return convertJsonString(response); + } + } } \ No newline at end of file diff --git a/src/main/java/com/wms/entity/app/ResponseEntity.java b/src/main/java/com/wms/entity/app/ResponseEntity.java index 0f48344..e0b9b08 100644 --- a/src/main/java/com/wms/entity/app/ResponseEntity.java +++ b/src/main/java/com/wms/entity/app/ResponseEntity.java @@ -1,46 +1,29 @@ package com.wms.entity.app; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + /** * 接口响应实体类 */ +@Data public class ResponseEntity { /** * 响应代码 */ + @JsonProperty("code") private Integer code; /** * 错误信息 */ + @JsonProperty("message") private String message; /** * 返回数据(非必须) */ + @JsonProperty("returnData") private Object returnData; - - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public Object getReturnData() { - return returnData; - } - - public void setReturnData(Object returnData) { - this.returnData = returnData; - } } diff --git a/src/main/java/com/wms/entity/app/dto/LocationDto.java b/src/main/java/com/wms/entity/app/dto/LocationDto.java index 3770f08..d4a5786 100644 --- a/src/main/java/com/wms/entity/app/dto/LocationDto.java +++ b/src/main/java/com/wms/entity/app/dto/LocationDto.java @@ -1,5 +1,6 @@ package com.wms.entity.app.dto; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; /** diff --git a/src/main/java/com/wms/entity/app/request/GoodsInRequest.java b/src/main/java/com/wms/entity/app/request/GoodsInRequest.java index 7d9884f..417c3fd 100644 --- a/src/main/java/com/wms/entity/app/request/GoodsInRequest.java +++ b/src/main/java/com/wms/entity/app/request/GoodsInRequest.java @@ -1,5 +1,6 @@ package com.wms.entity.app.request; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -7,22 +8,21 @@ import lombok.Data; import java.math.BigDecimal; @Data -@ApiModel(value = "入库请求---物料数据") public class GoodsInRequest { - @ApiModelProperty(value ="物料编号") + @JsonProperty("goodsId") private String goodsId; - @ApiModelProperty(value ="物料名称") + @JsonProperty("goodsName") private String goodsName; - @ApiModelProperty(value ="物料类型") + @JsonProperty("goodsType") private String goodsType; - @ApiModelProperty(value ="物料单位") + @JsonProperty("goodsUnit") private String goodsUnit; - @ApiModelProperty(value ="物料数量") + @JsonProperty("goodsNum") private BigDecimal goodsNum; - @ApiModelProperty(value ="物料描述") + @JsonProperty("goodsDesc") private String goodsDesc; - @ApiModelProperty(value ="单个零件重量") + @JsonProperty("singleWeight") private BigDecimal singleWeight; - @ApiModelProperty(value ="零件总重量") + @JsonProperty("weight") private BigDecimal weight; } diff --git a/src/main/java/com/wms/entity/app/request/GoodsQuery.java b/src/main/java/com/wms/entity/app/request/GoodsQuery.java index 4e20d93..1c7bbcd 100644 --- a/src/main/java/com/wms/entity/app/request/GoodsQuery.java +++ b/src/main/java/com/wms/entity/app/request/GoodsQuery.java @@ -1,5 +1,6 @@ package com.wms.entity.app.request; +import com.fasterxml.jackson.annotation.JsonProperty; import com.wms.entity.table.Goods; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,11 +9,10 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data -@ApiModel(value = "物料查询") public class GoodsQuery extends PageQuery{ - @ApiModelProperty(value ="物料编号") + @JsonProperty("goodsId") private String goodsId; - @ApiModelProperty(value ="物料名称") + @JsonProperty("goodsId") private String goodsName; diff --git a/src/main/java/com/wms/entity/app/request/LocationQuery.java b/src/main/java/com/wms/entity/app/request/LocationQuery.java index 0618351..8741a38 100644 --- a/src/main/java/com/wms/entity/app/request/LocationQuery.java +++ b/src/main/java/com/wms/entity/app/request/LocationQuery.java @@ -1,37 +1,35 @@ package com.wms.entity.app.request; import cn.hutool.core.bean.BeanUtil; +import com.fasterxml.jackson.annotation.JsonProperty; import com.wms.entity.table.Location; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data -@ApiModel(value = "库位查询") public class LocationQuery extends PageQuery { - @ApiModelProperty(value = "库位号") + @JsonProperty("locationId") private String locationId; - @ApiModelProperty(value = "库区编号") + @JsonProperty("areaId") private Integer areaId; - @ApiModelProperty(value = "设备编号") + @JsonProperty("equipmentId") private Integer equipmentId; - @ApiModelProperty(value = "库位类型") + @JsonProperty("locationType") private Integer locationType; - @ApiModelProperty(value = "排") + @JsonProperty("wRow") private Integer wRow; - @ApiModelProperty(value = "列") + @JsonProperty("wCol") private Integer wCol; - @ApiModelProperty(value = "层") + @JsonProperty("wLayer") private Integer wLayer; - @ApiModelProperty(value = "深度") + @JsonProperty("wDepth") private Integer wDepth; - @ApiModelProperty(value = "是否锁定") + @JsonProperty("isLock") private Integer isLock; - @ApiModelProperty(value = "库位状态") + @JsonProperty("locationStatus") private Integer locationStatus; - @ApiModelProperty(value = "载具号") + @JsonProperty("vehicleId") private String vehicleId; /** diff --git a/src/main/java/com/wms/entity/app/request/PageQuery.java b/src/main/java/com/wms/entity/app/request/PageQuery.java index 18bdaaa..eff8def 100644 --- a/src/main/java/com/wms/entity/app/request/PageQuery.java +++ b/src/main/java/com/wms/entity/app/request/PageQuery.java @@ -2,21 +2,21 @@ package com.wms.entity.app.request; import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fasterxml.jackson.annotation.JsonProperty; import com.wms.utils.StringUtils; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data -@ApiModel(value = "分页查询") public class PageQuery { - @ApiModelProperty(value ="页码") + @JsonProperty("pageNo") private Long pageNo = 1L; - @ApiModelProperty(value ="每页行数") + @JsonProperty("pageSize") private Long pageSize = 10L; - @ApiModelProperty(value ="排序字段") + @JsonProperty("sortBy") private String sortBy; - @ApiModelProperty(value ="是否升序") + @JsonProperty("isAsc") private Boolean isAsc = true; /** diff --git a/src/main/java/com/wms/entity/app/request/StandQuery.java b/src/main/java/com/wms/entity/app/request/StandQuery.java index dede03c..34c04cb 100644 --- a/src/main/java/com/wms/entity/app/request/StandQuery.java +++ b/src/main/java/com/wms/entity/app/request/StandQuery.java @@ -1,5 +1,6 @@ package com.wms.entity.app.request; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -9,31 +10,30 @@ import java.time.LocalDateTime; @EqualsAndHashCode(callSuper = true) @Data -@ApiModel(value = "站台查询") public class StandQuery extends PageQuery { /** * 站台id */ - @ApiModelProperty(value = "站台号") + @JsonProperty("standId") private String standId; /** * 站台是否锁定 */ - @ApiModelProperty(value = "是否锁定") + @JsonProperty("isLock") private Integer isLock; /** * 站台状态 */ - @ApiModelProperty(value = "站台状态") + @JsonProperty("standStatus") private Integer standStatus; /** * 站台类型 */ - @ApiModelProperty(value = "站台类型") + @JsonProperty("standType") private Integer standType; /** * 设备类型 */ - @ApiModelProperty(value = "设备类型") + @JsonProperty("equipmentType") private Integer equipmentType; } diff --git a/src/main/java/com/wms/entity/app/request/StockQuery.java b/src/main/java/com/wms/entity/app/request/StockQuery.java index 1a6c80d..f785fc6 100644 --- a/src/main/java/com/wms/entity/app/request/StockQuery.java +++ b/src/main/java/com/wms/entity/app/request/StockQuery.java @@ -1,5 +1,6 @@ package com.wms.entity.app.request; +import com.fasterxml.jackson.annotation.JsonProperty; import com.wms.entity.app.dto.extend.StockDetailInfo; import com.wms.entity.table.Stock; import com.wms.utils.StringUtils; @@ -10,19 +11,18 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "库存记录查询---客户端") public class StockQuery extends PageQuery { - @ApiModelProperty(value = "库存状态") + @JsonProperty("stockStatus") private Integer stockStatus; - @ApiModelProperty(value = "物料状态") + @JsonProperty("goodsStatus") private Integer goodsStatus; - @ApiModelProperty(value = "库位编号") + @JsonProperty("locationId") private String locationId; - @ApiModelProperty(value = "载具号/料箱号") + @JsonProperty("vehicleId") private String vehicleId; - @ApiModelProperty(value = "物料编号") + @JsonProperty("goodsId") private String goodsId; - @ApiModelProperty(value = "物料名称/描述") + @JsonProperty("goodsName") private String goodsName; /** diff --git a/src/main/java/com/wms/entity/app/request/TaskInRequest.java b/src/main/java/com/wms/entity/app/request/TaskInRequest.java index c600af3..52bcab9 100644 --- a/src/main/java/com/wms/entity/app/request/TaskInRequest.java +++ b/src/main/java/com/wms/entity/app/request/TaskInRequest.java @@ -1,5 +1,6 @@ package com.wms.entity.app.request; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,16 +9,15 @@ import java.math.BigDecimal; import java.util.List; @Data -@ApiModel(value = "入库请求") public class TaskInRequest { - @ApiModelProperty(value ="载具号") + @JsonProperty("vehicleId") private String vehicleId; - @ApiModelProperty(value ="起点站台") + @JsonProperty("originPoint") private String originPoint; - @ApiModelProperty(value ="称重") + @JsonProperty("totalWeight") private BigDecimal totalWeight; - @ApiModelProperty(value ="用户名") + @JsonProperty("userName") private String userName; - @ApiModelProperty(value ="入库物料清单") + @JsonProperty("goodsList") private List goodsList; } diff --git a/src/main/java/com/wms/entity/app/request/TaskOutRequest.java b/src/main/java/com/wms/entity/app/request/TaskOutRequest.java index 97cd8b0..17322e8 100644 --- a/src/main/java/com/wms/entity/app/request/TaskOutRequest.java +++ b/src/main/java/com/wms/entity/app/request/TaskOutRequest.java @@ -1,5 +1,6 @@ package com.wms.entity.app.request; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -7,22 +8,21 @@ import lombok.Data; import java.math.BigDecimal; @Data -@ApiModel(value = "出库请求") public class TaskOutRequest { - @ApiModelProperty(value ="物料编号") + @JsonProperty("goodsId") private String goodsId; - @ApiModelProperty(value ="数量") + @JsonProperty("goodsNum") private BigDecimal goodsNum; - @ApiModelProperty(value ="载具号") + @JsonProperty("vehicleId") private String vehicleId; - @ApiModelProperty(value ="起始库位") + @JsonProperty("originPoint") private String originPoint; - @ApiModelProperty(value ="终点站台") + @JsonProperty("destinationPoint") private String destinationPoint; - @ApiModelProperty(value ="用户名") + @JsonProperty("userName") private String userName; - @ApiModelProperty(value ="是否拣选") + @JsonProperty("isPicking") private Integer isPicking; - @ApiModelProperty(value ="拣选站台") + @JsonProperty("pickStand") private String pickStand; } diff --git a/src/main/java/com/wms/entity/app/request/TaskQuery.java b/src/main/java/com/wms/entity/app/request/TaskQuery.java new file mode 100644 index 0000000..67bd48e --- /dev/null +++ b/src/main/java/com/wms/entity/app/request/TaskQuery.java @@ -0,0 +1,44 @@ +package com.wms.entity.app.request; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.wms.entity.app.dto.extend.TaskDetailInfo; +import com.wms.entity.table.Task; +import com.wms.utils.StringUtils; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = true) +public class TaskQuery extends PageQuery { + @JsonProperty("taskType") + private Integer taskType; + @JsonProperty("vehicleId") + private String vehicleId; + @JsonProperty("goodsId") + private String goodsId; + @JsonProperty("goodsName") + private String goodsName; + @JsonProperty("taskStatus") + private Integer taskStatus; + @JsonProperty("isPicking") + private Integer isPicking; + + /** + * 根据客户端查询生成数据库查询条件 + * @return 数据库PO + */ + public Task toTaskPO() { + Task taskPO = new Task(); + taskPO.setTaskType(taskType);// 任务类型 + taskPO.setVehicleId(vehicleId);// 载具号 + taskPO.setIsPicking(isPicking); + if (StringUtils.isNotEmpty(goodsId) || StringUtils.isNotEmpty(goodsName)) {// 包含物料详细信息 + TaskDetailInfo goodsRelatedPO = new TaskDetailInfo(); + goodsRelatedPO.setGoodsId(goodsId); + goodsRelatedPO.setGoodsName(goodsName); + taskPO.setGoodsRelated(goodsRelatedPO); + } + + return taskPO; + } +} diff --git a/src/main/java/com/wms/entity/app/request/TaskRecordQuery.java b/src/main/java/com/wms/entity/app/request/TaskRecordQuery.java index 657e155..eb0de6d 100644 --- a/src/main/java/com/wms/entity/app/request/TaskRecordQuery.java +++ b/src/main/java/com/wms/entity/app/request/TaskRecordQuery.java @@ -1,5 +1,6 @@ package com.wms.entity.app.request; +import com.fasterxml.jackson.annotation.JsonProperty; import com.wms.entity.app.dto.extend.TaskDetailInfo; import com.wms.entity.table.TaskRecord; import com.wms.utils.StringUtils; @@ -10,15 +11,14 @@ import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "任务记录查询---客户端") public class TaskRecordQuery extends PageQuery { - @ApiModelProperty(value = "任务类型") + @JsonProperty("taskType") private Integer taskType; - @ApiModelProperty(value = "载具号/料箱号") + @JsonProperty("vehicleId") private String vehicleId; - @ApiModelProperty(value = "物料编号") + @JsonProperty("goodsId") private String goodsId; - @ApiModelProperty(value = "物料名称/描述") + @JsonProperty("goodsName") private String goodsName; /** diff --git a/src/main/java/com/wms/entity/app/request/UserQuery.java b/src/main/java/com/wms/entity/app/request/UserQuery.java index 75644b4..bd398a8 100644 --- a/src/main/java/com/wms/entity/app/request/UserQuery.java +++ b/src/main/java/com/wms/entity/app/request/UserQuery.java @@ -1,6 +1,7 @@ package com.wms.entity.app.request; import cn.hutool.core.bean.BeanUtil; +import com.fasterxml.jackson.annotation.JsonProperty; import com.wms.entity.table.User; import com.wms.utils.MyPassword; import com.wms.utils.StringUtils; @@ -13,31 +14,30 @@ import java.time.LocalDateTime; @EqualsAndHashCode(callSuper = true) @Data -@ApiModel(value = "载具查询") public class UserQuery extends PageQuery{ /** 用户ID */ - @ApiModelProperty(value = "用户id") + @JsonProperty("userId") private Integer userId; /** 用户名 */ - @ApiModelProperty(value = "用户名") + @JsonProperty("userName") private String userName; /** 角色Id */ - @ApiModelProperty(value = "角色id") + @JsonProperty("roleId") private Integer roleId; /** 登录账户 */ - @ApiModelProperty(value = "登录账号") + @JsonProperty("loginAccount") private String loginAccount; /** 登录密码 */ - @ApiModelProperty(value = "登录密码") + @JsonProperty("loginPassword") private String loginPassword; /** 添加时间 */ - @ApiModelProperty(value = "添加时间") + @JsonProperty("addTime") private LocalDateTime addTime; /** 更新时间 */ - @ApiModelProperty(value = "更新时间") + @JsonProperty("updateTime") private LocalDateTime updateTime; /** 添加用户名 */ - @ApiModelProperty(value = "添加用户") + @JsonProperty("addUser") private String addUser; /** diff --git a/src/main/java/com/wms/entity/app/request/VehicleQuery.java b/src/main/java/com/wms/entity/app/request/VehicleQuery.java index 7a8db88..4f50224 100644 --- a/src/main/java/com/wms/entity/app/request/VehicleQuery.java +++ b/src/main/java/com/wms/entity/app/request/VehicleQuery.java @@ -1,6 +1,7 @@ package com.wms.entity.app.request; import cn.hutool.core.bean.BeanUtil; +import com.fasterxml.jackson.annotation.JsonProperty; import com.wms.entity.table.Location; import com.wms.entity.table.Vehicle; import io.swagger.annotations.ApiModel; @@ -10,15 +11,14 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data -@ApiModel(value = "载具查询") public class VehicleQuery extends PageQuery { - @ApiModelProperty(value = "载具编号") + @JsonProperty("vehicleId") private String vehicleId; - @ApiModelProperty(value = "载具状态") + @JsonProperty("vehicleStatus") private Integer vehicleStatus; - @ApiModelProperty(value = "是否为空") + @JsonProperty("isEmpty") private Integer isEmpty; - @ApiModelProperty(value = "当前位置") + @JsonProperty("currentLocation") private String currentLocation; /** diff --git a/src/main/java/com/wms/entity/app/request/WcsTaskResultRequest.java b/src/main/java/com/wms/entity/app/request/WcsTaskResultRequest.java index c07c927..c030de2 100644 --- a/src/main/java/com/wms/entity/app/request/WcsTaskResultRequest.java +++ b/src/main/java/com/wms/entity/app/request/WcsTaskResultRequest.java @@ -1,35 +1,35 @@ package com.wms.entity.app.request; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data -@ApiModel(value = "WCS任务结果反馈请求") public class WcsTaskResultRequest { /** * 任务id----对应wms的taskGroup */ - @ApiModelProperty(value = "任务id---对应wms的taskGroup") + @JsonProperty("taskId") private String taskId; /** * 载具号 */ - @ApiModelProperty(value = "载具号") + @JsonProperty("vehicleId") private String vehicleId; /** * 任务状态 */ - @ApiModelProperty(value = "任务状态") + @JsonProperty("taskStatus") private Integer taskStatus; /** * 任务终点 */ - @ApiModelProperty(value = "任务终点") + @JsonProperty("destination") private String destination; /** * 任务信息 */ - @ApiModelProperty(value = "任务信息") + @JsonProperty("message") private String message; } diff --git a/src/main/java/com/wms/entity/app/request/WmsLogQuery.java b/src/main/java/com/wms/entity/app/request/WmsLogQuery.java index 500eb3a..0d77775 100644 --- a/src/main/java/com/wms/entity/app/request/WmsLogQuery.java +++ b/src/main/java/com/wms/entity/app/request/WmsLogQuery.java @@ -1,5 +1,6 @@ package com.wms.entity.app.request; +import com.fasterxml.jackson.annotation.JsonProperty; import com.wms.entity.table.WmsLog; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -8,9 +9,8 @@ import lombok.EqualsAndHashCode; @EqualsAndHashCode(callSuper = true) @Data -@ApiModel(value = "日志查询") public class WmsLogQuery extends PageQuery { - @ApiModelProperty(value = "日志查询参数") + @JsonProperty("queryParam") private String queryParam; /** diff --git a/src/main/java/com/wms/entity/app/vo/TaskVO.java b/src/main/java/com/wms/entity/app/vo/TaskVO.java new file mode 100644 index 0000000..b346d71 --- /dev/null +++ b/src/main/java/com/wms/entity/app/vo/TaskVO.java @@ -0,0 +1,82 @@ +package com.wms.entity.app.vo; + +import com.wms.entity.app.dto.extend.TaskDetailInfo; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * 任务记录VO + */ +@Data +public class TaskVO { + /** + * 任务号 + */ + private String taskId; + /** + * 任务类型 + */ + private Integer taskType; + /** + * 任务状态 + */ + private Integer taskStatus; + /** + * 起点 + */ + private String origin; + /** + * 终点 + */ + private String destination; + /** + * 任务优先级 + */ + private Integer taskPriority; + /** + * 任务组 + */ + private String taskGroup; + /** + * 载具号 + */ + private String vehicleId; + /** + * 重量 + */ + private BigDecimal weight; + /** + * 载具尺寸 + */ + private Integer vehicleSize; + /** + * 创建时间 + */ + private LocalDateTime createTime; + /** + * 完成时间 + */ + private LocalDateTime finishTime; + /** + * 用户名 + */ + private String userName; + /** + * 物料相关 + */ + private TaskDetailInfo goodsRelated; + /** + * 前置任务号 + */ + private String preTask; + /** + * 是否拣选 + */ + private Integer isPicking; + /** + * 拣选站台 + */ + private String pickStand; +} diff --git a/src/main/java/com/wms/entity/app/wcs/ETaskData.java b/src/main/java/com/wms/entity/app/wcs/ETaskData.java deleted file mode 100644 index aeb4f56..0000000 --- a/src/main/java/com/wms/entity/app/wcs/ETaskData.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.wms.entity.app.wcs; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -@ApiModel(value = "电子标签详细任务数据") -public class ETaskData { - @ApiModelProperty(value = "任务号") - private String taskId; - @ApiModelProperty(value = "点位") - private String location; - @ApiModelProperty(value = "物料编号") - private String goodsId; - @ApiModelProperty(value = "物料名称") - private String goodsName; - @ApiModelProperty(value = "需求数量") - private Integer needNum; - - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getGoodsId() { - return goodsId; - } - - public void setGoodsId(String goodsId) { - this.goodsId = goodsId; - } - - public String getGoodsName() { - return goodsName; - } - - public void setGoodsName(String goodsName) { - this.goodsName = goodsName; - } - - public Integer getNeedNum() { - return needNum; - } - - public void setNeedNum(Integer needNum) { - this.needNum = needNum; - } -} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsBoxArriveRequest.java b/src/main/java/com/wms/entity/app/wcs/WcsBoxArriveRequest.java index d271c19..af7b4b8 100644 --- a/src/main/java/com/wms/entity/app/wcs/WcsBoxArriveRequest.java +++ b/src/main/java/com/wms/entity/app/wcs/WcsBoxArriveRequest.java @@ -1,48 +1,16 @@ package com.wms.entity.app.wcs; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; -@ApiModel(value = "WCS料箱到达请求") +@Data public class WcsBoxArriveRequest { - @ApiModelProperty(value = "任务组编号") + @JsonProperty("taskGroup") private String taskGroup; - @ApiModelProperty(value = "料箱号") + @JsonProperty("vehicleNo") private String vehicleNo; - @ApiModelProperty(value = "点位---站台") + @JsonProperty("location") private String location; - @ApiModelProperty(value = "备注") + @JsonProperty("remark") private String remark; - - public String getTaskGroup() { - return taskGroup; - } - - public void setTaskGroup(String taskGroup) { - this.taskGroup = taskGroup; - } - - public String getVehicleNo() { - return vehicleNo; - } - - public void setVehicleNo(String vehicleNo) { - this.vehicleNo = vehicleNo; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } } diff --git a/src/main/java/com/wms/entity/app/wcs/WcsChangeTaskRequest.java b/src/main/java/com/wms/entity/app/wcs/WcsChangeTaskRequest.java index f813ac4..f868c48 100644 --- a/src/main/java/com/wms/entity/app/wcs/WcsChangeTaskRequest.java +++ b/src/main/java/com/wms/entity/app/wcs/WcsChangeTaskRequest.java @@ -1,28 +1,12 @@ package com.wms.entity.app.wcs; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; -@ApiModel(description = "向WCS发送任务请求") +@Data public class WcsChangeTaskRequest { - @ApiModelProperty(value = "任务ID", required = true) + @JsonProperty("taskId") private String taskId; - @ApiModelProperty(value = "任务状态---修改后", required = true) + @JsonProperty("taskStatus") private Integer taskStatus; - - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public Integer getTaskStatus() { - return taskStatus; - } - - public void setTaskStatus(Integer taskStatus) { - this.taskStatus = taskStatus; - } } diff --git a/src/main/java/com/wms/entity/app/wcs/WcsCommonResponse.java b/src/main/java/com/wms/entity/app/wcs/WcsCommonResponse.java index c4ce534..bd0103b 100644 --- a/src/main/java/com/wms/entity/app/wcs/WcsCommonResponse.java +++ b/src/main/java/com/wms/entity/app/wcs/WcsCommonResponse.java @@ -1,38 +1,16 @@ package com.wms.entity.app.wcs; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; -@ApiModel(description = "WCS通用返回信息") +@Data public class WcsCommonResponse { - @ApiModelProperty(value = "返回码", required = true) + @JsonProperty("code") private Integer code; - @ApiModelProperty(value = "返回信息", required = true) + @JsonProperty("message") private String message; - @ApiModelProperty(value = "返回数据") + @JsonProperty("returnData") private T returnData; - - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public T getReturnData() { - return returnData; - } - - public void setReturnData(T returnData) { - this.returnData = returnData; - } } diff --git a/src/main/java/com/wms/entity/app/wcs/WcsETaskFeedbackRequest.java b/src/main/java/com/wms/entity/app/wcs/WcsETaskFeedbackRequest.java deleted file mode 100644 index b08bd33..0000000 --- a/src/main/java/com/wms/entity/app/wcs/WcsETaskFeedbackRequest.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.wms.entity.app.wcs; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -@ApiModel(value = "WCS电子标签任务反馈请求") -public class WcsETaskFeedbackRequest { - @ApiModelProperty(value = "任务组") - private String taskGroup; - @ApiModelProperty(value = "任务类型") - private Integer taskType; - @ApiModelProperty(value = "料箱号") - private String vehicleNo; - @ApiModelProperty(value = "订单号") - private String orderId; - @ApiModelProperty(value = "任务号") - private String taskId; - @ApiModelProperty(value = "点位") - private String location; - @ApiModelProperty(value = "物料编号") - private String goodsId; - @ApiModelProperty(value = "物料名称") - private String goodsName; - @ApiModelProperty(value = "需求数量") - private Integer needNum; - @ApiModelProperty(value = "确认数量") - private Integer confirmNum; - - public String getTaskGroup() { - return taskGroup; - } - - public void setTaskGroup(String taskGroup) { - this.taskGroup = taskGroup; - } - - public Integer getTaskType() { - return taskType; - } - - public void setTaskType(Integer taskType) { - this.taskType = taskType; - } - - public String getVehicleNo() { - return vehicleNo; - } - - public void setVehicleNo(String vehicleNo) { - this.vehicleNo = vehicleNo; - } - - public String getOrderId() { - return orderId; - } - - public void setOrderId(String orderId) { - this.orderId = orderId; - } - - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public String getLocation() { - return location; - } - - public void setLocation(String location) { - this.location = location; - } - - public String getGoodsId() { - return goodsId; - } - - public void setGoodsId(String goodsId) { - this.goodsId = goodsId; - } - - public String getGoodsName() { - return goodsName; - } - - public void setGoodsName(String goodsName) { - this.goodsName = goodsName; - } - - public Integer getNeedNum() { - return needNum; - } - - public void setNeedNum(Integer needNum) { - this.needNum = needNum; - } - - public Integer getConfirmNum() { - return confirmNum; - } - - public void setConfirmNum(Integer confirmNum) { - this.confirmNum = confirmNum; - } -} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsETaskRequest.java b/src/main/java/com/wms/entity/app/wcs/WcsETaskRequest.java deleted file mode 100644 index 58ba1a9..0000000 --- a/src/main/java/com/wms/entity/app/wcs/WcsETaskRequest.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.wms.entity.app.wcs; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.util.List; - -@ApiModel(value = "WCS电子标签任务发送请求") -public class WcsETaskRequest { - @ApiModelProperty(value = "任务组") - private String taskGroup; - @ApiModelProperty(value = "任务类型") - private Integer taskType; - @ApiModelProperty(value = "料箱号") - private String vehicleNo; - @ApiModelProperty(value = "订单号") - private String orderId; - @ApiModelProperty(value = "任务数据") - private List taskData; - - public String getTaskGroup() { - return taskGroup; - } - - public void setTaskGroup(String taskGroup) { - this.taskGroup = taskGroup; - } - - public Integer getTaskType() { - return taskType; - } - - public void setTaskType(Integer taskType) { - this.taskType = taskType; - } - - public String getVehicleNo() { - return vehicleNo; - } - - public void setVehicleNo(String vehicleNo) { - this.vehicleNo = vehicleNo; - } - - public String getOrderId() { - return orderId; - } - - public void setOrderId(String orderId) { - this.orderId = orderId; - } - - public List getTaskData() { - return taskData; - } - - public void setTaskData(List taskData) { - this.taskData = taskData; - } -} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsFeedbackTaskRequest.java b/src/main/java/com/wms/entity/app/wcs/WcsFeedbackTaskRequest.java index 950d53c..7fe1cfa 100644 --- a/src/main/java/com/wms/entity/app/wcs/WcsFeedbackTaskRequest.java +++ b/src/main/java/com/wms/entity/app/wcs/WcsFeedbackTaskRequest.java @@ -1,48 +1,16 @@ package com.wms.entity.app.wcs; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; -@ApiModel(description = "WCS发送任务反馈") +@Data public class WcsFeedbackTaskRequest { - @ApiModelProperty(value = "任务Id") + @JsonProperty("taskId") private String taskId; - @ApiModelProperty(value = "任务状态") + @JsonProperty("taskStatus") private Integer taskStatus; - @ApiModelProperty(value = "任务终点") + @JsonProperty("destination") private String destination; - @ApiModelProperty(value = "异常信息") + @JsonProperty("message") private String message; - - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public Integer getTaskStatus() { - return taskStatus; - } - - public void setTaskStatus(Integer taskStatus) { - this.taskStatus = taskStatus; - } - - public String getDestination() { - return destination; - } - - public void setDestination(String destination) { - this.destination = destination; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } } diff --git a/src/main/java/com/wms/entity/app/wcs/WcsStandTaskRequest.java b/src/main/java/com/wms/entity/app/wcs/WcsStandTaskRequest.java deleted file mode 100644 index 0376114..0000000 --- a/src/main/java/com/wms/entity/app/wcs/WcsStandTaskRequest.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.wms.entity.app.wcs; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -import java.util.List; - -@ApiModel(value = "WCS站台拣选任务请求") -public class WcsStandTaskRequest { - @ApiModelProperty("任务组编号") - private String taskGroup; - @ApiModelProperty("料箱号") - private String vehicleNo; - @ApiModelProperty("任务类型---1:拣选任务") - private Integer taskType; - @ApiModelProperty("点位---站台号") - private List location; - @ApiModelProperty("备注") - private String remark; - - public String getTaskGroup() { - return taskGroup; - } - - public void setTaskGroup(String taskGroup) { - this.taskGroup = taskGroup; - } - - public String getVehicleNo() { - return vehicleNo; - } - - public void setVehicleNo(String vehicleNo) { - this.vehicleNo = vehicleNo; - } - - public Integer getTaskType() { - return taskType; - } - - public void setTaskType(Integer taskType) { - this.taskType = taskType; - } - - public List getLocation() { - return location; - } - - public void setLocation(List location) { - this.location = location; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } -} diff --git a/src/main/java/com/wms/entity/app/wcs/WcsTaskRequest.java b/src/main/java/com/wms/entity/app/wcs/WcsTaskRequest.java index bf82f3e..18ffcbe 100644 --- a/src/main/java/com/wms/entity/app/wcs/WcsTaskRequest.java +++ b/src/main/java/com/wms/entity/app/wcs/WcsTaskRequest.java @@ -1,93 +1,31 @@ package com.wms.entity.app.wcs; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; import java.math.BigDecimal; /** * 向Wcs发送任务的请求 */ -@ApiModel(description = "向WCS发送任务请求") +@Data public class WcsTaskRequest { - @ApiModelProperty(value = "任务ID", required = true) + @JsonProperty("taskId") private String taskId; - @ApiModelProperty(value = "任务类型", required = true) + @JsonProperty("taskType") private Integer taskType; - @ApiModelProperty(value = "任务优先级---同一任务类型中优先级") + @JsonProperty("priority") private Integer priority; - @ApiModelProperty(value = "任务起点") + @JsonProperty("origin") private String origin; - @ApiModelProperty(value = "任务终点") + @JsonProperty("destination") private String destination; - @ApiModelProperty(value = "料箱号", required = true) + @JsonProperty("vehicleNo") private String vehicleNo; - @ApiModelProperty(value = "料箱尺寸") + @JsonProperty("vehicleSize") private Integer vehicleSize = 0; - @ApiModelProperty(value = "重量") + @JsonProperty("weight") private BigDecimal weight = BigDecimal.ZERO; - - public String getTaskId() { - return taskId; - } - - public void setTaskId(String taskId) { - this.taskId = taskId; - } - - public Integer getTaskType() { - return taskType; - } - - public void setTaskType(Integer taskType) { - this.taskType = taskType; - } - - public Integer getPriority() { - return priority; - } - - public void setPriority(Integer priority) { - this.priority = priority; - } - - public String getOrigin() { - return origin; - } - - public void setOrigin(String origin) { - this.origin = origin; - } - - public String getDestination() { - return destination; - } - - public void setDestination(String destination) { - this.destination = destination; - } - - public String getVehicleNo() { - return vehicleNo; - } - - public void setVehicleNo(String vehicleNo) { - this.vehicleNo = vehicleNo; - } - - public Integer getVehicleSize() { - return vehicleSize; - } - - public void setVehicleSize(Integer vehicleSize) { - this.vehicleSize = vehicleSize; - } - - public BigDecimal getWeight() { - return weight; - } - - public void setWeight(BigDecimal weight) { - this.weight = weight; - } } diff --git a/src/main/java/com/wms/entity/app/wcs/WcsVehicleInRequest.java b/src/main/java/com/wms/entity/app/wcs/WcsVehicleInRequest.java index 7c8b909..ddf4a81 100644 --- a/src/main/java/com/wms/entity/app/wcs/WcsVehicleInRequest.java +++ b/src/main/java/com/wms/entity/app/wcs/WcsVehicleInRequest.java @@ -1,48 +1,18 @@ package com.wms.entity.app.wcs; +import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import lombok.Data; -@ApiModel(value = "WCS请求料箱入库") +@Data public class WcsVehicleInRequest { - @ApiModelProperty(value = "点位") + @JsonProperty("point") private String point; - @ApiModelProperty(value = "料箱号") + @JsonProperty("vehicleNo") private String vehicleNo; - @ApiModelProperty(value = "条码信息") + @JsonProperty("codeMessage") private String codeMessage; - @ApiModelProperty(value = "备注") + @JsonProperty("remark") private String remark; - - public String getPoint() { - return point; - } - - public void setPoint(String point) { - this.point = point; - } - - public String getVehicleNo() { - return vehicleNo; - } - - public void setVehicleNo(String vehicleNo) { - this.vehicleNo = vehicleNo; - } - - public String getCodeMessage() { - return codeMessage; - } - - public void setCodeMessage(String codeMessage) { - this.codeMessage = codeMessage; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } } diff --git a/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java index f25b8b0..5bc47b6 100644 --- a/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java +++ b/src/main/java/com/wms/service/serviceImplements/LocationServiceImplements.java @@ -51,7 +51,7 @@ public class LocationServiceImplements extends ServiceImpl resultMap = new HashMap<>(); // 查找对应站台 LambdaQueryWrapper locationQueryWrapper = new LambdaQueryWrapper() - .eq(Location::getAreaId, 1) + .eq(Location::getAreaId, 2) .eq(Location::getLocationStatus, 0) .eq(Location::getLocationType, 1) .eq(Location::getIsLock, 0); diff --git a/src/main/java/com/wms/service/serviceImplements/LogServiceImplements.java b/src/main/java/com/wms/service/serviceImplements/LogServiceImplements.java index cbe36e2..0a0d154 100644 --- a/src/main/java/com/wms/service/serviceImplements/LogServiceImplements.java +++ b/src/main/java/com/wms/service/serviceImplements/LogServiceImplements.java @@ -1,20 +1,14 @@ package com.wms.service.serviceImplements; -import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.wms.entity.app.dto.WmsLogDto; import com.wms.entity.table.WmsLog; import com.wms.mapper.LogMapper; import com.wms.service.LogService; -import com.wms.utils.StringUtils; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.List; - @Service @RequiredArgsConstructor(onConstructor = @__(@Autowired)) public class LogServiceImplements extends ServiceImpl implements LogService { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index a48975a..e49269d 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -8,26 +8,26 @@ spring: # 主库 master: # 宝开服务器--外网 - url: jdbc:mysql://112.4.208.194:3001/wms_miniload_bk7?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true +# url: jdbc:mysql://112.4.208.194:3001/wms_miniload_bk7?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true +# username: coder +# password: coder +# driver-class-name: com.mysql.cj.jdbc.Driver + # 宝开服务器--内网 + url: jdbc:mysql://192.168.3.254:3306/wms_miniload_bk7?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true username: coder password: coder driver-class-name: com.mysql.cj.jdbc.Driver - # 宝开服务器--内网 -# url: jdbc:mysql://192.168.3.254:3306/wms_miniload_bk7?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true -# username: coder -# password: coder -# driver-class-name: com.mysql.jdbc.Driver # 上线环境 # url: jdbc:mysql://localhost:3306/wms_xizhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true # username: developer # password: developer -# driver-class-name: com.mysql.jdbc.Driver +# driver-class-name: com.mysql.cj.jdbc.Driver # 从库 - slave_1: - url: jdbc:mysql://localhost:3306/wms_xizhou?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true - username: developer - password: developer - driver-class-name: com.mysql.cj.jdbc.Driver +# slave_1: +# url: jdbc:mysql://localhost:3306/wms_miniload_bk7?characterEncoding=utf8&serverTimezone=Asia/Shanghai&allowMultiQueries=true&rewriteBatchedStatements=true +# username: developer +# password: developer +# driver-class-name: com.mysql.cj.jdbc.Driver profiles: active: online server: