|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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) { | 
|---|
|  |  |  | 
|---|
|  |  |  | list.add(po); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | EasyExcel.write(response.getOutputStream(), VoTradeDetails.class) | 
|---|
|  |  |  | .registerWriteHandler(new ReportExportCellWriteHandler("财务对账-交易明细")) | 
|---|
|  |  |  | .registerWriteHandler(new CellWriteHandler("财务对账-交易明细")) | 
|---|
|  |  |  | .sheet("交易明细") | 
|---|
|  |  |  | .doWrite(list); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|