Commit 98cc04bd authored by hongguangwu's avatar hongguangwu

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

parents b2cab12b 0e84ec90
...@@ -151,4 +151,7 @@ public interface CacheConstants { ...@@ -151,4 +151,7 @@ public interface CacheConstants {
String PAYMENT_DISPATCH_BATCH_REDUCE_IMPORT = "payment_dispatch_batch_reduce_import"; String PAYMENT_DISPATCH_BATCH_REDUCE_IMPORT = "payment_dispatch_batch_reduce_import";
String PAYMENT_PRE_DISPATCH_BATCH_ADD_IMPORT = "payment_pre_dispatch_batch_add_import"; String PAYMENT_PRE_DISPATCH_BATCH_ADD_IMPORT = "payment_pre_dispatch_batch_add_import";
//社保公积金派单
String PAYMENT_DISPATCH_BATCH_IMPORT = "payment_dispatch_batch_import";
} }
...@@ -351,6 +351,8 @@ public interface CommonConstants { ...@@ -351,6 +351,8 @@ public interface CommonConstants {
// 给量大的表导出使用 // 给量大的表导出使用
int EXCEL_EXPORT_LIMIT_3 = 30000; int EXCEL_EXPORT_LIMIT_3 = 30000;
int EXCEL_EXPORT_LIMIT_1 = 10000;
String USER = "用户"; String USER = "用户";
/** /**
......
insurance.insuranceUrl=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel #insurance.insuranceUrl=http://192.168.0.228:8080/api/sys-modeling/appModelRestService/addModel
#insurance.insuranceUrl=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel insurance.insuranceUrl=http://36.7.147.19:28080/api/sys-modeling/appModelRestService/addModel
insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e insurance.insuranceFdModelId=181d73279372e5a55438a47d7436ab7e
insurance.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a insurance.insuranceFdFlowId=18267f206233f29cbd3c5ee425c9408a
insurance.insuranceDocStatus=20 insurance.insuranceDocStatus=20
......
...@@ -317,9 +317,9 @@ public class InsurancesConstants { ...@@ -317,9 +317,9 @@ public class InsurancesConstants {
*/ */
public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间"; public static final String POLICY_START_NEW_SHOULD_LESS_THAN_POLICY_END_NEW = "变更后的保单开始时间需早于保单结束时间";
/** /**
* 保单起止时间不能超过365天 * 保单起止时间不能超过一年
*/ */
public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过365天"; public static final String POLICY_DATE_NOT_MORE_THAN_365 = "保单起止时间不能超过一年";
/** /**
* 保单结束时间不能为空 * 保单结束时间不能为空
*/ */
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDate;
/**
* @author huyc
* @description 导出办理VO
* @date 2023-04-06 14:21:39
*/
@Data
@Schema(description = "导出办理VO")
public class InsuranceExportListOneVO implements Serializable {
private static final long serialVersionUID = -8159190612104775933L;
/**
* 主键
*/
private String id;
/**
* 项目名称
*/
@Schema(description = "项目名称")
private String projectName;
/**
* 项目编码
*/
@Schema(description = "项目编码")
private String deptNo;
/**
* 员工姓名
*/
@Schema(description = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(description = "员工身份证号")
private String empIdcardNo;
/**
* 投保类型, 1新增、3批增、4替换
*/
@Schema(description = " 投保类型, 1新增、3批增、4替换")
private Integer buyType;
/**
* 投保办理状态 1待投保 2投保中 3已投保 4投保退回 5 已减员
*/
@JsonIgnore
private Integer buyHandleStatus;
/**
* 购买月数
*/
@Schema(description = "购买月数")
private Long buyMonth;
/**
* 购买天数
*/
@Schema(description = "购买天数")
private Long buyDay;
/**
* 投保岗位
*/
@Schema(description = "投保岗位")
private String post;
/**
* 商险购买地省
*/
@Schema(description = "商险购买地省")
private String insuranceProvinceName;
/**
* 商险购买地市
*/
@Schema(description = "商险购买地市")
private String insuranceCityName;
/**
* 保单开始时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@Schema(description = "保单结束时间")
private LocalDate policyEnd;
/**
* 保单生效时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
@JsonIgnore
private LocalDate policyEffect;
/**
* 保险公司名称(冗余字段)
*/
@Schema(description = "保险公司名称")
private String insuranceCompanyName;
/**
* 险种名称
*/
@Schema(description = "险种名称")
private String insuranceTypeName;
/**
* 购买标准
*/
@Schema(description = "购买标准")
private String buyStandard;
/**
* 医疗额度
*/
@Schema(description = "医疗额度")
private String medicalQuota;
/**
* 身故或残疾额度
*/
@Schema(description = "身故或残疾额度")
private String dieDisableQuota;
/**
* 结算月
*/
@Schema(description = "结算月")
private String settleMonth;
/**
* 结算类型 (0、预估 1、实缴)
*/
@Schema(description = "结算类型 (0、预估 1、实缴)")
private Integer settleType;
/**
* 保单编号
*/
@Schema(description = "保单编号")
private String policyNo;
/**
* 创建人姓名
*/
@Schema(description = "创建人(派单人)")
private String createName;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 封面抬头
*/
@Schema(description = "封面抬头")
private String invoiceTitle;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
...@@ -12,6 +13,12 @@ import java.util.List; ...@@ -12,6 +13,12 @@ import java.util.List;
*/ */
@Data @Data
public class InsuranceSearchVo extends TBusinessInsuranceVo{ public class InsuranceSearchVo extends TBusinessInsuranceVo{
/**
* 商险购买地
*/
@Schema(name = "商险购买地市")
private String insuranceHandleCityName;
private List<String> idList; private List<String> idList;
/** /**
......
...@@ -206,6 +206,13 @@ public class InsuranceWarnExportVo implements Serializable { ...@@ -206,6 +206,13 @@ public class InsuranceWarnExportVo implements Serializable {
@ExcelProperty(value = "商险购买地市") @ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市") @Schema(name = "商险购买地市")
private String insuranceCityName; private String insuranceCityName;
/**
* 商险购买地
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "商险购买地市")
@Schema(name = "商险购买地市")
private String insuranceHandleCityName;
/** /**
* 是否有效 0有效 1无效 * 是否有效 0有效 1无效
*/ */
......
...@@ -227,6 +227,21 @@ public class TInsuranceDetailController { ...@@ -227,6 +227,21 @@ public class TInsuranceDetailController {
return tInsuranceDetailService.getInsuranceExportList(param,mId); return tInsuranceDetailService.getInsuranceExportList(param,mId);
} }
/**
* 导出办理(新)
*
* @author huyc
* @param param
* @return {@link R<List<InsuranceExportListOneVO>>}
*/
@Operation(summary = "导出办理(新)", description = "导出办理(新)")
@PostMapping("/getInsuranceExportOneList")
@PreAuthorize("@pms.hasPermission('handle_insure_export')")
public R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(@RequestBody InsuranceExportListParam param,
@RequestParam(required = false) String mId) {
return tInsuranceDetailService.getInsuranceExportOneList(param,mId);
}
/** /**
* 投保退回 * 投保退回
* *
......
...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo; import com.yifu.cloud.plus.v1.yifu.archives.vo.TSettleDomainSelectVo;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail; import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
...@@ -77,6 +76,24 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -77,6 +76,24 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/ */
List<InsuranceExportListVO> getInsuranceExportList(@Param("param") InsuranceExportListParam param); List<InsuranceExportListVO> getInsuranceExportList(@Param("param") InsuranceExportListParam param);
/**
* 导出办理勾选查询结果
*
* @author licancan
* @param idList
* @return {@link List<InsuranceExportListVO>}
*/
List<InsuranceExportListOneVO> getInsuranceExportOneListBySelect(@Param("idList") List<String> idList);
/**
* 导出办理非勾选查询结果
*
* @author licancan
* @param param
* @return {@link List< InsuranceExportListVO>}
*/
List<InsuranceExportListOneVO> getInsuranceExportOnetList(@Param("param") InsuranceExportListParam param);
/** /**
* 批量更新保单号 * 批量更新保单号
* *
...@@ -286,8 +303,11 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -286,8 +303,11 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, IPage<TBusinessInsuranceVo> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page,
@Param("param")InsuranceSearchVo param, @Param("param")InsuranceSearchVo param,
@Param("domains")List<TSettleDomainSelectVo> domains); @Param("domains")List<TSettleDomainSelectVo> domains);
List<TBusinessInsuranceVo> pageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<TSettleDomainSelectVo> domains);
List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO); List<InsuranceWarnExportVo> noPageDiy(@Param("param")InsuranceSearchVo searchVo,
@Param("domains")List<TSettleDomainSelectVo> listSelectVO);
int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO); int noPageCountDiy(@Param("param")InsuranceSearchVo searchVo, @Param("domains")List<TSettleDomainSelectVo> listSelectVO);
......
...@@ -143,6 +143,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> { ...@@ -143,6 +143,15 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
*/ */
R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param, String mId); R<List<InsuranceExportListVO>> getInsuranceExportList(InsuranceExportListParam param, String mId);
/**
* 导出办理(新)
*
* @author huyc
* @param param
* @return {@link R<List<InsuranceExportListVO>>}
*/
R<List<InsuranceExportListOneVO>> getInsuranceExportOneList(InsuranceExportListParam param, String mId);
/** /**
* 投保退回 * 投保退回
* *
......
...@@ -40,7 +40,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*; ...@@ -40,7 +40,9 @@ import com.yifu.cloud.plus.v1.yifu.archives.vo.*;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.redis.RedisDistributedLock;
import com.yifu.cloud.plus.v1.yifu.common.core.util.*; import com.yifu.cloud.plus.v1.yifu.common.core.util.*;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil; import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
...@@ -3364,34 +3366,49 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3364,34 +3366,49 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override @Override
public R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus, public R<List<ErrorMessage>> addApplyHandle(List<String> ids, String typeSub, String handleStatus,
String handleRemark, String socialType, String remark) { String handleRemark, String socialType, String remark) {
YifuUser user = SecurityUtils.getUser();
if (null == user) {
return R.failed(CommonConstants.USER_FAIL);
}
if (Common.isEmpty(ids)) {
return R.failed(DispatchConstants.DISPATCH_ID_NOT_EMPTY);
}
int flag;
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
//办理成功
flag = CommonConstants.ZERO_INT;
} else if (CommonConstants.TWO_STRING.equals(handleStatus)) {
//办理失败
flag = CommonConstants.ONE_INT;
} else {
return R.failed("派单办理状态参数异常:0待办理 1办理通过 2办理不通过");
}
String key = CacheConstants.PAYMENT_DISPATCH_BATCH_IMPORT + CommonConstants.DOWN_LINE_STRING +user.getId() ;
// 获取redis分布式事务锁
String requestId;
try { try {
YifuUser user = SecurityUtils.getUser(); requestId = RedisDistributedLock.getLock(key,"10");
if (null == user) {
return R.failed(CommonConstants.USER_FAIL);
}
if (Common.isEmpty(ids)) {
return R.failed(DispatchConstants.DISPATCH_ID_NOT_EMPTY);
}
int flag;
if (CommonConstants.ONE_STRING.equals(handleStatus)) {
//办理成功
flag = CommonConstants.ZERO_INT;
} else if (CommonConstants.TWO_STRING.equals(handleStatus)) {
//办理失败
flag = CommonConstants.ONE_INT;
} else {
return R.failed("派单办理状态参数异常:0待办理 1办理通过 2办理不通过");
}
List<ErrorMessage> errorInfo = addBatchApplyHandle(ids, typeSub, user, flag, handleStatus,
Common.isNullToString(handleRemark), socialType,remark);
if (errorInfo == null || errorInfo.isEmpty()) {
return R.ok(null,"办理成功!");
} else {
return R.ok(errorInfo,"派单办理结果:");
}
} catch (Exception e) { } catch (Exception e) {
log.error(DispatchConstants.DISPATCH_EXCEPTION + e.getMessage()); throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
return R.failed("数据异常,办理失败!"); }
if (Common.isNotNull(requestId)) {
try {
List<ErrorMessage> errorInfo = addBatchApplyHandle(ids, typeSub, user, flag, handleStatus,
Common.isNullToString(handleRemark), socialType, remark);
if (errorInfo == null || errorInfo.isEmpty()) {
return R.ok(null, "办理成功!");
} else {
return R.ok(errorInfo, "派单办理结果:");
}
} catch (Exception e) {
log.error(DispatchConstants.DISPATCH_EXCEPTION + e.getMessage());
return R.failed("数据异常,办理失败!");
}finally {
//主动释放锁
RedisDistributedLock.unlock(key, requestId);
}
}else {
return R.failed(ResultConstants.NO_GETLOCK_DATA);
} }
} }
......
...@@ -564,7 +564,7 @@ ...@@ -564,7 +564,7 @@
AND a.CREATE_NAME = #{tDispatchInfo.createName} AND a.CREATE_NAME = #{tDispatchInfo.createName}
</if> </if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''"> <if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND a.SOCIAL_HOUSEHOLD_NAME like CONCAT(#{tDispatchInfo.settleDomainName}, '%') AND a.SOCIAL_HOUSEHOLD_NAME like CONCAT(#{tDispatchInfo.socialHouseholdName}, '%')
</if> </if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''"> <if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND a.PROVIDENT_HOUSEHOLD_NAME like CONCAT(#{tDispatchInfo.providentHouseholdName}, '%') AND a.PROVIDENT_HOUSEHOLD_NAME like CONCAT(#{tDispatchInfo.providentHouseholdName}, '%')
......
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