Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
swiftISOEditor
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
swift
swiftISOEditor
Commits
5c490d5e
Commit
5c490d5e
authored
May 10, 2024
by
lixinyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cips拟报时间截断
parent
1b8221a7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
service.js
editor_vue/src/iso/Service/service.js
+2
-2
CipsTransfer.java
...e/src/main/java/com/brilliance/mxeditor/CipsTransfer.java
+16
-2
CipsEditorController.java
.../brilliance/mxeditor/controller/CipsEditorController.java
+2
-1
No files found.
editor_vue/src/iso/Service/service.js
View file @
5c490d5e
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
import
axios
from
'axios'
import
axios
from
'axios'
const
service
=
axios
.
create
({
const
service
=
axios
.
create
({
baseURL
:
'/swift-editor-1.0.0'
,
//代理
//
baseURL: '/swift-editor-1.0.0', //代理
//
baseURL: '/swift-editor', //本地用这个
baseURL
:
'/swift-editor'
,
//本地用这个
timeout
:
50000
// request timeout
timeout
:
50000
// request timeout
})
})
...
...
swift-service/src/main/java/com/brilliance/mxeditor/CipsTransfer.java
View file @
5c490d5e
...
@@ -16,13 +16,14 @@ import org.slf4j.LoggerFactory;
...
@@ -16,13 +16,14 @@ import org.slf4j.LoggerFactory;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
public
class
CipsTransfer
{
public
class
CipsTransfer
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
CipsTransfer
.
class
);
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
CipsTransfer
.
class
);
public
static
String
transfer
(
String
gsonStr
)
{
public
static
String
transfer
(
String
gsonStr
)
throws
ParseException
{
Map
<
String
,
Object
>
gsonMaps
=
JSON
.
parseObject
(
gsonStr
);
Map
<
String
,
Object
>
gsonMaps
=
JSON
.
parseObject
(
gsonStr
);
Date
date
=
new
Date
();
Date
date
=
new
Date
();
SimpleDateFormat
dateFormat1
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
SimpleDateFormat
dateFormat1
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
...
@@ -103,6 +104,19 @@ public class CipsTransfer {
...
@@ -103,6 +104,19 @@ public class CipsTransfer {
gsonMaps
.
put
(
"OrigSenderSID"
,
"CIPS"
);
gsonMaps
.
put
(
"OrigSenderSID"
,
"CIPS"
);
gsonMaps
.
put
(
"OrigReceiverSID"
,
"CIPS"
);
gsonMaps
.
put
(
"OrigReceiverSID"
,
"CIPS"
);
Map
grpHdr
=
(
Map
)
gsonMaps
.
get
(
"GrpHdr"
);
if
(
grpHdr
.
get
(
"CreDtTm"
)
!=
null
){
String
creDtTm
=
(
String
)
grpHdr
.
get
(
"CreDtTm"
);
grpHdr
.
put
(
"CreDtTm"
,
creDtTm
.
substring
(
0
,
19
));
}
if
(
cdtTrfTxInf
.
get
(
"SttlmTmIndctn"
)
!=
null
){
Map
sttlmTmIndctn
=
(
Map
)
cdtTrfTxInf
.
get
(
"SttlmTmIndctn"
);
if
(
sttlmTmIndctn
.
get
(
"DbtDtTm"
)
!=
null
){
String
dbtDtTm
=
(
String
)
sttlmTmIndctn
.
get
(
"DbtDtTm"
);
sttlmTmIndctn
.
put
(
"DbtDtTm"
,
dbtDtTm
.
substring
(
0
,
19
));
}
}
String
swiftGsonStr
=
new
JSONObject
(
gsonMaps
).
toJSONString
();
String
swiftGsonStr
=
new
JSONObject
(
gsonMaps
).
toJSONString
();
System
.
out
.
println
(
"CIPSGsonStr------>:::"
+
swiftGsonStr
);
System
.
out
.
println
(
"CIPSGsonStr------>:::"
+
swiftGsonStr
);
//本地
//本地
...
@@ -244,7 +258,7 @@ public class CipsTransfer {
...
@@ -244,7 +258,7 @@ public class CipsTransfer {
return
maps
;
return
maps
;
}
}
public
static
void
main
(
String
[]
args
)
throws
IOException
{
public
static
void
main
(
String
[]
args
)
throws
IOException
,
ParseException
{
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\src\\main\\resources\\json\\pacs00800108.json"
);
File
file
=
new
File
(
System
.
getProperty
(
"user.dir"
)+
"\\src\\main\\resources\\json\\pacs00800108.json"
);
// File file = new File("d:/test/tst.json");
// File file = new File("d:/test/tst.json");
String
gsonStr
=
FileUtils
.
readFileToString
(
file
,
"UTF-8"
);
String
gsonStr
=
FileUtils
.
readFileToString
(
file
,
"UTF-8"
);
...
...
swift-service/src/main/java/com/brilliance/mxeditor/controller/CipsEditorController.java
View file @
5c490d5e
...
@@ -26,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -26,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
...
@@ -45,7 +46,7 @@ public class CipsEditorController {
...
@@ -45,7 +46,7 @@ public class CipsEditorController {
@RequestMapping
(
value
=
"/msgsend"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/msgsend"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
String
msgPreview
(
@RequestBody
SwiftVo
swiftVo
)
{
public
String
msgPreview
(
@RequestBody
SwiftVo
swiftVo
)
throws
ParseException
{
String
xml
=
null
;
String
xml
=
null
;
if
(
StringUtil
.
isNotEmpty
(
swiftVo
.
getJson
())){
if
(
StringUtil
.
isNotEmpty
(
swiftVo
.
getJson
())){
xml
=
transfer
(
swiftVo
.
getJson
());
xml
=
transfer
(
swiftVo
.
getJson
());
...
...
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