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
2fdf184d
Commit
2fdf184d
authored
Nov 07, 2024
by
jianglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增INFCRD
parent
cb613bc5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
250 additions
and
1 deletions
+250
-1
CrToolComponent.java
...rilliance/isc/funds/common/component/CrToolComponent.java
+48
-1
CrtselResource.java
.../brilliance/isc/funds/crtsel/resource/CrtselResource.java
+68
-0
CrtselService.java
...om/brilliance/isc/funds/crtsel/service/CrtselService.java
+19
-0
CrtselServiceImpl.java
...ance/isc/funds/crtsel/service/impl/CrtselServiceImpl.java
+115
-0
No files found.
isc-funds-business/src/main/java/com/brilliance/isc/funds/common/component/CrToolComponent.java
View file @
2fdf184d
...
...
@@ -30,6 +30,7 @@ import org.springframework.stereotype.Component;
import
javax.annotation.Resource
;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
static
com
.
brilliance
.
mda
.
runtime
.
mda
.
Constants
.
NULLSTR
;
...
...
@@ -209,11 +210,54 @@ public class CrToolComponent {
}
public
void
isFXTrnAllowed
(
Crdgrp
crdgrp
,
TrncodVo
trncodVo
)
{
public
static
void
isCRTrnAllowed
(
Crdgrp
crdgrp
,
TrncodVo
trncodVo
)
{
crdgrp
.
reset
();
String
trnNam
=
trncodVo
.
getInifrm
().
toUpperCase
();
String
ErrSelN
=
"No Clearing selected"
;
String
ErrClsY
=
"Selected Clearing is closed"
;
String
ErrClsN
=
"Selected Clearing is not closed"
;
String
ErrOpnN
=
"Selected Clearing is not yet opened"
;
String
ErrOpnY
=
"Selected Clearing is already opened"
;
String
ErrCanI
=
"Selected Clearing is already canceled"
;
switch
(
trnNam
){
case
"CRTCRI"
:
//# 自动清算
if
(!
StringUtils
.
isEmpty
(
crdgrp
.
getRec
().
getInr
())){
trncodVo
.
setDisResult
(
ErrOpnY
);
trncodVo
.
setIsAllowed
(
"N"
);
}
break
;
case
"CRTCRO"
:
case
"CRTFRE"
:
break
;
case
"CRTCBK"
:
case
"CRTCTF"
:
if
(
StringUtils
.
isEmpty
(
crdgrp
.
getRec
().
getInr
())){
trncodVo
.
setDisResult
(
ErrSelN
);
trncodVo
.
setIsAllowed
(
"N"
);
}
break
;
default
:
break
;
}
if
(
MdaUtils
.
isEmpty
(
trnNam
))
{
String
msgTxt
=
"The selected transaction cannot be started under the selected Clearing"
;
trncodVo
.
setDisResult
(
msgTxt
);
trncodVo
.
setIsAllowed
(
"N"
);
}
if
(
Strings
.
isEmpty
(
trncodVo
.
getDisResult
()))
{
trncodVo
.
setIsAllowed
(
"Y"
);
}
}
/**
* source:crtmod.0000.script
...
...
@@ -497,4 +541,7 @@ public class CrToolComponent {
return
gidgrp
;
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/crtsel/resource/CrtselResource.java
0 → 100644
View file @
2fdf184d
package
com
.
brilliance
.
isc
.
funds
.
crtsel
.
resource
;
import
com.brilliance.isc.funds.crtsel.service.CrtselService
;
import
com.brilliance.isc.vo.ResponseSet
;
import
com.brilliance.isc.vo.TrnCodeQueryVo
;
import
com.brilliance.isc.vo.funds.CrtselQueryVo
;
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
(
"/crtsel"
)
public
class
CrtselResource
{
@Autowired
private
CrtselService
crtselService
;
/*
*
* */
@PostMapping
(
"/list"
)
public
ResponseSet
list
(
@RequestBody
CrtselQueryVo
crtselQueryVo
)
{
return
ResponseSet
.
simpleSuccess
(
crtselService
.
list
(
crtselQueryVo
));
}
/**
* 处理按钮查看能够进行的交易
*/
@ApiOperation
(
"处理按钮查看能够进行的交易"
)
@PostMapping
(
"/dealWithByOwnref"
)
public
ResponseSet
dealWithByOwnref
(
@RequestBody
TrnCodeQueryVo
trnCodeQueryVo
)
{
return
ResponseSet
.
simpleSuccess
(
crtselService
.
dealWithByInr
(
trnCodeQueryVo
));
}
@ApiOperation
(
"处理按钮查看能够进行的交易"
)
@PostMapping
(
"/dealWithByInr"
)
public
ResponseSet
dealWithByInr
(
@RequestBody
TrnCodeQueryVo
trnCodeQueryVo
)
{
return
ResponseSet
.
simpleSuccess
(
crtselService
.
dealWithByInr
(
trnCodeQueryVo
));
}
/**
* 详情页面初始化
*/
@PostMapping
(
"/selectXxdByPrimaryKey"
)
public
ResponseSet
selectXxdByPrimaryKey
(
@RequestBody
Map
<
String
,
String
>
map
)
{
return
ResponseSet
.
simpleSuccess
(
crtselService
.
selectXxdByPrimaryKey
(
map
));
}
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/crtsel/service/CrtselService.java
0 → 100644
View file @
2fdf184d
package
com
.
brilliance
.
isc
.
funds
.
crtsel
.
service
;
import
com.brilliance.isc.vo.TrncodVo
;
import
com.brilliance.isc.vo.TrnCodeQueryVo
;
import
com.brilliance.isc.vo.funds.CrtselQueryVo
;
import
com.github.pagehelper.PageInfo
;
import
java.util.List
;
import
java.util.Map
;
public
interface
CrtselService
{
PageInfo
list
(
CrtselQueryVo
crtselQueryVo
);
List
<
TrncodVo
>
dealWithByInr
(
TrnCodeQueryVo
trnCodeQueryVo
);
Object
selectXxdByPrimaryKey
(
Map
<
String
,
String
>
map
);
}
isc-funds-business/src/main/java/com/brilliance/isc/funds/crtsel/service/impl/CrtselServiceImpl.java
0 → 100644
View file @
2fdf184d
package
com
.
brilliance
.
isc
.
funds
.
crtsel
.
service
.
impl
;
import
com.brilliance.isc.bo.Trn
;
import
com.brilliance.isc.bo.model.Crdgrp
;
import
com.brilliance.isc.common.sysmod.SysmodService
;
import
com.brilliance.isc.funds.bo.funds.CrtcriStoreBo
;
import
com.brilliance.isc.funds.bo.funds.FxtfopStoreBo
;
import
com.brilliance.isc.funds.common.component.CrToolComponent
;
import
com.brilliance.isc.funds.crtsel.service.CrtselService
;
import
com.brilliance.isc.mda.dao.CrdMapper
;
import
com.brilliance.isc.mda.dao.TrnMapper
;
import
com.brilliance.isc.vo.TrnCodeQueryVo
;
import
com.brilliance.isc.vo.TrncodVo
;
import
com.brilliance.isc.vo.funds.CrdWithPtsCbbResponseVo
;
import
com.brilliance.isc.vo.funds.CrtselQueryVo
;
import
com.brilliance.mda.runtime.mda.util.Strings
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
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
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
//import com.brilliance.isc.funds.bo.Crdgrp;
@Service
public
class
CrtselServiceImpl
implements
CrtselService
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
CrtselServiceImpl
.
class
);
@Autowired
private
CrdMapper
crdMapper
;
@Resource
private
TrnMapper
trnMapper
;
@Resource
private
SysmodService
sysmodService
;
@Autowired
private
CrToolComponent
crToolComponent
;
//业务查询
@Override
public
PageInfo
list
(
CrtselQueryVo
crtselQueryVo
)
{
//FB+FS
PageHelper
.
startPage
(
crtselQueryVo
.
getPageNumber
(),
crtselQueryVo
.
getPageSize
()).
setReasonable
(
true
);
List
<
CrdWithPtsCbbResponseVo
>
crdList
=
crdMapper
.
queryCrdInfo
(
crtselQueryVo
);
return
new
PageInfo
(
crdList
);
}
@Override
public
List
<
TrncodVo
>
dealWithByInr
(
TrnCodeQueryVo
trnCodeQueryVo
)
{
String
type
=
Strings
.
toUpper
(
trnCodeQueryVo
.
getType
());
String
inr
=
trnCodeQueryVo
.
getInr
();
List
<
TrncodVo
>
result
=
Lists
.
newArrayList
();
Crdgrp
crdgrp
=
crToolComponent
.
getCrdgrpByInr
(
inr
);
if
(
"I"
.
equals
(
crdgrp
.
getRec
().
getClrtyp
()))
{
//汇入清算
String
[]
crTraArray
=
{
"CRTCBK"
,
"CRTCTF"
};
String
[]
crButArray
=
{
"退汇清算"
,
"转汇清算"
};
String
isAllowed
=
""
;
for
(
int
i
=
0
;
i
<
crTraArray
.
length
;
i
++)
{
TrncodVo
trncodVo
=
new
TrncodVo
(
crTraArray
[
i
],
crButArray
[
i
],
isAllowed
,
"Y"
,
""
);
crToolComponent
.
isCRTrnAllowed
(
crdgrp
,
trncodVo
);
result
.
add
(
trncodVo
);
}
}
else
if
(
"O"
.
equals
(
crdgrp
.
getRec
().
getClrtyp
()))
{
//汇出清算
String
[]
crTraArray
=
{
"CRTCTF"
};
String
[]
crButArray
=
{
"转汇清算"
};
String
isAllowed
=
""
;
for
(
int
i
=
0
;
i
<
crTraArray
.
length
;
i
++)
{
TrncodVo
trncodVo
=
new
TrncodVo
(
crTraArray
[
i
],
crButArray
[
i
],
isAllowed
,
"Y"
,
""
);
crToolComponent
.
isCRTrnAllowed
(
crdgrp
,
trncodVo
);
result
.
add
(
trncodVo
);
}
}
return
result
;
}
@Override
public
Object
selectXxdByPrimaryKey
(
Map
<
String
,
String
>
map
)
{
String
objinr
=
map
.
get
(
"objinr"
);
String
objtyp
=
map
.
get
(
"objtyp"
);
String
pntinr
=
map
.
get
(
"pntinr"
);
CrtcriStoreBo
crtcriStoreBo
=
new
CrtcriStoreBo
();
crtcriStoreBo
.
reset
();
if
(
objinr
.
length
()
==
16
)
{
Trn
trnLid
=
trnMapper
.
selectByObjinrTrn
(
objtyp
,
objinr
,
"CRTCRI"
);
if
(!
Objects
.
isNull
(
trnLid
))
{
crtcriStoreBo
=
sysmodService
.
streamGetNameInSubDir
(
CrtcriStoreBo
.
class
,
trnLid
.
getInr
());
}
}
crtcriStoreBo
.
setCrdgrp
(
crToolComponent
.
getCrdgrpByInr
(
objinr
));
return
crtcriStoreBo
;
}
}
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