物料BOM批量更改物料
static void ReplaceBOMItemInBatch(Args _args) { List paramAsList; ListEnumerator le; BOM bom; str param = 'BOM000001,BOM000474'; paramAsList = strSplit(param,","); le = paramAsList.getEnumerator(); while(le.moveNext()) { ttsBegin; select forUpdate bom where bom.ItemId =='40300011' && bom.bomid == le.current(); bom.ItemId = '40300031'; bom.update(); info(le.current()); /*多条件符合 while select forUpdate bom where bom.ItemId =='40300011' && bom.bomid == le.current() { bom.ItemId = '40300031'; bom.update(); info(le.current()); } */ ttsCommit; } }
留言评论
暂无留言