Commit af9bcf6a authored by fangxinjiang's avatar fangxinjiang

户拆分任务:批量导入、批量更新、导出、新增、编辑-fxj

parent 7a08f069
......@@ -168,7 +168,7 @@ public class SysHouseHoldInfo extends BaseEntity {
private String handleUserName;
/**
* 类型 0 独立户 1 自
* 类型 0 独立户 1 自
*/
@ExcelAttribute(name = "类型" )
@Schema(description ="类型")
......
......@@ -128,10 +128,10 @@ public class TSocialHouseholdExportVo implements Serializable {
/**
* 单位编号
*/
@ExcelAttribute(name = "单位编号" )
@Schema(description ="单位编号")
@ExcelAttribute(name = "社保-单位编号" )
@Schema(description ="社保-单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位编号")
@ExcelProperty("社保-单位编号")
private String customerNo;
/**
......@@ -142,11 +142,10 @@ public class TSocialHouseholdExportVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位统一信用代码")
private String unitCreditCode;
/**
* 医保单位编号
*/
@ExcelAttribute(name = "医保-单位编号", maxLength = 20 )
@ExcelAttribute(name = "医保-单位编号")
@Schema(description ="医保-单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-单位编号")
......@@ -197,22 +196,25 @@ public class TSocialHouseholdExportVo implements Serializable {
/**
* 自动化配置状态 0 是 1 否
*/
@ExcelAttribute(name = "是否自动办理" )
@Schema(description ="是否自动办理")
@ExcelAttribute(name = "社保是否自动办理" )
@Schema(description ="社保是否自动办理")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否自动办理")
@ExcelProperty("社保是否自动办理")
private String autoStatus;
/**
* 医保自动化(自动化配置状态) 0 启用 1 禁用 -MVP1.7.15新增医保自动化
*/
@Schema(description ="医保自动化")
@ExcelAttribute(name = "医保是否自动办理" )
@Schema(description ="医保是否自动办理")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保是否自动办理")
private String autoStatusYsd;
/**
* 社保推送类型(是否单个接口) 0否1是(税友接口走单个还是批量,审核是否立即推送税友) MVP1.7.15 调整为社保推送类型 0批量 1单个
*/
@ExcelAttribute(name = "社保推送类型" )
@ExcelAttribute(name = "社保推送类型")
@Schema(description ="社保推送类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保推送类型")
......@@ -263,41 +265,5 @@ public class TSocialHouseholdExportVo implements Serializable {
@ExcelProperty("医保仅补缴生成材料")
private String dataFlagYsd;
/**
* 社保增员花名册模板
*/
@ExcelAttribute(name = "社保增员花名册模板" )
@Schema(description ="社保增员花名册模板")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保增员花名册模板")
private String addRosterTempYgs;
/**
* 社保减员花名册模板
*/
@ExcelAttribute(name = "社保减员花名册模板" )
@Schema(description ="社保减员花名册模板")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保减员花名册模板")
private String reduceRosterTempYgs;
/**
* 医保增员花名册模板
*/
@ExcelAttribute(name = "医保增员花名册模板" )
@Schema(description ="医保增员花名册模板")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保增员花名册模板")
private String addRosterTempYsd;
/**
* 医保减员花名册模板
*/
@ExcelAttribute(name = "医保减员花名册模板" )
@Schema(description ="医保减员花名册模板")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保减员花名册模板")
private String reduceRosterTempYsd;
}
......@@ -37,7 +37,7 @@ import java.io.Serializable;
public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/**
* 员工姓
*
*/
@Length(max = 50, message = "户名不能超过50个字符")
@ExcelAttribute(name = "户名", maxLength = 50,isNotEmpty = true)
......@@ -124,11 +124,11 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/**
* 单位编号
*/
@ExcelAttribute(name = "单位编号", maxLength = 50 )
@Length(max = 50, message = "单位编号不能超过50个字符")
@Schema(description ="单位编号")
@ExcelAttribute(name = "社保-单位编号", maxLength = 50 )
@Length(max = 50, message = "社保-单位编号不能超过50个字符")
@Schema(description ="社保-单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位编号")
@ExcelProperty("社保-单位编号")
private String customerNo;
/**
......@@ -190,29 +190,36 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保-登录密码")
private String mediclPassword;
/**
* 是否自动生成解除劳动合同书 0否1是(是的话,走单个推送,因为税友的减员接口没有批量附件的字段)
*/
@ExcelAttribute(name = "是否需要《解除劳动合同证明书》",isNotEmpty = true ,maxLength = 1,errorInfo = "是否需要《解除劳动合同证明书》不能为空")
@Schema(description ="是否自动生成解除劳动合同书")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否需要《解除劳动合同证明书》")
private String isAutoLeaveDoc;
/**
* 自动化配置状态 0 启用 1 禁用
*/
@ExcelAttribute(name = "是否自动办理", maxLength = 1,isNotEmpty = true ,errorInfo = "医保自动化不能为空")
@Schema(description ="是否自动办理")
@ExcelAttribute(name = "社保是否自动办理", maxLength = 1,isNotEmpty = true ,errorInfo = "社保是否自动办理不能为空")
@Schema(description ="社保是否自动办理")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否自动办理")
@ExcelProperty("社保是否自动办理")
private String autoStatus;
/**
* 医保自动化(自动化配置状态) 0 启用 1 禁用 -MVP1.7.15新增医保自动化
*/
@ExcelAttribute(name = "医保自动化", maxLength = 1,isNotEmpty = true ,errorInfo = "医保自动化不能为空")
@ExcelAttribute(name = "医保是否自动办理", maxLength = 1,isNotEmpty = true ,errorInfo = "医保是否自动办理不能为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保自动化")
@Schema(description ="医保自动化")
@ExcelProperty("医保是否自动办理")
@Schema(description ="医保是否自动办理")
private String autoStatusYsd;
/**
* 社保推送类型(是否单个接口) 0否1是(税友接口走单个还是批量,审核是否立即推送税友) MVP1.7.15 调整为社保推送类型 0批量 1单个
*/
@ExcelAttribute(name = "社保推送类型" ,isNotEmpty = true,readConverterExp = "0=批量,1=单个",errorInfo = "社保推送类型不能为空")
@ExcelAttribute(name = "社保推送类型" ,readConverterExp = "0=批量,1=单个",errorInfo = "社保推送类型不能为空")
@Schema(description ="社保推送类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保推送类型")
......@@ -221,7 +228,7 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/**
* 医保推送类型 0否1是 MVP1.7.15 新增医保推送类型 0批量 1单个
*/
@ExcelAttribute(name = "医保推送类型",isNotEmpty = true,readConverterExp = "0=批量,1=单个",errorInfo = "医保推送类型不能为空")
@ExcelAttribute(name = "医保推送类型",readConverterExp = "0=批量,1=单个",errorInfo = "医保推送类型不能为空")
@Schema(description ="医保推送类型")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保推送类型")
......@@ -230,7 +237,7 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/**
* 社保是否自动生成花名册 0否1是
*/
@ExcelAttribute(name = "社保是否自动生成花名册" ,isNotEmpty = true,errorInfo = "社保是否自动生成花名册不能为空")
@ExcelAttribute(name = "社保是否自动生成花名册",errorInfo = "社保是否自动生成花名册不能为空")
@Schema(description ="社保是否自动生成花名册 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保是否自动生成花名册")
......@@ -239,7 +246,7 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/**
* 医保是否自动生成花名册 0否1是
*/
@ExcelAttribute(name = "医保是否自动生成花名册" ,isNotEmpty = true,errorInfo = "医保是否自动生成花名册不能为空")
@ExcelAttribute(name = "医保是否自动生成花名册" ,errorInfo = "医保是否自动生成花名册不能为空")
@Schema(description ="医保是否自动生成花名册 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保是否自动生成花名册")
......@@ -248,7 +255,7 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/**
* 社保仅补缴生成材料 0否1是
*/
@ExcelAttribute(name = "社保仅补缴生成材料" ,isNotEmpty = true,errorInfo = "社保仅补缴生成材料不能为空")
@ExcelAttribute(name = "社保仅补缴生成材料" ,errorInfo = "社保仅补缴生成材料不能为空")
@Schema(description ="社保仅补缴生成材料 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保仅补缴生成材料")
......@@ -257,7 +264,7 @@ public class TSocialHouseholdInsertVo extends RowIndex implements Serializable {
/**
* 医保仅补缴生成材料 0否1是
*/
@ExcelAttribute(name = "医保仅补缴生成材料" ,isNotEmpty = true,errorInfo = "医保仅补缴生成材料不能为空")
@ExcelAttribute(name = "医保仅补缴生成材料" ,errorInfo = "医保仅补缴生成材料不能为空")
@Schema(description ="医保仅补缴生成材料 0否1是")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保仅补缴生成材料")
......
......@@ -122,11 +122,11 @@ public class TSocialHouseholdUpdateVo extends RowIndex implements Serializable {
/**
* 单位编号
*/
@ExcelAttribute(name = "单位编号", maxLength = 50 )
@Length(max = 50, message = "单位编号不能超过50个字符")
@Schema(description ="单位编号")
@ExcelAttribute(name = "社保-单位编号", maxLength = 50 )
@Length(max = 50, message = "社保-不能超过50个字符")
@Schema(description ="社保-单位编号")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("单位编号")
@ExcelProperty("社保-单位编号")
private String customerNo;
/**
......@@ -189,23 +189,31 @@ public class TSocialHouseholdUpdateVo extends RowIndex implements Serializable {
@ExcelProperty("医保-登录密码")
private String mediclPassword;
/**
* 是否自动生成解除劳动合同书 0否1是(是的话,走单个推送,因为税友的减员接口没有批量附件的字段)
*/
@ExcelAttribute(name = "是否自动生成解除劳动合同书",errorInfo = "是否自动生成解除劳动合同书不能为空")
@Schema(description ="是否自动生成解除劳动合同书")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("是否自动生成解除劳动合同书 0否1是")
private String isAutoLeaveDoc;
/**
* 自动化配置状态 0 是 1 否
*/
@ExcelAttribute(name = "社保自动化", maxLength = 1,isNotEmpty = true,errorInfo = "社保自动化不能为空")
@Schema(description ="社保自动化")
@ExcelAttribute(name = "社保是否自动办理", maxLength = 1,isNotEmpty = true,errorInfo = "社保是否自动办理不能为空")
@Schema(description ="社保是否自动办理")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("社保自动化")
@ExcelProperty("社保是否自动办理")
private String autoStatus;
/**
* 医保自动化(自动化配置状态) 0 启用 1 禁用 -MVP1.7.15新增医保自动化
*/
@ExcelAttribute(name = "医保自动化",isNotEmpty = true, maxLength = 1 ,errorInfo = "医保自动化不能为空")
@ExcelAttribute(name = "医保是否自动办理",isNotEmpty = true, maxLength = 1 ,errorInfo = "医保是否自动办理不能为空")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医保自动化")
@Schema(description ="医保自动化")
@ExcelProperty("医保是否自动办理")
@Schema(description ="医保是否自动办理")
private String autoStatusYsd;
/**
......
......@@ -19,11 +19,13 @@ public class HouseConfigConstants {
public static final String ERROR_TEMPLATE_ONE = "户类型只能是【自有户】或者【独立户】";
public static final String ERROR_TEMPLATE_TWO = "是否自动办理,选择是时,社保信息必须填写";
public static final String ERROR_TEMPLATE_TWO = "社保是否自动办理,选择是时,社保信息必须填写";
public static final String ERROR_TEMPLATE_TWO_TWO = "是否自动办理,选择是时,医保信息必须填写";
public static final String ERROR_TEMPLATE_TWO_TWO = "医保是否自动办理,选择是时,医保信息必须填写";
public static final String ERROR_TEMPLATE_THREE = "是否自动办理只能为【是】或者【否】";
public static final String ERROR_TEMPLATE_THREE = "社保是否自动办理只能为【是】或者【否】";
public static final String ERROR_TEMPLATE_THREE_TWO = "医保是否自动办理只能为【是】或者【否】";
public static final String ERROR_TEMPLATE_AUDIT_USER = "未找到对应的审核人信息";
public static final String ERROR_TEMPLATE_HANDLE_USER = "未找到对应的办理人信息";
......@@ -40,9 +42,33 @@ public class HouseConfigConstants {
public static final String ERROR_TEMPLATE_NINE = "社保推送类型只能是【批量】或【单个】";
public static final String ERROR_TEMPLATE_TEN = "是否自动生成花名册只能选择【是】或【否】";
public static final String ERROR_TEMPLATE_NINE_TWO = "医保推送类型只能是【批量】或【单个】";
public static final String ERROR_TEMPLATE_TEN = "社保是否自动生成花名册请选择【是】或【否】";
public static final String ERROR_TEMPLATE_ELVEN = "社保仅补缴生成材料请选择【是】或【否】";
public static final String ERROR_TEMPLATE_ELVEN_TWO = "医保仅补缴生成材料请选择【是】或【否】";
public static final String ERROR_TEMPLATE_TWELVE = "是否自动生成解除劳动合同书请选择【是】或【否】";
public static final String ERROR_TEMPLATE_THIRTEEN = "医保是否自动生成花名册请选择【是】或【否】";
public static final String ERROR_TEMPLATE_FOURTEEN = "社保推送类型不可为空";
public static final String ERROR_TEMPLATE_FIFTEEN = "社保是否自动生成花名册不可为空";
public static final String ERROR_TEMPLATE_SIXTEEN = "社保仅补缴生成材料不可为空";
public static final String ERROR_TEMPLATE_SEVENTEEN = "医保推送类型不可为空";
public static final String ERROR_TEMPLATE_EIGHTEEN = "医保是否自动生成花名册不可为空";
public static final String ERROR_TEMPLATE_NINETEEN = "医保仅补缴生成材料不可为空";
public static final String ERROR_TEMPLATE_TWENTY = "社保自动化不可为空";
public static final String ERROR_TEMPLATE_ELVEN = "仅补缴生成材料只能选择【是】或【否】";
public static final String ERROR_TEMPLATE_TWENTY_ONE = "医保自动化不可为空";
}
......@@ -721,56 +721,94 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
continue;
}
//判断户类型是否准确
if (!excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE)
&& !excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_TWO)) {
if (!HouseConfigConstants.HOUSE_TYPE_ONE.equals(excel.getHouseType())
&& !HouseConfigConstants.HOUSE_TYPE_TWO.equals(excel.getHouseType())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ONE,excel));
continue;
}
//判断是否自动办理是否准确
if (!excel.getAutoStatus().equals(CommonConstants.IS_TRUE) && !excel.getAutoStatus().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THREE,excel));
//判断是否自动生成解除劳动合同书是否准确
if (!CommonConstants.IS_TRUE.equals(excel.getIsAutoLeaveDoc()) && !CommonConstants.IS_FALSE.equals(excel.getIsAutoLeaveDoc())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWELVE,excel));
continue;
}
if (!excel.getAutoStatusYsd().equals(CommonConstants.IS_TRUE) && !excel.getAutoStatusYsd().equals(CommonConstants.IS_FALSE)) {
//判断是否自动办理是否准确
if (!CommonConstants.IS_TRUE.equals(excel.getAutoStatus()) && !CommonConstants.IS_FALSE.equals(excel.getAutoStatus())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THREE,excel));
continue;
}
//判断推送类型是否准确
if (!excel.getIsSingle().equals(CommonConstants.ZERO_STRING) && !excel.getIsSingle().equals(CommonConstants.ONE_STRING)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINE,excel));
continue;
}
if (!excel.getIsSingleYsd().equals(CommonConstants.ZERO_STRING) && !excel.getIsSingleYsd().equals(CommonConstants.ONE_STRING)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINE,excel));
continue;
}
//判断是否自动生成花名册 是否准确
if (!excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_TRUE) && !excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TEN,excel));
continue;
}
if (!excel.getRosterAutoFlagYsd().equals(CommonConstants.IS_TRUE) && !excel.getRosterAutoFlagYsd().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TEN,excel));
if (!CommonConstants.IS_TRUE.equals(excel.getAutoStatusYsd()) && !CommonConstants.IS_FALSE.equals(excel.getAutoStatusYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THREE_TWO,excel));
continue;
}
//判断是否仅补缴生成材料
if (!excel.getDataFlagYgs().equals(CommonConstants.IS_TRUE) && !excel.getDataFlagYgs().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ELVEN,excel));
continue;
//社保自动化为是时必填校验
if (CommonConstants.IS_TRUE.equals(excel.getAutoStatus())){
if (Common.isEmpty(excel.getIsSingle())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_FOURTEEN,excel));
continue;
}
//判断推送类型是否准确
if (!CommonConstants.ZERO_STRING.equals(excel.getIsSingle()) && !CommonConstants.ONE_STRING.equals(excel.getIsSingle())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINE,excel));
continue;
}
if (Common.isEmpty(excel.getRosterAutoFlagYgs())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_FIFTEEN,excel));
continue;
}
//判断是否自动生成花名册 是否准确
if (!CommonConstants.IS_TRUE.equals(excel.getRosterAutoFlagYgs()) && !CommonConstants.IS_FALSE.equals(excel.getRosterAutoFlagYgs())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TEN,excel));
continue;
}
if (Common.isEmpty(excel.getDataFlagYgs())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_SIXTEEN,excel));
continue;
}
//判断是否仅补缴生成材料
if (!CommonConstants.IS_TRUE.equals(excel.getDataFlagYgs()) && !CommonConstants.IS_FALSE.equals(excel.getDataFlagYgs())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ELVEN,excel));
continue;
}
}
if (!excel.getDataFlagYsd().equals(CommonConstants.IS_TRUE) && !excel.getDataFlagYsd().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ELVEN,excel));
continue;
//医保自动化为是时必填校验
if (CommonConstants.IS_TRUE.equals(excel.getAutoStatusYsd())){
if (Common.isEmpty(excel.getIsSingleYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_SEVENTEEN,excel));
continue;
}
if (Common.isEmpty(excel.getRosterAutoFlagYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_EIGHTEEN,excel));
continue;
}
if (Common.isEmpty(excel.getDataFlagYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINETEEN,excel));
continue;
}
//判断推送类型是否准确
if (!CommonConstants.ZERO_STRING.equals(excel.getIsSingleYsd()) && !CommonConstants.ONE_STRING.equals(excel.getIsSingleYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINE_TWO,excel));
continue;
}
//判断是否自动生成花名册 是否准确
if (!CommonConstants.IS_TRUE.equals(excel.getRosterAutoFlagYsd()) && !CommonConstants.IS_FALSE.equals(excel.getRosterAutoFlagYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THIRTEEN,excel));
continue;
}
//判断是否仅补缴生成材料
if (!CommonConstants.IS_TRUE.equals(excel.getDataFlagYsd()) && !CommonConstants.IS_FALSE.equals(excel.getDataFlagYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ELVEN_TWO,excel));
continue;
}
}
//是否自动办理,选择是时,社保和医保信息必须填写其中一个,否则导入不成功--》MVP1.7.15 选择是 社保信息必填
//选择否时,不做限制要求,可填可不填,导入时正常导入填写的字段
if (excel.getAutoStatus().equals(CommonConstants.IS_TRUE) && Common.isEmpty(excel.getSocialAccount())){
if (CommonConstants.IS_TRUE.equals(excel.getAutoStatus()) && Common.isEmpty(excel.getSocialAccount())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWO,excel));
continue;
}
//MVP1.7.15 医保是否自动办理,选择是时,医保信息必须填写,否则导入不成功
if (excel.getAutoStatusYsd().equals(CommonConstants.IS_TRUE) && Common.isEmpty(excel.getMediclAccount())){
if (CommonConstants.IS_TRUE.equals(excel.getAutoStatusYsd()) && Common.isEmpty(excel.getMediclAccount())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWO_TWO,excel));
continue;
}
......@@ -817,17 +855,35 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
continue;
}
//封装和插入数据
household.setCustomerNo(excel.getCustomerNo());
household.setCustomerNoYsd(excel.getCustomerNoYsd());
household.setAreaCode(areaMap.get(household.getCity()).getAreaCode());
household.setIsAutoLeaveDoc(excel.getIsAutoLeaveDoc().equals(CommonConstants.IS_TRUE) ? "1" : "0");
household.setAutoStatus(excel.getAutoStatus().equals(CommonConstants.IS_TRUE) ? "0" : "1");
household.setAutoStatusYsd(excel.getAutoStatusYsd().equals(CommonConstants.IS_TRUE) ? "0" : "1");
household.setType("0");
household.setHouseType(excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE) ? "1" : "0");
household.setAuditUser(null == auditUser.getUserId() ? "" : auditUser.getUserId());
household.setHandleUser(null == handlerUser.getUserId() ? "" :handlerUser.getUserId());
household.setRosterAutoFlagYgs(excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_TRUE) ? "1" : "0");
household.setRosterAutoFlagYsd(excel.getRosterAutoFlagYsd().equals(CommonConstants.IS_TRUE) ? "1" : "0");
household.setDataFlagYgs(excel.getDataFlagYgs().equals(CommonConstants.IS_TRUE) ? "1" : "0");
household.setDataFlagYsd(excel.getDataFlagYsd().equals(CommonConstants.IS_TRUE) ? "1" : "0");
if (Common.isNotNull(excel.getRosterAutoFlagYgs())){
household.setRosterAutoFlagYgs(excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
if (Common.isNotNull(excel.getDataFlagYgs())){
household.setDataFlagYgs(excel.getDataFlagYgs().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
if (Common.isNotNull(excel.getIsSingle())){
household.setIsSingle(excel.getIsSingle());
}
if (Common.isNotNull(excel.getRosterAutoFlagYsd())){
household.setRosterAutoFlagYsd(excel.getRosterAutoFlagYsd().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
if (Common.isNotNull(excel.getDataFlagYsd())){
household.setDataFlagYsd(excel.getDataFlagYsd().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
if (Common.isNotNull(excel.getIsSingleYsd())){
household.setIsSingleYsd(excel.getIsSingleYsd());
}
household.setOrganId(dicMap.get(household.getOrganName()));
baseMapper.insert(household);
// 同步审核权限、办理权限
......@@ -881,6 +937,11 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
String judgeAuth;
for (int i = 0; i < excelVOList.size(); i++) {
TSocialHouseholdUpdateVo excel = excelVOList.get(i);
//校验省市县
if (Common.isNotNull(excel.getProvince()) && Common.isEmpty(excel.getCity())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_SIX,excel));
continue;
}
info = this.getOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getType,CommonConstants.ZERO_STRING)
.eq(SysHouseHoldInfo::getName,excel.getName())
......@@ -917,11 +978,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
info.setOrganId(dicMap.get(excel.getOrganName()));
}
}
//校验省市县
if (Common.isNotNull(excel.getProvince()) && Common.isEmpty(excel.getCity())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_SIX,excel));
continue;
}
//判断模板中是否有户重复的数据
if (null == exitNameMap.get(excel.getName())) {
exitNameMap.put(excel.getName(),"1");
......@@ -930,105 +987,94 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
continue;
}
//判断户类型是否准确
if (Common.isNotNull(excel.getHouseType()) && !excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE)
&& !excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_TWO)) {
if (Common.isNotNull(excel.getHouseType()) && !HouseConfigConstants.HOUSE_TYPE_ONE.equals(excel.getHouseType())
&& !HouseConfigConstants.HOUSE_TYPE_TWO.equals(excel.getHouseType())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ONE,excel));
continue;
}
//判断社保自动化是否为空
if (Common.isEmpty(excel.getAutoStatus())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWENTY,excel));
continue;
}
//判断医保自动化是否为空
if (Common.isEmpty(excel.getAutoStatusYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWENTY_ONE,excel));
continue;
}
//判断是否自动办理是否准确
if (Common.isNotNull(excel.getAutoStatus())
&& !excel.getAutoStatus().equals(CommonConstants.IS_TRUE)
&& !excel.getAutoStatus().equals(CommonConstants.IS_FALSE)) {
&& !CommonConstants.IS_TRUE.equals(excel.getAutoStatus())
&& !CommonConstants.IS_FALSE.equals(excel.getAutoStatus())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THREE,excel));
continue;
}
if (Common.isNotNull(excel.getAutoStatusYsd())
&& !excel.getAutoStatusYsd().equals(CommonConstants.IS_TRUE)
&& !excel.getAutoStatusYsd().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THREE,excel));
&& !CommonConstants.IS_TRUE.equals(excel.getAutoStatusYsd())
&& !CommonConstants.IS_FALSE.equals(excel.getAutoStatusYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THREE_TWO,excel));
continue;
}
//判断推送类型是否准确
if (Common.isNotNull(excel.getIsSingle())
&& !excel.getIsSingle().equals(CommonConstants.ZERO_STRING)
&& !excel.getIsSingle().equals(CommonConstants.ONE_STRING)) {
&& !CommonConstants.ZERO_STRING.equals(excel.getIsSingle())
&& !CommonConstants.ONE_STRING.equals(excel.getIsSingle())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINE,excel));
continue;
}
if (Common.isNotNull(excel.getIsSingleYsd())
&& !excel.getIsSingleYsd().equals(CommonConstants.ZERO_STRING)
&& !excel.getIsSingleYsd().equals(CommonConstants.ONE_STRING)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINE,excel));
&& !CommonConstants.ZERO_STRING.equals(excel.getIsSingleYsd())
&& !CommonConstants.ONE_STRING.equals(excel.getIsSingleYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINE_TWO,excel));
continue;
}
//判断是否自动生成花名册 是否准确
if (Common.isNotNull(excel.getRosterAutoFlagYgs())
&& !excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_TRUE)
&& !excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_FALSE)) {
&& !CommonConstants.IS_TRUE.equals(excel.getRosterAutoFlagYgs())
&& !CommonConstants.IS_FALSE.equals(excel.getRosterAutoFlagYgs())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TEN,excel));
continue;
}
if (Common.isNotNull(excel.getRosterAutoFlagYsd())
&& !excel.getRosterAutoFlagYsd().equals(CommonConstants.IS_TRUE)
&& !excel.getRosterAutoFlagYsd().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TEN,excel));
&& !CommonConstants.IS_TRUE.equals(excel.getRosterAutoFlagYsd())
&& !CommonConstants.IS_FALSE.equals(excel.getRosterAutoFlagYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THIRTEEN,excel));
continue;
}
//判断是否仅补缴生成材料
if (Common.isNotNull(excel.getDataFlagYgs())
&& !excel.getDataFlagYgs().equals(CommonConstants.IS_TRUE)
&& !excel.getDataFlagYgs().equals(CommonConstants.IS_FALSE)) {
&& !CommonConstants.IS_TRUE.equals(excel.getDataFlagYgs())
&& !CommonConstants.IS_FALSE.equals(excel.getDataFlagYgs())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ELVEN,excel));
continue;
}
if (Common.isNotNull(excel.getDataFlagYsd())
&& !excel.getDataFlagYsd().equals(CommonConstants.IS_TRUE)
&& !excel.getDataFlagYsd().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ELVEN,excel));
&& !CommonConstants.IS_TRUE.equals(excel.getDataFlagYsd())
&& !CommonConstants.IS_FALSE.equals(excel.getDataFlagYsd())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ELVEN_TWO,excel));
continue;
}
//是否自动办理,选择是时,社保和医保信息必须填写其中一个,否则导入不成功 --》MVP1.7.15 社保自动化,选择否时,医保信息必须填写,否则导入不成功
//选择否时,不做限制要求,可填可不填,导入时正常导入填写的字段
if (excel.getAutoStatus().equals(CommonConstants.IS_TRUE) && Common.isEmpty(excel.getSocialAccount())){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWO,excel));
continue;
}
// MVP1.7.15 医保自动化,选择是时,医保信息必须填写,否则导入不成功
if (excel.getAutoStatusYsd().equals(CommonConstants.IS_TRUE) && Common.isEmpty(excel.getMediclAccount())){
if (Common.isNotNull(excel.getAutoStatus()) &&
CommonConstants.IS_TRUE.equals(excel.getAutoStatus())
&& (Common.isEmpty(excel.getSocialAccount())
|| Common.isEmpty(excel.getIsSingle())
|| Common.isEmpty(excel.getDataFlagYgs())
|| Common.isEmpty(excel.getRosterAutoFlagYgs()))){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWO,excel));
continue;
}
if (!excel.getAutoStatusYsd().equals(CommonConstants.IS_TRUE) && !excel.getAutoStatusYsd().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_THREE,excel));
continue;
}
//判断推送类型是否准确
if (!excel.getIsSingle().equals(CommonConstants.ZERO_STRING) && !excel.getIsSingle().equals(CommonConstants.ONE_STRING)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINE,excel));
continue;
}
if (!excel.getIsSingleYsd().equals(CommonConstants.ZERO_STRING) && !excel.getIsSingleYsd().equals(CommonConstants.ONE_STRING)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_NINE,excel));
continue;
}
//判断是否自动生成花名册 是否准确
if (!excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_TRUE) && !excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TEN,excel));
continue;
}
if (!excel.getRosterAutoFlagYsd().equals(CommonConstants.IS_TRUE) && !excel.getRosterAutoFlagYsd().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TEN,excel));
continue;
}
//判断是否仅补缴生成材料
if (!excel.getDataFlagYgs().equals(CommonConstants.IS_TRUE) && !excel.getDataFlagYgs().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ELVEN,excel));
continue;
}
if (!excel.getDataFlagYsd().equals(CommonConstants.IS_TRUE) && !excel.getDataFlagYsd().equals(CommonConstants.IS_FALSE)) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_ELVEN,excel));
if (Common.isNotNull(excel.getAutoStatusYsd()) &&
CommonConstants.IS_TRUE.equals(excel.getAutoStatusYsd())
&& (Common.isEmpty(excel.getMediclAccount())
|| Common.isEmpty(excel.getIsSingleYsd())
|| Common.isEmpty(excel.getDataFlagYsd())
|| Common.isEmpty(excel.getRosterAutoFlagYsd()))) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), HouseConfigConstants.ERROR_TEMPLATE_TWO_TWO,excel));
continue;
}
......@@ -1131,13 +1177,21 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (Common.isNotNull(excel.getHouseType())) {
info.setHouseType(excel.getHouseType().equals(HouseConfigConstants.HOUSE_TYPE_ONE) ? "1" : "0");
}
if (Common.isNotNull(excel.getIsAutoLeaveDoc())) {
info.setIsAutoLeaveDoc(excel.getIsAutoLeaveDoc().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
if (Common.isNotNull(excel.getAutoStatus())) {
info.setAutoStatus(excel.getAutoStatus().equals(CommonConstants.IS_TRUE) ? "0" : "1");
}
if (Common.isNotNull(excel.getAutoStatusYsd())) {
info.setAutoStatusYsd(excel.getAutoStatusYsd().equals(CommonConstants.IS_TRUE) ? "0" : "1");
}
if (Common.isNotNull(excel.getIsSingle())) {
info.setIsSingle(excel.getIsSingle());
}
if (Common.isNotNull(excel.getIsSingleYsd())) {
info.setIsSingleYsd(excel.getIsSingleYsd());
}
if (Common.isNotNull(excel.getRosterAutoFlagYgs())) {
info.setRosterAutoFlagYgs(excel.getRosterAutoFlagYgs().equals(CommonConstants.IS_TRUE) ? "1" : "0");
}
......@@ -1159,6 +1213,9 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (Common.isNotNull(excel.getCustomerNo())) {
info.setCustomerNo(excel.getCustomerNo());
}
if (Common.isNotNull(excel.getCustomerNoYsd())) {
info.setCustomerNoYsd(excel.getCustomerNoYsd());
}
if (Common.isNotNull(excel.getUnitCreditCode())) {
info.setUnitCreditCode(excel.getUnitCreditCode());
}
......
......@@ -217,7 +217,14 @@
a.MEDICL_ACCOUNT mediclAccount,
"" mediclPassword,
if(a.IS_SIGN = '0','是','否') isSign,
if(a.AUTO_STATUS = '0','启用','禁用') autoStatus
if(a.AUTO_STATUS = '0','启用','禁用') autoStatus,
if(a.AUTO_STATUS_YSD = '0','启用','禁用') autoStatusYsd,
if(a.IS_SINGLE = '0','批量','单个') isSingle,
if(a.IS_SINGLE_YSD = '0','批量','单个') isSingleYsd,
if(a.ROSTER_AUTO_FLAG_YGS = '0','否','是') rosterAutoFlagYgs,
if(a.ROSTER_AUTO_FLAG_YSD = '0','否','是') rosterAutoFlagYsd,
if(a.DATA_FLAG_YGS = '0','否','是') dataFlagYgs,
if(a.DATA_FLAG_YSD = '0','否','是') dataFlagYsd
FROM sys_house_hold_info a
LEFT JOIN sys_area a1 on a1.id=a.PROVINCE
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