Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zczlService
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
曹崟
zczlService
Commits
8b2f5ebc
Commit
8b2f5ebc
authored
Apr 23, 2020
by
mayunfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
侦查指令移交时 人员选择问题
parent
7fc0cec5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
7 deletions
+13
-7
src/main/java/com/founder/redis/controller/DictController.java
+8
-4
src/main/java/com/founder/redis/service/IDicItemService.java
+1
-1
src/main/java/com/founder/redis/service/impl/IDicItemServiceImpl.java
+2
-1
src/main/resources/mapper/DictitemSqlMap.xml
+2
-1
No files found.
src/main/java/com/founder/redis/controller/DictController.java
View file @
8b2f5ebc
package
com
.
founder
.
redis
.
controller
;
import
com.alibaba.fastjson.JSONArray
;
import
com.founder.model.User
;
import
com.founder.model.ZTreeNode
;
import
com.founder.redis.service.IDicItemService
;
import
com.founder.redis.service.impl.ImportCode
;
...
...
@@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Comparator
;
...
...
@@ -25,12 +27,14 @@ public class DictController {
@RequestMapping
(
value
=
"/queryTypeCode"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
List
<
ZTreeNode
>
queryTypeCode
(
String
type
,
String
id
,
String
startId
,
String
yycj
,
String
name
,
String
isInit
)
{
public
List
<
ZTreeNode
>
queryTypeCode
(
HttpServletRequest
request
,
String
type
,
String
id
,
String
startId
,
String
yycj
,
String
name
,
String
isInit
)
{
List
<
ZTreeNode
>
ZTreeNodeList
=
new
ArrayList
<
ZTreeNode
>();
if
(
type
!=
null
&&
!
""
.
equals
(
type
))
{
if
(
type
.
equals
(
"CODE_JY"
)){
ZTreeNodeList
=
dicItemService
.
queryTypeUsercode
(
startId
,
name
);
//查询警员字典
}
if
(
type
.
equals
(
"CODE_SPJY"
)){
User
user
=
(
User
)
request
.
getSession
().
getAttribute
(
"user"
);
ZTreeNodeList
=
dicItemService
.
queryTypeUsercode
(
startId
,
name
,
user
.
getPolicemanid
());
//查询警员字典
}
else
if
(
type
.
equals
(
"CODE_SPJY"
)){
ZTreeNodeList
=
dicItemService
.
queryTypeSpUsercode
(
startId
,
name
);
//查询具有相应业务审批权限的警员字典
}
else
if
(
"0"
.
equals
(
isInit
)){
//非初始化调用
ZTreeNodeList
=
dicItemService
.
queryTypeCode
(
type
,
id
,
startId
,
yycj
,
name
);
...
...
@@ -85,7 +89,7 @@ public class DictController {
List
<
ZTreeNode
>
ZTreeNodeList
=
new
ArrayList
<
ZTreeNode
>();
if
(
code_type
!=
null
&&
!
""
.
equals
(
code_type
))
{
if
(
"CODE_JY"
.
equals
(
code_type
)){
ZTreeNodeList
=
dicItemService
.
queryTypeUsercode
(
startId
,
name
);
//查询警员字典
ZTreeNodeList
=
dicItemService
.
queryTypeUsercode
(
startId
,
name
,
""
);
//查询警员字典
}
else
if
(
"CODE_SPJY"
.
equals
(
code_type
)){
ZTreeNodeList
=
dicItemService
.
queryTypeSpUsercode
(
startId
,
name
);
//查询具有相应业务审批权限的警员字典
}
else
{
...
...
src/main/java/com/founder/redis/service/IDicItemService.java
View file @
8b2f5ebc
...
...
@@ -55,7 +55,7 @@ public interface IDicItemService {
*/
public
List
<
ZTreeNode
>
getXalbdmbcmsJson
(
String
codeVal
);
List
<
ZTreeNode
>
queryTypeUsercode
(
String
startId
,
String
name
);
List
<
ZTreeNode
>
queryTypeUsercode
(
String
startId
,
String
name
,
String
policeId
);
List
<
ZTreeNode
>
queryAllCode
(
String
type
);
...
...
src/main/java/com/founder/redis/service/impl/IDicItemServiceImpl.java
View file @
8b2f5ebc
...
...
@@ -68,11 +68,12 @@ public class IDicItemServiceImpl implements IDicItemService {
* @return
*/
@Override
public
List
<
ZTreeNode
>
queryTypeUsercode
(
String
startId
,
String
name
)
{
public
List
<
ZTreeNode
>
queryTypeUsercode
(
String
startId
,
String
name
,
String
policeId
)
{
List
<
ZTreeNode
>
ztreeNodes
=
new
ArrayList
<
ZTreeNode
>();
Map
m
=
new
HashMap
<>();
m
.
put
(
"unitcode"
,
startId
);
m
.
put
(
"true_name"
,
name
);
m
.
put
(
"policeId"
,
policeId
);
//拿到对应单位下的警员信息
List
<
User
>
users
=
dicItemDao
.
queryAllUnitUser
(
m
);
if
(
users
!=
null
&&
users
.
size
()>
0
){
//封装成node对象
...
...
src/main/resources/mapper/DictitemSqlMap.xml
View file @
8b2f5ebc
...
...
@@ -63,8 +63,9 @@
ID as id,
TRUE_NAME as trueName,
POLICEMANID as policemanid
from sys_user where scbz='0' and UNITCODE = #{unitcode } and OPEN_FLAG='1'
from sys_user where scbz='0' and UNITCODE = #{unitcode } and OPEN_FLAG='1'
<if
test=
"true_name!=null and true_name!=''"
>
and TRUE_NAME like '%'||#{true_name, jdbcType=VARCHAR}||'%'
</if>
<if
test=
"policeId!=null and policeId!=''"
>
and policemanid
<![CDATA[<>]]>
#{policeId, jdbcType=VARCHAR}
</if>
</select>
<select
id=
"getNameByCode"
parameterType=
"java.util.Map"
resultType=
"java.lang.String"
>
...
...
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