|  |  | 
 |  |  |                     || saveUnionChangeDTO.getAddValidDate().getTime()> unionApply.getEndTime().getTime()){ | 
 |  |  |                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"合并单的批单加保生效期错误"); | 
 |  |  |             } | 
 |  |  |             if(saveUnionChangeDTO.getDelValidDate().getTime()<unionApply.getStartTime().getTime() | 
 |  |  |                     || saveUnionChangeDTO.getDelValidDate().getTime()> unionApply.getEndTime().getTime()){ | 
 |  |  |                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"合并单的批单减保生效期错误"); | 
 |  |  |             } | 
 |  |  |              | 
 |  |  |             //加入 查询是否存在减保的数据  如果存在减保数据 进行该日期的判断 2024年7月30日16:38:18 | 
 |  |  |             if(applyChagneDetailJoinMapper.selectCount(new QueryWrapper<ApplyChagneDetail>().lambda() | 
 |  |  |                             .eq(ApplyChagneDetail::getType,Constants.ONE) | 
 |  |  |                     .in(ApplyChagneDetail::getApplyChangeId,saveUnionChangeDTO.getApplyIds()))>Constants.ZERO){ | 
 |  |  |                 if(saveUnionChangeDTO.getDelValidDate().getTime()<unionApply.getStartTime().getTime() | 
 |  |  |                         || saveUnionChangeDTO.getDelValidDate().getTime()> unionApply.getEndTime().getTime()){ | 
 |  |  |                     throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"合并单的批单减保生效期错误"); | 
 |  |  |                 } | 
 |  |  |             }; | 
 |  |  |  | 
 |  |  |         }else{ | 
 |  |  |             if(saveUnionChangeDTO.getApplyDate().getTime()<DateUtil.afterDateByType(unionApply.getStartTime(),0,1).getTime() | 
 |  |  |                     || saveUnionChangeDTO.getApplyDate().getTime()> unionApply.getEndTime().getTime()){ |