|
|
@@ -220,7 +220,7 @@ public class workorder extends Controller {
|
|
|
Rows rows = dbConnect.runSqlQuery(sqlFactory);
|
|
|
Row row = rows.isNotEmpty() ? rows.get(0) : new Row();
|
|
|
|
|
|
- RowsMap rowsMapdetails = queryWorkOrderNodedetails(sa_workorderid);
|
|
|
+ RowsMap rowsMapdetails = queryWorkOrderNodedetails(sa_workorderid,row.getLong("sys_enterpriseid"));
|
|
|
|
|
|
if (!row.isEmpty()) {
|
|
|
/** 工单工序查询 **/
|
|
|
@@ -288,7 +288,7 @@ public class workorder extends Controller {
|
|
|
return getSucReturnObject().setData(row).toString();
|
|
|
}
|
|
|
|
|
|
- public RowsMap queryWorkOrderNodedetails(long sa_workorderid) throws YosException {
|
|
|
+ public RowsMap queryWorkOrderNodedetails(long sa_workorderid,long sys_enterpriseid) throws YosException {
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "服务工单节点查询全部");
|
|
|
sqlFactory.addParameter("sa_workorderid", sa_workorderid);
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
@@ -316,12 +316,19 @@ public class workorder extends Controller {
|
|
|
// 附件
|
|
|
ArrayList<Long> itemids = workorderitemRows.toArrayList("itemid", new ArrayList<>());
|
|
|
RowsMap itemattRowsMap = getAttachmentUrl("plm_item", itemids);
|
|
|
+ //价格
|
|
|
+ HashMap<Long, ItemPrice> itemPriceRowsMap = ItemPrice.getItemPrice(this, sys_enterpriseid, itemids);
|
|
|
for (Row itemRow : workorderitemRows) {
|
|
|
if (itemattRowsMap.getOrDefault(itemRow.getString("itemid"), new Rows()).isNotEmpty()) {
|
|
|
itemRow.put("attinfos", itemattRowsMap.getOrDefault(itemRow.getString("itemid"), new Rows()));
|
|
|
} else {
|
|
|
itemRow.put("attinfos", defaultImageRows);
|
|
|
}
|
|
|
+ if (itemPriceRowsMap.containsKey(itemRow.getString("itemid"))) {
|
|
|
+ itemRow.put("price", itemPriceRowsMap.get(itemRow.getString("itemid")).getPrice());
|
|
|
+ } else {
|
|
|
+ itemRow.put("price", 0);
|
|
|
+ }
|
|
|
}
|
|
|
RowsMap workorderitemRowsMap = workorderitemRows.toRowsMap("sa_workorder_nodeid");
|
|
|
|
|
|
@@ -515,12 +522,19 @@ public class workorder extends Controller {
|
|
|
// 附件
|
|
|
ArrayList<Long> itemids = workorderitemRows.toArrayList("itemid", new ArrayList<>());
|
|
|
RowsMap itemattRowsMap = getAttachmentUrl("plm_item", itemids);
|
|
|
+ //价格
|
|
|
+ HashMap<Long, ItemPrice> itemPriceRowsMap = ItemPrice.getItemPrice(this,sys_enterpriseid, itemids);
|
|
|
for (Row itemRow : workorderitemRows) {
|
|
|
if (itemattRowsMap.getOrDefault(itemRow.getString("itemid"), new Rows()).isNotEmpty()) {
|
|
|
itemRow.put("attinfos", itemattRowsMap.getOrDefault(itemRow.getString("itemid"), new Rows()));
|
|
|
} else {
|
|
|
itemRow.put("attinfos", defaultImageRows);
|
|
|
}
|
|
|
+ if (itemPriceRowsMap.containsKey(itemRow.getString("itemid"))) {
|
|
|
+ itemRow.put("price", itemPriceRowsMap.get(itemRow.getString("itemid")).getPrice());
|
|
|
+ } else {
|
|
|
+ itemRow.put("price", 0);
|
|
|
+ }
|
|
|
}
|
|
|
row.put("oldtitems", workorderitemRows.toRowsMap("isnew").get("0"));
|
|
|
row.put("newtitems", workorderitemRows.toRowsMap("isnew").get("1"));
|