Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
bb
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abs_pom
bb
Commits
fd6456af
Commit
fd6456af
authored
Apr 29, 2020
by
zhaoyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品管理开发和测试
parent
3056ac0e
Hide whitespace changes
Inline
Side-by-side
Showing
90 changed files
with
2813 additions
and
734 deletions
+2813
-734
app/biz/service/src/main/java/com/abssqr/plat/biz/api/plan/PlanServiceImpl.java
+59
-10
app/common/dal/dalgen/AbssqrCoreTables/ABS_LOAN.xml
+2
-2
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN.xml
+78
-16
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_ACCT_TITLE.xml
+13
-1
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_ALLOC.xml
+40
-1
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_ALLOC_ITEM.xml
+145
-0
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_FEE_STRUCTURE.xml
+35
-15
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_INVEST_STRUCTURE.xml
+21
-7
app/common/dal/src/getsetter/Do/PlanAllocItemDO.txt
+1
-1
app/common/dal/src/getsetter/Do/PlanDO.txt
+6
-6
app/common/dal/src/getsetter/Do/PlanFeeStructureDO.txt
+3
-3
app/common/dal/src/main/java/com/abssqr/plat/common/dal/AbssqrCoreConstants.java
+6
-6
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanAcctTitleDAO.java
+18
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanAllocDAO.java
+36
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanAllocItemDAO.java
+27
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanDAO.java
+54
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanFeeStructureDAO.java
+18
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanInvestStructureDAO.java
+18
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dataobject/PlanAllocItemDO.java
+8
-8
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dataobject/PlanDO.java
+40
-40
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dataobject/PlanFeeStructureDO.java
+28
-28
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dataobject/PlanInvestStructureDO.java
+8
-8
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAcctTitleDOMapper.java
+12
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAllocDOMapper.java
+24
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAllocItemDOMapper.java
+18
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanDOMapper.java
+38
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanFeeStructureDOMapper.java
+12
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanInvestStructureDOMapper.java
+12
-0
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/paging/PlanListPage.java
+14
-115
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/LoanDOMapper.xml
+4
-4
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAcctTitleDOMapper.xml
+15
-1
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAllocDOMapper.xml
+42
-1
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAllocItemDOMapper.xml
+38
-8
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanDOMapper.xml
+107
-18
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanFeeStructureDOMapper.xml
+35
-15
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanInvestStructureDOMapper.xml
+24
-8
app/common/facade/src/main/java/com/abssqr/plat/common/facade/enums/AllocTypeEmun.java
+8
-3
app/common/facade/src/main/java/com/abssqr/plat/common/facade/enums/FeeTimeTypeEnum.java
+1
-2
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/FeeStructure.java
+12
-11
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/InvestStructure.java
+6
-6
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/Plan.java
+3
-2
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/PlanAlloc.java
+12
-0
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/PlanAllocItem.java
+5
-5
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/PlanBase.java
+34
-18
app/common/facade/src/main/java/com/abssqr/plat/common/facade/param/plan/PlanEditOprParam.java
+22
-28
app/common/facade/src/main/java/com/abssqr/plat/common/facade/param/plan/PlanPageQryParam.java
+9
-73
app/common/facade/src/main/java/com/abssqr/plat/common/facade/param/plan/sub/FeeStructureParam.java
+25
-12
app/common/facade/src/main/java/com/abssqr/plat/common/facade/param/plan/sub/InvestStructureParam.java
+8
-9
app/common/facade/src/main/java/com/abssqr/plat/common/facade/result/plan/PlanVO.java
+47
-28
app/common/facade/src/main/java/com/abssqr/plat/common/facade/result/plan/sub/FeeStructureVO.java
+25
-14
app/common/facade/src/main/java/com/abssqr/plat/common/facade/result/plan/sub/InvestStructureVO.java
+16
-15
app/common/facade/src/main/java/com/abssqr/plat/common/facade/service/plan/PlanService.java
+18
-0
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/FeeStructureConvert.java
+36
-5
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/InvestStructureConvert.java
+38
-4
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/PlanAcctTitleConvert.java
+25
-1
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/PlanAllocConvert.java
+39
-0
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/PlanAllocItemConvert.java
+34
-2
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/PlanConvert.java
+26
-7
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/web/PlanWebConvert.java
+142
-12
app/common/model/src/main/java/com/abssqr/plat/common/model/enums/IdTypeEnum.java
+2
-2
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/PlanAllocRepo.java
+3
-71
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/PlanRepo.java
+12
-13
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/PlanAllocRepoImpl.java
+73
-0
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/PlanFeeStructureRepoImpl.java
+39
-0
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/PlanInvestStructureRepoImpl.java
+37
-0
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/PlanRepoImpl.java
+62
-0
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/planAcctTitleRepoImpl.java
+57
-0
app/core/service/src/main/java/com/abssqr/plat/core/service/plan/PlanAccTitleManager.java
+111
-0
app/core/service/src/main/java/com/abssqr/plat/core/service/plan/PlanAllocManager.java
+274
-0
app/core/service/src/main/java/com/abssqr/plat/core/service/plan/PlanMananger.java
+171
-0
app/test/src/test/java/com/abssqr/plat/test/BaseAutoWithOutMockTests.java
+1
-1
app/test/src/test/java/com/abssqr/plat/test/GsonTest.java
+0
-56
app/test/src/test/java/com/abssqr/plat/test/unittest/plan/PlanEditUnitTest.java
+54
-0
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0001/ABS_PLAN.csv
+2
-0
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0001/ABS_PLAN_FEE_STRUCTURE.csv
+2
-0
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0001/ABS_PLAN_INVEST_STRUCTURE.csv
+2
-0
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN.csv
+2
-0
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN_ACCT_TITLE.csv
+4
-0
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN_ALLOC.csv
+26
-0
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN_FEE_STRUCTURE.csv
+2
-0
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN_INVEST_STRUCTURE.csv
+2
-0
app/test/src/test/resources/testdata/unittest/plan/edit/plan_add_case0001.yaml
+73
-0
app/test/src/test/resources/testdata/unittest/plan/edit/plan_add_case0002.yaml
+76
-0
app/test/target/maven-archiver/pom.properties
+0
-5
app/test/target/test-1.0-sources.jar
+0
-0
app/test/target/test-1.0.jar
+0
-0
app/web/src/main/java/com/abssqr/plat/web/controller/pack/PackController.java
+2
-0
app/web/src/main/java/com/abssqr/plat/web/controller/plan/PlanController.java
+65
-0
doc/一期/ABS_PLAN.sql
+6
-4
doc/一期/ABS_PLAN_FEE_STRUCTURE.sql
+3
-3
No files found.
app/biz/service/src/main/java/com/abssqr/plat/biz/api/plan/PlanServiceImpl.java
View file @
fd6456af
/*
package
com
.
abssqr
.
plat
.
biz
.
api
.
plan
;
import
com.abssqr.plat.biz.support.ServiceSupport
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.AstPackPagePage
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.PlanListPage
;
import
com.abssqr.plat.common.facade.base.BaseStringParam
;
import
com.abssqr.plat.common.facade.enums.PlanStatusEnum
;
import
com.abssqr.plat.common.facade.model.plan.Plan
;
import
com.abssqr.plat.common.facade.param.plan.PlanEditOprParam
;
import
com.abssqr.plat.common.facade.param.plan.PlanPageQryParam
;
import
com.abssqr.plat.common.facade.result.BasePage
;
import
com.abssqr.plat.common.facade.result.pack.AstPackListVO
;
import
com.abssqr.plat.common.facade.result.plan.PlanVO
;
import
com.abssqr.plat.common.facade.service.plan.PlanService
;
import
com.abssqr.plat.common.facade.validation.Valid
;
import
com.abssqr.plat.common.model.convertor.vo.AstPackListVOConvert
;
import
com.abssqr.plat.common.model.convertor.web.PlanWebConvert
;
import com.abssqr.plat.common.model.enums.IdTypeEnum;
import
com.abssqr.plat.common.model.repo.plan.PlanRepo
;
import com.abssqr.plat.co
mmon.model.seq.SequenceUtil
;
import
com.abssqr.plat.co
re.service.plan.PlanMananger
;
import
com.general.system.common.model.BaseResult
;
import
com.general.system.common.util.VarChecker
;
import
com.general.system.facade.current.IdentityUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
@Component
public
class
PlanServiceImpl
extends
ServiceSupport
implements
PlanService
{
@Autowired
PlanMananger
planMananger
;
@Autowired
PlanRepo
planRepo
;
/**
* 增改产品
* @param planEditOprParam
* @return
*/
@Override
public BaseResult<PlanVO> edit(@Valid PlanEditOprParam planEditOprParam){
public
String
edit
(
@Valid
PlanEditOprParam
planEditOprParam
)
{
return
doOpr
(
planEditOprParam
,
()
->
{
return
planMananger
.
addOrUpdatePlan
(
planEditOprParam
,
IdentityUtil
.
getUserCode
());
});
}
//如果是暂存则直接保存
if(planEditOprParam.isDraft()){
Plan plan = PlanWebConvert.convertPlanParam(planEditOprParam);
/**
* 获取产品详情
* @param planNo
* @return
*/
@Override
public
PlanVO
get
(
String
planNo
)
{
return
super
.
doQry
(
new
BaseStringParam
(
planNo
),()->{
Plan
plan
=
planMananger
.
getPlan
(
planNo
);
return
PlanWebConvert
.
convert2PlanVO
(
plan
);
});
}
/**
* 分页获取产品列表
* @param planPageQryParam
* @return
*/
@Override
public
BasePage
<
PlanVO
>
page
(
PlanPageQryParam
planPageQryParam
)
{
return
super
.
doQry
(
planPageQryParam
,()->{
PlanListPage
planList
=
planRepo
.
getPlanList
(
PlanWebConvert
.
convertParam2Page
(
planPageQryParam
));
return
PlanWebConvert
.
convertPage2VO
(
planList
);
});
}
}
return null;
@Override
public
BaseResult
<
Boolean
>
delete
(
String
planNo
)
{
Plan
plan
=
planRepo
.
getPlanByNo
(
planNo
);
VarChecker
.
checkNotNull
(
plan
,
"产品[{0}]不存在"
,
planNo
);
VarChecker
.
checkArgument
(
plan
.
getStatus
()==
PlanStatusEnum
.
DRAFT
||
plan
.
getStatus
()==
PlanStatusEnum
.
PREPARING
,
"产品状态为[{0}]不饿能删除"
,
plan
.
getStatus
().
getDesc
());
planRepo
.
deletePlan
(
planNo
);
return
BaseResult
.
success
(
true
);
}
}
*/
app/common/dal/dalgen/AbssqrCoreTables/ABS_LOAN.xml
View file @
fd6456af
...
...
@@ -422,8 +422,8 @@
<operation
name=
"getLoanPageByPackNo"
multiplicity=
"paging"
paging=
"PackAst"
remark=
"根据资产包编号分页获取所有的资产"
>
SELECT sf.*
FROM ABS_LOAN
L1
LEFT JOIN ABS_LOAN_PACK_REL R1 ON
L1
.AST_NO=R1.AST_NO
FROM ABS_LOAN
sf
LEFT JOIN ABS_LOAN_PACK_REL R1 ON
sf
.AST_NO=R1.AST_NO
WHERE
R1.PACK_NO=#{packNo,jdbcType=VARCHAR}
</operation>
...
...
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN.xml
View file @
fd6456af
...
...
@@ -3,18 +3,18 @@
<!-- 特殊字符说明 <> <> -->
<!-- baseSql option中 select * 会自动替换为 include -->
<sql
id=
"Base_Column_List"
>
ID,TOTAL_AMT,
ALLOC_PERIOD,PLAN_NO,STATUS
,PLAN_NAME,
TRADE_PLACE,CALC_INTR_TYPE,PLAN_FULL_NAME,ALLOC_PERIOD_METHOD
,
END_DATE,BEGIN_DATE,GMT_CREATE,GMT_MODIFIED,FIRST_PAY_DATE
,FIRST_CALC_DATE,FIRST_ALLOC_DATE,FIRST_REPORT_DATE,FIRST_SETTLE_DATE
ID,TOTAL_AMT,
PLAN_NO,STATUS,PAY_FREQ
,PLAN_NAME,
GMT_CREATOR,TRADE_PLACE,GMT_MODIFIER,CALC_INTR_TYPE
,
PLAN_FULL_NAME,END_DATE,BEGIN_DATE,GMT_CREATE,GMT_MODIFIED
,FIRST_
PAY_DATE,FIRST_
CALC_DATE,FIRST_ALLOC_DATE,FIRST_REPORT_DATE,FIRST_SETTLE_DATE
</sql>
<!-- baseSql option中 select sf.* 会自动替换为 include -->
<sql
id=
"Base_SF_Column_List"
>
sf.ID,sf.TOTAL_AMT,sf.
ALLOC_PERIOD,sf.PLAN_NO,sf.STATUS
,sf.PLAN_NAME,sf.
TRADE_PLACE,sf.CALC_INTR_TYPE,sf.PLAN_FULL_NAME,sf.ALLOC_PERIOD_METHOD
,sf.
END_DATE,sf.BEGIN_DATE,sf.GMT_CREATE,sf.GMT_MODIFIED,sf.FIRST_PAY_DATE
,sf.FIRST_CALC_DATE,sf.FIRST_ALLOC_DATE,sf.FIRST_REPORT_DATE,sf.FIRST_SETTLE_DATE
sf.ID,sf.TOTAL_AMT,sf.
PLAN_NO,sf.STATUS,sf.PAY_FREQ
,sf.PLAN_NAME,sf.
GMT_CREATOR,sf.TRADE_PLACE,sf.GMT_MODIFIER,sf.CALC_INTR_TYPE
,sf.
PLAN_FULL_NAME,sf.END_DATE,sf.BEGIN_DATE,sf.GMT_CREATE,sf.GMT_MODIFIED
,sf.FIRST_
PAY_DATE,sf.FIRST_
CALC_DATE,sf.FIRST_ALLOC_DATE,sf.FIRST_REPORT_DATE,sf.FIRST_SETTLE_DATE
</sql>
<operation
name=
"insert"
paramtype=
"object"
remark=
"插入表:abs_plan"
>
...
...
@@ -22,14 +22,15 @@
INSERT INTO abs_plan(
ID
,TOTAL_AMT
,ALLOC_PERIOD
,PLAN_NO
,STATUS
,PAY_FREQ
,PLAN_NAME
,GMT_CREATOR
,TRADE_PLACE
,GMT_MODIFIER
,CALC_INTR_TYPE
,PLAN_FULL_NAME
,ALLOC_PERIOD_METHOD
,END_DATE
,BEGIN_DATE
,GMT_CREATE
...
...
@@ -42,14 +43,15 @@
)VALUES(
SEQ_ABS_PLAN.nextval
, #{totalAmt,jdbcType=DECIMAL}
, #{allocPeriod,jdbcType=DECIMAL}
, #{planNo,jdbcType=VARCHAR}
, #{status,jdbcType=VARCHAR}
, #{payFreq,jdbcType=VARCHAR}
, #{planName,jdbcType=VARCHAR}
, #{gmtCreator,jdbcType=VARCHAR}
, #{tradePlace,jdbcType=VARCHAR}
, #{gmtModifier,jdbcType=VARCHAR}
, #{calcIntrType,jdbcType=VARCHAR}
, #{planFullName,jdbcType=VARCHAR}
, #{allocPeriodMethod,jdbcType=VARCHAR}
, #{endDate,jdbcType=DATE}
, #{beginDate,jdbcType=DATE}
, sysdate
...
...
@@ -70,14 +72,15 @@
INSERT INTO abs_plan(
ID
,TOTAL_AMT
,ALLOC_PERIOD
,PLAN_NO
,STATUS
,PAY_FREQ
,PLAN_NAME
,GMT_CREATOR
,TRADE_PLACE
,GMT_MODIFIER
,CALC_INTR_TYPE
,PLAN_FULL_NAME
,ALLOC_PERIOD_METHOD
,END_DATE
,BEGIN_DATE
,GMT_CREATE
...
...
@@ -91,14 +94,15 @@
(
null
, #{item.totalAmt,jdbcType=DECIMAL}
, #{item.allocPeriod,jdbcType=DECIMAL}
, #{item.planNo,jdbcType=VARCHAR}
, #{item.status,jdbcType=VARCHAR}
, #{item.payFreq,jdbcType=VARCHAR}
, #{item.planName,jdbcType=VARCHAR}
, #{item.gmtCreator,jdbcType=VARCHAR}
, #{item.tradePlace,jdbcType=VARCHAR}
, #{item.gmtModifier,jdbcType=VARCHAR}
, #{item.calcIntrType,jdbcType=VARCHAR}
, #{item.planFullName,jdbcType=VARCHAR}
, #{item.allocPeriodMethod,jdbcType=VARCHAR}
, #{item.endDate,jdbcType=DATE}
, #{item.beginDate,jdbcType=DATE}
, sysdate
...
...
@@ -113,4 +117,62 @@
</operation>
<operation
name=
"getPlanByNo"
multiplicity=
"one"
>
select *
from abs_plan
where plan_no=#{planNo,jdbcType=VARCHAR}
</operation>
<operation
name=
"updatePlanByNo"
paramtype=
"object"
remark=
"根据唯一约束PlanNo更新表:abs_plan"
>
UPDATE ABS_PLAN
SET
TOTAL_AMT= #{item.totalAmt,jdbcType=DECIMAL}
,STATUS = #{item.status,jdbcType=VARCHAR}
,PAY_FREQ = #{item.payFreq,jdbcType=VARCHAR}
,PLAN_NAME = #{item.planName,jdbcType=VARCHAR}
,TRADE_PLACE = #{item.tradePlace,jdbcType=VARCHAR}
,CALC_INTR_TYPE = #{item.calcIntrType,jdbcType=VARCHAR}
,PLAN_FULL_NAME = #{item.planFullName,jdbcType=VARCHAR}
,END_DATE = #{item.endDate,jdbcType=DATE}
,BEGIN_DATE = #{item.beginDate,jdbcType=DATE}
,FIRST_PAY_DATE = #{item.firstPayDate,jdbcType=DATE}
,FIRST_CALC_DATE = #{item.firstCalcDate,jdbcType=DATE}
,FIRST_ALLOC_DATE = #{item.firstAllocDate,jdbcType=DATE}
,FIRST_REPORT_DATE = #{item.firstReportDate,jdbcType=DATE}
,FIRST_SETTLE_DATE = #{item.firstSettleDate,jdbcType=DATE}
,GMT_MODIFIER = #{item.gmtModifier,jdbcType=VARCHAR}
,GMT_MODIFIED = sysdate
WHERE PLAN_NO= #{planNo,jdbcType=VARCHAR}
</operation>
<operation
name=
"planExist"
resulttype=
"int"
remark=
"根据PlanName 和 PlanFullName判断是否存在对应的计划"
>
SELECT
COUNT(1)
FROM ABS_PLAN
WHERE
PLAN_NAME = #{planName,jdbcType=VARCHAR}
OR PLAN_FULL_NAME = #{planFullName,jdbcType=VARCHAR}
</operation>
<operation
name=
"getPlanList"
multiplicity=
"paging"
paging=
"PlanList"
>
select *
from abs_plan
where
1=1
<if
test=
"planName!=null"
>
and plan_name like '%'||#{planName,jdbcType=VARCHAR}||'%'
</if>
<if
test=
"status!=null"
>
and status = #{status,jdbcType=VARCHAR}
</if>
</operation>
<operation
name=
"deleteByPlanNo"
>
delete
from abs_plan
where PLAN_NO= #{planNo,jdbcType=VARCHAR}
</operation>
</table>
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_ACCT_TITLE.xml
View file @
fd6456af
...
...
@@ -52,7 +52,7 @@
,GMT_MODIFIED
)VALUES
(
nul
l
SEQ_ABS_PLAN_ACCT_TITLE.nextva
l
, #{item.refNo,jdbcType=VARCHAR}
, #{item.planNo,jdbcType=VARCHAR}
, #{item.titleNo,jdbcType=VARCHAR}
...
...
@@ -64,5 +64,17 @@
</foreach>
</operation>
<operation
name=
"deleteByPlanNo"
>
delete
from abs_plan_acct_title
where plan_no=#{planNo,jdbcType=VARCHAR}
</operation>
<operation
name=
"getByPlanNo"
multiplicity=
"many"
>
select *
from abs_plan_acct_title
where plan_no=#{planNo,jdbcType=VARCHAR}
</operation>
</table>
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_ALLOC.xml
View file @
fd6456af
...
...
@@ -58,7 +58,7 @@
,GMT_MODIFIED
)VALUES
(
nul
l
SEQ_ABS_PLAN_ALLOC.nextva
l
, #{item.planNo,jdbcType=VARCHAR}
, #{item.allocNo,jdbcType=VARCHAR}
, #{item.payDate,jdbcType=DATE}
...
...
@@ -107,4 +107,43 @@
]]>
</operation>
<operation
name=
"getByPlanNo"
multiplicity=
"many"
remark=
"根据计划编号获取数据:abs_plan_alloc"
>
SELECT *
FROM abs_plan_alloc
WHERE
<![CDATA[
PLAN_NO = #{planNo,jdbcType=DECIMAL}
]]>
</operation>
<operation
name=
"deleteByPlanNo"
remark=
"根据计划编号删除:abs_plan_alloc"
>
delete
abs_plan_alloc
WHERE
<![CDATA[
PLAN_NO = #{planNo,jdbcType=DECIMAL}
]]>
</operation>
<operation
name=
"deleteByAllocNo"
remark=
"根据兑付计划查询:abs_plan_alloc"
>
delete
from abs_plan_alloc
WHERE
<![CDATA[
ALLOC_NO = #{allocNo,jdbcType=DECIMAL}
]]>
</operation>
<operation
name=
"getByAllocNo"
remark=
"根据兑付计划编号查询:abs_plan_alloc"
>
select
*
from abs_plan_alloc
WHERE
<![CDATA[
ALLOC_NO = #{allocNo,jdbcType=DECIMAL}
]]>
</operation>
</table>
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_ALLOC_ITEM.xml
0 → 100644
View file @
fd6456af
<!DOCTYPE table SYSTEM "../config/table-config-1.0.dtd">
<table
sqlname=
"abs_plan_alloc_item"
physicalName=
"abs_plan_alloc_item"
remark=
"分配计划事项表"
>
<!-- 特殊字符说明 <> <> -->
<!-- baseSql option中 select * 会自动替换为 include -->
<sql
id=
"Base_Column_List"
>
ID,SORT,ITEM_NO,PLAN_NO,ALLOC_NO
,TITLE_NO,ALLOC_TYPE,TITLE_NAME,GMT_CREATE,GMT_MODIFIED
</sql>
<!-- baseSql option中 select sf.* 会自动替换为 include -->
<sql
id=
"Base_SF_Column_List"
>
sf.ID,sf.SORT,sf.ITEM_NO,sf.PLAN_NO,sf.ALLOC_NO
,sf.TITLE_NO,sf.ALLOC_TYPE,sf.TITLE_NAME,sf.GMT_CREATE,sf.GMT_MODIFIED
</sql>
<operation
name=
"insert"
paramtype=
"object"
remark=
"插入表:abs_plan_alloc_item"
>
<![CDATA[
INSERT INTO abs_plan_alloc_item(
ID
,SORT
,ITEM_NO
,PLAN_NO
,ALLOC_NO
,TITLE_NO
,ALLOC_TYPE
,TITLE_NAME
,GMT_CREATE
,GMT_MODIFIED
)VALUES(
SEQ_ABS_PLAN_ALLOC_ITEM.nextval
, #{sort,jdbcType=DECIMAL}
, #{itemNo,jdbcType=VARCHAR}
, #{planNo,jdbcType=VARCHAR}
, #{allocNo,jdbcType=VARCHAR}
, #{titleNo,jdbcType=VARCHAR}
, #{allocType,jdbcType=VARCHAR}
, #{titleName,jdbcType=VARCHAR}
, sysdate
, sysdate
)
]]>
</operation>
<!-- foreach 可以自定义类型,paramtype="primitive" foreach->javatype="自己书写的类" -->
<!-- 只有一个参数且为List时必须将参数命名为list -->
<operation
name=
"insertBatch"
paramtype=
"objectList"
remark=
"批量插入表:abs_plan_alloc_item"
>
<foreach
collection=
"list"
item=
"item"
separator=
";"
>
INSERT INTO abs_plan_alloc_item(
ID
,SORT
,ITEM_NO
,PLAN_NO
,ALLOC_NO
,TITLE_NO
,ALLOC_TYPE
,TITLE_NAME
,GMT_CREATE
,GMT_MODIFIED
)VALUES
(
SEQ_ABS_PLAN_ALLOC_ITEM.nextval
, #{item.sort,jdbcType=DECIMAL}
, #{item.itemNo,jdbcType=VARCHAR}
, #{item.planNo,jdbcType=VARCHAR}
, #{item.allocNo,jdbcType=VARCHAR}
, #{item.titleNo,jdbcType=VARCHAR}
, #{item.allocType,jdbcType=VARCHAR}
, #{item.titleName,jdbcType=VARCHAR}
, sysdate
, sysdate
)
</foreach>
</operation>
<!-- 不推荐使用全 update 有需要自己打开
<operation name="update" paramtype="object" remark="更新表:abs_plan_alloc_item" >
<![CDATA[
UPDATE abs_plan_alloc_item
SET
SORT = #{sort,jdbcType=DECIMAL}
,ITEM_NO = #{itemNo,jdbcType=VARCHAR}
,PLAN_NO = #{planNo,jdbcType=VARCHAR}
,ALLOC_NO = #{allocNo,jdbcType=VARCHAR}
,TITLE_NO = #{titleNo,jdbcType=VARCHAR}
,ALLOC_TYPE = #{allocType,jdbcType=VARCHAR}
,TITLE_NAME = #{titleName,jdbcType=VARCHAR}
,GMT_MODIFIED = sysdate
WHERE
ID = #{id,jdbcType=DECIMAL}
]]>
</operation>
-->
<operation
name=
"deleteById"
remark=
"根据主键删除数据:abs_plan_alloc_item"
>
<![CDATA[
DELETE FROM abs_plan_alloc_item
WHERE
ID = #{id,jdbcType=DECIMAL}
]]>
</operation>
<operation
name=
"getById"
multiplicity=
"one"
remark=
"根据主键获取数据:abs_plan_alloc_item"
>
SELECT *
FROM abs_plan_alloc_item
WHERE
<![CDATA[
ID = #{id,jdbcType=DECIMAL}
]]>
</operation>
<operation
name=
"deleteByAllocNo"
remark=
"根据分配编号删除分配事项:abs_plan_alloc_item"
>
delete
FROM abs_plan_alloc_item
WHERE
<![CDATA[
ALLOC_NO = #{allocNo,jdbcType=DECIMAL}
]]>
</operation>
<operation
name=
"deleteByPlanNo"
remark=
"根据计划编号删除分配事项:abs_plan_alloc_item"
>
delete
FROM abs_plan_alloc_item
WHERE
<![CDATA[
PLAN_NO = #{planNo,jdbcType=DECIMAL}
]]>
</operation>
<operation
name=
"getByAllocNo"
multiplicity=
"many"
remark=
"根据分配编号查询分配事项:abs_plan_alloc_item"
>
SELECT *
FROM abs_plan_alloc_item
WHERE
<![CDATA[
ALLOC_NO = #{allocNo,jdbcType=DECIMAL}
]]>
</operation>
</table>
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_FEE_STRUCTURE.xml
View file @
fd6456af
...
...
@@ -3,16 +3,16 @@
<!-- 特殊字符说明 <> <> -->
<!-- baseSql option中 select * 会自动替换为 include -->
<sql
id=
"Base_Column_List"
>
ID,SORT,FIXED_FEE_AMT,PAY_LIMIT_AMT,FEE_NO
,PLAN_NO,FEE_
CALC_TYPE,FEE_SCALE_TYPE,GMT_CREATE,GMT_MODIFIED
,
FEE_CALC_DEFAULT_DATE
,FEE_RATE
ID,SORT,FIXED_FEE_AMT,PAY_LIMIT_AMT,FEE_NO
,PLAN_NO,FEE_
NAME,FEE_CALC_TYPE,FEE_TIME_TYPE,FEE_SCALE_TYPE
,
GMT_CREATE,GMT_MODIFIED
,FEE_RATE
</sql>
<!-- baseSql option中 select sf.* 会自动替换为 include -->
<sql
id=
"Base_SF_Column_List"
>
sf.ID,sf.SORT,sf.FIXED_FEE_AMT,sf.PAY_LIMIT_AMT,sf.FEE_NO
,sf.PLAN_NO,sf.FEE_
CALC_TYPE,sf.FEE_SCALE_TYPE,sf.GMT_CREATE,sf.GMT_MODIFIED
,sf.
FEE_CALC_DEFAULT_DATE
,sf.FEE_RATE
sf.ID,sf.SORT,sf.FIXED_FEE_AMT,sf.PAY_LIMIT_AMT,sf.FEE_NO
,sf.PLAN_NO,sf.FEE_
NAME,sf.FEE_CALC_TYPE,sf.FEE_TIME_TYPE,sf.FEE_SCALE_TYPE
,sf.
GMT_CREATE,sf.GMT_MODIFIED
,sf.FEE_RATE
</sql>
<operation
name=
"insert"
paramtype=
"object"
remark=
"插入表:abs_plan_fee_structure"
>
...
...
@@ -24,24 +24,26 @@
,PAY_LIMIT_AMT
,FEE_NO
,PLAN_NO
,FEE_NAME
,FEE_CALC_TYPE
,FEE_TIME_TYPE
,FEE_SCALE_TYPE
,GMT_CREATE
,GMT_MODIFIED
,FEE_CALC_DEFAULT_DATE
,FEE_RATE
)VALUES(
SEQ_ABS_PLAN_FEE_STRUCTURE.nextval
, #{
order
,jdbcType=DECIMAL}
, #{
sort
,jdbcType=DECIMAL}
, #{fixedFeeAmt,jdbcType=DECIMAL}
, #{payLimitAmt,jdbcType=DECIMAL}
, #{feeNo,jdbcType=VARCHAR}
, #{planNo,jdbcType=VARCHAR}
, #{feeName,jdbcType=VARCHAR}
, #{feeCalcType,jdbcType=VARCHAR}
, #{feeTimeType,jdbcType=VARCHAR}
, #{feeScaleType,jdbcType=VARCHAR}
, sysdate
, sysdate
, #{feeCalcDefaultDate,jdbcType=DATE}
, #{feeRate,jdbcType=DECIMAL}
)
]]>
...
...
@@ -58,25 +60,27 @@
,PAY_LIMIT_AMT
,FEE_NO
,PLAN_NO
,FEE_NAME
,FEE_CALC_TYPE
,FEE_TIME_TYPE
,FEE_SCALE_TYPE
,GMT_CREATE
,GMT_MODIFIED
,FEE_CALC_DEFAULT_DATE
,FEE_RATE
)VALUES
(
nul
l
, #{item.
order
,jdbcType=DECIMAL}
SEQ_ABS_PLAN_FEE_STRUCTURE.nextva
l
, #{item.
sort
,jdbcType=DECIMAL}
, #{item.fixedFeeAmt,jdbcType=DECIMAL}
, #{item.payLimitAmt,jdbcType=DECIMAL}
, #{item.feeNo,jdbcType=VARCHAR}
, #{item.planNo,jdbcType=VARCHAR}
, #{item.feeName,jdbcType=VARCHAR}
, #{item.feeCalcType,jdbcType=VARCHAR}
, #{item.feeTimeType,jdbcType=VARCHAR}
, #{item.feeScaleType,jdbcType=VARCHAR}
, sysdate
, sysdate
, #{item.feeCalcDefaultDate,jdbcType=DATE}
, #{item.feeRate,jdbcType=DECIMAL}
)
</foreach>
...
...
@@ -87,15 +91,16 @@
<![CDATA[
UPDATE abs_plan_fee_structure
SET
SORT
= #{order
,jdbcType=DECIMAL}
SORT
= #{sort
,jdbcType=DECIMAL}
,FIXED_FEE_AMT = #{fixedFeeAmt,jdbcType=DECIMAL}
,PAY_LIMIT_AMT = #{payLimitAmt,jdbcType=DECIMAL}
,FEE_NO = #{feeNo,jdbcType=VARCHAR}
,PLAN_NO = #{planNo,jdbcType=VARCHAR}
,FEE_NAME = #{feeName,jdbcType=VARCHAR}
,FEE_CALC_TYPE = #{feeCalcType,jdbcType=VARCHAR}
,FEE_TIME_TYPE = #{feeTimeType,jdbcType=VARCHAR}
,FEE_SCALE_TYPE = #{feeScaleType,jdbcType=VARCHAR}
,GMT_MODIFIED = sysdate
,FEE_CALC_DEFAULT_DATE = #{feeCalcDefaultDate,jdbcType=DATE}
,FEE_RATE = #{feeRate,jdbcType=DECIMAL}
WHERE
ID = #{id,jdbcType=DECIMAL}
...
...
@@ -119,4 +124,19 @@
]]>
</operation>
<operation
name=
"selectByPlanNo"
multiplicity=
"many"
remark=
"根据计划编号查询投资结构"
>
select *
from abs_plan_fee_structure
where plan_no = #{planNo,jdbcType=VARCHAR}
</operation>
<operation
name=
"deleteByPlanNo"
remark=
"根据计划编号删除"
>
<![CDATA[
DELETE FROM abs_plan_fee_structure
WHERE
PLAN_NO = #{planNo,jdbcType=VARCHAR}
]]>
</operation>
</table>
app/common/dal/dalgen/AbssqrCoreTables/ABS_PLAN_INVEST_STRUCTURE.xml
View file @
fd6456af
...
...
@@ -3,7 +3,7 @@
<!-- 特殊字符说明 <> <> -->
<!-- baseSql option中 select * 会自动替换为 include -->
<sql
id=
"Base_Column_List"
>
ID,
ORDER
,LAYER_AMT,GRADE,PLAN_NO
ID,
SORT
,LAYER_AMT,GRADE,PLAN_NO
,LAYER_NO,INTR_TYPE,LAYER_NAME,LAYER_TYPE,ALLOC_METHOD
,END_DATE,GMT_CREATE,EFFECT_DATE,GMT_MODIFIED,EXPECT_END_DATE
,LAYER_INTR
...
...
@@ -11,7 +11,7 @@
<!-- baseSql option中 select sf.* 会自动替换为 include -->
<sql
id=
"Base_SF_Column_List"
>
sf.ID,sf.
ORDER
,sf.LAYER_AMT,sf.GRADE,sf.PLAN_NO
sf.ID,sf.
SORT
,sf.LAYER_AMT,sf.GRADE,sf.PLAN_NO
,sf.LAYER_NO,sf.INTR_TYPE,sf.LAYER_NAME,sf.LAYER_TYPE,sf.ALLOC_METHOD
,sf.END_DATE,sf.GMT_CREATE,sf.EFFECT_DATE,sf.GMT_MODIFIED,sf.EXPECT_END_DATE
,sf.LAYER_INTR
...
...
@@ -21,7 +21,7 @@
<![CDATA[
INSERT INTO abs_plan_invest_structure(
ID
,
ORDER
,
SORT
,LAYER_AMT
,GRADE
,PLAN_NO
...
...
@@ -38,7 +38,7 @@
,LAYER_INTR
)VALUES(
SEQ_ABS_PLAN_INVEST_STRUCTURE.nextval
, #{
order
,jdbcType=DECIMAL}
, #{
sort
,jdbcType=DECIMAL}
, #{layerAmt,jdbcType=DECIMAL}
, #{grade,jdbcType=VARCHAR}
, #{planNo,jdbcType=VARCHAR}
...
...
@@ -63,7 +63,7 @@
<foreach
collection=
"list"
item=
"item"
separator=
";"
>
INSERT INTO abs_plan_invest_structure(
ID
,
ORDER
,
SORT
,LAYER_AMT
,GRADE
,PLAN_NO
...
...
@@ -80,8 +80,8 @@
,LAYER_INTR
)VALUES
(
nul
l
, #{item.
order
,jdbcType=DECIMAL}
SEQ_ABS_PLAN_INVEST_STRUCTURE.nextva
l
, #{item.
sort
,jdbcType=DECIMAL}
, #{item.layerAmt,jdbcType=DECIMAL}
, #{item.grade,jdbcType=VARCHAR}
, #{item.planNo,jdbcType=VARCHAR}
...
...
@@ -100,5 +100,19 @@
</foreach>
</operation>
<operation
name=
"selectByPlanNo"
multiplicity=
"many"
remark=
"根据计划编号查询投资结构"
>
select *
from abs_plan_invest_structure
where plan_no = #{planNo,jdbcType=VARCHAR}
</operation>
<operation
name=
"deleteByPlanNo"
remark=
"根据计划编号删除"
>
<![CDATA[
DELETE FROM abs_plan_invest_structure
WHERE
PLAN_NO = #{planNo,jdbcType=VARCHAR}
]]>
</operation>
</table>
app/common/dal/src/getsetter/Do/PlanAllocItemDO.txt
View file @
fd6456af
...
...
@@ -3,7 +3,7 @@
//id 唯一ID
result.setId(param.getId());
//order 排序
result.set
Sort(param.getSort
());
result.set
Order(param.getOrder
());
//itemNo 事项编号
result.setItemNo(param.getItemNo());
//planNo 计划编号
...
...
app/common/dal/src/getsetter/Do/PlanDO.txt
View file @
fd6456af
...
...
@@ -4,24 +4,24 @@
result.setId(param.getId());
//totalAmt 发行规模
result.setTotalAmt(param.getTotalAmt());
//allocPeriod 兑付周期
result.setAllocPeriod(param.getAllocPeriod());
//planNo 产品编号
result.setPlanNo(param.getPlanNo());
//status 产品状态(设计中,已发行,已清算)
result.setStatus(param.getStatus());
//payFreq
result.setPayFreq(param.getPayFreq());
//planName 产品简称
result.setPlanName(param.getPlanName());
//gmtCreator 计划创建人
result.setGmtCreator(param.getGmtCreator());
//tradePlace 交易场所
result.setTradePlace(param.getTradePlace());
//gmtModifier 最近更新人
result.setGmtModifier(param.getGmtModifier());
//calcIntrType 计息方式/计息基准
result.setCalcIntrType(param.getCalcIntrType());
//planFullName 产品全称
result.setPlanFullName(param.getPlanFullName());
//allocPeriodMethod 兑付周期类型
result.setAllocPeriodMethod(param.getAllocPeriodMethod());
//endDate 法定到期日
result.setEndDate(param.getEndDate());
//beginDate 产品成立日
...
...
@@ -44,15 +44,15 @@
//id
//totalAmt 发行规模
//allocPeriod 兑付周期
//planNo 产品编号
//status 产品状态(设计中,已发行,已清算)
//payFreq
//planName 产品简称
//gmtCreator 计划创建人
//tradePlace 交易场所
//gmtModifier 最近更新人
//calcIntrType 计息方式/计息基准
//planFullName 产品全称
//allocPeriodMethod 兑付周期类型
//endDate 法定到期日
//beginDate 产品成立日
//gmtCreate 创建时间
...
...
app/common/dal/src/getsetter/Do/PlanFeeStructureDO.txt
View file @
fd6456af
...
...
@@ -16,14 +16,14 @@
result.setFeeName(param.getFeeName());
//feeCalcType 计费方式
result.setFeeCalcType(param.getFeeCalcType());
//feeTimeType 默认计费时间
result.setFeeTimeType(param.getFeeTimeType());
//feeScaleType 费用基准
result.setFeeScaleType(param.getFeeScaleType());
//gmtCreate 创建时间
result.setGmtCreate(param.getGmtCreate());
//gmtModified 更新时间
result.setGmtModified(param.getGmtModified());
//feeCalcDefaultDate 默认计费时间
result.setFeeCalcDefaultDate(param.getFeeCalcDefaultDate());
//feeRate 费率
result.setFeeRate(param.getFeeRate());
...
...
@@ -36,9 +36,9 @@
//planNo 产品编号
//feeName 费用名称
//feeCalcType 计费方式
//feeTimeType 默认计费时间
//feeScaleType 费用基准
//gmtCreate 创建时间
//gmtModified 更新时间
//feeCalcDefaultDate 默认计费时间
//feeRate 费率
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/AbssqrCoreConstants.java
View file @
fd6456af
...
...
@@ -100,8 +100,8 @@ public class AbssqrCoreConstants{
}
public
static
class
ABS_PLAN_ALLOC_ITEM
{
public
static
final
String
tableName
=
"ABS_PLAN_ALLOC_ITEM"
;
public
static
final
String
Base_SF_Column_List
=
"sf.ID,sf.
SORT
,sf.ITEM_NO,sf.PLAN_NO,sf.ALLOC_NO ,sf.TITLE_NO,sf.ALLOC_TYPE,sf.TITLE_NAME,sf.GMT_CREATE,sf.GMT_MODIFIED"
;
public
static
final
String
Base_Column_List
=
"ID,
SORT
,ITEM_NO,PLAN_NO,ALLOC_NO ,TITLE_NO,ALLOC_TYPE,TITLE_NAME,GMT_CREATE,GMT_MODIFIED"
;
public
static
final
String
Base_SF_Column_List
=
"sf.ID,sf.
ORDER
,sf.ITEM_NO,sf.PLAN_NO,sf.ALLOC_NO ,sf.TITLE_NO,sf.ALLOC_TYPE,sf.TITLE_NAME,sf.GMT_CREATE,sf.GMT_MODIFIED"
;
public
static
final
String
Base_Column_List
=
"ID,
ORDER
,ITEM_NO,PLAN_NO,ALLOC_NO ,TITLE_NO,ALLOC_TYPE,TITLE_NAME,GMT_CREATE,GMT_MODIFIED"
;
}
public
static
class
ABS_AST_PRICE_RULE
{
public
static
final
String
tableName
=
"ABS_AST_PRICE_RULE"
;
...
...
@@ -115,8 +115,8 @@ public class AbssqrCoreConstants{
}
public
static
class
ABS_PLAN_FEE_STRUCTURE
{
public
static
final
String
tableName
=
"ABS_PLAN_FEE_STRUCTURE"
;
public
static
final
String
Base_SF_Column_List
=
"sf.ID,sf.
SORT,sf.FIXED_FEE_AMT,sf.PAY_LIMIT_AMT,sf.FEE_NO ,sf.PLAN_NO,sf.FEE_CALC_TYPE,sf.FEE_SCALE_TYPE,sf.GMT_CREATE,sf.GMT_MODIFIED ,sf.FEE_CALC_DEFAULT_DATE
,sf.FEE_RATE"
;
public
static
final
String
Base_Column_List
=
"ID,
SORT,FIXED_FEE_AMT,PAY_LIMIT_AMT,FEE_NO ,PLAN_NO,FEE_CALC_TYPE,FEE_SCALE_TYPE,GMT_CREATE,GMT_MODIFIED ,FEE_CALC_DEFAULT_DATE
,FEE_RATE"
;
public
static
final
String
Base_SF_Column_List
=
"sf.ID,sf.
ORDER,sf.FIXED_FEE_AMT,sf.PAY_LIMIT_AMT,sf.FEE_NO ,sf.PLAN_NO,sf.FEE_NAME,sf.FEE_CALC_TYPE,sf.FEE_TIME_TYPE,sf.FEE_SCALE_TYPE ,sf.GMT_CREATE,sf.GMT_MODIFIED
,sf.FEE_RATE"
;
public
static
final
String
Base_Column_List
=
"ID,
ORDER,FIXED_FEE_AMT,PAY_LIMIT_AMT,FEE_NO ,PLAN_NO,FEE_NAME,FEE_CALC_TYPE,FEE_TIME_TYPE,FEE_SCALE_TYPE ,GMT_CREATE,GMT_MODIFIED
,FEE_RATE"
;
}
public
static
class
ABS_PLAN_CLEARING_LOG_HIS
{
public
static
final
String
tableName
=
"ABS_PLAN_CLEARING_LOG_HIS"
;
...
...
@@ -295,8 +295,8 @@ public class AbssqrCoreConstants{
}
public
static
class
ABS_PLAN
{
public
static
final
String
tableName
=
"ABS_PLAN"
;
public
static
final
String
Base_SF_Column_List
=
"sf.ID,sf.TOTAL_AMT,sf.
ALLOC_PERIOD,sf.PLAN_NO,sf.STATUS ,sf.PLAN_NAME,sf.TRADE_PLACE,sf.CALC_INTR_TYPE,sf.PLAN_FULL_NAME,sf.ALLOC_PERIOD_METHOD ,sf.END_DATE,sf.BEGIN_DATE,sf.GMT_CREATE,sf.GMT_MODIFIED,sf.FIRST_PAY_DATE
,sf.FIRST_CALC_DATE,sf.FIRST_ALLOC_DATE,sf.FIRST_REPORT_DATE,sf.FIRST_SETTLE_DATE"
;
public
static
final
String
Base_Column_List
=
"ID,TOTAL_AMT,
ALLOC_PERIOD,PLAN_NO,STATUS ,PLAN_NAME,TRADE_PLACE,CALC_INTR_TYPE,PLAN_FULL_NAME,ALLOC_PERIOD_METHOD ,END_DATE,BEGIN_DATE,GMT_CREATE,GMT_MODIFIED,FIRST_PAY_DATE
,FIRST_CALC_DATE,FIRST_ALLOC_DATE,FIRST_REPORT_DATE,FIRST_SETTLE_DATE"
;
public
static
final
String
Base_SF_Column_List
=
"sf.ID,sf.TOTAL_AMT,sf.
PLAN_NO,sf.STATUS,sf.PAY_FREQ ,sf.PLAN_NAME,sf.GMT_CREATOR,sf.TRADE_PLACE,sf.GMT_MODIFIER,sf.CALC_INTR_TYPE ,sf.PLAN_FULL_NAME,sf.END_DATE,sf.BEGIN_DATE,sf.GMT_CREATE,sf.GMT_MODIFIED ,sf.FIRST_PAY_DATE
,sf.FIRST_CALC_DATE,sf.FIRST_ALLOC_DATE,sf.FIRST_REPORT_DATE,sf.FIRST_SETTLE_DATE"
;
public
static
final
String
Base_Column_List
=
"ID,TOTAL_AMT,
PLAN_NO,STATUS,PAY_FREQ ,PLAN_NAME,GMT_CREATOR,TRADE_PLACE,GMT_MODIFIER,CALC_INTR_TYPE ,PLAN_FULL_NAME,END_DATE,BEGIN_DATE,GMT_CREATE,GMT_MODIFIED ,FIRST_PAY_DATE
,FIRST_CALC_DATE,FIRST_ALLOC_DATE,FIRST_REPORT_DATE,FIRST_SETTLE_DATE"
;
}
public
static
class
ABS_PRODUCT_RISK_CL
{
public
static
final
String
tableName
=
"ABS_PRODUCT_RISK_CL"
;
...
...
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanAcctTitleDAO.java
View file @
fd6456af
...
...
@@ -36,4 +36,22 @@ public class PlanAcctTitleDAO{
planAcctTitleDOMapper
.
insertBatch
(
list
);
return
list
.
size
();
}
/**
* desc:deleteByPlanNo.<br/>
* @param planNo planNo
* @return int
*/
public
int
deleteByPlanNo
(
String
planNo
){
return
planAcctTitleDOMapper
.
deleteByPlanNo
(
planNo
);
}
/**
* desc:getByPlanNo.<br/>
* @param planNo planNo
* @return List<PlanAcctTitleDO>
*/
public
List
<
PlanAcctTitleDO
>
getByPlanNo
(
String
planNo
){
return
planAcctTitleDOMapper
.
getByPlanNo
(
planNo
);
}
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanAllocDAO.java
View file @
fd6456af
...
...
@@ -54,4 +54,40 @@ public class PlanAllocDAO{
public
PlanAllocDO
getById
(
Long
id
){
return
planAllocDOMapper
.
getById
(
id
);
}
/**
* desc:根据计划编号获取数据:abs_plan_alloc.<br/>
* @param planNo planNo
* @return List<PlanAllocDO>
*/
public
List
<
PlanAllocDO
>
getByPlanNo
(
String
planNo
){
return
planAllocDOMapper
.
getByPlanNo
(
planNo
);
}
/**
* desc:根据计划编号删除:abs_plan_alloc.<br/>
* @param planNo planNo
* @return int
*/
public
int
deleteByPlanNo
(
String
planNo
){
return
planAllocDOMapper
.
deleteByPlanNo
(
planNo
);
}
/**
* desc:根据兑付计划查询:abs_plan_alloc.<br/>
* @param allocNo allocNo
* @return int
*/
public
int
deleteByAllocNo
(
String
allocNo
){
return
planAllocDOMapper
.
deleteByAllocNo
(
allocNo
);
}
/**
* desc:根据兑付计划编号查询:abs_plan_alloc.<br/>
* @param allocNo allocNo
* @return PlanAllocDO
*/
public
PlanAllocDO
getByAllocNo
(
String
allocNo
){
return
planAllocDOMapper
.
getByAllocNo
(
allocNo
);
}
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanAllocItemDAO.java
View file @
fd6456af
...
...
@@ -54,4 +54,31 @@ public class PlanAllocItemDAO{
public
PlanAllocItemDO
getById
(
Long
id
){
return
planAllocItemDOMapper
.
getById
(
id
);
}
/**
* desc:根据分配编号删除分配事项:abs_plan_alloc_item.<br/>
* @param allocNo allocNo
* @return int
*/
public
int
deleteByAllocNo
(
String
allocNo
){
return
planAllocItemDOMapper
.
deleteByAllocNo
(
allocNo
);
}
/**
* desc:根据计划编号删除分配事项:abs_plan_alloc_item.<br/>
* @param planNo planNo
* @return int
*/
public
int
deleteByPlanNo
(
String
planNo
){
return
planAllocItemDOMapper
.
deleteByPlanNo
(
planNo
);
}
/**
* desc:根据分配编号查询分配事项:abs_plan_alloc_item.<br/>
* @param allocNo allocNo
* @return List<PlanAllocItemDO>
*/
public
List
<
PlanAllocItemDO
>
getByAllocNo
(
String
allocNo
){
return
planAllocItemDOMapper
.
getByAllocNo
(
allocNo
);
}
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanDAO.java
View file @
fd6456af
...
...
@@ -5,6 +5,7 @@ import org.springframework.stereotype.Repository;
import
java.util.ArrayList
;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanDO
;
import
java.util.List
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.PlanListPage
;
import
com.abssqr.plat.common.dal.mysql.auto.mapper.PlanDOMapper
;
/**
...
...
@@ -36,4 +37,57 @@ public class PlanDAO{
planDOMapper
.
insertBatch
(
list
);
return
list
.
size
();
}
/**
* desc:getPlanByNo.<br/>
* @param planNo planNo
* @return PlanDO
*/
public
PlanDO
getPlanByNo
(
String
planNo
){
return
planDOMapper
.
getPlanByNo
(
planNo
);
}
/**
* desc:根据唯一约束PlanNo更新表:abs_plan.<br/>
* @param entity entity
* @return int
*/
public
int
updatePlanByNo
(
PlanDO
entity
){
return
planDOMapper
.
updatePlanByNo
(
entity
);
}
/**
* desc:根据PlanName 和 PlanFullName判断是否存在对应的计划.<br/>
* @param planName planName
* @param planFullName planFullName
* @return int
*/
public
int
planExist
(
String
planName
,
String
planFullName
){
return
planDOMapper
.
planExist
(
planName
,
planFullName
);
}
/**
* desc:getPlanList.<br/>
* @param planList planList
* @return PlanListPage
*/
public
PlanListPage
getPlanList
(
PlanListPage
planList
){
int
total
=
planDOMapper
.
getPlanListCount
(
planList
);
if
(
total
>
0
){
planList
.
setDatas
(
planDOMapper
.
getPlanListResult
(
planList
));
}
else
{
planList
.
setDatas
(
new
ArrayList
());
}
planList
.
setTotal
(
total
);
return
planList
;
}
/**
* desc:deleteByPlanNo.<br/>
* @param planNo planNo
* @return int
*/
public
int
deleteByPlanNo
(
String
planNo
){
return
planDOMapper
.
deleteByPlanNo
(
planNo
);
}
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanFeeStructureDAO.java
View file @
fd6456af
...
...
@@ -54,4 +54,22 @@ public class PlanFeeStructureDAO{
public
PlanFeeStructureDO
getById
(
Long
id
){
return
planFeeStructureDOMapper
.
getById
(
id
);
}
/**
* desc:根据计划编号查询投资结构.<br/>
* @param planNo planNo
* @return List<PlanFeeStructureDO>
*/
public
List
<
PlanFeeStructureDO
>
selectByPlanNo
(
String
planNo
){
return
planFeeStructureDOMapper
.
selectByPlanNo
(
planNo
);
}
/**
* desc:根据计划编号删除.<br/>
* @param planNo planNo
* @return int
*/
public
int
deleteByPlanNo
(
String
planNo
){
return
planFeeStructureDOMapper
.
deleteByPlanNo
(
planNo
);
}
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dao/PlanInvestStructureDAO.java
View file @
fd6456af
...
...
@@ -36,4 +36,22 @@ public class PlanInvestStructureDAO{
planInvestStructureDOMapper
.
insertBatch
(
list
);
return
list
.
size
();
}
/**
* desc:根据计划编号查询投资结构.<br/>
* @param planNo planNo
* @return List<PlanInvestStructureDO>
*/
public
List
<
PlanInvestStructureDO
>
selectByPlanNo
(
String
planNo
){
return
planInvestStructureDOMapper
.
selectByPlanNo
(
planNo
);
}
/**
* desc:根据计划编号删除.<br/>
* @param planNo planNo
* @return int
*/
public
int
deleteByPlanNo
(
String
planNo
){
return
planInvestStructureDOMapper
.
deleteByPlanNo
(
planNo
);
}
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dataobject/PlanAllocItemDO.java
View file @
fd6456af
...
...
@@ -12,9 +12,9 @@ public class PlanAllocItemDO{
*/
private
Long
id
;
/**
*
order
排序.
*
sort
排序.
*/
private
Long
order
;
private
Long
sort
;
/**
* itemNo 事项编号.
*/
...
...
@@ -65,19 +65,19 @@ public class PlanAllocItemDO{
}
/**
* Set
order
排序.
* Set
sort
排序.
*/
public
void
set
Order
(
Long
order
){
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
){
this
.
sort
=
sort
;
}
/**
* Get
order
排序.
* Get
sort
排序.
*
* @return the string
*/
public
Long
get
Order
(){
return
order
;
public
Long
get
Sort
(){
return
sort
;
}
/**
...
...
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dataobject/PlanDO.java
View file @
fd6456af
...
...
@@ -16,10 +16,6 @@ public class PlanDO{
*/
private
Long
totalAmt
;
/**
* allocPeriod 兑付周期.
*/
private
Long
allocPeriod
;
/**
* planNo 产品编号.
*/
private
String
planNo
;
...
...
@@ -28,6 +24,10 @@ public class PlanDO{
*/
private
String
status
;
/**
* payFreq .
*/
private
String
payFreq
;
/**
* planName 产品简称.
*/
private
String
planName
;
...
...
@@ -40,6 +40,10 @@ public class PlanDO{
*/
private
String
tradePlace
;
/**
* gmtModifier 最近更新人.
*/
private
String
gmtModifier
;
/**
* calcIntrType 计息方式/计息基准.
*/
private
String
calcIntrType
;
...
...
@@ -48,10 +52,6 @@ public class PlanDO{
*/
private
String
planFullName
;
/**
* allocPeriodMethod 兑付周期类型.
*/
private
String
allocPeriodMethod
;
/**
* endDate 法定到期日.
*/
private
Date
endDate
;
...
...
@@ -121,22 +121,6 @@ public class PlanDO{
}
/**
* Set allocPeriod 兑付周期.
*/
public
void
setAllocPeriod
(
Long
allocPeriod
){
this
.
allocPeriod
=
allocPeriod
;
}
/**
* Get allocPeriod 兑付周期.
*
* @return the string
*/
public
Long
getAllocPeriod
(){
return
allocPeriod
;
}
/**
* Set planNo 产品编号.
*/
public
void
setPlanNo
(
String
planNo
){
...
...
@@ -169,6 +153,22 @@ public class PlanDO{
}
/**
* Set payFreq .
*/
public
void
setPayFreq
(
String
payFreq
){
this
.
payFreq
=
payFreq
;
}
/**
* Get payFreq .
*
* @return the string
*/
public
String
getPayFreq
(){
return
payFreq
;
}
/**
* Set planName 产品简称.
*/
public
void
setPlanName
(
String
planName
){
...
...
@@ -217,6 +217,22 @@ public class PlanDO{
}
/**
* Set gmtModifier 最近更新人.
*/
public
void
setGmtModifier
(
String
gmtModifier
){
this
.
gmtModifier
=
gmtModifier
;
}
/**
* Get gmtModifier 最近更新人.
*
* @return the string
*/
public
String
getGmtModifier
(){
return
gmtModifier
;
}
/**
* Set calcIntrType 计息方式/计息基准.
*/
public
void
setCalcIntrType
(
String
calcIntrType
){
...
...
@@ -249,22 +265,6 @@ public class PlanDO{
}
/**
* Set allocPeriodMethod 兑付周期类型.
*/
public
void
setAllocPeriodMethod
(
String
allocPeriodMethod
){
this
.
allocPeriodMethod
=
allocPeriodMethod
;
}
/**
* Get allocPeriodMethod 兑付周期类型.
*
* @return the string
*/
public
String
getAllocPeriodMethod
(){
return
allocPeriodMethod
;
}
/**
* Set endDate 法定到期日.
*/
public
void
setEndDate
(
Date
endDate
){
...
...
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dataobject/PlanFeeStructureDO.java
View file @
fd6456af
...
...
@@ -13,9 +13,9 @@ public class PlanFeeStructureDO{
*/
private
Long
id
;
/**
*
order
.
*
sort
.
*/
private
Long
order
;
private
Long
sort
;
/**
* fixedFeeAmt 固定费用.
*/
...
...
@@ -41,6 +41,10 @@ public class PlanFeeStructureDO{
*/
private
String
feeCalcType
;
/**
* feeTimeType 默认计费时间.
*/
private
String
feeTimeType
;
/**
* feeScaleType 费用基准.
*/
private
String
feeScaleType
;
...
...
@@ -53,10 +57,6 @@ public class PlanFeeStructureDO{
*/
private
Date
gmtModified
;
/**
* feeCalcDefaultDate 默认计费时间.
*/
private
Date
feeCalcDefaultDate
;
/**
* feeRate 费率.
*/
private
BigDecimal
feeRate
;
...
...
@@ -78,19 +78,19 @@ public class PlanFeeStructureDO{
}
/**
* Set
order
.
* Set
sort
.
*/
public
void
set
Order
(
Long
order
){
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
){
this
.
sort
=
sort
;
}
/**
* Get
order
.
* Get
sort
.
*
* @return the string
*/
public
Long
get
Order
(){
return
order
;
public
Long
get
Sort
(){
return
sort
;
}
/**
...
...
@@ -190,6 +190,22 @@ public class PlanFeeStructureDO{
}
/**
* Set feeTimeType 默认计费时间.
*/
public
void
setFeeTimeType
(
String
feeTimeType
){
this
.
feeTimeType
=
feeTimeType
;
}
/**
* Get feeTimeType 默认计费时间.
*
* @return the string
*/
public
String
getFeeTimeType
(){
return
feeTimeType
;
}
/**
* Set feeScaleType 费用基准.
*/
public
void
setFeeScaleType
(
String
feeScaleType
){
...
...
@@ -238,22 +254,6 @@ public class PlanFeeStructureDO{
}
/**
* Set feeCalcDefaultDate 默认计费时间.
*/
public
void
setFeeCalcDefaultDate
(
Date
feeCalcDefaultDate
){
this
.
feeCalcDefaultDate
=
feeCalcDefaultDate
;
}
/**
* Get feeCalcDefaultDate 默认计费时间.
*
* @return the string
*/
public
Date
getFeeCalcDefaultDate
(){
return
feeCalcDefaultDate
;
}
/**
* Set feeRate 费率.
*/
public
void
setFeeRate
(
BigDecimal
feeRate
){
...
...
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/dataobject/PlanInvestStructureDO.java
View file @
fd6456af
...
...
@@ -13,9 +13,9 @@ public class PlanInvestStructureDO{
*/
private
Long
id
;
/**
*
order
排序.
*
sort
排序.
*/
private
Long
order
;
private
Long
sort
;
/**
* layerAmt 金额/层级规模.
*/
...
...
@@ -90,19 +90,19 @@ public class PlanInvestStructureDO{
}
/**
* Set
order
排序.
* Set
sort
排序.
*/
public
void
set
Order
(
Long
order
){
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
){
this
.
sort
=
sort
;
}
/**
* Get
order
排序.
* Get
sort
排序.
*
* @return the string
*/
public
Long
get
Order
(){
return
order
;
public
Long
get
Sort
(){
return
sort
;
}
/**
...
...
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAcctTitleDOMapper.java
View file @
fd6456af
...
...
@@ -23,4 +23,16 @@ public interface PlanAcctTitleDOMapper{
* @return int
*/
int
insertBatch
(
List
<
PlanAcctTitleDO
>
list
);
/**
* desc:deleteByPlanNo.<br/>
* @param planNo planNo
* @return int
*/
int
deleteByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
/**
* desc:getByPlanNo.<br/>
* @param planNo planNo
* @return List<PlanAcctTitleDO>
*/
List
<
PlanAcctTitleDO
>
getByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAllocDOMapper.java
View file @
fd6456af
...
...
@@ -35,4 +35,28 @@ public interface PlanAllocDOMapper{
* @return PlanAllocDO
*/
PlanAllocDO
getById
(
@Param
(
"id"
)
Long
id
);
/**
* desc:根据计划编号获取数据:abs_plan_alloc.<br/>
* @param planNo planNo
* @return List<PlanAllocDO>
*/
List
<
PlanAllocDO
>
getByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
/**
* desc:根据计划编号删除:abs_plan_alloc.<br/>
* @param planNo planNo
* @return int
*/
int
deleteByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
/**
* desc:根据兑付计划查询:abs_plan_alloc.<br/>
* @param allocNo allocNo
* @return int
*/
int
deleteByAllocNo
(
@Param
(
"allocNo"
)
String
allocNo
);
/**
* desc:根据兑付计划编号查询:abs_plan_alloc.<br/>
* @param allocNo allocNo
* @return PlanAllocDO
*/
PlanAllocDO
getByAllocNo
(
@Param
(
"allocNo"
)
String
allocNo
);
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAllocItemDOMapper.java
View file @
fd6456af
...
...
@@ -35,4 +35,22 @@ public interface PlanAllocItemDOMapper{
* @return PlanAllocItemDO
*/
PlanAllocItemDO
getById
(
@Param
(
"id"
)
Long
id
);
/**
* desc:根据分配编号删除分配事项:abs_plan_alloc_item.<br/>
* @param allocNo allocNo
* @return int
*/
int
deleteByAllocNo
(
@Param
(
"allocNo"
)
String
allocNo
);
/**
* desc:根据计划编号删除分配事项:abs_plan_alloc_item.<br/>
* @param planNo planNo
* @return int
*/
int
deleteByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
/**
* desc:根据分配编号查询分配事项:abs_plan_alloc_item.<br/>
* @param allocNo allocNo
* @return List<PlanAllocItemDO>
*/
List
<
PlanAllocItemDO
>
getByAllocNo
(
@Param
(
"allocNo"
)
String
allocNo
);
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanDOMapper.java
View file @
fd6456af
...
...
@@ -2,6 +2,7 @@ package com.abssqr.plat.common.dal.mysql.auto.mapper;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanDO
;
import
java.util.List
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.PlanListPage
;
import
org.apache.ibatis.annotations.Param
;
/**
...
...
@@ -23,4 +24,41 @@ public interface PlanDOMapper{
* @return int
*/
int
insertBatch
(
List
<
PlanDO
>
list
);
/**
* desc:getPlanByNo.<br/>
* @param planNo planNo
* @return PlanDO
*/
PlanDO
getPlanByNo
(
@Param
(
"planNo"
)
String
planNo
);
/**
* desc:根据唯一约束PlanNo更新表:abs_plan.<br/>
* @param entity entity
* @return int
*/
int
updatePlanByNo
(
PlanDO
entity
);
/**
* desc:根据PlanName 和 PlanFullName判断是否存在对应的计划.<br/>
* @param planName planName
* @param planFullName planFullName
* @return int
*/
int
planExist
(
@Param
(
"planName"
)
String
planName
,
@Param
(
"planFullName"
)
String
planFullName
);
/**
* desc:getPlanListCount.<br/>
* @param planList planList
* @return int
*/
int
getPlanListCount
(
PlanListPage
planList
);
/**
* desc:getPlanListResult.<br/>
* @param planList planList
* @return List<PlanDO>
*/
List
<
PlanDO
>
getPlanListResult
(
PlanListPage
planList
);
/**
* desc:deleteByPlanNo.<br/>
* @param planNo planNo
* @return int
*/
int
deleteByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanFeeStructureDOMapper.java
View file @
fd6456af
...
...
@@ -35,4 +35,16 @@ public interface PlanFeeStructureDOMapper{
* @return PlanFeeStructureDO
*/
PlanFeeStructureDO
getById
(
@Param
(
"id"
)
Long
id
);
/**
* desc:根据计划编号查询投资结构.<br/>
* @param planNo planNo
* @return List<PlanFeeStructureDO>
*/
List
<
PlanFeeStructureDO
>
selectByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
/**
* desc:根据计划编号删除.<br/>
* @param planNo planNo
* @return int
*/
int
deleteByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanInvestStructureDOMapper.java
View file @
fd6456af
...
...
@@ -23,4 +23,16 @@ public interface PlanInvestStructureDOMapper{
* @return int
*/
int
insertBatch
(
List
<
PlanInvestStructureDO
>
list
);
/**
* desc:根据计划编号查询投资结构.<br/>
* @param planNo planNo
* @return List<PlanInvestStructureDO>
*/
List
<
PlanInvestStructureDO
>
selectByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
/**
* desc:根据计划编号删除.<br/>
* @param planNo planNo
* @return int
*/
int
deleteByPlanNo
(
@Param
(
"planNo"
)
String
planNo
);
}
app/common/dal/src/main/java/com/abssqr/plat/common/dal/mysql/auto/paging/PlanListPage.java
View file @
fd6456af
package
com
.
abssqr
.
plat
.
common
.
dal
.
mysql
.
auto
.
paging
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.BasePage
;
import
com.abssqr.plat.common.dal.mysql.auto.resultmap.PlanListResultMap
;
import
java.util.List
;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanDO
;
/**
* The table ABS_PLAN
计划信息
* The table ABS_PLAN
产品表
*/
public
class
PlanListPage
extends
BasePage
<
Plan
ListResultMap
>{
public
class
PlanListPage
extends
BasePage
<
Plan
DO
>{
/**
* passed 是否已通过过.
*/
private
Boolean
passed
;
/**
* userCode .
*/
private
String
userCode
;
/**
* planType 计划类型.
*/
private
String
planType
;
/**
* planNo 计划编号.
*/
private
String
planNo
;
/**
* planName 计划名.
* planName 产品简称.
*/
private
String
planName
;
/**
* planStatus .
*/
private
String
planStatus
;
/**
* list .
*/
private
List
<
String
>
list
;
/**
* Set passed 是否已通过过.
*/
public
void
setPassed
(
Boolean
passed
){
this
.
passed
=
passed
;
}
/**
* Get passed 是否已通过过.
*
* @return the string
*/
public
Boolean
getPassed
(){
return
passed
;
}
/**
* Set userCode .
*/
public
void
setUserCode
(
String
userCode
){
this
.
userCode
=
userCode
;
}
/**
* Get userCode .
*
* @return the string
*/
public
String
getUserCode
(){
return
userCode
;
}
/**
* Set planType 计划类型.
*/
public
void
setPlanType
(
String
planType
){
this
.
planType
=
planType
;
}
/**
* Get planType 计划类型.
*
* @return the string
*/
public
String
getPlanType
(){
return
planType
;
}
/**
* Set planNo 计划编号.
*/
public
void
setPlanNo
(
String
planNo
){
this
.
planNo
=
planNo
;
}
/**
* Get planNo 计划编号.
*
* @return the string
* status 产品状态(设计中,已发行,已清算).
*/
public
String
getPlanNo
(){
return
planNo
;
}
private
String
status
;
/**
* Set planName
计划名
.
* Set planName
产品简称
.
*/
public
void
setPlanName
(
String
planName
){
this
.
planName
=
planName
;
}
/**
* Get planName
计划名
.
* Get planName
产品简称
.
*
* @return the string
*/
...
...
@@ -119,34 +34,18 @@ public class PlanListPage extends BasePage<PlanListResultMap>{
}
/**
* Set planStatus .
*/
public
void
setPlanStatus
(
String
planStatus
){
this
.
planStatus
=
planStatus
;
}
/**
* Get planStatus .
*
* @return the string
*/
public
String
getPlanStatus
(){
return
planStatus
;
}
/**
* Set list .
* Set status 产品状态(设计中,已发行,已清算).
*/
public
void
set
List
(
List
<
String
>
list
){
this
.
list
=
list
;
public
void
set
Status
(
String
status
){
this
.
status
=
status
;
}
/**
* Get
list
.
* Get
status 产品状态(设计中,已发行,已清算)
.
*
* @return the string
*/
public
List
<
String
>
getList
(){
return
list
;
public
String
getStatus
(){
return
status
;
}
}
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/LoanDOMapper.xml
View file @
fd6456af
...
...
@@ -562,8 +562,8 @@
SELECT
COUNT(*) AS total
FROM
ABS_LOAN
L1
LEFT JOIN ABS_LOAN_PACK_REL R1 ON
L1
.AST_NO=R1.AST_NO
ABS_LOAN
sf
LEFT JOIN ABS_LOAN_PACK_REL R1 ON
sf
.AST_NO=R1.AST_NO
WHERE
R1.PACK_NO=#{packNo,jdbcType=VARCHAR}
</select>
...
...
@@ -576,8 +576,8 @@
tt.*,ROWNUM AS rowno
from(
SELECT /*MS-ABS-LOAN-GETLOANPAGEBYPACKNO*/
<include
refid=
"Base_SF_Column_List"
/>
FROM ABS_LOAN
L1
LEFT JOIN ABS_LOAN_PACK_REL R1 ON
L1
.AST_NO=R1.AST_NO
FROM ABS_LOAN
sf
LEFT JOIN ABS_LOAN_PACK_REL R1 ON
sf
.AST_NO=R1.AST_NO
WHERE
R1.PACK_NO=#{packNo,jdbcType=VARCHAR}
) tt where ROWNUM
<
= #{endRow}
...
...
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAcctTitleDOMapper.xml
View file @
fd6456af
...
...
@@ -64,7 +64,7 @@
,GMT_MODIFIED
)VALUES
(
nul
l
SEQ_ABS_PLAN_ACCT_TITLE.nextva
l
, #{item.refNo,jdbcType=VARCHAR}
, #{item.planNo,jdbcType=VARCHAR}
, #{item.titleNo,jdbcType=VARCHAR}
...
...
@@ -76,4 +76,18 @@
</foreach>
;end;
</insert>
<!--deleteByPlanNo mydalgen自动生成,请勿修改-->
<delete
id=
"deleteByPlanNo"
>
delete
from abs_plan_acct_title
where plan_no=#{planNo,jdbcType=VARCHAR}
</delete>
<!--getByPlanNo mydalgen自动生成,请勿修改-->
<select
id=
"getByPlanNo"
resultMap=
"BaseResultMap"
>
select /*MS-ABS-PLAN-ACCT-TITLE-GETBYPLANNO*/
<include
refid=
"Base_Column_List"
/>
from abs_plan_acct_title
where plan_no=#{planNo,jdbcType=VARCHAR}
</select>
</mapper>
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAllocDOMapper.xml
View file @
fd6456af
...
...
@@ -72,7 +72,7 @@
,GMT_MODIFIED
)VALUES
(
nul
l
SEQ_ABS_PLAN_ALLOC.nextva
l
, #{item.planNo,jdbcType=VARCHAR}
, #{item.allocNo,jdbcType=VARCHAR}
, #{item.payDate,jdbcType=DATE}
...
...
@@ -105,4 +105,45 @@
ID = #{id,jdbcType=DECIMAL}
]]>
</select>
<!--根据计划编号获取数据:abs_plan_alloc mydalgen自动生成,请勿修改-->
<select
id=
"getByPlanNo"
resultMap=
"BaseResultMap"
>
SELECT /*MS-ABS-PLAN-ALLOC-GETBYPLANNO*/
<include
refid=
"Base_Column_List"
/>
FROM abs_plan_alloc
WHERE
<![CDATA[
PLAN_NO = #{planNo,jdbcType=DECIMAL}
]]>
</select>
<!--根据计划编号删除:abs_plan_alloc mydalgen自动生成,请勿修改-->
<delete
id=
"deleteByPlanNo"
>
delete
abs_plan_alloc
WHERE
<![CDATA[
PLAN_NO = #{planNo,jdbcType=DECIMAL}
]]>
</delete>
<!--根据兑付计划查询:abs_plan_alloc mydalgen自动生成,请勿修改-->
<delete
id=
"deleteByAllocNo"
>
delete
from abs_plan_alloc
WHERE
<![CDATA[
ALLOC_NO = #{allocNo,jdbcType=DECIMAL}
]]>
</delete>
<!--根据兑付计划编号查询:abs_plan_alloc mydalgen自动生成,请勿修改-->
<select
id=
"getByAllocNo"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from abs_plan_alloc
WHERE
<![CDATA[
ALLOC_NO = #{allocNo,jdbcType=DECIMAL}
]]>
</select>
</mapper>
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanAllocItemDOMapper.xml
View file @
fd6456af
...
...
@@ -4,7 +4,7 @@
<!-- 自动生成,请修改 ABS_PLAN_ALLOC_ITEM.xml -->
<resultMap
id=
"BaseResultMap"
type=
"com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanAllocItemDO"
>
<id
column=
"ID"
property=
"id"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"SORT"
property=
"
order
"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"SORT"
property=
"
sort
"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"ITEM_NO"
property=
"itemNo"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"PLAN_NO"
property=
"planNo"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"ALLOC_NO"
property=
"allocNo"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
...
...
@@ -17,11 +17,11 @@
<sql
id=
"Base_SF_Column_List"
>
sf.ID,sf.SORT,sf.ITEM_NO,sf.PLAN_NO,sf.ALLOC_NO
sf.ID,sf.SORT,sf.ITEM_NO,sf.PLAN_NO,sf.ALLOC_NO
,sf.TITLE_NO,sf.ALLOC_TYPE,sf.TITLE_NAME,sf.GMT_CREATE,sf.GMT_MODIFIED
</sql>
<sql
id=
"Base_Column_List"
>
ID,SORT,ITEM_NO,PLAN_NO,ALLOC_NO
ID,SORT,ITEM_NO,PLAN_NO,ALLOC_NO
,TITLE_NO,ALLOC_TYPE,TITLE_NAME,GMT_CREATE,GMT_MODIFIED
</sql>
...
...
@@ -31,7 +31,7 @@
<![CDATA[
INSERT INTO abs_plan_alloc_item(
ID
,
"ORDER"
,
SORT
,ITEM_NO
,PLAN_NO
,ALLOC_NO
...
...
@@ -42,7 +42,7 @@
,GMT_MODIFIED
)VALUES(
SEQ_ABS_PLAN_ALLOC_ITEM.nextval
, #{
order
,jdbcType=DECIMAL}
, #{
sort
,jdbcType=DECIMAL}
, #{itemNo,jdbcType=VARCHAR}
, #{planNo,jdbcType=VARCHAR}
, #{allocNo,jdbcType=VARCHAR}
...
...
@@ -61,7 +61,7 @@
<foreach
collection=
"list"
item=
"item"
separator=
";"
>
INSERT INTO abs_plan_alloc_item(
ID
,
"ORDER"
,
SORT
,ITEM_NO
,PLAN_NO
,ALLOC_NO
...
...
@@ -72,8 +72,8 @@
,GMT_MODIFIED
)VALUES
(
nul
l
, #{item.
order
,jdbcType=DECIMAL}
SEQ_ABS_PLAN_ALLOC_ITEM.nextva
l
, #{item.
sort
,jdbcType=DECIMAL}
, #{item.itemNo,jdbcType=VARCHAR}
, #{item.planNo,jdbcType=VARCHAR}
, #{item.allocNo,jdbcType=VARCHAR}
...
...
@@ -105,4 +105,34 @@
ID = #{id,jdbcType=DECIMAL}
]]>
</select>
<!--根据分配编号删除分配事项:abs_plan_alloc_item mydalgen自动生成,请勿修改-->
<delete
id=
"deleteByAllocNo"
>
delete
FROM abs_plan_alloc_item
WHERE
<![CDATA[
ALLOC_NO = #{allocNo,jdbcType=DECIMAL}
]]>
</delete>
<!--根据计划编号删除分配事项:abs_plan_alloc_item mydalgen自动生成,请勿修改-->
<delete
id=
"deleteByPlanNo"
>
delete
FROM abs_plan_alloc_item
WHERE
<![CDATA[
PLAN_NO = #{planNo,jdbcType=DECIMAL}
]]>
</delete>
<!--根据分配编号查询分配事项:abs_plan_alloc_item mydalgen自动生成,请勿修改-->
<select
id=
"getByAllocNo"
resultMap=
"BaseResultMap"
>
SELECT /*MS-ABS-PLAN-ALLOC-ITEM-GETBYALLOCNO*/
<include
refid=
"Base_Column_List"
/>
FROM abs_plan_alloc_item
WHERE
<![CDATA[
ALLOC_NO = #{allocNo,jdbcType=DECIMAL}
]]>
</select>
</mapper>
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanDOMapper.xml
View file @
fd6456af
...
...
@@ -5,15 +5,15 @@
<resultMap
id=
"BaseResultMap"
type=
"com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanDO"
>
<id
column=
"ID"
property=
"id"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"TOTAL_AMT"
property=
"totalAmt"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"ALLOC_PERIOD"
property=
"allocPeriod"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"PLAN_NO"
property=
"planNo"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"STATUS"
property=
"status"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"PAY_FREQ"
property=
"payFreq"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"PLAN_NAME"
property=
"planName"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"GMT_CREATOR"
property=
"gmtCreator"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"TRADE_PLACE"
property=
"tradePlace"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"GMT_MODIFIER"
property=
"gmtModifier"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"CALC_INTR_TYPE"
property=
"calcIntrType"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"PLAN_FULL_NAME"
property=
"planFullName"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"ALLOC_PERIOD_METHOD"
property=
"allocPeriodMethod"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"END_DATE"
property=
"endDate"
jdbcType=
"DATE"
javaType=
"java.util.Date"
/>
<result
column=
"BEGIN_DATE"
property=
"beginDate"
jdbcType=
"DATE"
javaType=
"java.util.Date"
/>
<result
column=
"GMT_CREATE"
property=
"gmtCreate"
jdbcType=
"DATE"
javaType=
"java.util.Date"
/>
...
...
@@ -27,16 +27,16 @@
<sql
id=
"Base_SF_Column_List"
>
sf.ID,sf.TOTAL_AMT,sf.
ALLOC_PERIOD,sf.PLAN_NO,sf.STATUS
,sf.PLAN_NAME,sf.
TRADE_PLACE,sf.CALC_INTR_TYPE,sf.PLAN_FULL_NAME,sf.ALLOC_PERIOD_METHOD
,sf.
END_DATE,sf.BEGIN_DATE,sf.GMT_CREATE,sf.GMT_MODIFIED,sf.FIRST_PAY_DATE
,sf.FIRST_CALC_DATE,sf.FIRST_ALLOC_DATE,sf.FIRST_REPORT_DATE,sf.FIRST_SETTLE_DATE
sf.ID,sf.TOTAL_AMT,sf.
PLAN_NO,sf.STATUS,sf.PAY_FREQ
,sf.PLAN_NAME,sf.
GMT_CREATOR,sf.TRADE_PLACE,sf.GMT_MODIFIER,sf.CALC_INTR_TYPE
,sf.
PLAN_FULL_NAME,sf.END_DATE,sf.BEGIN_DATE,sf.GMT_CREATE,sf.GMT_MODIFIED
,sf.FIRST_
PAY_DATE,sf.FIRST_
CALC_DATE,sf.FIRST_ALLOC_DATE,sf.FIRST_REPORT_DATE,sf.FIRST_SETTLE_DATE
</sql>
<sql
id=
"Base_Column_List"
>
ID,TOTAL_AMT,
ALLOC_PERIOD,PLAN_NO,STATUS
,PLAN_NAME,
TRADE_PLACE,CALC_INTR_TYPE,PLAN_FULL_NAME,ALLOC_PERIOD_METHOD
,
END_DATE,BEGIN_DATE,GMT_CREATE,GMT_MODIFIED,FIRST_PAY_DATE
,FIRST_CALC_DATE,FIRST_ALLOC_DATE,FIRST_REPORT_DATE,FIRST_SETTLE_DATE
ID,TOTAL_AMT,
PLAN_NO,STATUS,PAY_FREQ
,PLAN_NAME,
GMT_CREATOR,TRADE_PLACE,GMT_MODIFIER,CALC_INTR_TYPE
,
PLAN_FULL_NAME,END_DATE,BEGIN_DATE,GMT_CREATE,GMT_MODIFIED
,FIRST_
PAY_DATE,FIRST_
CALC_DATE,FIRST_ALLOC_DATE,FIRST_REPORT_DATE,FIRST_SETTLE_DATE
</sql>
...
...
@@ -46,14 +46,15 @@
INSERT INTO abs_plan(
ID
,TOTAL_AMT
,ALLOC_PERIOD
,PLAN_NO
,STATUS
,PAY_FREQ
,PLAN_NAME
,GMT_CREATOR
,TRADE_PLACE
,GMT_MODIFIER
,CALC_INTR_TYPE
,PLAN_FULL_NAME
,ALLOC_PERIOD_METHOD
,END_DATE
,BEGIN_DATE
,GMT_CREATE
...
...
@@ -66,14 +67,15 @@
)VALUES(
SEQ_ABS_PLAN.nextval
, #{totalAmt,jdbcType=DECIMAL}
, #{allocPeriod,jdbcType=DECIMAL}
, #{planNo,jdbcType=VARCHAR}
, #{status,jdbcType=VARCHAR}
, #{payFreq,jdbcType=VARCHAR}
, #{planName,jdbcType=VARCHAR}
, #{gmtCreator,jdbcType=VARCHAR}
, #{tradePlace,jdbcType=VARCHAR}
, #{gmtModifier,jdbcType=VARCHAR}
, #{calcIntrType,jdbcType=VARCHAR}
, #{planFullName,jdbcType=VARCHAR}
, #{allocPeriodMethod,jdbcType=VARCHAR}
, #{endDate,jdbcType=DATE}
, #{beginDate,jdbcType=DATE}
, sysdate
...
...
@@ -94,14 +96,15 @@
INSERT INTO abs_plan(
ID
,TOTAL_AMT
,ALLOC_PERIOD
,PLAN_NO
,STATUS
,PAY_FREQ
,PLAN_NAME
,GMT_CREATOR
,TRADE_PLACE
,GMT_MODIFIER
,CALC_INTR_TYPE
,PLAN_FULL_NAME
,ALLOC_PERIOD_METHOD
,END_DATE
,BEGIN_DATE
,GMT_CREATE
...
...
@@ -115,14 +118,15 @@
(
null
, #{item.totalAmt,jdbcType=DECIMAL}
, #{item.allocPeriod,jdbcType=DECIMAL}
, #{item.planNo,jdbcType=VARCHAR}
, #{item.status,jdbcType=VARCHAR}
, #{item.payFreq,jdbcType=VARCHAR}
, #{item.planName,jdbcType=VARCHAR}
, #{item.gmtCreator,jdbcType=VARCHAR}
, #{item.tradePlace,jdbcType=VARCHAR}
, #{item.gmtModifier,jdbcType=VARCHAR}
, #{item.calcIntrType,jdbcType=VARCHAR}
, #{item.planFullName,jdbcType=VARCHAR}
, #{item.allocPeriodMethod,jdbcType=VARCHAR}
, #{item.endDate,jdbcType=DATE}
, #{item.beginDate,jdbcType=DATE}
, sysdate
...
...
@@ -136,4 +140,89 @@
</foreach>
;end;
</insert>
<!--getPlanByNo mydalgen自动生成,请勿修改-->
<select
id=
"getPlanByNo"
resultMap=
"BaseResultMap"
>
select /*MS-ABS-PLAN-GETPLANBYNO*/
<include
refid=
"Base_Column_List"
/>
from abs_plan
where plan_no=#{planNo,jdbcType=VARCHAR}
</select>
<!--根据唯一约束PlanNo更新表:abs_plan mydalgen自动生成,请勿修改-->
<update
id=
"updatePlanByNo"
>
UPDATE /*MS-ABS-PLAN-UPDATEPLANBYNO*/ ABS_PLAN
SET
TOTAL_AMT= #{item.totalAmt,jdbcType=DECIMAL}
,STATUS = #{item.status,jdbcType=VARCHAR}
,PAY_FREQ = #{item.payFreq,jdbcType=VARCHAR}
,PLAN_NAME = #{item.planName,jdbcType=VARCHAR}
,TRADE_PLACE = #{item.tradePlace,jdbcType=VARCHAR}
,CALC_INTR_TYPE = #{item.calcIntrType,jdbcType=VARCHAR}
,PLAN_FULL_NAME = #{item.planFullName,jdbcType=VARCHAR}
,END_DATE = #{item.endDate,jdbcType=DATE}
,BEGIN_DATE = #{item.beginDate,jdbcType=DATE}
,FIRST_PAY_DATE = #{item.firstPayDate,jdbcType=DATE}
,FIRST_CALC_DATE = #{item.firstCalcDate,jdbcType=DATE}
,FIRST_ALLOC_DATE = #{item.firstAllocDate,jdbcType=DATE}
,FIRST_REPORT_DATE = #{item.firstReportDate,jdbcType=DATE}
,FIRST_SETTLE_DATE = #{item.firstSettleDate,jdbcType=DATE}
,GMT_MODIFIER = #{item.gmtModifier,jdbcType=VARCHAR}
,GMT_MODIFIED = sysdate
WHERE PLAN_NO= #{planNo,jdbcType=VARCHAR}
</update>
<!--根据PlanName 和 PlanFullName判断是否存在对应的计划 mydalgen自动生成,请勿修改-->
<select
id=
"planExist"
resultType=
"int"
>
SELECT
COUNT(1)
FROM ABS_PLAN
WHERE
PLAN_NAME = #{planName,jdbcType=VARCHAR}
OR PLAN_FULL_NAME = #{planFullName,jdbcType=VARCHAR}
</select>
<!--getPlanList pageCount mydalgen自动生成,请勿修改-->
<select
id=
"getPlanListCount"
resultType=
"int"
>
SELECT
COUNT(*) AS total
FROM
abs_plan
where
1=1
<if
test=
"planName!=null"
>
and plan_name like '%'||#{planName,jdbcType=VARCHAR}||'%'
</if>
<if
test=
"status!=null"
>
and status = #{status,jdbcType=VARCHAR}
</if>
</select>
<!--getPlanList pageResult mydalgen自动生成,请勿修改-->
<select
id=
"getPlanListResult"
resultMap=
"BaseResultMap"
>
select
*
from(
select
tt.*,ROWNUM AS rowno
from(
select /*MS-ABS-PLAN-GETPLANLIST*/
<include
refid=
"Base_Column_List"
/>
from abs_plan
where
1=1
<if
test=
"planName!=null"
>
and plan_name like '%'||#{planName,jdbcType=VARCHAR}||'%'
</if>
<if
test=
"status!=null"
>
and status = #{status,jdbcType=VARCHAR}
</if>
) tt where ROWNUM
<
= #{endRow}
) table_alias
where table_alias.rowno
>
#{startRow}
</select>
<!--deleteByPlanNo mydalgen自动生成,请勿修改-->
<delete
id=
"deleteByPlanNo"
>
delete
from abs_plan
where PLAN_NO= #{planNo,jdbcType=VARCHAR}
</delete>
</mapper>
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanFeeStructureDOMapper.xml
View file @
fd6456af
...
...
@@ -4,30 +4,30 @@
<!-- 自动生成,请修改 ABS_PLAN_FEE_STRUCTURE.xml -->
<resultMap
id=
"BaseResultMap"
type=
"com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanFeeStructureDO"
>
<id
column=
"ID"
property=
"id"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"
ORDER"
property=
"order
"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"
SORT"
property=
"sort
"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"FIXED_FEE_AMT"
property=
"fixedFeeAmt"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"PAY_LIMIT_AMT"
property=
"payLimitAmt"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"FEE_NO"
property=
"feeNo"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"PLAN_NO"
property=
"planNo"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"FEE_NAME"
property=
"feeName"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"FEE_CALC_TYPE"
property=
"feeCalcType"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"FEE_TIME_TYPE"
property=
"feeTimeType"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"FEE_SCALE_TYPE"
property=
"feeScaleType"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"GMT_CREATE"
property=
"gmtCreate"
jdbcType=
"DATE"
javaType=
"java.util.Date"
/>
<result
column=
"GMT_MODIFIED"
property=
"gmtModified"
jdbcType=
"DATE"
javaType=
"java.util.Date"
/>
<result
column=
"FEE_CALC_DEFAULT_DATE"
property=
"feeCalcDefaultDate"
jdbcType=
"DATE"
javaType=
"java.util.Date"
/>
<result
column=
"FEE_RATE"
property=
"feeRate"
jdbcType=
"DECIMAL"
javaType=
"java.math.BigDecimal"
/>
</resultMap>
<sql
id=
"Base_SF_Column_List"
>
sf.ID,sf.SORT,sf.FIXED_FEE_AMT,sf.PAY_LIMIT_AMT,sf.FEE_NO
,sf.PLAN_NO,sf.FEE_
CALC_TYPE,sf.FEE_SCALE_TYPE,sf.GMT_CREATE,sf.GMT_MODIFIED
,sf.
FEE_CALC_DEFAULT_DATE
,sf.FEE_RATE
sf.ID,sf.SORT,sf.FIXED_FEE_AMT,sf.PAY_LIMIT_AMT,sf.FEE_NO
,sf.PLAN_NO,sf.FEE_
NAME,sf.FEE_CALC_TYPE,sf.FEE_TIME_TYPE,sf.FEE_SCALE_TYPE
,sf.
GMT_CREATE,sf.GMT_MODIFIED
,sf.FEE_RATE
</sql>
<sql
id=
"Base_Column_List"
>
ID,SORT,FIXED_FEE_AMT,PAY_LIMIT_AMT,FEE_NO
,PLAN_NO,FEE_
CALC_TYPE,FEE_SCALE_TYPE,GMT_CREATE,GMT_MODIFIED
,
FEE_CALC_DEFAULT_DATE
,FEE_RATE
ID,SORT,FIXED_FEE_AMT,PAY_LIMIT_AMT,FEE_NO
,PLAN_NO,FEE_
NAME,FEE_CALC_TYPE,FEE_TIME_TYPE,FEE_SCALE_TYPE
,
GMT_CREATE,GMT_MODIFIED
,FEE_RATE
</sql>
...
...
@@ -41,24 +41,26 @@
,PAY_LIMIT_AMT
,FEE_NO
,PLAN_NO
,FEE_NAME
,FEE_CALC_TYPE
,FEE_TIME_TYPE
,FEE_SCALE_TYPE
,GMT_CREATE
,GMT_MODIFIED
,FEE_CALC_DEFAULT_DATE
,FEE_RATE
)VALUES(
SEQ_ABS_PLAN_FEE_STRUCTURE.nextval
, #{
order
,jdbcType=DECIMAL}
, #{
sort
,jdbcType=DECIMAL}
, #{fixedFeeAmt,jdbcType=DECIMAL}
, #{payLimitAmt,jdbcType=DECIMAL}
, #{feeNo,jdbcType=VARCHAR}
, #{planNo,jdbcType=VARCHAR}
, #{feeName,jdbcType=VARCHAR}
, #{feeCalcType,jdbcType=VARCHAR}
, #{feeTimeType,jdbcType=VARCHAR}
, #{feeScaleType,jdbcType=VARCHAR}
, sysdate
, sysdate
, #{feeCalcDefaultDate,jdbcType=DATE}
, #{feeRate,jdbcType=DECIMAL}
)
]]>
...
...
@@ -75,25 +77,27 @@
,PAY_LIMIT_AMT
,FEE_NO
,PLAN_NO
,FEE_NAME
,FEE_CALC_TYPE
,FEE_TIME_TYPE
,FEE_SCALE_TYPE
,GMT_CREATE
,GMT_MODIFIED
,FEE_CALC_DEFAULT_DATE
,FEE_RATE
)VALUES
(
nul
l
, #{item.
order
,jdbcType=DECIMAL}
SEQ_ABS_PLAN_FEE_STRUCTURE.nextva
l
, #{item.
sort
,jdbcType=DECIMAL}
, #{item.fixedFeeAmt,jdbcType=DECIMAL}
, #{item.payLimitAmt,jdbcType=DECIMAL}
, #{item.feeNo,jdbcType=VARCHAR}
, #{item.planNo,jdbcType=VARCHAR}
, #{item.feeName,jdbcType=VARCHAR}
, #{item.feeCalcType,jdbcType=VARCHAR}
, #{item.feeTimeType,jdbcType=VARCHAR}
, #{item.feeScaleType,jdbcType=VARCHAR}
, sysdate
, sysdate
, #{item.feeCalcDefaultDate,jdbcType=DATE}
, #{item.feeRate,jdbcType=DECIMAL}
)
</foreach>
...
...
@@ -118,4 +122,20 @@
ID = #{id,jdbcType=DECIMAL}
]]>
</select>
<!--根据计划编号查询投资结构 mydalgen自动生成,请勿修改-->
<select
id=
"selectByPlanNo"
resultMap=
"BaseResultMap"
>
select /*MS-ABS-PLAN-FEE-STRUCTURE-SELECTBYPLANNO*/
<include
refid=
"Base_Column_List"
/>
from abs_plan_fee_structure
where plan_no = #{planNo,jdbcType=VARCHAR}
</select>
<!--根据计划编号删除 mydalgen自动生成,请勿修改-->
<delete
id=
"deleteByPlanNo"
>
<![CDATA[
DELETE /*MS-ABS-PLAN-FEE-STRUCTURE-DELETEBYPLANNO*/ FROM abs_plan_fee_structure
WHERE
PLAN_NO = #{planNo,jdbcType=VARCHAR}
]]>
</delete>
</mapper>
app/common/dal/src/main/resources/com/abssqr/plat/common/dal/mysql/auto/mapper/PlanInvestStructureDOMapper.xml
View file @
fd6456af
...
...
@@ -4,7 +4,7 @@
<!-- 自动生成,请修改 ABS_PLAN_INVEST_STRUCTURE.xml -->
<resultMap
id=
"BaseResultMap"
type=
"com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanInvestStructureDO"
>
<id
column=
"ID"
property=
"id"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"
ORDER"
property=
"order
"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"
SORT"
property=
"sort
"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"LAYER_AMT"
property=
"layerAmt"
jdbcType=
"DECIMAL"
javaType=
"Long"
/>
<result
column=
"GRADE"
property=
"grade"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
<result
column=
"PLAN_NO"
property=
"planNo"
jdbcType=
"VARCHAR"
javaType=
"String"
/>
...
...
@@ -23,13 +23,13 @@
<sql
id=
"Base_SF_Column_List"
>
sf.ID,sf.
ORDER
,sf.LAYER_AMT,sf.GRADE,sf.PLAN_NO
sf.ID,sf.
SORT
,sf.LAYER_AMT,sf.GRADE,sf.PLAN_NO
,sf.LAYER_NO,sf.INTR_TYPE,sf.LAYER_NAME,sf.LAYER_TYPE,sf.ALLOC_METHOD
,sf.END_DATE,sf.GMT_CREATE,sf.EFFECT_DATE,sf.GMT_MODIFIED,sf.EXPECT_END_DATE
,sf.LAYER_INTR
</sql>
<sql
id=
"Base_Column_List"
>
ID,
ORDER
,LAYER_AMT,GRADE,PLAN_NO
ID,
SORT
,LAYER_AMT,GRADE,PLAN_NO
,LAYER_NO,INTR_TYPE,LAYER_NAME,LAYER_TYPE,ALLOC_METHOD
,END_DATE,GMT_CREATE,EFFECT_DATE,GMT_MODIFIED,EXPECT_END_DATE
,LAYER_INTR
...
...
@@ -41,7 +41,7 @@
<![CDATA[
INSERT INTO abs_plan_invest_structure(
ID
,
ORDER
,
SORT
,LAYER_AMT
,GRADE
,PLAN_NO
...
...
@@ -58,7 +58,7 @@
,LAYER_INTR
)VALUES(
SEQ_ABS_PLAN_INVEST_STRUCTURE.nextval
, #{
order
,jdbcType=DECIMAL}
, #{
sort
,jdbcType=DECIMAL}
, #{layerAmt,jdbcType=DECIMAL}
, #{grade,jdbcType=VARCHAR}
, #{planNo,jdbcType=VARCHAR}
...
...
@@ -83,7 +83,7 @@
<foreach
collection=
"list"
item=
"item"
separator=
";"
>
INSERT INTO abs_plan_invest_structure(
ID
,
ORDER
,
SORT
,LAYER_AMT
,GRADE
,PLAN_NO
...
...
@@ -100,8 +100,8 @@
,LAYER_INTR
)VALUES
(
nul
l
, #{item.
order
,jdbcType=DECIMAL}
SEQ_ABS_PLAN_INVEST_STRUCTURE.nextva
l
, #{item.
sort
,jdbcType=DECIMAL}
, #{item.layerAmt,jdbcType=DECIMAL}
, #{item.grade,jdbcType=VARCHAR}
, #{item.planNo,jdbcType=VARCHAR}
...
...
@@ -120,4 +120,20 @@
</foreach>
;end;
</insert>
<!--根据计划编号查询投资结构 mydalgen自动生成,请勿修改-->
<select
id=
"selectByPlanNo"
resultMap=
"BaseResultMap"
>
select /*MS-ABS-PLAN-INVEST-STRUCTURE-SELECTBYPLANNO*/
<include
refid=
"Base_Column_List"
/>
from abs_plan_invest_structure
where plan_no = #{planNo,jdbcType=VARCHAR}
</select>
<!--根据计划编号删除 mydalgen自动生成,请勿修改-->
<delete
id=
"deleteByPlanNo"
>
<![CDATA[
DELETE /*MS-ABS-PLAN-INVEST-STRUCTURE-DELETEBYPLANNO*/ FROM abs_plan_invest_structure
WHERE
PLAN_NO = #{planNo,jdbcType=VARCHAR}
]]>
</delete>
</mapper>
app/common/facade/src/main/java/com/abssqr/plat/common/facade/enums/AllocTypeEmun.java
View file @
fd6456af
...
...
@@ -33,7 +33,7 @@ public enum AllocTypeEmun implements IEnum {
private
String
code
;
private
String
desc
;
private
int
order
;
private
long
sort
;
AllocTypeEmun
(
String
code
,
String
desc
,
int
order
)
{
this
.
code
=
code
;
...
...
@@ -54,7 +54,11 @@ public enum AllocTypeEmun implements IEnum {
return
desc
;
}
public
int
getOrder
()
{
return
order
;
public
long
getSort
()
{
return
sort
;
}
public
void
setSort
(
long
sort
)
{
this
.
sort
=
sort
;
}
}
\ No newline at end of file
app/common/facade/src/main/java/com/abssqr/plat/common/facade/enums/FeeTimeTypeEnum.java
View file @
fd6456af
...
...
@@ -18,8 +18,7 @@ import java.util.Map;
public
enum
FeeTimeTypeEnum
implements
IEnum
{
TERM
(
"TERM"
,
"按期计费"
),
PFCD
(
"PFCD"
,
"首次结算日"
),
PETD
(
"PETD"
,
"项目起息日"
),
PEDD
(
"PEDD"
,
"项目到期日"
),;
PEDD
(
"PEDD"
,
"项目到期日"
);
private
static
final
Map
<
String
,
FeeTimeTypeEnum
>
codeMap
=
new
HashMap
<
String
,
FeeTimeTypeEnum
>();
...
...
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/FeeStructure.java
View file @
fd6456af
...
...
@@ -2,6 +2,7 @@ package com.abssqr.plat.common.facade.model.plan;
import
com.abssqr.plat.common.facade.enums.CalcTypeEnum
;
import
com.abssqr.plat.common.facade.enums.FeeScaleTypeEnum
;
import
com.abssqr.plat.common.facade.enums.FeeTimeTypeEnum
;
import
com.general.system.common.model.BaseEntity
;
import
java.math.BigDecimal
;
...
...
@@ -14,9 +15,9 @@ import java.util.Date;
public
class
FeeStructure
extends
BaseEntity
{
/**
*
order
.
*
sort
.
*/
private
Long
order
;
private
Long
sort
;
/**
* fixedFeeAmt 固定费用.
*/
...
...
@@ -45,7 +46,7 @@ public class FeeStructure extends BaseEntity {
/**
* feeCalcDefaultDate 默认计费时间.
*/
private
Date
feeCalcDefaultDat
e
;
private
FeeTimeTypeEnum
feeTimeTyp
e
;
/**
* feeRate 费率.
*/
...
...
@@ -53,12 +54,12 @@ public class FeeStructure extends BaseEntity {
private
String
feeName
;
public
Long
get
Order
()
{
return
order
;
public
Long
get
Sort
()
{
return
sort
;
}
public
void
set
Order
(
Long
order
)
{
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
)
{
this
.
sort
=
sort
;
}
public
Long
getFixedFeeAmt
()
{
...
...
@@ -109,12 +110,12 @@ public class FeeStructure extends BaseEntity {
this
.
feeScaleType
=
feeScaleType
;
}
public
Date
getFeeCalcDefaultDat
e
()
{
return
fee
CalcDefaultDat
e
;
public
FeeTimeTypeEnum
getFeeTimeTyp
e
()
{
return
fee
TimeTyp
e
;
}
public
void
setFee
CalcDefaultDate
(
Date
feeCalcDefaultDat
e
)
{
this
.
fee
CalcDefaultDate
=
feeCalcDefaultDat
e
;
public
void
setFee
TimeType
(
FeeTimeTypeEnum
feeTimeTyp
e
)
{
this
.
fee
TimeType
=
feeTimeTyp
e
;
}
public
BigDecimal
getFeeRate
()
{
...
...
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/InvestStructure.java
View file @
fd6456af
...
...
@@ -16,9 +16,9 @@ import java.util.Date;
public
class
InvestStructure
extends
BaseEntity
{
/**
*
order
排序.
*
sort
排序.
*/
private
Long
order
;
private
Long
sort
;
/**
* layerAmt 金额/层级规模.
*/
...
...
@@ -71,12 +71,12 @@ public class InvestStructure extends BaseEntity {
private
BigDecimal
layerIntr
;
public
Long
get
Order
()
{
return
order
;
public
Long
get
Sort
()
{
return
sort
;
}
public
void
set
Order
(
Long
order
)
{
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
)
{
this
.
sort
=
sort
;
}
public
Long
getLayerAmt
()
{
...
...
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/Plan.java
View file @
fd6456af
...
...
@@ -7,6 +7,7 @@ package com.abssqr.plat.common.facade.model.plan;
import
com.abssqr.plat.common.facade.model.account.Account
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -20,12 +21,12 @@ public class Plan extends PlanBase {
/**
* 费用结构
*/
private
List
<
FeeStructure
>
feeStructure
;
private
List
<
FeeStructure
>
feeStructure
=
new
ArrayList
<>()
;
/**
* 投资结构
*/
private
List
<
InvestStructure
>
investStructure
;
private
List
<
InvestStructure
>
investStructure
=
new
ArrayList
<>()
;
public
List
<
FeeStructure
>
getFeeStructure
()
{
...
...
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/PlanAlloc.java
View file @
fd6456af
...
...
@@ -8,7 +8,9 @@ import com.abssqr.plat.common.facade.enums.TitleTypeEnum;
import
com.general.system.common.model.BaseEntity
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
/**
* 分配计划
...
...
@@ -48,6 +50,8 @@ public class PlanAlloc extends BaseEntity implements Serializable {
*/
private
Date
settleDate
;
private
List
<
PlanAllocItem
>
planAllocItems
=
new
ArrayList
<>();
public
String
getPlanNo
()
{
return
planNo
;
}
...
...
@@ -104,4 +108,12 @@ public class PlanAlloc extends BaseEntity implements Serializable {
public
void
setSettleDate
(
Date
settleDate
)
{
this
.
settleDate
=
settleDate
;
}
public
List
<
PlanAllocItem
>
getPlanAllocItems
()
{
return
planAllocItems
;
}
public
void
setPlanAllocItems
(
List
<
PlanAllocItem
>
planAllocItems
)
{
this
.
planAllocItems
=
planAllocItems
;
}
}
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/PlanAllocItem.java
View file @
fd6456af
...
...
@@ -18,7 +18,7 @@ public class PlanAllocItem extends BaseEntity implements Serializable {
/**
* sort 排序.
*/
private
int
order
;
private
Long
sort
;
/**
* itemNo 事项编号.
*/
...
...
@@ -44,12 +44,12 @@ public class PlanAllocItem extends BaseEntity implements Serializable {
*/
private
String
titleName
;
public
int
getOrder
()
{
return
order
;
public
Long
getSort
()
{
return
sort
;
}
public
void
set
Order
(
int
order
)
{
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
)
{
this
.
sort
=
sort
;
}
public
String
getItemNo
()
{
...
...
app/common/facade/src/main/java/com/abssqr/plat/common/facade/model/plan/PlanBase.java
View file @
fd6456af
...
...
@@ -18,10 +18,7 @@ public class PlanBase extends BaseEntity {
* totalAmt 发行规模.
*/
private
Long
totalAmt
;
/**
* allocPeriod 兑付周期.
*/
private
Long
allocPeriod
;
/**
* planNo 产品编号.
*/
...
...
@@ -47,9 +44,9 @@ public class PlanBase extends BaseEntity {
*/
private
String
planFullName
;
/**
* allocPeriodMethod 兑付
周期类型.
* allocPeriodMethod 兑付
频率
*/
private
P
eriodTypeEnum
allocPeriodMethod
;
private
P
lanPayFreqEnum
payFreq
;
/**
* endDate 法定到期日.
*/
...
...
@@ -80,6 +77,16 @@ public class PlanBase extends BaseEntity {
*/
private
Date
firstSettleDate
;
/**
* 计划修改人
*/
private
String
gmtModifier
;
/**
* 计划创建人
*/
private
String
gmtCreator
;
public
Long
getTotalAmt
()
{
return
totalAmt
;
}
...
...
@@ -88,14 +95,6 @@ public class PlanBase extends BaseEntity {
this
.
totalAmt
=
totalAmt
;
}
public
Long
getAllocPeriod
()
{
return
allocPeriod
;
}
public
void
setAllocPeriod
(
Long
allocPeriod
)
{
this
.
allocPeriod
=
allocPeriod
;
}
public
String
getPlanNo
()
{
return
planNo
;
}
...
...
@@ -144,12 +143,12 @@ public class PlanBase extends BaseEntity {
this
.
planFullName
=
planFullName
;
}
public
P
eriodTypeEnum
getAllocPeriodMethod
()
{
return
allocPeriodMethod
;
public
P
lanPayFreqEnum
getPayFreq
()
{
return
payFreq
;
}
public
void
set
AllocPeriodMethod
(
PeriodTypeEnum
allocPeriodMethod
)
{
this
.
allocPeriodMethod
=
allocPeriodMethod
;
public
void
set
PayFreq
(
PlanPayFreqEnum
payFreq
)
{
this
.
payFreq
=
payFreq
;
}
public
Date
getEndDate
()
{
...
...
@@ -207,4 +206,21 @@ public class PlanBase extends BaseEntity {
public
void
setFirstSettleDate
(
Date
firstSettleDate
)
{
this
.
firstSettleDate
=
firstSettleDate
;
}
public
String
getGmtModifier
()
{
return
gmtModifier
;
}
public
void
setGmtModifier
(
String
gmtModifier
)
{
this
.
gmtModifier
=
gmtModifier
;
}
public
String
getGmtCreator
()
{
return
gmtCreator
;
}
public
void
setGmtCreator
(
String
gmtCreator
)
{
this
.
gmtCreator
=
gmtCreator
;
}
}
app/common/facade/src/main/java/com/abssqr/plat/common/facade/param/plan/PlanEditOprParam.java
View file @
fd6456af
package
com
.
abssqr
.
plat
.
common
.
facade
.
param
.
plan
;
import
com.abssqr.plat.common.facade.base.BaseOprParam
;
import
com.abssqr.plat.common.facade.enums.CalcIntrTypeEnum
;
import
com.abssqr.plat.common.facade.enums.EventCodeEnum
;
import
com.abssqr.plat.common.facade.enums.PlanPayFreqEnum
;
import
com.abssqr.plat.common.facade.param.plan.sub.FeeStructureParam
;
import
com.abssqr.plat.common.facade.param.plan.sub.InvestStructureParam
;
import
com.abssqr.plat.common.facade.validation.*
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -17,35 +21,37 @@ public class PlanEditOprParam extends BaseOprParam {
/**
* totalAmt 发行规模.
*/
@VldRange
(
max
=
10000000
,
min
=
0
)
private
Long
totalAmt
;
/**
* allocPeriod 兑付周期.
*/
private
Long
allocPeriod
;
/**
* planName 产品简称.
*/
@VldNotNull
private
String
planName
;
/**
* tradePlace 交易场所.
*/
@VldNotNull
private
String
tradePlace
;
/**
* calcIntrType 计息方式/计息基准.
*/
@VldEnums
(
enumClass
=
CalcIntrTypeEnum
.
class
)
private
String
calcIntrType
;
/**
* planFullName 产品全称.
*/
@VldString
(
maxLength
=
30
,
minLength
=
0
)
private
String
planFullName
;
/**
*
allocPeriodMethod 兑付周期类型
.
*
payFreq 兑付频率
.
*/
private
String
allocPeriodMethod
;
@VldEnums
(
enumClass
=
PlanPayFreqEnum
.
class
)
private
String
payFreq
;
/**
* endDate 法定到期日.
*/
@VldNotNull
private
Date
endDate
;
/**
* beginDate 产品成立日.
...
...
@@ -55,29 +61,33 @@ public class PlanEditOprParam extends BaseOprParam {
/**
* firstPayDate 首次转付日.
*/
@VldNotNull
private
Date
firstPayDate
;
/**
* firstCalcDate 首次计算日.
*/
@VldNotNull
private
Date
firstCalcDate
;
/**
* firstAllocDate 首次分配日.
*/
@VldNotNull
private
Date
firstAllocDate
;
/**
* firstReportDate 首次报告日.
*/
@VldNotNull
private
Date
firstReportDate
;
/**
* firstSettleDate 首次结息日.
*/
@VldNotNull
private
Date
firstSettleDate
;
//是否是暂存
private
boolean
draft
;
private
boolean
add
;
//费用结构
private
List
<
FeeStructureParam
>
feeStructureParam
;
...
...
@@ -93,15 +103,6 @@ public class PlanEditOprParam extends BaseOprParam {
this
.
totalAmt
=
totalAmt
;
}
public
Long
getAllocPeriod
()
{
return
allocPeriod
;
}
public
void
setAllocPeriod
(
Long
allocPeriod
)
{
this
.
allocPeriod
=
allocPeriod
;
}
public
String
getPlanName
()
{
return
planName
;
}
...
...
@@ -134,12 +135,12 @@ public class PlanEditOprParam extends BaseOprParam {
this
.
planFullName
=
planFullName
;
}
public
String
get
AllocPeriodMethod
()
{
return
allocPeriodMethod
;
public
String
get
PayFreq
()
{
return
payFreq
;
}
public
void
set
AllocPeriodMethod
(
String
allocPeriodMethod
)
{
this
.
allocPeriodMethod
=
allocPeriodMethod
;
public
void
set
PayFreq
(
String
payFreq
)
{
this
.
payFreq
=
payFreq
;
}
public
Date
getEndDate
()
{
...
...
@@ -222,13 +223,6 @@ public class PlanEditOprParam extends BaseOprParam {
this
.
draft
=
draft
;
}
public
boolean
isAdd
()
{
return
add
;
}
public
void
setAdd
(
boolean
add
)
{
this
.
add
=
add
;
}
public
String
getPlanNo
()
{
return
planNo
;
...
...
app/common/facade/src/main/java/com/abssqr/plat/common/facade/param/plan/PlanPageQryParam.java
View file @
fd6456af
...
...
@@ -4,13 +4,8 @@
*/
package
com
.
abssqr
.
plat
.
common
.
facade
.
param
.
plan
;
import
cn.hutool.core.util.StrUtil
;
import
com.abssqr.plat.common.facade.base.BasePageQryParam
;
import
com.abssqr.plat.common.facade.enums.PlanTypeEnum
;
import
com.abssqr.plat.common.facade.enums.EventCodeEnum
;
import
com.abssqr.plat.common.facade.enums.HandleTypeEnum
;
import
com.abssqr.plat.common.facade.enums.PlanStatusEnum
;
import
com.abssqr.plat.common.facade.validation.VldEnums
;
/**
* @author bangis.wangdf
...
...
@@ -18,44 +13,14 @@ import com.abssqr.plat.common.facade.validation.VldEnums;
*/
public
class
PlanPageQryParam
extends
BasePageQryParam
{
private
static
final
long
serialVersionUID
=
2556744061003715527L
;
/**
* 实体类型(SPV)
*/
@VldEnums
(
enumClass
=
PlanTypeEnum
.
class
,
nullable
=
true
)
private
String
planType
;
/**
* planNo 计划编号.
*/
private
String
planNo
;
/**
* planName 计划名.
*/
private
String
planName
;
/**
* planStatus .
*/
@VldEnums
(
enumClass
=
PlanStatusEnum
.
class
,
nullable
=
true
)
private
String
planStatus
;
/**
* 操作
*/
@VldEnums
(
enumClass
=
HandleTypeEnum
.
class
)
private
String
handleType
;
public
String
getPlanNo
()
{
return
planNo
;
}
public
String
getEntityCode
()
{
return
planNo
;
}
private
String
planName
;
public
void
setPlanNo
(
String
planNo
)
{
this
.
planNo
=
planNo
;
}
private
String
status
;
public
void
setEntityCode
(
String
entityCode
)
{
this
.
planNo
=
entityCode
;
@Override
public
EventCodeEnum
getEventCode
()
{
return
EventCodeEnum
.
ADMIN_LIST_QRY
;
}
public
String
getPlanName
()
{
...
...
@@ -66,40 +31,11 @@ public class PlanPageQryParam extends BasePageQryParam {
this
.
planName
=
planName
;
}
public
String
getEntityName
()
{
return
planName
;
}
public
void
setEntityName
(
String
entityName
)
{
this
.
planName
=
entityName
;
}
public
String
getPlanStatus
()
{
return
planStatus
;
}
public
void
setPlanStatus
(
String
planStatus
)
{
this
.
planStatus
=
planStatus
;
}
@Override
public
EventCodeEnum
getEventCode
()
{
return
EventCodeEnum
.
ADMIN_LIST_QRY
;
}
public
String
getHandleType
()
{
return
handleType
;
}
public
void
setHandleType
(
String
handleType
)
{
this
.
handleType
=
handleType
;
}
public
String
getPlanType
()
{
return
StrUtil
.
isEmpty
(
planType
)
?
PlanTypeEnum
.
PLAN
.
getCode
()
:
planType
;
public
String
getStatus
()
{
return
status
;
}
public
void
set
PlanType
(
String
planType
)
{
this
.
planType
=
planType
;
public
void
set
Status
(
String
status
)
{
this
.
status
=
status
;
}
}
app/common/facade/src/main/java/com/abssqr/plat/common/facade/param/plan/sub/FeeStructureParam.java
View file @
fd6456af
...
...
@@ -9,8 +9,11 @@ import com.abssqr.plat.common.facade.enums.FeeScaleTypeEnum;
import
com.abssqr.plat.common.facade.enums.FeeTimeTypeEnum
;
import
com.abssqr.plat.common.facade.enums.FinSerFeeTypeEnum
;
import
com.abssqr.plat.common.facade.validation.VldEnums
;
import
com.abssqr.plat.common.facade.validation.VldRange
;
import
com.abssqr.plat.common.facade.validation.VldString
;
import
com.general.system.common.model.BaseEntity
;
import
javax.validation.constraints.Max
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -26,45 +29,54 @@ public class FeeStructureParam extends BaseEntity implements Serializable {
/**
* order .
*/
private
Long
order
;
@VldRange
(
max
=
10
,
min
=
0
)
private
Long
sort
;
/**
* fixedFeeAmt 固定费用.
*/
@VldRange
(
max
=
15
,
min
=
0
)
private
Long
fixedFeeAmt
;
/**
* payLimitAmt 支付上限.
*/
@VldRange
(
max
=
15
,
min
=
0
)
private
Long
payLimitAmt
;
/**
* feeCalcType 计费方式.
*/
@VldEnums
(
enumClass
=
CalcTypeEnum
.
class
)
private
String
feeCalcType
;
/**
* feeScaleType 费用基准.
*/
@VldEnums
(
enumClass
=
FeeScaleTypeEnum
.
class
)
private
String
feeScaleType
;
/**
* feeCalcDefaultDate 默认计费时间.
*/
private
Date
feeCalcDefaultDate
;
@VldEnums
(
enumClass
=
FeeTimeTypeEnum
.
class
)
private
String
feeTimeType
;
/**
* feeRate 费率.
*/
@VldRange
(
max
=
1
,
min
=
0
)
private
String
feeRate
;
/**
* 费用名称
*/
@VldString
(
maxLength
=
30
)
private
String
feeName
;
public
Long
get
Order
()
{
return
order
;
public
Long
get
Sort
()
{
return
sort
;
}
public
void
set
Order
(
Long
order
)
{
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
)
{
this
.
sort
=
sort
;
}
public
Long
getFixedFeeAmt
()
{
...
...
@@ -95,18 +107,19 @@ public class FeeStructureParam extends BaseEntity implements Serializable {
return
feeScaleType
;
}
public
void
setFeeScaleType
(
String
feeScaleType
)
{
this
.
feeScaleType
=
feeScal
eType
;
public
String
getFeeTimeType
(
)
{
return
feeTim
eType
;
}
public
Date
getFeeCalcDefaultDate
(
)
{
return
feeCalcDefaultDat
e
;
public
void
setFeeTimeType
(
String
feeTimeType
)
{
this
.
feeTimeType
=
feeTimeTyp
e
;
}
public
void
setFee
CalcDefaultDate
(
Date
feeCalcDefaultDat
e
)
{
this
.
fee
CalcDefaultDate
=
feeCalcDefaultDat
e
;
public
void
setFee
ScaleType
(
String
feeScaleTyp
e
)
{
this
.
fee
ScaleType
=
feeScaleTyp
e
;
}
public
String
getFeeRate
()
{
return
feeRate
;
}
...
...
app/common/facade/src/main/java/com/abssqr/plat/common/facade/param/plan/sub/InvestStructureParam.java
View file @
fd6456af
...
...
@@ -25,7 +25,7 @@ public class InvestStructureParam extends BaseEntity implements Serializable {
/**
* order 排序.
*/
private
Long
order
;
private
Long
sort
;
/**
* layerAmt 金额/层级规模.
*/
...
...
@@ -67,16 +67,15 @@ public class InvestStructureParam extends BaseEntity implements Serializable {
/**
* layerIntr 利率.
*/
private
BigDecimal
layerIntr
;
private
String
layerIntr
;
public
Long
getOrder
()
{
return
order
;
public
Long
getSort
()
{
return
sort
;
}
public
void
set
Order
(
Long
order
)
{
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
)
{
this
.
sort
=
sort
;
}
public
Long
getLayerAmt
()
{
...
...
@@ -152,11 +151,11 @@ public class InvestStructureParam extends BaseEntity implements Serializable {
this
.
expectEndDate
=
expectEndDate
;
}
public
BigDecimal
getLayerIntr
()
{
public
String
getLayerIntr
()
{
return
layerIntr
;
}
public
void
setLayerIntr
(
BigDecimal
layerIntr
)
{
public
void
setLayerIntr
(
String
layerIntr
)
{
this
.
layerIntr
=
layerIntr
;
}
}
app/common/facade/src/main/java/com/abssqr/plat/common/facade/result/plan/PlanVO.java
View file @
fd6456af
...
...
@@ -2,10 +2,14 @@ package com.abssqr.plat.common.facade.result.plan;
import
com.abssqr.plat.common.facade.enums.CalcIntrTypeEnum
;
import
com.abssqr.plat.common.facade.enums.PeriodTypeEnum
;
import
com.abssqr.plat.common.facade.enums.PlanPayFreqEnum
;
import
com.abssqr.plat.common.facade.enums.PlanStatusEnum
;
import
com.abssqr.plat.common.facade.result.plan.sub.FeeStructureVO
;
import
com.abssqr.plat.common.facade.result.plan.sub.InvestStructureVO
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Date
;
public
class
PlanVO
{
...
...
@@ -13,10 +17,7 @@ public class PlanVO {
* totalAmt 发行规模.
*/
private
Long
totalAmt
;
/**
* allocPeriod 兑付周期.
*/
private
Long
allocPeriod
;
/**
* planNo 产品编号.
*/
...
...
@@ -42,9 +43,9 @@ public class PlanVO {
*/
private
String
planFullName
;
/**
* allocPeriodMethod 兑付
周期类型.
* allocPeriodMethod 兑付
频率
*/
private
P
eriodTypeEnum
allocPeriodMethod
;
private
P
lanPayFreqEnum
payFreq
;
/**
* endDate 法定到期日.
*/
...
...
@@ -75,9 +76,19 @@ public class PlanVO {
*/
private
Date
firstSettleDate
;
private
FeeStructureVO
feeStructureVO
;
/**
* 计划修改人
*/
private
String
gmtModifier
;
private
InvestStructureVO
investStructureVO
;
/**
* 计划创建人
*/
private
String
gmtCreator
;
private
List
<
FeeStructureVO
>
feeStructureList
=
new
ArrayList
<>();
private
List
<
InvestStructureVO
>
investStructureList
=
new
ArrayList
<>();
public
Long
getTotalAmt
()
{
return
totalAmt
;
...
...
@@ -87,14 +98,6 @@ public class PlanVO {
this
.
totalAmt
=
totalAmt
;
}
public
Long
getAllocPeriod
()
{
return
allocPeriod
;
}
public
void
setAllocPeriod
(
Long
allocPeriod
)
{
this
.
allocPeriod
=
allocPeriod
;
}
public
String
getPlanNo
()
{
return
planNo
;
}
...
...
@@ -143,12 +146,12 @@ public class PlanVO {
this
.
planFullName
=
planFullName
;
}
public
P
eriodTypeEnum
getAllocPeriodMethod
()
{
return
allocPeriodMethod
;
public
P
lanPayFreqEnum
getPayFreq
()
{
return
payFreq
;
}
public
void
set
AllocPeriodMethod
(
PeriodTypeEnum
allocPeriodMethod
)
{
this
.
allocPeriodMethod
=
allocPeriodMethod
;
public
void
set
PayFreq
(
PlanPayFreqEnum
payFreq
)
{
this
.
payFreq
=
payFreq
;
}
public
Date
getEndDate
()
{
...
...
@@ -207,19 +210,35 @@ public class PlanVO {
this
.
firstSettleDate
=
firstSettleDate
;
}
public
FeeStructureVO
getFeeStructureVO
()
{
return
feeStructureVO
;
public
String
getGmtModifier
()
{
return
gmtModifier
;
}
public
void
setGmtModifier
(
String
gmtModifier
)
{
this
.
gmtModifier
=
gmtModifier
;
}
public
String
getGmtCreator
()
{
return
gmtCreator
;
}
public
void
setGmtCreator
(
String
gmtCreator
)
{
this
.
gmtCreator
=
gmtCreator
;
}
public
List
<
FeeStructureVO
>
getFeeStructureList
()
{
return
feeStructureList
;
}
public
void
setFeeStructure
VO
(
FeeStructureVO
feeStructureVO
)
{
this
.
feeStructure
VO
=
feeStructureVO
;
public
void
setFeeStructure
List
(
List
<
FeeStructureVO
>
feeStructureList
)
{
this
.
feeStructure
List
=
feeStructureList
;
}
public
InvestStructureVO
getInvestStructureVO
()
{
return
investStructure
VO
;
public
List
<
InvestStructureVO
>
getInvestStructureList
()
{
return
investStructure
List
;
}
public
void
setInvestStructure
VO
(
InvestStructureVO
investStructureVO
)
{
this
.
investStructure
VO
=
investStructureVO
;
public
void
setInvestStructure
List
(
List
<
InvestStructureVO
>
investStructureList
)
{
this
.
investStructure
List
=
investStructureList
;
}
}
app/common/facade/src/main/java/com/abssqr/plat/common/facade/result/plan/sub/FeeStructureVO.java
View file @
fd6456af
...
...
@@ -2,15 +2,16 @@ package com.abssqr.plat.common.facade.result.plan.sub;
import
com.abssqr.plat.common.facade.enums.CalcTypeEnum
;
import
com.abssqr.plat.common.facade.enums.FeeScaleTypeEnum
;
import
com.abssqr.plat.common.facade.enums.FeeTimeTypeEnum
;
import
java.math.BigDecimal
;
import
java.util.Date
;
public
class
FeeStructureVO
{
/**
*
order
.
*
sort
.
*/
private
Long
order
;
private
Long
sort
;
/**
* fixedFeeAmt 固定费用.
*/
...
...
@@ -39,18 +40,20 @@ public class FeeStructureVO {
/**
* feeCalcDefaultDate 默认计费时间.
*/
private
Date
feeCalcDefaultDat
e
;
private
FeeTimeTypeEnum
feeTimeTyp
e
;
/**
* feeRate 费率.
*/
private
String
feeRate
;
private
BigDecimal
feeRate
;
public
Long
getOrder
()
{
return
order
;
private
String
feeName
;
public
Long
getSort
()
{
return
sort
;
}
public
void
set
Order
(
Long
order
)
{
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
)
{
this
.
sort
=
sort
;
}
public
Long
getFixedFeeAmt
()
{
...
...
@@ -101,19 +104,27 @@ public class FeeStructureVO {
this
.
feeScaleType
=
feeScaleType
;
}
public
Date
getFeeCalcDefaultDat
e
()
{
return
fee
CalcDefaultDat
e
;
public
FeeTimeTypeEnum
getFeeTimeTyp
e
()
{
return
fee
TimeTyp
e
;
}
public
void
setFee
CalcDefaultDate
(
Date
feeCalcDefaultDat
e
)
{
this
.
fee
CalcDefaultDate
=
feeCalcDefaultDat
e
;
public
void
setFee
TimeType
(
FeeTimeTypeEnum
feeTimeTyp
e
)
{
this
.
fee
TimeType
=
feeTimeTyp
e
;
}
public
String
getFeeRate
()
{
public
BigDecimal
getFeeRate
()
{
return
feeRate
;
}
public
void
setFeeRate
(
String
feeRate
)
{
public
void
setFeeRate
(
BigDecimal
feeRate
)
{
this
.
feeRate
=
feeRate
;
}
public
String
getFeeName
()
{
return
feeName
;
}
public
void
setFeeName
(
String
feeName
)
{
this
.
feeName
=
feeName
;
}
}
app/common/facade/src/main/java/com/abssqr/plat/common/facade/result/plan/sub/InvestStructureVO.java
View file @
fd6456af
...
...
@@ -10,9 +10,9 @@ import java.util.Date;
public
class
InvestStructureVO
{
/**
*
order
排序.
*
sort
排序.
*/
private
Long
order
;
private
Long
sort
;
/**
* layerAmt 金额/层级规模.
*/
...
...
@@ -42,9 +42,9 @@ public class InvestStructureVO {
*/
private
LayerTypeEnum
layerType
;
/**
*
pay
Method 偿付方式.
*
alloc
Method 偿付方式.
*/
private
AllocMethodEnum
pay
Method
;
private
AllocMethodEnum
alloc
Method
;
/**
* endDate 到期日.
*/
...
...
@@ -62,14 +62,15 @@ public class InvestStructureVO {
/**
* layerIntr 利率.
*/
private
String
layerIntr
;
private
BigDecimal
layerIntr
;
public
Long
getOrder
()
{
return
order
;
public
Long
getSort
()
{
return
sort
;
}
public
void
set
Order
(
Long
order
)
{
this
.
order
=
order
;
public
void
set
Sort
(
Long
sort
)
{
this
.
sort
=
sort
;
}
public
Long
getLayerAmt
()
{
...
...
@@ -128,12 +129,12 @@ public class InvestStructureVO {
this
.
layerType
=
layerType
;
}
public
AllocMethodEnum
get
Pay
Method
()
{
return
pay
Method
;
public
AllocMethodEnum
get
Alloc
Method
()
{
return
alloc
Method
;
}
public
void
set
PayMethod
(
AllocMethodEnum
pay
Method
)
{
this
.
payMethod
=
pay
Method
;
public
void
set
AllocMethod
(
AllocMethodEnum
alloc
Method
)
{
this
.
allocMethod
=
alloc
Method
;
}
public
Date
getEndDate
()
{
...
...
@@ -160,11 +161,11 @@ public class InvestStructureVO {
this
.
expectEndDate
=
expectEndDate
;
}
public
String
getLayerIntr
()
{
public
BigDecimal
getLayerIntr
()
{
return
layerIntr
;
}
public
void
setLayerIntr
(
String
layerIntr
)
{
public
void
setLayerIntr
(
BigDecimal
layerIntr
)
{
this
.
layerIntr
=
layerIntr
;
}
}
app/common/facade/src/main/java/com/abssqr/plat/common/facade/service/plan/PlanService.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
common
.
facade
.
service
.
plan
;
import
com.abssqr.plat.common.facade.param.plan.PlanEditOprParam
;
import
com.abssqr.plat.common.facade.param.plan.PlanPageQryParam
;
import
com.abssqr.plat.common.facade.result.BasePage
;
import
com.abssqr.plat.common.facade.result.plan.PlanVO
;
import
com.general.system.common.model.BaseResult
;
public
interface
PlanService
{
String
edit
(
PlanEditOprParam
planEditOprParam
);
PlanVO
get
(
String
planNo
);
BasePage
<
PlanVO
>
page
(
PlanPageQryParam
planPageQryParam
);
BaseResult
<
Boolean
>
delete
(
String
planNo
);
}
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/FeeStructureConvert.java
View file @
fd6456af
...
...
@@ -3,19 +3,24 @@ package com.abssqr.plat.common.model.convertor;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanFeeStructureDO
;
import
com.abssqr.plat.common.facade.enums.CalcTypeEnum
;
import
com.abssqr.plat.common.facade.enums.FeeScaleTypeEnum
;
import
com.abssqr.plat.common.facade.enums.FeeTimeTypeEnum
;
import
com.abssqr.plat.common.facade.model.plan.FeeStructure
;
import
com.abssqr.plat.common.model.enums.IdTypeEnum
;
import
com.abssqr.plat.common.model.seq.SequenceUtil
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
FeeStructureConvert
{
public
static
FeeStructure
convert2Entity
(
PlanFeeStructureDO
var
){
if
(
var
==
null
){
return
null
;
}
FeeStructure
feeStructure
=
new
FeeStructure
();
feeStructure
.
setFee
CalcDefaultDate
(
var
.
getFeeCalcDefaultDate
(
));
feeStructure
.
setFee
TimeType
(
FeeTimeTypeEnum
.
getByCode
(
var
.
getFeeTimeType
()
));
feeStructure
.
setPlanNo
(
var
.
getPlanNo
());
feeStructure
.
setPayLimitAmt
(
var
.
getPayLimitAmt
());
feeStructure
.
set
Order
(
var
.
getOrder
());
feeStructure
.
set
Sort
(
var
.
getSort
());
feeStructure
.
setFixedFeeAmt
(
var
.
getFixedFeeAmt
());
feeStructure
.
setFeeScaleType
(
FeeScaleTypeEnum
.
getByCode
(
var
.
getFeeScaleType
()));
feeStructure
.
setFeeRate
(
var
.
getFeeRate
());
...
...
@@ -25,12 +30,38 @@ public class FeeStructureConvert {
return
feeStructure
;
}
public
static
List
<
FeeStructure
>
convert2Entitys
(
List
<
PlanFeeStructureDO
>
vars
){
if
(
vars
==
null
)
return
null
;
List
<
FeeStructure
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
result
.
add
(
convert2Entity
(
v
));
});
return
result
;
}
public
static
List
<
PlanFeeStructureDO
>
convert2DOs
(
String
planNo
,
List
<
FeeStructure
>
vars
){
if
(
vars
==
null
){
return
null
;
}
List
<
PlanFeeStructureDO
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
v
.
setPlanNo
(
planNo
);
result
.
add
(
convert2DO
(
v
));
});
return
result
;
}
public
static
PlanFeeStructureDO
convert2DO
(
FeeStructure
var
){
if
(
var
==
null
){
return
null
;
}
PlanFeeStructureDO
result
=
new
PlanFeeStructureDO
();
result
.
setFee
CalcDefaultDate
(
var
.
getFeeCalcDefaultDat
e
());
result
.
setFee
TimeType
(
var
.
getFeeTimeType
().
getCod
e
());
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
setPayLimitAmt
(
var
.
getPayLimitAmt
());
result
.
set
Order
(
var
.
getOrder
());
result
.
set
Sort
(
var
.
getSort
());
result
.
setFixedFeeAmt
(
var
.
getFixedFeeAmt
());
result
.
setFeeScaleType
(
var
.
getFeeScaleType
().
getCode
());
result
.
setFeeRate
(
var
.
getFeeRate
());
...
...
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/InvestStructureConvert.java
View file @
fd6456af
...
...
@@ -6,8 +6,15 @@ import com.abssqr.plat.common.facade.enums.IntrTypeEnum;
import
com.abssqr.plat.common.facade.enums.LayerTypeEnum
;
import
com.abssqr.plat.common.facade.model.plan.InvestStructure
;
import
java.util.List
;
import
java.util.ArrayList
;
public
class
InvestStructureConvert
{
public
InvestStructure
convert2Entity
(
PlanInvestStructureDO
var
){
public
static
InvestStructure
convert2Entity
(
PlanInvestStructureDO
var
){
if
(
var
==
null
){
return
null
;
}
InvestStructure
investStructure
=
new
InvestStructure
();
investStructure
.
setEffectDate
(
var
.
getEffectDate
());
investStructure
.
setEndDate
(
var
.
getEndDate
());
...
...
@@ -17,7 +24,7 @@ public class InvestStructureConvert {
investStructure
.
setPlanNo
(
var
.
getPlanNo
());
investStructure
.
setAllocMethod
(
AllocMethodEnum
.
getByCode
(
var
.
getAllocMethod
()));
investStructure
.
set
Order
(
var
.
getOrder
());
investStructure
.
set
Sort
(
var
.
getSort
());
investStructure
.
setLayerType
(
LayerTypeEnum
.
getByCode
(
var
.
getLayerType
()));
investStructure
.
setLayerNo
(
var
.
getLayerNo
());
investStructure
.
setLayerName
(
var
.
getLayerName
());
...
...
@@ -28,7 +35,34 @@ public class InvestStructureConvert {
}
public
PlanInvestStructureDO
convert2DO
(
InvestStructure
var
){
public
static
List
<
InvestStructure
>
convert2Entitys
(
String
planNo
,
List
<
PlanInvestStructureDO
>
vars
){
if
(
vars
==
null
){
return
null
;
}
List
<
InvestStructure
>
result
=
new
ArrayList
();
vars
.
forEach
(
v
->{
v
.
setPlanNo
(
planNo
);
result
.
add
(
convert2Entity
(
v
));
});
return
result
;
}
public
static
List
<
PlanInvestStructureDO
>
convertDOs
(
String
planNo
,
List
<
InvestStructure
>
vars
){
if
(
vars
==
null
)
{
return
null
;
}
List
<
PlanInvestStructureDO
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
v
.
setPlanNo
(
planNo
);
result
.
add
(
convert2DO
(
v
));
});
return
result
;
}
public
static
PlanInvestStructureDO
convert2DO
(
InvestStructure
var
){
if
(
var
==
null
){
return
null
;
}
PlanInvestStructureDO
result
=
new
PlanInvestStructureDO
();
result
.
setEffectDate
(
var
.
getEffectDate
());
result
.
setEndDate
(
var
.
getEndDate
());
...
...
@@ -38,7 +72,7 @@ public class InvestStructureConvert {
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
setAllocMethod
(
var
.
getAllocMethod
().
getCode
());
result
.
set
Order
(
var
.
getOrder
());
result
.
set
Sort
(
var
.
getSort
());
result
.
setLayerType
(
var
.
getLayerType
().
getCode
());
result
.
setLayerNo
(
var
.
getLayerNo
());
result
.
setLayerName
(
var
.
getLayerName
());
...
...
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/PlanAcctTitleConvert.java
View file @
fd6456af
...
...
@@ -4,8 +4,11 @@ import com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanAcctTitleDO;
import
com.abssqr.plat.common.facade.enums.TitleTypeEnum
;
import
com.abssqr.plat.common.facade.model.plan.PlanAcctTitle
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PlanAcctTitleConvert
{
public
PlanAcctTitle
convert2Entity
(
PlanAcctTitleDO
var
){
public
static
PlanAcctTitle
convert2Entity
(
PlanAcctTitleDO
var
){
PlanAcctTitle
result
=
new
PlanAcctTitle
();
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
setRefNo
(
var
.
getRefNo
());
...
...
@@ -14,6 +17,27 @@ public class PlanAcctTitleConvert {
result
.
setTitleType
(
TitleTypeEnum
.
getByCode
(
var
.
getTitleType
()));
return
result
;
}
public
static
List
<
PlanAcctTitle
>
convert2Entitys
(
List
<
PlanAcctTitleDO
>
vars
){
List
<
PlanAcctTitle
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
result
.
add
(
convert2Entity
(
v
));
});
return
result
;
}
public
static
List
<
PlanAcctTitleDO
>
convert2DOs
(
List
<
PlanAcctTitle
>
vars
){
List
<
PlanAcctTitleDO
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
result
.
add
(
convert2DO
(
v
));
});
return
result
;
}
public
static
PlanAcctTitleDO
convert2DO
(
PlanAcctTitle
var
){
PlanAcctTitleDO
result
=
new
PlanAcctTitleDO
();
result
.
setPlanNo
(
var
.
getPlanNo
());
...
...
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/PlanAllocConvert.java
View file @
fd6456af
...
...
@@ -3,8 +3,14 @@ package com.abssqr.plat.common.model.convertor;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanAllocDO
;
import
com.abssqr.plat.common.facade.model.plan.PlanAlloc
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PlanAllocConvert
{
public
static
PlanAlloc
convert2Entity
(
PlanAllocDO
var
){
if
(
var
==
null
){
return
null
;
}
PlanAlloc
result
=
new
PlanAlloc
();
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
setAllocDate
(
var
.
getAllocDate
());
...
...
@@ -16,7 +22,24 @@ public class PlanAllocConvert {
return
result
;
}
public
static
List
<
PlanAlloc
>
convert2Entitys
(
List
<
PlanAllocDO
>
vars
){
if
(
vars
==
null
){
return
null
;
}
List
<
PlanAlloc
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
result
.
add
(
convert2Entity
(
v
));
});
return
result
;
}
public
static
PlanAllocDO
convert2DO
(
PlanAlloc
var
){
if
(
var
==
null
){
return
null
;
}
PlanAllocDO
result
=
new
PlanAllocDO
();
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
setAllocDate
(
var
.
getAllocDate
());
...
...
@@ -27,4 +50,20 @@ public class PlanAllocConvert {
result
.
setSettleDate
(
var
.
getSettleDate
());
return
result
;
}
public
static
List
<
PlanAllocDO
>
convert2DOs
(
List
<
PlanAlloc
>
vars
){
if
(
vars
==
null
){
return
null
;
}
List
<
PlanAllocDO
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
result
.
add
(
convert2DO
(
v
));
});
return
result
;
}
}
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/PlanAllocItemConvert.java
View file @
fd6456af
...
...
@@ -4,27 +4,59 @@ import com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanAllocItemDO;
import
com.abssqr.plat.common.facade.enums.AllocTypeEmun
;
import
com.abssqr.plat.common.facade.model.plan.PlanAllocItem
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PlanAllocItemConvert
{
public
static
PlanAllocItem
convert2Entity
(
PlanAllocItemDO
var
){
if
(
var
==
null
){
return
null
;
}
PlanAllocItem
result
=
new
PlanAllocItem
();
result
.
setAllocNo
(
var
.
getAllocNo
());
result
.
setItemNo
(
var
.
getItemNo
());
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
set
Order
(
var
.
getOrder
().
intValue
());
result
.
set
Sort
(
var
.
getSort
());
result
.
setTitleNo
(
var
.
getTitleNo
());
result
.
setAllocType
(
AllocTypeEmun
.
getByCode
(
var
.
getAllocType
()));
result
.
setTitleName
(
var
.
getTitleName
());
return
result
;
}
public
static
List
<
PlanAllocItem
>
convert2Entitys
(
List
<
PlanAllocItemDO
>
vars
){
List
<
PlanAllocItem
>
result
=
new
ArrayList
<>();
if
(
vars
==
null
){
return
null
;
}
vars
.
forEach
(
v
->{
result
.
add
(
convert2Entity
(
v
));
});
return
result
;
}
public
static
PlanAllocItemDO
convert2DO
(
PlanAllocItem
var
){
if
(
var
==
null
){
return
null
;
}
PlanAllocItemDO
result
=
new
PlanAllocItemDO
();
result
.
setAllocNo
(
var
.
getAllocNo
());
result
.
setItemNo
(
var
.
getItemNo
());
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
set
Order
(
new
Long
(
var
.
getOrder
()
));
result
.
set
Sort
(
var
.
getSort
(
));
result
.
setTitleNo
(
var
.
getTitleNo
());
result
.
setAllocType
(
var
.
getAllocType
().
getCode
());
result
.
setTitleName
(
var
.
getTitleName
());
return
result
;
}
public
static
List
<
PlanAllocItemDO
>
convert2DOs
(
List
<
PlanAllocItem
>
vars
){
List
<
PlanAllocItemDO
>
result
=
new
ArrayList
<>();
if
(
vars
==
null
)
{
return
null
;
}
vars
.
forEach
(
v
->{
result
.
add
(
convert2DO
(
v
));
});
return
result
;
}
}
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/PlanConvert.java
View file @
fd6456af
...
...
@@ -3,15 +3,21 @@ package com.abssqr.plat.common.model.convertor;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanDO
;
import
com.abssqr.plat.common.facade.enums.CalcIntrTypeEnum
;
import
com.abssqr.plat.common.facade.enums.PeriodTypeEnum
;
import
com.abssqr.plat.common.facade.enums.PlanPayFreqEnum
;
import
com.abssqr.plat.common.facade.enums.PlanStatusEnum
;
import
com.abssqr.plat.common.facade.model.plan.Plan
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
PlanConvert
{
public
static
Plan
convertDO2Plan
(
PlanDO
var
){
public
static
Plan
convert2Entity
(
PlanDO
var
){
if
(
var
==
null
){
return
null
;
}
Plan
plan
=
new
Plan
();
plan
.
setAllocPeriod
(
var
.
getAllocPeriod
());
plan
.
setAllocPeriodMethod
(
PeriodTypeEnum
.
getByCode
(
var
.
getAllocPeriodMethod
()));
plan
.
setPayFreq
(
PlanPayFreqEnum
.
getByCode
(
var
.
getPayFreq
()));
plan
.
setBeginDate
(
var
.
getBeginDate
());
plan
.
setCalcIntrType
(
CalcIntrTypeEnum
.
getByCode
(
var
.
getCalcIntrType
()));
plan
.
setEndDate
(
var
.
getEndDate
());
...
...
@@ -26,15 +32,26 @@ public class PlanConvert {
plan
.
setPlanNo
(
var
.
getPlanNo
());
plan
.
setStatus
(
PlanStatusEnum
.
getByCode
(
var
.
getStatus
()));
plan
.
setTradePlace
(
var
.
getTradePlace
());
plan
.
setGmtModifier
(
var
.
getGmtModifier
());
plan
.
setGmtCreator
(
var
.
getGmtCreator
());
return
plan
;
}
public
static
List
<
Plan
>
convert2Entitys
(
List
<
PlanDO
>
vars
){
if
(
vars
==
null
){
return
null
;
}
List
<
Plan
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
result
.
add
(
convert2Entity
(
v
));
});
return
result
;
}
public
static
PlanDO
convert2DO
(
Plan
var
){
PlanDO
planDO
=
new
PlanDO
();
planDO
.
setAllocPeriod
(
var
.
getAllocPeriod
());
planDO
.
setAllocPeriodMethod
(
var
.
getAllocPeriodMethod
().
getCode
());
planDO
.
setPayFreq
(
var
.
getPayFreq
().
getCode
());
planDO
.
setBeginDate
(
var
.
getBeginDate
());
planDO
.
setCalcIntrType
(
var
.
getCalcIntrType
().
getCode
());
planDO
.
setEndDate
(
var
.
getEndDate
());
...
...
@@ -49,6 +66,8 @@ public class PlanConvert {
planDO
.
setPlanNo
(
var
.
getPlanNo
());
planDO
.
setStatus
(
var
.
getStatus
().
getCode
());
planDO
.
setTradePlace
(
var
.
getTradePlace
());
planDO
.
setGmtModifier
(
var
.
getGmtModifier
());
planDO
.
setGmtCreator
(
var
.
getGmtCreator
());
return
planDO
;
}
}
app/common/model/src/main/java/com/abssqr/plat/common/model/convertor/web/PlanWebConvert.java
View file @
fd6456af
package
com
.
abssqr
.
plat
.
common
.
model
.
convertor
.
web
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.PlanListPage
;
import
com.abssqr.plat.common.facade.enums.*
;
import
com.abssqr.plat.common.facade.model.plan.FeeStructure
;
import
com.abssqr.plat.common.facade.model.plan.InvestStructure
;
import
com.abssqr.plat.common.facade.model.plan.Plan
;
import
com.abssqr.plat.common.facade.param.plan.PlanEditOprParam
;
import
com.abssqr.plat.common.facade.param.plan.PlanPageQryParam
;
import
com.abssqr.plat.common.facade.param.plan.sub.FeeStructureParam
;
import
com.abssqr.plat.common.facade.param.plan.sub.InvestStructureParam
;
import
com.abssqr.plat.common.facade.result.BasePage
;
import
com.abssqr.plat.common.facade.result.astPool.AstPoolVO
;
import
com.abssqr.plat.common.facade.result.plan.PlanVO
;
import
com.abssqr.plat.common.facade.result.plan.sub.FeeStructureVO
;
import
com.abssqr.plat.common.facade.result.plan.sub.InvestStructureVO
;
import
com.abssqr.plat.common.model.convertor.AstPoolConvert
;
import
com.abssqr.plat.common.model.convertor.PlanConvert
;
import
com.abssqr.plat.common.model.enums.IdTypeEnum
;
import
com.abssqr.plat.common.model.seq.SequenceUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.omg.CORBA.PUBLIC_MEMBER
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.math.BigDecimal
;
...
...
@@ -17,8 +30,7 @@ public class PlanWebConvert {
public
static
Plan
convertPlanParam
(
PlanEditOprParam
planEditOprParam
){
Plan
plan
=
new
Plan
();
//分配周期
plan
.
setAllocPeriod
(
planEditOprParam
.
getAllocPeriod
());
plan
.
setAllocPeriodMethod
(
PeriodTypeEnum
.
getByCode
(
planEditOprParam
.
getAllocPeriodMethod
()));
plan
.
setPayFreq
(
PlanPayFreqEnum
.
getByCode
(
planEditOprParam
.
getPayFreq
()));
plan
.
setBeginDate
(
planEditOprParam
.
getBeginDate
());
plan
.
setCalcIntrType
(
CalcIntrTypeEnum
.
getByCode
(
planEditOprParam
.
getCalcIntrType
()));
plan
.
setEndDate
(
planEditOprParam
.
getEndDate
());
...
...
@@ -35,45 +47,43 @@ public class PlanWebConvert {
if
(
CollectionUtils
.
isNotEmpty
(
planEditOprParam
.
getInvestStructureParam
()))
{
for
(
InvestStructureParam
investStructure
:
planEditOprParam
.
getInvestStructureParam
())
{
plan
.
getInvestStructure
().
add
(
convertInvestStructureParam
(
plan
.
getPlanNo
(),
investStructure
));
plan
.
getInvestStructure
().
add
(
convertInvestStructureParam
(
investStructure
));
}
}
if
(
CollectionUtils
.
isNotEmpty
(
planEditOprParam
.
getFeeStructureParam
())){
for
(
FeeStructureParam
feeStructureParam:
planEditOprParam
.
getFeeStructureParam
()){
plan
.
getFeeStructure
().
add
(
convertFeeStructure
(
plan
.
getPlanNo
(),
feeStructureParam
));
plan
.
getFeeStructure
().
add
(
convertFeeStructure
(
feeStructureParam
));
}
}
return
plan
;
}
private
static
InvestStructure
convertInvestStructureParam
(
String
planNo
,
InvestStructureParam
investStructureParam
){
private
static
InvestStructure
convertInvestStructureParam
(
InvestStructureParam
investStructureParam
){
InvestStructure
investStructure
=
new
InvestStructure
();
investStructure
.
setEffectDate
(
investStructureParam
.
getEffectDate
());
investStructure
.
setEndDate
(
investStructureParam
.
getEndDate
());
investStructure
.
setExpectEndDate
(
investStructureParam
.
getExpectEndDate
());
investStructure
.
setGrade
(
investStructureParam
.
getGrade
());
investStructure
.
setIntrType
(
IntrTypeEnum
.
getByCode
(
investStructureParam
.
getIntrType
()));
investStructure
.
setPlanNo
(
planNo
);
investStructure
.
setAllocMethod
(
AllocMethodEnum
.
getByCode
(
investStructureParam
.
getAllocMethod
()));
investStructure
.
set
Order
(
investStructureParam
.
getOrder
());
investStructure
.
set
Sort
(
investStructureParam
.
getSort
());
investStructure
.
setLayerType
(
LayerTypeEnum
.
getByCode
(
investStructureParam
.
getLayerType
()));
investStructure
.
setLayerNo
(
SequenceUtil
.
genId
(
IdTypeEnum
.
INVESTSTRUCTURE
));
investStructure
.
setLayerName
(
investStructureParam
.
getLayerName
());
investStructure
.
setLayerIntr
(
investStructureParam
.
getLayerIntr
(
));
investStructure
.
setLayerIntr
(
new
BigDecimal
(
investStructureParam
.
getLayerIntr
()
));
investStructure
.
setLayerAmt
(
investStructureParam
.
getLayerAmt
());
return
investStructure
;
}
private
static
FeeStructure
convertFeeStructure
(
String
planNo
,
FeeStructureParam
feeStructureParam
){
private
static
FeeStructure
convertFeeStructure
(
FeeStructureParam
feeStructureParam
){
FeeStructure
feeStructure
=
new
FeeStructure
();
feeStructure
.
setFeeCalcDefaultDate
(
feeStructureParam
.
getFeeCalcDefaultDate
());
feeStructure
.
setPlanNo
(
planNo
);
feeStructure
.
setFeeTimeType
(
FeeTimeTypeEnum
.
getByCode
(
feeStructureParam
.
getFeeTimeType
()));
feeStructure
.
setPayLimitAmt
(
feeStructureParam
.
getPayLimitAmt
());
feeStructure
.
set
Order
(
feeStructureParam
.
getOrder
());
feeStructure
.
set
Sort
(
feeStructureParam
.
getSort
());
feeStructure
.
setFixedFeeAmt
(
feeStructureParam
.
getFixedFeeAmt
());
feeStructure
.
setFeeScaleType
(
FeeScaleTypeEnum
.
getByCode
(
feeStructureParam
.
getFeeScaleType
()));
feeStructure
.
setFeeRate
(
new
BigDecimal
(
feeStructureParam
.
getFeeRate
()));
...
...
@@ -84,5 +94,125 @@ public class PlanWebConvert {
return
feeStructure
;
}
public
static
PlanVO
convert2PlanVO
(
Plan
var
){
if
(
var
==
null
){
return
null
;
}
PlanVO
result
=
new
PlanVO
();
result
.
setPayFreq
(
var
.
getPayFreq
());
result
.
setBeginDate
(
var
.
getBeginDate
());
result
.
setCalcIntrType
(
var
.
getCalcIntrType
());
result
.
setEndDate
(
var
.
getEndDate
());
result
.
setFirstAllocDate
(
var
.
getFirstAllocDate
());
result
.
setFirstCalcDate
(
var
.
getFirstCalcDate
());
result
.
setFirstPayDate
(
var
.
getFirstPayDate
());
result
.
setFirstReportDate
(
var
.
getFirstReportDate
());
result
.
setFirstSettleDate
(
var
.
getFirstSettleDate
());
result
.
setPlanFullName
(
var
.
getPlanFullName
());
result
.
setTotalAmt
(
var
.
getTotalAmt
());
result
.
setPlanName
(
var
.
getPlanName
());
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
setStatus
(
var
.
getStatus
());
result
.
setTradePlace
(
var
.
getTradePlace
());
result
.
setGmtModifier
(
var
.
getGmtModifier
());
result
.
setGmtCreator
(
var
.
getGmtCreator
());
result
.
setInvestStructureList
(
convert2InvestStructureVOs
(
var
.
getInvestStructure
()));
result
.
setFeeStructureList
(
convert2FeeStructureVOs
(
var
.
getFeeStructure
()));
return
result
;
}
public
static
List
<
PlanVO
>
convert2PlanVOs
(
List
<
Plan
>
vars
){
if
(
vars
==
null
){
return
null
;
}
List
<
PlanVO
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
result
.
add
(
convert2PlanVO
(
v
));
});
return
result
;
}
private
static
FeeStructureVO
convert2FeeStructureVO
(
FeeStructure
var
){
if
(
var
==
null
){
return
null
;
}
FeeStructureVO
result
=
new
FeeStructureVO
();
result
.
setFeeTimeType
(
var
.
getFeeTimeType
());
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
setPayLimitAmt
(
var
.
getPayLimitAmt
());
result
.
setSort
(
var
.
getSort
());
result
.
setFixedFeeAmt
(
var
.
getFixedFeeAmt
());
result
.
setFeeScaleType
(
var
.
getFeeScaleType
());
result
.
setFeeRate
(
var
.
getFeeRate
());
result
.
setFeeNo
(
SequenceUtil
.
genId
(
IdTypeEnum
.
FEE
));
result
.
setFeeCalcType
(
var
.
getFeeCalcType
());
result
.
setFeeName
(
var
.
getFeeName
());
return
result
;
}
private
static
InvestStructureVO
convertInvestStructureVO
(
InvestStructure
var
){
if
(
var
==
null
){
return
null
;
}
InvestStructureVO
result
=
new
InvestStructureVO
();
result
.
setEffectDate
(
var
.
getEffectDate
());
result
.
setEndDate
(
var
.
getEndDate
());
result
.
setExpectEndDate
(
var
.
getExpectEndDate
());
result
.
setGrade
(
var
.
getGrade
());
result
.
setIntrType
(
var
.
getIntrType
());
result
.
setPlanNo
(
var
.
getPlanNo
());
result
.
setAllocMethod
(
var
.
getAllocMethod
());
result
.
setSort
(
var
.
getSort
());
result
.
setLayerType
(
var
.
getLayerType
());
result
.
setLayerNo
(
var
.
getLayerNo
());
result
.
setLayerName
(
var
.
getLayerName
());
result
.
setLayerIntr
(
var
.
getLayerIntr
());
result
.
setLayerAmt
(
var
.
getLayerAmt
());
return
result
;
}
private
static
List
<
FeeStructureVO
>
convert2FeeStructureVOs
(
List
<
FeeStructure
>
vars
){
if
(
vars
==
null
){
return
null
;
}
List
<
FeeStructureVO
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
result
.
add
(
convert2FeeStructureVO
(
v
));
});
return
result
;
}
private
static
List
<
InvestStructureVO
>
convert2InvestStructureVOs
(
List
<
InvestStructure
>
vars
){
if
(
vars
==
null
){
return
null
;
}
List
<
InvestStructureVO
>
result
=
new
ArrayList
<>();
vars
.
forEach
(
v
->{
result
.
add
(
convertInvestStructureVO
(
v
));
});
return
result
;
}
public
static
PlanListPage
convertParam2Page
(
PlanPageQryParam
planPageQryParam
){
PlanListPage
planListPage
=
new
PlanListPage
();
planListPage
.
setPlanName
(
planPageQryParam
.
getPlanName
());
planListPage
.
setStatus
(
planPageQryParam
.
getStatus
());
planListPage
.
setCurrPageNo
(
planPageQryParam
.
getPageNum
());
planListPage
.
setLimit
(
planPageQryParam
.
getPageSize
());
return
planListPage
;
}
public
static
BasePage
<
PlanVO
>
convertPage2VO
(
PlanListPage
planListPage
){
BasePage
<
PlanVO
>
basePage
=
new
BasePage
<>();
basePage
.
setDatas
(
PlanWebConvert
.
convert2PlanVOs
(
PlanConvert
.
convert2Entitys
(
planListPage
.
getDatas
())));
basePage
.
setLimit
(
planListPage
.
getLimit
());
basePage
.
setCurrPageNo
(
planListPage
.
getCurrPageNo
());
basePage
.
setTotal
(
planListPage
.
getTotal
());
return
basePage
;
}
}
app/common/model/src/main/java/com/abssqr/plat/common/model/enums/IdTypeEnum.java
View file @
fd6456af
...
...
@@ -43,7 +43,7 @@ public enum IdTypeEnum implements IEnum {
ALLOCPRG
(
"ALD"
,
"分配方案编号前缀"
),
ALLOCITM
(
"AID"
,
"分配事项编号前缀"
),
ALLOCIT
E
M
(
"AID"
,
"分配事项编号前缀"
),
FEE
(
"FED"
,
"计划费用前缀"
),
...
...
@@ -80,7 +80,7 @@ public enum IdTypeEnum implements IEnum {
// FEE("FEE", "计划费用前缀"),
// ORGANIZATIO("ORG", "权构编号前缀"),
// ALLOCPRG("ALLOCPRG","分配方案编号前缀"),
// ALLOCIT
M("ALLOCIT
M","分配事项编号前缀"),
// ALLOCIT
EM("ALLOCITE
M","分配事项编号前缀"),
// ALLOCDATE("ALLOCDATE","分配方案计算日前缀"),
// ALLOCOUTCOME("ALLOCOUTCOME","分配结果"),
// ASTPOOL("ASTPOOL","资产池前缀"),
...
...
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/PlanAllocRepo.java
View file @
fd6456af
...
...
@@ -4,15 +4,9 @@
*/
package
com
.
abssqr
.
plat
.
common
.
model
.
repo
.
plan
;
import
com.abssqr.plat.common.facade.enums.PlanAllocStatusEnum
;
import
com.abssqr.plat.common.facade.enums.PlanTypeEnum
;
import
com.abssqr.plat.common.facade.model.plan.PlanAlloc
;
import
com.abssqr.plat.common.facade.model.plan.PlanAllocItem
;
import
com.general.system.common.model.Money
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 分配计划
...
...
@@ -26,67 +20,13 @@ public interface PlanAllocRepo {
* @return
*/
List
<
PlanAlloc
>
queryByPlanNo
(
String
planNo
);
/**
* 获取未分配审批通过的分配计划
* @param planNo
* @return
*/
List
<
PlanAlloc
>
queryUnassigneAllocByPlanNo
(
String
planNo
);
void
insertPlanAllocs
(
List
<
PlanAlloc
>
allocs
);
PlanAlloc
getPlanAllocDetail
(
String
allocNo
);
void
addOrUpdate
(
PlanAlloc
param
,
boolean
upd
);
/**
* 删除分配方案
* @param allocNo
* @return
*/
int
delete
(
String
allocNo
);
/**
* 删除分配事项
*
* @param itemNo
* @return
*/
int
deleteAllocItem
(
String
itemNo
);
/**
* 分配计划改为已分配
* @param allocNo
* @param allocStatus
* @return
*/
Boolean
planAllocDetailAssigned
(
String
allocNo
,
PlanAllocStatusEnum
allocStatus
);
/**
* 获取最近一次兑付
* @return
*/
PlanAlloc
queryRecentlyPlans
(
PlanTypeEnum
planType
);
int
updateAllocStatus
(
PlanAlloc
alloc
);
int
querySameClearDate
(
Date
clearDate
,
String
planNo
,
String
allocNo
);
PlanAlloc
lockByAllocNo
(
String
allocNo
);
/**
* 查询审批通过并且未分配的时间段分配金额统计
* @return
*/
Money
queryStatAllocAmtByPlanNoAndPayDate
(
Date
startDate
,
Date
endDate
,
String
planNo
);
/**
* 根据计划编号获取累计分配金额
* @param planNos
* @return
*/
Money
queryStatTotalAllocAmtByPlanNos
(
List
<
String
>
planNos
);
void
insertPlanAllocItem
(
PlanAllocItem
allocItem
,
String
planNo
,
String
allocNo
);
void
store
(
List
<
PlanAlloc
>
planAllocList
);
/**
* 根据计划编号删除分配方案
...
...
@@ -94,12 +34,4 @@ public interface PlanAllocRepo {
*/
void
cleanByPlanNo
(
String
planNo
);
List
<
PlanAlloc
>
queryUnMatchedApprovedAlloc
(
String
planNo
);
/**
* 查询已分配未兑付的金额 按投资结构分组
* @param planNo 计划编号
* @return
*/
Map
<
String
,
Money
>
queryApprovedNotPayMoneyGroupByLayerNo
(
String
planNo
);
}
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/PlanRepo.java
View file @
fd6456af
...
...
@@ -5,16 +5,8 @@
package
com
.
abssqr
.
plat
.
common
.
model
.
repo
.
plan
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.PlanListPage
;
import
com.abssqr.plat.common.facade.enums.PlanStatusEnum
;
import
com.abssqr.plat.common.facade.enums.PlanTypeEnum
;
import
com.abssqr.plat.common.facade.enums.PriceTypeEnum
;
import
com.abssqr.plat.common.facade.model.org.OrganizationEntity
;
import
com.abssqr.plat.common.facade.model.plan.Plan
;
import
com.abssqr.plat.common.facade.model.plan.PlanBase
;
import
com.general.system.bpm.enums.ApproveStatusEnum
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* 计划仓储
...
...
@@ -38,7 +30,7 @@ public interface PlanRepo {
* @param planName
* @return
*/
Integer
planExist
(
String
planFllName
,
String
planName
);
boolean
planExist
(
String
planFllName
,
String
planName
);
/**
* 新增计划
...
...
@@ -46,14 +38,14 @@ public interface PlanRepo {
* @param plan
* @return
*/
void
addPlan
(
Plan
Base
plan
);
void
addPlan
(
Plan
plan
);
/**
* 修改计划
*
* @param plan
*/
void
updatePlan
(
Plan
Base
plan
);
void
updatePlan
(
Plan
plan
);
/**
...
...
@@ -61,6 +53,13 @@ public interface PlanRepo {
* @param planNo
* @return
*/
PlanBase
getPlanByNo
(
String
planNo
);
Plan
getPlanByNo
(
String
planNo
);
/**
* 删除计划
* @param planNo
*/
void
deletePlan
(
String
planNo
);
}
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/PlanAllocRepoImpl.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
common
.
model
.
repo
.
plan
.
impl
;
import
com.abssqr.plat.common.dal.mysql.auto.dao.PlanAllocDAO
;
import
com.abssqr.plat.common.dal.mysql.auto.dao.PlanAllocItemDAO
;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanAllocDO
;
import
com.abssqr.plat.common.facade.model.plan.PlanAlloc
;
import
com.abssqr.plat.common.facade.model.plan.PlanAllocItem
;
import
com.abssqr.plat.common.model.convertor.PlanAllocConvert
;
import
com.abssqr.plat.common.model.convertor.PlanAllocItemConvert
;
import
com.abssqr.plat.common.model.repo.plan.PlanAllocRepo
;
import
com.general.system.common.util.VarChecker
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
@Component
public
class
PlanAllocRepoImpl
implements
PlanAllocRepo
{
@Autowired
PlanAllocDAO
planAllocDAO
;
@Autowired
PlanAllocItemDAO
planAllocItemDAO
;
@Override
public
List
<
PlanAlloc
>
queryByPlanNo
(
String
planNo
)
{
List
<
PlanAllocDO
>
planAllocDOList
=
planAllocDAO
.
getByPlanNo
(
planNo
);
return
PlanAllocConvert
.
convert2Entitys
(
planAllocDOList
);
}
@Override
public
void
insertPlanAllocs
(
List
<
PlanAlloc
>
allocs
)
{
int
upct
=
planAllocDAO
.
insertBatch
(
PlanAllocConvert
.
convert2DOs
(
allocs
));
VarChecker
.
checkEquals
(
allocs
.
size
(),
upct
,
"更新数量不一致"
);
}
@Override
public
PlanAlloc
getPlanAllocDetail
(
String
allocNo
)
{
PlanAllocDO
planAllocDO
=
planAllocDAO
.
getByAllocNo
(
allocNo
);
return
PlanAllocConvert
.
convert2Entity
(
planAllocDO
);
}
@Override
public
void
store
(
List
<
PlanAlloc
>
planAllocList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
planAllocList
)){
int
upct
=
planAllocDAO
.
insertBatch
(
PlanAllocConvert
.
convert2DOs
(
planAllocList
));
VarChecker
.
checkEquals
(
planAllocList
.
size
(),
upct
,
"更新数量不一致"
);
List
<
PlanAllocItem
>
planAllocItems
=
new
ArrayList
<>();
planAllocList
.
forEach
(
v
->{
if
(
CollectionUtils
.
isNotEmpty
(
v
.
getPlanAllocItems
())){
planAllocItems
.
addAll
(
v
.
getPlanAllocItems
());
}
});
if
(
CollectionUtils
.
isNotEmpty
(
planAllocItems
)){
int
upct2
=
planAllocItemDAO
.
insertBatch
(
PlanAllocItemConvert
.
convert2DOs
(
planAllocItems
));
VarChecker
.
checkEquals
(
planAllocItems
.
size
(),
upct2
,
"更新数量不一致"
);
}
}
}
@Override
public
void
cleanByPlanNo
(
String
planNo
)
{
planAllocDAO
.
deleteByPlanNo
(
planNo
);
planAllocItemDAO
.
deleteByPlanNo
(
planNo
);
}
}
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/PlanFeeStructureRepoImpl.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
common
.
model
.
repo
.
plan
.
impl
;
import
com.abssqr.plat.common.dal.mysql.auto.dao.PlanFeeStructureDAO
;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanFeeStructureDO
;
import
com.abssqr.plat.common.facade.model.plan.FeeStructure
;
import
com.abssqr.plat.common.model.convertor.FeeStructureConvert
;
import
com.abssqr.plat.common.model.repo.plan.PlanFeeStructureRepo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
public
class
PlanFeeStructureRepoImpl
implements
PlanFeeStructureRepo
{
@Autowired
PlanFeeStructureDAO
planFeeStructureDAO
;
@Override
public
List
<
FeeStructure
>
selectByPlanNo
(
String
planNo
)
{
List
<
PlanFeeStructureDO
>
planFeeStructureDOS
=
planFeeStructureDAO
.
selectByPlanNo
(
planNo
);
return
FeeStructureConvert
.
convert2Entitys
(
planFeeStructureDOS
);
}
@Override
public
void
cleanByPlanNo
(
String
planNo
)
{
planFeeStructureDAO
.
deleteByPlanNo
(
planNo
);
}
@Override
public
void
add
(
String
planNo
,
List
<
FeeStructure
>
feeStructureList
)
{
List
<
PlanFeeStructureDO
>
planFeeStructureDOS
=
FeeStructureConvert
.
convert2DOs
(
planNo
,
feeStructureList
);
if
(
CollectionUtils
.
isNotEmpty
(
planFeeStructureDOS
)){
planFeeStructureDAO
.
insertBatch
(
planFeeStructureDOS
);
}
}
}
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/PlanInvestStructureRepoImpl.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
common
.
model
.
repo
.
plan
.
impl
;
import
com.abssqr.plat.common.dal.mysql.auto.dao.PlanInvestStructureDAO
;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanInvestStructureDO
;
import
com.abssqr.plat.common.facade.model.plan.InvestStructure
;
import
com.abssqr.plat.common.model.convertor.InvestStructureConvert
;
import
com.abssqr.plat.common.model.repo.plan.PlanInvestStructureRepo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Component
public
class
PlanInvestStructureRepoImpl
implements
PlanInvestStructureRepo
{
@Autowired
PlanInvestStructureDAO
planInvestStructureDAO
;
@Override
public
List
<
InvestStructure
>
selectByPlanNo
(
String
planNo
)
{
List
<
PlanInvestStructureDO
>
entitys
=
planInvestStructureDAO
.
selectByPlanNo
(
planNo
);
return
InvestStructureConvert
.
convert2Entitys
(
planNo
,
entitys
);
}
@Override
public
void
cleanByPlanNo
(
String
planNo
)
{
planInvestStructureDAO
.
deleteByPlanNo
(
planNo
);
}
@Override
public
void
add
(
String
planNo
,
List
<
InvestStructure
>
investStructures
)
{
List
<
PlanInvestStructureDO
>
planInvestStructureDOS
=
InvestStructureConvert
.
convertDOs
(
planNo
,
investStructures
);
if
(
CollectionUtils
.
isNotEmpty
(
planInvestStructureDOS
))
{
planInvestStructureDAO
.
insertBatch
(
planInvestStructureDOS
);
}
}
}
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/PlanRepoImpl.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
common
.
model
.
repo
.
plan
.
impl
;
import
com.abssqr.plat.common.dal.mysql.auto.dao.PlanDAO
;
import
com.abssqr.plat.common.dal.mysql.auto.dataobject.PlanDO
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.PlanListPage
;
import
com.abssqr.plat.common.facade.enums.PlanStatusEnum
;
import
com.abssqr.plat.common.facade.model.plan.Plan
;
import
com.abssqr.plat.common.facade.model.plan.PlanBase
;
import
com.abssqr.plat.common.model.convertor.PlanConvert
;
import
com.abssqr.plat.common.model.repo.plan.PlanRepo
;
import
com.general.system.common.util.VarChecker
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
@Component
public
class
PlanRepoImpl
implements
PlanRepo
{
@Autowired
PlanDAO
planDAO
;
@Override
public
PlanListPage
getPlanList
(
PlanListPage
planList
)
{
return
planDAO
.
getPlanList
(
planList
);
}
@Override
public
boolean
planExist
(
String
planFllName
,
String
planName
)
{
int
i
=
planDAO
.
planExist
(
planName
,
planFllName
);
if
(
i
>
0
){
return
true
;
}
return
false
;
}
@Override
public
void
addPlan
(
Plan
plan
)
{
planDAO
.
insert
(
PlanConvert
.
convert2DO
(
plan
));
}
@Override
public
void
updatePlan
(
Plan
plan
)
{
PlanDO
planDO
=
PlanConvert
.
convert2DO
(
plan
);
planDO
.
setGmtModified
(
new
Date
());
planDAO
.
updatePlanByNo
(
planDO
);
}
@Override
public
Plan
getPlanByNo
(
String
planNo
)
{
PlanDO
planDO
=
planDAO
.
getPlanByNo
(
planNo
);
return
PlanConvert
.
convert2Entity
(
planDO
);
}
@Override
public
void
deletePlan
(
String
planNo
){
PlanDO
planDO
=
planDAO
.
getPlanByNo
(
planNo
);
VarChecker
.
checkNotNull
(
planDO
,
"不存在的计划[{0}]"
,
planNo
);
VarChecker
.
checkArgument
((
PlanStatusEnum
.
PREPARING
.
getCode
()).
equals
(
planDO
.
getStatus
())||(
PlanStatusEnum
.
DRAFT
.
getCode
().
equals
(
planDO
.
getStatus
())),
"计划[{0}]状态为[{1}],不能删除"
,
planDO
.
getPlanName
(),
PlanStatusEnum
.
getByCode
(
planDO
.
getStatus
()).
getDesc
());
planDAO
.
deleteByPlanNo
(
planNo
);
}
}
app/common/model/src/main/java/com/abssqr/plat/common/model/repo/plan/impl/planAcctTitleRepoImpl.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
common
.
model
.
repo
.
plan
.
impl
;
import
com.abssqr.plat.common.dal.mysql.auto.dao.PlanAcctTitleDAO
;
import
com.abssqr.plat.common.facade.enums.TitleTypeEnum
;
import
com.abssqr.plat.common.facade.model.plan.PlanAcctTitle
;
import
com.abssqr.plat.common.model.convertor.PlanAcctTitleConvert
;
import
com.abssqr.plat.common.model.repo.plan.PlanAcctTitleRepo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
planAcctTitleRepoImpl
implements
PlanAcctTitleRepo
{
@Autowired
PlanAcctTitleDAO
planAcctTitleDAO
;
@Override
public
int
insert
(
PlanAcctTitle
entity
)
{
return
planAcctTitleDAO
.
insert
(
PlanAcctTitleConvert
.
convert2DO
(
entity
));
}
@Override
public
int
insertBatch
(
List
<
PlanAcctTitle
>
list
)
{
return
planAcctTitleDAO
.
insertBatch
(
PlanAcctTitleConvert
.
convert2DOs
(
list
));
}
@Override
public
int
updateAmt
(
PlanAcctTitle
entity
)
{
return
0
;
}
@Override
public
List
<
PlanAcctTitle
>
getByEntityNo
(
String
planNo
)
{
return
PlanAcctTitleConvert
.
convert2Entitys
(
planAcctTitleDAO
.
getByPlanNo
(
planNo
));
}
@Override
public
PlanAcctTitle
getByTitleNo
(
String
planNo
,
String
titleNo
)
{
return
null
;
}
@Override
public
List
<
PlanAcctTitle
>
getTitleNames
(
String
planNo
,
List
<
TitleTypeEnum
>
titleTypeEnums
)
{
return
null
;
}
@Override
public
List
<
PlanAcctTitle
>
getAcctFinFeeTitles
(
List
<
String
>
planNos
)
{
return
null
;
}
@Override
public
int
cleanByPlanNo
(
String
planNo
)
{
return
planAcctTitleDAO
.
deleteByPlanNo
(
planNo
);
}
}
app/core/service/src/main/java/com/abssqr/plat/core/service/plan/PlanAccTitleManager.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
core
.
service
.
plan
;
import
com.abssqr.plat.common.facade.enums.LayerTypeEnum
;
import
com.abssqr.plat.common.facade.enums.PlanStatusEnum
;
import
com.abssqr.plat.common.facade.enums.TitleTypeEnum
;
import
com.abssqr.plat.common.facade.model.plan.FeeStructure
;
import
com.abssqr.plat.common.facade.model.plan.InvestStructure
;
import
com.abssqr.plat.common.facade.model.plan.PlanAcctTitle
;
import
com.abssqr.plat.common.facade.model.plan.PlanBase
;
import
com.abssqr.plat.common.model.enums.IdTypeEnum
;
import
com.abssqr.plat.common.model.repo.plan.PlanAcctTitleRepo
;
import
com.abssqr.plat.common.model.seq.SequenceUtil
;
import
com.general.system.common.util.MessageUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 科目信息
*/
@Component
public
class
PlanAccTitleManager
{
@Autowired
PlanAcctTitleRepo
planAcctTitleRepo
;
/**
* 初始化科目信息
* @param investStructureList
* @param feeStructureList
*/
public
void
initAccTitles
(
PlanStatusEnum
planStatus
,
String
planNo
,
List
<
InvestStructure
>
investStructureList
,
List
<
FeeStructure
>
feeStructureList
){
List
<
PlanAcctTitle
>
planAcctTitleList
=
new
ArrayList
<>();
if
(
planStatus
==
PlanStatusEnum
.
PREPARING
){
planAcctTitleRepo
.
cleanByPlanNo
(
planNo
);
}
//根据投资结构生成科目
if
(
CollectionUtils
.
isNotEmpty
(
investStructureList
)){
for
(
InvestStructure
investStructure:
investStructureList
){
buildFromInvestStructure
(
planNo
,
planAcctTitleList
,
investStructure
);
}
}
//根据费用结构生成科目
if
(
CollectionUtils
.
isNotEmpty
(
feeStructureList
)){
for
(
FeeStructure
feeStructure:
feeStructureList
){
buildFromFeeStructure
(
planNo
,
planAcctTitleList
,
feeStructure
);
}
}
planAcctTitleRepo
.
insertBatch
(
planAcctTitleList
);
}
/**
* 根据投资结构生成科目
* @param planNo
* @param planAcctTitleList
* @param investStructure
*/
private
void
buildFromInvestStructure
(
String
planNo
,
List
<
PlanAcctTitle
>
planAcctTitleList
,
InvestStructure
investStructure
){
PlanAcctTitle
investAccTitle
=
this
.
buildBasicTitle
(
planNo
);
TitleTypeEnum
titleType
=
(
investStructure
.
getLayerType
()
==
LayerTypeEnum
.
PRIOR
)
?
TitleTypeEnum
.
PRIOR_INVESTED
:
TitleTypeEnum
.
SECND_INVESTED
;
investAccTitle
.
setTitleType
(
titleType
);
investAccTitle
.
setTitleName
(
MessageUtil
.
formatMsg
(
"{0}-{1}"
,
StringUtils
.
trim
(
investStructure
.
getLayerName
()),
TitleTypeEnum
.
INVESTED
.
getDesc
()));
investAccTitle
.
setRefNo
(
investStructure
.
getLayerNo
());
planAcctTitleList
.
add
(
investAccTitle
);
PlanAcctTitle
intrAccTitle
=
buildBasicTitle
(
planNo
);
intrAccTitle
.
setTitleName
(
MessageUtil
.
formatMsg
(
"{0}-{1}"
,
StringUtils
.
trim
(
investStructure
.
getLayerName
()),
TitleTypeEnum
.
INVEST_PROFIT
.
getDesc
()));
intrAccTitle
.
setTitleType
(
TitleTypeEnum
.
INVEST_PROFIT
);
intrAccTitle
.
setRefNo
(
investStructure
.
getLayerNo
());
planAcctTitleList
.
add
(
intrAccTitle
);
}
/**
* 根据费用结构生成科目
* @param planNo
* @param planAcctTitleList
* @param feeStructure
*/
private
void
buildFromFeeStructure
(
String
planNo
,
List
<
PlanAcctTitle
>
planAcctTitleList
,
FeeStructure
feeStructure
){
PlanAcctTitle
feeTitle
=
this
.
buildBasicTitle
(
planNo
);
feeTitle
.
setTitleName
(
feeStructure
.
getFeeName
());
feeTitle
.
setRefNo
(
feeStructure
.
getFeeNo
());
feeTitle
.
setTitleType
(
TitleTypeEnum
.
FEE
);
planAcctTitleList
.
add
(
feeTitle
);
}
public
PlanAcctTitle
buildBasicTitle
(
String
planNo
){
PlanAcctTitle
planAcctTitle
=
new
PlanAcctTitle
();
planAcctTitle
.
setPlanNo
(
planNo
);
planAcctTitle
.
setTitleNo
(
SequenceUtil
.
genId
(
IdTypeEnum
.
ACCT_TITLE_CODE
));
return
planAcctTitle
;
}
}
app/core/service/src/main/java/com/abssqr/plat/core/service/plan/PlanAllocManager.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
core
.
service
.
plan
;
import
com.abssqr.plat.common.facade.enums.*
;
import
com.abssqr.plat.common.facade.model.plan.*
;
import
com.abssqr.plat.common.model.enums.IdTypeEnum
;
import
com.abssqr.plat.common.model.repo.plan.PlanAcctTitleRepo
;
import
com.abssqr.plat.common.model.repo.plan.PlanAllocRepo
;
import
com.abssqr.plat.common.model.seq.SequenceUtil
;
import
com.general.system.common.util.DateTimeUtil
;
import
com.general.system.common.util.VarChecker
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* 生成对应的兑付计划
*/
@Component
public
class
PlanAllocManager
{
@Autowired
PlanAllocRepo
planAllocRepo
;
@Autowired
PlanAcctTitleRepo
planAcctTitleRepo
;
/**
* 初始化兑付计划
* @param plan
* @param status
*/
public
void
initPlanAlloc
(
Plan
plan
,
PlanStatusEnum
status
)
{
if
(
status
==
PlanStatusEnum
.
PREPARING
)
{
planAllocRepo
.
cleanByPlanNo
(
plan
.
getPlanNo
());
}
List
<
PlanAlloc
>
planAllocList
=
caclPlanAllocByDate
(
plan
);
//根据分配日进行排序
List
<
PlanAlloc
>
sortedPlanAlllocList
=
planAllocList
.
stream
()
.
sorted
(
Comparator
.
comparing
(
PlanAlloc:
:
getAllocDate
))
.
collect
(
Collectors
.
toList
());
Map
<
String
,
PlanAcctTitle
>
planAcctTitlerMap
=
getPlanAcctTitleMap
(
plan
.
getPlanNo
());
//根据投资结构生成兑付计划
calcInvestStructureAlloc
(
plan
.
getInvestStructure
(),
sortedPlanAlllocList
,
planAcctTitlerMap
);
//根据费用结构生成兑付计划
caclFeeStructureAlloc
(
plan
.
getFeeStructure
(),
sortedPlanAlllocList
,
planAcctTitlerMap
);
planAllocRepo
.
store
(
sortedPlanAlllocList
);
}
/**
* 根据首次计算日生成分配计划
*
* @param plan
* @return
*/
private
List
<
PlanAlloc
>
caclPlanAllocByDate
(
Plan
plan
)
{
List
<
PlanAlloc
>
result
=
new
ArrayList
<>(
5
);
//首次兑付日
Date
firstAllocDate
=
plan
.
getFirstAllocDate
();
//首次计算日
Date
firstCalcDate
=
plan
.
getFirstCalcDate
();
//首次转付日
Date
firstPayDate
=
plan
.
getFirstPayDate
();
//首次报告日
Date
firstReportDate
=
plan
.
getFirstReportDate
();
//首次结息日
Date
firstSettleDate
=
plan
.
getFirstSettleDate
();
Date
planEndDate
=
plan
.
getEndDate
();
//下次计算日
Date
nextCaclDate
=
(
Date
)
firstCalcDate
.
clone
();
//下次兑付日
Date
nextAllocDate
=
(
Date
)
firstAllocDate
.
clone
();
//下次转付日
Date
nextPayDate
=
(
Date
)
firstPayDate
.
clone
();
//下次报告日
Date
nextReportDate
=
(
Date
)
firstReportDate
.
clone
();
//下次结息日
Date
nextSettleDate
=
(
Date
)
firstSettleDate
.
clone
();
int
interval
=
plan
.
getPayFreq
().
getCnt
();
//兑付日小于产品到期日
while
(
DateTimeUtil
.
isBeforeOnDate
(
DateTimeUtil
.
addMonths
(
nextAllocDate
,
interval
),
planEndDate
)){
PlanAlloc
planAlloc
=
buildBasicPlanAlloc
(
plan
.
getPlanNo
());
nextCaclDate
=
DateTimeUtil
.
addMonths
(
nextCaclDate
,
interval
);
planAlloc
.
setCalcDate
(
nextCaclDate
);
nextAllocDate
=
DateTimeUtil
.
addMonths
(
nextAllocDate
,
interval
);
planAlloc
.
setAllocDate
(
nextAllocDate
);
nextPayDate
=
DateTimeUtil
.
addMonths
(
nextPayDate
,
interval
);
planAlloc
.
setPayDate
(
nextPayDate
);
nextSettleDate
=
DateTimeUtil
.
addMonths
(
nextSettleDate
,
interval
);
planAlloc
.
setSettleDate
(
nextSettleDate
);
nextReportDate
=
DateTimeUtil
.
addMonths
(
nextReportDate
,
interval
);
planAlloc
.
setReportDate
(
nextReportDate
);
result
.
add
(
planAlloc
);
}
PlanAlloc
planAlloc
=
buildBasicPlanAlloc
(
plan
.
getPlanNo
());
nextCaclDate
=
DateTimeUtil
.
addMonths
(
nextCaclDate
,
interval
);
planAlloc
.
setCalcDate
(
nextCaclDate
);
nextAllocDate
=
DateTimeUtil
.
addMonths
(
nextAllocDate
,
interval
);
planAlloc
.
setAllocDate
(
nextAllocDate
);
nextPayDate
=
DateTimeUtil
.
addMonths
(
nextPayDate
,
interval
);
planAlloc
.
setPayDate
(
nextPayDate
);
nextSettleDate
=
DateTimeUtil
.
addMonths
(
nextSettleDate
,
interval
);
planAlloc
.
setSettleDate
(
nextSettleDate
);
nextReportDate
=
DateTimeUtil
.
addMonths
(
nextReportDate
,
interval
);
planAlloc
.
setReportDate
(
nextReportDate
);
result
.
add
(
planAlloc
);
return
result
;
}
/**
* 根据投资结构生成对应的本金兑付事项和利息兑付事项
*
* @param investStructureList
* @param allocList
*/
private
void
calcInvestStructureAlloc
(
List
<
InvestStructure
>
investStructureList
,
List
<
PlanAlloc
>
allocList
,
Map
<
String
,
PlanAcctTitle
>
acctTitleMap
)
{
for
(
InvestStructure
investStructure
:
investStructureList
)
{
AllocMethodEnum
allocMethod
=
investStructure
.
getAllocMethod
();
Date
effectDate
=
investStructure
.
getEffectDate
();
Date
endDate
=
investStructure
.
getEndDate
();
for
(
PlanAlloc
planAlloc
:
allocList
)
{
//判断分配日是否大于投资结构起息日
if
(
DateTimeUtil
.
between
(
planAlloc
.
getAllocDate
(),
effectDate
,
endDate
,
DateTimeUtil
.
BetweenType
.
se
))
{
//如果是过手型生成还本科目
if
(
allocMethod
==
AllocMethodEnum
.
PT
)
{
TitleTypeEnum
titleType
=
investStructure
.
getLayerType
()==
LayerTypeEnum
.
PRIOR
?
TitleTypeEnum
.
PRIOR_INVESTED
:
TitleTypeEnum
.
SECND_INVESTED
;
//生成本金科目
appendPlanAllocItem
(
planAlloc
,
investStructure
.
getLayerNo
(),
titleType
,
acctTitleMap
);
}
}
/**
* 如果是先息后本型 则在计划结束日前一期的分配日
*/
if
(
DateTimeUtil
.
isBeforeOnDate
(
endDate
,
planAlloc
.
getAllocDate
())){
if
(
allocMethod
==
AllocMethodEnum
.
IBC
){
TitleTypeEnum
titleType
=
investStructure
.
getLayerType
()==
LayerTypeEnum
.
PRIOR
?
TitleTypeEnum
.
PRIOR_INVESTED
:
TitleTypeEnum
.
SECND_INVESTED
;
//生成本金科目
appendPlanAllocItem
(
planAlloc
,
investStructure
.
getLayerNo
(),
titleType
,
acctTitleMap
);
break
;
}
}
//生成对应的利息兑付事项
if
(
DateTimeUtil
.
between
(
planAlloc
.
getAllocDate
(),
effectDate
,
endDate
,
DateTimeUtil
.
BetweenType
.
se
)){
appendPlanAllocItem
(
planAlloc
,
investStructure
.
getLayerNo
(),
TitleTypeEnum
.
INVEST_PROFIT
,
acctTitleMap
);
}
}
}
}
/**
* 根据费用结构生成兑付计划
* @param feeStructureList
* @param allocList
* @param acctTitleMap
*/
private
void
caclFeeStructureAlloc
(
List
<
FeeStructure
>
feeStructureList
,
List
<
PlanAlloc
>
allocList
,
Map
<
String
,
PlanAcctTitle
>
acctTitleMap
){
for
(
FeeStructure
feeStructure:
feeStructureList
){
FeeTimeTypeEnum
feeCalcType
=
feeStructure
.
getFeeTimeType
();
switch
(
feeCalcType
){
//项目到期日
case
PEDD:
{
//获取最后一期的兑付计划
PlanAlloc
planAlloc
=
allocList
.
get
(
allocList
.
size
()
-
1
);
appendPlanAllocItem
(
planAlloc
,
feeStructure
.
getFeeNo
(),
TitleTypeEnum
.
FEE
,
acctTitleMap
);
break
;
}
//首次兑付日(首次分配日)
case
PFCD:
{
//获取第一期的兑付计划
PlanAlloc
planAlloc
=
allocList
.
get
(
0
);
appendPlanAllocItem
(
planAlloc
,
feeStructure
.
getFeeNo
(),
TitleTypeEnum
.
FEE
,
acctTitleMap
);
break
;
}
//按期分配
case
TERM:
{
allocList
.
forEach
(
planAlloc
->
{
appendPlanAllocItem
(
planAlloc
,
feeStructure
.
getFeeNo
(),
TitleTypeEnum
.
FEE
,
acctTitleMap
);
});
break
;
}
}
}
}
private
void
appendPlanAllocItem
(
PlanAlloc
planAlloc
,
String
refNo
,
TitleTypeEnum
titleType
,
Map
<
String
,
PlanAcctTitle
>
planAcctTitleMap
){
PlanAllocItem
planAllocItem
=
buildPlanAllocItem
(
planAlloc
.
getPlanNo
(),
planAlloc
.
getAllocNo
(),
refNo
,
titleType
,
planAcctTitleMap
);
planAlloc
.
getPlanAllocItems
().
add
(
planAllocItem
);
}
private
Map
<
String
,
PlanAcctTitle
>
getPlanAcctTitleMap
(
String
planNo
)
{
List
<
PlanAcctTitle
>
planAcctTitles
=
planAcctTitleRepo
.
getByEntityNo
(
planNo
);
VarChecker
.
checkNotNull
(
planAcctTitles
,
"计划[{0}]不存在对应的科目信息"
,
planNo
);
Map
<
String
,
PlanAcctTitle
>
planAcctTitleMap
=
planAcctTitles
.
stream
().
collect
(
Collectors
.
toMap
((
planAcctTitle
)
->
{
return
planAcctTitle
.
getRefNo
()
+
planAcctTitle
.
getTitleType
().
getCode
();
},
(
planAcctTitle
)
->
{
return
planAcctTitle
;
}));
return
planAcctTitleMap
;
}
private
PlanAlloc
buildBasicPlanAlloc
(
String
planNo
)
{
PlanAlloc
planAlloc
=
new
PlanAlloc
();
planAlloc
.
setPlanNo
(
planNo
);
planAlloc
.
setAllocNo
(
SequenceUtil
.
genId
(
IdTypeEnum
.
ALLOCPRG
));
return
planAlloc
;
}
private
PlanAllocItem
buildPlanAllocItem
(
String
planNo
,
String
allocNo
,
String
refNo
,
TitleTypeEnum
titleType
,
Map
<
String
,
PlanAcctTitle
>
planAcctTitleMap
)
{
AllocTypeEmun
allocType
=
titleType
.
getAllocType
();
PlanAcctTitle
planAcctTitle
=
planAcctTitleMap
.
get
(
refNo
+
titleType
.
getCode
());
VarChecker
.
checkNotNull
(
planAcctTitle
,
"[{0}]-[{2}]-[{1}]没有找到对应科目"
,
planNo
,
refNo
,
titleType
.
getCode
());
PlanAllocItem
planAllocItem
=
new
PlanAllocItem
();
planAllocItem
.
setPlanNo
(
planNo
);
planAllocItem
.
setItemNo
(
SequenceUtil
.
genId
(
IdTypeEnum
.
ALLOCITEM
));
planAllocItem
.
setAllocNo
(
allocNo
);
planAllocItem
.
setSort
(
allocType
.
getSort
());
planAllocItem
.
setAllocType
(
allocType
);
planAllocItem
.
setTitleName
(
planAcctTitle
.
getTitleName
());
planAllocItem
.
setTitleNo
(
planAcctTitle
.
getTitleNo
());
return
planAllocItem
;
}
}
app/core/service/src/main/java/com/abssqr/plat/core/service/plan/PlanMananger.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
core
.
service
.
plan
;
import
com.abssqr.plat.common.dal.mysql.auto.paging.PlanListPage
;
import
com.abssqr.plat.common.facade.enums.PlanStatusEnum
;
import
com.abssqr.plat.common.facade.model.plan.*
;
import
com.abssqr.plat.common.facade.param.plan.PlanEditOprParam
;
import
com.abssqr.plat.common.facade.param.plan.sub.InvestStructureParam
;
import
com.abssqr.plat.common.facade.result.BasePage
;
import
com.abssqr.plat.common.facade.result.plan.PlanVO
;
import
com.abssqr.plat.common.model.convertor.web.PlanWebConvert
;
import
com.abssqr.plat.common.model.enums.IdTypeEnum
;
import
com.abssqr.plat.common.model.repo.plan.PlanAcctTitleRepo
;
import
com.abssqr.plat.common.model.repo.plan.PlanFeeStructureRepo
;
import
com.abssqr.plat.common.model.repo.plan.PlanInvestStructureRepo
;
import
com.abssqr.plat.common.model.repo.plan.PlanRepo
;
import
com.abssqr.plat.common.model.seq.SequenceUtil
;
import
com.abssqr.plat.core.service.accounting.OrgAcctDayComponent
;
import
com.general.system.common.util.DateTimeUtil
;
import
com.general.system.common.util.VarChecker
;
import
com.general.system.facade.current.IdentityUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.aspectj.weaver.ast.Var
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Date
;
import
java.util.List
;
/**
* 计划管理
*/
@Component
public
class
PlanMananger
{
@Autowired
PlanRepo
planRepo
;
@Autowired
PlanInvestStructureRepo
investStructureRepo
;
@Autowired
PlanFeeStructureRepo
feeStructureRepo
;
@Autowired
PlanAcctTitleRepo
planAcctTitleRepo
;
@Autowired
PlanAccTitleManager
planAccTitleManager
;
@Autowired
PlanAllocManager
planAllocManager
;
@Autowired
OrgAcctDayComponent
orgAcctDayComponent
;
public
String
addOrUpdatePlan
(
PlanEditOprParam
planEditOprParam
,
String
userCode
){
Plan
plan
=
PlanWebConvert
.
convertPlanParam
(
planEditOprParam
);
List
<
InvestStructure
>
investStructureList
=
plan
.
getInvestStructure
();
List
<
FeeStructure
>
feeStructureList
=
plan
.
getFeeStructure
();
//校验参数
checkParam
(
planEditOprParam
);
PlanBase
existPlan
=
null
;
if
(
planEditOprParam
.
getPlanNo
()!=
null
){
existPlan
=
planRepo
.
getPlanByNo
(
planEditOprParam
.
getPlanNo
());
VarChecker
.
checkArgument
(
existPlan
.
getStatus
()==
PlanStatusEnum
.
DRAFT
,
"产品[{0}]不存在"
,
existPlan
.
getPlanFullName
());
}
else
{
plan
.
setPlanNo
(
SequenceUtil
.
genId
(
IdTypeEnum
.
ABS_PLAN
));
plan
.
setGmtCreator
(
IdentityUtil
.
getUserOrgCode
());
plan
.
setGmtModifier
(
IdentityUtil
.
getUserCode
());
}
//如果是暂存
if
(
planEditOprParam
.
isDraft
()){
//判断计划是否存在
if
(
existPlan
!=
null
){
VarChecker
.
checkArgument
(
existPlan
.
getStatus
()==
PlanStatusEnum
.
DRAFT
,
"产品[{0}]状态不为暂存不能暂存"
,
existPlan
.
getPlanFullName
());
}
//如果是新增则生成产品编号,且将产品状态置为暂存
if
(
planEditOprParam
.
getPlanNo
()==
null
){
plan
.
setStatus
(
PlanStatusEnum
.
DRAFT
);
}
}
else
{
plan
.
setStatus
(
PlanStatusEnum
.
PREPARING
);
//初始化科目信息
planAccTitleManager
.
initAccTitles
(
PlanStatusEnum
.
PREPARING
,
plan
.
getPlanNo
(),
plan
.
getInvestStructure
(),
plan
.
getFeeStructure
());
//初始化分配计划
planAllocManager
.
initPlanAlloc
(
plan
,
PlanStatusEnum
.
PREPARING
);
}
//更新/新增产品,投资结构,费用结构
if
(
planEditOprParam
.
getPlanNo
()==
null
){
planRepo
.
addPlan
(
plan
);
}
else
{
plan
.
setGmtModifier
(
IdentityUtil
.
getUserOrgCode
());
planRepo
.
updatePlan
(
plan
);
investStructureRepo
.
cleanByPlanNo
(
plan
.
getPlanNo
());
feeStructureRepo
.
cleanByPlanNo
(
plan
.
getPlanNo
());
}
investStructureRepo
.
add
(
plan
.
getPlanNo
(),
investStructureList
);
feeStructureRepo
.
add
(
plan
.
getPlanNo
(),
feeStructureList
);
return
plan
.
getPlanNo
();
}
/**
* 判断参数:
* 判断条件:
* 1,产品到期日>首次结息日,首次分配日,首次转付日,首次报告日>首次计算日
* 2,首次分配日>首次结息日
* 3, 投资机构和起息日>当前日期,且计划到期日<项目到期日,投资结构起息日<投资结构到期日
*
* @param param
*/
private
void
checkParam
(
PlanEditOprParam
param
){
//判断产品简称/全称是否存在
VarChecker
.
checkArgument
(!
planRepo
.
planExist
(
param
.
getPlanFullName
(),
param
.
getPlanName
()),
"存在该[{0}]产品全称[{1}]产品简称"
,
param
.
getPlanFullName
(),
param
.
getPlanName
());
Date
sysDate
=
orgAcctDayComponent
.
getTrfAcctDay
().
getStandardDate
();
Date
endDate
=
param
.
getEndDate
();
Date
firstAllocDate
=
param
.
getFirstAllocDate
();
Date
firstCalcDate
=
param
.
getFirstCalcDate
();
Date
firstPayDate
=
param
.
getFirstPayDate
();
Date
firstReportDate
=
param
.
getFirstReportDate
();
Date
firstSettleDate
=
param
.
getFirstSettleDate
();
VarChecker
.
checkArgument
(
DateTimeUtil
.
between
(
firstAllocDate
,
firstCalcDate
,
endDate
,
DateTimeUtil
.
BetweenType
.
s
),
"首次首次分配日应小于到期日 大于计算日"
);
VarChecker
.
checkArgument
(
DateTimeUtil
.
between
(
firstSettleDate
,
firstCalcDate
,
endDate
,
DateTimeUtil
.
BetweenType
.
s
),
"首次结息日应小于到期日 大于计算日"
);
VarChecker
.
checkArgument
(
DateTimeUtil
.
between
(
firstPayDate
,
firstCalcDate
,
endDate
,
DateTimeUtil
.
BetweenType
.
s
),
"首次转付日应小于到期日 大于计算日"
);
VarChecker
.
checkArgument
(
DateTimeUtil
.
between
(
firstReportDate
,
firstCalcDate
,
endDate
,
DateTimeUtil
.
BetweenType
.
s
),
"首次报告日应小于到期日 大于计算日"
);
VarChecker
.
checkArgument
(
DateTimeUtil
.
between
(
firstAllocDate
,
firstSettleDate
,
endDate
,
DateTimeUtil
.
BetweenType
.
s
),
"首次分配日应大于首次结息日"
);
List
<
InvestStructureParam
>
investStructureParamList
=
param
.
getInvestStructureParam
();
//遍历所有的投资结构判断其起息日和到期日
if
(
CollectionUtils
.
isNotEmpty
(
investStructureParamList
)){
for
(
InvestStructureParam
investStructure:
investStructureParamList
){
//起息日大于当前日期
VarChecker
.
checkArgument
(
DateTimeUtil
.
isBeforeOnDate
(
sysDate
,
investStructure
.
getEffectDate
()),
"投资结构[{0}]起息日[{1}]不能小于系统日期[{2}]"
,
investStructure
.
getLayerName
(),
investStructure
.
getEffectDate
(),
sysDate
);
//投资结构结束日大于计划结束日
VarChecker
.
checkArgument
(
DateTimeUtil
.
isBeforeOnDate
(
investStructure
.
getEndDate
(),
param
.
getEndDate
()),
"投资结构[{0}]到期日[{1}]应小于计划到期日[{2}]"
,
investStructure
.
getLayerName
(),
investStructure
.
getEndDate
(),
param
.
getEndDate
());
VarChecker
.
checkArgument
(
DateTimeUtil
.
isBeforeOnDate
(
investStructure
.
getEffectDate
(),
investStructure
.
getEndDate
()),
"投资结构[{0}]起息日[{1}]应小于到期日[{2}]"
,
investStructure
.
getLayerName
(),
investStructure
.
getEffectDate
(),
investStructure
.
getEndDate
());
}
}
}
public
Plan
getPlan
(
String
planNo
){
Plan
plan
=
planRepo
.
getPlanByNo
(
planNo
);
List
<
InvestStructure
>
investStructures
=
investStructureRepo
.
selectByPlanNo
(
planNo
);
if
(
CollectionUtils
.
isNotEmpty
(
investStructures
)){
plan
.
getInvestStructure
().
addAll
(
investStructures
);
}
List
<
FeeStructure
>
feeStructures
=
feeStructureRepo
.
selectByPlanNo
(
planNo
);
if
(
CollectionUtils
.
isNotEmpty
(
feeStructures
)){
plan
.
getFeeStructure
().
addAll
(
feeStructures
);
}
return
plan
;
}
}
app/test/src/test/java/com/abssqr/plat/test/BaseAutoWithOutMockTests.java
View file @
fd6456af
...
...
@@ -33,7 +33,7 @@ import org.testng.annotations.BeforeMethod;
*/
@SpringBootTest
(
classes
=
TestWebApplication
.
class
)
@ActiveProfiles
(
"
fun_test
"
)
@ActiveProfiles
(
"
dev
"
)
@MapperScan
({
"com.abssqr.plat.common.dal.mysql.auto.mapper"
,
"com.abssqr.plat.common.dal.sync.auto.mapper"
})
@ComponentScan
(
basePackages
=
{
"com.loan"
})
@TestPropertySource
(
properties
=
{
"sync.quartz.open=false"
,
"dispatcher.canRun=false"
})
...
...
app/test/src/test/java/com/abssqr/plat/test/GsonTest.java
deleted
100644 → 0
View file @
3056ac0e
/**
* abssqr.com Inc.
* Copyright (c) 2017-2019 All Rights Reserved.
*/
package
com
.
abssqr
.
plat
.
test
;
import
com.general.system.common.model.Money
;
import
com.general.system.common.util.MoneyUtil
;
import
org.testng.annotations.Test
;
/**
* @author bangis.wangdf
* @version com.abssqr.plat.test: GsonTest.java, v 0.1 2019-07-26 10:48 bangis.wangdf Exp $
*/
public
class
GsonTest
{
String
plan
=
"{\"planName\":\"plan_org_8897371\",\"planNo\":\"plan_org_8897371\",\"totalAmt\":100,"
+
"\"beginDate\":\"2019-07-01\",\"endDate\":\"2021-07-31\",\"fundType\":\"PRIVATE\","
+
"\"sponsorOrgCode\":\"F51\",\"planMgrOrgCode\":\"WK001\",\"effectDate\":\"2019-07-01\","
+
"\"firstClearDate\":\"2019-07-22\",\"firstPayDate\":\"2019-07-25\",\"payFreq\":\"M\","
+
"\"calcIntrType\":\"ACT_360\",\"vatRate\":3,\"accounts\":[{\"actAttr\":\"NORMAL\",\"channelNo\":\"007\","
+
"\"actNo\":\"755915676910701\",\"actName\":\"企业网银新20161058\",\"actProv\":\"广东\",\"actCity\":\"深圳\","
+
"\"actBank\":\"招商银行深圳分行\"},{\"actAttr\":\"HOSTED\",\"channelNo\":\"007\",\"actNo\":\"755915676910806\","
+
"\"actName\":\"企业网银新20161058\",\"actProv\":\"广东\",\"actCity\":\"深圳\",\"actBank\":\"招商银行深圳分行\"}],"
+
"\"transferRule\":{\"screeningRules\":[\"SND2019072610332000201715\"],\"trCycle\":\"D\","
+
"\"startTrDate\":\"2019-07-02\",\"stopTrDate\":\"2019-12-31\",\"resAmt\":30},"
+
"\"investStructureList\":[{\"key\":\"NEW_TEMP_ID_0\",\"layerType\":\"LT01\",\"layerName\":\"t01\","
+
"\"layerAmt\":60,\"layerIntr\":7,\"layerEndDate\":\"2020-07-31\",\"editable\":false},"
+
"{\"key\":\"NEW_TEMP_ID_1\",\"layerType\":\"LT01\",\"layerName\":\"t02\",\"layerAmt\":30,\"layerIntr\":6,"
+
"\"layerEndDate\":\"2019-10-31\",\"editable\":false},{\"key\":\"NEW_TEMP_ID_2\",\"layerType\":\"LT02\","
+
"\"layerName\":\"t03\",\"layerAmt\":10,\"layerIntr\":0,\"layerEndDate\":\"2020-07-31\",\"editable\":false},"
+
"{\"key\":\"NEW_TEMP_ID_3\",\"layerType\":\"\",\"layerName\":\"\",\"layerAmt\":\"\",\"layerIntr\":\"\","
+
"\"layerEndDate\":\"\",\"editable\":true,\"isNew\":true}],"
+
"\"feeStructureList\":[{\"key\":\"NEW_RECORD_ID0\",\"feeName\":\"按期fee一\",\"feeTimeType\":\"TERM\","
+
"\"feeCalcType\":\"FCT003\",\"feeScaleType\":\"PRISTART\",\"feeRate\":2,\"payLimitAmt\":40},"
+
"{\"key\":\"NEW_RECORD_ID1\",\"feeName\":\"按期fee二\",\"feeTimeType\":\"TERM\",\"feeCalcType\":\"FCT002\","
+
"\"feeScaleType\":\"PRIREMAIN\",\"feeRate\":3,\"payLimitAmt\":40},{\"key\":\"NEW_RECORD_ID2\","
+
"\"feeName\":\"固fee\",\"feeTimeType\":\"PFCD\",\"feeCalcType\":\"FCT001\",\"fixedFeeAmt\":3}],"
+
"\"isAdd\":true}"
;
@Test
public
void
testPlan
()
{
Money
a
=
new
Money
(
100
);
Money
b
=
new
Money
(
99
);
Money
prinDiff
=
a
.
subtract
(
b
);
System
.
out
.
println
(
prinDiff
);
prinDiff
=
b
.
subtract
(
a
);
System
.
out
.
println
(
prinDiff
);
Money
totalPay
=
new
Money
(
0.5
);
Money
prinAmt
=
MoneyUtil
.
min
(
prinDiff
,
totalPay
);
System
.
out
.
println
(
prinAmt
);
}
}
app/test/src/test/java/com/abssqr/plat/test/unittest/plan/PlanEditUnitTest.java
0 → 100644
View file @
fd6456af
/**
* abssqr.com Inc.
* Copyright (c) 2017-2020 All Rights Reserved.
*/
package
com
.
abssqr
.
plat
.
test
.
unittest
.
plan
;
import
com.abssqr.plat.common.facade.enums.PlanStatusEnum
;
import
com.abssqr.plat.common.facade.model.plan.InvestStructure
;
import
com.abssqr.plat.common.facade.model.plan.Plan
;
import
com.abssqr.plat.common.facade.param.ast.AstPackOprParam
;
import
com.abssqr.plat.common.facade.param.ast.AstPackQryParam
;
import
com.abssqr.plat.common.facade.param.plan.PlanEditOprParam
;
import
com.abssqr.plat.common.facade.result.pack.AstPackVO
;
import
com.abssqr.plat.common.facade.service.ast.AstPackService
;
import
com.abssqr.plat.common.facade.service.plan.PlanService
;
import
com.abssqr.plat.common.model.repo.plan.*
;
import
com.abssqr.plat.core.service.plan.PlanMananger
;
import
com.abssqr.plat.test.BaseAutoTests
;
import
com.abssqr.test.annotation.XTest
;
import
com.abssqr.test.icase.ICase
;
import
com.alibaba.fastjson.JSON
;
import
com.general.system.common.util.VarChecker
;
import
com.general.system.core.common.constant.factory.ConstantFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.testng.annotations.Test
;
/**
* 计划编辑测试
*/
public
class
PlanEditUnitTest
extends
BaseAutoTests
{
@Autowired
private
PlanService
planService
;
@Autowired
private
PlanMananger
planMananger
;
@XTest
(
relatePath
=
"unittest/plan/edit"
)
@Test
(
dataProvider
=
"YamlDataProvider"
,
description
=
"产品新增和编辑"
)
public
void
edit
(
ICase
iCase
,
PlanEditOprParam
planEditOprParam
)
{
ConstantFactory
.
me
().
securityLogin
(
"administrator"
);
String
planNo
=
planService
.
edit
(
planEditOprParam
);
Plan
plan
=
planMananger
.
getPlan
(
planNo
);
//如果是暂存
if
(
planEditOprParam
.
isDraft
()){
PlanStatusEnum
status
=
plan
.
getStatus
();
}
//planEditOprParam
}
}
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0001/ABS_PLAN.csv
0 → 100644
View file @
fd6456af
PLAN_NAME,PLAN_FULL_NAME,TOTAL_AMT,END_DATE,FIRST_CALC_DATE,FIRST_PAY_DATE,FIRST_SETTLE_DATE,FIRST_ALLOC_DATE,FIRST_REPORT_DATE,CALC_INTR_TYPE,TRADE_PLACE,STATUS,GMT_CREATOR,PAY_FREQ,GMT_MODIFIER
测试产品,产品全称,100,10-10月-22,01-10月-20,01-10月-20,01-10月-20,01-10月-20,01-10月-20,ACT_360,测试交易场所,DRAFT,org,M,org
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0001/ABS_PLAN_FEE_STRUCTURE.csv
0 → 100644
View file @
fd6456af
FEE_TIME_TYPE,FEE_CALC_TYPE,FIXED_FEE_AMT,FEE_SCALE_TYPE,FEE_RATE,PAY_LIMIT_AMT,SORT,FEE_NAME
TERM,FCT001,100,START,1,100,0,测试费用
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0001/ABS_PLAN_INVEST_STRUCTURE.csv
0 → 100644
View file @
fd6456af
LAYER_TYPE,LAYER_NAME,LAYER_AMT,LAYER_INTR,INTR_TYPE,ALLOC_METHOD,GRADE,EFFECT_DATE,EXPECT_END_DATE,END_DATE,SORT
LT01,层级一,100,1,FLOATING,IBC,100,01-10月-20,01-10月-20,01-10月-22,0
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN.csv
0 → 100644
View file @
fd6456af
PLAN_NAME,PLAN_FULL_NAME,TOTAL_AMT,END_DATE,FIRST_CALC_DATE,FIRST_PAY_DATE,FIRST_SETTLE_DATE,FIRST_ALLOC_DATE,FIRST_REPORT_DATE,CALC_INTR_TYPE,TRADE_PLACE,STATUS,GMT_CREATOR,PAY_FREQ,GMT_MODIFIER
测试产品,产品全称,100,10-10月-22,01-10月-20,01-10月-20,01-10月-20,01-10月-20,01-10月-20,ACT_360,测试交易场所,DRAFT,org,M,org
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN_ACCT_TITLE.csv
0 → 100644
View file @
fd6456af
TITLE_NAME,TITLE_TYPE
层级一-投入资本,TT001
层级一-投资人收益,TT005
测试费用,TT004
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN_ALLOC.csv
0 → 100644
View file @
fd6456af
CALC_DATE,PAY_DATE,SETTLE_DATE,ALLOC_DATE,REPORT_DATE
01-11月-20,01-11月-20,01-11月-20,01-11月-20,01-11月-20
01-12月-20,01-12月-20,01-12月-20,01-12月-20,01-12月-20
01-1月 -21,01-1月 -21,01-1月 -21,01-1月 -21,01-1月 -21
01-2月 -21,01-2月 -21,01-2月 -21,01-2月 -21,01-2月 -21
01-3月 -21,01-3月 -21,01-3月 -21,01-3月 -21,01-3月 -21
01-4月 -21,01-4月 -21,01-4月 -21,01-4月 -21,01-4月 -21
01-5月 -21,01-5月 -21,01-5月 -21,01-5月 -21,01-5月 -21
01-6月 -21,01-6月 -21,01-6月 -21,01-6月 -21,01-6月 -21
01-7月 -21,01-7月 -21,01-7月 -21,01-7月 -21,01-7月 -21
01-8月 -21,01-8月 -21,01-8月 -21,01-8月 -21,01-8月 -21
01-9月 -21,01-9月 -21,01-9月 -21,01-9月 -21,01-9月 -21
01-10月-21,01-10月-21,01-10月-21,01-10月-21,01-10月-21
01-11月-21,01-11月-21,01-11月-21,01-11月-21,01-11月-21
01-12月-21,01-12月-21,01-12月-21,01-12月-21,01-12月-21
01-1月 -22,01-1月 -22,01-1月 -22,01-1月 -22,01-1月 -22
01-2月 -22,01-2月 -22,01-2月 -22,01-2月 -22,01-2月 -22
01-3月 -22,01-3月 -22,01-3月 -22,01-3月 -22,01-3月 -22
01-4月 -22,01-4月 -22,01-4月 -22,01-4月 -22,01-4月 -22
01-5月 -22,01-5月 -22,01-5月 -22,01-5月 -22,01-5月 -22
01-6月 -22,01-6月 -22,01-6月 -22,01-6月 -22,01-6月 -22
01-7月 -22,01-7月 -22,01-7月 -22,01-7月 -22,01-7月 -22
01-8月 -22,01-8月 -22,01-8月 -22,01-8月 -22,01-8月 -22
01-9月 -22,01-9月 -22,01-9月 -22,01-9月 -22,01-9月 -22
01-10月-22,01-10月-22,01-10月-22,01-10月-22,01-10月-22
01-11月-22,01-11月-22,01-11月-22,01-11月-22,01-11月-22
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN_FEE_STRUCTURE.csv
0 → 100644
View file @
fd6456af
FEE_TIME_TYPE,FEE_CALC_TYPE,FIXED_FEE_AMT,FEE_SCALE_TYPE,FEE_RATE,PAY_LIMIT_AMT,SORT,FEE_NAME
TERM,FCT001,100,START,1,100,0,测试费用
app/test/src/test/resources/testdata/unittest/plan/edit/checkCsv/plan_add_case0002/ABS_PLAN_INVEST_STRUCTURE.csv
0 → 100644
View file @
fd6456af
LAYER_TYPE,LAYER_NAME,LAYER_AMT,LAYER_INTR,INTR_TYPE,ALLOC_METHOD,GRADE,EFFECT_DATE,EXPECT_END_DATE,END_DATE,SORT
LT01,层级一,100,1,FLOATING,IBC,100,01-10月-20,01-10月-20,01-10月-22,0
app/test/src/test/resources/testdata/unittest/plan/edit/plan_add_case0001.yaml
0 → 100644
View file @
fd6456af
---
!!com.abssqr.test.icase.Case
id
:
plan_add_case0001
desc
:
产品新增测试(暂存)
context
:
clearDBContext
:
-
ABS_PLAN
:
PLAN_NAME
:
测试产品
-
ABS_PLAN_INVEST_STRUCTURE
:
-
ABS_PLAN_FEE_STRUCTURE
:
initDBContext
:
checkDBContext
:
-
ABS_PLAN
:
PLAN_NAME[C]
:
测试产品
STATUS
:
draft
checkDBCsv
:
-
tableName
:
ABS_PLAN
where
:
PLAN_NAME
:
19081900075546250201
csv
:
checkCsv/plan_add_case0001/ABS_PLAN.csv
-
tableName
:
ABS_PLAN_INVEST_STRUCTURE
csv
:
checkCsv/plan_add_case0001/ABS_PLAN_INVEST_STRUCTURE.csv
-
tableName
:
ABS_PLAN_FEE_STRUCTURE
csv
:
checkCsv/plan_add_case0001/ABS_PLAN_FEE_STRUCTURE.csv
###
---
!!com.abssqr.plat.common.facade.param.plan.PlanEditOprParam
beginDate
:
null
bizNo
:
null
calcIntrType
:
ACT_360
draft
:
true
endDate
:
2022-10-09T16:00:00Z
feeStructureParam
:
-
feeCalcType
:
FCT001
feeName
:
测试费用
feeRate
:
'
1'
feeScaleType
:
START
feeTimeType
:
TERM
fixedFeeAmt
:
100
payLimitAmt
:
100
sort
:
0
firstAllocDate
:
2020-09-30T16:00:00Z
firstCalcDate
:
2020-09-30T16:00:00Z
firstPayDate
:
2020-09-30T16:00:00Z
firstReportDate
:
2020-09-30T16:00:00Z
firstSettleDate
:
2020-09-30T16:00:00Z
investStructureParam
:
-
allocMethod
:
IBC
effectDate
:
2020-09-30T16:00:00Z
endDate
:
2022-09-30T16:00:00Z
expectEndDate
:
2020-09-30T16:00:00Z
grade
:
'
100'
intrType
:
FLOATING
layerAmt
:
100
layerIntr
:
'
1'
layerName
:
层级一
layerType
:
LT01
sort
:
0
payFreq
:
M
planFullName
:
产品全称
planName
:
测试产品
planNo
:
null
totalAmt
:
100
tradePlace
:
测试交易场所
transTime
:
null
app/test/src/test/resources/testdata/unittest/plan/edit/plan_add_case0002.yaml
0 → 100644
View file @
fd6456af
---
!!com.abssqr.test.icase.Case
id
:
plan_add_case0002
desc
:
产品新增测试(新增)
context
:
clearDBContext
:
-
ABS_PLAN
:
PLAN_NAME
:
测试产品
-
ABS_PLAN_INVEST_STRUCTURE
:
-
ABS_PLAN_FEE_STRUCTURE
:
-
ABS_PLAN_ACCT_TITLE
:
-
ABS_PLAN_ALLOC
:
-
ABS_PLAN_ALLOC_ITEM
:
initDBContext
:
checkDBContext
:
-
ABS_PLAN
:
PLAN_NAME[C]
:
测试产品
STATUS
:
draft
checkDBCsv
:
-
tableName
:
ABS_PLAN
csv
:
checkCsv/plan_add_case0002/ABS_PLAN.csv
-
tableName
:
ABS_PLAN_INVEST_STRUCTURE
csv
:
checkCsv/plan_add_case0002/ABS_PLAN_INVEST_STRUCTURE.csv
-
tableName
:
ABS_PLAN_FEE_STRUCTURE
csv
:
checkCsv/plan_add_case0002/ABS_PLAN_FEE_STRUCTURE.csv
-
tableName
:
ABS_PLAN_ACCT_TITLE
csv
:
checkCsv/plan_add_case0002/ABS_PLAN_ACCT_TITLE.csv
-
tableName
:
ABS_PLAN_ALLOC
csv
:
checkCsv/plan_add_case0002/ABS_PLAN_ALLOC.csv
###
---
!!com.abssqr.plat.common.facade.param.plan.PlanEditOprParam
beginDate
:
null
bizNo
:
null
calcIntrType
:
ACT_360
draft
:
false
endDate
:
2022-10-09T16:00:00Z
feeStructureParam
:
-
feeCalcType
:
FCT001
feeName
:
测试费用
feeRate
:
'
1'
feeScaleType
:
START
feeTimeType
:
TERM
fixedFeeAmt
:
100
payLimitAmt
:
100
sort
:
0
firstAllocDate
:
2020-09-30T16:00:00Z
firstCalcDate
:
2020-09-30T16:00:00Z
firstPayDate
:
2020-09-30T16:00:00Z
firstReportDate
:
2020-09-30T16:00:00Z
firstSettleDate
:
2020-09-30T16:00:00Z
investStructureParam
:
-
allocMethod
:
IBC
effectDate
:
2020-09-30T16:00:00Z
endDate
:
2022-09-30T16:00:00Z
expectEndDate
:
2020-09-30T16:00:00Z
grade
:
'
100'
intrType
:
FLOATING
layerAmt
:
100
layerIntr
:
'
1'
layerName
:
层级一
layerType
:
LT01
sort
:
0
payFreq
:
M
planFullName
:
产品全称
planName
:
测试产品
planNo
:
null
totalAmt
:
100
tradePlace
:
测试交易场所
transTime
:
null
app/test/target/maven-archiver/pom.properties
deleted
100644 → 0
View file @
3056ac0e
#Generated by Apache Maven
#Tue Apr 21 13:33:19 CST 2020
version
=
1.0
groupId
=
com.abssqr.bbplat
artifactId
=
test
app/test/target/test-1.0-sources.jar
deleted
100644 → 0
View file @
3056ac0e
File deleted
app/test/target/test-1.0.jar
deleted
100644 → 0
View file @
3056ac0e
File deleted
app/web/src/main/java/com/abssqr/plat/web/controller/pack/PackController.java
View file @
fd6456af
...
...
@@ -71,4 +71,6 @@ public class PackController {
public
BasePage
<
AstPackListVO
>
getList
(
AstPackQryParam
astPackQryParam
)
{
return
astPackService
.
getList
(
astPackQryParam
);
}
}
app/web/src/main/java/com/abssqr/plat/web/controller/plan/PlanController.java
0 → 100644
View file @
fd6456af
package
com
.
abssqr
.
plat
.
web
.
controller
.
plan
;
import
com.abssqr.plat.common.facade.param.plan.PlanEditOprParam
;
import
com.abssqr.plat.common.facade.param.plan.PlanPageQryParam
;
import
com.abssqr.plat.common.facade.result.BasePage
;
import
com.abssqr.plat.common.facade.result.plan.PlanVO
;
import
com.abssqr.plat.common.facade.service.plan.PlanService
;
import
com.abssqr.plat.common.model.repo.BasePageVO
;
import
com.general.enhanced.controller.annotation.RestJsonController
;
import
com.general.system.common.model.BaseResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
@RestJsonController
public
class
PlanController
{
@Autowired
PlanService
planService
;
/**
* 编辑产品
* @param planEditOprParam
* @return
*/
@RequestMapping
(
"plan/edit.json"
)
public
BaseResult
<
String
>
edit
(
@RequestBody
PlanEditOprParam
planEditOprParam
){
String
planNo
=
planService
.
edit
(
planEditOprParam
);
return
BaseResult
.
success
(
planNo
);
}
/**
* 获取产品详情
* @param planNo
* @return
*/
@RequestMapping
(
"plan/get.json"
)
public
BaseResult
<
PlanVO
>
get
(
@RequestParam
(
"planNo"
)
String
planNo
){
PlanVO
planVO
=
planService
.
get
(
planNo
);
return
BaseResult
.
success
(
planVO
);
}
/**
* 获取产品列表
* @param planPageQryParam
* @return
*/
@RequestMapping
(
"plan/list.json"
)
public
BasePage
<
PlanVO
>
page
(
@RequestBody
PlanPageQryParam
planPageQryParam
){
return
planService
.
page
(
planPageQryParam
);
}
/**
* 根据计划编号删除计划
* @param planNo
* @return
*/
@RequestMapping
(
"plan/delete.json"
)
public
BaseResult
<
Boolean
>
delete
(
@RequestParam
(
"planNo"
)
String
planNo
){
return
planService
.
delete
(
planNo
);
}
}
doc/一期/ABS_PLAN.sql
View file @
fd6456af
drop
table
abs_plan
;
drop
table
abs_plan
;
...
...
@@ -16,11 +16,11 @@ CREATE TABLE ABS_PLAN
FIRST_ALLOC_DATE
DATE
,
FIRST_REPORT_DATE
DATE
,
CALC_INTR_TYPE
VARCHAR2
(
64
),
ALLOC_PERIOD
NUMBER
(
2
),
ALLOC_PERIOD_METHOD
VARCHAR2
(
64
),
PAY_FREQ
VARCHAR2
(
64
),
TRADE_PLACE
VARCHAR2
(
128
),
STATUS
VARCHAR2
(
64
),
GMT_CREATOR
VARCHAR2
(
128
),
GMT_MODIFIER
VARCHAR2
(
128
),
GMT_CREATE
DATE
,
GMT_MODIFIED
DATE
);
...
...
@@ -41,8 +41,10 @@ COMMENT ON COLUMN ABS_PLAN.ALLOC_PERIOD_METHOD IS '兑付周期类型';
COMMENT
ON
COLUMN
ABS_PLAN
.
TRADE_PLACE
IS
'交易场所'
;
COMMENT
ON
COLUMN
ABS_PLAN
.
STATUS
IS
'产品状态(设计中,已发行,已清算)'
;
COMMENT
ON
COLUMN
ABS_PLAN
.
GMT_CREATE
IS
'创建时间'
;
COMMENT
ON
COLUMN
ABS_PLAN
.
GMT_MODIFIED
IS
'修改时间'
;
COMMENT
ON
COLUMN
ABS_PLAN
.
GMT_CREATOR
IS
'计划创建人'
;
COMMENT
ON
COLUMN
ABS_PLAN
.
GMT_MODIFIER
IS
'计划更新人'
;
COMMENT
ON
COLUMN
ABS_PLAN
.
PAY_FREQ
IS
'兑付频率'
;
COMMENT
ON
COLUMN
ABS_PLAN
.
GMT_MODIFIED
IS
'修改时间'
;
COMMENT
ON
TABLE
ABS_PLAN
IS
'产品表'
;
...
...
doc/一期/ABS_PLAN_FEE_STRUCTURE.sql
View file @
fd6456af
drop
table
abs_plan
;
drop
table
abs_plan
;
...
...
@@ -5,7 +5,7 @@ CREATE TABLE ABS_PLAN_FEE_STRUCTURE
ID
NUMBER
(
10
)
PRIMARY
KEY
,
FEE_NO
VARCHAR
(
128
),
PLAN_NO
VARCHAR2
(
128
),
FEE_
CALC_DEFAULT_DATE
DATE
,
FEE_
TIME_TYPE
VARCHAR2
(
128
)
,
FEE_CALC_TYPE
VARCHAR
(
64
),
FIXED_FEE_AMT
NUMBER
(
20
),
FEE_SCALE_TYPE
VARCHAR2
(
64
),
...
...
@@ -19,7 +19,7 @@ CREATE TABLE ABS_PLAN_FEE_STRUCTURE
COMMENT
ON
COLUMN
ABS_PLAN_FEE_STRUCTURE
.
ID
IS
'唯一主键'
;
COMMENT
ON
COLUMN
ABS_PLAN_FEE_STRUCTURE
.
FEE_NO
IS
'费用编号'
;
COMMENT
ON
COLUMN
ABS_PLAN_FEE_STRUCTURE
.
PLAN_NO
IS
'产品编号'
;
COMMENT
ON
COLUMN
ABS_PLAN_FEE_STRUCTURE
.
FEE_
CALC_DEFAULT_DAT
E
IS
'默认计费时间'
;
COMMENT
ON
COLUMN
ABS_PLAN_FEE_STRUCTURE
.
FEE_
TIME_TYP
E
IS
'默认计费时间'
;
COMMENT
ON
COLUMN
ABS_PLAN_FEE_STRUCTURE
.
FEE_CALC_TYPE
IS
'计费方式'
;
COMMENT
ON
COLUMN
ABS_PLAN_FEE_STRUCTURE
.
FIXED_FEE_AMT
IS
'固定费用'
;
COMMENT
ON
COLUMN
ABS_PLAN_FEE_STRUCTURE
.
FEE_SCALE_TYPE
IS
'费用基准'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment