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
82c584be
Commit
82c584be
authored
Oct 12, 2024
by
huangshunlin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
即期售汇
parent
230cc0d3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
292 additions
and
52 deletions
+292
-52
FxdJshController.java
...lliance/isc/funds/common/controller/FxdJshController.java
+29
-0
FxtssbSettleRegister.java
...sc/funds/fxtssb/register/settle/FxtssbSettleRegister.java
+0
-6
FxtssbTransactionServiceImpl.java
...sc/funds/fxtssb/service/FxtssbTransactionServiceImpl.java
+2
-1
FxtsssValidator.java
...om/brilliance/isc/funds/fxtsss/check/FxtsssValidator.java
+80
-0
FxtsssDiasavRegister.java
...sc/funds/fxtsss/register/diasav/FxtsssDiasavRegister.java
+0
-45
FxtsssFeeRegister.java
...ance/isc/funds/fxtsss/register/fee/FxtsssFeeRegister.java
+26
-0
FxtsssSettleRegister.java
...sc/funds/fxtsss/register/settle/FxtsssSettleRegister.java
+87
-0
FxtsssResource.java
.../brilliance/isc/funds/fxtsss/resource/FxtsssResource.java
+68
-0
FxtsssTransactionServiceImpl.java
...sc/funds/fxtsss/service/FxtsssTransactionServiceImpl.java
+0
-0
No files found.
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/controller/FxdJshController.java
0 → 100644
View file @
82c584be
package
com
.
brilliance
.
isc
.
funds
.
common
.
controller
;
import
com.brilliance.isc.common.bop.controller.AbstractJshController
;
import
com.brilliance.isc.common.jshmod.vo.JshmodRequest
;
import
com.brilliance.isc.common.jshmod.vo.JshmodResponse
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.funds.FxdBizInfoVo
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @program: isc-funds
* @ClassName: FxdJshController
* @description: 结售汇申报组件
* @author: huangshunlin
* @create: 2024-10-12 13:48
*/
@RestController
@RequestMapping
(
"/fxd"
)
public
class
FxdJshController
extends
AbstractJshController
<
FxdBizInfoVo
>
{
@RequestMapping
(
"/calcJshmod"
)
@Override
public
ResponseSet
<
JshmodResponse
>
calcJshmod
(
@RequestBody
JshmodRequest
<
FxdBizInfoVo
>
jshmodRequest
)
{
return
super
.
calcJshmod
(
jshmodRequest
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtssb/register/settle/FxtssbSettleRegister.java
View file @
82c584be
...
...
@@ -26,10 +26,6 @@ public class FxtssbSettleRegister implements ISettleRegister {
@Autowired
private
SetglgService
setglgService
;
@Autowired
private
DftcreSettleRegister
dftcreSettleRegister
;
@Autowired
private
TrtcreSettleRegister
trtcreSettleRegister
;
@Autowired
private
DefaultSettleRegister
defaultSettleRegister
;
...
...
@@ -37,8 +33,6 @@ public class FxtssbSettleRegister implements ISettleRegister {
public
void
registerSettlement
(
SetmodVo
setmodVo
)
{
transRegister
(
setmodVo
);
defaultSettleRegister
.
registerSettlement
(
setmodVo
);
dftcreSettleRegister
.
registerSettlement
(
setmodVo
);
trtcreSettleRegister
.
registerSettlement
(
setmodVo
);
}
/**
...
...
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtssb/service/FxtssbTransactionServiceImpl.java
View file @
82c584be
...
...
@@ -105,6 +105,7 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
serviceRegisterMaps
.
put
(
CommonContants
.
TRNDOC_SERVICE
,
"N"
);
serviceRegisterMaps
.
put
(
CommonContants
.
GLEMOD_SERVICE
,
"Y"
);
serviceRegisterMaps
.
put
(
CommonContants
.
TRNMOD_SERVICE
,
"Y"
);
serviceRegisterMaps
.
put
(
CommonContants
.
BOPSET_JSH_SERVICE
,
"Y"
);
}
...
...
@@ -115,7 +116,6 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
public
void
ruleMtabutSavN500
(
FxtssbStoreBo
bo
)
{
TrnmodVo
trnmodVo
=
transactionHelpService
.
getTransactionStoreSet
().
getTrnmodVo
();
Fxdgrp
fxdgrp
=
bo
.
getFxdgrp
();
fxToolComponent
.
getref
(
fxdgrp
);
// 1. Create (rsp. update) Contract (incl. Texts)
...
...
@@ -183,6 +183,7 @@ public class FxtssbTransactionServiceImpl extends AbstractTransactionService<Fxt
bo
.
getFxdgrp
().
getRec
().
setFxtyp
(
"SB"
);
String
extkey
=
SettleContext
.
getUserSession
().
getUsr
().
getExtkey
();
bo
.
getFxdgrp
().
getRec
().
setUsr
(
extkey
);
bo
.
getFxdgrp
().
getRec
().
setOwnusr
(
extkey
);
//钞汇 默认 1:现汇
bo
.
getFxtp
().
setCshflg
(
"1"
);
//这笔结售汇业务的成交日期,系统默认为当前日期,可以根据业务实际情况修改。
...
...
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtsss/check/FxtsssValidator.java
View file @
82c584be
package
com
.
brilliance
.
isc
.
funds
.
fxtsss
.
check
;
import
com.brilliance.isc.common.transaction.newcheck.AbstractModuleValidator
;
import
com.brilliance.isc.common.transaction.newcheck.ValidResult
;
import
com.brilliance.isc.common.transaction.newcheck.Validate
;
import
com.brilliance.isc.funds.bo.funds.FxtsssStoreBo
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
com.brilliance.mda.runtime.mda.util.Strings
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
...
...
@@ -32,5 +36,81 @@ public class FxtsssValidator extends AbstractModuleValidator<FxtsssStoreBo> {
return
maps
;
}
/**
* source:fxtsss.0017.script
*/
@Validate
(
path
=
"fxdgrp.rec.trnman"
)
public
ValidResult
checkFxdgrpRecTrnmanN1000
(
FxtsssStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getTrnman
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtsss.0018.script
*/
@Validate
(
path
=
"fxdgrp.rec.trdint"
)
public
ValidResult
checkFxdgrpRecTrdintN1000
(
FxtsssStoreBo
bo
)
{
if
(
MdaUtils
.
compareTo
(
Strings
.
mid
(
bo
.
getFxdgrp
().
getRec
().
getFxtyp
(),
2
,
1
),
"B"
)
==
0
&&
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getTrdint
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtsss.0019.script
*/
@Validate
(
path
=
"fxdgrp.rec.trdout"
)
public
ValidResult
checkFxdgrpRecTrdoutN1000
(
FxtsssStoreBo
bo
)
{
if
(
MdaUtils
.
compareTo
(
Strings
.
mid
(
bo
.
getFxdgrp
().
getRec
().
getFxtyp
(),
2
,
1
),
"S"
)
==
0
&&
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getTrdout
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtsss.0020.script
*/
@Validate
(
path
=
"fxdgrp.rec.acc"
)
public
ValidResult
checkFxdgrpRecAccN1000
(
FxtsssStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getAcc
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtsss.0021.script
*/
@Validate
(
path
=
"fxdgrp.rec.acc2"
)
public
ValidResult
checkFxdgrpRecAcc2N1000
(
FxtsssStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getAcc2
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtsss.0027.script
*/
@Validate
(
path
=
"fxdgrp.rec.dsp"
)
public
ValidResult
checkFxdgrpRecDspN1000
(
FxtsssStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getDsp
()))
{
return
errorMandatory
();
}
return
null
;
}
/**
* source:fxtsss.0028.script
*/
@Validate
(
path
=
"fxdgrp.rec.dsp2"
)
public
ValidResult
checkFxdgrpRecDsp2N1000
(
FxtsssStoreBo
bo
)
{
if
(
MdaUtils
.
isEmpty
(
bo
.
getFxdgrp
().
getRec
().
getDsp2
()))
{
return
errorMandatory
();
}
return
null
;
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtsss/register/diasav/FxtsssDiasavRegister.java
deleted
100644 → 0
View file @
230cc0d3
package
com
.
brilliance
.
isc
.
funds
.
fxtsss
.
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: FxtsssDiasavRegister
* @description: 即期售汇 Fxtsss 备忘录注册
* @author: huangshunlin
* @create: 2024-10-08 15:39
*/
@Component
(
"fxtsss.diasavRegister"
)
public
class
FxtsssDiasavRegister
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/fxtsss/register/fee/FxtsssFeeRegister.java
0 → 100644
View file @
82c584be
package
com
.
brilliance
.
isc
.
funds
.
fxtsss
.
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
(
"fxtsss.feeRegister"
)
public
class
FxtsssFeeRegister
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/fxtsss/register/settle/FxtsssSettleRegister.java
0 → 100644
View file @
82c584be
package
com
.
brilliance
.
isc
.
funds
.
fxtsss
.
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.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
(
"fxtsss.settleRegister"
)
public
class
FxtsssSettleRegister
implements
ISettleRegister
{
@Autowired
private
SetglgService
setglgService
;
@Autowired
private
DefaultSettleRegister
defaultSettleRegister
;
@Override
public
void
registerSettlement
(
SetmodVo
setmodVo
)
{
transRegister
(
setmodVo
);
defaultSettleRegister
.
registerSettlement
(
setmodVo
);
}
/**
* source:fxtsss.0010.script
*/
private
void
transRegister
(
SetmodVo
setmodVo
)
{
FxdBizInfoVo
rec
=
(
FxdBizInfoVo
)
setmodVo
.
getRec
();
BigDecimal
maxAmt
=
BigDecimal
.
ZERO
;
BigDecimal
nom1Amt
=
BigDecimal
.
ZERO
;
if
(
setmodVo
.
getCbsMap
().
get
(
"MAX"
)
!=
null
)
{
maxAmt
=
setmodVo
.
getCbsMap
().
get
(
"MAX"
).
getAmt
();
}
String
nom1Cur
=
NULLSTR
;
if
(
setmodVo
.
getCbsMap
().
get
(
"NOM1"
)
!=
null
)
{
nom1Amt
=
setmodVo
.
getCbsMap
().
get
(
"NOM1"
).
getAmt
();
nom1Cur
=
setmodVo
.
getCbsMap
().
get
(
"NOM1"
).
getCur
();
}
setmodVo
.
setDocamt
(
maxAmt
);
setmodVo
.
setOpnamt
(
maxAmt
);
SetglgVo
setglg
=
setmodVo
.
getSetglg
();
setglgService
.
setglgClrAmount
(
setglg
,
"TRN"
);
setglgService
.
setglgClrAmount
(
setglg
,
"SET"
);
String
dsp
=
NULLSTR
;
String
dbtKey
=
NULLSTR
;
String
cdtKey
=
NULLSTR
;
if
(!
MdaUtils
.
isEmpty
(
nom1Amt
)
&&
!
MdaUtils
.
isEmpty
(
rec
.
getFxtyp
()))
{
if
(
MdaUtils
.
compareTo
(
Strings
.
mid
(
rec
.
getFxtyp
(),
2
,
1
),
"B"
)
==
0
)
{
if
(
MdaUtils
.
compareTo
(
rec
.
getDsp
(),
"CA"
)
==
0
)
{
dsp
=
"LOD"
;
}
else
{
dsp
=
rec
.
getDsp
()
+
"D"
;
}
dbtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"APL"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
(),
""
,
dsp
,
"A"
,
rec
.
getAcc
(),
""
);
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"SET"
,
"APL"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
().
negate
(),
"SET"
,
rec
.
getDsp2
()
+
"C"
,
"F"
,
rec
.
getAcc2
(),
"SET"
);
setglgService
.
setglgAddAmtFldAccCur
(
setglg
,
"SET"
,
cdtKey
,
nom1Cur
);
setglgService
.
setglgAddAmtFldExtRat
(
setglg
,
"SET"
,
cdtKey
,
BigDecimal
.
ONE
,
rec
.
getRat
());
setglgService
.
setSettlementDetails
(
setglg
,
"B"
,
"APL"
,
rec
.
getTrnman
(),
rec
.
getTrdint
());
}
else
{
if
(
MdaUtils
.
compareTo
(
rec
.
getDsp
(),
"CA"
)
==
0
)
{
dsp
=
"LOC"
;
}
else
{
dsp
=
rec
.
getDsp
()
+
"C"
;
}
cdtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"TRN"
,
"APL"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
().
negate
(),
""
,
dsp
,
"A"
,
rec
.
getAcc
(),
""
);
dbtKey
=
setglgService
.
setglgAddAmount
(
setglg
,
"SET"
,
"APL"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSetamt
(),
"SET"
,
rec
.
getDsp2
()
+
"D"
,
"F"
,
rec
.
getAcc2
(),
"SET"
);
setglgService
.
setglgAddAmtFldAccCur
(
setglg
,
"SET"
,
dbtKey
,
nom1Cur
);
setglgService
.
setglgAddAmtFldExtRat
(
setglg
,
"SET"
,
dbtKey
,
BigDecimal
.
ONE
,
rec
.
getRat
());
setglgService
.
setSettlementDetails
(
setglg
,
"S"
,
"APL"
,
rec
.
getTrnman
(),
rec
.
getTrdout
());
}
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtsss/resource/FxtsssResource.java
View file @
82c584be
package
com
.
brilliance
.
isc
.
funds
.
fxtsss
.
resource
;
import
com.brilliance.isc.common.context.SettleContext
;
import
com.brilliance.isc.common.transaction.controller.AbstractTransactionController
;
import
com.brilliance.isc.funds.fxtsss.service.FxtsssTransactionServiceImpl
;
import
com.brilliance.isc.funds.transfer.transaction.FxtsssStructMapper
;
import
com.brilliance.isc.funds.vo.funds.FxtsssStoreVo
;
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
;
import
java.util.List
;
import
java.util.Map
;
/**
* @program: isc-funds
...
...
@@ -29,5 +37,65 @@ public class FxtsssResource extends AbstractTransactionController<FxtsssStoreVo>
return
fxtsssStructMapper
;
}
@Resource
(
name
=
"fxtsss.transaction"
)
FxtsssTransactionServiceImpl
fxtsssTransactionService
;
@Autowired
private
SettleContext
settleContext
;
/**
* 根据结售汇类型 等获取业务参号
*
* @param fxtsssStoreVo
* @return
*/
@PostMapping
(
"/getRef"
)
public
ResponseSet
<
String
>
getRef
(
@RequestBody
FxtsssStoreVo
fxtsssStoreVo
)
{
String
ref
=
fxtsssTransactionService
.
getRef
(
fxtsssStoreVo
);
return
ResponseSet
.
simpleSuccess
(
ref
);
}
@PostMapping
(
"/defaultAccountsN1000"
)
public
ResponseSet
defaultAccountsN1000
(
@RequestBody
FxtsssStoreVo
fxtsssStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTSSS"
,
""
,
""
);
Map
<
String
,
List
<
String
>>
codeSet
=
fxtsssTransactionService
.
defaultAccountsN1000
(
fxtsssStoreVo
);
ResponseSet
success
=
ResponseSet
.
simpleSuccess
(
fxtsssStoreVo
);
success
.
setCodeSet
(
codeSet
);
return
success
;
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
@PostMapping
(
"/defaultRateN1000"
)
public
ResponseSet
defaultRateN1000
(
@RequestBody
FxtsssStoreVo
fxtsssStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTSSS"
,
""
,
""
);
fxtsssTransactionService
.
defaultRateN1000
(
fxtsssStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtsssStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
@PostMapping
(
"/defaultCalculateN1100"
)
public
ResponseSet
defaultCalculateN1100
(
@RequestBody
FxtsssStoreVo
fxtsssStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTSSS"
,
""
,
""
);
fxtsssTransactionService
.
defaultCalculateN1100
(
fxtsssStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtsssStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtsss/service/FxtsssTransactionServiceImpl.java
View file @
82c584be
This diff is collapsed.
Click to expand it.
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