|
@@ -18,6 +18,7 @@ import com.jeeplus.common.SecurityUtils;
|
|
|
import com.jeeplus.common.TokenProvider;
|
|
|
import com.jeeplus.core.query.QueryWrapperGenerator;
|
|
|
import com.jeeplus.flowable.feign.IFlowableApi;
|
|
|
+import com.jeeplus.human.depart.handover.domain.HandoverSocialSecurity;
|
|
|
import com.jeeplus.human.enrollment.enrollmentRegistration.domain.*;
|
|
|
import com.jeeplus.human.enrollment.enrollmentRegistration.mapper.EnrollmentRegistrationMapper;
|
|
|
import com.jeeplus.human.enrollment.enrollmentRegistration.mapper.EnrollmentSocialSecurityCardMapper;
|
|
@@ -90,6 +91,9 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
|
|
|
@Resource
|
|
|
private EnrollmentRewardInfoService rewardInfoService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private EnrollmentUserInfoAuditService userInfoAuditService;
|
|
|
+
|
|
|
/**
|
|
|
* 实习人员登记表信息
|
|
|
*
|
|
@@ -340,6 +344,21 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public Map<String, String> pingMapUserId(String procDefId, String procDefKey, String businessTable,
|
|
|
+ String businessId, String title, String assignee, String recordType, String userId) {
|
|
|
+ Map<String, String> map = new HashMap();
|
|
|
+ map.put("procDefId", procDefId);
|
|
|
+ map.put("procDefKey", procDefKey);
|
|
|
+ map.put("businessTable", businessTable);
|
|
|
+ map.put("businessId", businessId);
|
|
|
+ map.put("title", title);
|
|
|
+ map.put("assignee", assignee);
|
|
|
+ map.put("recordType", recordType);
|
|
|
+ map.put("userId", userId);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 修改
|
|
|
*/
|
|
@@ -656,41 +675,89 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
|
|
|
|
|
|
String userId = info.getUserId();
|
|
|
//查询教育经历数据
|
|
|
- List<EnrollmentEduInfo> eduInfoList = eduInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentEduInfo> eduInfoList = eduInfoService.findByUserId(userId,"5");
|
|
|
info.setEduInfoList(eduInfoList);
|
|
|
|
|
|
//查询工作经历数据
|
|
|
- List<EnrollmentWorkInfo> workInfos = workInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentWorkInfo> workInfos = workInfoService.findByUserId(userId,"5");
|
|
|
info.setWorkInfoList(workInfos);
|
|
|
|
|
|
//查询培训经历数据
|
|
|
- List<EnrollmentTrainingInfo> trainingInfos = trainingInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentTrainingInfo> trainingInfos = trainingInfoService.findByUserId(userId,"5");
|
|
|
info.setTrainingInfoList(trainingInfos);
|
|
|
|
|
|
//查询资质证书数据
|
|
|
- List<EnrollmentCertificateInfo> certificateInfoList = certificateInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentCertificateInfo> certificateInfoList = certificateInfoService.findByUserId(userId,"5");
|
|
|
info.setCertificateInfoList(certificateInfoList);
|
|
|
|
|
|
//查询专业技能数据
|
|
|
- List<EnrollmentSkillInfo> skillInfoList = skillInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentSkillInfo> skillInfoList = skillInfoService.findByUserId(userId,"5");
|
|
|
info.setSkillInfoList(skillInfoList);
|
|
|
|
|
|
//查询语言能力数据
|
|
|
- List<EnrollmentLanguageInfo> languageInfoList = languageInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentLanguageInfo> languageInfoList = languageInfoService.findByUserId(userId,"5");
|
|
|
info.setLanguageInfoList(languageInfoList);
|
|
|
|
|
|
//查询家庭成员数据
|
|
|
- List<EnrollmentFamilyInfo> familyInfoList = familyInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentFamilyInfo> familyInfoList = familyInfoService.findByUserId(userId,"5");
|
|
|
info.setFamilyInfoList(familyInfoList);
|
|
|
|
|
|
//查询奖项信息
|
|
|
- List<EnrollmentRewardInfo> rewardInfoList = rewardInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentRewardInfo> rewardInfoList = rewardInfoService.findByUserId(userId,"5");
|
|
|
info.setRewardInfoList(rewardInfoList);
|
|
|
}
|
|
|
|
|
|
return info;
|
|
|
}
|
|
|
|
|
|
+ public EnrollmentUserInfoAudit findAuditInfoById(String id) {
|
|
|
+ EnrollmentUserInfoAudit info = userInfoAuditService.getById(id);
|
|
|
+
|
|
|
+ if (ObjectUtil.isNotEmpty(info)) {
|
|
|
+ // 查询身份证正反面信息
|
|
|
+ List<WorkAttachmentInfoDTO> idCardFront = mapper.findDtos(info.getId(), "idCardFront");
|
|
|
+ List<WorkAttachmentInfoDTO> idCardBack = mapper.findDtos(info.getId(), "idCardBack");
|
|
|
+ if (CollectionUtils.isNotEmpty(idCardFront)) {
|
|
|
+ info.setIdCardFront(idCardFront);
|
|
|
+ }
|
|
|
+ if (CollectionUtils.isNotEmpty(idCardBack)) {
|
|
|
+ info.setIdCardBack(idCardBack);
|
|
|
+ }
|
|
|
+ String userId = info.getUserId();
|
|
|
+ //查询教育经历数据
|
|
|
+ List<EnrollmentEduInfo> eduInfoList = eduInfoService.findByUserId(userId, "2");
|
|
|
+ info.setEduInfoList(eduInfoList);
|
|
|
+
|
|
|
+ //查询工作经历数据
|
|
|
+ List<EnrollmentWorkInfo> workInfos = workInfoService.findByUserId(userId, "2");
|
|
|
+ info.setWorkInfoList(workInfos);
|
|
|
+
|
|
|
+ //查询培训经历数据
|
|
|
+ List<EnrollmentTrainingInfo> trainingInfos = trainingInfoService.findByUserId(userId, "2");
|
|
|
+ info.setTrainingInfoList(trainingInfos);
|
|
|
+
|
|
|
+ //查询资质证书数据
|
|
|
+ List<EnrollmentCertificateInfo> certificateInfoList = certificateInfoService.findByUserId(userId, "2");
|
|
|
+ info.setCertificateInfoList(certificateInfoList);
|
|
|
+
|
|
|
+ //查询专业技能数据
|
|
|
+ List<EnrollmentSkillInfo> skillInfoList = skillInfoService.findByUserId(userId, "2");
|
|
|
+ info.setSkillInfoList(skillInfoList);
|
|
|
+
|
|
|
+ //查询语言能力数据
|
|
|
+ List<EnrollmentLanguageInfo> languageInfoList = languageInfoService.findByUserId(userId, "2");
|
|
|
+ info.setLanguageInfoList(languageInfoList);
|
|
|
+
|
|
|
+ //查询家庭成员数据
|
|
|
+ List<EnrollmentFamilyInfo> familyInfoList = familyInfoService.findByUserId(userId, "2");
|
|
|
+ info.setFamilyInfoList(familyInfoList);
|
|
|
+
|
|
|
+ //查询奖项信息
|
|
|
+ List<EnrollmentRewardInfo> rewardInfoList = rewardInfoService.findByUserId(userId, "2");
|
|
|
+ info.setRewardInfoList(rewardInfoList);
|
|
|
+ }
|
|
|
+ return info;
|
|
|
+ }
|
|
|
|
|
|
public Integer findByUserId(String userId) throws Exception {
|
|
|
QueryWrapper<EnrollmentRegistration> queryWrapper = new QueryWrapper<>();
|
|
@@ -736,35 +803,35 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
|
|
|
|
|
|
String userId = info.getUserId();
|
|
|
//查询教育经历数据
|
|
|
- List<EnrollmentEduInfo> eduInfoList = eduInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentEduInfo> eduInfoList = eduInfoService.findByUserId(userId, "5");
|
|
|
info.setEduInfoList(eduInfoList);
|
|
|
|
|
|
//查询工作经历数据
|
|
|
- List<EnrollmentWorkInfo> workInfos = workInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentWorkInfo> workInfos = workInfoService.findByUserId(userId, "5");
|
|
|
info.setWorkInfoList(workInfos);
|
|
|
|
|
|
//查询培训经历数据
|
|
|
- List<EnrollmentTrainingInfo> trainingInfos = trainingInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentTrainingInfo> trainingInfos = trainingInfoService.findByUserId(userId, "5");
|
|
|
info.setTrainingInfoList(trainingInfos);
|
|
|
|
|
|
//查询资质证书数据
|
|
|
- List<EnrollmentCertificateInfo> certificateInfoList = certificateInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentCertificateInfo> certificateInfoList = certificateInfoService.findByUserId(userId, "5");
|
|
|
info.setCertificateInfoList(certificateInfoList);
|
|
|
|
|
|
//查询专业技能数据
|
|
|
- List<EnrollmentSkillInfo> skillInfoList = skillInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentSkillInfo> skillInfoList = skillInfoService.findByUserId(userId, "5");
|
|
|
info.setSkillInfoList(skillInfoList);
|
|
|
|
|
|
//查询语言能力数据
|
|
|
- List<EnrollmentLanguageInfo> languageInfoList = languageInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentLanguageInfo> languageInfoList = languageInfoService.findByUserId(userId, "5");
|
|
|
info.setLanguageInfoList(languageInfoList);
|
|
|
|
|
|
//查询家庭成员数据
|
|
|
- List<EnrollmentFamilyInfo> familyInfoList = familyInfoService.findByUserId(userId);
|
|
|
+ List<EnrollmentFamilyInfo> familyInfoList = familyInfoService.findByUserId(userId, "5");
|
|
|
info.setFamilyInfoList(familyInfoList);
|
|
|
|
|
|
//查询奖项信息
|
|
|
- List<EnrollmentRewardInfo> rewardInfoList = rewardInfoService.findByUserId(id);
|
|
|
+ List<EnrollmentRewardInfo> rewardInfoList = rewardInfoService.findByUserId(id, "5");
|
|
|
info.setRewardInfoList(rewardInfoList);
|
|
|
}
|
|
|
|
|
@@ -870,6 +937,220 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 将用户信息备份保存并设为审核状态
|
|
|
+ *
|
|
|
+ * @param registrationData
|
|
|
+ */
|
|
|
+ public void updateInfoAudit(EnrollmentRegistration registrationData) {
|
|
|
+ try {
|
|
|
+ UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
|
|
|
+ EnrollmentUserInfoAudit enrollmentUserInfoAudit = new EnrollmentUserInfoAudit();
|
|
|
+ String id = UUID.randomUUID().toString().replace("-", "");
|
|
|
+ BeanUtils.copyProperties(registrationData, enrollmentUserInfoAudit);
|
|
|
+ enrollmentUserInfoAudit.setStatus("2");
|
|
|
+ if(!"4".equals(registrationData.getStatus())){
|
|
|
+ enrollmentUserInfoAudit.setId(id);
|
|
|
+ enrollmentUserInfoAudit.setRegistrationId(registrationData.getId());
|
|
|
+ }else{
|
|
|
+ enrollmentUserInfoAudit.setId(registrationData.getId());
|
|
|
+ enrollmentUserInfoAudit.setRegistrationId(registrationData.getRegistrationId());
|
|
|
+ }
|
|
|
+ //发起员工信息审批流程
|
|
|
+ Map map = SpringUtil.getBean(IFlowableApi.class).getByNameForFen("员工信息审批");
|
|
|
+ String procDefId = map.get("id") + "";
|
|
|
+ enrollmentUserInfoAudit.setProcessDefinitionId(procDefId);
|
|
|
+ userInfoAuditService.saveOrUpdate(enrollmentUserInfoAudit);
|
|
|
+ Map<String, Map<String, String>> allMap = new HashMap<>();
|
|
|
+ String procDefKey = map.get("key") + "";
|
|
|
+ String businessTable = "human_resources_enrollment_user_info_audit";
|
|
|
+ String businessId = enrollmentUserInfoAudit.getId();
|
|
|
+ String title = enrollmentUserInfoAudit.getName() + "发起了- [" + enrollmentUserInfoAudit.getName() + "员工信息完善]";
|
|
|
+ //根据角色查用户信息
|
|
|
+ RoleDTO roleDTO = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName2("实习信息审核员");
|
|
|
+ String assignee = getAssignee(roleDTO.getId());
|
|
|
+ String recordType = "";
|
|
|
+ Map<String, String> newMap = pingMap(procDefId, procDefKey, businessTable, businessId, title, assignee, recordType);
|
|
|
+ allMap.put("员工信息审批", newMap);
|
|
|
+ SpringUtil.getBean(IFlowableApi.class).startForFenNew(allMap);
|
|
|
+
|
|
|
+ if(!"4".equals(registrationData.getStatus())){
|
|
|
+ IWorkAttachmentApi workAttachmentApi = SpringUtil.getBean(IWorkAttachmentApi.class);
|
|
|
+ SpringUtil.getBean(IWorkAttachmentApi.class).deleteByAttachmentId(enrollmentUserInfoAudit.getId());
|
|
|
+ saveAttachments(enrollmentUserInfoAudit.getIdCardFront(), "idCardFront", enrollmentUserInfoAudit.getId(), userDTO, workAttachmentApi);
|
|
|
+ saveAttachments(enrollmentUserInfoAudit.getIdCardBack(), "idCardBack", enrollmentUserInfoAudit.getId(), userDTO, workAttachmentApi);
|
|
|
+ saveEnrollmentDetailInfo(registrationData);
|
|
|
+ }else{
|
|
|
+ updateEnrollmentDetailInfo(registrationData);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void saveEnrollmentDetailInfo(EnrollmentRegistration dto) {
|
|
|
+ // 教育经历
|
|
|
+ List<EnrollmentEduInfo> eduList = dto.getEduInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(eduList)) {
|
|
|
+ eduList.forEach(item -> {
|
|
|
+ item.setId("");
|
|
|
+ item.setStatus("2");
|
|
|
+ eduInfoService.add(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 工作经历
|
|
|
+ List<EnrollmentWorkInfo> workList = dto.getWorkInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(workList)) {
|
|
|
+ workList.forEach(item -> {
|
|
|
+ item.setId("");
|
|
|
+ item.setStatus("2");
|
|
|
+ workInfoService.add(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 培训经历
|
|
|
+ List<EnrollmentTrainingInfo> trainingList = dto.getTrainingInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(trainingList)) {
|
|
|
+ trainingList.forEach(item -> item.setStatus("2"));
|
|
|
+ trainingList.forEach(item -> {
|
|
|
+ item.setId("");
|
|
|
+ item.setStatus("2");
|
|
|
+ trainingInfoService.add(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 资质证书
|
|
|
+ List<EnrollmentCertificateInfo> certificateList = dto.getCertificateInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(certificateList)) {
|
|
|
+ certificateList.forEach(item -> {
|
|
|
+ item.setId("");
|
|
|
+ item.setStatus("2");
|
|
|
+ certificateInfoService.add(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 专业技能
|
|
|
+ List<EnrollmentSkillInfo> skillList = dto.getSkillInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(skillList)) {
|
|
|
+ skillList.forEach(item -> {
|
|
|
+ item.setId("");
|
|
|
+ item.setStatus("2");
|
|
|
+ skillInfoService.add(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 语言能力
|
|
|
+ List<EnrollmentLanguageInfo> languageList = dto.getLanguageInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(languageList)) {
|
|
|
+ languageList.forEach(item -> {
|
|
|
+ item.setId("");
|
|
|
+ item.setStatus("2");
|
|
|
+ languageInfoService.add(item);
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // 家庭成员
|
|
|
+ List<EnrollmentFamilyInfo> familyList = dto.getFamilyInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(familyList)) {
|
|
|
+ familyList.forEach(item -> {
|
|
|
+ item.setId("");
|
|
|
+ item.setStatus("2");
|
|
|
+ familyInfoService.add(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 奖项信息
|
|
|
+ List<EnrollmentRewardInfo> rewardList = dto.getRewardInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(rewardList)) {
|
|
|
+ rewardList.forEach(item -> {
|
|
|
+ item.setId("");
|
|
|
+ item.setStatus("2");
|
|
|
+ rewardInfoService.add(item);
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public void updateEnrollmentDetailInfo(EnrollmentRegistration dto) {
|
|
|
+ // 教育经历
|
|
|
+ List<EnrollmentEduInfo> eduList = dto.getEduInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(eduList)) {
|
|
|
+ eduList.forEach(item -> {
|
|
|
+ item.setStatus("2");
|
|
|
+ eduInfoService.saveOrUpdate(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 工作经历
|
|
|
+ List<EnrollmentWorkInfo> workList = dto.getWorkInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(workList)) {
|
|
|
+ workList.forEach(item -> {
|
|
|
+ item.setStatus("2");
|
|
|
+ workInfoService.saveOrUpdate(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 培训经历
|
|
|
+ List<EnrollmentTrainingInfo> trainingList = dto.getTrainingInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(trainingList)) {
|
|
|
+ trainingList.forEach(item -> item.setStatus("2"));
|
|
|
+ trainingList.forEach(item -> {
|
|
|
+ item.setStatus("2");
|
|
|
+ trainingInfoService.saveOrUpdate(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 资质证书
|
|
|
+ List<EnrollmentCertificateInfo> certificateList = dto.getCertificateInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(certificateList)) {
|
|
|
+ certificateList.forEach(item -> {
|
|
|
+ item.setStatus("2");
|
|
|
+ certificateInfoService.saveOrUpdate(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 专业技能
|
|
|
+ List<EnrollmentSkillInfo> skillList = dto.getSkillInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(skillList)) {
|
|
|
+ skillList.forEach(item -> {
|
|
|
+ item.setStatus("2");
|
|
|
+ skillInfoService.saveOrUpdate(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 语言能力
|
|
|
+ List<EnrollmentLanguageInfo> languageList = dto.getLanguageInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(languageList)) {
|
|
|
+ languageList.forEach(item -> {
|
|
|
+ item.setStatus("2");
|
|
|
+ languageInfoService.saveOrUpdate(item);
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // 家庭成员
|
|
|
+ List<EnrollmentFamilyInfo> familyList = dto.getFamilyInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(familyList)) {
|
|
|
+ familyList.forEach(item -> {
|
|
|
+ item.setStatus("2");
|
|
|
+ familyInfoService.saveOrUpdate(item);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 奖项信息
|
|
|
+ List<EnrollmentRewardInfo> rewardList = dto.getRewardInfoList();
|
|
|
+ if (CollectionUtils.isNotEmpty(rewardList)) {
|
|
|
+ rewardList.forEach(item -> {
|
|
|
+ item.setStatus("2");
|
|
|
+ rewardInfoService.saveOrUpdate(item);
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
public void updateRegistration(EnrollmentRegistration reportData) throws ApiException {
|
|
|
|
|
|
//获取当前登录人信息
|
|
@@ -1080,6 +1361,71 @@ public class EnrollmentRegistrationService extends ServiceImpl<EnrollmentRegistr
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ public void updateAuditRegistration(EnrollmentRegistration reportData) throws ApiException {
|
|
|
+
|
|
|
+ //获取当前登录人信息
|
|
|
+ UserDTO userDTO = SpringUtil.getBean(IUserApi.class).getByToken(TokenProvider.getCurrentToken());
|
|
|
+
|
|
|
+ EnrollmentRegistration report = new EnrollmentRegistration();
|
|
|
+ BeanUtils.copyProperties(reportData, report);
|
|
|
+ report.setUpdateById(userDTO.getId());
|
|
|
+ report.setUpdateTime(new Date());
|
|
|
+
|
|
|
+ updateIdCard(reportData);
|
|
|
+
|
|
|
+ String dictValue = SpringUtil.getBean(IDictApi.class).getDictValue("dd_status", "dd_status", "0");
|
|
|
+ if ("1".equals(dictValue)) {
|
|
|
+ //钉钉逻辑
|
|
|
+ //获取用户所在部门信息
|
|
|
+ OfficeDTO officeDto = SpringUtil.getBean(IOfficeApi.class).getOfficeById(report.getDepartment());
|
|
|
+ String tenantId = officeDto.getTenantId();
|
|
|
+ //判断用户是否为 评估 或者 会计 的公司
|
|
|
+ if (tenantId.equals("10003") || tenantId.equals("10001")) {
|
|
|
+ //获取钉钉所有部门信息
|
|
|
+ List<OapiV2DepartmentListsubResponse.DeptBaseResponse> deptBaseResponses = dingTalkUtils.deptList(tenantId);
|
|
|
+ for (OapiV2DepartmentListsubResponse.DeptBaseResponse dept : deptBaseResponses) {
|
|
|
+ //找到用户所在的钉钉部门
|
|
|
+ if (officeDto.getName().equals(dept.getName())) {
|
|
|
+ // 相应逻辑
|
|
|
+ DingTalkUserDTO dingTalkUserDTO = new DingTalkUserDTO();
|
|
|
+ dingTalkUserDTO.setMobile(report.getMobilePhone());
|
|
|
+ dingTalkUserDTO.setName(report.getName());
|
|
|
+ dingTalkUserDTO.setDeptIdList(String.valueOf(dept.getDeptId()));
|
|
|
+ if (StringUtils.isNotBlank(report.getDdId())) {
|
|
|
+ dingTalkUserDTO.setUserid(report.getDdId());
|
|
|
+ dingTalkUtils.updateUser(dingTalkUserDTO, tenantId);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //钉钉逻辑
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ mapper.updateById(report);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改用户信息
|
|
|
+ */
|
|
|
+ EnrollmentRegistration registration = mapper.getById(reportData.getId());
|
|
|
+ if (StringUtils.isNotBlank(registration.getUserId())) {
|
|
|
+ UserDTO dto = SpringUtil.getBean(IUserApi.class).getById(registration.getUserId());
|
|
|
+ if (dto != null) {
|
|
|
+ //往用户表中新增一条数据
|
|
|
+ UserDTO dto1 = new UserDTO();
|
|
|
+ dto1.setId(dto.getId());
|
|
|
+ dto1.setName(report.getName());
|
|
|
+ dto1.setMobile(report.getMobilePhone());
|
|
|
+ dto1.setNo(report.getMobilePhone());
|
|
|
+ dto1.setPhoto("");
|
|
|
+ SpringUtil.getBean(IUserApi.class).saveOrUpdate(dto1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
public void insertIntoEnrollmentRegistrationInfo(String value) {
|
|
|
EnrollmentRegistration infos = JSON.parseObject(value, new TypeReference<EnrollmentRegistration>() {
|
|
|
});
|