Commit 323e82e4 authored by fangxinjiang's avatar fangxinjiang

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

parents 39705315 414c3400
...@@ -18,9 +18,7 @@ ...@@ -18,9 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.archives.entity; package com.yifu.cloud.plus.v1.yifu.archives.entity;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
...@@ -62,6 +60,7 @@ public class TGzArea extends BaseEntity { ...@@ -62,6 +60,7 @@ public class TGzArea extends BaseEntity {
@ExcelAttribute(name = "市") @ExcelAttribute(name = "市")
@ExcelProperty("市") @ExcelProperty("市")
@Schema(description = "市") @Schema(description = "市")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer city; private Integer city;
/** /**
* 区县 * 区县
...@@ -69,6 +68,7 @@ public class TGzArea extends BaseEntity { ...@@ -69,6 +68,7 @@ public class TGzArea extends BaseEntity {
@ExcelAttribute(name = "区县") @ExcelAttribute(name = "区县")
@ExcelProperty("区县") @ExcelProperty("区县")
@Schema(description = "区县") @Schema(description = "区县")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Integer town; private Integer town;
/** /**
* 皖信地址编码 * 皖信地址编码
......
...@@ -1376,4 +1376,9 @@ public class InsurancesConstants { ...@@ -1376,4 +1376,9 @@ public class InsurancesConstants {
// 0待确认1待派单 可忽略 // 0待确认1待派单 可忽略
public static final Set<String> ALERT_IGNORE_STATUS = new HashSet<>(Arrays.asList("0", "1", "2", "5")); public static final Set<String> ALERT_IGNORE_STATUS = new HashSet<>(Arrays.asList("0", "1", "2", "5"));
public static final String REFUND_NO_INS_DETAIL_ID = "退保里的商险ID为空,请联系管理员";
public static final String REFUND_YI_SETTLE = "费用已支出,禁止重复登记";
public static final String REFUND_ZH_SETTLE = "费用支出中,禁止重复登记";
public static final String REFUND_TYPE = "退费";
} }
...@@ -22,7 +22,7 @@ public class EkpInsurancesInfo { ...@@ -22,7 +22,7 @@ public class EkpInsurancesInfo {
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@Schema(description = "fd_Id") @Schema(description = "fd_Id")
private String fd_id; private String fd_id;
// 预估;实缴;差额;退费
@Schema(description = "单据类型") @Schema(description = "单据类型")
private String fd_3adfe6af71a1cc; private String fd_3adfe6af71a1cc;
...@@ -32,6 +32,10 @@ public class EkpInsurancesInfo { ...@@ -32,6 +32,10 @@ public class EkpInsurancesInfo {
@Schema(description = "项目名称") @Schema(description = "项目名称")
private String fd_3adfe6592b4158; private String fd_3adfe6592b4158;
// //单号,sxdd + 商险id + 标识
// pushParam.setFd_3adfe67a9f6364("SXDD" + LocalDateTimeUtils.formatTime(LocalDateTime.now(),DateUtil.ISO_DATE_FORMAT)
// + param.getDetailId() + code );
// code : 标识:1:预估;2:实缴;3:差额;4:退费
@Schema(description = "单号") @Schema(description = "单号")
private String fd_3adfe67a9f6364; private String fd_3adfe67a9f6364;
......
...@@ -36,7 +36,7 @@ public class TInsuranceRefund extends BaseEntity { ...@@ -36,7 +36,7 @@ public class TInsuranceRefund extends BaseEntity {
private String orderNo; private String orderNo;
/** /**
* 减员状态 * 减员状态 1待减员 2减员中3减员退回,4减员成功
*/ */
@Schema(description = "减员状态") @Schema(description = "减员状态")
private Integer reduceHandleStatus; private Integer reduceHandleStatus;
......
package com.yifu.cloud.plus.v1.yifu.insurances.vo; package com.yifu.cloud.plus.v1.yifu.insurances.vo;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.EkpInsurancesInfo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data; import lombok.Data;
...@@ -81,4 +82,10 @@ public class RefundMoneyUpdateParam implements Serializable { ...@@ -81,4 +82,10 @@ public class RefundMoneyUpdateParam implements Serializable {
@Schema(description = "错误原因") @Schema(description = "错误原因")
private String errorMessage; private String errorMessage;
/**
* EKP中,退费类型的商险明细
*/
@JsonIgnore
private EkpInsurancesInfo ekpInsurancesInfo;
} }
...@@ -29,4 +29,10 @@ public interface EkpInsurancesInfoMapper extends BaseMapper<EkpInsurancesInfo> { ...@@ -29,4 +29,10 @@ public interface EkpInsurancesInfoMapper extends BaseMapper<EkpInsurancesInfo> {
//查询未结算的商险记录 //查询未结算的商险记录
List<EkpInsurancesInfo> getEkpInsurancesInfoSettle(@Param("detailId") String detailId); List<EkpInsurancesInfo> getEkpInsurancesInfoSettle(@Param("detailId") String detailId);
// 查找退费的商险明细,用来检查状态,是否允许登记退保,并用来新增或更新
EkpInsurancesInfo getEkpInsurancesInfoByRefund(@Param("detailId") String detailId);
// 初始化
EkpInsurancesInfo initEkpInsurancesInfoByRefund(@Param("detailId") String detailId);
} }
package com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp; package com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.EkpInsurancesInfo;
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;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -82,6 +81,8 @@ public interface EkpSettleMapper { ...@@ -82,6 +81,8 @@ public interface EkpSettleMapper {
EkpInsuranceDeptInfoVo getInsuranceEkpDeptInfo(@Param("deptNo") String deptNo); EkpInsuranceDeptInfoVo getInsuranceEkpDeptInfo(@Param("deptNo") String deptNo);
List<EkpInsuranceDeptInfoVo> getEkpDeptInfoByDeptNo(@Param("deptNoList") List<String> deptNoList);
void deleteEkpInsuranceDetail(@Param("id")String id); void deleteEkpInsuranceDetail(@Param("id")String id);
List<EkpSettleStatusVo> getBalanceByInsuranceId(@Param("id")String id); List<EkpSettleStatusVo> getBalanceByInsuranceId(@Param("id")String id);
......
...@@ -365,4 +365,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -365,4 +365,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/ */
long getInsuranceChangeLogExportCount(@Param("param") InsuredParam param); long getInsuranceChangeLogExportCount(@Param("param") InsuredParam param);
// 按身份证查找商险已减员的对应的项目编码,范围可能大了一点,但是不影响查询结果,好过一条一条查项目的BPO信息
List<String> selectDeptNoListByIdCard(@Param("idCardList") List<String> idCardList);
} }
...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate; ...@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.yifu.insurances.entity.TInsuranceTypeRate;
import com.yifu.cloud.plus.v1.yifu.insurances.vo.*; import com.yifu.cloud.plus.v1.yifu.insurances.vo.*;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author zhaji * @author zhaji
...@@ -28,6 +29,9 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> { ...@@ -28,6 +29,9 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> {
EkpInsuranceDeptInfoVo getInsuranceEkpDeptInfo(String deptNo); EkpInsuranceDeptInfoVo getInsuranceEkpDeptInfo(String deptNo);
// 根据项目编码获取EKP项目信息
Map<String, EkpInsuranceDeptInfoVo> getEkpDeptInfoByDeptNo(List<String> deptNoList);
DeptSettleVo getDeptYgSettle(String id); DeptSettleVo getDeptYgSettle(String id);
/** /**
......
...@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service; ...@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
...@@ -39,6 +40,17 @@ public class EkpSettleServiceImpl implements EkpSettleService { ...@@ -39,6 +40,17 @@ public class EkpSettleServiceImpl implements EkpSettleService {
public EkpInsuranceDeptInfoVo getInsuranceEkpDeptInfo(String deptNo) { public EkpInsuranceDeptInfoVo getInsuranceEkpDeptInfo(String deptNo) {
return ekpSettleMapper.getInsuranceEkpDeptInfo(deptNo); return ekpSettleMapper.getInsuranceEkpDeptInfo(deptNo);
} }
@Override
public Map<String, EkpInsuranceDeptInfoVo> getEkpDeptInfoByDeptNo(List<String> deptNoList) {
List<EkpInsuranceDeptInfoVo> list = ekpSettleMapper.getEkpDeptInfoByDeptNo(deptNoList);
Map<String, EkpInsuranceDeptInfoVo> returnMap = new HashMap<>();
if (list != null && !list.isEmpty()) {
for (EkpInsuranceDeptInfoVo vo : list) {
returnMap.put(vo.getDeptNo(), vo);
}
}
return returnMap;
}
@Override @Override
public DeptSettleVo getDeptYgSettle(String id) { public DeptSettleVo getDeptYgSettle(String id) {
......
...@@ -12,7 +12,6 @@ import com.alibaba.fastjson.JSON; ...@@ -12,7 +12,6 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -42,6 +41,7 @@ import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants; ...@@ -42,6 +41,7 @@ import com.yifu.cloud.plus.v1.yifu.ekp.constant.EkpConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.config.WxConfig; import com.yifu.cloud.plus.v1.yifu.insurances.config.WxConfig;
import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants; import com.yifu.cloud.plus.v1.yifu.insurances.constants.InsurancesConstants;
import com.yifu.cloud.plus.v1.yifu.insurances.entity.*; import com.yifu.cloud.plus.v1.yifu.insurances.entity.*;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.ekp.EkpInsurancesInfoMapper;
import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.*; import com.yifu.cloud.plus.v1.yifu.insurances.mapper.insurances.*;
import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceAreaResService; import com.yifu.cloud.plus.v1.yifu.insurances.service.TInsuranceAreaResService;
import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService; import com.yifu.cloud.plus.v1.yifu.insurances.service.ekp.EkpSettleService;
...@@ -74,7 +74,6 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -74,7 +74,6 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.json.JsonObject;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
...@@ -183,6 +182,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -183,6 +182,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
@Autowired @Autowired
private CspDaprUtils cspDaprUtil; private CspDaprUtils cspDaprUtil;
@Autowired
private EkpInsurancesInfoMapper ekpInsurancesInfoMapper;
/***********************商险办理********************************/ /***********************商险办理********************************/
/** /**
* 每日定时刷新商险到期数据 * 每日定时刷新商险到期数据
...@@ -7063,6 +7066,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7063,6 +7066,15 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceOperate.setDisplayFlag(CommonConstants.ONE_INT); insuranceOperate.setDisplayFlag(CommonConstants.ONE_INT);
insuranceOperate.setOperateDesc(InsurancesConstants.REGISTERED_SURRENDER_EXPENSE); insuranceOperate.setOperateDesc(InsurancesConstants.REGISTERED_SURRENDER_EXPENSE);
insuranceOperateList.add(insuranceOperate); insuranceOperateList.add(insuranceOperate);
// 推送EKP
if (param.getEkpInsurancesInfo() != null) {
if (Common.isEmpty(param.getEkpInsurancesInfo().getFd_id())) {
ekpInsurancesInfoMapper.insert(param.getEkpInsurancesInfo());
} else {
ekpInsurancesInfoMapper.updateById(param.getEkpInsurancesInfo());
}
}
} }
} }
tInsuranceOperateService.saveBatch(insuranceOperateList); tInsuranceOperateService.saveBatch(insuranceOperateList);
...@@ -7281,6 +7293,32 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7281,6 +7293,32 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map<String,List<RefundMoneyUpdateParam>> map = new HashMap<>(16); Map<String,List<RefundMoneyUpdateParam>> map = new HashMap<>(16);
List<RefundMoneyUpdateParam> errorList = new ArrayList<>(); List<RefundMoneyUpdateParam> errorList = new ArrayList<>();
List<RefundMoneyUpdateParam> successList = new ArrayList<>(); List<RefundMoneyUpdateParam> successList = new ArrayList<>();
// 查询或组装新的退费使用
EkpInsurancesInfo ekpInsurancesInfo;
// 查询商险,组装EKP的退费明细使用
TInsuranceDetail insuranceDetail;
// 获取身份证,获取项目信息(主要是bpo信息)
List<String> idCardList = new ArrayList<>();
for (RefundMoneyUpdateParam param : paramList) {
//身份证号
if(Common.isNotNull(param.getEmpIdcardNo())){
idCardList.add(param.getEmpIdcardNo());
}
}
// 存项目BPO信息
Map<String, EkpInsuranceDeptInfoVo> deptMap = new HashMap<>();
if (idCardList != null && !idCardList.isEmpty()) {
List<String> deptNoList = this.baseMapper.selectDeptNoListByIdCard(idCardList);
if (deptNoList != null && !deptNoList.isEmpty()) {
// 查找EKP项目信息
deptMap = ekpSettleService.getEkpDeptInfoByDeptNo(deptNoList);
}
}
EkpInsuranceDeptInfoVo deptInfo;
double yingShou;
double yingZhi;
for (RefundMoneyUpdateParam param : paramList) { for (RefundMoneyUpdateParam param : paramList) {
//姓名 //姓名
...@@ -7378,16 +7416,179 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7378,16 +7416,179 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue; continue;
} }
} }
if (Common.isEmpty(insuranceRefund.getInsDetailId())) {
param.setErrorMessage(InsurancesConstants.REFUND_NO_INS_DETAIL_ID);
errorList.add(param);
continue;
}
// 检测EKP的商险明细的支出状态是否已结算或结算中:
ekpInsurancesInfo = ekpInsurancesInfoMapper.getEkpInsurancesInfoByRefund(insuranceRefund.getInsDetailId());
if (ekpInsurancesInfo != null) {
if (InsurancesConstants.SETTLE_ONE.equals(ekpInsurancesInfo.getFd_3adfe6eda67236())) {
param.setErrorMessage(InsurancesConstants.REFUND_ZH_SETTLE);
errorList.add(param);
continue;
}
if (InsurancesConstants.SETTLE_TWO.equals(ekpInsurancesInfo.getFd_3adfe6eda67236())) {
param.setErrorMessage(InsurancesConstants.REFUND_YI_SETTLE);
errorList.add(param);
continue;
}
} else {
ekpInsurancesInfo = new EkpInsurancesInfo();
insuranceDetail = this.getById(insuranceRefund.getInsDetailId());
if (insuranceDetail == null) {
param.setErrorMessage(InsurancesConstants.REFUND_YI_SETTLE);
errorList.add(param);
continue;
}
try {
this.initValues(ekpInsurancesInfo, insuranceDetail, param, CommonConstants.FOUR_STRING);
} catch (Exception e) {
param.setErrorMessage(InsurancesConstants.ACTUAL_PREMIUM_PARSE_ERROR);
errorList.add(param);
continue;
}
}
//实际保费
if (Common.isNotNull(param.getRefundMoney())) {
ekpInsurancesInfo.setFd_3adfe6610c0d2c(-Double.parseDouble(param.getRefundMoney()));
}
//发生日期(更新时会变动——倩倩与郭彤已知)
ekpInsurancesInfo.setFd_3adfe67c24dace(DateUtil.getCurrentDateTime());
if (Common.isNotNull(ekpInsurancesInfo.getFd_3adfe658c6229e())) {
deptInfo = deptMap.get(ekpInsurancesInfo.getFd_3adfe658c6229e());
if (deptInfo == null) {
param.setErrorMessage(InsurancesConstants.GET_DEPT_DETAIL_ERROR);
errorList.add(param);
continue;
}
// 是否为BPO业务
ekpInsurancesInfo.setFd_3b178fab62d196(deptInfo.getIsBpo());
// 是否启用BPO结算模式
ekpInsurancesInfo.setFd_usebpo_settle(deptInfo.getBpoSettle());
//商险封面抬头
ekpInsurancesInfo.setFd_3b941cbcea3e1a(deptInfo.getInsurancesTitle());
// HRO登记的退费为正数,推送到EKP后,为负数,具体为应收还是应支如下:
//1、BPO项目启用BPO结算模式:为有应支没有应收(应支为负数)——禁止退给客户,只能在商险费用支出结算时,冲抵——负数的数据会在商险支出审核通过后,归集到该项目审核通过月份的成本中去;
//2、BPO项目未启用BPO结算模式:为有应收也有应支(都是负数)——应收:禁止退给客户,只能在收款结算单结算时,冲抵成本(收款结算单中收入含税不含税计算中体现);
//3、非BPO项目未启用BPO结算模式:为有应收也有应支(都是负数)——应收:收款冲抵或退费;应支:支出冲抵;
// 上面的3点,我整理逻辑,且与测试郭彤沟通为:
// BPO项目,启用BPO结算模式 ——仅应支。其他情况,应收应支都有。
yingZhi = ekpInsurancesInfo.getFd_3adfe6610c0d2c();
if ("是".equals(deptInfo.getIsBpo()) && "是".equals(deptInfo.getBpoSettle())) {
yingShou = 0.0;
} else {
yingShou = ekpInsurancesInfo.getFd_3adfe6610c0d2c();
}
//应收
ekpInsurancesInfo.setFd_3adfe6e30f2a3c(yingShou);
//应支
ekpInsurancesInfo.setFd_3adfe6e3911ffe(yingZhi);
} else {
param.setErrorMessage(InsurancesConstants.GET_DEPT_DETAIL_ERROR);
errorList.add(param);
continue;
}
param.setEkpInsurancesInfo(ekpInsurancesInfo);
} }
param.setId(insuranceRefund.getId()); param.setId(insuranceRefund.getId());
param.setInsDetailId(insuranceRefund.getInsDetailId()); param.setInsDetailId(insuranceRefund.getInsDetailId());
successList.add(param); successList.add(param);
} }
map.put(InsurancesConstants.ERROR_LIST,errorList); map.put(InsurancesConstants.ERROR_LIST,errorList);
map.put(InsurancesConstants.SUCCESS_LIST,successList); map.put(InsurancesConstants.SUCCESS_LIST,successList);
return map; return map;
} }
// 初始化EKP商险明细,用来退保不退费
public void initValues(EkpInsurancesInfo pushParam, TInsuranceDetail insuranceDetail, RefundMoneyUpdateParam param, String code) throws Exception {
//单据类型:退费
pushParam.setFd_3adfe6af71a1cc(InsurancesConstants.REFUND_TYPE);
// 实际结算月份默认为空
pushParam.setFd_3af9d11088facc(null);
//有无预估
pushParam.setFd_3af9d1441ef7b6(CommonConstants.EMPTY_STRING);
//预估金额
pushParam.setFd_3af9d15f7018fa(null);
//预估金额已收
pushParam.setFd_3af9d1662141a4(null);
//是否全部结算
pushParam.setFd_3b13b2ecc164aa("是");
//项目编码
pushParam.setFd_3adfe658c6229e(null != insuranceDetail.getDeptNo() ? insuranceDetail.getDeptNo() : CommonConstants.EMPTY_STRING);
//项目名称
pushParam.setFd_3adfe6592b4158(null != insuranceDetail.getDeptName() ? insuranceDetail.getDeptName() : CommonConstants.EMPTY_STRING);
//单号,sxdd + 商险id + 标识
pushParam.setFd_3adfe67a9f6364("SXDD" + LocalDateTimeUtils.formatTime(LocalDateTime.now(), DateUtil.ISO_DATE_FORMAT)
+ insuranceDetail.getId() + code );
//项目id 项目编码
pushParam.setFd_3b16dfb32778f2(insuranceDetail.getDeptId());
pushParam.setFd_3b16dfb32778f2_text(insuranceDetail.getDeptNo());
//客户编码
pushParam.setFd_3adfe6598281e8(insuranceDetail.getUnitNo());
//客户名称
pushParam.setFd_3adfe7a2688902(insuranceDetail.getUnitName());
//发生日期(更新时会变动——倩倩与郭彤已知)
pushParam.setFd_3adfe67c24dace(DateUtil.getCurrentDateTime());
//姓名
pushParam.setFd_3adfe65d759650(null != param.getEmpName() ? param.getEmpName() : CommonConstants.EMPTY_STRING);
//身份证号
pushParam.setFd_3adfe65dbd9f68(null != param.getEmpIdcardNo() ? param.getEmpIdcardNo() : CommonConstants.EMPTY_STRING);
//发票号
pushParam.setFd_3adfe65e0cd094(CommonConstants.EMPTY_STRING);
//险种
pushParam.setFd_3adfe65f6599e4(null != param.getInsuranceTypeName() ? param.getInsuranceTypeName() : CommonConstants.EMPTY_STRING);
//保险公司
pushParam.setFd_3adfe65ea04728(null != param.getInsuranceCompanyName() ? param.getInsuranceCompanyName() : CommonConstants.EMPTY_STRING);
//保单号
pushParam.setFd_3adfe65e60e110(CommonConstants.EMPTY_STRING);
//保险开始日期
pushParam.setFd_3adfe6b7e0ede8(null != param.getPolicyStart() ? DateUtil.stringToDate(param.getPolicyStart()) : null);
//保险结束日期
pushParam.setFd_3adfe6b847bfe6(null != param.getPolicyEnd() ? DateUtil.stringToDate(param.getPolicyEnd()) : null);
//购买标准
pushParam.setFd_3adfe6d55384c6(Common.isNotNull(param.getBuyStandard()) ? Double.parseDouble(param.getBuyStandard()) : null);
//医保
pushParam.setFd_3adfe66041a996(null);
//事故或残疾
pushParam.setFd_3adfe6609aa810(CommonConstants.EMPTY_STRING);
// 状态
pushParam.setFd_3af9197b31071c(CommonConstants.EMPTY_STRING);
// 商险ID
pushParam.setFd_3b0a5743acab7e(insuranceDetail.getId());
//hro结算月
pushParam.setFd_3b13b3076af5a0(null);
//是否为BPO业务
pushParam.setFd_3b178fab62d196("否");
//结算状态
pushParam.setFd_3adfe6ec6a8cbe("未结算");
//收款状态
pushParam.setFd_3adfe6ef5dfaac("未收");
//支出结算状态
pushParam.setFd_3adfe6eda67236("未结算");
//付款状态
pushParam.setFd_3adfe6f05531ec("未付");
//创建时间
pushParam.setCreateTime(DateUtil.getCurrentDateTime());
}
/** /**
* 结算月份校验 * 结算月份校验
* *
......
...@@ -59,6 +59,61 @@ ...@@ -59,6 +59,61 @@
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
</resultMap> </resultMap>
<sql id="Base_Column_List" >
a.fd_id
,a.fd_3adfe6af71a1cc
,a.fd_3adfe658c6229e
,a.fd_3adfe6592b4158
,a.fd_3adfe67a9f6364
,a.fd_3adfe6598281e8
,a.fd_3adfe7a2688902
,a.fd_3adfe67c24dace
,a.fd_3adfe65d759650
,a.fd_3adfe65dbd9f68
,a.fd_3adfe65e0cd094
,a.fd_3adfe65f6599e4
,a.fd_3adfe65ea04728
,a.fd_3adfe65e60e110
,a.fd_3adfe6b7e0ede8
,a.fd_3adfe6b847bfe6
,a.fd_3adfe6d55384c6
,a.fd_3adfe6610c0d2c
,a.fd_3adfe66041a996
,a.fd_3adfe6609aa810
,a.fd_3adfe6e30f2a3c
,a.fd_3adfe6ec6a8cbe
,a.fd_3adfe6ef5dfaac
,a.fd_3adfe79fd04606
,a.fd_3adfe7a117f086
,a.fd_3adfe6e3911ffe
,a.fd_3adfe6eda67236
,a.fd_3adfe6f05531ec
,a.fd_3adfe7a035849c
,a.fd_3adfe7a08eba96
,a.fd_3af9197b31071c
,a.fd_3af9d11088facc
,a.fd_3af9d1441ef7b6
,a.fd_3af9d15f7018fa
,a.fd_3af9d1662141a4
,a.fd_3b0a5743acab7e
,a.fd_3b13b3076af5a0
,a.fd_3b13b2ecc164aa
,a.fd_3b16dfb32778f2_text
,a.fd_3b16dfb32778f2
,a.fd_3b178fab62d196
,a.fd_3b3e4653122c9e
,a.fd_3b5bf1628c5a68
,a.fd_3b5bf17f2fc25c
,a.fd_3b5bf180e08fbe
,a.fd_3b5bf17ae91f9c
,a.fd_3b5bf17c6df310
,a.fd_3b5bf17d9297c2
,a.fd_3b941cbcea3e1a
,a.fd_3c6f0108e05c84
,a.fd_usebpo_settle
,a.create_time
</sql>
<!-- ekpInsurancesInfo简单分页查询 --> <!-- ekpInsurancesInfo简单分页查询 -->
<select id="getEkpInsurancesInfoList" resultMap="ekpInsurancesInfoMap"> <select id="getEkpInsurancesInfoList" resultMap="ekpInsurancesInfoMap">
SELECT SELECT
...@@ -102,4 +157,13 @@ ...@@ -102,4 +157,13 @@
where fd_3adfe6eda67236 = '未结算' where fd_3adfe6eda67236 = '未结算'
and fd_3b0a5743acab7e = #{detailId} and fd_3b0a5743acab7e = #{detailId}
</select> </select>
<!-- 查找退费的商险明细,用来检查状态,是否允许登记退保,并用来新增或更新 -->
<select id="getEkpInsurancesInfoByRefund" resultMap="ekpInsurancesInfoMap">
SELECT
<include refid="Base_Column_List"/>
FROM ekp_insurances_info a
where fd_3adfe6af71a1cc = '退费' and fd_3b0a5743acab7e = #{detailId} limit 1
</select>
</mapper> </mapper>
...@@ -260,6 +260,24 @@ ...@@ -260,6 +260,24 @@
where a.fd_3a37fe508071fe = #{deptNo} where a.fd_3a37fe508071fe = #{deptNo}
limit 1 limit 1
</select> </select>
<!--查询EKP项目信息-->
<select id="getEkpDeptInfoByDeptNo" resultType="com.yifu.cloud.plus.v1.yifu.insurances.vo.EkpInsuranceDeptInfoVo">
SELECT
a.fd_id as fdId,
a.fd_3b1480cd9dcb60 as settleType,
a.fd_3b15f64dd59a28 as isBpo,
a.fd_3b13b272078eda as insurancesType,
a.fd_3b1480c328d7b2_text as insurancesTitle,
a.fd_usebpo_settle as bpoSettle,
a.fd_3a37fe508071fe as deptNo
from ekp_24a8e6a7fc143bb8c48a a
where a.fd_3a37fe508071fe in
<foreach item="idStr" index="index" collection="deptNoList" open="(" separator="," close=")">
#{idStr}
</foreach>
GROUP BY a.fd_3a37fe508071fe
</select>
</mapper> </mapper>
......
...@@ -2624,4 +2624,16 @@ ...@@ -2624,4 +2624,16 @@
${param.authSql} ${param.authSql}
</if> </if>
</select> </select>
<select id="selectDeptNoListByIdCard" resultType="java.lang.String">
select
DISTINCT a.DEPT_NO
from
t_insurance_detail a
where a.DEPT_NO is not null and a.DELETE_FLAG = 0 and a.BUY_HANDLE_STATUS = 5 and a.REDUCE_HANDLE_STATUS = 4
and a.EMP_IDCARD_NO in
<foreach collection="idCardList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
</mapper> </mapper>
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