|  |  |  | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voSe.VoGeneral; | 
|---|
|  |  |  | import com.dy.pipIrrSell.general.dto.DtoGeneral; | 
|---|
|  |  |  | import com.dy.pipIrrSell.general.qo.QoGeneral; | 
|---|
|  |  |  | import com.dy.pipIrrSell.general.qo.QoSummary; | 
|---|
|  |  |  | import com.dy.pipIrrSell.general.qo.QoToAudit; | 
|---|
|  |  |  | import com.dy.pipIrrSell.result.SellResultCode; | 
|---|
|  |  |  | import io.swagger.v3.oas.annotations.Operation; | 
|---|
|  |  |  | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | add_general(); | 
|---|
|  |  |  | QueryResultVo<List<VoGeneral>> res = generalSv.getGenerals(vo); | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | if(res.itemTotal > 0) { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | return BaseResponseUtils.buildFail(SellResultCode.No_GENERALS.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("查询交易记录异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess() ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Operation(summary = "获得待审核交易汇总记录", description = "返回待审核交易汇总记录") | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 开卡系统交易汇总查询与对账系统交易汇总查询共用接口 | 
|---|
|  |  |  | * 开卡系统参数:收银员ID、查询起止日期 | 
|---|
|  |  |  | * 对账系统参数:收银员ID、交易日期 | 
|---|
|  |  |  | * @param vo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "获得开卡系统交易统计记录", description = "返回开卡系统交易统计记录") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | 
|---|
|  |  |  | schema = @Schema(implementation = BaClient.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "getToAudit") | 
|---|
|  |  |  | @GetMapping(path = "getSummaries") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Map> getToAudit(QoToAudit vo){ | 
|---|
|  |  |  | public BaseResponse<Map> getSummaries(QoSummary vo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | Map res = generalSv.getToAudit(vo); | 
|---|
|  |  |  | Map res = generalSv.getSummaries(vo); | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("查询交易汇总记录异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取财务对账_交易明细 | 
|---|
|  |  |  | * @param vo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Operation(summary = "获取财务对账_交易明细", description = "获取财务对账_交易明细") | 
|---|
|  |  |  | @ApiResponses(value = { | 
|---|
|  |  |  | @ApiResponse( | 
|---|
|  |  |  | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, | 
|---|
|  |  |  | description = "返回一页农户数据(BaseResponse.content:QueryResultVo[{}])", | 
|---|
|  |  |  | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, | 
|---|
|  |  |  | schema = @Schema(implementation = BaClient.class))} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(path = "get_trade_details") | 
|---|
|  |  |  | @SsoAop() | 
|---|
|  |  |  | public BaseResponse<Map> getTradeDetails(QoToAudit vo){ | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | Map res = Optional.ofNullable(generalSv.getTradeDetails(vo)).orElse(new HashMap()); | 
|---|
|  |  |  | if(res.size() > 0) { | 
|---|
|  |  |  | return BaseResponseUtils.buildSuccess(res); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | return BaseResponseUtils.buildFail(SellResultCode.No_TRADE_DETAILS.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("查询交易记录异常", e); | 
|---|
|  |  |  | return BaseResponseUtils.buildException(e.getMessage()) ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|