Commit 78057d56 authored by huyuchen's avatar huyuchen

huych-含风险项目商险不购买申请提交

parent 163c1a3f
...@@ -342,7 +342,85 @@ ...@@ -342,7 +342,85 @@
<select id="getPagePerMission" resultMap="tSettleDomainMap"> <select id="getPagePerMission" resultMap="tSettleDomainMap">
SELECT SELECT
<include refid="Base_Column_List"/> a.ID,
a.DEPART_NO,
a.DEPART_NAME,
a.IS_NEW,
a.NEW_REMARK,
a.DELETE_FLAG,
a.DP_AUDIT_FLAG,
a.OLD_ID,
a.BELONG_CONTRACT,
a.DP_AUDIT_OPINION,
a.DP_AUDIT_MAN,
a.DP_AUDIT_MAN_NAME,
a.LAST_AUDIT_DATE,
a.SERVER_ITEM,
a.INCOME_BELONG,
a.INCOME_BELONG_SUB,
a.CUSTOMER_ID,
a.CREATE_USER_NAME,
a.COMMIT_USER,
a.COMMIT_USER_NAME,
a.BALANCE,
a.INVOICE_BALANCE,
a.FIRST_PASS_FLAG,
a.FIRST_PASS_TIME,
a.PROVINCE,
a.CITY,
a.TOWN,
a.STOP_FLAG,
a.employee_num,
a.STOP_DATE,
a.STOP_REASON,
a.STOP_USER,
a.STOP_USER_NAME,
a.TYPE,
a.BUSINESS_PRIMARY_TYPE,
a.BUSINESS_SECOND_TYPE,
a.BUSINESS_THIRD_TYPE,
a.MANAGER_AUDIT_OPINION,
a.MANAGER_AUDIT_MAN,
a.MANAGER_AUDIT_MAN_NAME,
a.AUDIT_TIME,
a.MANAGER_AUDIT_TIME,
a.CREATE_TYPE,
a.RELATE_FLAG,
a.EXCEPTION_REMARK,
a.EXIST_ADVANCE_PAYMENT,
a.BACK_PAY_CYCLE,
a.CREATE_BY,
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME,
a.SOCIAL_TYPE,
a.INSURANCE_SETTLE_TYPE,
a.CUSTOMER_NO,
a.CUSTOMER_NAME,
a.UNIT_OF_OUR_COMPANY,
a.INVOICE_TITLE_SALARY,
a.INVOICE_TITLE_INSURANCE,
a.FUND_TYPE,
a.MR_SETTLE_TYPE,
a.MANAGEMENT_TAG,
a.MANAGEMENT_FEE,
a.MANAGEMENT_TYPE,
a.RISK_FUND_TAG,
a.RISK_FUND_FEE,
a.RISK_FUND_TYPE,
a.MANAGE_SERVER_ITEM,
a.RISK_SERVER_ITEM,
a.UNIT_SERIOUS_ILLNESS_PROP,
a.BPO_FLAG,
a.BU_BELONG,
a.ISSUE_STATUS,
a.FIRST_INDICATOR_BELONG,
a.SECOND_INDICATOR_BELONG,
a.LINE_TYPE,
if(a.HAS_CONTAIN_RISKS = '是','0',if(a.HAS_CONTAIN_RISKS = '否','1','')) HAS_CONTAIN_RISKS,
a.NEW_LINE,
a.DIVISION
FROM FROM
t_settle_domain a t_settle_domain a
<if test="userId != null and userId.trim() != '-999'"> <if test="userId != null and userId.trim() != '-999'">
......
...@@ -169,6 +169,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -169,6 +169,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
tInsuranceUnpurchaseApply.setCompanyFlag(deptList.stream().noneMatch(e -> e.equals(user.getDeptName())) ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING); tInsuranceUnpurchaseApply.setCompanyFlag(deptList.stream().noneMatch(e -> e.equals(user.getDeptName())) ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING);
long count = baseMapper.selectCount(Wrappers.<TInsuranceUnpurchaseApply>query().lambda() long count = baseMapper.selectCount(Wrappers.<TInsuranceUnpurchaseApply>query().lambda()
.eq(TInsuranceUnpurchaseApply::getDeptNo, tInsuranceUnpurchaseApply.getDeptNo()) .eq(TInsuranceUnpurchaseApply::getDeptNo, tInsuranceUnpurchaseApply.getDeptNo())
.eq(TInsuranceUnpurchaseApply::getReasonType, tInsuranceUnpurchaseApply.getReasonType())
.eq(TInsuranceUnpurchaseApply::getDeleteFlag, CommonConstants.ZERO_STRING) .eq(TInsuranceUnpurchaseApply::getDeleteFlag, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
tInsuranceUnpurchaseApply.setAuditFlag(count > 0 ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING); tInsuranceUnpurchaseApply.setAuditFlag(count > 0 ? CommonConstants.ZERO_STRING : CommonConstants.ONE_STRING);
...@@ -205,6 +206,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -205,6 +206,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
} }
personService.saveBatch(personList); personService.saveBatch(personList);
} }
return R.ok();
} else if (CommonConstants.TWO_STRING.equals(tInsuranceUnpurchaseApply.getSaveFlag())) { } else if (CommonConstants.TWO_STRING.equals(tInsuranceUnpurchaseApply.getSaveFlag())) {
//校验若该项目&该人员身份证号是否已经有过“已购买社保”的不购买商险明细,若有也会禁止重复提交!提示:姓名+身份证号、姓名+身份证号、已有申请记录,无需重复提交,可删除后再提交; //校验若该项目&该人员身份证号是否已经有过“已购买社保”的不购买商险明细,若有也会禁止重复提交!提示:姓名+身份证号、姓名+身份证号、已有申请记录,无需重复提交,可删除后再提交;
//校验该身份证&姓名组合的数据能否找到在途或在保的社保-工伤险数据,即是否为-“工伤”险正常参保的人员,不受项目限制,若“工伤”险皆正常在保或有在途“待审核、待办理”,则可正常提交,若未正常参保或无在途的参保数据,则提示“姓名+身份证号、姓名+身份证号无正常参保或派单中的数据,禁止提交!” //校验该身份证&姓名组合的数据能否找到在途或在保的社保-工伤险数据,即是否为-“工伤”险正常参保的人员,不受项目限制,若“工伤”险皆正常在保或有在途“待审核、待办理”,则可正常提交,若未正常参保或无在途的参保数据,则提示“姓名+身份证号、姓名+身份证号无正常参保或派单中的数据,禁止提交!”
...@@ -254,11 +256,11 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -254,11 +256,11 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
return R.failed(personList); return R.failed(personList);
} }
} }
return R.ok();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return R.failed("系统异常,保存、更新失败!"); return R.failed("系统异常,保存、更新失败!");
} }
return R.ok(tInsuranceUnpurchaseApply);
} }
@Override @Override
...@@ -307,6 +309,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -307,6 +309,7 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
exitApply = baseMapper.selectOne(Wrappers.<TInsuranceUnpurchaseApply>query().lambda() exitApply = baseMapper.selectOne(Wrappers.<TInsuranceUnpurchaseApply>query().lambda()
.eq(TInsuranceUnpurchaseApply::getDeptNo, tInsuranceUnpurchaseApply.getDeptNo()) .eq(TInsuranceUnpurchaseApply::getDeptNo, tInsuranceUnpurchaseApply.getDeptNo())
.eq(TInsuranceUnpurchaseApply::getDeleteFlag, CommonConstants.ZERO_STRING) .eq(TInsuranceUnpurchaseApply::getDeleteFlag, CommonConstants.ZERO_STRING)
.eq(TInsuranceUnpurchaseApply::getReasonType, tInsuranceUnpurchaseApply.getReasonType())
.ne(TInsuranceUnpurchaseApply::getStatus, CommonConstants.ZERO_STRING) .ne(TInsuranceUnpurchaseApply::getStatus, CommonConstants.ZERO_STRING)
.ne(TInsuranceUnpurchaseApply::getId, tInsuranceUnpurchaseApply.getId()) .ne(TInsuranceUnpurchaseApply::getId, tInsuranceUnpurchaseApply.getId())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
...@@ -325,17 +328,19 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance ...@@ -325,17 +328,19 @@ public class TInsuranceUnpurchaseApplyServiceImpl extends ServiceImpl<TInsurance
TInsuranceUnpurchasePersonCardVo cardVo = new TInsuranceUnpurchasePersonCardVo(); TInsuranceUnpurchasePersonCardVo cardVo = new TInsuranceUnpurchasePersonCardVo();
cardVo.setEmpIdcardNo(vo.getEmpIdcardNo()); cardVo.setEmpIdcardNo(vo.getEmpIdcardNo());
cardVo.setEmpName(vo.getEmpName()); cardVo.setEmpName(vo.getEmpName());
flagSocial = socialDaprUtil.selectExitSocialInjury(cardVo); if (CommonConstants.ONE_STRING.equals(tInsuranceUnpurchaseApply.getReasonType())) {
if (Common.isEmpty(flagSocial) || Boolean.TRUE.equals(flagSocial.getData())) { flagSocial = socialDaprUtil.selectExitSocialInjury(cardVo);
vo.setCode(CommonConstants.ONE_STRING); if (Common.isEmpty(flagSocial) || Boolean.TRUE.equals(flagSocial.getData())) {
vo.setMessage(vo.getEmpName() + "_" + vo.getEmpIdcardNo() + ":无正常参保或派单中的数据,禁止提交!"); vo.setCode(CommonConstants.ONE_STRING);
continue; vo.setMessage(vo.getEmpName() + "_" + vo.getEmpIdcardNo() + ":无正常参保或派单中的数据,禁止提交!");
} }
cardVo.setDeptNo(tInsuranceUnpurchaseApply.getDeptNo()); } else {
flagArc = archivesDaprUtil.selectExitEmpProject(cardVo); cardVo.setDeptNo(tInsuranceUnpurchaseApply.getDeptNo());
if (Common.isEmpty(flagArc) || Boolean.TRUE.equals(flagArc.getData())) { flagArc = archivesDaprUtil.selectExitEmpProject(cardVo);
vo.setCode(CommonConstants.ONE_STRING); if (Common.isEmpty(flagArc) || Boolean.TRUE.equals(flagArc.getData())) {
vo.setMessage(vo.getEmpName() + "_" + vo.getEmpIdcardNo() + ":人员正常在项,可项目档案减项后再次提交!"); vo.setCode(CommonConstants.ONE_STRING);
vo.setMessage(vo.getEmpName() + "_" + vo.getEmpIdcardNo() + ":人员正常在项,可项目档案减项后再次提交!");
}
} }
} }
} }
......
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