|
|
@@ -287,7 +287,7 @@ public class serviceorder extends Controller {
|
|
|
ArrayList<Long> ids = rows.toArrayList("itemid", new ArrayList<>());
|
|
|
RowsMap attRowsMap = getAttachmentUrl("plm_item", ids);
|
|
|
|
|
|
-// RowsMap warrantycardRowsMap = SQLFactory.createQuerySQL(this, "sa_warrantycard", "sku","name", "phonenumber","address","sa_customersid","province","city","county").setWhere("sku", rows.toArrayList("sku")).query().toRowsMap("sku");
|
|
|
+ RowsMap warrantycardRowsMap = SQLFactory.createQuerySQL(this, "sa_warrantycard", "sku","name", "phonenumber","address","sa_customersid","province","city","county").setWhere("sku", rows.toArrayList("sku")).query().toRowsMap("sku");
|
|
|
|
|
|
for (Row row : rows) {
|
|
|
if (attRowsMap.getOrDefault(row.getString("itemid"), new Rows()).isNotEmpty()) {
|
|
|
@@ -295,25 +295,25 @@ public class serviceorder extends Controller {
|
|
|
} else {
|
|
|
row.put("attinfos", defaultImageRows);
|
|
|
}
|
|
|
-// String sku = row.getString("sku");
|
|
|
-// if (warrantycardRowsMap.containsKey(sku) && warrantycardRowsMap.get(sku).isNotEmpty()) {
|
|
|
-// Row warrantycardRow = warrantycardRowsMap.get(sku).get(0);
|
|
|
-// row.put("name", warrantycardRow.getString("name"));
|
|
|
-// row.put("phonenumber", warrantycardRow.getString("phonenumber"));
|
|
|
-// row.put("address", warrantycardRow.getString("address"));
|
|
|
-// row.put("sa_customersid", warrantycardRow.getLong("sa_customersid"));
|
|
|
-// row.put("province", warrantycardRow.getString("province"));
|
|
|
-// row.put("city", warrantycardRow.getString("city"));
|
|
|
-// row.put("county", warrantycardRow.getString("county"));
|
|
|
-// }else{
|
|
|
-// row.put("name", "");
|
|
|
-// row.put("phonenumber", "");
|
|
|
-// row.put("address","");
|
|
|
-// row.put("sa_customersid", "");
|
|
|
-// row.put("province", "");
|
|
|
-// row.put("city", "");
|
|
|
-// row.put("county", "");
|
|
|
-// }
|
|
|
+ String sku = row.getString("sku");
|
|
|
+ if (warrantycardRowsMap.containsKey(sku) && warrantycardRowsMap.get(sku).isNotEmpty()) {
|
|
|
+ Row warrantycardRow = warrantycardRowsMap.get(sku).get(0);
|
|
|
+ row.put("name", warrantycardRow.getString("name"));
|
|
|
+ row.put("phonenumber", warrantycardRow.getString("phonenumber"));
|
|
|
+ row.put("address", warrantycardRow.getString("address"));
|
|
|
+ row.put("sa_customersid", warrantycardRow.getLong("sa_customersid"));
|
|
|
+ row.put("province", warrantycardRow.getString("province"));
|
|
|
+ row.put("city", warrantycardRow.getString("city"));
|
|
|
+ row.put("county", warrantycardRow.getString("county"));
|
|
|
+ }else{
|
|
|
+ row.put("name", "");
|
|
|
+ row.put("phonenumber", "");
|
|
|
+ row.put("address","");
|
|
|
+ row.put("sa_customersid", "");
|
|
|
+ row.put("province", "");
|
|
|
+ row.put("city", "");
|
|
|
+ row.put("county", "");
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|