Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
isc-funds
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
isc-v3.1-tmp
isc-funds
Commits
1c47f394
Commit
1c47f394
authored
Oct 12, 2024
by
jianglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开发fxtfop交易
parent
2b742cbc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
470 additions
and
0 deletions
+470
-0
FxtfopValidator.java
...om/brilliance/isc/funds/fxtfop/check/FxtfopValidator.java
+30
-0
FxtfopDocSet.java
...om/brilliance/isc/funds/fxtfop/document/FxtfopDocSet.java
+33
-0
FxtfopDiasavRegister.java
...sc/funds/fxtfop/register/diasav/FxtfopDiasavRegister.java
+45
-0
FxtfopDocumentRegister.java
...isc/funds/fxtfop/register/doc/FxtfopDocumentRegister.java
+26
-0
FxtfopFeeRegister.java
...ance/isc/funds/fxtfop/register/fee/FxtfopFeeRegister.java
+26
-0
FxtfopSettleRegister.java
...sc/funds/fxtfop/register/settle/FxtfopSettleRegister.java
+89
-0
FxtfopResource.java
.../brilliance/isc/funds/fxtfop/resource/FxtfopResource.java
+85
-0
FxtfopTransactionServiceImpl.java
...sc/funds/fxtfop/service/FxtfopTransactionServiceImpl.java
+0
-0
FxtfopStoreBo.java
...java/com/brilliance/isc/funds/bo/funds/FxtfopStoreBo.java
+35
-0
FxtfopStructMapper.java
...ce/isc/funds/transfer/transaction/FxtfopStructMapper.java
+64
-0
FxtfopStoreVo.java
...java/com/brilliance/isc/funds/vo/funds/FxtfopStoreVo.java
+37
-0
No files found.
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/check/FxtfopValidator.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
check
;
import
com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator
;
import
com.brilliance.isc.funds.bo.funds.FxtfopStoreBo
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
java.util.HashMap
;
import
java.util.Map
;
@Component
public
class
FxtfopValidator
extends
AbstractModuleValidator
<
FxtfopStoreBo
>
{
@Override
@PostConstruct
public
void
register
()
{
super
.
register
();
}
@Override
public
Map
<
String
,
String
>
validate
(
FxtfopStoreBo
vo
)
{
Map
<
String
,
String
>
maps
=
new
HashMap
<>();
maps
.
putAll
(
super
.
validate
(
vo
));
return
maps
;
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/document/FxtfopDocSet.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
document
;
import
com.brilliance.isc.doc.handle.impl.AbstractTransactionDocSet
;
import
com.brilliance.isc.funds.bo.funds.FxtfopStoreBo
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
/**
* @program: isc-funds
* @ClassName: FxtfopDocSet
* @description: 即期结汇 Fxtfop 面函
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component
(
"fxtfop.docset"
)
public
class
FxtfopDocSet
extends
AbstractTransactionDocSet
<
FxtfopStoreBo
>
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FxtfopDocSet
.
class
);
/**
* 构建需要支持的面函组件
*/
@PostConstruct
public
void
buildMember
()
{
//扫描Cortype支持,必须要执行
scanDocCortypSupport
();
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/register/diasav/FxtfopDiasavRegister.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
register
.
diasav
;
import
com.brilliance.isc.common.register.diasav.IDiasavRegister
;
import
com.brilliance.isc.common.register.diasav.common.DftcreDiasavRegister
;
import
com.brilliance.isc.common.register.diasav.common.LiaallDiasavRegister
;
import
com.brilliance.isc.common.register.diasav.common.LiaallDiasavZZZRegister
;
import
com.brilliance.isc.common.register.diasav.common.TrtcreDiasavRegister
;
import
com.brilliance.isc.common.trndia.service.TrndiaService
;
import
com.brilliance.isc.common.trndia.vo.TrndiaVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
/**
* @program: isc-funds
* @ClassName: FxtfopDiasavRegister
* @description: 即期结汇 Fxtfop 备忘录注册
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component
(
"fxtfop.diasavRegister"
)
public
class
FxtfopDiasavRegister
implements
IDiasavRegister
{
@Autowired
private
TrndiaService
trndiaService
;
@Autowired
private
LiaallDiasavRegister
liaallDiasavRegister
;
@Autowired
private
LiaallDiasavZZZRegister
liaallDiasavZZZRegister
;
@Autowired
private
TrtcreDiasavRegister
trtcreDiasavRegister
;
@Autowired
private
DftcreDiasavRegister
dftcreDiasavRegister
;
@Override
public
void
diasav
(
TrndiaVo
trndia
)
{
trnDiasav
(
trndia
);
liaallDiasavRegister
.
diasav
(
trndia
);
liaallDiasavZZZRegister
.
diasav
(
trndia
);
trtcreDiasavRegister
.
diasav
(
trndia
);
dftcreDiasavRegister
.
diasav
(
trndia
);
}
private
void
trnDiasav
(
TrndiaVo
trndiaVo
)
{
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/register/doc/FxtfopDocumentRegister.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
register
.
doc
;
import
com.brilliance.isc.common.register.document.IDocumentRegister
;
import
com.brilliance.isc.common.trndoc.vo.TrndocVo
;
import
org.springframework.stereotype.Component
;
/**
* @program: isc-funds
* @ClassName: FxtfopDocumentRegister
* @description: 即期结汇 Fxtfop 面函注册
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component
(
"fxtfop.documentRegister"
)
public
class
FxtfopDocumentRegister
implements
IDocumentRegister
{
@Override
public
void
registerDocument
(
TrndocVo
trndoc
)
{
doRegister
(
trndoc
);
}
public
void
doRegister
(
TrndocVo
trndoc
)
{
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/register/fee/FxtfopFeeRegister.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
register
.
fee
;
import
com.brilliance.isc.common.register.fee.AbstractFeeRegister
;
import
com.brilliance.isc.common.register.fee.common.SetmodFeeRegister
;
import
com.brilliance.isc.common.setmod.vo.SetmodVo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
@Component
(
"fxtfop.feeRegister"
)
public
class
FxtfopFeeRegister
extends
AbstractFeeRegister
{
@Autowired
private
SetmodFeeRegister
setmodFeeRegister
;
@Override
public
void
registerSettlement
(
SetmodVo
setmodVo
)
{
transRegister
(
setmodVo
);
setmodFeeRegister
.
registerSettlement
(
setmodVo
);
}
private
void
transRegister
(
SetmodVo
setmodVo
)
{
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/register/settle/FxtfopSettleRegister.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
register
.
settle
;
import
com.brilliance.isc.common.register.settle.DefaultSettleRegister
;
import
com.brilliance.isc.common.register.settle.ISettleRegister
;
import
com.brilliance.isc.common.register.settle.common.DftcreSettleRegister
;
import
com.brilliance.isc.common.register.settle.common.TrtcreSettleRegister
;
import
com.brilliance.isc.common.setglg.service.SetglgService
;
import
com.brilliance.isc.common.glemod.service.GlemodService
;
import
com.brilliance.isc.common.setglg.vo.SetglgVo
;
import
com.brilliance.isc.common.setmod.service.SetmodService
;
import
com.brilliance.isc.common.setmod.vo.SetmodVo
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
com.brilliance.mda.runtime.mda.util.Strings
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.math.BigDecimal
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
@Component
(
"fxtfop.settleRegister"
)
public
class
FxtfopSettleRegister
implements
ISettleRegister
{
@Autowired
private
SetmodService
setmodService
;
@Autowired
private
SetglgService
setglgService
;
@Autowired
private
DefaultSettleRegister
defaultSettleRegister
;
@Autowired
private
GlemodService
glemodService
;
@Override
public
void
registerSettlement
(
SetmodVo
setmodVo
)
{
transRegister
(
setmodVo
);
defaultSettleRegister
.
registerSettlement
(
setmodVo
);
//dftcreSettleRegister.registerSettlement(setmodVo);
//trtcreSettleRegister.registerSettlement(setmodVo);
}
/**
* source:fxtfop.0010.script
*/
private
void
transRegister
(
SetmodVo
setmodVo
)
{
//取得上下文
FxdBizInfoVo
rec
=
(
FxdBizInfoVo
)
setmodVo
.
getRec
();
String
maxCur
=
NULLSTR
;
BigDecimal
maxAmt
=
BigDecimal
.
ZERO
;
String
nom1Cur
=
NULLSTR
;
BigDecimal
nom1Amt
=
BigDecimal
.
ZERO
;
if
(
setmodVo
.
getCbsMap
().
get
(
"MAX"
)
!=
null
)
{
maxAmt
=
setmodVo
.
getCbsMap
().
get
(
"MAX"
).
getAmt
();
maxCur
=
setmodVo
.
getCbsMap
().
get
(
"MAX"
).
getCur
();
}
if
(
setmodVo
.
getCbsMap
().
get
(
"NOM1"
)
!=
null
)
{
nom1Amt
=
setmodVo
.
getCbsMap
().
get
(
"NOM1"
).
getAmt
();
nom1Cur
=
setmodVo
.
getCbsMap
().
get
(
"NOM1"
).
getCur
();
}
setmodVo
.
setDoccur
(
maxCur
);
setmodVo
.
setDocamt
(
maxAmt
);
setmodVo
.
setOpnamt
(
maxAmt
);
SetglgVo
setglg
=
setmodVo
.
getSetglg
();
setglgService
.
setglgClrAmount
(
setglg
,
"TRN"
);
setglgService
.
setglgClrAmount
(
setglg
,
"SET"
);
String
act1
=
NULLSTR
;
String
ddtKey
=
NULLSTR
;
String
act4
=
NULLSTR
;
String
cbtKey
=
NULLSTR
;
if
(
!
MdaUtils
.
isEmpty
(
nom1Amt
)
&&
!
MdaUtils
.
isEmpty
(
rec
.
getFxtyp
()
))
{
//D 281101
act1
=
glemodService
.
getAvailAcc
(
"FX-EXS"
,
maxCur
,
""
,
setmodVo
.
getSetamt
());
ddtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"OWN"
,
maxCur
,
setmodVo
.
getSetamt
(),
""
,
"FXD"
,
"C"
,
act1
,
""
);
//C:281105
act4
=
glemodService
.
getAvailAcc
(
"FX-ELQ"
,
maxCur
,
""
,
setmodVo
.
getSetamt
()
);
cbtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"SET"
,
"OWN"
,
maxCur
,
setmodVo
.
getSetamt
().
negate
(),
"SET"
,
"FXC"
,
"F"
,
act4
,
"SET"
);
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/resource/FxtfopResource.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
fxtfop
.
resource
;
import
com.brilliance.isc.common.context.SettleContext
;
import
com.brilliance.isc.common.transaction.controller.AbstractTransactionController
;
import
com.brilliance.isc.funds.fxtfop.service.FxtfopTransactionServiceImpl
;
import
com.brilliance.isc.funds.transfer.transaction.FxtfopStructMapper
;
import
com.brilliance.isc.funds.vo.funds.FxtfopStoreVo
;
import
com.brilliance.isc.funds.vo.funds.FxtssbStoreVo
;
import
com.brilliance.isc.transfer.IStructMapper
;
import
com.brilliance.isc.vo.ResponseSet
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @program: isc-funds
* @ClassName: FxtfopResource
* @description: 即期结汇 Fxtfop 请求入口
* @author: huangshunlin
* @create: 2024-10-08 15:34
*/
@RestController
@RequestMapping
(
"/fxtfop"
)
@Api
(
"外币兑换登记"
)
public
class
FxtfopResource
extends
AbstractTransactionController
<
FxtfopStoreVo
>
{
@Resource
private
FxtfopStructMapper
fxtfopStructMapper
;
public
IStructMapper
getStructMapper
()
{
return
fxtfopStructMapper
;
}
@Resource
(
name
=
"fxtfop.transaction"
)
FxtfopTransactionServiceImpl
fxtfopTransactionService
;
@Autowired
private
SettleContext
settleContext
;
/**
* 根据结售汇类型 等获取业务参号
*
* @param fxtfopStoreVo
* @return
*/
@PostMapping
(
"/getRef"
)
public
ResponseSet
<
String
>
getRef
(
@RequestBody
FxtfopStoreVo
fxtfopStoreVo
)
{
String
ref
=
fxtfopTransactionService
.
getRef
(
fxtfopStoreVo
);
return
ResponseSet
.
simpleSuccess
(
ref
);
}
@PostMapping
(
"/defaultRateN1000"
)
public
ResponseSet
defaultRateN1000
(
@RequestBody
FxtfopStoreVo
fxtfopStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTFOP"
,
""
,
""
);
fxtfopTransactionService
.
defaultRateN1000
(
fxtfopStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtfopStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
@PostMapping
(
"/defaultCalculateN1100"
)
public
ResponseSet
defaultCalculateN1100
(
@RequestBody
FxtfopStoreVo
fxtfopStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTFOP"
,
""
,
""
);
fxtfopTransactionService
.
defaultCalculateN1100
(
fxtfopStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtfopStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtfop/service/FxtfopTransactionServiceImpl.java
0 → 100644
View file @
1c47f394
This diff is collapsed.
Click to expand it.
isc-funds-entity/src/main/java/com/brilliance/isc/funds/bo/funds/FxtfopStoreBo.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
bo
.
funds
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.bo.model.Fxtp
;
import
com.brilliance.isc.common.transaction.vo.BaseTransactionVo
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.Data
;
/**
* @program: isc-funds
* @ClassName: FxtsssStoreBo
* @description: 即期结汇bo
* @author: huangshunlin
* @create: 2024-10-08 15:51
*/
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
FxtfopStoreBo
extends
BaseTransactionVo
{
private
Fxdgrp
fxdgrp
;
private
Fxtp
fxtp
;
@Override
public
void
reset
()
{
super
.
reset
();
if
(
fxdgrp
==
null
)
{
fxdgrp
=
new
Fxdgrp
();
}
fxdgrp
.
reset
();
if
(
fxtp
==
null
)
{
fxtp
=
new
Fxtp
();
}
fxtp
.
reset
();
}
}
isc-funds-entity/src/main/java/com/brilliance/isc/funds/transfer/transaction/FxtfopStructMapper.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
transfer
.
transaction
;
import
com.brilliance.isc.funds.bo.funds.FxtfopStoreBo
;
import
com.brilliance.isc.funds.vo.funds.FxtfopStoreVo
;
import
com.brilliance.isc.transfer.IBaseStructMapper
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.MappingTarget
;
import
org.mapstruct.Mappings
;
import
org.mapstruct.factory.Mappers
;
/**
* @program: isc-funds
* @ClassName: FxtssbStructMapper
* @description: 即期结汇转换Fxtssb Bo、Vo之间的转换处理类。如果有很复杂的函数,则可以用适配器模式重写
* @author: huangshunlin
* @create: 2024-10-08 15:27
*/
@Mapper
(
componentModel
=
"spring"
)
public
interface
FxtfopStructMapper
extends
IBaseStructMapper
<
FxtfopStoreBo
,
FxtfopStoreVo
>
{
/**
* 此行语句一定要写,StructMapper需要
*/
FxtfopStructMapper
INSTANCE
=
Mappers
.
getMapper
(
FxtfopStructMapper
.
class
);
/**
* Vo转为Bo
*
* @param vo
* @return 返回业务Bo
*/
@Override
FxtfopStoreBo
voTransferToBo
(
FxtfopStoreVo
vo
);
/**
* Vo追加更新至Bo
*
* @param vo
* @param bo
*/
@Override
@Mappings
({
})
void
voUpdateToBo
(
FxtfopStoreVo
vo
,
@MappingTarget
FxtfopStoreBo
bo
);
/**
* Bo转为Vo
*
* @param bo
* @return 返回Vo
*/
@Override
FxtfopStoreVo
boTransferToVo
(
FxtfopStoreBo
bo
);
/**
* bo追加更新至Bo
*
* @param bo
* @param vo
*/
@Override
void
boUpdateToVo
(
FxtfopStoreBo
bo
,
@MappingTarget
FxtfopStoreVo
vo
);
}
isc-funds-entity/src/main/java/com/brilliance/isc/funds/vo/funds/FxtfopStoreVo.java
0 → 100644
View file @
1c47f394
package
com
.
brilliance
.
isc
.
funds
.
vo
.
funds
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.bo.model.Fxtp
;
import
com.brilliance.isc.common.transaction.vo.BaseTransactionVo
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
lombok.Data
;
/**
* @program: isc-funds
* @ClassName: FxtssbStoreVo
* @description: 即期结汇bo
* @author: huangshunlin
* @create: 2024-10-08 15:26
*/
@Data
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
FxtfopStoreVo
extends
BaseTransactionVo
{
private
Fxdgrp
fxdgrp
;
private
Fxtp
fxtp
;
@Override
public
void
reset
()
{
super
.
reset
();
if
(
fxdgrp
==
null
)
{
fxdgrp
=
new
Fxdgrp
();
}
fxdgrp
.
reset
();
if
(
fxtp
==
null
)
{
fxtp
=
new
Fxtp
();
}
fxtp
.
reset
();
}
}
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