包头bug修改
This commit is contained in:
parent
220406a5ec
commit
de0c3da8aa
@ -3,18 +3,18 @@
|
|||||||
<mapper namespace="com.zhgd.xmgl.modules.baotou.mapper.ProjectGroupMapper">
|
<mapper namespace="com.zhgd.xmgl.modules.baotou.mapper.ProjectGroupMapper">
|
||||||
|
|
||||||
<select id="queryList" resultType="com.zhgd.xmgl.modules.baotou.entity.ProjectGroup">
|
<select id="queryList" resultType="com.zhgd.xmgl.modules.baotou.entity.ProjectGroup">
|
||||||
select t.*,
|
select t.*,
|
||||||
group_concat(distinct ei.enterprise_name) as epc_contractor_name,
|
group_concat(distinct ei.enterprise_name) as epc_contractor_name,
|
||||||
group_concat(distinct ei2.enterprise_name) as supervising_unit_name,
|
group_concat(distinct ei2.enterprise_name) as supervising_unit_name,
|
||||||
group_concat(distinct ei3.enterprise_name) as construction_unit_names
|
group_concat(distinct ei3.enterprise_name) as construction_unit_names
|
||||||
from project_group t
|
from project_group t
|
||||||
join project_group_unit pgu on t.id = pgu.project_group_id
|
left join project_group_unit pgu on t.id = pgu.project_group_id
|
||||||
left join enterprise_info ei on ei.id=pgu.epc_contractor_id
|
left join enterprise_info ei on ei.id=pgu.epc_contractor_id
|
||||||
left join enterprise_info ei2 on ei2.id=pgu.supervising_unit_id
|
left join enterprise_info ei2 on ei2.id=pgu.supervising_unit_id
|
||||||
left join enterprise_info ei3 on find_in_set(ei3.id,pgu.construction_unit_ids)
|
left join enterprise_info ei3 on find_in_set(ei3.id,pgu.construction_unit_ids)
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
group by t.id
|
group by t.id
|
||||||
order by t.create_date desc
|
order by t.create_date desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -163,16 +163,16 @@ public class ProjectGroupServiceImpl extends ServiceImpl<ProjectGroupMapper, Pro
|
|||||||
for (DeviceUnit u : deviceUnits) {
|
for (DeviceUnit u : deviceUnits) {
|
||||||
String constructionUnitIds = u.getConstructionUnitIds();
|
String constructionUnitIds = u.getConstructionUnitIds();
|
||||||
String epcContractorIds = u.getEpcContractorIds();
|
String epcContractorIds = u.getEpcContractorIds();
|
||||||
for (String constructionUnitId : StrUtil.split(constructionUnitIds, ",")) {
|
// for (String constructionUnitId : StrUtil.split(constructionUnitIds, ",")) {
|
||||||
if (gConstructionUnitIds.stream().noneMatch(constructionUnitId::equals)) {
|
// if (gConstructionUnitIds.stream().noneMatch(constructionUnitId::equals)) {
|
||||||
throw new OpenAlertException("编辑失败,解绑的施工单位已被使用!");
|
// throw new OpenAlertException("编辑失败,解绑的施工单位已被装置使用!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
for (String epcContractorId : StrUtil.split(epcContractorIds, ",")) {
|
// for (String epcContractorId : StrUtil.split(epcContractorIds, ",")) {
|
||||||
if (gEpcContractorIds.stream().noneMatch(s -> epcContractorId.equals(String.valueOf(s)))) {
|
// if (gEpcContractorIds.stream().noneMatch(s -> epcContractorId.equals(String.valueOf(s)))) {
|
||||||
throw new OpenAlertException("编辑失败,解绑的EPC承包商已被使用!");
|
// throw new OpenAlertException("编辑失败,解绑的EPC承包商已被装置使用!");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -261,14 +261,14 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
|||||||
.last(Cts.IGNORE_DATA_SCOPE_CONDITION)
|
.last(Cts.IGNORE_DATA_SCOPE_CONDITION)
|
||||||
).stream().collect(Collectors.toMap(CarType::getCarTypeName, Function.identity(), (o1, o2) -> o1));
|
).stream().collect(Collectors.toMap(CarType::getCarTypeName, Function.identity(), (o1, o2) -> o1));
|
||||||
for (Map<String, String> importInfo : list) {
|
for (Map<String, String> importInfo : list) {
|
||||||
String carModuleType = importInfo.get("车辆类型");
|
String carModuleType = importInfo.get("*车辆类型");
|
||||||
CarInfo dataCar = numMap.get(importInfo.get("车牌号"));
|
CarInfo dataCar = numMap.get(importInfo.get("*车牌号"));
|
||||||
CarInfo excelCar = new CarInfo();
|
CarInfo excelCar = new CarInfo();
|
||||||
excelCar.setCarNumber(importInfo.get("车牌号"));
|
excelCar.setCarNumber(importInfo.get("*车牌号"));
|
||||||
excelCar.setCarColor(importInfo.get("车辆颜色"));
|
excelCar.setCarColor(importInfo.get("*车辆颜色"));
|
||||||
excelCar.setAddTime(new Date());
|
excelCar.setAddTime(new Date());
|
||||||
excelCar.setProjectSn(projectSn);
|
excelCar.setProjectSn(projectSn);
|
||||||
String readWorkerName = importInfo.get("司机姓名");
|
String readWorkerName = importInfo.get("*司机姓名");
|
||||||
if (!"临时车辆".equals(carModuleType)) {
|
if (!"临时车辆".equals(carModuleType)) {
|
||||||
WorkerInfo workerInfo = workerMap.get(readWorkerName);
|
WorkerInfo workerInfo = workerMap.get(readWorkerName);
|
||||||
if (workerInfo == null) {
|
if (workerInfo == null) {
|
||||||
@ -280,14 +280,14 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
|||||||
excelCar.setDriverWorkerId(String.valueOf(workerInfo.getId()));
|
excelCar.setDriverWorkerId(String.valueOf(workerInfo.getId()));
|
||||||
}
|
}
|
||||||
excelCar.setDriverWorkerName(readWorkerName);
|
excelCar.setDriverWorkerName(readWorkerName);
|
||||||
excelCar.setDriverTelephone(importInfo.get("司机电话"));
|
excelCar.setDriverTelephone(importInfo.get("*司机电话"));
|
||||||
excelCar.setIsBlack(Objects.equals(importInfo.get("是否黑名单"), "是") ? 1 : 0);
|
excelCar.setIsBlack(Objects.equals(importInfo.get("*是否黑名单"), "是") ? 1 : 0);
|
||||||
excelCar.setCarType(Optional.ofNullable(carTypeMap.get(importInfo.get("车种类型"))).map(CarType::getId).orElse(null));
|
excelCar.setCarType(Optional.ofNullable(carTypeMap.get(importInfo.get("*车种类型"))).map(CarType::getId).orElse(null));
|
||||||
excelCar.setCarModuleType("固定车辆".equals(carModuleType) ? 1 : ("长期车辆".equals(carModuleType) ? 2 : 3));
|
excelCar.setCarModuleType("固定车辆".equals(carModuleType) ? 1 : ("长期车辆".equals(carModuleType) ? 2 : 3));
|
||||||
excelCar.setReserveStartTime(DateUtil.parse(importInfo.get("预约开始时间")));
|
excelCar.setReserveStartTime(DateUtil.parse(importInfo.get("预约开始时间")));
|
||||||
excelCar.setReserveEndTime(DateUtil.parse(importInfo.get("预约结束时间")));
|
excelCar.setReserveEndTime(DateUtil.parse(importInfo.get("预约结束时间")));
|
||||||
excelCar.setEntryAndExitPermit("单次".equals(importInfo.get("允许进出次数")) ? 0 : 1);
|
excelCar.setEntryAndExitPermit("单次".equals(importInfo.get("允许进出次数")) ? 0 : 1);
|
||||||
excelCar.setEnterpriseId(Optional.ofNullable(enterpriseInfoMap.get(importInfo.get("单位"))).map(EnterpriseInfo::getId).orElse(null));
|
excelCar.setEnterpriseId(Optional.ofNullable(enterpriseInfoMap.get(importInfo.get("*单位"))).map(EnterpriseInfo::getId).orElse(null));
|
||||||
if (dataCar == null) {
|
if (dataCar == null) {
|
||||||
this.addCarInfo(excelCar);
|
this.addCarInfo(excelCar);
|
||||||
} else {
|
} else {
|
||||||
@ -331,32 +331,32 @@ public class CarInfoServiceImpl extends ServiceImpl<CarInfoMapper, CarInfo> impl
|
|||||||
|
|
||||||
private void checkParams(List<Map<String, String>> list, String projectSn) {
|
private void checkParams(List<Map<String, String>> list, String projectSn) {
|
||||||
for (Map<String, String> importInfo : list) {
|
for (Map<String, String> importInfo : list) {
|
||||||
if (StringUtils.isBlank(importInfo.get("单位"))) {
|
if (StringUtils.isBlank(importInfo.get("*单位"))) {
|
||||||
throw new OpenAlertException("有单位未填写");
|
throw new OpenAlertException("有单位未填写");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(importInfo.get("车辆类型"))) {
|
if (StringUtils.isBlank(importInfo.get("*车辆类型"))) {
|
||||||
throw new OpenAlertException("有车辆类型未填写");
|
throw new OpenAlertException("有车辆类型未填写");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(importInfo.get("车牌号"))) {
|
if (StringUtils.isBlank(importInfo.get("*车牌号"))) {
|
||||||
throw new OpenAlertException("有车牌号未填写");
|
throw new OpenAlertException("有车牌号未填写");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(importInfo.get("车辆颜色"))) {
|
if (StringUtils.isBlank(importInfo.get("*车辆颜色"))) {
|
||||||
throw new OpenAlertException("有车辆颜色未填写");
|
throw new OpenAlertException("有车辆颜色未填写");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(importInfo.get("车种类型"))) {
|
if (StringUtils.isBlank(importInfo.get("*车种类型"))) {
|
||||||
throw new OpenAlertException("有车种类型未填写");
|
throw new OpenAlertException("有车种类型未填写");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(importInfo.get("司机姓名"))) {
|
if (StringUtils.isBlank(importInfo.get("*司机姓名"))) {
|
||||||
throw new OpenAlertException("有司机姓名未填写");
|
throw new OpenAlertException("有司机姓名未填写");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(importInfo.get("司机电话"))) {
|
if (StringUtils.isBlank(importInfo.get("*司机电话"))) {
|
||||||
throw new OpenAlertException("有司机电话未填写");
|
throw new OpenAlertException("有司机电话未填写");
|
||||||
}
|
}
|
||||||
if (StringUtils.isBlank(importInfo.get("司机电话"))) {
|
if (StringUtils.isBlank(importInfo.get("*司机电话"))) {
|
||||||
throw new OpenAlertException("有司机电话未填写");
|
throw new OpenAlertException("有司机电话未填写");
|
||||||
}
|
}
|
||||||
if (!"固定车辆".equals(importInfo.get("车辆类型")) && DateUtil.compare(DateUtil.parse(importInfo.get("预约结束时间")), new Date()) < 0) {
|
if (!"固定车辆".equals(importInfo.get("*车辆类型")) && DateUtil.compare(DateUtil.parse(importInfo.get("预约结束时间")), new Date()) < 0) {
|
||||||
throw new OpenAlertException("预约时间已失效,车辆" + importInfo.get("车牌号") + "无法下发,请重新提交");
|
throw new OpenAlertException("预约时间已失效,车辆" + importInfo.get("*车牌号") + "无法下发,请重新提交");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,6 +63,7 @@ public class WorkerInfoController {
|
|||||||
@Lazy
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
MinioUtils minioUtils;
|
MinioUtils minioUtils;
|
||||||
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
private IWorkerInfoService workerInfoService;
|
private IWorkerInfoService workerInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -885,5 +886,17 @@ public class WorkerInfoController {
|
|||||||
return Result.success(new JoBuilder().put("file", foldName + ".zip").build());
|
return Result.success(new JoBuilder().put("file", foldName + ".zip").build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperLog(operModul = "劳务管理", operType = "批量移动劳务人员", operDesc = "批量移动劳务人员")
|
||||||
|
@ApiOperation(value = "批量移动劳务人员", notes = "批量移动劳务人员", httpMethod = "POST")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "enterpriseId", value = "所属企业", paramType = "body", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "personType", value = "人员类型 1、劳务人员 2、管理人员", paramType = "body", required = false, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "moveId", value = "工种id或岗位id", paramType = "body", required = true, dataType = "String"),
|
||||||
|
@ApiImplicitParam(name = "workerIdStr", value = "人员Id,多个逗号分割", paramType = "body", required = true, dataType = "String"),
|
||||||
|
})
|
||||||
|
@PostMapping(value = "/updateWorkerOrg")
|
||||||
|
public Result updateWorkerOrg(@RequestBody Map<String, Object> map) {
|
||||||
|
workerInfoService.updateWorkerOrg(map);
|
||||||
|
return Result.ok();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -589,5 +589,7 @@ public interface IWorkerInfoService extends IService<WorkerInfo> {
|
|||||||
|
|
||||||
void updateWorkerEnter(WorkerInfo workerInfo);
|
void updateWorkerEnter(WorkerInfo workerInfo);
|
||||||
|
|
||||||
List<HashMap<String ,Object>> getPostWorkTypeList(Map<String, Object> map);
|
List<HashMap<String, Object>> getPostWorkTypeList(Map<String, Object> map);
|
||||||
|
|
||||||
|
void updateWorkerOrg(Map<String, Object> map);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,9 @@ import com.zhgd.xmgl.async.AsyncHikvision;
|
|||||||
import com.zhgd.xmgl.async.AsyncJiLianDa;
|
import com.zhgd.xmgl.async.AsyncJiLianDa;
|
||||||
import com.zhgd.xmgl.async.AsyncWorker;
|
import com.zhgd.xmgl.async.AsyncWorker;
|
||||||
import com.zhgd.xmgl.base.CompanyVo;
|
import com.zhgd.xmgl.base.CompanyVo;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.security.enums.XzSecurityQualityInspectionRecordStatusEnum;
|
||||||
|
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityInspectionRecordService;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
import com.zhgd.xmgl.modules.basicdata.service.ISystemUserService;
|
||||||
import com.zhgd.xmgl.modules.basicdata.service.impl.CompanyServiceImpl;
|
import com.zhgd.xmgl.modules.basicdata.service.impl.CompanyServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.exam.entity.ExamTrain;
|
import com.zhgd.xmgl.modules.exam.entity.ExamTrain;
|
||||||
@ -35,8 +38,8 @@ import com.zhgd.xmgl.modules.project.mapper.ProjectEnterpriseMapper;
|
|||||||
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
import com.zhgd.xmgl.modules.project.mapper.ProjectMapper;
|
||||||
import com.zhgd.xmgl.modules.project.service.impl.ProjectEnterpriseServiceImpl;
|
import com.zhgd.xmgl.modules.project.service.impl.ProjectEnterpriseServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
|
import com.zhgd.xmgl.modules.quality.entity.QualityInspectionRecord;
|
||||||
import com.zhgd.xmgl.modules.quality.service.IQualityInspectionRecordService;
|
|
||||||
import com.zhgd.xmgl.modules.quality.enums.QualityInspectionRecordStatusEnum;
|
import com.zhgd.xmgl.modules.quality.enums.QualityInspectionRecordStatusEnum;
|
||||||
|
import com.zhgd.xmgl.modules.quality.service.IQualityInspectionRecordService;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.*;
|
import com.zhgd.xmgl.modules.worker.entity.*;
|
||||||
import com.zhgd.xmgl.modules.worker.entity.vo.StatsEnterpriseWeekVo;
|
import com.zhgd.xmgl.modules.worker.entity.vo.StatsEnterpriseWeekVo;
|
||||||
import com.zhgd.xmgl.modules.worker.mapper.DepartmentInfoMapper;
|
import com.zhgd.xmgl.modules.worker.mapper.DepartmentInfoMapper;
|
||||||
@ -44,12 +47,10 @@ import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper;
|
|||||||
import com.zhgd.xmgl.modules.worker.mapper.TeamInfoMapper;
|
import com.zhgd.xmgl.modules.worker.mapper.TeamInfoMapper;
|
||||||
import com.zhgd.xmgl.modules.worker.mapper.WorkerAttendanceMapper;
|
import com.zhgd.xmgl.modules.worker.mapper.WorkerAttendanceMapper;
|
||||||
import com.zhgd.xmgl.modules.worker.service.IEnterpriseInfoService;
|
import com.zhgd.xmgl.modules.worker.service.IEnterpriseInfoService;
|
||||||
|
import com.zhgd.xmgl.modules.worker.service.ITeamInfoService;
|
||||||
import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService;
|
import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService;
|
||||||
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
import com.zhgd.xmgl.modules.worker.service.IWorkerInfoService;
|
||||||
import com.zhgd.xmgl.modules.xz.emergency.service.IXzEmergencyRecordService;
|
import com.zhgd.xmgl.modules.xz.emergency.service.IXzEmergencyRecordService;
|
||||||
import com.zhgd.xmgl.modules.baotou.security.entity.XzSecurityQualityInspectionRecord;
|
|
||||||
import com.zhgd.xmgl.modules.baotou.security.enums.XzSecurityQualityInspectionRecordStatusEnum;
|
|
||||||
import com.zhgd.xmgl.modules.baotou.security.service.IXzSecurityQualityInspectionRecordService;
|
|
||||||
import com.zhgd.xmgl.modules.xz.service.impl.XzSupplierQualificationApplyServiceImpl;
|
import com.zhgd.xmgl.modules.xz.service.impl.XzSupplierQualificationApplyServiceImpl;
|
||||||
import com.zhgd.xmgl.modules.xz.special.entity.*;
|
import com.zhgd.xmgl.modules.xz.special.entity.*;
|
||||||
import com.zhgd.xmgl.modules.xz.special.service.*;
|
import com.zhgd.xmgl.modules.xz.special.service.*;
|
||||||
@ -77,6 +78,9 @@ import java.util.stream.Collectors;
|
|||||||
@Service
|
@Service
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper, EnterpriseInfo> implements IEnterpriseInfoService {
|
public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper, EnterpriseInfo> implements IEnterpriseInfoService {
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
ITeamInfoService teamInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
IUserEnterpriseService userEnterpriseService;
|
IUserEnterpriseService userEnterpriseService;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -273,21 +277,21 @@ public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper,
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void removeEnterpriseInfo(Map<String, Object> map) {
|
public void removeEnterpriseInfo(Map<String, Object> map) {
|
||||||
QueryWrapper<TeamInfo> wrapper = new QueryWrapper<>();
|
|
||||||
String enterpriseId = MapUtils.getString(map, "enterpriseId");
|
String enterpriseId = MapUtils.getString(map, "enterpriseId");
|
||||||
String projectSn = MapUtils.getString(map, "projectSn");
|
String projectSn = MapUtils.getString(map, "projectSn");
|
||||||
wrapper.lambda().eq(TeamInfo::getEnterpriseId, enterpriseId)
|
// QueryWrapper<TeamInfo> wrapper = new QueryWrapper<>();
|
||||||
.eq(TeamInfo::getProjectSn, projectSn);
|
// wrapper.lambda().eq(TeamInfo::getEnterpriseId, enterpriseId)
|
||||||
int count = teamInfoMapper.selectCount(wrapper);
|
// .eq(TeamInfo::getProjectSn, projectSn);
|
||||||
if (count > 0) {
|
// int count = teamInfoMapper.selectCount(wrapper);
|
||||||
throw new OpenAlertException(MessageUtil.get("notDeleteEnterpriseErr"));
|
// if (count > 0) {
|
||||||
}
|
// throw new OpenAlertException(MessageUtil.get("notDeleteEnterpriseErr"));
|
||||||
|
// }
|
||||||
Integer dCount = departmentInfoMapper.selectCount(new LambdaQueryWrapper<DepartmentInfo>()
|
Integer dCount = departmentInfoMapper.selectCount(new LambdaQueryWrapper<DepartmentInfo>()
|
||||||
.eq(DepartmentInfo::getEnterpriseId, enterpriseId)
|
.eq(DepartmentInfo::getEnterpriseId, enterpriseId)
|
||||||
.eq(DepartmentInfo::getProjectSn, projectSn)
|
.eq(DepartmentInfo::getProjectSn, projectSn)
|
||||||
);
|
);
|
||||||
if (dCount > 0) {
|
if (dCount > 0) {
|
||||||
throw new OpenAlertException("企业下存在部门,不允许删除");
|
throw new OpenAlertException("企业下存在岗位,不允许删除");
|
||||||
}
|
}
|
||||||
Integer parentEnterpriseNum = projectEnterpriseMapper.selectCount(new QueryWrapper<ProjectEnterprise>().lambda()
|
Integer parentEnterpriseNum = projectEnterpriseMapper.selectCount(new QueryWrapper<ProjectEnterprise>().lambda()
|
||||||
.eq(ProjectEnterprise::getParentEnterpriseId, enterpriseId)
|
.eq(ProjectEnterprise::getParentEnterpriseId, enterpriseId)
|
||||||
@ -295,7 +299,20 @@ public class EnterpriseInfoServiceImpl extends ServiceImpl<EnterpriseInfoMapper,
|
|||||||
if (parentEnterpriseNum != 0) {
|
if (parentEnterpriseNum != 0) {
|
||||||
throw new OpenAlertException("企业下存在子企业,不允许删除");
|
throw new OpenAlertException("企业下存在子企业,不允许删除");
|
||||||
}
|
}
|
||||||
|
int workerCount = workerInfoService.count(new LambdaQueryWrapper<WorkerInfo>()
|
||||||
|
.eq(WorkerInfo::getProjectSn, projectSn)
|
||||||
|
.eq(WorkerInfo::getEnterpriseId, enterpriseId)
|
||||||
|
);
|
||||||
|
if (workerCount != 0) {
|
||||||
|
throw new OpenAlertException("企业下存在人员,不允许删除");
|
||||||
|
}
|
||||||
|
QueryWrapper<TeamInfo> wrapper = new QueryWrapper<>();
|
||||||
|
wrapper.lambda().eq(TeamInfo::getEnterpriseId, enterpriseId)
|
||||||
|
.eq(TeamInfo::getProjectSn, projectSn);
|
||||||
|
List<TeamInfo> teamInfos = teamInfoMapper.selectList(wrapper);
|
||||||
|
for (TeamInfo teamInfo : teamInfos) {
|
||||||
|
teamInfoService.removeTeamInfo(String.valueOf(teamInfo.getId()));
|
||||||
|
}
|
||||||
QueryWrapper<ProjectEnterprise> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProjectEnterprise> queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.lambda().eq(ProjectEnterprise::getEnterpriseId, enterpriseId)
|
queryWrapper.lambda().eq(ProjectEnterprise::getEnterpriseId, enterpriseId)
|
||||||
.eq(ProjectEnterprise::getProjectSn, projectSn);
|
.eq(ProjectEnterprise::getProjectSn, projectSn);
|
||||||
|
|||||||
@ -609,7 +609,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
if (workerInfo.getInserviceType() != null && workerInfo.getInserviceType() == 1) {
|
if (workerInfo.getInserviceType() != null && workerInfo.getInserviceType() == 1) {
|
||||||
workerInfo.setExitDate("");
|
workerInfo.setExitDate("");
|
||||||
}
|
}
|
||||||
WorkerInfo oldWorkerInfo = workerInfoMapper.selectById(workerInfo.getId());
|
WorkerInfo oldWorkerInfo = BeanUtil.toBean(workerInfoMapper.selectWorkerInfoById(String.valueOf(workerInfo.getId())), WorkerInfo.class);
|
||||||
if (Objects.equals(oldWorkerInfo.getInserviceType(), WorkerInfInserviceTypeoEnum.OUT.getCode()) && Objects.equals(workerInfo.getInserviceType(), 1)) {
|
if (Objects.equals(oldWorkerInfo.getInserviceType(), WorkerInfInserviceTypeoEnum.OUT.getCode()) && Objects.equals(workerInfo.getInserviceType(), 1)) {
|
||||||
workerInfo.setSafeScore(oldWorkerInfo.getExitSafeScore());
|
workerInfo.setSafeScore(oldWorkerInfo.getExitSafeScore());
|
||||||
}
|
}
|
||||||
@ -2993,6 +2993,29 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
return maps;
|
return maps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateWorkerOrg(Map<String, Object> map) {
|
||||||
|
Integer personType = MapUtils.getInteger(map, "personType");
|
||||||
|
String workerIdStr = MapUtils.getString(map, "workerIdStr");
|
||||||
|
if (StringUtils.isNotEmpty(workerIdStr)) {
|
||||||
|
for (String id : workerIdStr.split(Cts.COMMA)) {
|
||||||
|
if (personType == 1) {
|
||||||
|
WorkerInfo info = JSON.parseObject(JSON.toJSONString(workerInfoMapper.selectById(Long.valueOf(id))), WorkerInfo.class);
|
||||||
|
info.setPersonType(personType);
|
||||||
|
info.setWorkerTypeId(MapUtils.getLong(map, "moveId"));
|
||||||
|
info.setEnterpriseId(MapUtils.getLong(map, "enterpriseId"));
|
||||||
|
this.editWorkerInfo(info);
|
||||||
|
} else {
|
||||||
|
WorkerInfo info = workerInfoMapper.selectById(Long.valueOf(id));
|
||||||
|
info.setPersonType(personType);
|
||||||
|
info.setDepartmentId(MapUtils.getLong(map, "moveId"));
|
||||||
|
info.setEnterpriseId(MapUtils.getLong(map, "enterpriseId"));
|
||||||
|
this.editWorkerInfo(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取是否合格
|
* 获取是否合格
|
||||||
*
|
*
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user