|
|
@@ -12,6 +12,8 @@ import com.bonait.bnframework.common.db.QueryDB; |
|
|
|
import com.bonait.bnframework.common.db.file.DBHelper; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_CLOUDDATA; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_GOODS; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPE; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_LOG; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_PLCADDRESS; |
|
|
|
import com.bonait.bnframework.common.db.mode.BPA_SILOS; |
|
|
@@ -42,6 +44,7 @@ import com.qmuiteam.qmui.arch.QMUISwipeBackActivityManager; |
|
|
|
|
|
|
|
import org.litepal.LitePal; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.logging.Level; |
|
|
|
|
|
|
@@ -99,9 +102,31 @@ public class MainInit { |
|
|
|
|
|
|
|
//设置连接到有线网络 |
|
|
|
// NetworkUtils.connetEnternet(app); |
|
|
|
|
|
|
|
//text(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//========================================================================// |
|
|
|
public static void text() |
|
|
|
{ |
|
|
|
String id="38f0a737-2476-40d8-a7d8-28ff7796e9d2"; |
|
|
|
BPA_GOODS gd=QueryDB.GetGoodsId(id); |
|
|
|
ArrayList<BPA_GOODSRECIPE> PF=QueryDB.GetGoodsSrecipeID(id); |
|
|
|
ArrayList<BPA_GOODS> goods= QueryDB.GetGoodsALL(); |
|
|
|
for (BPA_GOODS good:goods) |
|
|
|
{ |
|
|
|
if(!good.id.equals(id)) |
|
|
|
{ |
|
|
|
for (BPA_GOODSRECIPE m:PF) |
|
|
|
{ |
|
|
|
m.id=java.util.UUID.randomUUID().toString(); |
|
|
|
m.goodsID=good.id; |
|
|
|
QueryDB.AddGoodsSrecipe(m); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
/** |
|
|
|
* 初始化数据库数据(默认数据) |
|
|
|
*/ |
|
|
|