Bläddra i källkod

招商管理新增,招商管理列表

吴志根 4 år sedan
förälder
incheckning
62eb8edba8

+ 14 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/system/SQL/招商管理列表.sql

@@ -0,0 +1,14 @@
+SELECT t1.fname,
+       t1.fphone,
+       t1.address,
+       t1.city,
+       t1.county,
+       t1.createdate,
+       t1.province,
+       t1.tbusinessid,
+       t1.fnote
+FROM tbusiness AS t1
+
+
+
+

+ 32 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/system/business.java

@@ -0,0 +1,32 @@
+package com.cnd3b.restcontroller.enterprise.system;
+
+import com.alibaba.fastjson.JSONObject;
+import com.cnd3b.common.Controller;
+import com.cnd3b.common.data.Rows;
+import com.cnd3b.common.data.SQLFactory;
+
+public class business extends Controller {
+    /**
+     * 构造函数
+     *
+     * @param content
+     */
+    public business(JSONObject content) {
+        super(content);
+    }
+
+
+    /**
+     * 招商管理列表
+     * @return
+     */
+    public String getBusinessList(){
+
+        SQLFactory sqlFactory = new SQLFactory(this,"招商管理列表",pageSize,pageNumber,"t1.createdate DESC");
+        Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
+        return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
+
+
+    }
+
+}

+ 36 - 0
src/dsb/com/cnd3b/restcontroller/publicmethod/homepage/homepage.java

@@ -7,6 +7,9 @@ import com.cnd3b.common.data.Row;
 import com.cnd3b.common.data.Rows;
 import com.cnd3b.common.data.RowsMap;
 import com.cnd3b.common.data.SQLFactory;
+import p2.pao.PaoRemote;
+import p2.pao.PaoSetRemote;
+import p2.util.P2Exception;
 
 public class homepage extends Controller {
     public homepage(JSONObject content) {
@@ -181,4 +184,37 @@ public class homepage extends Controller {
         return getSucReturnObject().setDataByPaging(rows).preloading(1).toString();
     }
 
+    /**
+     * ÐÂÔöÕÐÉ̹ÜÀí±íµ¥
+     * @return
+     * @throws P2Exception
+     */
+    public String insertBusiness() throws P2Exception {
+
+        String province = content.getString("province");
+        String city = content.getString("city");
+        String county = content.getString("county");
+        String address = content.getString("address");
+        String fname = content.getString("fname");
+        String fphone = content.getString("fphone");
+        String fnote = content.getString("fnote");
+
+        PaoSetRemote paoSetRemote = getP2ServerSystemPaoSet("tbusiness");
+        PaoRemote paoRemote = paoSetRemote.addAtEnd();
+        paoRemote.setValue("province",province,11L);
+        paoRemote.setValue("city",city,11L);
+        paoRemote.setValue("county",county,11L);
+        paoRemote.setValue("address",address,11L);
+        paoRemote.setValue("fname",fname,11L);
+        paoRemote.setValue("fphone",fphone,11L);
+        paoRemote.setValue("fnote",fnote,11L);
+        paoRemote.setValue("tbusinessid",paoRemote.getUniqueIDValue(),11L);
+
+        paoSetRemote.save();
+
+
+        return getSucReturnObject().toString();
+
+    }
+
 }