代码更新
1. 增加日志表用户名字段的设定 2. 增加整理盒子功能的代码
This commit is contained in:
parent
6f57f53d38
commit
861376cf11
|
|
@ -75,14 +75,15 @@ public class MyLogAspect {
|
|||
wmsLog.setLogMethod(myLog.logMethod());
|
||||
}
|
||||
// 设置日志表详情
|
||||
wmsLog.setLogRequest(joinPoint.getArgs());
|
||||
wmsLog.setLogRequest(joinPoint.getArgs().length > 0 ? joinPoint.getArgs()[0] : null);
|
||||
wmsLog.setLogResponse(result);
|
||||
if (request != null) {
|
||||
wmsLog.setLogIp(HttpUtils.getIpAddr(request));
|
||||
}
|
||||
wmsLog.setLogTime(LocalDateTime.now());
|
||||
// TODO 操作人员姓名待实现
|
||||
wmsLog.setLogUser("");
|
||||
// 获取用户名
|
||||
Method methodToGetUserName = wmsLog.getLogRequest().getClass().getMethod("getUserName");
|
||||
wmsLog.setLogUser((String) methodToGetUserName.invoke(wmsLog.getLogRequest(), new Object[]{}));
|
||||
logService.save(wmsLog);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
@ -117,14 +118,15 @@ public class MyLogAspect {
|
|||
wmsLog.setLogMethod(myLog.logMethod());
|
||||
}
|
||||
// 设置日志表详情
|
||||
wmsLog.setLogRequest(joinPoint.getArgs());
|
||||
wmsLog.setLogRequest(joinPoint.getArgs().length > 0 ? joinPoint.getArgs()[0] : null);
|
||||
wmsLog.setLogResponse(e);
|
||||
if (request != null) {
|
||||
wmsLog.setLogIp(HttpUtils.getIpAddr(request));
|
||||
}
|
||||
wmsLog.setLogTime(LocalDateTime.now());
|
||||
// TODO 操作人员姓名待实现
|
||||
wmsLog.setLogUser("");
|
||||
// 获取用户名
|
||||
Method methodToGetUserName = wmsLog.getLogRequest().getClass().getMethod("getUserName");
|
||||
wmsLog.setLogUser((String) methodToGetUserName.invoke(wmsLog.getLogRequest(), new Object[]{}));
|
||||
logService.save(wmsLog);
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
|
|
|
|||
|
|
@ -126,6 +126,14 @@ public class TaskController {
|
|||
* DBS服务
|
||||
*/
|
||||
private final KateDBSService kateDBSService;
|
||||
/**
|
||||
* 上一次标签配置的服务
|
||||
*/
|
||||
private final ELocationConfigLastService eLocationConfigLastService;
|
||||
/**
|
||||
* 工作站配置服务
|
||||
*/
|
||||
private final WorkStationConfigService workStationConfigService;
|
||||
/**
|
||||
* Wcs服务
|
||||
*/
|
||||
|
|
@ -1156,8 +1164,14 @@ public class TaskController {
|
|||
response.setCode(ResponseCode.OK.getCode());
|
||||
response.setMessage("处理反馈成功");
|
||||
} else {// 小盒子放入大盒子
|
||||
// TODO
|
||||
logger.info("小盒子放入大盒子");
|
||||
// 根据location查询到对应的配置
|
||||
ELocationConfigLast eLocationConfigLast = eLocationConfigLastService.getOne(new LambdaQueryWrapper<ELocationConfigLast>()
|
||||
.eq(ELocationConfigLast::getELocationId, eTaskFeedbackRequest.getLocation()));
|
||||
if (eLocationConfigLast != null) {
|
||||
// 设置状态为已取走
|
||||
eLocationConfigLast.setBoxStatus(2);
|
||||
eLocationConfigLastService.updateById(eLocationConfigLast);
|
||||
}
|
||||
}
|
||||
return convertJsonString(response);
|
||||
} catch (Exception e) {
|
||||
|
|
@ -1992,36 +2006,25 @@ public class TaskController {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// 下面的代码8月10号之后需要删除
|
||||
/**
|
||||
* 特殊用法---请求拣选
|
||||
* 请求整理盒子
|
||||
*
|
||||
* @param taskOutRequest 出库任务
|
||||
* @param sortBoxRequest 请求信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/requestPickTest")
|
||||
@PostMapping("/requestSortBox")
|
||||
@ResponseBody
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
@MyLog(logTitle = "特殊用法---请求拣选", logMethod = "requestPickTest")
|
||||
public String requestPickTest(@RequestBody TaskOutRequest taskOutRequest) {
|
||||
logger.info("接收到特殊用法---请求拣选:{},ip地址:{}", convertJsonString(taskOutRequest), HttpUtils.getIpAddr(servletRequest));
|
||||
// 创建响应信息
|
||||
@MyLog(logTitle = "请求整理盒子", logMethod = "requestSortBox")
|
||||
public String requestSortBox(@RequestBody SortBoxRequest sortBoxRequest) {
|
||||
logger.info("请求整理盒子:{},ip地址:{}", convertJsonString(sortBoxRequest), HttpUtils.getIpAddr(servletRequest));
|
||||
ResponseEntity response = new ResponseEntity();
|
||||
try {
|
||||
// 获取站台号
|
||||
String standId = "";
|
||||
if (StringUtils.isNotEmpty(taskOutRequest.getPickStand())) {
|
||||
if (StringUtils.isNotEmpty(sortBoxRequest.getStandId())) {
|
||||
// 站台号从请求参数中获取
|
||||
standId = taskOutRequest.getPickStand();
|
||||
standId = sortBoxRequest.getStandId();
|
||||
} else {
|
||||
// 站台号从ip获取
|
||||
Stand standOfIp = standService.getOne(new LambdaQueryWrapper<Stand>()
|
||||
|
|
@ -2037,408 +2040,95 @@ public class TaskController {
|
|||
response.setMessage("请求参数缺少站台号。");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(taskOutRequest.getGoodsId())) {
|
||||
// 根据物料请求拣选
|
||||
List<Stock> stockList = stockService.list(new LambdaQueryWrapper<Stock>()
|
||||
.eq(Stock::getStockStatus, StockStatus.OK.getCode())
|
||||
.apply("goods_related ->> '$.goodsId' = {0}", taskOutRequest.getGoodsId())
|
||||
.eq(StringUtils.isNotEmpty(taskOutRequest.getVehicleId()), Stock::getVehicleId, taskOutRequest.getVehicleId()));
|
||||
BigDecimal needNum = taskOutRequest.getGoodsNum();
|
||||
if (stockList != null && !stockList.isEmpty()) {
|
||||
List<Stock> waitForOutStockList = new ArrayList<>();
|
||||
// 尝试生成出库任务
|
||||
for (Stock tempStock : stockList) {
|
||||
if (needNum.compareTo(BigDecimal.ZERO) <= 0) {// 需求数量小于等于0
|
||||
break;
|
||||
}
|
||||
if (tempStock.getGoodsRelated().getRemainNum().compareTo(needNum) > 0) {
|
||||
// 当前箱子剩余物料数量多于需求数量
|
||||
needNum = BigDecimal.ZERO;
|
||||
// 设置剩余数量
|
||||
StockDetailInfo goodsRelated = tempStock.getGoodsRelated();
|
||||
goodsRelated.setRemainNum(goodsRelated.getRemainNum().subtract(needNum));
|
||||
tempStock.setGoodsRelated(goodsRelated);
|
||||
waitForOutStockList.add(tempStock);
|
||||
break;
|
||||
} else {
|
||||
// 当前箱子物料剩余数量少于需求数量
|
||||
needNum = needNum.subtract(tempStock.getGoodsRelated().getRemainNum());
|
||||
// 设置剩余数量
|
||||
StockDetailInfo goodsRelated = tempStock.getGoodsRelated();
|
||||
goodsRelated.setRemainNum(BigDecimal.ZERO);
|
||||
tempStock.setGoodsRelated(goodsRelated);
|
||||
waitForOutStockList.add(tempStock);
|
||||
}
|
||||
}
|
||||
// 出库任务列表
|
||||
List<Task> outTasks = new ArrayList<>();
|
||||
// 载具列表
|
||||
List<String> vehicleIds = new ArrayList<>();
|
||||
for (Stock tempStock : waitForOutStockList) {
|
||||
if (vehicleIds.contains(tempStock.getVehicleId())) {
|
||||
continue;
|
||||
}
|
||||
// 创建出库任务
|
||||
Task tempOutTask = new Task();
|
||||
tempOutTask.setTaskId(generateId("CK_"));
|
||||
tempOutTask.setTaskType(TaskType.OUT.getCode());
|
||||
tempOutTask.setTaskGroup(generateId(""));
|
||||
tempOutTask.setTaskStatus(WmsTaskStatus.NEW.getCode());
|
||||
tempOutTask.setTaskPriority(1);
|
||||
tempOutTask.setVehicleId(tempStock.getVehicleId());
|
||||
tempOutTask.setUserName(taskOutRequest.getUserName());
|
||||
tempOutTask.setOrigin(tempStock.getLocationId());
|
||||
tempOutTask.setDestination("");
|
||||
tempOutTask.setCreateTime(LocalDateTime.now());
|
||||
tempOutTask.setIsPicking(1);
|
||||
tempOutTask.setPickStand(standId);
|
||||
outTasks.add(tempOutTask);
|
||||
// 添加载具列表
|
||||
vehicleIds.add(tempStock.getVehicleId());
|
||||
}
|
||||
// 保存出库任务至任务表
|
||||
taskService.saveBatch(outTasks);
|
||||
// 更新载具信息
|
||||
vehicleService.update(new LambdaUpdateWrapper<Vehicle>()
|
||||
.set(Vehicle::getVehicleStatus, VehicleStatus.OUT.getCode())
|
||||
.in(Vehicle::getVehicleId, vehicleIds)
|
||||
.eq(Vehicle::getVehicleStatus, VehicleStatus.ON.getCode()));
|
||||
// 更新库存信息
|
||||
stockService.update(new LambdaUpdateWrapper<Stock>()
|
||||
.set(Stock::getStockStatus, StockStatus.OUT.getCode())
|
||||
.in(Stock::getVehicleId, vehicleIds)
|
||||
.eq(Stock::getStockStatus, StockStatus.OK.getCode()));
|
||||
// 保存拣选任务至拣选任务表
|
||||
createPickTasks(vehicleIds, standId, PickTaskStatusEnum.TEMP.getCode());
|
||||
}
|
||||
} else {
|
||||
List<Vehicle> vehicles = vehicleService.list(new LambdaQueryWrapper<Vehicle>()
|
||||
.eq(Vehicle::getVehicleStatus, VehicleStatus.ON.getCode())
|
||||
.eq(StringUtils.isNotEmpty(taskOutRequest.getVehicleId()), Vehicle::getVehicleId, taskOutRequest.getVehicleId()));
|
||||
if (taskOutRequest.getGoodsNum() == null || taskOutRequest.getGoodsNum().compareTo(BigDecimal.ZERO) <= 0) {
|
||||
logger.error("缺少数量!");
|
||||
// 判断大盒子号是否正确
|
||||
List<WorkStationConfig> stationConfigs = workStationConfigService.list(new LambdaQueryWrapper<WorkStationConfig>()
|
||||
.eq(WorkStationConfig::getBigBox, sortBoxRequest.getBigBoxNo())
|
||||
.eq(WorkStationConfig::getWorkStation, standId));
|
||||
if (stationConfigs == null || stationConfigs.isEmpty()) {
|
||||
logger.error("请输入正确的大盒子号。");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("缺少数量!");
|
||||
response.setMessage("请输入正确的大盒子号。");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
BigDecimal needNum = taskOutRequest.getGoodsNum();
|
||||
// 出库任务列表
|
||||
List<Task> outTasks = new ArrayList<>();
|
||||
// 载具列表
|
||||
List<String> vehicleIds = new ArrayList<>();
|
||||
for (Vehicle vehicle : vehicles) {
|
||||
if (needNum.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
// 查找对应的标签配置
|
||||
List<ELocationConfigLast> lightingBoxList = eLocationConfigLastService.list(new LambdaQueryWrapper<ELocationConfigLast>()
|
||||
.eq(ELocationConfigLast::getWorkStation, standId)
|
||||
.eq(ELocationConfigLast::getBoxStatus, 1));
|
||||
if (lightingBoxList != null && !lightingBoxList.isEmpty()) {
|
||||
logger.error("请将已亮灯的盒子取走并灭灯后重试。");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("请将已亮灯的盒子取走并灭灯后重试。");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
// 生成工位列表
|
||||
List<String> workCenterList = stationConfigs.stream().map(WorkStationConfig::getWorkCenter).distinct().toList();
|
||||
// 亮灯列表
|
||||
List<ETaskData> eTaskDataList = new ArrayList<>();
|
||||
for (String workCenter : workCenterList) {
|
||||
if (!eTaskDataList.isEmpty()) {
|
||||
break;
|
||||
}
|
||||
if (vehicleIds.contains(vehicle.getVehicleId())) {
|
||||
continue;
|
||||
List<String> smallBoxList = stationConfigs.stream().filter(stationConfig -> stationConfig.getWorkCenter().equals(workCenter)).map(WorkStationConfig::getSmallBox).distinct().toList();
|
||||
for (String smallBox : smallBoxList) {
|
||||
// 查找对应的标签配置
|
||||
ELocationConfigLast eConfigLast = eLocationConfigLastService.getOne(new LambdaQueryWrapper<ELocationConfigLast>()
|
||||
.eq(ELocationConfigLast::getWorkStation, standId)
|
||||
.eq(ELocationConfigLast::getWorkCenter, smallBox)
|
||||
.eq(ELocationConfigLast::getBoxStatus, 0));
|
||||
if (eConfigLast != null) {
|
||||
// 当次拣选数量
|
||||
ETaskData eTaskData = new ETaskData();
|
||||
eTaskData.setTaskId(generateId(smallBox + "_"));// 用户查询对应的拣选任务
|
||||
eTaskData.setGoodsId(smallBox);
|
||||
eTaskData.setGoodsName("");
|
||||
eTaskData.setNeedNum(1);
|
||||
eTaskData.setLocation(eConfigLast.getELocationId());
|
||||
eTaskDataList.add(eTaskData);
|
||||
// 更新电子标签库位信息
|
||||
etagLocationService.update(new LambdaUpdateWrapper<ETagLocation>()
|
||||
.set(ETagLocation::getTaskId, eTaskData.getTaskId())
|
||||
.set(ETagLocation::getNeedNum, eTaskData.getNeedNum())
|
||||
.set(ETagLocation::getConfirmNum, eTaskData.getNeedNum())
|
||||
.eq(ETagLocation::getELocationId, eConfigLast.getELocationId()));
|
||||
}
|
||||
// 创建出库任务
|
||||
Task tempOutTask = new Task();
|
||||
tempOutTask.setTaskId(generateId("CK_"));
|
||||
tempOutTask.setTaskType(TaskType.OUT.getCode());
|
||||
tempOutTask.setTaskGroup(generateId(""));
|
||||
tempOutTask.setTaskStatus(WmsTaskStatus.NEW.getCode());
|
||||
tempOutTask.setTaskPriority(1);
|
||||
tempOutTask.setVehicleId(vehicle.getVehicleId());
|
||||
tempOutTask.setUserName(taskOutRequest.getUserName());
|
||||
tempOutTask.setOrigin(vehicle.getCurrentLocation());
|
||||
tempOutTask.setDestination("");
|
||||
tempOutTask.setCreateTime(LocalDateTime.now());
|
||||
tempOutTask.setIsPicking(1);
|
||||
tempOutTask.setPickStand(standId);
|
||||
outTasks.add(tempOutTask);
|
||||
// 添加载具列表
|
||||
vehicleIds.add(vehicle.getVehicleId());
|
||||
needNum = needNum.subtract(BigDecimal.ONE);
|
||||
}
|
||||
// 保存出库任务至任务表
|
||||
taskService.saveBatch(outTasks);
|
||||
// 更新载具信息
|
||||
vehicleService.update(new LambdaUpdateWrapper<Vehicle>()
|
||||
.set(Vehicle::getVehicleStatus, VehicleStatus.OUT.getCode())
|
||||
.in(Vehicle::getVehicleId, vehicleIds)
|
||||
.eq(Vehicle::getVehicleStatus, VehicleStatus.ON.getCode()));
|
||||
// 更新库存信息
|
||||
stockService.update(new LambdaUpdateWrapper<Stock>()
|
||||
.set(Stock::getStockStatus, StockStatus.OUT.getCode())
|
||||
.in(Stock::getVehicleId, vehicleIds)
|
||||
.eq(Stock::getStockStatus, StockStatus.OK.getCode()));
|
||||
// 保存拣选任务至拣选任务表
|
||||
createPickTasks(vehicleIds, standId, PickTaskStatusEnum.TEMP.getCode());
|
||||
}
|
||||
|
||||
logger.info("请求拣选成功!");
|
||||
// 发送亮灯
|
||||
WcsETaskRequest wcsETaskRequest = new WcsETaskRequest();
|
||||
wcsETaskRequest.setTaskGroup(generateId(sortBoxRequest.getBigBoxNo() + "_"));
|
||||
wcsETaskRequest.setTaskType(2);
|
||||
wcsETaskRequest.setTaskData(eTaskDataList);
|
||||
wcsETaskRequest.setOrderId(generateId(""));
|
||||
wcsETaskRequest.setVehicleNo(sortBoxRequest.getBigBoxNo());
|
||||
String sendToWcsETaskUrl = configMap.get(ConfigMapKeyEnum.URL_WCS_E_TASK.getConfigKey());
|
||||
if (StringUtils.isEmpty(sendToWcsETaskUrl)) {
|
||||
// url地址为空
|
||||
logger.error("向Wcs发送电子标签亮灯任务的地址为空");
|
||||
} else {
|
||||
//
|
||||
ResponseEntity result = JSON.parseObject(HttpUtils.sendHttpPostWithoutToken(sendToWcsETaskUrl, convertJsonString(wcsETaskRequest)), ResponseEntity.class);
|
||||
if (result == null || !Objects.equals(result.getCode(), ResponseCode.OK.getCode())) {
|
||||
logger.error("发送电子标签亮灯任务失败");
|
||||
throw new Exception("发送电子标签亮灯任务失败");
|
||||
} else {
|
||||
// 更新亮灯数据
|
||||
etagLocationService.update(new LambdaUpdateWrapper<ETagLocation>()
|
||||
.set(ETagLocation::getPickStatus, 1)
|
||||
.set(ETagLocation::getTaskType, wcsETaskRequest.getTaskType())
|
||||
.set(ETagLocation::getVehicleNo, wcsETaskRequest.getVehicleNo())
|
||||
.in(ETagLocation::getELocationId, eTaskDataList.stream().map(ETaskData::getLocation).collect(Collectors.toList())));
|
||||
}
|
||||
}
|
||||
logger.info("处理整理盒子请求成功。");
|
||||
response.setCode(ResponseCode.OK.getCode());
|
||||
response.setMessage("请求拣选成功!");
|
||||
response.setMessage("请根据灯光拣选盒子。");
|
||||
return convertJsonString(response);
|
||||
} catch (Exception e) {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
logger.error("发生异常:{}", convertJsonString(e));
|
||||
// 返回其他异常
|
||||
logger.error("处理整理盒子请求异常,{}", convertJsonString(e));
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("发生异常");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
}
|
||||
|
||||
public void createPickTasks(List<String> vehicleIds, String workStation, Integer pickStatus) {
|
||||
if (!Objects.equals(pickStatus, PickTaskStatusEnum.TEMP.getCode()) && !Objects.equals(pickStatus, PickTaskStatusEnum.NEW.getCode())) {
|
||||
return;
|
||||
}
|
||||
// 拣选任务暂存列表
|
||||
List<PickTask> pickTasks = new ArrayList<>();
|
||||
vehicleIds.forEach(vehicleId -> {
|
||||
// 暂存拣选任务
|
||||
PickTask tempPickTask = new PickTask();
|
||||
tempPickTask.setPickTaskId(generateId("PICK_"));
|
||||
tempPickTask.setVehicleId(vehicleId);
|
||||
tempPickTask.setStandId(workStation);
|
||||
tempPickTask.setPickStatus(pickStatus);
|
||||
tempPickTask.setLastUpdateTime(LocalDateTime.now());
|
||||
pickTasks.add(tempPickTask);
|
||||
});
|
||||
// 添加数据库
|
||||
pickTaskService.saveBatch(pickTasks);
|
||||
}
|
||||
|
||||
/**
|
||||
* 特殊用法---请求回库
|
||||
*
|
||||
* @param taskOutRequest 出库任务
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/requestBackTest")
|
||||
@ResponseBody
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
@MyLog(logTitle = "特殊用法---请求回库", logMethod = "requestBackTest")
|
||||
public String requestBackTest(@RequestBody TaskOutRequest taskOutRequest) {
|
||||
logger.info("接收到特殊用法---请求回库:{},ip地址:{}", convertJsonString(taskOutRequest), HttpUtils.getIpAddr(servletRequest));
|
||||
// 创建响应信息
|
||||
ResponseEntity response = new ResponseEntity();
|
||||
try {
|
||||
// 获取站台号
|
||||
String standId = "";
|
||||
if (StringUtils.isNotEmpty(taskOutRequest.getPickStand())) {
|
||||
// 站台号从请求参数中获取
|
||||
standId = taskOutRequest.getPickStand();
|
||||
} else {
|
||||
// 站台号从ip获取
|
||||
Stand standOfIp = standService.getOne(new LambdaQueryWrapper<Stand>()
|
||||
.eq(Stand::getStandIp, HttpUtils.getIpAddr(servletRequest))
|
||||
.eq(Stand::getStandType, 2));
|
||||
if (standOfIp != null && StringUtils.isNotEmpty(standOfIp.getStandId())) {
|
||||
standId = standOfIp.getStandId();
|
||||
}
|
||||
}
|
||||
if (StringUtils.isEmpty(standId)) {
|
||||
logger.error("请求参数缺少站台号。");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("请求参数缺少站台号。");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
// 查询当前站台的拣货任务
|
||||
PickTask pickTask = pickTaskService.getOne(new LambdaQueryWrapper<PickTask>()
|
||||
.eq(PickTask::getStandId, standId)
|
||||
.eq(PickTask::getPickStatus, PickTaskStatusEnum.FINISH.getCode()));
|
||||
if (pickTask != null) {
|
||||
// 存储拣选记录
|
||||
PickTaskRecord pickTaskRecord = BeanUtil.copyProperties(pickTask, PickTaskRecord.class);
|
||||
pickTaskRecord.setLastUpdateTime(LocalDateTime.now());
|
||||
pickTaskRecordService.save(pickTaskRecord);
|
||||
// 删除当前拣选任务
|
||||
pickTaskService.removeById(pickTask);
|
||||
if (StringUtils.isNotEmpty(taskOutRequest.getGoodsId())) {
|
||||
if (taskOutRequest.getGoodsNum() == null) {
|
||||
logger.error("输入物料号时,请输入数量");
|
||||
response.setCode(ResponseCode.OK.getCode());
|
||||
response.setMessage("输入物料号时,请输入数量");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
// 判断添加库存还是删除库存
|
||||
Stock existStock = stockService.getOne(new LambdaQueryWrapper<Stock>()
|
||||
.apply("goods_related -> '$.goodsId' = {0}", taskOutRequest.getGoodsId())
|
||||
.eq(Stock::getVehicleId, pickTask.getVehicleId()));
|
||||
if (existStock != null) {
|
||||
// 更新库存
|
||||
StockDetailInfo goodsRelated = existStock.getGoodsRelated();
|
||||
goodsRelated.setRemainNum(taskOutRequest.getGoodsNum());
|
||||
existStock.setGoodsRelated(goodsRelated);
|
||||
stockService.updateById(existStock);
|
||||
} else {
|
||||
if (StringUtils.isNotEmpty(taskOutRequest.getGoodsId())) {
|
||||
// 生成库存
|
||||
Stock newStock = new Stock();
|
||||
newStock.setStockId(generateId("ST_"));
|
||||
newStock.setVehicleId(pickTask.getVehicleId());
|
||||
newStock.setLocationId("");
|
||||
newStock.setNoUseDays(0);
|
||||
newStock.setIsInventory(0);
|
||||
newStock.setCreateTime(LocalDateTime.now());
|
||||
newStock.setWeight(BigDecimal.ONE);
|
||||
newStock.setLastUpdateUser(taskOutRequest.getUserName());
|
||||
StockDetailInfo detailInfo = new StockDetailInfo();
|
||||
detailInfo.setGoodsId(taskOutRequest.getGoodsId());
|
||||
detailInfo.setGoodsName(taskOutRequest.getGoodsId());
|
||||
detailInfo.setGoodsStatus(GoodsStatus.OK.getCode());
|
||||
detailInfo.setRemainNum(taskOutRequest.getGoodsNum());
|
||||
detailInfo.setTotalNum(taskOutRequest.getGoodsNum());
|
||||
newStock.setGoodsRelated(detailInfo);
|
||||
stockService.save(newStock);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 调用Wcs的放行接口
|
||||
wcsService.sendWcsDisposeVehicle(new WcsDisposeVehicleRequest(standId, null));
|
||||
// 更新站台信息
|
||||
standService.update(new LambdaUpdateWrapper<Stand>()
|
||||
.set(Stand::getLastUseTime, LocalDateTime.now())
|
||||
.set(Stand::getPickVehicle, "")
|
||||
.set(Stand::getPickGoods, "")
|
||||
.set(Stand::getPickTip, "")
|
||||
.eq(Stand::getStandId, standId));
|
||||
|
||||
logger.info("请求回库成功!");
|
||||
response.setCode(ResponseCode.OK.getCode());
|
||||
response.setMessage("请求回库成功");
|
||||
return convertJsonString(response);
|
||||
} catch (Exception e) {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
logger.error("发生异常:{}", convertJsonString(e));
|
||||
// 返回其他异常
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("发生异常");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 特殊用法---请求入库
|
||||
*
|
||||
* @param taskOutRequest 出库任务
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/requestInTest")
|
||||
@ResponseBody
|
||||
@Transactional(isolation = Isolation.REPEATABLE_READ, propagation = Propagation.REQUIRED)
|
||||
@MyLog(logTitle = "特殊用法---请求入库", logMethod = "requestInTest")
|
||||
public String requestInTest(@RequestBody TaskOutRequest taskOutRequest) {
|
||||
logger.info("接收到特殊用法---请求入库:{},ip地址:{}", convertJsonString(taskOutRequest), HttpUtils.getIpAddr(servletRequest));
|
||||
// 创建响应信息
|
||||
ResponseEntity response = new ResponseEntity();
|
||||
try {
|
||||
// 获取站台号
|
||||
String standId = "";
|
||||
if (StringUtils.isNotEmpty(taskOutRequest.getPickStand())) {
|
||||
// 站台号从请求参数中获取
|
||||
standId = taskOutRequest.getPickStand();
|
||||
} else {
|
||||
// 站台号从ip获取
|
||||
Stand standOfIp = standService.getOne(new LambdaQueryWrapper<Stand>()
|
||||
.eq(Stand::getStandIp, HttpUtils.getIpAddr(servletRequest))
|
||||
.eq(Stand::getStandType, 2));
|
||||
if (standOfIp != null && StringUtils.isNotEmpty(standOfIp.getStandId())) {
|
||||
standId = standOfIp.getStandId();
|
||||
}
|
||||
}
|
||||
if (StringUtils.isEmpty(standId)) {
|
||||
logger.error("请求参数缺少站台号。");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("请求参数缺少站台号。");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
if (StringUtils.isEmpty(taskOutRequest.getVehicleId())) {
|
||||
logger.error("缺少箱号。");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("缺少箱号。");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
// 查找当前箱子是否有其他等待入库的箱子
|
||||
Task sameVehicleTempTask = taskService.getOne(new LambdaQueryWrapper<Task>()
|
||||
.eq(Task::getVehicleId, taskOutRequest.getVehicleId())
|
||||
.eq(Task::getTaskStatus, WmsTaskStatus.TEMP.getCode())
|
||||
.eq(Task::getTaskType, TaskType.IN.getCode())
|
||||
.last("limit 1"));
|
||||
// 生成入库任务
|
||||
if (sameVehicleTempTask != null) {// 有相同的箱子任务
|
||||
if (StringUtils.isEmpty(taskOutRequest.getGoodsId())) {// 空托入库
|
||||
logger.error("请勿重复入空箱!");
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("请勿重复入空箱!");
|
||||
return convertJsonString(response);
|
||||
} else {// 带料入库
|
||||
String taskGroupId = sameVehicleTempTask.getTaskGroup();
|
||||
Task tempInTask = new Task();
|
||||
tempInTask.setTaskId(generateId("RK_"));
|
||||
tempInTask.setTaskType(TaskType.IN.getCode());
|
||||
tempInTask.setTaskStatus(WmsTaskStatus.TEMP.getCode());
|
||||
tempInTask.setTaskGroup(taskGroupId);
|
||||
tempInTask.setTaskPriority(1);
|
||||
tempInTask.setVehicleId(taskOutRequest.getVehicleId());
|
||||
tempInTask.setVehicleSize(1);
|
||||
tempInTask.setWeight(BigDecimal.ONE);
|
||||
tempInTask.setCreateTime(LocalDateTime.now());
|
||||
tempInTask.setUserName(taskOutRequest.getUserName());
|
||||
// 物料相关信息
|
||||
TaskDetailInfo goodsRelatedInfo = new TaskDetailInfo();
|
||||
goodsRelatedInfo.setGoodsId(taskOutRequest.getGoodsId());
|
||||
goodsRelatedInfo.setGoodsName(taskOutRequest.getGoodsId());
|
||||
goodsRelatedInfo.setOpNum(taskOutRequest.getGoodsNum());
|
||||
goodsRelatedInfo.setOriginNum(BigDecimal.ZERO);
|
||||
tempInTask.setGoodsRelated(goodsRelatedInfo);
|
||||
taskService.save(tempInTask);
|
||||
}
|
||||
} else {// 没有这个箱子的任务
|
||||
if (StringUtils.isEmpty(taskOutRequest.getGoodsId())) {// 空托入库
|
||||
Task tempInTask = new Task();
|
||||
tempInTask.setTaskId(generateId("RK_"));
|
||||
tempInTask.setTaskType(TaskType.IN.getCode());
|
||||
tempInTask.setTaskStatus(WmsTaskStatus.TEMP.getCode());
|
||||
tempInTask.setTaskGroup(generateId(""));
|
||||
tempInTask.setTaskPriority(1);
|
||||
tempInTask.setVehicleId(taskOutRequest.getVehicleId());
|
||||
tempInTask.setVehicleSize(1);
|
||||
tempInTask.setWeight(BigDecimal.ONE);
|
||||
tempInTask.setCreateTime(LocalDateTime.now());
|
||||
tempInTask.setUserName(taskOutRequest.getUserName());
|
||||
taskService.save(tempInTask);
|
||||
} else {// 带料入库
|
||||
Task tempInTask = new Task();
|
||||
tempInTask.setTaskId(generateId("RK_"));
|
||||
tempInTask.setTaskType(TaskType.IN.getCode());
|
||||
tempInTask.setTaskStatus(WmsTaskStatus.TEMP.getCode());
|
||||
tempInTask.setTaskGroup(generateId(""));
|
||||
tempInTask.setTaskPriority(1);
|
||||
tempInTask.setVehicleId(taskOutRequest.getVehicleId());
|
||||
tempInTask.setVehicleSize(1);
|
||||
tempInTask.setWeight(BigDecimal.ONE);
|
||||
tempInTask.setCreateTime(LocalDateTime.now());
|
||||
tempInTask.setUserName(taskOutRequest.getUserName());
|
||||
// 物料相关信息
|
||||
TaskDetailInfo goodsRelatedInfo = new TaskDetailInfo();
|
||||
goodsRelatedInfo.setGoodsId(taskOutRequest.getGoodsId());
|
||||
goodsRelatedInfo.setGoodsName(taskOutRequest.getGoodsId());
|
||||
goodsRelatedInfo.setOpNum(taskOutRequest.getGoodsNum());
|
||||
goodsRelatedInfo.setOriginNum(BigDecimal.ZERO);
|
||||
tempInTask.setGoodsRelated(goodsRelatedInfo);
|
||||
taskService.save(tempInTask);
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("请求入库成功!");
|
||||
response.setCode(ResponseCode.OK.getCode());
|
||||
response.setMessage("请求入库成功");
|
||||
return convertJsonString(response);
|
||||
} catch (Exception e) {
|
||||
// 回滚事务
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
logger.error("发生异常:{}", convertJsonString(e));
|
||||
// 返回其他异常
|
||||
response.setCode(ResponseCode.ERROR.getCode());
|
||||
response.setMessage("发生异常");
|
||||
response.setMessage("处理整理盒子请求异常。");
|
||||
return convertJsonString(response);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@ package com.wms.entity.app.request;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class CallEmptyVehicleRequest {
|
||||
public class CallEmptyVehicleRequest extends PageQuery {
|
||||
/**
|
||||
* 料箱类型
|
||||
*/
|
||||
|
|
@ -25,9 +27,4 @@ public class CallEmptyVehicleRequest {
|
|||
*/
|
||||
@JsonProperty("needNum")
|
||||
private Integer needNum;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private String userName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,14 +2,16 @@ package com.wms.entity.app.request;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 物料入库详细信息
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class GoodsInRequest {
|
||||
public class GoodsInRequest extends PageQuery {
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@ public class PageQuery {
|
|||
*/
|
||||
@JsonProperty("isAsc")
|
||||
private Boolean isAsc = true;
|
||||
/**
|
||||
* 请求用户名
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 将前端查询转换为数据库查询可用的分页查询
|
||||
|
|
|
|||
|
|
@ -2,20 +2,17 @@ package com.wms.entity.app.request;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 打印标签数据请求
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PrintRequest {
|
||||
public class PrintRequest extends PageQuery {
|
||||
/**
|
||||
* 站台号
|
||||
*/
|
||||
@JsonProperty("standId")
|
||||
private String standId;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private String userName;
|
||||
}
|
||||
|
|
|
|||
25
src/main/java/com/wms/entity/app/request/SortBoxRequest.java
Normal file
25
src/main/java/com/wms/entity/app/request/SortBoxRequest.java
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package com.wms.entity.app.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class SortBoxRequest extends PageQuery {
|
||||
/**
|
||||
* 站台号
|
||||
*/
|
||||
@JsonProperty("standId")
|
||||
private String standId;
|
||||
/**
|
||||
* 大盒子
|
||||
*/
|
||||
@JsonProperty("bigBoxNo")
|
||||
private String bigBoxNo;
|
||||
/**
|
||||
* 工单顺序
|
||||
*/
|
||||
@JsonProperty("orderOfOrders")
|
||||
private Integer orderOfOrders;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.wms.entity.app.request;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
|
@ -9,8 +10,9 @@ import java.util.List;
|
|||
/**
|
||||
* 入库请求
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TaskInRequest {
|
||||
public class TaskInRequest extends PageQuery {
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
|
|
@ -26,11 +28,6 @@ public class TaskInRequest {
|
|||
*/
|
||||
@JsonProperty("totalWeight")
|
||||
private BigDecimal totalWeight;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private String userName;
|
||||
/**
|
||||
* 入库物料清单
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,14 +2,16 @@ package com.wms.entity.app.request;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 出库请求
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TaskOutRequest {
|
||||
public class TaskOutRequest extends PageQuery {
|
||||
/**
|
||||
* 物料编号
|
||||
*/
|
||||
|
|
@ -35,11 +37,6 @@ public class TaskOutRequest {
|
|||
*/
|
||||
@JsonProperty("destinationPoint")
|
||||
private String destinationPoint;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private String userName;
|
||||
/**
|
||||
* 是否拣选
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,14 +2,16 @@ package com.wms.entity.app.request;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 拣货完成确认请求信息
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WorkConfirmRequest {
|
||||
public class WorkConfirmRequest extends PageQuery {
|
||||
/**
|
||||
* 工作站台
|
||||
*/
|
||||
|
|
@ -35,9 +37,4 @@ public class WorkConfirmRequest {
|
|||
*/
|
||||
@JsonProperty("remainNumReal")
|
||||
private BigDecimal remainNumReal;
|
||||
/**
|
||||
* 实际剩余数量
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private BigDecimal userName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@ package com.wms.entity.app.request;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WorkQuery {
|
||||
public class WorkQuery extends PageQuery {
|
||||
/**
|
||||
* 站台号
|
||||
*/
|
||||
|
|
@ -15,9 +17,4 @@ public class WorkQuery {
|
|||
*/
|
||||
@JsonProperty("goodsId")
|
||||
private String goodsId;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private String userName;
|
||||
}
|
||||
|
|
|
|||
16
src/main/java/com/wms/entity/app/wcs/BaseWcsRequest.java
Normal file
16
src/main/java/com/wms/entity/app/wcs/BaseWcsRequest.java
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
package com.wms.entity.app.wcs;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Wcs请求基本类
|
||||
*/
|
||||
@Data
|
||||
public class BaseWcsRequest {
|
||||
/**
|
||||
* 操作用户名
|
||||
*/
|
||||
@JsonProperty("userName")
|
||||
private String userName = "WCS";
|
||||
}
|
||||
|
|
@ -2,12 +2,14 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 电子标签任务类
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ETaskData {
|
||||
public class ETaskData extends BaseWcsRequest {
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
package com.wms.entity.app.wcs;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 请求当前箱子是否要回库
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class RequestBackQuery {
|
||||
public class RequestBackQuery extends BaseWcsRequest {
|
||||
/**
|
||||
* 载具号
|
||||
*/
|
||||
@JsonProperty("vehicleId")
|
||||
private String vehicleId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* Wcs上报箱子到达请求类
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WcsBoxArriveRequest {
|
||||
public class WcsBoxArriveRequest extends BaseWcsRequest {
|
||||
/**
|
||||
* 任务组编号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 向Wcs请求修改任务状态
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WcsChangeTaskRequest {
|
||||
public class WcsChangeTaskRequest extends BaseWcsRequest {
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
package com.wms.entity.app.wcs;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Wcs通用返回信息
|
||||
* @param <T> 泛型
|
||||
*/
|
||||
@Data
|
||||
public class WcsCommonResponse<T> {
|
||||
/**
|
||||
* 返回码
|
||||
*/
|
||||
@JsonProperty("code")
|
||||
private Integer code;
|
||||
/**
|
||||
* 说明信息
|
||||
*/
|
||||
@JsonProperty("message")
|
||||
private String message;
|
||||
/**
|
||||
* 返回数据
|
||||
*/
|
||||
@JsonProperty("returnData")
|
||||
private T returnData;
|
||||
}
|
||||
|
|
@ -2,12 +2,14 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* Wms请求输送线释放箱子
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WcsDisposeVehicleRequest {
|
||||
public class WcsDisposeVehicleRequest extends BaseWcsRequest {
|
||||
/**
|
||||
* 点位
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,12 +3,14 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 电子标签任务反馈请求
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WcsETaskFeedbackRequest {
|
||||
public class WcsETaskFeedbackRequest extends BaseWcsRequest {
|
||||
/**
|
||||
* 任务组编号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,14 +2,16 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 电子标签任务请求
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WcsETaskRequest {
|
||||
public class WcsETaskRequest extends BaseWcsRequest {
|
||||
/**
|
||||
* 任务组编号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,14 +2,16 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 站台拣选任务请求信息
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WcsStandTaskRequest {
|
||||
public class WcsStandTaskRequest extends BaseWcsRequest {
|
||||
/**
|
||||
* 任务组编号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,14 +2,16 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 向Wcs发送任务的请求
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WcsTaskRequest {
|
||||
public class WcsTaskRequest extends BaseWcsRequest {
|
||||
/**
|
||||
* 任务号
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* Wcs任务结果反馈请求信息
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WcsTaskResultRequest {
|
||||
public class WcsTaskResultRequest extends BaseWcsRequest {
|
||||
/**
|
||||
* 任务id----对应wms的taskGroup
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,12 +2,14 @@ package com.wms.entity.app.wcs;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* Wcs请求载具入库
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class WcsVehicleInRequest {
|
||||
public class WcsVehicleInRequest extends BaseWcsRequest {
|
||||
/**
|
||||
* 点位
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ public class ELocationConfigLast {
|
|||
private String orderBoxNo;
|
||||
/**
|
||||
* 是否取走
|
||||
* 0:未亮灯
|
||||
* 1:已亮灯、未拍灯
|
||||
* 2:已完成
|
||||
*/
|
||||
@TableField("box_status")
|
||||
private Integer boxStatus = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user