diff --git a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmStorageLocationServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmStorageLocationServiceImpl.java index 5fdad83..5b3ebb5 100644 --- a/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmStorageLocationServiceImpl.java +++ b/ktg-mes/src/main/java/com/ktg/mes/wm/service/impl/WmStorageLocationServiceImpl.java @@ -165,7 +165,7 @@ public class WmStorageLocationServiceImpl implements IWmStorageLocationService { // 获取库位列表 WmStorageArea wmStorageAreaQuery = new WmStorageArea(); wmStorageAreaQuery.setLocationId(wmStorageLocationByCode.getLocationId()); - if (isBig) wmStorageAreaQuery.setAttr3(1L); + wmStorageAreaQuery.setAttr3(isBig ? 1L : 0L); List wmStorageAreaList = this.wmStorageAreaMapper.selectWmStorageAreaList(wmStorageAreaQuery).stream() // 过滤掉全部存在物品的库位 .filter(it -> !selectNotEmptyAreaCodeList.contains(it.getAreaCode())) diff --git a/ktg-mes/src/main/resources/mapper/wm/WmStorageAreaMapper.xml b/ktg-mes/src/main/resources/mapper/wm/WmStorageAreaMapper.xml index 2dd98a8..e38919f 100644 --- a/ktg-mes/src/main/resources/mapper/wm/WmStorageAreaMapper.xml +++ b/ktg-mes/src/main/resources/mapper/wm/WmStorageAreaMapper.xml @@ -1,190 +1,373 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - select area_id, area_code, area_name, location_id, area, max_loa, position_x, position_y, position_z, enable_flag, frozen_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from wm_storage_area + select area_id, + area_code, + area_name, + location_id, + area, + max_loa, + position_x, + position_y, + position_z, + enable_flag, + frozen_flag, + remark, + attr1, + attr2, + attr3, + attr4, + create_by, + create_time, + update_by, + update_time + from wm_storage_area - + - + insert into wm_storage_area - area_code, - area_name, - location_id, - area, - max_loa, - position_x, - position_y, - position_z, - enable_flag, - frozen_flag, - remark, - attr1, - attr2, - attr3, - attr4, - create_by, - create_time, - update_by, - update_time, - + + area_code, + + + area_name, + + + location_id, + + + area, + + + max_loa, + + + position_x, + + + position_y, + + + position_z, + + + enable_flag, + + + frozen_flag, + + + remark, + + + attr1, + + + attr2, + + + attr3, + + + attr4, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + - #{areaCode}, - #{areaName}, - #{locationId}, - #{area}, - #{maxLoa}, - #{positionX}, - #{positionY}, - #{positionZ}, - #{enableFlag}, - #{frozenFlag}, - #{remark}, - #{attr1}, - #{attr2}, - #{attr3}, - #{attr4}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - + + #{areaCode}, + + + #{areaName}, + + + #{locationId}, + + + #{area}, + + + #{maxLoa}, + + + #{positionX}, + + + #{positionY}, + + + #{positionZ}, + + + #{enableFlag}, + + + #{frozenFlag}, + + + #{remark}, + + + #{attr1}, + + + #{attr2}, + + + #{attr3}, + + + #{attr4}, + + + #{createBy}, + + + #{createTime}, + + + #{updateBy}, + + + #{updateTime}, + + update wm_storage_area - area_code = #{areaCode}, - area_name = #{areaName}, - location_id = #{locationId}, - area = #{area}, - max_loa = #{maxLoa}, - position_x = #{positionX}, - position_y = #{positionY}, - position_z = #{positionZ}, - enable_flag = #{enableFlag}, - frozen_flag = #{frozenFlag}, - remark = #{remark}, - attr1 = #{attr1}, - attr2 = #{attr2}, - attr3 = #{attr3}, - attr4 = #{attr4}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, + + area_code = #{areaCode}, + + + area_name = #{areaName}, + + + location_id = #{locationId}, + + + area = #{area}, + + + max_loa = #{maxLoa}, + + + position_x = #{positionX}, + + + position_y = #{positionY}, + + + position_z = #{positionZ}, + + + enable_flag = #{enableFlag}, + + + frozen_flag = #{frozenFlag}, + + + remark = #{remark}, + + + attr1 = #{attr1}, + + + attr2 = #{attr2}, + + + attr3 = #{attr3}, + + + attr4 = #{attr4}, + + + create_by = #{createBy}, + + + create_time = #{createTime}, + + + update_by = #{updateBy}, + + + update_time = #{updateTime}, + where area_id = #{areaId} - update wm_storage_area set IS_DELETE =1 + update wm_storage_area + set IS_DELETE =1 where area_id = #{areaId} - update wm_storage_area set IS_DELETE = 1 + update wm_storage_area + set IS_DELETE = 1 where area_id in #{areaId} @@ -192,13 +375,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - update wm_storage_area set IS_DELETE =1 - where location_id in ( select location_id from wm_storage_location where warehouse_id = #{warehouseId}) + update wm_storage_area + set IS_DELETE =1 + where location_id in (select location_id from wm_storage_location where warehouse_id = #{warehouseId}) - update wm_storage_area set IS_DELETE = 1 + update wm_storage_area + set IS_DELETE = 1 where location_id = #{locationId} - \ No newline at end of file