39 changed files with 674 additions and 40 deletions
@ -0,0 +1,87 @@ |
|||
package erm.capitalplan.api; |
|||
|
|||
import io.sc.platform.orm.api.vo.CorporationAuditorVo; |
|||
|
|||
public class StrategicTargetVo extends CorporationAuditorVo { |
|||
private String id; |
|||
private String code; |
|||
private String name; |
|||
private String category; |
|||
private Integer order; |
|||
private Double t; |
|||
private Double t1; |
|||
private Double t2; |
|||
private Double t3; |
|||
|
|||
public String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(String id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public String getCategory() { |
|||
return category; |
|||
} |
|||
|
|||
public void setCategory(String category) { |
|||
this.category = category; |
|||
} |
|||
|
|||
public Integer getOrder() { |
|||
return order; |
|||
} |
|||
|
|||
public void setOrder(Integer order) { |
|||
this.order = order; |
|||
} |
|||
|
|||
public Double getT() { |
|||
return t; |
|||
} |
|||
|
|||
public void setT(Double t) { |
|||
this.t = t; |
|||
} |
|||
|
|||
public Double getT1() { |
|||
return t1; |
|||
} |
|||
|
|||
public void setT1(Double t1) { |
|||
this.t1 = t1; |
|||
} |
|||
|
|||
public Double getT2() { |
|||
return t2; |
|||
} |
|||
|
|||
public void setT2(Double t2) { |
|||
this.t2 = t2; |
|||
} |
|||
|
|||
public Double getT3() { |
|||
return t3; |
|||
} |
|||
|
|||
public void setT3(Double t3) { |
|||
this.t3 = t3; |
|||
} |
|||
} |
@ -0,0 +1,79 @@ |
|||
<template> |
|||
<div style="height: 100%"> |
|||
<w-grid |
|||
ref="gridRef" |
|||
:title="$t('erm.capitalPlan.strategicTarget.grid.title')" |
|||
:config-button="true" |
|||
selection="multiple" |
|||
:checkbox-selection="true" |
|||
dense-body |
|||
:data-url="Environment.apiContextPath('/api/erm/capitalpan/strategicTarget')" |
|||
:pageable="false" |
|||
:sort-by="['order']" |
|||
:query-form-cols-num="3" |
|||
:query-form-fields="[]" |
|||
:toolbar-configure="{ noIcon: false }" |
|||
:toolbar-actions="['query', 'refresh', 'separator', 'add', 'clone', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
|||
:columns="[ |
|||
{ width: 60, name: 'order', label: $t('order') }, |
|||
{ width: 100, name: 'category', label: $t('category') }, |
|||
{ width: 150, name: 'code', label: $t('code') }, |
|||
{ width: '100%', name: 'name', label: $t('name') }, |
|||
{ width: 130, name: 't', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t'), align: 'right', format: Formater.thousands() }, |
|||
{ width: 130, name: 't1', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t1'), align: 'right', format: Formater.thousands() }, |
|||
{ width: 130, name: 't2', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t2'), align: 'right', format: Formater.thousands() }, |
|||
{ width: 130, name: 't3', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t3'), align: 'right', format: Formater.thousands() }, |
|||
{ width: 100, name: 'lastModifier', label: $t('lastModifier') }, |
|||
{ width: 110, name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.dateOnly() }, |
|||
]" |
|||
:editor="{ |
|||
dialog: { |
|||
width: '600px', |
|||
}, |
|||
form: { |
|||
colsNum: 1, |
|||
fields: [ |
|||
{ name: 'order', label: $t('order'), type: 'number' }, |
|||
{ name: 'category', label: $t('category'), type: 'text' }, |
|||
{ name: 'code', label: $t('code'), type: 'text', required: true }, |
|||
{ name: 'name', label: $t('name'), type: 'text', required: true }, |
|||
{ name: 't', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t'), type: 'number', precision: 3 }, |
|||
{ name: 't1', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t1'), type: 'number', precision: 3 }, |
|||
{ name: 't2', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t2'), type: 'number', precision: 3 }, |
|||
{ name: 't3', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t3'), type: 'number', precision: 3 }, |
|||
], |
|||
}, |
|||
}" |
|||
:viewer="{ |
|||
panel: { |
|||
columnNum: 1, |
|||
fields: [ |
|||
{ name: 'id', label: $t('id') }, |
|||
{ name: 'code', label: $t('code') }, |
|||
{ name: 'name', label: $t('name') }, |
|||
{ name: 'category', label: $t('category') }, |
|||
{ name: 't', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t'), format: Formater.thousands() }, |
|||
{ name: 't1', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t1'), format: Formater.thousands() }, |
|||
{ name: 't2', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t2'), format: Formater.thousands() }, |
|||
{ name: 't3', label: $t('erm.capitalPlan.strategicTarget.grid.entity.t3'), format: Formater.thousands() }, |
|||
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
|||
{ name: 'creator', label: $t('creator') }, |
|||
{ name: 'createDate', label: $t('createDate') }, |
|||
{ name: 'lastModifier', label: $t('lastModifier') }, |
|||
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
|||
{ name: 'corporationCode', label: $t('corporationCode') }, |
|||
], |
|||
}, |
|||
}" |
|||
@row-click="(evt, row, index) => {}" |
|||
@before-request-data="() => {}" |
|||
> |
|||
</w-grid> |
|||
</div> |
|||
</template> |
|||
<script setup lang="ts"> |
|||
import { ref } from 'vue'; |
|||
import { Environment, Formater } from 'platform-core'; |
|||
|
|||
const gridRef = ref(); |
|||
</script> |
@ -0,0 +1,15 @@ |
|||
package erm.capitalplan.controller; |
|||
|
|||
import erm.capitalplan.api.StrategicTargetVo; |
|||
import erm.capitalplan.jpa.entity.StrategicTargetEntity; |
|||
import erm.capitalplan.jpa.entity.repository.StrategicTargetRepository; |
|||
import erm.capitalplan.service.StrategicTargetService; |
|||
import io.sc.platform.mvc.controller.support.RestCrudController; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
@RestController("erm.capitalplan.controller.StrategicTargetWebController") |
|||
@RequestMapping("/api/erm/capitalpan/strategicTarget") |
|||
public class StrategicTargetWebController extends RestCrudController<StrategicTargetVo, StrategicTargetEntity,String, StrategicTargetRepository, StrategicTargetService> { |
|||
|
|||
} |
@ -0,0 +1,148 @@ |
|||
package erm.capitalplan.jpa.entity; |
|||
|
|||
import erm.appetite.api.CrossValidateVo; |
|||
import erm.capitalplan.api.StrategicTargetVo; |
|||
import io.sc.platform.orm.entity.CorporationAuditorEntity; |
|||
import org.hibernate.annotations.GenericGenerator; |
|||
|
|||
import javax.persistence.*; |
|||
import javax.validation.constraints.Size; |
|||
|
|||
@Entity |
|||
@Table(name="RP_CP_STRATEGIC_TARGET") |
|||
public class StrategicTargetEntity extends CorporationAuditorEntity<StrategicTargetVo> { |
|||
//ID,主键
|
|||
@Id |
|||
@GeneratedValue(generator = "system-uuid") |
|||
@GenericGenerator(name = "system-uuid", strategy = "uuid2") |
|||
@Column(name="ID_", length=36) |
|||
@Size(max=36) |
|||
private String id; |
|||
|
|||
//代码
|
|||
@Column(name="CODE_",nullable=false,length=255) |
|||
@Size(max=255) |
|||
private String code; |
|||
|
|||
//名称
|
|||
@Column(name="NAME_",nullable=false, length=255) |
|||
@Size(min=1,max=255) |
|||
private String name; |
|||
|
|||
//分类
|
|||
@Column(name="CATEGORY_",length=255) |
|||
@Size(max=255) |
|||
private String category; |
|||
|
|||
@Column(name="ORDER_") |
|||
private Integer order; |
|||
|
|||
//T年
|
|||
@Column(name="T_") |
|||
private Double t; |
|||
|
|||
//T+1年
|
|||
@Column(name="T1_") |
|||
private Double t1; |
|||
|
|||
//T+2年
|
|||
@Column(name="T2_") |
|||
private Double t2; |
|||
|
|||
//T+3年
|
|||
@Column(name="T3_") |
|||
private Double t3; |
|||
|
|||
@Override |
|||
public StrategicTargetVo toVo() { |
|||
StrategicTargetVo vo =new StrategicTargetVo(); |
|||
super.toVo(vo); |
|||
vo.setId(this.getId()); |
|||
vo.setCode(this.getCode()); |
|||
vo.setName(this.getName()); |
|||
vo.setCategory(this.getCategory()); |
|||
vo.setOrder(this.getOrder()); |
|||
vo.setT(this.getT()); |
|||
vo.setT1(this.getT1()); |
|||
vo.setT2(this.getT2()); |
|||
vo.setT3(this.getT3()); |
|||
return vo; |
|||
} |
|||
|
|||
public StrategicTargetEntity(){} |
|||
public StrategicTargetEntity(String id){ |
|||
this.id =id; |
|||
} |
|||
|
|||
public @Size(max = 36) String getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(@Size(max = 36) String id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public @Size(max = 255) String getCode() { |
|||
return code; |
|||
} |
|||
|
|||
public void setCode(@Size(max = 255) String code) { |
|||
this.code = code; |
|||
} |
|||
|
|||
public @Size(min = 1, max = 255) String getName() { |
|||
return name; |
|||
} |
|||
|
|||
public void setName(@Size(min = 1, max = 255) String name) { |
|||
this.name = name; |
|||
} |
|||
|
|||
public @Size(max = 255) String getCategory() { |
|||
return category; |
|||
} |
|||
|
|||
public void setCategory(@Size(max = 255) String category) { |
|||
this.category = category; |
|||
} |
|||
|
|||
public Integer getOrder() { |
|||
return order; |
|||
} |
|||
|
|||
public void setOrder(Integer order) { |
|||
this.order = order; |
|||
} |
|||
|
|||
public Double getT() { |
|||
return t; |
|||
} |
|||
|
|||
public void setT(Double t) { |
|||
this.t = t; |
|||
} |
|||
|
|||
public Double getT1() { |
|||
return t1; |
|||
} |
|||
|
|||
public void setT1(Double t1) { |
|||
this.t1 = t1; |
|||
} |
|||
|
|||
public Double getT2() { |
|||
return t2; |
|||
} |
|||
|
|||
public void setT2(Double t2) { |
|||
this.t2 = t2; |
|||
} |
|||
|
|||
public Double getT3() { |
|||
return t3; |
|||
} |
|||
|
|||
public void setT3(Double t3) { |
|||
this.t3 = t3; |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
package erm.capitalplan.jpa.entity.repository; |
|||
|
|||
import erm.appetite.jpa.entity.CrossValidateEntity; |
|||
import erm.capitalplan.jpa.entity.StrategicTargetEntity; |
|||
import io.sc.platform.orm.repository.DaoRepository; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
@Repository("erm.capitalplan.jpa.entity.repository.StrategicTargetRepository") |
|||
public interface StrategicTargetRepository extends DaoRepository<StrategicTargetEntity,String> { |
|||
|
|||
} |
@ -0,0 +1,10 @@ |
|||
package erm.capitalplan.service; |
|||
|
|||
import erm.appetite.jpa.entity.CrossValidateEntity; |
|||
import erm.appetite.jpa.repository.CrossValidateRepository; |
|||
import erm.capitalplan.jpa.entity.StrategicTargetEntity; |
|||
import erm.capitalplan.jpa.entity.repository.StrategicTargetRepository; |
|||
import io.sc.platform.orm.service.DaoService; |
|||
|
|||
public interface StrategicTargetService extends DaoService<StrategicTargetEntity, String, StrategicTargetRepository> { |
|||
} |
@ -0,0 +1,12 @@ |
|||
package erm.capitalplan.service.impl; |
|||
|
|||
import erm.capitalplan.jpa.entity.StrategicTargetEntity; |
|||
import erm.capitalplan.jpa.entity.repository.StrategicTargetRepository; |
|||
import erm.capitalplan.service.StrategicTargetService; |
|||
import io.sc.platform.orm.service.impl.DaoServiceImpl; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
@Service("erm.capitalplan.service.impl.StrategicTargetServiceImpl") |
|||
public class StrategicTargetServiceImpl extends DaoServiceImpl<StrategicTargetEntity, String, StrategicTargetRepository> implements StrategicTargetService { |
|||
|
|||
} |
|
@ -0,0 +1,19 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<databaseChangeLog |
|||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" |
|||
xsi:schemaLocation=" |
|||
http://www.liquibase.org/xml/ns/dbchangelog |
|||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd |
|||
http://www.liquibase.org/xml/ns/dbchangelog-ext |
|||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd |
|||
" |
|||
> |
|||
<changeSet id="erm.capitalpan_1.0.0_20221020__ERM Capital Plan Database Data" author="platform"> |
|||
<!-- 资本规划战略目标表 --> |
|||
<customChange class="io.sc.platform.jdbc.liquibase.task.CsvImportTaskChange"> |
|||
<param name="dataFile" value="classpath:/erm/liquibase/data/rp_cp_strategic_target.csv"/> |
|||
</customChange> |
|||
</changeSet> |
|||
</databaseChangeLog> |
@ -0,0 +1,44 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<databaseChangeLog |
|||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" |
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" |
|||
xsi:schemaLocation=" |
|||
http://www.liquibase.org/xml/ns/dbchangelog |
|||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd |
|||
http://www.liquibase.org/xml/ns/dbchangelog-ext |
|||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd |
|||
" |
|||
> |
|||
<changeSet id="erm.kpi_1.0.0_20221020__ERM KPI Database Schema DDL" author="platform"> |
|||
<!-- 资本规划战略目标表 --> |
|||
<createTable tableName="RP_CP_STRATEGIC_TARGET" remarks="资本规划战略目标表"> |
|||
<column name="ID_" type="NVARCHAR(36)" remarks="ID"> |
|||
<constraints primaryKey="true"/> |
|||
</column> |
|||
<column name="CODE_" type="NVARCHAR(255)" remarks="指标代码"/> |
|||
<column name="NAME_" type="NVARCHAR(255)" remarks="指标名称"/> |
|||
<column name="CATEGORY_" type="NVARCHAR(255)" remarks="指标分类"/> |
|||
<column name="ORDER_" type="INTEGER" remarks="指标排序"/> |
|||
<column name="T_" type="NUMERIC(22,6)" remarks="指标T年值"/> |
|||
<column name="T1_" type="NUMERIC(22,6)" remarks="指标T+1年值"/> |
|||
<column name="T2_" type="NUMERIC(22,6)" remarks="指标T+2年值"/> |
|||
<column name="T3_" type="NUMERIC(22,6)" remarks="指标T+3年值"/> |
|||
|
|||
<column name="JPA_VERSION_" type="INTEGER" remarks="JPA乐观锁版本"/> |
|||
<column name="DATA_COME_FROM_" type="NVARCHAR(10)" remarks="数据来源(INPUT:手工录入,IMPORT:系统自动导入)"/> |
|||
<column name="CREATOR_" type="NVARCHAR(255)" remarks="创建人"/> |
|||
<column name="CREATE_DATE_" type="DATETIME" remarks="创建日期"/> |
|||
<column name="LAST_MODIFIER_" type="NVARCHAR(255)" remarks="最后修改人"/> |
|||
<column name="LAST_MODIFYDATE_" type="DATETIME" remarks="最后修改日期"/> |
|||
<column name="CORP_CODE_" type="NVARCHAR(255)" remarks="所属法人代码"/> |
|||
</createTable> |
|||
<addUniqueConstraint tableName="RP_INDICATOR" columnNames="CODE_,CORP_CODE_"></addUniqueConstraint> |
|||
<addNotNullConstraint columnName="CODE_" columnDataType="NVARCHAR(255)" tableName="RP_INDICATOR" constraintName="CONST_RP_INDICATOR_CODE"/> |
|||
<addNotNullConstraint columnName="DATA_COME_FROM_" columnDataType="NVARCHAR(10)" tableName="RP_INDICATOR" constraintName="CONST_RP_INDICATOR_DCF"/> |
|||
<addNotNullConstraint columnName="CORP_CODE_" columnDataType="NVARCHAR(255)" tableName="RP_INDICATOR" constraintName="CONST_RP_INDICATOR_CORP"/> |
|||
<addDefaultValue columnName="DATA_COME_FROM_" columnDataType="NVARCHAR(10)" tableName="RP_INDICATOR" defaultValue="INPUT"/> |
|||
<addDefaultValue columnName="CORP_CODE_" columnDataType="NVARCHAR(255)" tableName="RP_INDICATOR" defaultValue="_PRIMARY_"/> |
|||
</changeSet> |
|||
</databaseChangeLog> |
|||
|
Loading…
Reference in new issue