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
61a87780
Commit
61a87780
authored
Sep 21, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
ac1957cf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
NoticeInfoCtrl.java
...om/keymobile/indicators/api/hytobacco/NoticeInfoCtrl.java
+3
-3
TaskServiceImpl.java
...le/indicators/service/dataenter/impl/TaskServiceImpl.java
+8
-2
NoticeInfoMapper.xml
src/main/resources/mybatis/mapping/NoticeInfoMapper.xml
+2
-4
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/NoticeInfoCtrl.java
View file @
61a87780
...
...
@@ -30,10 +30,10 @@ public class NoticeInfoCtrl {
public
Page
<
NoticeInfo
>
find
(
@ApiParam
(
"关键字搜索(标题)"
)
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@ApiParam
(
"页码,从1开始"
)
@RequestParam
(
"pageNo"
)
int
pageNo
,
@ApiParam
(
"每页条数"
)
@RequestParam
(
"pageSize"
)
int
pageSize
)
{
PageRequest
request
=
PageRequest
.
of
(
pageNo
,
pageSize
);
PageRequest
request
=
PageRequest
.
of
(
pageNo
-
1
,
pageSize
);
List
<
NoticeInfo
>
list
=
new
ArrayList
<>();
String
currentUserId
=
SystemUserUtil
.
getCurrentUserId
();
System
.
out
.
println
(
currentUserId
);
//
String currentUserId = SystemUserUtil.getCurrentUserId();
//
System.out.println(currentUserId);
long
total
=
noticeInfoService
.
findByPageCount
(
keyword
,
null
,
SystemUserUtil
.
getCurrentUserId
());
if
(
total
>
0
)
{
list
=
noticeInfoService
.
findByPage
(
keyword
,
null
,
SystemUserUtil
.
getCurrentUserId
(),
request
.
getOffset
(),
pageSize
);
...
...
src/main/java/com/keymobile/indicators/service/dataenter/impl/TaskServiceImpl.java
View file @
61a87780
...
...
@@ -407,17 +407,19 @@ public class TaskServiceImpl implements TaskService {
if
(
status
==
Constants
.
APPLY_STATE_DRAFT
){
String
user
=
SystemUserUtil
.
getCurrentUser
();
String
enterUserStr
=
task
.
getEnterUsers
();
System
.
out
.
println
(
"enterUserStr:"
+
enterUserStr
);
if
(
StringUtils
.
isNotBlank
(
enterUserStr
)){
List
<
NoticeInfo
>
noticeInfos
=
new
ArrayList
<>();
String
[]
enterUsers
=
enterUserStr
.
split
(
Constants
.
SEP_COMMA
);
//enterUserStr = ,42, 所以要忽略数组前后值
for
(
int
i
=
1
;
i
<
enterUsers
.
length
-
1
;
i
++){
boolean
isUser
=
false
;
for
(
int
i
=
1
;
i
<
enterUsers
.
length
;
i
++){
NoticeInfo
noticeInfo
=
new
NoticeInfo
();
noticeInfo
.
setTaskId
(
task
.
getId
());
noticeInfo
.
setNoticeClass
(
Constants
.
NOTICEINFO_DATA_ENTER
);
noticeInfo
.
setCreateTime
(
now
);
noticeInfo
.
setCreator
(
user
);
noticeInfo
.
setDetail
(
task
.
getRuleName
()
+
"-任务已经被"
+
auditUser
+
"驳回"
);
noticeInfo
.
setDetail
(
task
.
getRuleName
()
+
"-任务已经被"
+
auditUser
+
"驳回
,请重新填报。
"
);
noticeInfo
.
setTitle
(
"你有被驳回的任务:"
+
task
.
getRuleName
()
);
noticeInfo
.
setToUserId
(
enterUsers
[
i
]);
noticeInfo
.
setIsRead
(
false
);
...
...
@@ -425,10 +427,14 @@ public class TaskServiceImpl implements TaskService {
noticeInfo
.
setUpdater
(
user
);
noticeInfo
.
setUpdateTime
(
now
);
noticeInfos
.
add
(
noticeInfo
);
isUser
=
true
;
}
if
(
isUser
){
noticeInfoService
.
createNotices
(
noticeInfos
);
}
}
}
}
...
...
src/main/resources/mybatis/mapping/NoticeInfoMapper.xml
View file @
61a87780
...
...
@@ -3,13 +3,11 @@
<mapper
namespace=
"com.keymobile.indicators.model.mapper.indicators.NoticeInfoMapper"
>
<insert
id=
"batchInsert"
parameterType=
"list"
>
insert into notice_info
(title, detail, is_read, to_user,state,
creator,updater,create_time,update_time)
(title, detail, is_read, to_user,state,creator,updater,create_time,update_time,task_id,notice_class,url)
values
<foreach
collection=
"notices"
item=
"nt"
separator=
","
>
(
#{nt.title}, #{nt.detail}, #{nt.isRead}, #{nt.toUserId}, #{nt.state},
#{nt.creator},#{nt.updater}, #{nt.createTime}, #{nt.updateTime}
#{nt.title}, #{nt.detail}, #{nt.isRead}, #{nt.toUserId}, #{nt.state},#{nt.creator},#{nt.updater}, #{nt.createTime}, #{nt.updateTime},#{nt.taskId},#{nt.noticeClass},#{nt.url}
)
</foreach>
</insert>
...
...
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