|
|
@@ -245,6 +245,19 @@ public class serviceorder extends Controller {
|
|
|
querySQL.setWhere(where.toString());
|
|
|
querySQL.setPage(pageSize, pageNumber);
|
|
|
Rows rows = querySQL.query();
|
|
|
+ // 默认商品图片
|
|
|
+ Rows defaultImageRows = beans.Item.Item.getItemdefaultImage(this);
|
|
|
+ // 附件
|
|
|
+ ArrayList<Long> ids = rows.toArrayList("itemid", new ArrayList<>());
|
|
|
+ RowsMap attRowsMap = getAttachmentUrl("plm_item", ids);
|
|
|
+
|
|
|
+ for(Row row : rows){
|
|
|
+ if (attRowsMap.getOrDefault(row.getString("itemid"), new Rows()).isNotEmpty()) {
|
|
|
+ row.put("attinfos", attRowsMap.getOrDefault(row.getString("itemid"), new Rows()));
|
|
|
+ } else {
|
|
|
+ row.put("attinfos", defaultImageRows);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|