Commit ebc41a2b authored by huyuchen's avatar huyuchen

接口修改

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