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
4bfc0473
Commit
4bfc0473
authored
Oct 12, 2024
by
xiaotong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FXTLOP后端逻辑调整
parent
e0df9afc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
48 deletions
+92
-48
FxtlopSettleRegister.java
...sc/funds/fxtlop/register/settle/FxtlopSettleRegister.java
+38
-22
FxtlopResource.java
.../brilliance/isc/funds/fxtlop/resource/FxtlopResource.java
+44
-0
FxtlopService.java
...om/brilliance/isc/funds/fxtlop/service/FxtlopService.java
+0
-2
FxtlopServiceImpl.java
...ance/isc/funds/fxtlop/service/impl/FxtlopServiceImpl.java
+10
-24
FxtlopTransactionServiceImpl.java
...nds/fxtlop/service/impl/FxtlopTransactionServiceImpl.java
+0
-0
No files found.
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtlop/register/settle/FxtlopSettleRegister.java
View file @
4bfc0473
...
...
@@ -4,6 +4,7 @@ import com.brilliance.isc.common.glemod.service.GlemodService;
import
com.brilliance.isc.common.register.settle.DefaultSettleRegister
;
import
com.brilliance.isc.common.register.settle.ISettleRegister
;
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
;
...
...
@@ -12,6 +13,10 @@ 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
(
"fxtlop.settleRegister"
)
public
class
FxtlopSettleRegister
implements
ISettleRegister
{
...
...
@@ -33,8 +38,19 @@ public class FxtlopSettleRegister implements ISettleRegister {
private
void
transRegister
(
SetmodVo
setmodVo
)
{
FxdBizInfoVo
rec
=
(
FxdBizInfoVo
)
setmodVo
.
getRec
();
//this.getSetmod().setDocAmt ( this.getFxdgrp().getCbs().getMax().getCur(), this.getFxdgrp().getCbs().getMax().getAmt(), "Disable" );
//this.getSetmod().setOpnAmt ( this.getFxdgrp().getCbs().getMax().getAmt() );
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
(
setmodVo
.
getSetglg
(),
"TRN"
);
setglgService
.
setglgClrAmount
(
setmodVo
.
getSetglg
(),
"SET"
);
//平盘登记交易不产生分录
...
...
@@ -58,26 +74,26 @@ public class FxtlopSettleRegister implements ISettleRegister {
String
cbtKey
=
null
;
if
(
!
MdaUtils
.
isEmpty
(
rec
.
getFxtyp
())
)
{
//买入登记
if
(
MdaUtils
.
compareTo
(
Strings
.
mid
(
rec
.
getFxtyp
(),
2
,
1
),
"B"
)
==
0
)
{
//D 281110
act1
=
glemodService
.
getAvailAcc
(
"FX-SLQ"
,
setmodVo
.
getDoccur
(),
""
,
setmodVo
.
getSet
amt
()
);
ddtKey
=
setglgService
.
setglgAddAmount
(
setmodVo
.
getSetglg
(),
"TRN"
,
"OWN"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSet
amt
(),
""
,
"FXD"
,
"C"
,
act1
,
""
);
//C:281106
act4
=
glemodService
.
getAvailAcc
(
"FX-UTL"
,
setmodVo
.
getDoccur
(),
""
,
setmodVo
.
getSet
amt
()
);
cbtKey
=
setglgService
.
setglgAddAmount
(
setmodVo
.
getSetglg
(),
"SET"
,
"OWN"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSet
amt
().
negate
(),
"SET"
,
"FXC"
,
"F"
,
act4
,
"SET"
);
}
else
{
//卖出登记
//D:281106
act4
=
glemodService
.
getAvailAcc
(
"FX-UTL"
,
setmodVo
.
getDoccur
(),
""
,
setmodVo
.
getSet
amt
()
);
ddtKey
=
setglgService
.
setglgAddAmount
(
setmodVo
.
getSetglg
(),
"SET"
,
"OWN"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSet
amt
(),
"SET"
,
"FXD"
,
"F"
,
act4
,
"SET"
);
//C 281110
act1
=
glemodService
.
getAvailAcc
(
"FX-SLQ"
,
setmodVo
.
getDoccur
(),
""
,
setmodVo
.
getSetamt
()
);
cbtKey
=
setglgService
.
setglgAddAmount
(
setmodVo
.
getSetglg
(),
"TRN"
,
"OWN"
,
setmodVo
.
getDoccur
(),
setmodVo
.
getSet
amt
().
negate
(),
""
,
"FXC"
,
"C"
,
act1
,
""
);
}
//
//买入登记
//
if( MdaUtils.compareTo(Strings.mid(rec.getFxtyp(),2,1),"B") == 0 )
//
{
//
//D 281110
// act1 = glemodService.getAvailAcc ( "FX-SLQ", setmodVo.getDoccur(), "", setmodVo.getDoc
amt() );
// ddtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "OWN", setmodVo.getDoccur(), setmodVo.getDoc
amt(), "", "FXD", "C", act1, "" );
//
//C:281106
// act4 = glemodService.getAvailAcc ( "FX-UTL", setmodVo.getDoccur(), "", setmodVo.getDoc
amt() );
// cbtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"SET", "OWN", setmodVo.getDoccur(), setmodVo.getDoc
amt().negate(), "SET", "FXC", "F", act4, "SET" );
//
}
//
else
//
{
//
//卖出登记
//
//D:281106
// act4 = glemodService.getAvailAcc ( "FX-UTL", setmodVo.getDoccur(), "", setmodVo.getDoc
amt() );
// ddtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"SET", "OWN", setmodVo.getDoccur(), setmodVo.getDoc
amt(), "SET", "FXD", "F", act4, "SET" );
//
//C 281110
//
act1 = glemodService.getAvailAcc ( "FX-SLQ", setmodVo.getDoccur(), "", setmodVo.getSetamt() );
// cbtKey = setglgService.setglgAddAmount ( setmodVo.getSetglg(),"TRN", "OWN", setmodVo.getDoccur(), setmodVo.getDoc
amt().negate(), "", "FXC", "C", act1, "" );
//
}
}
}
...
...
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtlop/resource/FxtlopResource.java
View file @
4bfc0473
package
com
.
brilliance
.
isc
.
funds
.
fxtlop
.
resource
;
import
com.brilliance.isc.common.context.SettleContext
;
import
com.brilliance.isc.common.transaction.controller.AbstractTransactionController
;
import
com.brilliance.isc.funds.fxtlop.service.impl.FxtlopTransactionServiceImpl
;
import
com.brilliance.isc.funds.transfer.transaction.FxtlopStructMapper
;
import
com.brilliance.isc.funds.vo.funds.FxtlopStoreVo
;
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
;
...
...
@@ -29,7 +36,44 @@ public class FxtlopResource extends AbstractTransactionController<FxtlopStoreVo>
return
fxtlopStructMapper
;
}
@Resource
(
name
=
"fxtlop.transaction"
)
FxtlopTransactionServiceImpl
fxtlopTransactionService
;
@Autowired
private
SettleContext
settleContext
;
@PostMapping
(
"/getRef"
)
public
ResponseSet
<
String
>
getRef
(
@RequestBody
FxtlopStoreVo
fxtlopStoreVo
)
{
String
ref
=
fxtlopTransactionService
.
getRef
(
fxtlopStoreVo
);
return
ResponseSet
.
simpleSuccess
(
ref
);
}
@PostMapping
(
"/defaultRateN1000"
)
public
ResponseSet
defaultRateN1000
(
@RequestBody
FxtlopStoreVo
fxtlopStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTLOP"
,
""
,
""
);
fxtlopTransactionService
.
defaultRateN1000
(
fxtlopStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtlopStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
@PostMapping
(
"/defaultCalculateN1100"
)
public
ResponseSet
defaultCalculateN1100
(
@RequestBody
FxtlopStoreVo
fxtlopStoreVo
)
{
try
{
settleContext
.
loadSettleSession
(
"FXTLOP"
,
""
,
""
);
fxtlopTransactionService
.
defaultCalculateN1100
(
fxtlopStoreVo
);
return
ResponseSet
.
simpleSuccess
(
fxtlopStoreVo
);
}
catch
(
Exception
e
)
{
throw
e
;
}
finally
{
SettleContext
.
removeUserSession
();
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtlop/service/FxtlopService.java
View file @
4bfc0473
...
...
@@ -4,6 +4,4 @@ import com.brilliance.isc.funds.bo.funds.FxtlopStoreBo;
public
interface
FxtlopService
{
void
initFxtlop
(
FxtlopStoreBo
fxtlopStoreBo
);
void
defaultFxtlop
(
FxtlopStoreBo
fxtlopStoreBo
);
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtlop/service/impl/FxtlopServiceImpl.java
View file @
4bfc0473
package
com
.
brilliance
.
isc
.
funds
.
fxtlop
.
service
.
impl
;
import
com.brilliance.isc.common.cbsmod.service.XrtmodService
;
import
com.brilliance.isc.common.context.SettleContext
;
import
com.brilliance.isc.funds.bo.funds.FxtlopStoreBo
;
import
com.brilliance.isc.funds.fxtlop.service.FxtlopService
;
import
com.brilliance.mda.runtime.mda.util.Dates
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.slf4j.Logger
;
@Service
public
class
FxtlopServiceImpl
implements
FxtlopService
{
@Autowired
XrtmodService
xrtmodService
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FxtlopServiceImpl
.
class
);
@Override
...
...
@@ -19,30 +26,10 @@ public class FxtlopServiceImpl implements FxtlopService {
}
private
void
initFxtlop950
(
FxtlopStoreBo
fxtlopStoreBo
)
{
//this.getTrnmod().troLockExistingOrNewContract ( this.getFxdgrp());
// if DISSEL is empty, a contract can be copied
// if( Dynamic.troIsObjTypLoaded( this.getFxdgrp()) )
// {
// this.getFxtp().getRecget().setDissel( "X");
// }
// else
// {
// this.getFxtp().getRecget().setDissel( "");
// }
}
private
void
initFxtlop1000
(
FxtlopStoreBo
fxtlopStoreBo
)
{
// this.getFxtp().setPansta( PanStaEdit);
// this.getFxtp().getAplp().setPansta( PanStaEdit);
// Systems.resetVisible(this.getFxtp(),"ovwp");
// Systems.setActivePanel(this.getRegp());
// this.getFxdgrp().getCbs().getNom1().setCur( Dynamic.sysiso());
// Systems.resetEnabled(this.getFxdgrp().getCbs().getNom1(),"cur");
// Systems.setValues(this.getFxdgrp().getRec(),"fxtyp","LB" + CR + "LS");
}
@Override
public
void
defaultFxtlop
(
FxtlopStoreBo
fxtlopStoreBo
)
{
fxtlopStoreBo
.
getFxdgrp
().
getCbs
().
getNom1
().
setCur
(
xrtmodService
.
sysiso
());
// 成交日
if
(
MdaUtils
.
isEmpty
(
fxtlopStoreBo
.
getFxdgrp
().
getRec
().
getOpndat
())
||
(!
fxtlopStoreBo
.
getFxdgrp
().
getRec
().
isModified
(
"opndat"
))
)
{
...
...
@@ -54,8 +41,7 @@ public class FxtlopServiceImpl implements FxtlopService {
{
fxtlopStoreBo
.
getFxdgrp
().
getRec
().
setValdat
(
fxtlopStoreBo
.
getFxdgrp
().
getRec
().
getOpndat
());
}
String
extkey
=
SettleContext
.
getUserSession
().
getUsr
().
getExtkey
();
fxtlopStoreBo
.
getFxdgrp
().
getRec
().
setUsr
(
extkey
);
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtlop/service/impl/FxtlopTransactionServiceImpl.java
View file @
4bfc0473
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