Commit 7adb1052 authored by hongguangwu's avatar hongguangwu

1.7.24 - 户配置加是否抓取身份证,是否抓取合同

parent 3d1846bc
...@@ -455,6 +455,42 @@ public class SysHouseHoldInfo extends BaseEntity { ...@@ -455,6 +455,42 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("大专及以上学校必填") @ExcelProperty("大专及以上学校必填")
private String collegeDegreeRequired; private String collegeDegreeRequired;
/**
* 社保抓取身份证 0否1是
*/
@ExcelAttribute(name = "社保抓取身份证" )
@Schema(description ="社保抓取身份证 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保抓取身份证")
private String ygsGetCard;
/**
* 社保抓取合同 0否1是
*/
@ExcelAttribute(name = "社保抓取合同" )
@Schema(description ="社保抓取合同 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保抓取合同")
private String ygsGetContract;
/**
* 医保抓取身份证 0否1是
*/
@ExcelAttribute(name = "医保抓取身份证" )
@Schema(description ="医保抓取身份证 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保抓取身份证")
private String ysdGetCard;
/**
* 医保抓取合同 0否1是
*/
@ExcelAttribute(name = "医保抓取合同" )
@Schema(description ="医保抓取合同 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保抓取合同")
private String ysdGetContract;
/** /**
* 户与失败原因关联list * 户与失败原因关联list
......
...@@ -273,5 +273,41 @@ public class TSocialHouseholdExportVo implements Serializable { ...@@ -273,5 +273,41 @@ public class TSocialHouseholdExportVo implements Serializable {
@ExcelProperty("医保仅补缴生成材料") @ExcelProperty("医保仅补缴生成材料")
private String dataFlagYsd; private String dataFlagYsd;
/**
* 社保抓取身份证 0否1是
*/
@ExcelAttribute(name = "社保抓取身份证" )
@Schema(description ="社保抓取身份证 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保抓取身份证")
private String ygsGetCard;
/**
* 社保抓取合同 0否1是
*/
@ExcelAttribute(name = "社保抓取合同" )
@Schema(description ="社保抓取合同 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保抓取合同")
private String ygsGetContract;
/**
* 医保抓取身份证 0否1是
*/
@ExcelAttribute(name = "医保抓取身份证" )
@Schema(description ="医保抓取身份证 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保抓取身份证")
private String ysdGetCard;
/**
* 医保抓取合同 0否1是
*/
@ExcelAttribute(name = "医保抓取合同" )
@Schema(description ="医保抓取合同 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保抓取合同")
private String ysdGetContract;
} }
...@@ -297,4 +297,40 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable { ...@@ -297,4 +297,40 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
@ExcelProperty("大专及以上学校必填") @ExcelProperty("大专及以上学校必填")
private String collegeDegreeRequired; private String collegeDegreeRequired;
/**
* 社保抓取身份证 0否1是
*/
@ExcelAttribute(name = "社保抓取身份证", maxLength = 1)
@Schema(description ="社保抓取身份证 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保抓取身份证")
private String ygsGetCard;
/**
* 社保抓取合同 0否1是
*/
@ExcelAttribute(name = "社保抓取合同", maxLength = 1)
@Schema(description ="社保抓取合同 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保抓取合同")
private String ygsGetContract;
/**
* 医保抓取身份证 0否1是
*/
@ExcelAttribute(name = "医保抓取身份证", maxLength = 1)
@Schema(description ="医保抓取身份证 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保抓取身份证")
private String ysdGetCard;
/**
* 医保抓取合同 0否1是
*/
@ExcelAttribute(name = "医保抓取合同", maxLength = 1)
@Schema(description ="医保抓取合同 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保抓取合同")
private String ysdGetContract;
} }
...@@ -297,4 +297,40 @@ public class TSocialHouseholdUpdateVo extends RowIndex implements Serializable { ...@@ -297,4 +297,40 @@ public class TSocialHouseholdUpdateVo extends RowIndex implements Serializable {
@ExcelProperty("大专及以上学校必填") @ExcelProperty("大专及以上学校必填")
private String collegeDegreeRequired; private String collegeDegreeRequired;
/**
* 社保抓取身份证 0否1是
*/
@ExcelAttribute(name = "社保抓取身份证", maxLength = 1)
@Schema(description ="社保抓取身份证 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保抓取身份证")
private String ygsGetCard;
/**
* 社保抓取合同 0否1是
*/
@ExcelAttribute(name = "社保抓取合同", maxLength = 1)
@Schema(description ="社保抓取合同 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保抓取合同")
private String ygsGetContract;
/**
* 医保抓取身份证 0否1是
*/
@ExcelAttribute(name = "医保抓取身份证", maxLength = 1)
@Schema(description ="医保抓取身份证 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保抓取身份证")
private String ysdGetCard;
/**
* 医保抓取合同 0否1是
*/
@ExcelAttribute(name = "医保抓取合同", maxLength = 1)
@Schema(description ="医保抓取合同 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保抓取合同")
private String ysdGetContract;
} }
...@@ -76,4 +76,12 @@ public class HouseConfigConstants { ...@@ -76,4 +76,12 @@ public class HouseConfigConstants {
public static final String ERROR_TEMPLATE_TWENTY_TWO = "是否自动生成解除劳动合同书只能为【是】或者【否】"; public static final String ERROR_TEMPLATE_TWENTY_TWO = "是否自动生成解除劳动合同书只能为【是】或者【否】";
public static final String ERROR_TEMPLATE_TWENTY_THREE = "社保抓取身份证请选择【是】或【否】";
public static final String ERROR_TEMPLATE_TWENTY_FOUR = "社保抓取合同请选择【是】或【否】";
public static final String ERROR_TEMPLATE_TWENTY_FIVE = "医保抓取身份证请选择【是】或【否】";
public static final String ERROR_TEMPLATE_TWENTY_SIX = "医保抓取合同请选择【是】或【否】";
} }
...@@ -144,6 +144,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -144,6 +144,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
} }
//获取行政区化代码 //获取行政区化代码
this.setAreaCode(sysHouseHoldInfo, null); this.setAreaCode(sysHouseHoldInfo, null);
this.setDefaultGetFields(sysHouseHoldInfo);
List<SysHouseHoldInfoFailRes> resList = sysHouseHoldInfo.getResList(); List<SysHouseHoldInfoFailRes> resList = sysHouseHoldInfo.getResList();
// 先判断 // 先判断
...@@ -500,6 +501,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -500,6 +501,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (Common.isEmpty(hold.getTown())){ if (Common.isEmpty(hold.getTown())){
hold.setTown(CommonConstants.EMPTY_STRING); hold.setTown(CommonConstants.EMPTY_STRING);
} }
this.preserveGetFieldsOnUpdate(hold, holdInfo);
int res = baseMapper.updateById(hold); int res = baseMapper.updateById(hold);
if (res >= 0){ if (res >= 0){
//设置不记录更新日志字段 //设置不记录更新日志字段
...@@ -1098,6 +1100,12 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1098,6 +1100,12 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
continue; continue;
} }
household.setCollegeDegreeRequired(excel.getCollegeDegreeRequired().equals(CommonConstants.IS_TRUE) ? "1" : "0"); household.setCollegeDegreeRequired(excel.getCollegeDegreeRequired().equals(CommonConstants.IS_TRUE) ? "1" : "0");
String getFieldError = this.applyGetFieldsFromExcel(excel.getYgsGetCard(), excel.getYgsGetContract(),
excel.getYsdGetCard(), excel.getYsdGetContract(), household, true);
if (Common.isNotNull(getFieldError)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), getFieldError, excel));
continue;
}
baseMapper.insert(household); baseMapper.insert(household);
// 同步审核权限、办理权限 // 同步审核权限、办理权限
this.saveAuditUserOrHandleUser(household, CommonConstants.ZERO_STRING); this.saveAuditUserOrHandleUser(household, CommonConstants.ZERO_STRING);
...@@ -1381,6 +1389,12 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1381,6 +1389,12 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "'大专及以上学校必填'应为是或否",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "'大专及以上学校必填'应为是或否",excel));
continue; continue;
} }
String getFieldError = this.validateGetFieldsFromExcel(excel.getYgsGetCard(), excel.getYgsGetContract(),
excel.getYsdGetCard(), excel.getYsdGetContract());
if (Common.isNotNull(getFieldError)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), getFieldError, excel));
continue;
}
// 新老数据审核人办理人不同,先删除,再添加 // 新老数据审核人办理人不同,先删除,再添加
if (Common.isNotNull(excel.getAuditUserName()) && !excel.getAuditUserName().equals(info.getAuditUserName())) { if (Common.isNotNull(excel.getAuditUserName()) && !excel.getAuditUserName().equals(info.getAuditUserName())) {
tSocialfundHouseResService.deleteAuditUser(info); tSocialfundHouseResService.deleteAuditUser(info);
...@@ -1545,6 +1559,18 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1545,6 +1559,18 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (Common.isNotNull(excel.getCollegeDegreeRequired())) { if (Common.isNotNull(excel.getCollegeDegreeRequired())) {
info.setCollegeDegreeRequired(excel.getCollegeDegreeRequired().equals(CommonConstants.IS_TRUE) ? "1" : "0"); info.setCollegeDegreeRequired(excel.getCollegeDegreeRequired().equals(CommonConstants.IS_TRUE) ? "1" : "0");
} }
if (Common.isNotNull(excel.getYgsGetCard())) {
info.setYgsGetCard(excel.getYgsGetCard().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
if (Common.isNotNull(excel.getYgsGetContract())) {
info.setYgsGetContract(excel.getYgsGetContract().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
if (Common.isNotNull(excel.getYsdGetCard())) {
info.setYsdGetCard(excel.getYsdGetCard().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
if (Common.isNotNull(excel.getYsdGetContract())) {
info.setYsdGetContract(excel.getYsdGetContract().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
if (Common.isNotNull(excel.getAuditUserName())) { if (Common.isNotNull(excel.getAuditUserName())) {
SysUser auditUser = userMap.get(excel.getAuditUserName()); SysUser auditUser = userMap.get(excel.getAuditUserName());
info.setAuditUser(auditUser.getUserId()); info.setAuditUser(auditUser.getUserId());
...@@ -1625,4 +1651,76 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -1625,4 +1651,76 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
// 返回是否匹配结果 // 返回是否匹配结果
return !matcher.matches(); return !matcher.matches();
} }
private void setDefaultGetFields(SysHouseHoldInfo info) {
if (Common.isEmpty(info.getYgsGetCard())) {
info.setYgsGetCard(CommonConstants.ZERO_STRING);
}
if (Common.isEmpty(info.getYgsGetContract())) {
info.setYgsGetContract(CommonConstants.ZERO_STRING);
}
if (Common.isEmpty(info.getYsdGetCard())) {
info.setYsdGetCard(CommonConstants.ZERO_STRING);
}
if (Common.isEmpty(info.getYsdGetContract())) {
info.setYsdGetContract(CommonConstants.ZERO_STRING);
}
}
private void preserveGetFieldsOnUpdate(SysHouseHoldInfo hold, SysHouseHoldInfo oldInfo) {
if (Common.isEmpty(hold.getYgsGetCard())) {
hold.setYgsGetCard(oldInfo.getYgsGetCard());
}
if (Common.isEmpty(hold.getYgsGetContract())) {
hold.setYgsGetContract(oldInfo.getYgsGetContract());
}
if (Common.isEmpty(hold.getYsdGetCard())) {
hold.setYsdGetCard(oldInfo.getYsdGetCard());
}
if (Common.isEmpty(hold.getYsdGetContract())) {
hold.setYsdGetContract(oldInfo.getYsdGetContract());
}
}
private String validateGetFieldsFromExcel(String ygsGetCard, String ygsGetContract,
String ysdGetCard, String ysdGetContract) {
if (Common.isNotNull(ygsGetCard) && !Common.isEmpty(ygsGetCard.trim())
&& !CommonConstants.IS_TRUE.equals(ygsGetCard) && !CommonConstants.IS_FALSE.equals(ygsGetCard)) {
return HouseConfigConstants.ERROR_TEMPLATE_TWENTY_THREE;
}
if (Common.isNotNull(ygsGetContract) && !Common.isEmpty(ygsGetContract.trim())
&& !CommonConstants.IS_TRUE.equals(ygsGetContract) && !CommonConstants.IS_FALSE.equals(ygsGetContract)) {
return HouseConfigConstants.ERROR_TEMPLATE_TWENTY_FOUR;
}
if (Common.isNotNull(ysdGetCard) && !Common.isEmpty(ysdGetCard.trim())
&& !CommonConstants.IS_TRUE.equals(ysdGetCard) && !CommonConstants.IS_FALSE.equals(ysdGetCard)) {
return HouseConfigConstants.ERROR_TEMPLATE_TWENTY_FIVE;
}
if (Common.isNotNull(ysdGetContract) && !Common.isEmpty(ysdGetContract.trim())
&& !CommonConstants.IS_TRUE.equals(ysdGetContract) && !CommonConstants.IS_FALSE.equals(ysdGetContract)) {
return HouseConfigConstants.ERROR_TEMPLATE_TWENTY_SIX;
}
return null;
}
private String applyGetFieldsFromExcel(String ygsGetCard, String ygsGetContract,
String ysdGetCard, String ysdGetContract,
SysHouseHoldInfo household, boolean defaultWhenEmpty) {
String error = validateGetFieldsFromExcel(ygsGetCard, ygsGetContract, ysdGetCard, ysdGetContract);
if (Common.isNotNull(error)) {
return error;
}
household.setYgsGetCard(convertYesNoToFlag(ygsGetCard, defaultWhenEmpty));
household.setYgsGetContract(convertYesNoToFlag(ygsGetContract, defaultWhenEmpty));
household.setYsdGetCard(convertYesNoToFlag(ysdGetCard, defaultWhenEmpty));
household.setYsdGetContract(convertYesNoToFlag(ysdGetContract, defaultWhenEmpty));
return null;
}
private String convertYesNoToFlag(String value, boolean defaultWhenEmpty) {
if (Common.isEmpty(value)) {
return defaultWhenEmpty ? CommonConstants.ZERO_STRING : null;
}
return value.equals(CommonConstants.IS_TRUE) ? CommonConstants.ONE_STRING : CommonConstants.ZERO_STRING;
}
} }
...@@ -76,6 +76,10 @@ ...@@ -76,6 +76,10 @@
<!--MVP1.7.19 2026-01-20是否办理医保完成后才允许推送社保--> <!--MVP1.7.19 2026-01-20是否办理医保完成后才允许推送社保-->
<result property="isYsdOkPushYgs" column="IS_YSD_OK_PUSH_YGS"/> <result property="isYsdOkPushYgs" column="IS_YSD_OK_PUSH_YGS"/>
<result property="collegeDegreeRequired" column="COLLEGE_DEGREE_REQUIRED"/> <result property="collegeDegreeRequired" column="COLLEGE_DEGREE_REQUIRED"/>
<result property="ygsGetCard" column="YGS_GET_CARD"/>
<result property="ygsGetContract" column="YGS_GET_CONTRACT"/>
<result property="ysdGetCard" column="YSD_GET_CARD"/>
<result property="ysdGetContract" column="YSD_GET_CONTRACT"/>
</resultMap> </resultMap>
<resultMap id="sysHouseHoldSingleInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo"> <resultMap id="sysHouseHoldSingleInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo">
...@@ -135,6 +139,10 @@ ...@@ -135,6 +139,10 @@
,a.IS_SINGLE_YSD_PUSH ,a.IS_SINGLE_YSD_PUSH
,a.IS_YSD_OK_PUSH_YGS ,a.IS_YSD_OK_PUSH_YGS
,a.COLLEGE_DEGREE_REQUIRED ,a.COLLEGE_DEGREE_REQUIRED
,a.YGS_GET_CARD
,a.YGS_GET_CONTRACT
,a.YSD_GET_CARD
,a.YSD_GET_CONTRACT
</sql> </sql>
<sql id="sysHouseHoldInfo_where"> <sql id="sysHouseHoldInfo_where">
...@@ -285,7 +293,11 @@ ...@@ -285,7 +293,11 @@
case when a.ROSTER_AUTO_FLAG_YSD = '0' then '否' when a.ROSTER_AUTO_FLAG_YSD = '1' then '是' else '' end rosterAutoFlagYsd, case when a.ROSTER_AUTO_FLAG_YSD = '0' then '否' when a.ROSTER_AUTO_FLAG_YSD = '1' then '是' else '' end rosterAutoFlagYsd,
case when a.DATA_FLAG_YGS = '0' then '否' when a.DATA_FLAG_YGS = '1' then '是' else '' end dataFlagYgs, case when a.DATA_FLAG_YGS = '0' then '否' when a.DATA_FLAG_YGS = '1' then '是' else '' end dataFlagYgs,
case when a.DATA_FLAG_YSD = '0' then '否' when a.DATA_FLAG_YSD = '1' then '是' else '' end dataFlagYsd, case when a.DATA_FLAG_YSD = '0' then '否' when a.DATA_FLAG_YSD = '1' then '是' else '' end dataFlagYsd,
case when a.IS_AUTO_LEAVE_DOC = '0' then '否' when a.IS_AUTO_LEAVE_DOC = '1' then '是' else '' end isAutoLeaveDoc case when a.IS_AUTO_LEAVE_DOC = '0' then '否' when a.IS_AUTO_LEAVE_DOC = '1' then '是' else '' end isAutoLeaveDoc,
case when a.YGS_GET_CARD = '0' then '否' when a.YGS_GET_CARD = '1' then '是' else '' end ygsGetCard,
case when a.YGS_GET_CONTRACT = '0' then '否' when a.YGS_GET_CONTRACT = '1' then '是' else '' end ygsGetContract,
case when a.YSD_GET_CARD = '0' then '否' when a.YSD_GET_CARD = '1' then '是' else '' end ysdGetCard,
case when a.YSD_GET_CONTRACT = '0' then '否' when a.YSD_GET_CONTRACT = '1' then '是' else '' end ysdGetContract
FROM sys_house_hold_info a FROM sys_house_hold_info a
LEFT JOIN sys_area a1 on a1.id=a.PROVINCE LEFT JOIN sys_area a1 on a1.id=a.PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.CITY LEFT JOIN sys_area a2 on a2.id=a.CITY
......
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