Commit e17f4532 authored by hongguangwu's avatar hongguangwu

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

parents 4c9e250e 9e5d3f63
......@@ -1296,4 +1296,6 @@ public class InsurancesConstants {
*/
public static final String AGAIN_UPDATE_STATUS = "再次同步状态成功";
public static final String UPLOAD_PARAM_CHECK_FAIL="上传必要参数不能为空";
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
......@@ -106,4 +108,16 @@ public class InsuranceListParam extends BaseEntity {
@Schema(description = "购买标准结束")
private Integer buyStandardMax;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
}
......@@ -159,4 +159,16 @@ public class InsuranceListVO implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单日期")
private LocalDateTime createTime;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
}
......@@ -209,4 +209,10 @@ public class InsuranceRefundListVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("派单日期")
private LocalDateTime createTime;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
}
......@@ -85,4 +85,10 @@ public class InsuranceRefundParam extends BaseEntity implements Serializable {
*/
@Schema(description = "派单结束时间")
private String endDate;
/**
* 是否有效 0有效 1无效
*/
@Schema(description = "是否有效 0有效 1无效")
private Integer isEffect;
}
......@@ -182,7 +182,22 @@ public class InsuredListVo implements Serializable {
@Schema(description = "减员状态 1待减员 2减员中3减员退回")
@ExcelIgnore
private Integer reduceHandleStatus;
/**
* 客户名称
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description ="客户名称")
@ExcelProperty(value = "客户名称")
private String unitName;
/**
* 客户编码
*/
@HeadFontStyle(fontHeightInPoints = 11)
@Schema(description ="客户编码")
@ExcelProperty(value = "客户编码")
@ExcelIgnore
private String unitNo;
/**
* 项目编码
*/
......@@ -314,6 +329,4 @@ public class InsuredListVo implements Serializable {
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "封面抬头")
private String invoiceTitle;
}
......@@ -131,4 +131,9 @@ public class InsuredParam extends BaseEntity implements Serializable {
**/
private int limitEnd;
@Schema(description ="客户名称")
private String unitName;
@Schema(description ="客户编码")
private String unitNo;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
/**
* 商险派单信息表
*
* @author wangan
* @date 2019-07-25 12:37:57
*/
@Data
@Schema(name = "商险派单信息表")
public class TBusinessInsuranceVo implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(name = "编码")
private String id;
/**
* 员工ID
*/
@Schema(name = "新员工ID")
private String empId;
/**
* 员工编码
*/
@Schema(name = "员工编码")
private String empNo;
/**
* 员工姓名
*/
@Schema(name = "员工姓名")
private String empName;
/**
* 员工身份证号
*/
@Schema(name = "员工身份证号码")
private String empIdcardNo;
/**
* 结算部门名称中文(内部组织架构)
*/
@Schema(name = "结算主体名称")
private String settlementOrganName;
/**
* 结算部门编码(内部组织架构)
*/
@Schema(name = "结算主体编码")
private String settlementOrganNo;
/**
* 保险公司(配置项)
*/
@Schema(name = "保险公司ID")
private String insuranceCompany;
/**
* 险种(配置项)
*/
@Schema(name = "险种ID")
private String insuranceType;
/**
* 保险公司(配置项)
*/
@Schema(name = "保险公司(配置项)")
private String insuranceCompanyName;
/**
* 险种名称中文(配置项) 用于导入
*/
@Schema(name = "险种名称")
private String insuranceTypeName;
/**
* 保单开始时间
*/
@Schema(name = "保单开始时间")
private LocalDate policyStart;
/**
* 保单结束时间
*/
@Schema(name = "保单结束时间")
private LocalDate policyEnd;
/**
* 购买标准
*/
@Schema(name = "购买标准")
private String buyStandard;
/**
* 实际保费
*/
@Schema(name = "保费")
private BigDecimal buyPay;
/**
* 是否带入工资结算(0是/1否)默认0
*/
@Schema(name = "是否带入工资结算(0是/1否)默认0")
private String isAtSalary;
/**
* 创建人
*/
@Schema(name = "创建人")
private String createUser;
/**
* 创建时间
*/
@Schema(name = "创建时间")
private LocalDateTime createTime;
/**
* 状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)6:已结算 7: 结算中(工资、社保)8:扫描出账中 9 已出账 10 已退保 11 带退保 12退保中
*/
@Schema(name = "办理状态")
private String status;
/**
* 出险状态(0未出险;1已出险)
*/
@Schema(name = "出险状态(0未出险;1已出险)")
private Integer useStatus;
/**
* 保单号
*/
@Schema(name = "保单号")
private String policyNo;
/**
* 医保
*/
@Schema(name = "医保")
private BigDecimal medicalMoney;
/**
* 身故或残疾
*/
@Schema(name = "身故或残疾")
private BigDecimal deathDisabilityMoney;
/**
* 结算部门(外部)(未使用作废处理)
*/
@Schema(name = "结算部门(外部)")
private String settlementDepart;
/**
* 结算部门(内部组织架构)
*/
@Schema(name = "结算主体ID(内部组织架构)")
private String settlementOrgan;
/**
* 被替换时间
*/
@Schema(name = "被替换时间")
private LocalDateTime replaceDate;
/**
* 替换状态(1.未替换 2.替换)
*/
@Schema(name = "替换状态(1.未替换 2.替换)")
private String replaceStatus;
/**
* 结算类型(数据字典)
*/
@Schema(name = "结算类型ID(数据字典)")
private String settleType;
/**
* 办理时间
*/
@Schema(name = "办理时间")
private LocalDateTime batchDate;
/**
* 是否被通知了(1:是 / 0: 否)
*/
@Schema(name = "是否被通知了(1:是 / 0: 否)")
private String isNotice;
/**
* 结算月份
*/
@Schema(name = "结算月份")
private String settleMonth;
/**
* 发票号
*/
@Schema(name = "发票号")
private String invoiceNo;
/**
* 购买类型:新增、 短期 、批增
*/
@Schema(name = "购买类型:新增、 短期 、批增")
private String buyType;
/**
* 最后更新人
*/
@Schema(name = "最后更新人")
private String lastUpdateUser;
/**
* 最后更新时间
*/
@Schema(name = "最后更新时间")
private LocalDateTime lastUpdateTime;
/**
* 原ID(数据迁移)
*/
@Schema(name = "原ID(数据迁移)")
private Integer oldId;
/**
* 扫描商险结算单ID
*/
@Schema(name = "扫描商险结算单ID")
private String settlementFormId;
/**
* 是否作废 (0否/1是)
*/
@Schema(name = "是否作废(0否/1是)")
private String invalidFlag;
/**
* 消息提醒备注
*/
@Schema(name = "备注(未续保原因)", maxLength = 32)
private String expireRemark;
/**
* 忽略提醒 0:忽略 1:不忽略
*/
@Schema(name = "有忽略提醒 0:忽略 1:不忽略")
private String expireIgnoreFlag;
/**
* 保单生效时间
*/
@Schema(name = "保单生效时间")
private LocalDate policyEffect;
/**
* 创建人id
*/
@Schema(name = "创建人id")
private Integer createUserId;
/**
* 商险非单独结算ID(与薪资、社保结算)
*/
@Schema(name = "商险非单独结算ID(与薪资、社保结算)")
private String settlementAutoFormId;
/**
* 客户id
*/
@Schema(name = "客户id")
private String customerId;
/**
* 客户名称
*/
@Schema(name = "客户名称")
private String customerName;
/**
* 更新人id
*/
@Schema(name = "更新人id")
private Integer lastUpdateUserId;
@Schema(name = "表单ID")
private String settleFormId;
//4:非单独商险扫描结算;这个还是要单独的列-settlementAutoFormId
@Schema(name = "表单类型(0:普通工资发放;1:工程类工资发放;2:预估发放;3:单独结算;)")
private String settleFormType;
/**
* 购买类型:新增、 短期 、批增
*/
@Schema(name = "购买类型名称:新增、 短期 、批增")
private String buyTypeName;
/**
* 备注
*/
@Schema(name = "备注")
private String remark;
/**
* 商险购买地省
*/
@Schema(name = "商险购买地省")
private String businessInsuranceProv;
/**
* 商险购买地
*/
@Schema(name = "商险购买地市")
private String businessInsuranceAddr;
/**
* 商险购买地省Id
*/
@Schema(name = "商险购买地省Id")
private String businessInsuranceProvId;
/**
* 商险购买地id
*/
@Schema(name = "商险购买地市id")
private String businessInsuranceAddrId;
/**
* 失效状态 0 有效 1无效。主要用于替换
*/
@Schema(name = "失效状态 0 有效 1无效。主要用于替换")
private String validFlag;
/**
* 岗位
*/
@Length(max = 32, message = "岗位不能超过32个字符")
private String post;
/*----------------------------用于修改的所有字段---------------------------------*/
/**
* 新购买标准
*/
@Schema(name = "新购买标准")
private String newBuyStandard;
/**
* 保单新的开始时间
*/
@Schema(name = "保单新的开始时间")
private LocalDate newPolicyStart;
/**
* 保单新结束时间
*/
@Schema(name = "保单新的结束时间")
private LocalDate newPolicyEnd;
/**
* 新险种名称中文(配置项)
*/
@Schema(name = "新险种(配置项)")
private String newInsuranceTypeName;
/**
* 保险公司(配置项)
*/
@Schema(name = "保险公司(配置项)")
private String newIInsuranceCompanyName;
/**
* 新员工ID
*/
@Schema(name = "新员工ID")
private String newEmpId;
/**
* 新员工名称
*/
@Schema(name = "新员工ID")
private String newEmpName;
/**
* 新员工身份证
*/
@Schema(name = "新员工身份证")
private String newEmpIdcardNo;
/**
* 新员工项目
*/
@Schema(name = "新员工项目")
private String newSettlementOrganNo;
/**
* 新员工名称
*/
@Schema(name = "新员工名称")
private String newSettlementOrganName;
/**
* 结算类型名称中文(数据字典)用于导入
*/
@Schema(name = "结算类型(数据字典)")
private String settleTypeName;
// /**
// * 状态中文 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)6:已结算 7: 结算中(工资、社保)8:扫描出账中 9 已出账
// */
// @Schema(name = "状态 0.待提交 1.待办理 2.已提交保险公司 3.已办理 4.办理失败 5:待结算(已输入保单号)6:已结算 7: 结算中(工资、社保)8:扫描出账中 9 已出账", name = "statusName", dataType = "String")
// @ExcelAttribute(name = "状态名称")
// private String statusName
/**
* 被替换人ID
*/
@Schema(name = "被替换人ID")
private String TO_EmployID;
/*----------------------------用于展示给前端的其他数据:员工信息、部门等信息---------------------------------*/
// private TEmployeeInfoVo tEmployeeInfoVo
/*----------------查询-----------------------------------------------*
/**
* 创建时间
*/
private LocalDateTime createTimeStart;
private LocalDateTime createTimeEnd;
//替换人名称,用户展示
@Schema(name = "被替换人姓名")
private String fromEmpName;
@Schema(name = "替换人姓名")
//被替换名称,用户展示
private String toEmpName;
@Schema(name = "替换时间")
private String toReplaceTime;
//员工档案需要
/**
* 身份证-省
*/
@Schema(name = "身份证-省")
private Integer idProvince;
/**
* 身份证-市
*/
@Schema(name = "身份证-市")
private Integer idCity;
/**
* 身份证-县
*/
@Schema(name = "身份证-县")
private Integer idTown;
/**
* 档案-省
*/
@Schema(name = "档案-省")
private Integer fileProvince;
/**
* 档案-市
*/
@Schema(name = "档案-市")
private Integer fileCity;
/**
* 档案-县
*/
@Schema(name = "档案-县")
private Integer fileTown;
/**
* 员工类型
*/
@Schema(name = "员工类型")
private String empType;
/**
* 员工标签
*/
@Schema(name = "员工标签")
private String empLabel;
/**
* 手机号
*/
@Schema(name = "手机号")
private String empPhone;
/**
* 是否过期状态 0 未过期 1已过期。主要用于页面查询展示
*/
@Schema(name = "是否过期")
private String expireFlag;
/**
* 到期消息提醒批量导入是否续保
*/
@Schema(name = "是否续保", maxLength = 32)
private String renewal;
/**
* 购买月数
*/
@Schema(name = "购买月数")
private String buyMonth;
/**
* 预估保费
*/
@Schema(name = "预估保费")
private BigDecimal forecastBuyPay;
/**
* 保费结算类型:1取实际保费 2.取预估保费
*/
@Schema(name = "保费结算类型:1取实际保费 2.取预估保费")
private String settleBuyPayType;
/**
* 实际保费-预估保费 差额
*/
@Schema(name = "差额")
private BigDecimal balance;
/**
* 退保记录id
*/
@Schema(name = "退保记录id")
private String refundRecordId;
/**
* 退费金额
*/
@Schema(name = "退费金额")
private BigDecimal refundMoney;
/**
* 退费时间
*/
@Schema(name = "退费时间")
private LocalDateTime refundCreateTime;
/**
* 退费人
*/
@Schema(name = "退费人")
private String refundCreateUser;
/**
* 行业类型
*/
@Schema(name = "行业类型")
private String industryBelong;
/**
* 我司到款单位名称
*/
@Schema(name = "我司到款单位名称")
private String selfTomoneyUnitName;
/**
* 派单人所属部门
*/
@Schema(name = "派单人所属部门")
private String userDeptName;
}
package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import lombok.Data;
import java.io.Serializable;
/**
* @auther wangan
* @date 2019/12/3
* @Description: 工作台消息提醒
*/
@Data
public class WorkBanchWarnVo implements Serializable {
private static final long serialVersionUID = 1L;
//消息中文
String mesage;
//总数
int count;
//跳转url
String url;
}
package com.yifu.cloud.plus.v1.yifu.insurances.controller;
import cn.hutool.core.util.CharsetUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
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.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceDetail;
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceDetailService;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.TBusinessInsuranceVo;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.WorkBanchWarnVo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
/**
* @Author fxj
* @Date 2023/2/16
* @Description 商险提醒相关
* @Version 1.0
*/
@RestController
@RequiredArgsConstructor
@RequestMapping("/insuranceWarn")
@Tag(name = "商险提醒相关")
public class TInsurancesWarnController {
@Resource
private TInsuranceDetailService insuranceDetailService;
/**
* @Author fxj
* @Description 商险到期提醒分页查询
* @Date 16:51 2023/2/16
**/
@Operation(description = "商险到期提醒分页查询")
@GetMapping("/getExpireWarn/Vopage")
public R<IPage<TBusinessInsuranceVo>> getTBusinessInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, TBusinessInsuranceVo tBusinessInsurance) {
return insuranceDetailService.getInsuranceExpireWarnVoPage(page, tBusinessInsurance);
}
/**
* @Author fxj
* @Description 备注批量导入
* @Date 16:57 2023/2/16
**/
@Operation(description = "备注批量导入(wxhr:insurance_remark_add)")
@SysLog("备注批量导入")
@PostMapping("/remark/batchAdd")
public R<Object> remarkBatchAdd(@RequestBody String jsonString) {
/*ExcelUtil<TBusinessInsuranceVo> util1 = new ExcelUtil<>(TBusinessInsuranceVo.class);
util1.parseJsonStringToList(jsonString, BasicServiceUtil.initMapForExport(remoteSysDictService, preRemoteBasicArchivesService));
List<TBusinessInsuranceVo> businessInsuranceVoList = util1.getEntityList();
if (businessInsuranceVoList.isEmpty()) {
return Result.fail("无数据");
}
if (null != util1.getErrorInfo() && !util1.getErrorInfo().isEmpty()) {
return Result.fail(InsuranceConstant.DATA_CHECK_FAIL, util1.getErrorInfo());
}*/
return null;//insuranceDetailService.remarkBatchAdd(businessInsuranceVoList);
}
/**
* @Author fxj
* @Description 商险到期提醒分页查询导出
* @Date 16:57 2023/2/16
**/
@GetMapping("/getExpireWarn/export")
@Operation(description = "商险到期提醒分页查询导出 hasPermission('wxhr:insurance_expirewarnexport')")
@SysLog("商险到期提醒分页查询导出")
@PreAuthorize("@pms.hasPermission('wxhr:insurance_expirewarnexport')")
public void getExpireWarnExport(HttpServletResponse response, HttpServletRequest request,
@RequestParam(name = "idStr", required = false) String[] idstr,
@RequestParam(name = "exportFields", required = true) String[] exportFields, TBusinessInsuranceVo vo) {
List<TBusinessInsuranceVo> list = null;
}
/**
* @Author fxj
* @Description 到期提醒备注
* @Date 17:01 2023/2/16
**/
@Operation(description = "到期提醒备注")
@SysLog("到期提醒备注")
@PutMapping("/expireRemark")
public R<Object> expireRemark(@RequestBody TBusinessInsuranceVo vo) {
if (Common.isEmpty(vo.getId()) || Common.isEmpty(vo.getExpireRemark())) {
return R.failed(InsurancesConstants.UPLOAD_PARAM_CHECK_FAIL);
}
TInsuranceDetail entity = insuranceDetailService.getById(vo.getId());
if (entity == null) {
return R.failed("未查询到相关商险订单");
}
/* entity.setExpireRemark(vo.getExpireRemark());
entity.setLastUpdateUser(SecurityUtils.getUser().getNickName());
entity.setLastUpdateUserId(SecurityUtils.getUser().getId());
entity.setLastUpdateTime(LocalDateTime.now());*/
insuranceDetailService.updateById(entity);
return R.ok("操作成功");
}
/**
* @Author fxj
* @Description 到期提醒忽略
* @Date 17:01 2023/2/16
**/
@Operation(description = "到期提醒忽略(wxhr:insurance_expireignore)")
@SysLog("到期提醒忽略")
@PutMapping("/expireIgnore")
@PreAuthorize("@pms.hasPermission('wxhr:insurance_expireignore')")
public R<Object> expireIgnore(@RequestBody TBusinessInsuranceVo vo) {
if (Common.isEmpty(vo.getId())) {
return R.failed(InsurancesConstants.UPLOAD_PARAM_CHECK_FAIL);
}
return insuranceDetailService.expireIgnore(vo);
}
/**
* @Author fxj
* @Description 到期提醒批量忽略
* @Date 17:06 2023/2/16
**/
@Operation(description = "到期提醒批量忽略(wxhr:insurance_expireignore)")
@SysLog("到期提醒批量忽略")
@PutMapping("/batchexpireIgnore")
@PreAuthorize("@pms.hasPermission('wxhr:insurance_expireignore')")
public R<Object> batchexpireIgnore(@RequestParam("ids") String ids) {
return insuranceDetailService.batchexpireIgnore(ids);
}
/**
* @Author: wangan
* @Date: 2020/5/18
* @Description: 到期提醒忽略
* @return: com.yifu.cloud.v1.common.core.util.R
**/
/*@Operation(description = "到期提醒忽略(wxhr:insurance_expireignore)")
@SysLog("到期提醒忽略")
@PutMapping("/batchExpireIgnore")
@PreAuthorize("@pms.hasPermission('wxhr:insurance_expireignore')")
public Result<Object> batchExpireIgnoreList(@RequestBody List<TBusinessInsurance> voList) {
if (voList.isEmpty()) {
return Result.fail("无数据");
}
ArrayList<ErrorMessage> errorMessages = Lists.newArrayList();
for (int i = 0; i < voList.size(); i++) {
TBusinessInsurance vo = voList.get(i);
if (Common.isEmpty(vo.getId())) {
errorMessages.add(new ErrorMessage(i + 1, "提醒商险ID不能为空"));
continue;
}
TBusinessInsurance entity = tBusinessInsuranceService.getById(vo.getId());
if (entity == null) {
errorMessages.add(new ErrorMessage(i + 1, "未查询到相关商险订单"));
continue;
}
try {
entity.setExpireIgnoreFlag(CommonConstants.dingleDigitStrArray[0]);
entity.setLastUpdateUser(SecurityUtils.getUser().getNickName());
entity.setLastUpdateUserId(SecurityUtils.getUser().getId());
entity.setLastUpdateTime(LocalDateTime.now());
tBusinessInsuranceService.updateById(entity);
} catch (Exception e) {
log.error("执行异常", e);
errorMessages.add(new ErrorMessage(i + 1, "执行忽略失败"));
continue;
}
}
if (!errorMessages.isEmpty()) {
return Result.fail("数据条数" + voList.size(), voList, errorMessages);
}
return Result.success("数据条数" + voList.size(), voList, errorMessages);
}*/
/**
* @Author fxj
* @Description 工作台消息提醒:商险到期总数通知提醒/商险未购买总数通知提醒
* @Date 17:03 2023/2/16
**/
@Operation(description = "商险到期总数通知提醒/商险未购买总数通知提醒")
@PostMapping("/inner/workBranch/getWorkBanchInsuranceMessageWarn")
public R<List<WorkBanchWarnVo>> getExpireInsuranceWarn(@RequestBody
Integer expireInsuranceWarnNameUrlFlag,
Integer noBuyInsuranceWarnNameUrlFlag,
Integer noSettleInsuranceWarnNameUrlFlag, Boolean haveAllOrg, Integer userId) {
return insuranceDetailService.getExpireInsuranceWarn(expireInsuranceWarnNameUrlFlag, noBuyInsuranceWarnNameUrlFlag, noSettleInsuranceWarnNameUrlFlag, haveAllOrg, userId);
}
}
......@@ -4,9 +4,6 @@ package com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author licancan
......@@ -15,6 +12,4 @@ import java.util.List;
*/
@Mapper
public interface TInsuranceOperateMapper extends BaseMapper<TInsuranceOperate> {
int saveOperateInfo(@Param("list") List<TInsuranceOperate> list);
}
......@@ -509,4 +509,12 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @return:
**/
void updateSettleStatus();
R<IPage<TBusinessInsuranceVo>> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, TBusinessInsuranceVo tBusinessInsurance);
R<List<WorkBanchWarnVo>> getExpireInsuranceWarn(Integer expireInsuranceWarnNameUrlFlag, Integer noBuyInsuranceWarnNameUrlFlag, Integer noSettleInsuranceWarnNameUrlFlag, Boolean haveAllOrg, Integer userId);
R<Object> batchexpireIgnore(String ids);
R<Object> expireIgnore(TBusinessInsuranceVo vo);
}
......@@ -4,14 +4,10 @@ package com.yifu.cloud.plus.v1.yifu.insurances.service.insurance;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceOperate;
import java.util.List;
/**
* @author licancan
* @description 针对表【t_insurance_operate(商险操作表)】的数据库操作Service
* @date 2022-07-25 14:20:16
*/
public interface TInsuranceOperateService extends IService<TInsuranceOperate> {
int saveOperateInfo(List<TInsuranceOperate> list);
}
......@@ -1292,7 +1292,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//获取成功数据的remark
paramList.stream().forEach(e ->{
paramList.forEach(e ->{
if (detail.getId().equals(e.getId())){
operateList.add(e);
}
......@@ -1334,7 +1334,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//投保成功
if (CollectionUtils.isNotEmpty(collectSuccess)){
List<InsuranceHandleParam> list = new ArrayList<>();
collectSuccess.stream().forEach(e ->{
collectSuccess.forEach(e ->{
InsuranceHandleParam handleParam = new InsuranceHandleParam();
handleParam.setId(e.getId());
handleParam.setRemark(e.getRemark());
......@@ -1347,7 +1347,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//投保退回
if (CollectionUtils.isNotEmpty(collectRollBack)){
List<InsuranceHandleParam> list = new ArrayList<>();
collectRollBack.stream().forEach(e ->{
collectRollBack.forEach(e ->{
InsuranceHandleParam handleParam = new InsuranceHandleParam();
handleParam.setId(e.getId());
handleParam.setRemark(e.getRemark());
......@@ -1376,7 +1376,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
public R<List<InsuranceListVO>> successfulInsurance(YifuUser user, List<InsuranceHandleParam> paramList) {
ThreadPoolExecutor threadPool = new ThreadPoolExecutor(50, 50, 100, TimeUnit.SECONDS, new LinkedBlockingQueue<>(10));
//解析参数里的商险id
List<String> idList = paramList.stream().map(e -> e.getId()).distinct().collect(Collectors.toList());
List<String> idList = paramList.stream().map(InsuranceHandleParam::getId).distinct().collect(Collectors.toList());
//操作日志对象
List<InsuranceHandleParam> operateList = new ArrayList<>();
......@@ -1552,7 +1552,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (CollectionUtils.isNotEmpty(successList)){
for (TInsuranceDetail detail : successList) {
//获取成功数据的remark
paramList.stream().forEach(e ->{
paramList.forEach(e ->{
if (detail.getId().equals(e.getId())){
operateList.add(e);
}
......@@ -1736,18 +1736,26 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<InsuranceRegisterParam> operatList = registeredPolicyPremiumCheck(paramList,insuranceAreaResList);
//保存到数据库中的结果
List<InsuranceRegisterParam> listSuccess = operatList.stream().filter(e-> e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS)).collect(Collectors.toList());
List<TInsuranceDetail> detailList = new ArrayList<>();
BigDecimal actualMoney;
if (CollectionUtils.isNotEmpty(listSuccess)){
//商险明细更新list
List<TInsuranceDetail> detailList = new ArrayList<>();
//项目信息
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
//保单号list
List<TInsurancePolicy> policyList = new ArrayList<>();
//业务操作记录表list
List<TBusinessOperate> operateList = new ArrayList<>();
//结算信息list
List<TInsuranceSettle> settleList = new ArrayList<>();
BigDecimal actualMoney;
TSettleDomain settleDomain;
if (CollectionUtils.isNotEmpty(listSuccess)){
TInsuranceDetail detail;
List<TInsuranceReplace> list;
List<TInsuranceReplace> replaceList;
TInsuranceSettle settle;
TInsurancePolicy one;
BigDecimal bigDecimalAct;
for (InsuranceRegisterParam success : listSuccess) {
long d1 = System.currentTimeMillis();
//登记保单保费
......@@ -1782,13 +1790,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (StringUtils.isNotBlank(success.getPolicyNo())){
detail.setPolicyNo(success.getPolicyNo());
//保单号不为空,维护到保单表中
one = tInsurancePolicyService.getOne(Wrappers.<TInsurancePolicy>query().lambda()
.eq(TInsurancePolicy::getPolicyNo, success.getPolicyNo())
.eq(TInsurancePolicy::getDeleteFlag,CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL));
if (!Optional.ofNullable(one).isPresent()){
TInsurancePolicy policy = new TInsurancePolicy();
policy.setPolicyNo(success.getPolicyNo());
policy.setPolicyStart(detail.getPolicyStart());
policy.setPolicyEnd(detail.getPolicyEnd());
policy.setInsuranceCompanyName(detail.getInsuranceCompanyName());
policy.setInsuranceTypeName(detail.getInsuranceTypeName());
tInsurancePolicyService.saveTInsurancePolicy(policy);
policyList.add(policy);
//第一次新增插入变更记录表为insert,前端会将insert渲染为批量导入
TBusinessOperate operate = new TBusinessOperate();
operate.setBusinessId(policy.getId());
operate.setDifferenceInfo("insert");
operateList.add(operate);
}
//如果保单号不为空,将替换类型的保单号也全部更新
replaceList = tInsuranceReplaceService.list(Wrappers.<TInsuranceReplace>query().lambda()
......@@ -1805,20 +1825,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//如果保费不为空
if (StringUtils.isNotBlank(success.getActualPremium())){
BigDecimal bigDecimalAct = new BigDecimal(success.getActualPremium());
bigDecimalAct = new BigDecimal(success.getActualPremium());
//如果当前保单为合并结算
if (detail.getSettleType() == CommonConstants.ZERO_INT &&
StringUtils.isNotBlank(detail.getDefaultSettleId())) {
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()) {
Integer isActualPush = settle.getIsActualPush();
//如果当前实缴信息未推送,则新增实缴单推送
if (CommonConstants.ZERO_INT == isActualPush) {
if (CommonConstants.ZERO_INT == settle.getIsActualPush()) {
//保费存储
settle.setActualPremium(bigDecimalAct);
settle.setIsActualPush(CommonConstants.ZERO_INT);
settle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(settle);
settleList.add(settle);
//调EKP新增实际保费
detail.setActualPremium(bigDecimalAct);
doJointInsuranceTask.asynchronousEkpInfo(detail,settle,CommonConstants.TWO_INT);
......@@ -1829,7 +1848,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle.setActualPremium(bigDecimalAct);
settle.setIsActualPush(CommonConstants.ZERO_INT);
settle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(settle);
settleList.add(settle);
//调EKP更新实际保费
detail.setActualPremium(bigDecimalAct);
doJointInsuranceTask.asynchronousEkpInfo(detail,settle,CommonConstants.FOUR_INT);
......@@ -1838,34 +1857,34 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//如果当前保单为单独结算
} else if(detail.getSettleType() == CommonConstants.ONE_INT){
//推送过实缴信息且金额与本次不一致,则推送更新
boolean c = !Common.isNotNull(detail.getActualPremium()) ||
bigDecimalAct.compareTo(detail.getActualPremium()) != 0;
if(StringUtils.isNotBlank(detail.getDefaultSettleId()) && c){
if(StringUtils.isNotBlank(detail.getDefaultSettleId()) &&
(!Common.isNotNull(detail.getActualPremium()) ||
bigDecimalAct.compareTo(detail.getActualPremium()) != 0)){
//推送保费更新
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
settle.setActualPremium(bigDecimalAct);
settle.setIsActualPush(CommonConstants.ZERO_INT);
settle.setUpdateTime(LocalDateTime.now());
tInsuranceSettleService.updateById(settle);
settleList.add(settle);
//调EKP更新实际保费
detail.setActualPremium(bigDecimalAct);
doJointInsuranceTask.asynchronousEkpInfo(detail,settle,CommonConstants.FOUR_INT);
//未推送过实缴信息,则推送新增
} else if(StringUtils.isBlank(detail.getDefaultSettleId())){
//保费存储
settle = new TInsuranceSettle();
settle.setInsDetailId(detail.getId());
settle.setSettleType(detail.getSettleType());
settle.setSettleHandleStatus(CommonConstants.ONE_STRING);
settle.setActualPremium(bigDecimalAct);
settle.setIsActualPush(CommonConstants.ZERO_INT);
TInsuranceSettle settleNew = new TInsuranceSettle();
settleNew.setInsDetailId(detail.getId());
settleNew.setSettleType(detail.getSettleType());
settleNew.setSettleHandleStatus(CommonConstants.ONE_STRING);
settleNew.setActualPremium(bigDecimalAct);
settleNew.setIsActualPush(CommonConstants.ZERO_INT);
//调完ekp接口才会是1
settle.setCreateTime(LocalDateTime.now());
tInsuranceSettleService.save(settle);
detail.setDefaultSettleId(settle.getId());
settleNew.setCreateTime(LocalDateTime.now());
tInsuranceSettleService.save(settleNew);
detail.setDefaultSettleId(settleNew.getId());
//调EKP新增实际保费
detail.setActualPremium(bigDecimalAct);
doJointInsuranceTask.asynchronousEkpInfo(detail,settle,CommonConstants.TWO_INT);
doJointInsuranceTask.asynchronousEkpInfo(detail,settleNew,CommonConstants.TWO_INT);
}
}
}
......@@ -1979,16 +1998,29 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
long d2 = System.currentTimeMillis();
log.info("登记保单保费一条耗时:" + (d2 - d1));
}
}
mapSelectVo.clear();
//操作记录
//批量更新和插入数据
if (!detailList.isEmpty()) {
this.updateBatchById(detailList);
}
if (!settleList.isEmpty()) {
tInsuranceSettleService.updateBatchById(settleList);
settleList.clear();
}
if (!policyList.isEmpty()) {
tInsurancePolicyService.saveBatch(policyList);
policyList.clear();
}
if (!operateList.isEmpty()) {
tBusinessOperateService.saveBatch(operateList);
operateList.clear();
}
//操作记录
addOperate(detailList,user,InsurancesConstants.REGISTERED,null,CommonConstants.ONE_INT);
if (operatList.stream().allMatch(e->e.getErrorMessage().equals(CommonConstants.RESULT_DATA_SUCESS))) {
operatList = null;
}
}
return R.ok(operatList,InsurancesConstants.OPERATE_SUCCESS);
}
......@@ -3449,11 +3481,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//表内数据重复 员工姓名、员工身份证号码、保险公司、险种、起止时间、购买标准
StringBuilder errorTemp = new StringBuilder();
errorTemp.append(param.getEmpName());
errorTemp.append("_");
errorTemp.append(param.getEmpIdcardNo());
errorTemp.append("_");
errorTemp.append(param.getInsuranceCompanyName());
errorTemp.append("_");
errorTemp.append(param.getInsuranceTypeName());
errorTemp.append("_");
errorTemp.append(param.getPolicyStart());
errorTemp.append("_");
errorTemp.append(param.getPolicyEnd());
errorTemp.append("_");
errorTemp.append(param.getBuyStandard());
if (null == map.get(errorTemp.toString())) {
map.put(errorTemp.toString(),"1");
......@@ -3501,7 +3539,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
// 如果保费不存在,保单号、保费必填
if (detail.getActualPremium() == null){
if (null == detail.getActualPremium()){
if (StringUtils.isBlank(param.getPolicyNo())){
param.setErrorMessage(InsurancesConstants.POLICY_NO_EMPTY);
continue;
......@@ -3595,7 +3633,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
}
//
//保单号,发票号更新时
if(!booleanPolicyNo || !booleanInvoiceNo){
if (InsurancesConstants.SETTLE_TWO.equals(settleVo.getEstimateStatus()) || InsurancesConstants.SETTLE_TWO.equals(settleVo.getActualStatus())){
param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_THREE_NOT_REGISTERED);
......@@ -3894,7 +3932,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List<TInsuranceOperate> operateList = new ArrayList<>();
for (TInsuranceDetail detail : detailList) {
TInsuranceOperate operate = new TInsuranceOperate();
operate.setId(String.valueOf(UUID.randomUUID()).replaceAll("-", ""));
operate.setRemark(remark);
operate.setDisplayFlag(displayFlag);
operate.setInsuranceDetailId(detail.getId());
......@@ -3904,7 +3941,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operate.setCreateTime(LocalDateTime.now());
operateList.add(operate);
}
tInsuranceOperateService.saveOperateInfo(operateList);
tInsuranceOperateService.saveBatch(operateList);
}
}
......@@ -6113,11 +6150,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private List<InsuranceHandleImportParam> insuranceChangeCheck(List<InsuranceHandleImportParam> checkList, boolean flag) {
List<InsuranceHandleImportParam> distinctList = checkList.stream().distinct().collect(Collectors.toList());
//定义外层循环标识,方便去重的时候跳出
outer:
Map<String,String> map = new HashMap<>();
InsuranceHandleImportParam param;
String handType;
String remark;
TInsuranceDetail insuranceDetail;
for (int i = 0; i < distinctList.size(); i++) {
InsuranceHandleImportParam param = distinctList.get(i);
param = distinctList.get(i);
//办理结果
String handType = param.getHandType();
handType = param.getHandType();
if(StringUtils.isBlank(handType)){
param.setErrorMessage(InsurancesConstants.HAND_RESULT_IS_EMPTY);
continue;
......@@ -6127,7 +6168,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
//办理意见
String remark = param.getRemark();
remark = param.getRemark();
if(InsurancesConstants.FAILED.equals(handType) && StringUtils.isBlank(remark)){
param.setErrorMessage(InsurancesConstants.ROLLBACK_MESSAGE_IS_EMPTY);
continue;
......@@ -6137,44 +6178,37 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
//员工姓名
String empName = param.getEmpName();
if(StringUtils.isBlank(empName)){
if(StringUtils.isBlank(param.getEmpName())){
param.setErrorMessage(InsurancesConstants.EMP_NAME_NOT_EMPTY);
continue;
}
//员工身份证
String empIdCardNo = param.getEmpIdcardNo();
if(StringUtils.isBlank(empIdCardNo)){
if(StringUtils.isBlank(param.getEmpIdcardNo())){
param.setErrorMessage(InsurancesConstants.EMP_IDCARD_NO_NOT_EMPTY);
continue;
}
//保险公司名称
String insuranceCompanyName = param.getInsuranceCompanyName();
if(StringUtils.isBlank(insuranceCompanyName)){
if(StringUtils.isBlank(param.getInsuranceCompanyName())){
param.setErrorMessage(InsurancesConstants.INSURANCE_COMPANY_NAME_NOT_EMPTY);
continue;
}
//险种名称
String insuranceTypeName = param.getInsuranceTypeName();
if(StringUtils.isBlank(insuranceTypeName)){
if(StringUtils.isBlank(param.getInsuranceTypeName())){
param.setErrorMessage(InsurancesConstants.INSURANCE_TYPE_NAME_NOT_EMPTY);
continue;
}
//购买标准
String buyStandard = param.getBuyStandard();
if(StringUtils.isBlank(buyStandard)){
if(StringUtils.isBlank(param.getBuyStandard())){
param.setErrorMessage(InsurancesConstants.BUY_STANDARD_NOT_EMPTY);
continue;
}
//保单开始日期
String policyStart = param.getPolicyStart();
if(StringUtils.isBlank(policyStart)){
if(StringUtils.isBlank(param.getPolicyStart())){
param.setErrorMessage(InsurancesConstants.POLICY_START_NOT_EMPTY);
continue;
}
//保单结束日期
String policyEnd = param.getPolicyEnd();
if(StringUtils.isBlank(policyEnd)){
if(StringUtils.isBlank(param.getPolicyEnd())){
param.setErrorMessage(InsurancesConstants.POLICY_END_NOT_EMPTY);
continue;
}
......@@ -6184,50 +6218,55 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
// 保单开始日期格式校验
if(!LocalDateUtil.isDate(policyStart,LocalDateUtil.NORM_DATE_PATTERN)){
if(!LocalDateUtil.isDate(param.getPolicyStart(),LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_START_PARSE_ERROR);
continue;
}
// 保单结束日期格式校验
if(!LocalDateUtil.isDate(policyEnd,LocalDateUtil.NORM_DATE_PATTERN)){
if(!LocalDateUtil.isDate(param.getPolicyEnd(),LocalDateUtil.NORM_DATE_PATTERN)){
param.setErrorMessage(InsurancesConstants.POLICY_END_PARSE_ERROR);
continue;
}
//表内数据重复 员工姓名、员工身份证号码、保险公司名称、险种名称、保单开始日期、保单结束日期、购买标准 去重
for (int j = 0; j < distinctList.size(); j++) {
InsuranceHandleImportParam repeat = distinctList.get(j);
if (param.getEmpName().equals(repeat.getEmpName())
&& param.getEmpIdcardNo().equals(repeat.getEmpIdcardNo())
&& param.getInsuranceCompanyName().equals(repeat.getInsuranceCompanyName())
&& param.getInsuranceTypeName().equals(repeat.getInsuranceTypeName())
&& param.getPolicyStart().equals(repeat.getPolicyStart())
&& param.getPolicyEnd().equals(repeat.getPolicyEnd())
&& param.getBuyStandard().equals(repeat.getBuyStandard())
&& i != j){
StringBuilder errorTemp = new StringBuilder();
errorTemp.append(param.getEmpName());
errorTemp.append("_");
errorTemp.append(param.getEmpIdcardNo());
errorTemp.append("_");
errorTemp.append(param.getInsuranceCompanyName());
errorTemp.append("_");
errorTemp.append(param.getInsuranceTypeName());
errorTemp.append("_");
errorTemp.append(param.getPolicyStart());
errorTemp.append("_");
errorTemp.append(param.getPolicyEnd());
errorTemp.append("_");
errorTemp.append(param.getBuyStandard());
if (null == map.get(errorTemp.toString())) {
map.put(errorTemp.toString(),"1");
} else {
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
continue outer;
}
continue;
}
LambdaQueryWrapper<TInsuranceDetail> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(TInsuranceDetail::getDeleteFlag,CommonConstants.ZERO_INT)
.eq(TInsuranceDetail::getEmpName,empName)
.eq(TInsuranceDetail::getEmpIdcardNo,empIdCardNo)
.eq(TInsuranceDetail::getInsuranceTypeName,insuranceTypeName)
.eq(TInsuranceDetail::getInsuranceCompanyName,insuranceCompanyName)
.eq(TInsuranceDetail::getBuyStandard,buyStandard)
.eq(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(policyStart) )
.eq(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(policyEnd))
.eq(TInsuranceDetail::getEmpName,param.getEmpName())
.eq(TInsuranceDetail::getEmpIdcardNo,param.getEmpIdcardNo())
.eq(TInsuranceDetail::getInsuranceTypeName,param.getInsuranceTypeName())
.eq(TInsuranceDetail::getInsuranceCompanyName,param.getInsuranceCompanyName())
.eq(TInsuranceDetail::getBuyStandard,param.getBuyStandard())
.eq(TInsuranceDetail::getPolicyStart,LocalDateUtil.parseLocalDate(param.getPolicyStart()) )
.eq(TInsuranceDetail::getPolicyEnd,LocalDateUtil.parseLocalDate(param.getPolicyEnd()))
.orderByDesc(TInsuranceDetail::getUpdateTime)
.last(CommonConstants.LAST_ONE_SQL);
TInsuranceDetail insuranceDetail = getOne(queryWrapper);
insuranceDetail = getOne(queryWrapper);
//如果保单信息为空
if (Common.isEmpty(insuranceDetail)){
param.setErrorMessage(InsurancesConstants.USER_DATA_IS_NOT_EXIST);
continue;
}
String detailId = insuranceDetail.getId();
if (flag){
//减员办理
//投保办理状态
......@@ -6280,7 +6319,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
}
param.setId(detailId);
param.setId(insuranceDetail.getId());
param.setErrorMessage(CommonConstants.RESULT_DATA_SUCESS);
}
return distinctList;
......@@ -7067,12 +7106,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//预估或者实缴保费
BigDecimal fee;
if (CommonConstants.ONE_INT == insuranceDetail.getSettleType()) {
fee = insuranceDetail.getActualPremium();
} else {
fee = insuranceDetail.getEstimatePremium();
}
BigDecimal fee = CommonConstants.ONE_INT == insuranceDetail.getSettleType() ? insuranceDetail.getActualPremium() : insuranceDetail.getEstimatePremium();
//判断是否为按人次收费
int isSum = 0;
......@@ -7336,5 +7370,29 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
return mapSelectVo;
}
/**
* @Author fxj
* @Description 商险到期提醒分页查询
* @Date 16:51 2023/2/16
**/
@Override
public R<IPage<TBusinessInsuranceVo>> getInsuranceExpireWarnVoPage(Page<TBusinessInsuranceVo> page, TBusinessInsuranceVo tBusinessInsurance) {
return null;
}
@Override
public R<List<WorkBanchWarnVo>> getExpireInsuranceWarn(Integer expireInsuranceWarnNameUrlFlag, Integer noBuyInsuranceWarnNameUrlFlag, Integer noSettleInsuranceWarnNameUrlFlag, Boolean haveAllOrg, Integer userId) {
return null;
}
@Override
public R<Object> batchexpireIgnore(String ids) {
return null;
}
@Override
public R<Object> expireIgnore(TBusinessInsuranceVo vo) {
return null;
}
}
......@@ -6,8 +6,6 @@ import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.TInsuranceOperat
import com.yifu.cloud.plus.v1.yifu.insurances.service.insurance.TInsuranceOperateService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author licancan
......@@ -16,9 +14,4 @@ import java.util.List;
*/
@Service
public class TInsuranceOperateServiceImpl extends ServiceImpl<TInsuranceOperateMapper, TInsuranceOperate> implements TInsuranceOperateService {
@Override
public int saveOperateInfo(List<TInsuranceOperate> list) {
return baseMapper.saveOperateInfo(list);
}
}
......@@ -4,10 +4,10 @@ spring:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: test
on-profile: dev
redis:
host: 192.168.1.65
port: 22379
host: 127.0.0.1
port: 6379
password: '@yf_2017'
datasource:
insurances:
......@@ -21,7 +21,7 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: ekp!@#123
jdbc-url: jdbc:mysql://119.96.192.73:3306/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
jdbc-url: jdbc:mysql://36.7.147.19:20023/ekp?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
......
......@@ -114,9 +114,21 @@
a.SETTLE_MONTH as settleMonth,
a.DEPT_NAME as projectName,
a.REDUCE_HANDLE_STATUS as reduceHandleStatus,
a.CREATE_TIME as createTime
a.CREATE_TIME as createTime,
a.UNIT_NAME as unitName,
a.UNIT_NO as unitNo,
a.IS_EFFECT as isEffect
from t_insurance_detail a
where a.DELETE_FLAG = 0
<if test="param.isEffect != null">
and a.IS_EFFECT = #{param.isEffect}
</if>
<if test="param.unitName != null and param.unitName.trim() != ''">
and a.UNIT_NAME like concat(replace(replace(#{param.unitName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.unitNo != null and param.unitNo.trim() != ''">
and a.UNIT_NO like concat(replace(replace(#{param.unitNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO = #{param.deptNo}
</if>
......@@ -182,9 +194,13 @@
a.DEPT_NAME as projectName,
a.REDUCE_HANDLE_STATUS as reduceHandleStatus,
if(a.BUY_HANDLE_STATUS=4,a.BACK_REMARK,'') as backRemark,
a.CREATE_TIME as createTime
a.CREATE_TIME as createTime,
a.IS_EFFECT as isEffect
from t_insurance_detail a
where a.DELETE_FLAG = 0
<if test="param.isEffect != null">
and a.IS_EFFECT = #{param.isEffect}
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO = #{param.deptNo}
</if>
......@@ -479,13 +495,24 @@
a.CREATE_USER_DEPT_NAME as createUserDeptName,
a.BUY_STANDARD as buyStandard,
a.CREATE_TIME as createTime,
a.CREATE_NAME as createName
a.CREATE_NAME as createName,
a.UNIT_NAME as unitName,
a.UNIT_NO as unitNo
from
t_insurance_detail a
where
a.DELETE_FLAG = 0
and
a.BUY_HANDLE_STATUS = 3
<if test="param.isEffect != null">
and a.IS_EFFECT = #{param.isEffect}
</if>
<if test="param.unitName != null and param.unitName.trim() != ''">
and a.UNIT_NAME like concat(replace(replace(#{param.unitName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.unitNo != null and param.unitNo.trim() != ''">
and a.UNIT_NO like concat(replace(replace(#{param.unitNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
......@@ -573,13 +600,21 @@
a.IS_EFFECT as isEffect,
a.IS_OVERDUE as isOverdue,
a.CREATE_TIME as createTime,
a.CREATE_NAME as createName
a.CREATE_NAME as createName,
a.UNIT_NAME as unitName,
a.UNIT_NO as unitNo
from
t_insurance_detail a
where
a.DELETE_FLAG = 0
and
a.BUY_HANDLE_STATUS = 3
<if test="param.unitName != null and param.unitName.trim() != ''">
and a.UNIT_NAME like concat(replace(replace(#{param.unitName},'_','\_'),'%','\%'),'%')
</if>
<if test="param.unitNo != null and param.unitNo.trim() != ''">
and a.UNIT_NO like concat(replace(replace(#{param.unitNo},'_','\_'),'%','\%'),'%')
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
......@@ -727,7 +762,8 @@
a.BUY_TYPE as buyType,
refund.CREATE_USER_DEPT_NAME as createUserDeptName,
refund.CREATE_TIME as refundCreateTime,
a.CREATE_TIME as createTime
a.CREATE_TIME as createTime,
a.IS_EFFECT as isEffect
from
t_insurance_detail a,
t_insurance_refund refund
......@@ -737,6 +773,9 @@
a.REFUND_ID = refund.ID
and
a.REDUCE_HANDLE_STATUS = 4
<if test="param.isEffect != null">
and a.IS_EFFECT = #{param.isEffect}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
......@@ -803,7 +842,8 @@
a.MEDICAL_QUOTA as medicalQuota,
a.DIE_DISABLE_QUOTA as dieDisableQuota,
a.CREATE_NAME as createName,
refund.CREATE_TIME as refundCreateTime
refund.CREATE_TIME as refundCreateTime,
a.IS_EFFECT as isEffect
from
t_insurance_detail a,
t_insurance_refund refund
......@@ -813,6 +853,9 @@
a.DELETE_FLAG = 0
and
a.REDUCE_HANDLE_STATUS = 4
<if test="param.isEffect != null">
and a.IS_EFFECT = #{param.isEffect}
</if>
<if test="param.createName != null and param.createName.trim() != ''">
and a.CREATE_NAME like concat('%',replace(replace(#{param.createName},'_','\_'),'%','\%'),'%')
</if>
......
......@@ -19,22 +19,4 @@
ID,INSURANCE_DETAIL_ID,OPERATE_DESC,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME
</sql>
<insert id="saveOperateInfo" parameterType="java.util.List">
insert into t_insurance_operate
(ID,REMARK,DISPLAY_FLAG,CREATE_BY,CREATE_TIME,CREATE_NAME,OPERATE_DESC,INSURANCE_DETAIL_ID)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.id},
#{item.remark},
#{item.displayFlag},
#{item.createBy},
#{item.createTime},
#{item.createName},
#{item.operateDesc},
#{item.insuranceDetailId}
)
</foreach>
</insert>
</mapper>
......@@ -2,16 +2,15 @@ package com.yifu.cloud.plus.v1.yifu.social.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author fxj
......@@ -191,21 +190,21 @@ public class SocialHandleExportVo implements Serializable {
/**
* 合同起始时间
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "合同起始时间", errorInfo = "合同起始时间不能为空",dateFormat = DateUtil.ISO_DATE_FORMAT,needExport = true)
@Schema(description = "合同起始时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同起始时间" )
private Date contractStart;
private String contractStart;
/**
* 合同到期时间
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "合同到期时间",needExport = true,dateFormat = DateUtil.ISO_DATE_FORMAT)
@Schema(description = "合同到期时间")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("合同到期时间" )
private Date contractEnd;
private String contractEnd;
/**
* 创建人姓名
*/
......@@ -267,12 +266,13 @@ public class SocialHandleExportVo implements Serializable {
/**
* 养老起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "养老起缴日期", needExport = true)
@Schema(description="养老起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老起缴日期" )
private Date pensionStart;;
private String pensionStart;;
/**
* 养老基数
......@@ -286,12 +286,13 @@ public class SocialHandleExportVo implements Serializable {
/**
* 医疗起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "医疗起缴日期", needExport = true)
@Schema(description="医疗起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗起缴日期" )
private Date medicalStart;
private String medicalStart;
/**
* 医疗基数
*/
......@@ -303,12 +304,13 @@ public class SocialHandleExportVo implements Serializable {
/**
* 失业起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "失业起缴日期", needExport = true)
@Schema(description="失业起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业起缴日期" )
private Date unemployStart;
private String unemployStart;
/**
* 失业基数
*/
......@@ -320,12 +322,13 @@ public class SocialHandleExportVo implements Serializable {
/**
* 工伤起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "工伤起缴日期", needExport = true)
@Schema(description="工伤起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤起缴日期" )
private Date workInjuryStart;
private String workInjuryStart;
/**
* 工伤基数
*/
......@@ -337,12 +340,13 @@ public class SocialHandleExportVo implements Serializable {
/**
* 生育起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "生育起缴日期", needExport = true)
@Schema(description="生育起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育起缴日期" )
private Date birthStart;
private String birthStart;
/**
* 生育基数
*/
......@@ -354,12 +358,13 @@ public class SocialHandleExportVo implements Serializable {
/**
* 大病起缴日期
*/
@ContentStyle(dataFormat = 49)
@DateTimeFormat("yyyy-MM-dd")
@ExcelAttribute(name = "大病起缴日期", needExport = true)
@Schema(description="大病起缴日期")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病起缴日期" )
private Date bigailmentStart;
private String bigailmentStart;
/**
* 大病缴纳基数
*/
......
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