From 7ca78725d0762fc245ee3af682653c3eb5d6dddc Mon Sep 17 00:00:00 2001 From: fl <3098731433@qq.com> Date: Tue, 3 Dec 2024 09:46:18 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84=E8=80=83?= =?UTF-8?q?=E5=8B=A4=E8=A7=84=E5=88=99=E5=AE=A1=E6=A0=B8=E6=84=8F=E8=A7=81?= =?UTF-8?q?=E4=B8=8E=E5=A4=87=E6=B3=A8=E6=B7=B7=E6=B7=86=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/att/controller/OrgChangeController.java | 7 +++++-- .../com/bonus/system/att/entity/OrgChangeBean.java | 12 ++++++++++++ .../system/att/service/OrgChangeServiceImpl.java | 4 ++-- .../bonus/system/download/ExportFileController.java | 11 +++++++++++ .../main/resources/mapper/att/OrgChangeMapper.xml | 8 ++++---- 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/controller/OrgChangeController.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/controller/OrgChangeController.java index 3a04f24..60e641f 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/controller/OrgChangeController.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/controller/OrgChangeController.java @@ -1,5 +1,6 @@ package com.bonus.system.att.controller; +import com.bonus.common.core.utils.StringUtils; import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.core.web.page.TableDataInfo; @@ -58,8 +59,10 @@ public class OrgChangeController extends BaseController { public TableDataInfo getAllList(OrgChangeBean bean) { try{ startPage(); - //不查撤回的 - bean.setIsCheck("-1"); + if(StringUtils.isEmpty(bean.getIsCheck())){ + //不查撤回的 + bean.setIsCheck("-1"); + } return getDataTable(orgChangeService.selectOrgChangeList(bean)); }catch (Exception e){ log.error(e.toString(),e); diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/entity/OrgChangeBean.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/entity/OrgChangeBean.java index e27cecf..b87830b 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/entity/OrgChangeBean.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/entity/OrgChangeBean.java @@ -100,6 +100,11 @@ public class OrgChangeBean { @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date checkTime; + /** + * 审核意见 + */ + private String checkOpinion; + /** * 备注 */ @@ -122,4 +127,11 @@ public class OrgChangeBean { private String endTime; + /** + * 导出使用,审核页面导出还是使用人员页面导出 + * 1:人员页面导出,2:审核页面导出 + */ + private String exportType; + + } diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/OrgChangeServiceImpl.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/OrgChangeServiceImpl.java index 6882403..fc5ac5a 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/OrgChangeServiceImpl.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/att/service/OrgChangeServiceImpl.java @@ -79,9 +79,9 @@ public class OrgChangeServiceImpl implements OrgChangeService { String userName = sysUser.getUserName(); String orgName = sysUser.getOrgName(); if ("1".equals(o.getIsCheck())) { - o.setRemark("同意 " + orgName + " " + userName + " " + DateUtil.now()); + o.setCheckOpinion("同意 " + orgName + " " + userName + " " + DateUtil.now()); } else { - o.setRemark("不同意 " + orgName + " " + userName + " " + DateUtil.now()); + o.setCheckOpinion("不同意 " + orgName + " " + userName + " " + DateUtil.now()); } o.setCheckTime(DateUtil.date()); } else if (ownStatus.contains(o.getIsCheck())) { diff --git a/bonus-modules/bonus-system/src/main/java/com/bonus/system/download/ExportFileController.java b/bonus-modules/bonus-system/src/main/java/com/bonus/system/download/ExportFileController.java index a1fb2b0..39a4b54 100644 --- a/bonus-modules/bonus-system/src/main/java/com/bonus/system/download/ExportFileController.java +++ b/bonus-modules/bonus-system/src/main/java/com/bonus/system/download/ExportFileController.java @@ -9,6 +9,7 @@ import cn.hutool.poi.excel.ExcelWriter; import com.bonus.common.core.constant.BusinessConstants; import com.bonus.common.core.enums.AttStatus; import com.bonus.common.core.utils.ExcelStyleUtil; +import com.bonus.common.core.utils.StringUtils; import com.bonus.common.security.annotation.RequiresPermissions; import com.bonus.common.security.utils.SecurityUtils; import com.bonus.system.att.entity.*; @@ -564,6 +565,16 @@ public class ExportFileController { public void exportOrgChange(HttpServletResponse response, OrgChangeBean bean) { try { List personExportVoList = new ArrayList<>(); + if("1".equals(bean.getExportType())){ + //只查自己的 + Long userId = SecurityUtils.getLoginUser().getSysUser().getUserId(); + bean.setUserId(userId); + }else{ + if(StringUtils.isEmpty(bean.getIsCheck())){ + //不查撤回的 + bean.setIsCheck("-1"); + } + } List personLists = orgChangeService.selectOrgChangeList(bean); for (int i = 0; i < personLists.size(); i++) { OrgChangeBean vo = personLists.get(i); diff --git a/bonus-modules/bonus-system/src/main/resources/mapper/att/OrgChangeMapper.xml b/bonus-modules/bonus-system/src/main/resources/mapper/att/OrgChangeMapper.xml index 988f8c7..63588c0 100644 --- a/bonus-modules/bonus-system/src/main/resources/mapper/att/OrgChangeMapper.xml +++ b/bonus-modules/bonus-system/src/main/resources/mapper/att/OrgChangeMapper.xml @@ -72,11 +72,11 @@ - insert into org_change(user_id, old_org_id, new_org_id,is_change_att_group, change_effective_date, is_check + insert into org_change(user_id, old_org_id, new_org_id,is_change_att_group, change_effective_date, is_check, reamrk ,old_att_group ,new_att_group ) - values (#{userId},#{oldOrgId},#{newOrgId},#{isChangeAttGroup},#{changeEffectiveDate},#{isCheck} + values (#{userId},#{oldOrgId},#{newOrgId},#{isChangeAttGroup},#{changeEffectiveDate},#{isCheck},#{remark} ,#{oldAttGroup} ,#{newAttGroup} ) @@ -86,7 +86,7 @@ update org_change set user_id = #{userId}, old_org_id = #{oldOrgId}, new_org_id = #{newOrgId}, is_change_att_group = #{isChangeAttGroup}, change_effective_date = #{changeEffectiveDate}, - is_check = #{isCheck} + is_check = #{isCheck},remark = #{remark} ,old_att_group = #{oldAttGroup} ,new_att_group = #{newAttGroup} where id = #{id} @@ -95,7 +95,7 @@ update org_change - remark = #{remark}, + check_opinion = #{checkOpinion}, check_user_id = #{checkUserId}, check_time = #{checkTime},