fix:普通移库、普通出库增加状态逻辑

This commit is contained in:
zhengxuming
2025-08-11 11:19:10 +08:00
parent 73a163c87a
commit 5bc95cc91e
3 changed files with 22 additions and 0 deletions

View File

@@ -410,6 +410,7 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
//如果是整出
if (!changeDto.getInBound()) {
wrapper.set("storagevehicle_code", null);
wrapper.set("occupancy_state", "1");
}
this.update(wrapper);
List<GroupPlate> groupPlates = iMdPbGroupplateService.list(new QueryWrapper<GroupPlate>()

View File

@@ -4,12 +4,15 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.nl.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils;
import org.nl.common.utils.IdUtil;;
import org.nl.wms.basedata_manage.enums.BaseDataEnum;
import org.nl.wms.sch_manage.enums.TaskStatus;
import org.nl.wms.sch_manage.service.ISchBasePointService;
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
import org.nl.wms.sch_manage.service.util.AbstractTask;
import org.nl.wms.sch_manage.service.util.AcsTaskDto;
@@ -41,6 +44,12 @@ public class StOutTask extends AbstractTask {
@Resource
private IOStorInvDisMapper ioStorInvDisMapper;
/**
* 点位服务
*/
@Autowired
private ISchBasePointService iSchBasePointService;
@Override
public String create(JSONObject json) {
SchBaseTask task = new SchBaseTask();
@@ -136,6 +145,16 @@ public class StOutTask extends AbstractTask {
taskObj.setRemark("已完成");
taskService.updateById(taskObj);
outBillService.taskFinish(taskObj);
// 更新终点
iSchBasePointService.update(
new UpdateWrapper<SchBasePoint>().lambda()
.eq(SchBasePoint::getPoint_code, taskObj.getPoint_code2())
.set(SchBasePoint::getIng_task_code, null)
.set(SchBasePoint::getPoint_status,"3")
.set(SchBasePoint::getVehicle_code, taskObj.getVehicle_code())
.set(SchBasePoint::getIos_id, null)
);
}
@Transactional(rollbackFor = Exception.class)

View File

@@ -229,6 +229,7 @@ public class StIvtMoveinvServiceImpl extends ServiceImpl<StIvtMoveinvMapper, StI
iStructattrService.update(
new UpdateWrapper<Structattr>().lambda()
.eq(Structattr::getStruct_code, dtlDao.getTurnout_struct_code())
.set(Structattr::getOccupancy_state,"1")
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
.set(Structattr::getStoragevehicle_code, null)
);
@@ -237,6 +238,7 @@ public class StIvtMoveinvServiceImpl extends ServiceImpl<StIvtMoveinvMapper, StI
new UpdateWrapper<Structattr>().lambda()
.eq(Structattr::getStruct_code, dtlDao.getTurnin_struct_code())
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
.set(Structattr::getOccupancy_state,"3")
.set(Structattr::getStoragevehicle_code, dtlDao.getStoragevehicle_code())
);