Commit 23c778f2 authored by hongguangwu's avatar hongguangwu

MVP1.7.0 优化

parent e4678d1e
......@@ -16,9 +16,10 @@
*/
package com.yifu.cloud.plus.v1.yifu.archives.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import lombok.Data;
/**
......@@ -35,142 +36,150 @@ public class TPreMainExportAllVO {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "提交时间")
@ExcelAttribute(name = "提交时间")
private String field2;
@ExcelProperty(value = "状态")
@ExcelAttribute(name = "状态")
private String field1;
@ExcelProperty(value = "审核人")
@ExcelAttribute(name = "审核人")
private String field64;
@ExcelProperty(value = "审核通过时间")
@ExcelAttribute(name = "审核通过时间")
private String field65;
@ExcelProperty(value = "员工主码")
@ExcelAttribute(name = "员工主码")
private String field3;
@ExcelProperty(value = "员工类型")
@ExcelAttribute(name = "员工类型", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATRUE)
private String field4;
@ExcelProperty(value = "员工姓名")
@ExcelAttribute(name = "员工姓名")
private String field5;
@ExcelProperty(value = "身份证号")
@ExcelAttribute(name = "身份证号")
private String field6;
@ExcelProperty(value = "性别")
@ExcelAttribute(name = "性别")
private String field7;
@ExcelProperty(value = "身份证期限")
@ExcelAttribute(name = "身份证期限")
private String field8;
@ExcelProperty(value = "身份证开始日期")
@ExcelAttribute(name = "身份证开始日期")
private String field9;
@ExcelProperty(value = "身份证截止日期")
@ExcelAttribute(name = "身份证截止日期")
private String field10;
@ExcelProperty(value = "出生日期")
@ExcelAttribute(name = "出生日期")
private String field11;
@ExcelProperty(value = "年龄")
@ExcelAttribute(name = "年龄")
private String field12;
@ExcelProperty(value = "婚姻状况")
@ExcelAttribute(name = "婚姻状况", isDataId = true, dataType = ExcelAttributeConstants.EMP_MARRIED)
private String field13;
@ExcelProperty(value = "民族")
@ExcelAttribute(name = "民族", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATIONAL)
private String field14;
@ExcelProperty(value = "政治面貌")
@ExcelAttribute(name = "政治面貌", isDataId = true, dataType = ExcelAttributeConstants.EMP_POLITICAL)
private String field15;
@ExcelProperty(value = "手机号码")
@ExcelAttribute(name = "手机号码")
private String field16;
@ExcelProperty(value = "邮箱")
@ExcelAttribute(name = "邮箱")
private String field17;
@ExcelProperty(value = "户籍所在地")
@ExcelAttribute(name = "户籍所在地-省", isArea = true)
private String field18;
@ExcelProperty(value = "户口性质")
@ExcelAttribute(name = "户籍所在地-市", isArea = true, parentField = "field18")
private String field69;
@ExcelAttribute(name = "户籍所在地-区/县", isArea = true, parentField = "field69")
private String field70;
@ExcelAttribute(name = "户口性质", isDataId = true, dataType = ExcelAttributeConstants.EMP_REGISTYPE)
private String field19;
@ExcelProperty(value = "档案所在地")
@ExcelAttribute(name = "档案所在地-省", isArea = true)
private String field20;
@ExcelProperty(value = "档案状态")
@ExcelAttribute(name = "档案所在地-市", isArea = true, parentField = "field20")
private String field71;
@ExcelAttribute(name = "档案所在地-区/县", isArea = true, parentField = "field71")
private String field72;
@ExcelAttribute(name = "档案状态")
private String field21;
@ExcelProperty(value = "通信地址-省")
@ExcelAttribute(name = "通信地址-省", isArea = true)
private String field66;
@ExcelProperty(value = "通信地址-市")
@ExcelAttribute(name = "通信地址-市", isArea = true, parentField = "field66")
private String field67;
@ExcelProperty(value = "通信地址-区/县")
@ExcelAttribute(name = "通信地址-区/县", isArea = true, parentField = "field67")
private String field68;
@ExcelProperty(value = "通信地址-详细地址")
@ExcelAttribute(name = "通信地址-详细地址")
private String field22;
@ExcelProperty(value = "客户名称")
@ExcelAttribute(name = "客户名称")
private String field23;
@ExcelProperty(value = "项目名称")
@ExcelAttribute(name = "项目名称")
private String field24;
@ExcelProperty(value = "业务类型")
@ExcelAttribute(name = "业务类型")
private String field25;
@ExcelProperty(value = "合同类型")
@ExcelAttribute(name = "合同类型", isDataId = true, dataType = ExcelAttributeConstants.PERSONNEL_TYPE)
private String field26;
@ExcelProperty(value = "工时制")
@ExcelAttribute(name = "工时制", isDataId = true, dataType = ExcelAttributeConstants.WORKING_HOURS)
private String field27;
@ExcelProperty(value = "就职岗位")
@ExcelAttribute(name = "就职岗位")
private String field28;
@ExcelProperty(value = "入职日期")
@ExcelAttribute(name = "入职日期")
private String field29;
@ExcelProperty(value = "试用期")
@ExcelAttribute(name = "试用期")
private String field30;
@ExcelProperty(value = "标签")
@ExcelAttribute(name = "标签")
private String field31;
@ExcelProperty(value = "姓名")
@ExcelAttribute(name = "姓名")
private String field32;
@ExcelProperty(value = "与本人关系")
@ExcelAttribute(name = "与本人关系")
private String field33;
@ExcelProperty(value = "联系地址")
@ExcelAttribute(name = "联系地址")
private String field34;
@ExcelProperty(value = "联系电话")
@ExcelAttribute(name = "联系电话")
private String field35;
@ExcelProperty(value = "学校")
@ExcelAttribute(name = "学校")
private String field36;
@ExcelProperty(value = "专业")
@ExcelAttribute(name = "专业")
private String field37;
@ExcelProperty(value = "学历")
@ExcelAttribute(name = "学历")
private String field38;
@ExcelProperty(value = "是否大专及以上")
@ExcelAttribute(name = "是否大专及以上")
private String field39;
@ExcelProperty(value = "最高学历")
@ExcelAttribute(name = "最高学历", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION)
private String field40;
@ExcelProperty(value = "入学时间")
@ExcelAttribute(name = "入学时间")
private String field41;
@ExcelProperty(value = "毕业时间")
@ExcelAttribute(name = "毕业时间")
private String field42;
@ExcelProperty(value = "是否为首份工作")
@ExcelAttribute(name = "是否为首份工作")
private String field43;
@ExcelProperty(value = "工作单位")
@ExcelAttribute(name = "工作单位")
private String field44;
@ExcelProperty(value = "工作岗位")
@ExcelAttribute(name = "工作岗位")
private String field45;
@ExcelProperty(value = "开始工作日期")
@ExcelAttribute(name = "开始工作日期")
private String field46;
@ExcelProperty(value = "结束工作日期")
@ExcelAttribute(name = "结束工作日期")
private String field47;
@ExcelProperty(value = "成员姓名")
@ExcelAttribute(name = "成员姓名")
private String field48;
@ExcelProperty(value = "与本人关系")
@ExcelAttribute(name = "与本人关系")
private String field49;
@ExcelProperty(value = "手机号码")
@ExcelAttribute(name = "手机号码")
private String field50;
@ExcelProperty(value = "是否有职业资格证书")
@ExcelAttribute(name = "是否有职业资格证书")
private String field51;
@ExcelProperty(value = "申报年度")
@ExcelAttribute(name = "申报年度")
private String field52;
@ExcelProperty(value = "职业资格名称")
@ExcelAttribute(name = "职业资格名称")
private String field53;
@ExcelProperty(value = "是否曾被认定为工伤")
@ExcelAttribute(name = "是否曾被认定为工伤")
private String field54;
@ExcelProperty(value = "是否有职业病")
@ExcelAttribute(name = "是否有职业病")
private String field55;
@ExcelProperty(value = "职业病名称")
@ExcelAttribute(name = "职业病名称")
private String field56;
@ExcelProperty(value = "是否有传染性疾病")
@ExcelAttribute(name = "是否有传染性疾病")
private String field57;
@ExcelProperty(value = "传染病名称")
@ExcelAttribute(name = "传染病名称")
private String field58;
@ExcelProperty(value = "是否持有残疾人证明")
@ExcelAttribute(name = "是否持有残疾人证明")
private String field59;
@ExcelProperty(value = "伤残病名称")
@ExcelAttribute(name = "伤残病名称")
private String field60;
@ExcelProperty(value = "伤残等级")
@ExcelAttribute(name = "伤残等级")
private String field61;
@ExcelProperty(value = "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种")
@ExcelAttribute(name = "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种")
private String field62;
@ExcelProperty(value = "不良记录描述")
@ExcelAttribute(name = "不良记录描述")
private String field63;
......
......@@ -20,6 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpBadRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 员工不良记录
......@@ -29,5 +32,5 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface TEmpBadRecordMapper extends BaseMapper<TEmpBadRecord> {
List<TEmpBadRecord> getBadByIdCard(@Param("idCardList") List<String> idCardList);
}
......@@ -48,4 +48,6 @@ public interface TEmpContactInfoMapper extends BaseMapper<TEmpContactInfo> {
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpContactInfo>
**/
List<TEmpContactInfo> getContactByDeptId(@Param("deptId") String deptId);
List<TEmpContactInfo> getContactByIdCardList(@Param("idCardList") List<String> idCardList);
}
......@@ -20,6 +20,9 @@ package com.yifu.cloud.plus.v1.yifu.archives.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.archives.entity.TEmpDisabilityInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 员工伤残信息表
......@@ -30,4 +33,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TEmpDisabilityInfoMapper extends BaseMapper<TEmpDisabilityInfo> {
List<TEmpDisabilityInfo> getTEmpDisabilityByIdCardList(@Param("idCardList") List<String> idCardList);
}
......@@ -40,4 +40,6 @@ public interface TEmpEducationMapper extends BaseMapper<TEmpEducation> {
List<TEmpEducationExportVo> noPageDiy(@Param("searchVo")EducationSearchVo searchVo,@Param("idList")List<String> idList);
int noPageCountDiy(@Param("searchVo")EducationSearchVo searchVo,@Param("idList")List<String> idList);
List<TEmpEducation> getTEmpEducationByIdCard(@Param("idCardList") List<String> idCardList);
}
......@@ -56,4 +56,6 @@ public interface TEmpBadRecordService extends IService<TEmpBadRecord> {
**/
TEmpBadRecord getByEmpId(String empId);
List<TEmpBadRecord> getBadByIdCard(List<String> idList);
}
......@@ -57,5 +57,8 @@ public interface TEmpContactInfoService extends IService<TEmpContactInfo> {
**/
List<TEmpContactInfo> getContactByDeptId(String deptId);
// 根据身份证获取
List<TEmpContactInfo> getContactByIdCardList(List<String> idList);
TEmpContactInfo getByEmpId(String empId);
}
......@@ -45,6 +45,8 @@ public interface TEmpDisabilityInfoService extends IService<TEmpDisabilityInfo>
List<TEmpDisabilityInfo> getTEmpDisabilityInfoNoPage(DisabilitySearchVo searchVo);
List<TEmpDisabilityInfo> getTEmpDisabilityByIdCardList(List<String> idList);
R<Boolean> updateByIdDiy(TEmpDisabilityInfo tEmpDisabilityInfo);
R<List<ErrorMessage>> importTmpDisabilityDiy(InputStream inputStream);
......
......@@ -77,4 +77,6 @@ public interface TEmpEducationService extends IService<TEmpEducation> {
**/
TEmpEducation getByEmpId(String empId);
List<TEmpEducation> getTEmpEducationByIdCard(List<String> idCardList);
}
......@@ -318,4 +318,9 @@ public class TEmpBadRecordServiceImpl extends ServiceImpl<TEmpBadRecordMapper, T
}
return wrapper;
}
@Override
public List<TEmpBadRecord> getBadByIdCard(List<String> idList) {
return baseMapper.getBadByIdCard(idList);
}
}
......@@ -267,4 +267,9 @@ public class TEmpContactInfoServiceImpl extends ServiceImpl<TEmpContactInfoMappe
return baseMapper.getContactByDeptId(deptId);
}
@Override
public List<TEmpContactInfo> getContactByIdCardList(List<String> idList) {
return baseMapper.getContactByIdCardList(idList);
}
}
......@@ -196,6 +196,11 @@ public class TEmpDisabilityInfoServiceImpl extends ServiceImpl<TEmpDisabilityInf
return baseMapper.selectList(wrapper);
}
@Override
public List<TEmpDisabilityInfo> getTEmpDisabilityByIdCardList(List<String> idList) {
return baseMapper.getTEmpDisabilityByIdCardList(idList);
}
@Override
public R<Boolean> updateByIdDiy(TEmpDisabilityInfo tEmpDisabilityInfo) {
TEmpDisabilityInfo exist = baseMapper.selectOne(Wrappers.<TEmpDisabilityInfo>query().lambda()
......
......@@ -557,4 +557,9 @@ public class TEmpEducationServiceImpl extends ServiceImpl<TEmpEducationMapper, T
return empEducation;
}
@Override
public List<TEmpEducation> getTEmpEducationByIdCard(List<String> idCardList) {
return baseMapper.getTEmpEducationByIdCard(idCardList);
}
}
......@@ -913,19 +913,19 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
if (!taxMonth.matches(taxMonthRegex)) {
return R.failed("计税月份为6位年月,例如:202407!");
}
// 校验:
R<String> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/getEmpTaxMonth", oldPreEmployee.getEmpIdcard(), String.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null && !CommonConstants.ZERO_STRING.equals(sdr.getData())) {
taxMonth = sdr.getData();
oldPreEmployee.setTaxMonth(taxMonth);
}
if (Common.isNotNull(main.getSourType()) && CommonConstants.ONE_STRING.equals(main.getSourType())
&& !oldPreEmployee.getTaxMonth().equals(tPreEmployee.getTaxMonth())) {
return R.failed("计税月份和薪酬查询处的计税月份不一致!请填写:" + oldPreEmployee.getTaxMonth());
}
if (Common.isNotNull(oldPreEmployee.getTaxMonthFlag()) && CommonConstants.ZERO_STRING.equals(oldPreEmployee.getTaxMonthFlag())
&& !oldPreEmployee.getTaxMonth().equals(tPreEmployee.getTaxMonth())) {
if (Common.isNotNull(main.getSourType()) && CommonConstants.ONE_STRING.equals(main.getSourType())) {
// 校验:
R<String> sdr = HttpDaprUtil.invokeMethodPost(salaryProperties.getAppUrl(), salaryProperties.getAppId()
, "/tsalaryemployee/inner/getEmpTaxMonth", oldPreEmployee.getEmpIdcard(), String.class, SecurityConstants.FROM_IN);
if (sdr != null && sdr.getData() != null && !CommonConstants.ZERO_STRING.equals(sdr.getData())) {
taxMonth = sdr.getData();
if (!CommonConstants.ZERO_STRING.equals(taxMonth)
&& !taxMonth.equals(tPreEmployee.getTaxMonth())) {
return R.failed("计税月份和薪酬查询处的计税月份不一致!请填写:" + taxMonth);
}
}
} else if (Common.isNotNull(tPreEmployee.getTaxMonthFlag()) && CommonConstants.ZERO_STRING.equals(tPreEmployee.getTaxMonthFlag())
&& !oldPreEmployee.getTaxMonth().equals(tPreEmployee.getTaxMonth()) ) {
return R.failed("本年度有发薪纪录,计税月份不可编辑!");
}
}
......@@ -2409,9 +2409,13 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
headList.add(this.getNewArrayList(new String[]{oneTitle, "政治面貌"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "手机号码"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "邮箱"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "户籍所在地"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "户籍所在地-省"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "户籍所在地-市"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "户籍所在地-区/县"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "户口性质"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "档案所在地"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "档案所在地-省"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "档案所在地-市"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "档案所在地-区/县"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "档案状态"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "通信地址-省"}));
headList.add(this.getNewArrayList(new String[]{oneTitle, "通信地址-市"}));
......@@ -2468,15 +2472,22 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
headList.add(this.getNewArrayList(new String[]{oneTitle, "不良记录描述"}));
excelWriter = EasyExcelFactory.write(out).registerWriteHandler(ExcelStyle.getNormalStype()).head(headList).build();
int index = 0;
int index = 1;
if (count > CommonConstants.ZERO_INT) {
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
ExcelUtil<TPreMainExportAllVO> util = new ExcelUtil<>(TPreMainExportAllVO.class);
//int limitNum = CommonConstants.EXCEL_EXPORT_LIMIT;
int limitNum = 1000;
ExcelWriterSheetBuilder writeSheet;
for (int i = 0; i <= count; i += limitNum) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
searchVo.setLimitEnd(limitNum);
list = baseMapper.getTPreEmpMainAllList(searchVo);
if (Common.isNotNull(list)) {
ExcelWriterSheetBuilder writeSheet = EasyExcelFactory.writerSheet(name + index);
if (Common.isNotNull(list)){
for (TPreMainExportAllVO vo : list){
util.convertEntity(vo,null,null,null);
}
writeSheet = EasyExcelFactory.writerSheet(name + index);
excelWriter.write(list, writeSheet.build());
index++;
}
......@@ -2486,6 +2497,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
// 1工作经历
index = 1;
count = baseMapper.getTEmpMainAllCountOneWork(searchVo);
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
......@@ -2493,7 +2505,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTEmpMainAllListOneWork(searchVo);
if (Common.isNotNull(list)) {
ExcelWriterSheetBuilder writeSheet = EasyExcelFactory.writerSheet("工作经历" + index);
writeSheet = EasyExcelFactory.writerSheet("工作经历" + index);
excelWriter.write(list, writeSheet.build());
index++;
}
......@@ -2502,6 +2514,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
// 2家庭成员
index = 1;
count = baseMapper.getTEmpMainAllCountTwoFamily(searchVo);
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
......@@ -2509,7 +2522,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTEmpMainAllListTwoFamily(searchVo);
if (Common.isNotNull(list)) {
ExcelWriterSheetBuilder writeSheet = EasyExcelFactory.writerSheet("家庭成员" + index);
writeSheet = EasyExcelFactory.writerSheet("家庭成员" + index);
excelWriter.write(list, writeSheet.build());
index++;
}
......@@ -2518,6 +2531,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
}
}
// 3职业资格
index = 1;
count = baseMapper.getTEmpMainAllCountThreeProfessional(searchVo);
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
......@@ -2525,7 +2539,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = baseMapper.getTEmpMainAllListThreeProfessional(searchVo);
if (Common.isNotNull(list)) {
ExcelWriterSheetBuilder writeSheet = EasyExcelFactory.writerSheet("职业资格" + index);
writeSheet = EasyExcelFactory.writerSheet("职业资格" + index);
excelWriter.write(list, writeSheet.build());
index++;
}
......@@ -2900,7 +2914,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
Map<String, Boolean> idCardMap = new HashMap<>();
if (!bankList.isEmpty()) {
R<CheckBatchVo> checkListR = HttpDaprUtil.invokeMethodPost(checkProperties.getAppUrl(), checkProperties.getAppId()
, "/tcheckbankno/inner/checkBankNoBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
, "/tcheckbankno/inner/checkBankNoAndNameBatch", bankList, CheckBatchVo.class, SecurityConstants.FROM_IN);
if (checkListR != null && checkListR.getData() != null) {
bankNoMap = checkListR.getData().getCheckMap();
}
......@@ -2953,7 +2967,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
errorCheck.append("姓名&身份证号不一致;");
}
if (Common.isNotNull(info.getBankNo())) {
resultB = bankNoMap.get(info.getBankNo());
resultB = bankNoMap.get(info.getBankNo() + CommonConstants.DOWN_LINE_STRING + info.getEmpName());
if (resultB != null) {
if (!resultB) {
errorCheck.append("姓名&银行卡号不一致;");
......@@ -3067,6 +3081,39 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
oldEmpMap.put(e.getEmpIdcard(), e);
}
}
// 紧急联系人
Map<String, String> oldContactMap = new HashMap<>();
List<TEmpContactInfo> contactList = tEmpContactInfoService.getContactByIdCardList(idCardList);
if (contactList != null && !contactList.isEmpty()) {
for (TEmpContactInfo contact : contactList) {
oldContactMap.put(contact.getEmpIdcard(), contact.getId());
}
}
// 伤残
Map<String, String> oldDisabilityMap = new HashMap<>();
List<TEmpDisabilityInfo> disabilityList = tEmpDisabilityInfoService.getTEmpDisabilityByIdCardList(idCardList);
if (disabilityList != null && !disabilityList.isEmpty()) {
for (TEmpDisabilityInfo disability : disabilityList) {
oldDisabilityMap.put(disability.getEmpIdcard(), disability.getId());
}
}
// 不良
Map<String, String> oldBadRecordMap = new HashMap<>();
List<TEmpBadRecord> badRecordList = tEmpBadRecordService.getBadByIdCard(idCardList);
if (badRecordList != null && !badRecordList.isEmpty()) {
for (TEmpBadRecord badRecord : badRecordList) {
oldBadRecordMap.put(badRecord.getEmpIdcard(), badRecord.getId());
}
}
// 最高学历
Map<String, String> oldEducationMap = new HashMap<>();
List<TEmpEducation> educationList = tEmpEducationService.getTEmpEducationByIdCard(idCardList);
if (educationList != null && !educationList.isEmpty()) {
for (TEmpEducation education : educationList) {
oldEducationMap.put(education.getEmpIdcard(), education.getId());
}
}
TEmployeeInfo employee;
TPreEmployeeInfo tPreEmployeeInfo;
TPreEmployeeProject tPreEmployeeProject;
......@@ -3211,6 +3258,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 其他附属信息
tPreEmpBadRecord = new TPreEmpBadRecord();
tPreEmpBadRecord.setOldId(oldBadRecordMap.get(empIdCard));
tPreEmpBadRecord.setPreMainId(mainId);
tPreEmpBadRecord.setSettleDomain(deptId);
tPreEmpBadRecord.setProject(dept.getDepartName());
......@@ -3228,6 +3276,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 紧急联系人
tPreEmpContactInfo = new TPreEmpContactInfo();
tPreEmpContactInfo.setOldId(oldContactMap.get(empIdCard));
tPreEmpContactInfo.setEmpId(empId);
tPreEmpContactInfo.setPreMainId(mainId);
tPreEmpContactInfo.setCreateBy(user.getId());
......@@ -3246,6 +3295,7 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 伤残
tPreEmpDisabilityInfo = new TPreEmpDisabilityInfo();
tPreEmpDisabilityInfo.setOldId(oldDisabilityMap.get(empIdCard));
tPreEmpDisabilityInfo.setPreMainId(mainId);
tPreEmpDisabilityInfo.setSettleDomain(deptId);
tPreEmpDisabilityInfo.setEmpId(empId);
......@@ -3272,9 +3322,11 @@ public class TPreEmpMainServiceImpl extends ServiceImpl<TPreEmpMainMapper, TPreE
// 最高教育经历
tPreEmpEducation = new TPreEmpEducation();
tPreEmpEducation.setOldId(oldEducationMap.get(empIdCard));
tPreEmpEducation.setPreMainId(mainId);
tPreEmpEducation.setSettleDomain(deptId);
tPreEmpEducation.setEmpId(empId);
tPreEmpEducation.setHighIdentification(CommonConstants.ZERO_STRING);
if (employee != null) {
tPreEmpEducation.setEmpName(employee.getEmpName());
tPreEmpEducation.setEmpCode(employee.getEmpCode());
......
......@@ -42,4 +42,34 @@
<result property="updateTime" column="UPDATE_TIME"/>
<result property="badRecordFlag" column="BAD_RECORD_FLAG"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.EMP_NAME,
a.EMP_ID,
a.EMP_IDCARD,
a.PROJECT,
a.PROJECT_CODE,
a.HAPPEN_TIME,
a.REMARK,
a.LOSE_FEE,
a.LOSE_FEE_OTHER,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME,
a.SETTLE_DOMAIN,
a.BAD_RECORD_FLAG
</sql>
<select id="getBadByIdCard" resultMap="tEmpBadRecordMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_emp_bad_record a
where a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY a.EMP_IDCARD
</select>
</mapper>
......@@ -44,6 +44,7 @@
<sql id="Base_Column_List">
a.ID,
a.EMP_ID,
a.EMP_IDCARD,
a.EMP_NAME,
a.RELATION_TYPE,
a.ADDRESS,
......@@ -117,4 +118,15 @@
where b.DEPT_ID = #{deptId}
GROUP BY a.EMP_IDCARD
</select>
<select id="getContactByIdCardList" resultMap="tEmpContactInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_emp_contact_info a
where a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY a.EMP_IDCARD
</select>
</mapper>
......@@ -48,9 +48,44 @@
<result property="infectiousName" column="INFECTIOUS_NAME"/>
<result property="disabilityFlag" column="DISABILITY_FLAG"/>
<result property="otherFlag" column="OTHER_FLAG"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.EMP_ID,
a.EMP_NAME,
a.EMP_CODE,
a.EMP_IDCARD,
a.DISABILITY_NAME,
a.DISABILITY_LEVEL,
a.INJURY_IDENTIFICATION,
a.START_TIME,
a.END_TIME,
a.OCCUPATIONAL_DISEASE,
a.DELETE_FLAG,
a.SETTLE_DOMAIN,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME,
a.REMARK,
a.OCCUPATIONAL_DISEASE_FLAG,
a.INFECTIOUS_DISEASE_FLAG,
a.INFECTIOUS_NAME,
a.DISABILITY_FLAG,
a.OTHER_FLAG,
a.OTHER_FLAG
</sql>
</resultMap>
<select id="getTEmpDisabilityByIdCardList" resultMap="tEmpDisabilityInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_emp_disability_info a
where a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY a.EMP_IDCARD
</select>
</mapper>
......@@ -67,6 +67,34 @@
<result property="certificationName" column="CERTIFICATION_NAME"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.EMP_ID,
a.EMP_NAME,
a.EMP_CODE,
a.EMP_IDCARD,
a.ENTRY_DATE,
a.EDUCATION_NAME,
a.GRADUTION_DATE,
a.SCHOOL,
a.EDUCATION_SYSTEM,
a.HIGH_IDENTIFICATION,
a.TYPE,
a.COLLAGE_SYSTEM,
a.DELETE_FLAG,
a.SETTLE_DOMAIN,
a.DISPATCH_FLAG,
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_TIME,
a.REMARK,
a.CERTIFICATION_NAME,
a.MAJOR
</sql>
<update id="updateHighIdentification" parameterType="java.lang.String">
update t_emp_education
set HIGH_IDENTIFICATION='1'
......@@ -142,4 +170,16 @@
</if>
</if>
</sql>
<select id="getTEmpEducationByIdCard" resultMap="tEmpEducationMap">
SELECT
<include refid="Base_Column_List"/>
FROM t_emp_education a
where a.HIGH_IDENTIFICATION = '0' and a.EMP_IDCARD in
<foreach item="item" index="index" collection="idCardList" open="(" separator="," close=")">
#{item}
</foreach>
GROUP BY a.EMP_IDCARD
</select>
</mapper>
......@@ -255,7 +255,7 @@
SELECT
count(1)
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
/*left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join view_sys_dict_item emp_natrue on emp_natrue.value=a.emp_Natrue and emp_natrue.type='emp_natrue'
left join view_sys_dict_item emp_married on emp_married.value=e.EMP_MARRI_STATUS and emp_married.type='emp_married'
left join view_sys_dict_item nation on nation.value=e.EMP_NATIONAL and nation.type='emp_national'
......@@ -278,7 +278,7 @@
left join t_pre_emp_professional_qualification ep on a.id=ep.PRE_MAIN_ID
left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type'
left join t_pre_emp_disability_info ed on a.id=ed.PRE_MAIN_ID
left join t_pre_emp_bad_record eb on a.id=eb.PRE_MAIN_ID
left join t_pre_emp_bad_record eb on a.id=eb.PRE_MAIN_ID*/
<where>
a.STATUS != '5'
<include refid="tPreEmpMain_where"/>
......@@ -295,23 +295,21 @@
SELECT
case a.STATUS when '0' then '草稿' when '1' then '待完善' when '2' then '待审核' when '3' then '审核不通过' when '4' then '审核通过' else '-' end field1
,DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%s') field2,if(a.STATUS in ('3','4'),a.AUDIT_NAME,'') field64,if(a.STATUS in ('3','4'),DATE_FORMAT(a.AUDIT_TIME,'%Y-%m-%d %H:%i:%s'),'') field65
,e.EMP_CODE field3,emp_natrue.label field4,a.emp_name field5,a.emp_idcard field6
,e.EMP_CODE field3,a.emp_Natrue field4,a.emp_name field5,a.emp_idcard field6
,if(e.EMP_SEX='2','女',if(e.EMP_SEX='1','男','-')) field7
,if(e.VALIDITY_END is null,'-',if(e.VALIDITY_END > '2999-12-30','长期','固定')) field8 ,e.VALIDITY_START field9
,if(e.VALIDITY_END > '2999-12-30','长期',e.VALIDITY_END) field10,e.EMP_BIRTHDAY field11,e.EMP_AGE field12 ,emp_married.label field13,nation.label field14
,politicalStatus.label field15,e.EMP_PHONE field16,e.EMP_EMAIL field17
,concat(ifnull(pi.AREA_NAME,''),ifnull(ci.AREA_NAME,''),ifnull(ti.AREA_NAME,'')) field18 ,registype.label field19
,concat(ifnull(pf.AREA_NAME,''),ifnull(cf.AREA_NAME,''),ifnull(tf.AREA_NAME,'')) field20 ,if(e.status=0,'草稿','已审核') field21,
cp.AREA_NAME as "field66",
cc.AREA_NAME as "field67",
ct.AREA_NAME as "field68"
,if(e.VALIDITY_END > '2999-12-30','长期',e.VALIDITY_END) field10,e.EMP_BIRTHDAY field11,e.EMP_AGE field12 ,e.EMP_MARRI_STATUS field13,e.EMP_NATIONAL field14
,e.POLITICAL_STATUS field15,e.EMP_PHONE field16,e.EMP_EMAIL field17
,e.ID_PROVINCE field18,e.ID_CITY field69,e.ID_TOWN field70,e.EMP_REGIS_TYPE field19
,e.FILE_PROVINCE field20,e.FILE_CITY field71,e.FILE_TOWN field72,if(e.status=0,'草稿','已审核') field21,
e.CONTACT_PROVINCE as "field66", e.CONTACT_CITY as "field67", e.CONTACT_TOWN as "field68"
,e.CONTACT_ADDRESS field22,p.UNIT_NAME field23,p.DEPT_NAME field24
,concat(p.BUSINESS_PRIMARY_TYPE,'-',ifnull(p.BUSINESS_SECOND_TYPE,''),'-',ifnull(p.BUSINESS_THIRD_TYPE,'')) field25
,contractType.label field26 ,workingHours.label field27,p.POST field28,p.ENJOIN_DATE field29
,p.CONTRACT_TYPE field26 ,p.WORKING_HOURS field27,p.POST field28,p.ENJOIN_DATE field29
,p.TRY_PERIOD field30,p.EMP_LABEL field31
,ec.EMP_NAME field32,ec.RELATION_TYPE field33,ec.ADDRESS field34,ec.TEL field35
,ee.SCHOOL field36,ee.MAJOR field37,education.label field38,if(e.IS_COLLEGE=0,'否','是') field39
,educationEmp.label field40 ,ee.ENTRY_DATE field41,ee.GRADUTION_DATE field42
,e.HIGN_EDUCATION field40 ,ee.ENTRY_DATE field41,ee.GRADUTION_DATE field42
,if(e.FIRST_WORK_FLAG is null,'',if(e.FIRST_WORK_FLAG=0,'是','否')) field43,ew.WORK_UNIT field44,ew.WORK_JOB field45,ew.START_DATE field46,ew.END_DATE field47
,ef.FAMILY_NAME field48,family_relation.label field49,ef.CONTRACT_TEL field50
......@@ -322,26 +320,7 @@
,ed.DISABILITY_NAME field60,disability_grade.label field61,if(ed.OTHER_FLAG=0,'是','否') field62,eb.REMARK field63
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join view_sys_dict_item emp_natrue on emp_natrue.value=a.emp_Natrue and emp_natrue.type='emp_natrue'
left join view_sys_dict_item educationEmp on educationEmp.value=e.HIGN_EDUCATION and educationEmp.type='education'
left join view_sys_dict_item emp_married on emp_married.value=e.EMP_MARRI_STATUS and emp_married.type='emp_married'
left join view_sys_dict_item nation on nation.value=e.EMP_NATIONAL and nation.type='emp_national'
left join view_sys_dict_item registype on registype.value=e.EMP_REGIS_TYPE and registype.type='emp_registype'
left join view_sys_dict_item politicalStatus on politicalStatus.value=e.POLITICAL_STATUS and politicalStatus.type='emp_political'
left join sys_area pi on pi.id=e.ID_PROVINCE
left join sys_area ci on ci.id=e.ID_CITY
left join sys_area ti on ti.id=e.ID_TOWN
left join sys_area pf on pf.id=e.FILE_PROVINCE
left join sys_area cf on cf.id=e.FILE_CITY
left join sys_area tf on tf.id=e.FILE_TOWN
left join sys_area cp on cp.id=e.CONTACT_PROVINCE
left join sys_area cc on cc.id=e.CONTACT_CITY
left join sys_area ct on ct.id=e.CONTACT_TOWN
left join t_pre_employee_project p on a.id=p.PRE_MAIN_ID
left join view_sys_dict_item contractType on contractType.value=p.CONTRACT_TYPE and contractType.type='personnel_type'
left join view_sys_dict_item workingHours on workingHours.value=p.WORKING_HOURS and workingHours.type='working_hours'
left join t_pre_emp_contact_info ec on a.id=ec.PRE_MAIN_ID
left join t_pre_emp_education ee on a.id=ee.PRE_MAIN_ID
left join view_sys_dict_item education on education.value=ee.EDUCATION_NAME and education.type='education'
......@@ -374,7 +353,7 @@
GROUP BY ee.PRE_MAIN_ID
) ep on a.id=ep.PRE_MAIN_ID
left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type'
left join view_sys_dict_item qualification_type on qualification_type.value=ep.QUALIFICATION_TYPE and qualification_type.type='qualification_type'
left join t_pre_emp_disability_info ed on a.id=ed.PRE_MAIN_ID
left join view_sys_dict_item disability_grade on disability_grade.value=ed.DISABILITY_LEVEL and disability_grade.type='disability_grade'
left join t_pre_emp_bad_record eb on a.id=eb.PRE_MAIN_ID
......
......@@ -159,6 +159,20 @@ public class TCheckBankNoController {
return tCheckBankNoService.checkBankNoBatch(list);
}
/**
* @Description: 批量银行卡号校验返回含名字
* @Author: hgw
* @Date: 2024-10-23 18:13:15
* @return: com.yifu.cloud.plus.v1.check.vo.CheckBankNoVo
**/
@Operation(description = "批量银行卡号校验返回含名字")
@SysLog("批量银行卡号校验返回含名字" )
@Inner
@PostMapping("/inner/checkBankNoAndNameBatch" )
public CheckBatchVo checkBankNoAndNameBatch(@RequestBody List<TCheckBankNo> list) throws ExecutionException, InterruptedException{
return tCheckBankNoService.checkBankNoAndNameBatch(list);
}
/**
* @Description: 代发户调用银行卡校验--如果其他接口也要调用,加上信息
* @Author: hgw
......
......@@ -65,5 +65,7 @@ public interface TCheckBankNoService extends IService<TCheckBankNo> {
**/
CheckBatchVo checkBankNoBatch(List<TCheckBankNo> list) throws ExecutionException, InterruptedException;
CheckBatchVo checkBankNoAndNameBatch(List<TCheckBankNo> list) throws ExecutionException, InterruptedException;
R<List<ErrorMessage>> importDiy(InputStream inputStream);
}
......@@ -298,6 +298,130 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
return vo;
}
@Override
public CheckBatchVo checkBankNoAndNameBatch(List<TCheckBankNo> list) throws ExecutionException, InterruptedException{
CheckBatchVo vo = new CheckBatchVo();
List<String> noList = new ArrayList<>();
for (TCheckBankNo no : list) {
if (Common.isNotNull(no.getBankNo())) {
noList.add(no.getBankNo());
}
}
Map<String, TCheckBankNo> noMap = new HashMap<>();
if (!noList.isEmpty()) {
List<TCheckBankNo> checkBankNoList = baseMapper.getListByNoList(noList);
if (checkBankNoList != null && !checkBankNoList.isEmpty()) {
for (TCheckBankNo no : checkBankNoList) {
noMap.put(no.getBankNo() + CommonConstants.DOWN_LINE_STRING + no.getName(), no);
}
}
}
List<TCheckBankNo> noCurlist = new ArrayList<>();
TCheckBankNo cur;
Map<String, Boolean> bankMap = new HashMap<>();
for (TCheckBankNo check : list) {
cur = noMap.get(check.getBankNo() + CommonConstants.DOWN_LINE_STRING + check.getName());
if (cur != null) {
if (CommonConstants.ZERO_ONE.equals(cur.getResult())) {
bankMap.put(cur.getBankNo() + CommonConstants.DOWN_LINE_STRING + cur.getName(), cur.getName().equals(check.getName()));
} else {
if (cur.getName().equals(check.getName())) {
bankMap.put(cur.getBankNo() + CommonConstants.DOWN_LINE_STRING + cur.getName(), false);
} else {
noCurlist.add(check);
}
}
} else {
noCurlist.add(check);
}
}
List<TCheckBankNo> saveList = new ArrayList<>();
if (!noCurlist.isEmpty()) {
boolean canCheck = canCheckService.getCanCheck();
int taskSize = 4;
// 创建一个线程池
ExecutorService pool = Executors.newFixedThreadPool(taskSize);
List<Future> listF = new ArrayList<>();
if (noCurlist.size()>=4) {
int l = 4;
Callable c;
Future f;
for (int k=0;k<l;k++) {
if ((k+1)==l) {
List<TCheckBankNo> finalList = noCurlist.subList(k * (noCurlist.size() / l), noCurlist.size());
if (canCheck) {
c = new MyCallable(bankMap, finalList, saveList);
// 执行任务并获取Future对象
f = pool.submit(c);
listF.add(f);
} else {
doNomalByName(bankMap, saveList, finalList);
}
} else {
List<TCheckBankNo> finalList = noCurlist.subList(k * (noCurlist.size() / l), (k + 1) * (noCurlist.size() / l));
if (canCheck) {
c = new MyCallable(bankMap, finalList, saveList);
// 执行任务并获取Future对象
f = pool.submit(c);
listF.add(f);
} else {
doNomalByName(bankMap, saveList, finalList);
}
}
}
} else {
if (canCheck) {
Callable c = new MyCallable(bankMap, noCurlist, saveList);
// 执行任务并获取Future对象
Future f = pool.submit(c);
listF.add(f);
} else {
doNomalByName(bankMap, saveList, noCurlist);
}
}
if (canCheck) {
// 关闭线程池
pool.shutdown();
for (Future fs : listF) {
// 从Future对象上获取任务的返回值,并输出到控制台
fs.get();
}
}
//fo (TCheckBankNo no : noCurlist)
// 原代码
/*resR = ChecksUtil.checkBankNoTwo(no.getName(), no.getBankNo(), canCheck)
f (Common.isNotNull(resR) && resR.getCode() == CommonConstants.SUCCESS
&& Common.isNotNull(resR.getData()))
newNo = resR.getData()
bankMap.put(no.getBankNo(), CommonConstants.ZERO_ONE.equals(newNo.getResult()))
saveList.add(newNo)
else
bankMap.put(no.getBankNo(), false)
*/
if (!saveList.isEmpty()) {
this.saveOrUpdateBatch(saveList);
saveList.clear();
}
}
vo.setCheckMap(bankMap);
return vo;
}
private void doNomalByName(Map<String, Boolean> bankMap, List<TCheckBankNo> saveList, List<TCheckBankNo> finalList) {
TCheckBankNo newNo;
for (TCheckBankNo no : finalList) {
newNo = new TCheckBankNo();
newNo.setBankNo(no.getBankNo());
newNo.setName(no.getName());
newNo.setMessage(ChecksConstants.CHECK_CONFIG_ACCESS);
newNo.setResult("01");
newNo.setType(CommonConstants.ONE_STRING);
newNo.setRemark(ChecksConstants.CHECK_CONFIG_ACCESS);
saveList.add(newNo);
bankMap.put(no.getBankNo() + CommonConstants.DOWN_LINE_STRING + no.getName(), true);
}
}
private void doNomal(Map<String, Boolean> bankMap, List<TCheckBankNo> saveList, List<TCheckBankNo> finalList) {
TCheckBankNo newNo;
for (TCheckBankNo no : finalList) {
......
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