包头bug修改
This commit is contained in:
parent
d7a4644daf
commit
fbc32c5693
@ -617,17 +617,6 @@ public class WorkerAdmissionController {
|
|||||||
workerAdmissionService.exportZipWorkAdmissionTemplate(response, projectSn);
|
workerAdmissionService.exportZipWorkAdmissionTemplate(response, projectSn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@OperLog(operModul = "人员入场管理", operType = "", operDesc = "读取导入的人员入场excel模板数据")
|
|
||||||
@ApiOperation(value = "读取导入的人员入场excel模板数据", notes = "读取导入的人员入场excel模板数据")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String"),
|
|
||||||
@ApiImplicitParam(name = "excelFile", value = "导入文件", paramType = "query", required = true, dataType = "String"),
|
|
||||||
})
|
|
||||||
@PostMapping(value = "/getUploadExcelWorkAdmissions")
|
|
||||||
public Result getUploadExcelWorkAdmissions(MultipartFile excelFile, String projectSn) {
|
|
||||||
return workerAdmissionService.getUploadExcelWorkAdmissions(excelFile, projectSn);
|
|
||||||
}
|
|
||||||
|
|
||||||
@OperLog(operModul = "人员入场管理", operType = "", operDesc = "读取导入的人员入场zip数据")
|
@OperLog(operModul = "人员入场管理", operType = "", operDesc = "读取导入的人员入场zip数据")
|
||||||
@ApiOperation(value = "读取导入的人员入场zip数据", notes = "读取导入的人员入场zip数据")
|
@ApiOperation(value = "读取导入的人员入场zip数据", notes = "读取导入的人员入场zip数据")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ -759,7 +748,7 @@ public class WorkerAdmissionController {
|
|||||||
detail.setProjectSn(projectSn);
|
detail.setProjectSn(projectSn);
|
||||||
detail.setPersonType(NumberUtil.compare(detail.getPostWorkType(), 200) >= 0 ? 1 : 2);
|
detail.setPersonType(NumberUtil.compare(detail.getPostWorkType(), 200) >= 0 ? 1 : 2);
|
||||||
detail.setBirthday(idCardInfoMap.get("birthday"));
|
detail.setBirthday(idCardInfoMap.get("birthday"));
|
||||||
detail.setPhone(importInfo.get("*电话"));
|
detail.setPhone(importInfo.get("电话"));
|
||||||
detail.setEpcCbs(enterpriseInfos.stream().filter(o -> o.getEnterpriseName().equals(importInfo.get("EPC承包商"))).findFirst().map(o -> o.getId()).orElse(null));
|
detail.setEpcCbs(enterpriseInfos.stream().filter(o -> o.getEnterpriseName().equals(importInfo.get("EPC承包商"))).findFirst().map(o -> o.getId()).orElse(null));
|
||||||
//项目组 资格证号 资质类型 发证机关 取证日期 截止日期
|
//项目组 资格证号 资质类型 发证机关 取证日期 截止日期
|
||||||
detail.setProjectGroup(Optional.ofNullable(groupMap.get(importInfo.get("*项目组"))).map(m -> Convert.toLong(m.getId())).orElse(null));
|
detail.setProjectGroup(Optional.ofNullable(groupMap.get(importInfo.get("*项目组"))).map(m -> Convert.toLong(m.getId())).orElse(null));
|
||||||
@ -813,9 +802,9 @@ public class WorkerAdmissionController {
|
|||||||
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("EPC承包商"))) {
|
//if (StringUtils.isBlank(importInfo.get("EPC承包商"))) {
|
||||||
// throw new OpenAlertException("有EPC承包商未填写");
|
// throw new OpenAlertException("有EPC承包商未填写");
|
||||||
//}
|
//}
|
||||||
|
|||||||
@ -114,7 +114,4 @@ public class UnitApplyData implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "设计单位名称")
|
@ApiModelProperty(value = "设计单位名称")
|
||||||
private java.lang.String designUnitName;
|
private java.lang.String designUnitName;
|
||||||
@TableField(exist = false)
|
|
||||||
@ApiModelProperty(value = "勘察单位名称")
|
|
||||||
private java.lang.String explorationUnitName;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,8 +5,10 @@
|
|||||||
select * from (
|
select * from (
|
||||||
select t.*
|
select t.*
|
||||||
,ei.enterprise_name as detect_unit_name
|
,ei.enterprise_name as detect_unit_name
|
||||||
|
,ei1.enterprise_name as exploration_unit_name
|
||||||
from test_unit_declaration_data t
|
from test_unit_declaration_data t
|
||||||
left join enterprise_info ei on ei.id=t.detect_unit
|
left join enterprise_info ei on ei.id=t.detect_unit
|
||||||
|
left join enterprise_info ei1 on ei1.id=t.exploration_unit
|
||||||
)t
|
)t
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
@ -14,8 +16,10 @@
|
|||||||
select * from (
|
select * from (
|
||||||
select t.*
|
select t.*
|
||||||
,ei.enterprise_name as detect_unit_name
|
,ei.enterprise_name as detect_unit_name
|
||||||
|
,ei1.enterprise_name as exploration_unit_name
|
||||||
from test_unit_declaration_data t
|
from test_unit_declaration_data t
|
||||||
left join enterprise_info ei on ei.id=t.detect_unit
|
left join enterprise_info ei on ei.id=t.detect_unit
|
||||||
|
left join enterprise_info ei1 on ei1.id=t.exploration_unit
|
||||||
)t
|
)t
|
||||||
where t.id = #{id}
|
where t.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -9,12 +9,14 @@
|
|||||||
,ei1.enterprise_name as supervising_unit_name
|
,ei1.enterprise_name as supervising_unit_name
|
||||||
,ei2.enterprise_name as epc_contractor_name
|
,ei2.enterprise_name as epc_contractor_name
|
||||||
,ei3.enterprise_name as construction_unit_name
|
,ei3.enterprise_name as construction_unit_name
|
||||||
|
,ei4.enterprise_name as design_unit_name
|
||||||
from unit_apply_data t
|
from unit_apply_data t
|
||||||
left join device_unit du on du.id = t.device_unit
|
left join device_unit du on du.id = t.device_unit
|
||||||
left join project_group pg on pg.id=t.project_group
|
left join project_group pg on pg.id=t.project_group
|
||||||
left join enterprise_info ei1 on ei1.id=t.supervising_unit
|
left join enterprise_info ei1 on ei1.id=t.supervising_unit
|
||||||
left join enterprise_info ei2 on ei2.id=t.epc_contractor
|
left join enterprise_info ei2 on ei2.id=t.epc_contractor
|
||||||
left join enterprise_info ei3 on ei3.id=t.construction_unit
|
left join enterprise_info ei3 on ei3.id=t.construction_unit
|
||||||
|
left join enterprise_info ei4 on ei4.id=t.device_unit
|
||||||
)t
|
)t
|
||||||
${ew.customSqlSegment}
|
${ew.customSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
@ -26,12 +28,14 @@
|
|||||||
,ei1.enterprise_name as supervising_unit_name
|
,ei1.enterprise_name as supervising_unit_name
|
||||||
,ei2.enterprise_name as epc_contractor_name
|
,ei2.enterprise_name as epc_contractor_name
|
||||||
,ei3.enterprise_name as construction_unit_name
|
,ei3.enterprise_name as construction_unit_name
|
||||||
|
,ei4.enterprise_name as design_unit_name
|
||||||
from unit_apply_data t
|
from unit_apply_data t
|
||||||
left join device_unit du on du.id = t.device_unit
|
left join device_unit du on du.id = t.device_unit
|
||||||
left join project_group pg on pg.id=t.project_group
|
left join project_group pg on pg.id=t.project_group
|
||||||
left join enterprise_info ei1 on ei1.id=t.supervising_unit
|
left join enterprise_info ei1 on ei1.id=t.supervising_unit
|
||||||
left join enterprise_info ei2 on ei2.id=t.epc_contractor
|
left join enterprise_info ei2 on ei2.id=t.epc_contractor
|
||||||
left join enterprise_info ei3 on ei3.id=t.construction_unit
|
left join enterprise_info ei3 on ei3.id=t.construction_unit
|
||||||
|
left join enterprise_info ei4 on ei4.id=t.device_unit
|
||||||
)t
|
)t
|
||||||
where t.id = #{id}
|
where t.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.zhgd.xmgl.modules.baotou.entity.PartyConstructionMember;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.vo.PartyConstructionMemberStats;
|
import com.zhgd.xmgl.modules.baotou.entity.vo.PartyConstructionMemberStats;
|
||||||
|
import com.zhgd.xmgl.modules.worker.entity.WorkerInfo;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -57,4 +58,18 @@ public interface IPartyConstructionMemberService extends IService<PartyConstruct
|
|||||||
PartyConstructionMemberStats stats(String projectSn);
|
PartyConstructionMemberStats stats(String projectSn);
|
||||||
|
|
||||||
void addFromWorker(HashMap<String, Object> param);
|
void addFromWorker(HashMap<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步党员
|
||||||
|
*
|
||||||
|
* @param workerInfo
|
||||||
|
*/
|
||||||
|
void syncMember(WorkerInfo workerInfo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除党员
|
||||||
|
*
|
||||||
|
* @param workerInfo
|
||||||
|
*/
|
||||||
|
void deleteMember(WorkerInfo workerInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,8 +74,6 @@ public interface IWorkerAdmissionService extends IService<WorkerAdmission> {
|
|||||||
|
|
||||||
void exportZipWorkAdmissionTemplate(HttpServletResponse response, String projectSn);
|
void exportZipWorkAdmissionTemplate(HttpServletResponse response, String projectSn);
|
||||||
|
|
||||||
Result getUploadExcelWorkAdmissions(MultipartFile excelFile, String projectSn);
|
|
||||||
|
|
||||||
List<WorkerAdmission> getBatchByPaper(Map<String, Object> param);
|
List<WorkerAdmission> getBatchByPaper(Map<String, Object> param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -174,4 +174,52 @@ public class PartyConstructionMemberServiceImpl extends ServiceImpl<PartyConstru
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void syncMember(WorkerInfo info) {
|
||||||
|
if (info.getBranchId() != null && (info.getPoliticsStatus() != null && (info.getPoliticsStatus() == 2 || info.getPoliticsStatus() == 3))) {
|
||||||
|
//同步党员
|
||||||
|
PartyConstructionMember member = null;
|
||||||
|
List<PartyConstructionMember> members = this.list(new LambdaQueryWrapper<PartyConstructionMember>()
|
||||||
|
.eq(PartyConstructionMember::getIdCard, info.getIdCard()));
|
||||||
|
if (CollUtil.isNotEmpty(members)) {
|
||||||
|
member = members.get(0);
|
||||||
|
}
|
||||||
|
if (member == null) {
|
||||||
|
member = new PartyConstructionMember();
|
||||||
|
}
|
||||||
|
member.setWorkerInfoId(info.getId());
|
||||||
|
member.setPartyConstructionOrganizationId(info.getBranchId());
|
||||||
|
member.setSex(info.getSex());
|
||||||
|
member.setPartyPosition(info.getPartyPosition());
|
||||||
|
member.setNation(info.getNation());
|
||||||
|
member.setEducationalBackground(info.getEducational());
|
||||||
|
member.setNativePlace(info.getNativePlace());
|
||||||
|
member.setPersonnelCategory(Optional.ofNullable(info.getPoliticsStatus()).map(m -> m == 2 ? "正式党员" : "预备党员").orElse(null));
|
||||||
|
member.setIdCard(info.getIdCard());
|
||||||
|
member.setPhoneNumber(info.getPhoneNumber());
|
||||||
|
member.setProjectSn(info.getProjectSn());
|
||||||
|
if (member.getId() != null) {
|
||||||
|
this.updateById(member);
|
||||||
|
} else {
|
||||||
|
this.save(member);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//删除党员
|
||||||
|
this.remove(new LambdaQueryWrapper<PartyConstructionMember>()
|
||||||
|
.eq(PartyConstructionMember::getIdCard, info.getIdCard())
|
||||||
|
.eq(PartyConstructionMember::getProjectSn, info.getProjectSn())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteMember(WorkerInfo info) {
|
||||||
|
//删除党员
|
||||||
|
this.remove(new LambdaQueryWrapper<PartyConstructionMember>()
|
||||||
|
.eq(PartyConstructionMember::getIdCard, info.getIdCard())
|
||||||
|
.eq(PartyConstructionMember::getProjectSn, info.getProjectSn())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -189,7 +189,7 @@ public class QualitySuperviseServiceImpl extends ServiceImpl<QualitySuperviseMap
|
|||||||
record.setQualitySupervisionAgency(FlowUtil.getString(formData, "field4427127220717"));
|
record.setQualitySupervisionAgency(FlowUtil.getString(formData, "field4427127220717"));
|
||||||
record.setIssuer(FlowUtil.getPullDownLong(formData, "field6606727229026"));
|
record.setIssuer(FlowUtil.getPullDownLong(formData, "field6606727229026"));
|
||||||
record.setIssuingDate(FlowUtil.getDate(formData, "field1013227240565"));
|
record.setIssuingDate(FlowUtil.getDate(formData, "field1013227240565"));
|
||||||
record.setContactPerson(FlowUtil.getPullDownLong(formData, "field6427495431488"));
|
record.setContactPerson(FlowUtil.getPullDownLong(formData, "field5332073372339"));
|
||||||
record.setContactPhoneNumber(FlowUtil.getString(formData, "field2045027293082"));
|
record.setContactPhoneNumber(FlowUtil.getString(formData, "field2045027293082"));
|
||||||
record.setDeviceId(FlowUtil.getPullDownLong(formData, "field8461427261832"));
|
record.setDeviceId(FlowUtil.getPullDownLong(formData, "field8461427261832"));
|
||||||
record.setProjectGroupId(FlowUtil.getPullDownLong(formData, "field2236827437883"));
|
record.setProjectGroupId(FlowUtil.getPullDownLong(formData, "field2236827437883"));
|
||||||
|
|||||||
@ -369,7 +369,7 @@ public class WorkerAdmissionDetailServiceImpl extends ServiceImpl<WorkerAdmissio
|
|||||||
Map<String, WorkerAdmissionDetail> idCardMap = detailList.stream().collect(Collectors.toMap(WorkerAdmissionDetail::getIdCard, Function.identity(), (o1, o2) -> o1));
|
Map<String, WorkerAdmissionDetail> idCardMap = detailList.stream().collect(Collectors.toMap(WorkerAdmissionDetail::getIdCard, Function.identity(), (o1, o2) -> o1));
|
||||||
existDepartmentInfos.addAll(addDepartments);
|
existDepartmentInfos.addAll(addDepartments);
|
||||||
//党员身份证
|
//党员身份证
|
||||||
List<String> partyIdCards = addWorkers.stream().filter(o -> o.getBranchId() != null && (o.getPoliticsStatus() != null && o.getPoliticsStatus() == 2 || o.getPoliticsStatus() == 3)).map(WorkerInfo::getIdCard).collect(Collectors.toList());
|
List<String> partyIdCards = addWorkers.stream().filter(o -> o.getBranchId() != null && (o.getPoliticsStatus() != null && (o.getPoliticsStatus() == 2 || o.getPoliticsStatus() == 3))).map(WorkerInfo::getIdCard).collect(Collectors.toList());
|
||||||
Map<String, PartyConstructionMember> existIdCardMap = new HashMap<>();
|
Map<String, PartyConstructionMember> existIdCardMap = new HashMap<>();
|
||||||
if (CollUtil.isNotEmpty(partyIdCards)) {
|
if (CollUtil.isNotEmpty(partyIdCards)) {
|
||||||
existIdCardMap = partyConstructionMemberService.list(new LambdaQueryWrapper<PartyConstructionMember>()
|
existIdCardMap = partyConstructionMemberService.list(new LambdaQueryWrapper<PartyConstructionMember>()
|
||||||
|
|||||||
@ -457,68 +457,6 @@ public class WorkerAdmissionServiceImpl extends ServiceImpl<WorkerAdmissionMappe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Result getUploadExcelWorkAdmissions(MultipartFile excelFile, String projectSn) {
|
|
||||||
Result result = new Result();
|
|
||||||
String rtMsg = "";
|
|
||||||
List<WorkerAdmissionDetail> rtList = new ArrayList<>();
|
|
||||||
try {
|
|
||||||
InputStream is = excelFile.getInputStream();
|
|
||||||
List<Map<String, String>> list = ExcelUtils.jxlExlToList(is, 0);
|
|
||||||
list = list.stream().filter(o -> {
|
|
||||||
for (Map.Entry<String, String> entry : o.entrySet()) {
|
|
||||||
if (StrUtil.isNotBlank(entry.getValue())) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
if (list == null || list.size() == 0) {
|
|
||||||
throw new OpenAlertException(MessageUtil.get("excelNotDataErr"));
|
|
||||||
}
|
|
||||||
this.checkParams(list, projectSn);
|
|
||||||
List<EnterpriseInfo> enterpriseInfos = projectEnterpriseService.queryPageList(new MapBuilder<String, Object>()
|
|
||||||
.put("projectSn", projectSn)
|
|
||||||
.put(Cts.PAGE_SIZE, -1)
|
|
||||||
.build()).getRecords();
|
|
||||||
List<DeviceUnit> deviceUnits = deviceUnitService.list(new LambdaQueryWrapper<DeviceUnit>()
|
|
||||||
.eq(DeviceUnit::getProjectSn, projectSn).last(Cts.IGNORE_DATA_SCOPE_CONDITION));
|
|
||||||
List<PostWorkType> workerTypeList = postWorkTypeService.list(new LambdaQueryWrapper<PostWorkType>()
|
|
||||||
.eq(PostWorkType::getProjectSn, projectSn));
|
|
||||||
for (Map<String, String> importInfo : list) {
|
|
||||||
WorkerAdmissionDetail detail = new WorkerAdmissionDetail();
|
|
||||||
detail.setNum(importInfo.get("*编号"));
|
|
||||||
detail.setWorkerName(importInfo.get("*姓名"));
|
|
||||||
detail.setEnterpriseId(enterpriseInfos.stream().filter(o -> o.getEnterpriseName().equals(importInfo.get("单位"))).findFirst().map(EnterpriseInfo::getId).orElse(null));
|
|
||||||
detail.setWorkAreaName(importInfo.get("*工作区域"));
|
|
||||||
detail.setPostWorkType(workerTypeList.stream().filter(o -> o.getPostWorkTypeName().equals(importInfo.get("*岗位(工种)"))).findFirst().map(o -> o.getId()).orElse(null));
|
|
||||||
//detail.setTeam("");
|
|
||||||
Map<String, String> idCardInfoMap = IdCardUtils.getBirthdayAgeSex(importInfo.get("*身份证号"));
|
|
||||||
detail.setSex(MapUtils.getInteger(idCardInfoMap, "sex"));
|
|
||||||
detail.setAge(idCardInfoMap.get("age"));
|
|
||||||
detail.setIdCard(importInfo.get("*身份证号"));
|
|
||||||
detail.setEntryDeadline(importInfo.get("*计划截止时间"));
|
|
||||||
detail.setRemark(importInfo.get("备注"));
|
|
||||||
detail.setProjectSn(projectSn);
|
|
||||||
detail.setPersonType(NumberUtil.compare(detail.getPostWorkType(), 200) >= 0 ? 1 : 2);
|
|
||||||
detail.setBirthday(idCardInfoMap.get("birthday"));
|
|
||||||
detail.setPhone(importInfo.get("*电话"));
|
|
||||||
detail.setEpcCbs(enterpriseInfos.stream().filter(o -> o.getEnterpriseName().equals(importInfo.get("EPC承包商"))).findFirst().map(o -> o.getId()).orElse(null));
|
|
||||||
rtList.add(detail);
|
|
||||||
}
|
|
||||||
result.setResult(rtList);
|
|
||||||
} catch (OpenAlertException e) {
|
|
||||||
log.error("error:", e);
|
|
||||||
rtMsg = e.getMessage();
|
|
||||||
result.error500(rtMsg);
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("error:", e);
|
|
||||||
rtMsg = MessageUtil.get("failErr");
|
|
||||||
result.error500(rtMsg);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<WorkerAdmission> getBatchByPaper(Map<String, Object> param) {
|
public List<WorkerAdmission> getBatchByPaper(Map<String, Object> param) {
|
||||||
return baseMapper.getBatchByPaper(param);
|
return baseMapper.getBatchByPaper(param);
|
||||||
|
|||||||
@ -35,10 +35,7 @@ import com.zhgd.xmgl.modules.baotou.entity.DeviceUnit;
|
|||||||
import com.zhgd.xmgl.modules.baotou.entity.PartyConstructionOrganization;
|
import com.zhgd.xmgl.modules.baotou.entity.PartyConstructionOrganization;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroup;
|
import com.zhgd.xmgl.modules.baotou.entity.ProjectGroup;
|
||||||
import com.zhgd.xmgl.modules.baotou.entity.WorkerAdmissionDetail;
|
import com.zhgd.xmgl.modules.baotou.entity.WorkerAdmissionDetail;
|
||||||
import com.zhgd.xmgl.modules.baotou.service.IDeviceUnitService;
|
import com.zhgd.xmgl.modules.baotou.service.*;
|
||||||
import com.zhgd.xmgl.modules.baotou.service.IPartyConstructionOrganizationService;
|
|
||||||
import com.zhgd.xmgl.modules.baotou.service.IProjectGroupService;
|
|
||||||
import com.zhgd.xmgl.modules.baotou.service.IWorkerAdmissionDetailService;
|
|
||||||
import com.zhgd.xmgl.modules.basicdata.entity.Company;
|
import com.zhgd.xmgl.modules.basicdata.entity.Company;
|
||||||
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||||
import com.zhgd.xmgl.modules.basicdata.enums.CompanyTypeEnum;
|
import com.zhgd.xmgl.modules.basicdata.enums.CompanyTypeEnum;
|
||||||
@ -316,6 +313,9 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
@Lazy
|
@Lazy
|
||||||
@Autowired
|
@Autowired
|
||||||
private IPartyConstructionOrganizationService partyConstructionOrganizationService;
|
private IPartyConstructionOrganizationService partyConstructionOrganizationService;
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
private IPartyConstructionMemberService partyConstructionMemberService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员管理分页
|
* 人员管理分页
|
||||||
@ -363,6 +363,21 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
return page.setRecords(list);
|
return page.setRecords(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public boolean check(WorkerInfo workerInfo) throws Exception {
|
||||||
|
// Project project = projectMapper.selectOne(new LambdaQueryWrapper<Project>()
|
||||||
|
// .eq(Project::getProjectSn, workerInfo.getProjectSn()));
|
||||||
|
// if (project == null) {
|
||||||
|
// throw new OpenAlertException("项目不存在");
|
||||||
|
// }
|
||||||
|
// JSONObject param = new JSONObject();
|
||||||
|
// String fieldAcquisitionUrl = workerInfo.getFieldAcquisitionUrl();
|
||||||
|
// if (StrUtil.isBlank(fieldAcquisitionUrl)) {
|
||||||
|
// throw new OpenAlertException("fieldAcquisitionUrl不能为空");
|
||||||
|
// }
|
||||||
|
// param.put("facePicBinaryData", Base64Util.convertFileToBase64(PathUtil.reviseSlash(basePath + "/" + fieldAcquisitionUrl)));
|
||||||
|
// return hikvisionCall.faceScore(project, param);
|
||||||
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> selectProjectWorkerPageList(Map<String, Object> map) {
|
public Map<String, Object> selectProjectWorkerPageList(Map<String, Object> map) {
|
||||||
Map<String, Object> resultMap = new HashMap<>(16);
|
Map<String, Object> resultMap = new HashMap<>(16);
|
||||||
@ -380,21 +395,6 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public boolean check(WorkerInfo workerInfo) throws Exception {
|
|
||||||
// Project project = projectMapper.selectOne(new LambdaQueryWrapper<Project>()
|
|
||||||
// .eq(Project::getProjectSn, workerInfo.getProjectSn()));
|
|
||||||
// if (project == null) {
|
|
||||||
// throw new OpenAlertException("项目不存在");
|
|
||||||
// }
|
|
||||||
// JSONObject param = new JSONObject();
|
|
||||||
// String fieldAcquisitionUrl = workerInfo.getFieldAcquisitionUrl();
|
|
||||||
// if (StrUtil.isBlank(fieldAcquisitionUrl)) {
|
|
||||||
// throw new OpenAlertException("fieldAcquisitionUrl不能为空");
|
|
||||||
// }
|
|
||||||
// param.put("facePicBinaryData", Base64Util.convertFileToBase64(PathUtil.reviseSlash(basePath + "/" + fieldAcquisitionUrl)));
|
|
||||||
// return hikvisionCall.faceScore(project, param);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改人员班组
|
* 修改人员班组
|
||||||
*
|
*
|
||||||
@ -568,6 +568,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
.eq(WorkerInfoDelete::getProjectSn, workerInfo.getProjectSn())
|
.eq(WorkerInfoDelete::getProjectSn, workerInfo.getProjectSn())
|
||||||
.eq(WorkerInfoDelete::getIdCard, workerInfo.getIdCard())
|
.eq(WorkerInfoDelete::getIdCard, workerInfo.getIdCard())
|
||||||
);
|
);
|
||||||
|
partyConstructionMemberService.syncMember(workerInfo);
|
||||||
return workerInfo;
|
return workerInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,6 +679,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
}
|
}
|
||||||
asyncJiLianDa.saveWorkerInfo(workerInfo);
|
asyncJiLianDa.saveWorkerInfo(workerInfo);
|
||||||
updateWorkerHkStatus(workerInfo);
|
updateWorkerHkStatus(workerInfo);
|
||||||
|
partyConstructionMemberService.syncMember(workerInfo);
|
||||||
return workerInfo;
|
return workerInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -720,7 +722,7 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
|||||||
|
|
||||||
//同步海康
|
//同步海康
|
||||||
deleteWorkerForHikvision(String.valueOf(workerInfo.getId()), workerInfo);
|
deleteWorkerForHikvision(String.valueOf(workerInfo.getId()), workerInfo);
|
||||||
|
partyConstructionMemberService.deleteMember(workerInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkExistAccount(String id) {
|
private void checkExistAccount(String id) {
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user