|
@@ -122,8 +122,8 @@ public class DesignPic extends Controller {
|
|
|
}
|
|
|
Row detailRow = rows.isNotEmpty() ? rows.get(0) : new Row();
|
|
|
|
|
|
- if(detailRow.getString("title").equals("")){
|
|
|
- detailRow.put("title",detailRow.getString("title_c"));
|
|
|
+ if (detailRow.getString("title").equals("")) {
|
|
|
+ detailRow.put("title", detailRow.getString("title_c"));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -156,9 +156,9 @@ public class DesignPic extends Controller {
|
|
|
Rows attPicRows = new Rows();
|
|
|
Rows tempAttRows = attRowsMap.getOrDefault(row.getString("attachmentid"), new Rows());
|
|
|
for (Row tempAttRow : tempAttRows) {
|
|
|
- // if (tempAttRow.getString("usetype").equals(ownertable)) {
|
|
|
- attPicRows.add(tempAttRow);
|
|
|
- // }
|
|
|
+ // if (tempAttRow.getString("usetype").equals(ownertable)) {
|
|
|
+ attPicRows.add(tempAttRow);
|
|
|
+ // }
|
|
|
}
|
|
|
row.put("attinfos", attPicRows);
|
|
|
}
|
|
@@ -353,19 +353,35 @@ public class DesignPic extends Controller {
|
|
|
|
|
|
}
|
|
|
boolean iscollect = content.getBooleanValue("iscollect");
|
|
|
- if (!iscollect) {
|
|
|
- if (content.getLongValue("isnationwide") == 1) {
|
|
|
+ int querytype = content.getIntValue("querytype");
|
|
|
+ //1:全国精选
|
|
|
+ if (!iscollect && querytype == 1) {
|
|
|
+ where.append(" and (");
|
|
|
+ where.append("t1.isnationwide ='").append(content.getString("isnationwide")).append("' ");
|
|
|
+ where.append(")");
|
|
|
+
|
|
|
+ }
|
|
|
+ //2:门店设计、门店实景
|
|
|
+ if (!iscollect && querytype == 2) {
|
|
|
+ sys_enterpriseid = content.getLongValue("sys_enterpriseid");
|
|
|
+ if (usertype == 99) {
|
|
|
+// where.append(" and (");
|
|
|
+// where.append("t1.sys_enterpriseid ='" + sys_enterpriseid + "' ");
|
|
|
+// where.append(")");
|
|
|
+
|
|
|
+ }
|
|
|
+ if (usertype == 21 || usertype == 22) {
|
|
|
where.append(" and (");
|
|
|
- where.append("t1.isnationwide ='").append(content.getString("isnationwide")).append("' ");
|
|
|
+ where.append("t1.sys_enterpriseid ='" + sys_enterpriseid + "' ");
|
|
|
where.append(")");
|
|
|
- } else {
|
|
|
- if (usertype == 21 || usertype == 22) {
|
|
|
- where.append(" and (");
|
|
|
- where.append("t1.sys_enterpriseid ='" + sys_enterpriseid + "' ");
|
|
|
- where.append(")");
|
|
|
- }
|
|
|
}
|
|
|
- } else {
|
|
|
+
|
|
|
+ }
|
|
|
+ //3:全国设计、全国实景,可查看所有物料(包含总部、所有经销商团队人员上传的物料),不处理
|
|
|
+ if (!iscollect && querytype == 3 && (usertype == 0 || usertype == 1 || usertype == 2)) {
|
|
|
+
|
|
|
+ }
|
|
|
+ if (iscollect) {
|
|
|
where.append(" and (");
|
|
|
where.append(" t1.sat_sharematerialid in (SELECT ownerid from sys_datacollect WHERE ownertable='sat_sharematerial' and type=1 and siteid='" + siteid + "' and userid=" + userid + ")");
|
|
|
where.append(")");
|