| | |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.excel.CellWriteHandler; |
| | | import com.dy.pipIrrGlobal.excel.ExcelUtil; |
| | | import com.dy.pipIrrGlobal.excel.ReportExportCellWriteHandler; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaClient; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeAudits; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeGeneral; |
| | |
| | | public void exportGeneral(HttpServletResponse response, QoGeneral vo) { |
| | | ExcelUtil.setExcelRespProp(response, "总账" + LocalDate.now()); |
| | | List<VoGeneral> generalList = generalSv.exportGenerals(vo).getObj(); |
| | | |
| | | EasyExcel.write(response.getOutputStream(), VoGeneral.class) |
| | | .registerWriteHandler(new ReportExportCellWriteHandler("财务对账-总账")) |
| | | .registerWriteHandler(new CellWriteHandler("财务对账-总账")) |
| | | .sheet("总账") |
| | | .doWrite(generalList); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public void add_general(){ |
| | | //删除今天的总账 |
| | | generalSv.deleteTodayGeneral(); |
| | | // 获取未生成总账的交易日期列表(当天的交易记录不生成总账) |
| | | List<Map<String, Object>> list_operateDate = Optional.ofNullable(generalSv.getDatesOfNotInGenerals()).orElse(new ArrayList<>()); |
| | | if(list_operateDate.size() > 0) { |
| | |
| | | }) |
| | | @GetMapping(path = "getSummaries") |
| | | @SsoAop() |
| | | public BaseResponse<Map> getSummaries(QoSummary vo){ |
| | | public BaseResponse<Map> getSummaries( @Valid QoSummary vo, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildErrorMsg(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | try { |
| | | Map res = generalSv.getSummaries(vo); |
| | | return BaseResponseUtils.buildSuccess(res); |
| | |
| | | list.add(po); |
| | | |
| | | EasyExcel.write(response.getOutputStream(), VoTradeDetails.class) |
| | | .registerWriteHandler(new ReportExportCellWriteHandler("财务对账-交易明细")) |
| | | .registerWriteHandler(new CellWriteHandler("财务对账-交易明细")) |
| | | .sheet("交易明细") |
| | | .doWrite(list); |
| | | } |
| | | |
| | | } |