联调问题
This commit is contained in:
parent
f897c5a2fe
commit
47236614bc
|
|
@ -17,11 +17,11 @@
|
|||
<dependencies>
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
<optional>true</optional> <!– 表示依赖不会传递 –>
|
||||
</dependency>-->
|
||||
|
||||
<!-- swagger3-->
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -73,9 +73,11 @@ public class InspectionStationController extends BaseController {
|
|||
{
|
||||
try {
|
||||
int res = inspectionStationService.delInspectionStation(inspectionStationVo);
|
||||
if (res > 0) {
|
||||
if (res ==1) {
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
} else if (res == 2) {
|
||||
return AjaxResult.error("已绑定人员");
|
||||
} else {
|
||||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -93,8 +93,10 @@ public class PersonnelController extends BaseController {
|
|||
public AjaxResult addPersonnel(@RequestBody PersonnelVo personnelVo) {
|
||||
try {
|
||||
int res = personnelService.addPersonnel(personnelVo);
|
||||
if (res > 0) {
|
||||
if (res ==1) {
|
||||
return AjaxResult.success();
|
||||
} else if (res ==2) {
|
||||
return AjaxResult.error("手机号已存在");
|
||||
} else {
|
||||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,9 +69,11 @@ public class PlanMajorController extends BaseController {
|
|||
{
|
||||
try {
|
||||
int res = planMajorService.addPlanMajor(planMajorVo);
|
||||
if (res > 0) {
|
||||
if (res == 1) {
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
} else if (res == 2) {
|
||||
return AjaxResult.error("名称已经存在");
|
||||
} else {
|
||||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
|
@ -109,9 +111,11 @@ public class PlanMajorController extends BaseController {
|
|||
{
|
||||
try {
|
||||
int res = planMajorService.updatePlanMajor(planMajorVo);
|
||||
if (res > 0) {
|
||||
if (res == 1) {
|
||||
return AjaxResult.success();
|
||||
}else {
|
||||
}else if (res == 2) {
|
||||
return AjaxResult.error("名称已经存在");
|
||||
} else {
|
||||
return AjaxResult.error("修改失败");
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
|
|
|||
|
|
@ -62,8 +62,10 @@ public class WorkloadCategoryController extends BaseController {
|
|||
public AjaxResult addWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) {
|
||||
try {
|
||||
int res = workloadCategoryService.addWorkloadCategory(workloadCategoryVo);
|
||||
if (res > 0) {
|
||||
if (res ==1) {
|
||||
return AjaxResult.success();
|
||||
} else if (res ==2) {
|
||||
return AjaxResult.error("名称已经存在");
|
||||
} else {
|
||||
return AjaxResult.error("新增失败");
|
||||
}
|
||||
|
|
@ -91,15 +93,17 @@ public class WorkloadCategoryController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 删除工作量类别
|
||||
* 修改工作量类别
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('workload:category:update')")
|
||||
@PostMapping("/updateWorkloadCategory")
|
||||
public AjaxResult updateWorkloadCategory(@RequestBody WorkloadCategoryVo workloadCategoryVo) {
|
||||
try {
|
||||
int res = workloadCategoryService.updateWorkloadCategory(workloadCategoryVo);
|
||||
if (res > 0) {
|
||||
if (res ==1) {
|
||||
return AjaxResult.success();
|
||||
} else if (res ==2) {
|
||||
return AjaxResult.error("名称已经存在");
|
||||
} else {
|
||||
return AjaxResult.error("修改失败");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.digital.dao;
|
|||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
|
|
@ -21,11 +22,33 @@ public class DayPlanVo {
|
|||
*/
|
||||
private Integer monthlyPlanId;
|
||||
|
||||
/**
|
||||
* 运检站名称
|
||||
*/
|
||||
private String inspectionStationName;
|
||||
|
||||
/**
|
||||
* 计划专业名称
|
||||
*/
|
||||
private String planMajorName;
|
||||
|
||||
/**
|
||||
* 计划日期
|
||||
*/
|
||||
private String dayPlan;
|
||||
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 作业内容
|
||||
*/
|
||||
private String workContent;
|
||||
|
||||
|
||||
/**
|
||||
* 计划工作量
|
||||
*/
|
||||
|
|
@ -197,4 +220,6 @@ public class DayPlanVo {
|
|||
* 风险等级
|
||||
*/
|
||||
private String riskLevel;
|
||||
|
||||
private List<ProposedPersonnelVo> proposedPersonnelList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package com.bonus.digital.dao;
|
||||
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 马三炮
|
||||
* @date 2025/12/26
|
||||
*/
|
||||
@Data
|
||||
public class ProposedPersonnelVo {
|
||||
|
||||
/**
|
||||
* 拟投入人员id
|
||||
*/
|
||||
private Integer proposedPersonnelId;
|
||||
|
||||
/**
|
||||
* 日计划id
|
||||
*/
|
||||
private Integer dayPlanId;
|
||||
|
||||
/**
|
||||
* 人员所属
|
||||
*/
|
||||
private String inspectionStationName;
|
||||
|
||||
/**
|
||||
* 人员id
|
||||
*/
|
||||
private Integer personnelId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 数据来源0:拟投入人员1:实际工作人员2:拟投入高处作业人员 3:拟投入地面作业人员4:实际投入高处作业人员
|
||||
* 5:实际投入地面作业人员',
|
||||
*
|
||||
*/
|
||||
private String dataSource;
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.bonus.digital.mapper;
|
|||
|
||||
import com.bonus.digital.dao.DayPlanVo;
|
||||
import com.bonus.digital.dao.MonthlyPlanVo;
|
||||
import com.bonus.digital.dao.ProposedPersonnelVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -20,4 +21,10 @@ public interface DayPlanMapper {
|
|||
List<DayPlanVo> getDayPlanList(DayPlanVo dayPlanVo);
|
||||
|
||||
List<MonthlyPlanVo> getWorkloadSummary(DayPlanVo dayPlanVo);
|
||||
|
||||
void addProposedPersonnelList(List<ProposedPersonnelVo> proposedPersonnelList);
|
||||
|
||||
void delProposedPersonnel(DayPlanVo dayPlanVo);
|
||||
|
||||
List<ProposedPersonnelVo> getProposedPersonnelList(DayPlanVo dayPlanVo1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.digital.mapper;
|
||||
|
||||
import com.bonus.digital.dao.InspectionStationVo;
|
||||
import com.bonus.digital.dao.PersonnelClassificationVo;
|
||||
import com.bonus.digital.dao.PersonnelVo;
|
||||
import com.bonus.digital.dao.SelectDto;
|
||||
|
|
@ -34,4 +35,8 @@ public interface PersonnelMapper {
|
|||
List<SelectDto> getPersonnelClassificationSelect(@Param("category") String category);
|
||||
|
||||
List<PersonnelVo> getPersonnelListByClassificationId(PersonnelClassificationVo personnelClassificationVo);
|
||||
|
||||
PersonnelVo getPersonnelListByPhone(PersonnelVo personnelVo);
|
||||
|
||||
List<PersonnelVo> getPersonnelByInspection(InspectionStationVo inspectionStationVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,4 +26,6 @@ public interface PlanMajorMapper {
|
|||
* 修改类别0:计划专业1:业务分类2:计划类别
|
||||
*/
|
||||
int updatePlanMajor(PlanMajorVo planMajorVo);
|
||||
|
||||
PlanMajorVo getPlanMajor(PlanMajorVo planMajorVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ import java.util.List;
|
|||
public interface WorkloadCategoryMapper {
|
||||
List<WorkloadCategoryVo> getWorkloadCategoryList(WorkloadCategoryVo workloadCategoryVo);
|
||||
|
||||
/**
|
||||
* 新增工作量类别
|
||||
*/
|
||||
int addWorkloadCategory(WorkloadCategoryVo workloadCategoryVo);
|
||||
|
||||
int delWorkloadCategory(WorkloadCategoryVo workloadCategoryVo);
|
||||
|
|
@ -15,4 +18,11 @@ public interface WorkloadCategoryMapper {
|
|||
int updateWorkloadCategory(WorkloadCategoryVo workloadCategoryVo);
|
||||
|
||||
List<WorkloadVo> getWorkloadList(WorkloadVo workloadVo);
|
||||
|
||||
/**
|
||||
* 查询名称是否存在
|
||||
* @param workloadCategoryVo
|
||||
* @return
|
||||
*/
|
||||
WorkloadCategoryVo getWorkloadCategoryByName(WorkloadCategoryVo workloadCategoryVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,9 +7,18 @@ import java.util.List;
|
|||
public interface WorkloadCategoryService {
|
||||
List<WorkloadCategoryVo> getWorkloadCategoryList(WorkloadCategoryVo workloadCategoryVo);
|
||||
|
||||
/**
|
||||
* 新增工作量类别
|
||||
*/
|
||||
int addWorkloadCategory(WorkloadCategoryVo workloadCategoryVo);
|
||||
|
||||
/**
|
||||
* 删除工作量类别
|
||||
*/
|
||||
int delWorkloadCategory(WorkloadCategoryVo workloadCategoryVo);
|
||||
|
||||
/**
|
||||
* 修改工作量类别
|
||||
*/
|
||||
int updateWorkloadCategory(WorkloadCategoryVo workloadCategoryVo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ 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.dao.ProposedPersonnelVo;
|
||||
import com.bonus.digital.dao.WorkloadSummaryExcelVo;
|
||||
import com.bonus.digital.mapper.DayPlanMapper;
|
||||
import com.bonus.digital.service.DayPlanService;
|
||||
|
|
@ -40,13 +41,26 @@ public class DayPlanServiceImpl implements DayPlanService {
|
|||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int updateDayPlan(DayPlanVo dayPlanVo) {
|
||||
List<ProposedPersonnelVo> proposedPersonnelList = dayPlanVo.getProposedPersonnelList();
|
||||
if (proposedPersonnelList != null && !proposedPersonnelList.isEmpty()) {
|
||||
dayPlanMapper.delProposedPersonnel(dayPlanVo);
|
||||
dayPlanMapper.addProposedPersonnelList(proposedPersonnelList);
|
||||
}
|
||||
return dayPlanMapper.updateDayPlan(dayPlanVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DayPlanVo> getDayPlanList(DayPlanVo dayPlanVo) {
|
||||
return dayPlanMapper.getDayPlanList(dayPlanVo);
|
||||
List<DayPlanVo> res = dayPlanMapper.getDayPlanList(dayPlanVo);
|
||||
if (res != null && !res.isEmpty()) {
|
||||
for (DayPlanVo dayPlanVo1 : res) {
|
||||
List<ProposedPersonnelVo> proposedPersonnelList =dayPlanMapper.getProposedPersonnelList(dayPlanVo1);
|
||||
dayPlanVo1.setProposedPersonnelList(proposedPersonnelList);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
package com.bonus.digital.service.impl;
|
||||
|
||||
import com.bonus.common.utils.SecurityUtils;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.digital.dao.InspectionStationVo;
|
||||
import com.bonus.digital.dao.PersonnelVo;
|
||||
import com.bonus.digital.mapper.InspectionStationMapper;
|
||||
import com.bonus.digital.mapper.PersonnelMapper;
|
||||
import com.bonus.digital.service.InspectionStationService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -24,6 +27,9 @@ public class InspectionStationServiceImpl implements InspectionStationService {
|
|||
@Resource
|
||||
private InspectionStationMapper inspectionStationMapper;
|
||||
|
||||
@Resource
|
||||
private PersonnelMapper personnelMapper;
|
||||
|
||||
/**
|
||||
* 获取0:运检站1:项目部
|
||||
*/
|
||||
|
|
@ -53,6 +59,10 @@ public class InspectionStationServiceImpl implements InspectionStationService {
|
|||
*/
|
||||
@Override
|
||||
public int delInspectionStation(InspectionStationVo inspectionStationVo) {
|
||||
List<PersonnelVo> personnelVoList = personnelMapper.getPersonnelByInspection(inspectionStationVo);
|
||||
if (StringUtils.isNotEmpty(personnelVoList)) {
|
||||
return 2;
|
||||
}
|
||||
return inspectionStationMapper.delInspectionStation(inspectionStationVo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.digital.service.impl;
|
||||
|
||||
import com.bonus.common.utils.SecurityUtils;
|
||||
import com.bonus.common.utils.StringUtils;
|
||||
import com.bonus.digital.dao.PersonnelVo;
|
||||
import com.bonus.digital.dao.SelectDto;
|
||||
import com.bonus.digital.mapper.PersonnelMapper;
|
||||
|
|
@ -40,6 +41,13 @@ public class PersonnelServiceImpl implements PersonnelService {
|
|||
Long userId = SecurityUtils.getUserId();
|
||||
personnelVo.setCreateUser(userId.toString());
|
||||
personnelVo.setCreateTime(new Date());
|
||||
if (StringUtils.isNotEmpty(personnelVo.getPhone())){
|
||||
//判断该手机号是否存在
|
||||
PersonnelVo personnelV = personnelMapper.getPersonnelListByPhone(personnelVo);
|
||||
if (personnelV != null){
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
return personnelMapper.addPersonnel(personnelVo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,11 @@ public class PlanMajorServiceImpl implements PlanMajorService {
|
|||
Long userId = SecurityUtils.getUserId();
|
||||
planMajorVo.setCreateUser(userId.toString());
|
||||
planMajorVo.setCreateTime(new Date());
|
||||
|
||||
//判断专业是否存在
|
||||
PlanMajorVo res = planMajorMapper.getPlanMajor(planMajorVo);
|
||||
if (res != null) {
|
||||
return 2;
|
||||
}
|
||||
return planMajorMapper.addPlanMajor(planMajorVo);
|
||||
}
|
||||
|
||||
|
|
@ -63,6 +67,11 @@ public class PlanMajorServiceImpl implements PlanMajorService {
|
|||
Long userId = SecurityUtils.getUserId();
|
||||
planMajorVo.setUpdateUser(userId.toString());
|
||||
planMajorVo.setUpdateTime(new Date());
|
||||
//判断专业是否存在
|
||||
PlanMajorVo res = planMajorMapper.getPlanMajor(planMajorVo);
|
||||
if (res != null && planMajorVo.getPlanMajorId() != res.getPlanMajorId()) {
|
||||
return 2;
|
||||
}
|
||||
return planMajorMapper.updatePlanMajor(planMajorVo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,24 +28,41 @@ public class WorkloadCategoryServiceImpl implements WorkloadCategoryService {
|
|||
return workloadCategoryMapper.getWorkloadCategoryList(workloadCategoryVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工作量类别
|
||||
*/
|
||||
@Override
|
||||
public int addWorkloadCategory(WorkloadCategoryVo workloadCategoryVo) {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
workloadCategoryVo.setCreateUser(userId.toString());
|
||||
workloadCategoryVo.setCreateTime(new Date());
|
||||
WorkloadCategoryVo workloadCategoryOld = workloadCategoryMapper.getWorkloadCategoryByName(workloadCategoryVo);
|
||||
if (workloadCategoryOld != null) {
|
||||
return 2;
|
||||
}
|
||||
return workloadCategoryMapper.addWorkloadCategory(workloadCategoryVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工作量类别
|
||||
*/
|
||||
@Override
|
||||
public int delWorkloadCategory(WorkloadCategoryVo workloadCategoryVo) {
|
||||
return workloadCategoryMapper.delWorkloadCategory(workloadCategoryVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工作量类别
|
||||
*/
|
||||
@Override
|
||||
public int updateWorkloadCategory(WorkloadCategoryVo workloadCategoryVo) {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
workloadCategoryVo.setUpdateUser(userId.toString());
|
||||
workloadCategoryVo.setUpdateTime(new Date());
|
||||
WorkloadCategoryVo workloadCategoryOld = workloadCategoryMapper.getWorkloadCategoryByName(workloadCategoryVo);
|
||||
if (workloadCategoryOld != null && workloadCategoryVo.getWorkloadCategoryId()!=workloadCategoryOld.getWorkloadCategoryId()) {
|
||||
return 2;
|
||||
}
|
||||
return workloadCategoryMapper.updateWorkloadCategory(workloadCategoryVo);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,27 @@
|
|||
<if test="riskLevel != null and riskLevel != ''">#{riskLevel},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<!-- 批量插入拟安排人员列表 -->
|
||||
<insert id="addProposedPersonnelList">
|
||||
insert into tb_proposed_personnel (
|
||||
day_plan_id,
|
||||
inspection_station_name,
|
||||
personnel_id,
|
||||
name,
|
||||
data_source
|
||||
)
|
||||
values
|
||||
<!-- 核心:遍历集合,生成多条values语句 -->
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(
|
||||
#{item.dayPlanId},
|
||||
#{item.inspectionStationName},
|
||||
#{item.personnelId},
|
||||
#{item.name},
|
||||
#{item.dataSource}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<update id="updateDayPlan">
|
||||
UPDATE tb_day_plan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
|
|
@ -100,6 +121,9 @@
|
|||
<delete id="delDayPlan">
|
||||
update tb_day_plan set is_active = '0' where day_plan_id = #{dayPlanId}
|
||||
</delete>
|
||||
<delete id="delProposedPersonnel">
|
||||
delete from tb_proposed_personnel where day_plan_id = #{dayPlanId}
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="getDayPlanList" resultType="com.bonus.digital.dao.DayPlanVo">
|
||||
|
|
@ -108,15 +132,6 @@
|
|||
tdp.monthly_plan_id AS monthlyPlanId,
|
||||
tdp.day_plan AS dayPlan,
|
||||
tdp.planned_workload AS plannedWorkload,
|
||||
-- 原有:拟投入作业人员姓名(通过子查询拼接,替代主表存储的ID串)
|
||||
(SELECT GROUP_CONCAT(tp.NAME SEPARATOR ',')
|
||||
FROM tb_personnel tp
|
||||
WHERE FIND_IN_SET(tp.id, tdp.proposed_personnel)
|
||||
AND tp.is_active = '1') AS proposedPersonnel,
|
||||
-- 原有:拟投入作业人员数量
|
||||
IF(tdp.proposed_personnel IS NULL OR tdp.proposed_personnel = '', 0,
|
||||
LENGTH(tdp.proposed_personnel) - LENGTH(REPLACE(tdp.proposed_personnel, ',', '')) + 1)
|
||||
AS proposedPersonnelNumber,
|
||||
tdp.proposed_proficient_personnel AS proposedProficientPersonnel,
|
||||
tdp.proposed_proficient_day AS proposedProficientDay,
|
||||
tdp.proposed_assistance_personnel AS proposedAssistancePersonnel,
|
||||
|
|
@ -126,11 +141,6 @@
|
|||
tdp.proposed_sub_car AS proposedSubCar,
|
||||
tdp.actual_proficient_personnel AS actualProficientPersonnel,
|
||||
tdp.actual_assistance_personnel AS actualAssistancePersonnel,
|
||||
-- 原有:实际投入作业人员姓名(通过子查询拼接,替代主表存储的ID串)
|
||||
(SELECT GROUP_CONCAT(tp.NAME SEPARATOR ',')
|
||||
FROM tb_personnel tp
|
||||
WHERE FIND_IN_SET(tp.id, tdp.actual_personnel)
|
||||
AND tp.is_active = '1') AS actualPersonnel,
|
||||
tdp.actual_long_time_car AS actualLongTimeCar,
|
||||
tdp.actual_temporary_car AS actualTemporaryCar,
|
||||
tdp.actual_sub_car AS actualSubCar,
|
||||
|
|
@ -146,51 +156,16 @@
|
|||
tdp.update_user AS updateUser,
|
||||
tdp.status AS status,
|
||||
tdp.day_plan_type AS dayPlanType,
|
||||
|
||||
-- 新增:拟投入高处作业人员(data_source=2):姓名 + 数量
|
||||
(SELECT IFNULL(GROUP_CONCAT(tpp.name SEPARATOR ','), '')
|
||||
FROM tb_proposed_personnel tpp
|
||||
WHERE tpp.day_plan_id = tdp.day_plan_id
|
||||
AND tpp.data_source = 2) AS proposedHighPersonnelNames,
|
||||
(SELECT COUNT(*)
|
||||
FROM tb_proposed_personnel tpp
|
||||
WHERE tpp.day_plan_id = tdp.day_plan_id
|
||||
AND tpp.data_source = 2) AS proposedHighPersonnelNum,
|
||||
|
||||
-- 新增:拟投入地面作业人员(data_source=3):姓名 + 数量
|
||||
(SELECT IFNULL(GROUP_CONCAT(tpp.name SEPARATOR ','), '')
|
||||
FROM tb_proposed_personnel tpp
|
||||
WHERE tpp.day_plan_id = tdp.day_plan_id
|
||||
AND tpp.data_source = 3) AS proposedGroundPersonnelNames,
|
||||
(SELECT COUNT(*)
|
||||
FROM tb_proposed_personnel tpp
|
||||
WHERE tpp.day_plan_id = tdp.day_plan_id
|
||||
AND tpp.data_source = 3) AS proposedGroundPersonnelNum,
|
||||
|
||||
-- 新增:实际投入高处作业人员(data_source=4):姓名 + 数量
|
||||
(SELECT IFNULL(GROUP_CONCAT(tpp.name SEPARATOR ','), '')
|
||||
FROM tb_proposed_personnel tpp
|
||||
WHERE tpp.day_plan_id = tdp.day_plan_id
|
||||
AND tpp.data_source = 4) AS actualHighPersonnelNames,
|
||||
(SELECT COUNT(*)
|
||||
FROM tb_proposed_personnel tpp
|
||||
WHERE tpp.day_plan_id = tdp.day_plan_id
|
||||
AND tpp.data_source = 4) AS actualHighPersonnelNum,
|
||||
|
||||
-- 新增:实际投入地面作业人员(data_source=5):姓名 + 数量
|
||||
(SELECT IFNULL(GROUP_CONCAT(tpp.name SEPARATOR ','), '')
|
||||
FROM tb_proposed_personnel tpp
|
||||
WHERE tpp.day_plan_id = tdp.day_plan_id
|
||||
AND tpp.data_source = 5) AS actualGroundPersonnelNames,
|
||||
(SELECT COUNT(*)
|
||||
FROM tb_proposed_personnel tpp
|
||||
WHERE tpp.day_plan_id = tdp.day_plan_id
|
||||
AND tpp.data_source = 5) AS actualGroundPersonnelNum
|
||||
|
||||
tdp.risk_level AS riskLevel,
|
||||
tmp.inspection_station_name AS inspectionStationName,
|
||||
tpm.plan_major_name AS planMajorName,
|
||||
tmp.project_name AS projectName,
|
||||
tmp.work_content AS workContent
|
||||
FROM
|
||||
tb_day_plan tdp
|
||||
WHERE
|
||||
tdp.is_active = '1'
|
||||
left join tb_monthly_plan tmp on tdp.monthly_plan_id = tmp.monthly_plan_id
|
||||
left join tb_plan_major tpm on tmp.plan_major_id = tpm.plan_major_id
|
||||
where tdp.is_active = '1'
|
||||
<!-- 原有查询条件保留,按需调整 -->
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND DATE_FORMAT(tdp.day_plan, '%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
|
||||
|
|
@ -227,5 +202,9 @@
|
|||
tw.unit_price
|
||||
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>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -117,4 +117,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
personnel_nature_id = #{personnelClassificationId} or
|
||||
personnel_classification_id = #{personnelClassificationId})
|
||||
</select>
|
||||
<select id="getPersonnelListByPhone" resultType="com.bonus.digital.dao.PersonnelVo">
|
||||
select personnel_classification_id as id,
|
||||
name as name
|
||||
from tb_personnel where is_active = '1' and phone =#{phone}
|
||||
</select>
|
||||
<select id="getPersonnelByInspection" resultType="com.bonus.digital.dao.PersonnelVo">
|
||||
select tis.id,
|
||||
tis.inspection_station_id as inspectionStationId,
|
||||
tis2.inspection_station_name as inspectionStationName,
|
||||
tis.name,
|
||||
tis.sex,
|
||||
tis.phone,
|
||||
tis.position_id,
|
||||
tpc.personnel_classification_name as positionName,
|
||||
tis.personnel_nature_id,
|
||||
tpc2.personnel_classification_name as personnelNatureName,
|
||||
tis.personnel_classification_id,
|
||||
tpc3.personnel_classification_name as personnelClassificationName,
|
||||
tis.long_term_secondment,
|
||||
tis.create_user
|
||||
from tb_personnel tis where is_active='1' and tis.inspection_station_id = #{inspectionStationId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -36,4 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and plan_major_name like concat('%',#{planMajorName},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getPlanMajor" resultType="com.bonus.digital.dao.PlanMajorVo">
|
||||
select plan_major_id,plan_major_name,remark,category
|
||||
from tb_plan_major where category = #{category} and is_active = '1'
|
||||
and plan_major_name = #{planMajorName}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -43,4 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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>
|
||||
<select id="getWorkloadCategoryByName" resultType="com.bonus.digital.dao.WorkloadCategoryVo">
|
||||
select workload_category_id,workload_category_name,remark,unit_price
|
||||
from tb_workload_category where is_active = '1' and workload_category_name = #{workloadCategoryName}
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue