Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
| | |
| | | //åæ¶ä¼è®® åéåæ¶éç¥ |
| | | this.sendNotice(bookings, 3); |
| | | //åé微信订é
éç¥ |
| | | sendWxMessage.bookingsCancel(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | // sendWxMessage.bookingsCancel(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); |
| | | } |
| | | |
| | | |
| | |
| | | if (!bookings.getCreator().equals(businessOverDTO.getUserId()) && userRelList <= 0) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "éä½ çé¢çº¦è®°å½,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if (System.currentTimeMillis() < bookings.getStartTime().getTime()) { |
| | | if (System.currentTimeMillis() < bookings.getStartTimeReal().getTime()) { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ä¼è®®æªå¼å§,æ æ³è¿è¡ç»æï¼å¦é该æä½è¯·ä½¿ç¨åæ¶åè½"); |
| | | } |
| | | if (System.currentTimeMillis() > bookings.getEndTime().getTime()) { |
| | |
| | | .eq(Bookings::getRoomId,bookings.getRoomId()) |
| | | .ne(Bookings::getId,bookings.getId()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å卿ªå¼å¯ä¼è®®ï¼æ æ³è¿è¡å¼å§ä¼è®®"); |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å卿ªå¼å¯ä¼è®®ï¼æ æ³å¼å§ä¼è®®"); |
| | | }; |
| | | |
| | | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() |
| | | .lambda() |
| | | .apply(" ( END_TIME > now() and START_TIME < now() ) or ( END_TIME > now() and START_TIME_REAL < now() ) ") |
| | | .apply(" ( ( END_TIME > now() and START_TIME < now() ) or ( END_TIME > now() and START_TIME_REAL < now() ) ) ") |
| | | .isNotNull(Bookings::getStartTimeReal) |
| | | .isNull(Bookings::getDoneDate) |
| | | .eq(Bookings::getStatus,Constants.ZERO) |
| | | .eq(Bookings::getRoomId,bookings.getRoomId()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åå¼å¯æ¶é´ä¸å
¶ä»ä¼è®®åå¨å²çªï¼æ æ³è¿è¡å¼å§ä¼è®®"); |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å½åå¼å¯æ¶é´ä¸å
¶ä»ä¼è®®åå¨å²çªï¼æ æ³å¼å§ä¼è®®"); |
| | | }; |
| | | }else{ |
| | | if(bookings.getStartTime().getTime() > System.currentTimeMillis()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªå°ä¼è®®ç³è¯·å¼å§æ¶é´ï¼æ æ³è¿è¡å¼å§"); |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªå°ä¼è®®ç³è¯·å¼å§æ¶é´ï¼æ æ³å¼å§"); |
| | | } |
| | | } |
| | | bookings.setStartTimeReal(new Date()); |
| | |
| | | Integer re = recordisExist(rooms.getId()); |
| | | if (Constants.equalsInteger(re, Constants.ONE)) { |
| | | //åä¸é¢çº¦è®°å½ä¸å
è®¸æ´æ°å¼æ¾æ¶é´åç²åº¦åé |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ä¼è®®å®¤åå¨é¢çº¦ä¸çè®°å½ï¼ä¸å
许修æ¹"); |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "ä¼è®®å®¤åå¨é¢çº¦ä¸çè®°å½ï¼ä¸å
许修æ¹"); |
| | | rooms.setStartTime(null); |
| | | rooms.setEndTime(null); |
| | | rooms.setIntervalTime(null); |
| | |
| | | spring: |
| | | # æ°æ®æºé
ç½® |
| | | datasource: |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: doumee |
| | | password: rtjgfEr@&0c0m |
| | | # url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | # username: doumee |
| | | # password: rtjgfEr@&0c0m |
| | | url: jdbc:mysql://10.50.250.178:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: Atwl@2024 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | | import com.doumee.core.haikang.model.param.request.event.acs.EventAcsRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.parks.EventParkRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.parks.EventPlatformCarsRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.parks.EventPlatformRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitIccmRequest; |
| | | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.service.business.impl.hksync.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "æµ·åº·æ°æ®åæ¥æ¥å£") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/hktest") |
| | | public class HkInterfaceTestCloudController extends BaseController { |
| | | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @ApiOperation("ãæµ·åº·ãæµè¯LEDæ¾ç¤ºå±") |
| | | @PostMapping("/testLed") |
| | | @LoginNoRequired |
| | | public ApiResponse<BaseResponse> testLed(@RequestBody TransparentChannelBodyRequest request, HttpServletResponse response) { |
| | | TransparentChannelHeadRequest head = new TransparentChannelHeadRequest(); |
| | | head.setAbility("cld");//åºå®å¼ |
| | | head.setTreatyType("haixuan_led_net");//åºå®å¼ |
| | | head.setDeviceIndexCode("6a5498e9df924befbb9530e467e5e809"); |
| | | return ApiResponse.success(HKService.transparentchannel(head,request)); |
| | | } |
| | | @ApiOperation("ãæµ·åº·ãæµè¯å¹¿æææ¥") |
| | | @PostMapping("/testBroadcast") |
| | | @LoginNoRequired |
| | | public ApiResponse<BaseResponse> testBroadcast(@RequestBody CustomBroadcastRequest request, HttpServletResponse response) { |
| | | return ApiResponse.success( HKService.customBroadcast(request)); |
| | | } |
| | | @ApiOperation("ãæµ·åº·ãæµè¯è·å微信å
¬ä¼å·") |
| | | @GetMapping("/testWxToken") |
| | | @LoginNoRequired |
| | | public ApiResponse<BaseResponse> testWxToken(@RequestParam String configId,@RequestParam String tageId, HttpServletResponse response) { |
| | | return ApiResponse.success( HKService.wxAccessToken(configId,tageId)); |
| | | } |
| | | @ApiOperation("ãæµ·åº·ãæµè¯å页è·ååè¦äºä»¶") |
| | | @GetMapping("/nhEventPageList") |
| | | @LoginNoRequired |
| | | public ApiResponse<BaseResponse> nhEventPageList(@RequestBody NhEventPageListRequest param, HttpServletResponse response) { |
| | | return ApiResponse.success( HKService.nhEventPageList(param)); |
| | | } |
| | | |
| | | @ApiOperation("ãæµ·åº·ãå页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æ") |
| | | @GetMapping("/sensorStatusSearch") |
| | | @LoginNoRequired |
| | | public ApiResponse<BaseResponse> sensorStatusSearch(@RequestBody SensorStatusListRequest param, HttpServletResponse response) { |
| | | return ApiResponse.success( HKService.sensorStatusSearch(param)); |
| | | } |
| | | @ApiOperation("ãæµ·åº·ãæ¥è¯¢æ¶é²ä¼ æå¨å表") |
| | | @GetMapping("/fireChannelSearch") |
| | | @LoginNoRequired |
| | | public ApiResponse<BaseResponse> fireChannelSearch(@RequestBody FireChannelListRequest param, HttpServletResponse response) { |
| | | return ApiResponse.success( HKService.fireChannelSearch(param)); |
| | | } |
| | | @ApiOperation("ãæµ·åº·ã海康询æ¶é²è®¾å¤å表") |
| | | @GetMapping("/fireDeviceSearch") |
| | | @LoginNoRequired |
| | | public ApiResponse<BaseResponse> fireDeviceSearch(@RequestBody FireDeviceListRequest param, HttpServletResponse response) { |
| | | return ApiResponse.success( HKService.fireDeviceSearch(param)); |
| | | } |
| | | @ApiOperation("ãæµ·åº·ãå页æ¥è¯¢æ¶é²è®¾å¤é¨ä»¶ç¶æ") |
| | | @GetMapping("/fireDeviceStatusSearch") |
| | | @LoginNoRequired |
| | | public ApiResponse<BaseResponse> fireDeviceStatusSearch(@RequestBody FireDeviceStatuslListRequest param, HttpServletResponse response) { |
| | | return ApiResponse.success( HKService.fireDeviceStatusSearch(param)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.PlatformJob; |
| | | import com.doumee.dao.web.reqeust.JobDetailDTO; |
| | | import com.doumee.dao.web.reqeust.SignInDTO; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public ApiResponse<PlatformJob> jobDetail (@RequestBody JobDetailDTO jobDetailDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(platformJobService.getDetail(jobDetailDTO)); |
| | | } |
| | | |
| | | @ApiOperation("ä»»å¡ç¾å°") |
| | | @PostMapping("/signIn") |
| | | public ApiResponse signIn (@RequestBody SignInDTO signInDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | signInDTO.setLoginUserInfo(getLoginUser(token)); |
| | | platformJobService.signIn(signInDTO); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | } |
| | |
| | | String[] iccmUpdateAppointment= new String[]{"/api/iccm/v2/appointment/update","iccm访客ç»è®°ä¿®æ¹"};//iccm访客ç»è®°ä¿®æ¹ |
| | | String[] iccmCancelAppointment= new String[]{"/api/iccm/v1/appointment/cancel","iccm访客ç»è®°ä¿®æ¹"};//iccm访客ç»è®°ä¿®æ¹ |
| | | String[] iccmAppointmentMDJ= new String[]{"/api/iccm/v1/appointment/free/registration","iccm访客é¢çº¦å
ç»è®°"};//iccm访客é¢çº¦å
ç»è®° |
| | | |
| | | String[] privilegIccmeGroup= new String[]{"/api/iccm/v1/privilege/groups","æ¥è¯¢è®¿å®¢æéç»"};//æ¥è¯¢è®¿å®¢æéç» |
| | | String[] iccmAppointmentRecords= new String[]{"/api/iccm/v2/appointment/records","iccmæ¥è¯¢å·²é¢çº¦ç»è®°"};//iccmæ¥è¯¢å·²é¢çº¦ç»è®° |
| | | String[] wxAccessToken= new String[]{"/api/wx/v1/oa/get/accessToken","iccmæ¥è¯¢å·²é¢çº¦ç»è®°"};//1.9.1æ ¹æ®å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯è·åAccessToken |
| | | String[] wxAccessToken= new String[]{"/api/wx/v1/oa/get/accessToken","æ ¹æ®å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯è·åAccessToken"};//1.9.1æ ¹æ®å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯è·åAccessToken |
| | | String[] getWxConfig= new String[]{"/api/wx/v1/oa/get/config","æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯"};//æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯ |
| | | String[] goMenuUrl= new String[]{"/xauthplus-plugin/thirdLogin?type=third&componentId=Infovision iPark Platform&componentMenuId=${menuId}&token=${token}","å·¥ä½å°èå跳转å°å"}; |
| | | String[] nhEventPageList= new String[]{"/api/ecm/warning/event/v1/pageList","å页è·ååè¦äºä»¶"};//å页è·ååè¦äºä»¶ |
| | | String[] nhRegionDataRanking= new String[]{"/api/ecm/v1/energy/regionDataRanking","æ ¹æ®æ¶é´ç»´åº¦è·ååºåç¨éæå"};//1.8.5æ ¹æ®æ¶é´ç»´åº¦è·ååºåç¨éæå |
| | | String[] nhEnergyDistribution= new String[]{"/api/ecm/v1/energy/energyDistribution","æ ¹æ®æ¶é´ç»´åº¦è·åè½èåå¸"};// æ ¹æ®æ¶é´ç»´åº¦è·åè½èåå¸ |
| | | String[] fireDeviceSearch= new String[]{"/api/resource/v1/fireDevice/search","询æ¶é²è®¾å¤å表"};// 1.12.1.1询æ¶é²è®¾å¤å表 |
| | | String[] fireChannelSearch= new String[]{"/api/resource/v1/fireChannel/search","æ¥è¯¢æ¶é²ä¼ æå¨å表"};// æ¥è¯¢æ¶é²ä¼ æå¨å表 |
| | | String[] sensorStatusSearch= new String[]{"/api/fpnms/v2/sensor/status/search","å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æ"};// å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æ |
| | | String[] fireDeviceStatusSearch= new String[]{"/api/fpnms/v2/device/status/search","æ¥è¯¢æ¶é²è®¾å¤é¨ä»¶ç¶æ"};// æ¥è¯¢æ¶é²è®¾å¤é¨ä»¶ç¶æ |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | // æé æ¹æ³ |
| | | TASK_TYPE(int key, String name ) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.name = name;this.key = key; |
| | | } |
| | | |
| | | |
| | |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.visitCancel,body); |
| | | } |
| | | |
| | | public static String startDoGetStringArtemis(String[] pathStr,Map<String,String> body ){ |
| | | Map<String, String> path = getPath(pathStr[0]); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("tagId", UUID.randomUUID().toString().replace("-", "")); |
| | | String result = ArtemisHttpUtil.doGetArtemis(path, body, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(JSONObject.toJSONString(body),result,path,pathStr[1]); |
| | | return result; |
| | | |
| | | } |
| | | public static String startDoPostStringArtemis(String[] pathStr,String body ){ |
| | | Map<String, String> path = getPath(pathStr[0]); |
| | | Map<String, String> header = new HashMap<>(); |
| | |
| | | return startDoPostStringArtemis(wxAccessToken,""); |
| | | } |
| | | /** |
| | | * æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String getWxConfig(Map<String,String> body) { |
| | | return startDoGetStringArtemis(HKConstants.InterfacePath.getWxConfig,body); |
| | | } |
| | | /** |
| | | * æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String nhEventPageList(Map<String,String> body) { |
| | | return startDoGetStringArtemis(HKConstants.InterfacePath.nhEventPageList,body); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¶é²è®¾å¤é¨ä»¶ç¶æ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String fireDeviceStatusSearch(Map<String,String> body) { |
| | | return startDoGetStringArtemis(HKConstants.InterfacePath.fireDeviceStatusSearch,body); |
| | | } |
| | | /** |
| | | * å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String sensorStatusSearch(Map<String,String> body) { |
| | | return startDoGetStringArtemis(HKConstants.InterfacePath.sensorStatusSearch,body); |
| | | } |
| | | /** |
| | | * 询æ¶é²è®¾å¤å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String fireChannelSearch(Map<String,String> body) { |
| | | return startDoGetStringArtemis(HKConstants.InterfacePath.fireChannelSearch,body); |
| | | } |
| | | |
| | | /** |
| | | * 询æ¶é²è®¾å¤å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String fireDeviceSearch(Map<String,String> body) { |
| | | return startDoGetStringArtemis(HKConstants.InterfacePath.fireDeviceSearch,body); |
| | | } |
| | | /** |
| | | * è·åå
¨éç¨æ·å表 |
| | | * @param body |
| | | * @return |
| | |
| | | package com.doumee.core.haikang.model.param; |
| | | |
| | | import com.alibaba.fastjson.annotation.JSONField; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | private int pageSize;// number False æ¯é¡µè®°å½æ»æ° |
| | | private int pageNo ;// number False å½å页ç |
| | | private int totalPage;// number False æ»é¡µæ° |
| | | |
| | | @JSONField(name="list",alternateNames = {"rows","records"}) |
| | | private List<T> list ;// object[] False æéç»å¯¹è±¡å表 |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FireChannelListRequest { |
| | | private String name;// String false åç§°ï¼æ¨¡ç³æç´¢ï¼æå¤§é¿åº¦32ï¼è¥å
å«ä¸æï¼æå¤§é¿åº¦æä¸è¶
è¿æç
§æå®ç¼ç çåèé¿åº¦ï¼å³getBytes("utf-8").length |
| | | private List<String> regionIndexCodes;// Array false åºåç¼å·,å¯ä»¥ä¸ºç©º;String[]ï¼æ¯ææ ¹æ®åºåæ¹éæ¥è¯¢ï¼åºåç¼å·ä¸ªæ°<=1000个ï¼å个é¿åº¦<=64Byteï¼ï¼å¯ä»[æ¥è¯¢åºåå表v2]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-APIå表-èµæºç®å½-åºåä¿¡æ¯æ¥å£#æ¥è¯¢åºåå表v2]æ¥å£è·åè¿ååæ°indexCode |
| | | private Boolean isSubRegion;// Boolean false trueæ¶ï¼æç´¢regionIndexCodesåå
¶åååºåçèµæºï¼falseæ¶ï¼åªæç´¢ regionIndexCodesçèµæº |
| | | private int pageNo;// Number true å½å页ç |
| | | private int pageSize;// Number true åé¡µå¤§å° |
| | | private String orderBy;// String false æåºå段,注æï¼æåºå段å¿
é¡»æ¯æ¥è¯¢æ¡ä»¶ï¼å¦åè¿ååæ°é误 |
| | | private String orderType;// String false éåºååº,éåºï¼desc ååºï¼asc |
| | | private List<FireDeviceExpressionRequest> expressions;// Array false æ¥è¯¢è¡¨è¾¾å¼ |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FireDeviceExpressionRequest { |
| | | private String key;// String false èµæºå±æ§åï¼keyä¼ updateTimeï¼operatorä¼ betweenå¯ä»¥æ¥è¯¢ç¹å®æ¶é´æ®µæ´æ°çæ°æ®ï¼èèå°æ ¡æ¶åå¤ä»¤æ¶ï¼å»ºè®®å¼æ¥è¯¢è¿å»ä¸å¤©çæ°æ®åæ´ |
| | | private Integer operator;// Number false æä½è¿ç®ç¬¦ï¼ 0 ï¼=ï¼ 1 ï¼>=ï¼ 2 ï¼<=ï¼ 3 ï¼inï¼ 4 ï¼not inï¼ 5 ï¼betweenï¼ 6 ï¼likeï¼ 7 ï¼pre likeï¼ 8 ï¼suffix like |
| | | private List<String> values ;//Array false èµæºå±æ§å¼ï¼=ã>=ã<=ãlikeãvaluesæ°ç»é¿åº¦åªè½æ¯1ï¼ inãnot inï¼valuesæ°ç»é¿åº¦å¤§äº1ï¼æå¤§ä¸è¶
æ¶20ï¼ in_arrayç¨äºæ¥è¯¢key弿å¤ä¸ªvalueçæ
åµï¼ä¾å¦è¡è½¦çæ§æ·»å ç设å¤ç±»å为encodeDeviceãencodeDeviceMss两个类åï¼ä½¿ç¨encodeDeviceæè
encodeDeviceMssé½å¯ä»¥æ¥è¯¢å°ï¼ betweenåªè½ç¨äºæ´å½¢ãæ¥æ ï¼ likeåªè½ç¨äºå符串ã |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FireDeviceListRequest { |
| | | private String name;// String false åç§°ï¼æ¨¡ç³æç´¢ï¼æå¤§é¿åº¦32ï¼è¥å
å«ä¸æï¼æå¤§é¿åº¦æä¸è¶
è¿æç
§æå®ç¼ç çåèé¿åº¦ï¼å³getBytes("utf-8").length |
| | | private List<String> regionIndexCodes;// Array false åºåç¼å·,å¯ä»¥ä¸ºç©º;String[]ï¼æ¯ææ ¹æ®åºåæ¹éæ¥è¯¢ï¼åºåç¼å·ä¸ªæ°<=1000个ï¼å个é¿åº¦<=64Byteï¼ï¼å¯ä»[æ¥è¯¢åºåå表v2]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-APIå表-èµæºç®å½-åºåä¿¡æ¯æ¥å£#æ¥è¯¢åºåå表v2]æ¥å£è·åè¿ååæ°indexCode |
| | | private Boolean isSubRegion;// Boolean false trueæ¶ï¼æç´¢regionIndexCodesåå
¶åååºåçèµæºï¼falseæ¶ï¼åªæç´¢ regionIndexCodesçèµæº |
| | | private int pageNo;// Number true å½å页ç |
| | | private int pageSize;// Number true åé¡µå¤§å° |
| | | private String orderBy;// String false æåºå段,注æï¼æåºå段å¿
é¡»æ¯æ¥è¯¢æ¡ä»¶ï¼å¦åè¿ååæ°é误 |
| | | private String orderType;// String false éåºååº,éåºï¼desc ååºï¼asc |
| | | private List<FireDeviceExpressionRequest> expressions;// Array false æ¥è¯¢è¡¨è¾¾å¼ |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class FireDeviceStatuslListRequest { |
| | | private Integer includeSubNode ;//Number true æ¯å¦å
å«ä¸çº§ (1-å
å«, 0-ä¸å
å«) |
| | | private String regionIndexCode ;//String true æå±åºåindexCodeï¼æ ¹æ®[æ¥è¯¢åºåå表v2]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-APIå表-èµæºç®å½-åºåä¿¡æ¯æ¥å£#æ¥è¯¢åºåå表v2]æ¥å£è·åè¿åæ¥æä¸çindexCodeåæ®µ |
| | | private String deviceName ;//String false 设å¤åç§° |
| | | private Integer deviceType ;//Number false æ¶é²è®¾å¤ç±»åï¼è¯¦è§[éå½A.55 æ¶é²è®¾å¤ç±»å]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-éå½-éå½A æ°æ®åå
¸#éå½A.55 æ¶é²è®¾å¤ç±»å] |
| | | private Integer online ;//Number false å¨çº¿ç¶æ 0-离线 1-å¨çº¿ 空-ææç¶æ |
| | | private Integer unitStatus ;//Number false é¨ä»¶ç¶æï¼0ï¼æªæ³¨å 1ï¼æ£å¸¸ 2: ä¿®å¤ä¸ 3ï¼å¼å¸¸ç¶æï¼ä¿®å¤ä¸ç¶æç®å没ç¨å°ï¼æªæ³¨åæ¶è®¾å¤æ²¡æå¨ç¦»çº¿ç¶æï¼ 空-ææç¶æ |
| | | private String deviceIndexCode ;//String false 设å¤ç¼å·ï¼æ ¹æ®[æ¥è¯¢æ¶é²è®¾å¤å表]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-APIå表-æ¥è¦æ£æµ-æ¶é²åºç¨æå¡-æ¶é²åè½æ¥å£#æ¥è¯¢æ¶é²è®¾å¤å表]æ¥å£è·åè¿åæ¥æä¸çdevSerialNumåæ®µ |
| | | private Integer pageNo ;//Number true ç®æ 页ç ï¼é»è®¤ä»1å¼å§ï¼è¡¨ç¤ºç¬¬ä¸é¡µ |
| | | private Integer pageSize;// Number true æ¯é¡µè®°å½æ°ï¼æ¯é¡µæå¤§æ°é1000,é»è®¤20 |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class NhEventPageListRequest { |
| | | |
| | | private String warningName ;//Query String false é¢åè¦åç§° |
| | | private String nodeName ;//Query String false çæµå¯¹è±¡ |
| | | private String warningLevel ;//Query Number true é¢åè¦ç级ï¼0ï¼å
¨é¨ï¼1ï¼ä¸è¬ï¼2ï¼ä¸¥éï¼3ï¼æ
é |
| | | private String ruleTypeId ;//Query String false é¢åè¦ç±»åIDï¼ä¸ºç©ºæ¶è¡¨ç¤ºææ |
| | | private String startDate ;//Query String false åçæ¶é´å¼å§æ¶é´ |
| | | private String endDate;// Query String false åçæ¶é´ç»ææ¶é´ |
| | | private String handleStatus;// Query String false å¤çç¶æï¼0ï¼å
¨é¨ï¼1ï¼æªå¤çï¼2ï¼å·²å¤ç |
| | | private int pageNo;// Query Number false 页ç |
| | | private int pageSize;// Query Number false é¡µå¤§å° |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SensorStatusListRequest { |
| | | private Integer includeSubNode;// Number true æ¯å¦å
å«ä¸çº§ (1-å
å«ã0-ä¸å
å«) |
| | | private String regionIndexCode ;//String true æå±åºåindexCodeï¼æ ¹æ®[æ¥è¯¢åºåå表v2]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-APIå表-èµæºç®å½-åºåä¿¡æ¯æ¥å£#æ¥è¯¢åºåå表v2]æ¥å£è·åè¿åæ¥æä¸çindexCodeåæ®µ |
| | | private String cn ;//String false ä¼ æå¨åç§° |
| | | private Integer channelType;// Number false ä¼ æå¨ç±»åï¼è¯¦è§[éå½A.57 æ¶é²ä¼ æå¨å¤§ç±»å]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-éå½-éå½A æ°æ®åå
¸#éå½A.57 æ¶é²ä¼ æå¨å¤§ç±»å] |
| | | private Integer unitStatus;// Number false é¨ä»¶ç¶æï¼0ï¼æªæ³¨å 1ï¼æ£å¸¸ 2: ä¿®å¤ä¸ 3ï¼å¼å¸¸ç¶æï¼ä¿®å¤ä¸ç¶æç®å没ç¨å°ï¼æªæ³¨åæ¶è®¾å¤æ²¡æå¨ç¦»çº¿ç¶æï¼ 空-ææç¶æ |
| | | private String channelIndexCode ;//String false ä¼ æå¨ç¼å· |
| | | private int pageNo;// Query Number false 页ç |
| | | private int pageSize;// Query Number false é¡µå¤§å° |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class WxConfigInfoRequest { |
| | | private String tagId;// Query String false æ ç¾ |
| | | private String oaId;// Query String false 微信å
¬ä¼å·é
ç½®ç¼å· |
| | | } |
| | |
| | | @Data |
| | | public class AuthItemListDetailResponse { |
| | | |
| | | private String personId ;//string False 人åID |
| | | private String resourceIndexCode;// string False èµæºçå¯ä¸æ è¯ |
| | | private Integer channelNo;// number False ééå· |
| | | private String channelIndexCode ;//string False èµæºééå¯ä¸æ è¯ï¼å¨æéä¸è½½åé
ç½®æ¥å£å
¥åæ¶å¯¹åºæ¥è¯¢æ¥å£ä¼è¿åï¼ä¸ä½ä¸ºæ¥è¯¢æ¥å£çæ¥è¯¢æ¡ä»¶ï¼ |
| | | private TimeRangeRequest templateConfigInfos;// Object[] False è®¡åæ¨¡æ¿ä¿¡æ¯ |
| | | private Integer personStatus;// number False 人åç¶æ,0ï¼å·²é
ç½®æªä¸è½½1ï¼æ´æ°å¾
ä¸è½½2ï¼æ´æ°å¾
å é¤3ï¼å·²ä¸è½½4ï¼æªé
ç½® |
| | | private Integer cardStatus ;//number False å¡çç¶æ,0ï¼å·²é
ç½®æªä¸è½½1ï¼æ´æ°å¾
ä¸è½½2ï¼æ´æ°å¾
å é¤3ï¼å·²ä¸è½½4ï¼æªé
ç½® |
| | | private Integer faceStatus ;//number False 人è¸ç¶æ,0ï¼å·²é
ç½®æªä¸è½½1ï¼æ´æ°å¾
ä¸è½½2ï¼æ´æ°å¾
å é¤3ï¼å·²ä¸è½½4ï¼æªé
ç½® |
| | | private String cardJson ;//string False è®°å½å·²ä¸è½½å°è®¾å¤çå¡å·ï¼Mapæ ¼å¼ï¼å¡å·ï¼ç¶æï¼ï¼å
¶ä¸ç¶æ(0æ¹å表示ä¸è½½åå¡ççä¿¡æ¯åååäºï¼1å·²ä¸è½½)ï¼ |
| | | private String configTime ;//string False é
ç½®æ¶é´,éç¨ISO8601æ¶é´æ ¼å¼ï¼æå¤§é¿åº¦32个å符ï¼å¦2018-09-03T17:30:08.000+08:00 |
| | | private String startTime;// string False 人åæéæææï¼ä»¥äººä¸ºä¸å¿è®¾å¤æ¶ä½¿ç¨ï¼,å¼å§æ¶é´,éç¨ISO8601æ¶é´æ ¼å¼ï¼æå¤§é¿åº¦32个å符ï¼å¦2018-09-03T17:30:08.000+08:00 |
| | | private String endTime ;//string False 人åæéæææï¼ä»¥äººä¸ºä¸å¿è®¾å¤æ¶ä½¿ç¨ï¼,å¼å§æ¥æ,éç¨ISO8601æ¶é´æ ¼å¼ï¼æå¤§é¿åº¦32个å符ï¼å¦2018-09-03T17:30:08.000+08:00 |
| | | private String personExtendJson;// body string å¦ |
| | | private String personId ;//string False 人åID |
| | | private String resourceIndexCode;// string False èµæºçå¯ä¸æ è¯ |
| | | private Integer channelNo;// number False ééå· |
| | | private String channelIndexCode ;//string False èµæºééå¯ä¸æ è¯ï¼å¨æéä¸è½½åé
ç½®æ¥å£å
¥åæ¶å¯¹åºæ¥è¯¢æ¥å£ä¼è¿åï¼ä¸ä½ä¸ºæ¥è¯¢æ¥å£çæ¥è¯¢æ¡ä»¶ï¼ |
| | | private TimeRangeRequest templateConfigInfos;// Object[] False è®¡åæ¨¡æ¿ä¿¡æ¯ |
| | | private Integer personStatus;// number False 人åç¶æ,0ï¼å·²é
ç½®æªä¸è½½1ï¼æ´æ°å¾
ä¸è½½2ï¼æ´æ°å¾
å é¤3ï¼å·²ä¸è½½4ï¼æªé
ç½® |
| | | private Integer cardStatus ;//number False å¡çç¶æ,0ï¼å·²é
ç½®æªä¸è½½1ï¼æ´æ°å¾
ä¸è½½2ï¼æ´æ°å¾
å é¤3ï¼å·²ä¸è½½4ï¼æªé
ç½® |
| | | private Integer faceStatus ;//number False 人è¸ç¶æ,0ï¼å·²é
ç½®æªä¸è½½1ï¼æ´æ°å¾
ä¸è½½2ï¼æ´æ°å¾
å é¤3ï¼å·²ä¸è½½4ï¼æªé
ç½® |
| | | private String cardJson ;//string False è®°å½å·²ä¸è½½å°è®¾å¤çå¡å·ï¼Mapæ ¼å¼ï¼å¡å·ï¼ç¶æï¼ï¼å
¶ä¸ç¶æ(0æ¹å表示ä¸è½½åå¡ççä¿¡æ¯åååäºï¼1å·²ä¸è½½)ï¼ |
| | | private String configTime ;//string False é
ç½®æ¶é´,éç¨ISO8601æ¶é´æ ¼å¼ï¼æå¤§é¿åº¦32个å符ï¼å¦2018-09-03T17:30:08.000+08:00 |
| | | private String startTime;// string False 人åæéæææï¼ä»¥äººä¸ºä¸å¿è®¾å¤æ¶ä½¿ç¨ï¼,å¼å§æ¶é´,éç¨ISO8601æ¶é´æ ¼å¼ï¼æå¤§é¿åº¦32个å符ï¼å¦2018-09-03T17:30:08.000+08:00 |
| | | private String endTime ;//string False 人åæéæææï¼ä»¥äººä¸ºä¸å¿è®¾å¤æ¶ä½¿ç¨ï¼,å¼å§æ¥æ,éç¨ISO8601æ¶é´æ ¼å¼ï¼æå¤§é¿åº¦32个å符ï¼å¦2018-09-03T17:30:08.000+08:00 |
| | | private String personExtendJson;// body string å¦ |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class FireChannelListResponse { |
| | | private String regionPath;// String false æå±åºåè·¯å¾ï¼æ ¼å¼ï¼@æ ¹èç¹@ååºå1@ |
| | | private String regionIndexCode;// String false æå±åºåç¼å· |
| | | private String regionPathName;// String false æå±åºåè·¯å¾åç§° |
| | | private String fireproChannelSubType ;//Number false ä¼ æå¨å°ç±»åï¼è¯¦è§[éå½A.56] |
| | | private String indexCode;// String false èµæºå¯ä¸æ å¿ |
| | | private String description;// String false æè¿° |
| | | private String updateTime;// String false æ´æ°æ¶é´ï¼ISO8601æ å |
| | | private String fireproChannelMaxValue ;//String false æå¤§éå¼ |
| | | private String createTime;// String false å建æ¶é´ï¼ISO8601æ å |
| | | private String name;// String false èµæºåç§° |
| | | private String fireproChannelAddressCode;// String false ä¼ æå¨å°åç |
| | | private String fireproChannelType ;//Number false ä¼ æå¨å¤§ç±»åï¼è¯¦è§[éå½A.64] |
| | | private String parentIndexCode;// String false æå±è®¾å¤ç¼ç |
| | | private String resourceType;// String false èµæºç±»åï¼fireSensorï¼æ¶é²ä¼ æå¨ï¼è¯¦è§[éå½A.64] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class FireDeviceListResponse { |
| | | private String regionPath;// String false æå±åºåè·¯å¾ï¼æ ¼å¼ï¼@æ ¹èç¹@ååºå1@ |
| | | private String deviceType;// String false 设å¤ç±»å |
| | | private String regionIndexCode;// String false æå±åºåç¼å· |
| | | private String fireproDeviceCommunication ;//String false æå±è¿è¥ååéä¿¡ç±»å |
| | | private String regionPathName;// String false æå±åºåè·¯å¾åç§° |
| | | private String ip;// String false è®¾å¤æå¨IP |
| | | private String indexCode;// String false èµæºå¯ä¸æ å¿ |
| | | private String description;// String false æè¿° |
| | | private String createTime;// String false å建æ¶é´ï¼ISO8601æ å |
| | | private String updateTime;// String false æ´æ°æ¶é´ï¼ISO8601æ å |
| | | private String deviceCode;// String false 主å¨è®¾å¤ç¼å· |
| | | private String manufacturer ;//String false åå |
| | | private String port;// String false 设å¤ç«¯å£ |
| | | private String name;// String false èµæºåç§° |
| | | private String resourceType ;//String false èµæºç±»åï¼fireDeviceï¼æ¶é²è®¾å¤ |
| | | private String devSerialNum ;//String false 设å¤åºåå· |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class FireDeviceStatusListResponse { |
| | | private String id ;//String false é¢åè¦äºä»¶å¯ä¸æ è¯ |
| | | private String warningName ;//String false é¢åè¦åç§° |
| | | private String nodeType ;//Number false èç¹ç±»å |
| | | private String nodeId ;//String false èç¹ID |
| | | private String nodeName;// String false èç¹åç§° |
| | | private String nodePath;// String false èç¹è·¯å¾ |
| | | private String ruleType ;//String false é¢åè¦ç±»å |
| | | private String warningLevel ;//Number false é¢åè¦ç级ï¼1ï¼ä¸è¬ï¼2ï¼ä¸¥éï¼3ï¼æ
é |
| | | private String warningValue ;//String false æ°æ®é¡¹å½åå¼ |
| | | private String warningEventTip;// String false å¼å¸¸åå |
| | | private String createTime;// String false åçæ¶é´ |
| | | private String benchmark;// String false åºåæ°æ® |
| | | private String handleStatus;// Number false å¤çç¶æï¼1ï¼æªå¤çï¼2ï¼å·²å¤ç |
| | | private String note;// String false å¤çæè§ |
| | | private String handleTime;// String false å¤çæ¶é´ |
| | | private String normal;// Boolean false é¢åè¦æ¯å¦æ£å¸¸ |
| | | private String deviceId;// String false 设å¤id |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class NhEventPageListResponse { |
| | | private String id ;//String false é¢åè¦äºä»¶å¯ä¸æ è¯ |
| | | private String warningName ;//String false é¢åè¦åç§° |
| | | private String nodeType ;//Number false èç¹ç±»å |
| | | private String nodeId ;//String false èç¹ID |
| | | private String nodeName;// String false èç¹åç§° |
| | | private String nodePath;// String false èç¹è·¯å¾ |
| | | private String ruleType ;//String false é¢åè¦ç±»å |
| | | private String warningLevel ;//Number false é¢åè¦ç级ï¼1ï¼ä¸è¬ï¼2ï¼ä¸¥éï¼3ï¼æ
é |
| | | private String warningValue ;//String false æ°æ®é¡¹å½åå¼ |
| | | private String warningEventTip;// String false å¼å¸¸åå |
| | | private String createTime;// String false åçæ¶é´ |
| | | private String benchmark;// String false åºåæ°æ® |
| | | private String handleStatus;// Number false å¤çç¶æï¼1ï¼æªå¤çï¼2ï¼å·²å¤ç |
| | | private String note;// String false å¤çæè§ |
| | | private String handleTime;// String false å¤çæ¶é´ |
| | | private String normal;// Boolean false é¢åè¦æ¯å¦æ£å¸¸ |
| | | private String deviceId;// String false 设å¤id |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SensorStatusListResponse { |
| | | private String cn;// String false ä¼ æå¨åç§° |
| | | private String indexCode ;//String false ä¼ æå¨ç¼ç |
| | | private String regionIndexCode;// String false æå±åºå |
| | | private String regionName ;//String false åºåè·¯å¾åç§°ï¼â\âåé |
| | | private String channelIndexCode;// String false ä¼ æå¨ç¼å· |
| | | private Integer channelType;// Number false ä¼ æå¨å¤§ç±»åï¼è¯¦è§[éå½A.57 æ¶é²ä¼ æå¨å¤§ç±»å]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-éå½-éå½A æ°æ®åå
¸#éå½A.57 æ¶é²ä¼ æå¨å¤§ç±»å] |
| | | private String channelSubType ;//String false ä¼ æå¨å°ç±»åï¼è¯¦è§[éå½A.56 æ¶é²ä¼ æå¨å°ç±»å]@[æºæ
§ååºç®¡çå¹³å°V1.4.301-éå½-éå½A æ°æ®åå
¸#éå½A.56 æ¶é²ä¼ æå¨å°ç±»å] |
| | | private Integer unitStatus ;//Number false é¨ä»¶ç¶æï¼0ï¼æªæ³¨å 1ï¼æ£å¸¸ 2: ä¿®å¤ä¸ 3ï¼å¼å¸¸ç¶æï¼ä¿®å¤ä¸ç¶æç®å没ç¨å°ï¼æªæ³¨åæ¶è®¾å¤æ²¡æå¨ç¦»çº¿ç¶æï¼ 空-ææç¶æ |
| | | private String collectTime ;// String false æ´æ°æ¶é´ï¼IOS8601æ ¼å¼ |
| | | private String parentName ;// String false ç¶èµæºåç§° |
| | | private String faultType ;// String false æ
éç±»åï¼","å·åéï¼è¯¦è§[éå½A.89 æ¶é²æ
éç±»å@[æºæ
§ååºç®¡çå¹³å°V1.4.301-éå½-éå½A æ°æ®åå
¸#éå½A.89 æ¶é²æ
éç±»å] |
| | | private String faultName ;// String false æ
éç±»ååç§°ï¼âï¼âå·åé |
| | | private String faultNum ;// String false æ
鿬¡æ° |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class WxConfigInfoResponse { |
| | | private String id;// String false 微信å
¬ä¼å·é
ç½®id |
| | | private String appKey;// String false 微信å
¬ä¼å·app_key |
| | | private String appSecret ;//String false 微信å
¬ä¼å·app_secret |
| | | private String oaName;// String false 微信å
¬ä¼å·åç§° |
| | | private String modelDataId ;//String false pdmsæ°æ®ä¸»é® |
| | | private String domainId ;//String false æå±ç½ç»id |
| | | private String netProtocol;// String false ç½ç»åè®® |
| | | private String port;// String false 端å£å· |
| | | private String tagId;// String false ç»å»ºæ è¯ |
| | | private String templateUrl;// String false æ¨¡æ¿æ¶æ¯å°åé
ç½® |
| | | private String proxySwitch;// String false æ¯å¦å¼å¯ä»£ç 1 å¼ 0 å
³ |
| | | } |
| | |
| | | package com.doumee.core.haikang.service; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.BeanUtils; |
| | | import oshi.hardware.Sensors; |
| | | import sun.management.Sensor; |
| | | |
| | | import java.io.InputStream; |
| | | import java.lang.reflect.Field; |
| | |
| | | return null; |
| | | } |
| | | /** |
| | | *æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<WxConfigInfoResponse>> getWxConfig(WxConfigInfoRequest param){ |
| | | log.info("ãæµ·åº·æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.getWxConfig(toMap(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<BaseListPageResponse<WxConfigInfoResponse>>>(){}; |
| | | BaseResponse<BaseListPageResponse<WxConfigInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"æµ·åº·æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·æ ¹æ®é
置微信å
¬ä¼å·ç¼å·æ¥è¯¢å¾®ä¿¡å
¬ä¼å·ä¿¡æ¯ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | *å页æ¥è¯¢æ¶é²è®¾å¤é¨ä»¶ç¶æ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<FireDeviceStatusListResponse>> fireDeviceStatusSearch(FireDeviceStatuslListRequest param){ |
| | | log.info("ãæµ·åº·æ¥è¯¢æ¶é²è®¾å¤é¨ä»¶ç¶æã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.fireDeviceStatusSearch(toMap(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<BaseListPageResponse<FireDeviceStatusListResponse>>>(){}; |
| | | BaseResponse<BaseListPageResponse<FireDeviceStatusListResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æ"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·æ¥è¯¢æ¶é²è®¾å¤é¨ä»¶ç¶æã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<SensorStatusListResponse>> sensorStatusSearch(SensorStatusListRequest param){ |
| | | log.info("ãæµ·åº·å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.sensorStatusSearch(toMap(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<BaseListPageResponse<SensorStatusListResponse>>>(){}; |
| | | BaseResponse<BaseListPageResponse<SensorStatusListResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æ"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å页æ¥è¯¢æ¶é²ä¼ æå¨é¨ä»¶ç¶æã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | *æ¥è¯¢æ¶é²ä¼ æå¨å表 |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<FireChannelListResponse>> fireChannelSearch(FireChannelListRequest param){ |
| | | log.info("ãæµ·åº·æ¥è¯¢æ¶é²ä¼ æå¨å表ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.fireChannelSearch(toMap(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<BaseListPageResponse<FireChannelListResponse>>>(){}; |
| | | BaseResponse<BaseListPageResponse<FireChannelListResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康æ¥è¯¢æ¶é²ä¼ æå¨å表"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·æ¥è¯¢æ¶é²ä¼ æå¨å表ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *询æ¶é²è®¾å¤å表 |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<FireDeviceListResponse>> fireDeviceSearch(FireDeviceListRequest param){ |
| | | log.info("ãæµ·åº·è¯¢æ¶é²è®¾å¤å表ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.fireDeviceSearch(toMap(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<BaseListPageResponse<FireDeviceListResponse>>>(){}; |
| | | BaseResponse<BaseListPageResponse<FireDeviceListResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康询æ¶é²è®¾å¤å表"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·è¯¢æ¶é²è®¾å¤å表ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *å页è·ååè¦äºä»¶ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<NhEventPageListResponse>> nhEventPageList(NhEventPageListRequest param){ |
| | | log.info("ãæµ·åº·å页è·ååè¦äºä»¶ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.nhEventPageList(toMap(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<BaseListPageResponse<NhEventPageListResponse>>>(){}; |
| | | BaseResponse<BaseListPageResponse<NhEventPageListResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å页è·ååè¦äºä»¶"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å页è·ååè¦äºä»¶ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *æ¥è¯¢è®¿å®¢æ¥è®¿è®°å½ï¼å·²ç»è®°ï¼ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | |
| | | |
| | | @ApiModelProperty(value = "æåäºä»¶æ¨éæ¶é´") |
| | | @ExcelColumn(name="æåäºä»¶æ¨éæ¶é´") |
| | | |
| | | private Date lastEventTime; |
| | | |
| | | @ApiModelProperty(value = "çæ§ç¹åç§°ï¼å¤ä¸ªç¨è±æéå·éå¼") |
| | |
| | | private String groupName; |
| | | @ApiModelProperty(value = "å
³èLEDç¼ç éåï¼è±æéå·éå¼", example = "1") |
| | | @TableField(exist = false) |
| | | private String ledIds; |
| | | private List<Integer> ledIds; |
| | | @ApiModelProperty(value = "å
³è广æç¼ç éåï¼è±æéå·éå¼", example = "1") |
| | | @TableField(exist = false) |
| | | private String broadcastIds; |
| | | private List<Integer> broadcastIds; |
| | | @ApiModelProperty(value = "å
³èLEDåç§°éåï¼è±æéå·éå¼", example = "1") |
| | | @TableField(exist = false) |
| | | private String ledNames; |
| | |
| | | @ExcelColumn(name="ç¾å°æ¶é´") |
| | | private Date signDate; |
| | | |
| | | @ApiModelProperty(value = "ç¾å°æ¹å¼ 0appç¾å° 1æ«ç ç¾å°", example = "1") |
| | | @ExcelColumn(name="ç¾å°æ¹å¼ 0appç¾å° 1æ«ç ç¾å°") |
| | | @ApiModelProperty(value = "ç¾å°æ¹å¼ 0appç¾å° 1æ«ç ç¾å° 2åå°ç¾å°", example = "1") |
| | | @ExcelColumn(name="ç¾å°æ¹å¼ 0appç¾å° 1æ«ç ç¾å° 2åå°ç¾å°") |
| | | private Integer singType; |
| | | @ApiModelProperty(value = "éç¥WMSä½ä¸ç»å®æå°æ¶é´") |
| | | @ExcelColumn(name="éç¥WMSä½ä¸ç»å®æå°æ¶é´") |
| | |
| | | private Date createDate; |
| | | @ApiModelProperty(value = "äºä»¶å
容说æ") |
| | | private String content; |
| | | @ApiModelProperty(value = "æå°åç§°") |
| | | private String platformName; |
| | | @ApiModelProperty(value = "æå°ç¼ç ") |
| | | private String platfromHkId; |
| | | } |
| | |
| | | @ApiModelProperty(value = "ä»»å¡ä¸»é®") |
| | | private Integer jobId; |
| | | |
| | | @ApiModelProperty(value = "ç¾å°ç±»åï¼ 0=appç¾å° 1=æ«ç ç¾å°") |
| | | @ApiModelProperty(value = "ç¾å°ç±»åï¼ 0=appç¾å° 1=æ«ç ç¾å° 2=åå°ç¾å°") |
| | | private Integer signType; |
| | | |
| | | @ApiModelProperty(value = "ç¾å°äºç»´ç å¼") |
| | |
| | | ; |
| | | PageData<PlatformBooks> pageData = PageData.from(platformBooksMapper.selectPage(page, queryWrapper)); |
| | | for (PlatformBooks platformBooks:pageData.getRecords()) { |
| | | if(Constants.equalsInteger(platformBooks.getStatus(),Constants.ONE)){ |
| | | if(Constants.equalsInteger(platformBooks.getStatus(),Constants.ONE)||Constants.equalsInteger(platformBooks.getStatus(),Constants.ZERO)){ |
| | | String auditName = approveService.getApproveUserName(platformBooks.getId(),Constants.approveObjectType.reason); |
| | | platformBooks.setAuditName(auditName); |
| | | } |
| | |
| | | .eq(pageWrap.getModel().getPlatformGroupId() != null, PlatformJob::getPlatformGroupId, pageWrap.getModel().getPlatformGroupId()) |
| | | |
| | | .apply(pageWrap.getModel().getQueryStatus() != null, " find_in_set(t.`STATUS`,'"+pageWrap.getModel().getQueryStatus()+"')") |
| | | .ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getStartDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart())) |
| | | .le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getStartDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd())) |
| | | .ge(pageWrap.getModel().getBeginWorkDateStart() != null, PlatformJob::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getBeginWorkDateStart())) |
| | | .le(pageWrap.getModel().getBeginWorkDateEnd() != null, PlatformJob::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getBeginWorkDateEnd())) |
| | | .eq(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ONE,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh) |
| | | .ne(pageWrap.getModel().getJobType() != null && Constants.equalsInteger(Constants.ZERO,pageWrap.getModel().getJobType()), PlatformJob::getType, Constants.platformJobType.sgscxh) |
| | | ; |
| | |
| | | }else{ |
| | | platformJob.setWaitTime("çå¾
å«å·"); |
| | | } |
| | | }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey())){ |
| | | }else if(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WORKING.getKey()) |
| | | || Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.DONE.getKey())){ |
| | | //æ¥è¯¢æåå¼å§ä»»å¡çæå°è®°å½ æ¥å¿è¡¨ å 为åå¨å¼å¸¸æèµ· 转移 çé®é¢ |
| | | PlatformLog platformLog = platformLogMapper.selectOne(new QueryWrapper<PlatformLog>().lambda() |
| | | .eq(PlatformLog::getJobId,platformJob.getId()) |
| | |
| | | .leftJoin(Platform.class,Platform::getId,PlatformJob::getPlatformId) |
| | | .eq(PlatformJob::getIsdeleted,Constants.ZERO) |
| | | .eq(PlatformJob::getDrivierPhone,loginUserInfo.getMobile()) |
| | | .like(PlatformJob::getArriveDate,DateUtil.getCurrDate()) |
| | | // .like(PlatformJob::getArriveDate,DateUtil.getCurrDate()) |
| | | .orderByDesc(PlatformJob::getId) |
| | | ); |
| | | for (PlatformJob platformJob:platformJobList) { |
| | |
| | | |
| | | PlatformJob oldPlatformJob = new PlatformJob(); |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | |
| | | platformJob.setConfirmTaskDate(new Date()); |
| | | platformJob.setArriveDate(confirmTaskDTO.getArriveDate()); |
| | | platformJob.setCarCodeBack(confirmTaskDTO.getCarCodeBack()); |
| | | platformJob.setStatus(Constants.PlatformJobStatus.WART_SIGN_IN.getKey()); |
| | | platformJob.setEditDate(new Date()); |
| | | platformJobMapper.updateById(platformJob); |
| | |
| | | if(Objects.isNull(platformJob)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å¡ç¶æå·²æµè½¬ï¼è¯·å·æ°æ¥ç"); |
| | | } |
| | | |
| | | PlatformJob oldPlatformJob = new PlatformJob(); |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | |
| | | if(Constants.equalsInteger(signInDTO.getSignType(),Constants.ZERO)){ |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å¡ç¶æå·²æµè½¬ï¼è¯·å·æ°æ¥ç"); |
| | | } |
| | | this.distanceSignIn(signInDTO,platformJob); |
| | | }else if(Constants.equalsInteger(signInDTO.getSignType(),Constants.ONE)){ |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å¡ç¶æå·²æµè½¬ï¼è¯·å·æ°æ¥ç"); |
| | | } |
| | | this.sceneSignIn(signInDTO); |
| | | }else if(Constants.equalsInteger(signInDTO.getSignType(),Constants.TWO)){ |
| | | if(!(Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WAIT_CONFIRM.getKey())|| |
| | | Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.WART_SIGN_IN.getKey())) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä¸å¡ç¶æå·²æµè½¬ï¼è¯·å·æ°æ¥ç"); |
| | | } |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"ç¾å°ç±»åé误"); |
| | | } |
| | | platformJob.setSignDate(new Date()); |
| | | platformJob.setSingType(Constants.ZERO); |
| | | platformJob.setSingType(signInDTO.getSignType()); |
| | | platformJob.setStatus(Constants.PlatformJobStatus.WAIT_CALL.getKey()); |
| | | platformJobMapper.updateById(platformJob); |
| | | //å卿使¥å¿ |
| | |
| | | Constants.PlatformJobLogType.SIGN.getInfo()); |
| | | } |
| | | |
| | | |
| | | public void distanceSignIn(SignInDTO signInDTO , PlatformJob platformJob){ |
| | | if(Objects.isNull(signInDTO.getLat()) |
| | | || Objects.isNull(signInDTO.getLnt())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"ç»çº¬åº¦ä¿¡æ¯å¼å¸¸"); |
| | | } |
| | | |
| | | //è·åç¾å°ç¹çç»çº¬åº¦ |
| | | Double lat = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LAT).getCode()); |
| | | Double lnt = Double.parseDouble(systemDictDataBiz.queryByCode(Constants.PLATFORM,Constants.SIGN_IN_PLACE_LNT).getCode()); |
| | |
| | | } |
| | | |
| | | public void sceneSignIn(SignInDTO signInDTO){ |
| | | |
| | | if( StringUtils.isNotBlank(signInDTO.getQrCodeKey())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | |
| | | || Constants.equalsInteger(platformJob.getType(),Constants.FOUR)){ |
| | | //TODO ä¸åå
¥åæé |
| | | |
| | | |
| | | } |
| | | //å卿使¥å¿ |
| | | savePlatformLog(Constants.PlatformJobLogType.IN_WAIT.getKey(),oldPlatformJob,platformJob, |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import cn.emay.sdk.util.StringUtil; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DeviceMapper; |
| | | import com.doumee.dao.business.PlatformDeviceMapper; |
| | | import com.doumee.dao.business.PlatformMapper; |
| | | import com.doumee.dao.business.join.PlatformJoinMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformGroup; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.openapi.response.PlatformNumByStatusResponse; |
| | | import com.doumee.service.business.PlatformDeviceService; |
| | | import com.doumee.service.business.PlatformService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | private PlatformMapper platformMapper; |
| | | @Autowired |
| | | private PlatformJoinMapper platformJoinMapper; |
| | | @Autowired |
| | | private PlatformDeviceMapper platformDeviceMapper; |
| | | @Autowired |
| | | private DeviceMapper deviceMapper; |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer create(Platform platform) { |
| | | platform.setCreateDate(new Date()); |
| | | platform.setIsdeleted(Constants.ZERO); |
| | | platform.setCreator(platform.getLoginUserInfo().getId()); |
| | | platformMapper.insert(platform); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platform.getLedIds())){ |
| | | List<PlatformDevice> platformDeviceList = new ArrayList<>(); |
| | | for (Integer ledId:platform.getLedIds()) { |
| | | Device device = deviceMapper.selectById(ledId); |
| | | if(Objects.isNull(device)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°led设å¤ä¿¡æ¯ã"+ledId+"ã"); |
| | | } |
| | | PlatformDevice platformDevice = new PlatformDevice(); |
| | | platformDevice.setIsdeleted(Constants.ZERO); |
| | | platformDevice.setPlatformId(platform.getId()); |
| | | platformDevice.setCreateDate(new Date()); |
| | | platformDevice.setCreator(platform.getLoginUserInfo().getId()); |
| | | platformDevice.setType(Constants.ZERO); |
| | | platformDevice.setDeviceId(ledId.toString()); |
| | | platformDevice.setHkId(device.getHkId()); |
| | | platformDevice.setName(device.getName()); |
| | | platformDeviceList.add(platformDevice); |
| | | } |
| | | platformDeviceMapper.insert(platformDeviceList); |
| | | } |
| | | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platform.getBroadcastIds())){ |
| | | List<PlatformDevice> platformDeviceList = new ArrayList<>(); |
| | | for (Integer broadcastId:platform.getBroadcastIds()) { |
| | | Device device = deviceMapper.selectById(broadcastId); |
| | | if(Objects.isNull(device)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°å¹¿æè®¾å¤ä¿¡æ¯ã"+broadcastId+"ã"); |
| | | } |
| | | PlatformDevice platformDevice = new PlatformDevice(); |
| | | platformDevice.setIsdeleted(Constants.ZERO); |
| | | platformDevice.setPlatformId(platform.getId()); |
| | | platformDevice.setCreateDate(new Date()); |
| | | platformDevice.setCreator(platform.getLoginUserInfo().getId()); |
| | | platformDevice.setType(Constants.TWO); |
| | | platformDevice.setDeviceId(broadcastId.toString()); |
| | | platformDevice.setHkId(device.getHkId()); |
| | | platformDevice.setName(device.getName()); |
| | | platformDeviceList.add(platformDevice); |
| | | } |
| | | platformDeviceMapper.insert(platformDeviceList); |
| | | } |
| | | |
| | | return platform.getId(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void updateById(Platform platform) { |
| | | platform.setEditor(platform.getLoginUserInfo().getId()); |
| | | platform.setEditDate(new Date()); |
| | | //å é¤LED/å¹¿ææ°æ® |
| | | platformDeviceMapper.delete(new QueryWrapper<PlatformDevice>().lambda() |
| | | .eq(PlatformDevice::getPlatformId,platform.getId()) |
| | | .in(PlatformDevice::getType,Constants.ZERO,Constants.TWO) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platform.getLedIds())){ |
| | | List<PlatformDevice> platformDeviceList = new ArrayList<>(); |
| | | String ledNames = ""; |
| | | for (Integer ledId:platform.getLedIds()) { |
| | | Device device = deviceMapper.selectById(ledId); |
| | | if(Objects.isNull(device)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°led设å¤ä¿¡æ¯ã"+ledId+"ã"); |
| | | } |
| | | PlatformDevice platformDevice = new PlatformDevice(); |
| | | platformDevice.setIsdeleted(Constants.ZERO); |
| | | platformDevice.setPlatformId(platform.getId()); |
| | | platformDevice.setCreateDate(new Date()); |
| | | platformDevice.setCreator(platform.getLoginUserInfo().getId()); |
| | | platformDevice.setType(Constants.ZERO); |
| | | platformDevice.setDeviceId(ledId.toString()); |
| | | platformDevice.setHkId(device.getHkId()); |
| | | platformDevice.setName(device.getName()); |
| | | platformDeviceList.add(platformDevice); |
| | | } |
| | | platformDeviceMapper.insert(platformDeviceList); |
| | | platform.setLedNames(ledNames); |
| | | } |
| | | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platform.getBroadcastIds())){ |
| | | List<PlatformDevice> platformDeviceList = new ArrayList<>(); |
| | | String ledNames = ""; |
| | | for (Integer broadcastId:platform.getBroadcastIds()) { |
| | | Device device = deviceMapper.selectById(broadcastId); |
| | | if(Objects.isNull(device)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"æªæ¥è¯¢å°å¹¿æè®¾å¤ä¿¡æ¯ã"+broadcastId+"ã"); |
| | | } |
| | | PlatformDevice platformDevice = new PlatformDevice(); |
| | | platformDevice.setIsdeleted(Constants.ZERO); |
| | | platformDevice.setPlatformId(platform.getId()); |
| | | platformDevice.setCreateDate(new Date()); |
| | | platformDevice.setCreator(platform.getLoginUserInfo().getId()); |
| | | platformDevice.setType(Constants.TWO); |
| | | platformDevice.setDeviceId(broadcastId.toString()); |
| | | platformDevice.setHkId(device.getHkId()); |
| | | platformDevice.setName(device.getName()); |
| | | platformDeviceList.add(platformDevice); |
| | | } |
| | | platformDeviceMapper.insert(platformDeviceList); |
| | | } |
| | | |
| | | platformMapper.updateById(platform); |
| | | } |
| | | |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(platformMapper.selectJoinPage(page,Platform.class, queryWrapper)); |
| | | PageData<Platform> platformPageData = PageData.from(platformMapper.selectJoinPage(page,Platform.class, queryWrapper)); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(platformPageData.getRecords())){ |
| | | for (Platform platform:platformPageData.getRecords()) { |
| | | List<PlatformDevice> ledDevice = platformDeviceMapper.selectList(new QueryWrapper<PlatformDevice>().lambda() |
| | | .eq(PlatformDevice::getPlatformId,platform.getId()) |
| | | .eq(PlatformDevice::getType,Constants.ZERO) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ledDevice)){ |
| | | platform.setLedNames(String.join(",", ledDevice.stream().map(m->m.getName()).collect(Collectors.toList()))); |
| | | platform.setLedIds( |
| | | ledDevice.stream().map(m->Integer.valueOf(m.getDeviceId())).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | |
| | | List<PlatformDevice> broadcastDevice = platformDeviceMapper.selectList(new QueryWrapper<PlatformDevice>().lambda() |
| | | .eq(PlatformDevice::getPlatformId,platform.getId()) |
| | | .eq(PlatformDevice::getType,Constants.TWO) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(broadcastDevice)){ |
| | | platform.setBroadcastNames(String.join(",", broadcastDevice.stream().map(m->m.getName()).collect(Collectors.toList()))); |
| | | platform.setBroadcastIds( |
| | | broadcastDevice.stream().map(m->Integer.valueOf(m.getDeviceId())).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | return platformPageData; |
| | | } |
| | | |
| | | @Override |