Commit 7c5e4eff by hulei

init

parents
HELP.md
target/
test_sentinel/**
wlslogs/**
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
workroot/log
workroot/DUMP
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>isc-funds</artifactId>
<groupId>com.brilliance.isc</groupId>
<version>3.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>isc-funds-boot</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-funds-business</artifactId>
</dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<skipTests>true</skipTests> <!--默认关掉单元测试 -->
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4.5</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>true</executable>
<includeSystemScope>true</includeSystemScope>
<mainClass>com.brilliance.isc.App</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.brilliance.isc;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.util.StopWatch;
import org.springframework.web.WebApplicationInitializer;
import java.io.IOException;
import java.net.URL;
import java.util.Map;
import java.util.Objects;
@ComponentScan(basePackages = {"com.brilliance.isc","com.brilliance.mda"})
//扫描mybatisMapper接口类,注意:包需细化到尽可能小的范围
@MapperScan(basePackages = {"com.brilliance.isc.**.mapper","com.brilliance.isc.core.mda.dao"})
@SpringBootApplication
@EnableFeignClients
@ServletComponentScan(basePackages = {"com.brilliance.isc"})
@EnableHystrix
@EnableDiscoveryClient
public class App extends SpringBootServletInitializer implements WebApplicationInitializer {
private static Logger logger = LoggerFactory.getLogger(App.class);
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(App.class);
}
public static void main( String[] args )throws IOException,
ClassNotFoundException{
StopWatch watch = new StopWatch();
watch.start();
init();
ConfigurableApplicationContext context = SpringApplication.run(App.class, args);
//...
context.registerShutdownHook();
watch.stop();
logger.info("----->>>>>App startup takes " + watch.getTotalTimeMillis() + " ms.<<<<<-----");
}
private static void init() {
//应用必需
setPodName();
setLog4j2Path();
}
//用于指定云环境生成带POD名的日志文件
private static void setPodName() {
Map<String, String> map = System.getenv();
if(null == map.get("SSTF_DIR")) {
System.setProperty("SSTF_DIR", "/sstf");
}
if (null != map.get("MY_POD_NAME")) {
System.setProperty("MY_POD_NAME", map.get("MY_POD_NAME"));
} else {
System.setProperty("MY_POD_NAME", "default");
System.setProperty("MY_POD_IP", "127.0.0.1");
logger.error("请在环境变量或jvm启动参数上配置参数MY_POD_NAME,用于指定云环境生成带POD名的日志文件");
}
}
//设置log4j2.xml路径
private static void setLog4j2Path() {
URL url = App.class.getResource("");
String protocol = url.getProtocol();
if("file".equals(protocol)){
System.setProperty("logging.config","classpath:log4j2.xml");
}
}
//加解密工具类
private static void encryptionAndDecryption() {
if(isStartupFromJar()) {
return ;
}
//String encryptPwd = JasyptUtils.encryptPwd(secretKey, "abc");
String encryptPwd = "EbfYkitulv73I2p0mXI50JMXoaxZTKJ7";
logger.error("加密后-->" + encryptPwd);
//String decyptPwd = JasyptUtils.decyptPwd(secretKey, "WQMRNxQay4JSTkYMSm86FA==");
String decyptPwd = "WQMRNxQay4JSTkYMSm86FA";
logger.error("解密后-->" + decyptPwd);
//使用时需要加ENC()
//加密生成的密文每次不相同, 都可以正常解密, 放心使用
//启动参数或环境变量使用方式 java -jar *.jar --key='ENC(s9i3k93kj3j2ksud76eh342)'
}
private static <T> boolean isStartupFromJar() {
String protocol = App.class.getResource("").getProtocol();
if (Objects.equals(protocol, "jar")) {
return true;
} else if (Objects.equals(protocol, "file")) {
return false;
}
return true;
}
}
package com.brilliance.isc.encry;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import org.jasypt.encryption.StringEncryptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/*
对密码进行加密和解密类
*/
@Component
@Path("/encrypt")
public class EncryptTest{
@Autowired
public StringEncryptor stringEncryptor;
@GET
@Path("/test")
public void test(){
//加密
// System.out.println(stringEncryptor.encrypt("48@01"));
// //解密
// System.out.println(stringEncryptor.decrypt("uVvi6YLLfQeD4h0glpAt8+4yRKv66EM5"));
}
}
package com.brilliance.isc.event;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeansException;
import org.springframework.cloud.client.discovery.event.InstanceRegisteredEvent;
import org.springframework.cloud.loadbalancer.support.LoadBalancerClientFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.event.EventListener;
import org.springframework.core.env.Environment;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Component;
import java.lang.reflect.Proxy;
import java.util.Arrays;
import java.util.Objects;
/**
* @author 766193
* 2023/11/24 14:39
*/
@Component
public class FeignIndexEarlyCreator implements ApplicationContextAware, EnvironmentAware {
private final LoadBalancerClientFactory factory;
private ApplicationContext context;
private Environment environment;
public FeignIndexEarlyCreator(LoadBalancerClientFactory factory) {
this.factory = factory;
}
@EventListener(InstanceRegisteredEvent.class)
public void onInstanceRegisteredEvent() {
context.getBeansWithAnnotation(FeignClient.class).values().stream()
.map(Object::getClass)
.filter(Proxy::isProxyClass)
.flatMap(it -> Arrays.stream(it.getInterfaces()))
.map(it -> it.getAnnotation(FeignClient.class))
.filter(Objects::nonNull)
.map(it -> StringUtils.defaultIfEmpty(it.name(), it.value()))
.map(it -> environment.resolvePlaceholders(it))
.forEach(factory::getInstance);
}
@Override
public void setApplicationContext(@NonNull ApplicationContext context) throws BeansException {
this.context = context;
}
@Override
public void setEnvironment(@NonNull Environment environment) {
this.environment = environment;
}
}
package com.brilliance.isc.health;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 用于Consul的健康检查类, 不可删除; 容器云平台的探针也配置这个url
*
*/
@RefreshScope
@RestController
public class HealthController {
@Value("${health.flag:true}")
private String flag;
@GetMapping("/isc/health")
public String healthInfo() {
if ("true".equalsIgnoreCase(flag)) {
return "UP";
} else {
return "DOWN";
}
}
}
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package com.brilliance.isc.support.web;
import com.brilliance.isc.common.filter.ISCRequestPreFilter;
import org.springframework.stereotype.Component;
import javax.annotation.Priority;
import javax.ws.rs.container.PreMatching;
import javax.ws.rs.ext.Provider;
@Component
@Provider
@Priority(100)
@PreMatching
public class AuthInterceptorReqFilter extends ISCRequestPreFilter {
}
package com.brilliance.isc.support.web;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.Priority;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.core.Context;
import javax.ws.rs.ext.Provider;
import java.io.IOException;
@Component
@Provider
@Priority(100)
public class AuthInterceptorRespFilter implements ContainerRequestFilter {
private static final Logger logger = LoggerFactory.getLogger(AuthInterceptorRespFilter.class);
@Context
HttpServletRequest request;
public AuthInterceptorRespFilter() {
}
public void filter(ContainerRequestContext requestContext) throws IOException {
logger.debug("AuthInterceptorRespFilter");
}
}
package com.ec.resteasy.providers.exceptionmapper;
import com.brilliance.isc.exception.RestBizException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
import java.io.UnsupportedEncodingException;
import java.util.Base64;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* RESTEasy全局异常封装类,返回json格式异常信息;
* 服务器端异常默认500
*
*/
@Provider
@Component
public class RestExceptionMapper implements ExceptionMapper<Exception> {
private Logger logger = LoggerFactory.getLogger(this.getClass());
private static final int NOT_ACCEPTABLE_CODE = 406;
private static final int NOT_ALLOWED_CODE = 405;
private static final int NOT_FOUND_CODE = 404;
private static final int NOT_AUTHORIZED_CODE = 401;
private static final int BAD_REQUEST_CODE = 400;
private static final int SERVER_ERROR_CODE = 500;
private static final int BUFFER_SIZE = 1024;
private static final String EXCEPTION_CALLBACK_SERIVCE_ID = "restExceptionCallbackSerivce";
private int responseStatus = SERVER_ERROR_CODE;
private String responseMessage = null;
@Context
HttpServletRequest request;
@Context
HttpServletResponse response;
boolean first = true;
public RestExceptionMapper(){
logger.info("--RestExceptionMapper()--");
}
//原构造方法加载改为第一次发生异常是初始化 by yuyong 20220218
public void init() {
if (first) {
// Configuration configuration = ConfigurationManager.getInstance().getConfiguration("ec");
// String status = configuration.getValue("http.response.error.status");
// if (StringUtils.isNotBlank(status)) {
// try {
// responseStatus = Integer.valueOf(status);
// } catch (NumberFormatException e) {
// logger.error(e);
// }
// }
// responseMessage = configuration.getValue("http.response.error.message");
// if (StringUtils.isBlank(responseMessage)) {
// responseMessage = "访问出错,请联系管理员!";
// }
first = false;
responseStatus = 200;
responseMessage = "访问出错,请联系管理员!";
}
}
/**
* 将异常信息封装为JSON格式
*/
@Override
public Response toResponse(Exception e) {
init();
logger.error("发生业务异常{}",e);
if (e instanceof BadRequestException) { // 400
return Response.status(BAD_REQUEST_CODE).type(MediaType.APPLICATION_JSON).build();
} else if (e instanceof NotAuthorizedException) { // 401
return Response.status(NOT_AUTHORIZED_CODE).type(MediaType.APPLICATION_JSON).build();
} else if (e instanceof NotFoundException) { // 404
return Response.status(NOT_FOUND_CODE).type(MediaType.APPLICATION_JSON).build();
} else if (e instanceof NotAllowedException) { // 405
return Response.status(NOT_ALLOWED_CODE).type(MediaType.APPLICATION_JSON).build();
} else if (e instanceof NotAcceptableException) { // 406
return Response.status(NOT_ACCEPTABLE_CODE).type(MediaType.APPLICATION_JSON).build();
}
// else if (e instanceof DefaultOptionsMethodException){//跨域请求时,需要允许options请求
// return ((DefaultOptionsMethodException) e).getResponse();
// }
else {
return handle(e);
}
}
/**
* 提供系统异常处理扩展接口 add by yxch
* @param e
* @return
*/
public Response handle(Exception e){
// Map<String, ISystemExceptionHandler> systemExceptionHandlerMap = SpringWebApp.appContext.getBeansOfType(ISystemExceptionHandler.class);
// if(!ObjectUtils.isEmpty(systemExceptionHandlerMap)){
// try {
// for (Entry<String, ISystemExceptionHandler> entry : systemExceptionHandlerMap.entrySet()) {
// ISystemExceptionHandler systemExceptionHandler = entry.getValue();
// if(logger.isDebugEnabled()){
// logger.debug("调用系统级异常处理类:【"+systemExceptionHandler+"】");
// }
// return (Response)systemExceptionHandler.handle(e);
// }
// } catch (Exception ee) {
// logger.error("调用系统级异常处理类异常",ee);
// if(logger.isDebugEnabled()){
// logger.debug("进行默认系统级异常处理");
// }
// return coreSystemExceptionHandler(ee);
// }
// }
return coreSystemExceptionHandler(e);
}
public Response coreSystemExceptionHandler(Exception e){
//新增异常处理接口,返回自定义异常信息 by yuyong 20220411
// IRestExceptionCallbackSerivce callbackService =
// (IRestExceptionCallbackSerivce)SpringWebApp.instance.getBean(EXCEPTION_CALLBACK_SERIVCE_ID);
// if (callbackService != null) {
// return callbackService.handlerException(e);
// }
//-----------end
if(checkEdspFlag()) {
return handlerEdspHeader(buildErrorMsg(e));
}
return Response.status(responseStatus).entity(buildErrorMsg(e)).header("nonEncrypt4Response", "true").type(MediaType.APPLICATION_JSON).build();
}
//添加了响应头 errorcode,errorMsg
public Response handlerEdspHeader(RestErrorMsg errmsg) {
String edspbase64="";
try {
edspbase64 = Base64.getEncoder().encodeToString(errmsg.getErrorMsg().toString().getBytes("utf-8"));
} catch (UnsupportedEncodingException e1) {
logger.error("base64加密异常!",e1);
}
if(edspbase64.length()>BUFFER_SIZE){
edspbase64 = "";
}
return Response.status(responseStatus).entity(errmsg).header("nonEncrypt4Response", "true")
.header("errorcode", errmsg.getErrorCode()).header("errorMsg",edspbase64)
.type(MediaType.APPLICATION_JSON).build();
}
public boolean checkEdspFlag() {
// Configuration configuration = ConfigurationManager.getInstance().getConfiguration("edsp");
// boolean edsp = configuration != null && Boolean.valueOf(configuration.getValue("edspFlag"));
// return edsp;
return false;
}
/**
* 拼返回的JSON串并记录日志
*
* @param e
* @return
*/
private RestErrorMsg buildErrorMsg(Exception e) {
String errorCode = null;
String errorMsg = null;
if (e instanceof RestBizException) {
errorCode = ((RestBizException) e).getCode();
errorMsg = ((RestBizException) e).getMessage();
if (errorMsg == null) {
logger.error("系统处理异常!", e);
errorMsg = responseMessage;
}
}
else {
// 未预期的异常打印日志
logger.error("系统处理异常!", e);
//尝试返回更明确的信息 by yuyong 20180821
errorCode = "ERR9999";
errorMsg = e.getMessage();
if (errorMsg == null && e.getCause() != null) {
errorMsg = e.getCause().getMessage();
}
if (errorMsg == null) {
errorMsg = responseMessage;
}
}
String traceid=response.getHeader("trace_id");
logger.info("traceid is{}",traceid);
errorMsg= String.format("%s|追踪流水号:[%s]",errorMsg,traceid);
// errorMsg = handlerMessage(errorMsg);
return new RestErrorMsg(errorCode, errorMsg);
}
private String handlerMessage(String errorMsg) {
String regex = "([a-z]+\\.){2,}";
Pattern p = Pattern.compile(regex);
Matcher m = p.matcher(errorMsg);
boolean isMatch = m.find();
if (isMatch) {
//qc114080 20201125
int start = errorMsg.indexOf("RestBizException:");
if (start != -1) {
errorMsg = errorMsg.substring(start + 17);
int end = errorMsg.indexOf("[");
if (end != -1) {
errorMsg = errorMsg.substring(0, end);
}
}else{
errorMsg = responseMessage;
}
}
//主要用于url异常时,不展示脚本标签,可能后续还需要添加其他的 by yuyong 20200513
errorMsg = errorMsg.replaceAll("script", "");
// 异常信息去掉ip显示 by jfy 20220609
int index = errorMsg.indexOf("http://");
if(index != -1){
String errMsg = errorMsg;
errMsg = errMsg.substring(index+7,errorMsg.length());
String[] split = errMsg.split("/");
if(split != null && split.length > 1){
errMsg = "http://" + split[0];
}
errorMsg = errorMsg.replaceAll(errMsg, "");
}
return errorMsg;
}
private class RestErrorMsg {
private String errorCode;
private String errorMsg;
public RestErrorMsg(String errorCode, String errorMsg) {
this.errorCode = errorCode;
this.errorMsg = errorMsg;
}
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
public String getErrorMsg() {
return errorMsg;
}
public void setErrorMsg(String errorMsg) {
this.errorMsg = errorMsg;
}
}
}
server.servlet.context-path=/funds
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false
#-------login timeout (minute)
session=60
http.response.error.status=200
#-------3rd
spring.resources.static-locations=classpath:static/,file:static/
spring.main.allow-bean-definition-overriding=true
spring.application.config.format=json
logging.config=classpath:WEB-INF/log/log4j2.xml
swagger.service.enabled=false
#-------feign
feign.okhttp.enabled=true
feign.httpclient.enabled=false
feign.client.config.default.loggerLevel=FULL
#----------------------------------------
server:
port: 28090
---
database_type: oracle
spring:
application:
name: isc-funds
datasource:
driver-class-name: oracle.jdbc.OracleDriver
url: jdbc:oracle:thin:@127.0.0.1:1521:XE
username: ISCSL
password: ISCSL
jackson:
#实体类转json时字段为null不参与序列化
default-property-inclusion: NON_EMPTY
redis:
host: 127.0.0.1
port: 16378
password: "ESFEdlc45^"
database: 0 #设置数据库数量默认为0
jedis:
pool:
max-active: 1024 #连接池最大数据库连接数,0表示无限制
max-wait: -1 #最大建立连接等待时间
min-idle: 0 # 最小空闲数
max-idle: 1000 #最大空闲数
timeout: 1000 #客户端超时时间默认是2000,单位是毫秒
redisson:
config:
transportMode: "NIO"
lettuce:
pool:
max-idle: 100
min-idle: 0
max-active: 100
max-wait: 1000
session:
store-type: redis
---
jasypt:
encryptor:
password: EbfYkitulv73I2p0mXI50JMXoaxZTKJ7
algorithm: PBEWithMD5AndDES
---
#区分系统的唯一标识,建议使用系统英文缩写
system.name: sstf
envConfig:
rootPath: D:/rootPath
dataPath: D:/rootPath/sstf/data
zfqzRootPath: D:/rootPath/sstf/data/ips/Be_Dea_QZ/cfg/mnbw/data/rcvmsg/iss
fileLocalFlag: false
cache:
#缓存类型(guava/redis)
type: redis
#缓存失效时间(秒)
expireAfterAccess: 3600
#序列化方式
serializer: kryo
env:
mapperPackage: com.brilliance.isc.core.mda.dao
global:
ignoreUrls:
- //health/info
#自增长序列生成配置
counter:
name: mysqlSequence
start: 1500
setp: 1
logging:
config: 'classpath:log4j2.xml'
mybatis-plus:
mapperLocations: classpath*:mapper/**/*.xml
type-handlers-package: com.brilliance.mda.support.mybatis.typehandler
#mybatis数据库字段内容为空时,返回该字段
configuration:
logImpl: org.apache.ibatis.logging.stdout.StdOutImpl
call-setters-on-nulls: true
return-instance-for-empty-row: true
database-id: oracle
# 调试新增 hulei
eureka:
instance:
#hostname: eurekaServer
# true,将IP注册到eurekaServer上
prefer-ip-address: true
# eurekaClient发送给server心跳的频率
lease-renewal-interval-in-seconds: 10
# 等待下一次心跳的超时时间。如没收到,移除该实例。
lease-expiration-duration-in-seconds: 30
client:
# 注册到eurekaServer的开关
enabled: true
register-with-eureka: true
fetchRegistry: true
serviceUrl:
defaultZone: http://127.0.0.1:18761/eureka
feign:
client:
config:
default:
loggerLevel: FULL
connectTimeout: 10000
readTimeout: 600000
okhttp:
enabled: true
httpclient:
enabled: false
hystrix:
enabled: true
circuitbreaker:
enabled: true # 上面无效 使用下面 服务降级
sentinel:
enabled: true # 上面无效 使用下面 服务降级
hystrix:
command:
default:
execution:
timeout:
enabled: true
isolation:
thread:
timeoutInMilliseconds: 5000
pagehelper:
helperDialect: ORACLE
reasonable: true
supportMethodsArguments: true
params:
count: countSql
rowBoundsWithCount: true
pageSizeZero: true
sstf:
object:
storekey: isc.objectstore.storemodule
localkey: isc.objectstore.localmodule
bucketName: isc-obs-dd
accessKey: YUEDYIZZASXITMYUEGVP
secretKey: hhEwrCQFbs9fi9h7h0RARD9XLOVMcfYepUtFl3IM
esb:
name: ISC-SUBNOA-MS-remit
url: http://127.0.0.1:8090/webapi
url2: http://192.168.0.110:8090/webapi
# 面函服务工程文件扫描路径
faceLetter:
filePath: dsp\\src\\main\\resources\\file\\ # 下载文件路径 src/main/resources/file/
templatesPath: dsp\\src\\main\\resources\\templates\\ # 模板文件路径
camel:
springboot:
main-run-controller: true
\ No newline at end of file
<==========================================================>
\/\/\/\/spring boot${spring-boot.formatted-version}\/\/\/\/
<==========================================================>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="OFF">
<Properties>
<!--应用名称-->
<Property name="APP_NAME" value="${sys:appName:-isc-funds}"/>
<!--POD名称-->
<Property name="POD_NAME" value="${sys:MY_POD_NAME:-default}"/>
<!-- 日志级别 -->
<Property name="LOG_LEVEL" value="${spring:envconfig.log4j2.LOG_LEVEL:-INFO}"/>
<!-- 日志目录 -->
<Property name="LOG_DIR" value="${spring:envconfig.log4j2.LOG_PATH:-./logs}"/>
</Properties>
<Appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout
pattern="|%d{yyyy-MM-dd HH:mm:ss,SSS}|+|%X{X-B3-TraceId},%X{X-B3-SpanId}|+|${APP_NAME}|+|%p|+|%pid{1}-%t-%T|+|%c{1.}:%L|+|%M|+|%msg|%n"/>
</Console>
<RollingFile name="errorlogappender"
fileName="${LOG_DIR}/${APP_NAME}/${POD_NAME}/${APP_NAME}-errors.log"
bufferedIO="true" bufferSize="8192"
filePattern="${LOG_DIR}/$${date:yyyy-MM-dd}/${APP_NAME}/${POD_NAME}/${APP_NAME}-errors-%d{yyyy-MM-dd-HH}-%i.log">
<ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout
pattern="|%d{yyyy-MM-dd HH:mm:ss,SSS}|+|%X{X-B3-TraceId},%X{X-B3-SpanId}|+|${APP_NAME}|+|%p|+|%pid{1}-%t-%T|+|%c{1.}:%L|+|%M|+|%msg|%n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="24"/>
<SizeBasedTriggeringPolicy size="200MB"/>
</Policies>
<DefaultRolloverStrategy max="100"/>
</RollingFile>
<RollingFile name="sysmodulelog"
fileName="${LOG_DIR}/${APP_NAME}/${POD_NAME}/${APP_NAME}.log"
bufferedIO="true" bufferSize="8192"
filePattern="${LOG_DIR}/$${date:yyyy-MM-dd}/${APP_NAME}/${POD_NAME}/${APP_NAME}-app-%d{yyyy-MM-dd-HH}-%i.log">
<PatternLayout
pattern="|%d{yyyy-MM-dd HH:mm:ss,SSS}|+|%X{X-B3-TraceId},%X{X-B3-SpanId}|+|${APP_NAME}|+|%p|+|%pid{1}-%t-%T|+|%c{1.}:%L|+|%M|+|%msg|%n"/>
<Policies>
<TimeBasedTriggeringPolicy interval="24"/>
<SizeBasedTriggeringPolicy size="200MB"/>
</Policies>
<DefaultRolloverStrategy max="100"/>
</RollingFile>
</Appenders>
<Loggers>
<Logger name="org.apache.logging.log4j" level="TRACE" additivity="false">
<AppenderRef ref="console"/>
<AppenderRef ref="sysmodulelog"/>
<AppenderRef ref="errorlogappender"/>
</Logger>
<Logger name="com.brilliance.isc" level="debug" additivity="false">
<AppenderRef ref="console"/>
<AppenderRef ref="sysmodulelog"/>
<AppenderRef ref="errorlogappender"/>
</Logger>
<Root level="${LOG_LEVEL}">
<AppenderRef ref="console"/>
<AppenderRef ref="sysmodulelog"/>
<AppenderRef ref="errorlogappender"/>
</Root>
</Loggers>
</Configuration>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>isc-funds</artifactId>
<groupId>com.brilliance.isc</groupId>
<version>3.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>isc-funds-business</artifactId>
<dependencies>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-funds-entity</artifactId>
</dependency>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-obj2mt</artifactId>
</dependency>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-service-bopset</artifactId>
</dependency>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-doc</artifactId>
</dependency>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-service-limmod</artifactId>
</dependency>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-service-trnmod</artifactId>
</dependency>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-service-setmod</artifactId>
</dependency>
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.jboss.resteasy</groupId>-->
<!-- <artifactId>resteasy-jaxrs</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.jboss.resteasy</groupId>-->
<!-- <artifactId>resteasy-jackson2-provider</artifactId>-->
<!-- </dependency>-->
</dependencies>
</project>
\ No newline at end of file
package com.brilliance.common.controller;
import com.brilliance.common.service.CpdBopctyService;
import com.brilliance.isc.bo.Bopcty;
import com.brilliance.isc.vo.ResponseSet;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import java.util.List;
@Slf4j
@Component
@Consumes("application/json")
@Produces("application/json")
@Path("/bopcty")
public class CpdBopctyController {
@Autowired
private CpdBopctyService bopctyService;
@POST
@Path("/loadBopCtyList")
public ResponseSet<List<Bopcty>> payeecountcode() {
return ResponseSet.simpleSuccess(bopctyService.loadBopctyList());
}
}
package com.brilliance.common.controller;
import com.brilliance.isc.bo.model.Bopgat;
import com.brilliance.isc.common.bopset.controller.AbstractBopgatController;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.remit.CpdBizAmdInfoVo;
import com.brilliance.isc.vo.remit.CpdBizInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@Slf4j
@Component
@Consumes("application/json")
@Produces("application/json")
@Path("/bopgat")
public class CpdBopgatController extends AbstractBopgatController<CpdBizInfoVo, CpdBizAmdInfoVo> {
@POST
@Path("/cpd/bopGatMapping")
public ResponseSet<Bopgat> bopGatMapping(@RequestBody Bopgat<CpdBizInfoVo, CpdBizAmdInfoVo> bopgat) {
return super.mappingBopgatData(bopgat);
}
@POST
@Path("/cpd/bopGatSetAcct")
public ResponseSet<Bopgat> bopGatSetAcct(@RequestBody Bopgat<CpdBizInfoVo, CpdBizAmdInfoVo> bopgat) {
return super.bopGatSetAcct(bopgat);
}
}
package com.brilliance.common.controller;
import com.brilliance.isc.bo.model.Bopgat;
import com.brilliance.isc.bo.model.Boprem;
import com.brilliance.isc.common.bopset.controller.AbstractBopgatController;
import com.brilliance.isc.common.bopset.controller.AbstractBopremController;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.remit.CpdBizAmdInfoVo;
import com.brilliance.isc.vo.remit.CpdBizInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@Slf4j
@Component
@Consumes("application/json")
@Produces("application/json")
@Path("/boprem")
public class CpdBopremController extends AbstractBopremController<CpdBizInfoVo, CpdBizAmdInfoVo> {
@POST
@Path("/bopRemMapping")
public ResponseSet<Boprem> bopGatMapping(@RequestBody Boprem<CpdBizInfoVo, CpdBizAmdInfoVo> boprem) {
return super.mappingBopgatData(boprem);
}
}
\ No newline at end of file
package com.brilliance.common.controller;
import com.brilliance.isc.bo.model.Cfabop;
import com.brilliance.isc.common.bopset.controller.AbstractCfabopController;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.remit.CpdBizAmdInfoVo;
import com.brilliance.isc.vo.remit.CpdBizInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@Slf4j
@Component
@Consumes("application/json")
@Produces("application/json")
@Path("/cpd")
public class CpdCfabopController extends AbstractCfabopController<CpdBizInfoVo, CpdBizAmdInfoVo> {
/**
* 资本项目报送数据试算
* @param cfabop
* @return
*/
@POST
@Path("/calcCfabop")
public ResponseSet<Cfabop> calCfabop(@RequestBody Cfabop<CpdBizInfoVo, CpdBizAmdInfoVo> cfabop) {
return super.calCfabopData(cfabop);
}
}
package com.brilliance.common.controller;
import com.brilliance.isc.common.bop.controller.AbstractRmbController;
import com.brilliance.isc.common.rmbbop.vo.RmbbopRequest;
import com.brilliance.isc.common.rmbbop.vo.RmbbopResponse;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.remit.CpdBizAmdInfoVo;
import com.brilliance.isc.vo.remit.CpdBizInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@Slf4j
@Component
@Consumes("application/json")
@Produces("application/json")
@Path("/cpd")
public class CpdRmbController extends AbstractRmbController<CpdBizInfoVo, CpdBizAmdInfoVo> {
@POST
@Path("/calcRmbbop")
public ResponseSet<RmbbopResponse> calcRmbbop(@RequestBody RmbbopRequest<CpdBizInfoVo, CpdBizAmdInfoVo> rmbbopRequest) {
return super.calcRmbbop(rmbbopRequest);
}
}
package com.brilliance.common.controller;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.brilliance.isc.bo.Txm;
import com.brilliance.isc.mda.dao.TxmMapper;
import com.brilliance.isc.vo.ResponseSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import java.util.List;
import java.util.Map;
@Component
@Consumes("application/json")
@Produces("application/json")
@Path("/txm")
public class TxmController {
@Autowired
private TxmMapper txmMapper;
@POST
@Path("/getTxmBlock")
public ResponseSet getTxmBlock(@RequestBody Map<String, Object> map) {
String extkey = map.get("extkey").toString();
String trnname = map.get("trnname").toString();
String uil = map.get("uil").toString();
if ("CPTOPN".equalsIgnoreCase(trnname)) {
extkey = extkey + "acc";
List<Txm> txms = txmMapper.selectByExtkeyAndUil(extkey, uil);
for(int i=0;i<txms.size();i++){
if(MdaUtils.compareTo(txms.get(i).getUil(),"CN")==0){
txms.get(i).setUil("Chinese");
}else{
txms.get(i).setUil("English");
}
}
return ResponseSet.simpleSuccess(txms);
} else {
// special process
extkey = specialProcessForExtkey(extkey);
List<Txm> txmList = txmMapper.selectByExtkeyAndUil(extkey,"EN");
for(int i=0;i<txmList.size();i++){
if(MdaUtils.compareTo(txmList.get(i).getUil(),"CN")==0){
txmList.get(i).setUil("Chinese");
}else{
txmList.get(i).setUil("English");
}
}
return ResponseSet.simpleSuccess(txmList);
}
}
/**
* special process for extkey<br>
* eg. :it seems that extkey must be 6 length, dftat need complement with "t"?
*
* @param extkey
* @return
*/
private String specialProcessForExtkey(String extkey) {
// draft at
if(extkey.equalsIgnoreCase("dftat.")){
extkey = "dftatt.";
}
// Details of Charges
if(extkey.equalsIgnoreCase("feetxt.")){
extkey = "charia.";
}
// Settlement Instructions for this Document Set, in Litdck Docpre界面
if (extkey.equalsIgnoreCase("setinsbr.")) {
extkey = "setins.";
}
// Settlement Instructions for this Document Set, in LETDRV Disins界面
if (extkey.equalsIgnoreCase("setinsbe.")) {
extkey = "payins.";
}
// Payment instructions to ISS/AVB, in betrcl rclp界面
if (extkey.equalsIgnoreCase("payinstxt.")) {
extkey = "payins.";
}
// brtudp.tag72add
if (extkey.equalsIgnoreCase("tag72add.")) {
extkey = "acctag.";
}
return extkey;
}
}
package com.brilliance.common.service;
import com.brilliance.isc.bo.Bopcty;
import com.brilliance.isc.mda.dao.BopctyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class CpdBopctyService {
@Autowired
private BopctyMapper bopctyMapper;
public List<Bopcty> loadBopctyList() {
return bopctyMapper.listAll();
}
public List<Bopcty> queryByCod(String cod){
return bopctyMapper.listByCod(cod);
}
}
package com.brilliance.isc.basesel.cptsel.resource;
import com.brilliance.isc.basesel.cptsel.service.FxtselService;
import com.brilliance.isc.basesel.trncod.service.TrncodService;
import com.brilliance.isc.vo.ResponseSet;
import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.funds.FxtselQueryVo;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import java.util.Map;
@RestController
@RequestMapping("/fxtsel")
public class FxtselController {
@Resource
private FxtselService fxtselService;
@Resource
private TrncodService trncodService;
/**
* 汇款页签查询
* @param cptselQueryVo
* @return
*/
@RequestMapping("/listfxd")
public ResponseSet list(@RequestBody FxtselQueryVo cptselQueryVo) {
return ResponseSet.simpleSuccess(fxtselService.list(cptselQueryVo));
}
/**
* 处理按钮查看能够进行的交易
*/
@RequestMapping("/dealWithByInr")
public ResponseSet dealWithByInr(@RequestBody TrnCodeQueryVo trnCodeQueryVo) {
return ResponseSet.simpleSuccess(trncodService.dealWithByInr(trnCodeQueryVo));
}
/**
* 详情页面初始化
*/
@RequestMapping("/selectXxdByPrimaryKey")
public ResponseSet selectXxdByPrimaryKey(Map<String,String> map){
return ResponseSet.simpleSuccess(trncodService.selectXxdByPrimaryKey(map));
}
}
package com.brilliance.isc.basesel.cptsel.service;
import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.isc.vo.funds.FxtselQueryVo;
import com.brilliance.isc.vo.remit.CptselQueryVo;
import com.github.pagehelper.PageInfo;
import java.util.List;
public interface FxtselService {
PageInfo list(FxtselQueryVo cptselQueryVo);
List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo);
}
package com.brilliance.isc.basesel.cptsel.service.impl;
import com.brilliance.isc.vo.funds.FxtselQueryVo;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.brilliance.isc.basesel.cptsel.service.FxtselService;
import com.brilliance.isc.bo.Bch;
import com.brilliance.isc.bo.Busbtn;
import com.brilliance.isc.common.api.bch.service.BchService;
import com.brilliance.isc.common.context.SettleContext;
import com.brilliance.isc.common.util.SettleExceptionUtils;
import com.brilliance.isc.mda.dao.BusbtnMapper;
import com.brilliance.isc.mda.dao.CpdMapper;
import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.TrncodVo;
import com.brilliance.isc.vo.remit.CpdWithPtsCbbResponseVo;
import com.brilliance.isc.vo.remit.CptselQueryVo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import org.mapstruct.ap.internal.util.Strings;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;
@Service
public class FxtselServiceImpl implements FxtselService {
@Resource
private BchService bchService;
@Resource
private CpdMapper cpdMapper;
@Resource
private BusbtnMapper busbtnMapper;
@Override
public PageInfo list(FxtselQueryVo fxtselQueryVo) {
// String branch = fxtselQueryVo.getBranch();
// if (Strings.isEmpty(branch)) {
// branch = SettleContext.getSessionUserVo().getOwnOrgDepartmentNumber();
// }
// Bch bch = bchService.getDirectAccBch(branch); //获取到当前登录柜员的记账机构
// if (Objects.isNull(bch) && !Objects.equals(branch, "1000")) {//非总行机构一定会获取到记账机构,如果没获取到则抛出异常
// SettleExceptionUtils.sysDump("未获取到机构信息!");
// }
// if(!Objects.isNull(bch)){
// fxtselQueryVo.setBchinr(bch.getInr());
// //查询归属机构集合
// List<Bch> bchList = bchService.listAllChildSubBchByAccBch(bch.getBranch());
// if (bchList != null) {
// fxtselQueryVo.setBchLst(bchList);
// }
// }
// PageHelper.startPage(fxtselQueryVo.getPageNumber(), fxtselQueryVo.getPageSize()).setReasonable(true);
// List<CpdWithPtsCbbResponseVo> cpdList = cpdMapper.queryCpd(fxtselQueryVo);
// for (CpdWithPtsCbbResponseVo cpd:cpdList) {
// if(!MdaUtils.isEmpty(cpd.getPyeExtkey())) {
// cpd.setPyeExtkey(cpd.getPyeExtkey().split("-")[0]);
// }
// if(!MdaUtils.isEmpty(cpd.getOrcExtkey())) {
// cpd.setOrcExtkey(cpd.getOrcExtkey().split("-")[0]);
// }
// }
// return new PageInfo(cpdList);
}
@Override
public List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo) {
List<TrncodVo> result = Lists.newArrayList();
//获取模型数据
// Lidgrp lidgrp = lcToolComponent.getLidgrpByInr(inr);
List<Busbtn> busbtnList = busbtnMapper.selectByBustypAndIsShow(trnCodeQueryVo.getType());
String isAllowed = "Y";
String disResult = "";
for (int i = 0; i < busbtnList.size(); i++) {
//按钮亮灰显逻辑
// isAllowed = lcToolComponent.isLITrnAllowed(lidgrp,lgTraArray[i]);
TrncodVo trncodVo = new TrncodVo(busbtnList.get(i).getInifrm(), busbtnList.get(i).getBtnnam(), isAllowed, busbtnList.get(i).getIsMain(), disResult);
result.add(trncodVo);
}
return result;
}
}
package com.brilliance.isc.basesel.trncod.consts;
public class ErrorPrompt {
public final static String ErrSelN = "No Clean Payment selected\n";
public final static String ErrClsY = "Selected Clean Payment is closed\n";
public final static String ErrClsN = "Selected Clean Payment is not closed\n";
public final static String ErrOpnN = "Selected Clean Payment is not yet opened\n";
public final static String ErrOpnY = "Selected Clean Payment is already opened\n";
public final static String ErropnI = "Selected incoming Payment is already opened\n";
public final static String ErropnO = "Selected Outgoing Payment is already opened\n";
}
package com.brilliance.isc.basesel.trncod.service;
import com.brilliance.isc.bo.model.*;
import com.brilliance.isc.common.authority.ITrnCodService;
import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.TrncodVo;
import java.util.List;
import java.util.Map;
public interface TrncodService extends ITrnCodService {
String isCPTrnAllowed(Cpdgrp cpdgrp, String trnNam);
List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo);
Object selectXxdByPrimaryKey(Map<String, String> map);
}
package com.brilliance.isc.basesel.trncod.service.impl;
import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.brilliance.isc.basesel.trncod.consts.ErrorPrompt;
import com.brilliance.isc.basesel.trncod.service.TrncodService;
import com.brilliance.isc.bo.Busbtn;
import com.brilliance.isc.bo.Trn;
import com.brilliance.isc.bo.model.*;
import com.brilliance.isc.bo.remit.CptadvStoreBo;
import com.brilliance.isc.bo.remit.CptopnStoreBo;
import com.brilliance.isc.common.component.CpToolComponent;
import com.brilliance.isc.common.sysmod.SysmodService;
import com.brilliance.isc.mda.dao.*;
import com.brilliance.isc.vo.TrnCodeQueryVo;
import com.brilliance.isc.vo.TrncodVo;
import com.google.common.collect.Lists;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
@Service
public class TrncodServiceImpl implements TrncodService {
@Resource
private BusbtnMapper busbtnMapper;
@Resource
private TrncodService trncodService;
@Resource
private CpToolComponent cpToolComponent;
@Resource
private TrnMapper trnMapper;
@Resource
private SysmodService sysmodService;
@Override
public String isCPTrnAllowed(Cpdgrp cpdgrp, String trnNam) {
cpdgrp.reset();
trnNam = trnNam.toUpperCase();
String errMsg = "";
switch(trnNam){
case "CPTADV":
if(MdaUtils.isEmpty(cpdgrp.getRec().getInr())){
errMsg += ErrorPrompt.ErrSelN;
}else {
if(!MdaUtils.isEmpty(cpdgrp.getRec().getClsdat())){
errMsg += ErrorPrompt.ErrClsY;
}
if(MdaUtils.isEmpty(cpdgrp.getRec().getOpndat())){
errMsg += ErrorPrompt.ErrOpnN;
}
if(!MdaUtils.equals(cpdgrp.getRec().getAccmod(),"2")){
errMsg += "业务未挂账!\n";
}
}
break;
case "CPTCAN":
if(MdaUtils.isEmpty(cpdgrp.getRec().getInr())){
errMsg += ErrorPrompt.ErrSelN;
}else {
if (!MdaUtils.isEmpty(cpdgrp.getRec().getClsdat())) {
errMsg += ErrorPrompt.ErrClsY;
}
}
break;
case "CPTROP":
if(MdaUtils.isEmpty(cpdgrp.getRec().getInr())){
errMsg += ErrorPrompt.ErrSelN;
}else {
if (MdaUtils.isEmpty(cpdgrp.getRec().getClsdat())) {
errMsg += ErrorPrompt.ErrClsN;
}
}
break;
case "CPTFEE":
case "CPTFRE":
case "CPTATT":
case "JSTOPN":
if(MdaUtils.isEmpty(cpdgrp.getRec().getInr())){
errMsg += ErrorPrompt.ErrSelN;
}
break;
default:
errMsg += "";
break;
}
return errMsg;
}
@Override
public List<TrncodVo> dealWithByInr(TrnCodeQueryVo trnCodeQueryVo) {
List<TrncodVo> result = Lists.newArrayList();
//获取模型数据
Cpdgrp cpdgrp = cpToolComponent.getCpdgrpByInr(trnCodeQueryVo.getInr());
List<Busbtn> busbtnList = busbtnMapper.selectByBustypAndIsShow(trnCodeQueryVo.getType());
String disResult = "";
for (int i = 0; i < busbtnList.size(); i++) {
//按钮亮灰显逻辑
disResult = trncodService.isCPTrnAllowed(cpdgrp,busbtnList.get(i).getInifrm());
TrncodVo trncodVo = new TrncodVo(busbtnList.get(i).getInifrm(), busbtnList.get(i).getBtnnam(), MdaUtils.isEmpty(disResult) ? "Y" : "N", busbtnList.get(i).getIsMain(), disResult);
result.add(trncodVo);
}
return result;
}
@Override
public Object selectXxdByPrimaryKey(Map<String, String> map) {
String objinr = map.get("objinr");
String objtyp = map.get("objtyp");
String pntinr = map.get("pntinr");
String paytyp = map.get("paytyp");
switch(paytyp) {
case "I":
CptadvStoreBo cptadvStoreBo = new CptadvStoreBo();
cptadvStoreBo.reset();
if(objinr.length() == 16) {
Trn trnCpdI = trnMapper.selectByObjinrTrn(objtyp, objinr, "CPTADV");
if (!Objects.isNull(trnCpdI)) {
cptadvStoreBo = sysmodService.streamGetNameInSubDir(CptadvStoreBo.class, trnCpdI.getInr());
}
}
cptadvStoreBo.setCpdgrp(cpToolComponent.getCpdgrpByInr(objinr));
return cptadvStoreBo;
case "O":
CptopnStoreBo cptopnStoreBo = new CptopnStoreBo();
cptopnStoreBo.reset();
if(objinr.length() == 16) {
Trn trnCpdO = trnMapper.selectByObjinrTrn(objtyp, objinr, "CPTOPN");
if (!Objects.isNull(trnCpdO)) {
cptopnStoreBo = sysmodService.streamGetNameInSubDir(CptopnStoreBo.class, trnCpdO.getInr());
}
}
cptopnStoreBo.setCpdgrp(cpToolComponent.getCpdgrpByInr(objinr));
return cptopnStoreBo;
}
return null;
}
}
package com.brilliance.isc.common.exception;
import com.brilliance.isc.constant.ErrorCode;
import com.brilliance.isc.exception.RestBizException;
public class FundsServiceException extends RestBizException {
public FundsServiceException(String errorMsg) {
super(ErrorCode.REMIT_SERVER_ERROR, errorMsg);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>isc-funds</artifactId>
<groupId>com.brilliance.isc</groupId>
<version>3.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-funds-entity</artifactId>
<version>3.1.0</version>
<dependencies>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-core</artifactId>
</dependency>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-service</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<!-- MapStruct 在编译插件 -->
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
<!-- Lombok 在编译时插件 -->
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>0.2.0</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.brilliance.isc.vo.funds;
import com.brilliance.isc.bo.Bch;
import com.brilliance.isc.common.vo.CommonResult;
import java.math.BigDecimal;
import java.util.List;
/**
* @description:
* @author: hulei
* @create: 2024-09-25 15:10
**/
public class FxtselQueryVo extends CommonResult {
/**
* 汇款主表唯一编号
*/
private String inr;
/*
汇款业务编号
*/
private String seaownref;
/**
* 机构编号
*/
private String bchinr;
/**
* 机构编码
*/
private String branch;
/**
* 归属机构集合
*/
private List<Bch> bchLst;
/**
* 汇款开始日期
*/
private String opndatfrom;
/**
* 汇款截止日期
*/
private String opndatto;
/**
* 客户号/名称
*/
private String searef;
/**
* 汇款邮路
*/
private String route;
/**
* 汇款类型
*/
private String paytyp;
/**
* 是否闭卷
*/
private String isClosed;
/**
* 业务类型
*/
private String pnttyp;
/**
* 汇款类型
*/
private String seapaytyp;
/**
*单据类型
*/
private String seadoctyp;
/**
* 客户号
*/
private String ptyExtkey;
/**
* 当事人BIC/名称
*/
private String seapty;
/**
* 业务状态
*/
private String seasta;
/**
* //币种
*/
private String seacur;
/**
* //金额
*/
private BigDecimal seaamt;
/**
* //金额
*/
private BigDecimal seaamtfr;
/**
* //金额
*/
private BigDecimal seaamtto;
/**
* swift类型
*/
private String msgtyp;
/**
* 国家代码
*/
private String countcode;
/**
* 同名划转标志
*/
private String tsnflg;
/**
* 机构
*/
private String branchinr;
/**
* 柜员
*/
private String ownusr;
/**
* 前端渠道
*/
private String channel;
/**
* 渠道业务编号
*/
private String chnref;
/**
* 排序字段
*/
private String column;
/**
* 正序倒序
*/
private String order;
}
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-common-parent</artifactId>
<version>3.1.0</version>
<relativePath>../isc-common/isc-common-parent/pom.xml</relativePath>
</parent>
<artifactId>isc-funds</artifactId>
<packaging>pom</packaging>
<name>isc-funds</name>
<properties>
<funds.version>3.1.0</funds.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-funds-entity</artifactId>
<version>${funds.version}</version>
</dependency>
<dependency>
<groupId>com.brilliance.isc</groupId>
<artifactId>isc-funds-business</artifactId>
<version>${funds.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>isc-funds-boot</module>
<module>isc-funds-business</module>
<module>isc-funds-entity</module>
</modules>
</project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment