|
|
@@ -121,11 +121,11 @@ public class supplyanddemand extends Controller {
|
|
|
*/
|
|
|
public String query_supplyanddemandMain() throws P2Exception {
|
|
|
long tsupplyanddemandid = content.getLong("tsupplyanddemandid");
|
|
|
- /**
|
|
|
- * 阅读次数+1
|
|
|
- */
|
|
|
- dbConnect.runSqlUpdate("update tsupplyanddemand set freadtimes=isnull(freadtimes,0)+1 where siteid='" + siteid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
-
|
|
|
+// /**
|
|
|
+// * 阅读次数+1
|
|
|
+// */
|
|
|
+// dbConnect.runSqlUpdate("update tsupplyanddemand set freadtimes=isnull(freadtimes,0)+1 where siteid='" + siteid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
+ addsupplyanddemandLog(tsupplyanddemandid, 1);
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "供需详情查询");
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
sqlFactory.addParameter("tsupplyanddemandid", tsupplyanddemandid);
|
|
|
@@ -156,7 +156,7 @@ public class supplyanddemand extends Controller {
|
|
|
} else {
|
|
|
Rows rows = dbConnect.runSqlQuery("select ftitle,tenterprise_userid from tsupplyanddemand where siteid='" + siteid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
if (!rows.isEmpty()) {
|
|
|
- if(rows.get(0).getString("fstatus").equals("对接中")){
|
|
|
+ if (rows.get(0).getString("fstatus").equals("对接中")) {
|
|
|
return getErrReturnObject().setErrMsg("正在对接中").toString();
|
|
|
}
|
|
|
//聊天对话框不存在时,自动生成一个聊天对话框
|
|
|
@@ -220,7 +220,7 @@ public class supplyanddemand extends Controller {
|
|
|
where.append(" and t1.fissupply =").append(whereObject.getBooleanValue("fissupply") ? 1 : 0);
|
|
|
}
|
|
|
}
|
|
|
- sort= "t1.fstatus,t1.tsupplyanddemandid desc";
|
|
|
+ sort = "t1.fstatus,t1.tsupplyanddemandid desc";
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "我的供需列表查询", pageSize, pageNumber, sort);
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
sqlFactory.addParameter("tagentsid", tagentsid);
|
|
|
@@ -407,4 +407,61 @@ public class supplyanddemand extends Controller {
|
|
|
return getErrReturnObject().setErrMsg(status).toString();
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 添加记录:浏览,电话,分享
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public String addsupplyanddemandLog() throws P2Exception {
|
|
|
+ int ftype = content.getIntValue("ftype");
|
|
|
+ long tsupplyanddemandid = content.getLong("tsupplyanddemandid");
|
|
|
+ long tenterprise_userid = content.getLong("tenterprise_userid");
|
|
|
+
|
|
|
+
|
|
|
+ addsupplyanddemandLog(tsupplyanddemandid, ftype);
|
|
|
+
|
|
|
+ return getSucReturnObject().toString();
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 添加记录:浏览,电话,分享
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public void addsupplyanddemandLog(Long tsupplyanddemandid, int ftype) throws P2Exception {
|
|
|
+ /**
|
|
|
+ * 阅读次数+1
|
|
|
+ */
|
|
|
+ if (ftype == 1) {
|
|
|
+ dbConnect.runSqlUpdate("update tsupplyanddemand set freadtimes=isnull(freadtimes,0)+1 where siteid='" + siteid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 电话次数+1
|
|
|
+ */
|
|
|
+ if (ftype == 2) {
|
|
|
+ dbConnect.runSqlUpdate("update tsupplyanddemand set fphonetimes=isnull(fphonetimes,0)+1 where siteid='" + siteid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 分享次数+1
|
|
|
+ */
|
|
|
+ if (ftype == 3) {
|
|
|
+ dbConnect.runSqlUpdate("update tsupplyanddemand set fsharetimes=isnull(fsharetimes,0)+1 where siteid='" + siteid + "' and tsupplyanddemandid='" + tsupplyanddemandid + "'");
|
|
|
+ }
|
|
|
+
|
|
|
+ PaoSetRemote logPaoSetRemote = getP2ServerSystemPaoSet("tsupplyanddemand_log");
|
|
|
+ PaoRemote paoRemote = logPaoSetRemote.addAtEnd();
|
|
|
+ paoRemote.setValue("siteid", siteid, 11L);//企业ID
|
|
|
+ paoRemote.setValue("tagentsid", tagentsid, 11L);//企业ID
|
|
|
+ paoRemote.setValue("createby", username, 11L);//录入人
|
|
|
+ paoRemote.setValue("createdate", sysdate, 11L);//录入时间
|
|
|
+ paoRemote.setValue("changeby", username, 11L);//修改人
|
|
|
+ paoRemote.setValue("changedate", sysdate, 11L);//修改时间
|
|
|
+ paoRemote.setValue("tenterprise_userid", 0, 11L);//修改时间
|
|
|
+ paoRemote.setValue("tsupplyanddemandid", tsupplyanddemandid, 11L);
|
|
|
+ paoRemote.setValue("ftype", ftype, 11L);
|
|
|
+ logPaoSetRemote.save();
|
|
|
+ }
|
|
|
+
|
|
|
}
|