| | |
| | | } |
| | | |
| | | public static List<Integer> getMenusOutofCard() { |
| | | return Arrays.asList(Integer.valueOf(APP.getStatus()), Integer.valueOf(MENU.getStatus()), Integer.valueOf(BUTTON.getStatus())); |
| | | return Arrays.asList(APP.getStatus(), MENU.getStatus(), BUTTON.getStatus()); |
| | | } |
| | | |
| | | public static List<Integer> getMenusWithCard() { |
| | | return Arrays.asList(Integer.valueOf(APP.getStatus()), Integer.valueOf(CARD.getStatus())); |
| | | return Arrays.asList(APP.getStatus(), CARD.getStatus()); |
| | | } |
| | | |
| | | public static List<Integer> getMenus() { |
| | | return Arrays.asList(Integer.valueOf(APP.getStatus()), Integer.valueOf(MENU.getStatus())); |
| | | return Arrays.asList(APP.getStatus(), MENU.getStatus()); |
| | | } |
| | | } |
| | |
| | | int current = query.getCurrent().intValue(); |
| | | long startTime = vo.getStartTime().getTime(); |
| | | long endTime = vo.getEndTime().getTime(); |
| | | |
| | | String workstationId = vo.getWorkstationId(); |
| | | Integer flag = vo.getFlag(); |
| | | String item = vo.getItem(); |
| | |
| | | if (total == 0) { |
| | | return page; |
| | | } |
| | | List<ProcessParameterVO> res = this.parameterMapper.pageProcessParameter(Integer.valueOf(size), Integer.valueOf((current - 1) * size), Long.valueOf(startTime), Long.valueOf(endTime), item, workstationId); |
| | | |
| | | List<ProcessParameterVO> res = this.parameterMapper.pageProcessParameter(size,(current - 1) * size, startTime, endTime, item, workstationId); |
| | | Map<String, String> map = getWcsMap(); |
| | | List<ProcessParameterRealVO> collect = res.stream().map(c -> { |
| | | String value; |
| | |
| | | @Override |
| | | public List<SuperAggregateState> getDataByMonth(List<Long> ids, Integer year, List<Integer> monthList) { |
| | | List<SuperAggregateState> data = this.baseMapper.getDataByMonth(ids, year, monthList); |
| | | |
| | | return buildDuration(data); |
| | | } |
| | | |
| | |
| | | import java.time.chrono.ChronoLocalDate; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.ArrayList; |
| | | import java.util.Collections; |
| | | import java.util.Comparator; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | |
| | | workstationIds.forEach(workstationId -> { |
| | | Workstation workstation = this.workstationService.getOne(Wrappers.<Workstation>lambdaQuery().eq(Workstation::getId, workstationId) |
| | | .eq(Workstation::getType, WorkstationTypeEnum.MACHINE.getCode()).isNotNull(Workstation::getCalendarCode)); |
| | | /* |
| | | Workstation workstation = (Workstation) this.workstationService.getOne((Wrapper) ((LambdaQueryWrapper) ((LambdaQueryWrapper) Wrappers.lambdaQuery().eq((v0) -> { |
| | | return v0.getId(); |
| | | }, workstationId)).eq((v0) -> { |
| | | return v0.getType(); |
| | | }, WorkstationTypeEnum.MACHINE.getCode())).isNotNull((v0) -> { |
| | | return v0.getCalendarCode(); |
| | | }));*/ |
| | | |
| | | if (Func.isEmpty(workstation)) { |
| | | idToValue.put(workstationId, new ArrayList<>()); |
| | | } |
| | | if (workstation != null) { |
| | | //idToValue.put(workstationId, new ArrayList<>()); |
| | | idToValue.put(workstationId, Collections.emptyList());//yys 20241011 20:17 |
| | | }else { |
| | | List<ShiftIndexNameDTO> dtos = this.calendarService.queryShiftIndexName(workstation.getCalendarCode(), localDate.getYear(), DateUtil.formatDate(localDate)); |
| | | idToValue.put(workstationId, dtos); |
| | | } |
| | |
| | | List<AlarmAnalysisWorkstationVO> result; |
| | | try { |
| | | result = this.superAlarmMapper.alarmByWorkstation(workstationId, Integer.valueOf((query.getCurrent() - 1) * query.getSize()), query.getSize()); |
| | | result.forEach(a -> { |
| | | a.setAlarmTime(DateUtil.formatDateTime(new Date(a.getTime().getTime()))); |
| | | }); |
| | | total = this.superAlarmMapper.alarmByWorkstationTotal(workstationId); |
| | | } catch (Exception e) { |
| | | log.error("查询报警异常",e); |
| | |
| | | return saveOrUpdate(menu); |
| | | } |
| | | |
| | | /* JADX WARN: Multi-variable type inference failed */ |
| | | |
| | | @Override |
| | | public List<String> getRoleMenuByCondition(String roleIds, List<Integer> categoryList) { |
| | | List<String> list = new ArrayList<>(); |
| | |
| | | #{week} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <!-- |
| | | <select id="getDataByMonth" resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState"> |
| | | select ts as startTime, |
| | | end_time as endTime, |
| | |
| | | #{month} |
| | | </foreach> |
| | | </select> |
| | | |
| | | --> |
| | | |
| | | <select id="getDataByMonth" resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState"> |
| | | select |
| | | end_time as endTime, |
| | | duration_collect, |
| | | value_collect, |
| | | calendar_code as calendarCode, |
| | | factory_year as factoryYear, |
| | | factory_month as factoryMonth, |
| | | factory_week as factoryWeek, |
| | | factory_date as factoryDate, |
| | | shift_index as shiftIndex, |
| | | shift_time_type as shiftTimeType, |
| | | wcs, |
| | | rps, |
| | | is_deleted as isDeleted, |
| | | workstation_id as workstationId |
| | | from root.f2.aggregate_state_* |
| | | where is_deleted=false |
| | | and wcs > 0 |
| | | and factory_year = #{year} |
| | | and workstation_id IN |
| | | <foreach collection="workstationIds" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | and factory_month IN |
| | | <foreach collection="monthList" item="month" open="(" separator="," close=")"> |
| | | #{month} |
| | | </foreach> |
| | | align by device |
| | | </select> |
| | | <select id="listCrossDay" resultType="com.qianwen.smartman.modules.mdc.entity.SuperAggregateState"> |
| | | select ts as startTime, |
| | | end_time as endTime, |
| | |
| | | |
| | | <!-- 原始limit limit #{start}, #{end} ,实际上end应该是pageSize--> |
| | | <select id="alarmByWorkstation" resultType="com.qianwen.smartman.modules.mdc.vo.AlarmAnalysisWorkstationVO"> |
| | | select code as alarmCode, |
| | | select code as alarmCode, |
| | | message as alarmMsg |
| | | from root.f2.alarm_* |
| | | where workstation_id = #{workstationId} |
| | | order by time desc |
| | | from root.f2.alarm_${workstationId} order by time desc |
| | | limit #{end} offset #{start} |
| | | align by device |
| | | </select> |
| | | |
| | | <select id="alarmByWorkstationTotal" resultType="java.lang.Integer"> |
| | | select count(workstation_id) |
| | | from root.f2.alarm_* |
| | | where workstation_id = #{workstationId} |
| | | select count(workstation_id) from root.f2.alarm_${workstationId} |
| | | </select> |
| | | |
| | | <!-- , --> |
| | |
| | | </where> |
| | | order by ts asc |
| | | </select> |
| | | |
| | | <!-- |
| | | <select id="pageProcessParameter" resultType="com.qianwen.smartman.modules.mdc.dto.ProcessParameterVO"> |
| | | select ts as time, |
| | | ts as realTime, |
| | |
| | | order by ts asc |
| | | limit #{current}, #{size} |
| | | </select> |
| | | |
| | | --> |
| | | <select id="pageProcessParameter" resultType="com.qianwen.smartman.modules.mdc.dto.ProcessParameterVO"> |
| | | select |
| | | n as collectItem, |
| | | v as value_collect |
| | | from root.f2.process_param_${workstationId}_${item} |
| | | where time >= #{startTime} |
| | | and time <= #{endTime} |
| | | order by time asc |
| | | limit #{size} offset #{current} |
| | | </select> |
| | | <!-- |
| | | <select id="countProcessParameter" resultType="java.lang.Long"> |
| | | select count(*) |
| | | from iot_data.super_collect_data |
| | |
| | | and workstation_id = #{workstationId} |
| | | </where> |
| | | </select> |
| | | |
| | | --> |
| | | <select id="countProcessParameter" resultType="java.lang.Long"> |
| | | select count(*) |
| | | from root.f2.process_param_${workstationId}_${item} |
| | | <where> |
| | | and time >= #{startTime} |
| | | and time <= #{endTime} |
| | | </where> |
| | | </select> |
| | | <select id="getOneDate" resultType="com.qianwen.smartman.modules.mdc.dto.ProcessParameterVO"> |
| | | select ts as time, |
| | | ts as realTime, |