Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xzxt-shiro
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
常超
xzxt-shiro
Commits
8a9706e2
Commit
8a9706e2
authored
May 13, 2020
by
xing_wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
海南单位特殊判断
parent
a7972ea8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
10 deletions
+40
-10
src/main/java/com/xzxtshiro/controller/admin/SysUserController.java
+38
-10
src/main/resources/resource/db.properties
+2
-0
No files found.
src/main/java/com/xzxtshiro/controller/admin/SysUserController.java
View file @
8a9706e2
...
@@ -6,6 +6,7 @@ import com.xzxtshiro.service.SysDictitemService;
...
@@ -6,6 +6,7 @@ import com.xzxtshiro.service.SysDictitemService;
import
com.xzxtshiro.service.SysRoleService
;
import
com.xzxtshiro.service.SysRoleService
;
import
com.xzxtshiro.service.SysUserService
;
import
com.xzxtshiro.service.SysUserService
;
import
com.xzxtshiro.util.Base64PasswordEncrypter
;
import
com.xzxtshiro.util.Base64PasswordEncrypter
;
import
com.xzxtshiro.util.PropertiesUtils
;
import
com.xzxtshiro.util.TokenUtil
;
import
com.xzxtshiro.util.TokenUtil
;
import
com.xzxtshiro.util.ZtreeDataUtil
;
import
com.xzxtshiro.util.ZtreeDataUtil
;
import
net.sf.json.JSONArray
;
import
net.sf.json.JSONArray
;
...
@@ -157,17 +158,44 @@ public class SysUserController {
...
@@ -157,17 +158,44 @@ public class SysUserController {
}
}
private
static
String
subUnitCode
(
String
usergrade
,
String
unitcode
,
String
dw
)
{
private
static
String
subUnitCode
(
String
usergrade
,
String
unitcode
,
String
dw
)
{
if
(
usergrade
.
equals
(
"S"
)
||
usergrade
.
equals
(
"T"
))
{
PropertiesUtils
propertiesUtil
=
new
PropertiesUtils
(
"resource/db.properties"
);
dw
=
unitcode
.
substring
(
0
,
2
);
String
ssdw
=
propertiesUtil
.
getValue
(
"ssdw"
);
}
else
if
(
usergrade
.
equals
(
"D"
))
{
if
(
ssdw
.
indexOf
(
"46"
)
==
0
)
{
dw
=
unitcode
.
substring
(
0
,
4
);
if
((
"S"
.
equals
(
usergrade
)
||
"T"
.
equals
(
usergrade
)))
{
}
else
if
(
usergrade
.
equals
(
"X"
))
{
dw
=
unitcode
.
substring
(
0
,
2
);
dw
=
unitcode
.
substring
(
0
,
6
);
}
else
{
}
else
if
(
usergrade
.
equals
(
"K"
))
{
if
(
unitcode
.
indexOf
(
"4690"
)==
0
){
//直属县
dw
=
unitcode
.
substring
(
0
,
8
);
if
(
"D"
.
equals
(
usergrade
))
{
}
else
if
(
usergrade
.
equals
(
"P"
))
{
dw
=
unitcode
.
substring
(
0
,
6
);
//原理地基单位下面去四位,但为了排除无效单位取两位即可
dw
=
unitcode
;
}
else
if
(
"X"
.
equals
(
usergrade
)){
dw
=
unitcode
.
substring
(
0
,
8
);
}
else
if
(
usergrade
.
equals
(
"K"
))
{
dw
=
unitcode
.
substring
(
0
,
10
);
}
}
else
{
if
(
usergrade
.
equals
(
"D"
)
)
{
dw
=
unitcode
.
substring
(
0
,
4
);
}
else
if
(
usergrade
.
equals
(
"X"
))
{
dw
=
unitcode
.
substring
(
0
,
6
);
}
else
if
(
usergrade
.
equals
(
"K"
))
{
dw
=
unitcode
.
substring
(
0
,
8
);
}
}
}
}
else
{
if
(
usergrade
.
equals
(
"S"
)
||
usergrade
.
equals
(
"T"
))
{
dw
=
unitcode
.
substring
(
0
,
2
);
}
else
if
(
usergrade
.
equals
(
"D"
))
{
dw
=
unitcode
.
substring
(
0
,
4
);
}
else
if
(
usergrade
.
equals
(
"X"
))
{
dw
=
unitcode
.
substring
(
0
,
6
);
}
else
if
(
usergrade
.
equals
(
"K"
))
{
dw
=
unitcode
.
substring
(
0
,
8
);
}
else
if
(
usergrade
.
equals
(
"P"
))
{
dw
=
unitcode
;
}
}
}
return
dw
;
return
dw
;
}
}
...
...
src/main/resources/resource/db.properties
View file @
8a9706e2
...
@@ -7,3 +7,4 @@ jdbc.password=XZXT
...
@@ -7,3 +7,4 @@ jdbc.password=XZXT
rest.host
=
http://127.0.0.1
rest.host
=
http://127.0.0.1
rest.port
=
9043
rest.port
=
9043
ssdw
=
460000000000
\ No newline at end of file
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