新增需求
This commit is contained in:
parent
4b482dad87
commit
5d53969cd3
|
|
@ -114,7 +114,7 @@ public class MonthPlanExcelExporter {
|
|||
// 固定列(空值兜底)
|
||||
newRow.put("运检站", item.getInspectionStationName() == null ? "" : item.getInspectionStationName());
|
||||
newRow.put("姓名", item.getName() == null ? "" : item.getName());
|
||||
newRow.put("性别", item.getSex() == null ? "" : item.getSex());
|
||||
newRow.put("性别", Objects.equals(item.getSex(), "1") ? "男" : "女");
|
||||
newRow.put("岗位", item.getPositionName() == null ? "" : item.getPositionName());
|
||||
newRow.put("人员性质", item.getPersonnelNatureName() == null ? "" : item.getPersonnelNatureName());
|
||||
newRow.put("分类", item.getPersonnelClassificationName() == null ? "" : item.getPersonnelClassificationName());
|
||||
|
|
|
|||
|
|
@ -203,6 +203,15 @@ public class DayPlanVo {
|
|||
* 结束日期
|
||||
*/
|
||||
private String endDate;
|
||||
/**
|
||||
* 实际投入高空分包
|
||||
*/
|
||||
private String actualHighSub;
|
||||
|
||||
/**
|
||||
* 实际投入地面分包
|
||||
*/
|
||||
private String actualGroundSub;
|
||||
|
||||
// 拟投入高处作业人员(data_source=2)
|
||||
private String proposedHighPersonnelNames; // 姓名拼接
|
||||
|
|
|
|||
|
|
@ -1,37 +1,43 @@
|
|||
package com.bonus.digital.dao;
|
||||
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 拟投入人员值对象(VO)类
|
||||
* 用于封装拟投入人员相关的数据信息
|
||||
*
|
||||
* @author 马三炮
|
||||
* @date 2025/12/26
|
||||
*/
|
||||
@Data
|
||||
@Data // Lombok注解,自动生成getter、setter等方法
|
||||
public class ProposedPersonnelVo {
|
||||
|
||||
/**
|
||||
* 拟投入人员id
|
||||
* 唯一标识一条拟投入人员记录
|
||||
*/
|
||||
private Integer proposedPersonnelId;
|
||||
|
||||
/**
|
||||
* 日计划id
|
||||
* 关联到具体的日计划
|
||||
*/
|
||||
private Integer dayPlanId;
|
||||
|
||||
/**
|
||||
* 人员所属
|
||||
* 表示人员所属的检查站点名称
|
||||
*/
|
||||
private String inspectionStationName;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
* 系统中人员的唯一标识
|
||||
*/
|
||||
private Integer personnelId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
* 人员的实际姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
|
|
@ -41,4 +47,15 @@ public class ProposedPersonnelVo {
|
|||
*
|
||||
*/
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 人员分类id
|
||||
*/
|
||||
private int personnelClassificationId;
|
||||
|
||||
/**
|
||||
* 人员分类名称
|
||||
*/
|
||||
private String personnelClassificationName;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,4 +48,14 @@ public class WorkloadVo {
|
|||
* 结算单价(元)
|
||||
*/
|
||||
private int settlementUnitPrice;
|
||||
|
||||
/**
|
||||
* 完成率
|
||||
*/
|
||||
private String completionRate;
|
||||
|
||||
/**
|
||||
* 实际工作量
|
||||
*/
|
||||
private String actualWorkloadNum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public interface MonthlyPlanMapper {
|
|||
/**
|
||||
* 删除工作量信息
|
||||
*/
|
||||
void delWorkload(MonthlyPlanVo monthlyPlanVo);
|
||||
void delWorkload(WorkloadVo workloadVo);
|
||||
|
||||
/**
|
||||
* 修改月计划
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ public class DayPlanServiceImpl implements DayPlanService {
|
|||
dayPlanMapper.delProposedPersonnel(dayPlanVo);
|
||||
dayPlanMapper.addProposedPersonnelList(proposedPersonnelList);
|
||||
}
|
||||
|
||||
WorkloadVo workloadVo = new WorkloadVo();
|
||||
workloadVo.setPlanId(dayPlanVo.getDayPlanId());
|
||||
workloadVo.setDataSource("1");
|
||||
monthlyPlanMapper.delWorkload(workloadVo);
|
||||
//保存工作量信息
|
||||
List<WorkloadVo> workloadVoList = dayPlanVo.getWorkloadList();
|
||||
if (workloadVoList != null && !workloadVoList.isEmpty()) {
|
||||
MonthlyPlanVo monthlyPlanVo = new MonthlyPlanVo();
|
||||
monthlyPlanVo.setMonthlyPlanId(dayPlanVo.getMonthlyPlanId());
|
||||
monthlyPlanMapper.delWorkload(monthlyPlanVo);
|
||||
for (WorkloadVo w : workloadVoList) {
|
||||
w.setPlanId(dayPlanVo.getDayPlanId());
|
||||
w.setDataSource("1");
|
||||
|
|
@ -140,10 +140,16 @@ public class DayPlanServiceImpl implements DayPlanService {
|
|||
if (res != null ) {
|
||||
List<ProposedPersonnelVo> proposedPersonnelList =dayPlanMapper.getProposedPersonnelList(res);
|
||||
res.setProposedPersonnelList(proposedPersonnelList);
|
||||
//先看日计划是否编辑,没有编辑获取月计划的工作量,编辑了就获取日计划的工作量
|
||||
WorkloadVo workloadVo = new WorkloadVo();
|
||||
workloadVo.setPlanId(res.getDayPlanId());
|
||||
workloadVo.setDataSource("1");
|
||||
List<WorkloadVo> workloadVoList = workloadCategoryMapper.getWorkloadList(workloadVo);
|
||||
if (workloadVoList == null || workloadVoList.isEmpty()) {
|
||||
workloadVo.setPlanId(res.getMonthlyPlanId());
|
||||
workloadVo.setDataSource("0");
|
||||
workloadVoList = workloadCategoryMapper.getWorkloadList(workloadVo);
|
||||
}
|
||||
res.setWorkloadList(workloadVoList);
|
||||
}
|
||||
return res;
|
||||
|
|
|
|||
|
|
@ -104,7 +104,10 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService {
|
|||
return 2;
|
||||
}
|
||||
monthlyPlanMapper.delPersonnelArrangement(monthlyPlanVo);
|
||||
monthlyPlanMapper.delWorkload(monthlyPlanVo);
|
||||
WorkloadVo workloadVo = new WorkloadVo();
|
||||
workloadVo.setPlanId(monthlyPlanVo.getMonthlyPlanId());
|
||||
workloadVo.setDataSource("0");
|
||||
monthlyPlanMapper.delWorkload(workloadVo);
|
||||
return monthlyPlanMapper.delMonthlyPlanList(monthlyPlanVo);
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +122,10 @@ public class MonthlyPlanServiceImpl implements MonthlyPlanService {
|
|||
monthlyPlanVo.setUpdateTime(new Date());
|
||||
int res = monthlyPlanMapper.updateMonthlyPlan(monthlyPlanVo);
|
||||
monthlyPlanMapper.delPersonnelArrangement(monthlyPlanVo);
|
||||
monthlyPlanMapper.delWorkload(monthlyPlanVo);
|
||||
WorkloadVo workloadVo = new WorkloadVo();
|
||||
workloadVo.setPlanId(monthlyPlanVo.getMonthlyPlanId());
|
||||
workloadVo.setDataSource("0");
|
||||
monthlyPlanMapper.delWorkload(workloadVo);
|
||||
//保存人员安排信息
|
||||
List<PersonnelArrangementVo> personnelArrangementList = monthlyPlanVo.getPersonnelArrangementList();
|
||||
for (PersonnelArrangementVo p : personnelArrangementList) {
|
||||
|
|
|
|||
|
|
@ -115,6 +115,8 @@
|
|||
<if test="updateUser != null and updateUser != ''">update_user = #{updateUser},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="riskLevel != null and riskLevel != ''">risk_level = #{riskLevel},</if>
|
||||
<if test="actualHighSub != null and actualHighSub != ''">actual_high_sub = #{actualHighSub},</if>
|
||||
<if test="actualGroundSub != null and actualGroundSub != ''">actual_ground_sub = #{actualGroundSub},</if>
|
||||
</trim>
|
||||
WHERE day_plan_id = #{dayPlanId}
|
||||
</update>
|
||||
|
|
@ -157,6 +159,8 @@
|
|||
tdp.status AS status,
|
||||
tdp.day_plan_type AS dayPlanType,
|
||||
tdp.risk_level AS riskLevel,
|
||||
tdp.actual_high_sub AS actualHighSub,
|
||||
tdp.actual_ground_sub AS actualGroundSub,
|
||||
tmp.inspection_station_name AS inspectionStationName,
|
||||
tpm.plan_major_name AS planMajorName,
|
||||
tmp.project_name AS projectName,
|
||||
|
|
@ -216,8 +220,12 @@
|
|||
ORDER BY tmp.inspection_station_name ASC;
|
||||
</select>
|
||||
<select id="getProposedPersonnelList" resultType="com.bonus.digital.dao.ProposedPersonnelVo">
|
||||
select day_plan_id,inspection_station_name,personnel_id,name,data_source
|
||||
from tb_proposed_personnel where day_plan_id = #{dayPlanId}
|
||||
select tpp.day_plan_id,tpp.inspection_station_name,tpp.personnel_id,tpp.name,tpp.data_source,
|
||||
tpc.personnel_classification_id, tpc.personnel_classification_name
|
||||
from tb_proposed_personnel tpp
|
||||
left join tb_personnel tp on tpp.personnel_id = tp.id
|
||||
left join tb_personnel_classification tpc on tp.personnel_nature_id = tpc.personnel_classification_id
|
||||
where tpp.day_plan_id = #{dayPlanId}
|
||||
</select>
|
||||
<select id="getDayPlanById" resultType="com.bonus.digital.dao.DayPlanVo">
|
||||
SELECT
|
||||
|
|
@ -250,6 +258,8 @@
|
|||
tdp.status AS status,
|
||||
tdp.day_plan_type AS dayPlanType,
|
||||
tdp.risk_level AS riskLevel,
|
||||
tdp.actual_high_sub AS actualHighSub,
|
||||
tdp.actual_ground_sub AS actualGroundSub,
|
||||
tmp.inspection_station_name AS inspectionStationName,
|
||||
tpm.plan_major_name AS planMajorName,
|
||||
tmp.project_name AS projectName,
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
insert into tb_personnel_arrangement (monthly_plan_id,day,personnel_names)
|
||||
values (#{monthlyPlanId},#{day},#{personnelNames})
|
||||
</insert>
|
||||
<insert id="addWorkload">
|
||||
insert into tb_workload (plan_id,workload_category_id,workload_category_name,unit_price,workload_num,data_source,settlement_unit_price)
|
||||
values (#{planId},#{workloadCategoryId},#{workloadCategoryName},#{unitPrice},#{workloadNum},#{dataSource},#{settlementUnitPrice})
|
||||
<insert id="addWorkload">
|
||||
insert into tb_workload (plan_id,workload_category_id,workload_category_name,unit_price,workload_num,data_source,settlement_unit_price,completion_rate,actual_workload_num)
|
||||
values (#{planId},#{workloadCategoryId},#{workloadCategoryName},#{unitPrice},#{workloadNum},#{dataSource},#{settlementUnitPrice},#{completionRate},#{actualWorkloadNum})
|
||||
</insert>
|
||||
<update id="updateMonthlyPlan">
|
||||
update tb_monthly_plan
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
delete from tb_personnel_arrangement where monthly_plan_id = #{monthlyPlanId}
|
||||
</delete>
|
||||
<delete id="delWorkload">
|
||||
delete from tb_workload where plan_id= #{monthlyPlanId}
|
||||
delete from tb_workload where plan_id= #{planId} and data_source=#{dataSource}
|
||||
</delete>
|
||||
|
||||
<select id="getPlanMajorList" resultType="com.bonus.digital.dao.MonthlyPlanVo">
|
||||
|
|
|
|||
|
|
@ -43,7 +43,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</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,settlement_unit_price
|
||||
select workload_id,plan_id,workload_category_id,workload_category_name,unit_price,
|
||||
workload_num,data_source,settlement_unit_price,completion_rate,actual_workload_num
|
||||
from tb_workload where plan_id = #{planId} and data_source = #{dataSource}
|
||||
</select>
|
||||
<select id="getWorkloadCategoryByName" resultType="com.bonus.digital.dao.WorkloadCategoryVo">
|
||||
|
|
|
|||
Loading…
Reference in New Issue