|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.doumee.core.constants.ResponseStatus; | 
|---|
|  |  |  | import com.doumee.core.exception.BusinessException; | 
|---|
|  |  |  | import com.doumee.core.model.LoginUserInfo; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | 
|---|
|  |  |  | import com.github.yulichang.wrapper.MPJLambdaWrapper; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.apache.shiro.SecurityUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  | import org.springframework.util.CollectionUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  | queryWrapper.selectAs(InsuranceApply::getCode,ApplyDetail::getApplyCode); | 
|---|
|  |  |  | queryWrapper.selectAs(Solutions::getId,ApplyDetail::getSolutionId); | 
|---|
|  |  |  | queryWrapper.selectAs(Solutions::getName,ApplyDetail::getSolutionName); | 
|---|
|  |  |  | queryWrapper.selectAs(Solutions::getType,ApplyDetail::getSolutionType); | 
|---|
|  |  |  | queryWrapper.selectAs(Insurance::getBaseId,ApplyDetail::getInsuranceId); | 
|---|
|  |  |  | queryWrapper.selectAs(Worktype::getName,ApplyDetail::getWorkTypeName); | 
|---|
|  |  |  | queryWrapper.selectAs(Member::getIdcardNo,ApplyDetail::getIdcardNo); | 
|---|
|  |  |  | queryWrapper.selectAs(Member::getName,ApplyDetail::getMemberName); | 
|---|
|  |  |  | queryWrapper.selectAs(InsuranceApply::getStartTime,ApplyDetail::getParentStartTime); | 
|---|
|  |  |  | queryWrapper.selectAs(InsuranceApply::getEndTime,ApplyDetail::getParentEndTime); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | queryWrapper.selectAs(Solutions::getParentId,ApplyDetail::getSolutionBaseId); | 
|---|
|  |  |  | queryWrapper.leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId); | 
|---|
|  |  |  | queryWrapper.leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId); | 
|---|
|  |  |  | queryWrapper.leftJoin(Member.class,Member::getId,ApplyDetail::getMemberId); | 
|---|
|  |  |  | queryWrapper.leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId); | 
|---|
|  |  |  | queryWrapper.leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId); | 
|---|
|  |  |  | queryWrapper.leftJoin(Insurance.class,Insurance::getId,Solutions::getInsuranceId); | 
|---|
|  |  |  | queryWrapper.eq(!Objects.isNull(applyDetailPageDTO.getApplyId()),ApplyDetail::getApplyId,applyDetailPageDTO.getApplyId()); | 
|---|
|  |  |  | queryWrapper.ge(!Objects.isNull(applyDetailPageDTO.getApplyStatus()) | 
|---|
|  |  |  | &&!applyDetailPageDTO.getApplyStatus().equals(Constants.ZERO), | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询人员可报案数据 | 
|---|
|  |  |  | * @param memberId | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<ApplyDetail> getMemberSettleClaimsList(Integer memberId){ | 
|---|
|  |  |  | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); | 
|---|
|  |  |  | List<ApplyDetail>  applyDetailList = applyDetailJoinMapper.selectJoinList(ApplyDetail.class, | 
|---|
|  |  |  | new MPJLambdaWrapper<ApplyDetail>() | 
|---|
|  |  |  | .selectAll(ApplyDetail.class) | 
|---|
|  |  |  | .selectAs(InsuranceApply::getCode,ApplyDetail::getApplyCode) | 
|---|
|  |  |  | .selectAs(InsuranceApply::getStartTime,ApplyDetail::getParentStartTime) | 
|---|
|  |  |  | .selectAs(InsuranceApply::getEndTime,ApplyDetail::getParentEndTime) | 
|---|
|  |  |  | .selectAs(Company::getName,ApplyDetail::getCompanyName) | 
|---|
|  |  |  | .selectAs(Solutions::getName,ApplyDetail::getSolutionName) | 
|---|
|  |  |  | .selectAs(Worktype::getName,ApplyDetail::getWorkTypeName) | 
|---|
|  |  |  | .selectAs(DispatchUnit::getName,ApplyDetail::getDuName) | 
|---|
|  |  |  | .leftJoin(InsuranceApply.class,InsuranceApply::getId,ApplyDetail::getApplyId) | 
|---|
|  |  |  | .leftJoin(Company.class,Company::getId,InsuranceApply::getCompanyId) | 
|---|
|  |  |  | .leftJoin(Solutions.class,Solutions::getId,InsuranceApply::getSolutionId) | 
|---|
|  |  |  | .leftJoin(Worktype.class,Worktype::getId,ApplyDetail::getWorktypeId) | 
|---|
|  |  |  | .leftJoin(DispatchUnit.class,DispatchUnit::getId,ApplyDetail::getDuId) | 
|---|
|  |  |  | .in(InsuranceApply::getStatus,Constants.InsuranceApplyStatus.UPLOAD_INSURANCE.getKey(), | 
|---|
|  |  |  | Constants.InsuranceApplyStatus.WTB_DONE.getKey()) | 
|---|
|  |  |  | .eq(ApplyDetail::getIsdeleted,Constants.ZERO) | 
|---|
|  |  |  | .eq(InsuranceApply::getCompanyId,user.getCompanyId()) | 
|---|
|  |  |  | .eq(ApplyDetail::getMemberId,memberId) | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return applyDetailList; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|