|  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoBa.BaClient; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoPr.PrDivide; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voPr.VoDivide; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voPr.VoDivideDetails; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voSe.VoActiveCard; | 
|---|
|  |  |  | import com.dy.pipIrrProject.result.ProjectResultCode; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.Operation; | 
|---|
|  |  |  | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<QueryResultVo<List<VoDivide>>> getDivides(QueryVo vo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | QueryResultVo<List<VoDivide>> res = divideSv.getDivides(vo); | 
|---|
|  |  |  | if(res.itemTotal != null && res.itemTotal > 0) { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(ProjectResultCode.NO_DIVIDES.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //QueryResultVo<List<VoDivide>> res = divideSv.getDivides(vo); | 
|---|
|  |  |  | //if(res.itemTotal != null && res.itemTotal > 0) { | 
|---|
|  |  |  | //    return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | //}else { | 
|---|
|  |  |  | //    return BaseResponseUtils.buildSuccess(ProjectResultCode.NO_DIVIDES.getMessage()); | 
|---|
|  |  |  | //} | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(divideSv.getDivides(vo)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("获取开卡记录异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "/getone/{id}") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<PrDivide> getOneDivide(@PathVariable("id") Long id){ | 
|---|
|  |  |  | //public BaseResponse<PrDivide> getOneDivide(@PathVariable("id") Long id){ | 
|---|
|  |  |  | public BaseResponse<VoDivideDetails> getOneDivide(@PathVariable("id") Long id){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | PrDivide res = divideSv.getOneDivide(id); | 
|---|
|  |  |  | if(res != null) { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_DIVIDES.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //PrDivide res = divideSv.getOneDivide(id); | 
|---|
|  |  |  | //if(res != null) { | 
|---|
|  |  |  | //    return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | //}else { | 
|---|
|  |  |  | //    return BaseResponseUtils.buildErrorMsg(ProjectResultCode.NO_DIVIDES.getMessage()); | 
|---|
|  |  |  | //} | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(divideSv.getDivideDetails(id)); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("查询农户异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|