@@ -28,9 +28,10 @@ public class BusinessServer { | |||||
private BusinessServer() { | private BusinessServer() { | ||||
} | } | ||||
/** | |||||
* 商品制作队列 | |||||
*/ | |||||
ConcurrentLinkedQueue<String> Commoditys = new ConcurrentLinkedQueue<String>(); | ConcurrentLinkedQueue<String> Commoditys = new ConcurrentLinkedQueue<String>(); | ||||
/** | /** | ||||
* 添加配方 | * 添加配方 | ||||
* | * | ||||
@@ -40,8 +41,12 @@ public class BusinessServer { | |||||
Commoditys.offer(info); | Commoditys.offer(info); | ||||
} | } | ||||
/** | |||||
* 订单制作线程 | |||||
*/ | |||||
public void Start() { | public void Start() { | ||||
DeviceData.Get().TestInit(); | |||||
//DeviceData.Get().TestInit(); | |||||
ThreadManager.Get().StartLong("配方执行业务流程", true, new IThread() { | ThreadManager.Get().StartLong("配方执行业务流程", true, new IThread() { | ||||
@Override | @Override | ||||
public void Run() throws InterruptedException { | public void Run() throws InterruptedException { | ||||
@@ -60,6 +65,7 @@ public class BusinessServer { | |||||
for (LinkedHashMap.Entry<Integer, List<ResGoodsRecipe>> entry : rgrs.entrySet()) { | for (LinkedHashMap.Entry<Integer, List<ResGoodsRecipe>> entry : rgrs.entrySet()) { | ||||
for (int m = 0; m < entry.getValue().size(); m++) { | for (int m = 0; m < entry.getValue().size(); m++) { | ||||
int materialType = entry.getValue().get(m).materialType; | int materialType = entry.getValue().get(m).materialType; | ||||
//1.正常物料 | |||||
if (materialType == 1) { | if (materialType == 1) { | ||||
//获取料仓信息 | //获取料仓信息 | ||||
List<BPA_SILOS> bss = QueryDB.GetSolisByMaterialID(entry.getValue().get(m).materialID); | List<BPA_SILOS> bss = QueryDB.GetSolisByMaterialID(entry.getValue().get(m).materialID); | ||||
@@ -70,7 +76,9 @@ public class BusinessServer { | |||||
DeviceData.Get().setDemandValue((short) entry.getValue().get(m).value, bss.get(x).num, null); | DeviceData.Get().setDemandValue((short) entry.getValue().get(m).value, bss.get(x).num, null); | ||||
} | } | ||||
} | } | ||||
} else if (materialType == 2) { | |||||
} | |||||
//2.果糖 | |||||
else if (materialType == 2) { | |||||
BPA_SUGAR bs = QueryDB.GetsugarId(entry.getValue().get(m).materialID); | BPA_SUGAR bs = QueryDB.GetsugarId(entry.getValue().get(m).materialID); | ||||
ModbusTcpServer.get().WriteBool(bs.plcvar, true); | ModbusTcpServer.get().WriteBool(bs.plcvar, true); | ||||
} | } | ||||
@@ -30,20 +30,16 @@ public class ICSApp extends Application { | |||||
@Override | @Override | ||||
public void onCreate() { | public void onCreate() { | ||||
super.onCreate(); | super.onCreate(); | ||||
MessageLog.MsgNotify = new IMessageLogNotify() { | MessageLog.MsgNotify = new IMessageLogNotify() { | ||||
@Override | @Override | ||||
public void ErrorMsg(String msg) { | public void ErrorMsg(String msg) { | ||||
Log.e("Error", msg); | Log.e("Error", msg); | ||||
} | } | ||||
@Override | @Override | ||||
public void InfoMsg(String msg, String datetime) { | public void InfoMsg(String msg, String datetime) { | ||||
Log.i("Info", msg); | Log.i("Info", msg); | ||||
} | } | ||||
@Override | @Override | ||||
public void WarnMsg(String msg) { | public void WarnMsg(String msg) { | ||||
Log.w("Warn", msg); | Log.w("Warn", msg); | ||||
@@ -261,52 +261,52 @@ | |||||
android:layout_marginRight="40dp" | android:layout_marginRight="40dp" | ||||
android:textColor="@color/white"/> | android:textColor="@color/white"/> | ||||
</TableRow> | </TableRow> | ||||
</TableLayout> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content"> | |||||
<Button | |||||
android:id="@+id/StartButton" | |||||
android:layout_marginTop="10dp" | |||||
android:layout_marginBottom="5dp" | |||||
android:layout_width="90dp" | |||||
android:layout_height="90dp" | |||||
android:layout_gravity="center" | |||||
android:layout_centerHorizontal="true" | |||||
android:background="@drawable/bt_circular" | |||||
android:textColor="@color/white" | |||||
android:text="开始 | |||||
校准" | |||||
android:textSize="16dp"/> | |||||
<TableLayout | |||||
<!-- Table6--> | |||||
<TableRow | |||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="match_parent" | |||||
android:layout_alignParentRight="true" | |||||
android:layout_marginTop="10dp" | |||||
android:layout_marginLeft="5dp" | |||||
> | |||||
<TableRow | |||||
android:layout_height="wrap_content" | |||||
android:layout_gravity="center" | |||||
android:layout_margin="5dp"> | |||||
<RelativeLayout | |||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_gravity="center" | |||||
android:layout_margin="5dp"> | |||||
<TextView | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:text="校准基准时间:" | |||||
android:layout_weight="2"> | |||||
<Button | |||||
android:id="@+id/StartButton" | |||||
android:layout_marginTop="10dp" | |||||
android:layout_marginBottom="5dp" | |||||
android:layout_width="90dp" | |||||
android:layout_height="90dp" | |||||
android:layout_gravity="center" | |||||
android:layout_centerInParent="true" | |||||
android:background="@drawable/bt_circular" | |||||
android:textColor="@color/white" | android:textColor="@color/white" | ||||
android:textStyle="bold" | |||||
android:gravity="center" | |||||
android:text="开始 | |||||
校准" | |||||
android:textSize="16dp"/> | android:textSize="16dp"/> | ||||
</TableRow> | |||||
<TableRow | |||||
</RelativeLayout> | |||||
</TableRow> | |||||
<!-- Table7--> | |||||
<TableRow | |||||
android:layout_width="wrap_content" | |||||
android:layout_height="wrap_content" | |||||
android:layout_gravity="center" | |||||
android:layout_margin="5dp" | |||||
android:layout_weight="2"> | |||||
<TextView | |||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_gravity="center" | |||||
android:layout_margin="5dp"> | |||||
android:text="校准基准时间:" | |||||
android:textColor="@color/white" | |||||
android:textStyle="bold" | |||||
android:gravity="center" | |||||
android:textSize="16dp"/> | |||||
<EditText | <EditText | ||||
android:id="@+id/edi_time" | android:id="@+id/edi_time" | ||||
android:minWidth="60dp" | |||||
android:minWidth="120dp" | |||||
android:layout_width="wrap_content" | android:layout_width="wrap_content" | ||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:textColor="@color/white" | android:textColor="@color/white" | ||||
@@ -319,7 +319,6 @@ | |||||
android:text="保存" | android:text="保存" | ||||
android:layout_gravity="center" | android:layout_gravity="center" | ||||
android:background="@drawable/btn_button"/> | android:background="@drawable/btn_button"/> | ||||
</TableRow> | |||||
</TableLayout> | |||||
</RelativeLayout> | |||||
</TableRow> | |||||
</TableLayout> | |||||
</LinearLayout> | </LinearLayout> |
@@ -11,7 +11,7 @@ | |||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginTop="10dp" | android:layout_marginTop="10dp" | ||||
android:layout_marginRight="5dp" | android:layout_marginRight="5dp" | ||||
android:background="@drawable/lcbg_border" | |||||
android:background="@mipmap/bgbtbj" | |||||
> | > | ||||
<Button | <Button | ||||
android:id="@+id/stparameter" | android:id="@+id/stparameter" | ||||
@@ -28,13 +28,14 @@ | |||||
android:textColor="@color/white" | android:textColor="@color/white" | ||||
/> | /> | ||||
</TableLayout> | </TableLayout> | ||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginTop="10dp" | android:layout_marginTop="10dp" | ||||
android:background="@drawable/lcbg_border"> | |||||
android:background="@mipmap/bgbtbj"> | |||||
<FrameLayout | <FrameLayout | ||||
android:id="@+id/fragment_container" | android:id="@+id/fragment_container" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
@@ -17,7 +17,7 @@ | |||||
<resources> | <resources> | ||||
<!-- common --> | <!-- common --> | ||||
<string name="app_name">黑菠萝-茶百道</string> | |||||
<string name="app_name">菠萝奶茶</string> | |||||
<string name="common_example">示例图片</string> | <string name="common_example">示例图片</string> | ||||
<string name="app_upgrade_tip_title">Release Notes (%1$s)</string> | <string name="app_upgrade_tip_title">Release Notes (%1$s)</string> | ||||
<string name="ok">OK</string> | <string name="ok">OK</string> | ||||