static void Job89(Args _args)
{
ConnectCatogryTable _ConnectCatogryTable;
Random myRand = new Random();
set m_setint = new set(types::Integer);
setEnumerator m_setE;
int i,j,s;
ContingencyTable _ContingencyTable;
catogry_a m_catogry_a;
;
m_catogry_a = "采购";
while select _ConnectCatogryTable where _ConnectCatogryTable.catogry_a == m_catogry_a //
{
SELECT count(probID) from _ContingencyTable where _ContingencyTable.catogry == _ConnectCatogryTable.catogry;
j = str2int(_ContingencyTable.probID);
info(int2str(_ConnectCatogryTable.precents)+"===========");
i = 0;
while(i < _ConnectCatogryTable.precents)
{
s = myRand.nextInt() mod j+1; //随机取数,并且不能重复。
m_setint.add(s);
i = m_setint.elements();
}
m_setE = m_setint.getEnumerator();
while(m_setE.moveNext())
{
info(int2str(m_setE.Current()));
m_setint.remove(m_setE.Current()); //清空 ,ps:while中不用清空。
}
}
}