Browse Source

Merge remote-tracking branch 'origin/main' into main

# Conflicts:
#	irbs.frontend/src/components/index.ts
main
chengjie 9 months ago
parent
commit
eac4851dcf
  1. 8
      app.irbs/build.gradle
  2. 30
      build.gradle
  3. 9
      gradle.properties
  4. 2
      irbs.cust.rating/build.gradle
  5. 45
      irbs.cust.rating/src/main/java/irbs/cust/rating/controller/HomeController.java
  6. 23
      irbs.cust.rating/src/main/java/irbs/cust/rating/jpa/support/KeyValueWrapper.java
  7. 17
      irbs.cust.rating/src/main/java/irbs/cust/rating/service/HomeService.java
  8. 52
      irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/HomeServiceImpl.java
  9. 2
      irbs.defaultManager/build.gradle
  10. 4
      irbs.frontend/.npmrc
  11. 111
      irbs.frontend/package.json
  12. 2
      irbs.frontend/public/configure.js
  13. 1054
      irbs.frontend/src/views/IrbsHome.vue
  14. 4
      irbs.frontend/util-components-generator.cjs
  15. 2
      irbs.frontend/webpack.env.serve.cjs

8
app.irbs/build.gradle

@ -15,10 +15,10 @@ dependencies {
"io.sc:io.sc.platform.app:${platform_version}",
"io.sc:io.sc.platform.security.loginform:${platform_version}",
"io.sc:io.sc.platform.page.config:${platform_version}",
"io.sc:rwa.params:${platform_version}",
"io.sc:rwa.report:${platform_version}",
"io.sc:app.rwa.frontend:${platform_version}",
"io.sc:io.sc.platform.page.config:${rwa_version}",
"io.sc:rwa.params:${rwa_version}",
"io.sc:rwa.report:${rwa_version}",
"io.sc:app.rwa.frontend:${rwa_version}",
project(":irbs.frontend"),
project(":irbs.cust.rating"),

30
build.gradle

@ -52,7 +52,6 @@ subprojects {
exclude group: "org.apache.logging.log4j", module: "log4j-to-slf4j"
exclude group: "org.slf4j", module: "slf4j-jdk14"
exclude group: "org.slf4j", module: "slf4j-nop"
//exclude group: "com.oracle.database.jdbc", module: "ojdbc8"
}
dependencyManagement {
@ -100,15 +99,14 @@ subprojects {
compileTestJava.options.encoding ="${java_encoding}"
tasks.withType(JavaCompile) {
//options.compilerArgs += ["-Xdoclint:none", "-Xlint:none", "-nowarn"]
options.compilerArgs += ["-Xlint:deprecation","-Xlint:unchecked"]
}
/*-----------------------------------------------------------------
*
*----------------------------------------------------------------*/
group ="${platform_group}"
version ="${platform_version}"
group ="${application_group}"
version ="${application_version}"
if(file('package.json').exists()){
mkdir 'java-src/main/java';
@ -184,7 +182,6 @@ subprojects {
sources {
include '*.adoc'
}
//outputDir = file("$buildDir/resources/main/help/" + project.name)
outputDir = file("dist/help/" + project.name)
resources {
from(sourceDir) {
@ -235,8 +232,6 @@ subprojects {
doLast{
// jrebel
delete "$buildDir/resources/main/rebel.xml"
//
}
}
@ -269,6 +264,22 @@ subprojects {
*----------------------------------------------------------------*/
task jrebelIdea() {}
tasks.jrebelIdea.doLast {
if(isFrontendProject(file('.'))) {
File resourcesFile = file('java-src/main/resources')
if (resourcesFile != null && resourcesFile.exists()) {
File rebelFile = file('java-src/main/resources/rebel.xml')
rebelFile.withWriter('UTF-8') { writer ->
writer.write('<?xml version="1.0" encoding="UTF-8"?>\n');
writer.write('<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">\n');
writer.write('\t<classpath>\n');
if (file(project.name + '/java-src/main').exists()) {
writer.write('\t\t<dir name="' + project.rootProject.projectDir + '/out/production/' + project.name + '"/>\n');
}
writer.write('\t</classpath>\n');
writer.write('</application>');
}
}
}else {
File resourcesFile = file('src/main/resources')
if (resourcesFile != null && resourcesFile.exists()) {
File rebelFile = file('src/main/resources/rebel.xml')
@ -284,6 +295,7 @@ subprojects {
}
}
}
}
/*-----------------------------------------------------------------
* maven publish
@ -636,13 +648,13 @@ subprojects {
frontendNpmInstall.dependsOn(frontendUpdatePackageJson)
frontendNpmSync.dependsOn(frontendNpmInstall)
frontendNpmBuild.dependsOn(frontendNpmSync)
frontendNpmProd.dependsOn(frontendNpmInstall)
frontendNpmProd.dependsOn(frontendNpmSync)
//
// : -D
// gradle bootwar -Dfrontend=dev # pnpm build
// gradle bootwar -Dfrontend=prod # pnpm prod
// gradle bootwar -Dfrontend # ,
// gradle bootwar -Dfrontend=none # ,
def isFrontend =System.getProperty("frontend")?:"prod";
if(isFrontend=="dev"){
frontendGenerateThymeleafTemplate.dependsOn(frontendNpmBuild);

9
gradle.properties

@ -36,10 +36,15 @@ application_version=1.0.1
# platform
###########################################################
platform_group=io.sc
platform_version=8.1.37
platform_version=8.1.41
platform_plugin_version=8.1.13
platform_core_frontend_version=8.1.188
platform_core_frontend_version=8.1.217
###########################################################
# product dependencies version
###########################################################
rule_engine_version=3.10.2
rwa_version=1.0.2
###########################################################
# dependencies version

2
irbs.cust.rating/build.gradle

@ -3,7 +3,7 @@ dependencies {
"io.sc:io.sc.platform.mvc:${platform_version}",
"org.wsp:org.wsp.engine.rule.client:${rule_engine_version}",
"io.sc:io.sc.platform.flowable:${platform_version}",
"io.sc:io.sc.platform.page.config:${platform_version}",
"io.sc:io.sc.platform.page.config:${rwa_version}",
project(":irbs.defaultManager"),
)

45
irbs.cust.rating/src/main/java/irbs/cust/rating/controller/HomeController.java

@ -0,0 +1,45 @@
package irbs.cust.rating.controller;
import irbs.cust.rating.jpa.support.KeyValueWrapper;
import irbs.cust.rating.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 首页控制器
* @author likunming
*/
@RestController
@RequestMapping("/api/irbs/home")
public class HomeController {
@Autowired
private HomeService homeService;
/**
* 首页敞口分布统计
*
* @throws Exception 异常
*/
@RequestMapping(value = "ratingModelExposure", method = RequestMethod.GET)
@ResponseBody
public List<KeyValueWrapper> ratingModelExposure() throws Exception {
return homeService.getRatingModelExposureList();
}
/**
* 首页评级分布统计
*
* @throws Exception 异常
*/
@RequestMapping(value = "ratingLevelExposure", method = RequestMethod.GET)
@ResponseBody
public List<KeyValueWrapper> ratingLevelExposureList() throws Exception {
return homeService.getRatingLevelExposureList();
}
}

23
irbs.cust.rating/src/main/java/irbs/cust/rating/jpa/support/KeyValueWrapper.java

@ -0,0 +1,23 @@
package irbs.cust.rating.jpa.support;
public class KeyValueWrapper {
private String key;
private String value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

17
irbs.cust.rating/src/main/java/irbs/cust/rating/service/HomeService.java

@ -0,0 +1,17 @@
package irbs.cust.rating.service;
import irbs.cust.rating.jpa.support.KeyValueWrapper;
import java.util.List;
/**
* 客户评级流程处理服务
* @author likunming
*
*/
public interface HomeService {
public List<KeyValueWrapper> getRatingModelExposureList() throws Exception;
public List<KeyValueWrapper> getRatingLevelExposureList() throws Exception;
}

52
irbs.cust.rating/src/main/java/irbs/cust/rating/service/impl/HomeServiceImpl.java

@ -0,0 +1,52 @@
package irbs.cust.rating.service.impl;
import irbs.cust.rating.jpa.support.KeyValueWrapper;
import irbs.cust.rating.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class HomeServiceImpl implements HomeService {
@Autowired
NamedParameterJdbcTemplate namedParameterJdbcTemplate;
@Override
public List<KeyValueWrapper> getRatingModelExposureList() throws Exception {
String querySql = "select MODEL_NAME, count(*) MODEL_NUMBER from NS_COMPANY_RATING where MODEL_CODE IS NOT NULL ";
querySql += " group by MODEL_CODE, MODEL_NAME order by CAST(substr(MODEL_CODE,4) as DECIMAL) asc ";
List<KeyValueWrapper> query = namedParameterJdbcTemplate.query(querySql,
(rs, rowNum) -> {
KeyValueWrapper kv = new KeyValueWrapper();
kv.setKey(rs.getString("MODEL_NAME"));
kv.setValue(rs.getString("MODEL_NUMBER"));
return kv;
});
return query;
}
@Override
public List<KeyValueWrapper> getRatingLevelExposureList() throws Exception {
String querySql1 = "select p.FINAL_LEVEL,count(*) FINAL_NUMBER from (" +
"select distinct(cust_no) as cust_no,FINAL_LEVEL from NS_COMPANY_RATING " +
"WHERE cust_no is not null and FINAL_LEVEL IS NOT NULL AND RATING_STATUS = '010' ";
String querySql2 = "select 'D' FINAL_LEVEL, COUNT(*) FINAL_NUMBER from (" +
"select distinct(cust_no) as cust_no from P_IRS_DEFAULT_COGNIZANCE " +
"where ((VALID = '1' and DEFAULT_TYPE ='02') or (VALID <> '0' and DEFAULT_TYPE = '01')) and cust_no is not null ";
querySql1 += ") p GROUP BY p.FINAL_LEVEL";
querySql2 += ") q";
String querySql = querySql1 + " UNION ALL " + querySql2;
List<KeyValueWrapper> query = namedParameterJdbcTemplate.query(querySql,
(rs, rowNum) -> {
KeyValueWrapper kv = new KeyValueWrapper();
kv.setKey(rs.getString("FINAL_LEVEL"));
kv.setValue(rs.getString("FINAL_NUMBER"));
return kv;
});
return query;
}
}

2
irbs.defaultManager/build.gradle

@ -2,6 +2,6 @@ dependencies {
api(
"io.sc:io.sc.platform.mvc:${platform_version}",
"io.sc:io.sc.platform.flowable:${platform_version}",
"io.sc:io.sc.platform.page.config:${platform_version}",
"io.sc:io.sc.platform.page.config:${rwa_version}",
)
}

4
irbs.frontend/.npmrc

@ -1,5 +1,5 @@
# npm 仓库地址, 在 npm install 时使用
registry=http://124.222.99.204:8000/repository/npm-public/
registry=http://nexus.sc.io:8000/repository/npm-public/
# 用户邮箱
email=
@ -8,4 +8,4 @@ email=
# 登录 npm 仓库的用户认证信息, 在 npm publish 时使用, publish 的 npm registry 在 package.json 文件中 publishConfig 部分配置
# _authToken 可通过以下命令获取
# curl -X PUT -H "Content-Type:application/json" -d '{"_id":"org.couchdb.user:admin","name":"admin","password":"admin"}' http://nexus.sc.io:8000/repository/npm-releases/-/user/org.couchdb.user:admin
//124.222.99.204:8000/repository/npm-releases/:_authToken=NpmToken.193db44c-7ca5-3cb6-a990-d24b93fb0d10
//nexus.sc.io:8000/repository/npm-releases/:_authToken=NpmToken.193db44c-7ca5-3cb6-a990-d24b93fb0d10

111
irbs.frontend/package.json

@ -1,11 +1,9 @@
{
"name": "irbs.frontend",
"version": "8.1.27",
"version": "1.0.1",
"description": "",
"private": false,
"keywords": [
],
"keywords": [],
"author": "",
"license": "ISC",
"scripts": {
@ -25,82 +23,83 @@
"access": "public"
},
"devDependencies": {
"@babel/core": "7.23.7",
"@babel/preset-env": "7.23.7",
"@babel/preset-typescript": "7.23.3",
"@babel/plugin-transform-class-properties": "7.23.3",
"@babel/plugin-transform-object-rest-spread": "7.23.4",
"@quasar/app-webpack": "3.12.1",
"@quasar/cli": "2.3.0",
"@babel/core": "7.24.4",
"@babel/preset-env": "7.24.4",
"@babel/preset-typescript": "7.24.1",
"@babel/plugin-transform-class-properties": "7.24.1",
"@babel/plugin-transform-object-rest-spread": "7.24.1",
"@quasar/app-webpack": "3.12.5",
"@quasar/cli": "2.4.0",
"@types/mockjs": "1.0.10",
"@types/node": "20.10.6",
"@typescript-eslint/eslint-plugin": "6.17.0",
"@typescript-eslint/parser": "6.17.0",
"@vue/compiler-sfc": "3.4.3",
"@types/node": "20.12.7",
"@typescript-eslint/eslint-plugin": "7.7.1",
"@typescript-eslint/parser": "7.7.1",
"@vue/compiler-sfc": "3.4.24",
"@webpack-cli/serve": "2.0.5",
"autoprefixer": "10.4.16",
"autoprefixer": "10.4.19",
"babel-loader": "9.1.3",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
"copy-webpack-plugin": "12.0.2",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
"css-loader": "7.1.1",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.2",
"eslint-plugin-vue": "9.19.2",
"eslint-webpack-plugin": "4.0.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-vue": "9.25.0",
"eslint-webpack-plugin": "4.1.0",
"html-webpack-plugin": "5.6.0",
"json5": "2.2.3",
"mini-css-extract-plugin": "2.7.6",
"nodemon": "3.0.2",
"postcss": "8.4.32",
"postcss-import": "16.0.0",
"postcss-loader": "7.3.4",
"postcss-preset-env": "9.3.0",
"prettier": "3.1.1",
"sass": "1.69.7",
"sass-loader": "13.3.3",
"typescript": "5.3.3",
"mini-css-extract-plugin": "2.9.0",
"nodemon": "3.1.0",
"postcss": "8.4.38",
"postcss-import": "16.1.0",
"postcss-loader": "8.1.1",
"postcss-preset-env": "9.5.9",
"prettier": "3.2.5",
"sass": "1.75.0",
"sass-loader": "14.2.1",
"typescript": "5.4.5",
"vue-loader": "17.4.2",
"webpack": "5.89.0",
"webpack-bundle-analyzer": "4.10.1",
"webpack": "5.91.0",
"webpack-bundle-analyzer": "4.10.2",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
"webpack-dev-server": "5.0.4",
"webpack-merge": "5.10.0",
"@vue/babel-plugin-jsx": "1.1.5"
"@vue/babel-plugin-jsx": "1.2.2"
},
"dependencies": {
"@quasar/extras": "1.16.9",
"@vueuse/core": "10.7.1",
"axios": "1.6.3",
"@quasar/extras": "1.16.11",
"@vueuse/core": "10.9.0",
"axios": "1.6.8",
"dayjs": "1.11.10",
"echarts": "5.4.3",
"echarts": "5.5.0",
"exceljs": "4.4.0",
"file-saver": "2.0.5",
"luckyexcel": "1.0.1",
"mockjs": "1.1.0",
"pinia": "2.1.7",
"platform-core": "8.1.188",
"quasar": "2.14.2",
"tailwindcss": "3.4.0",
"vue": "3.4.3",
"platform-core": "8.1.217",
"quasar": "2.15.3",
"tailwindcss": "3.4.3",
"vue": "3.4.24",
"vue-dompurify-html": "5.0.1",
"vue-i18n": "9.8.0",
"vue-router": "4.2.5",
"vue-i18n": "9.13.1",
"vue-router": "4.3.2",
"lodash": "4.17.21",
"@codemirror/autocomplete": "6.11.1",
"@codemirror/commands": "6.3.3",
"@codemirror/lang-html": "6.4.7",
"@codemirror/autocomplete": "6.16.0",
"@codemirror/commands": "6.5.0",
"@codemirror/lang-html": "6.4.9",
"@codemirror/lang-java": "6.0.1",
"@codemirror/lang-javascript": "6.2.1",
"@codemirror/lang-javascript": "6.2.2",
"@codemirror/lang-json": "6.0.1",
"@codemirror/lang-sql": "6.5.4",
"@codemirror/lang-xml": "6.0.2",
"@codemirror/language": "6.10.0",
"@codemirror/search": "6.5.5",
"@codemirror/state": "6.4.0",
"@codemirror/view": "6.23.0",
"@codemirror/lang-sql": "6.6.3",
"@codemirror/lang-xml": "6.1.0",
"@codemirror/language": "6.10.1",
"@codemirror/search": "6.5.6",
"@codemirror/state": "6.4.1",
"@codemirror/view": "6.26.3",
"codemirror": "6.0.1",
"vue-codemirror6": "1.2.0"
"vue-codemirror6": "1.2.0",
"@maxgraph/core": "0.10.0"
}
}

2
irbs.frontend/public/configure.js

@ -6,7 +6,7 @@ window.APP.configure ={
webContextPath: '[(@{/})]'.startsWith('[')? '/' : '[(@{/})]',
// 默认后端 API 请求的服务地址前缀
apiContextPaths: {
DEFAULT: '[(@{/})]'.startsWith('[')? 'http://localhost:8081/' : '[(@{/})]',
DEFAULT: '[(@{/})]'.startsWith('[')? 'http://localhost:8080/' : '[(@{/})]',
},
// 是否启用本地 mock
enableLocalMock : false,

1054
irbs.frontend/src/views/IrbsHome.vue

File diff suppressed because it is too large

4
irbs.frontend/util-components-generator.cjs

@ -13,7 +13,7 @@ content +='/**\n';
content +=' * 此文件为自动生成文件,请勿修改\n';
content +=' */\n\n';
for(const route of routesJson){
const componentName =route.component.substring(route.component.lastIndexOf('.')+1);
const componentName =route.component.replaceAll('.','_');
const componentPath =route.componentPath;
content +=`import ${componentName} from '${componentPath}';\n`;
}
@ -21,7 +21,7 @@ for(const route of routesJson){
content +='\n';
content +='const localComponents = { \n';
for(const route of routesJson){
const componentName =route.component.substring(route.component.lastIndexOf('.')+1);
const componentName =route.component.replaceAll('.','_');
content +=`'${route.component}': ${componentName},\n`;
}
content +='}\n\n';

2
irbs.frontend/webpack.env.serve.cjs

@ -19,7 +19,7 @@ module.exports = (env)=> merge(common, mf,{
directory: path.join(__dirname, 'public'),
},
compress: false,
port: 3001,
port: 3000,
hot: true,
// 保证在出现 404 错误时,能够导航到 index.html
historyApiFallback: true,

Loading…
Cancel
Save