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
eb3a9e72
Commit
eb3a9e72
authored
Oct 11, 2024
by
jianglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查询和入口交易
parent
c1dcf8da
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
278 additions
and
0 deletions
+278
-0
FxToolComponent.java
...rilliance/isc/funds/common/component/FxToolComponent.java
+103
-0
FxtselResource.java
.../brilliance/isc/funds/fxtsel/resource/FxtselResource.java
+71
-0
FxtselService.java
...om/brilliance/isc/funds/fxtsel/service/FxtselService.java
+21
-0
FxtselServiceImpl.java
...ance/isc/funds/fxtsel/service/impl/FxtselServiceImpl.java
+83
-0
No files found.
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/component/FxToolComponent.java
View file @
eb3a9e72
...
@@ -18,6 +18,7 @@ import com.brilliance.isc.common.util.Utils;
...
@@ -18,6 +18,7 @@ import com.brilliance.isc.common.util.Utils;
import
com.brilliance.isc.common.vo.PtsptaVo
;
import
com.brilliance.isc.common.vo.PtsptaVo
;
import
com.brilliance.isc.mda.dao.FxdMapper
;
import
com.brilliance.isc.mda.dao.FxdMapper
;
import
com.brilliance.isc.mda.dao.FxtMapper
;
import
com.brilliance.isc.mda.dao.FxtMapper
;
import
com.brilliance.isc.vo.TrncodVo
;
import
com.brilliance.mda.runtime.mda.util.Dates
;
import
com.brilliance.mda.runtime.mda.util.Dates
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
com.brilliance.mda.runtime.mda.util.MdaUtils
;
import
com.brilliance.mda.runtime.mda.util.Strings
;
import
com.brilliance.mda.runtime.mda.util.Strings
;
...
@@ -226,4 +227,106 @@ public class FxToolComponent {
...
@@ -226,4 +227,106 @@ public class FxToolComponent {
}
}
public
String
getFxdInrByOwnref
(
String
ownref
)
{
Fxd
fxd
=
fxdMapper
.
selectByOwnref
(
ownref
);
if
(
fxd
!=
null
&&
StringUtils
.
isNotEmpty
(
fxd
.
getInr
()))
{
return
fxd
.
getInr
();
}
else
{
return
null
;
}
}
public
static
void
isFXTrnAllowed
(
Fxdgrp
fxdgrp
,
TrncodVo
trncodVo
)
{
fxdgrp
.
reset
();
String
trnNam
=
trncodVo
.
getInifrm
().
toUpperCase
();
String
errOpnY
=
"Selected foreign exchange is already opened."
;
String
errOpnN
=
"No foreign exchange selected."
;
String
errClsY
=
"Selected foreign exchange has been closed."
;
String
errQuoY
=
"Selected foreign exchange has been quoted."
;
String
errQuoN
=
"Selected foreign exchange has not quoted yet."
;
String
errSigY
=
"Sight exchange cannot settle at maturity."
;
String
errCnfY
=
"Selected foreign exchange has been confirmed."
;
String
errCnfN
=
"Selected foreign exchange has not been confirmed."
;
String
errAccN
=
"There is no amount in transit."
;
String
errZJB
=
"此交易只能资金部经办!"
;
String
errYYB
=
"此交易只能营运部经办!"
;
String
errHO
=
"Only Headoffice can quote."
;
String
errRel
=
"The former registration transaction(FXTSOP/FXTBOP) not released yet."
;
String
errSetY
=
"Selected foreign exchange has been settled."
;
String
errLB
=
""
;
if
(
"FXTLOP"
.
equals
(
trnNam
)||
"FXTFOP"
.
equals
(
trnNam
)||
"FXTDEP"
.
equals
(
trnNam
))
{
if
(!
StringUtils
.
isEmpty
(
fxdgrp
.
getRec
().
getInr
())){
trncodVo
.
setDisResult
(
errOpnY
);
trncodVo
.
setIsAllowed
(
"N"
);
}
}
if
(
"FXTLCM"
.
equals
(
trnNam
)||
"FXTFCM"
.
equals
(
trnNam
)||
"FXTDEM"
.
equals
(
trnNam
))
{
if
(
StringUtils
.
isEmpty
(
fxdgrp
.
getRec
().
getInr
())){
trncodVo
.
setDisResult
(
errOpnN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
else
if
(
Objects
.
nonNull
(
fxdgrp
.
getRec
().
getCnfdat
())){
trncodVo
.
setDisResult
(
errCnfY
);
trncodVo
.
setIsAllowed
(
"N"
);
}
if
(
Objects
.
nonNull
(
fxdgrp
.
getRec
().
getClsdat
())){
trncodVo
.
setDisResult
(
errClsY
);
trncodVo
.
setIsAllowed
(
"N"
);
}
//todo
// if (! CheckUsrBranch( "2" )) {
// //结售汇平盘确认交易只能营运部做
// trncodVo.setDisResult(errYYB);
// trncodVo.setIsAllowed("N");
// }
}
if
(
"FXTLCN"
.
equals
(
trnNam
)||
"FXTSUC"
.
equals
(
trnNam
)||
"FXTFCN"
.
equals
(
trnNam
)||
"FXTDEN"
.
equals
(
trnNam
))
{
if
(
StringUtils
.
isEmpty
(
fxdgrp
.
getRec
().
getInr
())){
trncodVo
.
setDisResult
(
errOpnN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
else
if
(
fxdgrp
.
getCbs
().
getOpn2
().
getAmt
().
compareTo
(
BigDecimal
.
valueOf
(
0
))
<=
0
){
trncodVo
.
setDisResult
(
errAccN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
if
(
Objects
.
nonNull
(
fxdgrp
.
getRec
().
getClsdat
())){
trncodVo
.
setDisResult
(
errClsY
);
trncodVo
.
setIsAllowed
(
"N"
);
}
if
(
Objects
.
isNull
(
fxdgrp
.
getRec
().
getCnfdat
())){
trncodVo
.
setDisResult
(
errCnfN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
}
if
(
MdaUtils
.
isEmpty
(
trnNam
))
{
String
msgTxt
=
"The selected transaction cannot be started under the selected F/X."
;
trncodVo
.
setDisResult
(
msgTxt
);
trncodVo
.
setIsAllowed
(
"N"
);
}
if
(
Strings
.
isEmpty
(
trncodVo
.
getDisResult
())){
trncodVo
.
setIsAllowed
(
"Y"
);
}
}
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtsel/resource/FxtselResource.java
0 → 100644
View file @
eb3a9e72
package
com
.
brilliance
.
isc
.
funds
.
fxtsel
.
resource
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.TrnCodeQueryVo
;
import
com.brilliance.isc.vo.funds.FxtselQueryVo
;
import
com.brilliance.isc.funds.fxtsel.service.FxtselService
;
import
io.swagger.annotations.ApiOperation
;
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
java.util.Map
;
@RestController
@RequestMapping
(
"/fxtsel"
)
public
class
FxtselResource
{
@Autowired
private
FxtselService
fxtselService
;
/*
*
* */
@PostMapping
(
"/list"
)
public
ResponseSet
list
(
@RequestBody
FxtselQueryVo
fxtselQueryVo
)
{
return
ResponseSet
.
simpleSuccess
(
fxtselService
.
list
(
fxtselQueryVo
));
}
@PostMapping
(
"/listjsh"
)
public
ResponseSet
listjsh
(
@RequestBody
FxtselQueryVo
fxtselQueryVo
)
{
return
ResponseSet
.
simpleSuccess
(
fxtselService
.
listjsh
(
fxtselQueryVo
));
}
@PostMapping
(
"/listdhpp"
)
public
ResponseSet
listdhpp
(
@RequestBody
FxtselQueryVo
fxtselQueryVo
)
{
return
ResponseSet
.
simpleSuccess
(
fxtselService
.
listdhpp
(
fxtselQueryVo
));
}
/**
* 处理按钮查看能够进行的交易
*/
@ApiOperation
(
"处理按钮查看能够进行的交易"
)
@PostMapping
(
"/dealWithByOwnref"
)
public
ResponseSet
dealWithByOwnref
(
@RequestBody
TrnCodeQueryVo
trnCodeQueryVo
)
{
return
ResponseSet
.
simpleSuccess
(
fxtselService
.
dealWithByInr
(
trnCodeQueryVo
));
}
@ApiOperation
(
"处理按钮查看能够进行的交易"
)
@PostMapping
(
"/dealWithByInr"
)
public
ResponseSet
dealWithByInr
(
@RequestBody
TrnCodeQueryVo
trnCodeQueryVo
)
{
return
ResponseSet
.
simpleSuccess
(
fxtselService
.
dealWithByInr
(
trnCodeQueryVo
));
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtsel/service/FxtselService.java
0 → 100644
View file @
eb3a9e72
package
com
.
brilliance
.
isc
.
funds
.
fxtsel
.
service
;
import
com.brilliance.isc.vo.TrncodVo
;
import
com.brilliance.isc.vo.TrnCodeQueryVo
;
import
com.brilliance.isc.vo.funds.FxtselQueryVo
;
import
com.github.pagehelper.PageInfo
;
import
java.util.List
;
import
java.util.Map
;
public
interface
FxtselService
{
PageInfo
list
(
FxtselQueryVo
fxtselQueryVo
);
PageInfo
listjsh
(
FxtselQueryVo
fxtselQueryVo
);
PageInfo
listdhpp
(
FxtselQueryVo
fxtselQueryVo
);
List
<
TrncodVo
>
dealWithByInr
(
TrnCodeQueryVo
trnCodeQueryVo
);
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/fxtsel/service/impl/FxtselServiceImpl.java
0 → 100644
View file @
eb3a9e72
package
com
.
brilliance
.
isc
.
funds
.
fxtsel
.
service
.
impl
;
import
com.brilliance.isc.bo.model.Fxdgrp
;
import
com.brilliance.isc.funds.common.component.FxToolComponent
;
import
com.brilliance.isc.common.util.StringUtils
;
//import com.brilliance.isc.funds.bo.Fxdgrp;
import
com.brilliance.isc.mda.dao.FxdMapper
;
import
com.brilliance.isc.vo.TrncodVo
;
import
com.brilliance.isc.vo.funds.FxtselQueryVo
;
import
com.brilliance.isc.vo.TrnCodeQueryVo
;
import
com.brilliance.isc.vo.funds.FxdWithPtsCbbResponseVo
;
import
com.brilliance.isc.funds.fxtsel.service.FxtselService
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.ImmutableMap
;
import
com.google.common.collect.Lists
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
@Service
public
class
FxtselServiceImpl
implements
FxtselService
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
FxtselServiceImpl
.
class
);
@Autowired
private
FxdMapper
fxdMapper
;
@Autowired
private
FxToolComponent
fxToolComponent
;
@Override
public
PageInfo
list
(
FxtselQueryVo
fxtselQueryVo
)
{
PageHelper
.
startPage
(
fxtselQueryVo
.
getPageNumber
(),
fxtselQueryVo
.
getPageSize
()).
setReasonable
(
true
);
List
<
FxdWithPtsCbbResponseVo
>
fxdList
=
fxdMapper
.
queryFxd
(
fxtselQueryVo
);
return
new
PageInfo
(
fxdList
);
}
@Override
public
PageInfo
listdhpp
(
FxtselQueryVo
fxtselQueryVo
)
{
//FB+FS
List
<
String
>
fxtypList
=
new
ArrayList
<>();
fxtypList
.
add
(
"FB"
);
fxtypList
.
add
(
"FS"
);
fxtselQueryVo
.
setFxtypList
(
fxtypList
);
PageHelper
.
startPage
(
fxtselQueryVo
.
getPageNumber
(),
fxtselQueryVo
.
getPageSize
()).
setReasonable
(
true
);
List
<
FxdWithPtsCbbResponseVo
>
fxdList
=
fxdMapper
.
queryFxd
(
fxtselQueryVo
);
return
new
PageInfo
(
fxdList
);
}
@Override
public
PageInfo
listjsh
(
FxtselQueryVo
fxtselQueryVo
)
{
//FB+FS
List
<
String
>
fxtypList
=
new
ArrayList
<>();
fxtypList
.
add
(
"SS"
);
fxtypList
.
add
(
"SB"
);
fxtselQueryVo
.
setFxtypList
(
fxtypList
);
PageHelper
.
startPage
(
fxtselQueryVo
.
getPageNumber
(),
fxtselQueryVo
.
getPageSize
()).
setReasonable
(
true
);
List
<
FxdWithPtsCbbResponseVo
>
fxdList
=
fxdMapper
.
queryFxd
(
fxtselQueryVo
);
return
new
PageInfo
(
fxdList
);
}
@Override
public
List
<
TrncodVo
>
dealWithByInr
(
TrnCodeQueryVo
trnCodeQueryVo
)
{
List
<
TrncodVo
>
result
=
Lists
.
newArrayList
();
Fxdgrp
fxdgrp
=
new
Fxdgrp
();
fxdgrp
=
fxToolComponent
.
getFxdgrpByInr
(
trnCodeQueryVo
.
getInr
());
String
[]
fxTraArray
=
{
"FXTFCM"
,
"FXTLCN"
};
String
[]
fxButArray
=
{
"外币兑换平盘确认"
,
"外币兑换平盘销账"
};
String
isAllowed
=
""
;
for
(
int
i
=
0
;
i
<
fxTraArray
.
length
;
i
++)
{
TrncodVo
trncodVo
=
new
TrncodVo
(
fxTraArray
[
i
],
fxButArray
[
i
],
isAllowed
,
"Y"
,
""
);
fxToolComponent
.
isFXTrnAllowed
(
fxdgrp
,
trncodVo
);
result
.
add
(
trncodVo
);
}
return
result
;
}
}
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