| | |
| | | <if test="dto.companyType != null "> |
| | | AND sd.`type` = #{dto.companyType} |
| | | </if> |
| | | <if test="dto.querySpecial != null and dto.querySpecial = 1 "> |
| | | <if test="dto.querySpecial != null and dto.querySpecial == 1 "> |
| | | AND find_in_set(#{dto.companySpecialId},REPLACE(sd.company_path,"/",",")) |
| | | </if> |
| | | </where> |
| | |
| | | package com.doumee.cloud.board; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import io.swagger.annotations.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/board/api/platformJobRun") |
| | | public class PlatformJobRunController extends BaseController { |
| | | |
| | | @ApiModelProperty |
| | | @Autowired |
| | | private PlatformJobJoinMapper platformJobJoinMapper; |
| | | |
| | | @LoginNoRequired |
| | |
| | | data.setTodayOutRata(new BigDecimal(random.nextInt(100))); |
| | | data.setMonthOutRata(data.getTodayOutRata().multiply(new BigDecimal(30))); |
| | | |
| | | |
| | | data.setStockMax(new BigDecimal(random.nextInt(1000))); |
| | | data.setStockTotal(new BigDecimal(data.getStockMax().intValue())); |
| | | return ApiResponse.success(data); |
| | | } |
| | | |
| | |
| | | } |
| | | for (String str:dayList) { |
| | | TransportMeasureVO data = new TransportMeasureVO(); |
| | | data.setPlanTimes(str); |
| | | data.setPlanDate(str); |
| | | data.setPlanTimes(random.nextInt(200)); |
| | | data.setPlanTaskNum(new BigDecimal(random.nextInt(1000))); |
| | | data.setFinishTaskNum(new BigDecimal(data.getPlanTaskNum().intValue())); |
| | | list.add(data); |
| | |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("访客åæ") |
| | | @GetMapping("/getVisitData") |
| | | public ApiResponse<VisitDataVO> getVisitData() { |
| | | VisitDataVO visitDataVO = new VisitDataVO(); |
| | | Random random = new Random(); |
| | | visitDataVO.setRegisterVisitNum(random.nextInt(20)); |
| | | visitDataVO.setRegisterVisitRata(BigDecimal.valueOf(random.nextInt(20))); |
| | | visitDataVO.setLevelNum(random.nextInt(20)); |
| | | visitDataVO.setLevelRata(BigDecimal.valueOf(random.nextInt(20))); |
| | | visitDataVO.setWaitVisitNum(random.nextInt(20)); |
| | | visitDataVO.setWaitVisitRata(BigDecimal.valueOf(random.nextInt(20))); |
| | | visitDataVO.setRetentionNum(random.nextInt(20)); |
| | | visitDataVO.setRetentionRata(BigDecimal.valueOf(random.nextInt(20))); |
| | | return ApiResponse.success(visitDataVO); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * è·åèå |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String getHkMenu(Map<String,String> body) { |
| | | return startDoGetStringArtemis(HKConstants.InterfacePath.getMenus,body); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * åéçä¿¡éªè¯ç |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String sendSms(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.sendSms,body); |
| | | } |
| | | |
| | | /** |
| | | * è·åæå°ç»ä»¶é
ç½®çLEDè®¾å¤æ¸
å |
| | | * @param body |
| | |
| | | return null; |
| | | } |
| | | |
| | | public static BaseResponse sendSmsByHk(Map<String,Object> param,String url){ |
| | | log.info("ãæµ·åº·åéçä¿¡ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse>(){}; |
| | | String res = HttpsUtil.postJson(url, JSONObject.toJSONString(param)); |
| | | BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康åéçä¿¡"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·åéçä¿¡ã================失败====ï¼\n"+ e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public static BaseResponse sendSms(Map<String,Object> param){ |
| | | log.info("ãåéçä¿¡ä¿¡æ¯ã================å¼å§===="+ JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.sendSms(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse>(){}; |
| | | BaseResponse result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"åéçä¿¡ä¿¡æ¯"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãåéçä¿¡ä¿¡æ¯ã================失败====ï¼\n"+ e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | private static void logResult(BaseResponse res,String name) { |
| | | if(StringUtils.equals(res.getCode(),HKConstants.RESPONSE_SUCCEE)){ |
| | | log.info("ã"+name+"ã================æå====\n"+res); |
| | |
| | | @ApiModelProperty(value = "æ¬æå
¥åºæç") |
| | | private BigDecimal monthInRata; |
| | | |
| | | @ApiModelProperty(value = "åºåæå¤§å¼") |
| | | private BigDecimal stockMax; |
| | | |
| | | @ApiModelProperty(value = "å½ååºå") |
| | | private BigDecimal stockTotal; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "è¿è¾ä»»å¡åæ - 7æ¥" , hidden = true) |
| | | private List<TransportMeasureVO> transportMeasureWeekList; |
| | | |
| | |
| | | private BigDecimal finishTaskNum; |
| | | |
| | | @ApiModelProperty(value = "计å任塿°") |
| | | private String planTimes; |
| | | private Integer planTimes; |
| | | |
| | | @ApiModelProperty(value = "æ¥æ") |
| | | private String planDate; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response.platformReport; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * è®¿å®¢åæ |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/10/25 10:59 |
| | | */ |
| | | @Data |
| | | public class VisitDataVO { |
| | | |
| | | @ApiModelProperty(value = "å¾
è®¿é®æ°é") |
| | | private Integer waitVisitNum; |
| | | |
| | | @ApiModelProperty(value = "å¾
访é®å æ¯") |
| | | private BigDecimal waitVisitRata; |
| | | |
| | | @ApiModelProperty(value = "å·²ç»è®°æ°é") |
| | | private Integer registerVisitNum; |
| | | |
| | | @ApiModelProperty(value = "å·²ç»è®°å æ¯") |
| | | private BigDecimal registerVisitRata; |
| | | |
| | | @ApiModelProperty(value = "å·²ç¦»å¼æ°é") |
| | | private Integer levelNum; |
| | | |
| | | @ApiModelProperty(value = "已离å¼å æ¯") |
| | | private BigDecimal levelRata; |
| | | |
| | | @ApiModelProperty(value = "æ»çæ°é") |
| | | private Integer retentionNum; |
| | | |
| | | @ApiModelProperty(value = "æ»çå æ¯") |
| | | private BigDecimal retentionRata; |
| | | |
| | | |
| | | } |
| | |
| | | .eq(VisitPark::getObjType,Constants.ONE) |
| | | .eq(VisitPark::getHkStatus,Constants.ONE) |
| | | .isNotNull(VisitPark::getHkId) |
| | | .apply(" END_TIME > now() ") |
| | | .orderByDesc(VisitPark::getCreateDate) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(visitParkList)){ |
| | | for (VisitPark visitPark:visitParkList) { |
| | |
| | | if(Objects.isNull(platformJob)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | if(!Constants.equalsInteger(platformJob.getStatus(),Constants.PlatformJobStatus.CALLED.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·,ä¸å¡ç¶æå·²æµè½¬ï¼"); |
| | | } |
| | | |
| | | Platform platform = platformJoinMapper.selectById(jobOperateDTO.getPlatformId()); |
| | | if(Objects.isNull(platform)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°æå°ä¿¡æ¯"); |
| | | } |
| | | |
| | | PlatformJob oldPlatformJob = new PlatformJob(); |
| | | BeanUtils.copyProperties(platformJob,oldPlatformJob); |
| | | |
| | |
| | | emayService,smsEmailMapper,smsConfigMapper,platformJobMapper,platformJob.getId(), |
| | | SmsConstants.platformJobContent.platformJobOverNum,null,null |
| | | ); |
| | | |
| | | platformJob.setPlatformName(platform.getName()); |
| | | this.broadcastAndLEed(platformJob, StringUtils.isBlank(platform.getLedContent())?Constants.PlatformLedContent.IDEL_CONTNET.getName():platform.getLedContent(), |
| | | null |
| | | ); |
| | | |
| | | return platformJob; |
| | | } |
| | |
| | | |
| | | public void sendSmsByHk(String phone,String content){ |
| | | try { |
| | | String url = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_HTTPS).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_HOST).getCode() + |
| | | HKConstants.ARTEMIS_PATH + |
| | | HKConstants.InterfacePath.sendSms[0]; |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("phoneNo",phone.split(",")); |
| | | map.put("content",content); |
| | | BaseResponse result = HKService.sendSmsByHk(map,url); |
| | | BaseResponse result = HKService.sendSms(map); |
| | | if(result !=null){ |
| | | if(!StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),result.getMsg()); |