Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
Project
Project
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
c50c0c19
Commit
c50c0c19
authored
Mar 02, 2023
by
吴卿华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
正元app消息模块
parent
87649777
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
62 deletions
+80
-62
TStaningBook.java
.../src/main/java/com/zehong/system/domain/TStaningBook.java
+57
-54
TTrainCourseMapper.java
...ain/java/com/zehong/system/mapper/TTrainCourseMapper.java
+5
-0
TStaningBookServiceImpl.java
...m/zehong/system/service/impl/TStaningBookServiceImpl.java
+5
-3
TTrainCourseServiceImpl.java
...m/zehong/system/service/impl/TTrainCourseServiceImpl.java
+8
-5
TTrainCourseMapper.xml
...m/src/main/resources/mapper/system/TTrainCourseMapper.xml
+5
-0
No files found.
danger-manage-system/src/main/java/com/zehong/system/domain/TStaningBook.java
View file @
c50c0c19
...
...
@@ -66,9 +66,12 @@ public class TStaningBook extends BaseEntity
/** 整改建议 */
@Excel
(
name
=
"整改建议"
)
private
String
proposal
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
rectificationTerm
;
/** 投入费用 */
@Excel
(
name
=
"投入费用"
)
private
String
investmentCost
;
...
...
danger-manage-system/src/main/java/com/zehong/system/mapper/TTrainCourseMapper.java
View file @
c50c0c19
...
...
@@ -115,4 +115,9 @@ public interface TTrainCourseMapper
* @return
*/
int
updateReadStatus
(
Long
newsId
);
/**
* 查询接收人姓名
*/
String
selectRecipient
(
Long
userid
);
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TStaningBookServiceImpl.java
View file @
c50c0c19
...
...
@@ -91,14 +91,16 @@ public class TStaningBookServiceImpl implements ITStaningBookService
public
int
insertTStaningBook
(
TStaningBook
tStaningBook
)
{
tStaningBook
.
setCreateTime
(
DateUtils
.
getNowDate
());
/** 手机端消息新封装类 */
TNews
tNews
=
new
TNews
();
/**设置所属模块*/
tNews
.
setModule
(
2
);
//查询接收人姓名
// String nickName = tTrainCourseMapper.selectRecipient(tStaningBook.getRectification());
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
myDate
=
simpleDateFormat
.
format
(
tStaningBook
.
getRectificationTerm
());
/**设置内容*/
tNews
.
setMessageContent
(
"
您有一条新的隐患整改信息
"
);
tNews
.
setMessageContent
(
"
隐患排查:"
+
tStaningBook
.
getTroubleName
()+
",请于"
+
myDate
+
"前整改完毕。
"
);
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
SysUser
user
=
loginUser
.
getUser
();
Long
userId
=
user
.
getUserId
();
...
...
danger-manage-system/src/main/java/com/zehong/system/service/impl/TTrainCourseServiceImpl.java
View file @
c50c0c19
...
...
@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
...
...
@@ -69,7 +70,6 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
return
0
;
}
List
<
String
>
userIds
=
tTrainPlanMapper
.
selectAlluserByplanId
(
course
.
getCourseType
());
System
.
out
.
println
(
userIds
);
//异常数据
if
(
userIds
==
null
||
userIds
.
size
()==
0
){
return
0
;
...
...
@@ -81,9 +81,11 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
TNews
tNews
=
new
TNews
();
/**设置所属模块*/
tNews
.
setModule
(
Integer
.
valueOf
(
tTrainCourse1
.
getDataKind
()));
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
myDate
=
simpleDateFormat
.
format
(
tTrainCourse1
.
getTestEndTime
());
if
(
"0"
.
equals
(
tTrainCourse1
.
getDataKind
())){
/**设置消息内容*/
tNews
.
setMessageContent
(
"
您有一场新的培训课程
"
);
tNews
.
setMessageContent
(
"
培训课程:"
+
tTrainCourse1
.
getCourseName
()+
",已发布,请于"
+
myDate
+
"前进行学习
"
);
}
else
{
SecurityUtils
.
getUsername
();
tNews
.
setMessageContent
(
"您有一场新的试卷考试"
);
...
...
@@ -390,12 +392,13 @@ public class TTrainCourseServiceImpl implements ITTrainCourseService
TNews
tNews
=
new
TNews
();
/**设置所属模块*/
tNews
.
setModule
(
Integer
.
valueOf
(
tTrainCourse1
.
getDataKind
()));
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
String
myDate
=
simpleDateFormat
.
format
(
tTrainCourse1
.
getTestEndTime
());
if
(
"0"
.
equals
(
tTrainCourse1
.
getDataKind
())){
/**设置消息内容*/
tNews
.
setMessageContent
(
"
您有一场新的培训课程
"
);
tNews
.
setMessageContent
(
"
培训课程:"
+
tTrainCourse1
.
getCourseName
()+
"已发布,请于"
+
myDate
+
"前进行学习
"
);
}
else
{
SecurityUtils
.
getUsername
();
tNews
.
setMessageContent
(
"您有一场新的试卷考试"
);
tNews
.
setMessageContent
(
"考试:"
+
tTrainCourse1
.
getCourseName
()+
"已发布,请于"
+
myDate
+
"前进行学习"
);
}
LoginUser
loginUser
=
SecurityUtils
.
getLoginUser
();
SysUser
user
=
loginUser
.
getUser
();
...
...
danger-manage-system/src/main/resources/mapper/system/TTrainCourseMapper.xml
View file @
c50c0c19
...
...
@@ -256,9 +256,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select * from t_news where read_status='1' and recipient_id=#{recipientId} order by release_time desc
</select>
<!--修改消息状态为已读-->
<update
id=
"updateReadStatus"
>
update t_news set read_status='1' where news_id=#{newsId}
</update>
<!--查询接收人姓名-->
<select
id=
"selectRecipient"
resultType=
"java.lang.String"
>
select nick_name from sys_user where user_id=#{userid}
</select>
</mapper>
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