116 changed files with 9302 additions and 6146 deletions
@ -0,0 +1,203 @@ |
|||
<template> |
|||
<div> |
|||
<div class="row py-1 q-col-gutter-sm"> |
|||
<div class="col-2"> |
|||
<q-select |
|||
v-model="valueReactive.datasource" |
|||
:label="$t('developer.backend.export.liquibase.datasource')" |
|||
outlined |
|||
dense |
|||
emit-value |
|||
map-options |
|||
:options="datasourceOptionsRef" |
|||
@update:model-value=" |
|||
(value) => { |
|||
datasourceChanged(value); |
|||
} |
|||
" |
|||
></q-select> |
|||
</div> |
|||
<div class="col-2"> |
|||
<q-select |
|||
v-model="valueReactive.schema" |
|||
:label="$t('developer.backend.export.liquibase.schema')" |
|||
outlined |
|||
dense |
|||
emit-value |
|||
map-options |
|||
:options="schemaOptionsRef" |
|||
@update:model-value=" |
|||
(value) => { |
|||
schemaChanged(valueReactive.datasource, value); |
|||
} |
|||
" |
|||
></q-select> |
|||
</div> |
|||
<div class="col-8"> |
|||
<q-select |
|||
v-model="valueReactive.tables" |
|||
:label="$t('developer.backend.export.liquibase.tables')" |
|||
input-class="bg-red-200" |
|||
outlined |
|||
dense |
|||
emit-value |
|||
map-options |
|||
multiple |
|||
use-chips |
|||
:options="tablesOptionsRef" |
|||
@update:model-value=" |
|||
(value) => { |
|||
if (value) { |
|||
if (value.length > 1) { |
|||
valueReactive.sql = 'select * from ${table}'; |
|||
} else { |
|||
valueReactive.sql = 'select * from ' + value; |
|||
} |
|||
} |
|||
} |
|||
" |
|||
> |
|||
<template #append> |
|||
<q-btn |
|||
:title="$t('selectAll')" |
|||
icon="bi-check-square" |
|||
flat |
|||
dense |
|||
:disable="!(tablesOptionsRef?.length > 0)" |
|||
@click.stop.prevent=" |
|||
() => { |
|||
const selecteds = []; |
|||
if (tablesOptionsRef) { |
|||
for (const table of tablesOptionsRef) { |
|||
selecteds.push(table.value); |
|||
} |
|||
} |
|||
valueReactive.tables = selecteds; |
|||
} |
|||
" |
|||
/> |
|||
<q-btn |
|||
:title="$t('unSelectAll')" |
|||
icon="bi-square" |
|||
flat |
|||
dense |
|||
:disable="!(tablesOptionsRef?.length > 0)" |
|||
@click.stop.prevent=" |
|||
() => { |
|||
valueReactive.tables = []; |
|||
} |
|||
" |
|||
/> |
|||
</template> |
|||
</q-select> |
|||
</div> |
|||
</div> |
|||
<div class="row py-1 q-col-gutter-sm"> |
|||
<div class="col-12"> |
|||
<w-code-mirror v-model="valueReactive.sql" :label="$t('sql')" :rows="5" lang="sql"></w-code-mirror> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row justify-center q-gutter-md py-2"> |
|||
<WProgressBtn |
|||
ref="progressBtnRef" |
|||
icon="bi-database-down" |
|||
:label="$t('export')" |
|||
data-url="/api/jdbc/data/traceExporterExecuteProgress" |
|||
@click="exportData" |
|||
@success=" |
|||
(progressInfo) => { |
|||
Downloader.get(Environment.apiContextPath('/api/mvc/download?filePath=' + encodeURIComponent(progressInfo.result))); |
|||
} |
|||
" |
|||
></WProgressBtn> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { ref, reactive, onMounted, onUpdated } from 'vue'; |
|||
import { useI18n } from 'vue-i18n'; |
|||
import { axios, blobAxios, Environment, DialogManager, Downloader } from '@/platform'; |
|||
import WProgressBtn from '../platform/components/progress/WProgressBtn.vue'; |
|||
|
|||
const { t } = useI18n(); |
|||
const progressBtnRef = ref(); |
|||
const datasourceOptionsRef = ref([]); |
|||
const schemaOptionsRef = ref([]); |
|||
const tablesOptionsRef = ref([]); |
|||
|
|||
const valueReactive = reactive({ |
|||
datasource: undefined, |
|||
schema: undefined, |
|||
tables: undefined, |
|||
sql: undefined, |
|||
}); |
|||
|
|||
const loadDatasource = () => { |
|||
axios.get(Environment.apiContextPath('/api/system/datasource?pageable=false&sortBy=name')).then((response) => { |
|||
const data = response?.data.content; |
|||
if (data && data.length > 0) { |
|||
datasourceOptionsRef.value.splice(0, datasourceOptionsRef.value.length); |
|||
for (let item of data) { |
|||
datasourceOptionsRef.value.push({ label: item.name, value: item.name }); |
|||
} |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
const datasourceChanged = (datasource: string) => { |
|||
datasource = datasource || ''; |
|||
axios.get(Environment.apiContextPath('/api/jdbc/metadata/getSchemas?datasource=' + datasource)).then((response) => { |
|||
const data = response?.data; |
|||
if (data && data.length > 0) { |
|||
schemaOptionsRef.value.splice(0, schemaOptionsRef.value.length); |
|||
tablesOptionsRef.value.splice(0, tablesOptionsRef.value.length); |
|||
for (let item of data) { |
|||
schemaOptionsRef.value.push({ label: item.name, value: item.name }); |
|||
} |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
const schemaChanged = (datasource: string, schema: string) => { |
|||
datasource = datasource || ''; |
|||
schema = schema || ''; |
|||
axios.get(Environment.apiContextPath('/api/jdbc/metadata/getTables?datasource=' + datasource + '&schema=' + schema)).then((response) => { |
|||
const data = response?.data; |
|||
if (data && data.length > 0) { |
|||
tablesOptionsRef.value.splice(0, tablesOptionsRef.value.length); |
|||
for (let item of data) { |
|||
tablesOptionsRef.value.push({ label: item.name, value: item.name }); |
|||
} |
|||
} |
|||
}); |
|||
}; |
|||
|
|||
const exportData = (e) => { |
|||
DialogManager.confirm(t('developer.backend.export.liquibase.export.tip'), () => { |
|||
const data = valueReactive; |
|||
const config = { |
|||
datasource: data.datasource, |
|||
schema: data.schema, |
|||
tables: [], |
|||
}; |
|||
const length = data.tables.length; |
|||
const sql = length === 1 ? data.sql : ''; |
|||
for (let i = 0; i < length; i++) { |
|||
config.tables[i] = { name: data.tables[i], sql: sql ? sql : 'select * from ' + data.tables[i] }; |
|||
} |
|||
axios.post(Environment.apiContextPath('/api/jdbc/data/exportData'), config).then((response) => { |
|||
progressBtnRef.value.start(); |
|||
}); |
|||
}); |
|||
}; |
|||
|
|||
onMounted(() => { |
|||
loadDatasource(); |
|||
datasourceChanged(''); |
|||
}); |
|||
|
|||
onUpdated(() => { |
|||
loadDatasource(); |
|||
}); |
|||
</script> |
@ -0,0 +1,9 @@ |
|||
package io.sc.platform.core.enums; |
|||
|
|||
public enum ProgressStatus { |
|||
NOT_EXISTS, // 不存在
|
|||
NOT_RUNNING, // 未运行
|
|||
RUNNING, // 运行中
|
|||
COMPLETED, // 已完成
|
|||
ERROR; // 发生错误
|
|||
} |
@ -0,0 +1,4 @@ |
|||
package io.sc.platform.core.exception; |
|||
|
|||
public class ProgressableThreadIsNullException extends RuntimeException{ |
|||
} |
@ -0,0 +1,5 @@ |
|||
package io.sc.platform.core.exception; |
|||
|
|||
public class ProgressableThreadIsRunningException extends RuntimeException{ |
|||
|
|||
} |
@ -0,0 +1,4 @@ |
|||
package io.sc.platform.core.exception; |
|||
|
|||
public class ProgressableThreadNameIsNullException extends RuntimeException{ |
|||
} |
@ -0,0 +1,4 @@ |
|||
package io.sc.platform.core.exception; |
|||
|
|||
public class ProgressableThreadNotExistsException extends RuntimeException{ |
|||
} |
@ -0,0 +1,10 @@ |
|||
package io.sc.platform.core.service; |
|||
|
|||
import io.sc.platform.core.support.ProgressInfo; |
|||
import io.sc.platform.core.support.ProgressableThread; |
|||
|
|||
public interface ProgressableThreadService { |
|||
public ProgressInfo start(ProgressableThread progressableThread) throws Exception; |
|||
public ProgressInfo start(String name,ProgressableThread progressableThread) throws Exception; |
|||
public ProgressInfo getProgressInfo(String name) throws Exception; |
|||
} |
@ -0,0 +1,68 @@ |
|||
package io.sc.platform.core.service.impl; |
|||
|
|||
import io.sc.platform.core.enums.ProgressStatus; |
|||
import io.sc.platform.core.exception.ProgressableThreadIsNullException; |
|||
import io.sc.platform.core.exception.ProgressableThreadIsRunningException; |
|||
import io.sc.platform.core.exception.ProgressableThreadNameIsNullException; |
|||
import io.sc.platform.core.exception.ProgressableThreadNotExistsException; |
|||
import io.sc.platform.core.service.ProgressableThreadService; |
|||
import io.sc.platform.core.support.ProgressInfo; |
|||
import io.sc.platform.core.support.ProgressableThread; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.util.StringUtils; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
@Service |
|||
public class ProgressableThreadServiceImpl implements ProgressableThreadService { |
|||
private Map<String,ProgressableThread> threadMap =new HashMap<>(); |
|||
private Object lock =new Object(); |
|||
|
|||
@Override |
|||
public ProgressInfo start(ProgressableThread progressableThread) throws Exception { |
|||
if(progressableThread==null){ |
|||
throw new ProgressableThreadIsNullException(); |
|||
} |
|||
return start(progressableThread.getClass().getName(),progressableThread); |
|||
} |
|||
|
|||
@Override |
|||
public ProgressInfo start(String name, ProgressableThread progressableThread) throws Exception { |
|||
if(!StringUtils.hasText(name)){ |
|||
throw new ProgressableThreadNameIsNullException(); |
|||
} |
|||
if(progressableThread==null){ |
|||
throw new ProgressableThreadIsNullException(); |
|||
} |
|||
synchronized (lock){ |
|||
if(threadMap.containsKey(name)){ |
|||
ProgressableThread thread =threadMap.get(name); |
|||
if(thread!=null){ |
|||
if(thread.isAlive()){ |
|||
throw new ProgressableThreadIsRunningException(); |
|||
} |
|||
} |
|||
} |
|||
progressableThread.getProgressInfo().setStatus(ProgressStatus.RUNNING); |
|||
progressableThread.start(); |
|||
threadMap.put(name,progressableThread); |
|||
return progressableThread.getProgressInfo(); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public ProgressInfo getProgressInfo(String name) throws Exception { |
|||
if(!StringUtils.hasText(name)){ |
|||
throw new ProgressableThreadNameIsNullException(); |
|||
} |
|||
synchronized (lock){ |
|||
ProgressableThread thread =threadMap.get(name); |
|||
if(thread!=null){ |
|||
return thread.getProgressInfo(); |
|||
}else{ |
|||
throw new ProgressableThreadNotExistsException(); |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,12 @@ |
|||
package io.sc.platform.core.support; |
|||
|
|||
/** |
|||
* 可跟踪执行进度的线程 |
|||
*/ |
|||
public class ProgressableThread extends Thread { |
|||
protected ProgressInfo progressInfo =new ProgressInfo(); |
|||
|
|||
public ProgressInfo getProgressInfo() { |
|||
return progressInfo; |
|||
} |
|||
} |
@ -0,0 +1,235 @@ |
|||
= 银行业务分类 |
|||
商业银行最通用的分类是:负债业务(商业银行形成资金来源的业务),资产业务(商业银行运用资金的业务), |
|||
中间业务(银行不需运用自己的资金,代客户承办支付和其他委托事项而收取手续费的业务)。 |
|||
|
|||
image::bank-business/001.png[,90%] |
|||
|
|||
== 资产业务 |
|||
资产业务,是商业银行的主要收入来源。 |
|||
|
|||
=== 贷款(放款)业务 |
|||
==== 信用贷款:信用贷款,指单凭借款人的信誉,而不需提供任何抵押品的贷款,是一种资本贷款。 |
|||
* 普通借款限额:企业与银行订立一种非正式协议,以确定一个贷款,在限额内,企业可随时得到银行的贷款支持,限额的有效期一般不超过90天。普通贷款限额内的贷款,利率是浮动的,与银行的优惠利率挂钩。 |
|||
* 透支贷款:银行通过允许客户在其帐户上透支的方式向客户提供贷款。提供这种便利被视为银行对客户所承担的合同之外的“附加义务”。 |
|||
* 备用贷款承诺:备用贷款承诺,是一种比较正式和具有法律约束的协议。银行与企业签订正式合同,在合同中银行承诺在指定期限和限额内向企业提供相应贷款,企业要为银行的承诺提供费用。 |
|||
* 消费者贷款:消费者贷款是对消费个人发放的用于购买耐用消费品或支付其他费用的贷款,商业银行向客户提供这种贷款时,要进行多方面的审查。 |
|||
* 票据贴现贷款:票据贴现贷款,是顾客将未到期的票据提交银行,由银行扣除自贴现日起至到期日止的利息而取得现款。 |
|||
|
|||
==== 抵押贷款:抵押贷款有以下几种类型 |
|||
存货贷款也称商品贷款,是一种以企业的存贷或商品作为抵押品的短期贷款。 |
|||
|
|||
客帐贷款银行发放的以应收帐款作为抵押的短期贷款,称为“客帐贷款”。这种贷款一般都为一种持续性的信贷协定。 |
|||
|
|||
证券贷款银行发放的企业借款,除以应收款和存货作为抵押外,也有不少是用各种证券特别是公司企业发行的股票和债券作押的。这类贷款称为“证券贷款”。 |
|||
|
|||
不动产抵押贷款通常是指以房地产或企业设备抵押品的贷款。 |
|||
|
|||
==== 保证书担保贷款: |
|||
保证书担保贷款,是指由经第三者出具保证书担保的贷款。保证书是保证为借款人作贷款担保,与银行的契约性文件,其中规定了银行和保证人的权利和义务。银行只要取得经保证人签字的银行拟定的标准格式保证书,即可向借款人发放贷款。所以,保证书是银行可以接受的最简单的担保形式。 |
|||
|
|||
==== 贷款证券化: |
|||
贷款证券化是指商业银行通过一定程序将贷款转化为证券发行的总理资过程。具体做法是:商业银行将所持有的各种流动性较差的贷款,组合成若干个资产库(Assets Pool),出售给专业性的融资公司(Special PurposeCorporation),再由融资公司以这些资产库为担保,发行资产抵押证券。这种资产抵押证券同样可以通过证券发行市场发行或私募的方式推销给投资者。出售证券所收回的资金则可做为商业银行新的资金来源再用于发放其它贷款。 |
|||
|
|||
=== 投资业务 |
|||
商业银行的投资业务是指银行购买有价证券的活动。投资是商业银行一项重要的资产业务,是银行收入的主要来源之一。商业银行的投资业务,按照对象的不同,可分为国内证券投资和国际证券投资。 |
|||
|
|||
国内证券投资国内证券投资大体可分为三种类型: |
|||
|
|||
政府证券投资 |
|||
|
|||
国家政府发行的证券,按照销售方式的不同,可以分为两种,一种叫作公开销售的证券,一种叫作不公开销售的证券。商业银行购买的政府证券,包括国库券、中期债券和长期债券三种。 |
|||
|
|||
. 国库券。国库券是政府短期债券,期限在一年以下。 |
|||
. 中长期债券。中长期债券是国家为了基建投资的资金需要而发行的一种债券,其利率一般较高,期限也较长,是商业银行较好的投资对象。 |
|||
. 长期债券 |
|||
|
|||
== 负债业务 |
|||
负债是银行由于授信而承担的将以资产或资本偿付的能以货币计量的债务。存款、派生存款是银行的主要负债,约占资金来源的80%以上,另外联行存款、同业存款、借入或拆入款项或发行债券等,也构成银行的负债。 |
|||
|
|||
=== 活期存款 |
|||
活期存款是相对于定期存款而言的,是不需预先通知可随时提取或支付的存款。 |
|||
|
|||
活期存款构成了商业银行的重要资金来源,也是商业银行创造信用的重要条件。但成本较高。商业银行只向客户免费或低费提供服务,一般不支付或较少支付利息。 |
|||
|
|||
=== 定期存款 |
|||
定期存款是相对于活期存款而言的,是一种由存户预先约定期限的存款。定期存款占银行存款比重较高。因为定期存款固定而且比较长,从而为商业银行提供了稳定的资金来源,对商业银行长期贷款与投资具有重要意义。 |
|||
|
|||
=== 储蓄存款 |
|||
储蓄存款是个人为积蓄货币和取得利息收入而开立的存款帐户,储蓄存款又可分为活期和定期。 |
|||
|
|||
储蓄存款的活期存款,或者称为活期储蓄存款,存取无一定期期限,只凭存折便可提现。存折一般不能转让流通,存户不能透支款项。 |
|||
|
|||
=== 可转让定期存单(CDs) |
|||
可转让定期存单存款是定期存款的一种主要形式,但与前述定期存款又有所区别。可转让存单存款的明显特点是:存单面额固定,不记姓名,利率有固定也有浮动,存期为3个月、6个月、9个月和12个月不等。存单能够流通转让,以能够满足流动性和盈利性的双重要求。 |
|||
|
|||
=== 可转让支付命令存款帐户 |
|||
它实际上是一种不使用支票的支票帐户。它以支付命令书取代了支票。通过此帐户,商业银行既可以提供支付上的便利,又可以支付利息,从而吸引储户,扩大存款。 |
|||
|
|||
=== 自动转帐服务存款帐户 |
|||
这一帐户与可转让支付命令存款帐户类似,是在电话转帐服务基础上发展而来。发展到自动转帐服务时,存户可以同时在银行开立两个帐户:储蓄帐户和活期存款帐户。银行收到存户所开出的支票需要付款时,可随即将支付款项从储蓄帐户上转到活期存款帐户上,自动转帐,即时支付支票上的款项。 |
|||
|
|||
=== 掉期存款 |
|||
掉期存款指的是顾客在存款时把手上的由名义上兑换成其所选择的外币,作为外币定期存款存入银行。到期满时顾客先将外币存款连本带息兑回本币后才提取。存款期限由一个月至一年不等。 |
|||
|
|||
== 中间业务 |
|||
中间业务又称表外业务,其收入不列入银行资产负债表。 |
|||
|
|||
=== 结算业务 |
|||
结算业务是由商业银行的存款业务衍生出来的一种业务。 |
|||
|
|||
==== 结算工具 |
|||
结算工具就是商业银行用于结算的各种票据。目前可选择使用的票据结算工具主要包括银行汇票、商业汇票、银行本票和支票等。 |
|||
|
|||
. 银行汇票:由企业单位或个人将款项交存开户银行,由银行签发给其持往异地采购商品时办理结算或支配现金的票据。 |
|||
. 商业汇票:由企业签发的一种票据,适用于企业单位先发货后收款或双方约定延期付款的商品交易。 |
|||
. 银行本票:申请人将款项交存银行,由银行签发给其凭以办理转帐或支取现金的票据。可分为不定额本票和定额本票。 |
|||
. 支票:由企业单位或个人签发的,委托其开户银行付款的票据,是我国传统的票据结算工具,可用于支取现金和转帐。 |
|||
|
|||
==== 结算方式 |
|||
===== 同城结算方式 |
|||
. 支票结算: 商业银行最主要或大量的同城结算方式是支票结算。支票结算就是银行顾客根据其在银行的存款和透支限额开出支票,命令银行从其帐户中支付一定款项给收款人,从而实现资金调拨,了结债权债务关系的一种过程。 |
|||
. 帐单支票与划拨制度: 这是不用开支票,通过直接记帐而实现资金结算的方式。 |
|||
. 直接贷记转帐和直接借记转帐: 这两种结算方式是在自动交换所的基础上发展起来的。自动交换所交换的是磁带而不是支票。它通过电子计算机对各行送交的磁带进行处理,实现不同银行资金结算。 |
|||
. 票据交换所自动转帐系统: 这是一种进行同城同业资金调拨的系统。参加这种系统的银行之间,所有同业拆借、外汇买卖、汇划款项等将有关数据输入到自动转帐系统的终端机,这样收款银行立即可以收到有关信息,交换所同时借记付款银行帐户,贷记收款银行帐户。 |
|||
|
|||
===== 异地结算方式 |
|||
. 汇款结算: 汇款结算(Remittance),是付款人委托银行将款项汇给外地某收款人的一种结算方式。汇款结算又分为电汇、信汇和票汇三种形式。 |
|||
. 托收结算: 托收结算(Collection),是指债权人或售货人为向外地债务人或购货人收取款项而向其开出汇票,并委托银行代为收取款项的一种结算方式。托收业务主要有光票托收和跟单托收两类。 |
|||
. 信用证结算: 信用证(Letter ofCredit),一种有条件的银行付款承诺,即开证银行根据进口商的指示,向出口商开立的,授权其签发以进口商或银行为付款人的汇票,保证在条款规定条件下必定付款或承兑的文件。 |
|||
. 电子资金划拨系统: 随着电子计算机等新技术投入银行运用,电子计算机的大型化和网络化改变了商业银行异地资金结算的传统处理方式。通过电子资金结算系统进行异地结算,使资金周转大大加快,业务费用大大降低。 |
|||
|
|||
=== 信用证业务 |
|||
信用证(Letter ofCredit),作为商业贸易的手段之一,银行信用证是进口商的代理银行为进口商提供自身的信用,保证在一定的条件下承付出口商开给进口商的票据,即将所开票据当作是开给本行的票据。所谓信用证即是保证承付这些票据的证书。 |
|||
|
|||
==== 信用证的种类 |
|||
. 银行信用证: 汇票的接受人是银行,开证行或受其委托的保兑银行承兑开给自己的汇票,这种信用证是银行信用证(Bank Credit)。 |
|||
. 不可撤销信用证与可撤销信用证: 不可撤销信用证(IrrevocableCredit),是指开证行一旦开立了信用证并将之通知了受益人,在其有效期间,如若没有开证委托人、受益人或已依据此信用证贴现汇票的银行的同意,不可单方面地撤销此信用证,也不可变更其条件。 |
|||
. 保兑信用证与不保兑信用证: 开证行以外的银行对卖方开出的汇票保证兑付,这种信用证称为保兑信用证(Confirmed Credit),而无此保证者则称为不保兑信用证(UnconfirmedCredit)。 |
|||
. 一般信用证和特定信用证: 信用证的开证行特别指定某一银行贴现根据此信用证开出的汇票,这种信用证称为特定信用证(Special or Restricted Credit ),而不限定贴现银行者称为普通信用证(Generalor Open Credit)。 |
|||
|
|||
=== 信托业务 |
|||
信托(Trust),可以从两方面考察,从委托人来说,信托是为自己或为第三者的利益,把自己的财产委托别人管理或处理的一种行为;从受托人来说,信托是受委托人的委托,为了受益人的利益,代为管理、营运或处理信托人托管财产的一种过程。广义的信托还包括代理业务,如受托代办有价证券的签证、发行、收回、掉换、转让、还本付息以及代客保管物品等。 |
|||
|
|||
信托与代理的主要区别在于财产权是否转移,如果财产权从委托人转移到受托人,则是信托关系,而代理则不涉及财产权转移。 |
|||
|
|||
信托关系(FiduciaryRelationship)是一种包括委托人、受托人和受益人在内的多边关系。 |
|||
|
|||
按信托方式划分:投资信托、融资信托、公益信托、职工福利信托。 |
|||
|
|||
. 证券投资信托: 证券投资信托是以投资有价证券,获取投资收益为目的信托。它是由信托部门将个人或企业、团体的投资资金集中起来,代替投资者进行投资,最后将投资收益和本金偿还给受益人。 |
|||
. 动产或不动产信托: 动产或不动产信托是由大型设备或财产的所有者提出的、以融通资金为目的信托。 |
|||
. 公益信托业务: 公益信托是一种由个人或团体捐赠或募集的基金,以用于公益事业为目的的信托。 |
|||
|
|||
=== 租赁业务 |
|||
. 融资性租赁(Financial Lease ): 是以融通资金为目的租赁。一般先由承租人自行从供货处选好所需设备,并谈妥交易条件,然后找出租人(金融机构或其附属的专业子公司),要求后者按谈妥的条件向供货商购买设备,并签订租赁合同,取得设备使用权,并按期交纳租金。这时出租人支付了全部资金,等于提供了百分之百的信贷,因此又叫融资性租赁或资本性租赁。 |
|||
. 操作性租赁(Operating Lease): 又叫服务性租赁,是由出租人向承租人提供一种特殊服务的租赁。这种特殊服务主要是指设备的短期使用或利用服务,如出租人买下库房、车船、电子计算机等,然后出租给承租人。操作性租赁通常适用于一些需要专门技术进行保养、技术更新、使用频度不高的设备。 |
|||
. 出售与返租式租赁(Sale and Lease back): 是财产所有人将其财产出售以后又租回使用的一种租赁方式。这种租赁的后半段与一般租赁完全相同,只是增加了前半段的出售过程,财产所有者又变成了财产使用者。 |
|||
. 转租赁(Sublease ): 是将设备或财产进行两次重复租赁的方式。国际租赁中通常采用这种租赁方式。 |
|||
|
|||
=== 代理业务 |
|||
代理融通(Factoring)又叫代收帐款或收买应收帐款,是由商业银行或专业代理融通公司代顾客收取应收款项,并向顾客提供资金融通的一种业务方式。 |
|||
|
|||
代理融通业务一般涉及三方面当事人,一是商业银行或经营代理融通业务的公司,二是出售应收帐款、取得资金融通的工商企业,三是取得商业信用及赊欠工商企业贷款的顾客。三者的关系是,工商企业对顾客赊销货物或劳务,然后把应收的赊销帐款转让给银行或代理融通公司,由后者向企业提供资金并到期向顾客收帐。 |
|||
|
|||
=== 银行卡业务 |
|||
. 信用卡: 信用卡是消费信贷的一种工具和形式,具有“先消费”、方便消费者的特点。信用卡的种类很多,除银行发行的信用卡外,还有商业和其他服务业发行的零信用卡、旅游娱乐卡等。 |
|||
. 支票卡: 支票卡又叫保证卡,供客户开发支票时证明其身份的发卡。卡片载明客户的帐户、签名和有效期限。 |
|||
. 自动出纳机卡和记帐卡: 自动出纳机卡是一种印有磁带、专供在自动出纳机上使用的塑料卡。卡上除标明发行银行、卡片号码外,磁带上还记录有客户的存款户帐号、密码和余额。 |
|||
. 灵光卡和激光卡: 灵光卡又叫记帐卡、方便卡,是一种带微型集成电路的塑料卡片,具有自动、数据处理和储存的功能,卡片可以记录客户每笔收支和存款余额。 |
|||
|
|||
=== 咨询业务 |
|||
在现代社会,信息已成为社会发展的主要支柱之一。商业银行通过资金运动的记录,以及与资金运动相关资料的收集整理,可以为企业提供丰富实用的经济信息。其主要内容有:企业财务资料资信评价;商品市场供需结构变化趋势介绍;金融市场动态分析。 |
|||
|
|||
== 国际业务 |
|||
=== 国际结算业务 |
|||
国际间进行贸易和非贸易往来而发生的债权债务,要用货币收付,在一定的形式和条件下结清,这样就产生了国际结算业务。国际结算方式是从简单的现金结算方式,发展到比较完善的银行信用证方式,货币的收付形成资金流动,而资金的流动又须通过各种结算工具的传送来实现。 |
|||
|
|||
国际间进行贸易和非贸易往来而发生的债权债务,要用货币收付,在一定的形式和条件下结清,这样就产生了国际结算业务。国际结算方式是从简单的现金结算方式,发展到比较完善的银行信用证方式,货币的收付形成资金流动,而资金的流动又须通过各种结算工具的传送来实现。 |
|||
|
|||
==== 汇款结算业务 |
|||
汇款是付款人把应付款项交给自己的往来银行,请求银行代替自己通过邮寄的方法,把款项支付给收款人的一种结算方式。银行接到付款人的请求后,收下款项,然后以某种方式通知收款人所在地的代理行,请它向收款人支付相同金额的款项。最后,两个银行通过事先的办法,结清两者之间的债权债务。汇款结算方式一般涉及四个当事人,即汇款人、收款人、汇出行和汇入行。 |
|||
|
|||
国际汇款结算业务基本上分为三大类,即电汇、信汇和票汇。 |
|||
|
|||
==== 托收结算业务 |
|||
托收是债权人为向国外债务人收取款项而向其开发汇票,委托银行代收的一种结算方式。 |
|||
|
|||
一笔托收结算业务通常有四个当事人,即委托人、托收银行、代收银行和付款人。 |
|||
|
|||
西方商业银行办理的国际托收结算业务为两大类,一类为光票托收,另一类为跟单托收。 |
|||
|
|||
==== 信用证结算业务 |
|||
信用证结算方式是指进出口双方签订买卖合同后,进口商主动请示进口地银行向出口商开立信用证,对自己的付款责任作出保证。当出口商按照信用证的条款履行了自己的责任后,进口商将货款通过银行交付给出口商。 |
|||
|
|||
一笔信用证结算业务所涉及的基本当事人有三个,即开证申请人、受益人和开证银行。 |
|||
|
|||
==== 担保业务 |
|||
在国际结算过程中,银行还经常以本身的信誉为进出口商提供担保,以促进结算过程的顺利进行。目前为进出口结算提供的担保主要有两种形式,即银行保证书和备用信用证。 |
|||
|
|||
银行保证书(Letterof Guarantee) |
|||
|
|||
银行保证书又称保函,是银行应委托人的请求,向受益人开出的担保被保证人履行职责的一种文件。 |
|||
|
|||
备用信用证(Stand-byLetter of Credit) |
|||
|
|||
备用信用证是一种银行保证书性质的凭证。它是开证行对受益人开出的担保文件。保证开证申请人履行自己的职责,否则银行负责清偿所欠受益的款项。 |
|||
|
|||
=== 国际信贷与投资 |
|||
国际信贷与投资是商业银行国际业务中的资产业务。国际信贷与投资与国内资产业务有所不同。这种业务的对象绝大部分是国外借款者。 |
|||
|
|||
==== 进出口融资 |
|||
商业银行国际信贷活动的一个重要方面,是为国际贸易提供资金融通。这种资金融通的对象,包括本国和外国的进出口商人。 |
|||
|
|||
商业银行为进出口贸易提供资金融通的形式很多,主要有以下几种: |
|||
|
|||
进口押汇,是指进出口双方签订买卖合同后,进口方请求进口地的某个银行(一般为自己的往来银行),向出口方开立保证付款文件,大多为信用证。然后,开证行将此文件寄送给出口商,出口商见证后,将货物发运给进口商。银行为进口商开立信用保证文件的这一过程。 |
|||
|
|||
出口押汇,出口商根据买卖合同的规定向进口商发出货物后,取得了各种单据,同时,根据有关条款,向进口商开发汇票。 |
|||
|
|||
另外,提供资金融通的方式还有打包贷款,票据承兑,出口贷款等。 |
|||
|
|||
==== 国际贷款 |
|||
国际贷款由于超越了国界,在贷款的对象、贷款的风险、贷款的方式等方面,都与国内贷款具有不同之处。商业银行国际贷款的类型,可以从不同的角度进行划分。 |
|||
|
|||
根据贷款对象的不同,可以划分为个人贷款、企业贷款、银行间贷款以及对外国政府和中央银行的贷款。 |
|||
|
|||
根据贷款期限的不同,可以划分为短期贷款、中期贷款和长期贷款,这种期限的划分与国内贷款形式大致相同。 |
|||
|
|||
根据贷款银行的不同,可以划分为单一银行贷款和多银行贷款。 |
|||
|
|||
单一银行贷款:是指贷款资金仅由一个银行提供。一般来说,单一银行贷款一般数额较小,期限较短。 |
|||
|
|||
多银行贷款:是指一笔贷款由几家银行共同提供,这种贷款主要有两种类型:第一,参与制贷款。第二,辛迪加贷款。 |
|||
|
|||
==== 国际投资 |
|||
根据证券投资对象的不同。商业银行国际投资可以分为外国债券投资和欧洲债券投资两种。 |
|||
|
|||
外国债券投资。 |
|||
|
|||
外国债券(ForeignBond)是指由外国债务人在投资人所在国发行的,以投资国货币标价的借款凭证。外国债券的发行人包括外国公司、外国政府和国际组织。外国债券的购买人为债权国的工商企业、金融机构以及个人等,其中,商业银行是重要的投资者。 |
|||
|
|||
欧洲债券投资。 |
|||
|
|||
欧洲债券(Europe-Bond)是指债务人在欧洲金融市场上发行的,以销售国以外的货币标价的借款凭证。欧洲债券是目前国际债券的最主要形式。 |
|||
|
|||
欧洲债券有很多形式: |
|||
|
|||
. 普通债券(Straight Band): 这是欧洲债券的基本形式,其特点是:债券的利息固定,有明确的到期日,由于所支付的利息不随金融市场上利率的变化而升降,因此,当市场利率波动剧烈时,就会影响其发行量。 |
|||
. 复合货币债券(Multiple-Currency Bond): 债务人发行债券时,以几种货币表示债券的面值。投资人购买债券时,以其中的一种货币付款。 |
|||
. 浮动利率债券(Floating Rate Bond): 浮动利率债券是指债券的票面利率随金融市场利率水平的变化而调整的债券。 |
|||
. 可转换为股票的债券(Convertible Euro-Bond): 这种债券的特点是:债务人在发行债券时事行授权,投资者可以根据自己的愿望,将此种债券转换为发行公司的股票,成为该公司的股东。 |
|||
|
|||
商业银行的国际业务中,外汇交易业务也是很重要的一部分,它包括:外汇头寸、即期外汇买卖、远期外汇买卖、期权交易、套汇与套利、以及投机等。 |
|||
|
|||
== 银行间交易业务 |
|||
=== 联行往来的基本概念 |
|||
社会资金往来运动最终要体现在银行间的划拨上,当资金结算业务发生时,必然要通过两个或两个以上的银行机构往来才能完成,如果往来双方同属一个银行系统,即同属一个总行的各个分支机构间的资金帐务往来,则称其为联行往来: |
|||
|
|||
. 全国联行往来: 全国联行往来适用于总行与所属各级分支之间以及不同省、自治区、直辖市各机构之间的资金帐务往来。全国联行往业帐务由总行负责监督管理。 |
|||
. 分行辖内往来: 分行辖内往来适用于省、自治区、直辖市分行与所辖各分支机构之间以及同一省、自治区、直辖市辖内各银行机构之间的资金帐务往来。分行辖内联行在往来帐务由分行负责监督管理。 |
|||
. 支行辖内往来: 支行辖内往来适用于县(市)支行与所属各机构之间以及同一县(市)支行内各机构之间的资金帐务往来。其所涉及的帐务由县(市)支行管理监督。 |
|||
|
|||
=== 联行往来账务核算 |
|||
. 发报行核算: 发报行是联行往来帐务的发生行,是保证联行帐务正确进行的基础,对整个联行工作质量,起着重要作用。包括:报单的编制;报单的审查与寄发;联行往帐报告表的编制。 |
|||
. 收报行核算: 收报行是联行往帐的受理者,它对发报行寄来的联行报单及所附凭证,必须进行认真审核和再复核,并应准确、迅速办理转帐和对帐,以保证全国联行往来核算工作的正确进行。 |
|||
. 总行电子计算中心: 总行电子计算中心是对全国联行往来帐务进行逐笔集中监督的部门,它根据联行往帐报告表监督联行往帐;按收报行行号编制对帐表,寄收报行对帐,监督联行来帐,以保证全国联行往帐与来帐双方一致。 |
Binary file not shown.
After Width: | Height: | Size: 393 KiB |
@ -0,0 +1,47 @@ |
|||
package io.sc.platform.installer.support; |
|||
|
|||
import io.sc.platform.core.enums.ProgressStatus; |
|||
import io.sc.platform.core.support.ProgressableThread; |
|||
import io.sc.platform.core.util.StringUtil; |
|||
import io.sc.platform.installer.service.InstallerService; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
|
|||
import java.util.Map; |
|||
|
|||
public class InstallerProgressableThread extends ProgressableThread { |
|||
private static final Logger log = LoggerFactory.getLogger(InstallerProgressableThread.class); |
|||
private InstallerService installerService; |
|||
private Map<String,String> config; |
|||
|
|||
@Override |
|||
public void run() { |
|||
if(installerService!=null && config!=null){ |
|||
try { |
|||
installerService.install(config,progressInfo); |
|||
progressInfo.setStatus(ProgressStatus.COMPLETED); |
|||
} catch (Exception e) { |
|||
log.error("",e); |
|||
progressInfo.setStatus(ProgressStatus.ERROR); |
|||
progressInfo.setErrorMessage(e.getMessage()); |
|||
progressInfo.setErrorStackTrace(StringUtil.getStackTrace(e)); |
|||
} |
|||
} |
|||
} |
|||
|
|||
public InstallerService getInstallerService() { |
|||
return installerService; |
|||
} |
|||
|
|||
public void setInstallerService(InstallerService installerService) { |
|||
this.installerService = installerService; |
|||
} |
|||
|
|||
public Map<String, String> getConfig() { |
|||
return config; |
|||
} |
|||
|
|||
public void setConfig(Map<String, String> config) { |
|||
this.config = config; |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
package io.sc.standard.api; |
|||
|
|||
import io.sc.platform.orm.api.vo.AuditorVo; |
|||
|
|||
public class CounterpartyVo extends AuditorVo { |
|||
private String code; |
|||
private String name; |
|||
private String description; |
|||
private String mappingCode; |
|||
private String mappingName; |
|||
private String mappingDescription; |
|||
|
|||
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 String getMappingCode() { |
|||
return mappingCode; |
|||
} |
|||
|
|||
public void setMappingCode(String mappingCode) { |
|||
this.mappingCode = mappingCode; |
|||
} |
|||
|
|||
public String getMappingName() { |
|||
return mappingName; |
|||
} |
|||
|
|||
public void setMappingName(String mappingName) { |
|||
this.mappingName = mappingName; |
|||
} |
|||
|
|||
public String getMappingDescription() { |
|||
return mappingDescription; |
|||
} |
|||
|
|||
public void setMappingDescription(String mappingDescription) { |
|||
this.mappingDescription = mappingDescription; |
|||
} |
|||
} |
@ -0,0 +1,131 @@ |
|||
package io.sc.standard.api; |
|||
|
|||
import io.sc.platform.orm.api.vo.AuditorVo; |
|||
|
|||
public class CountryVo extends AuditorVo { |
|||
private String code; |
|||
private String codeLatin2; |
|||
private String codeLatin3; |
|||
private String nameChinese; |
|||
private String nameChineseFull; |
|||
private String nameEnglish; |
|||
private String nameEnglishFull; |
|||
private String nameLocalShort; |
|||
private String remarkChinese; |
|||
private String remarkEnglish; |
|||
private String languageCode2; |
|||
private String languageCode3; |
|||
private Boolean isIndependent; |
|||
private String currency; |
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getCodeLatin2() { |
|||
return codeLatin2; |
|||
} |
|||
|
|||
public void setCodeLatin2(String codeLatin2) { |
|||
this.codeLatin2 = codeLatin2; |
|||
} |
|||
|
|||
public String getCodeLatin3() { |
|||
return codeLatin3; |
|||
} |
|||
|
|||
public void setCodeLatin3(String codeLatin3) { |
|||
this.codeLatin3 = codeLatin3; |
|||
} |
|||
|
|||
public String getNameChinese() { |
|||
return nameChinese; |
|||
} |
|||
|
|||
public void setNameChinese(String nameChinese) { |
|||
this.nameChinese = nameChinese; |
|||
} |
|||
|
|||
public String getNameChineseFull() { |
|||
return nameChineseFull; |
|||
} |
|||
|
|||
public void setNameChineseFull(String nameChineseFull) { |
|||
this.nameChineseFull = nameChineseFull; |
|||
} |
|||
|
|||
public String getNameEnglish() { |
|||
return nameEnglish; |
|||
} |
|||
|
|||
public void setNameEnglish(String nameEnglish) { |
|||
this.nameEnglish = nameEnglish; |
|||
} |
|||
|
|||
public String getNameEnglishFull() { |
|||
return nameEnglishFull; |
|||
} |
|||
|
|||
public void setNameEnglishFull(String nameEnglishFull) { |
|||
this.nameEnglishFull = nameEnglishFull; |
|||
} |
|||
|
|||
public String getNameLocalShort() { |
|||
return nameLocalShort; |
|||
} |
|||
|
|||
public void setNameLocalShort(String nameLocalShort) { |
|||
this.nameLocalShort = nameLocalShort; |
|||
} |
|||
|
|||
public String getRemarkChinese() { |
|||
return remarkChinese; |
|||
} |
|||
|
|||
public void setRemarkChinese(String remarkChinese) { |
|||
this.remarkChinese = remarkChinese; |
|||
} |
|||
|
|||
public String getRemarkEnglish() { |
|||
return remarkEnglish; |
|||
} |
|||
|
|||
public void setRemarkEnglish(String remarkEnglish) { |
|||
this.remarkEnglish = remarkEnglish; |
|||
} |
|||
|
|||
public String getLanguageCode2() { |
|||
return languageCode2; |
|||
} |
|||
|
|||
public void setLanguageCode2(String languageCode2) { |
|||
this.languageCode2 = languageCode2; |
|||
} |
|||
|
|||
public String getLanguageCode3() { |
|||
return languageCode3; |
|||
} |
|||
|
|||
public void setLanguageCode3(String languageCode3) { |
|||
this.languageCode3 = languageCode3; |
|||
} |
|||
|
|||
public Boolean getIsIndependent() { |
|||
return isIndependent; |
|||
} |
|||
|
|||
public void setIsIndependent(Boolean isIndependent) { |
|||
this.isIndependent = isIndependent; |
|||
} |
|||
|
|||
public String getCurrency() { |
|||
return currency; |
|||
} |
|||
|
|||
public void setCurrency(String currency) { |
|||
this.currency = currency; |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
package io.sc.standard.api; |
|||
|
|||
import io.sc.platform.orm.api.vo.AuditorVo; |
|||
|
|||
public class CurrencyVo extends AuditorVo { |
|||
private String code; |
|||
private String codeLatin; |
|||
private String nameChinese; |
|||
private String nameEnglish; |
|||
private String precision; |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getCodeLatin() { |
|||
return codeLatin; |
|||
} |
|||
|
|||
public void setCodeLatin(String codeLatin) { |
|||
this.codeLatin = codeLatin; |
|||
} |
|||
|
|||
public String getNameChinese() { |
|||
return nameChinese; |
|||
} |
|||
|
|||
public void setNameChinese(String nameChinese) { |
|||
this.nameChinese = nameChinese; |
|||
} |
|||
|
|||
public String getNameEnglish() { |
|||
return nameEnglish; |
|||
} |
|||
|
|||
public void setNameEnglish(String nameEnglish) { |
|||
this.nameEnglish = nameEnglish; |
|||
} |
|||
|
|||
public String getPrecision() { |
|||
return precision; |
|||
} |
|||
|
|||
public void setPrecision(String precision) { |
|||
this.precision = precision; |
|||
} |
|||
} |
@ -0,0 +1,60 @@ |
|||
package io.sc.standard.api; |
|||
|
|||
import io.sc.platform.orm.api.vo.AuditorVo; |
|||
|
|||
public class PerformanceStatusVo extends AuditorVo { |
|||
private String code; |
|||
private String name; |
|||
private String description; |
|||
private String mappingCode; |
|||
private String mappingName; |
|||
private String mappingDescription; |
|||
|
|||
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 String getMappingCode() { |
|||
return mappingCode; |
|||
} |
|||
|
|||
public void setMappingCode(String mappingCode) { |
|||
this.mappingCode = mappingCode; |
|||
} |
|||
|
|||
public String getMappingName() { |
|||
return mappingName; |
|||
} |
|||
|
|||
public void setMappingName(String mappingName) { |
|||
this.mappingName = mappingName; |
|||
} |
|||
|
|||
public String getMappingDescription() { |
|||
return mappingDescription; |
|||
} |
|||
|
|||
public void setMappingDescription(String mappingDescription) { |
|||
this.mappingDescription = mappingDescription; |
|||
} |
|||
} |
@ -1,11 +1,50 @@ |
|||
{ |
|||
"menu.system.standard" : "Data Standard Management", |
|||
|
|||
"standard.GB_T_4754_2017.grid.title" : "Industrial classification for national economic activities", |
|||
"standard.GB_T_4754_2017.grid.toolbar.addTop" : "Add Top", |
|||
"standard.GB_T_4754_2017.grid.toolbar.addChild" : "Add Child", |
|||
"standard.industry.grid.title" : "Industrial classification for national economic activities", |
|||
"standard.industry.grid.toolbar.addTop" : "Add Top", |
|||
"standard.industry.grid.toolbar.addChild" : "Add Child", |
|||
|
|||
"standard.GB_T_2260_2007.grid.title" : "Administrative Divisions", |
|||
"standard.GB_T_2260_2007.grid.toolbar.addTop" : "Add Top Administrative Division", |
|||
"standard.GB_T_2260_2007.grid.toolbar.addChild" : "Add Child Administrative Division" |
|||
"standard.adminDivision.grid.title" : "Administrative Divisions", |
|||
"standard.adminDivision.grid.toolbar.addTop" : "Add Top Administrative Division", |
|||
"standard.adminDivision.grid.toolbar.addChild" : "Add Child Administrative Division", |
|||
|
|||
"standard.performanceStatus.grid.title" : "Performance Status", |
|||
|
|||
"standard.counterparty.grid.title" : "Counterparty Category", |
|||
|
|||
"standard.country.grid.title" : "Country or Area", |
|||
"standard.country.entity.code" : "Code", |
|||
"standard.country.entity.codeLatin2" : "Code2", |
|||
"standard.country.entity.codeLatin3" : "Code3", |
|||
"standard.country.entity.nameChinese" : "Name(Chinese)", |
|||
"standard.country.entity.nameChineseFull" : "Name(Chinese Full)", |
|||
"standard.country.entity.nameEnglish" : "Name(English)", |
|||
"standard.country.entity.nameEnglishFull" : "Name(English Full)", |
|||
"standard.country.entity.nameLocalShort" : "Name(Local Short)", |
|||
"standard.country.entity.remarkChinese" : "Remark(Chinese)", |
|||
"standard.country.entity.remarkEnglish" : "Remark(English)", |
|||
"standard.country.entity.languageCode2" : "Language2", |
|||
"standard.country.entity.languageCode3" : "Language3", |
|||
"standard.country.entity.isIndependent" : "Is Independent", |
|||
"standard.country.entity.currency": "Currency", |
|||
|
|||
"standard.currency.grid.title" : "Currency", |
|||
"standard.currency.entity.code" : "Code (Number)", |
|||
"standard.currency.entity.codeLatin" : "Code (Char)", |
|||
"standard.currency.entity.nameChinese" : "Name(Chinese)", |
|||
"standard.currency.entity.nameEnglish" : "Name(English)", |
|||
"standard.currency.entity.precision" : "Precision", |
|||
|
|||
"standard.entity.source": "Source(Source System)", |
|||
"standard.entity.target": "Target(This System)", |
|||
"standard.entity.code" : "Target Code", |
|||
"standard.entity.name" : "Target Name", |
|||
"standard.entity.description" : "Target Description", |
|||
"standard.entity.mappingCode" : "Source Code", |
|||
"standard.entity.mappingName" : "Source Name", |
|||
"standard.entity.mappingDescription" : "Source Description", |
|||
|
|||
"standard.entity.currency": "Currency", |
|||
"standard.entity.language": "Language" |
|||
} |
|||
|
@ -1,11 +1,50 @@ |
|||
{ |
|||
"menu.system.standard" : "數據標準管理", |
|||
|
|||
"standard.GB_T_4754_2017.grid.title" : "國民經濟行業分類", |
|||
"standard.GB_T_4754_2017.grid.toolbar.addTop" : "添加頂級行業", |
|||
"standard.GB_T_4754_2017.grid.toolbar.addChild" : "添加子行業", |
|||
"standard.industry.grid.title" : "國民經濟行業分類", |
|||
"standard.industry.grid.toolbar.addTop" : "添加頂級行業", |
|||
"standard.industry.grid.toolbar.addChild" : "添加子行業", |
|||
|
|||
"standard.GB_T_2260_2007.grid.title" : "行政區劃分", |
|||
"standard.GB_T_2260_2007.grid.toolbar.addTop" : "添加頂級行政區", |
|||
"standard.GB_T_2260_2007.grid.toolbar.addChild" : "添加子行政區", |
|||
"standard.adminDivision.grid.title" : "行政區劃分", |
|||
"standard.adminDivision.grid.toolbar.addTop" : "添加頂級行政區", |
|||
"standard.adminDivision.grid.toolbar.addChild" : "添加子行政區", |
|||
|
|||
"standard.performanceStatus.grid.title" : "履约状态", |
|||
|
|||
"standard.counterparty.grid.title" : "交易對手類型", |
|||
|
|||
"standard.country.grid.title" : "國家和地區", |
|||
"standard.country.entity.code" : "代碼", |
|||
"standard.country.entity.codeLatin2" : "代碼(2字母)", |
|||
"standard.country.entity.codeLatin3" : "代碼(3字母)", |
|||
"standard.country.entity.nameChinese" : "名稱(中文簡稱)", |
|||
"standard.country.entity.nameChineseFull" : "名稱(中文全稱)", |
|||
"standard.country.entity.nameEnglish" : "名稱(英文簡稱)", |
|||
"standard.country.entity.nameEnglishFull" : "名稱(英文全稱)", |
|||
"standard.country.entity.nameLocalShort" : "名稱(當地簡稱)", |
|||
"standard.country.entity.remarkChinese" : "備註(中文)", |
|||
"standard.country.entity.remarkEnglish" : "備註(英文)", |
|||
"standard.country.entity.languageCode2" : "語種(2字母)", |
|||
"standard.country.entity.languageCode3" : "語種(3字母)", |
|||
"standard.country.entity.isIndependent" : "是否獨立?", |
|||
"standard.country.entity.currency": "貨幣", |
|||
|
|||
"standard.currency.grid.title" : "貨幣", |
|||
"standard.currency.entity.code" : "代碼 (數字)", |
|||
"standard.currency.entity.codeLatin" : "代碼 (字母)", |
|||
"standard.currency.entity.nameChinese" : "中文名", |
|||
"standard.currency.entity.nameEnglish" : "英文名", |
|||
"standard.currency.entity.precision" : "輔助單位(精度)", |
|||
|
|||
"standard.entity.source": "源(源系統)", |
|||
"standard.entity.target": "目標(本系統)", |
|||
"standard.entity.code": "目標代碼", |
|||
"standard.entity.name": "目標名稱", |
|||
"standard.entity.description": "目標描述", |
|||
"standard.entity.mappingCode": "源代碼", |
|||
"standard.entity.mappingName": "源名稱", |
|||
"standard.entity.mappingDescription": "源描述", |
|||
|
|||
"standard.entity.currency": "貨幣", |
|||
"standard.entity.language": "語言" |
|||
} |
|||
|
@ -1,11 +1,50 @@ |
|||
{ |
|||
"menu.system.standard" : "数据标准管理", |
|||
|
|||
"standard.GB_T_4754_2017.grid.title" : "国民经济行业分类", |
|||
"standard.GB_T_4754_2017.grid.toolbar.addTop" : "添加顶级行业", |
|||
"standard.GB_T_4754_2017.grid.toolbar.addChild" : "添加子行业", |
|||
"standard.industry.grid.title" : "国民经济行业分类", |
|||
"standard.industry.grid.toolbar.addTop" : "添加顶级行业", |
|||
"standard.industry.grid.toolbar.addChild" : "添加子行业", |
|||
|
|||
"standard.GB_T_2260_2007.grid.title" : "行政区划分", |
|||
"standard.GB_T_2260_2007.grid.toolbar.addTop" : "添加顶级行政区", |
|||
"standard.GB_T_2260_2007.grid.toolbar.addChild" : "添加子行政区", |
|||
"standard.adminDivision.grid.title" : "行政区划分", |
|||
"standard.adminDivision.grid.toolbar.addTop" : "添加顶级行政区", |
|||
"standard.adminDivision.grid.toolbar.addChild" : "添加子行政区", |
|||
|
|||
"standard.performanceStatus.grid.title" : "履约状态", |
|||
|
|||
"standard.counterparty.grid.title" : "交易对手类型", |
|||
|
|||
"standard.country.grid.title" : "国家和地区", |
|||
"standard.country.entity.code" : "代码", |
|||
"standard.country.entity.codeLatin2" : "代码(2字母)", |
|||
"standard.country.entity.codeLatin3" : "代码(3字母)", |
|||
"standard.country.entity.nameChinese" : "名称(中文简称)", |
|||
"standard.country.entity.nameChineseFull" : "名称(中文全称)", |
|||
"standard.country.entity.nameEnglish" : "名称(英文简称)", |
|||
"standard.country.entity.nameEnglishFull" : "名称(英文全称)", |
|||
"standard.country.entity.nameLocalShort" : "名称(当地简称)", |
|||
"standard.country.entity.remarkChinese" : "备注(中文)", |
|||
"standard.country.entity.remarkEnglish" : "备注(英文)", |
|||
"standard.country.entity.languageCode2" : "语种(2字母)", |
|||
"standard.country.entity.languageCode3" : "语种(3字母)", |
|||
"standard.country.entity.isIndependent" : "是否独立", |
|||
"standard.country.entity.currency": "货币", |
|||
|
|||
"standard.currency.grid.title" : "货币", |
|||
"standard.currency.entity.code" : "代码 (数字)", |
|||
"standard.currency.entity.codeLatin" : "代码 (字母)", |
|||
"standard.currency.entity.nameChinese" : "中文名", |
|||
"standard.currency.entity.nameEnglish" : "英文名", |
|||
"standard.currency.entity.precision" : "辅助单位(精度)", |
|||
|
|||
"standard.entity.source": "源(源系统)", |
|||
"standard.entity.target": "目标(本系统)", |
|||
"standard.entity.code": "目标代码", |
|||
"standard.entity.name": "目标名称", |
|||
"standard.entity.description": "目标描述", |
|||
"standard.entity.mappingCode": "源代码", |
|||
"standard.entity.mappingName": "源名称", |
|||
"standard.entity.mappingDescription": "源描述", |
|||
|
|||
"standard.entity.currency": "货币", |
|||
"standard.entity.language": "语言" |
|||
} |
|||
|
@ -0,0 +1,109 @@ |
|||
<template> |
|||
<w-grid |
|||
ref="gridRef" |
|||
:title="$t('standard.adminDivision.grid.title')" |
|||
hide-bottom |
|||
:config-button="true" |
|||
selection="multiple" |
|||
:checkbox-selection="true" |
|||
dense |
|||
:tree="true" |
|||
:tree-icon=" |
|||
(row) => { |
|||
return { name: 'folder', color: 'amber' }; |
|||
} |
|||
" |
|||
primary-key="code" |
|||
:data-url="Environment.apiContextPath('/api/standard/adminDivision')" |
|||
:pageable="false" |
|||
:pagination="{ |
|||
sortBy: 'code', |
|||
descending: false, |
|||
}" |
|||
:toolbar-configure="{ noIcon: false }" |
|||
:toolbar-actions="[ |
|||
'refresh', |
|||
'separator', |
|||
[ |
|||
{ |
|||
extend: 'add', |
|||
click: undefined, |
|||
}, |
|||
{ |
|||
extend: 'addTop', |
|||
label: $t('standard.adminDivision.grid.toolbar.addTop'), |
|||
}, |
|||
{ |
|||
extend: 'addChild', |
|||
label: $t('standard.adminDivision.grid.toolbar.addChild'), |
|||
}, |
|||
], |
|||
'edit', |
|||
'remove', |
|||
'separator', |
|||
'view', |
|||
'separator', |
|||
'export', |
|||
]" |
|||
:columns="[ |
|||
{ |
|||
name: 'target', |
|||
label: $t('standard.entity.target'), |
|||
columns: [ |
|||
{ width: 300, name: 'name', label: $t('name') }, |
|||
{ width: 100, name: 'code', label: $t('code') }, |
|||
{ width: 100, name: 'description', label: $t('description') }, |
|||
], |
|||
}, |
|||
{ |
|||
name: 'source', |
|||
label: $t('standard.entity.source'), |
|||
columns: [ |
|||
{ width: 300, name: 'mappingName', label: $t('name') }, |
|||
{ width: 100, name: 'mappingCode', label: $t('code') }, |
|||
{ width: 100, name: 'mappingDescription', label: $t('description') }, |
|||
], |
|||
}, |
|||
{ width: 100, name: 'lastModifier', label: $t('lastModifier') }, |
|||
{ width: 120, name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() }, |
|||
]" |
|||
:editor="{ |
|||
dialog: { |
|||
width: '600px', |
|||
}, |
|||
form: { |
|||
colsNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.entity.code'), type: 'text', required: true }, |
|||
{ name: 'name', label: $t('standard.entity.name'), type: 'text', required: true }, |
|||
{ name: 'description', label: $t('standard.entity.description'), type: 'textarea', rows: 3 }, |
|||
{ name: 'mappingCode', label: $t('standard.entity.mappingCode'), type: 'text', required: true }, |
|||
{ name: 'mappingName', label: $t('standard.entity.mappingName'), type: 'text' }, |
|||
{ name: 'mappingDescription', label: $t('standard.entity.mappingDescription'), type: 'textarea', rows: 3 }, |
|||
], |
|||
}, |
|||
}" |
|||
:viewer="{ |
|||
panel: { |
|||
columnNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.entity.code') }, |
|||
{ name: 'name', label: $t('standard.entity.name') }, |
|||
{ name: 'description', label: $t('standard.entity.description') }, |
|||
{ name: 'mappingCode', label: $t('standard.entity.mappingCode') }, |
|||
{ name: 'mappingName', label: $t('standard.entity.mappingName') }, |
|||
{ name: 'mappingDescription', label: $t('standard.entity.mappingDescription') }, |
|||
|
|||
{ 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() }, |
|||
], |
|||
}, |
|||
}" |
|||
></w-grid> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { Environment, Formater } from 'platform-core'; |
|||
</script> |
@ -0,0 +1,79 @@ |
|||
<template> |
|||
<w-grid |
|||
ref="gridRef" |
|||
:title="$t('standard.counterparty.grid.title')" |
|||
:config-button="true" |
|||
selection="multiple" |
|||
:checkbox-selection="true" |
|||
:tree="false" |
|||
primary-key="code" |
|||
:data-url="Environment.apiContextPath('/api/standard/counterparty')" |
|||
:pageable="true" |
|||
:pagination="{ |
|||
sortBy: 'code', |
|||
descending: false, |
|||
}" |
|||
:toolbar-configure="{ noIcon: false }" |
|||
:toolbar-actions="['refresh', 'separator', 'add', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
|||
:columns="[ |
|||
{ |
|||
name: 'target', |
|||
label: $t('standard.entity.target'), |
|||
columns: [ |
|||
{ width: 150, name: 'code', label: $t('code') }, |
|||
{ width: 200, name: 'name', label: $t('name') }, |
|||
{ width: 100, name: 'description', label: $t('description') }, |
|||
], |
|||
}, |
|||
{ |
|||
name: 'source', |
|||
label: $t('standard.entity.source'), |
|||
columns: [ |
|||
{ width: 150, name: 'mappingCode', label: $t('code') }, |
|||
{ width: 200, name: 'mappingName', label: $t('name') }, |
|||
{ width: 100, name: 'mappingDescription', label: $t('description') }, |
|||
], |
|||
}, |
|||
{ width: 100, name: 'lastModifier', label: $t('lastModifier') }, |
|||
{ width: 120, name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() }, |
|||
]" |
|||
:editor="{ |
|||
dialog: { |
|||
width: '600px', |
|||
}, |
|||
form: { |
|||
colsNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.entity.code'), type: 'text', required: true }, |
|||
{ name: 'name', label: $t('standard.entity.name'), type: 'text', required: true }, |
|||
{ name: 'description', label: $t('standard.entity.description'), type: 'textarea', rows: 3 }, |
|||
{ name: 'mappingCode', label: $t('standard.entity.mappingCode'), type: 'text', required: true }, |
|||
{ name: 'mappingName', label: $t('standard.entity.mappingName'), type: 'text' }, |
|||
{ name: 'mappingDescription', label: $t('standard.entity.mappingDescription'), type: 'textarea', rows: 3 }, |
|||
], |
|||
}, |
|||
}" |
|||
:viewer="{ |
|||
panel: { |
|||
columnNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.entity.code') }, |
|||
{ name: 'name', label: $t('standard.entity.name') }, |
|||
{ name: 'description', label: $t('standard.entity.description') }, |
|||
{ name: 'mappingCode', label: $t('standard.entity.mappingCode') }, |
|||
{ name: 'mappingName', label: $t('standard.entity.mappingName') }, |
|||
{ name: 'mappingDescription', label: $t('standard.entity.mappingDescription') }, |
|||
|
|||
{ 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() }, |
|||
], |
|||
}, |
|||
}" |
|||
></w-grid> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { Environment, Formater } from 'platform-core'; |
|||
</script> |
@ -0,0 +1,274 @@ |
|||
<template> |
|||
<w-grid |
|||
ref="gridRef" |
|||
:title="$t('standard.country.grid.title')" |
|||
:hide-bottom="false" |
|||
:config-button="true" |
|||
selection="multiple" |
|||
:checkbox-selection="true" |
|||
:tree="false" |
|||
primary-key="code" |
|||
:data-url="Environment.apiContextPath('/api/standard/country')" |
|||
:pageable="false" |
|||
:pagination="{ |
|||
sortBy: 'codeLatin2', |
|||
descending: false, |
|||
}" |
|||
:toolbar-configure="{ noIcon: false }" |
|||
:toolbar-actions="['query', 'refresh', 'separator', 'add', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
|||
:query-form-cols-num="5" |
|||
:query-form-fields="[ |
|||
{ name: 'code', label: $t('standard.country.entity.code'), type: 'text', clearable: true }, |
|||
{ name: 'codeLatin2', label: $t('standard.country.entity.codeLatin2'), type: 'text', clearable: true }, |
|||
{ name: 'codeLatin3', label: $t('standard.country.entity.codeLatin3'), type: 'text', clearable: true }, |
|||
{ name: 'nameChinese', label: $t('standard.country.entity.nameChinese'), type: 'text', clearable: true }, |
|||
{ name: 'nameEnglish', label: $t('standard.country.entity.nameEnglish'), type: 'text', clearable: true }, |
|||
]" |
|||
:columns="columnsRef" |
|||
:editor="{ |
|||
dialog: { |
|||
width: '800px', |
|||
}, |
|||
form: { |
|||
colsNum: 3, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.country.entity.code'), type: 'text', required: true }, |
|||
{ name: 'codeLatin2', label: $t('standard.country.entity.codeLatin2'), type: 'text', required: true }, |
|||
{ name: 'codeLatin3', label: $t('standard.country.entity.codeLatin3'), type: 'text', required: true }, |
|||
{ name: 'nameChinese', label: $t('standard.country.entity.nameChinese'), type: 'text', required: true }, |
|||
{ name: 'nameChineseFull', label: $t('standard.country.entity.nameChineseFull'), type: 'text', colSpan: 2 }, |
|||
{ name: 'remarkChinese', label: $t('standard.country.entity.remarkChinese'), type: 'text', colSpan: 3 }, |
|||
{ name: 'nameEnglish', label: $t('standard.country.entity.nameEnglish'), type: 'text', required: true }, |
|||
{ name: 'nameEnglishFull', label: $t('standard.country.entity.nameEnglishFull'), type: 'text', colSpan: 2 }, |
|||
{ name: 'remarkEnglish', label: $t('standard.country.entity.remarkEnglish'), type: 'text', colSpan: 3 }, |
|||
{ name: 'nameLocalShort', label: $t('standard.country.entity.nameLocalShort'), type: 'text', colSpan: 2 }, |
|||
{ name: 'isIndependent', label: $t('standard.country.entity.isIndependent'), type: 'select', options: Options.yesNo() }, |
|||
{ |
|||
name: 'currency', |
|||
label: $t('standard.country.entity.currency'), |
|||
type: 'select', |
|||
options: currencyOptionsRef, |
|||
colSpan: 2, |
|||
useInput: true, |
|||
hideSelected: true, |
|||
fillInput: true, |
|||
onFilter: (val, update) => { |
|||
if (val) { |
|||
update(() => { |
|||
const input = val.toUpperCase(); |
|||
currencyOptionsRef.splice(0, currencyOptionsRef.length); |
|||
for (const currency of currencyList) { |
|||
if ( |
|||
currency.code?.indexOf(input) > -1 || |
|||
currency.codeLatin?.indexOf(input) > -1 || |
|||
currency.nameChinese?.indexOf(input) > -1 || |
|||
currency.nameEnglish?.indexOf(input) > -1 |
|||
) { |
|||
const item = createCurrencyOptionItem(currency); |
|||
if (item) { |
|||
currencyOptionsRef.push(item); |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
} else { |
|||
update(() => { |
|||
currencyOptionsRef.splice(0, currencyOptionsRef.length); |
|||
for (const currency of currencyList) { |
|||
const item = createCurrencyOptionItem(currency); |
|||
if (item) { |
|||
currencyOptionsRef.push(item); |
|||
} |
|||
} |
|||
}); |
|||
} |
|||
}, |
|||
}, |
|||
{ name: 'languageCode2', label: $t('standard.country.entity.languageCode2'), type: 'text', colsFirst: true }, |
|||
{ name: 'languageCode3', label: $t('standard.country.entity.languageCode3'), type: 'text' }, |
|||
], |
|||
}, |
|||
}" |
|||
:viewer="{ |
|||
panel: { |
|||
columnNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.country.entity.code') }, |
|||
{ name: 'codeLatin2', label: $t('standard.country.entity.codeLatin2') }, |
|||
{ name: 'codeLatin3', label: $t('standard.country.entity.codeLatin3') }, |
|||
{ name: 'nameChinese', label: $t('standard.country.entity.nameChinese') }, |
|||
{ name: 'nameChineseFull', label: $t('standard.country.entity.nameChineseFull') }, |
|||
{ name: 'nameEnglish', label: $t('standard.country.entity.nameEnglish') }, |
|||
{ name: 'nameEnglishFull', label: $t('standard.country.entity.nameEnglishFull') }, |
|||
{ name: 'nameLocalShort', label: $t('standard.country.entity.nameLocalShort') }, |
|||
{ name: 'remarkChinese', label: $t('standard.country.entity.remarkChinese') }, |
|||
{ name: 'remarkEnglish', label: $t('standard.country.entity.remarkEnglish') }, |
|||
{ name: 'languageCode2', label: $t('standard.country.entity.languageCode2') }, |
|||
{ name: 'languageCode3', label: $t('standard.country.entity.languageCode3') }, |
|||
{ name: 'isIndependent', label: $t('standard.country.entity.isIndependent') }, |
|||
{ |
|||
name: 'currency', |
|||
label: $t('standard.country.entity.currency'), |
|||
format: (value, row) => { |
|||
return getCurrencyLabel(currencyMap[row.currency]); |
|||
}, |
|||
}, |
|||
|
|||
{ 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() }, |
|||
], |
|||
}, |
|||
}" |
|||
></w-grid> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { ref, onMounted } from 'vue'; |
|||
import { useI18n } from 'vue-i18n'; |
|||
import { axios, Environment, Formater, Options, eventBus } from 'platform-core'; |
|||
|
|||
let currentLocale = Environment.getConfigure().setting.i18n.locale; |
|||
let currencyMap = {}; |
|||
let currencyList = []; |
|||
const { t } = useI18n(); |
|||
const currencyOptionsRef = ref([]); |
|||
const columnsRef = ref([ |
|||
{ width: 70, name: 'code', label: t('code') }, |
|||
{ width: 70, name: 'codeLatin3', label: t('code') + '2' }, |
|||
{ |
|||
width: 150, |
|||
name: 'nameChinese', |
|||
label: t('name'), |
|||
format: (value, row) => { |
|||
if (row) { |
|||
return getCountryName(row); |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
name: 'currency', |
|||
label: t('standard.entity.currency'), |
|||
columns: [ |
|||
{ |
|||
width: 70, |
|||
name: 'currencyCode', |
|||
label: t('code'), |
|||
sortable: false, |
|||
format: (value, row) => { |
|||
if (row.currency) { |
|||
return currencyMap[row.currency]?.code; |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
width: 70, |
|||
name: 'currencyCodeLatin', |
|||
label: t('code') + '2', |
|||
sortable: false, |
|||
format: (value, row) => { |
|||
if (row.currency) { |
|||
return currencyMap[row.currency]?.codeLatin; |
|||
} |
|||
}, |
|||
}, |
|||
{ |
|||
width: 150, |
|||
name: 'currencyname', |
|||
label: t('name'), |
|||
sortable: false, |
|||
format: (value, row) => { |
|||
if (row.currency) { |
|||
return getCurrencyName(currencyMap[row.currency]); |
|||
} |
|||
}, |
|||
}, |
|||
], |
|||
}, |
|||
{ |
|||
name: 'language', |
|||
label: t('standard.entity.language'), |
|||
columns: [{ width: 100, name: 'languageCode3', label: t('code') }], |
|||
}, |
|||
|
|||
{ width: 100, name: 'lastModifier', label: t('lastModifier') }, |
|||
{ width: 120, name: 'lastModifyDate', label: t('lastModifyDate'), format: Formater.dateOnly() }, |
|||
]); |
|||
|
|||
eventBus.on('localeChanged', (locale) => { |
|||
currentLocale = locale; |
|||
if (locale === 'zh_CN') { |
|||
columnsRef.value.slice(2, 1, { |
|||
width: 200, |
|||
name: 'nameChinese', |
|||
label: t('name'), |
|||
format: (value, row) => { |
|||
if (row) { |
|||
return getCountryName(row); |
|||
} |
|||
}, |
|||
}); |
|||
} else { |
|||
columnsRef.value.slice(2, 1, { |
|||
width: 200, |
|||
name: 'nameEnglish', |
|||
label: t('name'), |
|||
format: (value, row) => { |
|||
if (row) { |
|||
return getCountryName(row); |
|||
} |
|||
}, |
|||
}); |
|||
} |
|||
}); |
|||
|
|||
onMounted(() => { |
|||
axios.get(Environment.apiContextPath('/api/standard/currency?pageable=false&sortBy=code')).then((response) => { |
|||
currencyOptionsRef.value.splice(0, currencyOptionsRef.value.length); |
|||
currencyMap = {}; |
|||
currencyList = []; |
|||
if (response?.data?.content) { |
|||
for (const currency of response.data.content) { |
|||
currencyMap[currency.code] = currency; |
|||
currencyList.push(currency); |
|||
} |
|||
|
|||
for (const currency of currencyList) { |
|||
const item = createCurrencyOptionItem(currency); |
|||
if (item) { |
|||
currencyOptionsRef.value.push(item); |
|||
} |
|||
} |
|||
} |
|||
}); |
|||
}); |
|||
|
|||
const getCurrencyLabel = (currency) => { |
|||
return currency.code + ' ' + currency.codeLatin + ' ' + (currentLocale === 'zh_CN' ? currency.nameChinese : currency.nameEnglish); |
|||
}; |
|||
|
|||
const createCurrencyOptionItem = (currency) => { |
|||
if (currency) { |
|||
return { |
|||
value: currency.code, |
|||
label: getCurrencyLabel(currency), |
|||
}; |
|||
} |
|||
return null; |
|||
}; |
|||
|
|||
const getCountryName = (country) => { |
|||
if (country) { |
|||
return currentLocale === 'zh_CN' ? country.nameChinese : country.nameEnglish; |
|||
} |
|||
return null; |
|||
}; |
|||
|
|||
const getCurrencyName = (currency) => { |
|||
if (currency) { |
|||
return currentLocale === 'zh_CN' ? currency.nameChinese : currency.nameEnglish; |
|||
} |
|||
return null; |
|||
}; |
|||
</script> |
@ -0,0 +1,72 @@ |
|||
<template> |
|||
<w-grid |
|||
ref="gridRef" |
|||
:title="$t('standard.currency.grid.title')" |
|||
:hide-bottom="false" |
|||
:config-button="true" |
|||
selection="multiple" |
|||
:checkbox-selection="true" |
|||
:tree="false" |
|||
primary-key="code" |
|||
:data-url="Environment.apiContextPath('/api/standard/currency')" |
|||
:pageable="false" |
|||
:pagination="{ |
|||
sortBy: 'codeLatin', |
|||
descending: false, |
|||
}" |
|||
:toolbar-configure="{ noIcon: false }" |
|||
:toolbar-actions="['query', 'refresh', 'separator', 'add', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
|||
:query-form-cols-num="4" |
|||
:query-form-fields="[ |
|||
{ name: 'code', label: $t('standard.currency.entity.code'), type: 'text', clearable: true }, |
|||
{ name: 'codeLatin', label: $t('standard.currency.entity.codeLatin'), type: 'text', clearable: true }, |
|||
{ name: 'nameChinese', label: $t('standard.country.entity.nameChinese'), type: 'text', clearable: true }, |
|||
{ name: 'nameEnglish', label: $t('standard.country.entity.nameEnglish'), type: 'text', clearable: true }, |
|||
]" |
|||
:columns="[ |
|||
{ width: 80, name: 'code', label: $t('standard.currency.entity.code') }, |
|||
{ width: 80, name: 'codeLatin', label: $t('standard.currency.entity.codeLatin') }, |
|||
{ width: 150, name: 'nameChinese', label: $t('standard.currency.entity.nameChinese') }, |
|||
{ width: 150, name: 'nameEnglish', label: $t('standard.currency.entity.nameEnglish') }, |
|||
{ width: 100, name: 'precision', label: $t('standard.currency.entity.precision') }, |
|||
{ width: 100, name: 'lastModifier', label: $t('lastModifier') }, |
|||
{ width: 120, name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() }, |
|||
]" |
|||
:editor="{ |
|||
dialog: { |
|||
width: '600px', |
|||
}, |
|||
form: { |
|||
colsNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.currency.entity.code'), type: 'text', required: true }, |
|||
{ name: 'codeLatin', label: $t('standard.currency.entity.codeLatin'), type: 'text', required: true }, |
|||
{ name: 'nameChinese', label: $t('standard.country.entity.nameChinese'), type: 'text', required: true }, |
|||
{ name: 'nameEnglish', label: $t('standard.country.entity.nameEnglish'), type: 'text' }, |
|||
{ name: 'precision', label: $t('standard.currency.entity.precision'), type: 'text', required: true, defaultValue: 2 }, |
|||
], |
|||
}, |
|||
}" |
|||
:viewer="{ |
|||
panel: { |
|||
columnNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.currency.entity.code') }, |
|||
{ name: 'codeLatin', label: $t('standard.currency.entity.codeLatin') }, |
|||
{ name: 'nameChinese', label: $t('standard.country.entity.nameChinese') }, |
|||
{ name: 'nameEnglish', label: $t('standard.country.entity.nameEnglish') }, |
|||
{ name: 'precision', label: $t('standard.currency.entity.precision') }, |
|||
|
|||
{ 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() }, |
|||
], |
|||
}, |
|||
}" |
|||
></w-grid> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { Environment, Formater, Options } from 'platform-core'; |
|||
</script> |
@ -1,90 +0,0 @@ |
|||
<template> |
|||
<w-grid |
|||
ref="treeGridRef" |
|||
:title="$t('standard.GB_T_2260_2007.grid.title')" |
|||
hide-bottom |
|||
:config-button="true" |
|||
selection="multiple" |
|||
:checkbox-selection="true" |
|||
:dense-body="true" |
|||
:tree="true" |
|||
:tree-icon=" |
|||
(row) => { |
|||
return { name: 'folder', color: 'amber' }; |
|||
} |
|||
" |
|||
primary-key="code" |
|||
:data-url="Environment.apiContextPath('/api/standard/adminDivision')" |
|||
:pageable="false" |
|||
:toolbar-configure="{ noIcon: false }" |
|||
:toolbar-actions="[ |
|||
'refresh', |
|||
'separator', |
|||
[ |
|||
{ |
|||
extend: 'add', |
|||
click: undefined, |
|||
}, |
|||
{ |
|||
extend: 'addTop', |
|||
label: $t('standard.GB_T_2260_2007.grid.toolbar.addTop'), |
|||
}, |
|||
{ |
|||
extend: 'addChild', |
|||
label: $t('standard.GB_T_2260_2007.grid.toolbar.addChild'), |
|||
}, |
|||
], |
|||
'edit', |
|||
'remove', |
|||
'separator', |
|||
'view', |
|||
'separator', |
|||
'export', |
|||
]" |
|||
:columns="[ |
|||
{ |
|||
width: '100px', |
|||
name: 'name', |
|||
label: $t('name'), |
|||
sortable: false, |
|||
}, |
|||
{ width: 100, name: 'code', label: $t('code'), sortable: false }, |
|||
{ width: 100, name: 'description', label: $t('description'), sortable: false }, |
|||
{ width: 80, name: 'lastModifier', label: $t('lastModifier'), sortable: false }, |
|||
{ width: 100, name: 'lastModifyDate', label: $t('lastModifyDate'), sortable: false, format: Formater.dateOnly() }, |
|||
]" |
|||
:editor="{ |
|||
dialog: { |
|||
width: '600px', |
|||
height: '300px', |
|||
}, |
|||
form: { |
|||
colsNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('code'), type: 'text', required: true }, |
|||
{ name: 'name', label: $t('name'), type: 'text', required: true }, |
|||
{ name: 'description', label: $t('description'), type: 'textarea', rows: 3 }, |
|||
], |
|||
}, |
|||
}" |
|||
:viewer="{ |
|||
panel: { |
|||
columnNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('code') }, |
|||
{ name: 'name', label: $t('name') }, |
|||
{ name: 'description', label: $t('description') }, |
|||
|
|||
{ 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() }, |
|||
], |
|||
}, |
|||
}" |
|||
></w-grid> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { Environment, Formater } from 'platform-core'; |
|||
</script> |
@ -1,90 +0,0 @@ |
|||
<template> |
|||
<w-grid |
|||
ref="treeGridRef" |
|||
:title="$t('standard.GB_T_4754_2017.grid.title')" |
|||
hide-bottom |
|||
:config-button="true" |
|||
selection="multiple" |
|||
:checkbox-selection="true" |
|||
:dense-body="true" |
|||
:tree="true" |
|||
:tree-icon=" |
|||
(row) => { |
|||
return { name: 'folder', color: 'amber' }; |
|||
} |
|||
" |
|||
primary-key="code" |
|||
:data-url="Environment.apiContextPath('/api/standard/industry')" |
|||
:pageable="false" |
|||
:toolbar-configure="{ noIcon: false }" |
|||
:toolbar-actions="[ |
|||
'refresh', |
|||
'separator', |
|||
[ |
|||
{ |
|||
extend: 'add', |
|||
click: undefined, |
|||
}, |
|||
{ |
|||
extend: 'addTop', |
|||
label: $t('standard.GB_T_4754_2017.grid.toolbar.addTop'), |
|||
}, |
|||
{ |
|||
extend: 'addChild', |
|||
label: $t('standard.GB_T_4754_2017.grid.toolbar.addChild'), |
|||
}, |
|||
], |
|||
'edit', |
|||
'remove', |
|||
'separator', |
|||
'view', |
|||
'separator', |
|||
'export', |
|||
]" |
|||
:columns="[ |
|||
{ |
|||
width: '100px', |
|||
name: 'name', |
|||
label: $t('name'), |
|||
sortable: false, |
|||
}, |
|||
{ width: 100, name: 'code', label: $t('code'), sortable: false }, |
|||
{ width: 100, name: 'description', label: $t('description'), sortable: false }, |
|||
{ width: 80, name: 'lastModifier', label: $t('lastModifier'), sortable: false }, |
|||
{ width: 100, name: 'lastModifyDate', label: $t('lastModifyDate'), sortable: false, format: Formater.dateOnly() }, |
|||
]" |
|||
:editor="{ |
|||
dialog: { |
|||
width: '600px', |
|||
height: '300px', |
|||
}, |
|||
form: { |
|||
colsNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('code'), type: 'text', required: true }, |
|||
{ name: 'name', label: $t('name'), type: 'text', required: true }, |
|||
{ name: 'description', label: $t('description'), type: 'textarea', rows: 3 }, |
|||
], |
|||
}, |
|||
}" |
|||
:viewer="{ |
|||
panel: { |
|||
columnNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('code') }, |
|||
{ name: 'name', label: $t('name') }, |
|||
{ name: 'description', label: $t('description') }, |
|||
|
|||
{ 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() }, |
|||
], |
|||
}, |
|||
}" |
|||
></w-grid> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { Environment, Formater } from 'platform-core'; |
|||
</script> |
@ -0,0 +1,109 @@ |
|||
<template> |
|||
<w-grid |
|||
ref="treeGridRef" |
|||
:title="$t('standard.industry.grid.title')" |
|||
hide-bottom |
|||
:config-button="true" |
|||
selection="multiple" |
|||
:checkbox-selection="true" |
|||
dense |
|||
:tree="true" |
|||
:tree-icon=" |
|||
(row) => { |
|||
return { name: 'folder', color: 'amber' }; |
|||
} |
|||
" |
|||
primary-key="code" |
|||
:data-url="Environment.apiContextPath('/api/standard/industry')" |
|||
:pageable="false" |
|||
:pagination="{ |
|||
sortBy: 'code', |
|||
descending: false, |
|||
}" |
|||
:toolbar-configure="{ noIcon: false }" |
|||
:toolbar-actions="[ |
|||
'refresh', |
|||
'separator', |
|||
[ |
|||
{ |
|||
extend: 'add', |
|||
click: undefined, |
|||
}, |
|||
{ |
|||
extend: 'addTop', |
|||
label: $t('standard.industry.grid.toolbar.addTop'), |
|||
}, |
|||
{ |
|||
extend: 'addChild', |
|||
label: $t('standard.industry.grid.toolbar.addChild'), |
|||
}, |
|||
], |
|||
'edit', |
|||
'remove', |
|||
'separator', |
|||
'view', |
|||
'separator', |
|||
'export', |
|||
]" |
|||
:columns="[ |
|||
{ |
|||
name: 'target', |
|||
label: $t('standard.entity.target'), |
|||
columns: [ |
|||
{ width: 300, name: 'name', label: $t('name') }, |
|||
{ width: 100, name: 'code', label: $t('code') }, |
|||
{ width: 100, name: 'description', label: $t('description') }, |
|||
], |
|||
}, |
|||
{ |
|||
name: 'source', |
|||
label: $t('standard.entity.source'), |
|||
columns: [ |
|||
{ width: 300, name: 'mappingName', label: $t('name') }, |
|||
{ width: 100, name: 'mappingCode', label: $t('code') }, |
|||
{ width: 100, name: 'mappingDescription', label: $t('description') }, |
|||
], |
|||
}, |
|||
{ width: 100, name: 'lastModifier', label: $t('lastModifier') }, |
|||
{ width: 120, name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() }, |
|||
]" |
|||
:editor="{ |
|||
dialog: { |
|||
width: '600px', |
|||
}, |
|||
form: { |
|||
colsNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.entity.code'), type: 'text', required: true }, |
|||
{ name: 'name', label: $t('standard.entity.name'), type: 'text', required: true }, |
|||
{ name: 'description', label: $t('standard.entity.description'), type: 'textarea', rows: 3 }, |
|||
{ name: 'mappingCode', label: $t('standard.entity.mappingCode'), type: 'text', required: true }, |
|||
{ name: 'mappingName', label: $t('standard.entity.mappingName'), type: 'text' }, |
|||
{ name: 'mappingDescription', label: $t('standard.entity.mappingDescription'), type: 'textarea', rows: 3 }, |
|||
], |
|||
}, |
|||
}" |
|||
:viewer="{ |
|||
panel: { |
|||
columnNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.entity.code') }, |
|||
{ name: 'name', label: $t('standard.entity.name') }, |
|||
{ name: 'description', label: $t('standard.entity.description') }, |
|||
{ name: 'mappingCode', label: $t('standard.entity.mappingCode') }, |
|||
{ name: 'mappingName', label: $t('standard.entity.mappingName') }, |
|||
{ name: 'mappingDescription', label: $t('standard.entity.mappingDescription') }, |
|||
|
|||
{ 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() }, |
|||
], |
|||
}, |
|||
}" |
|||
></w-grid> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { Environment, Formater } from 'platform-core'; |
|||
</script> |
@ -0,0 +1,79 @@ |
|||
<template> |
|||
<w-grid |
|||
ref="gridRef" |
|||
:title="$t('standard.performanceStatus.grid.title')" |
|||
:config-button="true" |
|||
selection="multiple" |
|||
:checkbox-selection="true" |
|||
:tree="false" |
|||
primary-key="code" |
|||
:data-url="Environment.apiContextPath('/api/standard/performanceStatus')" |
|||
:pageable="true" |
|||
:pagination="{ |
|||
sortBy: 'code', |
|||
descending: false, |
|||
}" |
|||
:toolbar-configure="{ noIcon: false }" |
|||
:toolbar-actions="['refresh', 'separator', 'add', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
|||
:columns="[ |
|||
{ |
|||
name: 'target', |
|||
label: $t('standard.entity.target'), |
|||
columns: [ |
|||
{ width: 100, name: 'code', label: $t('code') }, |
|||
{ width: 100, name: 'name', label: $t('name') }, |
|||
{ width: 100, name: 'description', label: $t('description') }, |
|||
], |
|||
}, |
|||
{ |
|||
name: 'source', |
|||
label: $t('standard.entity.source'), |
|||
columns: [ |
|||
{ width: 100, name: 'mappingCode', label: $t('code') }, |
|||
{ width: 100, name: 'mappingName', label: $t('name') }, |
|||
{ width: 100, name: 'mappingDescription', label: $t('description') }, |
|||
], |
|||
}, |
|||
{ width: 100, name: 'lastModifier', label: $t('lastModifier') }, |
|||
{ width: 120, name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() }, |
|||
]" |
|||
:editor="{ |
|||
dialog: { |
|||
width: '600px', |
|||
}, |
|||
form: { |
|||
colsNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.entity.code'), type: 'text', required: true }, |
|||
{ name: 'name', label: $t('standard.entity.name'), type: 'text', required: true }, |
|||
{ name: 'description', label: $t('standard.entity.description'), type: 'textarea', rows: 3 }, |
|||
{ name: 'mappingCode', label: $t('standard.entity.mappingCode'), type: 'text', required: true }, |
|||
{ name: 'mappingName', label: $t('standard.entity.mappingName'), type: 'text' }, |
|||
{ name: 'mappingDescription', label: $t('standard.entity.mappingDescription'), type: 'textarea', rows: 3 }, |
|||
], |
|||
}, |
|||
}" |
|||
:viewer="{ |
|||
panel: { |
|||
columnNum: 1, |
|||
fields: [ |
|||
{ name: 'code', label: $t('standard.entity.code') }, |
|||
{ name: 'name', label: $t('standard.entity.name') }, |
|||
{ name: 'description', label: $t('standard.entity.description') }, |
|||
{ name: 'mappingCode', label: $t('standard.entity.mappingCode') }, |
|||
{ name: 'mappingName', label: $t('standard.entity.mappingName') }, |
|||
{ name: 'mappingDescription', label: $t('standard.entity.mappingDescription') }, |
|||
|
|||
{ 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() }, |
|||
], |
|||
}, |
|||
}" |
|||
></w-grid> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { Environment, Formater } from 'platform-core'; |
|||
</script> |
@ -0,0 +1,27 @@ |
|||
package io.sc.standard.controller; |
|||
|
|||
import io.sc.platform.mvc.controller.support.RestCrudController; |
|||
import io.sc.platform.orm.service.support.QueryParameter; |
|||
import io.sc.standard.api.AdminDivisionVo; |
|||
import io.sc.standard.api.CounterpartyVo; |
|||
import io.sc.standard.jpa.entity.CounterpartyEntity; |
|||
import io.sc.standard.jpa.repository.CounterpartyRepository; |
|||
import io.sc.standard.service.CounterpartyService; |
|||
import org.springframework.data.domain.Page; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
|
|||
@RestController("io.sc.standard.controller.CounterpartyWebController") |
|||
@RequestMapping("/api/standard/counterparty") |
|||
public class CounterpartyWebController extends RestCrudController<CounterpartyVo, CounterpartyEntity,String, CounterpartyRepository, CounterpartyService> { |
|||
@Override |
|||
protected Page<CounterpartyVo> query(HttpServletRequest request, HttpServletResponse response, QueryParameter queryParameter) throws Exception { |
|||
if(!queryParameter.existsSortBy()){ |
|||
queryParameter.addSortBy("+code"); |
|||
} |
|||
return super.query(request, response, queryParameter); |
|||
} |
|||
} |
@ -0,0 +1,27 @@ |
|||
package io.sc.standard.controller; |
|||
|
|||
import io.sc.platform.mvc.controller.support.RestCrudController; |
|||
import io.sc.platform.orm.service.support.QueryParameter; |
|||
import io.sc.standard.api.CounterpartyVo; |
|||
import io.sc.standard.api.CountryVo; |
|||
import io.sc.standard.jpa.entity.CountryEntity; |
|||
import io.sc.standard.jpa.repository.CountryRepository; |
|||
import io.sc.standard.service.CountryService; |
|||
import org.springframework.data.domain.Page; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
|
|||
@RestController("io.sc.standard.controller.CountryWebController") |
|||
@RequestMapping("/api/standard/country") |
|||
public class CountryWebController extends RestCrudController<CountryVo, CountryEntity,String, CountryRepository, CountryService> { |
|||
@Override |
|||
protected Page<CountryVo> query(HttpServletRequest request, HttpServletResponse response, QueryParameter queryParameter) throws Exception { |
|||
if(!queryParameter.existsSortBy()){ |
|||
queryParameter.addSortBy("+code"); |
|||
} |
|||
return super.query(request, response, queryParameter); |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
package io.sc.standard.controller; |
|||
|
|||
import io.sc.platform.mvc.controller.support.RestCrudController; |
|||
import io.sc.platform.orm.service.support.QueryParameter; |
|||
import io.sc.standard.api.CurrencyVo; |
|||
import io.sc.standard.jpa.entity.CurrencyEntity; |
|||
import io.sc.standard.jpa.repository.CurrencyRepository; |
|||
import io.sc.standard.service.CurrencyService; |
|||
import org.springframework.data.domain.Page; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
|
|||
@RestController("io.sc.standard.controller.CurrencyWebController") |
|||
@RequestMapping("/api/standard/currency") |
|||
public class CurrencyWebController extends RestCrudController<CurrencyVo, CurrencyEntity,String, CurrencyRepository, CurrencyService> { |
|||
@Override |
|||
protected Page<CurrencyVo> query(HttpServletRequest request, HttpServletResponse response, QueryParameter queryParameter) throws Exception { |
|||
if(!queryParameter.existsSortBy()){ |
|||
queryParameter.addSortBy("+code"); |
|||
} |
|||
return super.query(request, response, queryParameter); |
|||
} |
|||
} |
@ -0,0 +1,29 @@ |
|||
package io.sc.standard.controller; |
|||
|
|||
import io.sc.platform.mvc.controller.support.RestCrudController; |
|||
import io.sc.platform.orm.service.support.QueryParameter; |
|||
import io.sc.standard.api.CounterpartyVo; |
|||
import io.sc.standard.api.PerformanceStatusVo; |
|||
import io.sc.standard.jpa.entity.PerformanceStatusEntity; |
|||
import io.sc.standard.jpa.repository.PerformanceStatusRepository; |
|||
import io.sc.standard.service.PerformanceStatusService; |
|||
import org.springframework.data.domain.Page; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
|
|||
@RestController("io.sc.standard.controller.PerformanceStatusWebController") |
|||
@RequestMapping("/api/standard/performanceStatus") |
|||
public class PerformanceStatusWebController extends RestCrudController<PerformanceStatusVo, PerformanceStatusEntity,String, PerformanceStatusRepository, PerformanceStatusService> { |
|||
@Override |
|||
protected Page<PerformanceStatusVo> query(HttpServletRequest request, HttpServletResponse response, QueryParameter queryParameter) throws Exception { |
|||
if(!queryParameter.existsSortBy()){ |
|||
queryParameter.addSortBy("+code"); |
|||
} |
|||
return super.query(request, response, queryParameter); |
|||
} |
|||
} |
@ -0,0 +1,118 @@ |
|||
package io.sc.standard.jpa.entity; |
|||
|
|||
import io.sc.platform.orm.entity.AuditorEntity; |
|||
import io.sc.standard.api.IndustryVo; |
|||
|
|||
import javax.persistence.*; |
|||
import javax.validation.constraints.Size; |
|||
|
|||
/** |
|||
* 银行业务分类 |
|||
*/ |
|||
@Entity(name="io.sc.standard.jpa.entity.BusinessCategoryEntity") |
|||
@Table(name="ST_BUSINESS_CATEGORY") |
|||
public class BusinessCategoryEntity extends AuditorEntity<IndustryVo> { |
|||
@Id |
|||
@Column(name="CODE_", length=5) |
|||
@Size(max=5) |
|||
private String code; |
|||
|
|||
@Column(name="NAME_", length=254) |
|||
@Size(max=254) |
|||
private String name; |
|||
|
|||
@Column(name="DESCRIPTION_", length=1024) |
|||
@Size(max=1024) |
|||
private String description; |
|||
|
|||
@Column(name="MAPPING_CODE_", length=255) |
|||
@Size(max=255) |
|||
private String mappingCode; |
|||
|
|||
@Column(name="MAPPING_NAME_", length=1024) |
|||
@Size(max=1024) |
|||
private String mappingName; |
|||
|
|||
@Column(name="MAPPING_DESCRIPTION_", length=1024) |
|||
@Size(max=1024) |
|||
private String mappingDescription; |
|||
|
|||
@ManyToOne(fetch=FetchType.LAZY) |
|||
@JoinColumn(name="PARENT_CODE_") |
|||
protected BusinessCategoryEntity parent; |
|||
|
|||
@Override |
|||
public IndustryVo toVo() { |
|||
IndustryVo vo =new IndustryVo(); |
|||
super.toVo(vo); |
|||
vo.setCode(this.getCode()); |
|||
vo.setName(this.getName()); |
|||
vo.setDescription(this.getDescription()); |
|||
vo.setMappingCode(this.getMappingCode()); |
|||
vo.setMappingName(this.getMappingName()); |
|||
vo.setMappingDescription(this.getMappingDescription()); |
|||
vo.setParent(this.getParent()==null?null:this.getParent().getCode()); |
|||
return vo; |
|||
} |
|||
|
|||
public BusinessCategoryEntity(){} |
|||
public BusinessCategoryEntity(String code){ |
|||
this.code =code; |
|||
} |
|||
|
|||
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 String getMappingCode() { |
|||
return mappingCode; |
|||
} |
|||
|
|||
public void setMappingCode(String mappingCode) { |
|||
this.mappingCode = mappingCode; |
|||
} |
|||
|
|||
public String getMappingName() { |
|||
return mappingName; |
|||
} |
|||
|
|||
public void setMappingName(String mappingName) { |
|||
this.mappingName = mappingName; |
|||
} |
|||
|
|||
public String getMappingDescription() { |
|||
return mappingDescription; |
|||
} |
|||
|
|||
public void setMappingDescription(String mappingDescription) { |
|||
this.mappingDescription = mappingDescription; |
|||
} |
|||
|
|||
public BusinessCategoryEntity getParent() { |
|||
return parent; |
|||
} |
|||
|
|||
public void setParent(BusinessCategoryEntity parent) { |
|||
this.parent = parent; |
|||
} |
|||
} |
@ -0,0 +1,108 @@ |
|||
package io.sc.standard.jpa.entity; |
|||
|
|||
import io.sc.platform.orm.entity.AuditorEntity; |
|||
import io.sc.standard.api.CounterpartyVo; |
|||
|
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.Table; |
|||
import javax.validation.constraints.Size; |
|||
|
|||
/** |
|||
* 履约状态 |
|||
*/ |
|||
@Entity(name="io.sc.standard.jpa.entity.CounterpartyEntity") |
|||
@Table(name="ST_COUNTERPARTY") |
|||
public class CounterpartyEntity extends AuditorEntity<CounterpartyVo> { |
|||
@Id |
|||
@Column(name="CODE_", length=255) |
|||
@Size(max=255) |
|||
private String code; |
|||
|
|||
@Column(name="NAME_", length=255) |
|||
@Size(max=255) |
|||
private String name; |
|||
|
|||
@Column(name="DESCRIPTION_", length=255) |
|||
@Size(max=255) |
|||
private String description; |
|||
|
|||
@Column(name="MAPPING_CODE_", length=255) |
|||
@Size(max=255) |
|||
private String mappingCode; |
|||
|
|||
@Column(name="MAPPING_NAME_", length=255) |
|||
@Size(max=255) |
|||
private String mappingName; |
|||
|
|||
@Column(name="MAPPING_DESCRIPTION_", length=255) |
|||
@Size(max=255) |
|||
private String mappingDescription; |
|||
|
|||
@Override |
|||
public CounterpartyVo toVo() { |
|||
CounterpartyVo vo =new CounterpartyVo(); |
|||
super.toVo(vo); |
|||
vo.setCode(this.getCode()); |
|||
vo.setName(this.getName()); |
|||
vo.setDescription(this.getDescription()); |
|||
vo.setMappingCode(this.getMappingCode()); |
|||
vo.setMappingName(this.getMappingName()); |
|||
vo.setMappingDescription(this.getMappingDescription()); |
|||
return vo; |
|||
} |
|||
|
|||
public CounterpartyEntity(){} |
|||
public CounterpartyEntity(String code){ |
|||
this.code =code; |
|||
} |
|||
|
|||
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 String getMappingCode() { |
|||
return mappingCode; |
|||
} |
|||
|
|||
public void setMappingCode(String mappingCode) { |
|||
this.mappingCode = mappingCode; |
|||
} |
|||
|
|||
public String getMappingName() { |
|||
return mappingName; |
|||
} |
|||
|
|||
public void setMappingName(String mappingName) { |
|||
this.mappingName = mappingName; |
|||
} |
|||
|
|||
public String getMappingDescription() { |
|||
return mappingDescription; |
|||
} |
|||
|
|||
public void setMappingDescription(String mappingDescription) { |
|||
this.mappingDescription = mappingDescription; |
|||
} |
|||
} |
@ -0,0 +1,224 @@ |
|||
package io.sc.standard.jpa.entity; |
|||
|
|||
import io.sc.platform.orm.converter.NumericBooleanConverter; |
|||
import io.sc.platform.orm.entity.AuditorEntity; |
|||
import io.sc.platform.system.org.jpa.entity.OrgEntity; |
|||
import io.sc.standard.api.CountryVo; |
|||
|
|||
import javax.persistence.*; |
|||
import javax.validation.constraints.Size; |
|||
|
|||
/** |
|||
* 国家和地区 |
|||
*/ |
|||
@Entity(name="io.sc.standard.jpa.entity.CountryEntity") |
|||
@Table(name="ST_COUNTRY") |
|||
public class CountryEntity extends AuditorEntity<CountryVo> { |
|||
// 代码
|
|||
@Id |
|||
@Column(name="CODE_", length=3) |
|||
@Size(max=3) |
|||
private String code; |
|||
|
|||
// 代码(两字符拉丁字母)
|
|||
@Column(name="CODE_LATIN_2_", length=2) |
|||
@Size(max=2) |
|||
private String codeLatin2; |
|||
|
|||
// 代码(三字符拉丁字母)
|
|||
@Column(name="CODE_LATIN_3_", length=3) |
|||
@Size(max=3) |
|||
private String codeLatin3; |
|||
|
|||
// 名称(中文简称)
|
|||
@Column(name="NAME_CHINESE_", length=255) |
|||
@Size(max=255) |
|||
private String nameChinese; |
|||
|
|||
// 名称(中文全称)
|
|||
@Column(name="NAME_CHINESE_FULL_", length=255) |
|||
@Size(max=255) |
|||
private String nameChineseFull; |
|||
|
|||
// 名称(英文简称)
|
|||
@Column(name="NAME_ENGLISH_", length=255) |
|||
@Size(max=255) |
|||
private String nameEnglish; |
|||
|
|||
// 名称(英文全称)
|
|||
@Column(name="NAME_ENGLISH_FULL_", length=255) |
|||
@Size(max=255) |
|||
private String nameEnglishFull; |
|||
|
|||
// 名称(当地简称)
|
|||
@Column(name="NAME_LOCAL_SHORT_", length=255) |
|||
@Size(max=255) |
|||
private String nameLocalShort; |
|||
|
|||
// 中文备注
|
|||
@Column(name="REMARK_CHINESE_", length=512) |
|||
@Size(max=512) |
|||
private String remarkChinese; |
|||
|
|||
// 英文备注
|
|||
@Column(name="REMARK_ENGLISH_", length=512) |
|||
@Size(max=512) |
|||
private String remarkEnglish; |
|||
|
|||
// 语种代码(两字母)
|
|||
@Column(name="LANGUAGE_CODE_2_", length=30) |
|||
@Size(max=30) |
|||
private String languageCode2; |
|||
|
|||
// 语种代码(三字母)
|
|||
@Column(name="LANGUAGE_CODE_3_", length=45) |
|||
@Size(max=45) |
|||
private String languageCode3; |
|||
|
|||
// 是否独立
|
|||
@Column(name="IS_INDEPENDENT_") |
|||
@Convert(converter= NumericBooleanConverter.class) |
|||
private Boolean isIndependent; |
|||
|
|||
@ManyToOne(fetch=FetchType.LAZY) |
|||
@JoinColumn(name="CURRENCY_CODE_") |
|||
private CurrencyEntity currency; |
|||
|
|||
@Override |
|||
public CountryVo toVo() { |
|||
CountryVo vo =new CountryVo(); |
|||
super.toVo(vo); |
|||
vo.setCode(this.getCode()); |
|||
vo.setCodeLatin2(this.getCodeLatin2()); |
|||
vo.setCodeLatin3(this.getCodeLatin3()); |
|||
vo.setNameChinese(this.getNameChinese()); |
|||
vo.setNameChineseFull(this.getNameChineseFull()); |
|||
vo.setNameEnglish(this.getNameEnglish()); |
|||
vo.setNameEnglishFull(this.getNameEnglishFull()); |
|||
vo.setNameLocalShort(this.getNameLocalShort()); |
|||
vo.setRemarkChinese(this.getRemarkChinese()); |
|||
vo.setRemarkEnglish(this.getRemarkEnglish()); |
|||
vo.setLanguageCode2(this.getLanguageCode2()); |
|||
vo.setLanguageCode3(this.getLanguageCode3()); |
|||
vo.setIsIndependent(this.getIsIndependent()); |
|||
vo.setCurrency(this.getCurrency()==null?null:this.getCurrency().getCode()); |
|||
return vo; |
|||
} |
|||
|
|||
public CountryEntity(){} |
|||
public CountryEntity(String code){ |
|||
this.code =code; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getCodeLatin2() { |
|||
return codeLatin2; |
|||
} |
|||
|
|||
public void setCodeLatin2(String codeLatin2) { |
|||
this.codeLatin2 = codeLatin2; |
|||
} |
|||
|
|||
public String getCodeLatin3() { |
|||
return codeLatin3; |
|||
} |
|||
|
|||
public void setCodeLatin3(String codeLatin3) { |
|||
this.codeLatin3 = codeLatin3; |
|||
} |
|||
|
|||
public String getNameChinese() { |
|||
return nameChinese; |
|||
} |
|||
|
|||
public void setNameChinese(String nameChinese) { |
|||
this.nameChinese = nameChinese; |
|||
} |
|||
|
|||
public String getNameChineseFull() { |
|||
return nameChineseFull; |
|||
} |
|||
|
|||
public void setNameChineseFull(String nameChineseFull) { |
|||
this.nameChineseFull = nameChineseFull; |
|||
} |
|||
|
|||
public String getNameEnglish() { |
|||
return nameEnglish; |
|||
} |
|||
|
|||
public void setNameEnglish(String nameEnglish) { |
|||
this.nameEnglish = nameEnglish; |
|||
} |
|||
|
|||
public String getNameEnglishFull() { |
|||
return nameEnglishFull; |
|||
} |
|||
|
|||
public void setNameEnglishFull(String nameEnglishFull) { |
|||
this.nameEnglishFull = nameEnglishFull; |
|||
} |
|||
|
|||
public String getNameLocalShort() { |
|||
return nameLocalShort; |
|||
} |
|||
|
|||
public void setNameLocalShort(String nameLocalShort) { |
|||
this.nameLocalShort = nameLocalShort; |
|||
} |
|||
|
|||
public String getRemarkChinese() { |
|||
return remarkChinese; |
|||
} |
|||
|
|||
public void setRemarkChinese(String remarkChinese) { |
|||
this.remarkChinese = remarkChinese; |
|||
} |
|||
|
|||
public String getRemarkEnglish() { |
|||
return remarkEnglish; |
|||
} |
|||
|
|||
public void setRemarkEnglish(String remarkEnglish) { |
|||
this.remarkEnglish = remarkEnglish; |
|||
} |
|||
|
|||
public String getLanguageCode2() { |
|||
return languageCode2; |
|||
} |
|||
|
|||
public void setLanguageCode2(String languageCode2) { |
|||
this.languageCode2 = languageCode2; |
|||
} |
|||
|
|||
public String getLanguageCode3() { |
|||
return languageCode3; |
|||
} |
|||
|
|||
public void setLanguageCode3(String languageCode3) { |
|||
this.languageCode3 = languageCode3; |
|||
} |
|||
|
|||
public Boolean getIsIndependent() { |
|||
return isIndependent; |
|||
} |
|||
|
|||
public void setIsIndependent(Boolean isIndependent) { |
|||
this.isIndependent = isIndependent; |
|||
} |
|||
|
|||
public CurrencyEntity getCurrency() { |
|||
return currency; |
|||
} |
|||
|
|||
public void setCurrency(CurrencyEntity currency) { |
|||
this.currency = currency; |
|||
} |
|||
} |
@ -0,0 +1,99 @@ |
|||
package io.sc.standard.jpa.entity; |
|||
|
|||
import io.sc.platform.orm.converter.NumericBooleanConverter; |
|||
import io.sc.platform.orm.entity.AuditorEntity; |
|||
import io.sc.standard.api.CurrencyVo; |
|||
|
|||
import javax.persistence.*; |
|||
import javax.validation.constraints.Size; |
|||
|
|||
/** |
|||
* 货币 |
|||
*/ |
|||
@Entity(name="io.sc.standard.jpa.entity.CurrencyEntity") |
|||
@Table(name="ST_CURRENCY") |
|||
public class CurrencyEntity extends AuditorEntity<CurrencyVo> { |
|||
// 代码(数字)
|
|||
@Id |
|||
@Column(name="CODE_", length=3) |
|||
@Size(max=3) |
|||
private String code; |
|||
|
|||
// 代码(字母)
|
|||
@Column(name="CODE_LATIN_", length=3) |
|||
@Size(max=3) |
|||
private String codeLatin; |
|||
|
|||
// 名称(中文)
|
|||
@Column(name="NAME_CHINESE_", length=255) |
|||
@Size(max=255) |
|||
private String nameChinese; |
|||
|
|||
// 名称(英文)
|
|||
@Column(name="NAME_ENGLISH_", length=255) |
|||
@Size(max=255) |
|||
private String nameEnglish; |
|||
|
|||
// 辅助单位(精度)
|
|||
@Column(name="PRECISION_",length=10) |
|||
@Size(max=10) |
|||
private String precision; |
|||
|
|||
@Override |
|||
public CurrencyVo toVo() { |
|||
CurrencyVo vo =new CurrencyVo(); |
|||
super.toVo(vo); |
|||
vo.setCode(this.getCode()); |
|||
vo.setCodeLatin(this.getCodeLatin()); |
|||
vo.setNameChinese(this.getNameChinese()); |
|||
vo.setNameEnglish(this.getNameEnglish()); |
|||
vo.setPrecision(this.getPrecision()); |
|||
return vo; |
|||
} |
|||
|
|||
public CurrencyEntity(){} |
|||
public CurrencyEntity(String code){ |
|||
this.code =code; |
|||
} |
|||
|
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getCodeLatin() { |
|||
return codeLatin; |
|||
} |
|||
|
|||
public void setCodeLatin(String codeLatin) { |
|||
this.codeLatin = codeLatin; |
|||
} |
|||
|
|||
public String getNameChinese() { |
|||
return nameChinese; |
|||
} |
|||
|
|||
public void setNameChinese(String nameChinese) { |
|||
this.nameChinese = nameChinese; |
|||
} |
|||
|
|||
public String getNameEnglish() { |
|||
return nameEnglish; |
|||
} |
|||
|
|||
public void setNameEnglish(String nameEnglish) { |
|||
this.nameEnglish = nameEnglish; |
|||
} |
|||
|
|||
public String getPrecision() { |
|||
return precision; |
|||
} |
|||
|
|||
public void setPrecision(String precision) { |
|||
this.precision = precision; |
|||
} |
|||
} |
@ -0,0 +1,110 @@ |
|||
package io.sc.standard.jpa.entity; |
|||
|
|||
import io.sc.platform.orm.entity.AuditorEntity; |
|||
import io.sc.standard.api.AdminDivisionVo; |
|||
import io.sc.standard.api.PerformanceStatusVo; |
|||
|
|||
import javax.persistence.Column; |
|||
import javax.persistence.Entity; |
|||
import javax.persistence.Id; |
|||
import javax.persistence.Table; |
|||
import javax.validation.constraints.Size; |
|||
|
|||
/** |
|||
* 履约状态 |
|||
*/ |
|||
@Entity(name="io.sc.standard.jpa.entity.PerformanceStatusEntity") |
|||
@Table(name="ST_PERFORMANCE_STATUS") |
|||
public class PerformanceStatusEntity extends AuditorEntity<PerformanceStatusVo> { |
|||
@Id |
|||
@Column(name="CODE_", length=1) |
|||
@Size(max=1) |
|||
private String code; |
|||
|
|||
@Column(name="NAME_", length=20) |
|||
@Size(max=20) |
|||
private String name; |
|||
|
|||
@Column(name="DESCRIPTION_", length=255) |
|||
@Size(max=255) |
|||
private String description; |
|||
|
|||
@Column(name="MAPPING_CODE_", length=6) |
|||
@Size(max=6) |
|||
private String mappingCode; |
|||
|
|||
@Column(name="MAPPING_NAME_", length=20) |
|||
@Size(max=20) |
|||
private String mappingName; |
|||
|
|||
@Column(name="MAPPING_DESCRIPTION_", length=255) |
|||
@Size(max=255) |
|||
private String mappingDescription; |
|||
|
|||
@Override |
|||
public PerformanceStatusVo toVo() { |
|||
PerformanceStatusVo vo =new PerformanceStatusVo(); |
|||
super.toVo(vo); |
|||
vo.setCode(this.getCode()); |
|||
vo.setName(this.getName()); |
|||
vo.setDescription(this.getDescription()); |
|||
vo.setMappingCode(this.getMappingCode()); |
|||
vo.setMappingName(this.getMappingName()); |
|||
vo.setMappingDescription(this.getMappingDescription()); |
|||
return vo; |
|||
} |
|||
|
|||
public PerformanceStatusEntity(){} |
|||
public PerformanceStatusEntity(String code){ |
|||
this.code =code; |
|||
} |
|||
|
|||
|
|||
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 String getMappingCode() { |
|||
return mappingCode; |
|||
} |
|||
|
|||
public void setMappingCode(String mappingCode) { |
|||
this.mappingCode = mappingCode; |
|||
} |
|||
|
|||
public String getMappingName() { |
|||
return mappingName; |
|||
} |
|||
|
|||
public void setMappingName(String mappingName) { |
|||
this.mappingName = mappingName; |
|||
} |
|||
|
|||
public String getMappingDescription() { |
|||
return mappingDescription; |
|||
} |
|||
|
|||
public void setMappingDescription(String mappingDescription) { |
|||
this.mappingDescription = mappingDescription; |
|||
} |
|||
} |
@ -0,0 +1,10 @@ |
|||
package io.sc.standard.jpa.repository; |
|||
|
|||
import io.sc.platform.orm.repository.DaoRepository; |
|||
import io.sc.standard.jpa.entity.CounterpartyEntity; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service("io.sc.standard.jpa.repository.CounterpartyRepository") |
|||
public interface CounterpartyRepository extends DaoRepository<CounterpartyEntity,String> { |
|||
|
|||
} |
@ -0,0 +1,10 @@ |
|||
package io.sc.standard.jpa.repository; |
|||
|
|||
import io.sc.platform.orm.repository.DaoRepository; |
|||
import io.sc.standard.jpa.entity.CountryEntity; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service("io.sc.standard.jpa.repository.CountryRepository") |
|||
public interface CountryRepository extends DaoRepository<CountryEntity,String> { |
|||
|
|||
} |
@ -0,0 +1,10 @@ |
|||
package io.sc.standard.jpa.repository; |
|||
|
|||
import io.sc.platform.orm.repository.DaoRepository; |
|||
import io.sc.standard.jpa.entity.CurrencyEntity; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service("io.sc.standard.jpa.repository.CurrencyRepository") |
|||
public interface CurrencyRepository extends DaoRepository<CurrencyEntity,String> { |
|||
|
|||
} |
@ -0,0 +1,10 @@ |
|||
package io.sc.standard.jpa.repository; |
|||
|
|||
import io.sc.platform.orm.repository.DaoRepository; |
|||
import io.sc.standard.jpa.entity.PerformanceStatusEntity; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service("io.sc.standard.jpa.repository.PerformanceStatusRepository") |
|||
public interface PerformanceStatusRepository extends DaoRepository<PerformanceStatusEntity,String> { |
|||
|
|||
} |
@ -1,55 +0,0 @@ |
|||
package io.sc.standard.plugins; |
|||
|
|||
import com.fasterxml.jackson.core.type.TypeReference; |
|||
import io.sc.platform.core.plugins.Plugin; |
|||
import io.sc.platform.core.plugins.PluginParser; |
|||
import io.sc.standard.plugins.item.DataStandard; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 系统参数和静态资源处理插件 |
|||
*/ |
|||
public class PluginManager { |
|||
private static final String DATA_STANDARD_LOCATION ="META-INF/platform/plugins/data-standard.json"; |
|||
|
|||
//
|
|||
private List<Plugin<List<DataStandard>>> dataStandardPlugins =new ArrayList<>(); |
|||
private List<DataStandard> dataStandards =new ArrayList<>(); |
|||
|
|||
/** |
|||
* 获取单例模式实例 |
|||
* @return 实例 |
|||
*/ |
|||
public static PluginManager getInstance(){ |
|||
return PluginManagerHolder.instance; |
|||
} |
|||
|
|||
private static class PluginManagerHolder{ |
|||
private static PluginManager instance =new PluginManager(); |
|||
} |
|||
|
|||
private PluginManager(){ |
|||
PluginParser parser =new PluginParser(); |
|||
loadDataStandardPlugins(parser); |
|||
} |
|||
|
|||
public List<Plugin<List<DataStandard>>> getDataStandardPlugins() { |
|||
return dataStandardPlugins; |
|||
} |
|||
public void setDataStandardPlugins(List<Plugin<List<DataStandard>>> dataStandardPlugins) { |
|||
this.dataStandardPlugins = dataStandardPlugins; |
|||
} |
|||
|
|||
private void loadDataStandardPlugins(PluginParser parser) { |
|||
dataStandardPlugins =parser.parse(DATA_STANDARD_LOCATION,new TypeReference<List<DataStandard>>(){}); |
|||
if(dataStandardPlugins!=null && !dataStandardPlugins.isEmpty()){ |
|||
List<DataStandard> items =new ArrayList<>(); |
|||
for(Plugin<List<DataStandard>> plugin : dataStandardPlugins){ |
|||
items.addAll(plugin.getValue()); |
|||
} |
|||
this.dataStandards =items; |
|||
} |
|||
} |
|||
} |
@ -1,12 +0,0 @@ |
|||
package io.sc.standard.plugins; |
|||
|
|||
import io.sc.platform.core.spi.PluginSpiService; |
|||
|
|||
/** |
|||
* 该类为 java SPI(Service Provider Interface) 模式的实现类, 用于加载插件 |
|||
*/ |
|||
public class PluginSpiServiceImpl implements PluginSpiService { |
|||
public PluginSpiServiceImpl(){ |
|||
PluginManager.getInstance(); |
|||
} |
|||
} |
@ -1,17 +0,0 @@ |
|||
package io.sc.standard.plugins.item; |
|||
|
|||
import java.util.HashSet; |
|||
import java.util.Set; |
|||
|
|||
public class DataStandard { |
|||
private String protocol; |
|||
private String host; |
|||
private Integer port; |
|||
private String contextPath; |
|||
private String name; |
|||
private Set<String> components =new HashSet<String>(); |
|||
private Set<String> resources =new HashSet<String>(); |
|||
|
|||
//附加属性
|
|||
private String configurationFileUrl; //菜单贡献项配置文件位置
|
|||
} |
@ -0,0 +1,8 @@ |
|||
package io.sc.standard.service; |
|||
|
|||
import io.sc.platform.orm.service.DaoService; |
|||
import io.sc.standard.jpa.entity.CounterpartyEntity; |
|||
import io.sc.standard.jpa.repository.CounterpartyRepository; |
|||
|
|||
public interface CounterpartyService extends DaoService<CounterpartyEntity, String, CounterpartyRepository> { |
|||
} |
@ -0,0 +1,8 @@ |
|||
package io.sc.standard.service; |
|||
|
|||
import io.sc.platform.orm.service.DaoService; |
|||
import io.sc.standard.jpa.entity.CountryEntity; |
|||
import io.sc.standard.jpa.repository.CountryRepository; |
|||
|
|||
public interface CountryService extends DaoService<CountryEntity, String, CountryRepository> { |
|||
} |
@ -0,0 +1,8 @@ |
|||
package io.sc.standard.service; |
|||
|
|||
import io.sc.platform.orm.service.DaoService; |
|||
import io.sc.standard.jpa.entity.CurrencyEntity; |
|||
import io.sc.standard.jpa.repository.CurrencyRepository; |
|||
|
|||
public interface CurrencyService extends DaoService<CurrencyEntity, String, CurrencyRepository> { |
|||
} |
@ -0,0 +1,8 @@ |
|||
package io.sc.standard.service; |
|||
|
|||
import io.sc.platform.orm.service.DaoService; |
|||
import io.sc.standard.jpa.entity.PerformanceStatusEntity; |
|||
import io.sc.standard.jpa.repository.PerformanceStatusRepository; |
|||
|
|||
public interface PerformanceStatusService extends DaoService<PerformanceStatusEntity, String, PerformanceStatusRepository> { |
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue