Commit 87c22814 authored by fangxinjiang's avatar fangxinjiang

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

parents 81573340 142af468
......@@ -41,18 +41,10 @@ public class PreUploadEmpImportTwoVo implements Serializable {
private String empName;
@ExcelAttribute(name = "身份证号", isNotEmpty = true, maxLength = 20)
private String empIdcard;
//@ExcelAttribute(name = "性别", maxLength = 32)
//private String empSex;
//@ExcelAttribute(name = "身份证期限", isDate = true)
//private String cardType;
@ExcelAttribute(name = "身份证开始日期", isDate = true)
private String validityStart;
@ExcelAttribute(name = "身份证截止日期", isDate = true, pattern = "validityStart")
private String validityEnd;
//@ExcelAttribute(name = "出生日期", isDate = true)
//private String empBirthday;
//@ExcelAttribute(name = "年龄")
//private Integer empAge;
@ExcelAttribute(name = "婚姻状况", isDataId = true, dataType = ExcelAttributeConstants.EMP_MARRIED, maxLength = 32)
private String empMarriStatus;
@ExcelAttribute(name = "民族", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATIONAL, maxLength = 32)
......@@ -96,9 +88,9 @@ public class PreUploadEmpImportTwoVo implements Serializable {
private String isCollege;
@ExcelAttribute(name = "最高学历", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION, maxLength = 32)
private String educationName;
@ExcelAttribute(name = "学校", maxLength = 64)
@ExcelAttribute(name = "学校", maxLength = 50)
private String school;
@ExcelAttribute(name = "专业", maxLength = 64)
@ExcelAttribute(name = "专业", maxLength = 50)
private String major;
@ExcelAttribute(name = "入学时间", isDate = true)
private String entryDate;
......@@ -126,7 +118,7 @@ public class PreUploadEmpImportTwoVo implements Serializable {
// 银行卡号 开户总行 开户省 开户市 开户支行 计税月份
@ExcelAttribute(name = "银行卡号", maxLength = 50)
private String bankNo;
@ExcelAttribute(name = "开户总行", maxLength = 50)
@ExcelAttribute(name = "开户总行", maxLength = 50)
private String bankName;
@ExcelAttribute(name = "开户省", isArea = true)
private String bankProvince;
......
......@@ -42,18 +42,10 @@ public class PreUploadEmpImportVo implements Serializable {
private String empName;
@ExcelAttribute(name = "身份证号", isNotEmpty = true, maxLength = 20)
private String empIdcard;
//@ExcelAttribute(name = "性别", maxLength = 32)
//private String empSex;
//@ExcelAttribute(name = "身份证期限", isDate = true)
//private String cardType;
@ExcelAttribute(name = "身份证开始日期", isNotEmpty = true, isDate = true)
private String validityStart;
@ExcelAttribute(name = "身份证截止日期", isNotEmpty = true, isDate = true, pattern = "validityStart")
private String validityEnd;
//@ExcelAttribute(name = "出生日期", isDate = true)
//private String empBirthday;
//@ExcelAttribute(name = "年龄")
//private Integer empAge;
@ExcelAttribute(name = "婚姻状况", isDataId = true, dataType = ExcelAttributeConstants.EMP_MARRIED, isNotEmpty = true, maxLength = 32)
private String empMarriStatus;
@ExcelAttribute(name = "民族", isDataId = true, dataType = ExcelAttributeConstants.EMP_NATIONAL, isNotEmpty = true, maxLength = 32)
......@@ -101,7 +93,7 @@ public class PreUploadEmpImportVo implements Serializable {
private String relationCity;
@ExcelAttribute(name = "联系地址-区/县", isNotEmpty = true, isArea = true, parentField = "relationCity")
private String relationTown;
@ExcelAttribute(name = "联系地址-详细地址", isNotEmpty = true, errorInfo = "联系地址-街道、详情不能为空", maxLength = 100)
@ExcelAttribute(name = "联系地址-详细地址", isNotEmpty = true, errorInfo = "联系地址-街道、详情不能为空", maxLength = 200)
private String address;
@ExcelAttribute(name = "手机号码(紧急联系人)", isPhone = true, isNotEmpty = true, errorInfo = "手机号码(紧急联系人)不能为空", maxLength = 20)
private String tel;
......@@ -111,20 +103,14 @@ public class PreUploadEmpImportVo implements Serializable {
// 学历 学校 专业 教育开始时间 教育结束时间 是否大专及以上 最高学历
@ExcelAttribute(name = "学历", isDataId = true, dataType = ExcelAttributeConstants.EDUCATION, isNotEmpty = true, maxLength = 32)
private String educationName;
@ExcelAttribute(name = "学校", maxLength = 64)
@ExcelAttribute(name = "学校", maxLength = 50)
private String school;
@ExcelAttribute(name = "专业", maxLength = 64)
@ExcelAttribute(name = "专业", maxLength = 50)
private String major;
@ExcelAttribute(name = "教育开始时间", isDate = true)
private String entryDate;
@ExcelAttribute(name = "教育结束时间", isDate = true, pattern = "entryDate")
private String gradutionDate;
// 非表头:是否大专及以上(0否1是)
//@ExcelAttribute(name = "是否大专及以上")
//private String isCollege;
// 非表头:最高学历标识0是/1否
//@ExcelAttribute(name = "最高学历", maxLength = 1)
//private String highIdentification;
// 是否为首份工作 工作单位 工作岗位 开始工作日期 结束工作日期
// 预入职-员工工作履历信息表
......@@ -144,7 +130,7 @@ public class PreUploadEmpImportVo implements Serializable {
// 成员姓名 与本人关系 手机号码(家庭成员)
// 预入职-员工家庭信息表
// private List<TPreEmpFamily> tpreEmpFamilyList
@ExcelAttribute(name = "家庭成员成员姓名", maxLength = 32)
@ExcelAttribute(name = "家庭成员成员姓名", maxLength = 20)
private String familyName;
@ExcelAttribute(name = "家庭成员与本人关系", isMark = true,isDataId = true,dataType = ExcelAttributeConstants.FAMILY_RELATION, maxLength = 32)
private String relationshipSelf;
......@@ -171,19 +157,19 @@ public class PreUploadEmpImportVo implements Serializable {
// 是否职业病 0是/1否
@ExcelAttribute(name = "是否有职业病", isDataId = true, readConverterExp = "0=是,1=否", isNotEmpty = true, maxLength = 1)
private String occupationalDiseaseFlag;
@ExcelAttribute(name = "职业病名称")
@ExcelAttribute(name = "职业病名称", maxLength = 50)
private String occupationalDisease;
// 是否传染病病 0是/1否
@ExcelAttribute(name = "是否有传染性疾病", isDataId = true, readConverterExp = "0=是,1=否", isNotEmpty = true, maxLength = 1)
private String infectiousDiseaseFlag;
@ExcelAttribute(name = "传染病名称")
@ExcelAttribute(name = "传染病名称", maxLength = 50)
private String infectiousName;
// 是否持有残疾人证明 0是/1否
@ExcelAttribute(name = "是否被劳动能力鉴定委员会鉴定为具有伤残等级", isDataId = true, readConverterExp = "0=是,1=否", isNotEmpty = true, maxLength = 1)
private String disabilityFlag;
@ExcelAttribute(name = "伤残病名称")
@ExcelAttribute(name = "伤残病名称", maxLength = 50)
private String disabilityName;
@ExcelAttribute(name = "伤残等级",isDataId = true, dataType = ExcelAttributeConstants.DISABILITY_GRADE)
@ExcelAttribute(name = "伤残等级",isDataId = true, dataType = ExcelAttributeConstants.DISABILITY_GRADE, maxLength = 32)
private String disabilityLevel;
// 是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种 0是/1否
@ExcelAttribute(name = "是否从事过井下、高空、高温、特别繁重体力劳动以及有毒有害工种", isDataId = true, readConverterExp = "0=是,1=否", isNotEmpty = true, maxLength = 1)
......@@ -294,9 +280,6 @@ public class PreUploadEmpImportVo implements Serializable {
private Date validityEndValue;
// 字典值结束
// 附属信息
// List<PreUploadEmpImportVo> otherList = new ArrayList<>()
// 是否主信息,未false,则仅更新附属信息
@TableField(exist = false)
private Boolean isMain;
......
......@@ -93,13 +93,13 @@ public interface TCompleteMonitorMapper extends BaseMapper<TCompleteMonitor> {
int getTEmpMainAllCount(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
// 导出详情使用 hgw 2024-6-26 11:05:41
List<TMainExportAllVO> getTEmpMainAllList(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
List<TMainExportAllVO> getTEmpMainAllListByContract(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
List<TMainExportAllVO> getTEmpMainAllListByEducation(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
List<TMainExportAllVO> getTEmpMainAllListByBad(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
List<TMainExportAllVO> getTEmpMainAllListByDisability(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
List<TMainExportAllVO> getTEmpMainAllListByWork(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
List<TMainExportAllVO> getTEmpMainAllListByFamily(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
List<TMainExportAllVO> getTEmpMainAllListByProfessional(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
List<TMainExportAllVO> getTEmpMainAllListByContract(@Param("empIdList") List<String> empIdList);
List<TMainExportAllVO> getTEmpMainAllListByEducation(@Param("empIdList") List<String> empIdList);
List<TMainExportAllVO> getTEmpMainAllListByBad(@Param("empIdList") List<String> empIdList);
List<TMainExportAllVO> getTEmpMainAllListByDisability(@Param("empIdList") List<String> empIdList);
List<TMainExportAllVO> getTEmpMainAllListByWork(@Param("empIdList") List<String> empIdList);
List<TMainExportAllVO> getTEmpMainAllListByFamily(@Param("empIdList") List<String> empIdList);
List<TMainExportAllVO> getTEmpMainAllListByProfessional(@Param("empIdList") List<String> empIdList);
// 导出详情使用 hgw 2024-6-26 11:05:41
int getTEmpMainAllCountOneWork(@Param("tCompleteMonitor") TCompleteMonitor tCompleteMonitor);
......
......@@ -52,9 +52,9 @@ public interface TPreEmpMainMapper extends BaseMapper<TPreEmpMain> {
int getTPreEmpMainAllCount(@Param("tPreEmpMain") TPreEmpMain tPreEmpMain);
List<TPreMainExportAllVO> getTPreEmpMainAllList(@Param("tPreEmpMain") TPreEmpMain tPreEmpMain);
List<TPreMainExportAllVO> getTPreEmpMainAllListByWork(@Param("tPreEmpMain") TPreEmpMain tPreEmpMain);
List<TPreMainExportAllVO> getTPreEmpMainAllListByFamily(@Param("tPreEmpMain") TPreEmpMain tPreEmpMain);
List<TPreMainExportAllVO> getTPreEmpMainAllListByProfessional(@Param("tPreEmpMain") TPreEmpMain tPreEmpMain);
List<TPreMainExportAllVO> getTPreEmpMainAllListByWork(@Param("preMainIdList") List<String> preMainIdList);
List<TPreMainExportAllVO> getTPreEmpMainAllListByFamily(@Param("preMainIdList") List<String> preMainIdList);
List<TPreMainExportAllVO> getTPreEmpMainAllListByProfessional(@Param("preMainIdList") List<String> preMainIdList);
// 导出详情使用 hgw 2024-6-26 11:05:41
int getTEmpMainAllCountOneWork(@Param("tPreEmpMain") TPreEmpMain tPreEmpMain);
......
......@@ -3220,7 +3220,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorTitle.append("联系地址省市县需要成对出现;");
}
if (pairsKai.size() == 1) {
errorTitle.append("开户省市需要成对出现;");
errorTitle.append("开户省市需要成对出现;");
}
if (errorTitle.length() > 0) {
return R.failed("表头错误:" + errorTitle + " 请检查调整后再次导入");
......@@ -3296,9 +3296,9 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
// 不存在档案,则仅返回这个信息
String errorCur;
// 已存在的主档案Map
Map<String, String> empMap = new HashMap<>();
//Map<String, String> empMap = new HashMap<>();
// 已存在的主档案
String curVo;
//String curVo
// 档案map
Map<String, TEmployeeInfo> existEmpMap = this.getMapByDeptId(paramVo.getDeptId());
Map<String, TEmpContactInfo> existContactMap = this.getTEmpContactInfoMapByDeptId(paramVo.getDeptId());
......@@ -3315,7 +3315,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
String errorCurInfoStatus = "该人员档案状态未在档,请核实";
int lineNum = 2;
for (Map<String, String> rowMap : vo.getContentList()) {
curVo = null;
// curVo = null
errorMust = new StringBuilder();
errorFormat = new StringBuilder();
errorCheck = new StringBuilder();
......@@ -3332,8 +3332,6 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (idNumber.equals(shuName)) {
if (Common.isEmpty(shuValue)) {
errorMust.append("身份证号;");
} else {
curVo = empMap.get(shuValue);
}
}
if (phoneTitleMap.get(shuName) != null && Common.isNotNull(shuValue)) {
......@@ -3342,18 +3340,18 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
field = fieldsMap.get(shuName);
if (field != null) {
attr = field.getAnnotation(ExcelAttribute.class);
if (curVo == null) {
//if (curVo == null) {
// 必填
if (attr.isNotEmpty() && Common.isEmpty(shuValue)) {
errorMust.append(attr.name()).append(";");
}
}
//}
if (Common.isNotNull(shuValue)) {
shuValue = shuValue.trim();
//校验字段是否符合要求 返回错误信息
dictValue = DiyExcelImportUtil.validateUtil(shuValue, attr, errorFormat, dictMap, parentAreaMap, shuName, false, startDateMap);
//校验字段是否符合要求2 开户行
if (curVo == null && "bankName".equals(shuName) && bankMap.get(shuValue) == null) {
if ("bankName".equals(shuName) && bankMap.get(shuValue) == null) {
errorFormat.append(attr.name()).append("_不符合财务要求,请查薪资配置;");
}
fieldType = field.getType();
......@@ -3419,7 +3417,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isNotNull(detail.getRelationProvince()) && (Common.isEmpty(detail.getRelationCity()) || Common.isEmpty(detail.getRelationTown()))) {
errorMust.append("联系地址-省、市、区/县联动必填;");
}
if (Common.isNotNull(detail.getFileProvince()) && Common.isEmpty(detail.getFileCity())) {
if (Common.isNotNull(detail.getBankProvince()) && Common.isEmpty(detail.getBankCity())) {
errorMust.append("开户省、市联动必填;");
}
// 手机号码
......@@ -3439,7 +3437,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isNotNull(errorCur)) {
detail.setErrorInfo(errorCur);
empMap.put(detail.getEmpIdcard(), CommonConstants.ZERO_STRING);
//empMap.put(detail.getEmpIdcard(), CommonConstants.ZERO_STRING)
} else {
StringBuilder errorInfo = new StringBuilder();
if (errorCheck.length() > 0) {
......@@ -3452,7 +3450,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
errorInfo.append("格式不正确:").append(errorFormat);
}
detail.setErrorInfo(errorInfo.toString());
empMap.put(detail.getEmpIdcard(), CommonConstants.ZERO_STRING);
//empMap.put(detail.getEmpIdcard(), CommonConstants.ZERO_STRING)
}
} else {
detail.setErrorInfo("身份证号不存在!");
......@@ -3505,7 +3503,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
if (Common.isNotNull(info.getBankNo())) {
resultB = bankNoMap.get(info.getBankNo());
if (resultB != null) {
if (!resultB) {
if (Boolean.FALSE.equals(resultB)) {
errorCheck.append("姓名&银行卡号不一致;");
}
} else {
......@@ -3519,7 +3517,14 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
}
// 手机号码(紧急联系人)
if (Common.isNotNull(info.getTel())) {
checkPhoneInfo(errorCheck, existPhoneMap, phoneMap, info, info.getTel(), "手机号码(紧急联系人)");
resultB = phoneMap.get(info.getTel());
if (resultB != null) {
if (Boolean.FALSE.equals(resultB)) {
errorCheck.append("手机号码(紧急联系人)").append("校验不通过;");
}
} else {
errorCheck.append("手机号码(紧急联系人)").append("未校验;");
}
}
if (errorCheck.length() > 0) {
info.setErrorInfo(info.getErrorInfo() + "校验未通过:" + errorCheck);
......@@ -3766,7 +3771,7 @@ public class TEmployeeInfoServiceImpl extends ServiceImpl<TEmployeeInfoMapper, T
} else {
resultB = phoneMap.get(phone);
if (resultB != null) {
if (!resultB) {
if (Boolean.FALSE.equals(resultB)) {
errorCheck.append(phoneName).append("校验不通过;");
}
} else {
......
......@@ -317,64 +317,34 @@
<select id="getTPreEmpMainAllListByWork" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TPreMainExportAllVO">
SELECT
ee.PRE_MAIN_ID mainId,ee.WORK_UNIT field44,ee.WORK_JOB field45,ee.START_DATE field46,ee.END_DATE field47
from t_pre_emp_main a join t_pre_emp_work_recording ee on a.id = ee.PRE_MAIN_ID
<where>
a.STATUS != '5'
<include refid="tPreEmpMain_where"/>
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.authSql != null and tPreEmpMain.authSql.trim() != ''">
${tPreEmpMain.authSql}
</if>
</if>
</where>
from t_pre_emp_work_recording ee
where ee.PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
ORDER BY ee.create_time desc
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.limitStart != null">
limit #{tPreEmpMain.limitStart},#{tPreEmpMain.limitEnd}
</if>
</if>
</select>
<select id="getTPreEmpMainAllListByFamily" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TPreMainExportAllVO">
SELECT
a.id mainId,ee.FAMILY_NAME field48,ee.RELATIONSHIP_SELF field49,ee.CONTRACT_TEL field50
FROM t_pre_emp_main a join t_pre_emp_family ee on a.id = ee.PRE_MAIN_ID
<where>
a.STATUS != '5'
<include refid="tPreEmpMain_where"/>
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.authSql != null and tPreEmpMain.authSql.trim() != ''">
${tPreEmpMain.authSql}
</if>
</if>
</where>
ee.PRE_MAIN_ID mainId,ee.FAMILY_NAME field48,ee.RELATIONSHIP_SELF field49,ee.CONTRACT_TEL field50
FROM t_pre_emp_family ee
where ee.PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
ORDER BY ee.create_time desc
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.limitStart != null">
limit #{tPreEmpMain.limitStart},#{tPreEmpMain.limitEnd}
</if>
</if>
</select>
<select id="getTPreEmpMainAllListByProfessional" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TPreMainExportAllVO">
SELECT
a.id mainId,ee.DECLARE_YEAR field52,ee.QUALIFICATION_TYPE field53
FROM t_pre_emp_main a join t_pre_emp_professional_qualification ee on a.id = ee.PRE_MAIN_ID
<where>
a.STATUS != '5'
<include refid="tPreEmpMain_where"/>
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.authSql != null and tPreEmpMain.authSql.trim() != ''">
${tPreEmpMain.authSql}
</if>
</if>
</where>
ee.PRE_MAIN_ID mainId,ee.DECLARE_YEAR field52,ee.QUALIFICATION_TYPE field53
FROM t_pre_emp_professional_qualification ee
where ee.PRE_MAIN_ID in
<foreach collection="preMainIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
ORDER BY ee.create_time desc
<if test="tPreEmpMain != null">
<if test="tPreEmpMain.limitStart != null">
limit #{tPreEmpMain.limitStart},#{tPreEmpMain.limitEnd}
</if>
</if>
</select>
<!-- 数量 -->
......@@ -432,11 +402,10 @@
<select id="getTEmpMainAllListTwoFamily" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TPreMainExportAllVO">
SELECT
e.emp_idcard field6
,ef.FAMILY_NAME field48,family_relation.label field49,ef.CONTRACT_TEL field50
,ef.FAMILY_NAME field48,ef.RELATIONSHIP_SELF field49,ef.CONTRACT_TEL field50
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
left join t_pre_emp_family ef on a.id=ef.PRE_MAIN_ID
left join view_sys_dict_item family_relation on family_relation.value=ef.RELATIONSHIP_SELF and family_relation.type='family_relation'
<where>
a.STATUS != '5' and ef.id is not null and EXISTS (
select 1 from (select a.EMP_IDCARD from t_pre_emp_family a left join t_pre_emp_main p on a.PRE_MAIN_ID=p.id where p.STATUS != '5' and p.id is not null GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ef.EMP_IDCARD
......@@ -469,11 +438,10 @@
<select id="getTEmpMainAllListThreeProfessional" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.TPreMainExportAllVO">
SELECT
e.emp_idcard field6
,if(e.HAVE_QUALIFICATION is null,'',if(e.HAVE_QUALIFICATION=0,'是','否')) field51,ep.DECLARE_YEAR field52,qualification_type.label field53
,if(e.HAVE_QUALIFICATION is null,'',if(e.HAVE_QUALIFICATION=0,'是','否')) field51,ep.DECLARE_YEAR field52,ep.QUALIFICATION_TYPE field53
FROM t_pre_emp_main a
left join t_pre_employee_info e on a.id=e.PRE_MAIN_ID
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'
<where>
a.STATUS != '5' and ep.id is not null and EXISTS (
select 1 from (select a.EMP_IDCARD from t_pre_emp_professional_qualification a left join t_pre_emp_main p on a.PRE_MAIN_ID=p.id where p.STATUS != '5' and p.id is not null GROUP BY a.EMP_IDCARD HAVING count(1)>1) ea where ea.EMP_IDCARD=ep.EMP_IDCARD
......
......@@ -332,7 +332,11 @@ public class TCheckBankNoServiceImpl extends ServiceImpl<TCheckBankNoMapper, TCh
}
}
} else {
noCurlist.add(check);
if (check.getBankNo().length() > 50) {
bankMap.put(check.getBankNo() + CommonConstants.DOWN_LINE_STRING + check.getName(), false);
} else {
noCurlist.add(check);
}
}
}
List<TCheckBankNo> saveList = new ArrayList<>();
......
......@@ -404,8 +404,12 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
TCheckIdCard c = new TCheckIdCard();
c.setName(name);
c.setIdCard(idCard);
List<TCheckIdCard> saveList = new ArrayList<>();
// 安全调用:
this.doSafetyApi(c, canCheck, userId);
this.doSafetyApi(c, canCheck, userId, saveList);
if (!saveList.isEmpty()) {
this.saveBatch(saveList);
}
if (CommonConstants.ONE_INT == c.getIsTrue()) {
return R.ok();
} else {
......@@ -492,6 +496,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
// 有一个错误,就不传200给前端
boolean isTrue = true;
try {
List<TCheckIdCard> saveList = new ArrayList<>();
for (TCheckIdCard c : checkList) {
if (Common.isNotNull(c.getIdCard()) && Common.isNotNull(c.getName())) {
lastCard = idCardMap.get(c.getIdCard());
......@@ -528,7 +533,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
nowApiNum++;
apiNum++;
// 安全调用:
this.doSafetyApi(c, canCheck, userId);
this.doSafetyApi(c, canCheck, userId, saveList);
returnMap.put(c.getIdCard() + CommonConstants.DOWN_LINE_STRING + c.getName(), c);
} else {
......@@ -549,6 +554,9 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
isTrue = false;
}
}
if (!saveList.isEmpty()) {
this.saveBatch(saveList);
}
} catch (Exception e) {
returnMap.clear();
trueMap.clear();
......@@ -622,7 +630,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
* @Date: 2022/6/27 17:09
* @return: void
**/
private void doSafetyApi(TCheckIdCard c, boolean canCheck, String userId) {
private void doSafetyApi(TCheckIdCard c, boolean canCheck, String userId, List<TCheckIdCard> saveList) {
TCheckIdCard check = new TCheckIdCard();
check.setIdCard(c.getIdCard());
Map<String, TCheckIdCard> checkMap = this.getAllMap(check);
......@@ -640,7 +648,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
}
} else {
// 调用花钱的
this.moneyCheck(c, canCheck, userId);
this.moneyCheck(c, canCheck, userId, saveList);
}
} else {
check = checkMap.get(c.getIdCard() + CommonConstants.DOWN_LINE_STRING + c.getName());
......@@ -650,19 +658,19 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
} else {
// 调用花钱的
this.moneyCheck(c, canCheck, userId);
this.moneyCheck(c, canCheck, userId, saveList);
}
}
}
// 调用花钱的
private void moneyCheck(TCheckIdCard c, boolean canCheck, String userId) {
private void moneyCheck(TCheckIdCard c, boolean canCheck, String userId, List<TCheckIdCard> saveList) {
// 调用花钱的
ChecksUtil.checkIdCard(c, canCheck);
c.setCreateUser(userId);
c.setCreateTime(LocalDateTime.now());
c.setType(CommonConstants.ONE_INT);
this.save(c);
saveList.add(c);
}
}
......@@ -271,8 +271,12 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
if (cur != null) {
backMap.put(check, cur);
} else {
phones.append(check).append(CommonConstants.COMMA_STRING);
noCurlist.add(check);
if (check.length() > 11) {
backMap.put(check, false);
} else {
phones.append(check).append(CommonConstants.COMMA_STRING);
noCurlist.add(check);
}
}
}
if (phones.length() > 0) {
......
......@@ -127,6 +127,10 @@ public interface CacheConstants {
* 区域数据--值
*/
String AREA_VALUE_GROUP = "area_value";
/**
* 区域数据--总-hgw-导出使用
*/
String AREA_VALUE_ALL = "area_all";
/**
* 用户登录的项目vo缓存
*/
......
......@@ -623,12 +623,16 @@ public class DiyExcelImportUtil implements Serializable {
if (Common.isNotNull(attr.dateFormat())) {
format = attr.dateFormat();
}
dateValue = DateUtil.stringDateFormat(c.trim(), format);
if (null == dateValue) {
if ("taxMonth".equals(shuName) && c.length() != 6) {
errorFormat.append(attr.name()).append(";");
} else {
startDateMap.put(shuName, dateValue);
tempStr = c.trim();
dateValue = DateUtil.stringDateFormat(c.trim(), format);
if (null == dateValue) {
errorFormat.append(attr.name()).append(";");
} else {
startDateMap.put(shuName, dateValue);
tempStr = c.trim();
}
}
}
}
......
......@@ -154,6 +154,38 @@ public class AreaController {
redisUtil.set(CacheConstants.AREA_VALUE_GROUP,labelIdMap);
}
}
/**
* @param
* @Description: 获取所有区域list
* @Author: hgw
* @Date: 2024/10/28 15:55
* @return: com.yifu.cloud.plus.v1.yifu.admin.api.vo.AreaMap
**/
@Inner
@PostMapping("/inner/getAreaMapAll")
public AreaMap getAreaMapAll() {
Map<String, String> idLabelMap = (Map<String, String>) redisUtil.get(CacheConstants.AREA_VALUE_ALL);
if (Common.isEmpty(idLabelMap)){
idLabelMap = initAreaAllRedis();
}
AreaMap map = new AreaMap();
map.setIdLabelMap(idLabelMap);
return map;
}
private Map<String, String> initAreaAllRedis() {
List<SysArea> allAreas = sysAreaService.getAllArea();
Map<String, String> idLabelMap = new HashMap<>();
if (Common.isNotNull(allAreas)) {
for (SysArea area : allAreas) {
idLabelMap.put(CacheConstants.AREA_VALUE_ALL +CommonConstants.DOWN_LINE_STRING+ area.getId(), area.getAreaName());
}
redisUtil.set(CacheConstants.AREA_VALUE_ALL, idLabelMap);
}
return idLabelMap;
}
/**
* @Author fxj
* @Description 地区map
......
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