| | |
| | | public static final String MYSQL_BACKUP_DIR ="MYSQL_BACKUP_DIR" ; |
| | | public static final String EVENT_FILES_PRIVATE_DOMAIN ="EVENT_FILES_PRIVATE_DOMAIN" ; |
| | | public static final String EVENT_FILES_PUBLIC_DOMAIN ="EVENT_FILES_PUBLIC_DOMAIN" ; |
| | | public static final String TEMPERATURE_HUMIDITY ="TEMPERATURE_HUMIDITY" ; |
| | | |
| | | public static final String HK_WXTOKEN_CONFIGID ="HK_WXTOKEN_CONFIGID" ; |
| | | public static final String HK_WXTOKEN_TAGID ="HK_WXTOKEN_TAGID" ; |
| | | public static final String WMS_TOTAL_STOCK_NUM ="WMS_TOTAL_STOCK_NUM" ; |
| | |
| | | */ |
| | | public static String getWxUrl(String code, WxUrlParams paramCode, String ywid) { |
| | | String url = code.replace("${type}",paramCode.type+"").replace("${yw}",paramCode.yw).replace("${ywid}",ywid); |
| | | try { |
| | | url = URLEncoder.encode(code.replace("${type}",paramCode.type+"").replace("${yw}",paramCode.yw).replace("${ywid}",ywid),"UTF-8"); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | // try { |
| | | // url = URLEncoder.encode(code,"UTF-8"); |
| | | // }catch (Exception e){ |
| | | // |
| | | // } |
| | | return url; |
| | | } |
| | | |
| | |
| | | String visitTimeOutSignOut = "visitTimeOutSignOut"; |
| | | //访客ç³è¯·-æªç¾ç¦»æ°é-éç¥ï¼ç»æå®æ¥æ¶äººï¼ |
| | | String visitTimeOutSignOutNum = "visitTimeOutSignOutNum"; |
| | | //访客ç³è¯·-审æ¹éè¿éç¥ï¼ç»è¢«è®¿é®äººï¼ |
| | | String visitAuditSuccessToVisiter = "visitAuditSuccessToVisiter"; |
| | | |
| | | } |
| | | |
| | |
| | | return ApiResponse.success( HKService.findDeviceAlarmPage(param)); |
| | | } |
| | | |
| | | @ApiOperation("ãæµ·åº·ã温湿度ç»è®¡") |
| | | @PostMapping("/getTemperatureHumidityDataPage") |
| | | @LoginNoRequired |
| | | public ApiResponse<BaseResponse> getTemperatureHumidityDataPage(@RequestBody TemperatureHumidityDataRequest request, HttpServletResponse response) { |
| | | return ApiResponse.success( HKService.temperatureHumidityDataStatistic(request)); |
| | | } |
| | | |
| | | } |
| | |
| | | RegionEnergyListResponse data=boardService.energyRegionData(); |
| | | return ApiResponse.success(data); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("宿¶è´è·æ²çº¿") |
| | | @GetMapping("/loadCurve") |
| | |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("æ¸©æ¹¿åº¦æ°æ®") |
| | | @GetMapping("/getTemperatureHumidityData") |
| | | public ApiResponse<List<TemperatureHumidityDataVO>> getTemperatureHumidityData() { |
| | | List<TemperatureHumidityDataVO> list = boardService.getTemperatureHumidityData(); |
| | | return ApiResponse.success(list); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("访客æ»çæ
åµ") |
| | | @GetMapping("/visitRetentionData") |
| | |
| | | String[] minitorDataSearchV1= new String[]{"/api/fem/v1/minitor/data/search","å页æ¥è¯¢è®¾å¤çæµå岿°æ®"};//å页æ¥è¯¢è®¾å¤çæµå岿°æ® |
| | | String[] minitorDataSearch= new String[]{"/api/fpms/v2/minitor/data/search","å页æ¥è¯¢è®¾å¤çæµå岿°æ®"};//å页æ¥è¯¢è®¾å¤çæµå岿°æ® |
| | | String[] userOpenidSave= new String[]{"/api/v1/oa/userOpenId/saveV2","ä¿åç¨æ·åopenIdç»å®ä¿¡æ¯å¾®ä¿¡å
¬ä¼å·"};//ä¿åç¨æ·åopenIdç»å®ä¿¡æ¯å¾®ä¿¡å
¬ä¼å· |
| | | String[] temperatureHumidityDataStatistic= new String[]{"/api/v2/public/monitor/sensor/list","æ¶é²çæ¿-4温湿度ç»è®¡"};//æ¶é²çæ¿-温湿度 |
| | | } |
| | | /** |
| | | * éå½A.55æ¶é²è®¾å¤ç±»å |
| | |
| | | public static String getTodoListPage(Map<String, String> body) throws Exception{ |
| | | return startDoGetStringArtemis(HKConstants.InterfacePath.getTodoListPage,body); |
| | | } |
| | | |
| | | /** |
| | | *æ¶é²çæ¿-4æ¸©æ¹¿åº¦æ°æ® |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String temperatureHumidityDataStatistic(String body) { |
| | | return startDoPostStringArtemisAdmin(HKConstants.InterfacePath.temperatureHumidityDataStatistic,body); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åé¨ç¦ç¹å表 |
| | | * @param body |
| | |
| | | saveInterfaceLog(body,result,path,pathStr[1]); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public static String startDoPostStringArtemisAdmin(String[] pathStr,String body){ |
| | | Map<String, String> path = getPath(pathStr[0]); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("userId", "admin"); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path,pathStr[1]); |
| | | return result; |
| | | } |
| | | |
| | | public static String startDoGetStringArtemis(String[] pathStr,Map<String,String> body ){ |
| | | Map<String, String> path = getPath(pathStr[0]); |
| | | Map<String, String> header = new HashMap<>(); |
| | |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path,pathStr[1]); |
| | | return result; |
| | | |
| | | } |
| | | |
| | | |
| | | public static String startDoPostStringArtemis(String[] pathStr,Map<String, String> querys,Map<String, String> header,String body){ |
| | | Map<String, String> path = getPath(pathStr[0]); |
| | | header.put("tagId", UUID.randomUUID().toString().replace("-", "")); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, querys, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path,pathStr[1]); |
| | | return result; |
| | | |
| | | } |
| | | /** |
| | | * ç¾ç¦»è®¿å®¢é¢çº¦ |
| | |
| | | public static String findAlarmBaseDataStatistic(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.findAlarmBaseDataStatistic,body); |
| | | } |
| | | |
| | | /** |
| | | *å®é²çæ¿-- b |
| | | * @param body |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class TemperatureHumidityDataRequest { |
| | | |
| | | private Integer pageSize ;// Query Number false å页大å°ï¼1~999ï¼ |
| | | private Integer pageNo;// Query Number false å½å页ç (1~100000) |
| | | private String parentIndexCode;// Query String false e74fcf79bebb492bb750a557bfb12ab9 |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class TemperatureHumidityDataResponse { |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | private String name ;//String false 设å¤åç§° |
| | | |
| | | @ApiModelProperty(value = "æä½æ¸©åº¦") |
| | | private String alarmLow ;//String false æä½æ¸©åº¦ |
| | | |
| | | @ApiModelProperty(value = "æé«æ¸©åº¦") |
| | | private String alarmHigh ;//String false æé«æ¸©åº¦ |
| | | |
| | | @ApiModelProperty(value = "å½åå¼") |
| | | private String latestValue ;//String false å½åå¼ |
| | | |
| | | private String indexCode ;//String false |
| | | |
| | | @ApiModelProperty(value = "ç±»åï¼temp 温度 humidity 湿度") |
| | | private String sensorType ;//String false |
| | | |
| | | private String parentIndexCode ;//String false |
| | | |
| | | @ApiModelProperty(value = "åä½") |
| | | private String unit ;//String false åä½ |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | *æ¶é²çæ¿-4温湿度ç»è®¡ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<TemperatureHumidityDataResponse>> temperatureHumidityDataStatistic(TemperatureHumidityDataRequest param){ |
| | | log.info("ãæµ·åº·æ¶é²çæ¿-4温湿度ç»è®¡ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.temperatureHumidityDataStatistic(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<TemperatureHumidityDataResponse> >>(){}; |
| | | BaseResponse<BaseListPageResponse<TemperatureHumidityDataResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康æ¶é²çæ¿-4温湿度ç»è®¡"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·æ¶é²çæ¿-4温湿度ç»è®¡ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | *å页æ¥è¯¢æ¶é²è®¾å¤é¨ä»¶ç¶æ |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | *æ ¹æ®ç¨æ·æ è¯è·å客æ·ç«¯TGCæ¥å£ |
| | | * @return |
| | |
| | | paramMap.put("touser", openId); |
| | | paramMap.put("data", dataMap); |
| | | String response = HttpsUtil.postJson(postUrL, JSONObject.toJSONString(paramMap)); |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯è·³è½¬å°åï¼{}·--++==·", jumpUrl); |
| | | if(StringUtils.isBlank(response)){ |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", "失败"); |
| | | }else{ |
| | |
| | | @ExcelColumn(name="被访人åå§å") |
| | | @TableField(exist = false) |
| | | private String receptMemberName; |
| | | |
| | | @ApiModelProperty(value = "被访人åçµè¯", example = "1") |
| | | @ExcelColumn(name="被访人åçµè¯") |
| | | @TableField(exist = false) |
| | | private String receptMemberMobile; |
| | | @ApiModelProperty(value = "è¢«è®¿äººåæµ·åº·ç¼ç ", example = "1") |
| | | @ExcelColumn(name="被访人åå§å") |
| | | @TableField(exist = false) |
| | |
| | | @ApiModelProperty(value = "æè®¿æ¶é´") |
| | | private String visitTime; |
| | | |
| | | @ApiModelProperty(value = "æ¾ç¤ºéç¥ç¶æ") |
| | | private String info; |
| | | |
| | | @ApiModelProperty(value = "é访人åä¿¡æ¯") |
| | | private List<Visits> withVisitsList; |
| | | |
| | |
| | | private Integer dangerDealedNum; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æè®¾å¤åç±»ç»è®¡åµåµ" , hidden = true) |
| | | @ApiModelProperty(value = "æè®¾å¤åç±»ç»è®¡" , hidden = true) |
| | | private List<DeviceNumByTypeVO> deviceTypeList; |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import com.doumee.core.haikang.model.param.respose.TemperatureHumidityDataResponse; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ¶é²ç®¡æ§å¤§å± |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/25 13:53 |
| | | */ |
| | | @Data |
| | | public class TemperatureHumidityDataVO { |
| | | |
| | | @ApiModelProperty(value = "温度") |
| | | private TemperatureHumidityDataResponse temperatureData; |
| | | |
| | | |
| | | @ApiModelProperty(value = "湿度") |
| | | private TemperatureHumidityDataResponse humidityData; |
| | | |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private CarDriverMapper carDriverMapper; |
| | | |
| | | @Autowired |
| | | private VisitsMapper visitsMapper; |
| | | |
| | | @Autowired |
| | | private VisitsJoinMapper visitsJoinMapper; |
| | | private VisitsJoinMapper visitsMapper; |
| | | |
| | | @Autowired |
| | | private CarUseBookJoinMapper carUseBookJoinMapper; |
| | |
| | | if(Constants.equalsInteger(noticeType,Constants.noticesObjectType.visit) |
| | | || Constants.equalsInteger(noticeType,Constants.noticesObjectType.visitReporting)){ |
| | | //访客记å½ä¸è®¿å®¢æ¥å¤ |
| | | Visits visits = visitsJoinMapper.selectJoinOne(Visits.class, |
| | | Visits visits = visitsMapper.selectJoinOne(Visits.class, |
| | | new MPJLambdaWrapper<Visits>().selectAll(Visits.class) |
| | | .selectAs(Member::getName,Visits::getReceptMemberName) |
| | | .selectAs(Company::getName,Visits::getReceptMemberDepartment) |
| | |
| | | SmsConstants.visitContent.visitAuditFail, |
| | | approveDTO.getCheckInfo(),null |
| | | ); |
| | | if(Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)){ |
| | | SmsEmailServiceImpl.sendVisitSms(systemDictDataBiz, |
| | | emayService,smsEmailMapper,smsConfigMapper,visitsMapper,visits.getId(), |
| | | SmsConstants.visitContent.visitAuditSuccessToVisiter, |
| | | approveDTO.getCheckInfo(),null |
| | | ); |
| | | } |
| | | objCode = Constants.equalsInteger(approveDTO.getStatus(),Constants.TWO)? WxPlatConstants.visitContent.visitAuditSuccess: |
| | | WxPlatConstants.visitContent.visitAuditFail; |
| | | } |
| | |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.SmsConfigMapper; |
| | | import com.doumee.dao.business.dao.SmsEmailMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.model.vo.ValidPhoneCodeVO; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import com.doumee.service.business.third.EmayService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | * @param auditUser |
| | | */ |
| | | public static void sendVisitSms(SystemDictDataBiz systemDictDataBiz, EmayService emayService , com.doumee.dao.business.dao.SmsEmailMapper smsEmailMapper , SmsConfigMapper smsConfigMapper, |
| | | VisitsMapper visitsMapper, Integer objId, String objCode, String msg, List<String> auditUser){ |
| | | VisitsJoinMapper visitsMapper, Integer objId, String objCode, String msg, List<String> auditUser){ |
| | | try{ |
| | | SmsConfig smsConfig = smsConfigMapper.selectOne(new QueryWrapper<SmsConfig>().lambda().eq(SmsConfig::getCode, |
| | | objCode).last(" limit 1 ")); |
| | | //å¼å¯çä¿¡éç¥ |
| | | if(Objects.nonNull(smsConfig) || Constants.equalsInteger(smsConfig.getStatus(),Constants.ZERO)){ |
| | | String content = systemDictDataBiz.queryByCode(Constants.SMS,Constants.SMS_COMNAME).getCode() + smsConfig.getContent(); |
| | | Visits visits = visitsMapper.selectById(objId); |
| | | Visits visits = visitsMapper.selectJoinOne(Visits.class,new MPJLambdaWrapper<Visits>().selectAll(Visits.class) |
| | | .selectAs(SystemUser::getMobile,Visits::getReceptMemberMobile) |
| | | .leftJoin(SystemUser.class,SystemUser::getMemberId, Visits::getReceptMemberId) |
| | | .eq(Visits::getId,objId).last(" limit 1 ")); |
| | | if(Objects.nonNull(visits)){ |
| | | if(objCode.equals(SmsConstants.visitContent.visitAuditSuccess)){ |
| | | //æ¨çã访客ç³è¯·ãå·²ç»å®¡æ¹éè¿ï¼è¯·äº{é¢çº¦å
¥åå¼å§æ¶é´}åå¾é¨å«å®¤è®¿å®¢æºç¾å°å
¥åï¼å¦æçé®ï¼è¯·è系被访人 |
| | | //æ¨ç[访客ç³è¯·]å·²ç»å®¡æ¹éè¿ï¼è¯·éç¥è®¿å®¢äº{é¢çº¦å
¥åå¼å§æ¶é´}å
¥åï¼å¦æçé®ï¼è¯·è系被访人ã |
| | | content = content.replace("{é¢çº¦å
¥åå¼å§æ¶é´}",DateUtil.getFomartDate(visits.getStarttime(),"yyyy-MM-dd HH:mm")); |
| | | sendBusinessSms(emayService,smsEmailMapper, |
| | | Arrays.asList(visits.getPhone().split(",")),SmsConstants.visit,content,visits.getId()); |
| | |
| | | content = content.replace("{æªç¾ç¦»æ°é}",msg); |
| | | sendBusinessSms(emayService,smsEmailMapper, |
| | | Arrays.asList(visits.getPhone().split(",")),SmsConstants.visit,content,visits.getId()); |
| | | }else if(objCode.equals(SmsConstants.visitContent.visitAuditSuccessToVisiter)) { |
| | | content = content.replace("{é¢çº¦å
¥åå¼å§æ¶é´}",DateUtil.getFomartDate(visits.getStarttime(),"yyyy-MM-dd HH:mm")); |
| | | sendBusinessSms(emayService,smsEmailMapper, |
| | | Arrays.asList(visits.getReceptMemberMobile().split(",")),SmsConstants.visit,content,visits.getId()); |
| | | }else{ |
| | | //æ¨æä¸æ¡ã车è¾å
¥åç³è¯·ãéè¦å¤çï¼è¯¦ç»ä¿¡æ¯è¯·åå¾å¾®ä¿¡å
¬ä¼å·æ¥çã |
| | | sendBusinessSms(emayService,smsEmailMapper, |
| | |
| | | * @param auditUser |
| | | */ |
| | | public static void sendVisitReportSms(SystemDictDataBiz systemDictDataBiz, EmayService emayService , com.doumee.dao.business.dao.SmsEmailMapper smsEmailMapper , SmsConfigMapper smsConfigMapper, |
| | | VisitsMapper visitsMapper, Integer objId, String objCode, String msg, List<String> auditUser){ |
| | | VisitsJoinMapper visitsMapper, Integer objId, String objCode, String msg, List<String> auditUser){ |
| | | try{ |
| | | SmsConfig smsConfig = smsConfigMapper.selectOne(new QueryWrapper<SmsConfig>().lambda().eq(SmsConfig::getCode, |
| | | objCode).last(" limit 1 ")); |
| | |
| | | @Autowired |
| | | private RetentionMapper retentionMapper; |
| | | @Autowired |
| | | private VisitsMapper visitsMapper; |
| | | private VisitsJoinMapper visitsMapper; |
| | | @Autowired |
| | | private ApproveMapper approveMapper; |
| | | @Autowired |
| | |
| | | memberId) |
| | | ); |
| | | // } |
| | | |
| | | Notices notices = noticesJoinMapper.selectOne(new QueryWrapper<Notices>().lambda().eq(Notices::getObjId,visits.getId()) |
| | | .eq(Notices::getType,Constants.equalsInteger(visits.getType(),Constants.TWO)?Constants.noticesObjectType.visitReporting:Constants.noticesObjectType.visit) |
| | | .eq(Notices::getUserId,memberId) |
| | | .eq(Notices::getSendacopy,Constants.ZERO) |
| | | .last(" limit 1 ") |
| | | ); |
| | | if(Objects.nonNull(notices)){ |
| | | notices.setInfo(notices.getInfo()); |
| | | }else{ |
| | | notices.setInfo("ææ "); |
| | | } |
| | | return visitDetailVO; |
| | | } |
| | | |
| | |
| | | import com.doumee.service.business.impl.VisitsServiceImpl; |
| | | import com.doumee.service.business.third.BoardService; |
| | | import com.doumee.service.business.third.WmsService; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | public CarWorkSituationVO carWorkSituation(int limit){ |
| | | CarWorkSituationVO carWorkSituationVO = new CarWorkSituationVO(); |
| | | List<PlatformLog> platformLogList = platformLogMapper.selectList(new QueryWrapper<PlatformLog>().lambda() |
| | | .like(PlatformLog::getCreateDate,DateUtil.getCurrDate()) |
| | | .orderByDesc(PlatformLog::getCreateDate) |
| | | .last(" limit "+limit) |
| | | ); |
| | |
| | | alarmDataVO.setProcessingNum(Constants.formatIntegerNum(response.getData().getUnHandedAlarmNum())); |
| | | alarmDataVO.setStartDate(start); |
| | | alarmDataVO.setEndDate(end); |
| | | }else{ |
| | | alarmDataVO.setTotalNum(Constants.ZERO); |
| | | alarmDataVO.setRealNum(Constants.ZERO); |
| | | alarmDataVO.setErrNum(Constants.ZERO); |
| | | alarmDataVO.setLiftNum(Constants.ZERO); |
| | | alarmDataVO.setProcessingNum(Constants.ZERO); |
| | | alarmDataVO.setStartDate(start); |
| | | alarmDataVO.setEndDate(end); |
| | | } |
| | | return alarmDataVO; |
| | | } |
| | |
| | | data.setDangerDealedNum(totalNum !=null?totalNum.intValue():0);//仿¥å¤ç鿣æ°é |
| | | return data; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¶é² æ¸©æ¹¿åº¦æ°æ® |
| | | */ |
| | | @Override |
| | | public List<TemperatureHumidityDataVO> getTemperatureHumidityData(){ |
| | | TemperatureHumidityDataRequest request = new TemperatureHumidityDataRequest(); |
| | | List<TemperatureHumidityDataVO> temperatureHumidityDataVOList = new ArrayList<>(); |
| | | request.setPageNo(1); |
| | | request.setPageSize(100); |
| | | request.setParentIndexCode(systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.TEMPERATURE_HUMIDITY).getCode()); |
| | | BaseResponse<BaseListPageResponse<TemperatureHumidityDataResponse>> response = HKService.temperatureHumidityDataStatistic(request); |
| | | if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ){ |
| | | List<TemperatureHumidityDataResponse> temperatureHumidityDataResponseList = response.getData().getList(); |
| | | |
| | | if(CollectionUtils.isNotEmpty(temperatureHumidityDataResponseList)){ |
| | | Set<String> parentIndexCode = new HashSet<String>(temperatureHumidityDataResponseList.stream().map( |
| | | i->i.getIndexCode().replace("@0","").replace("@1","") |
| | | ).collect(Collectors.toList())); |
| | | for (String code:parentIndexCode) { |
| | | List<TemperatureHumidityDataResponse> dateList = |
| | | temperatureHumidityDataResponseList.stream().filter(i->i.getIndexCode().indexOf(code)>=Constants.ZERO).collect(Collectors.toList()); |
| | | TemperatureHumidityDataVO temperatureHumidityDataVO = new TemperatureHumidityDataVO(); |
| | | for (TemperatureHumidityDataResponse data:dateList) { |
| | | if(data.getSensorType().equals("temp")){ |
| | | temperatureHumidityDataVO.setTemperatureData(data); |
| | | }else{ |
| | | temperatureHumidityDataVO.setHumidityData(data); |
| | | } |
| | | } |
| | | temperatureHumidityDataVOList.add(temperatureHumidityDataVO); |
| | | } |
| | | } |
| | | } |
| | | return temperatureHumidityDataVOList; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç¨çµæ»è½è忝ãç¯æ¯ååºåç¨çµééå |
| | | * @return |
| | |
| | | VisitDataVO result = new VisitDataVO(); |
| | | result.setWaitVisitNum(visitsJoinMapper.selectCount(new MPJLambdaWrapper<Visits>() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_date)=to_days(now()") |
| | | .apply("to_days(create_date)=to_days(now())") |
| | | .in(Visits::getStatus,Constants.VisitStatus.pass,Constants.VisitStatus.xfSuccess )));//å¾
è®¿é® |
| | | result.setWaitVisitNum(visitsJoinMapper.selectCount(new MPJLambdaWrapper<Visits>() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_date)=to_days(now()") |
| | | .apply("to_days(create_date)=to_days(now())") |
| | | .in(Visits::getStatus,Constants.VisitStatus.signout,Constants.VisitStatus.signin )));//å·²ç»è®° |
| | | result.setWaitVisitNum(visitsJoinMapper.selectCount(new MPJLambdaWrapper<Visits>() |
| | | .eq(Visits::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_date)=to_days(now()") |
| | | .apply("to_days(create_date)=to_days(now())") |
| | | .in(Visits::getStatus,Constants.VisitStatus.signout )));//å·²ç¾ç¦» |
| | | /*PageWrap<Visits> pageWrap = new PageWrap<>(); |
| | | pageWrap.setCapacity(10); |
| | |
| | | .selectAll( PlatformJob.class) |
| | | .select("( select pl.CREATE_DATE from platform_log pl where t.id = pl.obj_id and pl.OBJ_TYPE = "+Constants.PlatformJobLogType.WORKING.getKey()+" order by pl.CREATE_DATE desc limit 1 ) as newStartDate") |
| | | //.select(" ( select sum(ifnull(pl.IO_QTY , 0 )) from platform_wms_detail pl where pl.job_id = t.id and pl.isdeleted=0 )",PlatformJob::getWorkNum) |
| | | .select(" ( case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else a.total_num end )",PlatformJob::getWorkNum) |
| | | .select(" ( case when t.total_num is null then ( select sum(pwd.IO_QTY) from platform_wms_detail pwd where pwd.JOB_ID = t.id ) else t.total_num end )",PlatformJob::getWorkNum) |
| | | .apply("to_days(t.create_date) = to_days(now())") |
| | | .eq(Platform::getIsdeleted, Constants.ZERO) |
| | | .in(PlatformJob ::getStatus,new Integer[]{Constants.PlatformJobStatus.WORKING.getKey(),Constants.PlatformJobStatus.CALLED.getKey() }) |
| | |
| | | |
| | | FightingAdminCenterDataVO centerFightingAdminData(); |
| | | |
| | | List<TemperatureHumidityDataVO> getTemperatureHumidityData(); |
| | | |
| | | YearDeviceDataVO yearFightingAdminDeviceData(); |
| | | |
| | | List<AlarmEventDataVO> fightingAdminAlertList(); |