|
|
@@ -21,6 +21,7 @@ import org.apache.poi.xssf.usermodel.*;
|
|
|
import restcontroller.R;
|
|
|
import restcontroller.system.attachment.Attachment;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
@@ -753,7 +754,7 @@ public class cashbill extends Controller {
|
|
|
|
|
|
@API(title = "资金流水账列表查询", apiversion = R.ID20230111103403.v1.class)
|
|
|
@CACHEING
|
|
|
- public String query_cashBill() throws YosException {
|
|
|
+ public String query_cashBill() throws YosException, IOException {
|
|
|
/*
|
|
|
过滤条件
|
|
|
*/
|
|
|
@@ -787,13 +788,26 @@ public class cashbill extends Controller {
|
|
|
/**
|
|
|
* SQL资金流水账查询参数设置并查询
|
|
|
*/
|
|
|
+ boolean isExport = content.getBooleanValue("isExport");
|
|
|
SQLFactory factory = new SQLFactory(this, "资金流水账查询", pageSize, pageNumber, pageSorting);
|
|
|
+ if(isExport){
|
|
|
+ factory = new SQLFactory(this, "资金流水账查询导出");
|
|
|
+ }
|
|
|
factory.addParameter("sys_enterpriseid", sys_enterpriseid);
|
|
|
factory.addParameter("sa_accountclassid", sa_accountclassid);
|
|
|
factory.addParameter("siteid", siteid);
|
|
|
factory.addParameter_SQL("where", where);
|
|
|
Rows rows = dbConnect.runSqlQuery(factory.getSQL());
|
|
|
|
|
|
+ if (isExport) {
|
|
|
+ //去除不需要导出项
|
|
|
+ rows.getFieldList().remove("sa_accountclassid");
|
|
|
+ rows.getFieldList().remove("balance");
|
|
|
+ rows.getFieldList().remove("createby");
|
|
|
+ rows.getFieldList().remove("createdate");
|
|
|
+ Rows uploadRows = uploadExcelToObs("cashBill", "资金流水账列表", rows, getTitleMap());
|
|
|
+ return getSucReturnObject().setData(uploadRows).toString();
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* SQL资金流水账汇总信息查询参数设置并查询
|
|
|
@@ -1001,4 +1015,17 @@ public class cashbill extends Controller {
|
|
|
}
|
|
|
return sheet;
|
|
|
}
|
|
|
+ //返回导出的标题
|
|
|
+ public HashMap<String, String> getTitleMap() {
|
|
|
+ HashMap<String, String> titleMap = new HashMap<>();
|
|
|
+ titleMap.put("billno", "凭证编号");
|
|
|
+ titleMap.put("type", "收支类型");
|
|
|
+ titleMap.put("accountname", "账户名称");
|
|
|
+ titleMap.put("amount", "收支金额");
|
|
|
+ titleMap.put("source", "凭证来源");
|
|
|
+ titleMap.put("checkby", "审核人");
|
|
|
+ titleMap.put("checkdate", "审核时间");
|
|
|
+ titleMap.put("remarks", "备注");
|
|
|
+ return titleMap;
|
|
|
+ }
|
|
|
}
|