|
|
@@ -0,0 +1,93 @@
|
|
|
+package com.cnd3b.restcontroller.enterprise.tagents;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.cnd3b.common.Controller;
|
|
|
+import p2.pao.PaoRemote;
|
|
|
+import p2.pao.PaoSetRemote;
|
|
|
+import p2.util.P2Exception;
|
|
|
+
|
|
|
+public class tagents extends Controller {
|
|
|
+ /**
|
|
|
+ * 构造函数
|
|
|
+ *
|
|
|
+ * @param content
|
|
|
+ */
|
|
|
+ public tagents(JSONObject content) {
|
|
|
+ super(content);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增下游企业(经销商档案)
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String insertTagents() throws P2Exception {
|
|
|
+ //经销商编号
|
|
|
+ String fagentnum = content.getString("fagentnum");
|
|
|
+ //经销商名称
|
|
|
+ String fagentname = content.getString("fagentname");
|
|
|
+ //联系人
|
|
|
+ String fcontact = content.getString("fcontact");
|
|
|
+ //联系方式
|
|
|
+ String fphonenumber = content.getString("fphonenumber");
|
|
|
+ //省
|
|
|
+ String fprovince = content.getString("fprovince");
|
|
|
+ //市
|
|
|
+ String fcity = content.getString("fcity");
|
|
|
+ //县
|
|
|
+ String fcounty = content.getString("fcounty");
|
|
|
+ //地址
|
|
|
+ String faddress = content.getString("faddress");
|
|
|
+ //所属业务员ID
|
|
|
+ String tsalerid = content.getString("tsalerid");
|
|
|
+
|
|
|
+ PaoSetRemote paoSetRemote = getP2ServerSystemPaoSet("tagents");
|
|
|
+ PaoRemote paoRemote = paoSetRemote.addAtEnd();
|
|
|
+ paoRemote.setValue("fagentnum", fagentnum, 11L);
|
|
|
+ paoRemote.setValue("fagentname", fagentname, 11L);
|
|
|
+ paoRemote.setValue("fcontact", fcontact, 11L);
|
|
|
+ paoRemote.setValue("fphonenumber", fphonenumber, 11L);
|
|
|
+ paoRemote.setValue("fprovince", fprovince, 11L);
|
|
|
+ paoRemote.setValue("fcity", fcity, 11L);
|
|
|
+ paoRemote.setValue("fcounty", fcounty, 11L);
|
|
|
+ paoRemote.setValue("faddress", faddress, 11L);
|
|
|
+ paoRemote.setValue("tsalerid", tsalerid, 11L);
|
|
|
+ paoRemote.setValue("siteid", "JIUSHENG");
|
|
|
+ paoRemote.setValue("createby", username, 11L);
|
|
|
+ paoSetRemote.save();
|
|
|
+
|
|
|
+ JSONObject object = new JSONObject();
|
|
|
+ object.put("tagentsid", paoRemote.getUniqueIDValue());
|
|
|
+
|
|
|
+ return getSucReturnObject().setData(object).toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新下游企业(经销商档案)
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String updateTagents() {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除下游企业(经销商档案)
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String deleteTagents() {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询下游企业(经销商档案)列表
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String selectTagentsList() {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+
|
|
|
+}
|