From a1b1aeb71c81f96f07326c1c696040557b7823b7 Mon Sep 17 00:00:00 2001 From: wangxy <1481820854@qq.com> Date: Fri, 1 Nov 2024 08:40:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=87=AA=E6=9F=A5=E8=87=AA=E8=AF=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/manager/CheckReportManager.java | 5 ++++- .../controller/manager/TdMeetingManager.java | 1 + .../web/controller/manager/TdPlaceManager.java | 2 ++ .../system/domain/check/TdCheckReport.java | 17 +++++------------ .../system/domain/check/dto/CheckReportDTO.java | 16 +++++++--------- .../check/impl/TdCheckReportServiceImpl.java | 2 ++ .../service/impl/TdMeetingServiceImpl.java | 2 ++ .../service/place/impl/TdPlaceServiceImpl.java | 3 +++ .../mapper/system/TdCheckReportMapper.xml | 9 +++++++-- .../resources/mapper/system/TdMeetingMapper.xml | 4 +++- .../resources/mapper/system/TdPlaceMapper.xml | 8 ++++++-- 11 files changed, 42 insertions(+), 27 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CheckReportManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CheckReportManager.java index 413916a..8dfabdc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CheckReportManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CheckReportManager.java @@ -11,7 +11,6 @@ import com.ruoyi.system.domain.check.dto.*; import com.ruoyi.system.service.ISysDictDataService; import com.ruoyi.system.service.check.TdCheckReportService; import com.ruoyi.system.service.check.TdCheckTypeService; -import lombok.val; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; @@ -60,11 +59,15 @@ public class CheckReportManager { checkTypeService.lambdaUpdate() .eq(TdCheckType::getCheckId, checkReportDTO.getCheckId()) .remove(); + tdCheckReport.setUpdateTime(new Date()); + tdCheckReport.setUpdateBy(ShiroUtils.getSysUser().getUserName()); } else { tdCheckReport.setDepart(ShiroUtils.getSysUser().getDept().getDeptName()); tdCheckReport.setAdduser(ShiroUtils.getSysUser().getUserName()); tdCheckReport.setCreateTime(new Date()); + tdCheckReport.setCreateBy(ShiroUtils.getSysUser().getUserName()); } + tdCheckReport.setDeptId(ShiroUtils.getSysUser().getDeptId()); checkReportService.saveOrUpdate(tdCheckReport); List list = Convert.toList(TdCheckType.class, checkReportDTO.getCheckTypeDTOS()); list.forEach(checkReport -> checkReport.setCheckId(tdCheckReport.getCheckId())); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdMeetingManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdMeetingManager.java index 59aa75d..c3e5eed 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdMeetingManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdMeetingManager.java @@ -43,6 +43,7 @@ public class TdMeetingManager { tdMeeting.setCreateBy(ShiroUtils.getSysUser().getLoginName()); tdMeeting.setCreateTime(new Date()); } + tdMeeting.setDeptId(ShiroUtils.getSysUser().getDeptId()); return meetingService.saveOrUpdate(tdMeeting); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPlaceManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPlaceManager.java index 469f72f..f6e5ea1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPlaceManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPlaceManager.java @@ -50,6 +50,7 @@ public class TdPlaceManager { tdPlace.setIsDissolve("0"); tdPlace.setAfterName(tdPlace.getPlaceName()); tdPlace.setAfterRule(tdPlace.getPlaceRule()); + tdPlace.setDeptId(ShiroUtils.getSysUser().getDeptId()); return placeService.saveOrUpdate(tdPlace); } @@ -57,6 +58,7 @@ public class TdPlaceManager { public boolean updateChange(TdPlace tdPlace) { tdPlace.setAfterTime(new Date()); tdPlace.setState("2"); + tdPlace.setDeptId(ShiroUtils.getSysUser().getDeptId()); return placeService.saveOrUpdate(tdPlace); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/check/TdCheckReport.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/check/TdCheckReport.java index 7be86e8..df9b427 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/check/TdCheckReport.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/check/TdCheckReport.java @@ -6,8 +6,12 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonInclude; import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; @@ -20,7 +24,7 @@ import lombok.experimental.Accessors; @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) -public class TdCheckReport implements Serializable { +public class TdCheckReport extends BaseEntity { /** * id */ @@ -79,10 +83,6 @@ public class TdCheckReport implements Serializable { */ private String checkName; - /** - * 创建时间 - */ - private Date createTime; /** * 实有项目总分 @@ -102,13 +102,6 @@ public class TdCheckReport implements Serializable { @Excel(name = "得分占比") private String percentageScore; - - /** - * 备注 - */ - @Excel(name = "备注") - private String remark; - /** * 部门 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/check/dto/CheckReportDTO.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/check/dto/CheckReportDTO.java index 9d813ad..78d3f01 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/check/dto/CheckReportDTO.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/check/dto/CheckReportDTO.java @@ -2,13 +2,17 @@ package com.ruoyi.system.domain.check.dto; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonInclude; import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.io.Serializable; import java.util.Date; +import java.util.HashMap; +import java.util.Map; /** * 检查报告结果 @@ -18,7 +22,7 @@ import java.util.Date; @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) -public class CheckReportDTO implements Serializable { +public class CheckReportDTO extends BaseEntity { /** * id */ @@ -77,11 +81,6 @@ public class CheckReportDTO implements Serializable { */ private String checkName; - /** - * 创建时间 - */ - private Date createTime; - /** * 实有项目总分 */ @@ -102,10 +101,9 @@ public class CheckReportDTO implements Serializable { /** - * 备注 + * 部门 */ - @Excel(name = "备注") - private String remark; + private Long deptId; @TableField(exist = false) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/check/impl/TdCheckReportServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/check/impl/TdCheckReportServiceImpl.java index 3876841..2dad064 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/check/impl/TdCheckReportServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/check/impl/TdCheckReportServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.system.service.check.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.common.annotation.DataScope; import com.ruoyi.system.domain.check.TdCheckReport; import com.ruoyi.system.domain.check.dto.CheckReportDTO; import com.ruoyi.system.domain.count.CheckResultCountDTO; @@ -26,6 +27,7 @@ public class TdCheckReportServiceImpl extends ServiceImpl selectTdCheckReportList(CheckReportDTO tdCheckReport) { return checkReportMapper.selectTdCheckReportList(tdCheckReport); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdMeetingServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdMeetingServiceImpl.java index 57a7968..0df4924 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdMeetingServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdMeetingServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.system.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.common.annotation.DataScope; import com.ruoyi.system.domain.TdMeeting; import com.ruoyi.system.mapper.TdMeetingMapper; import com.ruoyi.system.service.TdMeetingService; @@ -21,6 +22,7 @@ public class TdMeetingServiceImpl extends ServiceImpl selectTdMeetingList(TdMeeting tdMeeting) { return meetingMapper.selectTdMeetingList(tdMeeting); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/place/impl/TdPlaceServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/place/impl/TdPlaceServiceImpl.java index 1e550aa..d671a72 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/place/impl/TdPlaceServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/place/impl/TdPlaceServiceImpl.java @@ -1,6 +1,7 @@ package com.ruoyi.system.service.place.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.common.annotation.DataScope; import com.ruoyi.system.domain.place.TdPlace; import com.ruoyi.system.mapper.TdMeetingMapper; import com.ruoyi.system.mapper.place.TdPlaceMapper; @@ -22,11 +23,13 @@ public class TdPlaceServiceImpl extends ServiceImpl @Resource private TdPlaceMapper placeMapper; + @DataScope(deptAlias = "d") @Override public List selectTdPlaceList(TdPlace tdPlace) { return placeMapper.selectTdPlaceList(tdPlace); } + @DataScope(deptAlias = "d") @Override public List selectTdPlaceChangeList(TdPlace tdPlace) { return placeMapper.selectTdPlaceChangeList(tdPlace); diff --git a/ruoyi-system/src/main/resources/mapper/system/TdCheckReportMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TdCheckReportMapper.xml index ea5cbc3..7d92847 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TdCheckReportMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TdCheckReportMapper.xml @@ -21,16 +21,19 @@ + + + check_id,adduser,depart, check_start_time,check_end_time,check_type, area,framework,check_state, - check_name,create_time,total_score,real_score,percentage_score,remark,dept_id + check_name,create_time,total_score,real_score,percentage_score,remark,dept_id,create_by,update_by,update_time diff --git a/ruoyi-system/src/main/resources/mapper/system/TdMeetingMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TdMeetingMapper.xml index ae18f9a..eb6d9e4 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TdMeetingMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TdMeetingMapper.xml @@ -33,7 +33,7 @@ file_name,create_by, create_time, update_by, update_time, remark,dept_id diff --git a/ruoyi-system/src/main/resources/mapper/system/TdPlaceMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TdPlaceMapper.xml index 48f038f..7edcb09 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TdPlaceMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TdPlaceMapper.xml @@ -27,21 +27,25 @@ update_time,remark,after_time,after_name,after_rule,state,is_dissolve,dept_id