Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
aroad_aqsc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
许言琪
aroad_aqsc
Commits
06e96cd6
提交
06e96cd6
authored
5月 05, 2019
作者:
宋文杰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(info information): fix info information to add reporter field and receiver_name field
上级
78b1a916
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
32 行增加
和
4 行删除
+32
-4
InfoInformationsDto.java
...ork/galaxy/aroad/module/info/dto/InfoInformationsDto.java
+5
-1
InfoInformations.java
...ork/galaxy/aroad/module/info/entity/InfoInformations.java
+5
-1
InfoReceivers.java
...mework/galaxy/aroad/module/info/entity/InfoReceivers.java
+4
-0
InfoInformationsServiceImpl.java
...module/info/service/impl/InfoInformationsServiceImpl.java
+15
-0
InfoInformationsMapper.xml
src/main/resources/mapper/info/InfoInformationsMapper.xml
+2
-2
UserMapper.xml
src/main/resources/mapper/system/UserMapper.xml
+1
-0
没有找到文件。
src/main/java/com/elephant/framework/galaxy/aroad/module/info/dto/InfoInformationsDto.java
浏览文件 @
06e96cd6
...
@@ -39,9 +39,13 @@ public class InfoInformationsDto implements Serializable {
...
@@ -39,9 +39,13 @@ public class InfoInformationsDto implements Serializable {
*/
*/
private
String
infoRemark
;
private
String
infoRemark
;
/**
/**
*
发布
人id
*
上报
人id
*/
*/
private
Integer
reporterId
;
private
Integer
reporterId
;
/**
* 上报人
*/
private
String
reporter
;
/**
/**
* 上报时间
* 上报时间
*/
*/
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/info/entity/InfoInformations.java
浏览文件 @
06e96cd6
...
@@ -47,9 +47,13 @@ private static final long serialVersionUID = 1L;
...
@@ -47,9 +47,13 @@ private static final long serialVersionUID = 1L;
*/
*/
private
String
infoRemark
;
private
String
infoRemark
;
/**
/**
*
发布
人id
*
上报
人id
*/
*/
private
Integer
reporterId
;
private
Integer
reporterId
;
/**
* 上报人
*/
private
String
reporter
;
/**
/**
* 上报时间
* 上报时间
*/
*/
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/info/entity/InfoReceivers.java
浏览文件 @
06e96cd6
...
@@ -41,5 +41,9 @@ private static final long serialVersionUID = 1L;
...
@@ -41,5 +41,9 @@ private static final long serialVersionUID = 1L;
* 接收人id
* 接收人id
*/
*/
private
Integer
receiverId
;
private
Integer
receiverId
;
/**
* 接收人姓名
*/
private
String
receiverName
;
}
}
src/main/java/com/elephant/framework/galaxy/aroad/module/info/service/impl/InfoInformationsServiceImpl.java
浏览文件 @
06e96cd6
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
info
.
service
.
impl
;
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
info
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.elephant.framework.galaxy.aroad.module.attendance.dto.MemberDto
;
import
com.elephant.framework.galaxy.aroad.module.info.dto.InfoInformationsDto
;
import
com.elephant.framework.galaxy.aroad.module.info.dto.InfoInformationsDto
;
import
com.elephant.framework.galaxy.aroad.module.info.entity.InfoInformations
;
import
com.elephant.framework.galaxy.aroad.module.info.entity.InfoInformations
;
import
com.elephant.framework.galaxy.aroad.module.info.entity.InfoReceivers
;
import
com.elephant.framework.galaxy.aroad.module.info.entity.InfoReceivers
;
import
com.elephant.framework.galaxy.aroad.module.info.mapper.InfoInformationsMapper
;
import
com.elephant.framework.galaxy.aroad.module.info.mapper.InfoInformationsMapper
;
import
com.elephant.framework.galaxy.aroad.module.info.service.InfoInformationsService
;
import
com.elephant.framework.galaxy.aroad.module.info.service.InfoInformationsService
;
import
com.elephant.framework.galaxy.aroad.module.info.service.InfoReceiversService
;
import
com.elephant.framework.galaxy.aroad.module.info.service.InfoReceiversService
;
import
com.elephant.framework.galaxy.aroad.module.system.service.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -26,6 +28,9 @@ public class InfoInformationsServiceImpl extends ServiceImpl<InfoInformationsMap
...
@@ -26,6 +28,9 @@ public class InfoInformationsServiceImpl extends ServiceImpl<InfoInformationsMap
@Autowired
@Autowired
private
InfoReceiversService
infoReceiversService
;
private
InfoReceiversService
infoReceiversService
;
@Autowired
private
UserService
userService
;
/**
/**
* @Description: 新增上报信息
* @Description: 新增上报信息
* @Param: [info]
* @Param: [info]
...
@@ -35,12 +40,17 @@ public class InfoInformationsServiceImpl extends ServiceImpl<InfoInformationsMap
...
@@ -35,12 +40,17 @@ public class InfoInformationsServiceImpl extends ServiceImpl<InfoInformationsMap
*/
*/
@Transactional
@Transactional
public
Boolean
saveInformations
(
InfoInformationsDto
info
){
public
Boolean
saveInformations
(
InfoInformationsDto
info
){
List
<
MemberDto
>
users
=
userService
.
getUsers
(
info
.
getReceiverIds
());
if
(
users
==
null
||
users
.
size
()
<=
0
){
return
false
;
}
InfoInformations
information
=
InfoInformations
.
builder
()
InfoInformations
information
=
InfoInformations
.
builder
()
.
templateId
(
info
.
getTemplateId
())
.
templateId
(
info
.
getTemplateId
())
.
infoTitle
(
info
.
getInfoTitle
())
.
infoTitle
(
info
.
getInfoTitle
())
.
infoContent
(
info
.
getInfoContent
())
.
infoContent
(
info
.
getInfoContent
())
.
infoRemark
(
info
.
getInfoRemark
())
.
infoRemark
(
info
.
getInfoRemark
())
.
reporterId
(
info
.
getReporterId
())
.
reporterId
(
info
.
getReporterId
())
.
reporter
(
info
.
getReporter
())
.
reportingTime
(
info
.
getReportingTime
())
.
reportingTime
(
info
.
getReportingTime
())
.
build
();
.
build
();
baseMapper
.
saveInformations
(
information
);
baseMapper
.
saveInformations
(
information
);
...
@@ -51,6 +61,11 @@ public class InfoInformationsServiceImpl extends ServiceImpl<InfoInformationsMap
...
@@ -51,6 +61,11 @@ public class InfoInformationsServiceImpl extends ServiceImpl<InfoInformationsMap
.
infoId
(
information
.
getInfoId
())
.
infoId
(
information
.
getInfoId
())
.
deptId
(
info
.
getDeptId
())
.
deptId
(
info
.
getDeptId
())
.
receiverId
(
r
)
.
receiverId
(
r
)
.
receiverName
(
users
.
stream
()
.
filter
((
s
)
->
s
.
getId
().
equals
(
r
))
.
findFirst
()
.
get
()
.
getName
())
.
build
());
.
build
());
});
});
return
infoReceiversService
.
saveBatch
(
receivers
);
return
infoReceiversService
.
saveBatch
(
receivers
);
...
...
src/main/resources/mapper/info/InfoInformationsMapper.xml
浏览文件 @
06e96cd6
...
@@ -16,8 +16,8 @@
...
@@ -16,8 +16,8 @@
<insert
id=
"saveInformations"
useGeneratedKeys=
"true"
keyProperty=
"infoId"
>
<insert
id=
"saveInformations"
useGeneratedKeys=
"true"
keyProperty=
"infoId"
>
insert into
insert into
info_informations(template_id, info_title,info_content,info_remark,reporter_id,reporting_time)
info_informations(template_id, info_title,info_content,info_remark,reporter_id,report
er,report
ing_time)
values
values
(#{templateId}, #{infoTitle},#{infoContent},#{infoRemark},#{reporterId},#{reportingTime})
(#{templateId}, #{infoTitle},#{infoContent},#{infoRemark},#{reporterId},#{report
er},#{report
ingTime})
</insert>
</insert>
</mapper>
</mapper>
src/main/resources/mapper/system/UserMapper.xml
浏览文件 @
06e96cd6
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
</resultMap>
</resultMap>
<resultMap
id=
"memberDtoMap"
type=
"com.elephant.framework.galaxy.aroad.module.attendance.dto.MemberDto"
>
<resultMap
id=
"memberDtoMap"
type=
"com.elephant.framework.galaxy.aroad.module.attendance.dto.MemberDto"
>
<result
property=
"id"
column=
"user_id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"phone"
column=
"phone"
/>
<result
property=
"phone"
column=
"phone"
/>
</resultMap>
</resultMap>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论