Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
项目统一框架
amos-boot-biz
Commits
92744707
Commit
92744707
authored
Aug 31, 2022
by
xinglei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*)修改查询复议诉讼接口
parent
bce33775
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
11 deletions
+38
-11
InspectionServiceImpl.java
...ot/module/tzs/biz/service/impl/InspectionServiceImpl.java
+28
-11
StringUtils.java
...m/yeejoin/amos/boot/module/tzs/biz/utils/StringUtils.java
+10
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/InspectionServiceImpl.java
View file @
92744707
...
@@ -30,6 +30,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...
@@ -30,6 +30,8 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
java.util.*
;
import
java.util.*
;
import
static
java
.
util
.
regex
.
Pattern
.
compile
;
@Service
@Service
public
class
InspectionServiceImpl
implements
InspectionService
{
public
class
InspectionServiceImpl
implements
InspectionService
{
...
@@ -171,18 +173,23 @@ public class InspectionServiceImpl implements InspectionService {
...
@@ -171,18 +173,23 @@ public class InspectionServiceImpl implements InspectionService {
Object
companyId
=
JsonValueUtils
.
getValueByKey
(
JSONObject
.
parse
(
JSON
.
toJSONString
(
agencyUserModel
)),
"companys"
,
"companys.0.sequenceNbr"
);
Object
companyId
=
JsonValueUtils
.
getValueByKey
(
JSONObject
.
parse
(
JSON
.
toJSONString
(
agencyUserModel
)),
"companys"
,
"companys.0.sequenceNbr"
);
Collection
<
CompanyModel
>
result
=
Privilege
.
companyClient
.
queryAgencyTree
(
null
).
getResult
();
Collection
<
CompanyModel
>
result
=
Privilege
.
companyClient
.
queryAgencyTree
(
null
).
getResult
();
JSONObject
jsonObject
=
getParentCompanyName
(
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
result
)),
companyId
);
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
))
{
JSONObject
jsonObject
=
findParentCompanyById
(
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
result
)),
companyId
);
String
parentCompanyName
=
jsonObject
.
getString
(
"companyName"
);
String
parentCompanyName
=
null
;
jsonObject
.
clear
();
String
regionName
=
null
;
jsonObject
.
put
(
"reconsiderOrgName"
,
parentCompanyName
+
"/"
+
parentCompanyName
.
substring
(
0
,
parentCompanyName
.
indexOf
(
"区"
)
+
1
)
+
"人民政府"
);
jsonObject
.
put
(
"lawsuitOrgName"
,
parentCompanyName
.
substring
(
0
,
parentCompanyName
.
indexOf
(
"区"
)
+
1
)
+
"人员法院"
);
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
))
{
// 有上级单位
parentCompanyName
=
jsonObject
.
getString
(
"companyName"
);
String
selfCompanyName
=
JsonValueUtils
.
getValueByKey
(
JSONObject
.
parse
(
JSON
.
toJSONString
(
agencyUserModel
)),
"companys"
,
"companys.0.companyName"
).
toString
();
regionName
=
StringUtils
.
getStrByPattern
(
selfCompanyName
,
compile
(
"(.*?)省|(.*?)市|(.*?)区"
));
}
else
{
}
else
{
jsonObject
=
new
JSONObject
(
);
jsonObject
=
findCompanyById
(
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
result
)),
companyId
);
jsonObject
.
put
(
"reconsiderOrgName"
,
null
);
parentCompanyName
=
jsonObject
.
getString
(
"companyName"
);
jsonObject
.
put
(
"lawsuitOrgName"
,
null
);
regionName
=
StringUtils
.
getStrByPattern
(
parentCompanyName
,
compile
(
"(.*?)省"
)
);
}
}
jsonObject
.
clear
();
jsonObject
.
put
(
"reconsiderOrgName"
,
parentCompanyName
+
"/"
+
regionName
+
"人民政府"
);
jsonObject
.
put
(
"lawsuitOrgName"
,
regionName
+
"人员法院"
);
return
jsonObject
;
return
jsonObject
;
}
}
...
@@ -229,7 +236,7 @@ public class InspectionServiceImpl implements InspectionService {
...
@@ -229,7 +236,7 @@ public class InspectionServiceImpl implements InspectionService {
return
sql
;
return
sql
;
}
}
private
static
JSONObject
getParentCompanyName
(
JSONArray
companyModels
,
Object
companyId
)
{
private
static
JSONObject
findParentCompanyById
(
JSONArray
companyModels
,
Object
companyId
)
{
for
(
int
i
=
0
;
i
<
companyModels
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
companyModels
.
size
();
i
++)
{
JSONObject
jsonObject
=
findCompanyById
(
companyModels
.
getJSONObject
(
i
),
companyId
);
JSONObject
jsonObject
=
findCompanyById
(
companyModels
.
getJSONObject
(
i
),
companyId
);
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
))
{
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
))
{
...
@@ -239,6 +246,16 @@ public class InspectionServiceImpl implements InspectionService {
...
@@ -239,6 +246,16 @@ public class InspectionServiceImpl implements InspectionService {
return
null
;
return
null
;
}
}
private
static
JSONObject
findCompanyById
(
JSONArray
companyModels
,
Object
companyId
)
{
for
(
int
i
=
0
;
i
<
companyModels
.
size
();
i
++)
{
JSONObject
jsonObject
=
findCompanyById
(
companyModels
.
getJSONObject
(
i
),
companyId
);
if
(!
ValidationUtil
.
isEmpty
(
jsonObject
))
{
return
findCompanyById
(
companyModels
.
getJSONObject
(
i
),
jsonObject
.
getString
(
"sequenceNbr"
));
}
}
return
null
;
}
private
static
JSONObject
findCompanyById
(
JSONObject
treeNode
,
Object
companyId
)
{
private
static
JSONObject
findCompanyById
(
JSONObject
treeNode
,
Object
companyId
)
{
if
(
treeNode
.
getString
(
"sequenceNbr"
).
equals
(
String
.
valueOf
(
companyId
)))
{
if
(
treeNode
.
getString
(
"sequenceNbr"
).
equals
(
String
.
valueOf
(
companyId
)))
{
return
treeNode
;
return
treeNode
;
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/utils/StringUtils.java
View file @
92744707
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.tzs.biz.utils;
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.tzs.biz.utils;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.StringJoiner
;
import
java.util.StringJoiner
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
/**
/**
* @Author: xl
* @Author: xl
...
@@ -21,4 +23,12 @@ public class StringUtils {
...
@@ -21,4 +23,12 @@ public class StringUtils {
public
static
String
str2sqlValue
(
String
str
){
public
static
String
str2sqlValue
(
String
str
){
return
"'"
+
str
+
"'"
;
return
"'"
+
str
+
"'"
;
}
}
public
static
String
getStrByPattern
(
String
str
,
Pattern
reg
){
Matcher
mat
=
reg
.
matcher
(
str
);
while
(
mat
.
find
())
{
return
mat
.
group
(
0
);
}
return
""
;
}
}
}
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