Commit 3a9634e2baae27bf2457617c740cfcc38bde39b6

Authored by 谭毅彬
1 parent 0350c497

库位分配逻辑优化:多高度立库库位分配时,低库位用尽后可存放到高一级库位上

Signed-off-by: TanYibin <5491541@qq.com>
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/SysDictController.java
... ... @@ -102,7 +102,6 @@ public class SysDictController {
102 102 * @param req
103 103 * @return
104 104 */
105   - @SuppressWarnings("unchecked")
106 105 @RequestMapping(value = "/treeList", method = RequestMethod.GET)
107 106 public Result<List<SysDictTree>> treeList(SysDict sysDict, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
108 107 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
... ... @@ -295,7 +294,6 @@ public class SysDictController {
295 294 * 【接口签名验证】
296 295 * 根据表名——显示字段-存储字段 pid 加载树形数据
297 296 */
298   - @SuppressWarnings("unchecked")
299 297 @RequestMapping(value = "/loadTreeData", method = RequestMethod.GET)
300 298 public Result<List<TreeSelectModel>> loadTreeData(@RequestParam(name = "pid") String pid, @RequestParam(name = "pidField") String pidField,
301 299 @RequestParam(name = "tableName") String tbname, @RequestParam(name = "text") String text, @RequestParam(name = "code") String code,
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/LocationAllocationServiceImpl.java
... ... @@ -120,10 +120,10 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
120 120 for (Integer roadWay : roadWays) {
121 121 LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery();
122 122 locationLambdaQueryWrapper.eq(Location::getZoneCode, zoneCode).eq(Location::getWarehouseCode, warehouseCode).eq(Location::getRoadWay, roadWay)
123   - .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY).eq(Location::getHigh, high)
  123 + .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY).ge(Location::getHigh, high)
124 124 .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode)
125 125 .in(Location::getLocationTypeCode, locationTypeCodeList).eq(Location::getContainerCode, QuantityConstant.EMPTY_STRING)
126   - .orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
  126 + .orderByAsc(true, Location::getHigh).orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
127 127 Page<Location> page = new Page<Location>(1, searchNumber);
128 128 IPage page1 = locationService.page(page, locationLambdaQueryWrapper);
129 129 List<Location> totalLocationList = page1.getRecords();
... ... @@ -143,7 +143,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
143 143 .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY).ge(Location::getHigh, high)
144 144 .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode).eq(Location::getRowFlag, QuantityConstant.ROW_OUT)
145 145 .in(Location::getLocationTypeCode, locationTypeCodeList).eq(Location::getContainerCode, QuantityConstant.EMPTY_STRING)
146   - .orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
  146 + .orderByAsc(true, Location::getHigh).orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
147 147 Page<Location> page = new Page<Location>(1, searchNumber);
148 148 IPage iPage = locationService.page(page, locationLambda);
149 149 List<Location> locationList = iPage.getRecords();
... ... @@ -163,7 +163,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
163 163 .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY).ge(Location::getHigh, high)
164 164 .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode).eq(Location::getRowFlag, QuantityConstant.ROW_IN)
165 165 .in(Location::getLocationTypeCode, locationTypeCodeList).eq(Location::getContainerCode, QuantityConstant.EMPTY_STRING)
166   - .orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
  166 + .orderByAsc(true, Location::getHigh).orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
167 167 page = new Page<Location>(1, searchNumber);
168 168 iPage = locationService.page(page, locationLambda);
169 169 locationList = iPage.getRecords();
... ... @@ -203,7 +203,7 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
203 203 .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY).ge(Location::getHigh, high)
204 204 .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode)
205 205 .in(Location::getLocationTypeCode, locationTypeCodeList).eq(Location::getContainerCode, QuantityConstant.EMPTY_STRING)
206   - .orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
  206 + .orderByAsc(true, Location::getHigh).orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
207 207 Page<Location> page = new Page<Location>(1, 10);
208 208 IPage page1 = locationService.page(page, locationLambdaQueryWrapper);
209 209 List<Location> totalLocationList = page1.getRecords();
... ... @@ -220,8 +220,9 @@ public class LocationAllocationServiceImpl implements LocationAllocationService
220 220 LambdaQueryWrapper<Location> locationLambdaQueryWrapper = Wrappers.lambdaQuery();
221 221 locationLambdaQueryWrapper.eq(Location::getZoneCode, zoneCode).eq(Location::getWarehouseCode, warehouseCode).eq(Location::getRoadWay, roadWay)
222 222 .eq(Location::getStatus, QuantityConstant.STATUS_LOCATION_EMPTY).ge(Location::getHigh, high)
223   - .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode).in(Location::getLocationTypeCode, locationTypeCodeList)
224   - .eq(Location::getContainerCode, QuantityConstant.EMPTY_STRING).orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
  223 + .eq(StringUtils.isNotEmpty(materialAreaCode), Location::getMaterialAreaCode, materialAreaCode)
  224 + .in(Location::getLocationTypeCode, locationTypeCodeList).eq(Location::getContainerCode, QuantityConstant.EMPTY_STRING)
  225 + .orderByAsc(true, Location::getHigh).orderByAsc(true, Location::getLayer).orderByAsc(true, Location::getId);
225 226 // 单伸位逻辑简单,只需要找到一个空闲库位
226 227 Page page = new Page<Location>(1, 1);
227 228 IPage iPage = locationService.page(page, locationLambdaQueryWrapper);
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/ConvertUtils.java
... ... @@ -492,7 +492,6 @@ public class ConvertUtils {
492 492 return defaultValue;
493 493 }
494 494 if (clazz.isAssignableFrom(value.getClass())) {
495   - @SuppressWarnings("unchecked")
496 495 E myE = (E)value;
497 496 return myE;
498 497 }
... ...
huaheng-wms-core/src/main/java/org/jeecg/utils/support/Convert.java
... ... @@ -492,7 +492,6 @@ public class Convert {
492 492 return defaultValue;
493 493 }
494 494 if (clazz.isAssignableFrom(value.getClass())) {
495   - @SuppressWarnings("unchecked")
496 495 E myE = (E)value;
497 496 return myE;
498 497 }
... ...