Преглед на файлове

feature 优化返回给前端的数据结构

xiahan преди 9 месеца
родител
ревизия
48c3655f54

+ 9 - 13
cx-aps/cx-aps-common/src/main/java/com/rongwei/bscommon/sys/service/impl/GanttServiceImpl.java

@@ -125,10 +125,6 @@ public class GanttServiceImpl implements GanttService {
         log.error("甘特图查询用时:{}", stopWatch.getTotalTimeSeconds());
         StopWatch stopWatch1 = new StopWatch();
         stopWatch1.start();
-
-//        apsProcessOperationProcessEquDos
-//                .sort(Comparator.comparing(GanttVos::getPlanstartdate)
-//                .thenComparing(GanttVos::getPlanenddate));
         List<ScheduleGanttVo> scheduleGanttVos = assembleGanttData(apsProcessOperationProcessEquDos);
         stopWatch1.stop();
         log.error("甘特图组装数据用时:{}", stopWatch1.getTotalTimeSeconds());
@@ -388,23 +384,23 @@ public class GanttServiceImpl implements GanttService {
                         data.setOutputnumber(number.split(DEFAULT_SPLIT)[1]);
                     }
                 });
-                List<String> itemNames = new ArrayList<>();
+//                List<String> itemNames = new ArrayList<>();
                 // 按照工序作业明细ID 进行分组 并且获取 图列的 名称和描述
-                LinkedHashMap<String, List<GanttVos>> collect = ganttVos.stream().collect(Collectors.groupingBy(GanttVos::getId, LinkedHashMap::new, Collectors.toList()));
+//                LinkedHashMap<String, List<GanttVos>> collect = ganttVos.stream().collect(Collectors.groupingBy(GanttVos::getId, LinkedHashMap::new, Collectors.toList()));
 
-                String itemName = collect.values().stream().map(info -> {
-                    return String.format(GANTT_ITEM_NAME, info.get(0).getInmatercondition(), info.get(0).getPlanprocessrall(),
-                            info.get(0).getCustomorderno(), info.get(0).getCustomerabbreviation(), info.get(0).getDeliverydate());
-                }).collect(Collectors.joining("</br>"));
-                itemNames.add(itemName);
+//                String itemName = collect.values().stream().map(info -> {
+//                    return String.format(GANTT_ITEM_NAME, info.get(0).getInmatercondition(), info.get(0).getPlanprocessrall(),
+//                            info.get(0).getCustomorderno(), info.get(0).getCustomerabbreviation(), info.get(0).getDeliverydate());
+//                }).collect(Collectors.joining("</br>"));
+//                itemNames.add(itemName);
                 dateVo = new ScheduleGanttVo();
                 dateVo.setId(String.valueOf(workShopIndex++));
                 dateVo.setParent(deviceEntry.getKey());
-                dateVo.setText(StringUtils.join(itemNames, "</br>"));
+//                dateVo.setText(StringUtils.join(itemNames, "</br>"));
                 dateVo.setOpen(false);
                 dateVo.setStart_date(ganttVos.get(0).getPlanstartdate());
                 dateVo.setEnd_date(ganttVos.get(0).getPlanenddate());
-                dateVo.setName(StringUtils.join(itemNames, "</br>"));
+//                dateVo.setName(StringUtils.join(itemNames, "</br>"));
                 dateVo.setBlankNumber(ganttVos.stream().map(GanttVos::getBlankNumber).distinct().collect(Collectors.joining(",")));
                 dateVo.setProcessdetailids(ganttVos.stream().map(GanttVos::getId).distinct().collect(Collectors.joining(",")));
                 dateVo.setProcessids(ganttVos.stream().map(GanttVos::getProcessid).distinct().collect(Collectors.joining(",")));

+ 2 - 2
cx-aps/cx-aps-common/src/main/resources/mybatis/ApsProcessOperationProcessEquDao.xml

@@ -210,10 +210,10 @@
         a1.PROCESSID = a2.ID
         <where>
             <if test="factoryId != null and factoryId != '' and factoryId != 'ALL'">
-                and a1.TENANTID = #{factoryId}
+                 a1.TENANTID = #{factoryId}
                 and a3.TENANTID= #{factoryId}
             </if>
-            a3.SCHEDULINGSTATUS != '10'
+            and a3.SCHEDULINGSTATUS != '10'
             and a1.DELETED ='0'
             AND a2.DELETED = '0'
             AND a3.DELETED = '0'