Commit 90b5624a by 韦华德
parents 3ecb3294 23fdb0fc
......@@ -25,7 +25,7 @@ public class ContextUtils {
public static Long getUserUserId() {
ApiTokenVo apiTokenVo = ThreadContext.get(APP_TOKEN_CONTEXT_KEY);
return apiTokenVo.getUserId();
return apiTokenVo == null ? null : apiTokenVo.getUserId();
}
public static void setAdminContext(OnlineUserDto onlineUserDto) {
......@@ -40,7 +40,7 @@ public class ContextUtils {
public static Long getAdminUserId() {
OnlineUserDto userDto = ThreadContext.get(ADMIN_TOKEN_CONTEXT_KEY);
return userDto.getUserId();
return userDto == null ? null : userDto.getUserId();
}
}
......
package com.zq.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* 用户表(TAppUser)实体类
*
* @author makejava
* @since 2021-06-22 15:39:45
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "t_app_user")
public class AppUser {
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 手机号
*/
@ApiModelProperty("手机号")
private String phone;
/**
* 登录密码
*/
@ApiModelProperty("登录密码")
private String password;
/**
* 交易密码
*/
@ApiModelProperty("交易密码")
private String dealpwd;
/**
* 用户类型
*/
@ApiModelProperty("用户类型 ")
private Integer userType;
/**
* 名字
*/
@ApiModelProperty("名字")
private String name;
/**
* 昵称
*/
@ApiModelProperty("昵称")
private String nickname;
/**
* 头像
*/
@ApiModelProperty("头像")
private String avatar;
/**
* 性别
*/
@ApiModelProperty("性别")
private String sex;
/**
* 年龄
*/
@ApiModelProperty("年龄")
private Integer age;
/**
* 地址
*/
@ApiModelProperty("地址")
private String address;
/**
* 状态:0正常 1冻结 2删除
*/
@ApiModelProperty("状态:0正常 1冻结 2删除")
private Integer status;
/**
* 最后登录访问IP
*/
@ApiModelProperty("最后登录访问IP")
private String accessIp;
/**
* 区域码
*/
@ApiModelProperty("区域码")
private String areaId;
/**
* 开放平台获取的unionid,解决这个同一个企业的不同APP和不同公众号之间的帐号共通
*/
@ApiModelProperty("开放平台获取的unionid,解决这个同一个企业的不同APP和不同公众号之间的帐号共通")
private String unionId;
/**
* 最后登录时间
*/
@ApiModelProperty("最后登录时间")
private Date lastLoginTime;
/**
* createTime
*/
private Date createTime;
/**
* updateTime
*/
private Date updateTime;
}
......@@ -22,6 +22,9 @@ resource.name: RESOURCE-SERVER
open.port: 9200
open.name: OPEN-SERVER
sync.port: 9555
sync.name: SYNC-SERVER
gateway.port: 9888
gateway.name: GATEWAY-SERVER
......
......@@ -22,6 +22,9 @@ resource.name: RESOURCE-SERVER
open.port: 9200
open.name: OPEN-SERVER
sync.port: 9555
sync.name: SYNC-SERVER
gateway.port: 9888
gateway.name: GATEWAY-SERVER
......@@ -44,6 +47,10 @@ jdbc.gxyl.url: jdbc:mysql://192.168.0.193:3306/gx-yl?characterEncoding=utf8&useS
jdbc.gxshjz.url: jdbc:mysql://192.168.0.193:3306/gx-shjz?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
jdbc.resource.url: jdbc:mysql://192.168.0.193:3306/mz_resource?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
qzj.jdbc.username: root
qzj.jdbc.password: rooT123!321
qzj.jdbc.gxcj.url: jdbc:mysql://192.168.0.197:10008/gx-cj?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
ojdbc.driver-class-name: oracle.jdbc.driver.OracleDriver
ojdbc.mzzt.url: jdbc:oracle:thin:@//192.168.0.31:1521/mzzt
ojdbc.zy.username: zy
......
......@@ -22,6 +22,9 @@ resource.name: RESOURCE-SERVER
open.port: 9200
open.name: OPEN-SERVER
sync.port: 9555
sync.name: SYNC-SERVER
gateway.port: 9888
gateway.name: GATEWAY-SERVER
......
......@@ -104,6 +104,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
<!-- 使用@profiles.active@需要添加以下内容 -->
......
package com.zq.open.controller.api;
import com.zq.open.service.DisabledService;
import com.zq.open.vo.Fdx88VO;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.http.*;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import java.util.Date;
import java.util.List;
@Api(tags = "残疾人相关接口")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/open/api/disabled")
public class DisabledApi {
private final DisabledService disabledService;
//补贴对象类型FDX88上报
@PostMapping("/btreport")
public void bttype() {
List<Fdx88VO> list = disabledService.search();
for (Fdx88VO vo : list) {
RestTemplate client = new RestTemplate();
HttpHeaders headers = new HttpHeaders();
// 请勿轻易改变此提交方式,大部分的情况下,提交方式都是表单提交
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
// 封装参数,千万不要替换为Map与HashMap,否则参数无法传递
MultiValueMap<String, Object> params= new LinkedMultiValueMap<String, Object>();
params.add("request_id", "");
params.add("version", "1.0");
params.add("format", "json");
params.add("sign", "");
params.add("timestamp", String.valueOf(new Date().getTime()));
params.add("access_key", "mzb_gx_450000");
params.add("biz_content", vo);
HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<MultiValueMap<String, Object>>(params, headers);
// 执行HTTP请求
ResponseEntity<String> response = client.exchange("https://zwxt.mca.gov.cn/fwjc_engine_int/rest/cjrfl_report_btdxlxxx", HttpMethod.POST, requestEntity, String.class);
// 输出结果
System.out.println(response.getBody());
// return response.getBody();
}
}
// //在册人员FDX01上报
// @PostMapping("/zcreport")
// public void registered() {
// List<BizContent> list = disabledService.search();
// for (BizContent bizContent : list) {
// RestTemplate client = new RestTemplate();
// HttpHeaders headers = new HttpHeaders();
// // 请勿轻易改变此提交方式,大部分的情况下,提交方式都是表单提交
// headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
// // 封装参数,千万不要替换为Map与HashMap,否则参数无法传递
// MultiValueMap<String, Object> params= new LinkedMultiValueMap<String, Object>();
// params.add("request_id", "");
// params.add("version", "1.0");
// params.add("format", "json");
// params.add("sign", "");
// params.add("timestamp", String.valueOf(new Date().getTime()));
// params.add("access_key", "mzb_gx_450000");
// //@RequestBody BizContent bizContent
// params.add("biz_content", bizContent);
// HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<MultiValueMap<String, Object>>(params, headers);
// // 执行HTTP请求
// ResponseEntity<String> response = client.exchange("https://zwxt.mca.gov.cn/fwjc_engine_int/rest/cjrfl_report_btdxlxxx", HttpMethod.POST, requestEntity, String.class);
// // 输出结果
// System.out.println(response.getBody());
//// return response.getBody();
// }
// }
}
package com.zq.open.service;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zq.open.dao.DisabledDao;
import com.zq.open.vo.Fdx88VO;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class DisabledService {
private DisabledDao disabledDao;
public List<Fdx88VO> search() {
// FDX88.builder().build();
List<Fdx88VO> list = disabledDao.selectList(Wrappers.lambdaQuery());
return list;
}
}
package com.zq.open.vo;
import lombok.Data;
@Data
public class DisableRequestVo {
private String accessKey;
private String format;
private String requestId;
private String sign;
private String timestamp;
private String version;
private Fdx88VO vo;
}
package com.zq.open.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
import lombok.Data;
@Data
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fdx88VO {
private String AFDX0801;
private String AXCP0004;
private String AFDX0803;
private String AFDX0804;
private String AFDX0805;
private String AFDX0806;
private String AFDX0807;
private String AFDX0808;
private String AFDX0809;
private String AFDX0810;
private String AFDX0811;
private String AFDX0812;
private String AFDX0814;
private String AFDX0815;
private String AFDX0816;
private String AFDX0817;
private String AFDX0818;
}
......@@ -15,5 +15,5 @@ eureka:
instance-id: ${spring.cloud.client.ip-address}:${server.port}
client:
service-url:
# defaultZone: http://admin:123456@127.0.0.1:8800/eureka/
defaultZone: http://admin:123456@192.168.0.191:8800/eureka/
defaultZone: http://admin:123456@127.0.0.1:8800/eureka/
# defaultZone: http://admin:123456@192.168.0.191:8800/eureka/
......@@ -53,6 +53,12 @@
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis.plus.version}</version>
</dependency>
<!--Mybatis plus多数据源-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.4.0</version>
</dependency>
<!-- druid数据源驱动 -->
<dependency>
<groupId>com.alibaba</groupId>
......@@ -65,30 +71,7 @@
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- sqlserver -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.2.0.jre8</version>
<scope>runtime</scope>
</dependency>
<!-- oracle8 -->
<dependency>
<groupId>org.oracle</groupId>
<artifactId>ojdbc8</artifactId>
<version>12.1.0.2.0</version>
</dependency>
<dependency>
<groupId>cn.easyproject</groupId>
<artifactId>orai18n</artifactId>
<version>12.1.0.2.0</version>
</dependency>
</dependencies>
<build>
......
package com.zq.sync;
import com.zq.sync.config.DynamicDataSourceConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
......@@ -13,34 +12,11 @@ import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
@EnableScheduling
@SpringBootApplication
@Import({DynamicDataSourceConfig.class})
@MapperScan("com.zq.sync.dao")
@SpringBootApplication
public class SyncApplication {
public static void main(String[] args) {
SpringApplication.run(SyncApplication.class, args);
}
@Bean
@ConditionalOnMissingBean
public CorsFilter corsFilter() {
final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
final CorsConfiguration config = new CorsConfiguration();
config.addAllowedOrigin("*");
config.addAllowedHeader("Content-Type");
config.addAllowedHeader("X-Requested-With");
config.addAllowedHeader("Accept");
config.addAllowedHeader("x-admin-token");
config.addAllowedHeader("x-app-token");
config.addAllowedMethod("OPTIONS");
config.addAllowedMethod("GET");
config.addAllowedMethod("POST");
source.registerCorsConfiguration("/**", config);
return new CorsFilter(source);
}
}
package com.zq.sync.config;
import java.lang.annotation.*;
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface DataSource {
String name() default "";
}
package com.zq.sync.config;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.core.Ordered;
import org.springframework.stereotype.Component;
import java.lang.reflect.Method;
@Aspect
@Component
@Slf4j
public class DataSourceAspect implements Ordered {
//等同于before
@Pointcut("@annotation(com.zq.sync.config.DataSource)")
public void dataSourcePointCut() {
}
@Around("dataSourcePointCut()")
public Object around(ProceedingJoinPoint point) throws Throwable {
MethodSignature signature = (MethodSignature) point.getSignature();
Method method = signature.getMethod();
DataSource ds = method.getAnnotation(DataSource.class);
if (ds == null) {
DynamicDataSource.setDataSource(DataSourceNames.GXMZ);
log.debug("set datasource is " + DataSourceNames.GXMZ);
} else {
DynamicDataSource.setDataSource(ds.name());
log.debug("set datasource is " + ds.name());
}
try {
return point.proceed();
} finally {
DynamicDataSource.clearDataSource();
log.debug("clean datasource");
}
}
@Override
public int getOrder() {
return 1;
}
}
package com.zq.sync.config;
public interface DataSourceNames {
String GXMZDBOS = "gxmzdbos";
String GXMZQZJ = "gxmzqzj";
String GXMZQZJ_DB = "gxmzqzj-db";
String GXMZQZJ_CJ = "gxmzqzj-cj";
String GXMZ = "gxmz";
String GXMZDBOS_DB = "gxmzdbos-db";
String GXMZDB = "gxmzdb";
}
package com.zq.sync.config;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;
import javax.sql.DataSource;
import java.util.Map;
public class DynamicDataSource extends AbstractRoutingDataSource {
private static final ThreadLocal<String> contextHolder = new ThreadLocal<>();
public DynamicDataSource(DataSource defaultTargetDataSource, Map<Object, Object> targetDataSources) {
super.setDefaultTargetDataSource(defaultTargetDataSource);
super.setTargetDataSources(targetDataSources);
super.afterPropertiesSet();
}
@Override
protected Object determineCurrentLookupKey() {
return getDataSource();
}
public static void setDataSource(String dataSource) {
contextHolder.set(dataSource);
}
public static String getDataSource() {
return contextHolder.get();
}
public static void clearDataSource() {
contextHolder.remove();
}
}
package com.zq.sync.config;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;
@Configuration
public class DynamicDataSourceConfig {
@Bean
@ConfigurationProperties("spring.datasource.druid.gxmzdbos")
public DataSource gxmzdbosDataSource() {
return DruidDataSourceBuilder.create().build();
}
@Bean
@ConfigurationProperties("spring.datasource.druid.gxmzqzj")
public DataSource gxmzqzjDataSource() {
return DruidDataSourceBuilder.create().build();
}
@Bean
@ConfigurationProperties("spring.datasource.druid.gxmzqzj-db")
public DataSource gxmzqzjDBDataSource() {
return DruidDataSourceBuilder.create().build();
}
@Bean
@ConfigurationProperties("spring.datasource.druid.gxmzqzj-cj")
public DataSource gxmzqzjCJDataSource() {
return DruidDataSourceBuilder.create().build();
}
@Bean
@ConfigurationProperties("spring.datasource.druid.gxmz")
public DataSource gxmzDataSource() {
return DruidDataSourceBuilder.create().build();
}
@Bean
@ConfigurationProperties("spring.datasource.druid.gxmzdb")
public DataSource gxmzDBSource() {
return DruidDataSourceBuilder.create().build();
}
@Bean
@ConfigurationProperties("spring.datasource.druid.gxmzdbos-db")
public DataSource gxmzdbDataSource() {
return DruidDataSourceBuilder.create().build();
}
@Bean
@Primary
public DynamicDataSource dataSource(@Qualifier("gxmzdbosDataSource") DataSource gxmzdbosDataSource,
@Qualifier("gxmzqzjDataSource") DataSource gxmzqzjDataSource,
@Qualifier("gxmzqzjDBDataSource") DataSource gxmzqzjDBDataSource,
@Qualifier("gxmzqzjCJDataSource") DataSource gxmzqzjCJDataSource,
@Qualifier("gxmzDataSource") DataSource gxmzDataSource,
@Qualifier("gxmzDBSource") DataSource gxmzDBSource,
@Qualifier("gxmzdbDataSource") DataSource gxmzdbDataSource) {
Map<Object, Object> targetDataSources = new HashMap<>();
targetDataSources.put(DataSourceNames.GXMZDBOS, gxmzdbosDataSource);
targetDataSources.put(DataSourceNames.GXMZQZJ, gxmzqzjDataSource);
targetDataSources.put(DataSourceNames.GXMZ, gxmzDataSource);
targetDataSources.put(DataSourceNames.GXMZDBOS_DB, gxmzdbDataSource);
targetDataSources.put(DataSourceNames.GXMZDB, gxmzDBSource);
targetDataSources.put(DataSourceNames.GXMZQZJ_DB,gxmzqzjDBDataSource);
targetDataSources.put(DataSourceNames.GXMZQZJ_CJ,gxmzqzjCJDataSource);
return new DynamicDataSource(gxmzDataSource, targetDataSources);
}
}
package com.zq.sync.config;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
/**
* 自定义线程池
* @author Lander
*/
@Slf4j
@Configuration
@EnableAsync
public class ExecutorConfig {
@Bean(name = "MyThreadPool")
public Executor MyThreadPool() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setCorePoolSize(30);//表示线程池核心线程,正常情况下开启的线程数量。
executor.setQueueCapacity(500); //配置队列大小
executor.setMaxPoolSize(50);//当核心线程都在跑任务,还有多余的任务会存到此处。
executor.setKeepAliveSeconds(60);//非核心线程的超时时长,超长后会被回收。
executor.setThreadNamePrefix("MyThreadPool-");//配置线程池前缀
//用来设置线程池关闭的时候等待所有任务都完成再继续销毁其他的Bean
executor.setWaitForTasksToCompleteOnShutdown(true);
executor.setRejectedExecutionHandler((Runnable r, ThreadPoolExecutor exe) -> {
log.warn("MyThreadPool-当前任务线程池队列已满!");
});//配置拒绝策略
executor.initialize();//初始化线程池。
return executor;
}
}
package com.zq.sync.config;
public class SynKeys {
/**
* 低保_标准 ENSYS_STANDARD 的同步配置标识
*/
public static final String STANDARD_SYN_KEY = "standard";
/**
* 低保_家庭 HOME_HIS 的同步配置标识
*/
public static final String HOME_HIS_SYN_KEY = "home_his";
/**
* 低保_申请_家庭 APPLY_HOME 的同步配置标识
*/
public static final String APPLY_HOME_SYN_KEY = "apply_home";
/**
* 低保_收入 INCOME_HIS 的同步配置标识
*/
public static final String INCOME_HIS_SYN_KEY = "income_his";
/**
* baf01 的同步配置标识
*/
public static final String BAF01_SYN_KEY = "baf01";
/**
* bap01 的同步配置标识
*/
public static final String BAP01_SYN_KEY = "bap01";
/**
* bap95 的同步配置标识
*/
public static final String BAP95_SYN_KEY = "bap";
}
package com.zq.sync.controller;
import com.zq.common.utils.AssertUtils;
import com.zq.common.vo.ResultVo;
import com.zq.sync.service.DisabledService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api(tags = "残疾人相关接口")
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/sync/disabled")
public class ReportController {
private final DisabledService disabledService;
@GetMapping(value = "/fdx88")
public ResultVo fdx88() {
disabledService.fdx88();
return ResultVo.success("成功");
}
@GetMapping(value = "/fdx07")
public ResultVo fdx07() {
disabledService.fdx07();
return ResultVo.success("成功");
}
@GetMapping(value = "/fdx06")
public ResultVo fdx06() {
disabledService.fdx06();
return ResultVo.success("成功");
}
@GetMapping(value = "/fdx05")
public ResultVo fdx05() {
disabledService.fdx05();
return ResultVo.success("成功");
}
@GetMapping(value = "/fdx04")
public ResultVo fdx04() {
disabledService.fdx04();
return ResultVo.success("成功");
}
@GetMapping(value = "/fdx03")
public ResultVo fdx03() {
disabledService.fdx03();
return ResultVo.success("成功");
}
@GetMapping(value = "/fdx02")
public ResultVo fdx02() {
disabledService.fdx02();
return ResultVo.success("成功");
}
@GetMapping(value = "/fdx01")
public ResultVo fdx01() {
disabledService.fdx01();
return ResultVo.success("成功");
}
}
package com.zq.sync.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.common.constant.DBName;
import com.zq.sync.entity.Fdx01;
import com.zq.sync.entity.Fdx02;
import org.springframework.stereotype.Repository;
/**
* 新增人员信息表(Fdx02)数据库访问层
*
* @author makejava
* @since 2021-09-23 10:49:09
*/
@DS(DBName.GXCJ)
@Repository
public interface Fdx01Dao extends BaseMapper<Fdx01> {
}
package com.zq.sync.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.common.constant.DBName;
import com.zq.sync.entity.Fdx02;
import com.zq.sync.entity.Fdx03;
import org.springframework.stereotype.Repository;
/**
* 新增人员信息表(Fdx02)数据库访问层
*
* @author makejava
* @since 2021-09-23 10:49:09
*/
@DS(DBName.GXCJ)
@Repository
public interface Fdx02Dao extends BaseMapper<Fdx02> {
}
package com.zq.sync.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.common.constant.DBName;
import com.zq.sync.entity.Fdx03;
import com.zq.sync.entity.Fdx04;
import org.springframework.stereotype.Repository;
/**
* 停发人员信息表(Fdx03)数据库访问层
*
* @author makejava
* @since 2021-09-23 10:49:09
*/
@DS(DBName.GXCJ)
@Repository
public interface Fdx03Dao extends BaseMapper<Fdx03> {
}
package com.zq.sync.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.common.constant.DBName;
import com.zq.sync.entity.Fdx04;
import com.zq.sync.entity.Fdx05;
import org.springframework.stereotype.Repository;
/**
* 补发人员信息表(Fdx04)数据库访问层
*
* @author makejava
* @since 2021-09-23 10:49:09
*/
@DS(DBName.GXCJ)
@Repository
public interface Fdx04Dao extends BaseMapper<Fdx04> {
}
package com.zq.sync.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.common.constant.DBName;
import com.zq.sync.entity.Fdx05;
import org.springframework.stereotype.Repository;
/**
* 追缴人员信息表(fdx05)表数据库访问层
*
* @author makejava
* @since 2021-09-23 10:49:09
*/
@DS(DBName.GXCJ)
@Repository
public interface Fdx05Dao extends BaseMapper<Fdx05> {
}
\ No newline at end of file
package com.zq.sync.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.common.constant.DBName;
import com.zq.sync.entity.Fdx06;
import com.zq.sync.entity.Fdx07;
import org.springframework.stereotype.Repository;
/**
* 历史信息表(fdx06)表数据库访问层
*
* @author makejava
* @since 2021-09-23 10:49:09
*/
@DS(DBName.GXCJ)
@Repository
public interface Fdx06Dao extends BaseMapper<Fdx06> {
}
package com.zq.sync.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.common.constant.DBName;
import com.zq.sync.entity.Fdx07;
import org.springframework.stereotype.Repository;
/**
* 发放汇总表(fdx07)表数据库访问层
*
* @author makejava
* @since 2021-09-23 10:49:09
*/
@DS(DBName.GXCJ)
@Repository
public interface Fdx07Dao extends BaseMapper<Fdx07> {
}
package com.zq.open.dao;
package com.zq.sync.dao;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.common.constant.DBName;
import com.zq.open.vo.Fdx88VO;
import com.zq.sync.entity.Fdx88;
import org.springframework.stereotype.Repository;
......@@ -15,6 +15,6 @@ import org.springframework.stereotype.Repository;
*/
@DS(DBName.GXCJ)
@Repository
public interface DisabledDao extends BaseMapper<Fdx88VO> {
public interface Fdx88Dao extends BaseMapper<Fdx88> {
}
package com.zq.sync.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 在册人员信息表(Fdx01)实体类
*
* @author makejava
* @since 2021-11-25 17:29:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Fdx01 {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private Date afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 发证时间
*/
@ApiModelProperty("发证时间")
private Date afdx0831;
/**
* 档案编号
*/
@ApiModelProperty("档案编号")
private String afdx0852;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String afdx0053;
/**
* 补贴类型
*/
@ApiModelProperty("补贴类型")
private String axcp0014;
/**
* 补贴金额(元/月)
*/
@ApiModelProperty("补贴金额(元/月)")
private Float afdx0055;
/**
* 月工资
*/
@ApiModelProperty("月工资")
private Float afdx0851;
/**
* 发放起始月份
*/
@ApiModelProperty("发放起始月份")
private Date afdx0561;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 户籍地址
*/
@ApiModelProperty("户籍地址")
private String afdx0820;
/**
* 残疾人家庭住址
*/
@ApiModelProperty("残疾人家庭住址")
private String afdx0824;
/**
* 邮政编码
*/
@ApiModelProperty("邮政编码")
private String afdx0819;
/**
* 残疾人电话
*/
@ApiModelProperty("残疾人电话")
private String afdp0004;
/**
* 残疾人联系人
*/
@ApiModelProperty("残疾人联系人")
private String afdx0843;
/**
* 残疾人联系人电话
*/
@ApiModelProperty("残疾人联系人电话")
private String afdx0844;
/**
* 开户行
*/
@ApiModelProperty("开户行")
private String axcp0027;
/**
* 银行账户名
*/
@ApiModelProperty("银行账户名")
private String axcp0030;
/**
* 银行卡号
*/
@ApiModelProperty("银行卡号")
private String axcp0029;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
/**
* 乡镇录入人姓名
*/
@ApiModelProperty("乡镇录入人姓名")
private String afdx0567;
/**
* 乡镇录入人电话
*/
@ApiModelProperty("乡镇录入人电话")
private String afdx0568;
/**
* 乡镇录入意见
*/
@ApiModelProperty("乡镇录入意见")
private String afdx0566;
/**
* 残联审核人姓名
*/
@ApiModelProperty("残联审核人姓名")
private String afdx0570;
/**
* 残联审核人电话
*/
@ApiModelProperty("残联审核人电话")
private String afdx0571;
/**
* 残联审核意见
*/
@ApiModelProperty("残联审核意见")
private String afdx0569;
/**
* 民政审定人姓名
*/
@ApiModelProperty("民政审定人姓名")
private String afdx1017;
/**
* 民政审定人电话
*/
@ApiModelProperty("民政审定人电话")
private String afdx0574;
/**
* 民政审定意见
*/
@ApiModelProperty("民政审定意见")
private String afdx0572;
/**
* 乡镇初审时间
*/
@ApiModelProperty("乡镇初审时间")
private Date afdx0868;
/**
* 残联审核时间
*/
@ApiModelProperty("残联审核时间")
private Date afdx0869;
/**
* 民政审定时间
*/
@ApiModelProperty("民政审定时间")
private Date afdx0870;
/**
* 录入时间
*/
@ApiModelProperty("录入时间")
private Date afdx0817;
/**
* 修改时间
*/
@ApiModelProperty("修改时间")
private Date afdx0818;
}
\ No newline at end of file
package com.zq.sync.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 新增人员信息表(Fdx02)实体类
*
* @author makejava
* @since 2021-11-25 16:49:06
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Fdx02 {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private Date afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 发证时间
*/
@ApiModelProperty("发证时间")
private Date afdx0831;
/**
* 档案编号
*/
@ApiModelProperty("档案编号")
private String afdx0852;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String afdx0053;
/**
* 补贴类型
*/
@ApiModelProperty("补贴类型")
private String axcp0014;
/**
* 补贴金额(元/月)
*/
@ApiModelProperty("补贴金额(元/月)")
private Integer afdx0055;
/**
* 月工资
*/
@ApiModelProperty("月工资")
private Integer afdx0851;
/**
* 发放起始月份
*/
@ApiModelProperty("发放起始月份")
private Date afdx0561;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 户籍地址
*/
@ApiModelProperty("户籍地址")
private String afdx0820;
/**
* 残疾人家庭住址
*/
@ApiModelProperty("残疾人家庭住址")
private String afdx0824;
/**
* 邮政编码
*/
@ApiModelProperty("邮政编码")
private String afdx0819;
/**
* 残疾人电话
*/
@ApiModelProperty("残疾人电话")
private String afdp0004;
/**
* 残疾人联系人
*/
@ApiModelProperty("残疾人联系人")
private String afdx0843;
/**
* 残疾人联系人电话
*/
@ApiModelProperty("残疾人联系人电话")
private String afdx0844;
/**
* 开户行
*/
@ApiModelProperty("开户行")
private String axcp0027;
/**
* 银行账户名
*/
@ApiModelProperty("银行账户名")
private String axcp0030;
/**
* 银行卡号
*/
@ApiModelProperty("银行卡号")
private String axcp0029;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
/**
* 乡镇录入人姓名
*/
@ApiModelProperty("乡镇录入人姓名")
private String afdx0567;
/**
* 乡镇录入人电话
*/
@ApiModelProperty("乡镇录入人电话")
private String afdx0568;
/**
* 乡镇录入意见
*/
@ApiModelProperty("乡镇录入意见")
private String afdx0566;
/**
* 残联审核人姓名
*/
@ApiModelProperty("残联审核人姓名")
private String afdx0570;
/**
* 残联审核人电话
*/
@ApiModelProperty("残联审核人电话")
private String afdx0571;
/**
* 残联审核意见
*/
@ApiModelProperty("残联审核意见")
private String afdx0569;
/**
* 民政审定人姓名
*/
@ApiModelProperty("民政审定人姓名")
private String afdx1017;
/**
* 民政审定人电话
*/
@ApiModelProperty("民政审定人电话")
private String afdx0574;
/**
* 民政审定意见
*/
@ApiModelProperty("民政审定意见")
private String afdx0572;
/**
* 乡镇初审时间
*/
@ApiModelProperty("乡镇初审时间")
private Date afdx0868;
/**
* 残联审核时间
*/
@ApiModelProperty("残联审核时间")
private Date afdx0869;
/**
* 民政审定时间
*/
@ApiModelProperty("民政审定时间")
private Date afdx0870;
/**
* 录入时间
*/
@ApiModelProperty("录入时间")
private Date afdx0817;
/**
* 修改时间
*/
@ApiModelProperty("修改时间")
private Date afdx0818;
}
\ No newline at end of file
package com.zq.sync.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 停发人员信息表(Fdx03)实体类
*
* @author makejava
* @since 2021-11-25 16:19:05
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Fdx03 {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private Date afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 停发原因
*/
@ApiModelProperty("停发原因")
private String afdx0831;
/**
* 补贴发放截止月份
*/
@ApiModelProperty("补贴发放截止月份")
private Date afdx0832;
/**
* 停发的补贴类型
*/
@ApiModelProperty("停发的补贴类型")
private String axcp0004;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
}
\ No newline at end of file
package com.zq.sync.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 补发人员信息表(Fdx04)实体类
*
* @author makejava
* @since 2021-11-25 10:03:07
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Fdx04 {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private Date afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 补发原因
*/
@ApiModelProperty("补发原因")
private String axcp0009;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String axcp0010;
/**
* 补发起始月份
*/
@ApiModelProperty("补发起始月份")
private Date axcp0011;
/**
* 补发截止月份
*/
@ApiModelProperty("补发截止月份")
private Date axcp0012;
/**
* 发放月份
*/
@ApiModelProperty("发放月份")
private Date axcp0013;
/**
* 补发的补贴类型
*/
@ApiModelProperty("补发的补贴类型")
private String axcp0014;
/**
* 补发金额(元/月)
*/
@ApiModelProperty("补发金额(元/月)")
private Integer afdx0055;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
}
\ No newline at end of file
package com.zq.sync.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 追缴人员信息表(Fdx05)实体类
*
* @author makejava
* @since 2021-11-25 08:40:52
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Fdx05 {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private Date afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 追缴原因
*/
@ApiModelProperty("追缴原因")
private String axcp0009;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String axcp0010;
/**
* 追缴起始月份
*/
@ApiModelProperty("追缴起始月份")
private Date axcp0011;
/**
* 追缴截止月份
*/
@ApiModelProperty("追缴截止月份")
private Date axcp0012;
/**
* 追缴月份
*/
@ApiModelProperty("追缴月份")
private Date axcp0013;
/**
* 追缴的补贴类型
*/
@ApiModelProperty("追缴的补贴类型")
private String axcp0014;
/**
* 追缴的金额(元/月)
*/
@ApiModelProperty("追缴的金额(元/月)")
private Integer axcp0015;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
}
\ No newline at end of file
package com.zq.sync.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 历史信息表(Fdx06)实体类
*
* @author makejava
* @since 2021-11-24 16:21:57
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Fdx06 {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private Date agax0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 发证时间
*/
@ApiModelProperty("发证时间")
private Date afdx0831;
/**
* 档案编号
*/
@ApiModelProperty("档案编号")
private String afdx0852;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String afdx0053;
/**
* 补贴类型
*/
@ApiModelProperty("补贴类型")
private String axcp0014;
/**
* 补贴发放起始月份
*/
@ApiModelProperty("补贴发放起始月份")
private Date afdx0054;
/**
* 补贴发截止始月份
*/
@ApiModelProperty("补贴发截止始月份")
private Date afdx0055;
/**
* 月工资
*/
@ApiModelProperty("月工资")
private Integer afdx0851;
/**
* 发放起始月份
*/
@ApiModelProperty("发放起始月份")
private Date afdx0561;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 户籍地址
*/
@ApiModelProperty("户籍地址")
private String afdx0820;
/**
* 残疾人家庭住址
*/
@ApiModelProperty("残疾人家庭住址")
private String afdx0824;
/**
* 邮政编码
*/
@ApiModelProperty("邮政编码")
private String afdx0819;
/**
* 残疾人电话
*/
@ApiModelProperty("残疾人电话")
private String afdp0004;
/**
* 残疾人联系人
*/
@ApiModelProperty("残疾人联系人")
private String afdx0843;
/**
* 残疾人联系人电话
*/
@ApiModelProperty("残疾人联系人电话")
private String afdx0844;
/**
* 开户行
*/
@ApiModelProperty("开户行")
private String axcp0027;
/**
* 银行账户名
*/
@ApiModelProperty("银行账户名")
private String axcp0030;
/**
* 银行卡号
*/
@ApiModelProperty("银行卡号")
private String axcp0029;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
/**
* 乡镇录入人姓名
*/
@ApiModelProperty("乡镇录入人姓名")
private String afdx0567;
/**
* 乡镇录入人电话
*/
@ApiModelProperty("乡镇录入人电话")
private String afdx0568;
/**
* 乡镇录入意见
*/
@ApiModelProperty("乡镇录入意见")
private String afdx0566;
/**
* 残联审核人姓名
*/
@ApiModelProperty("残联审核人姓名")
private String afdx0570;
/**
* 残联审核人电话
*/
@ApiModelProperty("残联审核人电话")
private String afdx0571;
/**
* 残联审核意见
*/
@ApiModelProperty("残联审核意见")
private String afdx0569;
/**
* 民政审定人姓名
*/
@ApiModelProperty("民政审定人姓名")
private String afdx1017;
/**
* 民政审定人电话
*/
@ApiModelProperty("民政审定人电话")
private String afdx0574;
/**
* 民政审定意见
*/
@ApiModelProperty("民政审定意见")
private String afdx0572;
/**
* 乡镇初审时间
*/
@ApiModelProperty("乡镇初审时间")
private Date afdx0868;
/**
* 残联审核时间
*/
@ApiModelProperty("残联审核时间")
private Date afdx0869;
/**
* 民政审定时间
*/
@ApiModelProperty("民政审定时间")
private Date afdx0870;
/**
* 录入时间
*/
@ApiModelProperty("录入时间")
private Date afdx0817;
/**
* 修改时间
*/
@ApiModelProperty("修改时间")
private Date afdx0818;
}
\ No newline at end of file
package com.zq.sync.entity;
import java.util.Date;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 发放汇总表(Fdx07)实体类
*
* @author makejava
* @since 2021-11-24 11:09:53
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Fdx07 {
/**
* 省
*/
@ApiModelProperty("省")
private String agax0806;
/**
* 市
*/
@ApiModelProperty("市")
private String agax0807;
/**
* 区县
*/
@ApiModelProperty("区县")
private String agax0808;
/**
* 发放月份
*/
@ApiModelProperty("发放月份")
private Date agax0901;
/**
* 发放人数
*/
@ApiModelProperty("发放人数")
private Integer agax0902;
/**
* 生活补贴发放人数
*/
@ApiModelProperty("生活补贴发放人数")
private Integer agax0903;
/**
* 护理补贴发放人数
*/
@ApiModelProperty("护理补贴发放人数")
private Integer agax0904;
/**
* 发放总金额
*/
@ApiModelProperty("发放总金额")
private Integer agax0905;
/**
* 生活补贴发放总金额
*/
@ApiModelProperty("生活补贴发放总金额")
private Integer agax0906;
/**
* 护理补贴发放总金额
*/
@ApiModelProperty("护理补贴发放总金额")
private Integer agax0907;
/**
* 生活补发人数
*/
@ApiModelProperty("生活补发人数")
private Integer agax0908;
/**
* 生活补发金额
*/
@ApiModelProperty("生活补发金额")
private Integer agax0909;
/**
* 护理补发人数
*/
@ApiModelProperty("护理补发人数")
private Integer agax0910;
/**
* 护理补发金额
*/
@ApiModelProperty("护理补发金额")
private Integer agax0911;
/**
* 生活补贴新增人数
*/
@ApiModelProperty("生活补贴新增人数")
private Integer agax0912;
/**
* 生活补贴退出人数
*/
@ApiModelProperty("生活补贴退出人数")
private Integer agax0913;
/**
* 护理补贴新增人数
*/
@ApiModelProperty("护理补贴新增人数")
private Integer agax0914;
/**
* 护理补贴退出人数
*/
@ApiModelProperty("护理补贴退出人数")
private Integer agax0915;
/**
* 发放总人数
*/
@ApiModelProperty("发放总人数")
private Integer agax0916;
/**
* 同时享受两种补贴总人数
*/
@ApiModelProperty("同时享受两种补贴总人数")
private Integer agax0917;
/**
* 同时享受两种补贴总金额
*/
@ApiModelProperty("同时享受两种补贴总金额")
private Integer agax0918;
/**
* 护理补贴续发人数
*/
@ApiModelProperty("护理补贴续发人数")
private Integer agax0919;
/**
* 生活补贴续发人数
*/
@ApiModelProperty("生活补贴续发人数")
private Integer agax0920;
/**
* 生活补发人次
*/
@ApiModelProperty("生活补发人次")
private Integer agax0921;
/**
* 护理补发人次
*/
@ApiModelProperty("护理补发人次")
private Integer agax0922;
}
\ No newline at end of file
package com.zq.open.entity;
import java.util.Date;
package com.zq.sync.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
......@@ -9,6 +7,8 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* 补贴对象类型信息表(Fdx88)实体类
*
......
package com.zq.sync.service;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zq.sync.dao.*;
import com.zq.sync.entity.*;
import com.zq.sync.vo.*;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.List;
@Slf4j
@Service
@RequiredArgsConstructor
public class DisabledService {
private final Fdx88Dao fdx88Dao;
private final Fdx07Dao fdx07Dao;
private final Fdx06Dao fdx06Dao;
private final Fdx05Dao fdx05Dao;
private final Fdx04Dao fdx04Dao;
private final Fdx03Dao fdx03Dao;
private final Fdx02Dao fdx02Dao;
private final Fdx01Dao fdx01Dao;
public void fdx88(){
int page = 1;
int size = 10000;
while (true){
Page<Fdx88> fdx88Page = fdx88Dao.selectPage(new Page<>(page, size), null);
List<Fdx88> records = fdx88Page.getRecords();
for (Fdx88 fdx88 : records) {
Fdx88Vo build = Fdx88Vo.builder()
.afdx0801(fdx88.getAfdx0801())
.axcp0004(fdx88.getAxcp0004())
.afdx0803(fdx88.getAfdx0803()!=null? BigDecimal.valueOf(fdx88.getAfdx0803()).setScale(2, RoundingMode.HALF_UP).toString():"")
.afdx0804(fdx88.getAfdx0804())
.afdx0805(fdx88.getAfdx0805())
.afdx0806(fdx88.getAfdx0806())
.afdx0807(fdx88.getAfdx0807())
.afdx0808(fdx88.getAfdx0808())
.afdx0809(fdx88.getAfdx0809())
.afdx0810(fdx88.getAfdx0810()!=null? DateUtil.format(fdx88.getAfdx0810(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0811(fdx88.getAfdx0811()!=null? DateUtil.format(fdx88.getAfdx0811(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0812(fdx88.getAfdx0812())
.afdx0814(fdx88.getAfdx0814())
.afdx0815(fdx88.getAfdx0815())
.afdx0816(fdx88.getAfdx0816())
.afdx0817(fdx88.getAfdx0817()!=null? DateUtil.format(fdx88.getAfdx0817(), DatePattern.NORM_DATETIME_PATTERN):"")
.afdx0818(fdx88.getAfdx0818()!=null? DateUtil.format(fdx88.getAfdx0818(), DatePattern.NORM_DATETIME_PATTERN):"")
.build();
HttpRequest request = HttpRequest.post("https://59.255.186.1/yhbcp-engine_gov/rest/cjrfl_report_btdxlxxx")
.form("access_key", "mzb_gx_450000")
.form("format", "json")
.form("request_id", IdUtil.simpleUUID())
.form("sign", "")
.form("timestamp", System.currentTimeMillis())
.form("version", "1.0")
.form("biz_content", JSONUtil.toJsonStr(build));
HttpResponse response = request.execute();
if(response.getStatus()!=200){
log.error("接口请求失败 => {}", request);
}
String body = response.body();
JSONObject obj = JSONUtil.parseObj(body);
Integer code = obj.getInt("code");
if(code==null||code!=1){
log.warn("上报错误 => {}",body);
}
}
if(!fdx88Page.hasNext()){
break;
}
page++;
}
}
public void fdx07() {
int page = 1;
int size = 10000;
while (true){
Page<Fdx07> fdx07Page = fdx07Dao.selectPage(new Page<>(page, size), null);
List<Fdx07> records = fdx07Page.getRecords();
for (Fdx07 fdx07 : records) {
Fdx07Vo build = Fdx07Vo.builder()
.agax0806(fdx07.getAgax0806())
.agax0807(fdx07.getAgax0807())
.agax0808(fdx07.getAgax0808())
.agax0901(fdx07.getAgax0901()!=null? DateUtil.format(fdx07.getAgax0901(), DatePattern.NORM_MONTH_PATTERN):"")
.agax0902(fdx07.getAgax0902())
.agax0903(fdx07.getAgax0903())
.agax0904(fdx07.getAgax0904())
.agax0905(fdx07.getAgax0905()!=null? BigDecimal.valueOf(fdx07.getAgax0905()).setScale(2, RoundingMode.HALF_UP).toString():"")
.agax0906(fdx07.getAgax0906()!=null? BigDecimal.valueOf(fdx07.getAgax0906()).setScale(2, RoundingMode.HALF_UP).toString():"")
.agax0907(fdx07.getAgax0907()!=null? BigDecimal.valueOf(fdx07.getAgax0907()).setScale(2, RoundingMode.HALF_UP).toString():"")
.agax0908(fdx07.getAgax0908())
.agax0909(fdx07.getAgax0909()!=null? BigDecimal.valueOf(fdx07.getAgax0909()).setScale(2, RoundingMode.HALF_UP).toString():"")
.agax0910(fdx07.getAgax0910())
.agax0911(fdx07.getAgax0911()!=null? BigDecimal.valueOf(fdx07.getAgax0911()).setScale(2, RoundingMode.HALF_UP).toString():"")
.agax0912(fdx07.getAgax0912())
.agax0913(fdx07.getAgax0913())
.agax0914(fdx07.getAgax0914())
.agax0915(fdx07.getAgax0915())
.agax0916(fdx07.getAgax0916())
.agax0917(fdx07.getAgax0917())
.agax0918(fdx07.getAgax0918()!=null? BigDecimal.valueOf(fdx07.getAgax0918()).setScale(2, RoundingMode.HALF_UP).toString():"")
.agax0919(fdx07.getAgax0919())
.agax0920(fdx07.getAgax0920())
.agax0921(fdx07.getAgax0921())
.agax0922(fdx07.getAgax0922())
.build();
HttpRequest request = HttpRequest.post("https://59.255.186.1/yhbcp-engine_gov/rest/cjrfl_report_ffhzxx")
.form("access_key", "mzb_gx_450000")
.form("format", "json")
.form("request_id", IdUtil.simpleUUID())
.form("sign", "")
.form("timestamp", System.currentTimeMillis())
.form("version", "1.0")
.form("biz_content", JSONUtil.toJsonStr(build));
HttpResponse response = request.execute();
if(response.getStatus()!=200){
log.error("接口请求失败 => {}", request);
}
String body = response.body();
JSONObject obj = JSONUtil.parseObj(body);
Integer code = obj.getInt("code");
if(code==null||code!=1){
log.warn("上报错误 => {}",body);
}
}
if(!fdx07Page.hasNext()){
break;
}
page++;
}
}
public void fdx06(){
int page = 1;
int size = 10000;
while (true){
Page<Fdx06> fdx06Page = fdx06Dao.selectPage(new Page<>(page, size), null);
List<Fdx06> records = fdx06Page.getRecords();
for (Fdx06 fdx06 : records) {
Fdx06Vo build =Fdx06Vo.builder()
.axcp0002(fdx06.getAxcp0002())
.axcp0006(fdx06.getAxcp0006())
.agax0823(fdx06.getAgax0823()!=null? DateUtil.format(fdx06.getAgax0823(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0008(fdx06.getAxcp0008())
.axcp0005(fdx06.getAxcp0005())
.afdp0505(fdx06.getAfdp0505())
.afdx0831(fdx06.getAfdx0831())
.afdx0852(fdx06.getAfdx0852())
.afdp0504(fdx06.getAfdp0504())
.afdp0503(fdx06.getAfdp0503())
.afdx0053(fdx06.getAfdx0053())
.axcp0014(fdx06.getAxcp0014())
.afdx0054(fdx06.getAfdx0054()!=null? DateUtil.format(fdx06.getAfdx0054(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0055(fdx06.getAfdx0055()!=null? DateUtil.format(fdx06.getAfdx0055(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0851(fdx06.getAfdx0851()!=null? BigDecimal.valueOf(fdx06.getAfdx0851()).setScale(2, RoundingMode.HALF_UP).toString():"")
.afdx0561(fdx06.getAfdx0561()!=null? DateUtil.format(fdx06.getAfdx0561(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0829(fdx06.getAfdx0829())
.afdx0830(fdx06.getAfdx0830())
.afdx0820(fdx06.getAfdx0820())
.afdx0824(fdx06.getAfdx0824())
.afdx0819(fdx06.getAfdx0819())
.afdp0004(fdx06.getAfdp0004())
.afdx0843(fdx06.getAfdx0843())
.afdx0844(fdx06.getAfdx0844())
.axcp0027(fdx06.getAxcp0027())
.axcp0030(fdx06.getAxcp0030())
.axcp0029(fdx06.getAxcp0029())
.afdx0806(fdx06.getAfdx0806())
.afdx0807(fdx06.getAfdx0807())
.afdx0808(fdx06.getAfdx0808())
.afdx0802(fdx06.getAfdx0802())
.afdx0567(fdx06.getAfdx0567())
.afdx0568(fdx06.getAfdx0568())
.afdx0566(fdx06.getAfdx0566())
.afdx0570(fdx06.getAfdx0570())
.afdx0571(fdx06.getAfdx0571())
.afdx0569(fdx06.getAfdx0569())
.afdx1017(fdx06.getAfdx1017())
.afdx0574(fdx06.getAfdx0574())
.afdx0572(fdx06.getAfdx0572())
.afdx0868(fdx06.getAfdx0868()!=null? DateUtil.format(fdx06.getAfdx0868(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0869(fdx06.getAfdx0869()!=null? DateUtil.format(fdx06.getAfdx0869(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0870(fdx06.getAfdx0870()!=null? DateUtil.format(fdx06.getAfdx0870(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0817(fdx06.getAfdx0817()!=null? DateUtil.format(fdx06.getAfdx0817(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0818(fdx06.getAfdx0818()!=null? DateUtil.format(fdx06.getAfdx0818(), DatePattern.NORM_MONTH_PATTERN):"")
.build();
HttpRequest request = HttpRequest.post("https://59.255.186.1/yhbcp-engine_gov/rest/cjrfl_report_lsxx")
.form("access_key", "mzb_gx_450000")
.form("format", "json")
.form("request_id", IdUtil.simpleUUID())
.form("sign", "")
.form("timestamp", System.currentTimeMillis())
.form("version", "1.0")
.form("biz_content", JSONUtil.toJsonStr(build));
HttpResponse response = request.execute();
if(response.getStatus()!=200){
log.error("接口请求失败 => {}", request);
}
String body = response.body();
JSONObject obj = JSONUtil.parseObj(body);
Integer code = obj.getInt("code");
if(code==null||code!=1){
log.warn("上报错误 => {}",body);
}
if(!fdx06Page.hasNext()){
break;
}
page++;
}
}
}
public void fdx05(){
int page = 1;
int size = 10000;
while (true){
Page<Fdx05> fdx05Page = fdx05Dao.selectPage(new Page<>(page, size), null);
List<Fdx05> records = fdx05Page.getRecords();
for (Fdx05 fdx05 : records) {
Fdx05Vo build = Fdx05Vo.builder()
.axcp0002(fdx05.getAxcp0002())
.axcp0006(fdx05.getAxcp0006())
.afdx0823(fdx05.getAfdx0823()!=null? DateUtil.format(fdx05.getAfdx0823(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0008(fdx05.getAxcp0008())
.axcp0005(fdx05.getAxcp0005())
.afdp0505(fdx05.getAfdp0505())
.afdp0504(fdx05.getAfdp0504())
.afdp0503(fdx05.getAfdp0503())
.afdx0829(fdx05.getAfdx0829())
.afdx0830(fdx05.getAfdx0830())
.axcp0009(fdx05.getAxcp0009())
.axcp0010(fdx05.getAxcp0010())
.axcp0011(fdx05.getAxcp0011()!=null? DateUtil.format(fdx05.getAxcp0011(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0012(fdx05.getAxcp0012()!=null? DateUtil.format(fdx05.getAxcp0012(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0013(fdx05.getAxcp0013()!=null? DateUtil.format(fdx05.getAxcp0013(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0014(fdx05.getAxcp0014())
.axcp0015(fdx05.getAxcp0015())
.afdx0806(fdx05.getAfdx0806())
.afdx0807(fdx05.getAfdx0807())
.afdx0808(fdx05.getAfdx0808())
.afdx0802(fdx05.getAfdx0802())
.build();
HttpRequest request = HttpRequest.post("https://59.255.186.1/yhbcp-engine_gov/rest/cjrfl_report_zjryxx")
.form("access_key", "mzb_gx_450000")
.form("format", "json")
.form("request_id", IdUtil.simpleUUID())
.form("sign", "")
.form("timestamp", System.currentTimeMillis())
.form("version", "1.0")
.form("biz_content", JSONUtil.toJsonStr(build));
HttpResponse response = request.execute();
if(response.getStatus()!=200){
log.error("接口请求失败 => {}", request);
}
String body = response.body();
JSONObject obj = JSONUtil.parseObj(body);
Integer code = obj.getInt("code");
if(code==null||code!=1){
log.warn("上报错误 => {}",body);
}
if(!fdx05Page.hasNext()){
break;
}
page++;
}
}
}
public void fdx04(){
int page = 1;
int size = 10000;
while (true){
Page<Fdx04> fdx04Page = fdx04Dao.selectPage(new Page<>(page, size), null);
List<Fdx04> records = fdx04Page.getRecords();
for (Fdx04 fdx04 : records){
Fdx04Vo build = Fdx04Vo.builder()
.axcp0002(fdx04.getAxcp0002())
.axcp0006(fdx04.getAxcp0006())
.afdx0823(fdx04.getAfdx0823()!=null? DateUtil.format(fdx04.getAfdx0823(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0008(fdx04.getAxcp0008())
.axcp0005(fdx04.getAxcp0005())
.afdp0505(fdx04.getAfdp0505())
.afdp0504(fdx04.getAfdp0504())
.afdp0503(fdx04.getAfdp0503())
.afdx0829(fdx04.getAfdx0829())
.afdx0830(fdx04.getAfdx0830())
.axcp0009(fdx04.getAxcp0009())
.axcp0010(fdx04.getAxcp0010())
.axcp0011(fdx04.getAxcp0011()!=null? DateUtil.format(fdx04.getAxcp0011(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0012(fdx04.getAxcp0012()!=null? DateUtil.format(fdx04.getAxcp0012(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0013(fdx04.getAxcp0013()!=null? DateUtil.format(fdx04.getAxcp0013(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0014(fdx04.getAxcp0014())
.afdx0055(fdx04.getAfdx0055()!=null? BigDecimal.valueOf(fdx04.getAfdx0055()).setScale(2, RoundingMode.HALF_UP).toString():"")
.afdx0806(fdx04.getAfdx0806())
.afdx0807(fdx04.getAfdx0807())
.afdx0808(fdx04.getAfdx0808())
.afdx0802(fdx04.getAfdx0802())
.build();
HttpRequest request = HttpRequest.post("https://59.255.186.1/yhbcp-engine_gov/rest/cjrfl_report_bfryxx")
.form("access_key", "mzb_gx_450000")
.form("format", "json")
.form("request_id", IdUtil.simpleUUID())
.form("sign", "")
.form("timestamp", System.currentTimeMillis())
.form("version", "1.0")
.form("biz_content", JSONUtil.toJsonStr(build));
HttpResponse response = request.execute();
if(response.getStatus()!=200){
log.error("接口请求失败 => {}", request);
}
String body = response.body();
JSONObject obj = JSONUtil.parseObj(body);
Integer code = obj.getInt("code");
if(code==null||code!=1){
log.warn("上报错误 => {}",body);
}
if(!fdx04Page.hasNext()){
break;
}
page++;
}
}
}
public void fdx03() {
int page = 1;
int size = 10000;
while (true){
Page<Fdx03> fdx03Page = fdx03Dao.selectPage(new Page<>(page, size), null);
List<Fdx03> records = fdx03Page.getRecords();
for (Fdx03 fdx03 : records) {
Fdx03Vo build = Fdx03Vo.builder()
.axcp0002(fdx03.getAxcp0002())
.axcp0006(fdx03.getAxcp0006())
.afdx0823(fdx03.getAfdx0823()!=null? DateUtil.format(fdx03.getAfdx0823(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0008(fdx03.getAxcp0008())
.axcp0005(fdx03.getAxcp0005())
.afdp0505(fdx03.getAfdp0505())
.afdp0504(fdx03.getAfdp0504())
.afdp0503(fdx03.getAfdp0503())
.afdx0829(fdx03.getAfdx0829())
.afdx0830(fdx03.getAfdx0830())
.afdx0831(fdx03.getAfdx0831())
.afdx0832(fdx03.getAfdx0832()!=null? DateUtil.format(fdx03.getAfdx0832(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0004(fdx03.getAxcp0004())
.afdx0806(fdx03.getAfdx0806())
.afdx0807(fdx03.getAfdx0807())
.afdx0808(fdx03.getAfdx0808())
.afdx0802(fdx03.getAfdx0802())
.build();
HttpRequest request = HttpRequest.post("https://59.255.186.1/yhbcp-engine_gov/rest/cjrfl_report_tfryxx")
.form("access_key", "mzb_gx_450000")
.form("format", "json")
.form("request_id", IdUtil.simpleUUID())
.form("sign", "")
.form("timestamp", System.currentTimeMillis())
.form("version", "1.0")
.form("biz_content", JSONUtil.toJsonStr(build));
HttpResponse response = request.execute();
if (response.getStatus() != 200) {
log.error("接口请求失败 => {}", request);
}
String body = response.body();
JSONObject obj = JSONUtil.parseObj(body);
Integer code = obj.getInt("code");
if (code == null || code != 1) {
log.warn("上报错误 => {}", body);
}
if (!fdx03Page.hasNext()) {
break;
}
page++;
}
}
}
public void fdx02(){
int page = 1;
int size = 10000;
while (true){
Page<Fdx02> fdx02Page = fdx02Dao.selectPage(new Page<>(page, size), null);
List<Fdx02> records = fdx02Page.getRecords();
for (Fdx02 fdx02 : records) {
Fdx02Vo build= Fdx02Vo.builder()
.axcp0002(fdx02.getAxcp0002())
.axcp0006(fdx02.getAxcp0006())
.afdx0823(fdx02.getAfdx0823()!=null? DateUtil.format(fdx02.getAfdx0823(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0008(fdx02.getAxcp0008())
.axcp0005(fdx02.getAxcp0005())
.afdp0505(fdx02.getAfdp0505())
.afdx0831(fdx02.getAfdx0831()!=null? DateUtil.format(fdx02.getAfdx0831(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0852(fdx02.getAfdx0852())
.afdp0504(fdx02.getAfdp0504())
.afdp0503(fdx02.getAfdp0503())
.afdx0053(fdx02.getAfdx0053())
.axcp0014(fdx02.getAxcp0014())
.afdx0055(fdx02.getAfdx0055()!=null? BigDecimal.valueOf(fdx02.getAfdx0055()).setScale(2, RoundingMode.HALF_UP).toString():"")
.afdx0851(fdx02.getAfdx0851()!=null? BigDecimal.valueOf(fdx02.getAfdx0851()).setScale(2, RoundingMode.HALF_UP).toString():"")
.afdx0561(fdx02.getAfdx0561()!=null? DateUtil.format(fdx02.getAfdx0561(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0829(fdx02.getAfdx0829())
.afdx0830(fdx02.getAfdx0830())
.afdx0820(fdx02.getAfdx0820())
.afdx0824(fdx02.getAfdx0824())
.afdx0819(fdx02.getAfdx0819())
.afdp0004(fdx02.getAfdp0004())
.afdx0843(fdx02.getAfdx0843())
.afdx0844(fdx02.getAfdx0844())
.axcp0027(fdx02.getAxcp0027())
.axcp0030(fdx02.getAxcp0030())
.axcp0029(fdx02.getAxcp0029())
.afdx0806(fdx02.getAfdx0806())
.afdx0807(fdx02.getAfdx0807())
.afdx0808(fdx02.getAfdx0808())
.afdx0802(fdx02.getAfdx0802())
.afdx0567(fdx02.getAfdx0567())
.afdx0568(fdx02.getAfdx0568())
.afdx0566(fdx02.getAfdx0566())
.afdx0570(fdx02.getAfdx0570())
.afdx0571(fdx02.getAfdx0571())
.afdx0569(fdx02.getAfdx0569())
.afdx1017(fdx02.getAfdx1017())
.afdx0574(fdx02.getAfdx0574())
.afdx0572(fdx02.getAfdx0572())
.afdx0868(fdx02.getAfdx0868()!=null? DateUtil.format(fdx02.getAfdx0868(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0869(fdx02.getAfdx0869()!=null? DateUtil.format(fdx02.getAfdx0869(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0870(fdx02.getAfdx0870()!=null? DateUtil.format(fdx02.getAfdx0870(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0817(fdx02.getAfdx0817()!=null? DateUtil.format(fdx02.getAfdx0817(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0818(fdx02.getAfdx0818()!=null? DateUtil.format(fdx02.getAfdx0818(), DatePattern.NORM_MONTH_PATTERN):"")
.build();
HttpRequest request = HttpRequest.post("https://59.255.186.1/yhbcp-engine_gov/rest/cjrfl_report_xzryxx")
.form("access_key", "mzb_gx_450000")
.form("format", "json")
.form("request_id", IdUtil.simpleUUID())
.form("sign", "")
.form("timestamp", System.currentTimeMillis())
.form("version", "1.0")
.form("biz_content", JSONUtil.toJsonStr(build));
HttpResponse response = request.execute();
if(response.getStatus()!=200){
log.error("接口请求失败 => {}", request);
}
String body = response.body();
JSONObject obj = JSONUtil.parseObj(body);
Integer code = obj.getInt("code");
if(code==null||code!=1){
log.warn("上报错误 => {}",body);
}
}
if(!fdx02Page.hasNext()){
break;
}
page++;
}
}
public void fdx01() {
int page = 1;
int size = 10000;
while (true){
Page<Fdx01> fdx01Page = fdx01Dao.selectPage(new Page<>(page, size), null);
List<Fdx01> records = fdx01Page.getRecords();
for (Fdx01 fdx01 : records) {
Fdx01Vo build = Fdx01Vo.builder()
.axcp0002(fdx01.getAxcp0002())
.axcp0006(fdx01.getAxcp0006())
.afdx0823(fdx01.getAfdx0823()!=null? DateUtil.format(fdx01.getAfdx0823(), DatePattern.NORM_MONTH_PATTERN):"")
.axcp0008(fdx01.getAxcp0008())
.axcp0005(fdx01.getAxcp0005())
.afdp0505(fdx01.getAfdp0505())
.afdx0831(fdx01.getAfdx0831()!=null? DateUtil.format(fdx01.getAfdx0831(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0852(fdx01.getAfdx0852())
.afdp0504(fdx01.getAfdp0504())
.afdp0503(fdx01.getAfdp0503())
.afdx0053(fdx01.getAfdx0053())
.axcp0014(fdx01.getAxcp0014())
.afdx0055(fdx01.getAfdx0055()!=null? BigDecimal.valueOf(fdx01.getAfdx0055()).setScale(2, RoundingMode.HALF_UP).toString():"")
.afdx0851(fdx01.getAfdx0851()!=null? BigDecimal.valueOf(fdx01.getAfdx0851()).setScale(2, RoundingMode.HALF_UP).toString():"")
.afdx0561(fdx01.getAfdx0561()!=null? DateUtil.format(fdx01.getAfdx0561(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0829(fdx01.getAfdx0829())
.afdx0830(fdx01.getAfdx0830())
.afdx0820(fdx01.getAfdx0820())
.afdx0824(fdx01.getAfdx0824())
.afdx0819(fdx01.getAfdx0819())
.afdp0004(fdx01.getAfdp0004())
.afdx0843(fdx01.getAfdx0843())
.afdx0844(fdx01.getAfdx0844())
.axcp0027(fdx01.getAxcp0027())
.axcp0030(fdx01.getAxcp0030())
.axcp0029(fdx01.getAxcp0029())
.afdx0806(fdx01.getAfdx0806())
.afdx0807(fdx01.getAfdx0807())
.afdx0808(fdx01.getAfdx0808())
.afdx0802(fdx01.getAfdx0802())
.afdx0567(fdx01.getAfdx0567())
.afdx0568(fdx01.getAfdx0568())
.afdx0566(fdx01.getAfdx0566())
.afdx0570(fdx01.getAfdx0570())
.afdx0571(fdx01.getAfdx0571())
.afdx0569(fdx01.getAfdx0569())
.afdx1017(fdx01.getAfdx1017())
.afdx0574(fdx01.getAfdx0574())
.afdx0572(fdx01.getAfdx0572())
.afdx0868(fdx01.getAfdx0868()!=null? DateUtil.format(fdx01.getAfdx0868(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0869(fdx01.getAfdx0869()!=null? DateUtil.format(fdx01.getAfdx0869(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0870(fdx01.getAfdx0870()!=null? DateUtil.format(fdx01.getAfdx0870(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0817(fdx01.getAfdx0817()!=null? DateUtil.format(fdx01.getAfdx0817(), DatePattern.NORM_MONTH_PATTERN):"")
.afdx0818(fdx01.getAfdx0818()!=null? DateUtil.format(fdx01.getAfdx0818(), DatePattern.NORM_MONTH_PATTERN):"")
.build();
HttpRequest request = HttpRequest.post("https://59.255.186.1/yhbcp-engine_gov/rest/cjrfl_report_zcryxx")
.form("access_key", "mzb_gx_450000")
.form("format", "json")
.form("request_id", IdUtil.simpleUUID())
.form("sign", "")
.form("timestamp", System.currentTimeMillis())
.form("version", "1.0")
.form("biz_content", JSONUtil.toJsonStr(build));
HttpResponse response = request.execute();
if(response.getStatus()!=200){
log.error("接口请求失败 => {}", request);
}
String body = response.body();
JSONObject obj = JSONUtil.parseObj(body);
Integer code = obj.getInt("code");
if(code==null||code!=1){
log.warn("上报错误 => {}",body);
}
}
if(!fdx01Page.hasNext()){
break;
}
page++;
}
}
}
package com.zq.sync.task;
import com.zq.sync.service.DisabledService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Slf4j
@Component
@RequiredArgsConstructor
public class ReportTask {
private final DisabledService disabledService;
/**
* 每月16日执行上报
*/
@Scheduled(cron = "0 0 0 16 * ?")
public void fdx88(){
disabledService.fdx88();
}
}
package com.zq.sync.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fdx01Vo {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private String afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 发证时间
*/
@ApiModelProperty("发证时间")
private String afdx0831;
/**
* 档案编号
*/
@ApiModelProperty("档案编号")
private String afdx0852;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String afdx0053;
/**
* 补贴类型
*/
@ApiModelProperty("补贴类型")
private String axcp0014;
/**
* 补贴金额(元/月)
*/
@ApiModelProperty("补贴金额(元/月)")
private String afdx0055;
/**
* 月工资
*/
@ApiModelProperty("月工资")
private String afdx0851;
/**
* 发放起始月份
*/
@ApiModelProperty("发放起始月份")
private String afdx0561;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 户籍地址
*/
@ApiModelProperty("户籍地址")
private String afdx0820;
/**
* 残疾人家庭住址
*/
@ApiModelProperty("残疾人家庭住址")
private String afdx0824;
/**
* 邮政编码
*/
@ApiModelProperty("邮政编码")
private String afdx0819;
/**
* 残疾人电话
*/
@ApiModelProperty("残疾人电话")
private String afdp0004;
/**
* 残疾人联系人
*/
@ApiModelProperty("残疾人联系人")
private String afdx0843;
/**
* 残疾人联系人电话
*/
@ApiModelProperty("残疾人联系人电话")
private String afdx0844;
/**
* 开户行
*/
@ApiModelProperty("开户行")
private String axcp0027;
/**
* 银行账户名
*/
@ApiModelProperty("银行账户名")
private String axcp0030;
/**
* 银行卡号
*/
@ApiModelProperty("银行卡号")
private String axcp0029;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
/**
* 乡镇录入人姓名
*/
@ApiModelProperty("乡镇录入人姓名")
private String afdx0567;
/**
* 乡镇录入人电话
*/
@ApiModelProperty("乡镇录入人电话")
private String afdx0568;
/**
* 乡镇录入意见
*/
@ApiModelProperty("乡镇录入意见")
private String afdx0566;
/**
* 残联审核人姓名
*/
@ApiModelProperty("残联审核人姓名")
private String afdx0570;
/**
* 残联审核人电话
*/
@ApiModelProperty("残联审核人电话")
private String afdx0571;
/**
* 残联审核意见
*/
@ApiModelProperty("残联审核意见")
private String afdx0569;
/**
* 民政审定人姓名
*/
@ApiModelProperty("民政审定人姓名")
private String afdx1017;
/**
* 民政审定人电话
*/
@ApiModelProperty("民政审定人电话")
private String afdx0574;
/**
* 民政审定意见
*/
@ApiModelProperty("民政审定意见")
private String afdx0572;
/**
* 乡镇初审时间
*/
@ApiModelProperty("乡镇初审时间")
private String afdx0868;
/**
* 残联审核时间
*/
@ApiModelProperty("残联审核时间")
private String afdx0869;
/**
* 民政审定时间
*/
@ApiModelProperty("民政审定时间")
private String afdx0870;
/**
* 录入时间
*/
@ApiModelProperty("录入时间")
private String afdx0817;
/**
* 修改时间
*/
@ApiModelProperty("修改时间")
private String afdx0818;
}
package com.zq.sync.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fdx02Vo {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private String afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 发证时间
*/
@ApiModelProperty("发证时间")
private String afdx0831;
/**
* 档案编号
*/
@ApiModelProperty("档案编号")
private String afdx0852;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String afdx0053;
/**
* 补贴类型
*/
@ApiModelProperty("补贴类型")
private String axcp0014;
/**
* 补贴金额(元/月)
*/
@ApiModelProperty("补贴金额(元/月)")
private String afdx0055;
/**
* 月工资
*/
@ApiModelProperty("月工资")
private String afdx0851;
/**
* 发放起始月份
*/
@ApiModelProperty("发放起始月份")
private String afdx0561;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 户籍地址
*/
@ApiModelProperty("户籍地址")
private String afdx0820;
/**
* 残疾人家庭住址
*/
@ApiModelProperty("残疾人家庭住址")
private String afdx0824;
/**
* 邮政编码
*/
@ApiModelProperty("邮政编码")
private String afdx0819;
/**
* 残疾人电话
*/
@ApiModelProperty("残疾人电话")
private String afdp0004;
/**
* 残疾人联系人
*/
@ApiModelProperty("残疾人联系人")
private String afdx0843;
/**
* 残疾人联系人电话
*/
@ApiModelProperty("残疾人联系人电话")
private String afdx0844;
/**
* 开户行
*/
@ApiModelProperty("开户行")
private String axcp0027;
/**
* 银行账户名
*/
@ApiModelProperty("银行账户名")
private String axcp0030;
/**
* 银行卡号
*/
@ApiModelProperty("银行卡号")
private String axcp0029;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
/**
* 乡镇录入人姓名
*/
@ApiModelProperty("乡镇录入人姓名")
private String afdx0567;
/**
* 乡镇录入人电话
*/
@ApiModelProperty("乡镇录入人电话")
private String afdx0568;
/**
* 乡镇录入意见
*/
@ApiModelProperty("乡镇录入意见")
private String afdx0566;
/**
* 残联审核人姓名
*/
@ApiModelProperty("残联审核人姓名")
private String afdx0570;
/**
* 残联审核人电话
*/
@ApiModelProperty("残联审核人电话")
private String afdx0571;
/**
* 残联审核意见
*/
@ApiModelProperty("残联审核意见")
private String afdx0569;
/**
* 民政审定人姓名
*/
@ApiModelProperty("民政审定人姓名")
private String afdx1017;
/**
* 民政审定人电话
*/
@ApiModelProperty("民政审定人电话")
private String afdx0574;
/**
* 民政审定意见
*/
@ApiModelProperty("民政审定意见")
private String afdx0572;
/**
* 乡镇初审时间
*/
@ApiModelProperty("乡镇初审时间")
private String afdx0868;
/**
* 残联审核时间
*/
@ApiModelProperty("残联审核时间")
private String afdx0869;
/**
* 民政审定时间
*/
@ApiModelProperty("民政审定时间")
private String afdx0870;
/**
* 录入时间
*/
@ApiModelProperty("录入时间")
private String afdx0817;
/**
* 修改时间
*/
@ApiModelProperty("修改时间")
private String afdx0818;
}
package com.zq.sync.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fdx03Vo {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private String afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 停发原因
*/
@ApiModelProperty("停发原因")
private String afdx0831;
/**
* 补贴发放截止月份
*/
@ApiModelProperty("补贴发放截止月份")
private String afdx0832;
/**
* 停发的补贴类型
*/
@ApiModelProperty("停发的补贴类型")
private String axcp0004;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
}
package com.zq.sync.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fdx04Vo {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private String afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 补发原因
*/
@ApiModelProperty("补发原因")
private String axcp0009;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String axcp0010;
/**
* 补发起始月份
*/
@ApiModelProperty("补发起始月份")
private String axcp0011;
/**
* 补发截止月份
*/
@ApiModelProperty("补发截止月份")
private String axcp0012;
/**
* 发放月份
*/
@ApiModelProperty("发放月份")
private String axcp0013;
/**
* 补发的补贴类型
*/
@ApiModelProperty("补发的补贴类型")
private String axcp0014;
/**
* 补发金额(元/月)
*/
@ApiModelProperty("补发金额(元/月)")
private String afdx0055;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
}
package com.zq.sync.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fdx05Vo {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private String afdx0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 追缴原因
*/
@ApiModelProperty("追缴原因")
private String axcp0009;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String axcp0010;
/**
* 追缴起始月份
*/
@ApiModelProperty("追缴起始月份")
private String axcp0011;
/**
* 追缴截止月份
*/
@ApiModelProperty("追缴截止月份")
private String axcp0012;
/**
* 追缴月份
*/
@ApiModelProperty("追缴月份")
private String axcp0013;
/**
* 追缴的补贴类型
*/
@ApiModelProperty("追缴的补贴类型")
private String axcp0014;
/**
* 追缴的金额(元/月)
*/
@ApiModelProperty("追缴的金额(元/月)")
private Integer axcp0015;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
}
package com.zq.sync.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fdx06Vo {
/**
* 残疾人姓名
*/
@ApiModelProperty("残疾人姓名")
private String axcp0002;
/**
* 性别
*/
@ApiModelProperty("性别")
private String axcp0006;
/**
* 残疾人出生日期
*/
@ApiModelProperty("残疾人出生日期")
private String agax0823;
/**
* 民族
*/
@ApiModelProperty("民族")
private String axcp0008;
/**
* 残疾人身份证号
*/
@ApiModelProperty("残疾人身份证号")
private String axcp0005;
/**
* 残疾人证号
*/
@ApiModelProperty("残疾人证号")
private String afdp0505;
/**
* 发证时间
*/
@ApiModelProperty("发证时间")
private Date afdx0831;
/**
* 档案编号
*/
@ApiModelProperty("档案编号")
private String afdx0852;
/**
* 残疾类别
*/
@ApiModelProperty("残疾类别")
private String afdp0504;
/**
* 残疾人等级
*/
@ApiModelProperty("残疾人等级")
private String afdp0503;
/**
* 补贴对象类型
*/
@ApiModelProperty("补贴对象类型")
private String afdx0053;
/**
* 补贴类型
*/
@ApiModelProperty("补贴类型")
private String axcp0014;
/**
* 补贴发放起始月份
*/
@ApiModelProperty("补贴发放起始月份")
private String afdx0054;
/**
* 补贴发截止始月份
*/
@ApiModelProperty("补贴发截止始月份")
private String afdx0055;
/**
* 月工资
*/
@ApiModelProperty("月工资")
private String afdx0851;
/**
* 发放起始月份
*/
@ApiModelProperty("发放起始月份")
private String afdx0561;
/**
* 户籍性质
*/
@ApiModelProperty("户籍性质")
private String afdx0829;
/**
* 低保性质
*/
@ApiModelProperty("低保性质")
private String afdx0830;
/**
* 户籍地址
*/
@ApiModelProperty("户籍地址")
private String afdx0820;
/**
* 残疾人家庭住址
*/
@ApiModelProperty("残疾人家庭住址")
private String afdx0824;
/**
* 邮政编码
*/
@ApiModelProperty("邮政编码")
private String afdx0819;
/**
* 残疾人电话
*/
@ApiModelProperty("残疾人电话")
private String afdp0004;
/**
* 残疾人联系人
*/
@ApiModelProperty("残疾人联系人")
private String afdx0843;
/**
* 残疾人联系人电话
*/
@ApiModelProperty("残疾人联系人电话")
private String afdx0844;
/**
* 开户行
*/
@ApiModelProperty("开户行")
private String axcp0027;
/**
* 银行账户名
*/
@ApiModelProperty("银行账户名")
private String axcp0030;
/**
* 银行卡号
*/
@ApiModelProperty("银行卡号")
private String axcp0029;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 乡镇
*/
@ApiModelProperty("乡镇")
private String afdx0802;
/**
* 乡镇录入人姓名
*/
@ApiModelProperty("乡镇录入人姓名")
private String afdx0567;
/**
* 乡镇录入人电话
*/
@ApiModelProperty("乡镇录入人电话")
private String afdx0568;
/**
* 乡镇录入意见
*/
@ApiModelProperty("乡镇录入意见")
private String afdx0566;
/**
* 残联审核人姓名
*/
@ApiModelProperty("残联审核人姓名")
private String afdx0570;
/**
* 残联审核人电话
*/
@ApiModelProperty("残联审核人电话")
private String afdx0571;
/**
* 残联审核意见
*/
@ApiModelProperty("残联审核意见")
private String afdx0569;
/**
* 民政审定人姓名
*/
@ApiModelProperty("民政审定人姓名")
private String afdx1017;
/**
* 民政审定人电话
*/
@ApiModelProperty("民政审定人电话")
private String afdx0574;
/**
* 民政审定意见
*/
@ApiModelProperty("民政审定意见")
private String afdx0572;
/**
* 乡镇初审时间
*/
@ApiModelProperty("乡镇初审时间")
private String afdx0868;
/**
* 残联审核时间
*/
@ApiModelProperty("残联审核时间")
private String afdx0869;
/**
* 民政审定时间
*/
@ApiModelProperty("民政审定时间")
private String afdx0870;
/**
* 录入时间
*/
@ApiModelProperty("录入时间")
private String afdx0817;
/**
* 修改时间
*/
@ApiModelProperty("修改时间")
private String afdx0818;
}
package com.zq.sync.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fdx07Vo {
/**
* 省
*/
@ApiModelProperty("省")
private String agax0806;
/**
* 市
*/
@ApiModelProperty("市")
private String agax0807;
/**
* 区县
*/
@ApiModelProperty("区县")
private String agax0808;
/**
* 发放月份
*/
@ApiModelProperty("发放月份")
private String agax0901;
/**
* 发放人数
*/
@ApiModelProperty("发放人数")
private Integer agax0902;
/**
* 生活补贴发放人数
*/
@ApiModelProperty("生活补贴发放人数")
private Integer agax0903;
/**
* 护理补贴发放人数
*/
@ApiModelProperty("护理补贴发放人数")
private Integer agax0904;
/**
* 发放总金额
*/
@ApiModelProperty("发放总金额")
private String agax0905;
/**
* 生活补贴发放总金额
*/
@ApiModelProperty("生活补贴发放总金额")
private String agax0906;
/**
* 护理补贴发放总金额
*/
@ApiModelProperty("护理补贴发放总金额")
private String agax0907;
/**
* 生活补发人数
*/
@ApiModelProperty("生活补发人数")
private Integer agax0908;
/**
* 生活补发金额
*/
@ApiModelProperty("生活补发金额")
private String agax0909;
/**
* 护理补发人数
*/
@ApiModelProperty("护理补发人数")
private Integer agax0910;
/**
* 护理补发金额
*/
@ApiModelProperty("护理补发金额")
private String agax0911;
/**
* 生活补贴新增人数
*/
@ApiModelProperty("生活补贴新增人数")
private Integer agax0912;
/**
* 生活补贴退出人数
*/
@ApiModelProperty("生活补贴退出人数")
private Integer agax0913;
/**
* 护理补贴新增人数
*/
@ApiModelProperty("护理补贴新增人数")
private Integer agax0914;
/**
* 护理补贴退出人数
*/
@ApiModelProperty("护理补贴退出人数")
private Integer agax0915;
/**
* 发放总人数
*/
@ApiModelProperty("发放总人数")
private Integer agax0916;
/**
* 同时享受两种补贴总人数
*/
@ApiModelProperty("同时享受两种补贴总人数")
private Integer agax0917;
/**
* 同时享受两种补贴总金额
*/
@ApiModelProperty("同时享受两种补贴总金额")
private String agax0918;
/**
* 护理补贴续发人数
*/
@ApiModelProperty("护理补贴续发人数")
private Integer agax0919;
/**
* 生活补贴续发人数
*/
@ApiModelProperty("生活补贴续发人数")
private Integer agax0920;
/**
* 生活补发人次
*/
@ApiModelProperty("生活补发人次")
private Integer agax0921;
/**
* 护理补发人次
*/
@ApiModelProperty("护理补发人次")
private Integer agax0922;
}
package com.zq.sync.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fdx88Vo {
/**
* 补贴对象类型名称
*/
@ApiModelProperty("补贴对象类型名称")
private String afdx0801;
/**
* 补贴类型
*/
@ApiModelProperty("补贴类型")
private String axcp0004;
/**
* 标准金额
*/
@ApiModelProperty("标准金额")
private String afdx0803;
/**
* 备注
*/
@ApiModelProperty("备注")
private String afdx0804;
/**
* 标准状态
*/
@ApiModelProperty("标准状态")
private String afdx0805;
/**
* 省
*/
@ApiModelProperty("省")
private String afdx0806;
/**
* 市
*/
@ApiModelProperty("市")
private String afdx0807;
/**
* 县
*/
@ApiModelProperty("县")
private String afdx0808;
/**
* 文件依据
*/
@ApiModelProperty("文件依据")
private String afdx0809;
/**
* 启用月份
*/
@ApiModelProperty("启用月份")
private String afdx0810;
/**
* 停用月份
*/
@ApiModelProperty("停用月份")
private String afdx0811;
/**
* 调标前的标准名称
*/
@ApiModelProperty("调标前的标准名称")
private String afdx0812;
/**
* 提标扩面
*/
@ApiModelProperty("提标扩面")
private String afdx0814;
/**
* 发放类型
*/
@ApiModelProperty("发放类型")
private String afdx0815;
/**
* 区县民政录入人姓名
*/
@ApiModelProperty("区县民政录入人姓名")
private String afdx0816;
/**
* 录入时间
*/
@ApiModelProperty("录入时间")
private String afdx0817;
/**
* 修改时间
*/
@ApiModelProperty("修改时间")
private String afdx0818;
}
server:
port: 10230
port: 12023
#配置数据源
spring:
application:
name: SYNC-SERVER
datasource:
druid:
gxmzdbos-db:
url: jdbc:mysql://192.168.0.193:3306/gx-db?characterEncoding=utf8&useSSL=false
username: root
password: rooT123!321
driver-class-name: com.mysql.jdbc.Driver
gxmzdbos:
url: jdbc:mysql://192.168.0.193:3306/gx-yl?characterEncoding=utf8&useSSL=false
dynamic: # mybatis plus多数据源插件
primary: master #设置默认的数据源或者数据源组,默认值即为master
strict: true #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源
datasource:
gxcj:
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: rooT123!321
driver-class-name: com.mysql.jdbc.Driver
gxmzqzj:
url: jdbc:mysql://192.168.0.197:10008/gx_yl?characterEncoding=utf8&useSSL=false
username: root
password: root
driver-class-name: com.mysql.jdbc.Driver
#前置机低保库
gxmzqzj-db:
url: jdbc:mysql://192.168.0.197:10008/gx_db?characterEncoding=utf8&useSSL=false
username: root
password: root
driver-class-name: com.mysql.jdbc.Driver
#前置机残疾库
gxmzqzj-cj:
url: jdbc:mysql://192.168.0.197:10008/gx_cj?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.jdbc.Driver
gxmz:
url: jdbc:mysql://192.168.201.28:3306/gx_unify?characterEncoding=utf8&useSSL=false
username: xieying
password: sharewin!#2020
driver-class-name: com.mysql.jdbc.Driver
#源数据库
gxmzdb:
url: jdbc:oracle:thin:@//192.168.0.74:1521/GXDB
username: LiSZ
password: LSZ192125mcm
driver-class-name: oracle.jdbc.driver.OracleDriver
# gxmzqzj:
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
# username: sa
# password: gxmz@2017
# url: jdbc:sqlserver://192.168.0.220:1433;DatabaseName=gxqzdb
eureka:
client:
register-with-eureka: false
fetch-registry: false
mybatis-plus:
mapper-locations: classpath:mapper/**/*.xml
druid:
# 初始连接数
initial-size: 10
# 最小连接数
min-idle: 20
# 最大连接数
max-active: 50
# 获取连接超时时间
max-wait: 5000
# 连接有效性检测时间
time-between-eviction-runs-millis: 60000
# 连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
# 连接在池中最大生存的时间
max-evictable-idle-time-millis: 900000
test-while-idle: true
test-on-borrow: false
test-on-return: false
# 检测连接是否有效
validation-query: SELECT 1 FROM DUAL
filters: stat
stat:
merge-sql: true
log-slow-sql: true
slow-sql-millis: 2000
logging.lever.com.zq.syn.dao: debug
# mybatis plus 配置
mybatis-plus:
global-config:
db-config:
select-strategy: not_empty
update-strategy: not_empty
\ No newline at end of file
......@@ -17,6 +17,7 @@ package com.zq.system.config.security;
import cn.hutool.core.util.StrUtil;
import com.zq.common.config.security.SecurityProperties;
import com.zq.common.context.ContextUtils;
import com.zq.common.vo.OnlineUserDto;
import com.zq.system.modules.system.service.OnlineUserService;
import com.zq.system.modules.system.service.UserCacheClean;
......@@ -85,6 +86,9 @@ public class TokenFilter extends GenericFilterBean {
SecurityContextHolder.getContext().setAuthentication(authentication);
// Token 续期
tokenProvider.checkRenewal(token);
// 设置当前用户
ContextUtils.setAdminContext(onlineUserDto);
}
}
filterChain.doFilter(servletRequest, servletResponse);
......
package com.zq.system.modules.system.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zq.system.modules.system.entity.BindUserInfo;
import org.springframework.stereotype.Repository;
/**
* 用户绑定系统信息表(TBlindUserInfo)表数据库访问层
*
* @author makejava
* @since 2021-11-26 16:18:10
*/
@Repository
public interface BlindUserInfoDao extends BaseMapper<BindUserInfo> {
}
\ No newline at end of file
package com.zq.system.modules.system.domain.vo;
import lombok.Data;
/**
* @author wilmiam
* @since 2021/11/26 16:37
*/
@Data
public class SingleLoginVo {
private Long systemId;
private String username;
private String passwd;
}
package com.zq.system.modules.system.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* 用户绑定系统信息表(TBlindUserInfo)实体类
*
* @author makejava
* @since 2021-11-26 16:18:10
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "t_blind_user_info")
public class BindUserInfo {
/**
* id
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 单点登录用户id
*/
@ApiModelProperty("单点登录用户id")
private Long userId;
/**
* 绑定系统id
*/
@ApiModelProperty("绑定系统id")
private Long sysId;
/**
* 绑定系统名
*/
@ApiModelProperty("绑定系统名")
private String sysName;
/**
* 绑定系统用户id
*/
@ApiModelProperty("绑定系统用户id")
private String systemUserId;
/**
* 绑定系统用户名
*/
@ApiModelProperty("绑定系统用户名")
private String systemUserName;
/**
* 创建时间
*/
@ApiModelProperty("创建时间")
private Date createTime;
/**
* 更新时间
*/
@ApiModelProperty("更新时间")
private Date updateTime;
}
\ No newline at end of file
......@@ -36,6 +36,9 @@ public class SysInfo {
@ApiModelProperty("访问地址")
private String homeUrl;
@ApiModelProperty("登录地址")
private String loginUrl;
@ApiModelProperty("状态 0-禁用 1-启用")
private Integer state;
......
package com.zq.system.modules.system.rest;
import com.zq.common.annotation.rest.AnonymousGetMapping;
import com.zq.common.annotation.rest.AnonymousPostMapping;
import com.zq.common.utils.AssertUtils;
import com.zq.common.vo.IdVo;
import com.zq.common.vo.ResultVo;
import com.zq.system.modules.system.domain.User;
import com.zq.system.modules.system.domain.vo.SingleLoginVo;
import com.zq.system.modules.system.service.SingleService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* @author wilmiam
* @since 2021/11/26 16:57
*/
@RestController
@RequiredArgsConstructor
@Api(tags = "单点登录")
@RequestMapping("/sys/single")
public class SingleController {
private final SingleService singleService;
@ApiOperation("单点登录")
@AnonymousPostMapping(value = "/login")
public void login(@RequestBody SingleLoginVo vo, HttpServletRequest request, HttpServletResponse response) {
AssertUtils.hasText(vo.getUsername(), "用户名为空");
AssertUtils.hasText(vo.getPasswd(), "密码为空");
singleService.login(vo, request, response);
}
@ApiOperation("获取用户信息")
@GetMapping(value = "/getUserInfo/{appId}")
public ResultVo getUserInfo(@PathVariable String appId) {
return ResultVo.success(singleService.getUserInfo(appId));
}
@ApiOperation("注册单点登录用户")
@AnonymousPostMapping(value = "/register")
public ResultVo register(@Validated(User.Create.class) @RequestBody User resources) {
singleService.register(resources);
return ResultVo.success("注册成功");
}
@ApiOperation("用户绑定系统")
@PostMapping(value = "/bindSystem")
public ResultVo bindSystem(@RequestBody SingleLoginVo vo) {
AssertUtils.notNull(vo.getSystemId(), "缺少系统ID");
AssertUtils.hasText(vo.getUsername(), "缺少用户名");
AssertUtils.hasText(vo.getPasswd(), "缺少密码");
singleService.bindSystem(vo);
return ResultVo.success();
}
@ApiOperation("用户绑定的系统列表")
@GetMapping(value = "/getBlindSysList")
public ResultVo getBlindSysList() {
return ResultVo.success(singleService.getBlindSysList());
}
@ApiOperation("取消绑定")
@PostMapping("/cancelBlind")
public ResultVo cancelBlind(@RequestBody IdVo vo) {
AssertUtils.notNull(vo.getIds());
singleService.cancelBlind(vo.getIds());
return ResultVo.success();
}
@ApiOperation("注册查用户名是否已存在")
@AnonymousGetMapping("/userNameIsExist/{userName}")
public ResultVo userNameIsExist(@PathVariable("userName") String userName) {
singleService.userNameIsExist(userName);
return ResultVo.success();
}
}
......@@ -16,22 +16,22 @@
package com.zq.system.modules.system.rest;
import cn.hutool.core.collection.CollectionUtil;
import com.zq.common.annotation.Log;
import com.zq.system.config.RsaProperties;
import com.zq.system.exception.BadRequestException;
import com.zq.system.modules.system.domain.User;
import com.zq.system.modules.system.domain.vo.UserPassVo;
import com.zq.system.modules.system.service.*;
import com.zq.system.modules.system.service.dto.RoleSmallDto;
import com.zq.system.modules.system.service.dto.UserDto;
import com.zq.system.modules.system.service.dto.UserQueryCriteria;
import com.zq.system.utils.PageUtil;
import com.zq.system.utils.RsaUtils;
import com.zq.system.utils.SecurityUtils;
import com.zq.system.utils.enums.CodeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import com.zq.common.annotation.Log;
import com.zq.system.config.RsaProperties;
import com.zq.system.exception.BadRequestException;
import com.zq.system.modules.system.domain.vo.UserPassVo;
import com.zq.system.modules.system.service.dto.UserDto;
import com.zq.system.utils.enums.CodeEnum;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
......@@ -66,6 +66,7 @@ public class UserController {
private final DeptService deptService;
private final RoleService roleService;
private final VerifyService verificationCodeService;
private final SingleService singleService;
@ApiOperation("导出用户数据")
@GetMapping(value = "/download")
......@@ -77,7 +78,7 @@ public class UserController {
@ApiOperation("查询用户")
@GetMapping
@PreAuthorize("@el.check('user:list')")
public ResponseEntity<Object> query(UserQueryCriteria criteria, Pageable pageable){
public ResponseEntity<Object> query(UserQueryCriteria criteria, Pageable pageable) {
if (!ObjectUtils.isEmpty(criteria.getDeptId())) {
criteria.getDeptIds().add(criteria.getDeptId());
criteria.getDeptIds().addAll(deptService.getDeptChildren(deptService.findByPid(criteria.getDeptId())));
......@@ -85,25 +86,25 @@ public class UserController {
// 数据权限
List<Long> dataScopes = dataService.getDeptIds(userService.findByName(SecurityUtils.getCurrentUsername()));
// criteria.getDeptIds() 不为空并且数据权限不为空则取交集
if (!CollectionUtils.isEmpty(criteria.getDeptIds()) && !CollectionUtils.isEmpty(dataScopes)){
if (!CollectionUtils.isEmpty(criteria.getDeptIds()) && !CollectionUtils.isEmpty(dataScopes)) {
// 取交集
criteria.getDeptIds().retainAll(dataScopes);
if(!CollectionUtil.isEmpty(criteria.getDeptIds())){
return new ResponseEntity<>(userService.queryAll(criteria,pageable), HttpStatus.OK);
if (!CollectionUtil.isEmpty(criteria.getDeptIds())) {
return new ResponseEntity<>(userService.queryAll(criteria, pageable), HttpStatus.OK);
}
} else {
// 否则取并集
criteria.getDeptIds().addAll(dataScopes);
return new ResponseEntity<>(userService.queryAll(criteria,pageable), HttpStatus.OK);
return new ResponseEntity<>(userService.queryAll(criteria, pageable), HttpStatus.OK);
}
return new ResponseEntity<>(PageUtil.toPage(null,0), HttpStatus.OK);
return new ResponseEntity<>(PageUtil.toPage(null, 0), HttpStatus.OK);
}
@Log("新增用户")
@ApiOperation("新增用户")
@PostMapping
@PreAuthorize("@el.check('user:add')")
public ResponseEntity<Object> create(@Validated @RequestBody User resources){
public ResponseEntity<Object> create(@Validated @RequestBody User resources) {
checkLevel(resources);
// 默认密码 123456
resources.setPassword(passwordEncoder.encode("gxmz!23"));
......@@ -124,8 +125,8 @@ public class UserController {
@Log("修改用户:个人中心")
@ApiOperation("修改用户:个人中心")
@PutMapping(value = "center")
public ResponseEntity<Object> center(@Validated(User.Update.class) @RequestBody User resources){
if(!resources.getId().equals(SecurityUtils.getCurrentUserId())){
public ResponseEntity<Object> center(@Validated(User.Update.class) @RequestBody User resources) {
if (!resources.getId().equals(SecurityUtils.getCurrentUserId())) {
throw new BadRequestException("不能修改他人资料");
}
userService.updateCenter(resources);
......@@ -136,7 +137,7 @@ public class UserController {
@ApiOperation("删除用户")
@DeleteMapping
@PreAuthorize("@el.check('user:del')")
public ResponseEntity<Object> delete(@RequestBody Set<Long> ids){
public ResponseEntity<Object> delete(@RequestBody Set<Long> ids) {
for (Long id : ids) {
Integer currentLevel = Collections.min(roleService.findByUsersId(SecurityUtils.getCurrentUserId()).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList()));
Integer optLevel = Collections.min(roleService.findByUsersId(id).stream().map(RoleSmallDto::getLevel).collect(Collectors.toList()));
......@@ -151,22 +152,22 @@ public class UserController {
@ApiOperation("修改密码")
@PostMapping(value = "/updatePass")
public ResponseEntity<Object> updatePass(@RequestBody UserPassVo passVo) throws Exception {
String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getOldPass());
String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,passVo.getNewPass());
String oldPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, passVo.getOldPass());
String newPass = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, passVo.getNewPass());
UserDto user = userService.findByName(SecurityUtils.getCurrentUsername());
if(!passwordEncoder.matches(oldPass, user.getPassword())){
if (!passwordEncoder.matches(oldPass, user.getPassword())) {
throw new BadRequestException("修改失败,旧密码错误");
}
if(passwordEncoder.matches(newPass, user.getPassword())){
if (passwordEncoder.matches(newPass, user.getPassword())) {
throw new BadRequestException("新密码不能与旧密码相同");
}
userService.updatePass(user.getUsername(),passwordEncoder.encode(newPass));
userService.updatePass(user.getUsername(), passwordEncoder.encode(newPass));
return new ResponseEntity<>(HttpStatus.OK);
}
@ApiOperation("修改头像")
@PostMapping(value = "/updateAvatar")
public ResponseEntity<Object> updateAvatar(@RequestParam MultipartFile avatar){
public ResponseEntity<Object> updateAvatar(@RequestParam MultipartFile avatar) {
return new ResponseEntity<>(userService.updateAvatar(avatar), HttpStatus.OK);
}
......@@ -174,18 +175,19 @@ public class UserController {
@ApiOperation("修改邮箱")
@PostMapping(value = "/updateEmail/{code}")
public ResponseEntity<Object> updateEmail(@PathVariable String code, @RequestBody User user) throws Exception {
String password = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey,user.getPassword());
String password = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, user.getPassword());
UserDto userDto = userService.findByName(SecurityUtils.getCurrentUsername());
if(!passwordEncoder.matches(password, userDto.getPassword())){
if (!passwordEncoder.matches(password, userDto.getPassword())) {
throw new BadRequestException("密码错误");
}
verificationCodeService.validated(CodeEnum.EMAIL_RESET_EMAIL_CODE.getKey() + user.getEmail(), code);
userService.updateEmail(userDto.getUsername(),user.getEmail());
userService.updateEmail(userDto.getUsername(), user.getEmail());
return new ResponseEntity<>(HttpStatus.OK);
}
/**
* 如果当前用户的角色级别低于创建用户的角色级别,则抛出权限不足的错误
*
* @param resources /
*/
private void checkLevel(User resources) {
......
package com.zq.system.modules.system.service;
import cn.hutool.core.util.IdUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zq.common.config.redis.RedisUtils;
import com.zq.common.config.security.SecurityProperties;
import com.zq.common.context.ContextUtils;
import com.zq.common.utils.AssertUtils;
import com.zq.common.vo.OnlineUserDto;
import com.zq.common.vo.ResultVo;
import com.zq.system.config.RsaProperties;
import com.zq.system.config.security.TokenProvider;
import com.zq.system.modules.system.dao.BlindUserInfoDao;
import com.zq.system.modules.system.dao.SysInfoDao;
import com.zq.system.modules.system.domain.Job;
import com.zq.system.modules.system.domain.Role;
import com.zq.system.modules.system.domain.User;
import com.zq.system.modules.system.domain.vo.SingleLoginVo;
import com.zq.system.modules.system.entity.BindUserInfo;
import com.zq.system.modules.system.entity.SysInfo;
import com.zq.system.modules.system.repository.DeptRepository;
import com.zq.system.modules.system.repository.JobRepository;
import com.zq.system.modules.system.repository.RoleRepository;
import com.zq.system.modules.system.repository.UserRepository;
import com.zq.system.utils.RsaUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
* @author wilmiam
* @since 2021/11/26 16:20
*/
@Slf4j
@Service
@RequiredArgsConstructor
public class SingleService {
private final UserRepository userRepository;
private final BlindUserInfoDao blindUserInfoDao;
private final PasswordEncoder passwordEncoder;
private final DeptRepository deptRepository;
private final RoleRepository roleRepository;
private final JobRepository jobRepository;
private final UserService userService;
private final SysInfoDao sysInfoDao;
private final SecurityProperties properties;
private final OnlineUserService onlineUserService;
private final RedisUtils redisUtils;
private final AuthenticationManagerBuilder authenticationManagerBuilder;
public void register(User resources) {
String passwd = null;
try {
passwd = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, resources.getPassword());
} catch (Exception e) {
e.printStackTrace();
}
AssertUtils.hasText(passwd, "密码解密失败");
resources.setPassword(passwordEncoder.encode(passwd));
List<Role> roleList = roleRepository.findAllById(Collections.singletonList(2L));
resources.setRoles(new HashSet<>(roleList));
List<Job> jobList = jobRepository.findAllById(Collections.singletonList(13L));
resources.setJobs(new HashSet<>(jobList));
deptRepository.findById(8L).ifPresent(resources::setDept);
userService.create(resources);
}
public List<BindUserInfo> getBlindSysList() {
Long adminUserId = ContextUtils.getAdminUserId();
AssertUtils.notNull(adminUserId, "登录信息已过期");
return blindUserInfoDao.selectList(Wrappers.lambdaQuery(BindUserInfo.builder().userId(adminUserId).build()));
}
public void cancelBlind(Set<String> ids) {
blindUserInfoDao.deleteBatchIds(ids);
}
public void userNameIsExist(String userName) {
User user = userRepository.findByUsername(userName);
AssertUtils.isTrue(user == null, "用户名已存在");
}
public void bindSystem(SingleLoginVo vo) {
SysInfo sysInfo = sysInfoDao.selectById(vo.getSystemId());
AssertUtils.notNull(sysInfo, "系统不存在");
AssertUtils.hasText(sysInfo.getLoginUrl(), "系统缺少验证配置");
HttpRequest request = HttpRequest.post(sysInfo.getLoginUrl())
.form("username", vo.getUsername())
.form("password", vo.getPasswd());
HttpResponse response = request.execute();
String body = response.body();
if (response.getStatus() != 200) {
log.error("{}系统登录地址请求失败:{}", sysInfo.getSystemName(), body);
}
ResultVo resultVo = JSONUtil.toBean(body, ResultVo.class);
if (resultVo.isSuccess()) {
JSONObject obj = JSONUtil.parseObj(resultVo.getData());
String userId = obj.getStr("userId");
String username = obj.getStr("username");
BindUserInfo build = BindUserInfo.builder()
.userId(ContextUtils.getAdminUserId())
.sysId(sysInfo.getId())
.sysName(sysInfo.getSystemName())
.systemUserId(userId)
.systemUserName(username)
.build();
blindUserInfoDao.insert(build);
}
}
public void login(SingleLoginVo vo, HttpServletRequest request, HttpServletResponse response) {
try {
String serviceUrl = request.getParameter("service");
AssertUtils.hasText(serviceUrl, "跳转地址为空");
String passwd = RsaUtils.decryptByPrivateKey(RsaProperties.privateKey, vo.getPasswd());
UsernamePasswordAuthenticationToken authenticationToken =
new UsernamePasswordAuthenticationToken(vo.getUsername(), passwd);
Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken);
SecurityContextHolder.getContext().setAuthentication(authentication);
// 生成令牌
String token = TokenProvider.createToken(authentication);
final JwtUserDto jwtUserDto = (JwtUserDto) authentication.getPrincipal();
// 保存在线信息
onlineUserService.save(jwtUserDto, token, request);
String key = IdUtil.simpleUUID();
redisUtils.setStr(token, key, properties.getTokenValidityInSeconds() / 1000, TimeUnit.SECONDS);
response.setHeader(properties.getHeader(), properties.getTokenStartWith() + token);
response.sendRedirect(serviceUrl + "?" + properties.getHeader() + "=" + properties.getTokenStartWith() + token + "&key=" + key);
} catch (Exception e) {
e.printStackTrace();
}
}
public Object getUserInfo(String appId) {
OnlineUserDto adminContext = ContextUtils.getAdminContext();
SysInfo sysInfo = sysInfoDao.selectOne(Wrappers.lambdaQuery(SysInfo.builder().appId(appId).build()));
BindUserInfo bindUserInfo = blindUserInfoDao.selectOne(Wrappers.lambdaQuery(BindUserInfo.builder().sysId(sysInfo.getId()).userId(adminContext.getUserId()).build()));
AssertUtils.notNull(bindUserInfo, 501, "用户未绑定系统");
Map<String, Object> data = new HashMap<>();
data.put("userId", bindUserInfo.getSystemUserId());
data.put("username", bindUserInfo.getSystemUserName());
return data;
}
}
......@@ -165,5 +165,4 @@ public interface UserService {
* @return
*/
ApiTokenVo passwdLogin(LoginVo vo);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment