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
7b03a761
Commit
7b03a761
authored
Apr 24, 2019
by
caoyin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增指定审批人功能(指定具有审批权限且具备该指令业务的审批权限的人进行审批)
parent
c87b5097
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
47 deletions
+40
-47
src/main/java/com/founder/model/TbYwZczl.java
+9
-0
src/main/java/com/founder/zczl/controller/ZczlController.java
+19
-42
src/main/java/com/founder/zczl/service/IZczlService.java
+1
-1
src/main/java/com/founder/zczl/service/impl/ZczlService.java
+5
-2
src/main/resources/mapper/LoginMapper.xml
+1
-0
src/main/resources/mapper/ZczlMapper.xml
+4
-2
src/main/resources/version.txt
+1
-0
No files found.
src/main/java/com/founder/model/TbYwZczl.java
View file @
7b03a761
...
...
@@ -16,6 +16,7 @@ import java.util.List;
@SuppressWarnings
(
"serial"
)
public
class
TbYwZczl
extends
BaseModel
{
private
String
username
=
null
;
private
String
zdsprjh
=
null
;
//指定审批人警号
private
List
ywbhList
;
//业务编号list
private
String
ifFirst
;
//是否首次查询 no表示非第一次查询
...
...
@@ -885,4 +886,12 @@ public class TbYwZczl extends BaseModel{
public
void
setZdsprjh
(
String
zdsprjh
)
{
this
.
zdsprjh
=
zdsprjh
;
}
public
String
getUsername
()
{
return
username
;
}
public
void
setUsername
(
String
username
)
{
this
.
username
=
username
;
}
}
src/main/java/com/founder/zczl/controller/ZczlController.java
View file @
7b03a761
...
...
@@ -1144,48 +1144,15 @@ public class ZczlController {
,
@RequestParam
(
value
=
"rows"
,
defaultValue
=
"0"
)
int
rows
){
//判断是否第一次查询,第一次查询该值为空,默认显示对应权限的指令
//点击查询后显示所有的指令信息,但是只能对属于自己权限类的进行审批
User
user
=
(
User
)
request
.
getSession
().
getAttribute
(
"user"
);
String
ifFirst
=
tbYwZczl
.
getIfFirst
();
String
perurl
=
(
String
)
request
.
getSession
().
getAttribute
(
"perurl"
);
//拿到权限
Map
map
=
zczlService
.
getFpqxxxByUserId
(
user
.
getId
());
//如果是第一次查询判断具体权限,然后查询出对应权限的具体指令
//A010101_01 跨区域系列案件 对应代码 0
//A010101_02 通用 对应代码 1
//A010101_03 非接触性诈骗 对应代码 2
//A010101_04 涉枪类案件 对应代码 3
//A010101_05 刑事技术比中 对应代码 4
if
(
ifFirst
==
null
||
""
.
equals
(
ifFirst
.
trim
())){
//第一次查询
List
ywlxList
=
new
ArrayList
();
if
(
"admin"
.
equals
(
perurl
)){
ywlxList
.
add
(
"0"
);
ywlxList
.
add
(
"1"
);
ywlxList
.
add
(
"2"
);
ywlxList
.
add
(
"3"
);
ywlxList
.
add
(
"4"
);
}
else
{
if
(
perurl
.
indexOf
(
"A010101_01"
)!=-
1
){
ywlxList
.
add
(
"0"
);
}
if
(
perurl
.
indexOf
(
"A010101_02"
)!=-
1
){
ywlxList
.
add
(
"1"
);
}
if
(
perurl
.
indexOf
(
"A010101_03"
)!=-
1
){
ywlxList
.
add
(
"2"
);
}
if
(
perurl
.
indexOf
(
"A010101_04"
)!=-
1
){
ywlxList
.
add
(
"3"
);
}
if
(
perurl
.
indexOf
(
"A010101_05"
)!=-
1
){
ywlxList
.
add
(
"4"
);
}
if
(
ywlxList
==
null
||
ywlxList
.
size
()==
0
){
//未设置具体的单项权限则表示为全部都能审批()
ywlxList
.
add
(
"0"
);
ywlxList
.
add
(
"1"
);
ywlxList
.
add
(
"2"
);
ywlxList
.
add
(
"3"
);
ywlxList
.
add
(
"4"
);
}
}
tbYwZczl
.
setYwbhList
(
ywlxList
);
List
qxList
=
(
List
)
map
.
get
(
"qxList"
);
tbYwZczl
.
setYwbhList
(
qxList
);
}
tbYwZczl
.
setUsername
(
user
.
getUsername
());
EasyUIPage
easyUIPage
=
new
EasyUIPage
();
easyUIPage
.
setPage
(
page
);
easyUIPage
.
setPagePara
(
rows
);
...
...
@@ -1193,7 +1160,9 @@ public class ZczlController {
int
end
=
easyUIPage
.
getEnd
();
tbYwZczl
.
setBegin
(
begin
);
tbYwZczl
.
setEnd
(
end
);
if
(!
"admin"
.
equals
(
user
.
getUsername
())){
tbYwZczl
.
setZdsprjh
(
user
.
getPolicemanid
());
//只能查询指定审批人或者未指定审批人的指令
}
List
<
TbYwZczl
>
tbYwZczlList
=
zczlService
.
toQueryXywspdzczls
(
tbYwZczl
);
Integer
totalCount
=
0
;
totalCount
=
zczlService
.
toQueryXywspdzczlsForTotal
(
tbYwZczl
);
...
...
@@ -1205,12 +1174,15 @@ public class ZczlController {
objectMap
.
put
(
"zlwh"
,
zczl
.
getZlwh
());
//指令文号
objectMap
.
put
(
"ywlx_str"
,
zczl
.
getYwlx_str
());
//业务类型
//判断是否具有审批权限-------是否具有该业务类型的指令的审批权限(只能查看,不能审批)
if
(
ifFirst
==
null
||
""
.
equals
(
ifFirst
.
trim
())||
"admin"
.
equals
(
perurl
)){
//首次查询出的全部具有审批权限
if
(
ifFirst
==
null
||
""
.
equals
(
ifFirst
.
trim
())||
"admin"
.
equals
(
user
.
getUsername
())){
objectMap
.
put
(
"ifsp"
,
"1"
);
//是否能审批 1-能 0-不能
}
else
{
//判断业务类型是否在权限中
String
ywlx
=
zczl
.
getYwlx
();
if
(
perurl
.
indexOf
(
ywlx
)!=-
1
){
String
perurl
=
(
String
)
map
.
get
(
"qxStr"
);
//具有对应的权限且(未指定审批人或指定审批人且为自己)
if
(
perurl
.
indexOf
(
ywlx
)!=-
1
&&((
zczl
.
getZdsprjh
()==
null
||
""
.
equals
(
zczl
.
getZdsprjh
().
trim
()))||
user
.
getPolicemanid
().
equals
(
zczl
.
getZdsprjh
()))){
objectMap
.
put
(
"ifsp"
,
"1"
);
//是否能审批 1-能 0-不能
}
else
{
objectMap
.
put
(
"ifsp"
,
"0"
);
//是否能审批 1-能 0-不能
...
...
@@ -3220,7 +3192,11 @@ public class ZczlController {
objectMap
=
new
HashMap
<>();
objectMap
.
put
(
"xxzjbh"
,
spqx
.
getXxzjbh
());
objectMap
.
put
(
"userId"
,
spqx
.
getUserId
());
if
(
spqx
.
getYwlxStr
()==
null
){
objectMap
.
put
(
"ywlxStr"
,
""
);
}
else
{
objectMap
.
put
(
"ywlxStr"
,
spqx
.
getYwlxStr
());
}
objectMap
.
put
(
"xm"
,
spqx
.
getXm
());
objectMap
.
put
(
"dwmc"
,
spqx
.
getDwmc
());
objectMap
.
put
(
"lxdh"
,
spqx
.
getLxdh
());
...
...
@@ -3256,7 +3232,8 @@ public class ZczlController {
@ResponseBody
public
JSONArray
getFpqxxxByUserId
(
String
userId
){
List
<
String
>
qxList
=
new
ArrayList
<>();
qxList
=
zczlService
.
getFpqxxxByUserId
(
userId
);
Map
map
=
zczlService
.
getFpqxxxByUserId
(
userId
);
qxList
=
(
List
)
map
.
get
(
"qxList"
);
JSONArray
jsonArray
=
JSONArray
.
fromObject
(
qxList
);
return
jsonArray
;
}
...
...
src/main/java/com/founder/zczl/service/IZczlService.java
View file @
7b03a761
...
...
@@ -142,7 +142,7 @@ public interface IZczlService {
List
<
SysDictitem
>
getAllYwlx
();
List
<
String
>
getFpqxxxByUserId
(
String
userId
);
Map
getFpqxxxByUserId
(
String
userId
);
String
doQxfp
(
TbYwZczlSpqx
tbYwZczlSpqx
);
}
src/main/java/com/founder/zczl/service/impl/ZczlService.java
View file @
7b03a761
...
...
@@ -1763,7 +1763,7 @@ public class ZczlService implements IZczlService {
}
@Override
public
List
<
String
>
getFpqxxxByUserId
(
String
userId
)
{
public
Map
getFpqxxxByUserId
(
String
userId
)
{
List
<
String
>
qxList
=
new
ArrayList
<>();
String
qxStr
=
null
;
TbYwZczlSpqx
spqx
=
zczlDao
.
getFpqxxxByUserId
(
userId
);
...
...
@@ -1776,7 +1776,10 @@ public class ZczlService implements IZczlService {
}
}
}
return
qxList
;
Map
map
=
new
HashMap
();
map
.
put
(
"qxStr"
,
qxStr
);
map
.
put
(
"qxList"
,
qxList
);
return
map
;
}
/**
...
...
src/main/resources/mapper/LoginMapper.xml
View file @
7b03a761
...
...
@@ -8,6 +8,7 @@
IDENTITYCARD identitycard,
TELEPHONE telephone,
GRADE grade,
ID id,
USERNAME username,
UNITNAME unitname,
PASSWORD password,
...
...
src/main/resources/mapper/ZczlMapper.xml
View file @
7b03a761
...
...
@@ -611,13 +611,15 @@
<if
test=
"ywmc!=null and ywmc!=''"
>
and zczl.ywmc like '%'||#{ywmc, jdbcType=VARCHAR}||'%'
</if>
<if
test=
"zllx!=null and zllx!=''"
>
and zczl.zllx = #{zllx, jdbcType=VARCHAR}
</if>
<if
test=
"ywlx!=null and ywlx!=''"
>
and zczl.ywlx = #{ywlx, jdbcType=VARCHAR}
</if>
<if
test=
"ifFirst!='no'
"
>
<if
test=
"ifFirst!='no'
and username!='admin'"
>
<!-- 第一次查询且用户不为admin时查询指定的业务类型指令 --
>
and zczl.ywlx in
<foreach
collection=
"ywbhList"
item=
"lxlist"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{lxlist, jdbcType=VARCHAR}
</foreach>
and (zczl.ZDSPRJH is null or zczl.ZDSPRJH = #{zdsprjh, jdbcType=VARCHAR})
</if>
<if
test=
"spsftg!=null and spsftg!=''"
>
and zczl.spsftg = #{spsftg, jdbcType=VARCHAR}
</if>
<if
test=
"zljsdwdm!=null and zljsdwdm!=''"
>
and ${zljsdwdm}
</if>
<if
test=
"fbsj_s!=null and fbsj_s!=''"
>
and zczl.fbsj
<![CDATA[>=]]>
(to_date(#{fbsj_s, jdbcType=VARCHAR},'yyyy-MM-dd'))
</if>
...
...
@@ -1726,7 +1728,7 @@
<if
test=
"unitcode!=null and unitcode!=''"
>
and u.UNITCODE = #{unitcode, jdbcType=VARCHAR}
</if>
<if
test=
"xm!=null and xm!=''"
>
and u.TRUE_NAME like '%'||#{xm, jdbcType=VARCHAR}||'%'
</if>
<if
test=
"policemanid!=null and policemanid!=''"
>
and u.POLICEMANID like '%'||#{policemanid, jdbcType=VARCHAR}||'%'
</if>
<if
test=
"ywlx!=null and ywlx!=''"
>
and spqx.ywlx
= #{ywlx, jdbcType=VARCHAR}
</if>
<if
test=
"ywlx!=null and ywlx!=''"
>
and spqx.ywlx
like '%'||#{ywlx, jdbcType=VARCHAR}||'%'
</if>
<if
test=
"fpqxzt==1"
>
and spqx.USERID=u.ID
</if>
<!-- 已经分配 -->
<if
test=
"fpqxzt==0"
>
and u.id not in (select userid from TB_YW_ZCZL_SPQX where xxsc_pdbz='0')
</if>
<!-- 未分配 -->
order by u.id
...
...
src/main/resources/version.txt
View file @
7b03a761
...
...
@@ -49,5 +49,6 @@ version=@project.version@
#29.增加联络员移交指令信息功能 01:将之前联络员分派、签收的指令给改成新的联络员信息
#30.增加指令移交功能 01:将之前联络员签收的指令,移交给同单位的另外一个人负责(避免出差导致指令不能及时回报的问题)
#31.添加配置 01:跨域登录成功时返回成功提示
#32.新增指令审批指定人功能 01:新增指定审批人功能(指定具有审批权限且具备该指令业务的审批权限的人进行审批)
————————————————————@project.version@-——————————————————————————
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