Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
4fcb483d
Commit
4fcb483d
authored
Dec 09, 2022
by
DESKTOP-BQLVS7A\admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并两个信息表接口并进行更改
parent
3a0ff2e5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
263 additions
and
115 deletions
+263
-115
RectifyMsgEnum.java
...yeejoin/amos/boot/module/ugp/api/Enum/RectifyMsgEnum.java
+1
-1
RectifyMsgDto.java
...m/yeejoin/amos/boot/module/ugp/api/dto/RectifyMsgDto.java
+3
-0
RectifyMsg.java
...m/yeejoin/amos/boot/module/ugp/api/entity/RectifyMsg.java
+12
-0
RectifyMsgMapper.java
...oin/amos/boot/module/ugp/api/mapper/RectifyMsgMapper.java
+10
-1
IRectifyMsgService.java
.../amos/boot/module/ugp/api/service/IRectifyMsgService.java
+9
-2
RectifyMsgMapper.xml
...le-ugp-api/src/main/resources/mapper/RectifyMsgMapper.xml
+74
-0
RectifyMsgController.java
.../boot/module/ugp/biz/controller/RectifyMsgController.java
+48
-4
RectifyMsgServiceImpl.java
...ot/module/ugp/biz/service/impl/RectifyMsgServiceImpl.java
+106
-107
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/RectifyMsgEnum.java
View file @
4fcb483d
...
@@ -21,7 +21,7 @@ public enum RectifyMsgEnum {
...
@@ -21,7 +21,7 @@ public enum RectifyMsgEnum {
static
{
static
{
for
(
WeldMethodEnum
weldMethodEnum
:
WeldMethodEnum
.
values
())
{
for
(
WeldMethodEnum
weldMethodEnum
:
WeldMethodEnum
.
values
())
{
map
.
put
(
weldMethodEnum
.
get
State
(),
weldMethodEnum
.
getNam
e
());
map
.
put
(
weldMethodEnum
.
get
Name
(),
weldMethodEnum
.
getStat
e
());
}
}
}
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/dto/RectifyMsgDto.java
View file @
4fcb483d
...
@@ -30,6 +30,9 @@ public class RectifyMsgDto extends BaseDto {
...
@@ -30,6 +30,9 @@ public class RectifyMsgDto extends BaseDto {
@ApiModelProperty
(
value
=
"短信接收人"
)
@ApiModelProperty
(
value
=
"短信接收人"
)
private
Long
msgReceiver
;
private
Long
msgReceiver
;
@ApiModelProperty
(
value
=
"短信接收人姓名"
)
private
String
msgReceiverName
;
@ApiModelProperty
(
value
=
"短信通知内容"
)
@ApiModelProperty
(
value
=
"短信通知内容"
)
private
String
content
;
private
String
content
;
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/RectifyMsg.java
View file @
4fcb483d
...
@@ -29,6 +29,12 @@ public class RectifyMsg extends BaseEntity {
...
@@ -29,6 +29,12 @@ public class RectifyMsg extends BaseEntity {
private
Long
problemId
;
private
Long
problemId
;
/**
/**
* 项目安装告知id
*/
@TableField
(
"install_notice_id"
)
private
Long
installNoticeId
;
/**
* 短信通知单位id
* 短信通知单位id
*/
*/
@TableField
(
"notice_unit_id"
)
@TableField
(
"notice_unit_id"
)
...
@@ -58,4 +64,10 @@ public class RectifyMsg extends BaseEntity {
...
@@ -58,4 +64,10 @@ public class RectifyMsg extends BaseEntity {
@TableField
(
"is_read"
)
@TableField
(
"is_read"
)
private
Boolean
isRead
;
private
Boolean
isRead
;
/**
* 短信状态:已读、未读
*/
@TableField
(
"is_problem"
)
private
Boolean
isProblem
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/RectifyMsgMapper.java
View file @
4fcb483d
...
@@ -6,9 +6,12 @@ import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto;
...
@@ -6,9 +6,12 @@ import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto;
import
com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.RectifyMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.RectifyMsg
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.Set
;
/**
/**
* 整改短信通知表 Mapper 接口
* 整改短信通知表 Mapper 接口
*
*
...
@@ -19,7 +22,13 @@ import org.springframework.stereotype.Repository;
...
@@ -19,7 +22,13 @@ import org.springframework.stereotype.Repository;
public
interface
RectifyMsgMapper
extends
BaseMapper
<
RectifyMsg
>
{
public
interface
RectifyMsgMapper
extends
BaseMapper
<
RectifyMsg
>
{
IPage
<
RectifyMsgDto
>
queryForRectifyMsgPage
(
IPage
<
RectifyMsgDto
>
page
,
String
name
,
String
installationUnit
);
IPage
<
RectifyMsg
>
queryForRectifyMsgPage
(
IPage
<
RectifyMsg
>
page
,
String
name
,
String
isProblem
,
String
installationUnit
);
Page
<
RectifyMsgDto
>
InstallNoticeMsgPage
(
IPage
<
RectifyMsgDto
>
page
,
@Param
(
"name"
)
String
name
,
@Param
(
"installationUnit"
)
String
installationUnit
,
Set
<
String
>
seqs
);
Page
<
RectifyMsgDto
>
selectByName
(
Page
<
RectifyMsgDto
>
page
,
@Param
(
"name"
)
String
name
,
@Param
(
"unit"
)
String
unit
);
RectifyMsgDto
customSelectById
(
@Param
(
"sequenceNbr"
)
Long
sequenceNbr
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/service/IRectifyMsgService.java
View file @
4fcb483d
...
@@ -6,16 +6,23 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -6,16 +6,23 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.RectifyMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.RectifyMsg
;
import
org.springframework.stereotype.Service
;
/**
/**
*
整改
短信通知表接口类
* 短信通知表接口类
*
*
* @author system_generator
* @author system_generator
* @date 2022-09-22
* @date 2022-09-22
*/
*/
public
interface
IRectifyMsgService
{
public
interface
IRectifyMsgService
{
IPage
<
RectifyMsgDto
>
queryForRectifyMsgPage
(
IPage
<
RectifyMsgDto
>
page
,
String
name
,
String
installationUnit
);
IPage
<
RectifyMsg
>
queryForRectifyMsgPage
(
IPage
<
RectifyMsg
>
page
,
String
name
,
Boolean
isProblem
,
String
installationUnit
);
Page
<
RectifyMsgDto
>
installNoticeMsgList
(
Page
<
RectifyMsgDto
>
page
,
String
name
,
String
installationUnit
);
//安装告知页面分页查询
Page
<
RectifyMsgDto
>
selectByName
(
Page
<
RectifyMsgDto
>
page
,
String
name
,
String
unit
);
//根据sequenceNbr查询列表数据
RectifyMsgDto
customSelectById
(
Long
sequenceNbr
);
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/RectifyMsgMapper.xml
View file @
4fcb483d
...
@@ -23,5 +23,79 @@
...
@@ -23,5 +23,79 @@
</select>
</select>
<select
id=
"InstallNoticeMsgPage"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto"
>
SELECT `name`,
install_region,
start_date,
construction_unit,
installation_unit,
progress_status,
notice_unit_id,
msg_receiver,
content,
send_time,
tz_ugp_project.rec_date
FROM tz_ugp_project,
tz_ugp_rectify_msg,
tz_ugp_install_notice
where tz_ugp_project.sequence_nbr = tz_ugp_install_notice.project_id
and tz_ugp_rectify_msg.install_notice_id = tz_ugp_install_notice.sequence_nbr
<if
test=
"name != null and name != ''"
>
and tz_ugp_project.name like '%${name}%'
</if>
<if
test=
"installationUnit != null and installationUnit != ''"
>
and tz_ugp_project.installation_unit like concat("%",#{installationUnit},"%")
</if>
<if
test=
" seqs != null"
>
and tz_ugp_rectify_msg.install_notice_id in
<foreach
collection=
"seqs"
item =
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
order by rec_date desc
</select>
<select
id=
"selectByName"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto"
>
SELECT name,
install_region,
start_date,
construction_unit,
installation_unit,
progress_status,
notice_unit_id,
msg_receiver,
content,
send_time
FROM tz_ugp_project,
tz_ugp_rectify_msg,
tz_ugp_install_notice
where tz_ugp_project.sequence_nbr = tz_ugp_install_notice.project_id
and tz_ugp_rectify_msg.install_notice_id = tz_ugp_install_notice.sequence_nbr
<if
test=
"name != null and name != ''"
>
and tz_ugp_project.name = #{name}
</if>
<if
test=
"unit != null and unit != ''"
>
and tz_ugp_project.construction_unit_id = #{unit}
</if>
</select>
<select
id=
"customSelectById"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto"
>
SELECT name,
install_region,
start_date,
construction_unit,
installation_unit,
progress_status,
target_unit_id,
target_person_id,
content,
send_time
FROM tz_ugp_project,
tz_ugp_rectify_msg,
tz_ugp_install_notice
where tz_ugp_project.sequence_nbr = tz_ugp_install_notice.project_id
and tz_ugp_rectify_msg.install_notice_id = tz_ugp_install_notice.sequence_nbr
and tz_ugp_project.sequence_nbr = #{sequenceNbr}
</select>
</mapper>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/RectifyMsgController.java
View file @
4fcb483d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MsgNoticeDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MsgNoticeDto
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.RectifyMsg
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -36,6 +38,7 @@ public class RectifyMsgController extends BaseController {
...
@@ -36,6 +38,7 @@ public class RectifyMsgController extends BaseController {
@Autowired
@Autowired
RectifyMsgServiceImpl
rectifyMsgServiceImpl
;
RectifyMsgServiceImpl
rectifyMsgServiceImpl
;
/**
/**
* 新增整改短信通知表
* 新增整改短信通知表
*
*
...
@@ -94,20 +97,22 @@ public class RectifyMsgController extends BaseController {
...
@@ -94,20 +97,22 @@ public class RectifyMsgController extends BaseController {
*
*
* @param current 当前页
* @param current 当前页
* @param current 每页大小
* @param current 每页大小
* @Param isProblem 区分质量表和告知信息表
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"整改短信通知
表分页查询"
,
notes
=
"整改短信通知表
分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"整改短信通知
、告知分页查询"
,
notes
=
"整改短信通知表、告知
分页查询"
)
public
ResponseModel
<
IPage
<
RectifyMsg
Dto
>>
queryForPage
(
public
ResponseModel
<
IPage
<
RectifyMsg
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"isProblem"
)
Boolean
isProblem
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"installationUnit"
,
required
=
false
)
String
installationUnit
)
{
@RequestParam
(
value
=
"installationUnit"
,
required
=
false
)
String
installationUnit
)
{
IPage
<
RectifyMsg
Dto
>
page
=
new
Page
<
RectifyMsgDto
>();
IPage
<
RectifyMsg
>
page
=
new
Page
<
RectifyMsg
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
rectifyMsgServiceImpl
.
queryForRectifyMsgPage
(
page
,
name
,
installationUnit
));
return
ResponseHelper
.
buildResponse
(
rectifyMsgServiceImpl
.
queryForRectifyMsgPage
(
page
,
name
,
i
sProblem
,
i
nstallationUnit
));
}
}
/**
/**
...
@@ -145,4 +150,43 @@ public class RectifyMsgController extends BaseController {
...
@@ -145,4 +150,43 @@ public class RectifyMsgController extends BaseController {
page
.
setTotal
(
msgNoticeDtoList
.
size
());
page
.
setTotal
(
msgNoticeDtoList
.
size
());
return
ResponseHelper
.
buildResponse
(
page
);
return
ResponseHelper
.
buildResponse
(
page
);
}
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新项目安装告知短信记录表"
,
notes
=
"根据sequenceNbr更新项目安装告知短信记录表"
)
public
ResponseModel
<
RectifyMsgDto
>
updateBySequenceNbrInstallNoticeMsg
(
@RequestBody
RectifyMsgDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
rectifyMsgServiceImpl
.
updateWithModel
(
model
));
}
/**
* 安装告知短信通知记录列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/msgpage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"安装告知短信记录表分页查询"
,
notes
=
"项目安装告知短信记录表分页查询"
)
public
ResponseModel
<
Page
<
RectifyMsgDto
>>
queryForMsgPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"installationUnit"
,
required
=
false
)
String
installationUnit
){
Page
<
RectifyMsgDto
>
page
=
new
Page
<
RectifyMsgDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
rectifyMsgServiceImpl
.
installNoticeMsgList
(
page
,
name
,
installationUnit
));
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/RectifyMsgServiceImpl.java
View file @
4fcb483d
...
@@ -2,18 +2,19 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
...
@@ -2,18 +2,19 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.sun.org.apache.xpath.internal.operations.Bool
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.MsgNoticeDto
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.RectifyMsgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNoticeMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.InstallNoticeMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Project
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.RectifyMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.RectifyMsg
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMsgMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.RectifyMsgMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.RectifyMsgMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeMsgService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeMsgService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IRectifyMsgService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IRectifyMsgService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -32,7 +33,7 @@ import java.util.stream.Collectors;
...
@@ -32,7 +33,7 @@ import java.util.stream.Collectors;
* @date 2022-09-22
* @date 2022-09-22
*/
*/
@Service
@Service
public
class
RectifyMsgServiceImpl
extends
BaseService
<
RectifyMsgDto
,
RectifyMsg
,
RectifyMsgMapper
>
implements
IRectifyMsgService
{
public
class
RectifyMsgServiceImpl
extends
BaseService
<
RectifyMsgDto
,
RectifyMsg
,
RectifyMsgMapper
>
implements
IRectifyMsgService
{
@Autowired
@Autowired
IRectifyMsgService
iRectifyMsgService
;
IRectifyMsgService
iRectifyMsgService
;
...
@@ -42,17 +43,68 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
...
@@ -42,17 +43,68 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
@Autowired
@Autowired
OrgServiceImpl
orgService
;
OrgServiceImpl
orgService
;
@Autowired
ProjectResourceServiceImpl
projectResourceService
;
@Autowired
@Autowired
InstallNoticeMsgMapper
installNoticeMsgMapper
;
InstallNoticeMapper
installNoticeMapper
;
@Autowired
@Autowired
InstallNotice
MsgServiceImpl
installNoticeMsg
Service
;
InstallNotice
ServiceImpl
installNotice
Service
;
/**
/**
* 质量问题整改短信列表查询
* 质量问题整改短信列表查询
*/
*/
public
IPage
<
RectifyMsgDto
>
queryForRectifyMsgPage
(
IPage
<
RectifyMsgDto
>
page
,
String
name
,
String
installationUnit
)
{
public
IPage
<
RectifyMsg
>
queryForRectifyMsgPage
(
IPage
<
RectifyMsg
>
page
,
String
name
,
Boolean
isProblem
,
String
installationUnit
)
{
return
rectifyMsgMapper
.
queryForRectifyMsgPage
(
page
,
name
,
installationUnit
);
LambdaQueryWrapper
<
RectifyMsg
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
RectifyMsg:
:
getIsProblem
,
isProblem
);
// return rectifyMsgMapper.queryForRectifyMsgPage(page,name,String.valueOf(wrapper),installationUnit);
return
this
.
page
(
page
,
wrapper
);
}
@Override
public
Page
<
RectifyMsgDto
>
installNoticeMsgList
(
Page
<
RectifyMsgDto
>
page
,
String
name
,
String
installationUnit
)
{
List
<
Project
>
projectList
=
projectResourceService
.
getProjectList
();
List
<
InstallNotice
>
installNoticeList
=
new
ArrayList
<>();
List
<
RectifyMsgDto
>
pageDtoList
=
new
ArrayList
<>();
for
(
Project
project
:
projectList
)
{
LambdaQueryWrapper
<
InstallNotice
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
InstallNotice:
:
getProjectId
,
project
.
getSequenceNbr
());
List
<
InstallNotice
>
installNotice
=
installNoticeService
.
list
(
wrapper
);
installNoticeList
.
addAll
(
installNotice
);
}
Set
<
String
>
seqs
=
new
HashSet
<>();
for
(
InstallNotice
installNotice
:
installNoticeList
)
{
String
seq
=
String
.
valueOf
(
installNotice
.
getSequenceNbr
());
seqs
.
add
(
seq
);
}
Page
<
RectifyMsgDto
>
rectifyMsgDtoPageDtoPage
=
rectifyMsgMapper
.
InstallNoticeMsgPage
(
page
,
name
,
installationUnit
,
seqs
);
for
(
RectifyMsgDto
i
:
rectifyMsgDtoPageDtoPage
.
getRecords
())
{
OrgUsr
orgUsrById
=
orgService
.
getOrgId
(
String
.
valueOf
(
i
.
getNoticeUnitId
()));
//回显
i
.
setNoticeUnitName
(
String
.
valueOf
(
orgUsrById
.
getBizOrgName
()));
//接收人
OrgUsr
orgUsrById1
=
orgService
.
getOrgUsrById
(
String
.
valueOf
(
i
.
getMsgReceiver
()));
i
.
setMsgReceiverName
(
String
.
valueOf
(
orgUsrById1
.
getBizOrgName
()));
pageDtoList
.
add
(
i
);
}
rectifyMsgDtoPageDtoPage
.
setRecords
(
pageDtoList
);
return
rectifyMsgDtoPageDtoPage
;
}
@Override
public
Page
<
RectifyMsgDto
>
selectByName
(
Page
<
RectifyMsgDto
>
page
,
String
name
,
String
unit
)
{
return
this
.
getBaseMapper
().
selectByName
(
page
,
name
,
unit
);
}
@Override
public
RectifyMsgDto
customSelectById
(
Long
sequenceNbr
)
{
return
this
.
getBaseMapper
().
customSelectById
(
sequenceNbr
);
}
}
/**
/**
...
@@ -67,121 +119,68 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
...
@@ -67,121 +119,68 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
*/
*/
@BusinessIdentify
@BusinessIdentify
public
List
<
MsgNoticeDto
>
msgNotice
(
Boolean
isRead
){
public
List
<
MsgNoticeDto
>
msgNotice
(
Boolean
isRead
){
LambdaQueryWrapper
<
RectifyMsg
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
InstallNoticeMsg
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
RectifyMsg:
:
getMsgReceiver
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
wrapper
.
eq
(
InstallNoticeMsg:
:
getTargetPersonId
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
.
orderByDesc
(
InstallNoticeMsg:
:
getSendTime
);
if
(!
ValidationUtil
.
isEmpty
(
isRead
)){
wrapper
.
eq
(
InstallNoticeMsg:
:
getIsRead
,
isRead
);
}
LambdaQueryWrapper
<
RectifyMsg
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
RectifyMsg:
:
getMsgReceiver
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
.
orderByDesc
(
RectifyMsg:
:
getSendTime
);
.
orderByDesc
(
RectifyMsg:
:
getSendTime
);
if
(!
ValidationUtil
.
isEmpty
(
isRead
)){
if
(!
ValidationUtil
.
isEmpty
(
isRead
)){
wrapper
1
.
eq
(
RectifyMsg:
:
getIsRead
,
isRead
);
wrapper
.
eq
(
RectifyMsg:
:
getIsRead
,
isRead
);
}
}
List
<
RectifyMsg
>
rectifyMsgList
=
rectifyMsgMapper
.
selectList
(
wrapper1
);
List
<
RectifyMsg
>
rectifyMsgList
=
rectifyMsgMapper
.
selectList
(
wrapper
);
List
<
InstallNoticeMsg
>
installNoticeMsgList
=
installNoticeMsgMapper
.
selectList
(
wrapper
);
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsgList
))
{
if
(!
ValidationUtil
.
isEmpty
(
installNoticeMsgList
))
{
for
(
RectifyMsg
rectifyMsg
:
rectifyMsgList
)
{
for
(
InstallNoticeMsg
installNoticeMsg
:
installNoticeMsgList
)
{
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
String
contents
=
rectifyMsg
.
getContent
();
String
contents
=
installNoticeMsg
.
getContent
();
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
msgNoticeDto
.
setType
(
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
)));
String
form
=
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
));
msgNoticeDto
.
setContent
(
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
));
String
context
=
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
);
msgNoticeDto
.
setType
(
form
);
msgNoticeDto
.
setContent
(
context
);
}
if
(!
ValidationUtil
.
isEmpty
(
installNoticeMsg
.
getIsRead
())){
if
(
installNoticeMsg
.
getIsRead
()){
msgNoticeDto
.
setStatus
(
"已读"
);
installNoticeMsg
.
setIsRead
(
true
);
}
else
{
msgNoticeDto
.
setStatus
(
"未读"
);
installNoticeMsg
.
setIsRead
(
false
);
}
}
}
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsg
.
getIsRead
()))
{
msgNoticeDto
.
setCreateDate
(
installNoticeMsg
.
getSendTime
());
if
(
rectifyMsg
.
getIsRead
())
{
msgNoticeDto
.
setSequenceNbr
(
installNoticeMsg
.
getSequenceNbr
());
msgNoticeDto
.
setStatus
(
"已读"
);
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
else
{
}
msgNoticeDto
.
setStatus
(
"未读"
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsgList
))
{
for
(
RectifyMsg
rectifyMsg
:
rectifyMsgList
)
{
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
String
contents
=
rectifyMsg
.
getContent
();
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
msgNoticeDto
.
setType
(
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
)));
msgNoticeDto
.
setContent
(
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
));
}
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsg
.
getIsRead
())){
if
(
rectifyMsg
.
getIsRead
()){
msgNoticeDto
.
setStatus
(
"已读"
);
}
else
{
msgNoticeDto
.
setStatus
(
"未读"
);
}
}
msgNoticeDto
.
setCreateDate
(
rectifyMsg
.
getSendTime
());
msgNoticeDto
.
setSequenceNbr
(
rectifyMsg
.
getSequenceNbr
());
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
}
msgNoticeDto
.
setCreateDate
(
rectifyMsg
.
getSendTime
());
msgNoticeDto
.
setSequenceNbr
(
rectifyMsg
.
getSequenceNbr
());
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
}
}
return
msgNoticeDtoList
;
return
msgNoticeDtoList
;
}
}
@BusinessIdentify
@BusinessIdentify
public
List
<
MsgNoticeDto
>
allRead
(){
public
List
<
MsgNoticeDto
>
allRead
(){
LambdaQueryWrapper
<
InstallNoticeMsg
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
RectifyMsg
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
InstallNoticeMsg:
:
getTargetPersonId
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
wrapper
.
eq
(
RectifyMsg:
:
getMsgReceiver
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
.
orderByDesc
(
InstallNoticeMsg:
:
getSendTime
);
LambdaQueryWrapper
<
RectifyMsg
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
RectifyMsg:
:
getMsgReceiver
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
.
orderByDesc
(
RectifyMsg:
:
getSendTime
);
.
orderByDesc
(
RectifyMsg:
:
getSendTime
);
List
<
RectifyMsg
>
rectifyMsgList
=
rectifyMsgMapper
.
selectList
(
wrapper1
);
List
<
RectifyMsg
>
rectifyMsgList
=
rectifyMsgMapper
.
selectList
(
wrapper
);
List
<
InstallNoticeMsg
>
installNoticeMsgList
=
installNoticeMsgMapper
.
selectList
(
wrapper
);
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
installNoticeMsgList
))
{
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsgList
))
{
for
(
InstallNoticeMsg
installNoticeMsg
:
installNoticeMsgList
)
{
for
(
RectifyMsg
rectifyMsg
:
rectifyMsgList
)
{
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
String
contents
=
installNoticeMsg
.
getContent
();
String
contents
=
rectifyMsg
.
getContent
();
msgNoticeDto
.
setCreateDate
(
installNoticeMsg
.
getSendTime
());
msgNoticeDto
.
setCreateDate
(
rectifyMsg
.
getSendTime
());
msgNoticeDto
.
setSequenceNbr
(
installNoticeMsg
.
getSequenceNbr
());
msgNoticeDto
.
setSequenceNbr
(
rectifyMsg
.
getSequenceNbr
());
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
String
form
=
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
));
msgNoticeDto
.
setType
(
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
)));
String
context
=
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
);
msgNoticeDto
.
setContent
(
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
));
msgNoticeDto
.
setType
(
form
);
}
msgNoticeDto
.
setContent
(
context
);
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsg
.
getIsRead
()))
{
}
msgNoticeDto
.
setStatus
(
"已读"
);
if
(!
ValidationUtil
.
isEmpty
(
installNoticeMsg
.
getIsRead
())){
rectifyMsg
.
setIsRead
(
true
);
msgNoticeDto
.
setStatus
(
"已读"
);
rectifyMsgMapper
.
updateById
(
rectifyMsg
);
installNoticeMsg
.
setIsRead
(
true
);
}
installNoticeMsgMapper
.
updateById
(
installNoticeMsg
);
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsgList
))
{
for
(
RectifyMsg
rectifyMsg
:
rectifyMsgList
)
{
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
String
contents
=
rectifyMsg
.
getContent
();
msgNoticeDto
.
setCreateDate
(
rectifyMsg
.
getSendTime
());
msgNoticeDto
.
setSequenceNbr
(
rectifyMsg
.
getSequenceNbr
());
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
msgNoticeDto
.
setType
(
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
)));
msgNoticeDto
.
setContent
(
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
));
}
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsg
.
getIsRead
())){
msgNoticeDto
.
setStatus
(
"已读"
);
rectifyMsg
.
setIsRead
(
true
);
rectifyMsgMapper
.
updateById
(
rectifyMsg
);
}
}
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
}
return
msgNoticeDtoList
;
}
}
return
msgNoticeDtoList
;
}
...
...
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