Procházet zdrojové kódy

79

tags/old_version_1
fyf před 1 rokem
rodič
revize
d1d9cd2f87
8 změnil soubory, kde provedl 32 přidání a 10 odebrání
  1. +8
    -1
      app/src/main/java/com/bonait/bnframework/business/ConfigData.java
  2. +3
    -2
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  3. +3
    -0
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java
  4. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java
  5. +1
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java
  6. +11
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_gx.java
  7. +4
    -1
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_silos_cl.java
  8. +1
    -1
      app/src/main/res/layout/item/layout/fragment_item_silos_cl.xml

+ 8
- 1
app/src/main/java/com/bonait/bnframework/business/ConfigData.java Zobrazit soubor

@@ -575,7 +575,14 @@ public class ConfigData {
BPA_GOODSRECIPE item = new BPA_GOODSRECIPE();
item.goodsID = good.id;
item.sort = k.sort;
item.processname = k.stepName;
if(k.stepName.contains("液体料"))
{
item.processname="液体料";
}else
{
item.processname = k.stepName;
}

if (!k.actionJson.isEmpty()) {
String data = "";
String desc = "";


+ 3
- 2
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java Zobrazit soubor

@@ -138,7 +138,8 @@ public class ExecuteTheRecipe {
String[] wl = item.split("[,]");
if (wl != null && wl.length == 2) {
String name = wl[0];
int val = Integer.parseInt(wl[1]);
int val = (int)Math.round((Double.parseDouble(wl[1]) * 10));
//int val = Integer.parseInt(wl[1]);
List<BPA_SILOS> bpa_silos = QueryDB.GetSolisByMaterialName(name);
if (bpa_silos.size() > 0 && val > 0) {
BPA_SILOS silos = bpa_silos.get(0);
@@ -264,7 +265,7 @@ public class ExecuteTheRecipe {
public void onFailure(String ErrorMsg) {
}
});
ToastUtils.info("写入PLC仓号需求:" + num + "," + val);
ToastUtils.info("写入PLC仓号需求:" + num + "," + val/10.0);
} catch (Exception ex) {
ToastUtils.error("异常信息:" + ex.getMessage());
}


+ 3
- 0
app/src/main/java/com/bonait/bnframework/modules/home/fragment/Home1Fragment.java Zobrazit soubor

@@ -913,6 +913,9 @@ public class Home1Fragment extends BaseFragment {
ToastUtils.warning("客官,商品制作未结束请勿进行其他操作.请耐心等待商品制作结束!!!");
return false;
}



return true;
}



+ 1
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyActivity.java Zobrazit soubor

@@ -288,7 +288,7 @@ public class DiyActivity extends BaseActivity {
// 延迟,100|延迟,100|延迟,100|延迟,100|
String data = "";
String desc = "";
if (name.equals("液体料")) {
if (name.contains("液体料")) {
pf.materialType = 0;
for (int i = 0; i < gxchid.getChildCount(); i++) {
fragment_gx gongxu = (fragment_gx) gxchid.getChildAt(i);


+ 1
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/DiyUpdateActivity.java Zobrazit soubor

@@ -327,7 +327,7 @@ public class DiyUpdateActivity extends BaseActivity {
// 延迟,100|延迟,100|延迟,100|延迟,100|
String data="";
String desc="";
if(name.equals("液体料"))
if(name.contains("液体料"))
{
pf.materialType=0;
for (int i = 0; i < gxchid.getChildCount(); i++) {


+ 11
- 3
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_gx.java Zobrazit soubor

@@ -62,7 +62,13 @@ public class fragment_gx extends LinearLayout {
case 0://数字
editsp.setVisibility(View.GONE);
edittext.setVisibility(View.VISIBLE);
edittext.setInputType(InputType.TYPE_CLASS_NUMBER);
if(model.IsWL)
{
edittext.setInputType(InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_FLAG_DECIMAL);
}else
{
edittext.setInputType(InputType.TYPE_CLASS_NUMBER);
}
edittext.setText("0".toCharArray(), 0, "0".length());
break;
case 1://字符串
@@ -107,15 +113,17 @@ public class fragment_gx extends LinearLayout {
{
text="0";
}
int val=Integer.parseInt(text);
if(model.IsWL)
{
double val=Double.parseDouble(text);
if(check.isChecked())
{
ResStu=String.valueOf(val);
ResStu=String.format("%.1f", val);
}
}else
{
int val=Integer.parseInt(text);
ResStu=String.valueOf(val);
}
break;


+ 4
- 1
app/src/main/java/com/bonait/bnframework/modules/home/fragment/mode/fragment_silos_cl.java Zobrazit soubor

@@ -55,7 +55,10 @@ public class fragment_silos_cl extends LinearLayout {
ToastUtils.warning("需求值为空!");
return;
}
Short val=Short.parseShort(text);

int val1 = (int)Math.round((Double.parseDouble(text) * 10));

Short val=(short)val1;
ExecuteTheRecipe.WritePLC("料仓" + model.num + "需求值", val, new IWriteCallBack() {
@Override
public void onSuccess() {


+ 1
- 1
app/src/main/res/layout/item/layout/fragment_item_silos_cl.xml Zobrazit soubor

@@ -28,7 +28,7 @@
android:background="@drawable/input_bj"
android:hint="请写入需求值"
android:layout_weight="1"
android:inputType="number"
android:inputType="number|numberDecimal"
android:maxLines="1"
android:padding="3dp"
android:textSize="12dp"


Načítá se…
Zrušit
Uložit