Browse Source

删除MAC地址修改

callm 2 months ago
parent
commit
58d224f0cc
1 changed files with 5 additions and 5 deletions
  1. 5 5
      src/com/uas/erp/service/pm/impl/BatchDealServiceImpl.java

+ 5 - 5
src/com/uas/erp/service/pm/impl/BatchDealServiceImpl.java

@@ -4010,12 +4010,12 @@ public class BatchDealServiceImpl implements BatchDealService {
 					}
 				}else if(("MakeMAC!Query").equals(caller)){
 					//被使用过的MACBT
-					int cn1= baseDao.getCount("select count(1) cn from makeaddresslist  where "+data+" and nvl(mal_sncode,' ') <> ' '");
+					int cn1= baseDao.getCount("select count(1) cn from makeaddresslist  where "+data+" and nvl(mal_status,0) = 0");
 					//未被使用的MACBT
-					int cn2= baseDao.getCount("select count(1) cn from makeaddresslist where "+data+" and nvl(mal_sncode,' ') = ' '");
-					sqls.add("update productsnlist set psl_status=0 where psl_mac in (select mal_mac from makeaddresslist where "+data+" and nvl(mal_sncode,' ') = ' ')");
-					sqls.add("update productsnlist set psl_status=0 where psl_bt in (select mal_bt from makeaddresslist where "+data+"  and nvl(mal_sncode,' ') = ' ')");
-					sqls.add("delete from makeaddresslist  where "+data+" and nvl(mal_sncode,' ') = ' '");
+					int cn2= baseDao.getCount("select count(1) cn from makeaddresslist where "+data+" and nvl(mal_status,0) = 0");
+					sqls.add("update productsnlist set psl_status=0 where psl_mac in (select mal_mac from makeaddresslist where "+data+" and nvl(mal_status,0) = 0)");
+					sqls.add("update productsnlist set psl_status=0 where psl_bt in (select mal_bt from makeaddresslist where "+data+"  and nvl(mal_status,0) = 0)");
+					sqls.add("delete from makeaddresslist  where "+data+" and nvl(mal_status,0) = 0");
 					sqls.add("INSERT INTO MessageLog(ml_date,ml_man,ml_content,ml_result,ml_search) VALUES(sysdate,'"
 							+ SystemSession.getUser().getEm_name() + "','批量删除MAC/BT','删除"+cn2+"条成功','Make!Base')");
 					baseDao.execute(sqls);