Merge branch 'wuhuyancao' of http://139.186.142.91:10010/r/productDev/dmvisit into wuhuyancao
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | config: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_dev |
| | | # namespace: dev_renkang |
| | | username: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dev_renkang |
| | | namespace: dmvisit |
| | | username: nacos |
| | |
| | | username: nacos |
| | | password: Atwl@2024 |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | config: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_dev |
| | | # namespace: dev_renkang |
| | | username: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: wuhu_visit_dev |
| | | namespace: dmvisit_dev |
| | | username: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | config: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_test |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_test |
| | | username: nacos |
| | | password: nacos |
| | |
| | | spring: |
| | | cloud: |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | |
| | | spring: |
| | | cloud: |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | |
| | | spring: |
| | | cloud: |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | namespace: wuhu_visit_test |
| | | username: nacos |
| | |
| | | @ExcelColumn(name="é£ä¹¦æè¿åæ¥æ¶é´") |
| | | private Date fsDate; |
| | | |
| | | @ApiModelProperty(value = "ç¸å
³æ¹ä½¿ç¨ 对æ¥ç»ç»") |
| | | private Integer relationCompanyId; |
| | | |
| | | @ApiModelProperty(value = "ç¸å
³æ¹ä½¿ç¨ 对æ¥äººå") |
| | | private Integer relationUserId; |
| | | |
| | | @ApiModelProperty(value = "ç¸å
³æ¹ä½¿ç¨ 对æ¥ç»ç»åç§°") |
| | | @TableField(exist = false) |
| | | private String relationCompanyName; |
| | | |
| | | @ApiModelProperty(value = "ç¸å
³æ¹ä½¿ç¨ 对æ¥äººååç§°") |
| | | @TableField(exist = false) |
| | | private String relationUserName; |
| | | |
| | | @ApiModelProperty(value = "åç±»ç¼ç åç§°") |
| | | @TableField(exist = false) |
| | | private String categoryName; |
| | |
| | | import com.doumee.dao.timer.entity.QuartzJob; |
| | | import org.quartz.*; |
| | | import org.quartz.CronTrigger; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | */ |
| | | @Component |
| | | public class QuartzManage { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(QuartzManage.class); |
| | | |
| | | private static final String SCHEDULE_NAME = "BOOT_JOB_" ; |
| | | |
| | |
| | | try { |
| | | return (CronTrigger) this.scheduler.getTrigger(getTriggerKey(jobId)) ; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | log.error("getCronTrigger失败, jobId={}", jobId, e); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | // æå»ºCronè°åº¦å¨ |
| | | CronScheduleBuilder scheduleBuilder = CronScheduleBuilder |
| | | .cronSchedule(quartzJob.getCronExpres()) |
| | | .withMisfireHandlingInstructionDoNothing() ; |
| | | .withMisfireHandlingInstructionFireAndProceed() ; |
| | | |
| | | // ä»»å¡è§¦åå¨ |
| | | CronTrigger trigger = TriggerBuilder.newTrigger() |
| | |
| | | // ç¶ææ ¡éª |
| | | checkStop(quartzJob) ; |
| | | } catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | log.error("createJob失败, jobId={}", quartzJob.getId(), e); |
| | | } |
| | | } |
| | | |
| | |
| | | // æå»ºCronè°åº¦å¨ |
| | | CronScheduleBuilder scheduleBuilder = CronScheduleBuilder |
| | | .cronSchedule(quartzJob.getCronExpres()) |
| | | .withMisfireHandlingInstructionDoNothing(); |
| | | .withMisfireHandlingInstructionFireAndProceed(); |
| | | // ä»»å¡è§¦åå¨ |
| | | CronTrigger trigger = getCronTrigger(quartzJob.getId()) |
| | | .getTriggerBuilder().withIdentity(triggerKey) |
| | |
| | | // ç¶ææ ¡éª |
| | | checkStop(quartzJob) ; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | log.error("updateJob失败, jobId={}", quartzJob.getId(), e); |
| | | } |
| | | } |
| | | |
| | |
| | | dataMap.put(QuartzJob.JOB_PARAM_KEY,quartzJob); |
| | | this.scheduler.triggerJob(getJobKey(quartzJob.getId()),dataMap); |
| | | } catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | log.error("run失败, jobId={}", quartzJob.getId(), e); |
| | | } |
| | | } |
| | | |
| | |
| | | this.scheduler.pauseJob(getJobKey(quartzJob.getId())); |
| | | } |
| | | } catch (Exception e){ |
| | | e.printStackTrace(); |
| | | // throw new RuntimeException("createJob Fail",e) ; |
| | | log.error("checkStop失败, jobId={}", quartzJob.getId(), e); |
| | | } |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.config; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.scheduling.annotation.AsyncConfigurer; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | |
| | | import java.util.concurrent.Executor; |
| | | import java.util.concurrent.ThreadPoolExecutor; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | public class AsyncPoolConfig implements AsyncConfigurer { |
| | | |
| | | @Bean("asyncExecutor") |
| | | @Override |
| | | public Executor getAsyncExecutor() { |
| | | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); |
| | | executor.setCorePoolSize(5); |
| | | executor.setMaxPoolSize(20); |
| | | executor.setQueueCapacity(100); |
| | | executor.setKeepAliveSeconds(60); |
| | | executor.setThreadNamePrefix("async-timer-"); |
| | | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); |
| | | executor.initialize(); |
| | | return executor; |
| | | } |
| | | } |
| | |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | /** |
| | | * @author jiangping |
| | | */ |
| | | @Component("visitServiceJob") |
| | | @FeignClient(value = "visitsTimer") |
| | | public interface VisitServiceFegin { |
| | | |
| | |
| | | servlet: |
| | | session: |
| | | timeout: PT3H #表示12å°æ¶ |
| | | |
| | | # Feignè¶
æ¶é
ç½® |
| | | feign: |
| | | client: |
| | | config: |
| | | default: |
| | | connectTimeout: 5000 |
| | | readTimeout: 30000 |
| | | auth: |
| | | jwt: |
| | | enabled: true #æ¯å¦å¼å¯JWTç»å½è®¤è¯åè½ |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_test |
| | | username: nacos |
| | | password: nacos |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | import java.sql.Statement; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.Executor; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | |
| | | public class DatabaseController extends BaseController { |
| | | |
| | | @Autowired |
| | | @Qualifier("asyncExecutor") |
| | | private Executor asyncExecutor; |
| | | @Autowired |
| | | private PlatformJobService platformJobService; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | |
| | | @ApiOperation("æ°æ®åºå¤ä»½ï¼ä¿çæè¿7个å¤ä»½sql") |
| | | @PostMapping("/backupDatabase") |
| | | public ApiResponse backupDatabase() { |
| | | try { |
| | | String timestamp = DateUtil.getNowLongTime(); |
| | | // String path = "/usr/local/jars/db/"; |
| | | // String backupPath = path + timestamp + ".sql"; |
| | | String path = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.MYSQL_BACKUP_DIR).getCode(); |
| | | String code = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.MYSQL_BACKUP_CDOE).getCode() ; |
| | | String backupPath = path + timestamp + ".sql"; |
| | | code= code.replace("${param}",backupPath); |
| | | log.error("æ°æ®åºå¤ä»½================: " + code); |
| | | ProcessBuilder builder = new ProcessBuilder(code); |
| | | // éå®åé误æµå°æ åè¾åºæµ |
| | | builder.redirectErrorStream(true); |
| | | // stdout |
| | | Process process = builder.start(); |
| | | new Thread(new ProcessHandleRunnable(process)).start(); |
| | | process.waitFor(); // wait if needed |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼backupDatabase-æ°æ®åºå¤ä»½"); |
| | | asyncExecutor.execute(() -> { |
| | | try { |
| | | String timestamp = DateUtil.getNowLongTime(); |
| | | String path = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.MYSQL_BACKUP_DIR).getCode(); |
| | | String code = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.MYSQL_BACKUP_CDOE).getCode() ; |
| | | String backupPath = path + timestamp + ".sql"; |
| | | code= code.replace("${param}",backupPath); |
| | | log.info("æ°æ®åºå¤ä»½å½ä»¤: {}", code); |
| | | ProcessBuilder builder = new ProcessBuilder(code); |
| | | builder.redirectErrorStream(true); |
| | | Process process = builder.start(); |
| | | new Thread(new ProcessHandleRunnable(process)).start(); |
| | | process.waitFor(); |
| | | |
| | | /* // 使ç¨mysqldumpå½ä»¤è¿è¡æ°æ®åºå¤ä»½ |
| | | Process process = Runtime.getRuntime().exec(code); |
| | | process.getErrorStream(); |
| | | process.getInputStream(); |
| | | process.waitFor();*/ |
| | | |
| | | // æ£æ¥å¤ä»½æ¯å¦æå |
| | | if (new File(backupPath).exists()) { |
| | | log.info("æ°æ®åºå¤ä»½æå: " + backupPath); |
| | | return ApiResponse.success("æ°æ®åºå¤ä»½æå: " + backupPath); |
| | | } else { |
| | | log.error("æ°æ®åºå¤ä»½å¤±è´¥."); |
| | | if (new File(backupPath).exists()) { |
| | | log.info("æ°æ®åºå¤ä»½æå: {}", backupPath); |
| | | } else { |
| | | log.error("æ°æ®åºå¤ä»½å¤±è´¥."); |
| | | } |
| | | deleteOldFiles(path,7); |
| | | } catch (Exception e) { |
| | | log.error("æ°æ®åºå¤ä»½å¤±è´¥", e); |
| | | } |
| | | deleteOldFiles(path,7);//ä¿çæè¿7个æä»¶ |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | |
| | | log.error("æ°æ®åºå¤ä»½å¤±è´¥."+e.getMessage()); |
| | | } |
| | | return ApiResponse.failed("æ°æ®åºå¤ä»½å¤±è´¥" ); |
| | | }); |
| | | return ApiResponse.success("æ°æ®åºå¤ä»½å·²æäº¤"); |
| | | } |
| | | public void run() { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "éétoken宿¶å¨æ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/dingTalkToken") |
| | | public class DingTalkTokenTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶æ´æ°ééä¸å¡token") |
| | | @PostMapping("/updateDingTalkTokenOrigin") |
| | | public ApiResponse updateDingTalkTokenOrigin() throws Exception { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼updateDingTalkTokenOrigin-æ´æ°éétoken"); |
| | | dingTalk.updTokenInfo(); |
| | | return ApiResponse.success("å¼å¯å®æ¶æ´æ°å¾®ä¿¡å
¬ä¼å·accesstokenæå"); |
| | | } |
| | |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.mgt.DefaultSecurityManager; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "æè·¯å¨è¿ç¨æ§å¶å®æ¶å¨") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/duanluqi") |
| | | public class DuanluqiTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶è¿ç¨æ§å¶æè·¯å¨åé¸") |
| | | @PostMapping("/autoCloseCmd") |
| | | public ApiResponse autoCloseCmd() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼autoCloseCmd-è¿ç¨æ§å¶æè·¯å¨åé¸"); |
| | | deviceService.autoCloseCmdTimer(); |
| | | return ApiResponse.success("å¼å¯å®æ¶è¿ç¨æ§å¶æè·¯å¨å鏿å"); |
| | | } |
| | |
| | | import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "设å¤å®æ¶å¨æ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/device") |
| | | public class HkDeviceTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶æ¥è¯¢è®¾å¤ç¶æ") |
| | | @PostMapping("/getAscDeviceStatus") |
| | | public ApiResponse getAscDeviceStatus() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼getAscDeviceStatus-æ¥è¯¢è®¾å¤ç¶æ"); |
| | | hkSyncDeviceService.getAscDeviceStatus(); |
| | | return ApiResponse.success("å¼å¯å®æ¶æ¥è¯¢è®¾å¤ç¶ææå"); |
| | | } |
| | | @ApiOperation("æ´æ°å
¨é¨LED屿¾å
容为é»è®¤å
容") |
| | | @PostMapping("/allLedDefualtContent") |
| | | public ApiResponse allLedDefualtContent() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼allLedDefualtContent-æ´æ°LEDå±é»è®¤å
容"); |
| | | deviceService.allLedDefualtContent(); |
| | | return ApiResponse.success("æ´æ°å
¨é¨LED屿¾å
容为é»è®¤å
容"); |
| | | } |
| | |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "人åè®¾å¤ææå®æ¶å¨æ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/empower") |
| | | public class HkEmpowerTimerController extends BaseController { |
| | | @Autowired |
| | | private HkSyncEmpowerServiceImpl hkSyncEmpowerService; |
| | | |
| | | private final AtomicInteger endId2 = new AtomicInteger(0); |
| | | private final AtomicBoolean dealingDetail = new AtomicBoolean(false); |
| | | |
| | | public static Integer endId2 = 0; |
| | | @ApiOperation("å¼å¯å®æ¶æ¥è¯¢äººåè®¾å¤ææç»æ") |
| | | @PostMapping("/syncEmpowerDetailData") |
| | | public ApiResponse syncEmpowerDetailData() { |
| | | if(endId2 ==null){ |
| | | endId2 =0; |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼syncEmpowerDetailData-æ¥è¯¢äººåè®¾å¤ææç»æ"); |
| | | if(!dealingDetail.compareAndSet(false, true)){ |
| | | return ApiResponse.success("syncEmpowerDetailDataæ£å¨æ§è¡ï¼è·³è¿"); |
| | | } |
| | | endId2 = hkSyncEmpowerService.syncEmpowerDetailData(endId2); |
| | | for (int i = 0; i < 9; i++) { |
| | | if(endId2!=null){ |
| | | endId2 = hkSyncEmpowerService.syncEmpowerDetailData(endId2); |
| | | try { |
| | | int current = endId2.get(); |
| | | Integer next = hkSyncEmpowerService.syncEmpowerDetailData(current); |
| | | for (int i = 0; i < 9; i++) { |
| | | if(next != null){ |
| | | endId2.set(next); |
| | | next = hkSyncEmpowerService.syncEmpowerDetailData(next); |
| | | } |
| | | } |
| | | if(next != null){ |
| | | endId2.set(next); |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("syncEmpowerDetailDataå¼å¸¸", e); |
| | | } finally { |
| | | dealingDetail.set(false); |
| | | } |
| | | return ApiResponse.success("å¼å¯å®æ¶æ¥è¯¢äººåè®¾å¤ææç»ææå"); |
| | | } |
| | | @ApiOperation("å¼å¯å®æ¶æ¥è¯¢äººåè®¾å¤ææä¸è½½è¿åº¦") |
| | | @PostMapping("/syncEmpowerResultData") |
| | | public ApiResponse syncEmpowerResultData() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼syncEmpowerResultData-æ¥è¯¢ææä¸è½½è¿åº¦"); |
| | | hkSyncEmpowerService.syncEmpowerResultData(0); |
| | | return ApiResponse.success("å¼å¯å®æ¶æ¥è¯¢äººåè®¾å¤ææä¸è½½è¿åº¦æå"); |
| | | } |
| | |
| | | @ApiOperation("å¼å¯å®æ¶éæ°ä¸åå¤±è´¥çæææ°æ®") |
| | | @PostMapping("/syncEmpowerFailData") |
| | | public ApiResponse syncEmpowerFailData() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼syncEmpowerFailData-éæ°ä¸å失败ææ"); |
| | | hkSyncEmpowerService.syncEmpowerFailData(0); |
| | | return ApiResponse.success("å¼å¯å®æ¶éæ°ä¸åå¤±è´¥çæææ°æ®æå"); |
| | | } |
| | | |
| | | public static Integer endId = 0; |
| | | private final AtomicInteger endId = new AtomicInteger(0); |
| | | private final AtomicBoolean dealingEmpower = new AtomicBoolean(false); |
| | | |
| | | @Autowired |
| | | private HkSyncVehicleFromHKServiceImpl hkSyncVehicleFromHKService; |
| | | @ApiOperation("å¼å¯å®æ¶å·æ°äººåè®¾å¤ææ") |
| | | @PostMapping("/syncEmpowerData") |
| | | public ApiResponse syncEmpowerData() { |
| | | if(endId ==null){ |
| | | endId =0; |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼syncEmpowerData-å·æ°äººåè®¾å¤ææ"); |
| | | if(!dealingEmpower.compareAndSet(false, true)){ |
| | | return ApiResponse.success("syncEmpowerDataæ£å¨æ§è¡ï¼è·³è¿"); |
| | | } |
| | | endId = hkSyncEmpowerService.syncEmpowerData(endId); |
| | | for (int i = 0; i < 9; i++) { |
| | | if(endId!=null){ |
| | | endId = hkSyncEmpowerService.syncEmpowerData(endId); |
| | | try { |
| | | int current = endId.get(); |
| | | Integer next = hkSyncEmpowerService.syncEmpowerData(current); |
| | | for (int i = 0; i < 9; i++) { |
| | | if(next != null){ |
| | | endId.set(next); |
| | | next = hkSyncEmpowerService.syncEmpowerData(next); |
| | | } |
| | | } |
| | | if(next != null){ |
| | | endId.set(next); |
| | | } |
| | | } catch (Exception e){ |
| | | log.error("syncEmpowerDataå¼å¸¸", e); |
| | | } finally { |
| | | dealingEmpower.set(false); |
| | | } |
| | | return ApiResponse.success("å¼å¯å®æ¶å·æ°äººåè®¾å¤æææå"); |
| | | } |
| | |
| | | import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "海康äºä»¶å¾çä¸è½½å®æ¶å¨æ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/image") |
| | | public class HkImageTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶ä¸è½½æµ·åº·ç³»ç»å¾çæ°æ®") |
| | | @PostMapping("/downHKImgs") |
| | | public ApiResponse downHKImgs() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼downHKImgs-ä¸è½½æµ·åº·å¾ç"); |
| | | if(dataSyncConfig.getNeedDealImg()!=null && dataSyncConfig.getNeedDealImg()){ |
| | | hkSyncImgService.downHKImgs(0); |
| | | } |
| | |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "海康代å宿¶æåæ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/hkNotice") |
| | | public class HkNoticeTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶æ¥è¯¢ææ°äººå代忰æ®ç¶æ") |
| | | @PostMapping("/getNoticeList") |
| | | public ApiResponse getNoticeList() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼getNoticeList-æ¥è¯¢æµ·åº·ä»£åæ°æ®"); |
| | | hkSyncVisitService.syncVisitData(); |
| | | return ApiResponse.success("å¼å¯å®æ¶ä¸å访客é¢çº¦ç³è¯·æå"); |
| | | } |
| | |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "åè½¦åºæ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/park") |
| | | public class HkParkTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶è½¦è¾å
æææ") |
| | | @PostMapping("/syncParkBookData") |
| | | public ApiResponse syncParkBookData() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼syncParkBookData-车è¾å
æææ"); |
| | | hkSyncParkService.syncParkBookData(); |
| | | return ApiResponse.success("å¼å¯å®æ¶è½¦è¾å
ææææå"); |
| | | } |
| | | @ApiOperation("å¼å¯å®æ¶æ¥è¯¢è½¦è¾æ¥è¯¢") |
| | | @PostMapping("/syncVehicleUpdateData") |
| | | public ApiResponse syncVehicleUpdateData() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼syncVehicleUpdateData-æ¥è¯¢è½¦è¾"); |
| | | hkSyncVehicleFromHKService.syncVehicleUpdateData(new Date(System.currentTimeMillis()-24*60*60*1000)); |
| | | return ApiResponse.success("å¼å¯å®æ¶æ¥è¯¢è½¦è¾æ¥è¯¢æå"); |
| | | } |
| | |
| | | import com.doumee.service.business.impl.hksync.HkSyncPlatformsServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "设å¤å®æ¶å¨æ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/platform") |
| | | public class HkPlatformTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶æ¥è¯¢æå°ç¶æ") |
| | | @PostMapping("/getPlatformStatus") |
| | | public ApiResponse getPlatformStatus() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼getPlatformStatus-æ¥è¯¢æå°ç¶æ"); |
| | | hkSyncPlatformsService.getPlatformStatus(new PlatformStatusRequest()); |
| | | return ApiResponse.success("å¼å¯å®æ¶æ¥è¯¢æå°ç¶ææå"); |
| | | } |
| | |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "çä¿¡åé宿¶ä»»å¡") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/sms") |
| | | public class HkSmsEmailTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶çä¿¡åé宿¶ä»»å¡") |
| | | @PostMapping("/sendWaitingSmsNotice") |
| | | public ApiResponse sendWaitingSmsNotice() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼sendWaitingSmsNotice-åéçå¾
çä¿¡"); |
| | | smsEmailService.sendWaitingSmsNotice(); |
| | | return ApiResponse.success("å¼å¯å®æ¶çä¿¡åé宿¶ä»»å¡æå"); |
| | | } |
| | |
| | | @ApiOperation("å¼å¯å®æ¶å»ç»äººå") |
| | | @PostMapping("/memberFreeze") |
| | | public ApiResponse memberFreeze() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼memberFreeze-å»ç»äººå"); |
| | | memberService.memberFreeze(); |
| | | return ApiResponse.success("å¼å¯å®æ¶å»ç»äººåæå"); |
| | | } |
| | |
| | | package com.doumee.api; |
| | | |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.service.business.VisitsService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "è®¿å®¢å®æ¶å¨æ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/visit") |
| | | public class HkVisitTimerController extends BaseController { |
| | | |
| | | private final AtomicBoolean dealingFromHkVisit = new AtomicBoolean(false); |
| | | |
| | | @Autowired |
| | | private HkSyncVisitServiceImpl hkSyncVisitService; |
| | |
| | | @ApiOperation("å¼å¯å®æ¶ä¸å访客é¢çº¦ç³è¯·") |
| | | @PostMapping("/syncVisitData") |
| | | public ApiResponse syncVisitData() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼syncVisitData-ä¸å访客é¢çº¦ç³è¯·"); |
| | | hkSyncVisitService.syncVisitData(); |
| | | return ApiResponse.success("å¼å¯å®æ¶ä¸å访客é¢çº¦ç³è¯·æå"); |
| | | } |
| | | @ApiOperation("å¼å¯å®æ¶æ¥è¯¢è®¿å®¢é¢çº¦ç¶æ") |
| | | @PostMapping("/getOutTimeVisitRecord") |
| | | public ApiResponse getOutTimeVisitRecord() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼getOutTimeVisitRecord-æ¥è¯¢è®¿å®¢é¢çº¦ç¶æ"); |
| | | hkSyncVisitService.getOutTimeVisitRecordIccm(); |
| | | return ApiResponse.success("å¼å¯å®æ¶æ¥è¯¢è®¿å®¢é¢çº¦ç¶ææå"); |
| | | } |
| | | @ApiOperation("å¼å¯å®æ¶ä»æ¥ç访客é¢çº¦æ°æ®") |
| | | @PostMapping("/syncVistAppointData") |
| | | public ApiResponse syncVistAppointData() { |
| | | if(!Constants.DEALING_FROM_HK_VISIT){ |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼syncVistAppointData-仿¥è®¿å®¢é¢çº¦æ°æ®"); |
| | | if(dealingFromHkVisit.compareAndSet(false, true)){ |
| | | try { |
| | | Constants.DEALING_FROM_HK_VISIT =true; |
| | | hkSyncVisitFromHKService.syncVistAppointData(new Date()); |
| | | Constants.DEALING_FROM_HK_VISIT =false; |
| | | }catch (Exception e){ |
| | | |
| | | log.error("syncVistAppointDataå¼å¸¸", e); |
| | | }finally { |
| | | Constants.DEALING_FROM_HK_VISIT =false; |
| | | dealingFromHkVisit.set(false); |
| | | } |
| | | } |
| | | return ApiResponse.success("å¼å¯å®æ¶ä»æ¥ç访客é¢çº¦æ°æ®æå"); |
| | |
| | | @ApiOperation("访客å³å°è¶
æ¶é¢è¦") |
| | | @PostMapping("/visitTimeOut") |
| | | public ApiResponse visitTimeOut() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼visitTimeOut-访客è¶
æ¶é¢è¦"); |
| | | visitsService.syncTimeOutData(); |
| | | return ApiResponse.success("访客å³å°è¶
æ¶é¢è¦"); |
| | | } |
| | | @ApiOperation("å¾
审æ¹è®°å½è¶
æ¶èªå¨åæ¶é¢çº¦") |
| | | @PostMapping("/visitNoCheckCancel") |
| | | public ApiResponse visitNoCheckCancel() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼visitNoCheckCancel-è¶
æ¶èªå¨åæ¶é¢çº¦"); |
| | | visitsService.visitNoCheckCancel(); |
| | | return ApiResponse.success("å¾
审æ¹è®°å½è¶
æ¶èªå¨åæ¶é¢çº¦"); |
| | | } |
| | |
| | | import com.doumee.service.business.PlatformInterfaceLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "æ¥å¿å®æ¶å¨æ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/log") |
| | | public class InterfaceLogTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶æ¥å£æ¥å¿æ¸
ç") |
| | | @PostMapping("/clearThreeMonthLog") |
| | | public ApiResponse clearThreeMonthLog() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼clearThreeMonthLog-æ¸
çä¸ä¸ªææ¥å¿"); |
| | | interfaceLogService.clearThreeMonthLog(); |
| | | wmsInterfaceLogService.clearThreeMonthLog(); |
| | | platformInterfaceLogService.clearThreeMonthLog(); |
| | |
| | | import com.doumee.service.business.third.model.ApiResponse; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.mgt.DefaultSecurityManager; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "é¥åæå®æ¶å¨") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/jkCabinet") |
| | | public class JkCabinetTimerController extends BaseController { |
| | |
| | | @ApiOperation("宿¶åéé¥åæªåæ¶å½è¿éç¥") |
| | | @PostMapping("/timeOutUnBackAlarm") |
| | | public ApiResponse timeOutUnBackAlarm() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼timeOutUnBackAlarm-é¥åæªå½è¿éç¥"); |
| | | jkCabinetLogService.timeOutUnBackAlarm(impl); |
| | | return ApiResponse.success("宿¶åéé¥åæªåæ¶å½è¿éç¥"); |
| | | } |
| | |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.mgt.DefaultSecurityManager; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "交æ§ä¸å¿å®¢æ·å®æ¶å¨") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/jkCustomer") |
| | | public class JkCustomerTimerController extends BaseController { |
| | |
| | | @ApiOperation("æ´æ°äº¤æ§ä¸å¿å®¢æ·ç»çº¬åº¦ä¿¡æ¯") |
| | | @PostMapping("/getCustomerLocationInfo") |
| | | public ApiResponse getCustomerLocationInfo() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼getCustomerLocationInfo-æ´æ°å®¢æ·ç»çº¬åº¦"); |
| | | DefaultSecurityManager securityManager = new DefaultSecurityManager(); |
| | | SecurityUtils.setSecurityManager(securityManager); |
| | | jkCustomerService.checkNullLocation(); |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | |
| | | @Autowired |
| | | private PlatformJobService platformJobService; |
| | | |
| | | private final AtomicBoolean dealingSendNotice = new AtomicBoolean(false); |
| | | |
| | | |
| | | @ApiOperation("æå°åé è¶
æ¶æ¥è¦ä¸å¡") |
| | | @PostMapping("/platformJobTimer") |
| | | public ApiResponse platformJobTimer() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼platformJobTimer-æå°åé è¶
æ¶æ¥è¦"); |
| | | platformJobService.timeOutReport(); |
| | | return ApiResponse.success("æå°åé è¶
æ¶æ¥è¦ä¸å¡"); |
| | | } |
| | | @ApiOperation("æå°ä½ä¸æ£æ¥çµåéä¸éç¶æ") |
| | | @PostMapping("/platformCheckWmsLockStatus") |
| | | public ApiResponse checkWmsLockStatus() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼checkWmsLockStatus-æ£æ¥çµåéä¸éç¶æ"); |
| | | platformJobService.checkWmsLockStatus(); |
| | | return ApiResponse.success("æå°åé è¶
æ¶æ¥è¦ä¸å¡"); |
| | | } |
| | |
| | | @ApiOperation("æå°ä½ä¸è¶
æ¶æ¥è¦ä¸å¡") |
| | | @PostMapping("/platformJobWorkTimeOut") |
| | | public ApiResponse platformJobWorkTimeOut() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼platformJobWorkTimeOut-æå°ä½ä¸è¶
æ¶æ¥è¦"); |
| | | platformJobService.timeOutWork(); |
| | | return ApiResponse.success("æå°ä½ä¸è¶
æ¶æ¥è¦ä¸å¡"); |
| | | } |
| | |
| | | @ApiOperation("æå°çå¾
ä½ä¸è¶
æ¶ä¸å¡") |
| | | @PostMapping("/platformJobWaitTimeOut") |
| | | public ApiResponse platformJobWaitTimeOut() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼platformJobWaitTimeOut-æå°çå¾
ä½ä¸è¶
æ¶"); |
| | | platformJobService.timeOutCallIn(); |
| | | return ApiResponse.success("æå°çå¾
ä½ä¸è¶
æ¶ä¸å¡"); |
| | | } |
| | |
| | | @PreventRepeat(interval = 2000) |
| | | @ApiOperation("æå°ä»æ¥ä½ä¸æªå®æéç¥å®æ¶") |
| | | @PostMapping("/sendUnFinishNotice") |
| | | public synchronized ApiResponse sendUnFinishNotice() { |
| | | log.error("========æå°ä»æ¥ä½ä¸æªå®æéç¥å®æ¶============å¼å§"+System.currentTimeMillis()+""); |
| | | platformJobService.sendUnFinishNotice(); |
| | | log.error("========æå°ä»æ¥ä½ä¸æªå®æéç¥å®æ¶============ç»æ"+System.currentTimeMillis()+""); |
| | | public ApiResponse sendUnFinishNotice() { |
| | | if(!dealingSendNotice.compareAndSet(false, true)){ |
| | | return ApiResponse.success("sendUnFinishNoticeæ£å¨æ§è¡ï¼è·³è¿"); |
| | | } |
| | | try { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼sendUnFinishNotice-æå°ä½ä¸æªå®æéç¥"); |
| | | platformJobService.sendUnFinishNotice(); |
| | | } catch (Exception e){ |
| | | log.error("sendUnFinishNoticeå¼å¸¸", e); |
| | | } finally { |
| | | dealingSendNotice.set(false); |
| | | } |
| | | return ApiResponse.success("æå°ä»æ¥ä½ä¸å¤å®æéç¥å®æ¶"); |
| | | } |
| | | |
| | |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "天æ°é¢è¦åæ¥") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/weather") |
| | | public class WeatherTimerController extends BaseController { |
| | |
| | | @ApiOperation("宿¶åæ¥å¤©æ°é¢è¦ä¿¡æ¯") |
| | | @PostMapping("/syncWeatherInfo") |
| | | public ApiResponse syncWeatherInfo(){ |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼syncWeatherInfo-忥天æ°é¢è¦"); |
| | | warningService.getWeatherInfo(); |
| | | return ApiResponse.success("宿¶åæ¥å¤©æ°é¢è¦ä¿¡æ¯"); |
| | | } |
| | |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.mgt.DefaultSecurityManager; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Api(tags = "微信token宿¶å¨æ¥å£") |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/timer/wxtoken") |
| | | public class WxTokenTimerController extends BaseController { |
| | |
| | | @ApiOperation("å¼å¯å®æ¶æ´æ°å¾®ä¿¡å
¬ä¼å·accesstoken") |
| | | @PostMapping("/updateWxAccessTokenOrigin") |
| | | public ApiResponse updateWxAccessTokenOrigin() { |
| | | log.info("宿¶ä»»å¡æ§è¡å¼å§ï¼updateWxAccessTokenOrigin-æ´æ°å¾®ä¿¡token"); |
| | | DefaultSecurityManager securityManager = new DefaultSecurityManager(); |
| | | SecurityUtils.setSecurityManager(securityManager); |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.config; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.scheduling.annotation.AsyncConfigurer; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | |
| | | import java.util.concurrent.Executor; |
| | | import java.util.concurrent.ThreadPoolExecutor; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | public class AsyncPoolConfig implements AsyncConfigurer { |
| | | |
| | | @Bean("asyncExecutor") |
| | | @Override |
| | | public Executor getAsyncExecutor() { |
| | | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); |
| | | executor.setCorePoolSize(5); |
| | | executor.setMaxPoolSize(20); |
| | | executor.setQueueCapacity(100); |
| | | executor.setKeepAliveSeconds(60); |
| | | executor.setThreadNamePrefix("async-admin-timer-"); |
| | | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); |
| | | executor.initialize(); |
| | | return executor; |
| | | } |
| | | } |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: dmvisit |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_test |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | |
| | | # ææ¶å
³éç¼å |
| | | enabled: false |
| | | nacos: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | username: nacos |
| | | password: nacos |
| | | # config: |
| | | # server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | # server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | # namespace: dmvisit |
| | | # username: nacos |
| | | # password: nacos |
| | |
| | | # group: dev |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.7:8848 #é
ç½®Nacoså°å |
| | | server-addr: http://192.168.0.3:8848 #é
ç½®Nacoså°å |
| | | namespace: wuhu_visit_test |
| | | username: nacos |
| | | password: nacos |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: pro |
| | | application: |
| | | name: visitsAdmin |
| | | # å®å
¨é
ç½® |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.config; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.scheduling.annotation.AsyncConfigurer; |
| | | import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; |
| | | |
| | | import java.util.concurrent.Executor; |
| | | import java.util.concurrent.ThreadPoolExecutor; |
| | | |
| | | @Slf4j |
| | | @Configuration |
| | | public class AsyncPoolConfig implements AsyncConfigurer { |
| | | |
| | | @Bean("asyncExecutor") |
| | | @Override |
| | | public Executor getAsyncExecutor() { |
| | | ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); |
| | | executor.setCorePoolSize(5); |
| | | executor.setMaxPoolSize(20); |
| | | executor.setQueueCapacity(100); |
| | | executor.setKeepAliveSeconds(60); |
| | | executor.setThreadNamePrefix("async-visit-"); |
| | | executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); |
| | | executor.initialize(); |
| | | return executor; |
| | | } |
| | | } |
| | |
| | | private Integer gridId; |
| | | |
| | | @ApiModelProperty(value = "éªè¯æ¹å¼ 0å·è¸ 1å·å¡", example = "1") |
| | | @ExcelColumn(name="æ ¡éªæ¹å¼",index = 2,width = 10,valueMapping = "0=人è¸;1=å·å¡;2=ç®¡çææ;") |
| | | @ExcelColumn(name="æ ¡éªæ¹å¼",index = 2,width = 10,valueMapping = "0=人è¸;1=å·å¡;2=ç®¡çææ;3=èªå¨;") |
| | | private Integer authType; |
| | | |
| | | @ApiModelProperty(value = "车è¾ç¼ç ï¼å
³ècars)", example = "1") |
| | |
| | | queryWrapper.ge(Company::getFsDate, Utils.Date.getStart(pageWrap.getModel().getFsDate())); |
| | | queryWrapper.le(Company::getFsDate, Utils.Date.getEnd(pageWrap.getModel().getFsDate())); |
| | | } |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Company::getParentId); |
| | | /* .leftJoin(Member.class, Member::getId,Company::getHeadId)*/ |
| | | /* queryWrapper.leftJoin(" company c on c.id=t.parent_id");*/ |
| | | queryWrapper.selectAll(Company.class) |
| | | .select("(select count(m.id) from member m where m.COMPANY_ID=t.id and m.ISDELETED=0) as countNum") ; |
| | | queryWrapper.select("t1.name",Company::getParentName); |
| | | queryWrapper.select("t1.company_path",Company::getParentCompanyPath); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Company::getParentId); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getStatus()),Company::getStatus,Constants.ZERO); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()),Company::getName,pageWrap.getModel().getName()); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getParentName()),"c.name",pageWrap.getModel().getParentName()); |
| | |
| | | queryWrapper.select("t1.name",Company::getParentName); |
| | | queryWrapper.select("t1.company_path",Company::getParentCompanyPath); |
| | | queryWrapper.select("t1.type",Company::getParentType); |
| | | queryWrapper.select("c1.NAME",Company::getRelationCompanyName); |
| | | queryWrapper.select("s1.NAME",Company::getRelationUserName); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Company::getParentId); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,Company::getHeadId); |
| | | queryWrapper.leftJoin(SystemUser.class,SystemUser::getId,Company::getEditor); |
| | | queryWrapper.leftJoin("company c1 on t.RELATION_COMPANY_ID = c1.id"); |
| | | queryWrapper.leftJoin("member s1 on t.RELATION_USER_ID = s1.id"); |
| | | queryWrapper.eq(Company::getIsdeleted,Constants.ZERO); |
| | | if(Objects.nonNull(type) && ( Constants.equalsInteger(type,Constants.ONE) || Constants.equalsInteger(type,Constants.ZERO))){ |
| | | // queryWrapper.eq(type!=null,Company::getType,type); |
| | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.concurrent.Executor; |
| | | |
| | | /** |
| | | * é¨ç¦è§è²ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | private DeviceMapper deviceMapper; |
| | | @Autowired |
| | | private MemberRoleJoinMapper memberRoleMapper; |
| | | |
| | | @Autowired |
| | | @Qualifier("asyncExecutor") |
| | | private Executor asyncExecutor; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | |
| | | } |
| | | int t = deviceRoleMapper.updateById(deviceRole); |
| | | if(t>0){ |
| | | Thread tt = new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | startUpdateMemberEmpower(model,deviceRole); |
| | | }catch (Exception e){ |
| | | log.error("======é¨ç¦åç»ä¿®æ¹ï¼æ´æ°äººåæé失败==="+e.getMessage()); |
| | | } |
| | | asyncExecutor.execute(() -> { |
| | | try { |
| | | startUpdateMemberEmpower(model,deviceRole); |
| | | }catch (Exception e){ |
| | | log.error("======é¨ç¦åç»ä¿®æ¹ï¼æ´æ°äººåæé失败===", e); |
| | | } |
| | | }); |
| | | tt.start(); |
| | | } |
| | | } |
| | | @Override |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CategoryMapper; |
| | | import com.doumee.dao.business.InoutDayCountMapper; |
| | | import com.doumee.dao.business.InoutRecordMapper; |
| | | import com.doumee.dao.business.dto.InParkDataDTO; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.model.InoutDayCount; |
| | | import com.doumee.dao.business.model.InoutRecord; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.vo.GeneralDataVO; |
| | |
| | | |
| | | @Autowired |
| | | private CategoryMapper categoryMapper; |
| | | |
| | | @Autowired |
| | | private InoutDayCountMapper inoutDayCountMapper; |
| | | |
| | | @Override |
| | | public Integer create(InoutRecord inoutRecord) { |
| | |
| | | TelecomInParkDataVO telecomInParkDataVO = new TelecomInParkDataVO(); |
| | | telecomInParkDataVO.setInCarNum(Constants.ZERO); |
| | | telecomInParkDataVO.setInUserNum(Constants.ZERO); |
| | | List<InoutRecord> listCar = inoutRecordMapper.selectList(new MPJLambdaWrapper<InoutRecord>() |
| | | |
| | | InoutDayCount inoutDayCount = inoutDayCountMapper.selectOne(new QueryWrapper<InoutDayCount>() |
| | | .lambda() |
| | | .apply(" DATE(TIME_INFO) = CURDATE() ") |
| | | .last(" limit 1 ") |
| | | ); |
| | | |
| | | if(Objects.nonNull(inoutDayCount)){ |
| | | telecomInParkDataVO.setInUserNum(inoutDayCount.getInMemberNum()); |
| | | telecomInParkDataVO.setInCarNum(inoutDayCount.getInCarNum()); |
| | | } |
| | | |
| | | /* List<InoutRecord> listCar = inoutRecordMapper.selectList(new MPJLambdaWrapper<InoutRecord>() |
| | | .eq(InoutRecord::getIsdeleted,Constants.ZERO) |
| | | .eq(InoutRecord::getInOrOut,Constants.ZERO) |
| | | .isNotNull(InoutRecord::getCarCode) |
| | |
| | | telecomInParkDataVO.setInUserNum( |
| | | new HashSet<>(listUser.stream().map(i->i.getMemberPhone()).collect(Collectors.toList())).size() |
| | | ); |
| | | } |
| | | }*/ |
| | | |
| | | return telecomInParkDataVO; |
| | | } |
| | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.dingTalk.DingTalk; |
| | | import com.doumee.core.dingTalk.DingTalkStream; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.jiandaoyun.api.arch.DeptApiClient; |
| | |
| | | |
| | | @Autowired |
| | | private JkKeysMapper jkKeysMapper; |
| | | |
| | | @Autowired |
| | | private CarsMapper carsMapper; |
| | | |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | |
| | | .selectAs(JkKeys::getCarCode,JkCabinetGrid::getCarCode) |
| | | .selectAs(JkKeys::getRfidLable,JkCabinetGrid::getKeyCode) |
| | | .selectAs(JkKeys::getStatus,JkCabinetGrid::getKeyStatus) |
| | | .selectAs(JkKeys::getCarId,JkCabinetGrid::getCarId) |
| | | .leftJoin(JkKeys.class,JkKeys::getId,JkCabinetGrid::getKeyId) |
| | | .leftJoin(JkCabinet.class,JkCabinet::getId,JkCabinetGrid::getCabinetId) |
| | | .eq(JkCabinet::getCode,dto.getCode()) |
| | |
| | | .eq(JkKeys::getId,jkCabinetGrid.getKeyId()) |
| | | ); |
| | | log.error("é¥åæä¿¡æ¯æ¨éå®é
é¥åååï¼"+jkCabinetGrid.getKeyCode()); |
| | | JkCabinetLog cabinetLog = new JkCabinetLog(); |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkCabinetGrid.getKeyCode()); |
| | | JkKeys jkKeys = jkKeysMapper.selectById(jkCabinetGrid.getKeyId()); |
| | | if(Objects.nonNull(jkKeys)){ |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkKeys.getCode()); |
| | | Cars cars = carsMapper.selectById(jkCabinetGrid.getCarId()); |
| | | if(Objects.nonNull(cars)){ |
| | | cabinetLog.setMemberId(cars.getMemberId()); |
| | | } |
| | | } |
| | | cabinetLog.setCabinetId(jkCabinetGrid.getCabinetId()); |
| | | cabinetLog.setGridId(jkCabinetGrid.getId()); |
| | | cabinetLog.setKeyId(jkCabinetGrid.getKeyId()); |
| | | cabinetLog.setCarId(jkCabinetGrid.getCarId()); |
| | | cabinetLog.setType(Constants.ONE); |
| | | cabinetLog.setStatus(Constants.ZERO); |
| | | cabinetLog.setAuthType(3); |
| | | cabinetLog.setKeyStatus(Constants.TWO); |
| | | cabinetLog.setIsNotice(Constants.ZERO); |
| | | cabinetLog.setInfo("ç¡¬ä»¶åæ¥-é¥åä¸å¨ä½"); |
| | | cabinetLog.setIsdeleted(Constants.ZERO); |
| | | cabinetLog.setCreateDate(new Date()); |
| | | jkCabinetLogMapper.insert(cabinetLog); |
| | | } |
| | | }else{ |
| | | if(!Constants.equalsInteger(jkCabinetGrid.getKeyStatus(),Constants.ONE)){ |
| | |
| | | .eq(JkKeys::getId,jkCabinetGrid.getKeyId()) |
| | | ); |
| | | log.error("é¥åæä¿¡æ¯æ¨éå®é
é¥åååï¼"+jkCabinetGrid.getKeyCode()); |
| | | JkCabinetLog cabinetLog = new JkCabinetLog(); |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkCabinetGrid.getKeyCode()); |
| | | JkKeys jkKeys = jkKeysMapper.selectById(jkCabinetGrid.getKeyId()); |
| | | if(Objects.nonNull(jkKeys)){ |
| | | cabinetLog.setKeyInfo(jkCabinetGrid.getCarCode() + " " + jkKeys.getCode()); |
| | | Cars cars = carsMapper.selectById(jkCabinetGrid.getCarId()); |
| | | if(Objects.nonNull(cars)){ |
| | | cabinetLog.setMemberId(cars.getMemberId()); |
| | | } |
| | | } |
| | | cabinetLog.setCabinetId(jkCabinetGrid.getCabinetId()); |
| | | cabinetLog.setGridId(jkCabinetGrid.getId()); |
| | | cabinetLog.setKeyId(jkCabinetGrid.getKeyId()); |
| | | cabinetLog.setCarId(jkCabinetGrid.getCarId()); |
| | | cabinetLog.setType(Constants.ONE); |
| | | cabinetLog.setStatus(Constants.ZERO); |
| | | cabinetLog.setAuthType(3); |
| | | cabinetLog.setKeyStatus(Constants.ONE); |
| | | cabinetLog.setIsNotice(Constants.ZERO); |
| | | cabinetLog.setInfo("ç¡¬ä»¶åæ¥-é¥åå¨ä½"); |
| | | cabinetLog.setIsdeleted(Constants.ZERO); |
| | | cabinetLog.setCreateDate(new Date()); |
| | | jkCabinetLogMapper.insert(cabinetLog); |
| | | |
| | | jkCabinetLogMapper.update(null,new UpdateWrapper<JkCabinetLog>().lambda() |
| | | .set(JkCabinetLog::getCloseLogId,cabinetLog.getId()) |
| | | .eq(JkCabinetLog::getKeyId,cabinetLog.getKeyId()) |
| | | .eq(JkCabinetLog::getType,Constants.ONE) |
| | | .eq(JkCabinetLog::getKeyStatus,Constants.TWO) |
| | | .isNull(JkCabinetLog::getCloseLogId)); |
| | | |
| | | } |
| | | } |
| | | // if(StringUtils.isBlank(jkCabinetGrid.getKeyCode()) |
| | |
| | | import netscape.javascript.JSObject; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.Date; |
| | | import java.util.concurrent.Executor; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | @Slf4j |
| | | public class JkSketchServiceImpl implements JkSketchService { |
| | | |
| | | @Autowired |
| | | @Qualifier("asyncExecutor") |
| | | private Executor asyncExecutor; |
| | | @Autowired |
| | | private JkSketchMapper jkSketchMapper; |
| | | @Autowired |
| | |
| | | BigDecimal finalCLongitude = cLongitude; |
| | | log.error("交éè§å====线ç¨circleï¼"+i+"====start:"+start+"===========end:"+end); |
| | | int finalI = i; |
| | | Thread t1=new Thread(() -> { |
| | | asyncExecutor.execute(() -> { |
| | | try { |
| | | int index =0; |
| | | for (int j = start; j < end; j++) { |
| | |
| | | } |
| | | |
| | | }); |
| | | t1.start(); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | log.error("distanceCustomerå¼å¸¸", e); |
| | | }finally { |
| | | |
| | | } |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.Executor; |
| | | |
| | | /** |
| | | * 海康é¨ç¦ææä¸å¡Serviceå®ç° |
| | |
| | | @Autowired |
| | | private MemberCardMapper memberCardMapper; |
| | | |
| | | @Autowired |
| | | @Qualifier("asyncExecutor") |
| | | private Executor asyncExecutor; |
| | | |
| | | /** |
| | | * 宿¶æ¥è¯¢æéä¸åä»»å¡è¿åº¦æ§è¡ç»æ |
| | | */ |
| | | @Override |
| | | public Integer syncEmpowerDetailData(Integer endId){ |
| | | log.error(""); |
| | | long startTime = System.currentTimeMillis(); |
| | | log.info("syncEmpowerDetailDataæ§è¡å¼å§, endId={}", endId); |
| | | // if(Constants.DEALING_HK_EMPOWER_DETAIL){ |
| | | // return ; |
| | | // } |
| | |
| | | //æ¥è¯¢ææå®æä¸è½½ï¼å¾
æ¥è¯¢ç»æçæ°æ®è®°å½ |
| | | List<Empower> list = getDealListDetail(endId); |
| | | if(list == null || list.size() ==0){ |
| | | log.info("syncEmpowerDetailDataæ å¾
å¤çæ°æ®, èæ¶{}ms", System.currentTimeMillis() - startTime); |
| | | return null; |
| | | } |
| | | Thread t1=new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | for(Empower c : list){ |
| | | asyncExecutor.execute(() -> { |
| | | try { |
| | | for(Empower c : list){ |
| | | AuthResultPageRequest param = new AuthResultPageRequest(); |
| | | param.setPageNo(1); |
| | | param.setPageSize(999); |
| | |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | log.error("syncEmpowerDetailDataæ§è¡å¼å¸¸", e); |
| | | } |
| | | } |
| | | }); |
| | | t1.start(); |
| | | log.info("syncEmpowerDetailDataæ§è¡ç»æ, èæ¶{}ms", System.currentTimeMillis() - startTime); |
| | | return list.get(list.size()-1).getId(); |
| | | |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Integer syncEmpowerResultData(Integer endId){ |
| | | // if(Constants.DEALING_HK_EMPOWER_RESULT){ |
| | | // return null ; |
| | | // } |
| | | // Constants.DEALING_HK_EMPOWER_RESULT=true; |
| | | long startTime = System.currentTimeMillis(); |
| | | log.info("syncEmpowerResultDataæ§è¡å¼å§, endId={}", endId); |
| | | //æ¥è¯¢æææ§è¡ä¸å¾æ°æ® |
| | | List<Empower> list = getIngTaskListResult(Constants.formatIntegerNum(endId)); |
| | | if(list == null || list.size() ==0){ |
| | | log.info("syncEmpowerResultDataæ å¾
å¤çæ°æ®, èæ¶{}ms", System.currentTimeMillis() - startTime); |
| | | return null; |
| | | } |
| | | Thread t1=new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | asyncExecutor.execute(() -> { |
| | | try { |
| | | for(Empower c : list){ |
| | | TaskProgressRequest param = new TaskProgressRequest(); |
| | |
| | | } |
| | | } |
| | | }catch (Exception e1){ |
| | | e1.printStackTrace(); |
| | | }finally { |
| | | Constants.DEALING_HK_EMPOWER_RESULT =false; |
| | | log.error("syncEmpowerResultDataæ§è¡å¼å¸¸", e1); |
| | | } |
| | | } |
| | | }); |
| | | t1.start(); |
| | | }); |
| | | log.info("syncEmpowerResultDataæ§è¡ç»æ, èæ¶{}ms", System.currentTimeMillis() - startTime); |
| | | return list.get(list.size()-1).getId(); |
| | | |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public Integer syncEmpowerFailData(Integer endId) { |
| | | long startTime = System.currentTimeMillis(); |
| | | log.info("syncEmpowerFailDataæ§è¡å¼å§, endId={}", endId); |
| | | List<Empower> allList =getAllFailDealList( endId); |
| | | if(allList!=null && allList.size()>0){ |
| | | Date date = new Date(); |
| | |
| | | } |
| | | return allList.get(allList.size()-1).getId(); |
| | | } |
| | | log.info("syncEmpowerFailDataæ§è¡ç»æ, èæ¶{}ms", System.currentTimeMillis() - startTime); |
| | | return null; |
| | | } |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public Integer syncEmpowerData(Integer endId) { |
| | | // if(Constants.DEALING_HK_EMPOWER){ |
| | | // return null ; |
| | | // } |
| | | // Constants.DEALING_HK_EMPOWER =true; |
| | | long startTime = System.currentTimeMillis(); |
| | | log.info("syncEmpowerDataæ§è¡å¼å§, endId={}", endId); |
| | | //å
å 餿æéè¦åæ¶ææçæ°æ® |
| | | if(empowerMapper.selectCount(new QueryWrapper<Empower>().lambda() |
| | | .eq(Empower::getSendStatus,Constants.EmpowerStatus.ing)) > 1000){ |
| | | //妿å½åä»»å¡å¤§äº1000个ï¼å¤§æ¦10个任å¡ï¼ |
| | | log.info("syncEmpowerDataä»»å¡éå已满(>1000), è·³è¿, èæ¶{}ms", System.currentTimeMillis() - startTime); |
| | | return endId; |
| | | } |
| | | List<Empower> allList =getAllWaitDealList( endId); |
| | | if(allList !=null && allList.size()>0){ |
| | | //æ¥è¯¢ææéè¦åæ¥çæ°æ®,éæ°ä¸åææ°äººåæéå³å¯ |
| | | Thread t1=new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | dealAllListTask(allList); |
| | | }catch (Exception e){ |
| | | log.info("======================ä¸åææå¼å¸¸ï¼"+e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | asyncExecutor.execute(() -> { |
| | | try { |
| | | dealAllListTask(allList); |
| | | }catch (Exception e){ |
| | | log.error("======================ä¸åææå¼å¸¸", e); |
| | | } |
| | | }); |
| | | t1.start(); |
| | | log.info("syncEmpowerDataæäº¤{}æ¡æ°æ®, èæ¶{}ms", allList.size(), System.currentTimeMillis() - startTime); |
| | | return allList.get(allList.size()-1).getId(); |
| | | } |
| | | log.info("syncEmpowerDataæ å¾
å¤çæ°æ®, èæ¶{}ms", System.currentTimeMillis() - startTime); |
| | | return null; |
| | | } |
| | | @Override |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.Date; |
| | | import java.util.concurrent.Executor; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | @Slf4j |
| | | public class HkSyncPushServiceImpl extends HkSyncBaseServiceImpl { |
| | | |
| | | @Autowired |
| | | @Qualifier("asyncExecutor") |
| | | private Executor asyncExecutor; |
| | | @Autowired |
| | | private InoutDayCountMapper inoutDayCountMapper; |
| | | @Autowired |
| | |
| | | private void dealNoticeTelecomEvent(EventBaseRequest param,EventBaseInfoRequest request ,List<WarningEvent> list) { |
| | | try { |
| | | log.error("========éç¥å
¶ä»ä¸æ¹å°å离å²äºä»¶å¼å§:"+list.size()); |
| | | Thread t1=new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | asyncExecutor.execute(() -> { |
| | | // EventBaseRequest submitParam = new EventBaseRequest(); |
| | | // submitParam.setMethod(param.getMethod()); |
| | | // submitParam.setParams(new EventBaseParamRequest()); |
| | |
| | | log.error("========éç¥å
¶ä»ä¸æ¹å°å离å²äºä»¶å·²æ¨éï¼ç»æ:"+s+"\n"+response); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | t1.start(); |
| | | }); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | log.error("dealNoticeTelecomEventå¼å¸¸", e); |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * @author T14 |
| | | */ |
| | | @Service |
| | | @Service("deviceMqttPushCallback") |
| | | @Slf4j |
| | | public class MqttPushCallback implements MqttCallback { |
| | | |
| | |
| | | @Slf4j |
| | | public class MqttSubServiceImpl implements MqttBizService { |
| | | @Autowired |
| | | @org.springframework.beans.factory.annotation.Qualifier("deviceMqttPushCallback") |
| | | private MqttPushCallback callBack ; |
| | | @Override |
| | | public MqttClient subscribe(MqttClient client,MqttConfig config,String[] topics){ |