laoyao 3 gadi atpakaļ
vecāks
revīzija
f33156aa1b

+ 6 - 0
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/OrderServiceImpl.java

@@ -492,6 +492,12 @@ public class OrderServiceImpl extends SuperServiceImpl<OrderMapper, Order> imple
     public Map<String, Object> confirmSchedule(Map<String, Object> map,SysUser sysUser) {
         String taskBatchNo = map.get("taskBatchNo")==null?"":map.get("taskBatchNo").toString();
         String planIds = map.get("planIds")==null?"":map.get("planIds").toString();
+        String planId = map.get("planId")==null?"":map.get("planId").toString();
+
+        //pladId 是单个选择的,从右边快捷菜单点击。  planIds 是批量一键排产
+        if(StringUtils.isNotEmpty(planId)){
+            planIds = planId;
+        }
 
 
         isFalse(StringUtils.isEmpty(planIds),"请选择计划");

+ 18 - 8
imcs-admin-boot/imcs-business-biz/src/main/java/com/github/zuihou/business/operationManagementCenter/service/impl/TaskServiceImpl.java

@@ -32,10 +32,7 @@ import com.github.zuihou.business.productionReadyCenter.entity.*;
 import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourceBizMapper;
 import com.github.zuihou.business.productionResourceCenter.dao.ProductionresourcePositionMapper;
 import com.github.zuihou.business.productionResourceCenter.dao.ZZoneMapper;
-import com.github.zuihou.business.productionResourceCenter.entity.Productionresource;
-import com.github.zuihou.business.productionResourceCenter.entity.ProductionresourcePosition;
-import com.github.zuihou.business.productionResourceCenter.entity.Repair;
-import com.github.zuihou.business.productionResourceCenter.entity.ZZone;
+import com.github.zuihou.business.productionResourceCenter.entity.*;
 import com.github.zuihou.business.productionResourceCenter.service.RepairService;
 import com.github.zuihou.common.constant.BizConstant;
 import com.github.zuihou.common.constant.CacheKey;
@@ -45,6 +42,7 @@ import com.github.zuihou.common.util.DateUtil;
 import com.github.zuihou.common.util.StringUtil;
 import com.github.zuihou.database.mybatis.conditions.Wraps;
 import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
+import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
 import com.github.zuihou.tenant.service.CodeRuleService;
 import com.google.common.collect.Maps;
 import lombok.extern.slf4j.Slf4j;
@@ -601,8 +599,14 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
         //参数放置位置处理
         getQueryMap(map);
         String planId = map.get("planId")==null?"":map.get("planId").toString();
-        String planIds = map.get("planIds")==null?"":map.get("planIds").toString();
-        List<TTask> taskList = baseMapper.selectList(Wraps.<TTask>lbQ().eq(TTask::getTaskBatchNo,taskBatchNo).eq(TTask::getDraftFlag,draftFlag).eq(TTask::getPlanId,planId).in(TTask::getPlanId,planIds));
+        String planIds = map.get("planIds")==null?null:map.get("planIds").toString();
+
+        LbqWrapper<TTask> wrapper = new LbqWrapper<TTask>().eq(TTask::getTaskBatchNo,taskBatchNo).eq(TTask::getDraftFlag,draftFlag).eq(TTask::getPlanId,planId);
+        if(StringUtil.isNotEmpty(planIds)){
+            wrapper.in(TTask::getPlanId,planIds);
+        }
+        List<TTask> taskList = baseMapper.selectList(wrapper);
+
         List<String>dateStrList = new ArrayList<>();
         for(TTask t:taskList){
             String date1 = DateUtil.dateToString0(t.getExpectStartTime(),"yyyy-MM");
@@ -661,7 +665,11 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
         getQueryMap(map);
         String planId = map.get("planId")==null?"":map.get("planId").toString();
         String planIds = map.get("planIds")==null?"":map.get("planIds").toString();
-        List<TTask> taskList = baseMapper.selectList(Wraps.<TTask>lbQ().eq(TTask::getTaskBatchNo,taskBatchNo).eq(TTask::getDraftFlag,draftFlag).eq(TTask::getPlanId,planId).in(TTask::getPlanId,planIds));
+        LbqWrapper<TTask> wrapper = new LbqWrapper<TTask>().eq(TTask::getTaskBatchNo,taskBatchNo).eq(TTask::getDraftFlag,draftFlag).eq(TTask::getPlanId,planId);
+        if(StringUtil.isNotEmpty(planIds)){
+            wrapper.in(TTask::getPlanId,planIds);
+        }
+        List<TTask> taskList = baseMapper.selectList(wrapper);
         List<String>dateStrList = new ArrayList<>();
         for(TTask t:taskList){
             String date1 = DateUtil.dateToString0(t.getExpectStartTime(),"yyyy-MM-dd");
@@ -748,7 +756,9 @@ public class TaskServiceImpl extends SuperServiceImpl<TTaskMapper, TTask> implem
         List<Map>returnList = new ArrayList<Map>();
 
         int current = Integer.parseInt(map.get("current")==null?"1":map.get("current").toString());
-        int size = Integer.parseInt(map.get("size")==null?"10":map.get("size").toString());
+//        int size = Integer.parseInt(map.get("size")==null?"10":map.get("size").toString());
+        //不分页。
+        int size = 1000;
         current = (current-1)*size;
         Map<String,Object>queryMap = new HashMap<String,Object>();
         queryMap.put("current",current);