|
@@ -12,6 +12,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.enrollment.enrollmentRegistration.domain.EnrollmentRegistration;
|
|
|
import com.jeeplus.human.practice.register.domain.Registration;
|
|
|
import com.jeeplus.human.practice.register.domain.RegistrationExperience;
|
|
|
import com.jeeplus.human.practice.register.domain.RegistrationFamilyMembers;
|
|
@@ -21,10 +22,7 @@ import com.jeeplus.human.practice.register.mapper.RegistrationExperienceMapper;
|
|
|
import com.jeeplus.human.practice.register.service.dto.RegistrationDto;
|
|
|
import com.jeeplus.sys.domain.WorkAttachmentInfo;
|
|
|
import com.jeeplus.sys.feign.*;
|
|
|
-import com.jeeplus.sys.service.dto.OfficeDTO;
|
|
|
-import com.jeeplus.sys.service.dto.PostDTO;
|
|
|
-import com.jeeplus.sys.service.dto.RoleDTO;
|
|
|
-import com.jeeplus.sys.service.dto.UserDTO;
|
|
|
+import com.jeeplus.sys.service.dto.*;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -53,6 +51,15 @@ public class RegistrationService extends ServiceImpl<InterRegistrationMapper, Re
|
|
|
@Resource
|
|
|
private RegistrationExperienceMapper experienceMapper;
|
|
|
|
|
|
+ public Integer findIdCardOnly(String idCard) throws Exception {
|
|
|
+ QueryWrapper<Registration> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("id_card", idCard);
|
|
|
+ queryWrapper.eq("del_flag", 0);
|
|
|
+ // 删除基础信息表
|
|
|
+ Integer integer = mapper.selectCount(queryWrapper);
|
|
|
+ return integer;
|
|
|
+ }
|
|
|
+
|
|
|
public void updateStatusById(RegistrationDto dto) {
|
|
|
mapper.updateStatusById(dto.getId(), dto.getType());
|
|
|
}
|
|
@@ -154,21 +161,41 @@ public class RegistrationService extends ServiceImpl<InterRegistrationMapper, Re
|
|
|
OfficeDTO officeDTO = new OfficeDTO();
|
|
|
officeDTO.setId(report.getPracticeOffice());
|
|
|
dto.setOfficeDTO(officeDTO);
|
|
|
+
|
|
|
+ OfficeDTO office = SpringUtil.getBean(IOfficeApi.class).getOfficeById(report.getPracticeOffice());
|
|
|
// 获取实习生角色id
|
|
|
- RoleDTO roleInfo = SpringUtil.getBean(IRoleApi.class).getRoleDTOByName("实习生");
|
|
|
+ RoleDTO roleInfo = SpringUtil.getBean(IRoleApi.class).getRoleDTOByNameAndTenantId("实习生",office.getTenantId());
|
|
|
List <RoleDTO> roleIdList = new ArrayList<>();
|
|
|
roleIdList.add(roleInfo);
|
|
|
dto.setRoleDTOList(roleIdList);
|
|
|
- SpringUtil.getBean ( IUserApi.class ).saveOrUpdate(dto);
|
|
|
+
|
|
|
+
|
|
|
//发送短信通知
|
|
|
String officeName = "";
|
|
|
- OfficeDTO office = SpringUtil.getBean(IOfficeApi.class).getOfficeById(report.getPracticeOffice());
|
|
|
- if (office.getTenantId().equals("10003")){
|
|
|
- officeName = "兴光会计";
|
|
|
- }else if (office.getTenantId().equals("10004")) {
|
|
|
- officeName = "中审";
|
|
|
+ if (null != office) {
|
|
|
+ TenantDTO tenantDTO = new TenantDTO();
|
|
|
+ tenantDTO.setId(office.getTenantId());
|
|
|
+ dto.setTenantDTO(tenantDTO);
|
|
|
+ if (office.getTenantId().equals("10003")){
|
|
|
+ officeName = "兴光会计";
|
|
|
+ }else if (office.getTenantId().equals("10004")) {
|
|
|
+ officeName = "中审";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ TenantDTO tenantDTO = new TenantDTO();
|
|
|
+ tenantDTO.setId("10002");
|
|
|
+ dto.setTenantDTO(tenantDTO);
|
|
|
+ officeName = "综合管理公司";
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ SpringUtil.getBean ( IUserApi.class ).saveOrUpdate(dto);
|
|
|
+
|
|
|
+
|
|
|
+// OfficeDTO office = SpringUtil.getBean(IOfficeApi.class).getOfficeById(report.getPracticeOffice());
|
|
|
+
|
|
|
+
|
|
|
String randomCode = report.getName() + "你好!你好!欢迎来" + officeName + "实习,实习期间请及时在公司系统:" + "www.baidu.com"
|
|
|
+ "中填写实习日志,系统初始账号密码为,系统初始账号密码为:" + report.getName() +
|
|
|
"/123456,请尽快登陆系统并修改初始密码!";
|