diff --git a/bonus-business/src/main/java/com/bonus/business/controller/system/SysUserController.java b/bonus-business/src/main/java/com/bonus/business/controller/system/SysUserController.java index 7a9fd00..7bf627c 100644 --- a/bonus-business/src/main/java/com/bonus/business/controller/system/SysUserController.java +++ b/bonus-business/src/main/java/com/bonus/business/controller/system/SysUserController.java @@ -34,7 +34,7 @@ import com.bonus.system.service.ISysUserService; /** * 用户信息 - * + * * @author ruoyi */ @RestController @@ -153,8 +153,8 @@ public class SysUserController extends BaseController { userService.checkUserAllowed(user); userService.checkUserDataScope(user.getUserId()); - deptService.checkDeptDataScope(user.getDeptId()); - roleService.checkRoleDataScope(user.getRoleIds()); + /*deptService.checkDeptDataScope(user.getDeptId()); + roleService.checkRoleDataScope(user.getRoleIds());*/ if (!userService.checkUserNameUnique(user)) { return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在"); diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/DayPlanController.java b/bonus-business/src/main/java/com/bonus/digital/controller/DayPlanController.java index 02b8082..855284f 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/DayPlanController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/DayPlanController.java @@ -55,7 +55,7 @@ public class DayPlanController extends BaseController { * @param dayPlanVo * @return */ - @PreAuthorize("@ss.hasPermi('day:plan:list')") + //@PreAuthorize("@ss.hasPermi('day:plan:list')") @GetMapping("/getDayPlanById") public AjaxResult getDayPlanById(DayPlanVo dayPlanVo) { try { @@ -67,7 +67,7 @@ public class DayPlanController extends BaseController { } } //新增日计划 - @PreAuthorize("@ss.hasPermi('day:plan:add')") + //@PreAuthorize("@ss.hasPermi('day:plan:add')") @PostMapping("/addDayPlan") public AjaxResult addMonthlyPlan(@RequestBody List dayPlanVoList) { try { @@ -84,7 +84,7 @@ public class DayPlanController extends BaseController { } //删除日计划 - @PreAuthorize("@ss.hasPermi('day:plan:del')") + //@PreAuthorize("@ss.hasPermi('day:plan:del')") @PostMapping("/delDayPlan") public AjaxResult delMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) { try { @@ -101,7 +101,7 @@ public class DayPlanController extends BaseController { } // 修改日计划 - @PreAuthorize("@ss.hasPermi('day:plan:update')") + //@PreAuthorize("@ss.hasPermi('day:plan:update')") @PostMapping("/updateDayPlan") public AjaxResult updateMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) { try { @@ -124,7 +124,7 @@ public class DayPlanController extends BaseController { * 2. startTime和endTime不同 → x月x日至x月x日工作量清单 */ @Log(title = "导出工作量汇总表", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('day:plan:export')") + //@PreAuthorize("@ss.hasPermi('day:plan:export')") @PostMapping("/exportWorkloadSummary") public void exportWorkloadSummary(HttpServletResponse response, DayPlanVo dayPlanVo) throws Exception { diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/InspectionStationController.java b/bonus-business/src/main/java/com/bonus/digital/controller/InspectionStationController.java index 291b61d..69727a8 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/InspectionStationController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/InspectionStationController.java @@ -28,7 +28,7 @@ public class InspectionStationController extends BaseController { /** * 获取0:运检站1:项目部 */ - @PreAuthorize("@ss.hasPermi('inspection:station:list')") + //@PreAuthorize("@ss.hasPermi('inspection:station:list')") @GetMapping("/getInspectionStationList") public TableDataInfo getInspectionStationList(InspectionStationVo inspectionStationVo) { @@ -45,7 +45,7 @@ public class InspectionStationController extends BaseController { /** * 新增0:运检站1:项目部 */ - @PreAuthorize("@ss.hasPermi('inspection:station:add')") + //@PreAuthorize("@ss.hasPermi('inspection:station:add')") @PostMapping("/addInspectionStation") public AjaxResult addInspectionStation(@RequestBody @Validated InspectionStationVo inspectionStationVo) { @@ -67,7 +67,7 @@ public class InspectionStationController extends BaseController { /** * 删除0:运检站1:项目部 */ - @PreAuthorize("@ss.hasPermi('inspection:station:del')") + //@PreAuthorize("@ss.hasPermi('inspection:station:del')") @PostMapping("/delInspectionStation") public AjaxResult delClassification(@RequestBody InspectionStationVo inspectionStationVo) { @@ -89,7 +89,7 @@ public class InspectionStationController extends BaseController { /** * 修改0:运检站1:项目部 */ - @PreAuthorize("@ss.hasPermi('inspection:station:update')") + //@PreAuthorize("@ss.hasPermi('inspection:station:update')") @PostMapping("/updateInspectionStation") public AjaxResult updateInspectionStation(@RequestBody @Validated InspectionStationVo inspectionStationVo) { diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/MonthlyPlanController.java b/bonus-business/src/main/java/com/bonus/digital/controller/MonthlyPlanController.java index 2f0e823..96f3cc0 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/MonthlyPlanController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/MonthlyPlanController.java @@ -9,6 +9,7 @@ import com.bonus.common.core.controller.BaseController; import com.bonus.common.core.domain.AjaxResult; import com.bonus.common.core.page.TableDataInfo; import com.bonus.common.enums.BusinessType; +import com.bonus.common.utils.SecurityUtils; import com.bonus.digital.dao.*; import com.bonus.digital.service.MonthlyPlanService; import com.bonus.framework.config.FastJson2JsonRedisSerializer; @@ -68,7 +69,7 @@ public class MonthlyPlanController extends BaseController { /** * 新增月计划 */ - @PreAuthorize("@ss.hasPermi('monthly:plan:add')") + //@PreAuthorize("@ss.hasPermi('monthly:plan:add')") @PostMapping("/addMonthlyPlan") public AjaxResult addMonthlyPlan(@RequestBody List monthlyPlanVo) { try { @@ -89,7 +90,7 @@ public class MonthlyPlanController extends BaseController { /** * 删除月计划 */ - @PreAuthorize("@ss.hasPermi('monthly:plan:del')") + //@PreAuthorize("@ss.hasPermi('monthly:plan:del')") @PostMapping("/delMonthlyPlan") public AjaxResult delMonthlyPlan(@RequestBody MonthlyPlanVo monthlyPlanVo) { try { @@ -110,7 +111,7 @@ public class MonthlyPlanController extends BaseController { /** * 修改月计划 */ - @PreAuthorize("@ss.hasPermi('monthly:plan:update')") + //@PreAuthorize("@ss.hasPermi('monthly:plan:update')") @PostMapping("/updateMonthlyPlan") public AjaxResult updateMonthlyPlan(@RequestBody MonthlyPlanVo monthlyPlanVo) { try { @@ -127,7 +128,7 @@ public class MonthlyPlanController extends BaseController { } @Log(title = "导出人员安排表", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('monthly:plan:export')") + //@PreAuthorize("@ss.hasPermi('monthly:plan:export')") @PostMapping("/export") public void export(HttpServletResponse response, MonthlyPlanVo monthlyPlanVo) { @@ -156,7 +157,7 @@ public class MonthlyPlanController extends BaseController { } @Log(title = "导出工作量汇总表", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('monthly:plan:export')") + //@PreAuthorize("@ss.hasPermi('monthly:plan:export')") @PostMapping("/exportWorkloadSummary") public void exportWorkloadSummary(HttpServletResponse response, MonthlyPlanVo monthlyPlanVo) { @@ -186,7 +187,7 @@ public class MonthlyPlanController extends BaseController { } @Log(title = "导出月计划资源汇总表", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('monthly:plan:export')") + //@PreAuthorize("@ss.hasPermi('monthly:plan:export')") @PostMapping("/exportResourceSummary") public void exportResourceSummary(HttpServletResponse response, MonthlyPlanVo monthlyPlanVo) throws IOException { diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/PersonnelClassificationController.java b/bonus-business/src/main/java/com/bonus/digital/controller/PersonnelClassificationController.java index 7d3b17e..687fffd 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/PersonnelClassificationController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/PersonnelClassificationController.java @@ -28,7 +28,7 @@ public class PersonnelClassificationController extends BaseController { /** * 获取0:人员分类1:人员性质2:岗位列表 */ - @PreAuthorize("@ss.hasPermi('personnel:classification:list')") + //@PreAuthorize("@ss.hasPermi('personnel:classification:list')") @GetMapping("/getClassificationList") public TableDataInfo getClassificationList(PersonnelClassificationVo personnelClassificationVo) { @@ -45,7 +45,7 @@ public class PersonnelClassificationController extends BaseController { /** * 新增0:人员分类1:人员性质2:岗位列表 */ - @PreAuthorize("@ss.hasPermi('personnel:classification:add')") + //@PreAuthorize("@ss.hasPermi('personnel:classification:add')") @PostMapping("/addClassification") public AjaxResult addClassification(@RequestBody @Validated PersonnelClassificationVo personnelClassificationVo) { @@ -67,7 +67,7 @@ public class PersonnelClassificationController extends BaseController { /** * 删除0:人员分类1:人员性质2:岗位列表 */ - @PreAuthorize("@ss.hasPermi('personnel:classification:del')") + //@PreAuthorize("@ss.hasPermi('personnel:classification:del')") @PostMapping("/delClassification") public AjaxResult delClassification(@RequestBody PersonnelClassificationVo personnelClassificationVo) { @@ -89,7 +89,7 @@ public class PersonnelClassificationController extends BaseController { /** * 修改0:人员分类1:人员性质2:岗位列表 */ - @PreAuthorize("@ss.hasPermi('personnel:classification:update')") + //@PreAuthorize("@ss.hasPermi('personnel:classification:update')") @PostMapping("/updateClassification") public AjaxResult updateClassification(@RequestBody @Validated PersonnelClassificationVo personnelClassificationVo) { diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/PersonnelController.java b/bonus-business/src/main/java/com/bonus/digital/controller/PersonnelController.java index 9ebcdbf..c2d568b 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/PersonnelController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/PersonnelController.java @@ -30,7 +30,7 @@ public class PersonnelController extends BaseController { /** * 获取人员管理列表 */ - @PreAuthorize("@ss.hasPermi('tb:personnel:list')") + //@PreAuthorize("@ss.hasPermi('tb:personnel:list')") @GetMapping("/getPersonnelList") public TableDataInfo getPersonnelList(PersonnelVo personnelVo) { try { @@ -46,7 +46,7 @@ public class PersonnelController extends BaseController { /** * 获取人员管理列表(不分页) */ - @PreAuthorize("@ss.hasPermi('tb:personnel:list')") + //@PreAuthorize("@ss.hasPermi('tb:personnel:list')") @GetMapping("/getPersonnelListSelect") public AjaxResult getPersonnelListSelect(PersonnelVo personnelVo) { try { @@ -95,7 +95,7 @@ public class PersonnelController extends BaseController { /** * 新增人员 */ - @PreAuthorize("@ss.hasPermi('tb:personnel:add')") + //@PreAuthorize("@ss.hasPermi('tb:personnel:add')") @PostMapping("/addPersonnel") public AjaxResult addPersonnel(@RequestBody PersonnelVo personnelVo) { try { @@ -116,7 +116,7 @@ public class PersonnelController extends BaseController { /** * 删除人员 */ - @PreAuthorize("@ss.hasPermi('tb:personnel:del')") + //@PreAuthorize("@ss.hasPermi('tb:personnel:del')") @PostMapping("/delPersonnel") public AjaxResult delPersonnel(@RequestBody PersonnelVo personnelVo) { try { @@ -135,7 +135,7 @@ public class PersonnelController extends BaseController { /** * 修改人员 */ - @PreAuthorize("@ss.hasPermi('tb:personnel:update')") + //@PreAuthorize("@ss.hasPermi('tb:personnel:update')") @PostMapping("/updatePersonnel") public AjaxResult updatePersonnel(@RequestBody PersonnelVo personnelVo) { try { diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/PlanMajorController.java b/bonus-business/src/main/java/com/bonus/digital/controller/PlanMajorController.java index 7be73ca..05a6468 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/PlanMajorController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/PlanMajorController.java @@ -30,7 +30,7 @@ public class PlanMajorController extends BaseController { /** * 列表类别0:计划专业1:业务分类2:计划类别 */ - @PreAuthorize("@ss.hasPermi('plan:major:list')") + //@PreAuthorize("@ss.hasPermi('plan:major:list')") @GetMapping("/getPlanMajorList") public TableDataInfo getPlanMajorList(PlanMajorVo planMajorVo) { @@ -47,7 +47,7 @@ public class PlanMajorController extends BaseController { /** * 列表类别0:计划专业1:业务分类2:计划类别 */ - @PreAuthorize("@ss.hasPermi('plan:major:list')") + //@PreAuthorize("@ss.hasPermi('plan:major:list')") @GetMapping("/getPlanMajorListSelect") public AjaxResult getPlanMajorListSelect(PlanMajorVo planMajorVo) { @@ -63,7 +63,7 @@ public class PlanMajorController extends BaseController { /** * 新增类别0:计划专业1:业务分类2:计划类别 */ - @PreAuthorize("@ss.hasPermi('plan:major:add')") + //@PreAuthorize("@ss.hasPermi('plan:major:add')") @PostMapping("/addPlanMajor") public AjaxResult addPlanMajor(@RequestBody @Validated PlanMajorVo planMajorVo) { @@ -85,7 +85,7 @@ public class PlanMajorController extends BaseController { /** * 删除类别0:计划专业1:业务分类2:计划类别 */ - @PreAuthorize("@ss.hasPermi('plan:major:del')") + //@PreAuthorize("@ss.hasPermi('plan:major:del')") @PostMapping("/delPlanMajor") public AjaxResult delPlanMajor(@RequestBody PlanMajorVo planMajorVo) { @@ -105,7 +105,7 @@ public class PlanMajorController extends BaseController { /** * 修改类别0:计划专业1:业务分类2:计划类别 */ - @PreAuthorize("@ss.hasPermi('plan:major:update')") + //@PreAuthorize("@ss.hasPermi('plan:major:update')") @PostMapping("/updatePlanMajor") public AjaxResult updatePlanMajor(@RequestBody @Validated PlanMajorVo planMajorVo) { diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/PlanManagementController.java b/bonus-business/src/main/java/com/bonus/digital/controller/PlanManagementController.java index cb63a49..ee66f86 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/PlanManagementController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/PlanManagementController.java @@ -4,6 +4,7 @@ import com.bonus.common.core.controller.BaseController; import com.bonus.common.core.domain.AjaxResult; import com.bonus.common.core.domain.entity.SysUser; import com.bonus.common.core.page.TableDataInfo; +import com.bonus.common.utils.SecurityUtils; import com.bonus.common.utils.poi.ExcelUtil; import com.bonus.digital.dao.PlanManagementVo; import com.bonus.digital.dao.WorkloadCategoryVo; @@ -58,6 +59,10 @@ public class PlanManagementController extends BaseController { @GetMapping("/getPlanManagementLists") public AjaxResult getPlanManagementLists(PlanManagementVo planManagementVo) { try { + if (SecurityUtils.getLoginUser().getDeptId()!=null){ + Long deptId = SecurityUtils.getDeptId(); + planManagementVo.setInspectionStationId(deptId.intValue()); + } List list = planManagementService.getPlanManagementList(planManagementVo); return AjaxResult.success(list); } catch (Exception e) { @@ -69,7 +74,7 @@ public class PlanManagementController extends BaseController { /** * 新增计划管理表 */ - @PreAuthorize("@ss.hasPermi('plan:management:add')") + //@PreAuthorize("@ss.hasPermi('plan:management:add')") @PostMapping("/addPlanManagement") public AjaxResult addPlanManagement(@RequestBody PlanManagementVo planManagementVo) { try { @@ -88,7 +93,7 @@ public class PlanManagementController extends BaseController { /** * 删除计划管理表 */ - @PreAuthorize("@ss.hasPermi('plan:management:del')") + //@PreAuthorize("@ss.hasPermi('plan:management:del')") @PostMapping("/delPlanManagement") public AjaxResult delPlanManagement(@RequestBody PlanManagementVo planManagementVo) { try { @@ -109,7 +114,7 @@ public class PlanManagementController extends BaseController { /** * 修改计划管理 */ - @PreAuthorize("@ss.hasPermi('plan:management:update')") + //@PreAuthorize("@ss.hasPermi('plan:management:update')") @PostMapping("/updatePlanManagement") public AjaxResult updatePlanManagement(@RequestBody PlanManagementVo planManagementVo) { try { @@ -128,7 +133,7 @@ public class PlanManagementController extends BaseController { /** * 导入计划管理 */ - @PreAuthorize("@ss.hasPermi('plan:management:import')") + //@PreAuthorize("@ss.hasPermi('plan:management:import')") @PostMapping("/importPlanManagement") public AjaxResult importPlanManagement(MultipartFile file) { try { diff --git a/bonus-business/src/main/java/com/bonus/digital/controller/WorkloadCategoryController.java b/bonus-business/src/main/java/com/bonus/digital/controller/WorkloadCategoryController.java index 494b986..1c04dcb 100644 --- a/bonus-business/src/main/java/com/bonus/digital/controller/WorkloadCategoryController.java +++ b/bonus-business/src/main/java/com/bonus/digital/controller/WorkloadCategoryController.java @@ -28,7 +28,7 @@ public class WorkloadCategoryController extends BaseController { /** * 工作量类别列表 */ - @PreAuthorize("@ss.hasPermi('workload:category:list')") + //@PreAuthorize("@ss.hasPermi('workload:category:list')") @GetMapping("/getWorkloadCategoryList") public TableDataInfo getWorkloadCategoryList(WorkloadCategoryVo workloadCategoryVo) { try { @@ -43,7 +43,7 @@ public class WorkloadCategoryController extends BaseController { /** * 工作量类别列表 */ - @PreAuthorize("@ss.hasPermi('workload:category:list')") + //@PreAuthorize("@ss.hasPermi('workload:category:list')") @GetMapping("/getWorkloadCategoryListSelect") public AjaxResult getWorkloadCategoryListSelect(WorkloadCategoryVo workloadCategoryVo) { try { @@ -57,7 +57,7 @@ public class WorkloadCategoryController extends BaseController { /** * 新增工作量类别 */ - @PreAuthorize("@ss.hasPermi('workload:category:add')") + //@PreAuthorize("@ss.hasPermi('workload:category:add')") @PostMapping("/addWorkloadCategory") public AjaxResult addWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) { try { @@ -77,7 +77,7 @@ public class WorkloadCategoryController extends BaseController { /** * 删除工作量类别 */ - @PreAuthorize("@ss.hasPermi('workload:category:del')") + //@PreAuthorize("@ss.hasPermi('workload:category:del')") @PostMapping("/delWorkloadCategory") public AjaxResult delWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) { try { @@ -95,7 +95,7 @@ public class WorkloadCategoryController extends BaseController { /** * 修改工作量类别 */ - @PreAuthorize("@ss.hasPermi('workload:category:update')") + //@PreAuthorize("@ss.hasPermi('workload:category:update')") @PostMapping("/updateWorkloadCategory") public AjaxResult updateWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) { try { diff --git a/bonus-business/src/main/java/com/bonus/digital/service/impl/MonthlyPlanServiceImpl.java b/bonus-business/src/main/java/com/bonus/digital/service/impl/MonthlyPlanServiceImpl.java index ca05681..ece8694 100644 --- a/bonus-business/src/main/java/com/bonus/digital/service/impl/MonthlyPlanServiceImpl.java +++ b/bonus-business/src/main/java/com/bonus/digital/service/impl/MonthlyPlanServiceImpl.java @@ -16,6 +16,8 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.math.BigDecimal; import java.math.RoundingMode; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.*; import java.util.stream.Collectors; @@ -253,9 +255,10 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService { @Override public List exportResourceSummary(MonthlyPlanVo monthlyPlanVo) { // 1. 入参校验与查询数据 - if (monthlyPlanVo == null || monthlyPlanVo.getMonthlyPlan() == null) { - log.warn("资源统计查询入参无效:MonthlyPlanVo或统计月份为空"); - return Collections.emptyList(); + if (monthlyPlanVo.getMonthlyPlan() == null) { + // 空值时取当前月份 + String month = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM")); + monthlyPlanVo.setMonthlyPlan(month); } List stationResourceList = monthlyPlanMapper.getResourceSummary(monthlyPlanVo); diff --git a/bonus-business/src/main/resources/download/计划导入模板.xlsx b/bonus-business/src/main/resources/download/计划导入模板.xlsx index 81e350b..592935d 100644 Binary files a/bonus-business/src/main/resources/download/计划导入模板.xlsx and b/bonus-business/src/main/resources/download/计划导入模板.xlsx differ diff --git a/bonus-business/src/main/resources/mapper/DayPlanMapper.xml b/bonus-business/src/main/resources/mapper/DayPlanMapper.xml index 9921cb4..e88e0e0 100644 --- a/bonus-business/src/main/resources/mapper/DayPlanMapper.xml +++ b/bonus-business/src/main/resources/mapper/DayPlanMapper.xml @@ -180,7 +180,7 @@ AND tdp.plan_completion_status = #{planCompletionStatus} - AND tmp.inspectionStationId = #{inspectionStationId} + AND tmp.inspection_station_id = #{inspectionStationId} AND tmp.work_content = #{workContent} diff --git a/bonus-business/src/main/resources/mapper/MonthPlanMapper.xml b/bonus-business/src/main/resources/mapper/MonthPlanMapper.xml index 6a5b412..a336bd3 100644 --- a/bonus-business/src/main/resources/mapper/MonthPlanMapper.xml +++ b/bonus-business/src/main/resources/mapper/MonthPlanMapper.xml @@ -205,6 +205,9 @@ AND tmp.monthly_plan = #{monthlyPlan} + + and tmp.inspection_station_id = #{inspectionStationId} + GROUP BY tmp.inspection_station_id, tmp.inspection_station_name, diff --git a/bonus-common/src/main/java/com/bonus/common/core/domain/BaseEntity.java b/bonus-common/src/main/java/com/bonus/common/core/domain/BaseEntity.java index 80e10f4..59d09b7 100644 --- a/bonus-common/src/main/java/com/bonus/common/core/domain/BaseEntity.java +++ b/bonus-common/src/main/java/com/bonus/common/core/domain/BaseEntity.java @@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; /** * Entity基类 - * + * * @author ruoyi */ public class BaseEntity implements Serializable @@ -38,6 +38,7 @@ public class BaseEntity implements Serializable /** 备注 */ private String remark; + /** 请求参数 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) private Map params; diff --git a/bonus-common/src/main/java/com/bonus/common/core/domain/entity/SysUser.java b/bonus-common/src/main/java/com/bonus/common/core/domain/entity/SysUser.java index 0cfbb4c..a2e41f6 100644 --- a/bonus-common/src/main/java/com/bonus/common/core/domain/entity/SysUser.java +++ b/bonus-common/src/main/java/com/bonus/common/core/domain/entity/SysUser.java @@ -29,6 +29,8 @@ public class SysUser extends BaseEntity @Excel(name = "部门编号", type = Type.IMPORT) private Long deptId; + private String deptName; + /** 用户账号 */ @Excel(name = "登录名称") private String userName; @@ -297,6 +299,14 @@ public class SysUser extends BaseEntity this.roleId = roleId; } + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/bonus-system/src/main/resources/mapper/system/SysUserMapper.xml b/bonus-system/src/main/resources/mapper/system/SysUserMapper.xml index 9f40e22..dbe463b 100644 --- a/bonus-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/bonus-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -23,10 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + - + @@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + @@ -45,9 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, + select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status from sys_user u @@ -55,10 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join sys_user_role ur on u.user_id = ur.user_id left join sys_role r on r.role_id = ur.role_id - + - + - + - + - + - + - + - + - + insert into sys_user( user_id, @@ -173,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sysdate() ) - + update sys_user @@ -193,28 +194,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where user_id = #{userId} - + update sys_user set status = #{status} where user_id = #{userId} - + update sys_user set avatar = #{avatar} where user_name = #{userName} - + update sys_user set password = #{password} where user_name = #{userName} - + update sys_user set del_flag = '2' where user_id = #{userId} - + update sys_user set del_flag = '2' where user_id in #{userId} - + - - \ No newline at end of file + +