Browse Source

预警日志上传3434

master
fyf 1 year ago
parent
commit
12a67a991a
2 changed files with 8 additions and 4 deletions
  1. +5
    -1
      app/src/main/java/com/example/bpa/app/BusinessServer.java
  2. +3
    -3
      app/src/main/java/com/example/bpa/app/ICSApp.java

+ 5
- 1
app/src/main/java/com/example/bpa/app/BusinessServer.java View File

@@ -12,6 +12,7 @@ import com.example.bpa.db.mode.BPA_SILOS;
import com.example.bpa.db.mode.BPA_SUGAR;
import com.example.bpa.helper.MessageLog;
import com.example.bpa.helper.ThreadManager;
import com.example.bpa.view.mode.AlertLogEnum;
import com.example.bpa.view.mode.MakeStatus;
import com.example.bpa.view.mode.ResGoodsRecipe;
import com.example.bpa.view.mode.UserLogEnum;
@@ -65,10 +66,11 @@ public class BusinessServer {
//1.取出需要制作的订单商品 验证物料是否充足
String GoodId = Commoditys.poll();
// boolean IsMake=true;
// ResultA resultA= DataBus.getInstance().InspectMaterial(GoodId);
ResultA resultA= DataBus.getInstance().InspectMaterial(GoodId);
// if(resultA.IsMake==false)//如果商品物料不足
// {
// DataBus.getInstance().UpdateGoodsMake(GoodId,resultA.Message,0);
// MessageLog.ShowAlertMessage(AlertLogEnum.料仓缺料日志,resultA.Message);
// IsMake=false;
// }
// while (!IsMake) {
@@ -114,6 +116,7 @@ public class BusinessServer {
}
if (silos==null)
{

MessageLog.ShowUserMessage(UserLogEnum.订单处理日志,message+"下发失败!物料没有管理料仓!");
}else
{
@@ -147,6 +150,7 @@ public class BusinessServer {
@Override
public void onFailure(String ErrorMsg) {
MessageLog.ShowInfo("["+good.name+"]步骤【" + key+ "】启动配料失败!");
MessageLog.ShowAlertMessage(AlertLogEnum.异常订单未制作日志,"["+good.name+"]步骤【" + key+ "】启动配料失败!");
}
});



+ 3
- 3
app/src/main/java/com/example/bpa/app/ICSApp.java View File

@@ -44,9 +44,9 @@ public class ICSApp extends Application {
ModbusTcpServer.get().Connect(ConfigName.getInstance().Address, ConfigName.getInstance().Post);

//BusinessServer.Get().test();
MessageLog.ShowAlertMessage(AlertLogEnum.传感器异常日志,"传感器异常");
MessageLog.ShowAlertMessage(AlertLogEnum.异常订单未制作日志,"异常订单未制作日志");
MessageLog.ShowAlertMessage(AlertLogEnum.料仓缺料日志,"料仓缺料日志");
// MessageLog.ShowAlertMessage(AlertLogEnum.传感器异常日志,"传感器异常");
// MessageLog.ShowAlertMessage(AlertLogEnum.异常订单未制作日志,"异常订单未制作日志");
// MessageLog.ShowAlertMessage(AlertLogEnum.料仓缺料日志,"料仓缺料日志");
}

/**


Loading…
Cancel
Save