代码更新
This commit is contained in:
parent
d76fb877f4
commit
a6875a66ef
10
pom.xml
10
pom.xml
|
|
@ -157,6 +157,16 @@
|
|||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.4.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.microsoft.ews-java-api</groupId>
|
||||
<artifactId>ews-java-api</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.wms;
|
||||
|
||||
import com.wms.utils.MailUtils;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@ package com.wms.constants.enums;
|
|||
|
||||
public enum ConfigMapKeyEnum {
|
||||
MAX_WEIGHT("MAX_WEIGHT"),
|
||||
URL_WCS_TASK("URL_WCS_TASK");
|
||||
URL_WCS_TASK("URL_WCS_TASK"),
|
||||
URL_NEW_DESTINATION("URL_NEW_DESTINATION");
|
||||
private final String configKey;
|
||||
ConfigMapKeyEnum(String configKey) {
|
||||
this.configKey = configKey;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ package com.wms.constants.enums;
|
|||
* Wms任务状态的枚举
|
||||
*/
|
||||
public enum WmsTaskStatus {
|
||||
DUPLICATE(-2, "重复入库"),
|
||||
TEMP(-1, "暂存任务"),
|
||||
NEW(0, "任务新建,待下发"),
|
||||
WAIT(1, "任务已下发"),
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import com.wms.constants.enums.*;
|
|||
import com.wms.entity.app.ResponseEntity;
|
||||
import com.wms.entity.app.dto.TaskDto;
|
||||
import com.wms.entity.app.wcs.WcsTaskRequest;
|
||||
import com.wms.entity.table.Stand;
|
||||
import com.wms.entity.table.Task;
|
||||
import com.wms.entity.table.WmsLog;
|
||||
import com.wms.service.*;
|
||||
|
|
@ -49,14 +50,124 @@ public class JobComponent {
|
|||
* 日志服务
|
||||
*/
|
||||
private final LogService logService;
|
||||
/**
|
||||
* 站台服务
|
||||
*/
|
||||
private final StandService standService;
|
||||
|
||||
|
||||
/**
|
||||
* 向Wcs下发任务
|
||||
* 每2秒执行一次
|
||||
*/
|
||||
@Scheduled(fixedDelay = 2000)
|
||||
// @Scheduled(fixedDelay = 2000)
|
||||
public void executeTasks() {
|
||||
// 发送正常任务
|
||||
sendCommonTask();
|
||||
// 针对重复入库的任务,发送新的目的地
|
||||
solveDuplicateTask();
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行备料任务的轮询,处理站台任务
|
||||
*/
|
||||
// @Scheduled(fixedDelay = 2000)
|
||||
public void checkForOrders() {
|
||||
// 轮询工作站台,判断是否需要下发任务
|
||||
List<Stand> stands = standService.list(new LambdaQueryWrapper<Stand>()
|
||||
.eq(Stand::getStandType, 2));
|
||||
for (Stand workStation : stands) {
|
||||
// TODO 判断当前站台还有没有未完成的任务
|
||||
// 1.有未完成的任务,继续做未完成的
|
||||
doTask(workStation.getStandId());
|
||||
// 2.没有任务,生成新的任务
|
||||
createTask(workStation.getStandId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 做备料任务
|
||||
*/
|
||||
private void doTask(String workStationId) {
|
||||
// TODO 生成出库任务---针对未完成的任务
|
||||
// 1. 判断堵塞阈值,超过则不生成任务
|
||||
// 2. 已经出库的物料不再重复下发任务
|
||||
// 3. 生成某个箱子的出库任务后,对应箱子的所有物料添加进出库列表
|
||||
}
|
||||
|
||||
/**
|
||||
* 做备料任务
|
||||
*/
|
||||
private void createTask(String workStationId) {
|
||||
// TODO 联表查询 要加一个一个order,确保序号靠前的工单先做
|
||||
// 装载机机型 工站配置-工作站台+工位+机型+大工位+开工时间调整-----DBS-顺序-工单+开工时间-----工单-工单+工位+物料号+数量
|
||||
// 平地机机型
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 每天查询一次是否有过期的库存
|
||||
// * 每天晚上8点执行一次
|
||||
// */
|
||||
//// @Scheduled(cron = "0 0 20 * * ?")
|
||||
// public void detectOutOfDateStock() {
|
||||
// logger.info("执行定时任务:查询过期库存");
|
||||
// List<StockDto> outOfDateStocks = stockService.selStockOutOfDate();
|
||||
// if (outOfDateStocks.size() > 0) {
|
||||
// logger.info("过期库存数量不为0,准备更新过期库存");
|
||||
// for (StockDto outOfDateStock : outOfDateStocks) {
|
||||
// try {
|
||||
// outOfDateStock.setGoodsStatus(GoodsStatus.OVERDUE.getCode());
|
||||
// stockService.modifyStock(outOfDateStock);
|
||||
// logger.info("过期库存更新成功");
|
||||
// } catch (Exception e) {
|
||||
// logger.error("过期库存更新异常:{}", e.getMessage());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 每天查询一次是否有入库后长期未使用的库存
|
||||
// * 每天晚上9点执行一次
|
||||
// */
|
||||
//// @Scheduled(cron = "0 0 21 * * ?")
|
||||
// public void detectStockLongTimeNoUse() {
|
||||
// logger.info("执行定时任务:查询是否有入库后长期未使用的库存");
|
||||
// List<StockDto> stocksLongTimeNoUse = stockService.selStockLongTimeNoUse(7);
|
||||
// if (stocksLongTimeNoUse.size() > 0) {
|
||||
// logger.info("有入库后长期未使用的库存, 准备更新库存状态");
|
||||
// for (StockDto stockLongTimeNoUse : stocksLongTimeNoUse) {
|
||||
// try {
|
||||
// stockLongTimeNoUse.setGoodsStatus(GoodsStatus.SCRAP.getCode());
|
||||
// stockService.modifyStock(stockLongTimeNoUse);
|
||||
// logger.info("长时间未使用库存状态更新成功");
|
||||
// } catch (Exception e) {
|
||||
// logger.error("长时间未使用库存状态更新异常:{}", e.getMessage());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 每天查询一次是否有过期记录
|
||||
// * 每天晚上10点执行一次
|
||||
// */
|
||||
//// @Scheduled(cron = "0 0 22 * * ?")
|
||||
// public void deleteOutOfDateData() {
|
||||
// logger.info("执行定时任务:删除过期数据");
|
||||
// taskRecordService.deleteTaskRecordRegularly();
|
||||
// if (logService.deleteWmsLogsRegularly(90)) {
|
||||
// logger.info("删除过期日志数据成功");
|
||||
// } else {
|
||||
// logger.info("删除过期日志数据失败");
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 发送正常的任务
|
||||
*/
|
||||
private void sendCommonTask() {
|
||||
try {
|
||||
// 检索任务表---新建未下发的任务
|
||||
LambdaQueryWrapper<Task> waitForDistributeTaskQuery = new LambdaQueryWrapper<Task>()
|
||||
|
|
@ -124,66 +235,76 @@ public class JobComponent {
|
|||
}
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
logger.error("查询等待任务发生异常:{}", convertJsonString(exception));
|
||||
logger.error("向Wcs发送任务时发生异常:{}", convertJsonString(exception));
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 每天查询一次是否有过期的库存
|
||||
// * 每天晚上8点执行一次
|
||||
// */
|
||||
//// @Scheduled(cron = "0 0 20 * * ?")
|
||||
// public void detectOutOfDateStock() {
|
||||
// logger.info("执行定时任务:查询过期库存");
|
||||
// List<StockDto> outOfDateStocks = stockService.selStockOutOfDate();
|
||||
// if (outOfDateStocks.size() > 0) {
|
||||
// logger.info("过期库存数量不为0,准备更新过期库存");
|
||||
// for (StockDto outOfDateStock : outOfDateStocks) {
|
||||
// try {
|
||||
// outOfDateStock.setGoodsStatus(GoodsStatus.OVERDUE.getCode());
|
||||
// stockService.modifyStock(outOfDateStock);
|
||||
// logger.info("过期库存更新成功");
|
||||
// } catch (Exception e) {
|
||||
// logger.error("过期库存更新异常:{}", e.getMessage());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 每天查询一次是否有入库后长期未使用的库存
|
||||
// * 每天晚上9点执行一次
|
||||
// */
|
||||
//// @Scheduled(cron = "0 0 21 * * ?")
|
||||
// public void detectStockLongTimeNoUse() {
|
||||
// logger.info("执行定时任务:查询是否有入库后长期未使用的库存");
|
||||
// List<StockDto> stocksLongTimeNoUse = stockService.selStockLongTimeNoUse(7);
|
||||
// if (stocksLongTimeNoUse.size() > 0) {
|
||||
// logger.info("有入库后长期未使用的库存, 准备更新库存状态");
|
||||
// for (StockDto stockLongTimeNoUse : stocksLongTimeNoUse) {
|
||||
// try {
|
||||
// stockLongTimeNoUse.setGoodsStatus(GoodsStatus.SCRAP.getCode());
|
||||
// stockService.modifyStock(stockLongTimeNoUse);
|
||||
// logger.info("长时间未使用库存状态更新成功");
|
||||
// } catch (Exception e) {
|
||||
// logger.error("长时间未使用库存状态更新异常:{}", e.getMessage());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 每天查询一次是否有过期记录
|
||||
// * 每天晚上10点执行一次
|
||||
// */
|
||||
//// @Scheduled(cron = "0 0 22 * * ?")
|
||||
// public void deleteOutOfDateData() {
|
||||
// logger.info("执行定时任务:删除过期数据");
|
||||
// taskRecordService.deleteTaskRecordRegularly();
|
||||
// if (logService.deleteWmsLogsRegularly(90)) {
|
||||
// logger.info("删除过期日志数据成功");
|
||||
// } else {
|
||||
// logger.info("删除过期日志数据失败");
|
||||
// }
|
||||
// }
|
||||
/**
|
||||
* 处理重复入库的任务
|
||||
*/
|
||||
private void solveDuplicateTask() {
|
||||
try {
|
||||
// 检索任务表---新建未下发的任务
|
||||
LambdaQueryWrapper<Task> duplicateTaskQueryWrapper = new LambdaQueryWrapper<Task>()
|
||||
.eq(Task::getTaskType, TaskType.IN.getCode())
|
||||
.eq(Task::getTaskStatus, WmsTaskStatus.DUPLICATE.getCode());
|
||||
List<TaskDto> duplicateTasks = BeanUtil.copyToList(taskService.list(duplicateTaskQueryWrapper), TaskDto.class);
|
||||
// 需要发送给wcs的任务列表
|
||||
List<WcsTaskRequest> request = new ArrayList<>();
|
||||
// 已经下发的任务组列表
|
||||
List<String> taskGroupIds = new ArrayList<>();
|
||||
if (!duplicateTasks.isEmpty()) {
|
||||
for (TaskDto task : duplicateTasks) {
|
||||
if (StringUtils.isNotEmpty(task.getPreTask())) {// 当前任务具有前置任务
|
||||
// 查询一下前置的任务有没有存在,存在则不下发
|
||||
if (taskService.exists(new LambdaQueryWrapper<Task>().eq(Task::getTaskId, task.getPreTask()))) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (taskGroupIds.contains(task.getTaskGroup())) {
|
||||
// 已经发送过的任务组,直接设置状态
|
||||
task.setTaskStatus(WmsTaskStatus.WAIT.getCode());
|
||||
}
|
||||
// 创建发送的任务
|
||||
WcsTaskRequest tempTask = new WcsTaskRequest();
|
||||
tempTask.setTaskId(task.getTaskGroup());
|
||||
tempTask.setDestination(task.getDestination());
|
||||
tempTask.setVehicleNo(task.getVehicleId());
|
||||
request.add(tempTask);
|
||||
task.setTaskStatus(WmsTaskStatus.WAIT.getCode());
|
||||
// 已经发送过的任务组
|
||||
taskGroupIds.add(task.getTaskGroup());
|
||||
}
|
||||
if (request.size() == 0) {
|
||||
return;
|
||||
}
|
||||
// 发送任务
|
||||
String url = configMap.get(ConfigMapKeyEnum.URL_NEW_DESTINATION.getConfigKey());
|
||||
if (url != null) {
|
||||
logger.info("向WCS发送新目的地,地址:{},请求详情:{}", url, convertJsonString(request));
|
||||
request.forEach(wcsTaskRequest -> {
|
||||
ResponseEntity result = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(url, convertJsonString(wcsTaskRequest)), ResponseEntity.class);
|
||||
try {
|
||||
logService.save(new WmsLog(WmsUtils.generateId("LOG_"), "向WCS发送新目的地", "setStackerTaskNewDestination", JSON.toJSONString(wcsTaskRequest), JSON.toJSONString(result), url, LocalDateTime.now(), "WMS"));
|
||||
} catch (Exception e) {
|
||||
logger.error("插入日志错误");
|
||||
}
|
||||
if (result != null && Objects.equals(ResponseCode.OK.getCode(), result.getCode())) {
|
||||
taskService.saveBatch(BeanUtil.copyToList(duplicateTasks, Task.class));
|
||||
} else {
|
||||
if (result != null) {
|
||||
logger.error("存在错误:{}", result.getMessage());
|
||||
} else {
|
||||
logger.error("请求无返回");
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
logger.error("向WCS发送新目的地的地址为空");
|
||||
}
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
logger.error("向WCS发送新目的地时发生异常:{}", convertJsonString(exception));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
package com.wms.controller;
|
||||
|
||||
import com.wms.annotation.MyLog;
|
||||
import com.wms.constants.enums.ResponseCode;
|
||||
import com.wms.entity.app.ResponseEntity;
|
||||
import com.wms.entity.app.request.UserQuery;
|
||||
import com.wms.system_service.ISystemService;
|
||||
import com.wms.utils.MailUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -36,6 +38,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 +69,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 +90,23 @@ public class SystemController {
|
|||
}
|
||||
return convertJsonString(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
*
|
||||
* @param user 用户
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/sendMail")
|
||||
@ResponseBody
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
// @MyLog(logTitle = "发送邮件", logMethod = "sendMail")
|
||||
public String sendMail(@RequestBody UserQuery user) {
|
||||
try {
|
||||
MailUtils.sendMailSmtp("594755172@qq.com", "测试发送", "测试发送");
|
||||
} catch (Exception e) {
|
||||
logger.error("发送邮件失败");
|
||||
}
|
||||
return convertJsonString(new ResponseEntity());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|||
import com.wms.annotation.MyLog;
|
||||
import com.wms.constants.enums.*;
|
||||
import com.wms.entity.app.*;
|
||||
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.wcs.WcsTaskResultRequest;
|
||||
import com.wms.entity.app.wcs.WcsVehicleInRequest;
|
||||
import com.wms.entity.table.*;
|
||||
import com.wms.service.*;
|
||||
import com.wms.utils.HttpUtils;
|
||||
|
|
@ -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));
|
||||
// 创建响应信息
|
||||
|
|
@ -110,48 +108,19 @@ public class TaskController {
|
|||
response.setMessage("入库请求验证错误!" + validationInfo);
|
||||
return convertJsonString(response);
|
||||
}
|
||||
Map<String, String> nextLocationMap = new HashMap<>();
|
||||
// 请求可用库位
|
||||
for (int i = 0; i < locationService.count(new LambdaQueryWrapper<Location>().eq(Location::getLocationStatus, LocationStatus.EMPTY.getCode())); i++) {
|
||||
Map<String, String> resultMap = locationService.getOneLocation(taskInRequest.getOriginPoint(), null);
|
||||
if (resultMap.isEmpty() || !resultMap.containsKey("nextLocationId")) {
|
||||
logger.error("暂无可用库位");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("暂无可用库位!");
|
||||
return convertJsonString(response);
|
||||
} else {
|
||||
Location nextLocation = locationService.getOne(new LambdaQueryWrapper<Location>().eq(Location::getLocationId, resultMap.get("nextLocationId")));
|
||||
LambdaUpdateWrapper<Location> updateLocationWrapper = new LambdaUpdateWrapper<Location>()
|
||||
.set(Location::getLocationStatus, LocationStatus.OCCUPY.getCode())
|
||||
.set(Location::getVehicleId, taskInRequest.getVehicleId())
|
||||
.eq(Location::getLocationId, nextLocation.getLocationId())
|
||||
.eq(Location::getLocationStatus, LocationStatus.EMPTY.getCode());
|
||||
if (locationService.update(updateLocationWrapper)) {
|
||||
nextLocationMap = resultMap;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (nextLocationMap.isEmpty() || !nextLocationMap.containsKey("nextLocationId")) {
|
||||
logger.error("暂无可用库位");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("暂无可用库位!");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
// 生成入库任务
|
||||
String saveTaskResult;
|
||||
if (taskInRequest.getGoodsList() == null || taskInRequest.getGoodsList().isEmpty()) {// 空托入库
|
||||
saveTaskResult = genEmptyInTask(taskInRequest, nextLocationMap.get("nextLocationId"), nextLocationMap.get("preTaskId"));
|
||||
saveTaskResult = genEmptyInTask(taskInRequest);
|
||||
} else {// 带料入库
|
||||
saveTaskResult = genGoodsInTask(taskInRequest, nextLocationMap.get("nextLocationId"), nextLocationMap.get("preTaskId"));
|
||||
saveTaskResult = genGoodsInTask(taskInRequest);
|
||||
}
|
||||
if (!saveTaskResult.equals("")) {
|
||||
// 回退库位锁定
|
||||
locationService.update(new LambdaUpdateWrapper<Location>()
|
||||
.set(Location::getLocationStatus, LocationStatus.EMPTY.getCode())
|
||||
.set(Location::getVehicleId, "")
|
||||
.eq(Location::getLocationId, nextLocationMap.get("nextLocationId"))
|
||||
.eq(Location::getLocationStatus, LocationStatus.OCCUPY.getCode()));
|
||||
// 返回失败
|
||||
logger.error(saveTaskResult);
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage(saveTaskResult);
|
||||
return convertJsonString(response);
|
||||
}
|
||||
|
||||
logger.info("接收入库请求成功!");
|
||||
|
|
@ -173,26 +142,21 @@ public class TaskController {
|
|||
* 添加空入库任务
|
||||
*
|
||||
* @param taskInRequest 入库请求
|
||||
* @param locationId 库位id
|
||||
* @param preTaskId 前置任务
|
||||
* @return 添加结果
|
||||
*/
|
||||
private String genEmptyInTask(TaskInRequest taskInRequest, String locationId, String preTaskId) {
|
||||
private String genEmptyInTask(TaskInRequest taskInRequest) {
|
||||
String result = "";
|
||||
Task tempInTask = new Task();
|
||||
tempInTask.setTaskId(generateId("RK_"));
|
||||
tempInTask.setTaskType(TaskType.IN.getCode());
|
||||
tempInTask.setTaskStatus(WmsTaskStatus.NEW.getCode());
|
||||
tempInTask.setTaskStatus(WmsTaskStatus.TEMP.getCode());
|
||||
tempInTask.setTaskGroup(generateId(""));
|
||||
tempInTask.setTaskPriority(1);
|
||||
tempInTask.setVehicleId(taskInRequest.getVehicleId());
|
||||
tempInTask.setOrigin(taskInRequest.getOriginPoint());
|
||||
tempInTask.setDestination(locationId);
|
||||
tempInTask.setVehicleSize(1);
|
||||
tempInTask.setWeight(taskInRequest.getTotalWeight());
|
||||
tempInTask.setCreateTime(LocalDateTime.now());
|
||||
tempInTask.setUserName(taskInRequest.getUserName());
|
||||
tempInTask.setPreTask(preTaskId);
|
||||
try {
|
||||
if (!taskService.save(tempInTask)) {
|
||||
return "添加空入库任务失败";
|
||||
|
|
@ -208,11 +172,9 @@ public class TaskController {
|
|||
* 添加入库任务
|
||||
*
|
||||
* @param taskInRequest 入库请求
|
||||
* @param locationId 库位号
|
||||
* @param preTaskId 前置任务
|
||||
* @return 添加结果
|
||||
*/
|
||||
private String genGoodsInTask(TaskInRequest taskInRequest, String locationId, String preTaskId) {
|
||||
private String genGoodsInTask(TaskInRequest taskInRequest) {
|
||||
String result = "";
|
||||
String taskGroupId = generateId("");
|
||||
List<Task> tempTasks = new ArrayList<>();
|
||||
|
|
@ -220,17 +182,14 @@ public class TaskController {
|
|||
Task tempInTask = new Task();
|
||||
tempInTask.setTaskId(generateId("RK_"));
|
||||
tempInTask.setTaskType(TaskType.IN.getCode());
|
||||
tempInTask.setTaskStatus(WmsTaskStatus.NEW.getCode());
|
||||
tempInTask.setTaskStatus(WmsTaskStatus.TEMP.getCode());
|
||||
tempInTask.setTaskGroup(taskGroupId);
|
||||
tempInTask.setTaskPriority(1);
|
||||
tempInTask.setVehicleId(taskInRequest.getVehicleId());
|
||||
tempInTask.setOrigin(taskInRequest.getOriginPoint());
|
||||
tempInTask.setDestination(locationId);
|
||||
tempInTask.setVehicleSize(1);
|
||||
tempInTask.setWeight(taskInRequest.getTotalWeight());
|
||||
tempInTask.setCreateTime(LocalDateTime.now());
|
||||
tempInTask.setUserName(taskInRequest.getUserName());
|
||||
tempInTask.setPreTask(preTaskId);
|
||||
// 物料相关信息
|
||||
TaskDetailInfo goodsRelatedInfo = new TaskDetailInfo();
|
||||
// TODO 物料信息需要完善
|
||||
|
|
@ -332,7 +291,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));
|
||||
// 创建响应信息
|
||||
|
|
@ -393,13 +351,6 @@ public class TaskController {
|
|||
vehicleOutTask.setTaskGroup(generateId(""));
|
||||
vehicleOutTask.setTaskStatus(WmsTaskStatus.NEW.getCode());
|
||||
vehicleOutTask.setTaskPriority(1);
|
||||
TaskDto moveTask = taskService.genMoveTask(currentVehicle.getCurrentLocation());
|
||||
if (moveTask != null) {
|
||||
if (moveTask.getTaskId().equals("LOCKED")) {
|
||||
return "外层库位上锁,无法出库";
|
||||
}
|
||||
vehicleOutTask.setPreTask(moveTask.getTaskId());
|
||||
}
|
||||
vehicleOutTask.setVehicleId(taskOutRequest.getVehicleId());
|
||||
vehicleOutTask.setUserName(taskOutRequest.getUserName());
|
||||
vehicleOutTask.setOrigin(currentVehicle.getCurrentLocation());
|
||||
|
|
@ -426,13 +377,6 @@ public class TaskController {
|
|||
vehicleOutTask.setTaskGroup(generateId(""));
|
||||
vehicleOutTask.setTaskStatus(WmsTaskStatus.NEW.getCode());
|
||||
vehicleOutTask.setTaskPriority(1);
|
||||
TaskDto moveTask = taskService.genMoveTask(currentLocation.getLocationId());
|
||||
if (moveTask != null) {
|
||||
if (moveTask.getTaskId().equals("LOCKED")) {
|
||||
return "外层库位上锁,无法出库";
|
||||
}
|
||||
vehicleOutTask.setPreTask(moveTask.getTaskId());
|
||||
}
|
||||
vehicleOutTask.setVehicleId(currentLocation.getVehicleId());
|
||||
vehicleOutTask.setUserName(taskOutRequest.getUserName());
|
||||
vehicleOutTask.setOrigin(currentLocation.getLocationId());
|
||||
|
|
@ -500,13 +444,6 @@ public class TaskController {
|
|||
vehicleOutTask.setTaskGroup(generateId(""));
|
||||
vehicleOutTask.setTaskStatus(WmsTaskStatus.NEW.getCode());
|
||||
vehicleOutTask.setTaskPriority(1);
|
||||
TaskDto moveTask = taskService.genMoveTask(stock.getLocationId());
|
||||
if (moveTask != null) {
|
||||
if (moveTask.getTaskId().equals("LOCKED")) {
|
||||
continue;
|
||||
}
|
||||
vehicleOutTask.setPreTask(moveTask.getTaskId());
|
||||
}
|
||||
vehicleOutTask.setVehicleId(stock.getVehicleId());
|
||||
vehicleOutTask.setUserName(taskOutRequest.getUserName());
|
||||
vehicleOutTask.setOrigin(stock.getLocationId());
|
||||
|
|
@ -540,13 +477,6 @@ public class TaskController {
|
|||
vehicleOutTask.setTaskGroup(generateId(""));
|
||||
vehicleOutTask.setTaskStatus(WmsTaskStatus.NEW.getCode());
|
||||
vehicleOutTask.setTaskPriority(1);
|
||||
TaskDto moveTask = taskService.genMoveTask(stock.getLocationId());
|
||||
if (moveTask != null) {
|
||||
if (moveTask.getTaskId().equals("LOCKED")) {
|
||||
continue;
|
||||
}
|
||||
vehicleOutTask.setPreTask(moveTask.getTaskId());
|
||||
}
|
||||
}
|
||||
vehicleOutTask.setVehicleId(stock.getVehicleId());
|
||||
vehicleOutTask.setUserName(taskOutRequest.getUserName());
|
||||
|
|
@ -928,4 +858,231 @@ public class TaskController {
|
|||
}
|
||||
return TaskResultValidationEnum.OK.getErrorMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Wcs请求载具入库
|
||||
*
|
||||
* @param wcsVehicleInRequest 载具入库请求
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/WcsVehicleIn")
|
||||
@ResponseBody
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
@MyLog(logTitle = "Wcs请求载具入库", logMethod = "WcsVehicleIn")
|
||||
public String WcsVehicleInRequest(@RequestBody WcsVehicleInRequest wcsVehicleInRequest) {
|
||||
logger.info("接收到Wcs请求载具入库:{},ip地址:{}", JSON.toJSONString(wcsVehicleInRequest), HttpUtils.getIpAddr(servletRequest));
|
||||
// 创建响应信息
|
||||
ResponseEntity response = new ResponseEntity();
|
||||
try {
|
||||
// 验证入库请求
|
||||
String validationInfo = validateVehicleRequest(wcsVehicleInRequest);
|
||||
if (!Objects.equals(validationInfo, "")) {
|
||||
logger.error("请求载具入库发生错误:{}", validationInfo);
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("请求载具入库发生错误:" + validationInfo);
|
||||
return convertJsonString(response);
|
||||
}
|
||||
// 请求可用库位
|
||||
String nextLocationId = "";
|
||||
for (int i = 0; i < locationService.count(new LambdaQueryWrapper<Location>().eq(Location::getLocationStatus, LocationStatus.EMPTY.getCode())); i++) {
|
||||
Map<String, String> resultMap = locationService.getOneLocation("", "");
|
||||
if (resultMap.isEmpty() || !resultMap.containsKey("nextLocationId")) {
|
||||
logger.error("暂无可用库位");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("暂无可用库位!");
|
||||
return convertJsonString(response);
|
||||
} else {
|
||||
Location nextLocation = locationService.getOne(new LambdaQueryWrapper<Location>().eq(Location::getLocationId, resultMap.get("nextLocationId")));
|
||||
LambdaUpdateWrapper<Location> updateLocationWrapper = new LambdaUpdateWrapper<Location>()
|
||||
.set(Location::getLocationStatus, LocationStatus.OCCUPY.getCode())
|
||||
.set(Location::getVehicleId, wcsVehicleInRequest.getVehicleNo())
|
||||
.eq(Location::getLocationId, nextLocation.getLocationId())
|
||||
.eq(Location::getLocationStatus, LocationStatus.EMPTY.getCode());
|
||||
if (locationService.update(updateLocationWrapper)) {
|
||||
nextLocationId = resultMap.get("nextLocationId");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Objects.equals(nextLocationId, "")) {
|
||||
logger.error("暂无可用库位");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("暂无可用库位!");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
// 找到库位,更新任务
|
||||
LambdaUpdateWrapper<Task> lambdaUpdateWrapperOfTask = new LambdaUpdateWrapper<Task>()
|
||||
.set(Task::getDestination, nextLocationId)
|
||||
.set(Task::getTaskStatus, WmsTaskStatus.NEW.getCode())
|
||||
.eq(Task::getVehicleId, wcsVehicleInRequest.getVehicleNo());
|
||||
if (!taskService.update(lambdaUpdateWrapperOfTask)) {
|
||||
// 回退库位锁定
|
||||
locationService.update(new LambdaUpdateWrapper<Location>()
|
||||
.set(Location::getLocationStatus, LocationStatus.EMPTY.getCode())
|
||||
.set(Location::getVehicleId, "")
|
||||
.eq(Location::getLocationId, nextLocationId)
|
||||
.eq(Location::getLocationStatus, LocationStatus.OCCUPY.getCode()));
|
||||
// 反馈失败
|
||||
logger.error("处理载具入库请求失败!");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("处理载具入库请求失败!");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
|
||||
logger.info("处理载具入库请求成功!");
|
||||
response.setCode(ResponseCode.OK.getCode());
|
||||
response.setMessage("处理载具入库请求成功!");
|
||||
return convertJsonString(response);
|
||||
} catch (Exception e) {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
logger.error("处理载具入库请求发生异常:{}", e.getMessage());
|
||||
// 返回其他异常
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("处理载具入库请求发生异常");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证载具入库请求的正确性
|
||||
* @param wcsVehicleInRequest 载具入库请求
|
||||
* @return 验证结果
|
||||
*/
|
||||
private String validateVehicleRequest(WcsVehicleInRequest wcsVehicleInRequest) {
|
||||
// 判断请求信息
|
||||
if (wcsVehicleInRequest == null) {
|
||||
return "请求信息为空";
|
||||
}
|
||||
// 判断是否缺少载具号
|
||||
if (StringUtils.isEmpty(wcsVehicleInRequest.getVehicleNo())) {
|
||||
return "缺少载具号";
|
||||
}
|
||||
// 判断当前载具号是否存在任务
|
||||
LambdaQueryWrapper<Task> queryWrapper = new LambdaQueryWrapper<Task>()
|
||||
.eq(Task::getVehicleId, wcsVehicleInRequest.getVehicleNo())
|
||||
.eq(Task::getTaskType, TaskType.IN.getCode());
|
||||
if (!taskService.exists(queryWrapper)) {
|
||||
return "当前载具没有入库或回库任务";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Wcs反馈重复入库问题
|
||||
*
|
||||
* @param duplicateLocationRequest 重复入库反馈请求
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/duplicateLocationOccurred")
|
||||
@ResponseBody
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
@MyLog(logTitle = "Wcs反馈重复入库问题", logMethod = "duplicateLocationOccurred")
|
||||
public String ResolveDuplicateLocation(@RequestBody WcsTaskResultRequest duplicateLocationRequest) {
|
||||
logger.info("接收到Wcs反馈重复入库问题:{},ip地址:{}", JSON.toJSONString(duplicateLocationRequest), HttpUtils.getIpAddr(servletRequest));
|
||||
// 创建响应信息
|
||||
ResponseEntity response = new ResponseEntity();
|
||||
try {
|
||||
// 验证入库请求
|
||||
String validationInfo = validateDuplicateLocationRequest(duplicateLocationRequest);
|
||||
if (!Objects.equals(validationInfo, "")) {
|
||||
logger.error("反馈重复入库错误:{}", validationInfo);
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("反馈重复入库错误:" + validationInfo);
|
||||
return convertJsonString(response);
|
||||
}
|
||||
// 请求可用库位
|
||||
String nextLocationId = "";
|
||||
for (int i = 0; i < locationService.count(new LambdaQueryWrapper<Location>().eq(Location::getLocationStatus, LocationStatus.EMPTY.getCode())); i++) {
|
||||
Map<String, String> resultMap = locationService.getOneLocation("", "");
|
||||
if (resultMap.isEmpty() || !resultMap.containsKey("nextLocationId")) {
|
||||
logger.error("暂无可用库位");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("暂无可用库位!");
|
||||
return convertJsonString(response);
|
||||
} else {
|
||||
Location nextLocation = locationService.getOne(new LambdaQueryWrapper<Location>().eq(Location::getLocationId, resultMap.get("nextLocationId")));
|
||||
LambdaUpdateWrapper<Location> updateLocationWrapper = new LambdaUpdateWrapper<Location>()
|
||||
.set(Location::getLocationStatus, LocationStatus.OCCUPY.getCode())
|
||||
.set(Location::getVehicleId, duplicateLocationRequest.getVehicleId())
|
||||
.eq(Location::getLocationId, nextLocation.getLocationId())
|
||||
.eq(Location::getLocationStatus, LocationStatus.EMPTY.getCode());
|
||||
if (locationService.update(updateLocationWrapper)) {
|
||||
nextLocationId = resultMap.get("nextLocationId");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Objects.equals(nextLocationId, "")) {
|
||||
logger.error("暂无可用库位");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("暂无可用库位!");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
// 找到库位,更新任务
|
||||
LambdaUpdateWrapper<Task> lambdaUpdateWrapperOfTask = new LambdaUpdateWrapper<Task>()
|
||||
.set(Task::getDestination, nextLocationId)
|
||||
.set(Task::getTaskStatus, WmsTaskStatus.DUPLICATE.getCode())
|
||||
.eq(Task::getVehicleId, duplicateLocationRequest.getVehicleId())
|
||||
.eq(Task::getTaskGroup, duplicateLocationRequest.getTaskId())
|
||||
.ne(Task::getTaskStatus, WmsTaskStatus.DUPLICATE.getCode());
|
||||
if (!taskService.update(lambdaUpdateWrapperOfTask)) {
|
||||
// 回退库位锁定
|
||||
locationService.update(new LambdaUpdateWrapper<Location>()
|
||||
.set(Location::getLocationStatus, LocationStatus.EMPTY.getCode())
|
||||
.set(Location::getVehicleId, "")
|
||||
.eq(Location::getLocationId, nextLocationId)
|
||||
.eq(Location::getLocationStatus, LocationStatus.OCCUPY.getCode()));
|
||||
// 反馈失败
|
||||
logger.error("处理重复入库请求失败!");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("处理重复入库请求失败!");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
|
||||
logger.info("处理载具入库请求成功!");
|
||||
response.setCode(ResponseCode.OK.getCode());
|
||||
response.setMessage("处理载具入库请求成功!");
|
||||
return convertJsonString(response);
|
||||
} catch (Exception e) {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
logger.error("处理载具入库请求发生异常:{}", e.getMessage());
|
||||
// 返回其他异常
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("处理载具入库请求发生异常");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证重复入库问题反馈的请求
|
||||
* @param duplicateLocationRequest 请求信息
|
||||
* @return 验证结果
|
||||
*/
|
||||
private String validateDuplicateLocationRequest(WcsTaskResultRequest duplicateLocationRequest) {
|
||||
// 判断请求信息
|
||||
if (duplicateLocationRequest == null) {
|
||||
return "请求信息为空";
|
||||
}
|
||||
// 判断是否缺少任务号
|
||||
if (StringUtils.isEmpty(duplicateLocationRequest.getTaskId())) {
|
||||
return "缺少任务号";
|
||||
}
|
||||
// 判断是否缺少载具号
|
||||
if (StringUtils.isEmpty(duplicateLocationRequest.getVehicleId())) {
|
||||
return "缺少载具号";
|
||||
}
|
||||
// 判断当前载具号是否存在任务
|
||||
LambdaQueryWrapper<Task> queryWrapper = new LambdaQueryWrapper<Task>()
|
||||
.eq(Task::getTaskGroup, duplicateLocationRequest.getTaskId())
|
||||
.eq(Task::getVehicleId, duplicateLocationRequest.getVehicleId())
|
||||
.eq(Task::getTaskType, TaskType.IN.getCode());
|
||||
if (!taskService.exists(queryWrapper)) {
|
||||
return "当前反馈的重复入库任务不存在";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,46 +1,26 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,53 @@
|
|||
package com.wms.entity.app.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,25 @@
|
|||
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;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 物料查询请求
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(value = "物料查询")
|
||||
public class GoodsQuery extends PageQuery{
|
||||
@ApiModelProperty(value ="物料编号")
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
@ApiModelProperty(value ="物料名称")
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@JsonProperty("goodsName")
|
||||
private String goodsName;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,37 +1,71 @@
|
|||
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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,21 +2,34 @@ 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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,39 +1,38 @@
|
|||
package com.wms.entity.app.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,47 @@
|
|||
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;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,23 +1,39 @@
|
|||
package com.wms.entity.app.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
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<GoodsInRequest> goodsList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,53 @@
|
|||
package com.wms.entity.app.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,37 @@
|
|||
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;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,43 +1,44 @@
|
|||
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;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,24 +1,35 @@
|
|||
package com.wms.entity.app.request;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.wms.entity.table.Location;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.wms.entity.table.Vehicle;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
|
@ -31,6 +42,7 @@ public class VehicleQuery extends PageQuery {
|
|||
vehiclePO.setVehicleStatus(vehicleStatus);
|
||||
vehiclePO.setIsEmpty(isEmpty);
|
||||
vehiclePO.setCurrentLocation(currentLocation);
|
||||
|
||||
return vehiclePO;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
package com.wms.entity.app.request;
|
||||
|
||||
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")
|
||||
private String taskId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@ApiModelProperty(value = "载具号")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private Integer taskStatus;
|
||||
/**
|
||||
* 任务终点
|
||||
*/
|
||||
@ApiModelProperty(value = "任务终点")
|
||||
private String destination;
|
||||
/**
|
||||
* 任务信息
|
||||
*/
|
||||
@ApiModelProperty(value = "任务信息")
|
||||
private String message;
|
||||
}
|
||||
|
|
@ -1,16 +1,20 @@
|
|||
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;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 日志查询
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(value = "日志查询")
|
||||
public class WmsLogQuery extends PageQuery {
|
||||
@ApiModelProperty(value = "日志查询参数")
|
||||
/**
|
||||
* 日志查询参数
|
||||
*/
|
||||
@JsonProperty("queryParam")
|
||||
private String queryParam;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,58 +1,36 @@
|
|||
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 = "电子标签详细任务数据")
|
||||
/**
|
||||
* 电子标签任务类
|
||||
*/
|
||||
@Data
|
||||
public class ETaskData {
|
||||
@ApiModelProperty(value = "任务号")
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@JsonProperty("taskId")
|
||||
private String taskId;
|
||||
@ApiModelProperty(value = "点位")
|
||||
/**
|
||||
* 点位
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
@ApiModelProperty(value = "物料编号")
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
@ApiModelProperty(value = "物料名称")
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@JsonProperty("goodsName")
|
||||
private String goodsName;
|
||||
@ApiModelProperty(value = "需求数量")
|
||||
/**
|
||||
* 需求数量
|
||||
*/
|
||||
@JsonProperty("needNum")
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,48 +1,31 @@
|
|||
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料箱到达请求")
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,21 @@
|
|||
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发送任务请求")
|
||||
/**
|
||||
* 向Wcs请求修改任务状态
|
||||
*/
|
||||
@Data
|
||||
public class WcsChangeTaskRequest {
|
||||
@ApiModelProperty(value = "任务ID", required = true)
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,38 +1,28 @@
|
|||
package com.wms.entity.app.wcs;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@ApiModel(description = "WCS通用返回信息")
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Wcs通用返回信息
|
||||
* @param <T> 泛型
|
||||
*/
|
||||
@Data
|
||||
public class WcsCommonResponse<T> {
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,108 +1,62 @@
|
|||
package com.wms.entity.app.wcs;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@ApiModel(value = "WCS电子标签任务反馈请求")
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 电子标签任务反馈请求
|
||||
*/
|
||||
@Data
|
||||
public class WcsETaskFeedbackRequest {
|
||||
@ApiModelProperty(value = "任务组")
|
||||
/**
|
||||
* 任务组编号
|
||||
*/
|
||||
@JsonProperty("taskGroup")
|
||||
private String taskGroup;
|
||||
@ApiModelProperty(value = "任务类型")
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@JsonProperty("taskType")
|
||||
private Integer taskType;
|
||||
@ApiModelProperty(value = "料箱号")
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleNo")
|
||||
private String vehicleNo;
|
||||
@ApiModelProperty(value = "订单号")
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@JsonProperty("orderId")
|
||||
private String orderId;
|
||||
@ApiModelProperty(value = "任务号")
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@JsonProperty("taskId")
|
||||
private String taskId;
|
||||
@ApiModelProperty(value = "点位")
|
||||
/**
|
||||
* 点位
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private String location;
|
||||
@ApiModelProperty(value = "物料编号")
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
@ApiModelProperty(value = "物料名称")
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@JsonProperty("goodsName")
|
||||
private String goodsName;
|
||||
@ApiModelProperty(value = "需求数量")
|
||||
/**
|
||||
* 需求数量
|
||||
*/
|
||||
@JsonProperty("needNum")
|
||||
private Integer needNum;
|
||||
@ApiModelProperty(value = "确认数量")
|
||||
/**
|
||||
* 确认数量
|
||||
*/
|
||||
@JsonProperty("confirmNum")
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,60 +1,38 @@
|
|||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(value = "WCS电子标签任务发送请求")
|
||||
/**
|
||||
* 电子标签任务请求
|
||||
*/
|
||||
@Data
|
||||
public class WcsETaskRequest {
|
||||
@ApiModelProperty(value = "任务组")
|
||||
/**
|
||||
* 任务组编号
|
||||
*/
|
||||
@JsonProperty("taskGroup")
|
||||
private String taskGroup;
|
||||
@ApiModelProperty(value = "任务类型")
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@JsonProperty("taskGroup")
|
||||
private Integer taskType;
|
||||
@ApiModelProperty(value = "料箱号")
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleNo")
|
||||
private String vehicleNo;
|
||||
@ApiModelProperty(value = "订单号")
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@JsonProperty("orderId")
|
||||
private String orderId;
|
||||
@ApiModelProperty(value = "任务数据")
|
||||
/**
|
||||
* 任务信息
|
||||
*/
|
||||
@JsonProperty("taskData")
|
||||
private List<ETaskData> 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<ETaskData> getTaskData() {
|
||||
return taskData;
|
||||
}
|
||||
|
||||
public void setTaskData(List<ETaskData> taskData) {
|
||||
this.taskData = taskData;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
package com.wms.entity.app.wcs;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@ApiModel(description = "WCS发送任务反馈")
|
||||
public class WcsFeedbackTaskRequest {
|
||||
@ApiModelProperty(value = "任务Id")
|
||||
private String taskId;
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private Integer taskStatus;
|
||||
@ApiModelProperty(value = "任务终点")
|
||||
private String destination;
|
||||
@ApiModelProperty(value = "异常信息")
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,60 +1,38 @@
|
|||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(value = "WCS站台拣选任务请求")
|
||||
/**
|
||||
* 站台拣选任务请求信息
|
||||
*/
|
||||
@Data
|
||||
public class WcsStandTaskRequest {
|
||||
@ApiModelProperty("任务组编号")
|
||||
/**
|
||||
* 任务组编号
|
||||
*/
|
||||
@JsonProperty("taskGroup")
|
||||
private String taskGroup;
|
||||
@ApiModelProperty("料箱号")
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleNo")
|
||||
private String vehicleNo;
|
||||
@ApiModelProperty("任务类型---1:拣选任务")
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@JsonProperty("taskType")
|
||||
private Integer taskType;
|
||||
@ApiModelProperty("点位---站台号")
|
||||
/**
|
||||
* 点位
|
||||
*/
|
||||
@JsonProperty("location")
|
||||
private List<String> location;
|
||||
@ApiModelProperty("备注")
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@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 Integer getTaskType() {
|
||||
return taskType;
|
||||
}
|
||||
|
||||
public void setTaskType(Integer taskType) {
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public List<String> getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(List<String> location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,93 +1,53 @@
|
|||
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;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
package com.wms.entity.app.wcs;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Wcs任务结果反馈请求信息
|
||||
*/
|
||||
@Data
|
||||
public class WcsTaskResultRequest {
|
||||
/**
|
||||
* 任务id----对应wms的taskGroup
|
||||
*/
|
||||
@JsonProperty("taskId")
|
||||
private String taskId;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@JsonProperty("taskStatus")
|
||||
private Integer taskStatus;
|
||||
/**
|
||||
* 任务终点
|
||||
*/
|
||||
@JsonProperty("destination")
|
||||
private String destination;
|
||||
/**
|
||||
* 任务信息
|
||||
*/
|
||||
@JsonProperty("message")
|
||||
private String message;
|
||||
}
|
||||
|
|
@ -1,48 +1,31 @@
|
|||
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请求料箱入库")
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,24 +21,24 @@ public class Config {
|
|||
/**
|
||||
* 配置键
|
||||
*/
|
||||
@TableField(value = "config_key")
|
||||
@TableField("config_key")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 配置值
|
||||
*/
|
||||
@TableField(value = "config_value")
|
||||
@TableField("config_value")
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
* 配置展示类型
|
||||
*/
|
||||
@TableField(value = "config_type")
|
||||
@TableField("config_type")
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@TableField(value = "config_name")
|
||||
@TableField("config_name")
|
||||
private String configName;
|
||||
}
|
||||
|
|
|
|||
35
src/main/java/com/wms/entity/table/ETagLocation.java
Normal file
35
src/main/java/com/wms/entity/table/ETagLocation.java
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
package com.wms.entity.table;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 电子标签库位信息
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "tbl_app_e_location", autoResultMap = true)
|
||||
public class ETagLocation {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId("e_location_id")
|
||||
private String eLocationId;
|
||||
@TableField("area_id")
|
||||
private String areaId;
|
||||
@TableField("sequence_id")
|
||||
private Integer sequenceId;
|
||||
@TableField("e_location_status")
|
||||
private Integer eLocationStatus;
|
||||
@TableField("order_box_no")
|
||||
private String orderBoxNo;
|
||||
@TableField("goods_id")
|
||||
private String goodsId;
|
||||
@TableField("quantity")
|
||||
private BigDecimal quantity;
|
||||
@TableField("pick_status")
|
||||
private Integer pickStatus;
|
||||
}
|
||||
|
|
@ -11,51 +11,52 @@ import java.util.Date;
|
|||
* 物料
|
||||
*/
|
||||
@Data
|
||||
@TableName("tbl_app_goods")
|
||||
@TableName(value = "tbl_app_goods", autoResultMap = true)
|
||||
public class Goods {
|
||||
// TODO 物料详细信息根据卡特方提供的信息来完善
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
@TableId(value = "goods_id")
|
||||
@TableId("goods_id")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField(value = "goods_name")
|
||||
@TableField("goods_name")
|
||||
private String goodsName;
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@TableField(value = "goods_unit")
|
||||
@TableField("goods_unit")
|
||||
private String goodsUnit;
|
||||
/**
|
||||
* 物料ID
|
||||
*/
|
||||
@TableField(value = "item_id")
|
||||
@TableField("item_id")
|
||||
private String itemId;
|
||||
/**
|
||||
* 物料分类
|
||||
*/
|
||||
@TableField(value = "goods_type")
|
||||
@TableField("goods_type")
|
||||
private String goodsType;
|
||||
/**
|
||||
* 有效天数
|
||||
*/
|
||||
@TableField(value = "life_days")
|
||||
@TableField("life_days")
|
||||
private Integer lifeDays;
|
||||
/**
|
||||
* 仓储分类
|
||||
*/
|
||||
@TableField(value = "inv_category")
|
||||
@TableField("inv_category")
|
||||
private String invCategory;
|
||||
/**
|
||||
* 最后更新日期
|
||||
*/
|
||||
@TableField(value = "last_update_time")
|
||||
@TableField("last_update_time")
|
||||
private Date lastUpdateTime;
|
||||
/**
|
||||
* 最后更新用户
|
||||
*/
|
||||
@TableField(value = "last_update_user")
|
||||
@TableField("last_update_user")
|
||||
private String lastUpdateUser;
|
||||
}
|
||||
|
|
|
|||
54
src/main/java/com/wms/entity/table/KateDBS.java
Normal file
54
src/main/java/com/wms/entity/table/KateDBS.java
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
package com.wms.entity.table;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 当前DBS计划
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "tbl_app_kate_dbs", autoResultMap = true)
|
||||
public class KateDBS {
|
||||
/**
|
||||
* DBS计划Id
|
||||
*/
|
||||
@TableId("dbs_id")
|
||||
private String dbsId;
|
||||
/**
|
||||
* 顺序号
|
||||
*/
|
||||
@TableField("work_sequence")
|
||||
private Integer workSequence;
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
@TableField("work_order")
|
||||
private String workOrder;
|
||||
/**
|
||||
* 计划开工日期
|
||||
*/
|
||||
@TableField("plan_start_date")
|
||||
private LocalDateTime planStartDate;
|
||||
/**
|
||||
* dbs的状态
|
||||
* 0:未开始
|
||||
* 1:已开始未完成
|
||||
* 2:已完成
|
||||
*/
|
||||
@TableField("last_update_time")
|
||||
private Integer dbsStatus;
|
||||
/**
|
||||
* 最近更新时间
|
||||
*/
|
||||
@TableField("last_update_time")
|
||||
private LocalDateTime lastUpdateTime;
|
||||
/**
|
||||
* 最近更新用户
|
||||
*/
|
||||
@TableField("last_update_user")
|
||||
private String lastUpdateUser;
|
||||
}
|
||||
54
src/main/java/com/wms/entity/table/KateDBSHistory.java
Normal file
54
src/main/java/com/wms/entity/table/KateDBSHistory.java
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
package com.wms.entity.table;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* DBS更新历史
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "tbl_app_kate_dbs_history", autoResultMap = true)
|
||||
public class KateDBSHistory {
|
||||
/**
|
||||
* DBS计划Id
|
||||
*/
|
||||
@TableId("dbs_id")
|
||||
private String dbsId;
|
||||
/**
|
||||
* 顺序号
|
||||
*/
|
||||
@TableField("work_sequence")
|
||||
private Integer workSequence;
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
@TableField("work_order")
|
||||
private String workOrder;
|
||||
/**
|
||||
* 计划开工日期
|
||||
*/
|
||||
@TableField("plan_start_date")
|
||||
private LocalDateTime planStartDate;
|
||||
/**
|
||||
* dbs的状态
|
||||
* 0:未开始
|
||||
* 1:已开始未完成
|
||||
* 2:已完成
|
||||
*/
|
||||
@TableField("last_update_time")
|
||||
private Integer dbsStatus;
|
||||
/**
|
||||
* 最近更新时间
|
||||
*/
|
||||
@TableField("last_update_time")
|
||||
private LocalDateTime lastUpdateTime;
|
||||
/**
|
||||
* 最近更新用户
|
||||
*/
|
||||
@TableField("last_update_user")
|
||||
private String lastUpdateUser;
|
||||
}
|
||||
54
src/main/java/com/wms/entity/table/KateDBSLast.java
Normal file
54
src/main/java/com/wms/entity/table/KateDBSLast.java
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
package com.wms.entity.table;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 上一次的DBS数据
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "tbl_app_kate_dbs_last", autoResultMap = true)
|
||||
public class KateDBSLast {
|
||||
/**
|
||||
* DBS计划Id
|
||||
*/
|
||||
@TableId("dbs_id")
|
||||
private String dbsId;
|
||||
/**
|
||||
* 顺序号
|
||||
*/
|
||||
@TableField("work_sequence")
|
||||
private Integer workSequence;
|
||||
/**
|
||||
* 工单
|
||||
*/
|
||||
@TableField("work_order")
|
||||
private String workOrder;
|
||||
/**
|
||||
* 计划开工日期
|
||||
*/
|
||||
@TableField("plan_start_date")
|
||||
private LocalDateTime planStartDate;
|
||||
/**
|
||||
* dbs的状态
|
||||
* 0:未开始
|
||||
* 1:已开始未完成
|
||||
* 2:已完成
|
||||
*/
|
||||
@TableField("last_update_time")
|
||||
private Integer dbsStatus;
|
||||
/**
|
||||
* 最近更新时间
|
||||
*/
|
||||
@TableField("last_update_time")
|
||||
private LocalDateTime lastUpdateTime;
|
||||
/**
|
||||
* 最近更新用户
|
||||
*/
|
||||
@TableField("last_update_user")
|
||||
private String lastUpdateUser;
|
||||
}
|
||||
43
src/main/java/com/wms/entity/table/KateOrders.java
Normal file
43
src/main/java/com/wms/entity/table/KateOrders.java
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
package com.wms.entity.table;
|
||||
|
||||
import com.wms.utils.excel.ExcelImport;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 工单明细
|
||||
*/
|
||||
@Data
|
||||
public class KateOrders {
|
||||
private String orderId;
|
||||
/**
|
||||
* 工单号---对应excel详情
|
||||
*/
|
||||
private String workOrder;
|
||||
private String material;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 工单状态
|
||||
* 0:未开始
|
||||
* 1:已呼叫料箱
|
||||
* 2:正在拣选
|
||||
* 3:拣选完成
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
/**
|
||||
* 缺少数量
|
||||
*/
|
||||
private BigDecimal lackQuantity;
|
||||
/**
|
||||
* 实际拣选数量
|
||||
*/
|
||||
private BigDecimal pickedQuantity;
|
||||
/**
|
||||
* 操作人员
|
||||
*/
|
||||
private String userName;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.wms.entity.table;
|
||||
|
||||
/**
|
||||
* 工单导入明细
|
||||
*/
|
||||
public class KateOrdersHistory {
|
||||
}
|
||||
8
src/main/java/com/wms/entity/table/KateOrdersLast.java
Normal file
8
src/main/java/com/wms/entity/table/KateOrdersLast.java
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
package com.wms.entity.table;
|
||||
|
||||
/**
|
||||
* 上一次导入的工单明细
|
||||
*/
|
||||
public class KateOrdersLast {
|
||||
|
||||
}
|
||||
|
|
@ -14,56 +14,56 @@ public class Location {
|
|||
/**
|
||||
* 库位编号
|
||||
*/
|
||||
@TableId(value = "location_id")
|
||||
@TableId("location_id")
|
||||
private String locationId;
|
||||
/**
|
||||
* 库区编号
|
||||
*/
|
||||
@TableField(value = "area_id")
|
||||
@TableField("area_id")
|
||||
private Integer areaId;
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField(value = "equipment_id")
|
||||
@TableField("equipment_id")
|
||||
private Integer equipmentId;
|
||||
/**
|
||||
* 库位类型
|
||||
*/
|
||||
@TableField(value = "location_type")
|
||||
@TableField("location_type")
|
||||
private Integer locationType;
|
||||
/**
|
||||
* 排
|
||||
*/
|
||||
@TableField(value = "w_row")
|
||||
@TableField("w_row")
|
||||
private Integer wRow;
|
||||
/**
|
||||
* 列
|
||||
*/
|
||||
@TableField(value = "w_col")
|
||||
@TableField("w_col")
|
||||
private Integer wCol;
|
||||
/**
|
||||
* 层
|
||||
*/
|
||||
@TableField(value = "w_layer")
|
||||
@TableField("w_layer")
|
||||
private Integer wLayer;
|
||||
/**
|
||||
* 深度
|
||||
*/
|
||||
@TableField(value = "w_depth")
|
||||
@TableField("w_depth")
|
||||
private Integer wDepth;
|
||||
/**
|
||||
* 是否锁定
|
||||
*/
|
||||
@TableField(value = "is_lock")
|
||||
@TableField("is_lock")
|
||||
private Integer isLock;
|
||||
/**
|
||||
* 库位状态
|
||||
*/
|
||||
@TableField(value = "location_status")
|
||||
@TableField("location_status")
|
||||
private Integer locationStatus;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@TableField(value = "vehicle_id")
|
||||
@TableField("vehicle_id")
|
||||
private String vehicleId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,26 +14,26 @@ public class Menu {
|
|||
/**
|
||||
* 菜单Id
|
||||
*/
|
||||
@TableId(value = "menu_id")
|
||||
@TableId("menu_id")
|
||||
private String menuId;
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@TableField(value = "label_name")
|
||||
@TableField("label_name")
|
||||
private String labelName;
|
||||
/**
|
||||
* 图标值
|
||||
*/
|
||||
@TableField(value = "icon_value")
|
||||
@TableField("icon_value")
|
||||
private String iconValue;
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@TableField(value = "path")
|
||||
@TableField("path")
|
||||
private String path;
|
||||
/**
|
||||
* 父菜单Id
|
||||
*/
|
||||
@TableField(value = "parent_id")
|
||||
@TableField("parent_id")
|
||||
private String parentId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,59 +16,59 @@ public class Stand {
|
|||
/**
|
||||
* 站台id
|
||||
*/
|
||||
@TableId(value = "stand_id")
|
||||
@TableId("stand_id")
|
||||
private String standId;
|
||||
/**
|
||||
* 是否允许入库
|
||||
*/
|
||||
@TableField(value = "allow_in")
|
||||
@TableField("allow_in")
|
||||
private Integer allowIn;
|
||||
/**
|
||||
* 是否允许出库
|
||||
*/
|
||||
@TableField(value = "allow_out")
|
||||
@TableField("allow_out")
|
||||
private Integer allowOut;
|
||||
/**
|
||||
* 站台是否锁定
|
||||
*/
|
||||
@TableField(value = "is_lock")
|
||||
@TableField("is_lock")
|
||||
private Integer isLock;
|
||||
/**
|
||||
* 站台状态
|
||||
*/
|
||||
@TableField(value = "stand_status")
|
||||
@TableField("stand_status")
|
||||
private Integer standStatus;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
@TableField(value = "equipment_id")
|
||||
@TableField("equipment_id")
|
||||
private Integer equipmentId;
|
||||
|
||||
/**
|
||||
* 库区编号
|
||||
*/
|
||||
@TableField(value = "area_id")
|
||||
@TableField("area_id")
|
||||
private Integer areaId;
|
||||
/**
|
||||
* 站台类型
|
||||
*/
|
||||
@TableField(value = "stand_type")
|
||||
@TableField("stand_type")
|
||||
private Integer standType;
|
||||
/**
|
||||
* 站台ip
|
||||
*/
|
||||
@TableField(value = "stand_ip")
|
||||
@TableField("stand_ip")
|
||||
private String standIp;
|
||||
/**
|
||||
* 外部id
|
||||
* 如mes上的站台编号
|
||||
*/
|
||||
@TableField(value = "outer_id")
|
||||
@TableField("outer_id")
|
||||
private String outerId;
|
||||
/**
|
||||
* 最近一次的使用时间
|
||||
*/
|
||||
@TableField(value = "last_use_time")
|
||||
@TableField("last_use_time")
|
||||
private LocalDateTime lastUseTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,58 +19,58 @@ public class Stock {
|
|||
/**
|
||||
* 库存编号
|
||||
*/
|
||||
@TableId(value = "stock_id")
|
||||
@TableId("stock_id")
|
||||
private String stockId;
|
||||
/**
|
||||
* 库位ID
|
||||
*/
|
||||
@TableField(value = "location_id")
|
||||
@TableField("location_id")
|
||||
private String locationId;
|
||||
/**
|
||||
* 托盘号
|
||||
*/
|
||||
@TableField(value = "vehicle_id")
|
||||
@TableField("vehicle_id")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
@TableField(value = "weight")
|
||||
@TableField("weight")
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* 库存状态
|
||||
* 正常、出库中、锁定 等
|
||||
*/
|
||||
@TableField(value = "stock_status")
|
||||
@TableField("stock_status")
|
||||
private Integer stockStatus;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 最后更新时间
|
||||
*/
|
||||
@TableField(value = "last_update_time")
|
||||
@TableField("last_update_time")
|
||||
private LocalDateTime lastUpdateTime;
|
||||
/**
|
||||
* 最后更新用户
|
||||
*/
|
||||
@TableField(value = "last_update_user")
|
||||
@TableField("last_update_user")
|
||||
private String lastUpdateUser;
|
||||
/**
|
||||
* 是否盘点
|
||||
*/
|
||||
@TableField(value = "is_inventory")
|
||||
@TableField("is_inventory")
|
||||
private Integer isInventory;
|
||||
/**
|
||||
* 盘点任务号 盘点出库和盘点入库同样
|
||||
*/
|
||||
@TableField(value = "inventory_task_id")
|
||||
@TableField("inventory_task_id")
|
||||
private String inventoryTaskId;
|
||||
/**
|
||||
* 呆滞天数
|
||||
*/
|
||||
@TableField(value = "no_use_days")
|
||||
@TableField("no_use_days")
|
||||
private Integer noUseDays;
|
||||
/**
|
||||
* 物料相关信息
|
||||
|
|
|
|||
|
|
@ -19,67 +19,67 @@ public class Task {
|
|||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@TableId(value = "task_id")
|
||||
@TableId("task_id")
|
||||
private String taskId;
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@TableField(value = "task_type")
|
||||
@TableField("task_type")
|
||||
private Integer taskType;
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@TableField(value = "task_status")
|
||||
@TableField("task_status")
|
||||
private Integer taskStatus;
|
||||
/**
|
||||
* 起点
|
||||
*/
|
||||
@TableField(value = "origin")
|
||||
@TableField("origin")
|
||||
private String origin;
|
||||
/**
|
||||
* 终点
|
||||
*/
|
||||
@TableField(value = "destination")
|
||||
@TableField("destination")
|
||||
private String destination;
|
||||
/**
|
||||
* 任务优先级
|
||||
*/
|
||||
@TableField(value = "task_priority")
|
||||
@TableField("task_priority")
|
||||
private Integer taskPriority;
|
||||
/**
|
||||
* 任务组---多与载具绑定
|
||||
*/
|
||||
@TableField(value = "task_group")
|
||||
@TableField("task_group")
|
||||
private String taskGroup;
|
||||
/**
|
||||
* 载具号/料箱号
|
||||
*/
|
||||
@TableField(value = "vehicle_id")
|
||||
@TableField("vehicle_id")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
@TableField(value = "weight")
|
||||
@TableField("weight")
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* 载具尺寸
|
||||
*/
|
||||
@TableField(value = "vehicle_size")
|
||||
@TableField("vehicle_size")
|
||||
private Integer vehicleSize;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@TableField(value = "finish_time")
|
||||
@TableField("finish_time")
|
||||
private LocalDateTime finishTime;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@TableField(value = "user_name")
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
/**
|
||||
* 物料相关的详细信息
|
||||
|
|
@ -89,16 +89,16 @@ public class Task {
|
|||
/**
|
||||
* 前置任务
|
||||
*/
|
||||
@TableField(value = "pre_task")
|
||||
@TableField("pre_task")
|
||||
private String preTask;
|
||||
/**
|
||||
* 是否拣选
|
||||
*/
|
||||
@TableField(value = "is_picking")
|
||||
@TableField("is_picking")
|
||||
private Integer isPicking;
|
||||
/**
|
||||
* 拣选站台
|
||||
*/
|
||||
@TableField(value = "pick_stand")
|
||||
@TableField("pick_stand")
|
||||
private String pickStand;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,67 +16,67 @@ public class TaskRecord {
|
|||
/**
|
||||
* 任务号
|
||||
*/
|
||||
@TableId(value = "task_id")
|
||||
@TableId("task_id")
|
||||
private String taskId;
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
@TableField(value = "task_type")
|
||||
@TableField("task_type")
|
||||
private Integer taskType;
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@TableField(value = "task_status")
|
||||
@TableField("task_status")
|
||||
private Integer taskStatus;
|
||||
/**
|
||||
* 起点
|
||||
*/
|
||||
@TableField(value = "origin")
|
||||
@TableField("origin")
|
||||
private String origin;
|
||||
/**
|
||||
* 终点
|
||||
*/
|
||||
@TableField(value = "destination")
|
||||
@TableField("destination")
|
||||
private String destination;
|
||||
/**
|
||||
* 任务优先级
|
||||
*/
|
||||
@TableField(value = "task_priority")
|
||||
@TableField("task_priority")
|
||||
private Integer taskPriority;
|
||||
/**
|
||||
* 任务组
|
||||
*/
|
||||
@TableField(value = "task_group")
|
||||
@TableField("task_group")
|
||||
private String taskGroup;
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@TableField(value = "vehicle_id")
|
||||
@TableField("vehicle_id")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 重量
|
||||
*/
|
||||
@TableField(value = "weight")
|
||||
@TableField("weight")
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* 载具尺寸
|
||||
*/
|
||||
@TableField(value = "vehicle_size")
|
||||
@TableField("vehicle_size")
|
||||
private Integer vehicleSize;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@TableField(value = "finish_time")
|
||||
@TableField("finish_time")
|
||||
private LocalDateTime finishTime;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@TableField(value = "user_name")
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
/**
|
||||
* 物料相关的详细信息
|
||||
|
|
@ -86,16 +86,16 @@ public class TaskRecord {
|
|||
/**
|
||||
* 前置任务
|
||||
*/
|
||||
@TableField(value = "pre_task")
|
||||
@TableField("pre_task")
|
||||
private String preTask;
|
||||
/**
|
||||
* 是否拣选
|
||||
*/
|
||||
@TableField(value = "is_picking")
|
||||
@TableField("is_picking")
|
||||
private Integer isPicking;
|
||||
/**
|
||||
* 拣选站台
|
||||
*/
|
||||
@TableField(value = "pick_stand")
|
||||
@TableField("pick_stand")
|
||||
private String pickStand;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,30 +20,30 @@ public class User {
|
|||
private Integer userId;
|
||||
|
||||
/** 用户名 */
|
||||
@TableField(value = "user_name")
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
|
||||
/** 角色Id */
|
||||
@TableField(value = "role_id")
|
||||
@TableField("role_id")
|
||||
private Integer roleId = null;
|
||||
|
||||
/** 登录账户 */
|
||||
@TableField(value = "login_account")
|
||||
@TableField("login_account")
|
||||
private String loginAccount;
|
||||
|
||||
/** 登录密码 */
|
||||
@TableField(value = "login_password")
|
||||
@TableField("login_password")
|
||||
private String loginPassword;
|
||||
|
||||
/** 添加时间 */
|
||||
@TableField(value = "add_time")
|
||||
@TableField("add_time")
|
||||
private LocalDateTime addTime;
|
||||
|
||||
/** 更新时间 */
|
||||
@TableField(value = "update_time")
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/** 添加用户名 */
|
||||
@TableField(value = "add_user")
|
||||
@TableField("add_user")
|
||||
private String addUser;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,27 +16,27 @@ public class Vehicle {
|
|||
/**
|
||||
* 载具编号
|
||||
*/
|
||||
@TableId(value = "vehicle_id")
|
||||
@TableId("vehicle_id")
|
||||
private String vehicleId;
|
||||
/**
|
||||
* 当前所在位置
|
||||
*/
|
||||
@TableField(value = "current_location")
|
||||
@TableField("current_location")
|
||||
private String currentLocation;
|
||||
/**
|
||||
* 载具状态
|
||||
*/
|
||||
@TableField(value = "vehicle_status")
|
||||
@TableField("vehicle_status")
|
||||
private Integer vehicleStatus;
|
||||
/**
|
||||
* 是否是空箱
|
||||
*/
|
||||
@TableField(value = "is_empty")
|
||||
@TableField("is_empty")
|
||||
private Integer isEmpty;
|
||||
/**
|
||||
* 载具类型
|
||||
*/
|
||||
@TableField(value = "vehicle_type")
|
||||
@TableField("vehicle_type")
|
||||
private Integer vehicleType;
|
||||
/**
|
||||
* 额外信息
|
||||
|
|
|
|||
|
|
@ -17,17 +17,17 @@ public class WmsLog {
|
|||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "log_id")
|
||||
@TableId("log_id")
|
||||
private String logId;
|
||||
/**
|
||||
* 描述/标题
|
||||
*/
|
||||
@TableField(value = "log_title")
|
||||
@TableField("log_title")
|
||||
private String logTitle;
|
||||
/**
|
||||
* 方法
|
||||
*/
|
||||
@TableField(value = "log_method")
|
||||
@TableField("log_method")
|
||||
private String logMethod;
|
||||
/**
|
||||
* 请求参数
|
||||
|
|
@ -42,17 +42,17 @@ public class WmsLog {
|
|||
/**
|
||||
* 请求的ip
|
||||
*/
|
||||
@TableField(value = "log_ip")
|
||||
@TableField("log_ip")
|
||||
private String logIp;
|
||||
/**
|
||||
* 请求时间
|
||||
*/
|
||||
@TableField(value = "log_time")
|
||||
@TableField("log_time")
|
||||
private LocalDateTime logTime;
|
||||
/**
|
||||
* 请求用户
|
||||
*/
|
||||
@TableField(value = "log_user")
|
||||
@TableField("log_user")
|
||||
private String logUser;
|
||||
|
||||
public WmsLog() {
|
||||
|
|
|
|||
71
src/main/java/com/wms/entity/table/WorkStationConfig.java
Normal file
71
src/main/java/com/wms/entity/table/WorkStationConfig.java
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
package com.wms.entity.table;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 工作站台配置
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "tbl_app_work_station_config", autoResultMap = true)
|
||||
public class WorkStationConfig {
|
||||
/**
|
||||
* 配置id
|
||||
*/
|
||||
@TableId("config_id")
|
||||
private String configId;
|
||||
/**
|
||||
* 工作站台
|
||||
*/
|
||||
@TableField("work_station")
|
||||
private String workStation;
|
||||
/**
|
||||
* 小盒子
|
||||
*/
|
||||
@TableField("small_box")
|
||||
private String smallBox;
|
||||
/**
|
||||
* 机型
|
||||
*/
|
||||
@TableField("model")
|
||||
private String model;
|
||||
/**
|
||||
* 工位
|
||||
*/
|
||||
@TableField("work_center")
|
||||
private String workCenter;
|
||||
/**
|
||||
* 工位大盒子
|
||||
*/
|
||||
@TableField("big_box")
|
||||
private String bigBox;
|
||||
/**
|
||||
* 车辆
|
||||
*/
|
||||
@TableField("vehicle")
|
||||
private String vehicle;
|
||||
/**
|
||||
* 线边架/车位置
|
||||
*/
|
||||
@TableField("vehicle_location")
|
||||
private String vehicleLocation;
|
||||
/**
|
||||
* 开工时间调整
|
||||
*/
|
||||
@TableField("start_date_adjust")
|
||||
private Integer startDateAdjust = 0;
|
||||
/**
|
||||
* 最近更新时间
|
||||
*/
|
||||
@TableField("last_update_time")
|
||||
private LocalDateTime lastUpdateTime;
|
||||
/**
|
||||
* 最近更新用户
|
||||
*/
|
||||
@TableField("last_update_user")
|
||||
private String lastUpdateUser;
|
||||
}
|
||||
|
|
@ -1,17 +1,10 @@
|
|||
package com.wms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms.entity.app.dto.TaskDto;
|
||||
import com.wms.entity.table.Task;
|
||||
|
||||
/**
|
||||
* 任务服务
|
||||
*/
|
||||
public interface TaskService extends IService<Task> {
|
||||
/**
|
||||
* 生成移库任务
|
||||
* @param locationId 要出库的库位号
|
||||
* @return 深度-1的移库任务
|
||||
*/
|
||||
TaskDto genMoveTask(String locationId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,10 +26,6 @@ public class LocationServiceImplements extends ServiceImpl<LocationMapper, Locat
|
|||
* 库位
|
||||
*/
|
||||
private final LocationMapper locationMapper;
|
||||
/**
|
||||
* 任务
|
||||
*/
|
||||
private final TaskMapper taskMapper;
|
||||
/**
|
||||
* 站台
|
||||
*/
|
||||
|
|
@ -38,13 +34,17 @@ public class LocationServiceImplements extends ServiceImpl<LocationMapper, Locat
|
|||
* 库存
|
||||
*/
|
||||
private final StockMapper stockMapper;
|
||||
/**
|
||||
* 任务
|
||||
*/
|
||||
private final TaskMapper taskMapper;
|
||||
|
||||
/**
|
||||
* 查找一个可用库位
|
||||
* @param inPoint 入库站点
|
||||
* @param goodsId 物料编号--可选
|
||||
* @return 结果
|
||||
* nextLocationId, preTaskId
|
||||
* nextLocationId 下一个可用库位
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> getOneLocation(String inPoint, String goodsId) {
|
||||
|
|
@ -79,9 +79,7 @@ public class LocationServiceImplements extends ServiceImpl<LocationMapper, Locat
|
|||
.eq(Stand::getStandType, 3)
|
||||
.orderByAsc(Stand::getLastUseTime);
|
||||
List<Stand> LRUStands = standMapper.selectList(LRUStandQueryWrapper);
|
||||
if (LRUStands.isEmpty()) {
|
||||
return resultMap;
|
||||
} else {
|
||||
if (!LRUStands.isEmpty()) {
|
||||
if (StringUtils.isNotEmpty(goodsId)) {// 需要根据物料编号做出区分
|
||||
equipmentId = selectEquipmentByLRUAndGoods(LRUStands, goodsId);
|
||||
if (equipmentId != -1) {
|
||||
|
|
@ -95,11 +93,9 @@ public class LocationServiceImplements extends ServiceImpl<LocationMapper, Locat
|
|||
break;
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
} else {
|
||||
return resultMap;
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -117,48 +113,9 @@ public class LocationServiceImplements extends ServiceImpl<LocationMapper, Locat
|
|||
.orderByAsc(List.of(Location::getWCol, Location::getWLayer, Location::getWRow));
|
||||
List<Location> availableLocations = locationMapper.selectList(locationQueryWrapper);
|
||||
for (Location oneAvailableLocation : availableLocations) {
|
||||
LambdaQueryWrapper<Location> haveTaskQueryWrapper = new LambdaQueryWrapper<Location>()
|
||||
.select(Location::getLocationId)
|
||||
.eq(Location::getWRow, oneAvailableLocation.getWRow())
|
||||
.eq(Location::getWCol, oneAvailableLocation.getWCol())
|
||||
.eq(Location::getWLayer, oneAvailableLocation.getWLayer());
|
||||
List<Location> haveTaskLocations = locationMapper.selectList(haveTaskQueryWrapper);
|
||||
// 判断当前排列层的库位是否有出库或者移库任务
|
||||
boolean hasTasksFlag = false;
|
||||
for (Location havaTaskLocation : haveTaskLocations) {
|
||||
LambdaQueryWrapper<Task> taskQueryWrapper = new LambdaQueryWrapper<Task>()
|
||||
.select(Task::getTaskId)
|
||||
.eq(Task::getOrigin, havaTaskLocation.getLocationId());
|
||||
if (taskMapper.selectCount(taskQueryWrapper) > 0) {
|
||||
hasTasksFlag = true;
|
||||
resultMap.put("nextLocationId", oneAvailableLocation.getLocationId());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (hasTasksFlag) continue;
|
||||
// 判断是否深度+1有入库任务
|
||||
haveTaskQueryWrapper.clear();
|
||||
LambdaQueryWrapper<Location> plusOneDepthLocationQueryWrapper = new LambdaQueryWrapper<Location>()
|
||||
.select(Location::getLocationId)
|
||||
.eq(Location::getWDepth, oneAvailableLocation.getWDepth() + 1)
|
||||
.eq(Location::getWRow, oneAvailableLocation.getWRow())
|
||||
.eq(Location::getWCol, oneAvailableLocation.getWCol())
|
||||
.eq(Location::getWLayer, oneAvailableLocation.getWLayer());
|
||||
Location plusOneDepthLocation = locationMapper.selectOne(plusOneDepthLocationQueryWrapper);
|
||||
if (plusOneDepthLocation == null) {
|
||||
resultMap.put("nextLocationId", oneAvailableLocation.getLocationId());
|
||||
return resultMap;
|
||||
} else {
|
||||
LambdaQueryWrapper<Task> taskQueryWrapper = new LambdaQueryWrapper<Task>()
|
||||
.select(Task::getTaskId)
|
||||
.eq(Task::getDestination, plusOneDepthLocation.getLocationId());
|
||||
Task plusOneDepthTask = taskMapper.selectOne(taskQueryWrapper);
|
||||
if (plusOneDepthTask != null) {
|
||||
resultMap.put("nextLocationId", oneAvailableLocation.getLocationId());
|
||||
resultMap.put("preTaskId", plusOneDepthTask.getTaskId());
|
||||
return resultMap;
|
||||
}
|
||||
}
|
||||
}
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
|
|
@ -173,7 +130,7 @@ public class LocationServiceImplements extends ServiceImpl<LocationMapper, Locat
|
|||
List<Integer> equipmentIds = new ArrayList<>();
|
||||
List<Task> tasks = taskMapper.selectList(new LambdaQueryWrapper<Task>()
|
||||
.select(Task::getDestination)
|
||||
.apply("goods_related -> '$.goods_id' = {0}", goodsId)
|
||||
.apply("goods_related -> '$.goodsId' = {0}", goodsId)
|
||||
.eq(Task::getTaskType, 1));
|
||||
for (Task task : tasks) {
|
||||
Location tempLocation = locationMapper.selectOne(new LambdaQueryWrapper<Location>().eq(Location::getLocationId, task.getDestination()));
|
||||
|
|
@ -183,7 +140,7 @@ public class LocationServiceImplements extends ServiceImpl<LocationMapper, Locat
|
|||
}
|
||||
List<Stock> stocks = stockMapper.selectList(new LambdaQueryWrapper<Stock>()
|
||||
.select(Stock::getLocationId)
|
||||
.apply("goods_related -> '$.goods_id' = {0}", goodsId)
|
||||
.apply("goods_related -> '$.goodsId' = {0}", goodsId)
|
||||
.eq(Stock::getStockStatus, StockStatus.OK.getCode()));
|
||||
for (Stock stock : stocks) {
|
||||
Location tempLocation = locationMapper.selectOne(new LambdaQueryWrapper<Location>().eq(Location::getLocationId, stock.getLocationId()));
|
||||
|
|
|
|||
|
|
@ -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<LogMapper, WmsLog> implements LogService {
|
||||
|
|
|
|||
|
|
@ -1,29 +1,13 @@
|
|||
package com.wms.service.serviceImplements;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.wms.constants.enums.*;
|
||||
import com.wms.entity.app.dto.TaskDto;
|
||||
import com.wms.entity.table.Location;
|
||||
import com.wms.entity.table.Stock;
|
||||
import com.wms.entity.table.Task;
|
||||
import com.wms.entity.table.Vehicle;
|
||||
import com.wms.mapper.LocationMapper;
|
||||
import com.wms.mapper.StockMapper;
|
||||
import com.wms.mapper.TaskMapper;
|
||||
import com.wms.mapper.VehicleMapper;
|
||||
import com.wms.service.TaskService;
|
||||
import com.wms.utils.StringUtils;
|
||||
import com.wms.utils.WmsUtils;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 任务服务的实现类
|
||||
*/
|
||||
|
|
@ -34,157 +18,4 @@ public class TaskServiceImplements extends ServiceImpl<TaskMapper, Task> impleme
|
|||
* 任务mapper
|
||||
*/
|
||||
private final TaskMapper taskMapper;
|
||||
/**
|
||||
* 库位服务
|
||||
*/
|
||||
private final LocationMapper locationMapper;
|
||||
/**
|
||||
* 库存服务
|
||||
*/
|
||||
private final StockMapper stockMapper;
|
||||
/**
|
||||
* 载具服务
|
||||
*/
|
||||
private final VehicleMapper vehicleMapper;
|
||||
|
||||
@Override
|
||||
public TaskDto genMoveTask(String locationId) {
|
||||
Location outLocation = locationMapper.selectOne(new LambdaQueryWrapper<Location>().eq(Location::getLocationId, locationId));
|
||||
if (outLocation != null) {
|
||||
if (outLocation.getWDepth() == 1) {
|
||||
return null;
|
||||
} else {
|
||||
// 生成当前深度-1的库位的移库任务
|
||||
TaskDto depthMinus1MoveTask = new TaskDto();
|
||||
Location depthMinus1Location = locationMapper.selectOne(new LambdaQueryWrapper<Location>().eq(Location::getLocationId, outLocation.getLocationId()));
|
||||
if (depthMinus1Location.getIsLock() == 1) {// 外层库位锁定
|
||||
depthMinus1MoveTask.setTaskId("LOCKED");
|
||||
return depthMinus1MoveTask;
|
||||
}
|
||||
// 判断是否有货
|
||||
if (Objects.equals(depthMinus1Location.getLocationStatus(), LocationStatus.OCCUPY.getCode())) {
|
||||
// 查看这个库位是否有入库任务
|
||||
Task depthMinusIn1Task = taskMapper.selectOne(new LambdaQueryWrapper<Task>()
|
||||
.eq(Task::getTaskType, TaskType.IN.getCode())
|
||||
.eq(Task::getDestination, depthMinus1Location.getLocationId()));
|
||||
if (depthMinusIn1Task != null) {
|
||||
// 生成移库任务,并把移库任务的前置任务设置为该入库任务
|
||||
Task moveTask = genMoveTask(depthMinus1Location);
|
||||
moveTask.setPreTask(depthMinusIn1Task.getTaskId());
|
||||
taskMapper.insert(moveTask);
|
||||
// 对应载具所有库存上锁
|
||||
stockMapper.update(new LambdaUpdateWrapper<Stock>()
|
||||
.set(Stock::getStockStatus, StockStatus.MOVE.getCode())
|
||||
.eq(Stock::getLocationId, depthMinus1Location.getLocationId()));
|
||||
// 对应载具状态设置
|
||||
vehicleMapper.update(new LambdaUpdateWrapper<Vehicle>()
|
||||
.set(Vehicle::getVehicleStatus, VehicleStatus.MOVE.getCode())
|
||||
.eq(Vehicle::getCurrentLocation, depthMinus1Location.getLocationId()));
|
||||
depthMinus1MoveTask.setTaskId(moveTask.getTaskId());
|
||||
return depthMinus1MoveTask;
|
||||
} else {
|
||||
// 判断是否有出库、移库、盘点、拣选等任务
|
||||
Task depthMinusOut1Task = taskMapper.selectOne(new LambdaQueryWrapper<Task>()
|
||||
.eq(Task::getOrigin, depthMinus1Location.getLocationId()));
|
||||
if (depthMinusOut1Task != null) {
|
||||
depthMinus1MoveTask.setTaskId(depthMinusOut1Task.getTaskId());
|
||||
} else {
|
||||
// 生成移库任务,并把移库任务的前置任务设置为该入库任务
|
||||
Task moveTask = genMoveTask(depthMinus1Location);
|
||||
// 判断当前深度-2的库位是否有移库任务
|
||||
TaskDto depthMinus2MoveTask = genMoveTask(depthMinus1Location.getLocationId());
|
||||
if (depthMinus2MoveTask.getTaskId().equals("LOCKED")) {
|
||||
depthMinus1MoveTask.setTaskId("LOCKED");
|
||||
return depthMinus1MoveTask;
|
||||
}
|
||||
moveTask.setPreTask(depthMinus2MoveTask.getTaskId());
|
||||
taskMapper.insert(moveTask);
|
||||
// 对应载具所有库存上锁
|
||||
stockMapper.update(new LambdaUpdateWrapper<Stock>()
|
||||
.set(Stock::getStockStatus, StockStatus.MOVE.getCode())
|
||||
.eq(Stock::getLocationId, depthMinus1Location.getLocationId()));
|
||||
// 对应载具状态设置
|
||||
vehicleMapper.update(new LambdaUpdateWrapper<Vehicle>()
|
||||
.set(Vehicle::getVehicleStatus, VehicleStatus.MOVE.getCode())
|
||||
.eq(Vehicle::getCurrentLocation, depthMinus1Location.getLocationId()));
|
||||
depthMinus1MoveTask.setTaskId(moveTask.getTaskId());
|
||||
}
|
||||
return depthMinus1MoveTask;
|
||||
}
|
||||
} else {
|
||||
// 生成当前深度-2的库位的移库任务,即当前深度-1的库位作为参数
|
||||
TaskDto depthMinus2MoveTask = genMoveTask(depthMinus1Location.getLocationId());
|
||||
return StringUtils.isNotEmpty(depthMinus1MoveTask.getTaskId()) ? depthMinus1MoveTask : depthMinus2MoveTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成一个移库任务
|
||||
* @param originLocation 原库位
|
||||
* @return 生成的移库任务
|
||||
*/
|
||||
private Task genMoveTask(Location originLocation) {
|
||||
Task moveTask = new Task();
|
||||
// 先找一个新库位,同一个设备号,但是不同的排列层
|
||||
Location newLocation = new Location();
|
||||
List<Location> availableLocations = locationMapper.selectList(new LambdaQueryWrapper<Location>()
|
||||
.eq(Location::getEquipmentId, originLocation.getEquipmentId())
|
||||
.eq(Location::getLocationType, originLocation.getLocationType())
|
||||
.eq(Location::getIsLock, 0)
|
||||
.eq(Location::getLocationStatus, LocationStatus.EMPTY.getCode())
|
||||
.ne(Location::getWRow, originLocation.getWRow())
|
||||
.ne(Location::getWCol, originLocation.getWCol())
|
||||
.ne(Location::getWLayer, originLocation.getWLayer()));
|
||||
for (Location oneAvailableLocation : availableLocations) {
|
||||
LambdaQueryWrapper<Location> haveTaskQueryWrapper = new LambdaQueryWrapper<Location>()
|
||||
.select(Location::getLocationId)
|
||||
.eq(Location::getWRow, oneAvailableLocation.getWRow())
|
||||
.eq(Location::getWCol, oneAvailableLocation.getWCol())
|
||||
.eq(Location::getWLayer, oneAvailableLocation.getWLayer());
|
||||
List<Location> haveTaskLocations = locationMapper.selectList(haveTaskQueryWrapper);
|
||||
// 判断当前排列层的库位是否有出库或者移库任务
|
||||
boolean hasTasksFlag = false;
|
||||
for (Location havaTaskLocation : haveTaskLocations) {
|
||||
LambdaQueryWrapper<Task> taskOutQueryWrapper = new LambdaQueryWrapper<Task>()
|
||||
.select(Task::getTaskId)
|
||||
.eq(Task::getOrigin, havaTaskLocation.getLocationId());
|
||||
LambdaQueryWrapper<Task> taskInQueryWrapper = new LambdaQueryWrapper<Task>()
|
||||
.select(Task::getTaskId)
|
||||
.eq(Task::getDestination, havaTaskLocation.getLocationId());
|
||||
if (super.count(taskOutQueryWrapper) > 0 || super.count(taskInQueryWrapper) > 0) {
|
||||
hasTasksFlag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (hasTasksFlag) continue;
|
||||
// 锁定库位
|
||||
LambdaUpdateWrapper<Location> updateLocationWrapper = new LambdaUpdateWrapper<Location>()
|
||||
.set(Location::getLocationStatus, LocationStatus.OCCUPY.getCode())
|
||||
.set(Location::getVehicleId, originLocation.getVehicleId())
|
||||
.eq(Location::getLocationId, oneAvailableLocation.getLocationId())
|
||||
.eq(Location::getLocationStatus, LocationStatus.EMPTY.getCode());
|
||||
if (locationMapper.update(updateLocationWrapper) > 0) {
|
||||
newLocation = oneAvailableLocation;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(newLocation.getLocationId())) {
|
||||
// 生成移库任务
|
||||
moveTask.setTaskId(WmsUtils.generateId("MOVE_"));
|
||||
moveTask.setTaskType(TaskType.MOVE.getCode());
|
||||
moveTask.setTaskPriority(1);
|
||||
moveTask.setTaskGroup(WmsUtils.generateId(""));
|
||||
moveTask.setVehicleId(originLocation.getVehicleId());
|
||||
moveTask.setOrigin(originLocation.getLocationId());
|
||||
moveTask.setDestination(newLocation.getLocationId());
|
||||
moveTask.setUserName("WMS");
|
||||
moveTask.setCreateTime(LocalDateTime.now());
|
||||
moveTask.setTaskStatus(WmsTaskStatus.NEW.getCode());
|
||||
}
|
||||
|
||||
return moveTask;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
54
src/main/java/com/wms/utils/MailUtils.java
Normal file
54
src/main/java/com/wms/utils/MailUtils.java
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
package com.wms.utils;
|
||||
|
||||
import javax.mail.*;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.internet.AddressException;
|
||||
import javax.mail.internet.InternetAddress;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import java.util.Properties;
|
||||
|
||||
public class MailUtils {
|
||||
/**
|
||||
*
|
||||
* @param email 接收者邮箱
|
||||
* @param subject 邮件主题
|
||||
* @param emailMsg 邮件内容
|
||||
* @throws AddressException 邮箱地址异常
|
||||
* @throws MessagingException 邮件异常
|
||||
*/
|
||||
public static void sendMailSmtp (String email, String subject, String emailMsg)
|
||||
throws AddressException, MessagingException {
|
||||
//创建配置文件
|
||||
Properties props = new Properties();
|
||||
//设置发送时遵从SMTP协议
|
||||
props.setProperty("mail.transport.protocol", "SMTP");
|
||||
/*
|
||||
* 发送邮件的域名
|
||||
* smtp.xx.com
|
||||
* smtp.qq.com则代表发送邮件时使用的邮箱域名来自qq
|
||||
* smtp.163.com则代表发送邮件时使用的邮箱域名来自163
|
||||
*/
|
||||
props.setProperty("mail.host", "smtp.zmail300.cn");
|
||||
//设置用户的认证方式auth
|
||||
props.setProperty("mail.smtp.auth", "true");
|
||||
Authenticator auth = new Authenticator() {
|
||||
public PasswordAuthentication getPasswordAuthentication() {
|
||||
//return new PasswordAuthentication("用户名", "密码");
|
||||
//注意qq邮箱需要去qq邮箱的设置中获取授权码,并将授权码作为密码来填写
|
||||
return new PasswordAuthentication("liangzhou@baokai.cn", "Liang@9468");
|
||||
}
|
||||
};
|
||||
//创建session域
|
||||
Session session = Session.getInstance(props, auth);
|
||||
Message message = new MimeMessage(session);
|
||||
//设置邮件发送者,与PasswordAuthentication中的邮箱一致即可
|
||||
message.setFrom(new InternetAddress("liangzhou@baokai.cn"));
|
||||
message.setRecipient(Message.RecipientType.TO, new InternetAddress(email));
|
||||
//设置邮件主题
|
||||
message.setSubject(subject);
|
||||
//设置邮件内容
|
||||
message.setContent(emailMsg, "text/html;charset=utf-8");
|
||||
//发送邮件
|
||||
Transport.send(message);
|
||||
}
|
||||
}
|
||||
|
|
@ -8,20 +8,20 @@ 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_kate_suzhou?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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user