|
@@ -626,6 +626,14 @@ public class Item extends Controller {
|
|
|
return getErrReturnObject().setErrMsg("存在已审核的数据,无法删除。").toString();
|
|
|
}
|
|
|
|
|
|
+ String sql1 = "select t2.groupnum from sa_itemgroupmx t1 inner join sa_itemgroup t2 on t1.sa_itemgroupid=t2.sa_itemgroupid and t1.siteid=t2.siteid where t1.itemid in " + jsonArray + " and t1.siteid ='"
|
|
|
+ + siteid + "'";
|
|
|
+ sql1 = sql1.replace("[", "(").replace("]", ")");
|
|
|
+ Rows rows =dbConnect.runSqlQuery(sql1);
|
|
|
+ if (rows.isNotEmpty()) {
|
|
|
+ return getErrReturnObject().setErrMsg("该商品已存在商品组,商品组编码:"+rows.get(0).getString("groupnum")+",请前往商品组删除该商品后重试!").toString();
|
|
|
+ }
|
|
|
+
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "货品档案删除");
|
|
|
sqlFactory.addParameter_in("itemid", jsonArray.toArray());
|
|
|
sqlFactory.addParameter("siteid", siteid);
|