|
|
@@ -31,9 +31,28 @@ public class submitedit extends Controller {
|
|
|
*/
|
|
|
String[] sortfield = {"t1.checkdate"};
|
|
|
String sort = getSort(sortfield, "t1.checkdate desc");
|
|
|
+ /**
|
|
|
+ * 过滤条件设置
|
|
|
+ */
|
|
|
+ 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(");
|
|
|
+ where.append("t1.ftitle like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+ if (whereObject.containsKey("fcanalwayssubmit") && !"".equals(whereObject.getString("fcanalwayssubmit"))) {
|
|
|
+ where.append(" and(");
|
|
|
+ where.append("t1.fcanalwayssubmit ='").append(whereObject.getString("fcanalwayssubmit")).append("' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
SQLFactory costhead = new SQLFactory(this, "提报列表查询", pageSize, pageNumber, sort);
|
|
|
costhead.addParameter("siteid", siteid);
|
|
|
costhead.addParameter("tenterprise_userid", userid);
|
|
|
+ costhead.addParameter_SQL("where", where);
|
|
|
Rows rows = dbConnect.runSqlQuery(costhead.getSQL());
|
|
|
return getSucReturnObject().setDataByPaging(rows, sortfield).setFinalDo(DataPool.defaultdatalife, 1);
|
|
|
}
|
|
|
@@ -85,9 +104,9 @@ public class submitedit extends Controller {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public String submitedit()throws D3bException {
|
|
|
+ public String submitedit() throws D3bException {
|
|
|
String tsubmiteditmodelid = content.getString("tsubmiteditmodelid");//提报模板ID
|
|
|
- String fcontent = content.getString("fcontent","tsubmitedit.fcontent", "提报内容");
|
|
|
+ String fcontent = content.getString("fcontent", "tsubmitedit.fcontent", "提报内容");
|
|
|
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "提报");
|
|
|
sqlFactory.addParameter("fcontent", fcontent);
|
|
|
@@ -112,9 +131,28 @@ public class submitedit extends Controller {
|
|
|
*/
|
|
|
String[] sortfield = {"t1.checkdate"};
|
|
|
String sort = getSort(sortfield, "t1.checkdate desc");
|
|
|
+ /**
|
|
|
+ * 过滤条件设置
|
|
|
+ */
|
|
|
+ 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(");
|
|
|
+ where.append("t1.ftitle like'%").append(whereObject.getString("condition")).append("%' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+ if (whereObject.containsKey("fcanalwayssubmit") && !"".equals(whereObject.getString("fcanalwayssubmit"))) {
|
|
|
+ where.append(" and(");
|
|
|
+ where.append("t1.fcanalwayssubmit ='").append(whereObject.getString("fcanalwayssubmit")).append("' ");
|
|
|
+ where.append(")");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
SQLFactory costhead = new SQLFactory(this, "提报管理列表查询", pageSize, pageNumber, sort);
|
|
|
costhead.addParameter("siteid", siteid);
|
|
|
costhead.addParameter_in("tenterprise_userid", getSubUsers());
|
|
|
+ costhead.addParameter_SQL("where", where);
|
|
|
Rows rows = dbConnect.runSqlQuery(costhead.getSQL());
|
|
|
return getSucReturnObject().setDataByPaging(rows, sortfield).setFinalDo(DataPool.defaultdatalife, 1);
|
|
|
}
|