|
|
@@ -56,10 +56,32 @@ public class supplyanddemand extends Controller {
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
sqlFactory.addParameter_SQL("where", where);
|
|
|
|
|
|
+
|
|
|
+
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
|
|
|
RowsMap attinfoRowsMap = getAttachmentUrl("tsupplyanddemand", rows.toArrayList("tsupplyanddemandid"));
|
|
|
|
|
|
for (Row row : rows) {
|
|
|
+
|
|
|
+ SQLFactory dialoglistSQL = new SQLFactory(this, "供需详情查询_对话框列表");
|
|
|
+ dialoglistSQL.addParameter("siteid", siteid);
|
|
|
+ dialoglistSQL.addParameter("tagentsid", tagentsid);
|
|
|
+ dialoglistSQL.addParameter("tsupplyanddemandid", row.getString("tsupplyanddemandid"));
|
|
|
+ Rows dialogrows = dbConnect.runSqlQuery(dialoglistSQL.getSQL());
|
|
|
+
|
|
|
+ SQLFactory timnewmsgSQL = new SQLFactory(this, "即时通讯群最新消息查询");
|
|
|
+ timnewmsgSQL.addParameter("siteid", siteid);
|
|
|
+ timnewmsgSQL.addParameter_in("timdialogid", rows.toArrayList("timdialogid"));
|
|
|
+ RowsMap newmsgmap = timnewmsgSQL.runSqlQuery().toRowsMap("timdialogid");
|
|
|
+ for (Row drow : dialogrows) {
|
|
|
+ Rows newmsgrows = newmsgmap.get(drow.getString("timdialogid"));
|
|
|
+ for (Row newmsg : newmsgrows) {
|
|
|
+ newmsg.put("message", JSONObject.parseObject(newmsg.getString("message")));
|
|
|
+ }
|
|
|
+ drow.put("latestnews", newmsgrows);//最新消息
|
|
|
+ }
|
|
|
+
|
|
|
+ row.put("imdialogs", dialogrows);
|
|
|
//附件信息
|
|
|
row.put("attinfos", attinfoRowsMap.get(row.getString("tsupplyanddemandid")));
|
|
|
//创建者头像
|