Commit f4bc1b97 authored by fangxinjiang's avatar fangxinjiang

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

parents be903f2a c98e4f23
...@@ -34,7 +34,10 @@ import java.io.Serializable; ...@@ -34,7 +34,10 @@ import java.io.Serializable;
@Data @Data
public class TSocialHouseholdExportVo implements Serializable { public class TSocialHouseholdExportVo implements Serializable {
@ExcelAttribute(name = "账户性质" )
@Schema(description = "账户性质") @Schema(description = "账户性质")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("账户性质")
private String type; private String type;
/** /**
...@@ -176,7 +179,10 @@ public class TSocialHouseholdExportVo implements Serializable { ...@@ -176,7 +179,10 @@ public class TSocialHouseholdExportVo implements Serializable {
@ExcelProperty("医保-登录密码") @ExcelProperty("医保-登录密码")
private String mediclPassword; private String mediclPassword;
@ExcelAttribute(name = "是否配置公章" )
@Schema(description ="是否配置公章") @Schema(description ="是否配置公章")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否配置公章")
private String isSign; private String isSign;
/** /**
......
...@@ -109,11 +109,11 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable { ...@@ -109,11 +109,11 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/** /**
* 手机号 * 手机号
*/ */
@ExcelAttribute(name = "手机号", maxLength = 50,isNotEmpty = true ) @ExcelAttribute(name = "手机号", maxLength = 50,isNotEmpty = true,isInteger = true )
@Schema(description ="手机号") @Schema(description ="手机号")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号") @ExcelProperty("手机号")
private String phone; private Integer phone;
/** /**
* 类型 0 独立户 1 自由户 * 类型 0 独立户 1 自由户
......
...@@ -104,11 +104,11 @@ public class TSocialHouseholdUpdateVo extends RowIndex implements Serializable { ...@@ -104,11 +104,11 @@ public class TSocialHouseholdUpdateVo extends RowIndex implements Serializable {
/** /**
* 手机号 * 手机号
*/ */
@ExcelAttribute(name = "手机号", maxLength = 50) @ExcelAttribute(name = "手机号", maxLength = 50,isInteger = true)
@Schema(description ="手机号") @Schema(description ="手机号")
@HeadFontStyle(fontHeightInPoints = 11) @HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("手机号") @ExcelProperty("手机号")
private String phone; private Integer phone;
/** /**
* 类型 0 独立户 1 自由户 * 类型 0 独立户 1 自由户
......
package com.yifu.cloud.plus.v1.yifu.social.constants;
/**
* @author huych
* @description 户配置相关
* @date 2024/12/9
*/
public class HouseConfigConstants {
public static final String HOUSE_TYPE_ONE = "自有户";
public static final String HOUSE_TYPE_TWO = "独立户";
public static final String ERROR_SAME_HOUSE = "模板中已存在相同户名的数据";
public static final String ERROR_NOT_EXIT = "未找到对应账户性质、户名的配置";
public static final String ERROR_IS_EXIT = "对应账户性质、户名的配置已存在";
public static final String ERROR_TEMPLATE_ONE = "户类型只能是【自有户】或者【独立户】";
public static final String ERROR_TEMPLATE_TWO = "是否自动办理,选择是时,社保和医保信息必须填写其中一个";
public static final String ERROR_TEMPLATE_THREE = "是否自动办理只能为【是】或者【否】";
public static final String ERROR_TEMPLATE_FOUR = "未找到对应的审核人或办理人的人员信息";
public static final String ERROR_TEMPLATE_FIVE = "社保账户,社保密码和医保账户,医保密码的账号和密码必须都填写或者都不填写";
public static final String ERROR_TEMPLATE_SIX = "省市的信息需要填写完善!";
public static final String SUCESS = "成功";
}
...@@ -38,6 +38,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties; ...@@ -38,6 +38,7 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils; import com.yifu.cloud.plus.v1.yifu.insurances.util.BeanCopyUtils;
import com.yifu.cloud.plus.v1.yifu.social.constants.HouseConfigConstants;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo; import com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo;
...@@ -441,30 +442,31 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -441,30 +442,31 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (null == exitNameMap.get(excel.getName())) { if (null == exitNameMap.get(excel.getName())) {
exitNameMap.put(excel.getName(),"1"); exitNameMap.put(excel.getName(),"1");
} else { } else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "模板中已存在相同户名的数据",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_SAME_HOUSE,excel));
continue; continue;
} }
//判断户类型是否准确 //判断户类型是否准确
if (!excel.getHouseType().equals("自有户") && !excel.getHouseType().equals("独立户")) { if (!excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE)
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "户类型只能是【自有户】或者【独立户】",excel)); && !excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_TWO)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ONE,excel));
continue; continue;
} }
//判断是否自动办理是否准确 //判断是否自动办理是否准确
if (!excel.getAutoStatus().equals("是") && !excel.getAutoStatus().equals("否")) { if (!excel.getAutoStatus().equals(CommonConstants.IS_TRUE) && !excel.getAutoStatus().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "是否自动办理只能为【是】或者【否】",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THREE,excel));
continue; continue;
} }
//是否自动办理,选择是时,社保和医保信息必须填写其中一个,否则导入不成功 //是否自动办理,选择是时,社保和医保信息必须填写其中一个,否则导入不成功
//选择否时,不做限制要求,可填可不填,导入时正常导入填写的字段 //选择否时,不做限制要求,可填可不填,导入时正常导入填写的字段
// if (excel.getAutoStatus().equals("是") && Common.isEmpty(excel.getSocialAccount()) if (excel.getAutoStatus().equals(CommonConstants.IS_TRUE) && Common.isEmpty(excel.getSocialAccount())
// && Common.isEmpty(excel.getMediclAccount())){ && Common.isEmpty(excel.getMediclAccount())){
// errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "是否自动办理,选择是时,社保和医保信息必须填写其中一个",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWO,excel));
// continue; continue;
// } }
//判断社保、医保账户和密码的对应关系 //判断社保、医保账户和密码的对应关系
if (((Common.isEmpty(excel.getSocialAccount())) != (Common.isEmpty(excel.getSocialPassword()))) || if (((Common.isEmpty(excel.getSocialAccount())) != (Common.isEmpty(excel.getSocialPassword()))) ||
((Common.isEmpty(excel.getMediclAccount())) != (Common.isEmpty(excel.getMediclPassword())))) { ((Common.isEmpty(excel.getMediclAccount())) != (Common.isEmpty(excel.getMediclPassword())))) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "社保账户,社保密码和医保账户,医保密码的账号和密码必须都填写或者都不填写",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_FIVE,excel));
continue; continue;
} }
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda() info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
...@@ -472,25 +474,25 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -472,25 +474,25 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
.eq(SysHouseHoldInfo::getName,excel.getName()) .eq(SysHouseHoldInfo::getName,excel.getName())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (null != info){ if (null != info){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "对应账户性质、户名的配置已存在!",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_IS_EXIT,excel));
continue; continue;
} }
auditUser = userMap.get(excel.getAuditUserName()); auditUser = userMap.get(excel.getAuditUserName());
handlerUser = userMap.get(excel.getHandleUserName()); handlerUser = userMap.get(excel.getHandleUserName());
if (Common.isEmpty(auditUser) || Common.isEmpty(handlerUser)) { if (Common.isEmpty(auditUser) || Common.isEmpty(handlerUser)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到对应的审核人或办理人的人员信息",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_FOUR,excel));
continue; continue;
} }
//校验手机号准确性 //校验手机号准确性
errorMsg = checkMobile(excel.getPhone()); errorMsg = checkMobile(String.valueOf(excel.getPhone()));
if (!errorMsg.contains("成功")) { if (!errorMsg.contains(HouseConfigConstants.SUCESS)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMsg,excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMsg,excel));
continue; continue;
} }
//封装和插入数据 //封装和插入数据
household.setAutoStatus(excel.getAutoStatus().equals("是") ? "0" : "1"); household.setAutoStatus(excel.getAutoStatus().equals(CommonConstants.IS_TRUE) ? "0" : "1");
household.setType("0"); household.setType("0");
household.setHouseType(excel.getHouseType().equals("自有户") ? "0" : "1"); household.setHouseType(excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE) ? "0" : "1");
household.setAuditUser(null == auditUser.getUserId() ? "" : auditUser.getUserId()); household.setAuditUser(null == auditUser.getUserId() ? "" : auditUser.getUserId());
household.setAuditUserDeptName(null == auditUser.getDeptName() ? "" : auditUser.getDeptName()); household.setAuditUserDeptName(null == auditUser.getDeptName() ? "" : auditUser.getDeptName());
household.setHandleUser(null == handlerUser.getUserId() ? "" :handlerUser.getUserId()); household.setHandleUser(null == handlerUser.getUserId() ? "" :handlerUser.getUserId());
...@@ -536,7 +538,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -536,7 +538,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
TSocialHouseholdUpdateVo excel = excelVOList.get(i); TSocialHouseholdUpdateVo excel = excelVOList.get(i);
//校验省市县 //校验省市县
if (Common.isNotNull(excel.getProvince()) && Common.isEmpty(excel.getProvince())) { if (Common.isNotNull(excel.getProvince()) && Common.isEmpty(excel.getProvince())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "省市的信息需要填写完善!",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_SIX,excel));
continue; continue;
} }
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda() info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
...@@ -562,56 +564,67 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -562,56 +564,67 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
excel.setTown(areaMap.get(excel.getTown())); excel.setTown(areaMap.get(excel.getTown()));
} }
if (Common.isEmpty(info)){ if (Common.isEmpty(info)){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到对应账户性质、户名的配置!",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_NOT_EXIT,excel));
continue; continue;
} }
//判断模板中是否有户重复的数据 //判断模板中是否有户重复的数据
if (null == exitNameMap.get(excel.getName())) { if (null == exitNameMap.get(excel.getName())) {
exitNameMap.put(excel.getName(),"1"); exitNameMap.put(excel.getName(),"1");
} else { } else {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "模板中已存在相同户名的数据",excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_SAME_HOUSE,excel));
continue; continue;
} }
//判断户类型是否准确 //是否自动办理,选择是时,社保和医保信息必须填写其中一个,否则导入不成功
if (Common.isNotNull(excel.getHouseType()) && !excel.getHouseType().equals("自有户") //选择否时,不做限制要求,可填可不填,导入时正常导入填写的字段
&& !excel.getHouseType().equals("独立户")) { if (info.getAutoStatus().equals(CommonConstants.IS_TRUE) && excel.getAutoStatus().equals(CommonConstants.IS_TRUE) &&
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "户类型只能是【自有户】或者【独立户】",excel)); Common.isEmpty(excel.getSocialAccount()) && Common.isEmpty(excel.getMediclAccount())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWO,excel));
continue; continue;
} }
//判断是否自动办理是否准确 //判断社保、医保账户和密码的对应关系
if (!excel.getAutoStatus().equals("是") && !excel.getAutoStatus().equals("否")) { if (((Common.isEmpty(excel.getSocialAccount())) != (Common.isEmpty(excel.getSocialPassword()))) ||
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "是否自动办理只能为【是】或者【否】",excel)); ((Common.isEmpty(excel.getMediclAccount())) != (Common.isEmpty(excel.getMediclPassword())))) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_FIVE,excel));
continue;
}
//判断户类型是否准确
if (Common.isNotNull(excel.getHouseType()) && !excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE)
&& !excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_TWO)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ONE,excel));
continue; continue;
} }
if (Common.isNotNull(excel.getAuditUserName()) && Common.isEmpty(userMap.get(excel.getAuditUserName()))) { //判断是否自动办理是否准确
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到对应审核人的人员信息", excel)); if (!excel.getAutoStatus().equals(CommonConstants.IS_TRUE) && !excel.getAutoStatus().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THREE,excel));
continue; continue;
} }
if (Common.isNotNull(excel.getHandleUserName()) && Common.isEmpty(userMap.get(excel.getHandleUserName()))) { if ((Common.isNotNull(excel.getAuditUserName()) && Common.isEmpty(userMap.get(excel.getAuditUserName())))
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), "未找到对应办理人的人员信息", excel)); || (Common.isNotNull(excel.getHandleUserName()) && Common.isEmpty(userMap.get(excel.getHandleUserName())))) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_FOUR, excel));
continue; continue;
} }
//校验手机号准确性 //校验手机号准确性
if (Common.isNotNull(excel.getPhone())) { if (Common.isNotNull(excel.getPhone())) {
errorMsg = checkMobile(excel.getPhone()); errorMsg = checkMobile(String.valueOf(excel.getPhone()));
if (!errorMsg.contains("成功")) { if (!errorMsg.contains(HouseConfigConstants.SUCESS)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMsg, excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), errorMsg, excel));
continue; continue;
} }
} }
//更新数据
updateHouseInfo(excel,info,userMap);
// 新老数据审核人办理人不同,先删除,再添加 // 新老数据审核人办理人不同,先删除,再添加
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);
// 同步审核权限
this.saveAuditUserOrHandleUser(info, CommonConstants.ONE_STRING);
} }
if (Common.isNotNull(excel.getHandleUserName()) && !excel.getHandleUserName().equals(info.getHandleUserName())) { if (Common.isNotNull(excel.getHandleUserName()) && !excel.getHandleUserName().equals(info.getHandleUserName())) {
tSocialfundHouseResService.deleteHandleUser(info); tSocialfundHouseResService.deleteHandleUser(info);
} // 同步办理权限
// 同步审核权限、办理权限
this.saveAuditUserOrHandleUser(info, CommonConstants.ZERO_STRING); this.saveAuditUserOrHandleUser(info, CommonConstants.ZERO_STRING);
this.saveAuditUserOrHandleUser(info, CommonConstants.ONE_STRING); }
//更新数据
updateHouseInfo(excel,info,userMap);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.UPDATE_SUCCESS)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(),CommonConstants.UPDATE_SUCCESS));
} }
} }
...@@ -640,16 +653,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap ...@@ -640,16 +653,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
private void updateHouseInfo (TSocialHouseholdUpdateVo excel,SysHouseHoldInfo info, private void updateHouseInfo (TSocialHouseholdUpdateVo excel,SysHouseHoldInfo info,
Map<String,SysUser> userMap) { Map<String,SysUser> userMap) {
if (Common.isNotNull(excel.getHouseType())) { if (Common.isNotNull(excel.getHouseType())) {
info.setHouseType(excel.getHouseType().equals("自有户") ? "0" : "1"); info.setHouseType(excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE) ? "0" : "1");
} }
if (Common.isNotNull(excel.getAutoStatus())) { if (Common.isNotNull(excel.getAutoStatus())) {
info.setAutoStatus(excel.getAutoStatus().equals("是") ? "0" : "1"); info.setAutoStatus(excel.getAutoStatus().equals(CommonConstants.IS_TRUE) ? "0" : "1");
} }
if (Common.isNotNull(excel.getOrganName())) { if (Common.isNotNull(excel.getOrganName())) {
info.setOrganName(excel.getOrganName().trim()); info.setOrganName(excel.getOrganName().trim());
} }
if (Common.isNotNull(excel.getPhone())) { if (Common.isNotNull(excel.getPhone())) {
info.setPhone(excel.getPhone()); info.setPhone(String.valueOf(excel.getPhone()));
} }
if (Common.isNotNull(excel.getCustomerNo())) { if (Common.isNotNull(excel.getCustomerNo())) {
info.setCustomerNo(excel.getCustomerNo()); info.setCustomerNo(excel.getCustomerNo());
......
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