668 changed files with 38893 additions and 1438 deletions
@ -0,0 +1,32 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 http://www.renren.io
|
|||
* <p> |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not |
|||
* use this file except in compliance with the License. You may obtain a copy of |
|||
* the License at |
|||
* <p> |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* <p> |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
|||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
|||
* License for the specific language governing permissions and limitations under |
|||
* the License. |
|||
*/ |
|||
|
|||
package com.epmet.commons.extappauth.annotation; |
|||
|
|||
import java.lang.annotation.*; |
|||
|
|||
/** |
|||
* 需要认证的内部请求 |
|||
* @Author wxz |
|||
* @Description |
|||
* @Date 2020/4/23 16:17 |
|||
**/ |
|||
@Target(ElementType.METHOD) |
|||
@Retention(RetentionPolicy.RUNTIME) |
|||
@Documented |
|||
public @interface InternalAppRequestAuth { |
|||
|
|||
} |
@ -0,0 +1,41 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.epmet.commons.extappauth.jwt; |
|||
|
|||
import org.springframework.boot.context.properties.ConfigurationProperties; |
|||
import org.springframework.context.annotation.Configuration; |
|||
|
|||
/** |
|||
* Jwt |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
@Configuration |
|||
@ConfigurationProperties(prefix = "jwt.token") |
|||
public class JwtTokenProperties { |
|||
private String secret; |
|||
private int expire; |
|||
|
|||
public String getSecret() { |
|||
return secret; |
|||
} |
|||
|
|||
public void setSecret(String secret) { |
|||
this.secret = secret; |
|||
} |
|||
|
|||
public int getExpire() { |
|||
return expire; |
|||
} |
|||
|
|||
public void setExpire(int expire) { |
|||
this.expire = expire; |
|||
} |
|||
} |
@ -0,0 +1,130 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* <p> |
|||
* https://www.renren.io
|
|||
* <p> |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.epmet.commons.extappauth.jwt; |
|||
|
|||
import io.jsonwebtoken.Claims; |
|||
import io.jsonwebtoken.Jwts; |
|||
import io.jsonwebtoken.SignatureAlgorithm; |
|||
import org.joda.time.DateTime; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.Date; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* Jwt工具类 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
* @since 1.0.0 |
|||
*/ |
|||
@Component |
|||
public class JwtTokenUtils { |
|||
private static final Logger logger = LoggerFactory.getLogger(JwtTokenUtils.class); |
|||
|
|||
@Autowired |
|||
private JwtTokenProperties jwtProperties; |
|||
|
|||
/** |
|||
* 生成jwt token 弃用 |
|||
*/ |
|||
@Deprecated |
|||
public String generateToken(String userId) { |
|||
return Jwts.builder() |
|||
.setHeaderParam("typ", "JWT") |
|||
.setSubject(userId) |
|||
.setIssuedAt(new Date()) |
|||
.setExpiration(DateTime.now().plusSeconds(jwtProperties.getExpire()).toDate()) |
|||
.signWith(SignatureAlgorithm.HS512, jwtProperties.getSecret()) |
|||
.compact(); |
|||
} |
|||
|
|||
public Claims getClaimByToken(String token) { |
|||
try { |
|||
return Jwts.parser() |
|||
.setSigningKey(jwtProperties.getSecret()) |
|||
.parseClaimsJws(token) |
|||
.getBody(); |
|||
} catch (Exception e) { |
|||
logger.debug("validate is token error, token = " + token, e); |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @return java.util.Date |
|||
* @param token |
|||
* @Author yinzuomei |
|||
* @Description 获取token的有效期截止时间 |
|||
* @Date 2020/3/18 22:17 |
|||
**/ |
|||
public Date getExpiration(String token){ |
|||
try { |
|||
return Jwts.parser() |
|||
.setSigningKey(jwtProperties.getSecret()) |
|||
.parseClaimsJws(token) |
|||
.getBody().getExpiration(); |
|||
} catch (Exception e) { |
|||
logger.debug("validate is token error, token = " + token, e); |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @param map |
|||
* @return java.lang.String |
|||
* @Author yinzuomei |
|||
* @Description 根据app+client+userId生成token |
|||
* @Date 2020/3/18 22:29 |
|||
**/ |
|||
public String createToken(Map<String, Object> map) { |
|||
return Jwts.builder() |
|||
.setHeaderParam("typ", "JWT") |
|||
.setClaims(map) |
|||
.setIssuedAt(new Date()) |
|||
.setExpiration(DateTime.now().plusSeconds(jwtProperties.getExpire()).toDate()) |
|||
.signWith(SignatureAlgorithm.HS512, jwtProperties.getSecret()) |
|||
.compact(); |
|||
} |
|||
|
|||
/** |
|||
* token是否过期 |
|||
* |
|||
* @return true:过期 |
|||
*/ |
|||
public boolean isTokenExpired(Date expiration) { |
|||
return expiration.before(new Date()); |
|||
} |
|||
|
|||
public static void main(String[] args) { |
|||
Map<String, Object> map=new HashMap<>(); |
|||
map.put("app","gov"); |
|||
map.put("client","wxmp"); |
|||
map.put("userId","100526ABC"); |
|||
String tokenStr=Jwts.builder() |
|||
.setHeaderParam("typ", "JWT") |
|||
.setClaims(map) |
|||
.setIssuedAt(new Date()) |
|||
.setExpiration(DateTime.now().plusSeconds(604800).toDate()) |
|||
.signWith(SignatureAlgorithm.HS512, "7016867071f0ebf1c46f123eaaf4b9d6[elink.epmet]") |
|||
.compact(); |
|||
System.out.println(tokenStr); |
|||
Claims claims= Jwts.parser() |
|||
.setSigningKey("7016867071f0ebf1c46f123eaaf4b9d6[elink.epmet]") |
|||
.parseClaimsJws(tokenStr) |
|||
.getBody(); |
|||
System.out.println("app="+ claims.get("app")); |
|||
System.out.println("client="+ claims.get("client")); |
|||
System.out.println("userId="+ claims.get("userId")); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.commons.tools.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/9/15 5:41 下午 |
|||
*/ |
|||
@Data |
|||
public class TimeListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1482639109300981626L; |
|||
|
|||
private String dateId; |
|||
private String weekId; |
|||
private String monthId; |
|||
private String quarterId; |
|||
private String yearId; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.auth; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import org.springframework.cloud.gateway.filter.GatewayFilterChain; |
|||
import org.springframework.core.io.buffer.DataBuffer; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.http.MediaType; |
|||
import org.springframework.web.server.ServerWebExchange; |
|||
import reactor.core.publisher.Flux; |
|||
import reactor.core.publisher.Mono; |
|||
|
|||
import java.nio.charset.StandardCharsets; |
|||
|
|||
public abstract class AuthProcessor { |
|||
|
|||
abstract Mono<Void> auth(ServerWebExchange exchange, GatewayFilterChain chain); |
|||
|
|||
protected Mono<Void> response(ServerWebExchange exchange, Object object) { |
|||
String json = JSON.toJSONString(object); |
|||
DataBuffer buffer = exchange.getResponse().bufferFactory().wrap(json.getBytes(StandardCharsets.UTF_8)); |
|||
exchange.getResponse().getHeaders().setContentType(MediaType.APPLICATION_JSON_UTF8); |
|||
exchange.getResponse().setStatusCode(HttpStatus.OK); |
|||
return exchange.getResponse().writeWith(Flux.just(buffer)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.auth; |
|||
|
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.web.server.ServerWebExchange; |
|||
|
|||
|
|||
/** |
|||
* 外部应用认证处理器父类 |
|||
*/ |
|||
public abstract class ExtAppAuthProcessor { |
|||
|
|||
private Logger logger = LoggerFactory.getLogger(getClass()); |
|||
|
|||
private int diffMillins = 1000 * 60 * 5; |
|||
|
|||
public abstract void auth(String appId, String token, Long ts, ServerWebExchange exchange); |
|||
|
|||
/** |
|||
* 时间戳校验 |
|||
* @param timestamp |
|||
* @return |
|||
*/ |
|||
protected boolean validTimeStamp(Long timestamp) { |
|||
long now = System.currentTimeMillis(); |
|||
if (Math.abs(now - timestamp) > diffMillins) { |
|||
return false; |
|||
} |
|||
return true; |
|||
} |
|||
} |
@ -0,0 +1,92 @@ |
|||
package com.epmet.auth; |
|||
|
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.redis.RedisKeys; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.utils.SpringContextUtils; |
|||
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; |
|||
import com.epmet.jwt.JwtTokenUtils; |
|||
import io.jsonwebtoken.Claims; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.server.ServerWebExchange; |
|||
|
|||
/** |
|||
* jwt 认证处理器 |
|||
*/ |
|||
@Component |
|||
public class ExtAppJwtAuthProcessor extends ExtAppAuthProcessor { |
|||
|
|||
private static Logger logger = LoggerFactory.getLogger(ExtAppJwtAuthProcessor.class); |
|||
|
|||
@Autowired |
|||
private JwtTokenUtils jwtTokenUtils; |
|||
|
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
@Override |
|||
public void auth(String appId, String token, Long ts, ServerWebExchange exchange) { |
|||
String secret; |
|||
if (StringUtils.isBlank(secret = getTokenFromCache(appId))) { |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), String.format("根据AppId:【%s】没有找到对应的秘钥", appId)); |
|||
} |
|||
|
|||
Claims claim; |
|||
try { |
|||
claim = jwtTokenUtils.getClaimByToken(token, secret); |
|||
} catch (Exception e) { |
|||
String errorStackTrace = ExceptionUtils.getErrorStackTrace(e); |
|||
logger.error("解析token失败:{}", errorStackTrace); |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), "解析token失败"); |
|||
} |
|||
|
|||
String appIdIn = (String)claim.get("appId"); |
|||
String customerId = (String)claim.get("customerId"); |
|||
Long timestamp = (Long)claim.get("ts"); |
|||
|
|||
//校验时间戳,允许5分钟误差
|
|||
if (StringUtils.isAnyBlank(appIdIn, customerId) || timestamp == null) { |
|||
logger.error("access token不完整。{},{},{}", appIdIn, customerId, timestamp); |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), "AccessToken不完整"); |
|||
} |
|||
|
|||
if (!validTimeStamp(timestamp)) { |
|||
logger.error("extapp token已经超时,请求被拒绝"); |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), "AccessToken已经超时"); |
|||
} |
|||
|
|||
if (!appId.equals(appIdIn)) { |
|||
logger.error("AppId不对应,token外部的:{}, token内部解析出来的:{}", appId, appIdIn); |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), "AppId不匹配"); |
|||
} |
|||
|
|||
// 添加客户ID等到请求头
|
|||
exchange.getRequest().mutate().header("CustomerId", customerId); |
|||
} |
|||
|
|||
/** |
|||
* 通过APP ID查询对应的秘钥 |
|||
* @param appId |
|||
* @return |
|||
*/ |
|||
public String getTokenFromCache(String appId) { |
|||
String secret = (String)redisUtils.get(RedisKeys.getExternalAppSecretKey(appId)); |
|||
if (StringUtils.isBlank(secret)) { |
|||
EpmetCommonServiceOpenFeignClient commonService = SpringContextUtils.getBean(EpmetCommonServiceOpenFeignClient.class); |
|||
Result<String> result = commonService.getSecret(appId); |
|||
if (!result.success()) { |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), result.getInternalMsg()); |
|||
} |
|||
secret = result.getData(); |
|||
redisUtils.set(RedisKeys.getExternalAppSecretKey(appId), secret); |
|||
} |
|||
return secret; |
|||
} |
|||
} |
@ -0,0 +1,75 @@ |
|||
package com.epmet.auth; |
|||
|
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.redis.RedisKeys; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.commons.tools.utils.Md5Util; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.utils.SpringContextUtils; |
|||
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.server.ServerWebExchange; |
|||
|
|||
/** |
|||
* md5 认证处理器 |
|||
*/ |
|||
@Component |
|||
public class ExtAppMD5AuthProcessor extends ExtAppAuthProcessor { |
|||
|
|||
private static Logger logger = LoggerFactory.getLogger(ExtAppMD5AuthProcessor.class); |
|||
|
|||
//@Autowired
|
|||
//private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient;
|
|||
|
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
@Override |
|||
public void auth(String appId, String token, Long ts, ServerWebExchange exchange) { |
|||
if (ts == null) { |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), "需要传入时间戳参数"); |
|||
} |
|||
String secret; |
|||
if (StringUtils.isBlank(secret = getTokenFromCache(appId))) { |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), String.format("根据AppId:%s没有找到对应的秘钥", appId)); |
|||
} |
|||
|
|||
String localDigest = Md5Util.md5(secret.concat(":") + ts); |
|||
if (!localDigest.equals(token)) { |
|||
// 调用方生成的摘要跟本地生成的摘要不匹配
|
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), "签名不匹配,认证失败"); |
|||
} |
|||
|
|||
if (!validTimeStamp(ts)) { |
|||
logger.error("AccessToken已经超时,请求被拒绝"); |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), "AccessToken已经超时,请求被拒绝"); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 通过APP ID查询对应的秘钥 |
|||
* |
|||
* @param appId |
|||
* @return |
|||
*/ |
|||
public String getTokenFromCache(String appId) { |
|||
String secret = (String) redisUtils.get(RedisKeys.getExternalAppSecretKey(appId)); |
|||
if (StringUtils.isBlank(secret)) { |
|||
EpmetCommonServiceOpenFeignClient commonService = SpringContextUtils.getBean(EpmetCommonServiceOpenFeignClient.class); |
|||
Result<String> result = commonService.getSecret(appId); |
|||
if (!result.success()) { |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), result.getInternalMsg()); |
|||
} |
|||
|
|||
secret = result.getData(); |
|||
redisUtils.set(RedisKeys.getExternalAppSecretKey(appId), secret); |
|||
} |
|||
return secret; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,79 @@ |
|||
package com.epmet.auth; |
|||
|
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.cloud.gateway.filter.GatewayFilterChain; |
|||
import org.springframework.http.HttpHeaders; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.server.ServerWebExchange; |
|||
import reactor.core.publisher.Mono; |
|||
|
|||
/** |
|||
* 外部应用认证 |
|||
*/ |
|||
@Component |
|||
public class ExternalAuthProcessor extends AuthProcessor { |
|||
|
|||
private Logger logger = LoggerFactory.getLogger(getClass()); |
|||
|
|||
// 头s
|
|||
public static final String AUTHORIZATION_TOKEN_HEADER_KEY = "Authorization"; |
|||
public static final String ACCESS_TOKEN_HEADER_KEY = "AccessToken"; |
|||
public static final String APP_ID_HEADER_KEY = "appId"; |
|||
public static final String APP_ID_TIMESTAMP_KEY = "ts"; |
|||
public static final String APP_ID_CUSTOMER_ID_KEY = "CustomerId"; |
|||
public static final String APP_ID_AUTY_TYPE_KEY = "AuthType"; |
|||
|
|||
// 认证方式
|
|||
public static final String APP_AUTH_TYPE_JWT = "jwt"; |
|||
public static final String APP_AUTH_TYPE_MD5 = "md5"; |
|||
|
|||
|
|||
@Autowired |
|||
private ExtAppJwtAuthProcessor jwtAuthProcessor; |
|||
|
|||
@Autowired |
|||
private ExtAppMD5AuthProcessor md5AuthProcessor; |
|||
|
|||
@Override |
|||
public Mono<Void> auth(ServerWebExchange exchange, GatewayFilterChain chain) { |
|||
HttpHeaders headers = exchange.getRequest().getHeaders(); |
|||
|
|||
String token = headers.getFirst(ACCESS_TOKEN_HEADER_KEY); |
|||
String appId = headers.getFirst(APP_ID_HEADER_KEY); |
|||
String ts = headers.getFirst(APP_ID_TIMESTAMP_KEY); |
|||
String customerId = headers.getFirst(APP_ID_CUSTOMER_ID_KEY); |
|||
String authType = headers.getFirst(APP_ID_AUTY_TYPE_KEY); |
|||
|
|||
if (StringUtils.isAnyBlank(token, appId)) { |
|||
throw new RenException("请求头中的AccessToken和AppId不能为空"); |
|||
} |
|||
|
|||
logger.info("外部应用请求认证拦截Aspect执行,appId:{}, token:{}, ts:{}, customerId:{}, authType:{}", |
|||
appId, token, ts, customerId, authType); |
|||
|
|||
// 没传authType或者传的jwt都用jwtprocessor处理
|
|||
try { |
|||
if (StringUtils.isBlank(authType) || APP_AUTH_TYPE_JWT.equals(authType)) { |
|||
jwtAuthProcessor.auth(appId, token, StringUtils.isNotBlank(ts) ? new Long(ts) : null, exchange); |
|||
} else if (APP_AUTH_TYPE_MD5.equals(authType)) { |
|||
md5AuthProcessor.auth(appId, token, StringUtils.isNotBlank(ts) ? new Long(ts) : null, exchange); |
|||
} else { |
|||
throw new RenException(EpmetErrorCode.OPER_EXTERNAL_APP_AUTH_ERROR.getCode(), "未知的认证类型"); |
|||
} |
|||
} catch (RenException e) { |
|||
return response(exchange, new Result<>().error(e.getCode(), e.getMsg())); |
|||
} catch (Exception e) { |
|||
logger.error("外部应用请求认证发生未知错误:" + ExceptionUtils.getErrorStackTrace(e)); |
|||
return response(exchange, new Result<>().error("外部应用请求认证发生未知错误")); |
|||
} |
|||
|
|||
return chain.filter(exchange); |
|||
} |
|||
} |
@ -0,0 +1,175 @@ |
|||
package com.epmet.auth; |
|||
|
|||
import com.epmet.commons.tools.constant.AppClientConstant; |
|||
import com.epmet.commons.tools.constant.Constant; |
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.security.dto.BaseTokenDto; |
|||
import com.epmet.commons.tools.security.dto.GovTokenDto; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.CpUserDetailRedis; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.jwt.JwtTokenUtils; |
|||
import io.jsonwebtoken.Claims; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.cloud.gateway.filter.GatewayFilterChain; |
|||
import org.springframework.http.HttpHeaders; |
|||
import org.springframework.http.server.reactive.ServerHttpRequest; |
|||
import org.springframework.stereotype.Component; |
|||
import org.springframework.web.server.ServerWebExchange; |
|||
import reactor.core.publisher.Mono; |
|||
|
|||
/** |
|||
* 内部认证处理器 |
|||
*/ |
|||
@Component |
|||
public class InternalAuthProcessor extends AuthProcessor { |
|||
|
|||
private Logger logger = LoggerFactory.getLogger(getClass()); |
|||
|
|||
@Autowired |
|||
private JwtTokenUtils jwtTokenUtils; |
|||
|
|||
@Autowired |
|||
private CpUserDetailRedis cpUserDetailRedis; |
|||
|
|||
@Override |
|||
public Mono<Void> auth(ServerWebExchange exchange, GatewayFilterChain chain) { |
|||
ServerHttpRequest request = exchange.getRequest(); |
|||
String requestUri = request.getPath().pathWithinApplication().value(); |
|||
|
|||
logger.info("CpAuthGatewayFilterFactory当前requestUri=[" + requestUri + "]CpAuthGatewayFilterFactory拦截成功"); |
|||
String token = getTokenFromRequest(request); |
|||
//BaseTokenDto baseTokenDto = StringUtils.isNotBlank(token) ? getBaseTokenDto(token, jwtTokenUtils) : null;
|
|||
BaseTokenDto baseTokenDto; |
|||
if(StringUtils.isNotBlank(token)){ |
|||
try{ |
|||
baseTokenDto = getBaseTokenDto(token, jwtTokenUtils); |
|||
}catch(RenException e){ |
|||
return response(exchange,new Result<>().error(e.getCode(),e.getMsg())); |
|||
} |
|||
}else{ |
|||
baseTokenDto = null; |
|||
} |
|||
|
|||
String customerId = ""; |
|||
|
|||
if (baseTokenDto != null) { |
|||
if (AppClientConstant.APP_RESI.equals(baseTokenDto.getApp())) { |
|||
// 居民端
|
|||
TokenDto resiTokenDto = getLoginUserInfoByToken(token, jwtTokenUtils, TokenDto.class); |
|||
if (resiTokenDto != null) { |
|||
customerId = resiTokenDto.getCustomerId(); |
|||
baseTokenDto = resiTokenDto; |
|||
} |
|||
} else if (AppClientConstant.APP_GOV.equals(baseTokenDto.getApp())) { |
|||
// 政府端
|
|||
GovTokenDto govTokenDto = getLoginUserInfoByToken(token, jwtTokenUtils, GovTokenDto.class); |
|||
if (govTokenDto != null) { |
|||
customerId = govTokenDto.getCustomerId(); |
|||
baseTokenDto = govTokenDto; |
|||
} |
|||
} else if(AppClientConstant.APP_OPER.equals(baseTokenDto.getApp())){ |
|||
//运营端
|
|||
TokenDto resiTokenDto = getLoginUserInfoByToken(token, jwtTokenUtils, TokenDto.class); |
|||
if (resiTokenDto != null) { |
|||
customerId = resiTokenDto.getCustomerId(); |
|||
baseTokenDto = resiTokenDto; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// 校验token
|
|||
if (StringUtils.isBlank(token)) { |
|||
return response(exchange,new Result<>().error(EpmetErrorCode.ERR10005.getCode(),EpmetErrorCode.ERR10005.getMsg())); |
|||
} |
|||
try { |
|||
validateTokenDto(baseTokenDto, token); |
|||
} catch (RenException e) { |
|||
return response(exchange,new Result<>().error(e.getCode(),e.getMsg())); |
|||
} |
|||
|
|||
// 添加header
|
|||
if (baseTokenDto != null) { |
|||
String redisKey = baseTokenDto.getApp() + "-" + baseTokenDto.getClient() + "-" + baseTokenDto.getUserId(); |
|||
logger.info("redisKey=" + redisKey); |
|||
exchange.getRequest().mutate() |
|||
.header(Constant.APP_USER_KEY, redisKey) |
|||
.header(AppClientConstant.APP,baseTokenDto.getApp()) |
|||
.header(AppClientConstant.CLIENT,baseTokenDto.getClient()) |
|||
.header(AppClientConstant.USER_ID,baseTokenDto.getUserId()); |
|||
|
|||
if (StringUtils.equals(baseTokenDto.getApp(), "gov")) {//工作端
|
|||
if(StringUtils.isNotBlank(customerId)){ |
|||
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId); |
|||
} |
|||
} else if (StringUtils.equals(baseTokenDto.getApp(), "public")) {//公众号端
|
|||
exchange.getRequest().mutate().header(AppClientConstant.CUSTOMER_ID, customerId); |
|||
} |
|||
ServerHttpRequest build = exchange.getRequest().mutate().build(); |
|||
return chain.filter(exchange.mutate().request(build).build()); |
|||
} |
|||
|
|||
return chain.filter(exchange); |
|||
} |
|||
|
|||
/** |
|||
* 从请求中获取token |
|||
* @param request |
|||
* @return |
|||
*/ |
|||
private String getTokenFromRequest(ServerHttpRequest request) { |
|||
HttpHeaders headers = request.getHeaders(); |
|||
String token = headers.getFirst(Constant.AUTHORIZATION_HEADER); |
|||
if (StringUtils.isBlank(token)) { |
|||
token = headers.getFirst(Constant.TOKEN_HEADER); |
|||
} |
|||
if (StringUtils.isBlank(token)) { |
|||
token = request.getQueryParams().getFirst(Constant.AUTHORIZATION_HEADER); |
|||
} |
|||
return token; |
|||
} |
|||
|
|||
private BaseTokenDto getBaseTokenDto(String token, JwtTokenUtils jwtTokenUtils) { |
|||
//是否过期
|
|||
Claims claims = jwtTokenUtils.getClaimByToken(token); |
|||
if (claims == null || jwtTokenUtils.isTokenExpired(claims.getExpiration())) { |
|||
return null; |
|||
} |
|||
//获取用户ID
|
|||
String app = (String) claims.get("app"); |
|||
String client = (String) claims.get("client"); |
|||
String userId = (String) claims.get("userId"); |
|||
return new BaseTokenDto(app, client, userId, token); |
|||
} |
|||
|
|||
private <T> T getLoginUserInfoByToken(String token, JwtTokenUtils jwtTokenUtils, Class<T> clz) { |
|||
BaseTokenDto baseTokenDto = getBaseTokenDto(token, jwtTokenUtils); |
|||
//查询Redis
|
|||
return cpUserDetailRedis.get(baseTokenDto.getApp(), baseTokenDto.getClient(), baseTokenDto.getUserId(), clz); |
|||
} |
|||
|
|||
/** |
|||
* 校验Token是否异常 |
|||
* @param tokenDto |
|||
* @param tokenStr |
|||
*/ |
|||
private void validateTokenDto(BaseTokenDto tokenDto, String tokenStr) { |
|||
if (null == tokenDto) { |
|||
//说明登录状态时效(超时)
|
|||
throw new RenException(EpmetErrorCode.ERR10006.getCode()); |
|||
}else{ |
|||
//Redis中存在数据,取出token,进行比对
|
|||
if(StringUtils.equals(tokenDto.getToken(),tokenStr)){ |
|||
//用户携带token与Redis中一致
|
|||
|
|||
}else{ |
|||
//用户携带token与Redis中不一致,说明当前用户此次会话失效,提示重新登陆
|
|||
throw new RenException(EpmetErrorCode.ERR10007.getCode()); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -1,35 +0,0 @@ |
|||
package com.epmet.filter; |
|||
|
|||
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.security.dto.BaseTokenDto; |
|||
import com.epmet.commons.tools.utils.CpUserDetailRedis; |
|||
import com.epmet.jwt.JwtTokenUtils; |
|||
import io.jsonwebtoken.Claims; |
|||
|
|||
/** |
|||
* 用户token的过滤器接口,提供通用的默认方法 |
|||
*/ |
|||
public interface UserTokenFilter { |
|||
|
|||
default BaseTokenDto getBaseTokenDto(String token, JwtTokenUtils jwtTokenUtils) { |
|||
//是否过期
|
|||
Claims claims = jwtTokenUtils.getClaimByToken(token); |
|||
if (claims == null || jwtTokenUtils.isTokenExpired(claims.getExpiration())) { |
|||
// throw new RenException(EpmetErrorCode.ERR401.getCode());
|
|||
return null; |
|||
} |
|||
//获取用户ID
|
|||
String app = (String) claims.get("app"); |
|||
String client = (String) claims.get("client"); |
|||
String userId = (String) claims.get("userId"); |
|||
return new BaseTokenDto(app, client, userId, token); |
|||
} |
|||
|
|||
default <T> T getLoginUserInfoByToken(String token, JwtTokenUtils jwtTokenUtils, CpUserDetailRedis cpUserDetailRedis, Class<T> clz) { |
|||
BaseTokenDto baseTokenDto = getBaseTokenDto(token, jwtTokenUtils); |
|||
//查询Redis
|
|||
return cpUserDetailRedis.get(baseTokenDto.getApp(), baseTokenDto.getClient(), baseTokenDto.getUserId(), clz); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 能力指数--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class AblityIndexFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
public interface AddUserInternalGroup {} |
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgId; |
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
/** |
|||
* 组织或网格类型 |
|||
*/ |
|||
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgType; |
|||
/** |
|||
* 查询月份的前12个月对应的monthId |
|||
*/ |
|||
private String startMonthId; |
|||
/** |
|||
* 月份Id(格式:202009) |
|||
*/ |
|||
@NotBlank(message = "月份ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String monthId; |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 按月查询各项指标数据--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class AblityListFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = {AblityListFormDTO.AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgId; |
|||
/** |
|||
* 组织或网格类型 |
|||
*/ |
|||
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgType; |
|||
public interface AddUserInternalGroup {} |
|||
/** |
|||
* 月份Id(格式:202009) |
|||
*/ |
|||
@NotBlank(message = "月份ID不能为空",groups = {AblityListFormDTO.AddUserInternalGroup.class}) |
|||
private String monthId; |
|||
/** |
|||
* 类型(党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;) |
|||
*/ |
|||
@NotBlank(message = "类型不能为空",groups = {AblityListFormDTO.AddUserInternalGroup.class}) |
|||
private String indexCode; |
|||
/** |
|||
* 所有有权重的指标code拼接的字符串 冒号隔开 |
|||
*/ |
|||
private String allParentIndexCode; |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 先进排行-先进支部排行--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class AdvancedBranchRankFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -8674763412362557239L; |
|||
/** |
|||
* 机关Id |
|||
* */ |
|||
@NotBlank(message = "机关Id不能为空" , groups = AdvancedBranchRankFormDTO.AddUserInternalGroup.class) |
|||
private String agencyId; |
|||
/** |
|||
* 显示多少条 |
|||
* */ |
|||
@Min(value = 1, message = "查询条数必须大于0", groups = {AdvancedBranchRankFormDTO.AddUserInternalGroup.class }) |
|||
private Integer topNum; |
|||
/** |
|||
* 月份Id |
|||
* */ |
|||
private String monthId; |
|||
public interface AddUserInternalGroup {} |
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/10/9 9:47 |
|||
*/ |
|||
@Data |
|||
public class AnScreenFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 5402826635847080766L; |
|||
|
|||
public interface AnScreenGroup extends CustomerClientShowGroup {} |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
@NotBlank(message = "机关Id不能为空", groups = AnScreenGroup.class) |
|||
|
|||
private String agencyId; |
|||
/** |
|||
* 月份ID |
|||
*/ |
|||
@NotBlank(message = "月份Id不能为空", groups = AnScreenGroup.class) |
|||
private String monthId; |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/10/9 9:47 |
|||
*/ |
|||
@Data |
|||
public class AnScreenRankFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -766779327034367216L; |
|||
|
|||
public interface AnScreenRankGroup extends CustomerClientShowGroup {} |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
@NotBlank(message = "机关Id不能为空", groups = AnScreenRankFormDTO.AnScreenRankGroup.class) |
|||
private String agencyId; |
|||
@NotNull(message = "top值不能为空", groups = AnScreenRankFormDTO.AnScreenRankGroup.class) |
|||
private Integer topNum; |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/10/9 9:48 |
|||
*/ |
|||
@Data |
|||
public class AnScreenTrendFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -766779327034367216L; |
|||
|
|||
public interface AnScreenTrendGroup extends CustomerClientShowGroup {} |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
@NotBlank(message = "机关Id不能为空", groups = AnScreenTrendFormDTO.AnScreenTrendGroup.class) |
|||
private String agencyId; |
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 组织月度指数得分--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class IndexScoreFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
@NotBlank(message = "组织或网格ID不能为空",groups = {IndexScoreFormDTO.AddUserInternalGroup.class}) |
|||
private String orgId; |
|||
/** |
|||
* 类型(组织:agency 网格:grid) |
|||
* 大屏接口此字段值为空 |
|||
*/ |
|||
//@NotBlank(message = "数据类型不能为空",groups = {IndexScoreFormDTO.AddUserInternalGroup.class})
|
|||
private String orgType; |
|||
/** |
|||
* 月份Id eg:202009 |
|||
* 大屏接口此字段值为空 |
|||
*/ |
|||
//@NotBlank(message = "月份Id不能为空",groups = {IndexScoreFormDTO.AddUserInternalGroup.class})
|
|||
private String monthId; |
|||
public interface AddUserInternalGroup {} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 按月查询各项指标最近12个月数据--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class MonthAblityListFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = {MonthAblityListFormDTO.AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgId; |
|||
/** |
|||
* 组织或网格类型 |
|||
*/ |
|||
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgType; |
|||
public interface AddUserInternalGroup {} |
|||
/** |
|||
* 月份Id(格式:202009) |
|||
*/ |
|||
@NotBlank(message = "月份ID不能为空",groups = {MonthAblityListFormDTO.AddUserInternalGroup.class}) |
|||
private String monthId; |
|||
/** |
|||
* 月份Id(格式:202009) |
|||
*/ |
|||
@NotBlank(message = "类型key不能为空",groups = {MonthAblityListFormDTO.AddUserInternalGroup.class}) |
|||
private String key; |
|||
/** |
|||
* 查询月份的前12个月对应的monthId |
|||
*/ |
|||
private String startMonthId; |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 能力指数--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class MonthScoreListFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
public interface AddUserInternalGroup {} |
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgId; |
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = {MonthScoreListFormDTO.AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
/** |
|||
* 组织或网格类型 |
|||
*/ |
|||
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgType; |
|||
/** |
|||
* 月份Id(格式:202009) |
|||
*/ |
|||
@NotBlank(message = "月份ID不能为空",groups = {MonthScoreListFormDTO.AddUserInternalGroup.class}) |
|||
private String monthId; |
|||
/** |
|||
* 查询月份的前12个月对应的monthId |
|||
*/ |
|||
private String startMonthId; |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 党员(指标得分)排行--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class PartIndexScroeRankFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
@NotBlank(message = "组织或网格ID不能为空",groups = {PartIndexScroeRankFormDTO.AddUserInternalGroup.class}) |
|||
private String orgId; |
|||
/** |
|||
* 类型(组织:agency 网格:grid) |
|||
*/ |
|||
@NotBlank(message = "数据类型不能为空",groups = {PartIndexScroeRankFormDTO.AddUserInternalGroup.class}) |
|||
private String orgType; |
|||
/** |
|||
* 默认显示前5名 |
|||
*/ |
|||
@Min(value = 1, message = "查询条数必须大于0", groups = {PartIndexScroeRankFormDTO.AddUserInternalGroup.class }) |
|||
private Integer topNum; |
|||
public interface AddUserInternalGroup {} |
|||
|
|||
|
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 同级对比各项数据查询--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class PeerComparisonFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = {PeerComparisonFormDTO.AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgId; |
|||
/** |
|||
* 组织或网格类型 |
|||
*/ |
|||
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgType; |
|||
public interface AddUserInternalGroup {} |
|||
/** |
|||
* 类型(党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;) |
|||
*/ |
|||
@NotBlank(message = "数据类型不能为空",groups = {PeerComparisonFormDTO.AddUserInternalGroup.class}) |
|||
private String indexCode; |
|||
/** |
|||
* 查询条数 |
|||
*/ |
|||
@Min(value = 1, message = "查询条数必须大于0", groups = {PeerComparisonFormDTO.AddUserInternalGroup.class }) |
|||
private Integer pageSize; |
|||
|
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 是否根组织--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class RootAgencyFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
public interface AddUserInternalGroup {} |
|||
|
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
@NotBlank(message = "组织ID不能为空",groups = {RootAgencyFormDTO.AddUserInternalGroup.class}) |
|||
private String agencyId; |
|||
|
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 按月份查询各项能力分数--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class ScoreListFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
public interface AddUserInternalGroup {} |
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
@NotBlank(message = "组织或网格ID不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgId; |
|||
/** |
|||
* 组织Id |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = {ScoreListFormDTO.AddUserInternalGroup.class}) |
|||
private String customerId; |
|||
/** |
|||
* 组织或网格类型 |
|||
*/ |
|||
@NotBlank(message = "组织或网格类型不能为空",groups = {AblityIndexFormDTO.AddUserInternalGroup.class}) |
|||
private String orgType; |
|||
/** |
|||
* 月份Id(格式:202009) |
|||
*/ |
|||
@NotBlank(message = "月份ID不能为空",groups = {ScoreListFormDTO.AddUserInternalGroup.class}) |
|||
private String monthId; |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.evaluationindex.screen.dto.form; |
|||
|
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 热心市民积分排行列表--接口入参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class UserPointRankFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -2880432640584616651L; |
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
@NotBlank(message = "组织或网格ID不能为空",groups = {UserPointRankFormDTO.AddUserInternalGroup.class}) |
|||
private String orgId; |
|||
/** |
|||
* 类型(组织:agency 网格:grid) |
|||
*/ |
|||
@NotBlank(message = "数据类型不能为空",groups = {UserPointRankFormDTO.AddUserInternalGroup.class}) |
|||
private String orgType; |
|||
/** |
|||
* 默认显示前5名 |
|||
*/ |
|||
@Min(value = 1, message = "查询条数必须大于0", groups = {UserPointRankFormDTO.AddUserInternalGroup.class }) |
|||
private Integer topNum; |
|||
public interface AddUserInternalGroup {} |
|||
|
|||
|
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 能力指数--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class AblityIndexResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli |
|||
*/ |
|||
private String indexCode; |
|||
/** |
|||
* 每项能力最近12月各项分数对象 |
|||
*/ |
|||
private List<AblityIndexResultDTO.ScoreListResultDTO> scoreList; |
|||
|
|||
@Data |
|||
public static class ScoreListResultDTO implements Serializable { |
|||
/** |
|||
* 能力总分 |
|||
*/ |
|||
private Double indexTotal; |
|||
/** |
|||
* 横坐标(202009) |
|||
*/ |
|||
private String monthId; |
|||
/** |
|||
* 能力类型 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli; |
|||
*/ |
|||
@JsonIgnore |
|||
private String indexCode; |
|||
|
|||
} |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 按月查询各项指标数据--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class AblityListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 各项指标名称 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 指标对应值(数值或百分比) |
|||
*/ |
|||
private String value = "0"; |
|||
/** |
|||
* 各项指标对应key值(index_dict字典表) |
|||
*/ |
|||
private String key; |
|||
/** |
|||
* 指标值类型 无:none;整数:integer;小数: decimal;百分比:percent |
|||
*/ |
|||
private String showType; |
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 09、基层治理-治理排行 |
|||
* @date 2020/10/9 10:54 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GrassRootsGovernRankResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5175488557393182160L; |
|||
/** |
|||
* 参与项目数 |
|||
*/ |
|||
private Integer partiProjectTotal; |
|||
/** |
|||
* 办结项目数 |
|||
*/ |
|||
private Integer closedProjectTotal; |
|||
/** |
|||
* 响应度 |
|||
*/ |
|||
private String projectResponseRatio; |
|||
/** |
|||
* 满意度 |
|||
*/ |
|||
private String projectSatisRatio; |
|||
/** |
|||
* 办结率 当前界面在社区时才显示 |
|||
*/ |
|||
private String closedProjectRatio; |
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String orgName; |
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 07、基层治理-总数 |
|||
* @date 2020/10/9 10:36 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GrassRootsGovernResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3455494963816549169L; |
|||
/** |
|||
* 参与项目数 |
|||
*/ |
|||
private Integer partiProjectTotal; |
|||
/** |
|||
* 办结项目数 |
|||
*/ |
|||
private Integer closedProjectTotal; |
|||
/** |
|||
* 项目响应度 |
|||
*/ |
|||
private String projectResponseRatio; |
|||
/** |
|||
* 项目满意率 |
|||
*/ |
|||
private String projectSatisRatio; |
|||
/** |
|||
* 办结率(当前界面是社区时显示) |
|||
*/ |
|||
private String closedProjectRatio; |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/10/9 15:08 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GrassRootsGovernTrendDTO implements Serializable { |
|||
private static final long serialVersionUID = 4977117178308139861L; |
|||
/** |
|||
* 月份 |
|||
*/ |
|||
private String monthId; |
|||
/** |
|||
* 参与项目数 |
|||
*/ |
|||
private Integer partiProjectTotal; |
|||
/** |
|||
* 办结项目数 |
|||
*/ |
|||
private Integer closedProjectTotal; |
|||
/** |
|||
* 项目响应度 |
|||
*/ |
|||
private BigDecimal projectResponseRatio; |
|||
/** |
|||
* 项目满意率 |
|||
*/ |
|||
private BigDecimal projectSatisRatio; |
|||
/** |
|||
* 办结率(当前界面是社区时显示) |
|||
*/ |
|||
private BigDecimal closedProjectRatio; |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 08、基层治理-指标月度趋势 |
|||
* @date 2020/10/9 10:48 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GrassRootsGovernTrendResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 5640652259031475809L; |
|||
/** |
|||
* 横坐标集合 |
|||
*/ |
|||
private List<String> xAxis; |
|||
/** |
|||
* 参与项目数 |
|||
*/ |
|||
private List<Integer> partiProjectTotalList; |
|||
/** |
|||
* 办结项目数 |
|||
*/ |
|||
private List<Integer> closedProjectTotalList; |
|||
/** |
|||
* 项目响应度 |
|||
*/ |
|||
private List<BigDecimal> projectResponseRatioList; |
|||
/** |
|||
* 项目满意率 |
|||
*/ |
|||
private List<BigDecimal> projectSatisRatioList; |
|||
/** |
|||
* 办结率(当前界面是社区时显示) |
|||
*/ |
|||
private List<BigDecimal> closedProjectRatioList; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 06、基层组织-组织排行榜单 |
|||
* @date 2020/10/9 10:32 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GrassRootsOrgRankResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3573854743057339033L; |
|||
/** |
|||
* 党群数 |
|||
*/ |
|||
private Integer groupTotal; |
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private Integer issueTotal; |
|||
/** |
|||
* 项目数 |
|||
*/ |
|||
private Integer projectTotal; |
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String orgName; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 04、基层组织-党群数、议题数、项目数 |
|||
* @date 2020/10/9 10:22 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GrassRootsOrgResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6623022965863266247L; |
|||
/** |
|||
* 党群数 |
|||
*/ |
|||
private Integer groupTotal; |
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private Integer issueTotal; |
|||
/** |
|||
* 项目数 |
|||
*/ |
|||
private Integer projectTotal; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/10/9 15:10 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GrassRootsOrgTrendDTO implements Serializable { |
|||
private static final long serialVersionUID = 6172847581584903056L; |
|||
/** |
|||
* 月份 |
|||
*/ |
|||
private String monthId; |
|||
/** |
|||
* 党群数 |
|||
*/ |
|||
private Integer groupTotal; |
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private Integer issueTotal; |
|||
/** |
|||
* 项目数 |
|||
*/ |
|||
private Integer projectTotal; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 05、基层组织-指标月度趋势 |
|||
* @date 2020/10/9 10:25 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class GrassRootsOrgTrendResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -6911028881641915610L; |
|||
/** |
|||
* 横坐标集合 |
|||
*/ |
|||
private List<String> xAxis; |
|||
/** |
|||
* 党群数 |
|||
*/ |
|||
private List<Integer> groupTotalList; |
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private List<Integer> issueTotalList; |
|||
/** |
|||
* 项目数 |
|||
*/ |
|||
private List<Integer> projectTotal; |
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 先进排行-先进支部排行--接口返参 |
|||
* |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class IndexAdvanceBranchRankResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 330099297596334388L; |
|||
|
|||
/** |
|||
* 名称 XXXX社区党委 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 指标得分 |
|||
*/ |
|||
@JsonIgnore |
|||
private String totalScore; |
|||
private BigDecimal scroe; |
|||
/** |
|||
* 党员数 |
|||
*/ |
|||
private Integer partyMemberNum; |
|||
|
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private Integer issueNum; |
|||
|
|||
/** |
|||
* 项目数 |
|||
*/ |
|||
private Integer projectNum; |
|||
|
|||
/** |
|||
* 满意度 90.64% 返回字符串,前端直接显示 |
|||
*/ |
|||
private String satisfactionRatio; |
|||
|
|||
/** |
|||
* 结案率 94.3% 返回字符串,前端直接显示 |
|||
*/ |
|||
private String closedProjectRatio; |
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 评价指标字典表数据--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class IndexDictResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 指标名 |
|||
*/ |
|||
private String indexName; |
|||
/** |
|||
* 指标code |
|||
*/ |
|||
private String indexCode; |
|||
/** |
|||
* 指标值类型 百分比:percent |
|||
*/ |
|||
private String valueType; |
|||
|
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
/** |
|||
* 组织月度指数得分--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class IndexScoreResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 年度平均指数(保留一位小数) |
|||
*/ |
|||
@JsonIgnore |
|||
private String total; |
|||
private BigDecimal totalScore; |
|||
/** |
|||
* 党建能力(保留一位小数) |
|||
*/ |
|||
@JsonIgnore |
|||
private String party; |
|||
private BigDecimal partyDevAbility; |
|||
/** |
|||
* 党建能力权重(保留一位小数) |
|||
*/ |
|||
private String partyDevAbilityWeight; |
|||
/** |
|||
* 治理能力(保留一位小数) |
|||
*/ |
|||
@JsonIgnore |
|||
private String govern; |
|||
private BigDecimal governAbility; |
|||
/** |
|||
* 治理能力权重(保留一位小数) |
|||
*/ |
|||
private String governAbilityWeight; |
|||
/** |
|||
* 服务能力(保留一位小数) |
|||
*/ |
|||
@JsonIgnore |
|||
private String service; |
|||
private BigDecimal serviceAbility; |
|||
/** |
|||
* 服务能力权重(保留一位小数) |
|||
*/ |
|||
private String serviceAbilityWeight; |
|||
|
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 按月查询各项指标最近12个月数据--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class MonthAblityListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 横坐标(202009) |
|||
*/ |
|||
private String monthId; |
|||
/** |
|||
* 指标对应值(数值或百分比) |
|||
*/ |
|||
private String ablity; |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 按月份查询各项能力最近12个月得分--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class MonthScoreListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli |
|||
*/ |
|||
private String indexCode; |
|||
/** |
|||
* 每项能力最近12月各项分数对象 |
|||
*/ |
|||
private List<MonthScoreListResultDTO.ScoreListResultDTO> scoreList; |
|||
|
|||
@Data |
|||
public static class ScoreListResultDTO implements Serializable { |
|||
/** |
|||
* 能力总分 |
|||
*/ |
|||
private Double indexTotal; |
|||
/** |
|||
* 本级能力分 |
|||
*/ |
|||
private Double agencyScore; |
|||
/** |
|||
* 下级能力分 |
|||
*/ |
|||
private Double subAgencyScore; |
|||
/** |
|||
* 横坐标(202009) |
|||
*/ |
|||
private String monthId; |
|||
/** |
|||
* 类型(党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;) |
|||
*/ |
|||
@JsonIgnore |
|||
private String indexCode; |
|||
|
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 党员(指标得分)排行--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class PartIndexScroeRankResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String agencyName; |
|||
/** |
|||
* 用户Id |
|||
*/ |
|||
private String userId; |
|||
/** |
|||
* 用户名称 |
|||
*/ |
|||
private String userName; |
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
/** |
|||
* 党员指标得分 |
|||
*/ |
|||
private Double indexScore; |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 同级对比各项数据查询--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class PeerComparisonResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 组织或网格Id |
|||
*/ |
|||
private String orgId; |
|||
/** |
|||
* 组织或网格名称 |
|||
*/ |
|||
private String orgName; |
|||
/** |
|||
* 能力分值(保留一位小数) |
|||
*/ |
|||
private Double score; |
|||
|
|||
} |
@ -0,0 +1,50 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 03、基层党员-党员排行榜单 |
|||
* @date 2020/10/9 10:12 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class PmRankResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2939125411579816231L; |
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String userName; |
|||
/** |
|||
* 所属支部名称 |
|||
*/ |
|||
private String branchName; |
|||
/** |
|||
* 所属社区名称 |
|||
*/ |
|||
private String communityName; |
|||
/** |
|||
* 群成员数 |
|||
*/ |
|||
private Integer groupMemberTotal; |
|||
/** |
|||
* 话题数 |
|||
*/ |
|||
private Integer topicTotal; |
|||
/** |
|||
* 参与人次 |
|||
*/ |
|||
private Integer partiUserTotal; |
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private Integer issueTotal; |
|||
} |
@ -0,0 +1,34 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 01、基层党员-各类总数 |
|||
* @date 2020/10/9 10:04 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class PmTotalResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 4317234373580733128L; |
|||
/** |
|||
* 群成员数 |
|||
*/ |
|||
private Integer groupMemberTotal; |
|||
/** |
|||
* 话题数 |
|||
*/ |
|||
private Integer topicTotal; |
|||
/** |
|||
* 话题参与人次 |
|||
*/ |
|||
private Integer topicPartiUserTotal; |
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private Integer issueTotal; |
|||
} |
@ -0,0 +1,35 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/10/9 15:05 |
|||
*/ |
|||
@Data |
|||
public class PmTotalTrendDTO implements Serializable { |
|||
private static final long serialVersionUID = -6773118646805355171L; |
|||
/** |
|||
* 月份 |
|||
*/ |
|||
private String monthId; |
|||
/** |
|||
* 群成员数 |
|||
*/ |
|||
private Integer groupMemberTotal; |
|||
/** |
|||
* 话题数 |
|||
*/ |
|||
private Integer topicTotal; |
|||
/** |
|||
* 话题参与人次 |
|||
*/ |
|||
private Integer topicPartiUserTotal; |
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private Integer issueTotal; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 02、基层党员-指标月度趋势 |
|||
* @date 2020/10/9 10:06 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class PmTotalTrendResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -5705077703115309896L; |
|||
/** |
|||
* 横坐标集合 |
|||
*/ |
|||
private List<String> xAxis; |
|||
/** |
|||
* 群成员数 |
|||
*/ |
|||
private List<Integer> groupMemberTotalList; |
|||
/** |
|||
* 话题数 |
|||
*/ |
|||
private List<Integer> topicTotalList; |
|||
/** |
|||
* 话题参与人次 |
|||
*/ |
|||
private List<Integer> topicPartiUserTotalList; |
|||
/** |
|||
* 议题数 |
|||
*/ |
|||
private List<Integer> issueTotalList; |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription 10、项目 |
|||
* @date 2020/10/9 10:57 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class ProjectProfileResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6525050844558886157L; |
|||
/** |
|||
* 组织id |
|||
*/ |
|||
private String orgId; |
|||
/** |
|||
* 项目数量 |
|||
*/ |
|||
private Integer projectTotal; |
|||
/** |
|||
* 级别 |
|||
*/ |
|||
private String level; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 是否根组织--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class RootAgencyResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 是否根组织(是:true 否:false) |
|||
*/ |
|||
private Boolean isRoot = true; |
|||
|
|||
/** |
|||
* 数据更新至(上月月末时间) |
|||
*/ |
|||
private String date; |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 按月份查询各项能力分数--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class ScoreListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 类型(党建能力:dangjiannengli;治理能力:zhilinengli;服务能力:fuwunengli;) |
|||
*/ |
|||
private String indexCode; |
|||
/** |
|||
* 总分(保留一位小数) |
|||
*/ |
|||
private Double indexTotal; |
|||
/** |
|||
* 本级分数(保留一位小数) |
|||
*/ |
|||
private Double agencyScore; |
|||
/** |
|||
* 下级分数(保留一位小数) |
|||
*/ |
|||
private Double subAgencyScore; |
|||
|
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.epmet.evaluationindex.screen.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 热心市民积分排行列表--接口返参 |
|||
* @Author sun |
|||
*/ |
|||
@Data |
|||
public class UserPointRankListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3860268744336541373L; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String agencyName; |
|||
/** |
|||
* 用户Id |
|||
*/ |
|||
private String userId; |
|||
/** |
|||
* 用户名称 |
|||
*/ |
|||
private String userName; |
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
/** |
|||
* 网格名称 |
|||
*/ |
|||
private String gridName; |
|||
/** |
|||
* 用户积分 |
|||
*/ |
|||
private Integer pointTotal; |
|||
|
|||
} |
@ -0,0 +1,64 @@ |
|||
package com.epmet.datareport.constant; |
|||
|
|||
/** |
|||
* @author sun |
|||
* @dscription 数据 |
|||
*/ |
|||
public interface FactConstant { |
|||
/** |
|||
* 组织类型 |
|||
*/ |
|||
String AGENCY = "agency"; |
|||
/** |
|||
* 网格类型 |
|||
*/ |
|||
String GRID = "grid"; |
|||
/** |
|||
* 能力指标 |
|||
*/ |
|||
String NLZB = "nenglizhibiao"; |
|||
/** |
|||
* 党建能力 |
|||
*/ |
|||
String DJNL = "dangjiannengli"; |
|||
/** |
|||
* 治理能力 |
|||
*/ |
|||
String ZLNL = "zhilinengli"; |
|||
/** |
|||
* 服务能力 |
|||
*/ |
|||
String FWNL = "fuwunengli"; |
|||
/** |
|||
* 全区相关 |
|||
*/ |
|||
String QUAN_QU_XIANG_GUAN = "quanquxiangguan"; |
|||
/** |
|||
* 街道相关 |
|||
*/ |
|||
String JIE_DAO_XIANG_GUAN = "jiedaoxiangguan"; |
|||
/** |
|||
* 社区相关 |
|||
*/ |
|||
String SHE_QU_XIANG_GUAN = "shequxiangguan"; |
|||
/** |
|||
* 网格相关 |
|||
*/ |
|||
String WANG_GE_XIANG_GUAN = "wanggexiangguan"; |
|||
/** |
|||
* 评价指标类型-无 |
|||
*/ |
|||
String NONE = "none"; |
|||
/** |
|||
* 评价指标类型-整数 |
|||
*/ |
|||
String INTEGER = "integer"; |
|||
/** |
|||
* 评价指标类型-小数 |
|||
*/ |
|||
String DECIMAL = "decimal"; |
|||
/** |
|||
* 评价指标类型-百分比 |
|||
*/ |
|||
String PERCENT = "percent"; |
|||
} |
@ -0,0 +1,108 @@ |
|||
package com.epmet.datareport.controller.fact; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.datareport.service.fact.FactIndexService; |
|||
import com.epmet.evaluationindex.screen.dto.form.*; |
|||
import com.epmet.evaluationindex.screen.dto.result.*; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 数据改版api |
|||
* |
|||
* @author sun |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("fact") |
|||
public class FactIndexController { |
|||
|
|||
@Autowired |
|||
private FactIndexService factIndexService; |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 能力指数 |
|||
* @author sun |
|||
*/ |
|||
@PostMapping("index/ablityindex") |
|||
public Result<List<AblityIndexResultDTO>> ablityIndex(@RequestBody AblityIndexFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AblityIndexFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<AblityIndexResultDTO>>().ok(factIndexService.ablityIndex(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 按月份查询各项能力分数 |
|||
* @author sun |
|||
*/ |
|||
@PostMapping("index/scorelist") |
|||
public Result<List<ScoreListResultDTO>> scoreList(@RequestBody ScoreListFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, ScoreListFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<ScoreListResultDTO>>().ok(factIndexService.scoreList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 按月份查询各项能力最近12个月得分 |
|||
* @author sun |
|||
*/ |
|||
@PostMapping("index/monthscorelist") |
|||
public Result<List<MonthScoreListResultDTO>> monthScoreList(@RequestBody MonthScoreListFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, MonthScoreListFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<MonthScoreListResultDTO>>().ok(factIndexService.monthScoreList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 按月查询各项指标数据 |
|||
* @author sun |
|||
*/ |
|||
@PostMapping("index/ablitylist") |
|||
public Result<List<AblityListResultDTO>> ablityList(@RequestBody AblityListFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AblityListFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<AblityListResultDTO>>().ok(factIndexService.ablityList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 按月查询各项指标最近12个月数据 |
|||
* @author sun |
|||
*/ |
|||
@PostMapping("index/monthablitylist") |
|||
public Result<List<MonthAblityListResultDTO>> monthAblityList(@RequestBody MonthAblityListFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, MonthAblityListFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<MonthAblityListResultDTO>>().ok(factIndexService.monthAblityList(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 同级对比各项数据查询 |
|||
* @author sun |
|||
*/ |
|||
@PostMapping("index/peercomparison") |
|||
public Result<List<PeerComparisonResultDTO>> peerComparison(@RequestBody PeerComparisonFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, PeerComparisonFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<PeerComparisonResultDTO>>().ok(factIndexService.peerComparison(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 是否根组织 |
|||
* @author sun |
|||
*/ |
|||
@PostMapping("index/rootagency") |
|||
public Result<RootAgencyResultDTO> rootAgency(@RequestBody RootAgencyFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, RootAgencyFormDTO.AddUserInternalGroup.class); |
|||
return new Result<RootAgencyResultDTO>().ok(factIndexService.rootAgency(formDTO)); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,175 @@ |
|||
package com.epmet.datareport.controller.screen; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.datareport.service.evaluationindex.screen.AnScreenService; |
|||
import com.epmet.evaluationindex.screen.dto.form.AnScreenFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.AnScreenRankFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.AnScreenTrendFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.*; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 安宁大屏 |
|||
* |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 9:32 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("anscreen") |
|||
public class AnScreenController { |
|||
|
|||
@Autowired |
|||
private AnScreenService anScreenService; |
|||
|
|||
/** |
|||
* 基层党员-各类总数 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.PmTotalResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 13:55 |
|||
*/ |
|||
@PostMapping("pmtotal") |
|||
public Result<PmTotalResultDTO> pmTotal(@RequestBody AnScreenFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AnScreenFormDTO.AnScreenGroup.class); |
|||
PmTotalResultDTO result = anScreenService.pmTotal(formDTO); |
|||
return new Result<PmTotalResultDTO>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 基层党员-指标月度趋势 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.PmTotalTrendResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 13:57 |
|||
*/ |
|||
@PostMapping("pmtotaltrend") |
|||
public Result<PmTotalTrendResultDTO> pmTotalTrend(@RequestBody AnScreenTrendFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AnScreenTrendFormDTO.AnScreenTrendGroup.class); |
|||
PmTotalTrendResultDTO result = anScreenService.pmTotalTrend(formDTO); |
|||
return new Result<PmTotalTrendResultDTO>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 基层党员-党员排行榜单 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.PmRankResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 13:59 |
|||
*/ |
|||
@PostMapping("pmrank") |
|||
public Result<List<PmRankResultDTO>> pmRank(@RequestBody AnScreenRankFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AnScreenRankFormDTO.AnScreenRankGroup.class); |
|||
List<PmRankResultDTO> result = anScreenService.pmRank(formDTO); |
|||
return new Result<List<PmRankResultDTO>>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 基层组织-党群数、议题数、项目数 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:01 |
|||
*/ |
|||
@PostMapping("grassrootsorg") |
|||
public Result<GrassRootsOrgResultDTO> grassRootsOrg(@RequestBody AnScreenFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AnScreenFormDTO.AnScreenGroup.class); |
|||
GrassRootsOrgResultDTO result = anScreenService.grassRootsOrg(formDTO); |
|||
return new Result<GrassRootsOrgResultDTO>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 基层组织-指标月度趋势 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgTrendResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:03 |
|||
*/ |
|||
@PostMapping("grassrootsorgtrend") |
|||
public Result<GrassRootsOrgTrendResultDTO> grassRootsOrgTrend(@RequestBody AnScreenTrendFormDTO formDTO) { |
|||
GrassRootsOrgTrendResultDTO result = anScreenService.grassRootsOrgTrend(formDTO); |
|||
return new Result<GrassRootsOrgTrendResultDTO>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 基层组织-组织排行榜单 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgRankResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:06 |
|||
*/ |
|||
@PostMapping("grassrootsorgrank") |
|||
public Result<List<GrassRootsOrgRankResultDTO>> grassRootsOrgRank(@RequestBody AnScreenFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AnScreenFormDTO.AnScreenGroup.class); |
|||
List<GrassRootsOrgRankResultDTO> result = anScreenService.grassRootsOrgRank(formDTO); |
|||
return new Result<List<GrassRootsOrgRankResultDTO>>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 基层治理-总数 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:10 |
|||
*/ |
|||
@PostMapping("grassrootsgovern") |
|||
public Result<GrassRootsGovernResultDTO> grassRootsGovern(@RequestBody AnScreenFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AnScreenFormDTO.AnScreenGroup.class); |
|||
GrassRootsGovernResultDTO result = anScreenService.grassRootsGovern(formDTO); |
|||
return new Result<GrassRootsGovernResultDTO>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 基层治理-指标月度趋势 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernTrendResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:11 |
|||
*/ |
|||
@PostMapping("grassrootsgoverntrend") |
|||
public Result<GrassRootsGovernTrendResultDTO> grassRootsGovernTrend(@RequestBody AnScreenTrendFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AnScreenTrendFormDTO.AnScreenTrendGroup.class); |
|||
GrassRootsGovernTrendResultDTO result = anScreenService.grassRootsGovernTrend(formDTO); |
|||
return new Result<GrassRootsGovernTrendResultDTO>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 基层治理-治理排行 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernRankResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:13 |
|||
*/ |
|||
@PostMapping("grassrootsgovernrank") |
|||
public Result<List<GrassRootsGovernRankResultDTO>> grassRootsGovernRank(@RequestBody AnScreenFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, AnScreenFormDTO.AnScreenGroup.class); |
|||
List<GrassRootsGovernRankResultDTO> result = anScreenService.grassRootsGovernRank(formDTO); |
|||
return new Result<List<GrassRootsGovernRankResultDTO>>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 项目 |
|||
* |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.ProjectProfileResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:16 |
|||
*/ |
|||
@PostMapping("projectprofile") |
|||
public Result<List<ProjectProfileResultDTO>> projectProfile(@RequestHeader("CustomerId") String customerId) { |
|||
List<ProjectProfileResultDTO> result = anScreenService.projectProfile(customerId); |
|||
return new Result<List<ProjectProfileResultDTO>>().ok(result); |
|||
} |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.epmet.datareport.controller.screen; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.datareport.service.evaluationindex.screen.ScreenUserService; |
|||
import com.epmet.evaluationindex.screen.dto.form.PartIndexScroeRankFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.UserPointRankFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.PartIndexScroeRankResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.UserPointRankListResultDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 数据改版api |
|||
* |
|||
* @author sun |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/screen/user") |
|||
public class ScreenUserController { |
|||
|
|||
@Autowired |
|||
private ScreenUserService screenUserService; |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 热心市民积分排行列表 |
|||
* @author sun |
|||
*/ |
|||
@PostMapping("userpointrank") |
|||
public Result<List<UserPointRankListResultDTO>> userPointRank(@RequestBody UserPointRankFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, UserPointRankFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<UserPointRankListResultDTO>>().ok(screenUserService.userPointRank(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 党员(指标得分)排行 |
|||
* @author sun |
|||
*/ |
|||
@PostMapping("partindexscroerank") |
|||
public Result<List<PartIndexScroeRankResultDTO>> partIndexScroeRank(@RequestBody PartIndexScroeRankFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO, PartIndexScroeRankFormDTO.AddUserInternalGroup.class); |
|||
return new Result<List<PartIndexScroeRankResultDTO>>().ok(screenUserService.partIndexScroeRank(formDTO)); |
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,43 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.evaluationindex.screenan; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.result.ProjectProfileResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 安宁-社区-项目概况(数量、颜色) |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-10-09 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenAnCommunityProjectProfileDao { |
|||
/** |
|||
* 项目 |
|||
* |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.ProjectProfileResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 17:17 |
|||
*/ |
|||
List<ProjectProfileResultDTO> selectProjectProfile(@Param("customerId") String customerId); |
|||
} |
@ -0,0 +1,69 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.evaluationindex.screenan; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernRankResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernTrendDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 安宁-基层治理-各类数 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-10-09 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenAnGrassRootsGovernMonthlyDao { |
|||
/** |
|||
* 基层治理-总数 |
|||
* |
|||
* @param agencyId |
|||
* @param monthId |
|||
* @return com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 16:48 |
|||
*/ |
|||
GrassRootsGovernResultDTO selectGrassRootsGovern(@Param("agencyId") String agencyId, @Param("monthId") String monthId); |
|||
|
|||
/** |
|||
* 基层治理-指标月度趋势 |
|||
* |
|||
* @param agencyId |
|||
* @param yearId |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernTrendDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 16:49 |
|||
*/ |
|||
List<GrassRootsGovernTrendDTO> selectGrassRootsGovernTrend(@Param("agencyId") String agencyId, @Param("yearId") String yearId); |
|||
|
|||
/** |
|||
* 基层治理-治理排行 |
|||
* |
|||
* @param agencyId |
|||
* @param monthId |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernRankResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 16:49 |
|||
*/ |
|||
List<GrassRootsGovernRankResultDTO> selectGrassRootsGovernRank(@Param("agencyId") String agencyId, @Param("monthId") String monthId); |
|||
|
|||
} |
@ -0,0 +1,70 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.evaluationindex.screenan; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgRankResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgTrendDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 安宁-基层组织(党群数|议题数|项目数)-按月 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-10-09 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenAnGrassRootsOrgMonthlyDao { |
|||
|
|||
/** |
|||
* 基层组织-党群数、议题数、项目数 |
|||
* |
|||
* @param agencyId |
|||
* @param monthId |
|||
* @return com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 16:25 |
|||
*/ |
|||
GrassRootsOrgResultDTO selectGrassRootsOrg(@Param("agencyId") String agencyId, @Param("monthId") String monthId); |
|||
|
|||
/** |
|||
* 基层组织-指标月度趋势 |
|||
* |
|||
* @param agencyId |
|||
* @param yearId |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgTrendDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 16:32 |
|||
*/ |
|||
List<GrassRootsOrgTrendDTO> selectGrassRootsOrgTrend(@Param("agencyId") String agencyId, @Param("yearId") String yearId); |
|||
|
|||
/** |
|||
* 基层组织-组织排行榜单 |
|||
* |
|||
* @param agencyId |
|||
* @param monthId |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgRankResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 16:36 |
|||
*/ |
|||
List<GrassRootsOrgRankResultDTO> selectGrassRootsOrgRank(@Param("agencyId") String agencyId, @Param("monthId") String monthId); |
|||
|
|||
} |
@ -0,0 +1,45 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.evaluationindex.screenan; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.result.PmRankResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 安宁-基层党员-排行榜单 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-10-09 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenAnGrassRootsPmRankDao { |
|||
/** |
|||
* 基层党员-党员排行榜单 |
|||
* |
|||
* @param agencyId |
|||
* @param topNum |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.PmRankResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 15:43 |
|||
*/ |
|||
List<PmRankResultDTO> selectPmRank(@Param("agencyId") String agencyId, @Param("topNum") Integer topNum); |
|||
|
|||
} |
@ -0,0 +1,59 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.evaluationindex.screenan; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.form.AnScreenFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.PmTotalResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.PmTotalTrendDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 安宁-基层党员-各类总数 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-10-09 |
|||
*/ |
|||
@Mapper |
|||
public interface ScreenAnGrassRootsPmTotalMonthlyDao { |
|||
/** |
|||
* 基层党员-各类总数 |
|||
* |
|||
* @param agencyId |
|||
* @param monthId |
|||
* @return com.epmet.evaluationindex.screen.dto.result.PmTotalResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 15:14 |
|||
*/ |
|||
PmTotalResultDTO selectPmTotal(@Param("agencyId") String agencyId, @Param("monthId") String monthId); |
|||
|
|||
/** |
|||
* 基层党员-指标月度趋势 |
|||
* |
|||
* @param agencyId |
|||
* @param yearId |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.PmTotalTrendDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 15:12 |
|||
*/ |
|||
List<PmTotalTrendDTO> selectPmTotalTrend(@Param("agencyId") String agencyId, @Param("yearId") String yearId); |
|||
|
|||
|
|||
} |
@ -0,0 +1,60 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.fact; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.form.AblityIndexFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.MonthScoreListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.ScoreListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.LinkedList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 区/街道相关分数表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-02 |
|||
*/ |
|||
@Mapper |
|||
public interface FactIndexAgencyScoreDao { |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 分别查询区县、乡镇街道过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 |
|||
* @author sun |
|||
*/ |
|||
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectAblityIndex(AblityIndexFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 查询当前组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 |
|||
* @author sun |
|||
*/ |
|||
List<ScoreListResultDTO> selectScoreList(ScoreListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 分别查询区县、乡镇街道过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 |
|||
* @author sun |
|||
*/ |
|||
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectMonthScoreList(MonthScoreListFormDTO formDTO); |
|||
} |
@ -0,0 +1,51 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.fact; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.form.AblityListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.MonthAblityListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.AblityListResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.MonthAblityListResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.LinkedList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 区/街道相关分数表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-02 |
|||
*/ |
|||
@Mapper |
|||
public interface FactIndexAgencySubScoreDao { |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 查询区县级、乡镇街道级组织某月份某项能力对应的各项指标 |
|||
* @author sun |
|||
*/ |
|||
List<AblityListResultDTO> selectAblityList(AblityListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 查询区县级、乡镇街道级组织某项能力对应的一项指标过去12个月份数据 |
|||
* @author sun |
|||
*/ |
|||
LinkedList<MonthAblityListResultDTO> selectMonthAblityList(MonthAblityListFormDTO formDTO); |
|||
} |
@ -0,0 +1,60 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.fact; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.form.AblityIndexFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.MonthScoreListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.ScoreListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.LinkedList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 社区相关分数表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-02 |
|||
*/ |
|||
@Mapper |
|||
public interface FactIndexCommunityScoreDao { |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 分别查询社区过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 |
|||
* @author sun |
|||
*/ |
|||
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectCommunityAblityIndex(AblityIndexFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 查询社区级组织某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 |
|||
* @author sun |
|||
*/ |
|||
List<ScoreListResultDTO> selectCommunityScoreList(ScoreListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 分别查询社区过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 |
|||
* @author sun |
|||
*/ |
|||
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectCommunityMonthScoreList(MonthScoreListFormDTO formDTO); |
|||
} |
@ -0,0 +1,51 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.fact; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.form.AblityListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.MonthAblityListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.AblityListResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.MonthAblityListResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.LinkedList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 区/街道相关分数表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-02 |
|||
*/ |
|||
@Mapper |
|||
public interface FactIndexCommunitySubScoreDao { |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 查询社区级组织某一月份某项能力对应的各项指标 |
|||
* @author sun |
|||
*/ |
|||
List<AblityListResultDTO> selectCommunityAblityList(AblityListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 查询社区级组织某项能力对应的一项指标过去12个月份数据 |
|||
* @author sun |
|||
*/ |
|||
LinkedList<MonthAblityListResultDTO> selectCommunityMonthAblityList(MonthAblityListFormDTO formDTO); |
|||
} |
@ -0,0 +1,60 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.fact; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.form.AblityIndexFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.MonthScoreListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.ScoreListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.AblityIndexResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.MonthScoreListResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.ScoreListResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.LinkedList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 网格相关分值记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-02 |
|||
*/ |
|||
@Mapper |
|||
public interface FactIndexGridScoreDao { |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 分别查网格过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 |
|||
* @author sun |
|||
*/ |
|||
LinkedList<AblityIndexResultDTO.ScoreListResultDTO> selectGridAblityIndex(AblityIndexFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 分别查网格某一月份党建能力、治理能力、服务能力对应的总分、本级分、下级分 |
|||
* @author sun |
|||
*/ |
|||
List<ScoreListResultDTO> selectGridScoreList(ScoreListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 分别查网格过去12个月党建能力、治理能力、服务能力每月总分、本级得分、下级得分数据 |
|||
* @author sun |
|||
*/ |
|||
LinkedList<MonthScoreListResultDTO.ScoreListResultDTO> selectGridMonthScoreList(MonthScoreListFormDTO formDTO); |
|||
} |
@ -0,0 +1,51 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.fact; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.form.AblityListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.MonthAblityListFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.AblityListResultDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.MonthAblityListResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.LinkedList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 网格相关分值记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-02 |
|||
*/ |
|||
@Mapper |
|||
public interface FactIndexGridSubScoreDao { |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 查询网格某月份某项能力对应的各项指标 |
|||
* @author sun |
|||
*/ |
|||
List<AblityListResultDTO> selectGridAblityList(AblityListFormDTO formDTO); |
|||
|
|||
/** |
|||
* @param formDTO |
|||
* @Description 查询网格层级某项能力对应的一项指标过去12个月份数据 |
|||
* @author sun |
|||
*/ |
|||
LinkedList<MonthAblityListResultDTO> selectGridMonthAblityList(MonthAblityListFormDTO formDTO); |
|||
} |
@ -0,0 +1,49 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.datareport.dao.fact; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.result.IndexDictResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 评价指标字典 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-09-02 |
|||
*/ |
|||
@Mapper |
|||
public interface IndexDictDao { |
|||
|
|||
/** |
|||
* @param |
|||
* @Description 查询指标字典表是百分比类型的数据 |
|||
* @author sun |
|||
*/ |
|||
List<IndexDictResultDTO> selectList(); |
|||
|
|||
/** |
|||
* @param |
|||
* @Description 根据indexCode查询指标字典表具体数据 |
|||
* @author sun |
|||
*/ |
|||
IndexDictResultDTO selectIndexDict(@Param("indexCode") String indexCode); |
|||
} |
@ -0,0 +1,115 @@ |
|||
package com.epmet.datareport.service.evaluationindex.screen; |
|||
|
|||
import com.epmet.evaluationindex.screen.dto.form.AnScreenFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.AnScreenRankFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.form.AnScreenTrendFormDTO; |
|||
import com.epmet.evaluationindex.screen.dto.result.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/10/9 9:34 |
|||
*/ |
|||
public interface AnScreenService { |
|||
/** |
|||
* 基层党员-各类总数 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.PmTotalResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 13:55 |
|||
*/ |
|||
PmTotalResultDTO pmTotal(AnScreenFormDTO formDTO); |
|||
|
|||
/** |
|||
* 基层党员-指标月度趋势 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.PmTotalTrendResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 13:57 |
|||
*/ |
|||
PmTotalTrendResultDTO pmTotalTrend(AnScreenTrendFormDTO formDTO); |
|||
|
|||
/** |
|||
* 基层党员-党员排行榜单 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.PmRankResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 13:59 |
|||
*/ |
|||
List<PmRankResultDTO> pmRank(AnScreenRankFormDTO formDTO); |
|||
|
|||
/** |
|||
* 基层组织-党群数、议题数、项目数 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:01 |
|||
*/ |
|||
GrassRootsOrgResultDTO grassRootsOrg(AnScreenFormDTO formDTO); |
|||
|
|||
/** |
|||
* 基层组织-指标月度趋势 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgTrendResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:03 |
|||
*/ |
|||
GrassRootsOrgTrendResultDTO grassRootsOrgTrend(AnScreenTrendFormDTO formDTO); |
|||
|
|||
/** |
|||
* 基层组织-组织排行榜单 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsOrgRankResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:06 |
|||
*/ |
|||
List<GrassRootsOrgRankResultDTO> grassRootsOrgRank(AnScreenFormDTO formDTO); |
|||
|
|||
/** |
|||
* 基层治理-总数 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:10 |
|||
*/ |
|||
GrassRootsGovernResultDTO grassRootsGovern(AnScreenFormDTO formDTO); |
|||
|
|||
/** |
|||
* 基层治理-指标月度趋势 |
|||
* |
|||
* @param formDTO |
|||
* @return com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernTrendResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:11 |
|||
*/ |
|||
GrassRootsGovernTrendResultDTO grassRootsGovernTrend(AnScreenTrendFormDTO formDTO); |
|||
|
|||
/** |
|||
* 基层治理-治理排行 |
|||
* |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.GrassRootsGovernRankResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:13 |
|||
*/ |
|||
List<GrassRootsGovernRankResultDTO> grassRootsGovernRank(AnScreenFormDTO formDTO); |
|||
|
|||
/** |
|||
* 项目 |
|||
* |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.evaluationindex.screen.dto.result.ProjectProfileResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/10/9 14:16 |
|||
*/ |
|||
List<ProjectProfileResultDTO> projectProfile(String customerId); |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue