Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
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
zhangkb
indicators
Commits
c3f8a9a5
Commit
c3f8a9a5
authored
Sep 24, 2021
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短板清单允许下发人部门用户查看
parent
7c1363d6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
6 deletions
+40
-6
ShortboardParam.java
...e/indicators/model/entity/shortboard/ShortboardParam.java
+7
-1
SystemAuthService.java
...a/com/keymobile/indicators/service/SystemAuthService.java
+10
-0
ShortboardTaskService.java
...e/indicators/service/hytobacco/ShortboardTaskService.java
+15
-4
ShortboardTaskMapper.xml
src/main/resources/mybatis/mapping/ShortboardTaskMapper.xml
+8
-1
No files found.
src/main/java/com/keymobile/indicators/model/entity/shortboard/ShortboardParam.java
View file @
c3f8a9a5
...
@@ -14,7 +14,7 @@ public class ShortboardParam {
...
@@ -14,7 +14,7 @@ public class ShortboardParam {
private
Long
offset
;
private
Long
offset
;
@ApiModelProperty
(
"一页条数"
)
@ApiModelProperty
(
"一页条数"
)
private
Integer
size
;
private
Integer
size
;
@ApiModelProperty
(
"搜索关键词"
)
@ApiModelProperty
(
"搜索关键词
---短板名称
"
)
private
String
keyword
;
private
String
keyword
;
@ApiModelProperty
(
"机构编码"
)
@ApiModelProperty
(
"机构编码"
)
private
String
code
;
private
String
code
;
...
@@ -26,4 +26,10 @@ public class ShortboardParam {
...
@@ -26,4 +26,10 @@ public class ShortboardParam {
private
String
userId
;
private
String
userId
;
@ApiModelProperty
(
"下发人id"
)
@ApiModelProperty
(
"下发人id"
)
private
String
createUserId
;
private
String
createUserId
;
@ApiModelProperty
(
"单位名称-模糊查询"
)
private
String
unitName
;
@ApiModelProperty
(
"日期精确查询--维度"
)
private
String
dateInt
;
}
}
src/main/java/com/keymobile/indicators/service/SystemAuthService.java
View file @
c3f8a9a5
...
@@ -81,4 +81,14 @@ public interface SystemAuthService {
...
@@ -81,4 +81,14 @@ public interface SystemAuthService {
*/
*/
@GetMapping
(
"/user/getUserById"
)
@GetMapping
(
"/user/getUserById"
)
String
getUserByIds
(
@RequestParam
List
<
String
>
userIds
)
;
String
getUserByIds
(
@RequestParam
List
<
String
>
userIds
)
;
/**
* 根据用户id获取到,该用户所属的机构下角色为3的用户
* @param: [userId]
* @author: hzc
* @date: 2021/9/24 16:35
*/
@GetMapping
(
"/user/getOrgRoleUser"
)
List
<
JSONObject
>
getOrgRoleUser
(
@RequestParam
(
"userId"
)
String
userId
);
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/ShortboardTaskService.java
View file @
c3f8a9a5
package
com
.
keymobile
.
indicators
.
service
.
hytobacco
;
package
com
.
keymobile
.
indicators
.
service
.
hytobacco
;
import
com.alibaba.fastjson.JSONObject
;
import
com.keymobile.indicators.constant.Constants
;
import
com.keymobile.indicators.constant.Constants
;
import
com.keymobile.indicators.model.entity.indicators.DriveIndCatalog
;
import
com.keymobile.indicators.model.entity.indicators.DriveIndCatalog
;
import
com.keymobile.indicators.model.entity.shortboard.*
;
import
com.keymobile.indicators.model.entity.shortboard.*
;
import
com.keymobile.indicators.model.mapper.indmapper.*
;
import
com.keymobile.indicators.model.mapper.indmapper.*
;
import
com.keymobile.indicators.result.Result
;
import
com.keymobile.indicators.result.Result
;
import
com.keymobile.indicators.service.SystemAuthService
;
import
com.keymobile.indicators.utils.LogManager
;
import
com.keymobile.indicators.utils.LogManager
;
import
com.keymobile.indicators.utils.SystemUserUtil
;
import
com.keymobile.indicators.utils.SystemUserUtil
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -30,7 +32,7 @@ public class ShortboardTaskService {
...
@@ -30,7 +32,7 @@ public class ShortboardTaskService {
private
ShortboardTaskValMapper
shortboardTaskValMapper
;
private
ShortboardTaskValMapper
shortboardTaskValMapper
;
@Autowired
@Autowired
private
S
hortboardRuleMapper
shortboardRuleMapper
;
private
S
ystemAuthService
systemAuthService
;
@Autowired
@Autowired
private
ShortBoardAuditRecordMapper
shortBoardAuditRecordMapper
;
private
ShortBoardAuditRecordMapper
shortBoardAuditRecordMapper
;
...
@@ -56,12 +58,21 @@ public class ShortboardTaskService {
...
@@ -56,12 +58,21 @@ public class ShortboardTaskService {
//下发人-存的是用户的登录id
//下发人-存的是用户的登录id
shortBoardTask
.
setCreateUserId
(
SystemUserUtil
.
getCurrentUserName
());
shortBoardTask
.
setCreateUserId
(
SystemUserUtil
.
getCurrentUserName
());
//接收人-主键id
//接收人-主键id
String
userId
=
SystemUserUtil
.
getCurrentUserId
();
String
enterUserId
=
shortBoardTask
.
getEnterUserId
();
String
enterUserId
=
shortBoardTask
.
getEnterUserId
();
enterUserId
=
enterUserId
+
userId
+
","
;
//填报接收人id 多个用逗号分开..|能看的用户如 ,1,2,|,3,4 1和2可以修改查看,3和4只能查看
StringBuilder
onlyReadUsers
=
new
StringBuilder
(
"|,"
);
//|后面的用户是只读
//只能查看的用户---|后面
List
<
JSONObject
>
orgRoleUsers
=
systemAuthService
.
getOrgRoleUser
(
SystemUserUtil
.
getCurrentUserName
());
for
(
JSONObject
orgRoleUser
:
orgRoleUsers
)
{
Integer
id
=
orgRoleUser
.
getInteger
(
"id"
);
onlyReadUsers
.
append
(
id
);
onlyReadUsers
.
append
(
","
);
}
enterUserId
=
enterUserId
+
onlyReadUsers
.
toString
();
shortBoardTask
.
setEnterUserId
(
enterUserId
);
shortBoardTask
.
setEnterUserId
(
enterUserId
);
String
currentUser
=
SystemUserUtil
.
getCurrentUser
();
String
currentUser
=
SystemUserUtil
.
getCurrentUser
();
String
[]
split
=
currentUser
.
split
(
Constants
.
SEP_COLON
);
String
[]
split
=
currentUser
.
split
(
Constants
.
SEP_COLON
);
if
(
split
.
length
>
2
){
if
(
split
.
length
>
2
){
...
...
src/main/resources/mybatis/mapping/ShortboardTaskMapper.xml
View file @
c3f8a9a5
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<sql
id=
"findWhereSql"
>
<sql
id=
"findWhereSql"
>
where 1 = 1
where 1 = 1
<if
test=
"keyword != null and keyword != ''"
>
<if
test=
"keyword != null and keyword != ''"
>
and sbt.
shortboard
_name like concat('%', #{keyword}, '%')
and sbt.
drive
_name like concat('%', #{keyword}, '%')
</if>
</if>
<if
test=
"statusArr != null"
>
<if
test=
"statusArr != null"
>
and sbt.status in
and sbt.status in
...
@@ -73,6 +73,13 @@
...
@@ -73,6 +73,13 @@
<if
test=
"createUserId !=null and createUserId!=''"
>
<if
test=
"createUserId !=null and createUserId!=''"
>
and sbt.create_user_id = #{createUserId}
and sbt.create_user_id = #{createUserId}
</if>
</if>
<if
test=
"dateInt !=null and dateInt!=0"
>
and sbt.date_int = #{dateInt}
</if>
<if
test=
"unitName !=null and unitName!=''"
>
and sbt.unit_name like concat('%',#{unitName},'%')
</if>
</sql>
</sql>
...
...
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