Commit e8cf9ff3 authored by huyuchen's avatar huyuchen

商险登记保单保费针对ekp明细结算状态校验

parent 648012a7
...@@ -24,6 +24,15 @@ public interface EkpSettleMapper { ...@@ -24,6 +24,15 @@ public interface EkpSettleMapper {
*/ */
SettleVo getSettle(String id); SettleVo getSettle(String id);
/**
* 从商险订单明细中获取当前保单的结算状态
*
* @author huyc
* @param id
* @return {@link SettleVo}
*/
String getSettleStatusFromEkpInsuranceDetail(String id);
List<EkpInsuranceViewVo> selectSettleStatusBySettleNo(@Param("settleNo") String settleNo, @Param("payFlag") String payFlag); List<EkpInsuranceViewVo> selectSettleStatusBySettleNo(@Param("settleNo") String settleNo, @Param("payFlag") String payFlag);
List<EkpSocialViewVo> selectSocialViewStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag); List<EkpSocialViewVo> selectSocialViewStatusBySettleNo(@Param("settleNo") String settleNo,@Param("payFlag") String payFlag);
......
...@@ -25,6 +25,15 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> { ...@@ -25,6 +25,15 @@ public interface EkpSettleService extends IService<TInsuranceTypeRate> {
*/ */
SettleVo getSettle(String id); SettleVo getSettle(String id);
/**
* 从商险订单明细中获取当前保单的结算状态
*
* @author huyc
* @param id 新增类
* @return {@link R}
*/
String getSettleStatusFromEkpInsuranceDetail(String id);
/** /**
* 根据结算单编号查询商险视图信息 * 根据结算单编号查询商险视图信息
* *
......
...@@ -31,6 +31,11 @@ public class EkpSettleServiceImpl implements EkpSettleService { ...@@ -31,6 +31,11 @@ public class EkpSettleServiceImpl implements EkpSettleService {
return ekpSettleMapper.getSettle(id); return ekpSettleMapper.getSettle(id);
} }
@Override
public String getSettleStatusFromEkpInsuranceDetail(String id) {
return ekpSettleMapper.getSettleStatusFromEkpInsuranceDetail(id);
}
@Override @Override
public List<EkpInsuranceViewVo> selectViewBySettleNo(String settleNo,String payFlag) { public List<EkpInsuranceViewVo> selectViewBySettleNo(String settleNo,String payFlag) {
return ekpSettleMapper.selectSettleStatusBySettleNo(settleNo,payFlag); return ekpSettleMapper.selectSettleStatusBySettleNo(settleNo,payFlag);
......
...@@ -3671,6 +3671,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3671,6 +3671,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
InsuranceRegisterParam param; InsuranceRegisterParam param;
SettleVo settleVo; SettleVo settleVo;
List<TInsuranceEkp> ekpList; List<TInsuranceEkp> ekpList;
String status;
for (int i = 0; i < distinctList.size(); i++) { for (int i = 0; i < distinctList.size(); i++) {
param = distinctList.get(i); param = distinctList.get(i);
param.setFlag(CommonConstants.ONE_STRING); param.setFlag(CommonConstants.ONE_STRING);
...@@ -3868,14 +3869,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3868,14 +3869,14 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
if (StringUtils.isNotBlank(detail.getDefaultSettleId())){ if (StringUtils.isNotBlank(detail.getDefaultSettleId())){
settle = tInsuranceSettleService.getById(detail.getDefaultSettleId()); settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
if (Optional.ofNullable(settle).isPresent()){ if (Optional.ofNullable(settle).isPresent()){
settleVo = getInsuranceDetailSettleStatus(detail.getId(), detail.getDefaultSettleId()); status = getSettleStatusFromEkpInsuranceDetail(detail.getId(), detail.getDefaultSettleId());
if(!Common.isEmpty(settleVo) && (booleanActualPremium || booleanPolicyNo || booleanInvoiceNo)){ if(null != status && (booleanActualPremium || booleanPolicyNo || booleanInvoiceNo)){
//保费更新或者保单号发票号更新 //保费更新或者保单号发票号更新
if (InsurancesConstants.SETTLE_TWO.equals(settleVo.getActualStatus())) { if (InsurancesConstants.SETTLE_TWO.equals(status)) {
param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_THREE_NOT_REGISTERED); param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_THREE_NOT_REGISTERED);
continue; continue;
} }
if (InsurancesConstants.SETTLE_ONE.equals(settleVo.getActualStatus())) { if (InsurancesConstants.SETTLE_ONE.equals(status)) {
param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_TWO_NOT_REGISTERED); param.setErrorMessage(InsurancesConstants.SETTLE_HANDLE_TWO_NOT_REGISTERED);
continue; continue;
} }
...@@ -7310,6 +7311,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -7310,6 +7311,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return ekpSettleService.getSettle(id); return ekpSettleService.getSettle(id);
} }
/**
* 从商险订单明细中获取当前保单的结算状态
*
* @author huyc
* @param
* @return {@link String}
*/
public String getSettleStatusFromEkpInsuranceDetail(String detailId,String settleId){
String id = detailId+CommonConstants.DOWN_LINE_STRING+settleId;
//获取ekp结算信息
return ekpSettleService.getSettleStatusFromEkpInsuranceDetail(id);
}
/** /**
* 保存失败信息 * 保存失败信息
* *
......
...@@ -45,6 +45,16 @@ ...@@ -45,6 +45,16 @@
where where
fd_3b05ba46bb042e = #{id} fd_3b05ba46bb042e = #{id}
</select> </select>
<select id="getSettleStatusFromEkpInsuranceDetail" resultType="java.lang.String">
select
fd_3adfe6ec6a8cbe
from
ekp_e96a0a28442447c81ec0
where
fd_3b0a5743acab7e = #{id} limit 1
</select>
<!-- 根据结算单编码获取视图信息 --> <!-- 根据结算单编码获取视图信息 -->
<select id="selectSettleStatusBySettleNo" resultMap="BaseResultStatusMap"> <select id="selectSettleStatusBySettleNo" resultMap="BaseResultStatusMap">
select select
......
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