Commit 264828cf authored by fangxinjiang's avatar fangxinjiang

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

parents 8563859f 29f1b10b
......@@ -67,6 +67,12 @@ public class TInsuranceType extends BaseEntity {
@Length(max =50,message = "收款银行账号必须小于等于50")
private String bankNo;
/**
* 购买年龄限制 0 限制 1 不限制
*/
@Schema(description = "购买年龄限制")
private String ageLimit;
/**
* 删除标志(0:未删除,1:删除)
*/
......
......@@ -2672,12 +2672,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//年龄是否在16-70之间
if (IdCardUtil.getFullAge(param.getEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo()) > CommonConstants.SEVENTY){
param.setErrorMessage(InsurancesConstants.EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
// 保单开始日期 > 当前派单日期
if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){
......@@ -2845,6 +2839,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
//如果有年龄限制则判断年龄是否在16-70之间
if (CommonConstants.ZERO_STRING.equals(insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo()) > CommonConstants.SEVENTY)){
param.setErrorMessage(InsurancesConstants.EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
//购买标准
TInsuranceTypeStandard typeStandard = tInsuranceTypeStandardService.getOne(Wrappers.<TInsuranceTypeStandard>query().lambda()
.eq(TInsuranceTypeStandard::getBuyStandard, param.getBuyStandard())
......@@ -3034,12 +3034,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//年龄是否在16-70之间
if (IdCardUtil.getFullAge(param.getEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo()) > CommonConstants.SEVENTY){
param.setErrorMessage(InsurancesConstants.EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、购买标准
for (int j = 0; j < distinctList.size(); j++) {
InsuranceBatchParam repeat = distinctList.get(j);
......@@ -3214,6 +3209,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}else {
//如果有年龄限制则判断年龄是否在16-70之间
if (CommonConstants.ZERO_STRING.equals(insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo()) > CommonConstants.SEVENTY)){
param.setErrorMessage(InsurancesConstants.EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
//购买标准
TInsuranceTypeStandard typeStandard = tInsuranceTypeStandardService.getOne(Wrappers.<TInsuranceTypeStandard>query().lambda()
.eq(TInsuranceTypeStandard::getBuyStandard, param.getBuyStandard())
......@@ -3320,6 +3321,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceReplaceParam> listResult = new ArrayList<>();
List<InsuranceReplaceParam> listSuccess = new ArrayList<>();
List<InsuranceReplaceParam> distinctList = paramList.stream().distinct().collect(Collectors.toList());
TInsuranceType insuranceType;
TInsuranceCompany insuranceCompany;
//定义外层循环标识,方便去重的时候跳出
outer:
for (int i = 0; i < distinctList.size(); i++) {
......@@ -3403,12 +3406,28 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
listResult.add(param);
continue;
}
//年龄是否在16-70之间
if (IdCardUtil.getFullAge(param.getReplaceEmpIdcardNo()) < CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getReplaceEmpIdcardNo()) > CommonConstants.SEVENTY){
// 保险公司-险种-购买标准 是否存在
insuranceCompany = tInsuranceCompanyService.getOne(Wrappers.<TInsuranceCompany>query().lambda()
.eq(TInsuranceCompany::getCompanyName, param.getInsuranceCompanyName())
.eq(TInsuranceCompany::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceCompany).isPresent()) {
insuranceType = tInsuranceTypeService.getOne(Wrappers.<TInsuranceType>query().lambda()
.eq(TInsuranceType::getName, param.getInsuranceTypeName())
.eq(TInsuranceType::getInsuranceCompanyId, insuranceCompany.getId())
.eq(TInsuranceType::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)
);
if (Optional.ofNullable(insuranceType).isPresent() && CommonConstants.ZERO_STRING.equals(
insuranceType.getAgeLimit()) && (IdCardUtil.getFullAge(param.getEmpIdcardNo())
< CommonConstants.SIXTEEN_INT || IdCardUtil.getFullAge(param.getEmpIdcardNo())
> CommonConstants.SEVENTY)) {
param.setErrorMessage(InsurancesConstants.REPLACE_EMP_AGE_NOT_LEGITIMATE);
listResult.add(param);
continue;
}
}
if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_START_PARSE_ERROR);
......
......@@ -63,7 +63,8 @@
a.INSURANCE_COMPANY_ID as insuranceCompanyId,
a.RECEIPT_UNIT_NAME as receiptUnitName,
a.BANK_NAME as bankName,
a.BANK_NO as bankNo
a.BANK_NO as bankNo,
a.AGE_LIMIT as ageLimit
from
t_insurance_type a,
t_insurance_company b
......@@ -87,7 +88,8 @@
a.INSURANCE_COMPANY_ID as insuranceCompanyId,
a.RECEIPT_UNIT_NAME as receiptUnitName,
a.BANK_NAME as bankName,
a.BANK_NO as bankNo
a.BANK_NO as bankNo,
a.AGE_LIMIT as ageLimit
from
t_insurance_type a,
t_insurance_company b
......
package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
@Data
@TableName("fail_reason_config")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "失败原因配置")
public class FailReasonConfig extends BaseEntity {
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ExcelProperty("主键")
@Schema(description = "主键")
private String id;
/**
* 失败原因
*/
@ExcelAttribute(name = "失败原因", isNotEmpty = true, errorInfo = "失败原因不能为空", maxLength = 200)
@NotBlank(message = "失败原因不能为空")
@Length(max = 200, message = "失败原因不能超过200个字符")
@ExcelProperty("失败原因")
@Schema(description = "失败原因")
private String reason;
/**
* 关键字
*/
@ExcelAttribute(name = "关键字", maxLength = 20)
@Length(max = 20, message = "关键字不能超过20个字符")
@ExcelProperty("关键字")
@Schema(description = "关键字")
private String key;
/**
* 精简原因
*/
@ExcelAttribute(name = "精简原因", isNotEmpty = true, errorInfo = "精简原因不能为空", maxLength = 200)
@NotBlank(message = "精简原因不能为空")
@Length(max = 200, message = "精简原因不能超过200个字符")
@ExcelProperty("精简原因")
@Schema(description = "精简原因")
private String simpleReason;
/**
* 重新办理动作 1 继续办理 2 中止办理 3 人工办理
*/
@ExcelAttribute(name = "重新办理动作", isNotEmpty = true, errorInfo = "重新办理动作不能为空", maxLength = 1)
@NotBlank(message = "重新办理动作不能为空")
@Length(max = 1, message = "重新办理动作不能超过1个字符")
@ExcelProperty("重新办理动作")
@Schema(description = "重新办理动作")
private String replay;
/**
* 状态 0 正常 1 禁用
*/
@ExcelAttribute(name = "状态", maxLength = 1)
@Length(max = 1, message = "状态不能超过1个字符")
@ExcelProperty("状态")
@Schema(description = "状态")
private String status;
}
\ No newline at end of file
......@@ -203,6 +203,12 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("公积金承办银行")
private String fundBank;
/**
* 自动化配置状态 0 启用 1 禁用
*/
@Schema(description ="自动化配置状态")
private String autoStatus;
/**
* 审核人部门
*/
......
package com.yifu.cloud.plus.v1.yifu.social.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog;
import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig;
import com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/failreasonconfig" )
@Tag(name = "失败原因配置管理")
public class FailReasonConfigController {
private final FailReasonConfigService failReasonConfigService;
/**
* 简单分页查询
* @param page 分页对象
* @param failReasonConfig 失败原因配置
* @return
*/
@Operation(description = "简单分页查询")
@GetMapping("/page")
public R<IPage<FailReasonConfig>> getFailReasonConfigPage(Page<FailReasonConfig> page, FailReasonConfig failReasonConfig) {
return new R<>(failReasonConfigService.getFailReasonConfigPage(page,failReasonConfig));
}
/**
* 通过id查询失败原因配置
* @param id id
* @return R
*/
@Operation(summary = "通过id查询", description = "通过id查询")
@GetMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('social_failreasonconfig_get')" )
public R<FailReasonConfig> getById(@PathVariable("id" ) String id) {
return R.ok(failReasonConfigService.getById(id));
}
/**
* 新增失败原因配置
* @param failReasonConfig 失败原因配置
* @return R
*/
@Operation(summary = "新增失败原因配置", description = "新增失败原因配置:hasPermission('social_failreasonconfig_add')")
@SysLog("新增失败原因配置" )
@PostMapping
@PreAuthorize("@pms.hasPermission('social_failreasonconfig_add')" )
public R<Boolean> save(@RequestBody FailReasonConfig failReasonConfig) {
return R.ok(failReasonConfigService.save(failReasonConfig));
}
/**
* 修改失败原因配置
* @param failReasonConfig 失败原因配置
* @return R
*/
@Operation(summary = "修改失败原因配置", description = "修改失败原因配置:hasPermission('social_failreasonconfig_edit')")
@SysLog("修改失败原因配置" )
@PutMapping
@PreAuthorize("@pms.hasPermission('social_failreasonconfig_edit')" )
public R<Boolean> updateById(@RequestBody FailReasonConfig failReasonConfig) {
return R.ok(failReasonConfigService.updateById(failReasonConfig));
}
/**
* 通过id删除失败原因配置
* @param id id
* @return R
*/
@Operation(summary = "通过id删除失败原因配置", description = "通过id删除失败原因配置:hasPermission('social_failreasonconfig_del')")
@SysLog("通过id删除失败原因配置" )
@DeleteMapping("/{id}" )
@PreAuthorize("@pms.hasPermission('social_failreasonconfig_del')" )
public R<Boolean> removeById(@PathVariable String id) {
return R.ok(failReasonConfigService.removeById(id));
}
}
\ No newline at end of file
......@@ -122,6 +122,25 @@ public class SysHouseHoldInfoController {
return sysHouseHoldInfoService.updateByIdAsso(sysHouseHoldInfo);
}
/**
* 修改社保户公积金户自动化配置
* @param autoStatus 户自动化配置启用禁用标识 0 启用 1 禁用
* @return R
*/
@Operation(summary = "修改社保户公积金户自动化配置", description = "修改社保户公积金户自动化配置:hasPermission('demo_syshouseholdinfo_edit')")
@SysLog("修改社保户公积金户自动化配置" )
@PostMapping("/updateAutoType")
@PreAuthorize("@pms.hasPermission('demo_syshouseholdinfo_edit')" )
public R updateAutoType(@RequestParam String id, @RequestParam String autoStatus) {
SysHouseHoldInfo sysHouseHoldInfo = sysHouseHoldInfoService.getById(id);
if (Common.isNotNull(sysHouseHoldInfo)) {
sysHouseHoldInfo.setAutoStatus(autoStatus);
sysHouseHoldInfoService.updateById(sysHouseHoldInfo);
return R.ok();
}
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
/**
* 通过id删除社保户公积金户数据
* @param id id
......
package com.yifu.cloud.plus.v1.yifu.social.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
@Mapper
public interface FailReasonConfigMapper extends BaseMapper<FailReasonConfig> {
/**
* 失败原因配置简单分页查询
* @param failReasonConfig 失败原因配置
* @return
*/
IPage<FailReasonConfig> getFailReasonConfigPage(Page<FailReasonConfig> page, @Param("failReasonConfig") FailReasonConfig failReasonConfig);
}
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
public interface FailReasonConfigService extends IService<FailReasonConfig> {
/**
* 失败原因配置简单分页查询
* @param failReasonConfig 失败原因配置
* @return
*/
IPage<FailReasonConfig> getFailReasonConfigPage(Page<FailReasonConfig> page, FailReasonConfig failReasonConfig);
}
\ No newline at end of file
package com.yifu.cloud.plus.v1.yifu.social.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig;
import com.yifu.cloud.plus.v1.yifu.social.mapper.FailReasonConfigMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.FailReasonConfigService;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
/**
* 失败原因配置
*
* @author huyc
* @date 2024-05-08 10:41:32
*/
@Log4j2
@Service
public class FailReasonConfigServiceImpl extends ServiceImpl<FailReasonConfigMapper, FailReasonConfig> implements FailReasonConfigService {
/**
* 失败原因配置简单分页查询
* @param failReasonConfig 失败原因配置
* @return
*/
@Override
public IPage<FailReasonConfig> getFailReasonConfigPage(Page<FailReasonConfig> page, FailReasonConfig failReasonConfig){
return baseMapper.getFailReasonConfigPage(page,failReasonConfig);
}
}
\ No newline at end of file
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yifu.cloud.plus.v1.yifu.social.mapper.FailReasonConfigMapper">
<resultMap id="failReasonConfigMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.FailReasonConfig">
<id property="id" column="ID"/>
<result property="reason" column="REASON"/>
<result property="key" column="KEY"/>
<result property="simpleReason" column="SIMPLE_REASON"/>
<result property="replay" column="REPLAY"/>
<result property="status" column="STATUS"/>
<result property="createTime" column="CREATE_TIME"/>
<result property="createName" column="CREATE_NAME"/>
<result property="updateTime" column="UPDATE_TIME"/>
<result property="updateBy" column="UPDATE_BY"/>
</resultMap>
<sql id="Base_Column_List">
a.ID,
a.REASON,
a.KEY,
a.SIMPLE_REASON,
a.REPLAY,
a.STATUS,
a.CREATE_TIME,
a.CREATE_NAME,
a.UPDATE_TIME,
a.UPDATE_BY
</sql>
<sql id="failReasonConfig_where">
<if test="failReasonConfig != null">
<if test="failReasonConfig.reason != null and failReasonConfig.reason.trim() != ''">
AND a.REASON LIKE concat('%',#{failReasonConfig.reason},'%')
</if>
<if test="failReasonConfig.key != null and failReasonConfig.key.trim() != ''">
AND a.KEY = #{failReasonConfig.key}
</if>
<if test="failReasonConfig.simpleReason != null and failReasonConfig.simpleReason.trim() != ''">
AND a.SIMPLE_REASON = #{failReasonConfig.simpleReason}
</if>
<if test="failReasonConfig.replay != null and failReasonConfig.replay.trim() != ''">
AND a.REPLAY = #{failReasonConfig.replay}
</if>
<if test="failReasonConfig.status != null and failReasonConfig.status.trim() != ''">
AND a.STATUS = #{failReasonConfig.status}
</if>
</if>
</sql>
<!--failReasonConfig简单分页查询-->
<select id="getFailReasonConfigPage" resultMap="failReasonConfigMap">
SELECT
<include refid="Base_Column_List"/>
FROM fail_reason_config a
<where>
1=1
<include refid="failReasonConfig_where"/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
\ No newline at end of file
......@@ -48,6 +48,7 @@
<result property="customerNo" column="CUSTOMER_NO"/>
<result property="unitCreditCode" column="UNIT_CREDIT_CODE"/>
<result property="fundBank" column="FUND_BANK"/>
<result property="autoStatus" column="AUTO_STATUS"/>
</resultMap>
<resultMap id="sysHouseHoldSingleInfoMap" type="com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo">
......@@ -81,7 +82,8 @@
a.CUSTOMER_NO,
a.UNIT_CREDIT_CODE,
a.FUND_BANK,
a.HANDLE_USER_NAME
a.HANDLE_USER_NAME,
a.AUTO_STATUS
</sql>
<sql id="sysHouseHoldInfo_where">
<if test="sysHouseHoldInfo != null">
......
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