Commit ebc41a2b authored by huyuchen's avatar huyuchen

接口修改

parent c7a6b030
...@@ -224,5 +224,5 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> { ...@@ -224,5 +224,5 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
*/ */
IPage<InsuredOrderListVo> getOrderInsuredListPage(Page<InsuredOrderListVo> page, @Param("param") InsuredOrderParam param); IPage<InsuredOrderListVo> getOrderInsuredListPage(Page<InsuredOrderListVo> page, @Param("param") InsuredOrderParam param);
List<TInsuranceDetail> selectPushList();
} }
...@@ -1839,17 +1839,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -1839,17 +1839,25 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
*/ */
@Override @Override
public void pushActualPremium(){ public void pushActualPremium(){
List<TInsuranceDetail> list = baseMapper.selectList(Wrappers.<TInsuranceDetail>query().lambda() List<TInsuranceDetail> list = baseMapper.selectPushList();
.isNotNull(TInsuranceDetail::getDefaultSettleId)
.isNotNull(TInsuranceDetail::getActualPremium));
for (TInsuranceDetail detail: list){ for (TInsuranceDetail detail: list){
TInsuranceSettle settle = tInsuranceSettleService.getById(detail.getDefaultSettleId()); //推作废
String s = pushEstimate(detail, CommonConstants.TWO_INT); pushEstimate(detail, CommonConstants.FIVE_INT);
//如果推送成功则更改推送状态 }
if (StringUtils.isNotBlank(s) && Common.isNotNull(settle)) { for (TInsuranceDetail detail: list){
settle.setActualPushTime(LocalDateTime.now()); //单独结算
settle.setIsActualPush(CommonConstants.ONE_INT); if(StringUtils.isNotBlank(detail.getDefaultSettleId()) && detail.getSettleType() == CommonConstants.ONE_INT) {
tInsuranceSettleService.updateById(settle); TInsuranceSettle settle = tInsuranceSettleService.getById(detail.getDefaultSettleId());
detail.setEstimatePremium(null);
String s = pushEstimate(detail, CommonConstants.TWO_INT);
//如果推送成功则更改推送状态
if (StringUtils.isNotBlank(s) && Common.isNotNull(settle)) {
settle.setActualPushTime(LocalDateTime.now());
settle.setIsActualPush(CommonConstants.ONE_INT);
settle.setIsEstimatePush(CommonConstants.ZERO_INT);
settle.setEstimatePushTime(null);
tInsuranceSettleService.updateById(settle);
}
} }
} }
} }
......
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