编辑线库修改库位信息

This commit is contained in:
cbs 2025-03-28 17:12:32 +08:00
parent 0a18d3b547
commit f7eaf384ca
5 changed files with 58 additions and 0 deletions

View File

@ -122,4 +122,18 @@ public interface WareHouseLocationMapper extends BaseMapperX<WareHouseLocationDO
void releaseLocationLockList(@Param("locationIds") List<Long> locationIds,
@Param("taskId") Long taskId,
@Param("locationLock") Integer locationLock);
/**
* 更新线库名称
* @param laneId
* @param laneName
*/
void updateLocationLaneNameByLaneId(@Param("laneId") Long laneId,
@Param("laneName") String laneName);
/**
* 设置库位的线库id和名称为空
* @param laneId
*/
void updateLocationLaneNameEmptyByLaneId(@Param("laneId") Long laneId);
}

View File

@ -151,6 +151,7 @@ public class WareHouseLaneServiceImpl extends ServiceImpl<WareHouseLaneMapper, W
if (CollUtil.isNotEmpty(wareHouseLocationList)) {
houseLocationService.updateBatchById(wareHouseLocationList);
}
houseLocationService.updateLocationLaneNameByLaneId(createReqVO.getId(),createReqVO.getLaneName());
return new HouseLaneVO().setId(houseLane.getId()).setLaneName(houseLane.getLaneName());
}
@ -161,5 +162,6 @@ public class WareHouseLaneServiceImpl extends ServiceImpl<WareHouseLaneMapper, W
this.removeById(id);
// 点位中包含线库id的数据设为null
positionMapItemService.emptyLaneId(wareHouseLaneDO.getPositionMapId(), id);
houseLocationService.updateLocationLaneNameEmptyByLaneId(id);
}
}

View File

@ -9,6 +9,7 @@ import cn.iocoder.yudao.module.system.dal.dataobject.houselocation.WareHouseLoca
import com.baomidou.mybatisplus.extension.service.IService;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
@ -93,4 +94,17 @@ public interface HouseLocationService extends IService<WareHouseLocationDO> {
* @return
*/
List<WareHouseLocationDO> getLocationByLocationNumbers(List<Long> locationNumbers);
/**
* 更新线库名称
* @param laneId
* @param laneName
*/
void updateLocationLaneNameByLaneId(Long laneId, String laneName);
/**
* 设置线库名称和id为空
* @param id
*/
void updateLocationLaneNameEmptyByLaneId(Long laneId);
}

View File

@ -143,6 +143,16 @@ public class HouseLocationServiceImpl extends ServiceImpl<WareHouseLocationMappe
.in(WareHouseLocationDO::getLocationNumber, locationNumbers));
}
@Override
public void updateLocationLaneNameByLaneId(Long laneId, String laneName) {
houseLocationMapper.updateLocationLaneNameByLaneId(laneId,laneName);
}
@Override
public void updateLocationLaneNameEmptyByLaneId(Long laneId) {
houseLocationMapper.updateLocationLaneNameEmptyByLaneId(laneId);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void batchSaveOrEditOrDel(Long positionMapId, List<List<WareHouseLocationDO>> list) {

View File

@ -506,6 +506,24 @@
#{id}
</foreach>
</update>
<update id="updateLocationLaneNameByLaneId">
update
ware_house_location
set
lane_name = #{laneName}
where
lane_id = #{laneId}
</update>
<update id="updateLocationLaneNameEmptyByLaneId">
update
ware_house_location
set
lane_name = null,
lane_id = null
where
lane_id = #{laneId}
</update>
<select id="selectByTypeAndId" resultMap="BaseResultMap">