联调问题

This commit is contained in:
马三炮 2025-12-24 16:05:43 +08:00
parent e366dda054
commit 2490e40c6c
11 changed files with 103 additions and 49 deletions

View File

@ -66,7 +66,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 MonthlyPlanVo monthlyPlanVo) { public AjaxResult addMonthlyPlan(@RequestBody List<MonthlyPlanVo> monthlyPlanVo) {
try { try {
int res = monthlyPlanService.addMonthlyPlanList(monthlyPlanVo); int res = monthlyPlanService.addMonthlyPlanList(monthlyPlanVo);
if (res > 0) { if (res > 0) {

View File

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

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,27 @@ public class MonthlyPlanVo {
/** /**
* 计划投入管理车辆数量 * 计划投入管理车辆数量
*/ */
private int planCarNum; private Integer planCarNum;
/** /**
* 计划投入熟练工人员数量 * 计划投入熟练工人员数量
*/ */
private int planSkilledWorkerNum; private Integer planSkilledWorkerNum;
/** /**
* 计划投入辅助工人员数量 * 计划投入辅助工人员数量
*/ */
private int planAuxiliaryWorkerNum; private Integer planAuxiliaryWorkerNum;
/** /**
* 计划投入分包车辆数量 * 计划投入分包车辆数量
*/ */
private int planSubCarNum; private Integer planSubCarNum;
/** /**
* 实际工作天数 * 实际工作天数
*/ */
private int actualWorkingDay; private Integer actualWorkingDay;
/** /**
* 创建人 * 创建人
@ -162,4 +162,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

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

View File

@ -1,6 +1,7 @@
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;
@ -36,17 +37,20 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService {
public List<MonthlyPlanVo> getPlanMajorList(MonthlyPlanVo monthlyPlanVo) { public List<MonthlyPlanVo> getPlanMajorList(MonthlyPlanVo monthlyPlanVo) {
List<MonthlyPlanVo> monthlyPlanVoList = monthlyPlanMapper.getPlanMajorList(monthlyPlanVo); List<MonthlyPlanVo> monthlyPlanVoList = monthlyPlanMapper.getPlanMajorList(monthlyPlanVo);
for (MonthlyPlanVo monthlyPlanVo2 : monthlyPlanVoList) { for (MonthlyPlanVo monthlyPlanVo2 : monthlyPlanVoList) {
//获取每个月计划投入的管理人员 if (StringUtils.isNotEmpty(monthlyPlanVo2.getPlanPersonnel())){
List<String> plannedIdList = Arrays.asList(monthlyPlanVo2.getPlanPersonnel().split(",")); //获取每个月计划投入的管理人员
PersonnelVo personnelVo = new PersonnelVo(); List<String> plannedIdList = Arrays.asList(monthlyPlanVo2.getPlanPersonnel().split(","));
personnelVo.setIdList(plannedIdList); PersonnelVo personnelVo = new PersonnelVo();
List<PersonnelVo> plannedList = personnelMapper.getPersonnelList(personnelVo); personnelVo.setIdList(plannedIdList);
monthlyPlanVo2.setPersonneltList(plannedList); List<PersonnelVo> plannedList = personnelMapper.getPersonnelList(personnelVo);
//获取人员安排信息 monthlyPlanVo2.setPersonneltList(plannedList);
List<PersonnelArrangementVo> personnelArrangementVoList = monthlyPlanMapper.getPersonnelArrangementList(monthlyPlanVo2); //获取人员安排信息
monthlyPlanVo2.setPersonnelArrangementList(personnelArrangementVoList); List<PersonnelArrangementVo> personnelArrangementVoList = monthlyPlanMapper.getPersonnelArrangementList(monthlyPlanVo2);
monthlyPlanVo2.setPersonnelArrangementList(personnelArrangementVoList);
}
} }
return Collections.emptyList(); return monthlyPlanVoList;
} }
/** /**
@ -54,25 +58,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)
@ -81,6 +81,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 +117,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>