From 5e22559b6dff23ff58cabe635481956fcc8b80c0 Mon Sep 17 00:00:00 2001
From: nidapeng <jp@doumee.com>
Date: 星期四, 21 三月 2024 18:09:08 +0800
Subject: [PATCH] 整理
---
server/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java | 1
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java | 54 ++++++++++++++++++
server/admin_timer/pom.xml | 108 ++++++++++++++++++++++++++++++++++++
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java | 4 +
4 files changed, 167 insertions(+), 0 deletions(-)
diff --git a/server/admin_timer/pom.xml b/server/admin_timer/pom.xml
new file mode 100644
index 0000000..a9229c8
--- /dev/null
+++ b/server/admin_timer/pom.xml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>com.doumee</groupId>
+ <artifactId>dmvisit</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>admin_timer</artifactId>
+
+ <properties>
+ <maven.compiler.source>8</maven.compiler.source>
+ <maven.compiler.target>8</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.doumee</groupId>
+ <artifactId>dmvisit_service</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ <!--
+ <build>
+ <finalName>smartmeeting-admin</finalName>
+ <pluginManagement><!– lock down plugins versions to avoid using Maven
+ defaults (may be moved to parent pom) –>
+ <plugins>
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>3.1.0</version>
+ </plugin>
+ <!– see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging –>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.0.2</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.0</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.22.1</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>3.2.2</version>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>${project.basedir}/../lib</directory>
+ <targetPath>WEB-INF/lib/</targetPath>
+ <includes>
+ <include>*.jar</include>
+ </includes>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>2.5.2</version>
+ </plugin>
+ <plugin>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.8.2</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>-->
+ <build>
+ <finalName>admin_timer</finalName>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <configuration>
+ <fork>true</fork>
+ <mainClass>com.doumee.TimerApplication</mainClass>
+ <layout>ZIP</layout>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>repackage</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!--<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.6</version>
+ </plugin>-->
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java
index 7b650a9..6360f47 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/ext/HkSyncService.java
@@ -71,6 +71,7 @@
void syncVisitData();
void getOutTimeVisitRecord( );
Integer syncEmpowerData(Integer startPage);
+ Integer syncEmpowerFailData(Integer startPage);
void syncEmpowerDataNew(int start,int end);
void syncParkBookData();
void syncParkBookBySingleModel(ParkBook c);
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java
index 5568c42..b8c39aa 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncBaseServiceImpl.java
@@ -119,6 +119,10 @@
return null;
}
@Override
+ public Integer syncEmpowerFailData(Integer startPage) {
+ return null;
+ }
+ @Override
public void syncEmpowerDataNew(int start,int end) {
}
@Override
diff --git a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java
index 7e4ad77..0ce7b6a 100644
--- a/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java
+++ b/server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncEmpowerServiceImpl.java
@@ -21,6 +21,7 @@
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -316,6 +317,41 @@
* 澶勭悊浜哄憳鎺堟潈鏁版嵁锛屽畾鏃朵笅鍙�
*/
@Override
+ public Integer syncEmpowerFailData(Integer endId) {
+ List<Empower> allList =getAllFailDealList( endId);
+ if(allList!=null && allList.size()>0){
+ Date date = new Date();
+ for(Empower empower:allList){
+ if(Constants.equalsObject(empower.getIsdeleted(),Constants.ONE)){
+ //濡傛灉鏄垹闄ょ殑鏉冮檺涓嬪彂锛屾煡璇㈡槸鍚︿己鍊欐湁涓嬪彂鎴愬姛鐨勬暟鎹紝濡傛灉鏈夛紝鍒欎笉澶勭悊
+ Empower param = empowerMapper.selectOne(new QueryWrapper<Empower>().lambda()
+ .eq(Empower::getMemberId,empower.getMemberId())
+ .eq(Empower::getDeviceId,empower.getDeviceId() )
+ .gt(Empower::getId,empower.getId())
+ .last("limit 1"));
+ if(empower ==null || Constants.equalsInteger(empower.getIsdeleted(),Constants.ONE)){
+// addIds.add(did);
+ }
+ }
+ //鏇存柊閲嶆柊涓嬪彂娆℃暟
+ empowerMapper.update(null,new UpdateWrapper<Empower>().lambda()
+ .eq(Empower::getEditDate,date)
+ .setSql("try_num = ifnull(tyr_num,0) +1" )
+ .set(Empower::getSendStatus,Constants.EmpowerStatus.wait)
+ .set(Empower::getSendDate,null)
+ .set(Empower::getEditDate,date)
+ .set(Empower::getRemark,"涓嬪彂澶辫触锛屽緟閲嶆柊涓嬪彂~")
+ .set(Empower::getRemark,"涓嬪彂澶辫触锛屽緟閲嶆柊涓嬪彂~")
+ .eq(Empower::getId,empower.getId()));
+ }
+ return allList.get(allList.size()-1).getId();
+ }
+ return null;
+ }
+ /**
+ * 澶勭悊浜哄憳鎺堟潈鏁版嵁锛屽畾鏃朵笅鍙�
+ */
+ @Override
public Integer syncEmpowerData(Integer endId) {
// if(Constants.DEALING_HK_EMPOWER){
// return null ;
@@ -361,6 +397,7 @@
}catch (Exception e){
e.printStackTrace();
}finally {
+
}
}
@@ -594,6 +631,23 @@
List<Empower> list = empowerMapper.selectJoinList(Empower.class,queryWrapper);
return list;
}
+ private List<Empower> getAllFailDealList(int endId ) {
+ MPJLambdaWrapper<Empower> queryWrapper = new MPJLambdaWrapper<>();
+ queryWrapper.selectAll(Empower.class);
+ queryWrapper.selectAs(Device::getChannelNo,Empower::getDeviceChannelNo);
+ queryWrapper.selectAs(Member::getHkId,Empower::getMemberHkId);
+ queryWrapper.selectAs(Device::getHkId,Empower::getDeviceIndexCode);
+ queryWrapper.selectAs(Device::getResourceType,Empower::getDeviceType);
+ queryWrapper.leftJoin(Device.class,Device::getId,Empower::getDeviceId);
+ queryWrapper.leftJoin(Member.class,Member::getId,Empower::getMemberId);
+ queryWrapper.eq(Empower::getSendStatus,Constants.EmpowerStatus.fail);
+ queryWrapper.gt(Empower::getId,endId);
+ queryWrapper.orderByAsc(Empower::getId );
+// queryWrapper.orderByAsc(Empower::getCreateDate );
+ queryWrapper.last("limit 100");//姣忔闄愬埗涓嬪彂100涓�
+ List<Empower> list = empowerMapper.selectJoinList(Empower.class,queryWrapper);
+ return list;
+ }
private List<Empower> getDealList(int del ,int start,int end) {
MPJLambdaWrapper<Empower> queryWrapper = new MPJLambdaWrapper<>();
--
Gitblit v1.9.3