修复移库任务生成

This commit is contained in:
15066119699 2025-03-07 12:38:27 +08:00
parent 5930bd171a
commit 0fe35e7929
2 changed files with 5 additions and 4 deletions

View File

@ -717,7 +717,7 @@ public class AppTaskController extends BaseController
AppLocation appLocation = appLocationService.selectAppLocationByLocationId(locId);
if (appLocation.getwDepth() == 2) {
//判断01是否有货
String locationId = locId.substring(0, locId.length() - 1) + "01";
String locationId = locId.substring(0, locId.length() - 1) + "1";
List<AppTask> appTasks = getAppTaskByVehicleId(null, locationId);
if (!CollectionUtils.isEmpty(appTasks)) {
logger.error(locationId + "有任务执行,请稍后再试");
@ -765,7 +765,7 @@ public class AppTaskController extends BaseController
//如果在浅货位需要判断深货位是否有货
String tempLocationId = tBaseStorageAreaLocation.getLocationId();
if (tBaseStorageAreaLocation.getwDepth() == 1) {
String locationY = tempLocationId.substring(0, tempLocationId.length() - 1) + "02";
String locationY = tempLocationId.substring(0, tempLocationId.length() - 1) + "2";
AppStock tMiStock5 = new AppStock();
tMiStock5.setLocationId(locationY);
List<AppStock> tMiStocks5 = appStockService.selectAppStockList(tMiStock5);
@ -783,7 +783,7 @@ public class AppTaskController extends BaseController
break;
} else {
//判断该库位如果是在深库位需要判断浅库位是否有货
String locationY = tempLocationId.substring(0, tempLocationId.length() - 1) + "01";
String locationY = tempLocationId.substring(0, tempLocationId.length() - 1) + "1";
//
AppStock tMiStock5 = new AppStock();
tMiStock5.setLocationId(locationY);
@ -819,6 +819,7 @@ public class AppTaskController extends BaseController
appTask.setTaskStatus(AppConstants.LOCATION_STATUS_ENABLE);
appTask.setUpdateTime(new Date());
appTask.setCreateTime(new Date());
appTask.setTaskPriority(1);
LoginUser loginUser = SecurityUtils.getLoginUser();
appTask.setCreateBy(loginUser == null ? "移库任务" : loginUser.getUsername());

View File

@ -215,7 +215,7 @@
</delete>
<select id="selectPlcList" resultMap="AppTaskResult">
<include refid="selectAppTaskVo"/>
where task_status = 0 AND plc_id is null
where task_status = 0 AND plc_id is null order by create_time asc
</select>
<update id="updatePlcId" parameterType="AppTask">
update app_task