Commit 4604a0f6 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.0' into MVP1.7.0

parents d9933fb7 7ab6cff6
......@@ -567,4 +567,9 @@ public class TEmployeeInfo extends BaseEntity {
*/
@TableField(exist = false)
private List<TEmpOtherFile> otherFiles;
// 档案编辑的其他附件之外的附件,例如:身份证正反面,户口本2页、员工声明、员工确认
@TableField(exist = false)
private List<TAttaInfo> attaList;
}
......@@ -31,6 +31,7 @@ import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import java.util.List;
/**
* 预入职-主表
......@@ -238,6 +239,12 @@ public class TPreEmpMain extends BaseEntity {
@Schema(description = "员工申明表ID,新申明要加一条新数据,关联这个主表")
private String declarationId;
// 数据来源 默认0: '扫码进入', 1: 'PC批量导入'
@ExcelAttribute(name = "数据来源", maxLength = 32)
@ExcelProperty("数据来源")
@Schema(description = "数据来源")
private String sourType;
@Schema(description = "状态多个")
@TableField(exist = false)
private String[] statusArray;
......@@ -266,4 +273,20 @@ public class TPreEmpMain extends BaseEntity {
@TableField(exist = false)
private String ids;
// 导入预入职使用
@TableField(exist = false)
private String firstWorkFlag;
@TableField(exist = false)
private String haveQualification;
/**
* 其他附件
*/
@TableField(exist = false)
private List<TPreEmpOtherFile> otherFiles;
// 档案编辑的其他附件之外的附件,例如:身份证正反面,户口本2页、员工声明、员工确认
@TableField(exist = false)
private List<TAttaInfo> attaList;
}
......@@ -100,4 +100,11 @@ public class TPreEmpOtherFile {
**/
@TableField(exist = false)
private List<TAttaInfo> attaList;
/**
* 档案编辑其他附件分租信息处理类型 0 新增 1 更新 2 删除 3 不变
*/
@TableField(exist = false)
private String handleType;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
/**
* C端登录处查系统用户数据
* @author chenyuxi
* @date 2024/10/15
* @since mvp1.7.0
*/
@Data
public class EmpMainToCVo implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "预入职审核状态(0草稿;1待完善;2待审核;3审核不通过;4审核通过;5初始未保存)")
private String preStatus;
@Schema(description = "员工姓名")
private String empName;
@Schema(description = "身份证号")
private String empIdcard;
@Schema(description = "手机号码")
private String empPhone;
@Schema(description = "来源(0:在档,1:预入职,2:不在系统)")
private String empFrom;
}
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import lombok.Getter;
import lombok.Setter;
/**
* @author hgw
* @description 预入职导入入参
* @date 2024-10-12 11:16:17
*/
@Getter
@Setter
public class PreUploadImportParamVo {
// 结算主体;必填
String deptId;
// sheetName;必填
String sheetName;
}
......@@ -105,6 +105,12 @@
<artifactId>javase</artifactId>
<version>3.5.1</version>
</dependency>
<!-- 读取excel -->
<dependency>
<groupId>com.monitorjbl</groupId>
<artifactId>xlsx-streamer</artifactId>
<version>2.2.0</version>
</dependency>
<!-- 二维码生成JAR结束 -->
</dependencies>
......
......@@ -21,9 +21,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain;
import com.yifu.cloud.plus.v1.yifu.archives.service.TPreEmpMainService;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
......@@ -126,6 +125,7 @@ public class TPreEmpMainController {
/**
* 预入职批量完善信息
*
* @author hgw
* @date 2024-6-21 15:25:20
**/
......@@ -152,6 +152,7 @@ public class TPreEmpMainController {
/**
* 预入职批量审核
*
* @author hgw
* @date 2024-6-24 12:00:53
**/
......@@ -241,6 +242,7 @@ public class TPreEmpMainController {
**/
@Operation(summary = "导出预入职-全量", description = "导出预入职-全量 hasPermission('archives_tpreempmain-export-all')")
@PostMapping("/exportAll")
@SysLog("导出预入职-全量")
//@PreAuthorize("@pms.hasPermission('archives_tpreempmain-export-all')")
public void exportAll(HttpServletResponse response, @RequestBody TPreEmpMainSearchVo searchVo) {
YifuUser user = SecurityUtils.getUser();
......@@ -248,4 +250,76 @@ public class TPreEmpMainController {
tPreEmpMainService.exportAll(response, searchVo);
}
/**
* @param file
* @Description: 预入职批量导入
* @Author: hgw
* @Date: 2024/10/12 9:24
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryUploadParamVo>
**/
@SysLog("预入职批量导入")
@Operation(description = "预入职批量导入")
@PostMapping("/uploadPreEmp")
public R<List<PreUploadEmpImportVo>> uploadPreEmp(MultipartFile file, PreUploadImportParamVo vo) throws Exception {
return tPreEmpMainService.uploadPreEmp(file, vo);
}
/**
* 根据身份证与姓名查询用户手机号和来源
*
* @param empIdCard 身份证
* @param empName 姓名
* @return R<EmpMainToCVo>
*
* @author chenyuxi
* @date 2024-10-24 16:01:47
* @since mvp1.7.0
*
**/
@Operation(summary = "根据身份证与姓名查询用户手机号和来源", description = "根据身份证与姓名查询用户手机号和来源")
@GetMapping("/getPhoneByCardAndName")
public R<EmpMainToCVo> getPhoneByCardAndName(@Param("empIdCard") String empIdCard, @Param("empName") String empName) {
return tPreEmpMainService.getPhoneByCardAndName(empIdCard, empName);
}
/**
* 发送手机验证码
*
* @param empPhone 手机号
* @return R<String>
*
* @author chenyuxi
* @date 2024-10-24 16:01:47
* @since mvp1.7.0
*/
@PostMapping("/sendCode")
public R<String> sendCode(@Param("empPhone") String empPhone) {
if (Common.isEmpty(empPhone)) {
return R.failed("手机号不能为空");
}
return tPreEmpMainService.sendCode(empPhone);
}
/**
* 校验手机验证码
*
* @param empPhone 手机号
* @param verifyCode 验证码
* @return R<String>
*
* @author chenyuxi
* @date 2024-10-24 16:01:47
* @since mvp1.7.0
*/
@PostMapping("/checkCode")
public R<String> checkCode(@Param("empPhone") String empPhone,@Param("verifyCode") String verifyCode) {
if (Common.isEmpty(empPhone)) {
return R.failed("手机号不能为空");
}
if (Common.isEmpty(verifyCode)) {
return R.failed("验证码不能为空");
}
return tPreEmpMainService.checkCode(empPhone, verifyCode);
}
}
......@@ -51,6 +51,8 @@ public interface TEmployeeInfoMapper extends BaseMapper<TEmployeeInfo> {
// hgw 2022-6-22 15:32:39 根据身份证查询一批档案
List<TEmployeeInfo> getListByIdCard(@Param("idCardList") List<String> idCardList);
List<TEmployeeInfo> getListByIdCardList(@Param("idCardList") List<String> idCardList);
// hgw 2022-6-22 15:32:39 根据手机号查询一批档案
List<TEmployeeInfo> getListByPhone(@Param("phoneList") List<String> phoneList);
......
......@@ -65,6 +65,9 @@ public interface TPreEmpMainMapper extends BaseMapper<TPreEmpMain> {
TPreEmpMain getTPreEmpMainByCardAndDept(@Param("empIdCard") String empIdCard, @Param("deptId") String deptId);
/* 导入预入职时,查询所有身份证的预入职使用的,查出来删除附属信息 */
List<String> getTPreEmpMainListByCardAndDept(@Param("empIdCardList") List<String> empIdCardList, @Param("deptId") String deptId);
TPreEmpMain getTPreEmpMainByCardAndDeptNo(@Param("empIdCard") String empIdCard, @Param("deptNo") String deptNo);
// 以下都是清空临时表的数据
......@@ -75,5 +78,19 @@ public interface TPreEmpMainMapper extends BaseMapper<TPreEmpMain> {
void deleteFamilyByMainId(@Param("preMainId") String preMainId);
void deleteEmployeeByMainId(@Param("preMainId") String preMainId);
void deleteProjectByMainId(@Param("preMainId") String preMainId);
// 以下都是清空临时表的数据
void deleteBadByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteContactByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteDisabilityByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteEducationByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteFamilyByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteEmployeeByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteProjectByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteWorkRecordingByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteProfessionalByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteOtherFileByMainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deleteAttaByDomainIdList(@Param("preMainIdList") List<String> preMainIdList);
void deletePreMainIdList(@Param("preMainIdList") List<String> preMainIdList);
}
......@@ -260,4 +260,8 @@ public interface TEmployeeInfoService extends IService<TEmployeeInfo> {
R<TEmployeeInfo> getByIdAssociate(String id);
void exportEmployeeFile(String id, HttpServletResponse response) throws Exception;
// 预入职批量导入使用
List<TEmployeeInfo> getListByIdCardList(List<String> idList);
}
......@@ -272,4 +272,14 @@ public interface TEmployeeProjectService extends IService<TEmployeeProject> {
void updateContractStatus(String empId, String deptId, int status);
void updatePostByEmpDeptNo(String deptNo, String post, String empIdcard);
/**
* @param deptId 项目id
* @Description: 获取项目下的未删除的在项的人员
* @Author: hgw
* @Date: 2024/10/14 16:28
* @return: java.util.Map<java.lang.String, com.yifu.cloud.plus.v1.yifu.archives.entity.TEmployeeProject>
**/
Map<String, TEmployeeProject> getMapByDeptIdAndDelete(String deptId);
}
......@@ -21,11 +21,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpMain;
import com.yifu.cloud.plus.v1.yifu.archives.vo.ErrorVO;
import com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TPreEmpMainSearchVo;
import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
......@@ -64,8 +63,10 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
// 单个完善信息
R<String> doImproveInformation(PreEmpMainDetailVo vo);
// 草稿
R<String> saveDraftPreEmpMain(PreEmpMainDetailVo vo);
// 保存
R<String> savePreEmpMain(PreEmpMainDetailVo vo);
......@@ -74,6 +75,7 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
// 导出
void listExport(HttpServletResponse response, TPreEmpMainSearchVo searchVo);
// 导出全量
void exportAll(HttpServletResponse response, TPreEmpMainSearchVo searchVo);
......@@ -85,4 +87,48 @@ public interface TPreEmpMainService extends IService<TPreEmpMain> {
// 批量审核
R<List<ErrorVO>> doBatchAudit(List<String> ids, String status, String auditRemark);
/**
* @Description: 预入职批量导入
* @Author: hgw
* @Date: 2024/10/12 9:27
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.vo.PreEmpMainDetailVo>>
**/
R<List<PreUploadEmpImportVo>> uploadPreEmp(MultipartFile file, PreUploadImportParamVo vo) throws Exception;
/**
* 根据身份证与姓名查询用户手机号和来源
* @param empIdCard 身份证
* @param empName 姓名
* @author chenyuxi
* @date 2024-10-24 16:01:47
* @since mvp1.7.0
* @return EmpMainToCVo
**/
R<EmpMainToCVo> getPhoneByCardAndName(String empIdCard, String empName);
/**
* 发送手机验证码
*
* @param empPhone 手机号
* @return R<String>
*
* @author chenyuxi
* @date 2024-10-24 16:01:47
* @since mvp1.7.0
*/
R<String> sendCode(String empPhone);
/**
* 校验手机验证码
*
* @param empPhone 手机号
* @param verifyCode 验证码
* @return R<String>
*
* @author chenyuxi
* @date 2024-10-24 16:01:47
* @since mvp1.7.0
*/
R<String> checkCode(String empPhone, String verifyCode);
}
......@@ -249,7 +249,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
TEmpEducation education = new TEmpEducation();
this.doUpdateEducationCore(education, employeeInfo);
// 更新附件信息 fxj 2024-09-09
// 更新其他附件信息 fxj 2024-09-09
if (updateOtherAtta(employeeInfo)){
// 获取最新附件信息 fxj 2024-09-09
getAttaInfo(employeeInfo);
......@@ -257,8 +257,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
old.setOtherFiles(null);
employeeInfo.setOtherFiles(null);
}
// 更新附件信息 hgw 2024-10-15
if (updateAtta(employeeInfo)){
// 获取最新附件信息
getEmpAttaInfo(employeeInfo);
} else{
old.setAttaList(null);
employeeInfo.setAttaList(null);
}
// 记录变更日志
tEmployeeLogService.saveModificationRecord(CommonConstants.dingleDigitIntArray[0], old.getId(), "", old, employeeInfo);
return R.ok(this.updateById(employeeInfo));
......@@ -304,6 +310,33 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return flag;
}
// 仿写房工更新附件
private boolean updateAtta(TEmployeeInfo employeeInfo) {
List<TAttaInfo> attaInfos = employeeInfo.getAttaList();
boolean flag = false;
if (Common.isNotNull(attaInfos)){
List<String> deleteIds = new ArrayList<>();
List<TAttaInfo> adds = new ArrayList<>();
for (TAttaInfo attaInfo : attaInfos){
if (CommonConstants.ZERO_STRING.equals(attaInfo.getHandleType())){
adds.add(attaInfo);
}
if (CommonConstants.TWO_STRING.equals(attaInfo.getHandleType())){
deleteIds.add(attaInfo.getId());
}
}
if (Common.isNotNull(deleteIds)){
attaInfoService.removeBatchByIds(deleteIds);
flag =true;
}
if (Common.isNotNull(adds)){
attaInfoService.updateBatchById(adds);
flag =true;
}
}
return flag;
}
private boolean handleOtherFile(TEmpOtherFile otherFile) {
boolean flag =false;
// 新增时先增加 empOtherFile
......@@ -364,6 +397,21 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
emp.setOtherFiles(otherFiles);
}
// 仿写房工附件接口
private void getEmpAttaInfo(TEmployeeInfo emp) {
List<TAttaInfo> attaInfos = attaInfoService.list(Wrappers.<TAttaInfo>query().lambda().eq(TAttaInfo::getDomainId, emp.getId()));
if (Common.isNotNull(attaInfos)){
URL url;
for (TAttaInfo atta:attaInfos){
url = ossUtil.getObjectUrl(null, atta.getAttaSrc());
if (Common.isNotNull(url)){
atta.setAttaUrl(url.toString());
}
}
}
emp.setAttaList(attaInfos);
}
@Override
public R<String> deleteEmployee(String id) {
TEmployeeInfo employee = this.getById(id);
......@@ -2830,6 +2878,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
getAttaInfo(employeeInfo);
getEmpAttaInfo(employeeInfo);
return R.ok(employeeInfo);
}
/**
......@@ -2951,4 +3000,11 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
return fileAtta.getAttaName();
}
}
@Override
public List<TEmployeeInfo> getListByIdCardList(List<String> idList) {
return baseMapper.getListByIdCardList(idList);
}
}
......@@ -1924,4 +1924,22 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
audit.setCreateName(tEmployeeContractInfo.getAuditUserName());
tEmployeeContractAuditService.save(audit);
}
@Override
public Map<String, TEmployeeProject> getMapByDeptIdAndDelete(String deptId) {
Map<String, TEmployeeProject> proMap = new HashMap<>();
if (Common.isNotNull(deptId)) {
List<TEmployeeProject> projectList = this.list(Wrappers.<TEmployeeProject>query().lambda()
.eq(TEmployeeProject::getDeptId, deptId)
.ne(TEmployeeProject::getProjectStatus, CommonConstants.ONE_INT)
.eq(TEmployeeProject::getDeleteFlag, CommonConstants.ZERO_STRING));
if (projectList != null && !projectList.isEmpty()) {
for (TEmployeeProject pro : projectList) {
proMap.put(pro.getEmpIdcard(), pro);
}
}
}
return proMap;
}
}
......@@ -202,9 +202,9 @@
if(sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) > 0,1,0) as IS_COMPLETE,
sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)) as INCOMPLETE_NUM,
concat(ROUND((sum(if(PROJECT_STATUS = 0,1,0)) - sum(if((PROJECT_STATUS = 0 and IS_COMPLETE = '0') or PROJECT_STATUS = 1,0,1)))*100/sum(if(PROJECT_STATUS = 0,1,0)),2),'%') as COMPLETE_PER,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-09-01',1,0)) as AFTER_EMPLOYMENT,
if(sum(if((PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-09-01' and IS_COMPLETE = '0') or '2024-09-01' > DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') or PROJECT_STATUS = 1,0,1)) > 0,1,0) AFTER_IS_COMPLETE,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-09-01' and IS_COMPLETE = '1',1,0)) as AFTER_INCOMPLETE_NUM
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-07-01',1,0)) as AFTER_EMPLOYMENT,
if(sum(if((PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-07-01' and IS_COMPLETE = '0') or '2024-07-01' > DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') or PROJECT_STATUS = 1,0,1)) > 0,1,0) AFTER_IS_COMPLETE,
sum(if(PROJECT_STATUS = 0 and DATE_FORMAT(CREATE_TIME,'%Y-%m-%d') >= '2024-07-01' and IS_COMPLETE = '1',1,0)) as AFTER_INCOMPLETE_NUM
from t_employee_project where DELETE_FLAG = '0' and PROJECT_STATUS = 0 group by DEPT_NO) a on a.DEPT_NO = b.DEPART_NO
where b.DELETE_FLAG = '0'
<if test="deptNo != null and deptNo.trim() != ''">
......
......@@ -764,6 +764,17 @@
</foreach>
</select>
<select id="getListByIdCardList" resultMap="tEmployeeInfoMap">
select
<include refid="baseParam"/>
from t_employee_info a
where
a.DELETE_FLAG = '0' and a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<!-- hgw 根据手机号查询 -->
<select id="getListByPhone" resultMap="tEmployeeInfoMap">
select
......
......@@ -52,6 +52,7 @@
<result property="updateTime" column="UPDATE_TIME"/>
<result property="settleDomain" column="SETTLE_DOMAIN"/>
<result property="declarationId" column="DECLARATION_ID"/>
<result property="sourType" column="SOUR_TYPE"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
......@@ -81,7 +82,8 @@
a.CREATE_TIME,
a.UPDATE_TIME,
a.SETTLE_DOMAIN,
a.DECLARATION_ID
a.DECLARATION_ID,
a.SOUR_TYPE
</sql>
<sql id="tPreEmpMain_where">
<if test="tPreEmpMain != null">
......@@ -514,6 +516,17 @@
limit 1
</select>
<!-- 导入预入职时,查询所有身份证的预入职使用的,查出来删除附属信息 -->
<select id="getTPreEmpMainListByCardAndDept" resultType="java.lang.String">
SELECT
a.ID
FROM t_pre_emp_main a
where a.DEPT_ID = #{deptId} AND a.EMP_IDCARD in
<foreach collection="empIdCardList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</select>
<!--tPreEmpMain简单分页查询-->
<select id="getTPreEmpMainByCardAndDeptNo" resultMap="tPreEmpMainMap">
SELECT
......@@ -544,5 +557,80 @@
<delete id="deleteProjectByMainId">
delete from t_pre_employee_project where PRE_MAIN_ID = #{preMainId}
</delete>
<delete id="deleteBadByMainIdList">
delete from t_pre_emp_bad_record where PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteContactByMainIdList">
delete from t_pre_emp_contact_info where PRE_MAIN_ID = in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteDisabilityByMainIdList">
delete from t_pre_emp_disability_info where PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteEducationByMainIdList">
delete from t_pre_emp_education where PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteFamilyByMainIdList">
delete from t_pre_emp_family where PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteEmployeeByMainIdList">
delete from t_pre_employee_info where PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteProjectByMainIdList">
delete from t_pre_employee_project where PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteWorkRecordingByMainIdList">
delete from t_pre_emp_work_recording where PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteProfessionalByMainIdList">
delete from t_pre_emp_professional_qualification where PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteOtherFileByMainIdList">
delete from t_pre_emp_other_file where PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deleteAttaByDomainIdList">
delete from t_atta_info where domain_id in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<delete id="deletePreMainIdList">
delete from t_pre_emp_main where id in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
</mapper>
......@@ -2,8 +2,10 @@ package com.yifu.cloud.plus.v1.check.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.check.entity.TCheckBankNo;
import com.yifu.cloud.plus.v1.check.entity.TCheckIdCard;
import com.yifu.cloud.plus.v1.check.service.TCheckIdCardService;
import com.yifu.cloud.plus.v1.check.vo.CheckBatchVo;
import com.yifu.cloud.plus.v1.check.vo.CheckIdCardListVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
......@@ -19,6 +21,7 @@ import javax.validation.Valid;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
/**
......@@ -176,7 +179,21 @@ public class TCheckIdCardController {
@SysLog("校验薪资姓名身份证")
@PostMapping("/checkSalaryIdCard")
public R<List<TCheckIdCard>> checkSalaryIdCard(@RequestBody List<TCheckIdCard> checkList) {
return tCheckIdCardService.checkSalaryIdCard(checkList);
return tCheckIdCardService.checkSalaryIdCard(checkList, null);
}
/**
* @Description: 预入职导入使用的批量姓名身份证校验
* @Author: hgw
* @Date: 2024-10-15 11:54:47
* @return: com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo
**/
@Operation(description = "预入职导入使用的批量姓名身份证校验")
@SysLog("预入职导入使用的批量姓名身份证校验" )
@Inner
@PostMapping("/inner/checkIdCardBatch" )
public CheckBatchVo checkIdCardBatch(@RequestBody List<TCheckIdCard> list){
return tCheckIdCardService.checkIdCardBatch(list);
}
/**
......@@ -204,7 +221,7 @@ public class TCheckIdCardController {
@PostMapping("/inner/checkIdCardList")
public CheckIdCardListVo checkIdCardList(@RequestBody CheckIdCardListVo vo) {
CheckIdCardListVo returnVo = new CheckIdCardListVo();
R<List<TCheckIdCard>> checkR = tCheckIdCardService.checkSalaryIdCard(vo.getCheckList());
R<List<TCheckIdCard>> checkR = tCheckIdCardService.checkSalaryIdCard(vo.getCheckList(), null);
if (checkR != null) {
if (checkR.getCode() == CommonConstants.SUCCESS) {
returnVo.setCode(CommonConstants.SUCCESS);
......
......@@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.check.entity.TCheckIdCard;
import com.yifu.cloud.plus.v1.check.vo.CheckBatchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import java.util.List;
import java.util.Map;
......@@ -47,7 +49,17 @@ public interface TCheckIdCardService extends IService<TCheckIdCard> {
TCheckIdCard checkIdCardSingle(TCheckIdCard tCheckIdCard);
R<List<TCheckIdCard>> checkSalaryIdCard(List<TCheckIdCard> checkList);
R<List<TCheckIdCard>> checkSalaryIdCard(List<TCheckIdCard> checkList, YifuUser user);
/**
* @param list
* @Description: 预入职导入使用的批量姓名身份证校验
* @Author: hgw
* @Date: 2024/10/15 11:36
* @return: com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
**/
CheckBatchVo checkIdCardBatch(List<TCheckIdCard> list);
/**
* @Description: C端预入职校验
* @Author: hgw
......
......@@ -8,20 +8,21 @@ import com.yifu.cloud.plus.v1.check.entity.*;
import com.yifu.cloud.plus.v1.check.mapper.TCheckIdCardMapper;
import com.yifu.cloud.plus.v1.check.service.*;
import com.yifu.cloud.plus.v1.check.utils.ChecksUtil;
import com.yifu.cloud.plus.v1.check.vo.CheckBatchVo;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import lombok.AllArgsConstructor;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -430,13 +431,15 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
}
@Override
public R<List<TCheckIdCard>> checkSalaryIdCard(List<TCheckIdCard> checkList) {
public R<List<TCheckIdCard>> checkSalaryIdCard(List<TCheckIdCard> checkList, YifuUser user) {
TCanCheck tCanCheck= canCheckService.getById(1);
boolean canCheck = false;
if (tCanCheck != null && tCanCheck.getCanCheck() == 1) {
canCheck = true;
}
YifuUser user = SecurityUtils.getUser();
if (user == null) {
user = SecurityUtils.getUser();
}
if (user == null || Common.isEmpty(user.getId())) {
return R.failed("请登录!");
}
......@@ -574,6 +577,45 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
return R.failed("数据为空!");
}
/**
* @Description: 预入职导入使用的批量姓名身份证校验
* @Author: hgw
* @Date: 2024/10/15 11:54
* @return: com.yifu.cloud.plus.v1.check.vo.CheckBatchVo
**/
@Override
public CheckBatchVo checkIdCardBatch(List<TCheckIdCard> list) {
CheckBatchVo vo = new CheckBatchVo();
Map<String, Boolean> checkMap = new HashMap<>();
if (list != null && !list.isEmpty()) {
Set<String> dbAuthsSet = new HashSet<>();
Collection<? extends GrantedAuthority> authorities = AuthorityUtils
.createAuthorityList(dbAuthsSet.toArray(new String[0]));
YifuUser user = new YifuUser(list.get(0).getCreateUser(), 1L, "", list.get(0).getReason(),
list.get(0).getReason(), "0", SecurityConstants.BCRYPT + "123456",
"12345678911", true, true, true,
true,
"1", authorities, "1",
null, null,
null);
// 调用以前的批量校验
R<List<TCheckIdCard>> returnR = this.checkSalaryIdCard(list, user);
if (returnR != null) {
if (returnR.getCode() == CommonConstants.SUCCESS) {
checkMap.put("全部正确", true);
} else if (returnR.getData() != null) {
for (TCheckIdCard c : returnR.getData()) {
checkMap.put(c.getIdCard()+CommonConstants.DOWN_LINE_STRING+c.getName(), Common.isNotNull(c.getIsTrue()) && c.getIsTrue() == 1);
}
} else {
checkMap.put("全部错误", false);
}
}
}
vo.setCheckMap(checkMap);
return vo;
}
/**
* @Description: 多线程调用api,每次调用前查询一下数据库:
* @Author: hgw
......
......@@ -183,4 +183,9 @@ public interface CacheConstants {
* 登录用户最近一次选择的收入证明单位名称
*/
public static final String WXHR_LAST_SELECT_COMPANY_NAME = "wxhr_last_select_company_name";
/**
* C端发验证码前缀
*/
public static final String MVP_TOC_PHONE_CODE_PREFIX = "MVP_TOC_PHONE_CODE_";
}
......@@ -301,6 +301,31 @@ public class DateUtil {
}
}
/**
* @Description: 格式化字符串日期
* @Author: hgw
* @Date: 2024/10/14 21:08
* @return: java.util.Date
**/
public static Date stringDateFormat(String dateText, String format) {
if (dateText == null) {
return null;
}
try {
// 兼容多格式,格式化为没有分隔符的格式:
if (format == null || (format.length() != 4 && format.length() != 6)) {
format = ISO_DATE_FORMAT;
}
DateFormat df = new SimpleDateFormat(format);
df.setLenient(false);
return df.parse( dateText.replace("/","").replace("-","")
.replace(CommonConstants.YEAR,"").replace(CommonConstants.MONTH,"")
.replace(CommonConstants.DAY,""));
} catch (ParseException e) {
return null;
}
}
/**
* @return Timestamp
*/
......
package com.yifu.cloud.plus.v1.yifu.salary.vo;
import lombok.Data;
import java.util.Map;
/**
* @Description: 开户行名称合理性map
* @Author: hgw
* @Date: 2024/10/15 9:28
* @return:
**/
@Data
public class TBankNameMapVo {
private Map<String, String> bankMap;
}
......@@ -24,8 +24,10 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import com.yifu.cloud.plus.v1.yifu.salary.entity.TBankSet;
import com.yifu.cloud.plus.v1.yifu.salary.service.TBankSetService;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TBankNameMapVo;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TBankSetSearchVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
......@@ -80,6 +82,22 @@ public class TBankSetController {
return new R<>(tBankSetService.getTBankSetIdNameList(tBankSet));
}
/**
* @Description: 获取开户行
* @Author: hgw
* @Date: 2024/10/15 9:32
* @return: com.yifu.cloud.plus.v1.yifu.salary.vo.TBankNameMapVo
**/
@Operation(description = "获取开户行")
@SysLog("获取开户行")
@Inner
@PostMapping("/inner/getBankMap")
public TBankNameMapVo getBankMap() {
TBankNameMapVo vo = new TBankNameMapVo();
vo.setBankMap(tBankSetService.getBankMap(null));
return vo;
}
/**
* 不分页查询
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment