bug修复

This commit is contained in:
马三炮 2025-12-30 17:40:03 +08:00
parent 395c17e5cb
commit 5fca926170
16 changed files with 94 additions and 70 deletions

View File

@ -34,7 +34,7 @@ import com.bonus.system.service.ISysUserService;
/** /**
* 用户信息 * 用户信息
* *
* @author ruoyi * @author ruoyi
*/ */
@RestController @RestController
@ -153,8 +153,8 @@ public class SysUserController extends BaseController
{ {
userService.checkUserAllowed(user); userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId()); userService.checkUserDataScope(user.getUserId());
deptService.checkDeptDataScope(user.getDeptId()); /*deptService.checkDeptDataScope(user.getDeptId());
roleService.checkRoleDataScope(user.getRoleIds()); roleService.checkRoleDataScope(user.getRoleIds());*/
if (!userService.checkUserNameUnique(user)) if (!userService.checkUserNameUnique(user))
{ {
return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在"); return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在");

View File

@ -55,7 +55,7 @@ public class DayPlanController extends BaseController {
* @param dayPlanVo * @param dayPlanVo
* @return * @return
*/ */
@PreAuthorize("@ss.hasPermi('day:plan:list')") //@PreAuthorize("@ss.hasPermi('day:plan:list')")
@GetMapping("/getDayPlanById") @GetMapping("/getDayPlanById")
public AjaxResult getDayPlanById(DayPlanVo dayPlanVo) { public AjaxResult getDayPlanById(DayPlanVo dayPlanVo) {
try { try {
@ -67,7 +67,7 @@ public class DayPlanController extends BaseController {
} }
} }
//新增日计划 //新增日计划
@PreAuthorize("@ss.hasPermi('day:plan:add')") //@PreAuthorize("@ss.hasPermi('day:plan:add')")
@PostMapping("/addDayPlan") @PostMapping("/addDayPlan")
public AjaxResult addMonthlyPlan(@RequestBody List<DayPlanVo> dayPlanVoList) { public AjaxResult addMonthlyPlan(@RequestBody List<DayPlanVo> dayPlanVoList) {
try { try {
@ -84,7 +84,7 @@ public class DayPlanController extends BaseController {
} }
//删除日计划 //删除日计划
@PreAuthorize("@ss.hasPermi('day:plan:del')") //@PreAuthorize("@ss.hasPermi('day:plan:del')")
@PostMapping("/delDayPlan") @PostMapping("/delDayPlan")
public AjaxResult delMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) { public AjaxResult delMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) {
try { try {
@ -101,7 +101,7 @@ public class DayPlanController extends BaseController {
} }
// 修改日计划 // 修改日计划
@PreAuthorize("@ss.hasPermi('day:plan:update')") //@PreAuthorize("@ss.hasPermi('day:plan:update')")
@PostMapping("/updateDayPlan") @PostMapping("/updateDayPlan")
public AjaxResult updateMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) { public AjaxResult updateMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) {
try { try {
@ -124,7 +124,7 @@ public class DayPlanController extends BaseController {
* 2. startTime和endTime不同 x月x日至x月x日工作量清单 * 2. startTime和endTime不同 x月x日至x月x日工作量清单
*/ */
@Log(title = "导出工作量汇总表", businessType = BusinessType.EXPORT) @Log(title = "导出工作量汇总表", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('day:plan:export')") //@PreAuthorize("@ss.hasPermi('day:plan:export')")
@PostMapping("/exportWorkloadSummary") @PostMapping("/exportWorkloadSummary")
public void exportWorkloadSummary(HttpServletResponse response, public void exportWorkloadSummary(HttpServletResponse response,
DayPlanVo dayPlanVo) throws Exception { DayPlanVo dayPlanVo) throws Exception {

View File

@ -28,7 +28,7 @@ public class InspectionStationController extends BaseController {
/** /**
* 获取0运检站1项目部 * 获取0运检站1项目部
*/ */
@PreAuthorize("@ss.hasPermi('inspection:station:list')") //@PreAuthorize("@ss.hasPermi('inspection:station:list')")
@GetMapping("/getInspectionStationList") @GetMapping("/getInspectionStationList")
public TableDataInfo getInspectionStationList(InspectionStationVo inspectionStationVo) public TableDataInfo getInspectionStationList(InspectionStationVo inspectionStationVo)
{ {
@ -45,7 +45,7 @@ public class InspectionStationController extends BaseController {
/** /**
* 新增0运检站1项目部 * 新增0运检站1项目部
*/ */
@PreAuthorize("@ss.hasPermi('inspection:station:add')") //@PreAuthorize("@ss.hasPermi('inspection:station:add')")
@PostMapping("/addInspectionStation") @PostMapping("/addInspectionStation")
public AjaxResult addInspectionStation(@RequestBody @Validated InspectionStationVo inspectionStationVo) public AjaxResult addInspectionStation(@RequestBody @Validated InspectionStationVo inspectionStationVo)
{ {
@ -67,7 +67,7 @@ public class InspectionStationController extends BaseController {
/** /**
* 删除0运检站1项目部 * 删除0运检站1项目部
*/ */
@PreAuthorize("@ss.hasPermi('inspection:station:del')") //@PreAuthorize("@ss.hasPermi('inspection:station:del')")
@PostMapping("/delInspectionStation") @PostMapping("/delInspectionStation")
public AjaxResult delClassification(@RequestBody InspectionStationVo inspectionStationVo) public AjaxResult delClassification(@RequestBody InspectionStationVo inspectionStationVo)
{ {
@ -89,7 +89,7 @@ public class InspectionStationController extends BaseController {
/** /**
* 修改0运检站1项目部 * 修改0运检站1项目部
*/ */
@PreAuthorize("@ss.hasPermi('inspection:station:update')") //@PreAuthorize("@ss.hasPermi('inspection:station:update')")
@PostMapping("/updateInspectionStation") @PostMapping("/updateInspectionStation")
public AjaxResult updateInspectionStation(@RequestBody @Validated InspectionStationVo inspectionStationVo) public AjaxResult updateInspectionStation(@RequestBody @Validated InspectionStationVo inspectionStationVo)
{ {

View File

@ -9,6 +9,7 @@ import com.bonus.common.core.controller.BaseController;
import com.bonus.common.core.domain.AjaxResult; import com.bonus.common.core.domain.AjaxResult;
import com.bonus.common.core.page.TableDataInfo; import com.bonus.common.core.page.TableDataInfo;
import com.bonus.common.enums.BusinessType; import com.bonus.common.enums.BusinessType;
import com.bonus.common.utils.SecurityUtils;
import com.bonus.digital.dao.*; import com.bonus.digital.dao.*;
import com.bonus.digital.service.MonthlyPlanService; import com.bonus.digital.service.MonthlyPlanService;
import com.bonus.framework.config.FastJson2JsonRedisSerializer; 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") @PostMapping("/addMonthlyPlan")
public AjaxResult addMonthlyPlan(@RequestBody List<MonthlyPlanVo> monthlyPlanVo) { public AjaxResult addMonthlyPlan(@RequestBody List<MonthlyPlanVo> monthlyPlanVo) {
try { try {
@ -89,7 +90,7 @@ public class MonthlyPlanController extends BaseController {
/** /**
* 删除月计划 * 删除月计划
*/ */
@PreAuthorize("@ss.hasPermi('monthly:plan:del')") //@PreAuthorize("@ss.hasPermi('monthly:plan:del')")
@PostMapping("/delMonthlyPlan") @PostMapping("/delMonthlyPlan")
public AjaxResult delMonthlyPlan(@RequestBody MonthlyPlanVo monthlyPlanVo) { public AjaxResult delMonthlyPlan(@RequestBody MonthlyPlanVo monthlyPlanVo) {
try { try {
@ -110,7 +111,7 @@ public class MonthlyPlanController extends BaseController {
/** /**
* 修改月计划 * 修改月计划
*/ */
@PreAuthorize("@ss.hasPermi('monthly:plan:update')") //@PreAuthorize("@ss.hasPermi('monthly:plan:update')")
@PostMapping("/updateMonthlyPlan") @PostMapping("/updateMonthlyPlan")
public AjaxResult updateMonthlyPlan(@RequestBody MonthlyPlanVo monthlyPlanVo) { public AjaxResult updateMonthlyPlan(@RequestBody MonthlyPlanVo monthlyPlanVo) {
try { try {
@ -127,7 +128,7 @@ public class MonthlyPlanController extends BaseController {
} }
@Log(title = "导出人员安排表", businessType = BusinessType.EXPORT) @Log(title = "导出人员安排表", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monthly:plan:export')") //@PreAuthorize("@ss.hasPermi('monthly:plan:export')")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, MonthlyPlanVo monthlyPlanVo) { public void export(HttpServletResponse response, MonthlyPlanVo monthlyPlanVo) {
@ -156,7 +157,7 @@ public class MonthlyPlanController extends BaseController {
} }
@Log(title = "导出工作量汇总表", businessType = BusinessType.EXPORT) @Log(title = "导出工作量汇总表", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monthly:plan:export')") //@PreAuthorize("@ss.hasPermi('monthly:plan:export')")
@PostMapping("/exportWorkloadSummary") @PostMapping("/exportWorkloadSummary")
public void exportWorkloadSummary(HttpServletResponse response, public void exportWorkloadSummary(HttpServletResponse response,
MonthlyPlanVo monthlyPlanVo) { MonthlyPlanVo monthlyPlanVo) {
@ -186,7 +187,7 @@ public class MonthlyPlanController extends BaseController {
} }
@Log(title = "导出月计划资源汇总表", businessType = BusinessType.EXPORT) @Log(title = "导出月计划资源汇总表", businessType = BusinessType.EXPORT)
@PreAuthorize("@ss.hasPermi('monthly:plan:export')") //@PreAuthorize("@ss.hasPermi('monthly:plan:export')")
@PostMapping("/exportResourceSummary") @PostMapping("/exportResourceSummary")
public void exportResourceSummary(HttpServletResponse response, public void exportResourceSummary(HttpServletResponse response,
MonthlyPlanVo monthlyPlanVo) throws IOException { MonthlyPlanVo monthlyPlanVo) throws IOException {

View File

@ -28,7 +28,7 @@ public class PersonnelClassificationController extends BaseController {
/** /**
* 获取0人员分类1人员性质2岗位列表 * 获取0人员分类1人员性质2岗位列表
*/ */
@PreAuthorize("@ss.hasPermi('personnel:classification:list')") //@PreAuthorize("@ss.hasPermi('personnel:classification:list')")
@GetMapping("/getClassificationList") @GetMapping("/getClassificationList")
public TableDataInfo getClassificationList(PersonnelClassificationVo personnelClassificationVo) public TableDataInfo getClassificationList(PersonnelClassificationVo personnelClassificationVo)
{ {
@ -45,7 +45,7 @@ public class PersonnelClassificationController extends BaseController {
/** /**
* 新增0人员分类1人员性质2岗位列表 * 新增0人员分类1人员性质2岗位列表
*/ */
@PreAuthorize("@ss.hasPermi('personnel:classification:add')") //@PreAuthorize("@ss.hasPermi('personnel:classification:add')")
@PostMapping("/addClassification") @PostMapping("/addClassification")
public AjaxResult addClassification(@RequestBody @Validated PersonnelClassificationVo personnelClassificationVo) public AjaxResult addClassification(@RequestBody @Validated PersonnelClassificationVo personnelClassificationVo)
{ {
@ -67,7 +67,7 @@ public class PersonnelClassificationController extends BaseController {
/** /**
* 删除0人员分类1人员性质2岗位列表 * 删除0人员分类1人员性质2岗位列表
*/ */
@PreAuthorize("@ss.hasPermi('personnel:classification:del')") //@PreAuthorize("@ss.hasPermi('personnel:classification:del')")
@PostMapping("/delClassification") @PostMapping("/delClassification")
public AjaxResult delClassification(@RequestBody PersonnelClassificationVo personnelClassificationVo) public AjaxResult delClassification(@RequestBody PersonnelClassificationVo personnelClassificationVo)
{ {
@ -89,7 +89,7 @@ public class PersonnelClassificationController extends BaseController {
/** /**
* 修改0人员分类1人员性质2岗位列表 * 修改0人员分类1人员性质2岗位列表
*/ */
@PreAuthorize("@ss.hasPermi('personnel:classification:update')") //@PreAuthorize("@ss.hasPermi('personnel:classification:update')")
@PostMapping("/updateClassification") @PostMapping("/updateClassification")
public AjaxResult updateClassification(@RequestBody @Validated PersonnelClassificationVo personnelClassificationVo) public AjaxResult updateClassification(@RequestBody @Validated PersonnelClassificationVo personnelClassificationVo)
{ {

View File

@ -30,7 +30,7 @@ public class PersonnelController extends BaseController {
/** /**
* 获取人员管理列表 * 获取人员管理列表
*/ */
@PreAuthorize("@ss.hasPermi('tb:personnel:list')") //@PreAuthorize("@ss.hasPermi('tb:personnel:list')")
@GetMapping("/getPersonnelList") @GetMapping("/getPersonnelList")
public TableDataInfo getPersonnelList(PersonnelVo personnelVo) { public TableDataInfo getPersonnelList(PersonnelVo personnelVo) {
try { try {
@ -46,7 +46,7 @@ public class PersonnelController extends BaseController {
/** /**
* 获取人员管理列表(不分页) * 获取人员管理列表(不分页)
*/ */
@PreAuthorize("@ss.hasPermi('tb:personnel:list')") //@PreAuthorize("@ss.hasPermi('tb:personnel:list')")
@GetMapping("/getPersonnelListSelect") @GetMapping("/getPersonnelListSelect")
public AjaxResult getPersonnelListSelect(PersonnelVo personnelVo) { public AjaxResult getPersonnelListSelect(PersonnelVo personnelVo) {
try { try {
@ -95,7 +95,7 @@ public class PersonnelController extends BaseController {
/** /**
* 新增人员 * 新增人员
*/ */
@PreAuthorize("@ss.hasPermi('tb:personnel:add')") //@PreAuthorize("@ss.hasPermi('tb:personnel:add')")
@PostMapping("/addPersonnel") @PostMapping("/addPersonnel")
public AjaxResult addPersonnel(@RequestBody PersonnelVo personnelVo) { public AjaxResult addPersonnel(@RequestBody PersonnelVo personnelVo) {
try { try {
@ -116,7 +116,7 @@ public class PersonnelController extends BaseController {
/** /**
* 删除人员 * 删除人员
*/ */
@PreAuthorize("@ss.hasPermi('tb:personnel:del')") //@PreAuthorize("@ss.hasPermi('tb:personnel:del')")
@PostMapping("/delPersonnel") @PostMapping("/delPersonnel")
public AjaxResult delPersonnel(@RequestBody PersonnelVo personnelVo) { public AjaxResult delPersonnel(@RequestBody PersonnelVo personnelVo) {
try { try {
@ -135,7 +135,7 @@ public class PersonnelController extends BaseController {
/** /**
* 修改人员 * 修改人员
*/ */
@PreAuthorize("@ss.hasPermi('tb:personnel:update')") //@PreAuthorize("@ss.hasPermi('tb:personnel:update')")
@PostMapping("/updatePersonnel") @PostMapping("/updatePersonnel")
public AjaxResult updatePersonnel(@RequestBody PersonnelVo personnelVo) { public AjaxResult updatePersonnel(@RequestBody PersonnelVo personnelVo) {
try { try {

View File

@ -30,7 +30,7 @@ public class PlanMajorController extends BaseController {
/** /**
* 列表类别0计划专业1业务分类2计划类别 * 列表类别0计划专业1业务分类2计划类别
*/ */
@PreAuthorize("@ss.hasPermi('plan:major:list')") //@PreAuthorize("@ss.hasPermi('plan:major:list')")
@GetMapping("/getPlanMajorList") @GetMapping("/getPlanMajorList")
public TableDataInfo getPlanMajorList(PlanMajorVo planMajorVo) public TableDataInfo getPlanMajorList(PlanMajorVo planMajorVo)
{ {
@ -47,7 +47,7 @@ public class PlanMajorController extends BaseController {
/** /**
* 列表类别0计划专业1业务分类2计划类别 * 列表类别0计划专业1业务分类2计划类别
*/ */
@PreAuthorize("@ss.hasPermi('plan:major:list')") //@PreAuthorize("@ss.hasPermi('plan:major:list')")
@GetMapping("/getPlanMajorListSelect") @GetMapping("/getPlanMajorListSelect")
public AjaxResult getPlanMajorListSelect(PlanMajorVo planMajorVo) public AjaxResult getPlanMajorListSelect(PlanMajorVo planMajorVo)
{ {
@ -63,7 +63,7 @@ public class PlanMajorController extends BaseController {
/** /**
* 新增类别0计划专业1业务分类2计划类别 * 新增类别0计划专业1业务分类2计划类别
*/ */
@PreAuthorize("@ss.hasPermi('plan:major:add')") //@PreAuthorize("@ss.hasPermi('plan:major:add')")
@PostMapping("/addPlanMajor") @PostMapping("/addPlanMajor")
public AjaxResult addPlanMajor(@RequestBody @Validated PlanMajorVo planMajorVo) public AjaxResult addPlanMajor(@RequestBody @Validated PlanMajorVo planMajorVo)
{ {
@ -85,7 +85,7 @@ public class PlanMajorController extends BaseController {
/** /**
* 删除类别0计划专业1业务分类2计划类别 * 删除类别0计划专业1业务分类2计划类别
*/ */
@PreAuthorize("@ss.hasPermi('plan:major:del')") //@PreAuthorize("@ss.hasPermi('plan:major:del')")
@PostMapping("/delPlanMajor") @PostMapping("/delPlanMajor")
public AjaxResult delPlanMajor(@RequestBody PlanMajorVo planMajorVo) public AjaxResult delPlanMajor(@RequestBody PlanMajorVo planMajorVo)
{ {
@ -105,7 +105,7 @@ public class PlanMajorController extends BaseController {
/** /**
* 修改类别0计划专业1业务分类2计划类别 * 修改类别0计划专业1业务分类2计划类别
*/ */
@PreAuthorize("@ss.hasPermi('plan:major:update')") //@PreAuthorize("@ss.hasPermi('plan:major:update')")
@PostMapping("/updatePlanMajor") @PostMapping("/updatePlanMajor")
public AjaxResult updatePlanMajor(@RequestBody @Validated PlanMajorVo planMajorVo) public AjaxResult updatePlanMajor(@RequestBody @Validated PlanMajorVo planMajorVo)
{ {

View File

@ -4,6 +4,7 @@ import com.bonus.common.core.controller.BaseController;
import com.bonus.common.core.domain.AjaxResult; import com.bonus.common.core.domain.AjaxResult;
import com.bonus.common.core.domain.entity.SysUser; import com.bonus.common.core.domain.entity.SysUser;
import com.bonus.common.core.page.TableDataInfo; import com.bonus.common.core.page.TableDataInfo;
import com.bonus.common.utils.SecurityUtils;
import com.bonus.common.utils.poi.ExcelUtil; import com.bonus.common.utils.poi.ExcelUtil;
import com.bonus.digital.dao.PlanManagementVo; import com.bonus.digital.dao.PlanManagementVo;
import com.bonus.digital.dao.WorkloadCategoryVo; import com.bonus.digital.dao.WorkloadCategoryVo;
@ -58,6 +59,10 @@ public class PlanManagementController extends BaseController {
@GetMapping("/getPlanManagementLists") @GetMapping("/getPlanManagementLists")
public AjaxResult getPlanManagementLists(PlanManagementVo planManagementVo) { public AjaxResult getPlanManagementLists(PlanManagementVo planManagementVo) {
try { try {
if (SecurityUtils.getLoginUser().getDeptId()!=null){
Long deptId = SecurityUtils.getDeptId();
planManagementVo.setInspectionStationId(deptId.intValue());
}
List<PlanManagementVo> list = planManagementService.getPlanManagementList(planManagementVo); List<PlanManagementVo> list = planManagementService.getPlanManagementList(planManagementVo);
return AjaxResult.success(list); return AjaxResult.success(list);
} catch (Exception e) { } 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") @PostMapping("/addPlanManagement")
public AjaxResult addPlanManagement(@RequestBody PlanManagementVo planManagementVo) { public AjaxResult addPlanManagement(@RequestBody PlanManagementVo planManagementVo) {
try { try {
@ -88,7 +93,7 @@ public class PlanManagementController extends BaseController {
/** /**
* 删除计划管理表 * 删除计划管理表
*/ */
@PreAuthorize("@ss.hasPermi('plan:management:del')") //@PreAuthorize("@ss.hasPermi('plan:management:del')")
@PostMapping("/delPlanManagement") @PostMapping("/delPlanManagement")
public AjaxResult delPlanManagement(@RequestBody PlanManagementVo planManagementVo) { public AjaxResult delPlanManagement(@RequestBody PlanManagementVo planManagementVo) {
try { try {
@ -109,7 +114,7 @@ public class PlanManagementController extends BaseController {
/** /**
* 修改计划管理 * 修改计划管理
*/ */
@PreAuthorize("@ss.hasPermi('plan:management:update')") //@PreAuthorize("@ss.hasPermi('plan:management:update')")
@PostMapping("/updatePlanManagement") @PostMapping("/updatePlanManagement")
public AjaxResult updatePlanManagement(@RequestBody PlanManagementVo planManagementVo) { public AjaxResult updatePlanManagement(@RequestBody PlanManagementVo planManagementVo) {
try { try {
@ -128,7 +133,7 @@ public class PlanManagementController extends BaseController {
/** /**
* 导入计划管理 * 导入计划管理
*/ */
@PreAuthorize("@ss.hasPermi('plan:management:import')") //@PreAuthorize("@ss.hasPermi('plan:management:import')")
@PostMapping("/importPlanManagement") @PostMapping("/importPlanManagement")
public AjaxResult importPlanManagement(MultipartFile file) { public AjaxResult importPlanManagement(MultipartFile file) {
try { try {

View File

@ -28,7 +28,7 @@ public class WorkloadCategoryController extends BaseController {
/** /**
* 工作量类别列表 * 工作量类别列表
*/ */
@PreAuthorize("@ss.hasPermi('workload:category:list')") //@PreAuthorize("@ss.hasPermi('workload:category:list')")
@GetMapping("/getWorkloadCategoryList") @GetMapping("/getWorkloadCategoryList")
public TableDataInfo getWorkloadCategoryList(WorkloadCategoryVo workloadCategoryVo) { public TableDataInfo getWorkloadCategoryList(WorkloadCategoryVo workloadCategoryVo) {
try { try {
@ -43,7 +43,7 @@ public class WorkloadCategoryController extends BaseController {
/** /**
* 工作量类别列表 * 工作量类别列表
*/ */
@PreAuthorize("@ss.hasPermi('workload:category:list')") //@PreAuthorize("@ss.hasPermi('workload:category:list')")
@GetMapping("/getWorkloadCategoryListSelect") @GetMapping("/getWorkloadCategoryListSelect")
public AjaxResult getWorkloadCategoryListSelect(WorkloadCategoryVo workloadCategoryVo) { public AjaxResult getWorkloadCategoryListSelect(WorkloadCategoryVo workloadCategoryVo) {
try { try {
@ -57,7 +57,7 @@ public class WorkloadCategoryController extends BaseController {
/** /**
* 新增工作量类别 * 新增工作量类别
*/ */
@PreAuthorize("@ss.hasPermi('workload:category:add')") //@PreAuthorize("@ss.hasPermi('workload:category:add')")
@PostMapping("/addWorkloadCategory") @PostMapping("/addWorkloadCategory")
public AjaxResult addWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) { public AjaxResult addWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) {
try { try {
@ -77,7 +77,7 @@ public class WorkloadCategoryController extends BaseController {
/** /**
* 删除工作量类别 * 删除工作量类别
*/ */
@PreAuthorize("@ss.hasPermi('workload:category:del')") //@PreAuthorize("@ss.hasPermi('workload:category:del')")
@PostMapping("/delWorkloadCategory") @PostMapping("/delWorkloadCategory")
public AjaxResult delWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) { public AjaxResult delWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) {
try { try {
@ -95,7 +95,7 @@ public class WorkloadCategoryController extends BaseController {
/** /**
* 修改工作量类别 * 修改工作量类别
*/ */
@PreAuthorize("@ss.hasPermi('workload:category:update')") //@PreAuthorize("@ss.hasPermi('workload:category:update')")
@PostMapping("/updateWorkloadCategory") @PostMapping("/updateWorkloadCategory")
public AjaxResult updateWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) { public AjaxResult updateWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) {
try { try {

View File

@ -16,6 +16,8 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -253,9 +255,10 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService {
@Override @Override
public List<ResourceSummaryVo> exportResourceSummary(MonthlyPlanVo monthlyPlanVo) { public List<ResourceSummaryVo> exportResourceSummary(MonthlyPlanVo monthlyPlanVo) {
// 1. 入参校验与查询数据 // 1. 入参校验与查询数据
if (monthlyPlanVo == null || monthlyPlanVo.getMonthlyPlan() == null) { if (monthlyPlanVo.getMonthlyPlan() == null) {
log.warn("资源统计查询入参无效MonthlyPlanVo或统计月份为空"); // 空值时取当前月份
return Collections.emptyList(); String month = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM"));
monthlyPlanVo.setMonthlyPlan(month);
} }
List<ResourceSummaryVo> stationResourceList = monthlyPlanMapper.getResourceSummary(monthlyPlanVo); List<ResourceSummaryVo> stationResourceList = monthlyPlanMapper.getResourceSummary(monthlyPlanVo);

View File

@ -180,7 +180,7 @@
AND tdp.plan_completion_status = #{planCompletionStatus} AND tdp.plan_completion_status = #{planCompletionStatus}
</if> </if>
<if test="inspectionStationId!= null " > <if test="inspectionStationId!= null " >
AND tmp.inspectionStationId = #{inspectionStationId} AND tmp.inspection_station_id = #{inspectionStationId}
</if> </if>
<if test="workContent!= null " > <if test="workContent!= null " >
AND tmp.work_content = #{workContent} AND tmp.work_content = #{workContent}

View File

@ -205,6 +205,9 @@
<if test="monthlyPlan != null and monthlyPlan != ''"> <if test="monthlyPlan != null and monthlyPlan != ''">
AND tmp.monthly_plan = #{monthlyPlan} AND tmp.monthly_plan = #{monthlyPlan}
</if> </if>
<if test="inspectionStationId!= null " >
and tmp.inspection_station_id = #{inspectionStationId}
</if>
GROUP BY GROUP BY
tmp.inspection_station_id, tmp.inspection_station_id,
tmp.inspection_station_name, tmp.inspection_station_name,

View File

@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonInclude;
/** /**
* Entity基类 * Entity基类
* *
* @author ruoyi * @author ruoyi
*/ */
public class BaseEntity implements Serializable public class BaseEntity implements Serializable
@ -38,6 +38,7 @@ public class BaseEntity implements Serializable
/** 备注 */ /** 备注 */
private String remark; private String remark;
/** 请求参数 */ /** 请求参数 */
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, Object> params; private Map<String, Object> params;

View File

@ -29,6 +29,8 @@ public class SysUser extends BaseEntity
@Excel(name = "部门编号", type = Type.IMPORT) @Excel(name = "部门编号", type = Type.IMPORT)
private Long deptId; private Long deptId;
private String deptName;
/** 用户账号 */ /** 用户账号 */
@Excel(name = "登录名称") @Excel(name = "登录名称")
private String userName; private String userName;
@ -297,6 +299,14 @@ public class SysUser extends BaseEntity
this.roleId = roleId; this.roleId = roleId;
} }
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

View File

@ -23,10 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="deptName" column="inspection_station_name" />
<association property="dept" javaType="SysDept" resultMap="deptResult" /> <association property="dept" javaType="SysDept" resultMap="deptResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" /> <collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
</resultMap> </resultMap>
<resultMap id="deptResult" type="SysDept"> <resultMap id="deptResult" type="SysDept">
<id property="deptId" column="dept_id" /> <id property="deptId" column="dept_id" />
<result property="parentId" column="parent_id" /> <result property="parentId" column="parent_id" />
@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="leader" column="leader" /> <result property="leader" column="leader" />
<result property="status" column="dept_status" /> <result property="status" column="dept_status" />
</resultMap> </resultMap>
<resultMap id="RoleResult" type="SysRole"> <resultMap id="RoleResult" type="SysRole">
<id property="roleId" column="role_id" /> <id property="roleId" column="role_id" />
<result property="roleName" column="role_name" /> <result property="roleName" column="role_name" />
@ -45,9 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="dataScope" column="data_scope" /> <result property="dataScope" column="data_scope" />
<result property="status" column="role_status" /> <result property="status" column="role_status" />
</resultMap> </resultMap>
<sql id="selectUserVo"> <sql id="selectUserVo">
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, 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 r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u 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_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id left join sys_role r on r.role_id = ur.role_id
</sql> </sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.inspection_station_name from sys_user u
left join sys_dept d on u.dept_id = d.dept_id left join tb_inspection_station d on u.dept_id = d.inspection_station_id
where u.del_flag = '0' where u.del_flag = '0'
<if test="userId != null and userId != 0"> <if test="userId != null and userId != 0">
AND u.user_id = #{userId} AND u.user_id = #{userId}
@ -84,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</select> </select>
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
from sys_user u from sys_user u
@ -101,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</select> </select>
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult"> <select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
from sys_user u from sys_user u
@ -119,29 +120,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${params.dataScope} ${params.dataScope}
</select> </select>
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/> <include refid="selectUserVo"/>
where u.user_name = #{userName} and u.del_flag = '0' where u.user_name = #{userName} and u.del_flag = '0'
</select> </select>
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
<include refid="selectUserVo"/> <include refid="selectUserVo"/>
where u.user_id = #{userId} where u.user_id = #{userId}
</select> </select>
<select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult"> <select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1 select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
</select> </select>
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult"> <select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1 select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
</select> </select>
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult"> <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1 select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
</select> </select>
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
insert into sys_user( insert into sys_user(
<if test="userId != null and userId != 0">user_id,</if> <if test="userId != null and userId != 0">user_id,</if>
@ -173,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sysdate() sysdate()
) )
</insert> </insert>
<update id="updateUser" parameterType="SysUser"> <update id="updateUser" parameterType="SysUser">
update sys_user update sys_user
<set> <set>
@ -193,28 +194,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</set> </set>
where user_id = #{userId} where user_id = #{userId}
</update> </update>
<update id="updateUserStatus" parameterType="SysUser"> <update id="updateUserStatus" parameterType="SysUser">
update sys_user set status = #{status} where user_id = #{userId} update sys_user set status = #{status} where user_id = #{userId}
</update> </update>
<update id="updateUserAvatar" parameterType="SysUser"> <update id="updateUserAvatar" parameterType="SysUser">
update sys_user set avatar = #{avatar} where user_name = #{userName} update sys_user set avatar = #{avatar} where user_name = #{userName}
</update> </update>
<update id="resetUserPwd" parameterType="SysUser"> <update id="resetUserPwd" parameterType="SysUser">
update sys_user set password = #{password} where user_name = #{userName} update sys_user set password = #{password} where user_name = #{userName}
</update> </update>
<delete id="deleteUserById" parameterType="Long"> <delete id="deleteUserById" parameterType="Long">
update sys_user set del_flag = '2' where user_id = #{userId} update sys_user set del_flag = '2' where user_id = #{userId}
</delete> </delete>
<delete id="deleteUserByIds" parameterType="Long"> <delete id="deleteUserByIds" parameterType="Long">
update sys_user set del_flag = '2' where user_id in update sys_user set del_flag = '2' where user_id in
<foreach collection="array" item="userId" open="(" separator="," close=")"> <foreach collection="array" item="userId" open="(" separator="," close=")">
#{userId} #{userId}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>