15 changed files with 514 additions and 1049 deletions
@ -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(); |
||||
|
} |
||||
|
} |
@ -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; |
||||
|
} |
||||
|
} |
@ -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; |
||||
|
} |
@ -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; |
||||
|
} |
||||
|
} |
@ -1,106 +1,105 @@ |
|||||
{ |
{ |
||||
"name": "irbs.frontend", |
"name": "irbs.frontend", |
||||
"version": "8.1.27", |
"version": "1.0.1", |
||||
"description": "", |
"description": "", |
||||
"private": false, |
"private": false, |
||||
"keywords": [ |
"keywords": [], |
||||
|
"author": "", |
||||
], |
"license": "ISC", |
||||
"author": "", |
"scripts": { |
||||
"license": "ISC", |
"clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml", |
||||
"scripts": { |
"dev": "nodemon", |
||||
"clean": "rm -rf ./node_modules && rm -rf pnpm-lock.yaml", |
"serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs", |
||||
"dev": "nodemon", |
"build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs", |
||||
"serve": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack serve --config webpack.env.serve.cjs", |
"prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs", |
||||
"build": "node ./util-components-generator.cjs && cross-env NODE_ENV=development webpack --config webpack.env.build.cjs", |
"sync": "platform sync" |
||||
"prod": "node ./util-components-generator.cjs && cross-env NODE_ENV=production webpack --config webpack.env.prod.cjs", |
}, |
||||
"sync": "platform sync" |
"engines": { |
||||
}, |
"node": ">=18", |
||||
"engines": { |
"pnpm": ">=7" |
||||
"node": ">=18", |
}, |
||||
"pnpm": ">=7" |
"publishConfig": { |
||||
}, |
"registry": "http://nexus.sc.io:8000/repository/npm-releases/", |
||||
"publishConfig": { |
"access": "public" |
||||
"registry": "http://nexus.sc.io:8000/repository/npm-releases/", |
}, |
||||
"access": "public" |
"devDependencies": { |
||||
}, |
"@babel/core": "7.24.4", |
||||
"devDependencies": { |
"@babel/preset-env": "7.24.4", |
||||
"@babel/core": "7.23.7", |
"@babel/preset-typescript": "7.24.1", |
||||
"@babel/preset-env": "7.23.7", |
"@babel/plugin-transform-class-properties": "7.24.1", |
||||
"@babel/preset-typescript": "7.23.3", |
"@babel/plugin-transform-object-rest-spread": "7.24.1", |
||||
"@babel/plugin-transform-class-properties": "7.23.3", |
"@quasar/app-webpack": "3.12.5", |
||||
"@babel/plugin-transform-object-rest-spread": "7.23.4", |
"@quasar/cli": "2.4.0", |
||||
"@quasar/app-webpack": "3.12.1", |
"@types/mockjs": "1.0.10", |
||||
"@quasar/cli": "2.3.0", |
"@types/node": "20.12.7", |
||||
"@types/mockjs": "1.0.10", |
"@typescript-eslint/eslint-plugin": "7.7.1", |
||||
"@types/node": "20.10.6", |
"@typescript-eslint/parser": "7.7.1", |
||||
"@typescript-eslint/eslint-plugin": "6.17.0", |
"@vue/compiler-sfc": "3.4.24", |
||||
"@typescript-eslint/parser": "6.17.0", |
"@webpack-cli/serve": "2.0.5", |
||||
"@vue/compiler-sfc": "3.4.3", |
"autoprefixer": "10.4.19", |
||||
"@webpack-cli/serve": "2.0.5", |
"babel-loader": "9.1.3", |
||||
"autoprefixer": "10.4.16", |
"clean-webpack-plugin": "4.0.0", |
||||
"babel-loader": "9.1.3", |
"copy-webpack-plugin": "12.0.2", |
||||
"clean-webpack-plugin": "4.0.0", |
"cross-env": "7.0.3", |
||||
"copy-webpack-plugin": "11.0.0", |
"css-loader": "7.1.1", |
||||
"cross-env": "7.0.3", |
"eslint": "8.56.0", |
||||
"css-loader": "6.8.1", |
"eslint-config-prettier": "9.1.0", |
||||
"eslint": "8.56.0", |
"eslint-plugin-prettier": "5.1.3", |
||||
"eslint-config-prettier": "9.1.0", |
"eslint-plugin-vue": "9.25.0", |
||||
"eslint-plugin-prettier": "5.1.2", |
"eslint-webpack-plugin": "4.1.0", |
||||
"eslint-plugin-vue": "9.19.2", |
"html-webpack-plugin": "5.6.0", |
||||
"eslint-webpack-plugin": "4.0.1", |
"json5": "2.2.3", |
||||
"html-webpack-plugin": "5.6.0", |
"mini-css-extract-plugin": "2.9.0", |
||||
"json5": "2.2.3", |
"nodemon": "3.1.0", |
||||
"mini-css-extract-plugin": "2.7.6", |
"postcss": "8.4.38", |
||||
"nodemon": "3.0.2", |
"postcss-import": "16.1.0", |
||||
"postcss": "8.4.32", |
"postcss-loader": "8.1.1", |
||||
"postcss-import": "16.0.0", |
"postcss-preset-env": "9.5.9", |
||||
"postcss-loader": "7.3.4", |
"prettier": "3.2.5", |
||||
"postcss-preset-env": "9.3.0", |
"sass": "1.75.0", |
||||
"prettier": "3.1.1", |
"sass-loader": "14.2.1", |
||||
"sass": "1.69.7", |
"typescript": "5.4.5", |
||||
"sass-loader": "13.3.3", |
"vue-loader": "17.4.2", |
||||
"typescript": "5.3.3", |
"webpack": "5.91.0", |
||||
"vue-loader": "17.4.2", |
"webpack-bundle-analyzer": "4.10.2", |
||||
"webpack": "5.89.0", |
"webpack-cli": "5.1.4", |
||||
"webpack-bundle-analyzer": "4.10.1", |
"webpack-dev-server": "5.0.4", |
||||
"webpack-cli": "5.1.4", |
"webpack-merge": "5.10.0", |
||||
"webpack-dev-server": "4.15.1", |
"@vue/babel-plugin-jsx": "1.2.2" |
||||
"webpack-merge": "5.10.0", |
}, |
||||
"@vue/babel-plugin-jsx": "1.1.5" |
"dependencies": { |
||||
}, |
"@quasar/extras": "1.16.11", |
||||
"dependencies": { |
"@vueuse/core": "10.9.0", |
||||
"@quasar/extras": "1.16.9", |
"axios": "1.6.8", |
||||
"@vueuse/core": "10.7.1", |
"dayjs": "1.11.10", |
||||
"axios": "1.6.3", |
"echarts": "5.5.0", |
||||
"dayjs": "1.11.10", |
"exceljs": "4.4.0", |
||||
"echarts": "5.4.3", |
"file-saver": "2.0.5", |
||||
"exceljs": "4.4.0", |
"luckyexcel": "1.0.1", |
||||
"file-saver": "2.0.5", |
"mockjs": "1.1.0", |
||||
"luckyexcel": "1.0.1", |
"pinia": "2.1.7", |
||||
"mockjs": "1.1.0", |
"platform-core": "8.1.217", |
||||
"pinia": "2.1.7", |
"quasar": "2.15.3", |
||||
"platform-core": "8.1.188", |
"tailwindcss": "3.4.3", |
||||
"quasar": "2.14.2", |
"vue": "3.4.24", |
||||
"tailwindcss": "3.4.0", |
"vue-dompurify-html": "5.0.1", |
||||
"vue": "3.4.3", |
"vue-i18n": "9.13.1", |
||||
"vue-dompurify-html": "5.0.1", |
"vue-router": "4.3.2", |
||||
"vue-i18n": "9.8.0", |
"lodash": "4.17.21", |
||||
"vue-router": "4.2.5", |
"@codemirror/autocomplete": "6.16.0", |
||||
"lodash": "4.17.21", |
"@codemirror/commands": "6.5.0", |
||||
"@codemirror/autocomplete": "6.11.1", |
"@codemirror/lang-html": "6.4.9", |
||||
"@codemirror/commands": "6.3.3", |
"@codemirror/lang-java": "6.0.1", |
||||
"@codemirror/lang-html": "6.4.7", |
"@codemirror/lang-javascript": "6.2.2", |
||||
"@codemirror/lang-java": "6.0.1", |
"@codemirror/lang-json": "6.0.1", |
||||
"@codemirror/lang-javascript": "6.2.1", |
"@codemirror/lang-sql": "6.6.3", |
||||
"@codemirror/lang-json": "6.0.1", |
"@codemirror/lang-xml": "6.1.0", |
||||
"@codemirror/lang-sql": "6.5.4", |
"@codemirror/language": "6.10.1", |
||||
"@codemirror/lang-xml": "6.0.2", |
"@codemirror/search": "6.5.6", |
||||
"@codemirror/language": "6.10.0", |
"@codemirror/state": "6.4.1", |
||||
"@codemirror/search": "6.5.5", |
"@codemirror/view": "6.26.3", |
||||
"@codemirror/state": "6.4.0", |
"codemirror": "6.0.1", |
||||
"@codemirror/view": "6.23.0", |
"vue-codemirror6": "1.2.0", |
||||
"codemirror": "6.0.1", |
"@maxgraph/core": "0.10.0" |
||||
"vue-codemirror6": "1.2.0" |
} |
||||
} |
|
||||
} |
} |
File diff suppressed because it is too large
Loading…
Reference in new issue