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 b20434c..9fd30ca 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 @@ -1,4 +1,3 @@ -/* package com.bonus.digital.controller; import com.bonus.business.controller.tool.MonthPlanExcelExporter; @@ -11,24 +10,15 @@ import com.bonus.digital.dao.DayPlanVo; import com.bonus.digital.dao.ExportMonthPlanPersonVo; import com.bonus.digital.dao.MonthlyPlanVo; import com.bonus.digital.service.DayPlanService; -import com.bonus.digital.service.MonthlyPlanService; import lombok.extern.slf4j.Slf4j; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; -*/ -/** - * @author 马三炮 - * @date 2025/12/16 - *//* @Slf4j @RestController @@ -38,12 +28,8 @@ public class DayPlanController extends BaseController { @Resource private DayPlanService dayPlanService; - */ -/** - * 月计划列表 - *//* - - @PreAuthorize("@ss.hasPermi('monthly:plan:list')") + //日计划列表 + @PreAuthorize("@ss.hasPermi('day:plan:list')") @GetMapping("/getDayPlanList") public TableDataInfo getMonthlyPlanList(DayPlanVo dayPlanVo) { try { @@ -55,16 +41,12 @@ public class DayPlanController extends BaseController { } } - */ -/** - * 新增月计划 - *//* - - @PreAuthorize("@ss.hasPermi('monthly:plan:add')") - @PostMapping("/addMonthlyPlan") - public AjaxResult addMonthlyPlan(MonthlyPlanVo monthlyPlanVo) { + //新增日计划 + @PreAuthorize("@ss.hasPermi('day:plan:add')") + @PostMapping("/addDayPlan") + public AjaxResult addMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) { try { - int res = dayPlanService.addMonthlyPlanList(monthlyPlanVo); + int res = dayPlanService.addMonthlyPlan(dayPlanVo); if (res > 0) { return AjaxResult.success(); } else { @@ -75,16 +57,12 @@ public class DayPlanController extends BaseController { } } - */ -/** - * 删除月计划 - *//* - - @PreAuthorize("@ss.hasPermi('monthly:plan:del')") - @PostMapping("/delMonthlyPlan") - public AjaxResult delMonthlyPlan(MonthlyPlanVo monthlyPlanVo) { + //删除日计划 + @PreAuthorize("@ss.hasPermi('day:plan:del')") + @PostMapping("/delDayPlan") + public AjaxResult delMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) { try { - int res = dayPlanService.delMonthlyPlanList(monthlyPlanVo); + int res = dayPlanService.delDayPlan(dayPlanVo); if (res > 0) { return AjaxResult.success(); } else { @@ -95,16 +73,12 @@ public class DayPlanController extends BaseController { } } - */ -/** - * 修改月计划 - *//* - - @PreAuthorize("@ss.hasPermi('monthly:plan:update')") - @PostMapping("/updateMonthlyPlan") - public AjaxResult updateMonthlyPlan(MonthlyPlanVo monthlyPlanVo) { + // 修改日计划 + @PreAuthorize("@ss.hasPermi('day:plan:update')") + @PostMapping("/updateDayPlan") + public AjaxResult updateMonthlyPlan(@RequestBody DayPlanVo dayPlanVo) { try { - int res = dayPlanService.updateMonthlyPlan(monthlyPlanVo); + int res = dayPlanService.updateDayPlan(dayPlanVo); if (res > 0) { return AjaxResult.success(); } else { @@ -114,13 +88,4 @@ public class DayPlanController extends BaseController { return AjaxResult.error("系统异常,请联系管理员"); } } - - @Log(title = "导出人员安排表", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('monthly:plan:export')") - @PostMapping("/export") - public void export(HttpServletResponse response, MonthlyPlanVo monthlyPlanVo) throws IOException { - List list = dayPlanService.exportMonthlyPlanPerson(monthlyPlanVo); - MonthPlanExcelExporter.exportToExcel(response, list, 2025, 10, "10月运检人员安排"); - } } -*/ 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 ab8aa6e..434525c 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 @@ -4,6 +4,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.digital.dao.InspectionStationVo; +import com.bonus.digital.dao.PersonnelClassificationVo; import com.bonus.digital.dao.PersonnelVo; import com.bonus.digital.dao.SelectDto; import com.bonus.digital.service.PersonnelService; @@ -41,6 +42,8 @@ public class PersonnelController extends BaseController { } } + //人员所属下拉 + //0:运检站1:项目部 @GetMapping("/getInspectionStationSelect") public AjaxResult getInspectionStationSelect(InspectionStationVo vo) { try { @@ -50,6 +53,9 @@ public class PersonnelController extends BaseController { return AjaxResult.error("接口异常"); } } + + //人员性质/人员分类/岗位下拉 + // 0:人员分类1:人员性质2:岗位列表 @GetMapping("/getPersonnelClassificationSelect") public AjaxResult getPersonnelClassificationSelect(InspectionStationVo vo) { try { diff --git a/bonus-business/src/main/java/com/bonus/digital/dao/DayPlanVo.java b/bonus-business/src/main/java/com/bonus/digital/dao/DayPlanVo.java index cf2357b..e5e3727 100644 --- a/bonus-business/src/main/java/com/bonus/digital/dao/DayPlanVo.java +++ b/bonus-business/src/main/java/com/bonus/digital/dao/DayPlanVo.java @@ -144,7 +144,7 @@ public class DayPlanVo { /** * 创建时间 */ - private String createTime; + private Date createTime; /** * 修改人 diff --git a/bonus-business/src/main/java/com/bonus/digital/dao/PersonnelVo.java b/bonus-business/src/main/java/com/bonus/digital/dao/PersonnelVo.java index cafe108..36c77d7 100644 --- a/bonus-business/src/main/java/com/bonus/digital/dao/PersonnelVo.java +++ b/bonus-business/src/main/java/com/bonus/digital/dao/PersonnelVo.java @@ -15,80 +15,80 @@ public class PersonnelVo { /** * 人员id */ - private int id; + private Integer id; /** * 人员所属 */ - private int inspectionStationId; + private Integer inspectionStationId; /** * 单位名称 */ - private String inspectionStationName; + private String inspectionStationName; /** * 姓名 */ - private String name; + private String name; /** * 性别 */ - private String sex; + private String sex; /** * 电话 */ - private String phone; + private String phone; /** * 岗位 */ - private int positionId; + private Integer positionId; /** * 岗位 */ - private String positionName; + private String positionName; /** * 人员性质 */ - private int personnelNatureId; + private Integer personnelNatureId; /** * 人员性质 */ - private String personnelNatureName; + private String personnelNatureName; /** * 人员分类 */ - private int personnelClassificationId; + private Integer personnelClassificationId; /** * 人员分类 */ - private String personnelClassificationName; + private String personnelClassificationName; /** * 长期借调1是0否 */ - private String longTermSecondment; + private String longTermSecondment; /** * 是否有效1有效0无效 */ - private String isActive; + private String isActive; /** * 创建人 */ - private String createUser; + private String createUser; /** * 创建时间 */ diff --git a/bonus-business/src/main/java/com/bonus/digital/mapper/DayPlanMapper.java b/bonus-business/src/main/java/com/bonus/digital/mapper/DayPlanMapper.java new file mode 100644 index 0000000..4ba191e --- /dev/null +++ b/bonus-business/src/main/java/com/bonus/digital/mapper/DayPlanMapper.java @@ -0,0 +1,21 @@ +package com.bonus.digital.mapper; + +import com.bonus.digital.dao.DayPlanVo; +import com.bonus.digital.dao.MonthlyPlanVo; + +import java.util.List; + +/** + * @Author:liang.chao + * @Date:2025/12/18 - 13:19 + */ +public interface DayPlanMapper { + + Integer addMonthlyPlan(DayPlanVo dayPlanVo); + + Integer delDayPlan(DayPlanVo dayPlanVo); + + Integer updateDayPlan(DayPlanVo dayPlanVo); + + List getDayPlanList(DayPlanVo dayPlanVo); +} diff --git a/bonus-business/src/main/java/com/bonus/digital/mapper/MonthlyPlanMapper.java b/bonus-business/src/main/java/com/bonus/digital/mapper/MonthlyPlanMapper.java index 4d8414e..bd9d181 100644 --- a/bonus-business/src/main/java/com/bonus/digital/mapper/MonthlyPlanMapper.java +++ b/bonus-business/src/main/java/com/bonus/digital/mapper/MonthlyPlanMapper.java @@ -68,7 +68,5 @@ public interface MonthlyPlanMapper { */ int updateMonthlyPlan(MonthlyPlanVo monthlyPlanVo); - List getMonthlyPlanPerson(MonthlyPlanVo monthlyPlanVo); - List getPlanMajorListByMonth(MonthlyPlanVo monthlyPlanVo); } diff --git a/bonus-business/src/main/java/com/bonus/digital/mapper/PersonnelMapper.java b/bonus-business/src/main/java/com/bonus/digital/mapper/PersonnelMapper.java index c2bbe91..56662c0 100644 --- a/bonus-business/src/main/java/com/bonus/digital/mapper/PersonnelMapper.java +++ b/bonus-business/src/main/java/com/bonus/digital/mapper/PersonnelMapper.java @@ -16,19 +16,19 @@ public interface PersonnelMapper { /** * 新增人员 */ - int addPersonnel(PersonnelVo personnelVo); + Integer addPersonnel(PersonnelVo personnelVo); /** * 删除人员 */ - int delPersonnel(PersonnelVo personnelVo); + Integer delPersonnel(PersonnelVo personnelVo); /** * 修改人员 */ - int updatePersonnel(PersonnelVo personnelVo); + Integer updatePersonnel(PersonnelVo personnelVo); List getInspectionStationSelect(@Param("category") String category); - List getPersonnelClassificationSelect(String category); + List getPersonnelClassificationSelect(@Param("category") String category); } diff --git a/bonus-business/src/main/java/com/bonus/digital/service/DayPlanService.java b/bonus-business/src/main/java/com/bonus/digital/service/DayPlanService.java index 9ffe164..4e2967b 100644 --- a/bonus-business/src/main/java/com/bonus/digital/service/DayPlanService.java +++ b/bonus-business/src/main/java/com/bonus/digital/service/DayPlanService.java @@ -1,9 +1,21 @@ package com.bonus.digital.service; +import com.bonus.digital.dao.DayPlanVo; +import com.bonus.digital.dao.MonthlyPlanVo; + +import java.util.List; + /** * @Author:liang.chao * @Date:2025/12/18 - 10:48 */ public interface DayPlanService { + int addMonthlyPlan(DayPlanVo dayPlanVo); + + int delDayPlan(DayPlanVo dayPlanVo); + + int updateDayPlan(DayPlanVo dayPlanVo); + + List getDayPlanList(DayPlanVo dayPlanVo); } diff --git a/bonus-business/src/main/java/com/bonus/digital/service/impl/DayPlanServiceImpl.java b/bonus-business/src/main/java/com/bonus/digital/service/impl/DayPlanServiceImpl.java index be59525..823696b 100644 --- a/bonus-business/src/main/java/com/bonus/digital/service/impl/DayPlanServiceImpl.java +++ b/bonus-business/src/main/java/com/bonus/digital/service/impl/DayPlanServiceImpl.java @@ -1,12 +1,43 @@ package com.bonus.digital.service.impl; +import com.bonus.common.utils.SecurityUtils; +import com.bonus.digital.dao.DayPlanVo; +import com.bonus.digital.dao.MonthlyPlanVo; +import com.bonus.digital.mapper.DayPlanMapper; import com.bonus.digital.service.DayPlanService; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + /** * @Author:liang.chao * @Date:2025/12/18 - 10:48 */ @Service public class DayPlanServiceImpl implements DayPlanService { + @Resource + private DayPlanMapper dayPlanMapper; + @Override + public int addMonthlyPlan(DayPlanVo dayPlanVo) { + dayPlanVo.setCreateUser(SecurityUtils.getUserId().toString()); + dayPlanVo.setCreateTime(new Date()); + return dayPlanMapper.addMonthlyPlan(dayPlanVo); + } + + @Override + public int delDayPlan(DayPlanVo dayPlanVo) { + return dayPlanMapper.delDayPlan(dayPlanVo); + } + + @Override + public int updateDayPlan(DayPlanVo dayPlanVo) { + return dayPlanMapper.updateDayPlan(dayPlanVo); + } + + @Override + public List getDayPlanList(DayPlanVo dayPlanVo) { + return dayPlanMapper.getDayPlanList(dayPlanVo); + } } diff --git a/bonus-business/src/main/resources/mapper/DayPlanMapper.xml b/bonus-business/src/main/resources/mapper/DayPlanMapper.xml new file mode 100644 index 0000000..27e43b0 --- /dev/null +++ b/bonus-business/src/main/resources/mapper/DayPlanMapper.xml @@ -0,0 +1,111 @@ + + + + + + INSERT INTO tb_day_plan + + day_plan, + planned_workload, + proposed_personnel, + proposed_proficient_personnel, + proposed_proficient_day, + proposed_assistance_personnel, + proposed_assistance_day, + proposed_long_time_car, + proposed_temporary_car, + proposed_sub_car, + actual_proficient_personnel, + actual_assistance_personnel, + actual_personnel, + actual_long_time_car, + actual_temporary_car, + actual_sub_car, + actual_work_content, + actual_workload, + completion_percentage, + plan_completion_status, + plan_changes, + create_user, + create_time, + status, + day_plan_type, + + + #{dayPlan}, + #{plannedWorkload}, + #{proposedPersonnel}, + #{proposedProficientPersonnel}, + #{proposedProficientDay}, + #{proposedAssistancePersonnel}, + #{proposedAssistanceDay}, + #{proposedLongTimeCar}, + #{proposedTemporaryCar}, + #{proposedSubCar}, + #{actualProficientPersonnel}, + #{actualAssistancePersonnel}, + #{actualPersonnel}, + #{actualLongTimeCar}, + #{actualTemporaryCar}, + #{actualSubCar}, + #{actualWorkContent}, + #{actualWorkload}, + #{completionPercentage}, + #{planCompletionStatus}, + #{planChanges}, + #{createUser}, + #{createTime}, + #{status}, + #{dayPlanType}, + + + + UPDATE tb_day_plan + + monthly_plan_id = #{monthlyPlanId}, + day_plan = #{dayPlan}, + planned_workload = #{plannedWorkload}, + proposed_personnel = #{proposedPersonnel}, + proposed_proficient_personnel = #{proposedProficientPersonnel}, + proposed_proficient_day = #{proposedProficientDay}, + proposed_assistance_personnel = #{proposedAssistancePersonnel}, + proposed_assistance_day = #{proposedAssistanceDay}, + proposed_long_time_car = #{proposedLongTimeCar}, + proposed_temporary_car = #{proposedTemporaryCar}, + proposed_sub_car = #{proposedSubCar}, + actual_proficient_personnel = #{actualProficientPersonnel}, + actual_assistance_personnel = #{actualAssistancePersonnel}, + actual_personnel = #{actualPersonnel}, + actual_long_time_car = #{actualLongTimeCar}, + actual_temporary_car = #{actualTemporaryCar}, + actual_sub_car = #{actualSubCar}, + actual_work_content = #{actualWorkContent}, + actual_workload = #{actualWorkload}, + completion_percentage = #{completionPercentage}, + plan_completion_status = #{planCompletionStatus}, + plan_changes = #{planChanges}, + update_time = #{updateTime}, + update_user = #{updateUser}, + status = #{status}, + + WHERE day_plan_id = #{dayPlanId} + + + update tb_day_plan set is_active = '0' where day_plan_id = #{dayPlanId} + + + diff --git a/bonus-business/src/main/resources/mapper/MonthPlanMapper.xml b/bonus-business/src/main/resources/mapper/MonthPlanMapper.xml index 4668c11..17b2d08 100644 --- a/bonus-business/src/main/resources/mapper/MonthPlanMapper.xml +++ b/bonus-business/src/main/resources/mapper/MonthPlanMapper.xml @@ -117,17 +117,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" tmp.actual_working_day from tb_monthly_plan tmp left join tb_plan_major tpm on tmp.plan_major_id = tpm.plan_major_id - left join tb_plan_major tpm2 on tmp.plan_major_id = tpm2.plan_major_id - left join tb_plan_major tpm3 on tmp.plan_major_id = tpm3.plan_major_id where tmp.is_active = '1' - - select tis.id, tis.inspection_station_id as inspectionStationId, + tis2.inspection_station_name as inspectionStationName, tis.name, tis.sex, tis.phone, @@ -91,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) + and tis.is_active = '1' - select tis.plan_management_id, - tis.plan_management_month, - tis.project_name, - tis.work_content, - tis.inspection_station_id, + select tpm.plan_management_id, + tpm.plan_management_month, + tpm.project_name, + tpm.work_content, + tpm.inspection_station_id, tis2.inspection_station_name as inspectionStationName - tis.stare_date, - tis.end_date, - tis.remark, - tis.create_user + tpm.stare_date, + tpm.end_date, + tpm.remark, + tpm.create_user from tb_plan_management tpm left join tb_inspection_station tis2 on tpm.inspection_station_id = tis2.inspection_station_id where category = #{category} and is_active = '1'