bug修复
This commit is contained in:
parent
395c17e5cb
commit
5fca926170
|
|
@ -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() + "'失败,登录账号已存在");
|
||||
|
|
|
|||
|
|
@ -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<DayPlanVo> 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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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> 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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<PlanManagementVo> 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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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<ResourceSummaryVo> 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<ResourceSummaryVo> stationResourceList = monthlyPlanMapper.getResourceSummary(monthlyPlanVo);
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -180,7 +180,7 @@
|
|||
AND tdp.plan_completion_status = #{planCompletionStatus}
|
||||
</if>
|
||||
<if test="inspectionStationId!= null " >
|
||||
AND tmp.inspectionStationId = #{inspectionStationId}
|
||||
AND tmp.inspection_station_id = #{inspectionStationId}
|
||||
</if>
|
||||
<if test="workContent!= null " >
|
||||
AND tmp.work_content = #{workContent}
|
||||
|
|
|
|||
|
|
@ -205,6 +205,9 @@
|
|||
<if test="monthlyPlan != null and monthlyPlan != ''">
|
||||
AND tmp.monthly_plan = #{monthlyPlan}
|
||||
</if>
|
||||
<if test="inspectionStationId!= null " >
|
||||
and tmp.inspection_station_id = #{inspectionStationId}
|
||||
</if>
|
||||
GROUP BY
|
||||
tmp.inspection_station_id,
|
||||
tmp.inspection_station_name,
|
||||
|
|
|
|||
|
|
@ -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<String, Object> params;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -23,10 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="deptName" column="inspection_station_name" />
|
||||
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="deptResult" type="SysDept">
|
||||
<id property="deptId" column="dept_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="status" column="dept_status" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="RoleResult" type="SysRole">
|
||||
<id property="roleId" column="role_id" />
|
||||
<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="status" column="role_status" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<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,
|
||||
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
|
||||
</sql>
|
||||
|
||||
|
||||
<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
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
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 tb_inspection_station d on u.dept_id = d.inspection_station_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
AND u.user_id = #{userId}
|
||||
|
|
@ -84,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
|
||||
<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
|
||||
from sys_user u
|
||||
|
|
@ -101,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
|
||||
<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
|
||||
from sys_user u
|
||||
|
|
@ -119,29 +120,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- 数据范围过滤 -->
|
||||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_name = #{userName} and u.del_flag = '0'
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
|
||||
<include refid="selectUserVo"/>
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
|
|
@ -173,7 +174,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateUser" parameterType="SysUser">
|
||||
update sys_user
|
||||
<set>
|
||||
|
|
@ -193,28 +194,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</set>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateUserStatus" parameterType="SysUser">
|
||||
update sys_user set status = #{status} where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateUserAvatar" parameterType="SysUser">
|
||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="resetUserPwd" parameterType="SysUser">
|
||||
update sys_user set password = #{password} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteUserById" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteUserByIds" parameterType="Long">
|
||||
update sys_user set del_flag = '2' where user_id in
|
||||
<foreach collection="array" item="userId" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue