Commit a6a966a4 authored by fangxinjiang's avatar fangxinjiang

EKP项目是否BPO结算模式字段同步-fxj

parent 0118f33d
......@@ -1639,7 +1639,8 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
if (Common.isNotNull(oldInsurance.getProcessStatus())
&& (CommonConstants.THREE_STRING.equals(oldInsurance.getProcessStatus())
|| CommonConstants.FOUR_STRING.equals(oldInsurance.getProcessStatus())
|| CommonConstants.SIX_STRING.equals(oldInsurance.getProcessStatus()))) {
|| CommonConstants.SIX_STRING.equals(oldInsurance.getProcessStatus())
|| CommonConstants.SEVEN_STRING.equals(oldInsurance.getProcessStatus()))) {
oldInsurance.setModelType(CommonConstants.FOUR_STRING);
}
}
......
......@@ -412,4 +412,36 @@ public class InsuranceDetailVO implements Serializable {
*/
@Schema(description = "是否地市自购")
private String isAdress;
/**
* 预估缴费状态 0待缴费、1已缴费
*/
@Schema(description = "预估缴费状态 0待缴费、1已缴费")
private String paymentStatus;
/**
* 缴费时间: EKP已收/已垫付 更新时间, 退单或撤销匹配 清空时间
*/
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@Schema(description = "缴费时间")
private String paymentTime;
/**
* 是否见费出单 0是 1 否 (新增或批增且启用‘是否启用BPO结算模式’且险种配置‘是否见费出单’为是时 此字段为是,否则为否)
*/
@Schema(description = "是否见费出单")
private String isJfcd;
/**
* 购买周期 (格式:4个月/117天)
*/
@Schema(description = "购买周期")
private String purchaseCycle;
/**
* 预计办理日期
*/
@Schema(description = "预计办理日期")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
private LocalDate preHandleTime;
}
......@@ -18,6 +18,11 @@ import java.util.List;
@Schema(description = "投保列表请求参数")
public class InsuranceListParam extends BaseEntity {
/**
* 派单ID
*/
@Schema(description = "派单ID")
private String id;
/**
* 项目编码
*/
......
......@@ -1011,7 +1011,7 @@ public class TInsuranceDetailController {
if (detail == null) {
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
if (!CommonConstants.SIX_STRING.equals(detail.getBuyHandleStatus())){
if (null != detail.getBuyHandleStatus() && CommonConstants.SIX_INT != detail.getBuyHandleStatus().intValue()){
return R.failed("请选择待缴费状态的投保记录!");
}
return tInsuranceDetailService.callBack(detail);
......
......@@ -87,4 +87,6 @@ public interface EkpSettleMapper {
List<EkpSettleStatusVo> getBalanceByInsuranceId(@Param("id")String id);
void deleteEkpInsuranceDetailAsso(@Param("id")String id);
void callBackBalance(@Param("id")String id);
}
......@@ -80,4 +80,6 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> {
List<EkpSettleStatusVo> getBalanceByInsuranceId(String id);
void deleteEkpInsuranceDetailAsso(String id);
void callBackBalance(String id);
}
......@@ -155,4 +155,16 @@ public class EkpSettleServiceImpl implements EkpSettleService {
public void deleteEkpInsuranceDetailAsso(String id) {
ekpSettleMapper.deleteEkpInsuranceDetailAsso(id);
}
/**
* @Author fxj
* @Description 见费出单直接删除实缴与预估的差额
* @Date 15:45 2026/1/22
* @Param
* @return
**/
@Override
public void callBackBalance(String id) {
ekpSettleMapper.callBackBalance(id);
}
}
......@@ -436,6 +436,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
detail.setEstimatePremium(new BigDecimal("0.00"));
detail.setCreateBy(null == user ? "1" : user.getId());
detail.setCreateName(null == user ? "自动化派单" + "-" + success.getCustomerUserName() : user.getNickname());
detail.setId(RandomStringUtils.randomNumeric(19));
//是否见费出单逻辑处理:预估保费结算、购买周期计算、保单结束日期结算、参保开始日期计算、预计办理日期计算
initJfcdInfo(preDispatchDate, detail,settleList);
//生成收入数据
......@@ -511,7 +512,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
private void initJfcdInfo(Date preDispatchDate, TInsuranceDetail detail,List<TInsuranceSettle> settleList) {
//购买周期
String purchaseCycle = null;
String purchaseCycle = "0";
LocalDate buyStartDate;
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
//计算预计办理日期:若派单当日为工作日3点20之前,则预计办理日期为派单日期,若为3点20之后或派单日为非工作日,则预计办理日期为派单日后最近的一个工作日
......@@ -524,33 +525,30 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
//计算购买周期:购买周期=保单结束日期-参保开始日期+1(天数);购买周期=保单结束日期-参保开始日期+1(天数)推算出月数;
//按天计费方式
if (CommonConstants.ZERO_STRING.equals(detail.getBillingType())){
if (null != detail.getBillingType() && CommonConstants.ZERO_INT == detail.getBillingType().intValue()){
purchaseCycle = String.valueOf(LocalDateUtil.betweenDay(buyStartDate.toString(), detail.getPolicyEnd().toString())+1);
//按月计费方式
}else if (CommonConstants.ONE_STRING.equals(detail.getBillingType())){
purchaseCycle = String.valueOf(LocalDateUtil.betweenMonthTwo(buyStartDate.toString(), detail.getPolicyEnd().toString())+1);
}
//计算预计保费:根据计费方式、购买标准、购买天数/月数等计算:
//“计费方式”为“按天”的,预估保费=购买周期天数/365*购买标准+5元;
//“计费方式”为“按月”的,预估保费=购买周期月数对应的费率*购买标准+5元
//按天计费方式
if (CommonConstants.ZERO_STRING.equals(detail.getBillingType())){
//计算预计保费:根据计费方式、购买标准、购买天数/月数等计算:
//“计费方式”为“按天”的,预估保费=购买周期天数/365*购买标准+5元;
//“计费方式”为“按月”的,预估保费=购买周期月数对应的费率*购买标准+5元
//按天计费方式
detail.setEstimatePremium(new BigDecimal(detail.getBuyStandard())
.multiply(new BigDecimal(purchaseCycle))
.divide(new BigDecimal("365"))
.divide(new BigDecimal("365"), 2, RoundingMode.HALF_UP)
.add(new BigDecimal("5.00")));
//按月计费方式
}else if (CommonConstants.ONE_STRING.equals(detail.getBillingType())){
}else if (null != detail.getBillingType() && CommonConstants.ONE_INT == detail.getBillingType().intValue()){
purchaseCycle = String.valueOf(LocalDateUtil.betweenMonthTwo(buyStartDate.toString(), detail.getPolicyEnd().toString())+1);
detail.setEstimatePremium(new BigDecimal(detail.getBuyStandard())
.multiply(new BigDecimal(purchaseCycle))
.multiply(null== detail.getRate()?BigDecimal.ZERO: detail.getRate())
.add(new BigDecimal("5.00")));
}
//购买周期
detail.setPurchaseCycle(purchaseCycle);
//预估缴费状态 0待缴费、1已缴费
detail.setPaymentStatus(CommonConstants.ZERO_STRING);
detail.setBuyHandleStatus(CommonConstants.SIX_INT);
//保费存储
TInsuranceSettle settle = new TInsuranceSettle();
settle.setInsDetailId(detail.getId());
......@@ -1178,10 +1176,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//购买周期
String buyCycle = month + "个月/" + day + "天";
insuranceDetailVO.setBuyCycle(buyCycle);
//计费方式(0:按天,1:按月)
if (null != insuranceDetailVO.getBillingType()){
if (CommonConstants.ZERO_INT == insuranceDetailVO.getBillingType().intValue()){
insuranceDetailVO.setPurchaseCycle(insuranceDetailVO.getPurchaseCycle() + "天");
}else if (CommonConstants.ONE_INT == insuranceDetailVO.getBillingType().intValue()){
insuranceDetailVO.setPurchaseCycle(insuranceDetailVO.getPurchaseCycle() + "个月");
}
}
//如果是批增需要重新处理购买周期,按生效日期和保单结束时间计算
if (CommonConstants.THREE_INT == insuranceDetailVO.getBuyType()){
/*if (CommonConstants.THREE_INT == insuranceDetailVO.getBuyType()){
if (Objects.isNull(insuranceDetailVO.getPolicyEffect())){
insuranceDetailVO.setBuyCycle(null);
}else {
......@@ -1190,7 +1196,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
buyCycle = month + "个月/" + day + "天";
insuranceDetailVO.setBuyCycle(buyCycle);
}
}
}*/
//派单类型
insuranceDetailVO.setDistributeType(insuranceDetailVO.getReduceHandleStatus() == null?insuranceDetailVO.getBuyType():CommonConstants.FIVE_INT);
//派单状态
......@@ -1787,11 +1793,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//实缴结算状态
String actualStatus = settleVo.getActualStatus();
String pushResult = null;
//如果是见费出单,投保中,推送作废
//如果是见费出单,投保中,推送作废 2026-01-22 v1.7.19
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
//红冲预估推送
pushResult = pushEstimate(detail, CommonConstants.THREE_INT);
//已投保 需要处理实缴和差额数据
//已投保 需要处理实缴和差额数据 (已支出或支出中禁止退保)
if (CommonConstants.THREE_STRING.equals(detail.getBuyHandleStatus())){
//直接删除实缴及实缴与预估的差额
ekpSettleService.deleteEkpInsuranceDetailAsso(detail.getId());
......@@ -1859,7 +1865,12 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
operateList.add(e);
}
});
updateEmployeeInsurancePreById(detail,Stream.of("3","4","6").collect(Collectors.toList()),CommonConstants.FIVE_STRING);
//如果是见费出单,投保中,推送作废 2026-01-22 v1.7.19
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())){
updateEmployeeInsurancePreById(detail,Stream.of("3","4","6").collect(Collectors.toList()),CommonConstants.SEVEN_STRING);
}else {
updateEmployeeInsurancePreById(detail,Stream.of("3","4","6").collect(Collectors.toList()),CommonConstants.FIVE_STRING);
}
updateEmployeeInsurancePreRenewById(detail,Stream.of("3","4","6").collect(Collectors.toList()),CommonConstants.FIVE_STRING, true);
}
//更新状态
......@@ -2500,24 +2511,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
//实缴导入时根据条件取生成差额数据,其他情况会在推送数据时去规整 对应的应收和应支
if ("是".equals(detail.getIsJfcd())) {
//查询下是否已经生成了差额,生成的差额的金额 要在本次生成的差额里面扣除,也就是 要加到预估金额里面去
List<EkpSettleStatusVo> exists = ekpSettleService.getBalanceByInsuranceId(detail.getId());
BigDecimal balance = BigDecimal.ZERO;
if (CollectionUtils.isNotEmpty(exists)){
for (EkpSettleStatusVo vo : exists){
if (Common.isNotNull(vo.getPaymentBalance())){
balance = balance.add(BigDecimal.valueOf(vo.getPaymentBalance()));
}
}
}
if (CommonConstants.ZERO_STRING.equals(detail.getIsJfcd())) {
//登记保单保费时为已投保,已投保无法退回,故直接删除差额重新生成即可
ekpSettleService.callBackBalance(detail.getId());
tInsuranceSettleService.remove(Wrappers.<TInsuranceSettle>query().lambda()
.eq(TInsuranceSettle::getInsDetailId, detail.getId())
.eq(TInsuranceSettle::getSettleType, CommonConstants.TWO_INT));
TInsuranceSettle settleNew = new TInsuranceSettle();
settleNew.setInsDetailId(detail.getId());
settleNew.setSettleType(CommonConstants.TWO_INT);
settleNew.setSettleHandleStatus(CommonConstants.ONE_STRING);
settleNew.setActualPremium(bigDecimalAct);
settleNew.setIsEstimatePush(CommonConstants.ZERO_INT);
settleNew.setEstimatePremium(BigDecimalUtils.safeAdd(detail.getEstimatePremium(),balance));
settleNew.setEstimatePremium(detail.getEstimatePremium());
//调完ekp接口才会是1
settleNew.setCreateTime(LocalDateTime.now());
tInsuranceSettleService.save(settleNew);
......@@ -3001,13 +3007,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param paramList
* @return {@link Map<String, List<InsuranceAddParam>>}
*/
private Map<String,List<InsuranceAddParam>> addInsuranceCheck(List<InsuranceAddParam> paramList,YifuUser user,boolean autoFlag,
private Map<String,List<InsuranceAddParam>> addInsuranceCheck(List<InsuranceAddParam> paramList,
YifuUser user,boolean autoFlag,
Map<String,TSettleDomainSelectVo> mapSelectVo){
//1.9.11超管无需校验项目权限
List<String> deptNoList = new ArrayList<>();
if (Common.isNotNull(user) && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
//deptNoList = getDeptNoList(user.getId());
deptNoList = getDeptNoMapAndDeptNo(user.getId(),mapSelectVo);
deptNoList = getDeptNoMapAndDeptNo(user.getId());
}
Map<String,List<InsuranceAddParam>> map = new HashMap<>();
List<InsuranceAddParam> listResult = new ArrayList<>();
......@@ -3019,10 +3026,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
// List<InsuredListVo> listInProgress = new ArrayList<>();
TInsuranceType insuranceType = null;
TSettleDomainSelectVo settleDomainSelectVo = null;
TSettleDomainSelectVo settleResult = null;
//定义外层循环标识,方便去重的时候跳出
outer:
for (int i = 0; i < distinctList.size(); i++) {
InsuranceAddParam param = distinctList.get(i);
if (!mapSelectVo.containsKey(param.getDeptNo())){
// 1. 查询项目信息获取客户信息
settleResult = archivesDaprUtil.selectDeptByNo(param.getDeptNo());
if (settleResult == null) {
param.setErrorMessage("项目编码[" + param.getDeptNo() + "]信息不存在");
listResult.add(param);
continue;
}else {
mapSelectVo.put(param.getDeptNo(),settleResult);
}
}
param.setBuyType(CommonConstants.ONE_INT);
// 必填校验
if (StringUtils.isBlank(param.getEmpName())) {
......@@ -3424,7 +3444,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(insuranceType) &&
Common.isNotNull(settleDomainSelectVo) &&
CommonConstants.ZERO_STRING.equals(insuranceType.getIsJfcd()) &&
CommonConstants.IS_TRUE.equals(settleDomainSelectVo.getBpoEnable())) {
CommonConstants.IS_FALSE.equals(settleDomainSelectVo.getBpoEnable())) {
param.setIsJfcd(CommonConstants.ZERO_STRING);
}
}
......@@ -3437,7 +3457,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (Common.isNotNull(insuranceType) &&
Common.isNotNull(settleDomainSelectVo) &&
CommonConstants.ZERO_STRING.equals(insuranceType.getIsJfcd()) &&
CommonConstants.IS_TRUE.equals(settleDomainSelectVo.getBpoEnable())) {
CommonConstants.IS_FALSE.equals(settleDomainSelectVo.getBpoEnable())) {
param.setIsJfcd(CommonConstants.ZERO_STRING);
}
}
......@@ -3601,7 +3621,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//1.9.11超管无需校验项目权限
List<String> deptNoList = new ArrayList<>();
if (Common.isNotNull(user) && !CommonConstants.ZERO_STRING.equals(user.getSystemFlag())) {
deptNoList = getDeptNoMapAndDeptNo(user.getId(),mapSelectVo);
deptNoList = getDeptNoMapAndDeptNo(user.getId());
}
Map<String,List<InsuranceBatchParam>> map = new HashMap<>();
List<InsuranceBatchParam> listResult = new ArrayList<>();
......@@ -3611,10 +3631,23 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map<String, String> insurAutoMap = getBatchInsurAutoMap(paramList);
TInsuranceType insuranceType = null;
TSettleDomainSelectVo settleDomainSelectVo = null;
TSettleDomainSelectVo settleResult = null;
//定义外层循环标识,方便去重的时候跳出
outer:
for (int i = 0; i < distinctList.size(); i++) {
InsuranceBatchParam param = distinctList.get(i);
if (!mapSelectVo.containsKey(param.getDeptNo())){
// 1. 查询项目信息获取客户信息
settleResult = archivesDaprUtil.selectDeptByNo(param.getDeptNo());
if (settleResult == null) {
param.setErrorMessage("项目编码[" + param.getDeptNo() + "]信息不存在");
listResult.add(param);
continue;
}else {
mapSelectVo.put(param.getDeptNo(),settleResult);
}
}
param.setBuyType(CommonConstants.THREE_INT);
// 必填校验
if (StringUtils.isBlank(param.getDeptNo())){
......@@ -3999,6 +4032,9 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
continue;
}
}
if (null != mapSelectVo && mapSelectVo.size() > 0){
settleDomainSelectVo = mapSelectVo.get(param.getDeptNo());
}
//初始化是否见费出单字段值
initJfcdBatch(insuranceType, settleDomainSelectVo, param);
listSuccess.add(param);
......@@ -8239,7 +8275,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @param userId
* @return {@link List< String>}
*/
public List<String> getDeptNoMapAndDeptNo(String userId,Map<String,TSettleDomainSelectVo> mapSelectVo){
public List<String> getDeptNoMapAndDeptNo(String userId){
List<String> deptList = new ArrayList<>(16);
try{
R<TSettleDomainListVo> settleDomainList = archivesDaprUtil.getSettleDomainIdsByUserId(userId);
......@@ -8247,10 +8283,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
TSettleDomainListVo data = settleDomainList.getData();
if (Optional.ofNullable(data).isPresent()){
deptList = data.getDeptNos();
if (Optional.ofNullable(data.getMapSelectVo()).isPresent()){
mapSelectVo.clear();
mapSelectVo.putAll(data.getMapSelectVo());
}
}
}
}catch (Exception e){
......@@ -9633,7 +9665,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
String id = detail.getId()+CommonConstants.DOWN_LINE_STRING+detail.getDefaultSettleId();
EkpSettleStatusVo vo = ekpSettleService.getSettleStatusFromEkpInsuranceDetailAsso(id);
if (null != vo && "已结算".equals(vo.getSettleStatus()) || "结算中".equals(vo.getSettleStatus())){
return R.failed("已结算的投保记录不可撤回");
return R.failed("已结算或结算中的投保记录不可撤回");
}
try {
//未结算删除 EKP 的预估数据
......@@ -9642,6 +9674,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
baseMapper.deleteById(detail.getId());
//未结算删除 HRO的预估结算数据
tInsuranceSettleService.removeById(detail.getDefaultSettleId());
//查询并删除收入信息
TIncomeDetail incomeDetail = new TIncomeDetail();
incomeDetail.setSourceId(detail.getId());
R<TIncomeDetailReturnVo> detailList = socialDaprUtils.getTIncomeDetailList(incomeDetail);
if(Common.isNotNull(detailList) && detailList.getCode() == CommonConstants.SUCCESS
&& !detailList.getData().getDetailList().isEmpty()){
List<TIncomeDetail> incomeDetailList = detailList.getData().getDetailList();
BigDecimal sumMoney = BigDecimal.ZERO;
for (TIncomeDetail income : incomeDetailList) {
socialDaprUtils.deleteById(income);
}
}
//未结算更新自动化测的状态为待派单 temployeeinsurancepre
employeeInsurancePreMapper.delete(Wrappers.<TEmployeeInsurancePre>query().lambda().eq(TEmployeeInsurancePre::getInsurancesId,detail.getId()));
} catch (Exception e) {
......
......@@ -93,6 +93,9 @@ public class DoJointInsuranceTask {
if (type == CommonConstants.ONE_INT) {
settle.setIsEstimatePush(CommonConstants.ONE_INT);
settle.setEstimatePushTime(LocalDateTime.now());
}else if (type == CommonConstants.SEVEN_INT) {
settle.setIsEstimatePush(CommonConstants.ONE_INT);
settle.setEstimatePushTime(LocalDateTime.now());
} else {
settle.setIsActualPush(CommonConstants.ONE_INT);
settle.setActualPushTime(LocalDateTime.now());
......
......@@ -110,6 +110,9 @@
delete from ekp_insurances_info where fd_3b0a5743acab7e like concat(#{id},'%') and fd_jfcd='是' and (fd_3adfe6af71a1cc = '差额' or fd_3adfe6af71a1cc = '实缴')
</delete>
<delete id="callBackBalance">
delete from ekp_insurances_info where fd_3b0a5743acab7e like concat(#{id},'%') and fd_jfcd='是' and fd_3adfe6af71a1cc = '差额'
</delete>
<select id="getDeptSettle" resultMap="BaseDeptResultMap">
select
<include refid="Base_Column_Dept"></include>
......
......@@ -71,6 +71,14 @@
<result property="spaySettleFlag" column="SPAY_COLLECT_FLAG"/>
<result property="spayCollectFlag" column="SPAY_SETTLE_FLAG"/>
<result property="isAdress" column="IS_ADRESS" jdbcType="VARCHAR"/>
<result property="paymentStatus" column="PAYMENT_STATUS" jdbcType="VARCHAR"/>
<result property="paymentTime" column="PAYMENT_TIME" jdbcType="VARCHAR"/>
<result property="isJfcd" column="IS_JFCD" jdbcType="VARCHAR"/>
<result property="purchaseCycle" column="PURCHASE_CYCLE" jdbcType="VARCHAR"/>
<result property="preHandleTime" column="PRE_HANDLE_TIME" jdbcType="VARCHAR"/>
</resultMap>
<resultMap id="UpdateMap" type="com.yifu.cloud.plus.v1.yifu.insurances.vo.InsuranceUpdateVO">
<id property="id" column="ID" jdbcType="VARCHAR"/>
......@@ -90,7 +98,7 @@
IS_USE,IS_EFFECT,IS_OVERDUE,REMARK,
CREATE_BY,CREATE_NAME,CREATE_TIME,BPO_FLAG,
UPDATE_BY,UPDATE_TIME,DELETE_FLAG,DEFAULT_SETTLE_ID,HANDLED_BY,HANDLED_TIME,ORDER_NO,CREATE_USER_DEPT_ID,CREATE_USER_DEPT_NAME,
DEPT_NAME,UNIT_ID,UNIT_NAME,UNIT_NO,IS_ADRESS
DEPT_NAME,UNIT_ID,UNIT_NAME,UNIT_NO,IS_ADRESS,PAYMENT_STATUS,PAYMENT_TIME,IS_JFCD,PURCHASE_CYCLE,PRE_HANDLE_TIME
</sql>
......@@ -125,12 +133,16 @@
a.IS_JFCD as isJfcd,
a.PURCHASE_CYCLE as purchaseCycle,
a.BILLING_TYPE as billingType,
a.PRE_HANDLE_TIME as preHandleTime
a.PRE_HANDLE_TIME as preHandleTime,
a.ESTIMATE_PREMIUM as estimatePremium
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.id != null">
and a.id = #{param.id}
</if>
<if test="param.unitName != null and param.unitName.trim() != ''">
and a.UNIT_NAME like concat(replace(replace(#{param.unitName},'_','\_'),'%','\%'),'%')
</if>
......@@ -191,10 +203,10 @@
<if test="param.isJfcd != null and param.isJfcd.trim() != ''">
and a.IS_JFCD = #{param.isJfcd}
</if>
<if test="param.estimatePremiumStart != null and param.estimatePremiumStart.trim() != '' ">
<if test="param.estimatePremiumStart != null">
and a.ESTIMATE_PREMIUM <![CDATA[ >= ]]> #{param.estimatePremiumStart}
</if>
<if test="param.estimatePremiumEnd != null and param.estimatePremiumEnd.trim() != ''">
<if test="param.estimatePremiumEnd != null">
and a.ESTIMATE_PREMIUM <![CDATA[ <= ]]> #{param.estimatePremiumEnd}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
......@@ -231,12 +243,16 @@
a.IS_JFCD as isJfcd,
a.PURCHASE_CYCLE as purchaseCycle,
a.PRE_HANDLE_TIME as preHandleTime,
a.ESTIMATE_PREMIUM as estimatePremium
a.ESTIMATE_PREMIUM as estimatePremium,
a.BILLING_TYPE as billingType
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.id != null">
and a.id = #{param.id}
</if>
<if test="param.deptNo != null and param.deptNo.trim() != ''">
and a.DEPT_NO = #{param.deptNo}
</if>
......@@ -288,10 +304,10 @@
<if test="param.isJfcd != null and param.isJfcd.trim() != ''">
and a.IS_JFCD = #{param.isJfcd}
</if>
<if test="param.estimatePremiumStart != null and param.estimatePremiumStart.trim() != '' ">
<if test="param.estimatePremiumStart != null">
and a.ESTIMATE_PREMIUM <![CDATA[ >= ]]> #{param.estimatePremiumStart}
</if>
<if test="param.estimatePremiumEnd != null and param.estimatePremiumEnd.trim() != ''">
<if test="param.estimatePremiumEnd != null">
and a.ESTIMATE_PREMIUM <![CDATA[ <= ]]> #{param.estimatePremiumEnd}
</if>
<if test="param.authSql != null and param.authSql.trim() != ''">
......@@ -419,7 +435,7 @@
a.REFUND_ID as refundId,
a.EXPIRE_REMARK,
a.EXPIRE_IGNORE_FLAG,
a.IS_ADRESS as isAdress
a.IS_ADRESS as isAdress,PAYMENT_STATUS,PAYMENT_TIME,IS_JFCD,PURCHASE_CYCLE,PRE_HANDLE_TIME
from t_insurance_detail a
left join t_insurance_settle tis on a.DEFAULT_SETTLE_ID = tis.ID
where a.ID = #{id}
......
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