|
@@ -592,8 +592,6 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
QuerySQL querySQL = SQLFactory.createQuerySQL(this, "plm_item", "itemid", "itemname",
|
|
|
"itemno","model","spec");
|
|
|
querySQL.setTableAlias("t1");
|
|
|
- querySQL.addJoinTable(JOINTYPE.left, "sa_itemsaleclass", "t2", "t2.itemid = t1.itemid AND t2.siteid = t1.siteid","projectnum","projectname","address");
|
|
|
- querySQL.addJoinTable(JOINTYPE.left, "plm_itemclass", "t3", "t2.itemclassid = t3.itemclassid AND t2.siteid = t3.siteid","enterprisename","industry","sys_enterpriseid");
|
|
|
querySQL.setSiteid(siteid);
|
|
|
querySQL.setWhere("not exists(select 1 from sa_itempriceadjust_items where siteid= '"+siteid+"' and sa_itempriceadjustid='"+sa_itempriceadjustid+"' and t1.itemid=itemid)");
|
|
|
querySQL.setWhere(where.toString());
|
|
@@ -617,6 +615,9 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
}
|
|
|
|
|
|
RowsMap itemRowsMap = dbConnect.runSqlQuery("select sa_itempriceadjust_itemsid,itemid,oldmarketprice from sa_itempriceadjust_items where siteid='" + siteid + "' and sa_itempriceadjustid=" + sa_itempriceadjustid).toRowsMap("itemid");
|
|
|
+ if(itemRowsMap.keySet().size()==0){
|
|
|
+ return getErrReturnObject().setErrMsg("调价单明细为空不能刷新原价").toString();
|
|
|
+ }
|
|
|
String replace = itemRowsMap.keySet().toString().replace("[", "(").replace("]", ")");
|
|
|
RowsMap itemidRowsMap = dbConnect.runSqlQuery("select itemid,itemno,marketprice from plm_item where siteid='" + siteid + "' and itemid in " + replace).toRowsMap("itemid");
|
|
|
for (String itemid : itemidRowsMap.keySet()) {
|