|
|
@@ -28,36 +28,13 @@ public class Bankstatement extends Controller {
|
|
|
@API(title = "列表", apiversion = R.ID20230106154004.v1.class)
|
|
|
@CACHEING
|
|
|
public String query() throws YosException {
|
|
|
- StringBuffer where = new StringBuffer(" 1=1 ");
|
|
|
- if (content.containsKey("where")) {
|
|
|
- JSONObject whereObject = content.getJSONObject("where");
|
|
|
- if (whereObject.containsKey("condition") && !"".equals(whereObject.getString("condition"))) {
|
|
|
- where.append("and (t1.oppbkname like '%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t1.oppname like '%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t1.oppaccno like '%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t1.remarks like '%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t1.notes like '%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t2.enterprisename like '%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t3.agentnum like '%").append(whereObject.getString("condition")).append("%' ");
|
|
|
- where.append("or t4.billno like '%").append(whereObject.getString("condition")).append("%') ");
|
|
|
- }
|
|
|
- if (whereObject.containsKey("status") && !"".equals(whereObject.getString("status"))) {
|
|
|
- where.append("and t1.status ='").append(whereObject.getString("status")).append("'");
|
|
|
- }
|
|
|
- }
|
|
|
-// SQLFactory sqlFactory = new SQLFactory(this, "银企直联流水账列表查询", pageSize, pageNumber, pageSorting);
|
|
|
-// sqlFactory.addParameter("siteid", siteid);
|
|
|
-// sqlFactory.addParameter_SQL("where", where);
|
|
|
-// Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
|
|
|
-
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, "sa_bankstatement", "sa_bankstatementid", "oppaccno",
|
|
|
- "oppbkname", "oppname", "trantime", "amount", "createdate", "status", "sa_cashbillid", "sys_enterpriseid", "remarks");
|
|
|
+ "oppbkname", "oppname", "trantime", "amount", "createdate", "status", "sa_cashbillid", "sys_enterpriseid", "remarks", "xncardno");
|
|
|
querySQL.setTableAlias("t1");
|
|
|
- querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t2", "t1.sys_enterpriseid = t2.sys_enterpriseid and t1.siteid = t2.siteid", "enterprisename","abbreviation");
|
|
|
+ querySQL.addJoinTable(JOINTYPE.left, "sys_enterprise", "t2", "t1.sys_enterpriseid = t2.sys_enterpriseid and t1.siteid = t2.siteid", "enterprisename", "abbreviation");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sa_agents", "t3", "t1.sys_enterpriseid = t3.sys_enterpriseid and t1.siteid = t3.siteid", "agentnum");
|
|
|
querySQL.addJoinTable(JOINTYPE.left, "sa_cashbill", "t4", "t1.sa_cashbillid = t4.sa_cashbillid and t1.siteid = t4.siteid", "billno");
|
|
|
querySQL.setSiteid(siteid);
|
|
|
- querySQL.setWhere(where.toString());
|
|
|
querySQL.setPage(pageSize, pageNumber);
|
|
|
Rows rows = querySQL.query();
|
|
|
Rows lastruntime = dbConnect.runSqlQuery("select max(lastruntime) lastruntime from sys_services where classname in ('AutoQueryBoclnfosForNH')");
|