Browse Source

任务优先级修改,上空托任务优先级高于下料任务优先级

LZH 1 year ago
parent
commit
0eb2b5b34e

+ 7 - 3
warewms-ams/src/main/java/com/ruoyi/ams/business/BusinessServiceImpl.java

@@ -161,7 +161,7 @@ public class BusinessServiceImpl implements IBusinessService {
                     List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId(), null);
                     List<BaseLocationInfo> locationToList = this.convertLocation(paramLocationTo, agvCallDTO.getWarehouseId(), null);
                     HashMap<String, String> hashMap = JSON.parseObject(JSON.toJSONString(agvCall.getLotattDTO()), HashMap.class);
                     HashMap<String, String> hashMap = JSON.parseObject(JSON.toJSONString(agvCall.getLotattDTO()), HashMap.class);
                     List<BaseLocationInfo> locationFromList = new ArrayList<>();
                     List<BaseLocationInfo> locationFromList = new ArrayList<>();
-                    if (flowConfigHeaderVO.getLocationTo().equals("4")){
+                    if (flowConfigHeaderVO.getLocationTo().equals("3")){
                          locationFromList = baseLocationInfoMapper.selectSortedLocationLotattListByZoneIdListOrderBy1(zoneIdList
                          locationFromList = baseLocationInfoMapper.selectSortedLocationLotattListByZoneIdListOrderBy1(zoneIdList
                                 , agvCallDTO.getWarehouseId(), hashMap, agvCall.getSku(), "");
                                 , agvCallDTO.getWarehouseId(), hashMap, agvCall.getSku(), "");
                     }else {
                     }else {
@@ -550,7 +550,11 @@ public class BusinessServiceImpl implements IBusinessService {
                 wcsTask.setLocationTo(locationTo.getId().toString());
                 wcsTask.setLocationTo(locationTo.getId().toString());
             }
             }
             wcsTask.setState(9L);
             wcsTask.setState(9L);
-            wcsTask.setPriority(1L);
+            if (flowConfigHeaderVO.getId()==1 || flowConfigHeaderVO.getId()==2 || flowConfigHeaderVO.getId()==3 || flowConfigHeaderVO.getId()==4){
+                wcsTask.setPriority(20L);
+            }else {
+                wcsTask.setPriority(10L);
+            }
             wcsTask.setShopId(Constant.WAREHOUSE_ID.toString());
             wcsTask.setShopId(Constant.WAREHOUSE_ID.toString());
             wcsTask.setCreateDate(new Date());
             wcsTask.setCreateDate(new Date());
             wcsTask.setBusinessType("01");
             wcsTask.setBusinessType("01");
@@ -631,7 +635,7 @@ public class BusinessServiceImpl implements IBusinessService {
         }
         }
 
 
         Integer priority = 1;
         Integer priority = 1;
-        if (!wcsTask.getTaskType().equals("OB")) {
+        if (wcsTask.getTaskType().equals("OB")) {
             if (wcsTask.getPriority() == 99) {
             if (wcsTask.getPriority() == 99) {
                 int current = wcsTaskMapper.selectCurrentPriority();
                 int current = wcsTaskMapper.selectCurrentPriority();
                 priority = current - 100;
                 priority = current - 100;