Compare commits
3 Commits
ed6e9a7729
...
8b5c20c989
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b5c20c989 | |||
| 8a1ddb8e94 | |||
| 05652eb896 |
|
|
@ -2,6 +2,7 @@ package com.ruoyi.quartz.task;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.ruoyi.app.domain.*;
|
import com.ruoyi.app.domain.*;
|
||||||
|
import com.ruoyi.app.mapper.AppLocationMapper;
|
||||||
import com.ruoyi.quartz.domain.app.*;
|
import com.ruoyi.quartz.domain.app.*;
|
||||||
import com.ruoyi.app.service.*;
|
import com.ruoyi.app.service.*;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
|
@ -46,6 +47,8 @@ public class TaskExecutor {
|
||||||
put(2, 2);// 出库
|
put(2, 2);// 出库
|
||||||
put(3, 3);// 移库
|
put(3, 3);// 移库
|
||||||
}};
|
}};
|
||||||
|
@Autowired
|
||||||
|
private AppLocationMapper appLocationMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 解析wms任务
|
* 解析wms任务
|
||||||
|
|
@ -209,8 +212,8 @@ public class TaskExecutor {
|
||||||
appStock.setOriginNum(pendingStorage.getGoodsNum());
|
appStock.setOriginNum(pendingStorage.getGoodsNum());
|
||||||
appStock.setBatchNo("-");
|
appStock.setBatchNo("-");
|
||||||
appStock.setInvAge(0L);
|
appStock.setInvAge(0L);
|
||||||
appStock.setGoodsStatus(0L);
|
appStock.setGoodsStatus(0);
|
||||||
appStock.setStockStatus(0L);
|
appStock.setStockStatus(0);
|
||||||
appStock.setCreateTime(new Date());
|
appStock.setCreateTime(new Date());
|
||||||
appStock.setUpdateTime(new Date());
|
appStock.setUpdateTime(new Date());
|
||||||
appStock.setCreateUser(pendingStorage.getCreatePerson());
|
appStock.setCreateUser(pendingStorage.getCreatePerson());
|
||||||
|
|
@ -310,6 +313,19 @@ public class TaskExecutor {
|
||||||
PmsCommonRes pmsCommonRes = JSON.parseObject(HttpUtils.sendPost(url, JSON.toJSONString(recordList)), PmsCommonRes.class);
|
PmsCommonRes pmsCommonRes = JSON.parseObject(HttpUtils.sendPost(url, JSON.toJSONString(recordList)), PmsCommonRes.class);
|
||||||
logger.info("pms出库反馈请求信息:{},结果:{}", JSON.toJSONString(recordList), JSON.toJSONString(pmsCommonRes));
|
logger.info("pms出库反馈请求信息:{},结果:{}", JSON.toJSONString(recordList), JSON.toJSONString(pmsCommonRes));
|
||||||
}
|
}
|
||||||
|
AppStock appStockCheck = new AppStock();
|
||||||
|
appStockCheck.setLocationId(task.getOrigin());
|
||||||
|
List<AppStock> appStockCheckData = appStockService.selectAppStockList(appStockCheck);
|
||||||
|
if(appStockCheckData == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(appStockCheckData.isEmpty()) {
|
||||||
|
// 这个位置没有库存了,直接释放货位
|
||||||
|
AppLocation location = new AppLocation();
|
||||||
|
location.setLocationId(task.getOrigin());
|
||||||
|
location.setLocationStatus(0);
|
||||||
|
appLocationMapper.updateAppLocation(location);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 如果小于的话就不做处理
|
// 如果小于的话就不做处理
|
||||||
return;
|
return;
|
||||||
|
|
@ -317,6 +333,12 @@ public class TaskExecutor {
|
||||||
if (task.getTaskType().compareTo(9) == 0) { // 移库任务
|
if (task.getTaskType().compareTo(9) == 0) { // 移库任务
|
||||||
int updateNewLocation = appStockService.updateNewLocation(task.getOrigin(), task.getDestination());
|
int updateNewLocation = appStockService.updateNewLocation(task.getOrigin(), task.getDestination());
|
||||||
if(updateNewLocation > 0) {
|
if(updateNewLocation > 0) {
|
||||||
|
// 释放原库位
|
||||||
|
AppLocation location = new AppLocation();
|
||||||
|
location.setLocationId(task.getOrigin());
|
||||||
|
location.setLocationStatus(0);
|
||||||
|
appLocationMapper.updateAppLocation(location);
|
||||||
|
|
||||||
AppTask updateRemark = new AppTask();
|
AppTask updateRemark = new AppTask();
|
||||||
updateRemark.setTaskId(task.getTaskId());
|
updateRemark.setTaskId(task.getTaskId());
|
||||||
updateRemark.setRemark("移库完成");
|
updateRemark.setRemark("移库完成");
|
||||||
|
|
|
||||||
|
|
@ -60,4 +60,6 @@ public interface AppPmsOrderOutMapper
|
||||||
*/
|
*/
|
||||||
public int deleteAppPmsOrderOutByListIds(String[] recordIds);
|
public int deleteAppPmsOrderOutByListIds(String[] recordIds);
|
||||||
public int deleteAppPmsOrderOutByOrderId(AppPmsOrderOut appPmsOrderOut);
|
public int deleteAppPmsOrderOutByOrderId(AppPmsOrderOut appPmsOrderOut);
|
||||||
|
|
||||||
|
int updatePickNum(AppPmsOrderOut appPmsOrderOut);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user