Merge remote-tracking branch 'origin/main'

# Conflicts:
#	bonus-business/src/main/java/com/bonus/digital/controller/MonthlyPlanController.java
This commit is contained in:
LHD_HY 2025-12-24 18:22:15 +08:00
commit c833988769
14 changed files with 158 additions and 54 deletions

View File

@ -42,6 +42,21 @@ public class PersonnelController extends BaseController {
} }
} }
/**
* 获取人员管理列表(不分页)
*/
@PreAuthorize("@ss.hasPermi('tb:personnel:list')")
@GetMapping("/getPersonnelListSelect")
public AjaxResult getPersonnelListSelect(PersonnelVo personnelVo) {
try {
List<PersonnelVo> list = personnelService.getPersonnelList(personnelVo);
return AjaxResult.success(list);
} catch (Exception e) {
return error("接口异常");
}
}
//人员所属下拉 //人员所属下拉
//0运检站1项目部 //0运检站1项目部
@GetMapping("/getInspectionStationSelect") @GetMapping("/getInspectionStationSelect")

View File

@ -43,6 +43,21 @@ public class PlanMajorController extends BaseController {
} }
} }
/**
* 列表类别0计划专业1业务分类2计划类别
*/
@PreAuthorize("@ss.hasPermi('plan:major:list')")
@GetMapping("/getPlanMajorListSelect")
public AjaxResult getPlanMajorListSelect(PlanMajorVo planMajorVo)
{
try {
List<PlanMajorVo> list = planMajorService.getPlanMajorList(planMajorVo);
return success(list);
}catch (Exception e) {
return error("系统异常");
}
}
/** /**
* 新增类别0计划专业1业务分类2计划类别 * 新增类别0计划专业1业务分类2计划类别
*/ */

View File

@ -191,4 +191,10 @@ public class DayPlanVo {
// 实际投入地面作业人员data_source=5 // 实际投入地面作业人员data_source=5
private String actualGroundPersonnelNames; private String actualGroundPersonnelNames;
private Integer actualGroundPersonnelNum; private Integer actualGroundPersonnelNum;
/**
* 风险等级
*/
private String riskLevel;
} }

View File

@ -15,7 +15,7 @@ public class MonthlyPlanVo {
/** /**
* 月计划填报id * 月计划填报id
*/ */
private int monthlyPlanId; private Integer monthlyPlanId;
/** /**
* 计划月份 * 计划月份
@ -25,7 +25,7 @@ public class MonthlyPlanVo {
/** /**
* 运检站id * 运检站id
*/ */
private int inspectionStationId; private Integer inspectionStationId;
/** /**
* 运检站名称 * 运检站名称
@ -35,17 +35,17 @@ public class MonthlyPlanVo {
/** /**
* 计划专业id * 计划专业id
*/ */
private int planMajorId; private Integer planMajorId;
/** /**
* 业务类型id * 业务类型id
*/ */
private int businessTypeId; private Integer businessTypeId;
/** /**
* 项目名称 * 项目名称
*/ */
private int projectName; private String projectName;
/** /**
* 作业内容 * 作业内容
@ -55,12 +55,12 @@ public class MonthlyPlanVo {
/** /**
* 计划类别id * 计划类别id
*/ */
private int planCategoryId; private Integer planCategoryId;
/** /**
* 塔基数 * 塔基数
*/ */
private int towerBaseNumber; private Integer towerBaseNumber;
/** /**
* 计划开始时间 * 计划开始时间
@ -80,27 +80,37 @@ public class MonthlyPlanVo {
/** /**
* 计划投入管理车辆数量 * 计划投入管理车辆数量
*/ */
private int planCarNum; private Integer planCarNum;
/** /**
* 计划投入熟练工人员数量 * 计划投入熟练工人员数量
*/ */
private int planSkilledWorkerNum; private Integer planSkilledWorkerNum;
/**
* 计划投入熟练工工日
*/
private Integer planSkilledWorkerDay;
/** /**
* 计划投入辅助工人员数量 * 计划投入辅助工人员数量
*/ */
private int planAuxiliaryWorkerNum; private Integer planAuxiliaryWorkerNum;
/**
* 计划投入辅助工人工日
*/
private Integer planAuxiliaryWorkerDay;
/** /**
* 计划投入分包车辆数量 * 计划投入分包车辆数量
*/ */
private int planSubCarNum; private Integer planSubCarNum;
/** /**
* 实际工作天数 * 实际工作天数
*/ */
private int actualWorkingDay; private Integer actualWorkingDay;
/** /**
* 创建人 * 创建人
@ -162,4 +172,10 @@ public class MonthlyPlanVo {
private Integer totalSubCarDays; private Integer totalSubCarDays;
/**
* 风险等级
*/
private String riskLevel;
} }

View File

@ -14,7 +14,7 @@ public class PlanManagementVo {
/** /**
* 计划管理id * 计划管理id
*/ */
private int planManagementId; private Integer planManagementId;
/** /**
* 计划管理月份 * 计划管理月份
@ -34,7 +34,7 @@ public class PlanManagementVo {
/** /**
* 实施部门 * 实施部门
*/ */
private int inspectionStationId; private Integer inspectionStationId;
/** /**
* 实施部门 * 实施部门
@ -86,4 +86,9 @@ public class PlanManagementVo {
*/ */
private Date updateTime; private Date updateTime;
/**
* 关键字
*/
private String keyWord;
} }

View File

@ -12,17 +12,17 @@ public class WorkloadVo {
/** /**
* 工作量id * 工作量id
*/ */
private int workloadId; private Integer workloadId;
/** /**
* 计划填报id * 计划填报id
*/ */
private int planId; private Integer planId;
/** /**
* 工作量类别id * 工作量类别id
*/ */
private int workloadCategoryId; private Integer workloadCategoryId;
/** /**
* 工作量类别名称 * 工作量类别名称
@ -37,7 +37,7 @@ public class WorkloadVo {
/** /**
*工作量 *工作量
*/ */
private int workloadNum; private Integer workloadNum;
/** /**
* 数据来源0月计划1日计划 * 数据来源0月计划1日计划

View File

@ -1,6 +1,7 @@
package com.bonus.digital.mapper; package com.bonus.digital.mapper;
import com.bonus.digital.dao.WorkloadCategoryVo; import com.bonus.digital.dao.WorkloadCategoryVo;
import com.bonus.digital.dao.WorkloadVo;
import java.util.List; import java.util.List;
@ -12,4 +13,6 @@ public interface WorkloadCategoryMapper {
int delWorkloadCategory(WorkloadCategoryVo workloadCategoryVo); int delWorkloadCategory(WorkloadCategoryVo workloadCategoryVo);
int updateWorkloadCategory(WorkloadCategoryVo workloadCategoryVo); int updateWorkloadCategory(WorkloadCategoryVo workloadCategoryVo);
List<WorkloadVo> getWorkloadList(WorkloadVo workloadVo);
} }

View File

@ -13,7 +13,7 @@ public interface MonthlyPlanService {
/** /**
* 新增月计划 * 新增月计划
*/ */
int addMonthlyPlanList(MonthlyPlanVo monthlyPlanVo); int addMonthlyPlanList(List<MonthlyPlanVo> monthlyPlanVo);
/** /**
* 删除月计划 * 删除月计划

View File

@ -1,9 +1,11 @@
package com.bonus.digital.service.impl; package com.bonus.digital.service.impl;
import com.bonus.common.utils.SecurityUtils; import com.bonus.common.utils.SecurityUtils;
import com.bonus.common.utils.StringUtils;
import com.bonus.digital.dao.*; import com.bonus.digital.dao.*;
import com.bonus.digital.mapper.MonthlyPlanMapper; import com.bonus.digital.mapper.MonthlyPlanMapper;
import com.bonus.digital.mapper.PersonnelMapper; import com.bonus.digital.mapper.PersonnelMapper;
import com.bonus.digital.mapper.WorkloadCategoryMapper;
import com.bonus.digital.service.MonthlyPlanService; import com.bonus.digital.service.MonthlyPlanService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -29,24 +31,38 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService {
@Resource @Resource
private PersonnelMapper personnelMapper; private PersonnelMapper personnelMapper;
@Resource
private WorkloadCategoryMapper workloadCategoryMapper;
/** /**
* 月计划列表 * 月计划列表
*/ */
@Override @Override
public List<MonthlyPlanVo> getPlanMajorList(MonthlyPlanVo monthlyPlanVo) { public List<MonthlyPlanVo> getPlanMajorList(MonthlyPlanVo monthlyPlanVo) {
List<MonthlyPlanVo> monthlyPlanVoList = monthlyPlanMapper.getPlanMajorList(monthlyPlanVo); try {
for (MonthlyPlanVo monthlyPlanVo2 : monthlyPlanVoList) { List<MonthlyPlanVo> monthlyPlanVoList = monthlyPlanMapper.getPlanMajorList(monthlyPlanVo);
//获取每个月计划投入的管理人员 for (MonthlyPlanVo monthlyPlanVo2 : monthlyPlanVoList) {
List<String> plannedIdList = Arrays.asList(monthlyPlanVo2.getPlanPersonnel().split(",")); if (StringUtils.isNotEmpty(monthlyPlanVo2.getPlanPersonnel())){
PersonnelVo personnelVo = new PersonnelVo(); //获取每个月计划投入的管理人员
personnelVo.setIdList(plannedIdList); List<String> plannedIdList = Arrays.asList(monthlyPlanVo2.getPlanPersonnel().split(","));
List<PersonnelVo> plannedList = personnelMapper.getPersonnelList(personnelVo); PersonnelVo personnelVo = new PersonnelVo();
monthlyPlanVo2.setPersonneltList(plannedList); personnelVo.setIdList(plannedIdList);
//获取人员安排信息 List<PersonnelVo> plannedList = personnelMapper.getPersonnelList(personnelVo);
List<PersonnelArrangementVo> personnelArrangementVoList = monthlyPlanMapper.getPersonnelArrangementList(monthlyPlanVo2); monthlyPlanVo2.setPersonneltList(plannedList);
monthlyPlanVo2.setPersonnelArrangementList(personnelArrangementVoList); //获取人员安排信息
List<PersonnelArrangementVo> personnelArrangementVoList = monthlyPlanMapper.getPersonnelArrangementList(monthlyPlanVo2);
monthlyPlanVo2.setPersonnelArrangementList(personnelArrangementVoList);
}
WorkloadVo workloadVo = new WorkloadVo();
workloadVo.setPlanId(monthlyPlanVo2.getMonthlyPlanId());
workloadVo.setDataSource("0");
List<WorkloadVo> workloadVoList = workloadCategoryMapper.getWorkloadList(workloadVo);
monthlyPlanVo2.setWorkloadList(workloadVoList);
}
return monthlyPlanVoList;
}catch (Exception e){
throw new RuntimeException(e);
} }
return Collections.emptyList();
} }
/** /**
@ -54,25 +70,14 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService {
*/ */
@Override @Override
@Transactional @Transactional
public int addMonthlyPlanList(MonthlyPlanVo monthlyPlanVo) { public int addMonthlyPlanList(List<MonthlyPlanVo> monthlyPlanVo) {
Long userId = SecurityUtils.getUserId(); for (MonthlyPlanVo monthlyPlanVo2 : monthlyPlanVo) {
monthlyPlanVo.setCreateUser(userId.toString()); Long userId = SecurityUtils.getUserId();
monthlyPlanVo.setCreateTime(new Date()); monthlyPlanVo2.setCreateUser(userId.toString());
int res = monthlyPlanMapper.addMonthlyPlanList(monthlyPlanVo); monthlyPlanVo2.setCreateTime(new Date());
//保存人员安排信息 monthlyPlanMapper.addMonthlyPlanList(monthlyPlanVo2);
List<PersonnelArrangementVo> personnelArrangementList = monthlyPlanVo.getPersonnelArrangementList();
for (PersonnelArrangementVo p : personnelArrangementList) {
p.setMonthlyPlanId(monthlyPlanVo.getMonthlyPlanId());
monthlyPlanMapper.addPersonnelArrangement(p);
} }
//保存工作量信息 return 1;
List<WorkloadVo> workloadVoList = monthlyPlanVo.getWorkloadList();
for (WorkloadVo w : workloadVoList) {
w.setPlanId(monthlyPlanVo.getMonthlyPlanId());
w.setDataSource("0");
monthlyPlanMapper.addWorkload(w);
}
return res;
} }
/** /**

View File

@ -32,6 +32,7 @@
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<if test="status != null and status != ''">status,</if> <if test="status != null and status != ''">status,</if>
<if test="dayPlanType != null and dayPlanType != ''">day_plan_type,</if> <if test="dayPlanType != null and dayPlanType != ''">day_plan_type,</if>
<if test="riskLevel != null and riskLevel != ''">risk_level,</if>
</trim> </trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=","> <trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="dayPlan != null and dayPlan != ''">#{dayPlan},</if> <if test="dayPlan != null and dayPlan != ''">#{dayPlan},</if>
@ -59,6 +60,7 @@
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="status != null and status != ''">#{status},</if> <if test="status != null and status != ''">#{status},</if>
<if test="dayPlanType != null and dayPlanType != ''">#{dayPlanType},</if> <if test="dayPlanType != null and dayPlanType != ''">#{dayPlanType},</if>
<if test="riskLevel != null and riskLevel != ''">#{riskLevel},</if>
</trim> </trim>
</insert> </insert>
<update id="updateDayPlan"> <update id="updateDayPlan">
@ -89,6 +91,7 @@
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateUser != null and updateUser != ''">update_user = #{updateUser},</if> <if test="updateUser != null and updateUser != ''">update_user = #{updateUser},</if>
<if test="status != null and status != ''">status = #{status},</if> <if test="status != null and status != ''">status = #{status},</if>
<if test="riskLevel != null and riskLevel != ''">risk_level = #{riskLevel},</if>
</trim> </trim>
WHERE day_plan_id = #{dayPlanId} WHERE day_plan_id = #{dayPlanId}
</update> </update>
@ -143,6 +146,7 @@
tdp.day_plan_type AS dayPlanType, tdp.day_plan_type AS dayPlanType,
tdp.start_time AS startTime, tdp.start_time AS startTime,
tdp.end_time AS endTime, tdp.end_time AS endTime,
tdp.risk_level AS reskLevel,
-- 新增拟投入高处作业人员data_source=2姓名 + 数量 -- 新增拟投入高处作业人员data_source=2姓名 + 数量
(SELECT IFNULL(GROUP_CONCAT(tpp.personnel_name SEPARATOR ','), '') (SELECT IFNULL(GROUP_CONCAT(tpp.personnel_name SEPARATOR ','), '')

View File

@ -7,11 +7,11 @@
insert into tb_monthly_plan (monthly_plan,inspection_station_id,inspection_station_name,plan_major_id,business_type_id, insert into tb_monthly_plan (monthly_plan,inspection_station_id,inspection_station_name,plan_major_id,business_type_id,
project_name,work_content,plan_category_id,tower_base_number,planned_start_time, project_name,work_content,plan_category_id,tower_base_number,planned_start_time,
planned_end_time,plan_personnel,plan_car_num,plan_skilled_worker_num,plan_auxiliary_worker_num, planned_end_time,plan_personnel,plan_car_num,plan_skilled_worker_num,plan_auxiliary_worker_num,
plan_sub_car_num,create_user,create_time,actual_working_day) plan_sub_car_num,create_user,create_time,actual_working_day,risk_level)
values (#{monthlyPlan},#{inspectionStationId},#{inspectionStationName},#{planMajorId},#{businessTypeId}, values (#{monthlyPlan},#{inspectionStationId},#{inspectionStationName},#{planMajorId},#{businessTypeId},
#{projectName},#{workContent},#{planCategoryId},#{towerBaseNumber},#{plannedStartTime},#{plannedEndTime}, #{projectName},#{workContent},#{planCategoryId},#{towerBaseNumber},#{plannedStartTime},#{plannedEndTime},
#{planPersonnel},#{planCarNum},#{planSkilledWorkerNum},#{planAuxiliaryWorkerNum},#{planSubCarNum}, #{planPersonnel},#{planCarNum},#{planSkilledWorkerNum},#{planAuxiliaryWorkerNum},#{planSubCarNum},
#{createUser},#{createTime},#{actualWorkingDay}) #{createUser},#{createTime},#{actualWorkingDay},#{riskLevel})
</insert> </insert>
<insert id="addPersonnelArrangement"> <insert id="addPersonnelArrangement">
insert into tb_personnel_arrangement (monthly_plan_id,day,personnel_names) insert into tb_personnel_arrangement (monthly_plan_id,day,personnel_names)
@ -66,9 +66,15 @@
<if test="planSkilledWorkerNum!= null " > <if test="planSkilledWorkerNum!= null " >
plan_skilled_worker_num=#{planSkilledWorkerNum}, plan_skilled_worker_num=#{planSkilledWorkerNum},
</if> </if>
<if test="planSkilledWorkerDay!= null " >
plan_skilled_worker_day=#{planSkilledWorkerDay},
</if>
<if test="planAuxiliaryWorkerNum!= null " > <if test="planAuxiliaryWorkerNum!= null " >
plan_auxiliary_worker_num=#{planAuxiliaryWorkerNum}, plan_auxiliary_worker_num=#{planAuxiliaryWorkerNum},
</if> </if>
<if test="planAuxiliaryWorkerDay!= null " >
plan_auxiliary_worker_day=#{planAuxiliaryWorkerDay},
</if>
<if test="planSubCarNum!= null " > <if test="planSubCarNum!= null " >
plan_sub_car_num=#{planSubCarNum}, plan_sub_car_num=#{planSubCarNum},
</if> </if>
@ -81,6 +87,9 @@
<if test="actualWorkingDay!= null " > <if test="actualWorkingDay!= null " >
actual_working_day=#{actualWorkingDay}, actual_working_day=#{actualWorkingDay},
</if> </if>
<if test="riskLevel!= null " >
risk_level=#{riskLevel},
</if>
</trim> </trim>
where monthly_plan_id = #{monthlyPlanId} where monthly_plan_id = #{monthlyPlanId}
</update> </update>
@ -114,6 +123,7 @@
tmp.plan_sub_car_num, tmp.plan_sub_car_num,
tmp.create_user, tmp.create_user,
tmp.create_time, tmp.create_time,
tmp.risk_level,
tmp.actual_working_day tmp.actual_working_day
from tb_monthly_plan tmp 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 tpm on tmp.plan_major_id = tpm.plan_major_id

View File

@ -98,7 +98,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getInspectionStationSelect" resultType="com.bonus.digital.dao.SelectDto"> <select id="getInspectionStationSelect" resultType="com.bonus.digital.dao.SelectDto">
select inspection_station_id as id, select inspection_station_id as id,
inspection_station_name as value inspection_station_name as value
from tb_inspection_station where is_active = '1' and category = #{category} from tb_inspection_station where is_active = '1'
<if test="category!= null " >
and category = #{category}
</if>
</select> </select>
<select id="getPersonnelClassificationSelect" resultType="com.bonus.digital.dao.SelectDto"> <select id="getPersonnelClassificationSelect" resultType="com.bonus.digital.dao.SelectDto">
select personnel_classification_id as id, select personnel_classification_id as id,

View File

@ -39,6 +39,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime!= null " > <if test="updateTime!= null " >
update_time=#{updateTime}, update_time=#{updateTime},
</if> </if>
<if test="remark!= null " >
remark=#{remark},
</if>
</trim> </trim>
where plan_management_id = #{planManagementId} where plan_management_id = #{planManagementId}
</update> </update>
@ -52,13 +55,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
tpm.project_name, tpm.project_name,
tpm.work_content, tpm.work_content,
tpm.inspection_station_id, tpm.inspection_station_id,
tis2.inspection_station_name as inspectionStationName tis2.inspection_station_name as inspectionStationName,
tpm.stare_date, tpm.stare_date,
tpm.end_date, tpm.end_date,
tpm.risk_level,
tpm.remark, tpm.remark,
tpm.create_user tpm.create_user
from tb_plan_management tpm from tb_plan_management tpm
left join tb_inspection_station tis2 on tpm.inspection_station_id = tis2.inspection_station_id left join tb_inspection_station tis2 on tpm.inspection_station_id = tis2.inspection_station_id
where category = #{category} and is_active = '1' where tpm.is_active = '1'
<if test="planManagementMonth!= null " >
and tpm.plan_management_month=#{planManagementMonth}
</if>
<if test="inspectionStationId!= null " >
and tpm.inspection_station_id=#{inspectionStationId}
</if>
<if test="riskLevel!= null " >
and tpm.risk_level=#{riskLevel}
</if>
<if test="keyWord!= null " >
AND (tpm.project_name like concat('%', #{keyWord}, '%')
or tpm.work_content like concat('%', #{keyWord}, '%'))
</if>
</select> </select>
</mapper> </mapper>

View File

@ -39,4 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and workload_category_name like concat('%',#{workloadCategoryName},'%') and workload_category_name like concat('%',#{workloadCategoryName},'%')
</if> </if>
</select> </select>
<select id="getWorkloadList" resultType="com.bonus.digital.dao.WorkloadVo">
select workload_id,plan_id,workload_category_id,workload_category_name,unit_price,workload_num,data_source
from tb_workload where plan_id = #{planId} and data_source = #{dataSource}
</select>
</mapper> </mapper>