Browse Source

update

main
wangshaoping 10 months ago
parent
commit
ea884ee32e
  1. 8
      erm/src/main/resources/liquibase/kpi/erm.kpi_1.0.0_20221020__ERM KPI Database Data.xml
  2. 5
      io.sc.engine.st.frontend/public/favicon.svg
  3. 539
      io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/assets/iconfont/demo.css
  4. 2700
      io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/assets/iconfont/demo_index.html
  5. BIN
      io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/css/EwaAntH.gif
  6. BIN
      io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/css/EwaAntV.gif
  7. 42
      io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/demoData/demoFeature.js
  8. BIN
      io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/fonts/FontAwesome.otf
  9. BIN
      io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/fonts/fontawesome-webfont.eot
  10. 2671
      io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/fonts/fontawesome-webfont.svg
  11. BIN
      io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/fonts/fontawesome-webfont.ttf
  12. 122
      io.sc.engine.st.frontend/src/views/EAD.vue
  13. 160
      io.sc.engine.st.frontend/src/views/EconomicIndicator.vue
  14. 194
      io.sc.engine.st.frontend/src/views/FactorManager.vue
  15. 188
      io.sc.engine.st.frontend/src/views/factor-type/FactorType.vue
  16. 119
      io.sc.engine.st.frontend/src/views/factor/Factor.vue
  17. 15
      io.sc.engine.st/src/main/java/io/sc/engine/st/controller/EconomicIndicatorWebController.java
  18. 15
      io.sc.engine.st/src/main/java/io/sc/engine/st/controller/FactorTypeWebController.java
  19. 15
      io.sc.engine.st/src/main/java/io/sc/engine/st/controller/FactorWebController.java
  20. 157
      io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/entity/EconomicIndicatorEntity.java
  21. 118
      io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/entity/FactorEntity.java
  22. 110
      io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/entity/FactorTypeEntity.java
  23. 10
      io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/repository/EconomicIndicatorRepository.java
  24. 10
      io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/repository/FactorRepository.java
  25. 10
      io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/repository/FactorTypeRepository.java
  26. 12
      io.sc.engine.st/src/main/java/io/sc/engine/st/service/EconomicIndicatorService.java
  27. 8
      io.sc.engine.st/src/main/java/io/sc/engine/st/service/FactorService.java
  28. 8
      io.sc.engine.st/src/main/java/io/sc/engine/st/service/FactorTypeService.java
  29. 14
      io.sc.engine.st/src/main/java/io/sc/engine/st/service/impl/EconomicIndicatorServiceImpl.java
  30. 12
      io.sc.engine.st/src/main/java/io/sc/engine/st/service/impl/FactorServiceImpl.java
  31. 12
      io.sc.engine.st/src/main/java/io/sc/engine/st/service/impl/FactorTypeServiceImpl.java
  32. 106
      io.sc.engine.st/src/main/java/io/sc/engine/st/vo/EconomicIndicatorVo.java
  33. 62
      io.sc.engine.st/src/main/java/io/sc/engine/st/vo/FactorTypeVo.java
  34. 74
      io.sc.engine.st/src/main/java/io/sc/engine/st/vo/FactorVo.java
  35. 8
      io.sc.engine.st/src/main/resources/io/sc/engine/st/i18n/enums.properties
  36. 8
      io.sc.engine.st/src/main/resources/io/sc/engine/st/i18n/enums_tw_CN.properties
  37. 8
      io.sc.engine.st/src/main/resources/io/sc/engine/st/i18n/enums_zh_CN.properties
  38. 14
      io.sc.platform.jdbc/src/main/java/io/sc/platform/jdbc/exporter/support/DataExportConfigure.java
  39. 2
      io.sc.standard/src/main/java/io/sc/standard/jpa/entity/CurrencyEntity.java

8
erm/src/main/resources/liquibase/kpi/erm.kpi_1.0.0_20221020__ERM KPI Database Data.xml

@ -13,19 +13,19 @@
<changeSet id="erm.kpi_1.0.0_20221020__ERM KPI Database Data" author="platform"> <changeSet id="erm.kpi_1.0.0_20221020__ERM KPI Database Data" author="platform">
<!-- 数据字典 --> <!-- 数据字典 -->
<customChange class="io.sc.platform.jdbc.liquibase.task.CsvImportTaskChange"> <customChange class="io.sc.platform.jdbc.liquibase.task.CsvImportTaskChange">
<param name="dataFile" value="classpath:/liquibase/kpi/data/sys_dictionary.csv"/> <param name="dataFile" value="classpath:/erm/liquibase/data/sys_dictionary.csv"/>
</customChange> </customChange>
<!-- 指标 --> <!-- 指标 -->
<customChange class="io.sc.platform.jdbc.liquibase.task.CsvImportTaskChange"> <customChange class="io.sc.platform.jdbc.liquibase.task.CsvImportTaskChange">
<param name="dataFile" value="classpath:/liquibase/kpi/data/rp_indicator.csv"/> <param name="dataFile" value="classpath:/erm/liquibase/data/rp_indicator.csv"/>
</customChange> </customChange>
<!-- 指标库 --> <!-- 指标库 -->
<customChange class="io.sc.platform.jdbc.liquibase.task.CsvImportTaskChange"> <customChange class="io.sc.platform.jdbc.liquibase.task.CsvImportTaskChange">
<param name="dataFile" value="classpath:/liquibase/kpi/data/rp_lib.csv"/> <param name="dataFile" value="classpath:/erm/liquibase/data/rp_lib.csv"/>
</customChange> </customChange>
<!-- 指标和指标库关系 --> <!-- 指标和指标库关系 -->
<customChange class="io.sc.platform.jdbc.liquibase.task.CsvImportTaskChange"> <customChange class="io.sc.platform.jdbc.liquibase.task.CsvImportTaskChange">
<param name="dataFile" value="classpath:/liquibase/kpi/data/rp_indicator_lib.csv"/> <param name="dataFile" value="classpath:/erm/liquibase/data/rp_indicator_lib.csv"/>
</customChange> </customChange>
</changeSet> </changeSet>
</databaseChangeLog> </databaseChangeLog>

5
io.sc.engine.st.frontend/public/favicon.svg

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="blue" class="bi bi-browser-edge" viewBox="0 0 16 16">
<path d="M9.482 9.341c-.069.062-.17.153-.17.309 0 .162.107.325.3.456.877.613 2.521.54 2.592.538h.002c.667 0 1.32-.18 1.894-.519A3.838 3.838 0 0 0 16 6.819c.018-1.316-.44-2.218-.666-2.664l-.04-.08C13.963 1.487 11.106 0 8 0A8 8 0 0 0 .473 5.29C1.488 4.048 3.183 3.262 5 3.262c2.83 0 5.01 1.885 5.01 4.797h-.004v.002c0 .338-.168.832-.487 1.244l.006-.006a.594.594 0 0 1-.043.041Z"/>
<path d="M.01 7.753a8.137 8.137 0 0 0 .753 3.641 8 8 0 0 0 6.495 4.564 5.21 5.21 0 0 1-.785-.377h-.01l-.12-.075a5.45 5.45 0 0 1-1.56-1.463A5.543 5.543 0 0 1 6.81 5.8l.01-.004.025-.012c.208-.098.62-.292 1.167-.285.129.001.257.012.384.033a4.037 4.037 0 0 0-.993-.698l-.01-.005C6.348 4.282 5.199 4.263 5 4.263c-2.44 0-4.824 1.634-4.99 3.49Zm10.263 7.912c.088-.027.177-.054.265-.084-.102.032-.204.06-.307.086l.042-.002Z"/>
<path d="M10.228 15.667a5.21 5.21 0 0 0 .303-.086l.082-.025a8.019 8.019 0 0 0 4.162-3.3.25.25 0 0 0-.331-.35c-.215.112-.436.21-.663.294a6.367 6.367 0 0 1-2.243.4c-2.957 0-5.532-2.031-5.532-4.644.002-.135.017-.268.046-.399a4.543 4.543 0 0 0-.46 5.898l.003.005c.315.441.707.821 1.158 1.121h.003l.144.09c.877.55 1.721 1.078 3.328.996Z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

539
io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/assets/iconfont/demo.css

@ -0,0 +1,539 @@
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}

2700
io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/assets/iconfont/demo_index.html

File diff suppressed because it is too large

BIN
io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/css/EwaAntH.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/css/EwaAntV.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

42
io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/demoData/demoFeature.js

@ -0,0 +1,42 @@
// Features specially written for demo
(function() {
// language
function language(params) {
var lang = navigator.language||navigator.userLanguage;//常规浏览器语言和IE浏览器
lang = lang.substr(0, 2);//截取lang前2位字符
return lang;
}
// Tencent Forum Link Button
function supportButton() {
const text = language() === 'zh' ? '反馈' : 'Forum';
const link = language() === 'zh' ? 'https://support.qq.com/product/288322' : 'https://groups.google.com/g/luckysheet';
document.querySelector("body").insertAdjacentHTML('beforeend', '<a id="container" href="'+ link +'" target="_blank" style="z-index:2;width:50px;height:50px;line-height:50px;position:fixed;right:40px;bottom:86px;border-radius:50px;cursor:pointer;background:rgb(71,133,249);color:#fff;text-align:center;text-decoration:none;">'+ text +'</a>');
}
supportButton()
/**
* Get url parameters
*/
function getRequest() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,
function(m,key,value) {
vars[key] = value;
});
return vars;
}
window.luckysheetDemoUtil = {
language:language,
getRequest:getRequest
}
})()

BIN
io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/fonts/FontAwesome.otf

Binary file not shown.

BIN
io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/fonts/fontawesome-webfont.eot

Binary file not shown.

2671
io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/fonts/fontawesome-webfont.svg

File diff suppressed because it is too large

After

Width:  |  Height:  |  Size: 434 KiB

BIN
io.sc.engine.st.frontend/public/webjars/luckysheet/2.1.13/fonts/fontawesome-webfont.ttf

Binary file not shown.

122
io.sc.engine.st.frontend/src/views/EAD.vue

@ -0,0 +1,122 @@
<template>
<div style="height: 100%">
<w-grid
ref="testCaseGridRef"
:title="$t('engine.st.testCase.grid.title')"
:config-button="true"
selection="multiple"
:checkbox-selection="true"
:data-url="Environment.apiContextPath('/api/st/testCase')"
:pageable="true"
:toolbar-configure="{ noIcon: false }"
:toolbar-actions="[
'refresh',
'separator',
'add',
'edit',
'remove',
'separator',
{
name: 'scenario',
label: $t('engine.st.testCase.grid.toolbar.scenario'),
icon: 'bi-pin-angle',
enableIf: (arg) => {
return arg.selected;
},
click: () => {
scenarioRef.open();
},
},
'separator',
{
name: 'test',
label: $t('engine.st.testCase.grid.toolbar.test'),
icon: 'bi-lightning-charge',
enableIf: (arg) => {
return arg.selected;
},
},
'separator',
{
name: 'viewResult',
label: $t('engine.st.testCase.grid.toolbar.viewResult'),
icon: 'bi-display',
enableIf: (arg) => {
return arg.selected;
},
},
'separator',
'view',
'separator',
'export',
]"
:columns="[
{ width: 140, name: 'startDate', label: $t('startDate') },
{ width: 140, name: 'endDate', label: $t('endDate') },
{ name: 'periodType', label: $t('engine.st.testCase.grid.entity.periodType'), format: Formater.enum(StatisticalPeriodTypeEnums) },
{ width: 200, name: 'name', label: $t('name') },
{ width: '100%', name: 'description', label: $t('description') },
]"
:editor="{
dialog: {
width: '600px',
},
form: {
colsNum: 1,
fields: [
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'description', label: $t('description'), type: 'text' },
{
name: 'periodType',
label: $t('engine.st.testCase.grid.entity.periodType'),
type: 'select',
options: Options.enum(StatisticalPeriodTypeEnums),
required: true,
},
],
},
}"
:viewer="{
panel: {
columnNum: 1,
fields: [
{ name: 'id', label: $t('id') },
{ name: 'name', label: $t('name') },
{ name: 'description', label: $t('description') },
{ name: 'dataComeFrom', label: $t('dataComeFrom'), format: Formater.none() },
{ name: 'creator', label: $t('creator') },
{ name: 'createDate', label: $t('createDate') },
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() },
],
},
}"
@row-click="
(evt, row, index) => {
currentSelectedTestCaseId = row.id;
}
"
@before-request-data="
() => {
currentSelectedTestCaseId = '';
}
"
></w-grid>
<Scenario
ref="scenarioRef"
:data-url="Environment.apiContextPath('/api/st/testScenario')"
foreign-key="testCase"
:foreign-value="currentSelectedTestCaseId"
></Scenario>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { Environment, Formater, Options, EnumTools } from 'platform-core';
import Scenario from './Scenario.vue';
const testCaseGridRef = ref();
const scenarioRef = ref();
const currentSelectedTestCaseId = ref('');
const StatisticalPeriodTypeEnums = await EnumTools.fetch('io.sc.engine.st.enums.StatisticalPeriodType');
</script>

160
io.sc.engine.st.frontend/src/views/EconomicIndicator.vue

@ -0,0 +1,160 @@
<template>
<div style="height: 100%">
<w-grid
ref="gridRef"
:title="$t('engine.st.economicIndicator.grid.title')"
:checkbox-selection="true"
:data-url="Environment.apiContextPath('/api/st/economicIndicator')"
:pageable="false"
:sort-by="['year', 'month', 'quarter']"
:query-form-cols-num="4"
:query-form-fields="[
{
name: 'periodType',
label: $t('engine.st.economicIndicator.grid.entity.periodType'),
type: 'select',
options: Options.enum(StatisticalPeriodTypeEnums),
queryOperator: 'equals',
//defaultValue: 'MONTH',
},
]"
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']"
:columns="[
{ name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType'), format: Formater.enum(StatisticalPeriodTypeEnums) },
{ name: 'year', label: $t('year') },
{ name: 'month', label: $t('month') },
{ name: 'quarter', label: $t('quarter') },
{
name: 'gdp',
label: $t('engine.st.economicIndicator.grid.entity.GDP'),
title: $t('engine.st.economicIndicator.grid.entity.GDP.title'),
align: 'right',
format: Formater.thousands(),
},
{
name: 'm2',
label: $t('engine.st.economicIndicator.grid.entity.M2'),
title: $t('engine.st.economicIndicator.grid.entity.M2.title'),
align: 'right',
format: Formater.thousands(),
},
{
name: 'cpi',
label: $t('engine.st.economicIndicator.grid.entity.CPI'),
title: $t('engine.st.economicIndicator.grid.entity.CPI.title'),
align: 'right',
format: Formater.percent(),
},
{
name: 'hpi',
label: $t('engine.st.economicIndicator.grid.entity.HPI'),
title: $t('engine.st.economicIndicator.grid.entity.HPI.title'),
align: 'right',
format: Formater.percent(),
},
{
name: 'pmi',
label: $t('engine.st.economicIndicator.grid.entity.PMI'),
title: $t('engine.st.economicIndicator.grid.entity.PMI.title'),
align: 'right',
format: Formater.percent(),
},
{
name: 'blr',
label: $t('engine.st.economicIndicator.grid.entity.BLR'),
title: $t('engine.st.economicIndicator.grid.entity.BLR.title'),
align: 'right',
format: Formater.percent(),
},
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() },
]"
:editor="{
dialog: {
width: '600px',
},
form: {
colsNum: 1,
fields: [
{
name: 'periodType',
label: $t('engine.st.economicIndicator.grid.entity.periodType'),
type: 'select',
options: Options.enum(StatisticalPeriodTypeEnums),
},
{
name: 'year',
label: $t('year'),
type: 'select',
options: yearOptionsRef,
showIf: (arg) => {
return arg.form.getFieldValue('periodType') === 'YEAR';
},
},
{
name: 'month',
label: $t('month'),
type: 'select',
options: monthOptionsRef,
showIf: (arg) => {
return arg.form.getFieldValue('periodType') === 'MONTH';
},
},
{
name: 'quarter',
label: $t('quarter'),
type: 'select',
options: quarterOptionsRef,
showIf: (arg) => {
return arg.form.getFieldValue('periodType') === 'QUARTER';
},
},
{ name: 'gdp', label: $t('engine.st.economicIndicator.grid.entity.GDP'), type: 'number' },
{ name: 'm2', label: $t('engine.st.economicIndicator.grid.entity.M2'), type: 'number' },
{ name: 'cpi', label: $t('engine.st.economicIndicator.grid.entity.CPI'), type: 'number', precision: 6 },
{ name: 'hpi', label: $t('engine.st.economicIndicator.grid.entity.HPI'), type: 'number', precision: 6 },
{ name: 'pmi', label: $t('engine.st.economicIndicator.grid.entity.PMI'), type: 'number', precision: 6 },
{ name: 'blr', label: $t('engine.st.economicIndicator.grid.entity.BLR'), type: 'number', precision: 6 },
],
},
}"
:viewer="{
panel: {
columnNum: 1,
fields: [
{ name: 'id', label: $t('id') },
{ name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType') },
{ name: 'year', label: $t('year') },
{ name: 'month', label: $t('month') },
{ name: 'gdp', label: $t('engine.st.economicIndicator.grid.entity.GDP') },
{ name: 'm2', label: $t('engine.st.economicIndicator.grid.entity.M2') },
{ name: 'cpi', label: $t('engine.st.economicIndicator.grid.entity.CPI') },
{ name: 'hpi', label: $t('engine.st.economicIndicator.grid.entity.HPI') },
{ name: 'pmi', label: $t('engine.st.economicIndicator.grid.entity.PMI') },
{ name: 'blr', label: $t('engine.st.economicIndicator.grid.entity.BLR') },
{ name: 'dataComeFrom', label: $t('dataComeFrom') },
{ name: 'creator', label: $t('creator') },
{ name: 'createDate', label: $t('createDate') },
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() },
{ name: 'corporationCode', label: $t('corporationCode') },
],
},
}"
></w-grid>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { Environment, EnumTools, Formater, Options, Tools } from 'platform-core';
const gridRef = ref();
const years = [];
for (let i = 0; i < 30; i++) {
years.push(new Date().getFullYear() - i);
}
const yearOptionsRef = ref(years);
const monthOptionsRef = ref([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]);
const quarterOptionsRef = ref([1, 2, 3, 4]);
const StatisticalPeriodTypeEnums = await EnumTools.fetch('io.sc.engine.st.enums.StatisticalPeriodType');
</script>

194
io.sc.engine.st.frontend/src/views/FactorManager.vue

@ -0,0 +1,194 @@
<template>
<q-splitter :model-value="60" class="w-full" style="height: 100%">
<template #before>
<div class="pr-1" style="height: 100%">
<w-grid
ref="factorTypeGridRef"
:title="$t('engine.st.factorType.grid.title')"
:checkbox-selection="true"
:data-url="Environment.apiContextPath('/api/st/factorType')"
:pageable="false"
:sort-by="['code']"
:query-form-cols-num="4"
:query-form-fields="[
{
name: 'periodType',
label: $t('period'),
type: 'select',
options: Options.enum(Enums.PeriodType),
queryOperator: 'equals',
},
{ name: 'code', label: $t('code'), type: 'text' },
{ name: 'name', label: $t('name'), type: 'text' },
]"
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']"
:columns="[
{ width: 150, name: 'name', label: $t('name') },
{ width: 100, name: 'code', label: $t('code') },
{ width: 60, name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType'), format: Formater.enum(Enums.PeriodType) },
{ width: 100, name: 'description', label: $t('description') },
{ width: 80, name: 'valueType', label: $t('valueType'), format: Formater.enum(Enums.ValueType) },
]"
:editor="{
dialog: {
width: '600px',
},
form: {
colsNum: 1,
fields: [
{
name: 'periodType',
label: $t('period'),
required: true,
type: 'select',
options: Options.enum(Enums.PeriodType),
},
{ name: 'code', label: $t('code'), type: 'text', required: true },
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'valueType', label: $t('valueType'), required: true, type: 'select', options: Options.enum(Enums.ValueType) },
{ name: 'description', label: $t('description'), type: 'text' },
],
},
}"
:viewer="{
panel: {
columnNum: 1,
fields: [
{ name: 'id', label: $t('id') },
{ name: 'periodType', label: $t('period') },
{ name: 'code', label: $t('code') },
{ name: 'name', label: $t('name') },
{ name: 'description', label: $t('description') },
{ name: 'valueType', label: $t('valueType') },
{ name: 'dataComeFrom', label: $t('dataComeFrom') },
{ name: 'creator', label: $t('creator') },
{ name: 'createDate', label: $t('createDate') },
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() },
{ name: 'corporationCode', label: $t('corporationCode') },
],
},
}"
@row-click="
(evt, row, index) => {
currentSelectedFactorType = row;
factorGridRef?.refresh();
}
"
@before-request-data="
() => {
currentSelectedFactorType = { id: '' };
factorGridRef?.refresh();
}
"
></w-grid>
</div>
</template>
<template #after>
<q-splitter :model-value="70" horizontal class="w-full" style="height: 100%">
<template #before>
<div class="pl-1" style="height: 100%">
<w-grid
ref="factorGridRef"
title="engine.st.factor.grid.title"
:checkbox-selection="true"
:fetch-data-url="Environment.apiContextPath('/api/st/factor?factorType=' + currentSelectedFactorType.id)"
:data-url="Environment.apiContextPath('/api/st/factor')"
:pageable="false"
:sort-by="['year', 'quarter', 'month', 'day']"
:query-form-cols-num="4"
:query-form-fields="[]"
:toolbar-actions="['refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']"
:columns="getFactorColumns"
:editor="{
dialog: {
width: '600px',
},
form: {
colsNum: 1,
fields: [
{
name: 'periodType',
label: $t('period'),
required: true,
type: 'select',
options: Options.enum(Enums.PeriodType),
},
{ name: 'code', label: $t('code'), type: 'text', required: true },
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'valueType', label: $t('valueType'), required: true, type: 'select', options: Options.enum(Enums.ValueType) },
{ name: 'description', label: $t('description'), type: 'text' },
],
},
}"
:viewer="{
panel: {
columnNum: 1,
fields: [
{ name: 'id', label: $t('id') },
{ name: 'periodType', label: $t('period') },
{ name: 'code', label: $t('code') },
{ name: 'name', label: $t('name') },
{ name: 'description', label: $t('description') },
{ name: 'valueType', label: $t('valueType') },
{ name: 'dataComeFrom', label: $t('dataComeFrom') },
{ name: 'creator', label: $t('creator') },
{ name: 'createDate', label: $t('createDate') },
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() },
{ name: 'corporationCode', label: $t('corporationCode') },
],
},
}"
></w-grid>
</div>
</template>
<template #after>
<div class="pl-1" style="height: 100%"></div>
</template>
</q-splitter>
</template>
</q-splitter>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { Environment, EnumTools, Formater, Options } from 'platform-core';
import { computed } from 'vue';
const { t } = useI18n();
const factorTypeGridRef = ref();
const factorGridRef = ref();
const currentSelectedFactorType = ref({});
const Enums = await EnumTools.fetch(['io.sc.engine.st.enums.PeriodType', 'io.sc.engine.st.enums.ValueType']);
const getFactorColumns = computed(() => {
let result = [{ width: '100%', name: 'value', label: t('value') }];
if (currentSelectedFactorType.value.periodType === 'YEAR') {
result = [
{ width: 60, name: 'year', label: t('year') },
{ width: '100%', name: 'value', label: t('value') },
];
} else if (currentSelectedFactorType.value.periodType === 'QUARTER') {
result = [
{ width: 60, name: 'year', label: t('year') },
{ width: 60, name: 'quarter', label: t('quarter') },
{ width: '100%', name: 'value', label: t('value') },
];
} else if (currentSelectedFactorType.value.periodType === 'MONTH') {
result = [
{ width: 60, name: 'year', label: t('year') },
{ width: 60, name: 'month', label: t('month') },
{ width: '100%', name: 'value', label: t('value') },
];
} else if (currentSelectedFactorType.value.periodType === 'DAY') {
result = [
{ width: 60, name: 'year', label: t('year') },
{ width: 60, name: 'month', label: t('month') },
{ width: 60, name: 'day', label: t('day') },
{ width: '100%', name: 'value', label: t('value') },
];
}
return result;
});
</script>

188
io.sc.engine.st.frontend/src/views/factor-type/FactorType.vue

@ -0,0 +1,188 @@
<template>
<q-splitter :model-value="60" class="w-full" style="height: 100%">
<template #before>
<div class="pr-1" style="height: 100%">
<w-grid
ref="factorTypeGridRef"
:title="$t('engine.st.factorType.grid.title')"
:checkbox-selection="true"
:data-url="Environment.apiContextPath('/api/st/factorType')"
:pageable="false"
:sort-by="['code']"
:query-form-cols-num="4"
:query-form-fields="[
{
name: 'periodType',
label: $t('period'),
type: 'select',
options: Options.enum(Enums.PeriodType),
queryOperator: 'equals',
},
{ name: 'code', label: $t('code'), type: 'text' },
{ name: 'name', label: $t('name'), type: 'text' },
]"
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']"
:columns="[
{ width: 150, name: 'name', label: $t('name') },
{ width: 100, name: 'code', label: $t('code') },
{ width: 60, name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType'), format: Formater.enum(Enums.PeriodType) },
{ width: 100, name: 'description', label: $t('description') },
{ width: 80, name: 'valueType', label: $t('valueType'), format: Formater.enum(Enums.ValueType) },
]"
:editor="{
dialog: {
width: '600px',
},
form: {
colsNum: 1,
fields: [
{
name: 'periodType',
label: $t('period'),
required: true,
type: 'select',
options: Options.enum(Enums.PeriodType),
},
{ name: 'code', label: $t('code'), type: 'text', required: true },
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'valueType', label: $t('valueType'), required: true, type: 'select', options: Options.enum(Enums.ValueType) },
{ name: 'description', label: $t('description'), type: 'text' },
],
},
}"
:viewer="{
panel: {
columnNum: 1,
fields: [
{ name: 'id', label: $t('id') },
{ name: 'periodType', label: $t('period') },
{ name: 'code', label: $t('code') },
{ name: 'name', label: $t('name') },
{ name: 'description', label: $t('description') },
{ name: 'valueType', label: $t('valueType') },
{ name: 'dataComeFrom', label: $t('dataComeFrom') },
{ name: 'creator', label: $t('creator') },
{ name: 'createDate', label: $t('createDate') },
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() },
{ name: 'corporationCode', label: $t('corporationCode') },
],
},
}"
@row-click="
(evt, row, index) => {
currentSelectedFactorType = row;
factorGridRef?.refresh();
}
"
@before-request-data="
() => {
currentSelectedFactorType = { id: '' };
factorGridRef?.refresh();
}
"
></w-grid>
</div>
</template>
<template #after>
<div class="pl-1" style="height: 100%">
<w-grid
ref="factorGridRef"
title=""
:checkbox-selection="true"
:fetch-data-url="Environment.apiContextPath('/api/st/factor?factorType=' + currentSelectedFactorType.id)"
:data-url="Environment.apiContextPath('/api/st/factor')"
:pageable="false"
:sort-by="['year', 'quarter', 'month', 'day']"
:query-form-cols-num="4"
:query-form-fields="[]"
:toolbar-actions="['refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']"
:columns="getFactorColumns"
:editor="{
dialog: {
width: '600px',
},
form: {
colsNum: 1,
fields: [
{
name: 'periodType',
label: $t('period'),
required: true,
type: 'select',
options: Options.enum(Enums.PeriodType),
},
{ name: 'code', label: $t('code'), type: 'text', required: true },
{ name: 'name', label: $t('name'), type: 'text', required: true },
{ name: 'valueType', label: $t('valueType'), required: true, type: 'select', options: Options.enum(Enums.ValueType) },
{ name: 'description', label: $t('description'), type: 'text' },
],
},
}"
:viewer="{
panel: {
columnNum: 1,
fields: [
{ name: 'id', label: $t('id') },
{ name: 'periodType', label: $t('period') },
{ name: 'code', label: $t('code') },
{ name: 'name', label: $t('name') },
{ name: 'description', label: $t('description') },
{ name: 'valueType', label: $t('valueType') },
{ name: 'dataComeFrom', label: $t('dataComeFrom') },
{ name: 'creator', label: $t('creator') },
{ name: 'createDate', label: $t('createDate') },
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() },
{ name: 'corporationCode', label: $t('corporationCode') },
],
},
}"
></w-grid>
</div>
</template>
</q-splitter>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { Environment, EnumTools, Formater, Options } from 'platform-core';
import { computed } from 'vue';
const { t } = useI18n();
const factorTypeGridRef = ref();
const factorGridRef = ref();
const currentSelectedFactorType = ref({});
const Enums = await EnumTools.fetch(['io.sc.engine.st.enums.PeriodType', 'io.sc.engine.st.enums.ValueType']);
const getFactorColumns = computed(() => {
let result = [];
if (currentSelectedFactorType.value.periodType === 'YEAR') {
result = [
{ width: 60, name: 'year', label: t('year') },
{ width: '100%', name: 'value', label: t('value') },
];
} else if (currentSelectedFactorType.value.periodType === 'QUARTER') {
result = [
{ width: 60, name: 'year', label: t('year') },
{ width: 60, name: 'quarter', label: t('quarter') },
{ width: '100%', name: 'value', label: t('value') },
];
} else if (currentSelectedFactorType.value.periodType === 'MONTH') {
result = [
{ width: 60, name: 'year', label: t('year') },
{ width: 60, name: 'month', label: t('month') },
{ width: '100%', name: 'value', label: t('value') },
];
} else if (currentSelectedFactorType.value.periodType === 'DAY') {
result = [
{ width: 60, name: 'year', label: t('year') },
{ width: 60, name: 'month', label: t('month') },
{ width: 60, name: 'day', label: t('day') },
{ width: '100%', name: 'value', label: t('value') },
];
}
console.log(result);
return result;
});
</script>

119
io.sc.engine.st.frontend/src/views/factor/Factor.vue

@ -0,0 +1,119 @@
<template>
<div style="height: 100%">
<w-grid
ref="gridRef"
:title="$t('engine.st.factorType.grid.title')"
:checkbox-selection="true"
:data-url="Environment.apiContextPath('/api/st/factorType')"
:pageable="false"
:sort-by="['year', 'month', 'quarter']"
:query-form-cols-num="4"
:query-form-fields="[
{
name: 'periodType',
label: $t('period'),
type: 'select',
options: Options.enum(StatisticalPeriodTypeEnums),
queryOperator: 'equals',
},
]"
:toolbar-actions="['query', 'separator', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']"
:columns="[
{ name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType'), format: Formater.enum(StatisticalPeriodTypeEnums) },
{ name: 'code', label: $t('code') },
{ name: 'name', label: $t('name') },
{ name: 'description', label: $t('description') },
{ name: 'valueType', label: $t('valueType') },
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() },
]"
:editor="{
dialog: {
width: '600px',
},
form: {
colsNum: 1,
fields: [
{
name: 'periodType',
label: $t('engine.st.economicIndicator.grid.entity.periodType'),
type: 'select',
options: Options.enum(StatisticalPeriodTypeEnums),
},
{
name: 'year',
label: $t('year'),
type: 'select',
options: yearOptionsRef,
showIf: (arg) => {
return arg.form.getFieldValue('periodType') === 'YEAR';
},
},
{
name: 'month',
label: $t('month'),
type: 'select',
options: monthOptionsRef,
showIf: (arg) => {
return arg.form.getFieldValue('periodType') === 'MONTH';
},
},
{
name: 'quarter',
label: $t('quarter'),
type: 'select',
options: quarterOptionsRef,
showIf: (arg) => {
return arg.form.getFieldValue('periodType') === 'QUARTER';
},
},
{ name: 'gdp', label: $t('engine.st.economicIndicator.grid.entity.GDP'), type: 'number' },
{ name: 'm2', label: $t('engine.st.economicIndicator.grid.entity.M2'), type: 'number' },
{ name: 'cpi', label: $t('engine.st.economicIndicator.grid.entity.CPI'), type: 'number', precision: 6 },
{ name: 'hpi', label: $t('engine.st.economicIndicator.grid.entity.HPI'), type: 'number', precision: 6 },
{ name: 'pmi', label: $t('engine.st.economicIndicator.grid.entity.PMI'), type: 'number', precision: 6 },
{ name: 'blr', label: $t('engine.st.economicIndicator.grid.entity.BLR'), type: 'number', precision: 6 },
],
},
}"
:viewer="{
panel: {
columnNum: 1,
fields: [
{ name: 'id', label: $t('id') },
{ name: 'periodType', label: $t('engine.st.economicIndicator.grid.entity.periodType') },
{ name: 'year', label: $t('year') },
{ name: 'month', label: $t('month') },
{ name: 'gdp', label: $t('engine.st.economicIndicator.grid.entity.GDP') },
{ name: 'm2', label: $t('engine.st.economicIndicator.grid.entity.M2') },
{ name: 'cpi', label: $t('engine.st.economicIndicator.grid.entity.CPI') },
{ name: 'hpi', label: $t('engine.st.economicIndicator.grid.entity.HPI') },
{ name: 'pmi', label: $t('engine.st.economicIndicator.grid.entity.PMI') },
{ name: 'blr', label: $t('engine.st.economicIndicator.grid.entity.BLR') },
{ name: 'dataComeFrom', label: $t('dataComeFrom') },
{ name: 'creator', label: $t('creator') },
{ name: 'createDate', label: $t('createDate') },
{ name: 'lastModifier', label: $t('lastModifier') },
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() },
{ name: 'corporationCode', label: $t('corporationCode') },
],
},
}"
></w-grid>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { Environment, EnumTools, Formater, Options, Tools } from 'platform-core';
const gridRef = ref();
const years = [];
for (let i = 0; i < 30; i++) {
years.push(new Date().getFullYear() - i);
}
const yearOptionsRef = ref(years);
const monthOptionsRef = ref([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]);
const quarterOptionsRef = ref([1, 2, 3, 4]);
const StatisticalPeriodTypeEnums = await EnumTools.fetch('io.sc.engine.st.enums.StatisticalPeriodType');
</script>

15
io.sc.engine.st/src/main/java/io/sc/engine/st/controller/EconomicIndicatorWebController.java

@ -0,0 +1,15 @@
package io.sc.engine.st.controller;
import io.sc.engine.st.jpa.entity.EconomicIndicatorEntity;
import io.sc.engine.st.jpa.repository.EconomicIndicatorRepository;
import io.sc.engine.st.service.EconomicIndicatorService;
import io.sc.engine.st.vo.EconomicIndicatorVo;
import io.sc.platform.mvc.controller.support.RestCrudController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController("io.sc.engine.st.controller.EconomicIndicatorWebController")
@RequestMapping("/api/st/economicIndicator")
public class EconomicIndicatorWebController extends RestCrudController<EconomicIndicatorVo, EconomicIndicatorEntity,String, EconomicIndicatorRepository, EconomicIndicatorService> {
}

15
io.sc.engine.st/src/main/java/io/sc/engine/st/controller/FactorTypeWebController.java

@ -0,0 +1,15 @@
package io.sc.engine.st.controller;
import io.sc.engine.st.jpa.entity.FactorTypeEntity;
import io.sc.engine.st.jpa.repository.FactorTypeRepository;
import io.sc.engine.st.service.FactorTypeService;
import io.sc.engine.st.vo.FactorTypeVo;
import io.sc.platform.mvc.controller.support.RestCrudController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController("io.sc.engine.st.controller.FactorTypeWebController")
@RequestMapping("/api/st/factorType")
public class FactorTypeWebController extends RestCrudController<FactorTypeVo, FactorTypeEntity,String, FactorTypeRepository, FactorTypeService> {
}

15
io.sc.engine.st/src/main/java/io/sc/engine/st/controller/FactorWebController.java

@ -0,0 +1,15 @@
package io.sc.engine.st.controller;
import io.sc.engine.st.jpa.entity.FactorEntity;
import io.sc.engine.st.jpa.repository.FactorRepository;
import io.sc.engine.st.service.FactorService;
import io.sc.engine.st.vo.FactorVo;
import io.sc.platform.mvc.controller.support.RestCrudController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController("io.sc.engine.st.controller.FactorWebController")
@RequestMapping("/api/st/factor")
public class FactorWebController extends RestCrudController<FactorVo, FactorEntity,String, FactorRepository, FactorService> {
}

157
io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/entity/EconomicIndicatorEntity.java

@ -0,0 +1,157 @@
package io.sc.engine.st.jpa.entity;
import io.sc.engine.st.enums.StatisticalPeriodType;
import io.sc.engine.st.vo.EconomicIndicatorVo;
import io.sc.platform.orm.entity.CorporationAuditorEntity;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.Size;
@Entity(name="io.sc.engine.st.jpa.entity.EconomicIndicatorEntity" /* 避免和 io.sc.platform.system.dictionary.jpa.entity.DictionaryEntity 冲突 */)
@Table(name="ST_ECONOMIC_INDICATOR")
public class EconomicIndicatorEntity extends CorporationAuditorEntity<EconomicIndicatorVo> {
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
@Column(name="ID_", length=36)
@Size(max=36)
protected String id;
@Column(name="PERIOD_TYPE_")
@Enumerated(EnumType.STRING)
protected StatisticalPeriodType periodType;
@Column(name="YEAR_")
protected Integer year;
@Column(name="MONTH_")
protected Integer month;
@Column(name="QUARTER_")
protected Integer quarter;
@Column(name="GDP_")
protected Double gdp;
@Column(name="M2_")
protected Double m2;
@Column(name="CPI_")
protected Double cpi;
@Column(name="HPI_")
protected Double hpi;
@Column(name="PMI_")
protected Double pmi;
@Column(name="BLR_")
protected Double blr;
@Override
public EconomicIndicatorVo toVo() {
EconomicIndicatorVo vo =new EconomicIndicatorVo();
super.toVo(vo);
vo.setId(this.getId());
vo.setPeriodType(this.getPeriodType());
vo.setYear(this.getYear());
vo.setMonth(this.getMonth());
vo.setQuarter(this.getQuarter());
vo.setGdp(this.getGdp());
vo.setM2(this.getM2());
vo.setCpi(this.getCpi());
vo.setHpi(this.getHpi());
vo.setPmi(this.getPmi());
vo.setBlr(this.getBlr());
return vo;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public StatisticalPeriodType getPeriodType() {
return periodType;
}
public void setPeriodType(StatisticalPeriodType periodType) {
this.periodType = periodType;
}
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Integer getQuarter() {
return quarter;
}
public void setQuarter(Integer quarter) {
this.quarter = quarter;
}
public Double getGdp() {
return gdp;
}
public void setGdp(Double gdp) {
this.gdp = gdp;
}
public Double getM2() {
return m2;
}
public void setM2(Double m2) {
this.m2 = m2;
}
public Double getCpi() {
return cpi;
}
public void setCpi(Double cpi) {
this.cpi = cpi;
}
public Double getHpi() {
return hpi;
}
public void setHpi(Double hpi) {
this.hpi = hpi;
}
public Double getPmi() {
return pmi;
}
public void setPmi(Double pmi) {
this.pmi = pmi;
}
public Double getBlr() {
return blr;
}
public void setBlr(Double blr) {
this.blr = blr;
}
}

118
io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/entity/FactorEntity.java

@ -0,0 +1,118 @@
package io.sc.engine.st.jpa.entity;
import io.sc.engine.st.enums.PeriodType;
import io.sc.engine.st.enums.ValueType;
import io.sc.engine.st.vo.FactorTypeVo;
import io.sc.engine.st.vo.FactorVo;
import io.sc.platform.orm.entity.CorporationAuditorEntity;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
@Entity(name="io.sc.engine.st.jpa.entity.FactorEntity")
@Table(name="ST_FACTOR")
public class FactorEntity extends CorporationAuditorEntity<FactorVo> {
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
@Column(name="ID_", length=36)
@Size(max=36)
protected String id;
@Column(name="YEAR_")
protected Integer year;
@Column(name="QUARTER_")
protected Integer quarter;
@Column(name="MONTH_")
protected Integer month;
@Column(name="DAY_")
protected Integer day;
@Column(name="VALUE_", length=255)
@Size(max=255)
protected String value;
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="FACTOR_TYPE_ID_")
protected FactorTypeEntity factorType;
@Override
public FactorVo toVo() {
FactorVo vo =new FactorVo();
super.toVo(vo);
vo.setId(this.getId());
vo.setYear(this.getYear());
vo.setQuarter(this.getQuarter());
vo.setMonth(this.getMonth());
vo.setDay(this.getDay());
vo.setValue(this.getValue());
vo.setFactorType(this.getFactorType()==null?null:this.getFactorType().getId());
return vo;
}
public FactorEntity(){}
public FactorEntity(String id){
this.id =id;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
public Integer getQuarter() {
return quarter;
}
public void setQuarter(Integer quarter) {
this.quarter = quarter;
}
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Integer getDay() {
return day;
}
public void setDay(Integer day) {
this.day = day;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public FactorTypeEntity getFactorType() {
return factorType;
}
public void setFactorType(FactorTypeEntity factorType) {
this.factorType = factorType;
}
}

110
io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/entity/FactorTypeEntity.java

@ -0,0 +1,110 @@
package io.sc.engine.st.jpa.entity;
import io.sc.engine.st.enums.PeriodType;
import io.sc.engine.st.enums.ValueType;
import io.sc.engine.st.vo.FactorTypeVo;
import io.sc.platform.orm.entity.CorporationAuditorEntity;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
@Entity(name="io.sc.engine.st.jpa.entity.FactorTypeEntity")
@Table(name="ST_FACTOR_TYPE")
public class FactorTypeEntity extends CorporationAuditorEntity<FactorTypeVo> {
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid", strategy = "uuid2")
@Column(name="ID_", length=36)
@Size(max=36)
protected String id;
@Column(name="CODE_", length=255)
@NotBlank
@Size(max=255)
protected String code;
@Column(name="NAME_", length=255)
@NotBlank
@Size(max=255)
protected String name;
@Column(name="DESCRIPTION_", length=255)
@Size(max=255)
protected String description;
@Column(name="PERIOD_TYPE_", length=20)
@Enumerated(EnumType.STRING)
protected PeriodType periodType;
@Column(name="VALUE_TYPE_", length=20)
@Enumerated(EnumType.STRING)
protected ValueType valueType;
@Override
public FactorTypeVo toVo() {
FactorTypeVo vo =new FactorTypeVo();
super.toVo(vo);
vo.setId(this.getId());
vo.setCode(this.getCode());
vo.setName(this.getName());
vo.setDescription(this.getDescription());
vo.setPeriodType(this.getPeriodType());
vo.setValueType(this.getValueType());
return vo;
}
public FactorTypeEntity(){}
public FactorTypeEntity(String id){
this.id =id;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public PeriodType getPeriodType() {
return periodType;
}
public void setPeriodType(PeriodType periodType) {
this.periodType = periodType;
}
public ValueType getValueType() {
return valueType;
}
public void setValueType(ValueType valueType) {
this.valueType = valueType;
}
}

10
io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/repository/EconomicIndicatorRepository.java

@ -0,0 +1,10 @@
package io.sc.engine.st.jpa.repository;
import io.sc.engine.st.jpa.entity.EconomicIndicatorEntity;
import io.sc.platform.orm.repository.DaoRepository;
import org.springframework.stereotype.Service;
@Service("io.sc.engine.st.jpa.repository.EconomicIndicatorRepository")
public interface EconomicIndicatorRepository extends DaoRepository<EconomicIndicatorEntity,String>{
}

10
io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/repository/FactorRepository.java

@ -0,0 +1,10 @@
package io.sc.engine.st.jpa.repository;
import io.sc.engine.st.jpa.entity.FactorEntity;
import io.sc.platform.orm.repository.DaoRepository;
import org.springframework.stereotype.Service;
@Service("io.sc.engine.st.jpa.repository.FactorRepository")
public interface FactorRepository extends DaoRepository<FactorEntity,String>{
}

10
io.sc.engine.st/src/main/java/io/sc/engine/st/jpa/repository/FactorTypeRepository.java

@ -0,0 +1,10 @@
package io.sc.engine.st.jpa.repository;
import io.sc.engine.st.jpa.entity.FactorTypeEntity;
import io.sc.platform.orm.repository.DaoRepository;
import org.springframework.stereotype.Service;
@Service("io.sc.engine.st.jpa.repository.FactorTypeRepository")
public interface FactorTypeRepository extends DaoRepository<FactorTypeEntity,String>{
}

12
io.sc.engine.st/src/main/java/io/sc/engine/st/service/EconomicIndicatorService.java

@ -0,0 +1,12 @@
package io.sc.engine.st.service;
import io.sc.engine.st.jpa.entity.EconomicIndicatorEntity;
import io.sc.engine.st.jpa.repository.EconomicIndicatorRepository;
import io.sc.platform.orm.service.DaoService;
import io.sc.platform.orm.service.support.QueryParameter;
import org.springframework.data.domain.Page;
import java.util.Map;
public interface EconomicIndicatorService extends DaoService<EconomicIndicatorEntity, String, EconomicIndicatorRepository>{
}

8
io.sc.engine.st/src/main/java/io/sc/engine/st/service/FactorService.java

@ -0,0 +1,8 @@
package io.sc.engine.st.service;
import io.sc.engine.st.jpa.entity.FactorEntity;
import io.sc.engine.st.jpa.repository.FactorRepository;
import io.sc.platform.orm.service.DaoService;
public interface FactorService extends DaoService<FactorEntity, String, FactorRepository>{
}

8
io.sc.engine.st/src/main/java/io/sc/engine/st/service/FactorTypeService.java

@ -0,0 +1,8 @@
package io.sc.engine.st.service;
import io.sc.engine.st.jpa.entity.FactorTypeEntity;
import io.sc.engine.st.jpa.repository.FactorTypeRepository;
import io.sc.platform.orm.service.DaoService;
public interface FactorTypeService extends DaoService<FactorTypeEntity, String, FactorTypeRepository>{
}

14
io.sc.engine.st/src/main/java/io/sc/engine/st/service/impl/EconomicIndicatorServiceImpl.java

@ -0,0 +1,14 @@
package io.sc.engine.st.service.impl;
import io.sc.engine.st.jpa.entity.EconomicIndicatorEntity;
import io.sc.engine.st.jpa.repository.EconomicIndicatorRepository;
import io.sc.engine.st.service.EconomicIndicatorService;
import io.sc.platform.orm.service.impl.DaoServiceImpl;
import io.sc.platform.orm.service.support.QueryParameter;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Service;
@Service("io.sc.engine.st.service.impl.EconomicIndicatorServiceImpl")
public class EconomicIndicatorServiceImpl extends DaoServiceImpl<EconomicIndicatorEntity, String, EconomicIndicatorRepository> implements EconomicIndicatorService {
}

12
io.sc.engine.st/src/main/java/io/sc/engine/st/service/impl/FactorServiceImpl.java

@ -0,0 +1,12 @@
package io.sc.engine.st.service.impl;
import io.sc.engine.st.jpa.entity.FactorEntity;
import io.sc.engine.st.jpa.repository.FactorRepository;
import io.sc.engine.st.service.FactorService;
import io.sc.platform.orm.service.impl.DaoServiceImpl;
import org.springframework.stereotype.Service;
@Service("io.sc.engine.st.service.impl.FactorServiceImpl")
public class FactorServiceImpl extends DaoServiceImpl<FactorEntity, String, FactorRepository> implements FactorService {
}

12
io.sc.engine.st/src/main/java/io/sc/engine/st/service/impl/FactorTypeServiceImpl.java

@ -0,0 +1,12 @@
package io.sc.engine.st.service.impl;
import io.sc.engine.st.jpa.entity.FactorTypeEntity;
import io.sc.engine.st.jpa.repository.FactorTypeRepository;
import io.sc.engine.st.service.FactorTypeService;
import io.sc.platform.orm.service.impl.DaoServiceImpl;
import org.springframework.stereotype.Service;
@Service("io.sc.engine.st.service.impl.FactorTypeServiceImpl")
public class FactorTypeServiceImpl extends DaoServiceImpl<FactorTypeEntity, String, FactorTypeRepository> implements FactorTypeService {
}

106
io.sc.engine.st/src/main/java/io/sc/engine/st/vo/EconomicIndicatorVo.java

@ -0,0 +1,106 @@
package io.sc.engine.st.vo;
import io.sc.engine.st.enums.StatisticalPeriodType;
import io.sc.platform.orm.api.vo.CorporationAuditorVo;
public class EconomicIndicatorVo extends CorporationAuditorVo {
protected String id;
protected StatisticalPeriodType periodType;
protected Integer year;
protected Integer month;
protected Integer quarter;
protected Double gdp;
protected Double m2;
protected Double cpi;
protected Double hpi;
protected Double pmi;
protected Double blr;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public StatisticalPeriodType getPeriodType() {
return periodType;
}
public void setPeriodType(StatisticalPeriodType periodType) {
this.periodType = periodType;
}
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Integer getQuarter() {
return quarter;
}
public void setQuarter(Integer quarter) {
this.quarter = quarter;
}
public Double getGdp() {
return gdp;
}
public void setGdp(Double gdp) {
this.gdp = gdp;
}
public Double getM2() {
return m2;
}
public void setM2(Double m2) {
this.m2 = m2;
}
public Double getCpi() {
return cpi;
}
public void setCpi(Double cpi) {
this.cpi = cpi;
}
public Double getHpi() {
return hpi;
}
public void setHpi(Double hpi) {
this.hpi = hpi;
}
public Double getPmi() {
return pmi;
}
public void setPmi(Double pmi) {
this.pmi = pmi;
}
public Double getBlr() {
return blr;
}
public void setBlr(Double blr) {
this.blr = blr;
}
}

62
io.sc.engine.st/src/main/java/io/sc/engine/st/vo/FactorTypeVo.java

@ -0,0 +1,62 @@
package io.sc.engine.st.vo;
import io.sc.engine.st.enums.PeriodType;
import io.sc.engine.st.enums.ValueType;
import io.sc.platform.orm.api.vo.CorporationAuditorVo;
public class FactorTypeVo extends CorporationAuditorVo {
protected String id;
protected String code;
protected String name;
protected String description;
protected PeriodType periodType;
protected ValueType valueType;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public PeriodType getPeriodType() {
return periodType;
}
public void setPeriodType(PeriodType periodType) {
this.periodType = periodType;
}
public ValueType getValueType() {
return valueType;
}
public void setValueType(ValueType valueType) {
this.valueType = valueType;
}
}

74
io.sc.engine.st/src/main/java/io/sc/engine/st/vo/FactorVo.java

@ -0,0 +1,74 @@
package io.sc.engine.st.vo;
import io.sc.engine.st.enums.PeriodType;
import io.sc.engine.st.enums.ValueType;
import io.sc.platform.orm.api.vo.CorporationAuditorVo;
import javax.persistence.Column;
import javax.validation.constraints.Size;
public class FactorVo extends CorporationAuditorVo {
protected String id;
protected Integer year;
protected Integer quarter;
protected Integer month;
protected Integer day;
protected String value;
protected String factorType;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getYear() {
return year;
}
public void setYear(Integer year) {
this.year = year;
}
public Integer getQuarter() {
return quarter;
}
public void setQuarter(Integer quarter) {
this.quarter = quarter;
}
public Integer getMonth() {
return month;
}
public void setMonth(Integer month) {
this.month = month;
}
public Integer getDay() {
return day;
}
public void setDay(Integer day) {
this.day = day;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getFactorType() {
return factorType;
}
public void setFactorType(String factorType) {
this.factorType = factorType;
}
}

8
io.sc.engine.st/src/main/resources/io/sc/engine/st/i18n/enums.properties

@ -0,0 +1,8 @@
io.sc.engine.st.enums.PeriodType.YEAR=Year
io.sc.engine.st.enums.PeriodType.QUARTER=Quarter
io.sc.engine.st.enums.PeriodType.MONTH=Month
io.sc.engine.st.enums.PeriodType.DAY=Day
io.sc.engine.st.enums.ValueType.NUMBER=Number
io.sc.engine.st.enums.ValueType.STRING=String
io.sc.engine.st.enums.ValueType.DATE=Date

8
io.sc.engine.st/src/main/resources/io/sc/engine/st/i18n/enums_tw_CN.properties

@ -0,0 +1,8 @@
io.sc.engine.st.enums.PeriodType.YEAR=\u5E74
io.sc.engine.st.enums.PeriodType.QUARTER=\u5B63
io.sc.engine.st.enums.PeriodType.MONTH=\u6708
io.sc.engine.st.enums.PeriodType.DAY=\u65E5
io.sc.engine.st.enums.ValueType.NUMBER=\u6578\u5B57
io.sc.engine.st.enums.ValueType.STRING=\u5B57\u7B26\u4E32
io.sc.engine.st.enums.ValueType.DATE=\u65E5\u671F

8
io.sc.engine.st/src/main/resources/io/sc/engine/st/i18n/enums_zh_CN.properties

@ -0,0 +1,8 @@
io.sc.engine.st.enums.PeriodType.YEAR=\u5E74
io.sc.engine.st.enums.PeriodType.QUARTER=\u5B63
io.sc.engine.st.enums.PeriodType.MONTH=\u6708
io.sc.engine.st.enums.PeriodType.DAY=\u65E5
io.sc.engine.st.enums.ValueType.NUMBER=\u6570\u5B57
io.sc.engine.st.enums.ValueType.STRING=\u5B57\u7B26\u4E32
io.sc.engine.st.enums.ValueType.DATE=\u65E5\u671F

14
io.sc.platform.jdbc/src/main/java/io/sc/platform/jdbc/exporter/support/DataExportConfigure.java

@ -1,11 +1,25 @@
package io.sc.platform.jdbc.exporter.support; package io.sc.platform.jdbc.exporter.support;
import org.springframework.util.StringUtils;
public class DataExportConfigure { public class DataExportConfigure {
private String datasource; private String datasource;
private String schema; private String schema;
private ExportTable[] tables; private ExportTable[] tables;
private int fetchSize =1000; private int fetchSize =1000;
public String getSql(String tableName){
if(!StringUtils.hasText(tableName) || tables==null || tables.length==0){
return null;
}
for(ExportTable table : tables){
if(tableName.equalsIgnoreCase(table.getName())){
return table.getSql();
}
}
return null;
}
public String getDatasource() { public String getDatasource() {
return datasource; return datasource;
} }

2
io.sc.standard/src/main/java/io/sc/standard/jpa/entity/CurrencyEntity.java

@ -11,7 +11,7 @@ import javax.validation.constraints.Size;
* 货币 * 货币
*/ */
@Entity(name="io.sc.standard.jpa.entity.CurrencyEntity") @Entity(name="io.sc.standard.jpa.entity.CurrencyEntity")
@Table(name="ST_CURRENCY") @Table(name="SD_CURRENCY")
public class CurrencyEntity extends AuditorEntity<CurrencyVo> { public class CurrencyEntity extends AuditorEntity<CurrencyVo> {
// 代码(数字) // 代码(数字)
@Id @Id

Loading…
Cancel
Save