@@ -1023,6 +1023,8 @@ public class ConfigData { | |||
public void PLC_Init() { | |||
//PLC连接成功,启动数据监听 | |||
ExecuteTheRecipe.Listening(); | |||
ExecuteTheRecipe.WritePLC("手自切换",true,null); | |||
} | |||
//endregion | |||
} | |||
@@ -235,27 +235,12 @@ public class ExecuteTheRecipe { | |||
} | |||
ReadPLCStatus(); | |||
} catch (Exception ex) { | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} | |||
Thread.sleep(100); | |||
} | |||
@Override | |||
public void RunComplete() throws InterruptedException { | |||
} | |||
}); | |||
ThreadManager.Get().StartLong("PLC设备数据监听-扫码信息", true, new IThread() { | |||
@Override | |||
public void Run() throws InterruptedException { | |||
try { | |||
ReadCode(); | |||
AutoJR(); | |||
} catch (Exception ex) { | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} | |||
Thread.sleep(100); | |||
Thread.sleep(500); | |||
} | |||
@Override | |||
@@ -268,27 +253,14 @@ public class ExecuteTheRecipe { | |||
@Override | |||
public void Run() throws InterruptedException { | |||
try { | |||
ChargeSignal(); | |||
} catch (Exception ex) { | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} | |||
Thread.sleep(100); | |||
} | |||
@Override | |||
public void RunComplete() throws InterruptedException { | |||
} | |||
}); | |||
ReadCode(); | |||
ThreadManager.Get().StartLong("PLC设备数据监听-自动加热", true, new IThread() { | |||
@Override | |||
public void Run() throws InterruptedException { | |||
try { | |||
AutoJR(); | |||
ChargeSignal(); | |||
} catch (Exception ex) { | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} | |||
Thread.sleep(1000); | |||
Thread.sleep(50); | |||
} | |||
@Override | |||
public void RunComplete() throws InterruptedException { | |||
@@ -303,7 +275,8 @@ public class ExecuteTheRecipe { | |||
if(IsMakeGood && GoodMake!=null) | |||
{ | |||
ArrayList<ResGoodsRecipe> recipes= GoodMake.recipes; | |||
//复位完成信号 | |||
WritePLC("手自切换", true,null); | |||
//region 根据物料配方排序Sort步骤分组 | |||
LinkedHashMap<Integer, List<ResGoodsRecipe>> rgrs = new LinkedHashMap<>(); | |||
for (int i = 0; i < recipes.size(); i++) { | |||
@@ -316,8 +289,7 @@ public class ExecuteTheRecipe { | |||
int count = 0; | |||
for (LinkedHashMap.Entry<Integer, List<ResGoodsRecipe>> entry : rgrs.entrySet()) { | |||
//复位完成信号 | |||
WritePLC("手自切换", true,null); | |||
WritePLC("配料完成", false,null); | |||
Thread.sleep(10); | |||
@@ -414,7 +386,7 @@ public class ExecuteTheRecipe { | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
IsMakeGood=false; | |||
} | |||
Thread.sleep(100); | |||
Thread.sleep(500); | |||
} | |||
@Override | |||
public void RunComplete() throws InterruptedException { | |||
@@ -615,7 +587,9 @@ public class ExecuteTheRecipe { | |||
public static float getCalibrationValueXS(int ch) { | |||
if (!ListeningValue.containsKey("出料系数"+ch)) | |||
return 1.0F; | |||
float k=Float.parseFloat(ListeningValue.get(ch).toString()); | |||
Object obj= ListeningValue.get("出料系数"+ch); | |||
float k=Float.parseFloat(obj==null?"0":String.valueOf(obj)); | |||
return k==0?1.0F:k; | |||
} | |||
@@ -689,16 +663,7 @@ public class ExecuteTheRecipe { | |||
CompleteListen( "校准完成", OnChargeMixtureComNotPar); | |||
//清洗完成标志 | |||
Object obj= ExecuteTheRecipe.ReadPLC("自动清洗完成"); | |||
if (obj!=null) { | |||
if((boolean) obj) | |||
{ | |||
if(CleaningComplete!=null) | |||
{ | |||
CleaningComplete.Run(); | |||
} | |||
} | |||
} | |||
CompleteListen( "自动清洗完成", CleaningComplete); | |||
} catch (Exception ex) { | |||
ToastUtils.error("异常信息:" + ex.getMessage()); | |||
} finally { | |||
@@ -730,8 +695,8 @@ public class ExecuteTheRecipe { | |||
if(isopen) | |||
{ | |||
Object sc= getListingValue(item); | |||
Object scsz= getListingValue(item+"设置"); | |||
Object sc= ReadPLC(item); | |||
Object scsz= ReadPLC(item+"设置"); | |||
int sx_temp=sc==null?0:(int)sc;//水箱温度 | |||
int sx_temp_sz=scsz==null?0:(int)scsz;//水箱温度设置值 | |||
@@ -802,7 +767,7 @@ public class ExecuteTheRecipe { | |||
} | |||
}); | |||
WritePLC("打开写保护", true, new IWriteCallBack() { | |||
WritePLC("关闭写保护", true, new IWriteCallBack() { | |||
@Override | |||
public void onSuccess() { | |||
issucess2[0] =true; | |||
@@ -847,7 +812,7 @@ public class ExecuteTheRecipe { | |||
} | |||
}); | |||
WritePLC("打开写保护", false, new IWriteCallBack() { | |||
WritePLC("打开写保护", true, new IWriteCallBack() { | |||
@Override | |||
public void onSuccess() { | |||
issucess2[0] =true; | |||
@@ -99,7 +99,7 @@ public class MainInit { | |||
//初始化DB数据 | |||
InitDBdata(); | |||
ConfigData.getInstance().LoadingCloud();//加载云端数据 | |||
//ConfigData.getInstance().LoadingCloud();//加载云端数据 | |||
DataBus.getInstance().GetTodayNoMake(); | |||
//设置连接到有线网络 | |||
@@ -7,8 +7,12 @@ import android.view.View; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.fragment.app.Fragment; | |||
import androidx.fragment.app.FragmentManager; | |||
import androidx.fragment.app.FragmentTransaction; | |||
import com.bonait.bnframework.MainApplication; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.Constants; | |||
import com.bonait.bnframework.common.filepicker.PickerManager; | |||
import com.bonait.bnframework.common.filepicker.adapter.FilePickerShowAdapter; | |||
@@ -69,6 +73,31 @@ public abstract class BaseFragment extends QMUIFragment implements EasyPermissio | |||
startActivity(intent); | |||
} | |||
FragmentManager fragmentManager; | |||
FragmentTransaction fragmentTransaction; | |||
/** | |||
* 显示流 | |||
* @param fragment | |||
*/ | |||
public void ShowFragment(Fragment fragment) | |||
{ | |||
// TODO Auto-generated method stub | |||
/*在activity对应java类中通过getFragmentManager() | |||
*获得FragmentManager,用于管理ViewGrop中的fragment | |||
* */ | |||
fragmentManager=getFragmentManager(); | |||
/*FragmentManager要管理fragment(添加,替换以及其他的执行动作) | |||
*的一系列的事务变化,需要通过fragmentTransaction来操作执行 | |||
*/ | |||
fragmentTransaction = fragmentManager.beginTransaction(); | |||
//实例化要管理的fragment | |||
//通过添加(事务处理的方式)将fragment加到对应的布局中 | |||
fragmentTransaction.replace(R.id.viewpager_jiaoyan, fragment); | |||
//事务处理完需要提交 | |||
fragmentTransaction.commit(); | |||
} | |||
@Override | |||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { | |||
super.onRequestPermissionsResult(requestCode, permissions, grantResults); | |||
@@ -298,26 +298,26 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("通道校准", "M0.0", 0, 1)); | |||
add(new Res_PLCADDRESS("校准完成", "M0.7", 1, 0)); | |||
add(new Res_PLCADDRESS("出料系数1", "VR400", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数2", "VR404", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数3", "VR408", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数4", "VR412", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数5", "VR416", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数6", "VR420", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数7", "VR424", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数8", "VR428", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数9", "VR432", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数10", "VR436", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数11", "VR440", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数12", "VR444", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数13", "VR448", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数14", "VR452", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数15", "VR456", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数16", "VR460", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数17", "VR464", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数18", "VR468", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数19", "VR472", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数20", "VR476", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数1", "VR400", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数2", "VR404", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数3", "VR408", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数4", "VR412", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数5", "VR416", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数6", "VR420", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数7", "VR424", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数8", "VR428", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数9", "VR432", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数10", "VR436", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数11", "VR440", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数12", "VR444", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数13", "VR448", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数14", "VR452", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数15", "VR456", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数16", "VR460", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数17", "VR464", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数18", "VR468", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数19", "VR472", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数20", "VR476", 1, 1)); | |||
//模拟出料 | |||
add(new Res_PLCADDRESS("模拟出料", "-------------", 0, 0)); | |||
@@ -391,29 +391,27 @@ public class ConfigName { | |||
//温度监控 | |||
add(new Res_PLCADDRESS("温度控制", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("水池温度", "VD354", 1, 0)); | |||
add(new Res_PLCADDRESS("水池温度设置", "VD378", 1, 1)); | |||
add(new Res_PLCADDRESS("水池温度加热", "M104.1", 1, 0)); | |||
add(new Res_PLCADDRESS("果糖左温度", "VD358", 1, 0)); | |||
add(new Res_PLCADDRESS("果糖左温度设置", "VD382", 1, 1)); | |||
add(new Res_PLCADDRESS("果糖左温度", "VD354", 1, 0)); | |||
add(new Res_PLCADDRESS("果糖左温度设置", "VD378", 1, 1)); | |||
add(new Res_PLCADDRESS("果糖左温度加热", "M103.7", 1, 0)); | |||
add(new Res_PLCADDRESS("果糖右温度", "VD362", 1, 0)); | |||
add(new Res_PLCADDRESS("果糖右温度设置", "VD386", 1, 1)); | |||
add(new Res_PLCADDRESS("果糖右温度", "VD358", 1, 0)); | |||
add(new Res_PLCADDRESS("果糖右温度设置", "VD382", 1, 1)); | |||
add(new Res_PLCADDRESS("果糖右温度加热", "M104.0", 1, 0)); | |||
add(new Res_PLCADDRESS("水池温度", "VD362", 1, 0)); | |||
add(new Res_PLCADDRESS("水池温度设置", "VD386", 1, 1)); | |||
add(new Res_PLCADDRESS("水池温度加热", "M104.1", 1, 0)); | |||
// add(new Res_PLCADDRESS("水池温度", "VD352", 1, 0)); | |||
// add(new Res_PLCADDRESS("水池温度设置", "VD360", 1, 1)); | |||
// add(new Res_PLCADDRESS("水池温度加热", "M104.0", 1, 0)); | |||
//自动清洗 | |||
add(new Res_PLCADDRESS("自动清洗", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("排水阀排水时间", "VW140", 1, 1)); | |||
add(new Res_PLCADDRESS("排水阀进水时间", "VW142", 1, 1)); | |||
add(new Res_PLCADDRESS("清洗预加热时间", "VW144", 1, 1)); | |||
add(new Res_PLCADDRESS("加清洗剂时间", "VW146", 1, 1)); | |||
add(new Res_PLCADDRESS("循环清洗时间", "VW148", 1, 1)); | |||
add(new Res_PLCADDRESS("排水阀排水时间", "VW244", 1, 1)); | |||
add(new Res_PLCADDRESS("循环清洗时间", "VW246", 1, 1)); | |||
add(new Res_PLCADDRESS("清洗模式", "M0.4", 1, 1)); | |||
add(new Res_PLCADDRESS("自动清洗开始", "M0.5", 1, 1)); | |||
add(new Res_PLCADDRESS("自动清洗完成", "M0.6", 1, 1)); | |||
@@ -476,6 +474,9 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("实时状态读取", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("实时状态", "VW500", 1, 0)); | |||
add(new Res_PLCADDRESS("水池液位检测", "M5.2", 1, 0)); | |||
add(new Res_PLCADDRESS("出料口检测", "M5.3", 1, 0)); | |||
}}; | |||
/** | |||
* 奶茶机工序模型 | |||
@@ -598,26 +599,26 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("通道校准", "M0.0", 0, 1)); | |||
add(new Res_PLCADDRESS("校准完成", "M0.7", 1, 0)); | |||
add(new Res_PLCADDRESS("出料系数1", "VR400", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数2", "VR404", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数3", "VR408", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数4", "VR412", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数5", "VR416", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数6", "VR420", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数7", "VR424", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数8", "VR428", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数9", "VR432", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数10", "VR436", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数11", "VR440", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数12", "VR444", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数13", "VR448", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数14", "VR452", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数15", "VR456", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数16", "VR460", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数17", "VR464", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数18", "VR468", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数19", "VR472", 1, 1)); | |||
add(new Res_PLCADDRESS("出料系数20", "VR476", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数1", "VR400", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数2", "VR404", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数3", "VR408", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数4", "VR412", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数5", "VR416", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数6", "VR420", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数7", "VR424", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数8", "VR428", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数9", "VR432", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数10", "VR436", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数11", "VR440", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数12", "VR444", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数13", "VR448", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数14", "VR452", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数15", "VR456", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数16", "VR460", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数17", "VR464", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数18", "VR468", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数19", "VR472", 1, 1)); | |||
// add(new Res_PLCADDRESS("出料系数20", "VR476", 1, 1)); | |||
//模拟出料 | |||
add(new Res_PLCADDRESS("模拟出料", "-------------", 0, 0)); | |||
@@ -710,11 +711,8 @@ public class ConfigName { | |||
//自动清洗 | |||
add(new Res_PLCADDRESS("自动清洗", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("排水阀排水时间", "VW140", 1, 1)); | |||
add(new Res_PLCADDRESS("排水阀进水时间", "VW142", 1, 1)); | |||
add(new Res_PLCADDRESS("清洗预加热时间", "VW144", 1, 1)); | |||
add(new Res_PLCADDRESS("加清洗剂时间", "VW146", 1, 1)); | |||
add(new Res_PLCADDRESS("循环清洗时间", "VW148", 1, 1)); | |||
add(new Res_PLCADDRESS("排水阀排水时间", "VW244", 1, 1)); | |||
add(new Res_PLCADDRESS("循环清洗时间", "VW246", 1, 1)); | |||
add(new Res_PLCADDRESS("清洗模式", "M0.4", 1, 1)); | |||
add(new Res_PLCADDRESS("自动清洗开始", "M0.5", 1, 1)); | |||
add(new Res_PLCADDRESS("自动清洗完成", "M0.6", 1, 1)); | |||
@@ -757,6 +755,8 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("实时状态读取", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("实时状态", "VW500", 1, 0)); | |||
add(new Res_PLCADDRESS("水池液位检测", "M5.2", 1, 0)); | |||
add(new Res_PLCADDRESS("出料口检测", "M5.3", 1, 0)); | |||
}}; | |||
/** | |||
@@ -8,12 +8,14 @@ import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.business.ExecuteTheRecipe; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_ALERTLOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
import com.bonait.bnframework.common.db.mode.BPA_LOG; | |||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | |||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER; | |||
import com.bonait.bnframework.common.db.res.MakeStatus; | |||
import com.bonait.bnframework.common.db.res.ResGoodProperty; | |||
import com.bonait.bnframework.common.db.res.ResGoodsMake; | |||
import com.bonait.bnframework.common.db.res.ResGoodsRecipe; | |||
import com.bonait.bnframework.common.db.res.Res_PLCADDRESS1; | |||
@@ -28,6 +30,7 @@ import com.bonait.bnframework.common.helper.mode.OrderA; | |||
import com.bonait.bnframework.common.helper.mode.ResultA; | |||
import com.bonait.bnframework.modules.home.adapter.loadinggood_adapter; | |||
import com.bonait.bnframework.modules.home.adapter.lsjy_adapter; | |||
import com.bonait.bnframework.modules.home.adapter.pfsx_adapter; | |||
import com.bonait.bnframework.modules.home.adapter.wdsz_adapter; | |||
import com.bonait.bnframework.modules.home.fragment.mode.sdkz_control; | |||
import com.bonait.bnframework.modules.home.fragment.mode.tab_control; | |||
@@ -215,6 +218,50 @@ public class DataBus { | |||
* 详细配方 | |||
*/ | |||
public ArrayList<ResGoodsRecipe> Recipe=new ArrayList<>(); | |||
/** | |||
* 属性数据 | |||
*/ | |||
public ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>(); | |||
public pfsx_adapter sxadapter=null; | |||
/** | |||
* 加载商品配方 | |||
*/ | |||
public void GetMainGoodProperty() | |||
{ | |||
bpa_goodproperties.clear(); | |||
ArrayList<BPA_GOODPROPERTY> da = QueryDB.GetGoodsPropertyALL("0"); | |||
for (BPA_GOODPROPERTY item : da) { | |||
ResGoodProperty re = new ResGoodProperty(); | |||
re.id = item.id; | |||
re.name = item.name; | |||
ArrayList<BPA_GOODPROPERTY> zsx = QueryDB.GetGoodsPropertyALL(item.id); | |||
re.child = new ArrayList<>(); | |||
ArrayList<ResGoodProperty> _chid = new ArrayList<>(); | |||
for (BPA_GOODPROPERTY k : zsx) { | |||
ResGoodProperty m = new ResGoodProperty(); | |||
m.id = k.id; | |||
m.name = k.name; | |||
m.isSelect = false; | |||
_chid.add(m); | |||
} | |||
re.child = _chid; | |||
bpa_goodproperties.add(re); | |||
} | |||
for (ResGoodProperty item : bpa_goodproperties) { | |||
int i = 0; | |||
for (ResGoodProperty c : item.child) { | |||
if (i == 0) { | |||
c.isSelect = true; | |||
} | |||
i++; | |||
} | |||
} | |||
} | |||
//endregion | |||
//region 流速校验 | |||
@@ -238,9 +285,9 @@ public class DataBus { | |||
mode.num= silo.num; | |||
mode.name= silo.name; | |||
mode.materialName=m.size() > 0?m.get(0).name:"未设置"; | |||
mode.xs= ExecuteTheRecipe.getCalibrationValueXS(silo.num)+""; | |||
Object kg=ExecuteTheRecipe.getListingValue("通道"+silo.num+"校准开关"); | |||
Object _val=ExecuteTheRecipe.getListingValue("校准值"+silo.num); | |||
//mode.xs= ExecuteTheRecipe.getCalibrationValueXS(silo.num)+""; | |||
Object kg=ExecuteTheRecipe.ReadPLC("通道"+silo.num+"校准开关"); | |||
Object _val=ExecuteTheRecipe.ReadPLC("校准值"+silo.num); | |||
short val=_val==null?0:(short)_val; | |||
String s = String.valueOf(val); | |||
mode.jzkg= kg==null?false:(boolean) kg; | |||
@@ -19,6 +19,7 @@ import androidx.fragment.app.FragmentActivity; | |||
import androidx.fragment.app.FragmentTransaction; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.business.ExecuteTheRecipe; | |||
import com.bonait.bnframework.common.constant.DataBus; | |||
import com.bonait.bnframework.common.constant.MessageName; | |||
import com.bonait.bnframework.common.message.MessageManager; | |||
@@ -359,15 +360,23 @@ public class MainNavigateTabBar extends LinearLayout implements View.OnClickList | |||
if(index==1)//校验 | |||
{ | |||
//刷新料仓 | |||
DataBus.getInstance().GetSilosLsjy(); | |||
//DataBus.getInstance().GetSilosLsjy(); | |||
//刷新温度控制 | |||
DataBus.getInstance().GetWdsz(); | |||
//DataBus.getInstance().GetWdsz(); | |||
//刷新手动控制 | |||
}else if (index==3) | |||
{ | |||
//刷新商品 | |||
MessageManager.getInstance().sendMessage(MessageName.MakeMainGoodResh, "Good"); | |||
DataBus.getInstance().GetMainGoodProperty(); | |||
//设置清洗模式 | |||
ExecuteTheRecipe.WritePLC("清洗模式",false,null); | |||
ExecuteTheRecipe.WritePLC("砝码校准模式",false,null); | |||
ExecuteTheRecipe.WritePLC("手自切换", true, null); | |||
} | |||
} | |||
@@ -62,7 +62,7 @@ public class BottomNavigationMainActivity extends BaseActivity { | |||
mNavigateTabBar.addTab(null, new MainNavigateTabBar.TabParam(R.mipmap.comui_tab_person, R.mipmap.comui_tab_person_selected, "我的")); | |||
mNavigateTabBar.setTabSelectListener(mOnNavigationItemSelectedListener); | |||
initFragment(); | |||
Init(); | |||
} | |||
@Override | |||
@@ -78,7 +78,9 @@ public class clsfbc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde | |||
myViewHolder.bc_text2.setText(gxs==null?"0":(gxs+"")); | |||
Object time=ExecuteTheRecipe.ReadPLC("补偿"+index+"时间"); | |||
myViewHolder.bc_text3.setText(time==null?"0.0":(String.format ("%.1f", (int)time/10.0)+"")); | |||
int timel=time==null?0:(Integer.parseInt(time.toString())); | |||
myViewHolder.bc_text3.setText(String.format ("%.1f", timel/10.0)+""); | |||
myViewHolder.save_botton.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@@ -182,6 +184,7 @@ public class clsfbc_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde | |||
public MyLCViewHolder1(View view) { | |||
super(view); | |||
td_text=view.findViewById(R.id.td_text); | |||
switch1=view.findViewById(R.id.switch1); | |||
bc_text1=view.findViewById(R.id.bc_text1); | |||
bc_text2=view.findViewById(R.id.bc_text2); | |||
bc_text3=view.findViewById(R.id.bc_text3); | |||
@@ -58,7 +58,7 @@ public class lsjy_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
String name= "通道"+goodsMake.num+"(" +goodsMake.name+")"; | |||
myViewHolder.name.setText(name+""); | |||
myViewHolder.wlname.setText(goodsMake.materialName+""); | |||
myViewHolder.edittext_xs.setText(goodsMake.xs+""); | |||
// myViewHolder.edittext_xs.setText(goodsMake.xs+""); | |||
myViewHolder.control_switch.setChecked(goodsMake.jzkg); | |||
myViewHolder.edittext_tdzl.setText(goodsMake.Value+""); | |||
@@ -79,16 +79,16 @@ public class lsjy_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
@Override | |||
public void onClick(View view) { | |||
String value = myViewHolder.edittext_tdzl.getText().toString(); | |||
String value1=myViewHolder.edittext_xs.getText().toString(); | |||
//String value1=myViewHolder.edittext_xs.getText().toString(); | |||
Short val = 0; | |||
float xs= 1.0F; | |||
//float xs= 1.0F; | |||
try { | |||
val = (short) Math.round((Double.parseDouble(value) * 10)); | |||
xs=Float.parseFloat(value1); | |||
//xs=Float.parseFloat(value1); | |||
} catch (Exception e) { | |||
} | |||
ExecuteTheRecipe.WritePLC("出料系数"+goodsMake.num,xs,null); | |||
//ExecuteTheRecipe.WritePLC("出料系数"+goodsMake.num,xs,null); | |||
ExecuteTheRecipe.WritePLC("校准值" + goodsMake.num, val, new IWriteCallBack() { | |||
@Override | |||
public void onSuccess() { | |||
@@ -129,8 +129,6 @@ public class lsjy_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
@Override | |||
public void run() { | |||
try { | |||
mainGoods.clear(); | |||
mainGoods = DataBus.getInstance().SilosLsjy; | |||
notifyDataSetChanged(); | |||
} catch (Exception e) { | |||
@@ -157,7 +155,7 @@ public class lsjy_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
/** | |||
* 系数 | |||
*/ | |||
EditText edittext_xs; | |||
//EditText edittext_xs; | |||
/** | |||
* 校准开关 | |||
*/ | |||
@@ -174,7 +172,7 @@ public class lsjy_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
super(view); | |||
name = (TextView) view.findViewById(R.id.name); | |||
wlname = (TextView) view.findViewById(R.id.wlname); | |||
edittext_xs=(EditText) view.findViewById(R.id.edittext_xs); | |||
// edittext_xs=(EditText) view.findViewById(R.id.edittext_xs); | |||
control_switch = (SwitchButton)view.findViewById(R.id.control_switch); | |||
edittext_tdzl=(EditText) view.findViewById(R.id.edittext_tdzl); | |||
save_value=(Button) view.findViewById(R.id.save_value); | |||
@@ -13,6 +13,7 @@ import androidx.annotation.Nullable; | |||
import androidx.recyclerview.widget.RecyclerView; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.constant.DataBus; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; | |||
import com.bonait.bnframework.common.db.res.ResGoodProperty; | |||
@@ -27,12 +28,11 @@ public class pfsx_adapter extends ArrayAdapter<ResGoodProperty> { | |||
* 内部点击事件 | |||
*/ | |||
private MyClickListener mListener; | |||
private List<ResGoodProperty> datas; | |||
private List<ResGoodProperty> datas= DataBus.getInstance().bpa_goodproperties; | |||
int resource1; | |||
public Context contextA; | |||
public pfsx_adapter(@NonNull Context context, int resource, @NonNull List<ResGoodProperty> objects, MyClickListener listener) { | |||
public pfsx_adapter(@NonNull Context context, int resource, @NonNull List<ResGoodProperty> objects) { | |||
super(context, resource, objects); | |||
mListener = listener; | |||
contextA=context; | |||
datas=objects; | |||
this.resource1=resource; | |||
@@ -49,7 +49,6 @@ public class pfsx_adapter extends ArrayAdapter<ResGoodProperty> { | |||
RecyclerView recyclerView=view.findViewById(R.id.recycler_view); | |||
MyLayoutManager layout = new MyLayoutManager(); | |||
layout.setAutoMeasureEnabled(true); | |||
recyclerView.setLayoutManager(layout); | |||
@@ -3,6 +3,8 @@ package com.bonait.bnframework.modules.home.adapter; | |||
import android.app.Activity; | |||
import android.content.Context; | |||
import android.content.ContextWrapper; | |||
import android.os.Handler; | |||
import android.os.Message; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
@@ -60,9 +62,47 @@ public class wdsz_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
myViewHolder.temp.setText(goodsMake.temp+""); | |||
myViewHolder.control_switch.setChecked(goodsMake.autoheat); | |||
final String[] temp = {"0"}; | |||
Handler mHandler = new Handler() { | |||
public void handleMessage(Message msg) { | |||
switch (msg.what) { | |||
case 0: | |||
myViewHolder.temp.setText(temp[0]); | |||
break; | |||
case 1: | |||
break; | |||
case 2: | |||
break; | |||
} | |||
} | |||
}; | |||
new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
while (ConfigName.getInstance().PlcIsConnect) { | |||
try { | |||
Object obj= ExecuteTheRecipe.ReadPLC(goodsMake.name); | |||
if(obj!=null) | |||
{ | |||
temp[0] =String.valueOf(obj); | |||
mHandler.sendEmptyMessage(0); | |||
} | |||
Thread.sleep(100); | |||
} catch (InterruptedException e) { | |||
throw new RuntimeException(e); | |||
} | |||
} | |||
} | |||
}).start(); | |||
myViewHolder.control_switch.setOnCheckedChangeListener(new SwitchButton.OnCheckedChangeListener() { | |||
@Override | |||
public void onCheckedChanged(SwitchButton view, boolean isChecked) { | |||
//设置 | |||
goodsMake.autoheat=isChecked; | |||
if(goodsMake.name.equals("水池温度")) | |||
{ | |||
ConfigName.getInstance().AutomaticHeating=goodsMake.autoheat; | |||
@@ -85,7 +125,7 @@ public class wdsz_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
public void onClick(View view) { | |||
int up = Integer.parseInt((myViewHolder.edittext_sx.getText().toString().isEmpty() ? "0" : myViewHolder.edittext_sx.getText().toString())); | |||
if (up <= 0) { | |||
ToastUtils.error("温度上限不能小于0!请调整后重试."); | |||
ToastUtils.error("温度不能小于0!请调整后重试."); | |||
return; | |||
} | |||
ExecuteTheRecipe.WritePLC(goodsMake.name + "设置", up, new IWriteCallBack() { | |||
@@ -101,6 +141,8 @@ public class wdsz_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> | |||
}); | |||
} | |||
}); | |||
} | |||
} catch (Exception e) { | |||
e.printStackTrace(); | |||
@@ -61,10 +61,11 @@ public class DingDanfragment extends BaseFragment { | |||
public void onViewClicked(View view) { | |||
switch (view.getId()) { | |||
case R.id.ddgl:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(2,new OrderListActivity()); | |||
skipToActivity(OrderListActivity.class); | |||
//ConfigName.getInstance().fragmentAdapter.replaceFragment(2,new OrderListActivity()); | |||
break; | |||
case R.id.xltj:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(2,new SalesStatisticsActivity()); | |||
skipToActivity(SalesStatisticsActivity.class); | |||
break; | |||
} | |||
} | |||
@@ -62,13 +62,16 @@ public class GongnengFragment extends BaseFragment { | |||
public void onViewClicked(View view) { | |||
switch (view.getId()) { | |||
case R.id.jcsjgl:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(0,new JcsjglActivity()); | |||
skipToActivity(JcsjglActivity.class); | |||
//ConfigName.getInstance().fragmentAdapter.replaceFragment(0,new JcsjglActivity()); | |||
break; | |||
case R.id.lcgl:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(0,new SilosActivity()); | |||
skipToActivity(SilosActivity.class); | |||
//ConfigName.getInstance().fragmentAdapter.replaceFragment(0,new SilosActivity()); | |||
break; | |||
case R.id.yfpf:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(0,new GoodPeiFangActivity()); | |||
skipToActivity(GoodPeiFangActivity.class); | |||
//ConfigName.getInstance().fragmentAdapter.replaceFragment(0,new GoodPeiFangActivity()); | |||
break; | |||
} | |||
} | |||
@@ -58,13 +58,18 @@ public class GuanLifragment extends BaseFragment { | |||
public void onViewClicked(View view) { | |||
switch (view.getId()) { | |||
case R.id.plckz:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(4,new PlcControlActivity()); | |||
skipToActivity(PlcControlActivity.class); | |||
//ConfigName.getInstance().fragmentAdapter.replaceFragment(4,new PlcControlActivity()); | |||
break; | |||
case R.id.rzgl:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(4,new LogActivity()); | |||
skipToActivity(LogActivity.class); | |||
//ConfigName.getInstance().fragmentAdapter.replaceFragment(4,new LogActivity()); | |||
break; | |||
case R.id.ssjk:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(4,new RealTimeActivity()); | |||
skipToActivity(RealTimeActivity.class); | |||
//ConfigName.getInstance().fragmentAdapter.replaceFragment(4,new RealTimeActivity()); | |||
break; | |||
} | |||
} | |||
@@ -54,7 +54,7 @@ public class JiaoYanFragment extends BaseFragment { | |||
ListView rv_left;//左侧菜单 | |||
@BindView(R.id.viewpager_jiaoyan) | |||
QMUIViewPager viewpager_jiaoyan;//右侧控件 | |||
FrameLayout viewpager_jiaoyan;//右侧控件 | |||
private Context context; | |||
public static int mPosition; | |||
@@ -112,11 +112,12 @@ public class JiaoYanFragment extends BaseFragment { | |||
{ | |||
fragmentList.add(item.fragment); | |||
} | |||
FragmentAdapter fragmentAdapter=new FragmentAdapter(getChildFragmentManager(),fragmentList); | |||
viewpager_jiaoyan.setAdapter(fragmentAdapter); | |||
viewpager_jiaoyan.setOffscreenPageLimit(5); | |||
viewpager_jiaoyan.setCurrentItem(0); | |||
viewpager_jiaoyan.addOnPageChangeListener(pageChangeListener); | |||
//FragmentAdapter fragmentAdapter=new FragmentAdapter(getChildFragmentManager(),fragmentList); | |||
ShowFragment(menuModes.get(0).fragment); | |||
// viewpager_jiaoyan.setAdapter(fragmentAdapter); | |||
// viewpager_jiaoyan.setOffscreenPageLimit(5); | |||
// viewpager_jiaoyan.setCurrentItem(0); | |||
// viewpager_jiaoyan.addOnPageChangeListener(pageChangeListener); | |||
adapter=new jiaoyan_adapter(getContext(),menuModes); | |||
rv_left.setAdapter(adapter); | |||
rv_left.setOnItemClickListener(new AdapterView.OnItemClickListener() { | |||
@@ -153,7 +154,8 @@ public class JiaoYanFragment extends BaseFragment { | |||
//即使刷新adapter | |||
mPosition=position; | |||
adapter.notifyDataSetChanged(); | |||
viewpager_jiaoyan.setCurrentItem(position); | |||
ShowFragment(menuModes.get(position).fragment); | |||
//viewpager_jiaoyan.setCurrentItem(position); | |||
} | |||
@Override | |||
@@ -21,8 +21,10 @@ import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.DataBus; | |||
import com.bonait.bnframework.common.constant.MessageName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | |||
import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE; | |||
import com.bonait.bnframework.common.db.res.ResGoodProperty; | |||
import com.bonait.bnframework.common.db.res.ResGoodsMake; | |||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||
import com.bonait.bnframework.common.linktab.LinkMode; | |||
@@ -179,6 +181,7 @@ public class MakeGoodFragment extends BaseFragment { | |||
datatab_paiduishangping.setAdapter(DataBus.getInstance().loadinggoodAdapter); | |||
} | |||
/** | |||
* 点击商品 开始制作 | |||
*/ | |||
@@ -60,13 +60,13 @@ public class SheZhifragment extends BaseFragment { | |||
public void onViewClicked(View view) { | |||
switch (view.getId()) { | |||
case R.id.xtcs:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(5,new SystemParameterActivity()); | |||
skipToActivity(SystemParameterActivity.class); | |||
break; | |||
case R.id.imagegl:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(5,new ImageSourceActivity()); | |||
skipToActivity(ImageSourceActivity.class); | |||
break; | |||
case R.id.shebeixinxi:// | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(5,new DeviceInformationActivity()); | |||
skipToActivity(DeviceInformationActivity.class); | |||
break; | |||
} | |||
} | |||
@@ -1,5 +1,7 @@ | |||
package com.bonait.bnframework.modules.home.fragment.from; | |||
import static com.bonait.bnframework.MainApplication.getContext; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
@@ -11,6 +13,7 @@ import android.view.View; | |||
import android.widget.EditText; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.modules.home.fragment.SheZhifragment; | |||
@@ -19,7 +22,7 @@ import com.qmuiteam.qmui.widget.QMUITopBarLayout; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
public class DeviceInformationActivity extends BaseFragment { | |||
public class DeviceInformationActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
@@ -39,30 +42,23 @@ public class DeviceInformationActivity extends BaseFragment { | |||
EditText edittext6; | |||
@BindView(R.id.edittext7) | |||
EditText edittext7; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_deviceinformation, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
context = getContext(); | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_deviceinformation); | |||
ButterKnife.bind(this); | |||
context=getContext(); | |||
initTopBar(); | |||
initFragment(); | |||
initdata(); | |||
} | |||
private void initTopBar() { | |||
mTopBar.setTitle("系统参数"); | |||
mTopBar.setTitle("设备信息"); | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(5,new SheZhifragment()); | |||
} | |||
finish(); } | |||
}); | |||
} | |||
@@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity; | |||
import androidx.recyclerview.widget.LinearLayoutManager; | |||
import androidx.recyclerview.widget.RecyclerView; | |||
import android.app.Activity; | |||
import android.content.Context; | |||
import android.content.Intent; | |||
import android.os.Bundle; | |||
@@ -79,7 +80,7 @@ import butterknife.OnClick; | |||
import okhttp3.MediaType; | |||
import okhttp3.RequestBody; | |||
public class GoodPeiFangActivity extends BaseFragment { | |||
public class GoodPeiFangActivity extends BaseActivity { | |||
/** | |||
* 顶部标题 | |||
@@ -133,44 +134,44 @@ public class GoodPeiFangActivity extends BaseFragment { | |||
ArrayList<BPA_GOODSTYPE> goodstypes=new ArrayList<>(); | |||
private Context context; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_goodpeifang, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
private Activity activity; | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_goodpeifang); | |||
ButterKnife.bind(this); | |||
activity=this; | |||
context = getContext(); | |||
initTopBar(); | |||
Initdata(); | |||
} | |||
private void initTopBar() { | |||
mTopBar.setTitle("商品配方管理"); | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
onDestroy(); | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(0,new GongnengFragment()); | |||
finish(); | |||
} | |||
}); | |||
MessageManager.getInstance().registerMessageReceiver(getActivity(), MessageName.UpdateGood, new MessageLooper.OnMessageListener() { | |||
MessageManager.getInstance().registerMessageReceiver(this, MessageName.UpdateGood, new MessageLooper.OnMessageListener() { | |||
@Override | |||
public void onMessage(Object msg) { | |||
if (msg != null) { | |||
BPA_GOODS xx=(BPA_GOODS) msg; | |||
add_good.setData("编辑",xx,goodstypes,getActivity()); | |||
add_good.setData("编辑",xx,goodstypes,activity); | |||
add_good.setVisibility(View.VISIBLE); | |||
} | |||
} | |||
}); | |||
MessageManager.getInstance().registerMessageReceiver(getActivity(), MessageName.DeleteGood1, new MessageLooper.OnMessageListener() { | |||
MessageManager.getInstance().registerMessageReceiver(this, MessageName.DeleteGood1, new MessageLooper.OnMessageListener() { | |||
@Override | |||
public void onMessage(Object msg) { | |||
if (msg != null) { | |||
@@ -183,7 +184,7 @@ public class GoodPeiFangActivity extends BaseFragment { | |||
}); | |||
//打开 | |||
MessageManager.getInstance().registerMessageReceiver(getActivity(), MessageName.ClickGoodNew, new MessageLooper.OnMessageListener() { | |||
MessageManager.getInstance().registerMessageReceiver(this, MessageName.ClickGoodNew, new MessageLooper.OnMessageListener() { | |||
@Override | |||
public void onMessage(Object msg) { | |||
if (msg != null) { | |||
@@ -325,7 +326,7 @@ public class GoodPeiFangActivity extends BaseFragment { | |||
switch (view.getId()) { | |||
case R.id.add_fl://增加分类 | |||
//1.弹窗 增加分类 | |||
final QMUIDialog.EditTextDialogBuilder builder_add = new QMUIDialog.EditTextDialogBuilder(context); | |||
final QMUIDialog.EditTextDialogBuilder builder_add = new QMUIDialog.EditTextDialogBuilder(this); | |||
builder_add.setTitle("新建分类") | |||
.setPlaceholder("请输入") | |||
.setInputType(InputType.TYPE_CLASS_TEXT) | |||
@@ -361,7 +362,7 @@ public class GoodPeiFangActivity extends BaseFragment { | |||
.show(); | |||
break; | |||
case R.id.add_sp://增加商品 | |||
add_good.setData("新建",null,goodstypes,this.getActivity()); | |||
add_good.setData("新建",null,goodstypes,activity); | |||
add_good.setVisibility(View.VISIBLE); | |||
break; | |||
} | |||
@@ -1,5 +1,7 @@ | |||
package com.bonait.bnframework.modules.home.fragment.from; | |||
import static com.bonait.bnframework.MainApplication.getContext; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
@@ -17,6 +19,7 @@ import android.view.View; | |||
import android.widget.Button; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.constant.Constants; | |||
@@ -38,7 +41,7 @@ import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
import butterknife.OnClick; | |||
public class ImageSourceActivity extends BaseFragment { | |||
public class ImageSourceActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
@@ -50,30 +53,23 @@ public class ImageSourceActivity extends BaseFragment { | |||
RecyclerView rl_yx_file; | |||
@BindView(R.id.baocunbendi) | |||
Button baocunbendi; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_imagesource, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
context = getContext(); | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_imagesource); | |||
ButterKnife.bind(this); | |||
context=getContext(); | |||
initTopBar(); | |||
initFragment(); | |||
FlushedImage(); | |||
} | |||
private void initTopBar() { | |||
mTopBar.setTitle("系统参数"); | |||
mTopBar.setTitle("图片资源管理"); | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(5,new SheZhifragment()); | |||
} | |||
finish(); } | |||
}); | |||
} | |||
/** | |||
@@ -22,8 +22,10 @@ import android.view.ViewGroup; | |||
import android.widget.FrameLayout; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.tabbar.MainNavigateTabBar; | |||
import com.bonait.bnframework.modules.home.fragment.GongnengFragment; | |||
import com.bonait.bnframework.modules.home.fragment.from.fragment.Jcsjgl_sxgl_fragment; | |||
import com.bonait.bnframework.modules.home.fragment.from.fragment.Jcsjgl_wl_fragment; | |||
@@ -39,7 +41,7 @@ import java.util.List; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
public class JcsjglActivity extends BaseFragment { | |||
public class JcsjglActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
@@ -47,28 +49,25 @@ public class JcsjglActivity extends BaseFragment { | |||
QMUITabSegment tabs; | |||
@BindView(R.id.viewpager_wl) | |||
QMUIViewPager viewpager_wl; | |||
private Context context; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_jcsjgl, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
context = getContext(); | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_jcsjgl); | |||
ButterKnife.bind(this); | |||
initTopBar(); | |||
initFragment(); | |||
} | |||
private void initTopBar() { | |||
mTopBar.setTitle("基础数据管理"); | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(0,new GongnengFragment()); | |||
finish(); | |||
} | |||
}); | |||
} | |||
@@ -76,7 +75,7 @@ public class JcsjglActivity extends BaseFragment { | |||
* viewPager里添加fragment | |||
*/ | |||
private void initFragment() { | |||
QMUIFragmentPagerAdapter adapter=new QMUIFragmentPagerAdapter(getChildFragmentManager()) { | |||
QMUIFragmentPagerAdapter adapter=new QMUIFragmentPagerAdapter(getSupportFragmentManager()) { | |||
@Override | |||
public int getCount() { | |||
return 2; | |||
@@ -1,5 +1,7 @@ | |||
package com.bonait.bnframework.modules.home.fragment.from; | |||
import static com.bonait.bnframework.MainApplication.getContext; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
@@ -9,6 +11,7 @@ import android.graphics.Color; | |||
import android.os.Bundle; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.widget.ArrayAdapter; | |||
import android.widget.Button; | |||
import android.widget.EditText; | |||
@@ -18,6 +21,7 @@ import android.widget.TextView; | |||
import com.bigkoo.pickerview.TimePickerView; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
@@ -45,7 +49,7 @@ import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
import butterknife.OnClick; | |||
public class LogActivity extends BaseFragment { | |||
public class LogActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
@@ -93,18 +97,14 @@ public class LogActivity extends BaseFragment { | |||
Map<String,Integer> lx_map = new LinkedHashMap<>(); | |||
//endregion | |||
private Context context; | |||
private ViewGroup view; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_log, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
context = getContext(); | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_log); | |||
ButterKnife.bind(this); | |||
context=getContext(); | |||
view=(ViewGroup)getWindow().getDecorView(); | |||
initTopBar(); | |||
initFragment(); | |||
Init(); | |||
@@ -115,7 +115,7 @@ public class LogActivity extends BaseFragment { | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(4,new GuanLifragment()); | |||
finish(); | |||
} | |||
}); | |||
} | |||
@@ -189,8 +189,10 @@ public class LogActivity extends BaseFragment { | |||
.setContentSize(16)//字号 | |||
.setDate(selectedDate) | |||
.setRangDate(startDate, endDate) | |||
.setDecorView(null) | |||
.setDecorView(view) | |||
.build(); | |||
} | |||
@@ -1,5 +1,7 @@ | |||
package com.bonait.bnframework.modules.home.fragment.from; | |||
import static com.bonait.bnframework.MainApplication.getContext; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
@@ -9,6 +11,7 @@ import android.graphics.Color; | |||
import android.os.Bundle; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.widget.ArrayAdapter; | |||
import android.widget.Button; | |||
import android.widget.EditText; | |||
@@ -18,6 +21,7 @@ import android.widget.TextView; | |||
import com.bigkoo.pickerview.TimePickerView; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
@@ -40,7 +44,7 @@ import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
import butterknife.OnClick; | |||
public class OrderListActivity extends BaseFragment { | |||
public class OrderListActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
@@ -91,18 +95,15 @@ public class OrderListActivity extends BaseFragment { | |||
Spinner rzlx; | |||
Map<String,Integer> lx_map = new LinkedHashMap<>(); | |||
//endregion | |||
private Context context; | |||
private Context context;private ViewGroup view; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_orderlist, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_orderlist); | |||
ButterKnife.bind(this); | |||
view=(ViewGroup)getWindow().getDecorView(); | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
context = getContext(); | |||
initTopBar(); | |||
initFragment(); | |||
@@ -114,7 +115,7 @@ public class OrderListActivity extends BaseFragment { | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(2,new DingDanfragment()); | |||
finish(); | |||
} | |||
}); | |||
} | |||
@@ -183,7 +184,7 @@ public class OrderListActivity extends BaseFragment { | |||
.setContentSize(16)//字号 | |||
.setDate(selectedDate) | |||
.setRangDate(startDate, endDate) | |||
.setDecorView(null) | |||
.setDecorView(view) | |||
.build(); | |||
} | |||
@@ -1,5 +1,7 @@ | |||
package com.bonait.bnframework.modules.home.fragment.from; | |||
import static com.bonait.bnframework.MainApplication.getContext; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
@@ -10,6 +12,7 @@ import android.view.LayoutInflater; | |||
import android.view.View; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.modules.home.fragment.GongnengFragment; | |||
@@ -27,7 +30,7 @@ import com.qmuiteam.qmui.widget.tab.QMUITabSegment; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
public class PlcControlActivity extends BaseFragment { | |||
public class PlcControlActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
@@ -36,18 +39,12 @@ public class PlcControlActivity extends BaseFragment { | |||
@BindView(R.id.viewpager_wl) | |||
QMUIViewPager viewpager_wl; | |||
private Context context; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_plccontrol, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
context = getContext(); | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_plccontrol); | |||
ButterKnife.bind(this); | |||
context=getContext(); | |||
initTopBar(); | |||
initFragment(); | |||
} | |||
@@ -57,7 +54,7 @@ public class PlcControlActivity extends BaseFragment { | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(4,new GuanLifragment()); | |||
finish(); | |||
} | |||
}); | |||
} | |||
@@ -65,7 +62,7 @@ public class PlcControlActivity extends BaseFragment { | |||
* viewPager里添加fragment | |||
*/ | |||
private void initFragment() { | |||
QMUIFragmentPagerAdapter adapter=new QMUIFragmentPagerAdapter(getChildFragmentManager()) { | |||
QMUIFragmentPagerAdapter adapter=new QMUIFragmentPagerAdapter(getSupportFragmentManager()) { | |||
@Override | |||
public int getCount() { | |||
return 2; | |||
@@ -1,5 +1,7 @@ | |||
package com.bonait.bnframework.modules.home.fragment.from; | |||
import static com.bonait.bnframework.MainApplication.getContext; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
@@ -11,6 +13,7 @@ import android.view.LayoutInflater; | |||
import android.view.View; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.modules.home.fragment.GuanLifragment; | |||
@@ -25,25 +28,19 @@ import com.qmuiteam.qmui.widget.tab.QMUITabSegment; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
public class RealTimeActivity extends BaseFragment { | |||
public class RealTimeActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
@BindView(R.id.recycler_view) | |||
RecyclerView recycler_view; | |||
private Context context; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_realtime, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
context = getContext(); | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_realtime); | |||
ButterKnife.bind(this); | |||
context=getContext(); | |||
initTopBar(); | |||
initFragment(); | |||
} | |||
@@ -53,7 +50,7 @@ public class RealTimeActivity extends BaseFragment { | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(4,new GuanLifragment()); | |||
finish(); | |||
} | |||
}); | |||
} | |||
@@ -1,5 +1,7 @@ | |||
package com.bonait.bnframework.modules.home.fragment.from; | |||
import static com.bonait.bnframework.MainApplication.getContext; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
@@ -10,6 +12,7 @@ import android.view.LayoutInflater; | |||
import android.view.View; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.modules.home.fragment.DingDanfragment; | |||
@@ -19,22 +22,17 @@ import com.qmuiteam.qmui.widget.QMUITopBarLayout; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
public class SalesStatisticsActivity extends BaseFragment { | |||
public class SalesStatisticsActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
private Context context; | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_salesstatistics, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_salesstatistics); | |||
ButterKnife.bind(this); | |||
context = getContext(); | |||
initTopBar(); | |||
initFragment(); | |||
@@ -45,7 +43,7 @@ public class SalesStatisticsActivity extends BaseFragment { | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(2,new DingDanfragment()); | |||
finish(); | |||
} | |||
}); | |||
} | |||
@@ -1,5 +1,7 @@ | |||
package com.bonait.bnframework.modules.home.fragment.from; | |||
import static com.bonait.bnframework.MainApplication.getContext; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
@@ -46,7 +48,7 @@ import java.util.stream.Collectors; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
public class SilosActivity extends BaseFragment { | |||
public class SilosActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
@@ -56,29 +58,26 @@ public class SilosActivity extends BaseFragment { | |||
RecyclerView rv_right; | |||
private Context context; | |||
ArrayList<lcMode> lcModes = new ArrayList<>(); | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_silos, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_silos); | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
context = getContext(); | |||
ButterKnife.bind(this); | |||
context=getContext(); | |||
initTopBar(); | |||
InitData(); | |||
} | |||
private void initTopBar() { | |||
mTopBar.setTitle("料仓管理"); | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui, R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
onDestroy(); | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(0, new GongnengFragment()); | |||
finish(); | |||
} | |||
}); | |||
} | |||
@@ -1,5 +1,7 @@ | |||
package com.bonait.bnframework.modules.home.fragment.from; | |||
import static com.bonait.bnframework.MainApplication.getContext; | |||
import androidx.annotation.NonNull; | |||
import androidx.annotation.Nullable; | |||
import androidx.appcompat.app.AppCompatActivity; | |||
@@ -15,6 +17,7 @@ import android.widget.Spinner; | |||
import com.bonait.bnframework.R; | |||
import com.bonait.bnframework.business.ConfigData; | |||
import com.bonait.bnframework.common.base.BaseActivity; | |||
import com.bonait.bnframework.common.base.BaseFragment; | |||
import com.bonait.bnframework.common.constant.ConfigName; | |||
import com.bonait.bnframework.common.db.QueryDB; | |||
@@ -34,7 +37,7 @@ import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
import butterknife.OnClick; | |||
public class SystemParameterActivity extends BaseFragment { | |||
public class SystemParameterActivity extends BaseActivity { | |||
@BindView(R.id.topbar) | |||
QMUITopBarLayout mTopBar; | |||
@@ -64,18 +67,12 @@ public class SystemParameterActivity extends BaseFragment { | |||
* 系统设置参数 | |||
*/ | |||
ArrayList<BPA_SYSTEMSET> bpa_systemsets = new ArrayList<>(); | |||
@Override | |||
protected View onCreateView() { | |||
View root = LayoutInflater.from(getActivity()).inflate(R.layout.activity_systemparameter, null); | |||
ButterKnife.bind(this, root); | |||
return root; | |||
} | |||
@Override | |||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |||
super.onViewCreated(view, savedInstanceState); | |||
context = getContext(); | |||
protected void onCreate(Bundle savedInstanceState) { | |||
super.onCreate(savedInstanceState); | |||
setContentView(R.layout.activity_systemparameter); | |||
ButterKnife.bind(this); | |||
context=getContext(); | |||
initTopBar(); | |||
initFragment(); | |||
initData(); | |||
@@ -87,8 +84,7 @@ public class SystemParameterActivity extends BaseFragment { | |||
mTopBar.addLeftImageButton(R.mipmap.fanhui,R.id.topbar).setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ConfigName.getInstance().fragmentAdapter.replaceFragment(5,new SheZhifragment()); | |||
} | |||
finish(); } | |||
}); | |||
} | |||
/** | |||
@@ -134,6 +134,7 @@ public class JiaoYan_dzcjy_fragment extends BaseFragment { | |||
public void onDestroy() { | |||
super.onDestroy(); | |||
Logger.d("我的fragment销毁"); | |||
ExecuteTheRecipe.StopJiaoYanMode(); | |||
} | |||
/** | |||
@@ -9,12 +9,14 @@ import androidx.recyclerview.widget.RecyclerView; | |||
import android.content.Context; | |||
import android.os.Bundle; | |||
import android.os.Handler; | |||
import android.os.Message; | |||
import android.util.Log; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.view.WindowManager; | |||
import android.widget.Button; | |||
import android.widget.EditText; | |||
import android.widget.LinearLayout; | |||
import android.widget.TextView; | |||
import com.bonait.bnframework.R; | |||
@@ -50,6 +52,11 @@ public class JiaoYan_lsjy_fragment extends BaseFragment { | |||
@BindView(R.id.edittext_cl) | |||
EditText edittext_cl;//出料重量 | |||
@BindView(R.id.linelayout_fanzhuantime) | |||
LinearLayout linelayout_fanzhuantime;//出料重量 | |||
private Context context; | |||
@Override | |||
protected View onCreateView() { | |||
@@ -70,8 +77,10 @@ public class JiaoYan_lsjy_fragment extends BaseFragment { | |||
*/ | |||
public void InitView() { | |||
Initdata(); | |||
Run(); | |||
} | |||
public int selectIndexSilos=-99; | |||
@OnClick({R.id.save_jzsj,R.id.save_fzsj | |||
@@ -261,15 +270,38 @@ public class JiaoYan_lsjy_fragment extends BaseFragment { | |||
//校准时间 | |||
edittext_jzsj.setText(String.format("%.1f", (Double.parseDouble(time) / 10))); | |||
Object obj1= ExecuteTheRecipe.ReadPLC("反转时间"); | |||
String fztime = obj1==null?"0":obj1.toString(); | |||
edittext_fzsj.setText(String.format("%.1f", (Double.parseDouble(fztime) / 10))); | |||
if (ConfigName.getInstance().versionSelectionEnum.equals("配料吧台")) | |||
{ | |||
Object obj1= ExecuteTheRecipe.ReadPLC("反转时间"); | |||
String fztime = obj1==null?"0":obj1.toString(); | |||
edittext_fzsj.setText(String.format("%.1f", (Double.parseDouble(fztime) / 10))); | |||
}else | |||
{ | |||
linelayout_fanzhuantime.setVisibility(View.GONE); | |||
} | |||
} catch (Exception e) { | |||
} | |||
} | |||
private Handler mHandler = new Handler() { | |||
public void handleMessage(Message msg) { | |||
switch (msg.what) { | |||
case 0: | |||
zhongliang.setText(zhongliangxianshi); | |||
break; | |||
case 1: | |||
break; | |||
case 2: | |||
break; | |||
} | |||
} | |||
}; | |||
String zhongliangxianshi="0g"; | |||
/** | |||
* 实时显示线程 | |||
*/ | |||
@@ -279,18 +311,13 @@ public class JiaoYan_lsjy_fragment extends BaseFragment { | |||
public void run() { | |||
while (ConfigName.getInstance().PlcIsConnect) { | |||
try { | |||
getActivity().runOnUiThread(new Runnable() { | |||
@Override | |||
public void run() { | |||
try { | |||
Object obj= ExecuteTheRecipe.ReadPLC("称当前重量"); | |||
zhongliang.setText(String.valueOf((int)obj / 10.0) + " g"); | |||
} catch (Exception e) { | |||
ToastUtils.error("重量解析显示异常!" + e.getMessage()); | |||
} | |||
} | |||
}); | |||
Thread.sleep(50); | |||
Object obj= ExecuteTheRecipe.ReadPLC("称当前重量"); | |||
if(obj!=null) | |||
{ | |||
zhongliangxianshi=String.valueOf((int)obj / 10.0) + " g"; | |||
mHandler.sendEmptyMessage(0); | |||
} | |||
Thread.sleep(100); | |||
} catch (InterruptedException e) { | |||
throw new RuntimeException(e); | |||
} | |||
@@ -313,24 +340,27 @@ public class JiaoYan_lsjy_fragment extends BaseFragment { | |||
@Override | |||
public void run() { | |||
Object obj= ExecuteTheRecipe.ReadPLC("称当前重量"); | |||
int val = (int)obj; | |||
val=val<=0?0:val; | |||
if(obj!=null) | |||
{ | |||
int val = (int)obj; | |||
val=val<=0?0:val; | |||
ExecuteTheRecipe.WritePLC("校准值"+kkk,(short) val,null); | |||
ExecuteTheRecipe.WritePLC("校准值"+kkk,(short) val,null); | |||
String s = String.valueOf(val); | |||
for (SilosLsjyMode item:DataBus.getInstance().SilosLsjy) | |||
{ | |||
if(selectIndexSilos==item.num) | |||
String s = String.valueOf(val); | |||
for (SilosLsjyMode item:DataBus.getInstance().SilosLsjy) | |||
{ | |||
item.Value=String.format("%.1f", (Double.parseDouble(s) / 10)); | |||
if(kkk==item.num) | |||
{ | |||
item.Value=String.format("%.1f", (Double.parseDouble(s) / 10)); | |||
ToastUtils.error("重量!" +item.Value); | |||
} | |||
} | |||
if (DataBus.getInstance().lsjyAdapter!=null) | |||
{ | |||
DataBus.getInstance().lsjyAdapter.refresh(); | |||
} | |||
} | |||
if (DataBus.getInstance().lsjyAdapter!=null) | |||
{ | |||
DataBus.getInstance().lsjyAdapter.refresh(); | |||
} | |||
} | |||
}, 3000); | |||
} catch (Exception e) { | |||
@@ -352,6 +382,7 @@ public class JiaoYan_lsjy_fragment extends BaseFragment { | |||
public void onDestroy() { | |||
super.onDestroy(); | |||
Logger.d("我的fragment销毁"); | |||
ExecuteTheRecipe.WritePLC("手自切换", true, null); | |||
} | |||
/** | |||
@@ -8,6 +8,8 @@ import androidx.viewpager.widget.ViewPager; | |||
import android.content.Context; | |||
import android.os.Bundle; | |||
import android.os.Handler; | |||
import android.os.Message; | |||
import android.view.LayoutInflater; | |||
import android.view.View; | |||
import android.widget.Button; | |||
@@ -29,15 +31,12 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { | |||
@BindView(R.id.edittext_pssj) | |||
EditText edittext_pssj;//排水阀排水时间 | |||
@BindView(R.id.edittext_jssj) | |||
EditText edittext_jssj;//排水阀进水时间 | |||
@BindView(R.id.edittext_jrsj) | |||
EditText edittext_jrsj;//清洗预加热时间 | |||
@BindView(R.id.edittext_qxjsj) | |||
EditText edittext_qxjsj;//加清洗剂时间 | |||
@BindView(R.id.edittext_xhsj) | |||
EditText edittext_xhsj;//循环清洗时间 | |||
@BindView(R.id.edittext_qxwd) | |||
EditText edittext_qxwd;//清洗温度 | |||
@BindView(R.id.bt_start) | |||
Button bt_start;//开始时间 | |||
private Context context; | |||
@@ -65,14 +64,8 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { | |||
boolean IsStart = false; | |||
@OnClick({R.id.save_time,R.id.bt_start}) | |||
public void onViewClicked(View view) { | |||
double js = Double.parseDouble(edittext_jssj.getText().toString()); | |||
double qxj = Double.parseDouble(edittext_qxjsj.getText().toString()); | |||
switch (view.getId()) { | |||
case R.id.save_time://保存时间 | |||
if (qxj >= js ) { | |||
ToastUtils.warning("加清洗剂时间不能大于进水时间!"); | |||
return; | |||
} | |||
new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
@@ -82,21 +75,6 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { | |||
ExecuteTheRecipe.WritePLC("排水阀排水时间",(short)k,null); | |||
Thread.sleep(200); | |||
} | |||
if (!edittext_jssj.getText().toString().equals("")) { | |||
int k= (int)Math.round((Double.parseDouble(edittext_jssj.getText().toString()) * 10)); | |||
ExecuteTheRecipe.WritePLC("排水阀进水时间",(short)k,null); | |||
Thread.sleep(200); | |||
} | |||
if (!edittext_jrsj.getText().toString().equals("")) { | |||
int k= (int)Math.round((Double.parseDouble(edittext_jrsj.getText().toString()) * 10)); | |||
ExecuteTheRecipe.WritePLC("清洗预加热时间",(short)k,null); | |||
Thread.sleep(200); | |||
} | |||
if (!edittext_qxjsj.getText().toString().equals("")) { | |||
int k= (int)Math.round((Double.parseDouble(edittext_qxjsj.getText().toString()) * 10)); | |||
ExecuteTheRecipe.WritePLC("加清洗剂时间",(short)k,null); | |||
Thread.sleep(200); | |||
} | |||
if (!edittext_xhsj.getText().toString().equals("")) { | |||
int k= (int)Math.round((Double.parseDouble(edittext_xhsj.getText().toString()) * 10)); | |||
@@ -104,6 +82,12 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { | |||
Thread.sleep(200); | |||
} | |||
if (!edittext_qxwd.getText().toString().equals("")) { | |||
int k= Integer.parseInt(edittext_qxwd.getText().toString()); | |||
ExecuteTheRecipe.WritePLC("水池温度设置",k,null); | |||
Thread.sleep(200); | |||
} | |||
} catch (InterruptedException e) { | |||
} catch (Exception e) { | |||
@@ -115,10 +99,6 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { | |||
ToastUtils.info("保存成功!"); | |||
break; | |||
case R.id.bt_start://开始清洗 | |||
if (qxj >= js /*|| qxj >= ps*/) { | |||
ToastUtils.warning("加清洗剂时间不能大于进水时间!"); | |||
return; | |||
} | |||
if (IsStart) { | |||
ToastUtils.warning("正在清洗中,请勿重复点击!"); | |||
@@ -161,6 +141,22 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { | |||
//region 数据加载 | |||
private Handler mHandler = new Handler() { | |||
public void handleMessage(Message msg) { | |||
switch (msg.what) { | |||
case 0: | |||
bt_start.setText("开始清洗"); | |||
break; | |||
case 1: | |||
break; | |||
case 2: | |||
break; | |||
} | |||
} | |||
}; | |||
/** | |||
* 初始化数据加载 | |||
*/ | |||
@@ -170,30 +166,25 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { | |||
Object t1= ExecuteTheRecipe.ReadPLC("排水阀排水时间"); | |||
edittext_pssj.setText(t1==null?"0.0":(String.format ("%.1f", (Double.parseDouble(t1.toString())/10)))); | |||
Object t2= ExecuteTheRecipe.ReadPLC("排水阀进水时间"); | |||
edittext_jssj.setText(t2==null?"0.0":(String.format ("%.1f", (Double.parseDouble(t2.toString())/10)))); | |||
Object t3= ExecuteTheRecipe.ReadPLC("清洗预加热时间"); | |||
edittext_jrsj.setText(t3==null?"0.0":(String.format ("%.1f", (Double.parseDouble(t3.toString())/10)))); | |||
Object t4= ExecuteTheRecipe.ReadPLC("加清洗剂时间"); | |||
edittext_qxjsj.setText(t4==null?"0.0":(String.format ("%.1f", (Double.parseDouble(t4.toString())/10)))); | |||
Object t5= ExecuteTheRecipe.ReadPLC("循环清洗时间"); | |||
edittext_xhsj.setText(t5==null?"0.0":(String.format ("%.1f", (Double.parseDouble(t5.toString())/10)))); | |||
Object t7= ExecuteTheRecipe.ReadPLC("水池温度设置"); | |||
edittext_qxwd.setText((t7==null?0:(int)t7) +""); | |||
ExecuteTheRecipe.CleaningComplete=new IRun() { | |||
@Override | |||
public void Run() { | |||
if (IsStart) { | |||
IsStart = false; | |||
bt_start.setText("开始清洗"); | |||
mHandler.sendEmptyMessage(0); | |||
ExecuteTheRecipe.WritePLC("清洗模式",false,null); | |||
ToastUtils.info("清洗完成"); | |||
} | |||
} | |||
}; | |||
ExecuteTheRecipe.WritePLC("手自切换",true,null); | |||
} catch (Exception e) { | |||
} | |||
@@ -204,6 +195,7 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { | |||
public void onDestroy() { | |||
super.onDestroy(); | |||
Logger.d("我的fragment销毁"); | |||
ExecuteTheRecipe.WritePLC("清洗模式",false,null); | |||
} | |||
/** | |||
@@ -38,7 +38,7 @@ import java.util.ArrayList; | |||
import butterknife.BindView; | |||
import butterknife.ButterKnife; | |||
public class add_makegood_control extends LinearLayout implements MyClickListener { | |||
public class add_makegood_control extends LinearLayout{ | |||
@BindView(R.id.quzhizuo) | |||
@@ -54,18 +54,17 @@ public class add_makegood_control extends LinearLayout implements MyClickListene | |||
@BindView(R.id.makegoodtitle) | |||
TextView makegoodtitle;//配方名称 | |||
/** | |||
* 属性数据 | |||
*/ | |||
ArrayList<ResGoodProperty> bpa_goodproperties = new ArrayList<>(); | |||
/** | |||
* 点击事件 | |||
*/ | |||
public MyClickListener mListener = null; | |||
private View root; | |||
private Context contextMian; | |||
public add_makegood_control(Context context, @Nullable AttributeSet attrs) { | |||
super(context, attrs); | |||
contextMian=context; | |||
root = LayoutInflater.from(context).inflate(R.layout.dialog_add_makegood, this); | |||
ButterKnife.bind(this, root); | |||
Init(); | |||
@@ -80,43 +79,11 @@ public class add_makegood_control extends LinearLayout implements MyClickListene | |||
private void initData() { | |||
//2.填充规则数据,查询所有属性大类 | |||
bpa_goodproperties.clear(); | |||
ArrayList<BPA_GOODPROPERTY> da = QueryDB.GetGoodsPropertyALL("0"); | |||
for (BPA_GOODPROPERTY item : da) { | |||
ResGoodProperty re = new ResGoodProperty(); | |||
re.id = item.id; | |||
re.name = item.name; | |||
ArrayList<BPA_GOODPROPERTY> zsx = QueryDB.GetGoodsPropertyALL(item.id); | |||
re.child = new ArrayList<>(); | |||
ArrayList<ResGoodProperty> _chid = new ArrayList<>(); | |||
for (BPA_GOODPROPERTY k : zsx) { | |||
ResGoodProperty m = new ResGoodProperty(); | |||
m.id = k.id; | |||
m.name = k.name; | |||
m.isSelect = false; | |||
_chid.add(m); | |||
} | |||
re.child = _chid; | |||
bpa_goodproperties.add(re); | |||
} | |||
for (ResGoodProperty item : bpa_goodproperties) { | |||
int i = 0; | |||
for (ResGoodProperty c : item.child) { | |||
if (i == 0) { | |||
c.isSelect = true; | |||
} | |||
i++; | |||
} | |||
if(DataBus.getInstance().sxadapter==null) | |||
{ | |||
DataBus.getInstance().sxadapter = new pfsx_adapter(contextMian, R.layout.pfsx_item, DataBus.getInstance().bpa_goodproperties); | |||
} | |||
pfsx_adapter sxadapter = new pfsx_adapter(getContext(), R.layout.pfsx_item, bpa_goodproperties, this); | |||
datatab_makesx.setAdapter(sxadapter); | |||
datatab_makesx.setAdapter(DataBus.getInstance().sxadapter); | |||
} | |||
/** | |||
@@ -189,7 +156,6 @@ public class add_makegood_control extends LinearLayout implements MyClickListene | |||
} | |||
BPA_GOODSRECIPENAME goodsrecipename = null; | |||
String pfname = "";//配方名称集合 | |||
String ggids = "";//规格id集合 | |||
String names=""; | |||
/** | |||
@@ -198,7 +164,7 @@ public class add_makegood_control extends LinearLayout implements MyClickListene | |||
public boolean DataValidation() { | |||
//1.数据名称不能为空 | |||
ggids = "";names=""; | |||
for (ResGoodProperty item : bpa_goodproperties) { | |||
for (ResGoodProperty item : DataBus.getInstance().bpa_goodproperties) { | |||
for (ResGoodProperty k : item.child) { | |||
if (k.isSelect) { | |||
ggids += k.id + ","; | |||
@@ -218,28 +184,4 @@ public class add_makegood_control extends LinearLayout implements MyClickListene | |||
} | |||
return true; | |||
} | |||
/** | |||
* 点击事件 | |||
* | |||
* @param v | |||
* @param data | |||
*/ | |||
@Override | |||
public void clickListener(View v, Object data) { | |||
switch (v.getId()) { | |||
case R.id.name://点击 修改 | |||
break; | |||
case R.id.button_item://删除按钮 | |||
break; | |||
} | |||
} | |||
@Override | |||
public void clickListenerNew(View v, int k, Object data) { | |||
} | |||
} |
@@ -177,7 +177,7 @@ public class add_pf_control extends LinearLayout implements MyClickListener { | |||
} | |||
pfsx_adapter sxadapter = new pfsx_adapter(getContext(), R.layout.pfsx_item, bpa_goodproperties, this); | |||
pfsx_adapter sxadapter = new pfsx_adapter(getContext(), R.layout.pfsx_item, bpa_goodproperties); | |||
datatab_sx.setAdapter(sxadapter); | |||
InitTab(); | |||
@@ -13,7 +13,6 @@ | |||
android:layout_marginTop="54dp" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/main_background" | |||
> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
@@ -13,7 +13,6 @@ | |||
android:layout_marginTop="54dp" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/main_background" | |||
> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
@@ -28,7 +28,7 @@ | |||
android:layout_alignParentLeft="true" | |||
android:layout_marginLeft="20dp" | |||
android:text="订单编号" | |||
android:textSize="@dimen/textSize" /> | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
@@ -41,7 +41,7 @@ | |||
android:layout_marginLeft="20dp" | |||
android:layout_alignParentLeft="true" | |||
android:text="创建时间" | |||
android:textSize="@dimen/textSize" /> | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
@@ -54,7 +54,7 @@ | |||
android:layout_marginLeft="20dp" | |||
android:layout_alignParentLeft="true" | |||
android:text="商品名称" | |||
android:textSize="@dimen/textSize" /> | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
@@ -67,7 +67,7 @@ | |||
android:layout_marginLeft="20dp" | |||
android:layout_alignParentLeft="true" | |||
android:text="订单状态" | |||
android:textSize="@dimen/textSize" /> | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
@@ -80,7 +80,7 @@ | |||
android:layout_marginLeft="20dp" | |||
android:layout_alignParentLeft="true" | |||
android:text="备注" | |||
android:textSize="@dimen/textSize" /> | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
</TableRow> | |||
@@ -41,7 +41,7 @@ | |||
android:layout_alignParentLeft="true" | |||
android:text="日志类型" | |||
android:textColor="@color/foreground" | |||
android:textSize="@dimen/textSize" /> | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
@@ -55,7 +55,7 @@ | |||
android:layout_alignParentLeft="true" | |||
android:text="日志时间" | |||
android:textColor="@color/foreground" | |||
android:textSize="@dimen/textSize" /> | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
<RelativeLayout | |||
android:layout_width="0dp" | |||
@@ -69,7 +69,7 @@ | |||
android:layout_alignParentLeft="true" | |||
android:text="日志描述日志描述" | |||
android:textColor="@color/foreground" | |||
android:textSize="@dimen/textSize" /> | |||
android:textSize="12dp" /> | |||
</RelativeLayout> | |||
</TableRow> | |||
@@ -30,10 +30,15 @@ | |||
</LinearLayout> | |||
<!-- 右侧控件 --> | |||
<com.qmuiteam.qmui.widget.QMUIViewPager | |||
<FrameLayout | |||
android:id="@+id/viewpager_jiaoyan" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" /> | |||
android:layout_height="match_parent"> | |||
</FrameLayout> | |||
<!-- <com.qmuiteam.qmui.widget.QMUIViewPager--> | |||
<!-- android:id="@+id/viewpager_jiaoyan"--> | |||
<!-- android:layout_width="match_parent"--> | |||
<!-- android:layout_height="match_parent" />--> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
@@ -26,7 +26,7 @@ | |||
android:id="@+id/ldjz" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:layout_width="match_parent" | |||
android:layout_height="26dp" | |||
android:layout_height="50dp" | |||
android:layout_centerInParent="true" | |||
android:background="@drawable/bg_btn_login_selected" | |||
android:text="零点校正" | |||
@@ -61,7 +61,8 @@ | |||
android:digits="0123456789" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
android:textSize="12dp" | |||
android:text="0"/> | |||
<ImageView | |||
android:layout_marginTop="30dp" | |||
@@ -79,7 +80,7 @@ | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:id="@+id/jzzl" | |||
android:layout_width="match_parent" | |||
android:layout_height="26dp" | |||
android:layout_height="50dp" | |||
android:layout_centerInParent="true" | |||
android:background="@drawable/bg_btn_login_selected" | |||
android:text="校正重量" | |||
@@ -116,6 +116,7 @@ | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/linelayout_fanzhuantime" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
@@ -40,24 +40,6 @@ | |||
android:layout_height="wrap_content" | |||
android:text="排水阀排水时间" | |||
android:textAlignment="center" /> | |||
<TextView | |||
android:layout_marginTop="20dp" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="排水阀进水时间" | |||
android:textAlignment="center" /> | |||
<TextView | |||
android:layout_marginTop="20dp" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="清洗预加热时间" | |||
android:textAlignment="center" /> | |||
<TextView | |||
android:layout_marginTop="20dp" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="加清洗剂时间" | |||
android:textAlignment="center" /> | |||
<TextView | |||
android:layout_marginTop="20dp" | |||
android:layout_width="wrap_content" | |||
@@ -69,7 +51,7 @@ | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:layout_marginRight="@dimen/dp_10" | |||
android:layout_width="2dp" | |||
android:layout_height="200dp" | |||
android:layout_height="60dp" | |||
android:background="@color/app_color_blue"> | |||
</RelativeLayout> | |||
<LinearLayout | |||
@@ -89,45 +71,7 @@ | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
<EditText | |||
android:layout_marginLeft="20dp" | |||
android:layout_marginTop="17dp" | |||
android:id="@+id/edittext_jssj" | |||
android:layout_width="110dp" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入" | |||
android:inputType="text" | |||
android:digits="0123456789." | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
<EditText | |||
android:layout_marginLeft="20dp" | |||
android:layout_marginTop="17dp" | |||
android:id="@+id/edittext_jrsj" | |||
android:layout_width="110dp" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入" | |||
android:inputType="text" | |||
android:digits="0123456789." | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
<EditText | |||
android:layout_marginLeft="20dp" | |||
android:layout_marginTop="17dp" | |||
android:id="@+id/edittext_qxjsj" | |||
android:layout_width="110dp" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入" | |||
android:inputType="text" | |||
android:digits="0123456789." | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" /> | |||
<EditText | |||
android:layout_marginLeft="20dp" | |||
android:layout_marginTop="17dp" | |||
@@ -143,7 +87,32 @@ | |||
android:textSize="12dp" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<ImageView | |||
android:layout_marginTop="10dp" | |||
android:layout_marginBottom="10dp" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:src="@mipmap/jt_x"/> | |||
<TextView | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:text="② 清洗温度" | |||
android:textAlignment="center" /> | |||
<EditText | |||
android:layout_margin="@dimen/dp_10" | |||
android:id="@+id/edittext_qxwd" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入" | |||
android:inputType="text" | |||
android:digits="0123456789" | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" | |||
android:text="0"/> | |||
<ImageView | |||
android:layout_marginTop="10dp" | |||
android:layout_marginBottom="10dp" | |||
@@ -154,7 +123,7 @@ | |||
<TextView | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:text="② 点击保存" | |||
android:text="③ 点击保存" | |||
android:textAlignment="center" /> | |||
<Button | |||
android:id="@+id/save_time" | |||
@@ -170,15 +139,17 @@ | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<Button | |||
android:id="@+id/bt_start" | |||
android:layout_marginTop="40dp" | |||
android:layout_width="120dp" | |||
android:layout_width="match_parent" | |||
android:layout_height="80dp" | |||
android:background="@drawable/wh_bj" | |||
android:layout_centerInParent="true" | |||
android:layout_marginTop="40dp" | |||
android:background="@drawable/button1" | |||
android:text="开始清洗" | |||
android:textColor="@color/white" /> | |||
android:textColor="@color/black_light" | |||
android:textSize="20dp"/> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
@@ -53,11 +53,7 @@ | |||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||
android:layout_height="match_parent"/> | |||
<com.bonait.bnframework.modules.home.fragment.mode.add_makegood_control | |||
android:id="@+id/add_makegood" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:visibility="gone"></com.bonait.bnframework.modules.home.fragment.mode.add_makegood_control> | |||
</RelativeLayout> | |||
</LinearLayout> | |||
@@ -85,7 +81,11 @@ | |||
</LinearLayout> | |||
<com.bonait.bnframework.modules.home.fragment.mode.add_makegood_control | |||
android:id="@+id/add_makegood" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:visibility="gone"/> | |||
</RelativeLayout> | |||
<com.qmuiteam.qmui.widget.QMUITopBarLayout | |||
android:id="@+id/topbar" | |||
@@ -31,35 +31,35 @@ | |||
android:textAlignment="center" | |||
android:text="牛奶"/> | |||
<RelativeLayout | |||
android:layout_marginTop="10dp" | |||
<!-- <RelativeLayout--> | |||
<!-- android:layout_marginTop="10dp"--> | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<LinearLayout | |||
android:layout_centerInParent="true" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="系数:" | |||
android:textAlignment="center" /> | |||
<EditText | |||
android:id="@+id/edittext_xs" | |||
android:layout_width="60dp" | |||
android:layout_height="wrap_content" | |||
android:background="@drawable/input_bj" | |||
android:hint="请输入" | |||
android:inputType="number|numberDecimal" | |||
android:digits="0123456789." | |||
android:maxLines="1" | |||
android:padding="3dp" | |||
android:textSize="12dp" | |||
android:text="0.0"/> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
<!-- android:layout_width="match_parent"--> | |||
<!-- android:layout_height="wrap_content">--> | |||
<!-- <LinearLayout--> | |||
<!-- android:layout_centerInParent="true"--> | |||
<!-- android:layout_width="wrap_content"--> | |||
<!-- android:layout_height="wrap_content"--> | |||
<!-- android:orientation="horizontal">--> | |||
<!-- <TextView--> | |||
<!-- android:layout_width="wrap_content"--> | |||
<!-- android:layout_height="wrap_content"--> | |||
<!-- android:text="系数:"--> | |||
<!-- android:textAlignment="center" />--> | |||
<!-- <EditText--> | |||
<!-- android:id="@+id/edittext_xs"--> | |||
<!-- android:layout_width="60dp"--> | |||
<!-- android:layout_height="wrap_content"--> | |||
<!-- android:background="@drawable/input_bj"--> | |||
<!-- android:hint="请输入"--> | |||
<!-- android:inputType="number|numberDecimal"--> | |||
<!-- android:digits="0123456789."--> | |||
<!-- android:maxLines="1"--> | |||
<!-- android:padding="3dp"--> | |||
<!-- android:textSize="12dp"--> | |||
<!-- android:text="0.0"/>--> | |||
<!-- </LinearLayout>--> | |||
<!-- </RelativeLayout>--> | |||
<TextView | |||