@@ -4,10 +4,10 @@ | |||||
<selectionStates> | <selectionStates> | ||||
<SelectionState runConfigName="app"> | <SelectionState runConfigName="app"> | ||||
<option name="selectionMode" value="DROPDOWN" /> | <option name="selectionMode" value="DROPDOWN" /> | ||||
<DropdownSelection timestamp="2024-09-23T03:31:50.481919400Z"> | |||||
<DropdownSelection timestamp="2024-11-09T05:59:25.231451600Z"> | |||||
<Target type="DEFAULT_BOOT"> | <Target type="DEFAULT_BOOT"> | ||||
<handle> | <handle> | ||||
<DeviceId pluginId="Default" identifier="serial=192.168.6.99:5555;connection=46812695" /> | |||||
<DeviceId pluginId="Default" identifier="serial=127.0.0.1:7555;connection=3e6e6b9b" /> | |||||
</handle> | </handle> | ||||
</Target> | </Target> | ||||
</DropdownSelection> | </DropdownSelection> | ||||
@@ -0,0 +1,329 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<project version="4"> | |||||
<component name="direct_access_persist.xml"> | |||||
<option name="deviceSelectionList"> | |||||
<list> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="27" /> | |||||
<option name="brand" value="DOCOMO" /> | |||||
<option name="codename" value="F01L" /> | |||||
<option name="id" value="F01L" /> | |||||
<option name="manufacturer" value="FUJITSU" /> | |||||
<option name="name" value="F-01L" /> | |||||
<option name="screenDensity" value="360" /> | |||||
<option name="screenX" value="720" /> | |||||
<option name="screenY" value="1280" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="28" /> | |||||
<option name="brand" value="DOCOMO" /> | |||||
<option name="codename" value="SH-01L" /> | |||||
<option name="id" value="SH-01L" /> | |||||
<option name="manufacturer" value="SHARP" /> | |||||
<option name="name" value="AQUOS sense2 SH-01L" /> | |||||
<option name="screenDensity" value="480" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2160" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="Lenovo" /> | |||||
<option name="codename" value="TB370FU" /> | |||||
<option name="id" value="TB370FU" /> | |||||
<option name="manufacturer" value="Lenovo" /> | |||||
<option name="name" value="Tab P12" /> | |||||
<option name="screenDensity" value="340" /> | |||||
<option name="screenX" value="1840" /> | |||||
<option name="screenY" value="2944" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="31" /> | |||||
<option name="brand" value="samsung" /> | |||||
<option name="codename" value="a51" /> | |||||
<option name="id" value="a51" /> | |||||
<option name="manufacturer" value="Samsung" /> | |||||
<option name="name" value="Galaxy A51" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2400" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="akita" /> | |||||
<option name="id" value="akita" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 8a" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2400" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="33" /> | |||||
<option name="brand" value="samsung" /> | |||||
<option name="codename" value="b0q" /> | |||||
<option name="id" value="b0q" /> | |||||
<option name="manufacturer" value="Samsung" /> | |||||
<option name="name" value="Galaxy S22 Ultra" /> | |||||
<option name="screenDensity" value="600" /> | |||||
<option name="screenX" value="1440" /> | |||||
<option name="screenY" value="3088" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="32" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="bluejay" /> | |||||
<option name="id" value="bluejay" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 6a" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2400" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="caiman" /> | |||||
<option name="id" value="caiman" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 9 Pro" /> | |||||
<option name="screenDensity" value="360" /> | |||||
<option name="screenX" value="960" /> | |||||
<option name="screenY" value="2142" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="comet" /> | |||||
<option name="id" value="comet" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 9 Pro Fold" /> | |||||
<option name="screenDensity" value="390" /> | |||||
<option name="screenX" value="2076" /> | |||||
<option name="screenY" value="2152" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="29" /> | |||||
<option name="brand" value="samsung" /> | |||||
<option name="codename" value="crownqlteue" /> | |||||
<option name="id" value="crownqlteue" /> | |||||
<option name="manufacturer" value="Samsung" /> | |||||
<option name="name" value="Galaxy Note9" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="2220" /> | |||||
<option name="screenY" value="1080" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="samsung" /> | |||||
<option name="codename" value="dm3q" /> | |||||
<option name="id" value="dm3q" /> | |||||
<option name="manufacturer" value="Samsung" /> | |||||
<option name="name" value="Galaxy S23 Ultra" /> | |||||
<option name="screenDensity" value="600" /> | |||||
<option name="screenX" value="1440" /> | |||||
<option name="screenY" value="3088" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="samsung" /> | |||||
<option name="codename" value="e1q" /> | |||||
<option name="id" value="e1q" /> | |||||
<option name="manufacturer" value="Samsung" /> | |||||
<option name="name" value="Galaxy S24" /> | |||||
<option name="screenDensity" value="480" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2340" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="33" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="felix" /> | |||||
<option name="id" value="felix" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel Fold" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="2208" /> | |||||
<option name="screenY" value="1840" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="felix" /> | |||||
<option name="id" value="felix" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel Fold" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="2208" /> | |||||
<option name="screenY" value="1840" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="33" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="felix_camera" /> | |||||
<option name="id" value="felix_camera" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel Fold (Camera-enabled)" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="2208" /> | |||||
<option name="screenY" value="1840" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="33" /> | |||||
<option name="brand" value="samsung" /> | |||||
<option name="codename" value="gts8uwifi" /> | |||||
<option name="id" value="gts8uwifi" /> | |||||
<option name="manufacturer" value="Samsung" /> | |||||
<option name="name" value="Galaxy Tab S8 Ultra" /> | |||||
<option name="screenDensity" value="320" /> | |||||
<option name="screenX" value="1848" /> | |||||
<option name="screenY" value="2960" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="husky" /> | |||||
<option name="id" value="husky" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 8 Pro" /> | |||||
<option name="screenDensity" value="390" /> | |||||
<option name="screenX" value="1008" /> | |||||
<option name="screenY" value="2244" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="30" /> | |||||
<option name="brand" value="motorola" /> | |||||
<option name="codename" value="java" /> | |||||
<option name="id" value="java" /> | |||||
<option name="manufacturer" value="Motorola" /> | |||||
<option name="name" value="G20" /> | |||||
<option name="screenDensity" value="280" /> | |||||
<option name="screenX" value="720" /> | |||||
<option name="screenY" value="1600" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="komodo" /> | |||||
<option name="id" value="komodo" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 9 Pro XL" /> | |||||
<option name="screenDensity" value="360" /> | |||||
<option name="screenX" value="1008" /> | |||||
<option name="screenY" value="2244" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="33" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="lynx" /> | |||||
<option name="id" value="lynx" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 7a" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2400" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="31" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="oriole" /> | |||||
<option name="id" value="oriole" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 6" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2400" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="33" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="panther" /> | |||||
<option name="id" value="panther" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 7" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2400" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="samsung" /> | |||||
<option name="codename" value="q5q" /> | |||||
<option name="id" value="q5q" /> | |||||
<option name="manufacturer" value="Samsung" /> | |||||
<option name="name" value="Galaxy Z Fold5" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1812" /> | |||||
<option name="screenY" value="2176" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="samsung" /> | |||||
<option name="codename" value="q6q" /> | |||||
<option name="id" value="q6q" /> | |||||
<option name="manufacturer" value="Samsung" /> | |||||
<option name="name" value="SM-F956B" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1856" /> | |||||
<option name="screenY" value="2160" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="30" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="r11" /> | |||||
<option name="id" value="r11" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel Watch" /> | |||||
<option name="screenDensity" value="320" /> | |||||
<option name="screenX" value="384" /> | |||||
<option name="screenY" value="384" /> | |||||
<option name="type" value="WEAR_OS" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="30" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="redfin" /> | |||||
<option name="id" value="redfin" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 5" /> | |||||
<option name="screenDensity" value="440" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2340" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="shiba" /> | |||||
<option name="id" value="shiba" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 8" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2400" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="33" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="tangorpro" /> | |||||
<option name="id" value="tangorpro" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel Tablet" /> | |||||
<option name="screenDensity" value="320" /> | |||||
<option name="screenX" value="1600" /> | |||||
<option name="screenY" value="2560" /> | |||||
</PersistentDeviceSelectionData> | |||||
<PersistentDeviceSelectionData> | |||||
<option name="api" value="34" /> | |||||
<option name="brand" value="google" /> | |||||
<option name="codename" value="tokay" /> | |||||
<option name="id" value="tokay" /> | |||||
<option name="manufacturer" value="Google" /> | |||||
<option name="name" value="Pixel 9" /> | |||||
<option name="screenDensity" value="420" /> | |||||
<option name="screenX" value="1080" /> | |||||
<option name="screenY" value="2424" /> | |||||
</PersistentDeviceSelectionData> | |||||
</list> | |||||
</option> | |||||
</component> | |||||
</project> |
@@ -1055,18 +1055,6 @@ public class ConfigData { | |||||
plcaddresses.addAll(ConfigName.getInstance().PlcAddress_Rack); | plcaddresses.addAll(ConfigName.getInstance().PlcAddress_Rack); | ||||
plcaddresses.addAll(ConfigName.getInstance().PlcAddress_Robot); | plcaddresses.addAll(ConfigName.getInstance().PlcAddress_Robot); | ||||
List<ProcessT> processTS = ConfigName.getInstance().Process_800炒锅; | List<ProcessT> processTS = ConfigName.getInstance().Process_800炒锅; | ||||
List<ProcessT> processTS2 = ConfigName.getInstance().Process_烤箱; | |||||
// if (ConfigName.getInstance().versionSelectionEnum.equals("大炒版本")) { | |||||
// plcaddresses = ConfigName.getInstance().PlcAddress_大炒; | |||||
// processTS = ConfigName.getInstance().Process_大炒; | |||||
// } else if (ConfigName.getInstance().versionSelectionEnum.equals("大炒自动投料版本")) { | |||||
// plcaddresses = ConfigName.getInstance().PlcAddress_大炒自动投料; | |||||
// processTS = ConfigName.getInstance().Process_大炒自动投料; | |||||
// } else if (ConfigName.getInstance().versionSelectionEnum.equals("小炒版本")) { | |||||
// plcaddresses = ConfigName.getInstance().PlcAddress_小炒; | |||||
// processTS = ConfigName.getInstance().Process_小炒; | |||||
// } | |||||
//region 恢复PLC | //region 恢复PLC | ||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_PLCADDRESS.class,null); | DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_PLCADDRESS.class,null); | ||||
@@ -1103,32 +1091,16 @@ public class ConfigData { | |||||
processModel.name = item; | processModel.name = item; | ||||
processModel.sort = chidindex; | processModel.sort = chidindex; | ||||
processModel.data = ConfigName.getInstance().GetProcessTypeVal(item); | processModel.data = ConfigName.getInstance().GetProcessTypeVal(item); | ||||
processModel.datatype = ((item.contains("名称") ? 1 : (processModel.data.isEmpty() ? 0 : 2))); | |||||
if(item.contains("名称")||item.contains("描述")||item.contains("重量")||item.contains("温度")){ | |||||
processModel.datatype = 1; | |||||
}else { | |||||
processModel.datatype = (processModel.data.isEmpty() ? 0 : 2); | |||||
} | |||||
QueryDB.AddProcessModel(processModel); | QueryDB.AddProcessModel(processModel); | ||||
chidindex++; | chidindex++; | ||||
} | } | ||||
index++; | index++; | ||||
} | } | ||||
for (ProcessT key : processTS2) { | |||||
List<String> values = key.val; | |||||
BPA_PROCESS process = new BPA_PROCESS(); | |||||
process.sort = index; | |||||
process.name = key.name; | |||||
process.type = 1; | |||||
QueryDB.AddProcess(process);//增加模型 | |||||
int chidindex = 1; | |||||
for (String item : values)//模型 | |||||
{ | |||||
BPA_PROCESSModel processModel = new BPA_PROCESSModel(); | |||||
processModel.processid = process.id; | |||||
processModel.name = item; | |||||
processModel.sort = chidindex; | |||||
processModel.data = ConfigName.getInstance().GetProcessTypeVal(item); | |||||
processModel.datatype = ((item.contains("名称") ? 1 : (processModel.data.isEmpty() ? 0 : 2))); | |||||
QueryDB.AddProcessModel(processModel); | |||||
chidindex++; | |||||
} | |||||
} | |||||
} catch (Exception ex) { | } catch (Exception ex) { | ||||
@@ -143,7 +143,6 @@ public class ExecuteTheRecipe { | |||||
}else if(orderDetail.type==2){ | }else if(orderDetail.type==2){ | ||||
Wok2ModbusTcpServer.get().WriteBool("M52.0", (boolean) false, null); | Wok2ModbusTcpServer.get().WriteBool("M52.0", (boolean) false, null); | ||||
} | } | ||||
ConfigName.getInstance().IsOpenHuoLi = false; | |||||
long endTime = System.currentTimeMillis(); //结束时间 | long endTime = System.currentTimeMillis(); //结束时间 | ||||
int time = (int) ((endTime - startTime) / 1000); | int time = (int) ((endTime - startTime) / 1000); | ||||
Log.e("运行时长", String.format("方法使用时间 %d s", time)); | Log.e("运行时长", String.format("方法使用时间 %d s", time)); | ||||
@@ -647,11 +646,30 @@ public class ExecuteTheRecipe { | |||||
LogUtils.d(TAG+" BottomClick1 name="+name); | LogUtils.d(TAG+" BottomClick1 name="+name); | ||||
try { | try { | ||||
Log.e("按钮按下", name); | Log.e("按钮按下", name); | ||||
WritePLC(deviceNum,name, true, null); | |||||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-BottomClick1-"+name+":true"); | |||||
WritePLC(deviceNum, name, true, new IWriteCallBack() { | |||||
@Override | |||||
public void onSuccess() { | |||||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-BottomClick1-"+name+":true onSuccess"); | |||||
} | |||||
@Override | |||||
public void onFailure(String ErrorMsg) { | |||||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-BottomClick1-"+name+":true onFailure"); | |||||
} | |||||
}); | |||||
Thread.sleep(800); | Thread.sleep(800); | ||||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-BottomClick1-"+name+":false"); | |||||
WritePLC(deviceNum,name, false, null); | |||||
WritePLC(deviceNum, name, false, new IWriteCallBack() { | |||||
@Override | |||||
public void onSuccess() { | |||||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-BottomClick1-"+name+":false onSuccess"); | |||||
} | |||||
@Override | |||||
public void onFailure(String ErrorMsg) { | |||||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-BottomClick1-"+name+":false onFailure"); | |||||
} | |||||
}); | |||||
Log.e("按钮复位", name); | Log.e("按钮复位", name); | ||||
} catch (Exception ex) { | } catch (Exception ex) { | ||||
Log.e("按钮异常", name + ex.getMessage()); | Log.e("按钮异常", name + ex.getMessage()); | ||||
@@ -682,10 +700,8 @@ public class ExecuteTheRecipe { | |||||
public void onSuccess() { | public void onSuccess() { | ||||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-档位-"+finalWriteValue+":成功"); | RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-档位-"+finalWriteValue+":成功"); | ||||
if (finalWriteValue == 0) { | if (finalWriteValue == 0) { | ||||
ConfigName.getInstance().IsOpenHuoLi = false; | |||||
WritePLC(deviceNum,"加热", false, null); | WritePLC(deviceNum,"加热", false, null); | ||||
} else { | } else { | ||||
ConfigName.getInstance().IsOpenHuoLi = true; | |||||
WritePLC(deviceNum,"加热", true, null); | WritePLC(deviceNum,"加热", true, null); | ||||
} | } | ||||
} | } | ||||
@@ -695,10 +711,8 @@ public class ExecuteTheRecipe { | |||||
RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-档位-"+finalWriteValue+":失败"); | RecordManager.getInstance().addLogRecord("订单处理日志",deviceNum+"号炒锅("+deviceNum+")-档位-"+finalWriteValue+":失败"); | ||||
WritePLC(deviceNum,key, finalWriteValue, null); | WritePLC(deviceNum,key, finalWriteValue, null); | ||||
if (finalWriteValue == 0) { | if (finalWriteValue == 0) { | ||||
ConfigName.getInstance().IsOpenHuoLi = false; | |||||
WritePLC(deviceNum,"加热", false, null); | WritePLC(deviceNum,"加热", false, null); | ||||
} else { | } else { | ||||
ConfigName.getInstance().IsOpenHuoLi = true; | |||||
WritePLC(deviceNum,"加热", true, null); | WritePLC(deviceNum,"加热", true, null); | ||||
} | } | ||||
} | } | ||||
@@ -1133,6 +1147,7 @@ public class ExecuteTheRecipe { | |||||
if (isJre && ConfigName.getInstance().WhetherManualFeedingSuspended.contains("是")) { | if (isJre && ConfigName.getInstance().WhetherManualFeedingSuspended.contains("是")) { | ||||
WritePLC(deviceNum,"加热", true, null); | WritePLC(deviceNum,"加热", true, null); | ||||
}//再次释放加热 | }//再次释放加热 | ||||
Make位置(deviceNum,czwz); | Make位置(deviceNum,czwz); | ||||
@@ -1162,7 +1177,9 @@ public class ExecuteTheRecipe { | |||||
ThreadDelay(deviceNum,val,"Write_PLC_MainOutdishes"); | ThreadDelay(deviceNum,val,"Write_PLC_MainOutdishes"); | ||||
} | } | ||||
} | } | ||||
WritePLC(deviceNum,"加热", false, null); | WritePLC(deviceNum,"加热", false, null); | ||||
showlog("关闭搅拌、关闭加热!"); | showlog("关闭搅拌、关闭加热!"); | ||||
if(!ConfigName.getInstance().versionSelectionEnum.equals(SceneSetFragment.deviceName4)){ | if(!ConfigName.getInstance().versionSelectionEnum.equals(SceneSetFragment.deviceName4)){ | ||||
ThreadWhileFalse(deviceNum,"输送线进料菜盆检测"); | ThreadWhileFalse(deviceNum,"输送线进料菜盆检测"); | ||||
@@ -1419,11 +1436,14 @@ public class ExecuteTheRecipe { | |||||
WritePLC(deviceNum,"加热功率", data, new IWriteCallBack() { | WritePLC(deviceNum,"加热功率", data, new IWriteCallBack() { | ||||
@Override | @Override | ||||
public void onSuccess() { | public void onSuccess() { | ||||
if(deviceNum==1){ | |||||
ConfigName.getInstance().fireNum1 = data+""; | |||||
}else if(deviceNum==2){ | |||||
ConfigName.getInstance().fireNum2 = data+""; | |||||
} | |||||
if (data == 0) { | if (data == 0) { | ||||
ConfigName.getInstance().IsOpenHuoLi = false; | |||||
WritePLC(deviceNum,"加热", false, null); | WritePLC(deviceNum,"加热", false, null); | ||||
} else { | } else { | ||||
ConfigName.getInstance().IsOpenHuoLi = true; | |||||
WritePLC(deviceNum,"加热", true, null); | WritePLC(deviceNum,"加热", true, null); | ||||
} | } | ||||
} | } | ||||
@@ -175,11 +175,11 @@ public class MainInit { | |||||
// DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SILOS.class,null); | // DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SILOS.class,null); | ||||
// DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SILOSANDMATERIAL.class,null); | // DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SILOSANDMATERIAL.class,null); | ||||
if(ConfigName.TEST){ | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SILOS.class,null); | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_MATERIAL.class,null); | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SILOSANDMATERIAL.class,null); | |||||
} | |||||
// if(ConfigName.TEST){ | |||||
// DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SILOS.class,null); | |||||
// DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_MATERIAL.class,null); | |||||
// DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_SILOSANDMATERIAL.class,null); | |||||
// } | |||||
//4个料仓 | //4个料仓 | ||||
if (QueryDB.GetSilosALL().isEmpty()) { | if (QueryDB.GetSilosALL().isEmpty()) { | ||||
for (int i = 0; i < 4; i++) { | for (int i = 0; i < 4; i++) { | ||||
@@ -33,7 +33,7 @@ import java.util.concurrent.ConcurrentHashMap; | |||||
*/ | */ | ||||
public class ConfigName { | public class ConfigName { | ||||
//是否是测试模式 | //是否是测试模式 | ||||
public final static boolean TEST = false; | |||||
public final static boolean TEST = true; | |||||
//崩溃重启 | //崩溃重启 | ||||
public final static boolean ERROR_ROOT = false; | public final static boolean ERROR_ROOT = false; | ||||
//日志打印 | //日志打印 | ||||
@@ -110,7 +110,8 @@ public class ConfigName { | |||||
/** | /** | ||||
* 火力 | * 火力 | ||||
*/ | */ | ||||
public String fireNum = ""; | |||||
public String fireNum1 = ""; | |||||
public String fireNum2 = ""; | |||||
/** | /** | ||||
* 翻炒速度 | * 翻炒速度 | ||||
*/ | */ | ||||
@@ -764,16 +765,17 @@ public class ConfigName { | |||||
* 炒锅工序模型 | * 炒锅工序模型 | ||||
*/ | */ | ||||
public List<ProcessT> Process_800炒锅 = new ArrayList<ProcessT>() {{ | public List<ProcessT> Process_800炒锅 = new ArrayList<ProcessT>() {{ | ||||
add(new ProcessT("搅拌", Arrays.asList("搅拌速度", "延迟(秒)"))); | |||||
add(new ProcessT("位置", Arrays.asList("转动速度", "位置动作", "延迟(秒)"))); | |||||
add(new ProcessT("加热", Arrays.asList("加热功率", "延迟(秒)"))); | |||||
add(new ProcessT("主料", Arrays.asList("主料名称", "主料位置", "炒制位置","烹饪(秒)"))); | |||||
add(new ProcessT("辅料", Arrays.asList("辅料名称", "辅料位置","炒制位置","烹饪(秒)"))); | |||||
add(new ProcessT("搅拌", Arrays.asList("搅拌速度", "延迟(秒)","描述"))); | |||||
add(new ProcessT("位置", Arrays.asList("转动速度", "位置动作", "延迟(秒)","描述"))); | |||||
add(new ProcessT("加热", Arrays.asList("加热功率", "延迟(秒)","温度","功率","描述"))); | |||||
add(new ProcessT("主料", Arrays.asList("主料名称", "主料位置", "炒制位置","烹饪(秒)","重量","温度","描述1","描述2","描述3"))); | |||||
add(new ProcessT("辅料", Arrays.asList("辅料名称", "辅料位置","炒制位置","烹饪(秒)","重量","温度","描述1","描述2","描述3" | |||||
,"描述4","描述5","描述6","描述7","描述8","描述9","描述10","描述11","描述12"))); | |||||
add(new ProcessT("液体料", new ArrayList<>())); | add(new ProcessT("液体料", new ArrayList<>())); | ||||
add(new ProcessT("并行出料", Arrays.asList("出料克数","等待(秒)"))); | |||||
add(new ProcessT("延迟", Arrays.asList("延迟(秒)"))); | |||||
add(new ProcessT("出菜", Arrays.asList("等待(秒)"))); | |||||
add(new ProcessT("清洗", Arrays.asList("清洗方式","抽水量(g)","清洗时间(秒)","等待(秒)"))); | |||||
add(new ProcessT("并行出料", Arrays.asList("出料克数","等待(秒)","描述"))); | |||||
add(new ProcessT("延迟", Arrays.asList("延迟(秒)","描述"))); | |||||
add(new ProcessT("出菜", Arrays.asList("等待(秒)","描述"))); | |||||
add(new ProcessT("清洗", Arrays.asList("清洗方式","抽水量(g)","清洗时间(秒)","等待(秒)","描述"))); | |||||
}}; | }}; | ||||
/** | /** | ||||
* 烤箱工序模型 | * 烤箱工序模型 | ||||
@@ -940,10 +942,7 @@ public class ConfigName { | |||||
* 最大温度:默认温度 | * 最大温度:默认温度 | ||||
*/ | */ | ||||
public int MaxTemp=200; | public int MaxTemp=200; | ||||
/** | |||||
* 是否打开火力 | |||||
*/ | |||||
public boolean IsOpenHuoLi=false; | |||||
//endregion | //endregion | ||||
/** | /** | ||||
* 炒锅状态上报信息 | * 炒锅状态上报信息 | ||||
@@ -74,8 +74,8 @@ public class GoodsProcessDetailDBUtil { | |||||
* | * | ||||
* @param data | * @param data | ||||
*/ | */ | ||||
public static void update(BPA_GOODS_PROCESS_DETAIL data) { | |||||
QueryDB.Update(BPA_GOODS_PROCESS_DETAIL.class, data); | |||||
public static boolean update(BPA_GOODS_PROCESS_DETAIL data) { | |||||
return QueryDB.Update(BPA_GOODS_PROCESS_DETAIL.class, data); | |||||
} | } | ||||
/** | /** | ||||
@@ -518,9 +518,14 @@ public class DiyProcessHActivity extends BaseActivity { | |||||
NewToastUtil.getInstance().showToast("修改失败,选中步骤名称不相同!"); | NewToastUtil.getInstance().showToast("修改失败,选中步骤名称不相同!"); | ||||
return; | return; | ||||
} | } | ||||
processDetails.set(index_update, getSelectItemFromValue()); | |||||
BPA_GOODS_PROCESS_DETAIL detail = getSelectItemFromValue(); | |||||
if(detail != null){ | |||||
NewToastUtil.getInstance().showToast("修改步骤[" + (index_update + 1) + ":" + obj_update.processname + "]成功!"); | |||||
processDetails.set(index_update, getSelectItemFromValue()); | |||||
} | |||||
stepAdapter.notifyDataSetChanged(); | stepAdapter.notifyDataSetChanged(); | ||||
NewToastUtil.getInstance().showToast("修改步骤[" + (index_update + 1) + ":" + obj_update.processname + "]成功!"); | |||||
} else { | } else { | ||||
NewToastUtil.getInstance().showToast("请先选择步骤!"); | NewToastUtil.getInstance().showToast("请先选择步骤!"); | ||||
} | } | ||||
@@ -582,13 +587,13 @@ public class DiyProcessHActivity extends BaseActivity { | |||||
ProcessValueView viw = (ProcessValueView) viewBinding.llProcessValue.getChildAt(i); | ProcessValueView viw = (ProcessValueView) viewBinding.llProcessValue.getChildAt(i); | ||||
String values = viw.GetValues(); | String values = viw.GetValues(); | ||||
LogUtils.d("getSelectItemFromValue values="+values); | LogUtils.d("getSelectItemFromValue values="+values); | ||||
if (values.isEmpty()) { | |||||
IsVerify = false; | |||||
description.append(viw.model.name).append("不能为空"); | |||||
} else { | |||||
// if (values.isEmpty()) { | |||||
// IsVerify = false; | |||||
// description.append(viw.model.name).append("不能为空"); | |||||
// } else { | |||||
data.append(viw.model.name).append(",").append(values).append("|"); | data.append(viw.model.name).append(",").append(values).append("|"); | ||||
desc.append(values).append(","); | desc.append(values).append(","); | ||||
} | |||||
// } | |||||
} | } | ||||
} | } | ||||
if (IsVerify) { | if (IsVerify) { | ||||
@@ -53,10 +53,8 @@ public class ClassifySpinnerAdapter extends BaseAdapter { | |||||
} | } | ||||
TextView textView = convertView.findViewById(R.id.textViewCustom); | TextView textView = convertView.findViewById(R.id.textViewCustom); | ||||
textView.setText(getItem(position)); | textView.setText(getItem(position)); | ||||
if(!ConfigName.getInstance().versionSelectionEnum.equals(SceneSetFragment.deviceName4)){ | |||||
if(textView.getWidth()==0){ | |||||
DisplayManager.scaleViewGroup(convertView.findViewById(R.id.root)); | |||||
} | |||||
if(textView.getWidth()==0){ | |||||
DisplayManager.scaleViewGroup(convertView.findViewById(R.id.root)); | |||||
} | } | ||||
return convertView; | return convertView; | ||||
} | } | ||||
@@ -0,0 +1,67 @@ | |||||
package com.bonait.bnframework.newui.adapter.other; | |||||
import android.annotation.SuppressLint; | |||||
import android.view.LayoutInflater; | |||||
import android.view.View; | |||||
import android.view.ViewGroup; | |||||
import androidx.annotation.NonNull; | |||||
import androidx.recyclerview.widget.RecyclerView; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | |||||
import com.bonait.bnframework.common.utils.DisplayManager; | |||||
import com.bonait.bnframework.databinding.ItemFoodSelectBinding; | |||||
import com.bonait.bnframework.databinding.ItemStepBinding; | |||||
import com.bonait.bnframework.newui.adapter.base.BaseAdapter; | |||||
/** | |||||
* @author: liup | |||||
* @description: 主料 辅料名称列表 | |||||
* @date: 2024/5/8 15:36. | |||||
*/ | |||||
public abstract class FoodPosSelectAdapter extends BaseAdapter<BPA_GOODS_PROCESS_DETAIL, FoodPosSelectAdapter.ViewHolder> { | |||||
@NonNull | |||||
@Override | |||||
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { | |||||
return new ViewHolder(ItemFoodSelectBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false)); | |||||
} | |||||
@Override | |||||
public void onBindViewHolder(@NonNull ViewHolder holder, @SuppressLint("RecyclerView") int position) { | |||||
try { | |||||
if(holder.binding.getRoot().getWidth()==0){ | |||||
DisplayManager.scaleViewGroup(holder.binding.getRoot()); | |||||
} | |||||
String value = mData.get(position).processvalue; | |||||
String[] res = value.split("\\|"); | |||||
for (String s:res) { | |||||
if (s.contains("辅料名称")||s.contains("主料名称")) { | |||||
String[] res2 = s.split(","); | |||||
holder.binding.name.setText(res2[1]); | |||||
} | |||||
} | |||||
holder.binding.name.setOnClickListener(v->{ | |||||
onItemClick(v,position); | |||||
}); | |||||
} catch (Exception e) { | |||||
e.printStackTrace(); | |||||
} | |||||
} | |||||
public static class ViewHolder extends RecyclerView.ViewHolder { | |||||
private ItemFoodSelectBinding binding; | |||||
public ViewHolder(ItemFoodSelectBinding view) { | |||||
super(view.getRoot()); | |||||
binding = view; | |||||
} | |||||
} | |||||
} | |||||
@@ -18,13 +18,19 @@ import androidx.fragment.app.DialogFragment; | |||||
import com.apkfuns.logutils.LogUtils; | import com.apkfuns.logutils.LogUtils; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | ||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | ||||
import com.bonait.bnframework.common.db.util.GoodsProcessDetailDBUtil; | import com.bonait.bnframework.common.db.util.GoodsProcessDetailDBUtil; | ||||
import com.bonait.bnframework.common.db.util.OrderDetailUtil; | import com.bonait.bnframework.common.db.util.OrderDetailUtil; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||||
import com.bonait.bnframework.common.utils.AdbCommandUtil; | import com.bonait.bnframework.common.utils.AdbCommandUtil; | ||||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import com.bonait.bnframework.databinding.DialogFoodInfoBinding; | import com.bonait.bnframework.databinding.DialogFoodInfoBinding; | ||||
import com.bonait.bnframework.databinding.DialogFoodPosSelectBinding; | |||||
import com.bonait.bnframework.newui.adapter.other.FoodPosSelectAdapter; | |||||
import com.bonait.bnframework.newui.fragment.setting.SceneSetFragment; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Arrays; | import java.util.Arrays; | ||||
@@ -100,6 +106,23 @@ public class FoodInfoDialog extends DialogFragment { | |||||
viewBinding.btnClose1.setOnClickListener(v->{ | viewBinding.btnClose1.setOnClickListener(v->{ | ||||
dismiss(); | dismiss(); | ||||
}); | }); | ||||
freshView(); | |||||
initClick(); | |||||
} | |||||
private void freshView(){ | |||||
viewBinding.top1.setText(""); | |||||
viewBinding.top2.setText(""); | |||||
viewBinding.top3.setText(""); | |||||
viewBinding.top4.setText(""); | |||||
viewBinding.top5.setText(""); | |||||
viewBinding.top6.setText(""); | |||||
viewBinding.right1.setText(""); | |||||
viewBinding.right2.setText(""); | |||||
viewBinding.right3.setText(""); | |||||
viewBinding.right4.setText(""); | |||||
viewBinding.right5.setText(""); | |||||
viewBinding.right6.setText(""); | |||||
BPA_ORDER_DETAIL order = OrderDetailUtil.getById(orderId); | BPA_ORDER_DETAIL order = OrderDetailUtil.getById(orderId); | ||||
if(order==null){ | if(order==null){ | ||||
dismiss(); | dismiss(); | ||||
@@ -222,4 +245,133 @@ public class FoodInfoDialog extends DialogFragment { | |||||
break; | break; | ||||
} | } | ||||
} | } | ||||
private void initClick(){ | |||||
viewBinding.top1.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F1"); | |||||
}); | |||||
viewBinding.top2.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F2"); | |||||
}); | |||||
viewBinding.top3.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F3"); | |||||
}); | |||||
viewBinding.top4.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F4"); | |||||
}); | |||||
viewBinding.top5.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F5"); | |||||
}); | |||||
if(!ConfigName.getInstance().versionSelectionEnum.equals(SceneSetFragment.deviceName4)){ | |||||
viewBinding.top6.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F6"); | |||||
}); | |||||
}else { | |||||
viewBinding.top6.setVisibility(View.GONE); | |||||
} | |||||
viewBinding.right1.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z1"); | |||||
}); | |||||
viewBinding.right2.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z2"); | |||||
}); | |||||
viewBinding.right3.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z3"); | |||||
}); | |||||
viewBinding.right4.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z4"); | |||||
}); | |||||
viewBinding.right5.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z5"); | |||||
}); | |||||
viewBinding.right6.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z6"); | |||||
}); | |||||
} | |||||
private void showDialog(String name,String positionName){ | |||||
AlertDialogUtils.showCancelAndConfirmDialog(getActivity(), R.layout.dialog_food_pos_select, (layoutView, xCom) -> { | |||||
DialogFoodPosSelectBinding binding = DialogFoodPosSelectBinding.bind(layoutView); | |||||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||||
binding.title.setText(name+" "+positionName); | |||||
binding.btnClose.setOnClickListener(v->{ | |||||
xCom.dismissX(); | |||||
}); | |||||
BPA_ORDER_DETAIL order = OrderDetailUtil.getById(orderId); | |||||
if(order==null){ | |||||
dismiss(); | |||||
return; | |||||
} | |||||
List<BPA_GOODS_PROCESS_DETAIL> data1 = new ArrayList<>(); | |||||
List<BPA_GOODS_PROCESS_DETAIL> details = GoodsProcessDetailDBUtil.getByGroupId(order.groupId); | |||||
for(BPA_GOODS_PROCESS_DETAIL detail:details){ | |||||
if(name.contains("主料")){ | |||||
if(detail.processname.equals("主料")){ | |||||
data1.add(detail); | |||||
} | |||||
}else if(name.contains("辅料")){ | |||||
if(detail.processname.equals("辅料")){ | |||||
data1.add(detail); | |||||
} | |||||
} | |||||
} | |||||
FoodPosSelectAdapter adapter = new FoodPosSelectAdapter() { | |||||
@Override | |||||
protected void onItemClick(View v, int position) { | |||||
BPA_GOODS_PROCESS_DETAIL detail = data1.get(position); | |||||
String value = detail.processvalue; | |||||
String[] res = value.split("\\|"); | |||||
String posInfo = ""; | |||||
String[] res2 = new String[0]; | |||||
for (String s:res){ | |||||
if(name.contains("主料")){ | |||||
if(s.contains("主料位置")){ | |||||
posInfo = s; | |||||
res2 = s.split(","); | |||||
} | |||||
}else if(name.contains("辅料")){ | |||||
if(s.contains("辅料位置")){ | |||||
posInfo = s; | |||||
res2 = s.split(","); | |||||
} | |||||
} | |||||
} | |||||
if(posInfo.isEmpty()||res2.length==0){ | |||||
return; | |||||
} | |||||
if(name.contains("主料")){ | |||||
detail.processvalue = detail.processvalue.replace(posInfo,"主料位置,"+positionName); | |||||
detail.processms = detail.processms.replace(res2[1],positionName); | |||||
}else if(name.contains("辅料")){ | |||||
detail.processvalue = detail.processvalue.replace(posInfo,"辅料位置,"+positionName); | |||||
detail.processms = detail.processms.replace(res2[1],positionName); | |||||
} | |||||
if(GoodsProcessDetailDBUtil.update(detail)){ | |||||
freshView(); | |||||
xCom.dismissX(); | |||||
} | |||||
} | |||||
}; | |||||
adapter.setNewData(data1); | |||||
binding.recycleView.setAdapter(adapter); | |||||
}); | |||||
} | |||||
private MyClickListener listener; | |||||
public void setListener(MyClickListener listener) { | |||||
this.listener = listener; | |||||
} | |||||
@Override | |||||
public void dismiss() { | |||||
if(listener!=null){ | |||||
listener.clickListener(null,null); | |||||
} | |||||
super.dismiss(); | |||||
} | |||||
} | } |
@@ -18,14 +18,21 @@ import androidx.fragment.app.DialogFragment; | |||||
import com.apkfuns.logutils.LogUtils; | import com.apkfuns.logutils.LogUtils; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | ||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | ||||
import com.bonait.bnframework.common.db.util.GoodsProcessDetailDBUtil; | import com.bonait.bnframework.common.db.util.GoodsProcessDetailDBUtil; | ||||
import com.bonait.bnframework.common.db.util.OrderDetailUtil; | import com.bonait.bnframework.common.db.util.OrderDetailUtil; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||||
import com.bonait.bnframework.common.utils.AdbCommandUtil; | import com.bonait.bnframework.common.utils.AdbCommandUtil; | ||||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import com.bonait.bnframework.databinding.DialogFoodInfo2Binding; | import com.bonait.bnframework.databinding.DialogFoodInfo2Binding; | ||||
import com.bonait.bnframework.databinding.DialogFoodInfoBinding; | import com.bonait.bnframework.databinding.DialogFoodInfoBinding; | ||||
import com.bonait.bnframework.databinding.DialogFoodPosSelectBinding; | |||||
import com.bonait.bnframework.newui.adapter.other.FoodPosSelectAdapter; | |||||
import com.bonait.bnframework.newui.fragment.setting.SceneSetFragment; | |||||
import com.bonait.bnframework.newui.widget.XComDialog; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Arrays; | import java.util.Arrays; | ||||
@@ -101,6 +108,11 @@ public class FoodInfoDialog2 extends DialogFragment { | |||||
viewBinding.btnClose1.setOnClickListener(v->{ | viewBinding.btnClose1.setOnClickListener(v->{ | ||||
dismiss(); | dismiss(); | ||||
}); | }); | ||||
freshView(); | |||||
initClick(); | |||||
} | |||||
private void freshView(){ | |||||
BPA_ORDER_DETAIL order = OrderDetailUtil.getById(orderId); | BPA_ORDER_DETAIL order = OrderDetailUtil.getById(orderId); | ||||
if(order==null){ | if(order==null){ | ||||
dismiss(); | dismiss(); | ||||
@@ -223,4 +235,134 @@ public class FoodInfoDialog2 extends DialogFragment { | |||||
break; | break; | ||||
} | } | ||||
} | } | ||||
private void initClick(){ | |||||
viewBinding.top1.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F1"); | |||||
}); | |||||
viewBinding.top2.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F2"); | |||||
}); | |||||
viewBinding.top3.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F3"); | |||||
}); | |||||
viewBinding.top4.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F4"); | |||||
}); | |||||
viewBinding.top5.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F5"); | |||||
}); | |||||
if(!ConfigName.getInstance().versionSelectionEnum.equals(SceneSetFragment.deviceName4)){ | |||||
viewBinding.top6.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F6"); | |||||
}); | |||||
}else { | |||||
viewBinding.top6.setVisibility(View.GONE); | |||||
} | |||||
viewBinding.right1.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z1"); | |||||
}); | |||||
viewBinding.right2.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z2"); | |||||
}); | |||||
viewBinding.right3.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z3"); | |||||
}); | |||||
viewBinding.right4.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z4"); | |||||
}); | |||||
viewBinding.right5.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z5"); | |||||
}); | |||||
viewBinding.right6.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z6"); | |||||
}); | |||||
} | |||||
private void showDialog(String name,String positionName){ | |||||
AlertDialogUtils.showCancelAndConfirmDialog(getActivity(), R.layout.dialog_food_pos_select, (layoutView, xCom) -> { | |||||
DialogFoodPosSelectBinding binding = DialogFoodPosSelectBinding.bind(layoutView); | |||||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||||
binding.title.setText(name+" "+positionName); | |||||
binding.btnClose.setOnClickListener(v->{ | |||||
xCom.dismissX(); | |||||
}); | |||||
BPA_ORDER_DETAIL order = OrderDetailUtil.getById(orderId); | |||||
if(order==null){ | |||||
dismiss(); | |||||
return; | |||||
} | |||||
List<BPA_GOODS_PROCESS_DETAIL> data1 = new ArrayList<>(); | |||||
List<BPA_GOODS_PROCESS_DETAIL> details = GoodsProcessDetailDBUtil.getByGroupId(order.groupId); | |||||
for(BPA_GOODS_PROCESS_DETAIL detail:details){ | |||||
if(name.contains("主料")){ | |||||
if(detail.processname.equals("主料")){ | |||||
data1.add(detail); | |||||
} | |||||
}else if(name.contains("辅料")){ | |||||
if(detail.processname.equals("辅料")){ | |||||
data1.add(detail); | |||||
} | |||||
} | |||||
} | |||||
FoodPosSelectAdapter adapter = new FoodPosSelectAdapter() { | |||||
@Override | |||||
protected void onItemClick(View v, int position) { | |||||
BPA_GOODS_PROCESS_DETAIL detail = data1.get(position); | |||||
String value = detail.processvalue; | |||||
String[] res = value.split("\\|"); | |||||
String posInfo = ""; | |||||
String[] res2 = new String[0]; | |||||
for (String s:res){ | |||||
if(name.contains("主料")){ | |||||
if(s.contains("主料位置")){ | |||||
posInfo = s; | |||||
res2 = s.split(","); | |||||
} | |||||
}else if(name.contains("辅料")){ | |||||
if(s.contains("辅料位置")){ | |||||
posInfo = s; | |||||
res2 = s.split(","); | |||||
} | |||||
} | |||||
} | |||||
if(posInfo.isEmpty()||res2.length==0){ | |||||
return; | |||||
} | |||||
if(name.contains("主料")){ | |||||
detail.processvalue = detail.processvalue.replace(posInfo,"主料位置,"+positionName); | |||||
detail.processms = detail.processms.replace(res2[1],positionName); | |||||
}else if(name.contains("辅料")){ | |||||
detail.processvalue = detail.processvalue.replace(posInfo,"辅料位置,"+positionName); | |||||
detail.processms = detail.processms.replace(res2[1],positionName); | |||||
} | |||||
if(GoodsProcessDetailDBUtil.update(detail)){ | |||||
freshView(); | |||||
xCom.dismissX(); | |||||
} | |||||
} | |||||
}; | |||||
adapter.setNewData(data1); | |||||
binding.recycleView.setAdapter(adapter); | |||||
}); | |||||
} | |||||
private MyClickListener listener; | |||||
public void setListener(MyClickListener listener) { | |||||
this.listener = listener; | |||||
} | |||||
@Override | |||||
public void dismiss() { | |||||
if(listener!=null){ | |||||
listener.clickListener(null,null); | |||||
} | |||||
super.dismiss(); | |||||
} | |||||
} | } |
@@ -18,14 +18,20 @@ import androidx.fragment.app.DialogFragment; | |||||
import com.apkfuns.logutils.LogUtils; | import com.apkfuns.logutils.LogUtils; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | ||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | import com.bonait.bnframework.common.db.mode.BPA_ORDER_DETAIL; | ||||
import com.bonait.bnframework.common.db.util.GoodsProcessDetailDBUtil; | import com.bonait.bnframework.common.db.util.GoodsProcessDetailDBUtil; | ||||
import com.bonait.bnframework.common.db.util.OrderDetailUtil; | import com.bonait.bnframework.common.db.util.OrderDetailUtil; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | |||||
import com.bonait.bnframework.common.utils.AdbCommandUtil; | import com.bonait.bnframework.common.utils.AdbCommandUtil; | ||||
import com.bonait.bnframework.common.utils.AlertDialogUtils; | |||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import com.bonait.bnframework.databinding.DialogFoodInfo3Binding; | import com.bonait.bnframework.databinding.DialogFoodInfo3Binding; | ||||
import com.bonait.bnframework.databinding.DialogFoodInfoBinding; | import com.bonait.bnframework.databinding.DialogFoodInfoBinding; | ||||
import com.bonait.bnframework.databinding.DialogFoodPosSelectBinding; | |||||
import com.bonait.bnframework.newui.adapter.other.FoodPosSelectAdapter; | |||||
import com.bonait.bnframework.newui.fragment.setting.SceneSetFragment; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Arrays; | import java.util.Arrays; | ||||
@@ -101,6 +107,11 @@ public class FoodInfoDialog3 extends DialogFragment { | |||||
viewBinding.btnClose1.setOnClickListener(v->{ | viewBinding.btnClose1.setOnClickListener(v->{ | ||||
dismiss(); | dismiss(); | ||||
}); | }); | ||||
freshView(); | |||||
initClick(); | |||||
} | |||||
private void freshView(){ | |||||
BPA_ORDER_DETAIL order = OrderDetailUtil.getById(orderId); | BPA_ORDER_DETAIL order = OrderDetailUtil.getById(orderId); | ||||
if(order==null){ | if(order==null){ | ||||
dismiss(); | dismiss(); | ||||
@@ -223,4 +234,133 @@ public class FoodInfoDialog3 extends DialogFragment { | |||||
break; | break; | ||||
} | } | ||||
} | } | ||||
private void initClick(){ | |||||
viewBinding.top1.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F1"); | |||||
}); | |||||
viewBinding.top2.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F2"); | |||||
}); | |||||
viewBinding.top3.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F3"); | |||||
}); | |||||
viewBinding.top4.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F4"); | |||||
}); | |||||
viewBinding.top5.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F5"); | |||||
}); | |||||
if(!ConfigName.getInstance().versionSelectionEnum.equals(SceneSetFragment.deviceName4)){ | |||||
viewBinding.top6.setOnClickListener(v->{ | |||||
showDialog("辅料位置","F6"); | |||||
}); | |||||
}else { | |||||
viewBinding.top6.setVisibility(View.GONE); | |||||
} | |||||
viewBinding.right1.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z1"); | |||||
}); | |||||
viewBinding.right2.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z2"); | |||||
}); | |||||
viewBinding.right3.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z3"); | |||||
}); | |||||
viewBinding.right4.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z4"); | |||||
}); | |||||
viewBinding.right5.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z5"); | |||||
}); | |||||
viewBinding.right6.setOnClickListener(v->{ | |||||
showDialog("主料位置","Z6"); | |||||
}); | |||||
} | |||||
private void showDialog(String name,String positionName){ | |||||
AlertDialogUtils.showCancelAndConfirmDialog(getActivity(), R.layout.dialog_food_pos_select, (layoutView, xCom) -> { | |||||
DialogFoodPosSelectBinding binding = DialogFoodPosSelectBinding.bind(layoutView); | |||||
DisplayManager.scaleViewGroup(binding.getRoot()); | |||||
binding.title.setText(name+" "+positionName); | |||||
binding.btnClose.setOnClickListener(v->{ | |||||
xCom.dismissX(); | |||||
}); | |||||
BPA_ORDER_DETAIL order = OrderDetailUtil.getById(orderId); | |||||
if(order==null){ | |||||
dismiss(); | |||||
return; | |||||
} | |||||
List<BPA_GOODS_PROCESS_DETAIL> data1 = new ArrayList<>(); | |||||
List<BPA_GOODS_PROCESS_DETAIL> details = GoodsProcessDetailDBUtil.getByGroupId(order.groupId); | |||||
for(BPA_GOODS_PROCESS_DETAIL detail:details){ | |||||
if(name.contains("主料")){ | |||||
if(detail.processname.equals("主料")){ | |||||
data1.add(detail); | |||||
} | |||||
}else if(name.contains("辅料")){ | |||||
if(detail.processname.equals("辅料")){ | |||||
data1.add(detail); | |||||
} | |||||
} | |||||
} | |||||
FoodPosSelectAdapter adapter = new FoodPosSelectAdapter() { | |||||
@Override | |||||
protected void onItemClick(View v, int position) { | |||||
BPA_GOODS_PROCESS_DETAIL detail = data1.get(position); | |||||
String value = detail.processvalue; | |||||
String[] res = value.split("\\|"); | |||||
String posInfo = ""; | |||||
String[] res2 = new String[0]; | |||||
for (String s:res){ | |||||
if(name.contains("主料")){ | |||||
if(s.contains("主料位置")){ | |||||
posInfo = s; | |||||
res2 = s.split(","); | |||||
} | |||||
}else if(name.contains("辅料")){ | |||||
if(s.contains("辅料位置")){ | |||||
posInfo = s; | |||||
res2 = s.split(","); | |||||
} | |||||
} | |||||
} | |||||
if(posInfo.isEmpty()||res2.length==0){ | |||||
return; | |||||
} | |||||
if(name.contains("主料")){ | |||||
detail.processvalue = detail.processvalue.replace(posInfo,"主料位置,"+positionName); | |||||
detail.processms = detail.processms.replace(res2[1],positionName); | |||||
}else if(name.contains("辅料")){ | |||||
detail.processvalue = detail.processvalue.replace(posInfo,"辅料位置,"+positionName); | |||||
detail.processms = detail.processms.replace(res2[1],positionName); | |||||
} | |||||
if(GoodsProcessDetailDBUtil.update(detail)){ | |||||
freshView(); | |||||
xCom.dismissX(); | |||||
} | |||||
} | |||||
}; | |||||
adapter.setNewData(data1); | |||||
binding.recycleView.setAdapter(adapter); | |||||
}); | |||||
} | |||||
private MyClickListener listener; | |||||
public void setListener(MyClickListener listener) { | |||||
this.listener = listener; | |||||
} | |||||
@Override | |||||
public void dismiss() { | |||||
if(listener!=null){ | |||||
listener.clickListener(null,null); | |||||
} | |||||
super.dismiss(); | |||||
} | |||||
} | } |
@@ -25,6 +25,7 @@ import com.bonait.bnframework.common.helper.I.MyClickListener; | |||||
import com.bonait.bnframework.common.utils.AdbCommandUtil; | import com.bonait.bnframework.common.utils.AdbCommandUtil; | ||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import com.bonait.bnframework.databinding.DialogFoodPosSetBinding; | import com.bonait.bnframework.databinding.DialogFoodPosSetBinding; | ||||
import com.bonait.bnframework.newui.fragment.setting.SceneSetFragment; | |||||
import com.bonait.bnframework.newui.widget.FoodPosSetView; | import com.bonait.bnframework.newui.widget.FoodPosSetView; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
@@ -111,6 +112,9 @@ public class FoodPosSetDialog extends DialogFragment { | |||||
break; | break; | ||||
default: | default: | ||||
viewBinding.layoutHuojia.getRoot().setVisibility(View.VISIBLE); | viewBinding.layoutHuojia.getRoot().setVisibility(View.VISIBLE); | ||||
if(ConfigName.getInstance().versionSelectionEnum.equals(SceneSetFragment.deviceName4)){ | |||||
viewBinding.layoutHuojia.top6.setText(""); | |||||
} | |||||
viewBinding.layoutHuojia2.getRoot().setVisibility(View.GONE); | viewBinding.layoutHuojia2.getRoot().setVisibility(View.GONE); | ||||
viewBinding.layoutHuojia3.getRoot().setVisibility(View.GONE); | viewBinding.layoutHuojia3.getRoot().setVisibility(View.GONE); | ||||
break; | break; | ||||
@@ -85,10 +85,11 @@ public class WokControlDialog extends DialogFragment { | |||||
} else { | } else { | ||||
viewBinding.tvWokWendu.setText("??°C"); | viewBinding.tvWokWendu.setText("??°C"); | ||||
} | } | ||||
freshFireNum(); | |||||
if(handler.hasMessages(1)){ | if(handler.hasMessages(1)){ | ||||
handler.removeMessages(1); | handler.removeMessages(1); | ||||
} | } | ||||
handler.sendEmptyMessageDelayed(1,200); | |||||
handler.sendEmptyMessageDelayed(1,500); | |||||
} | } | ||||
} | } | ||||
}; | }; | ||||
@@ -151,9 +152,28 @@ public class WokControlDialog extends DialogFragment { | |||||
viewBinding.tvSpeed.setText(ConfigName.getInstance().fanchaoSpeed); | viewBinding.tvSpeed.setText(ConfigName.getInstance().fanchaoSpeed); | ||||
} | } | ||||
viewBinding.fireControl.deviceNum = deviceNum; | viewBinding.fireControl.deviceNum = deviceNum; | ||||
if(!ConfigName.getInstance().fireNum.isEmpty()){ | |||||
viewBinding.fireControl.SetLevel(Integer.parseInt(ConfigName.getInstance().fireNum)); | |||||
freshFireNum(); | |||||
} | |||||
private void freshFireNum(){ | |||||
Object object = ModbusCenter.ReadPlc(deviceNum,"加热功率"); | |||||
Object oOpen = ModbusCenter.ReadPlc(deviceNum,"加热"); | |||||
if(oOpen instanceof Boolean){ | |||||
if((Boolean)oOpen){ | |||||
if(object instanceof Short){ | |||||
short num = (short) object; | |||||
int fire = (int) num; | |||||
viewBinding.fireControl.SetLevel(fire); | |||||
}else { | |||||
viewBinding.fireControl.SetLevel(0); | |||||
} | |||||
}else { | |||||
viewBinding.fireControl.SetLevel(0); | |||||
} | |||||
}else { | |||||
viewBinding.fireControl.SetLevel(0); | |||||
} | } | ||||
} | } | ||||
@SuppressLint("ClickableViewAccessibility") | @SuppressLint("ClickableViewAccessibility") | ||||
@@ -177,17 +197,25 @@ public class WokControlDialog extends DialogFragment { | |||||
viewBinding.btnSilosOpen.setOnClickListener(v->{ | viewBinding.btnSilosOpen.setOnClickListener(v->{ | ||||
try { | try { | ||||
if(viewBinding.spinnerSilos.getSelectedItem().toString().contains("未设置")){ | if(viewBinding.spinnerSilos.getSelectedItem().toString().contains("未设置")){ | ||||
NewToastUtil.getInstance().showToastError("请先绑定液料!"); | NewToastUtil.getInstance().showToastError("请先绑定液料!"); | ||||
return; | return; | ||||
} | } | ||||
String[] res = viewBinding.spinnerSilos.getSelectedItem().toString().split("料"); | |||||
String num = res[0]; | |||||
String val = viewBinding.editSilosWeight.getText().toString(); | String val = viewBinding.editSilosWeight.getText().toString(); | ||||
if(val.isEmpty()){ | if(val.isEmpty()){ | ||||
NewToastUtil.getInstance().showToastError("请输入重量!"); | NewToastUtil.getInstance().showToastError("请输入重量!"); | ||||
return; | return; | ||||
} | } | ||||
Object ob = ModbusCenter.getWokListingValue(deviceNum,"抽料位反馈"); | |||||
if (ob == null || !(boolean) ob) { | |||||
NewToastUtil.getInstance().showToastError("请先控制锅口朝向到抽料位"); | |||||
return; | |||||
} | |||||
String[] res = viewBinding.spinnerSilos.getSelectedItem().toString().split("料"); | |||||
String num = res[0]; | |||||
int MaxValue = 0; | int MaxValue = 0; | ||||
int weight = Integer.parseInt(val); | int weight = Integer.parseInt(val); | ||||
Object jz_z = ExecuteTheRecipe.ReadPLC(deviceNum,"料仓" + num + "校准值"); | Object jz_z = ExecuteTheRecipe.ReadPLC(deviceNum,"料仓" + num + "校准值"); | ||||
@@ -313,7 +341,11 @@ public class WokControlDialog extends DialogFragment { | |||||
@Override | @Override | ||||
public void clickListener(View v, Object data) { | public void clickListener(View v, Object data) { | ||||
int hl = (int) data; | int hl = (int) data; | ||||
ConfigName.getInstance().fireNum = hl+""; | |||||
if(deviceNum == 1){ | |||||
ConfigName.getInstance().fireNum1 = hl+""; | |||||
}else { | |||||
ConfigName.getInstance().fireNum2 = hl+""; | |||||
} | |||||
SetFire(hl); | SetFire(hl); | ||||
} | } | ||||
@@ -3,6 +3,8 @@ package com.bonait.bnframework.newui.fragment.calssify; | |||||
import android.annotation.SuppressLint; | import android.annotation.SuppressLint; | ||||
import android.content.Context; | import android.content.Context; | ||||
import android.os.Bundle; | import android.os.Bundle; | ||||
import android.text.Editable; | |||||
import android.text.TextWatcher; | |||||
import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||
import android.view.MotionEvent; | import android.view.MotionEvent; | ||||
import android.view.View; | import android.view.View; | ||||
@@ -72,6 +74,7 @@ public class GoodEditClassifyFragment extends BaseFragment { | |||||
private long lastTime2; | private long lastTime2; | ||||
private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | ||||
private ArrayList<BPA_GOODS> goodsListOld = new ArrayList<>(); | |||||
public boolean isFast2Click(){ | public boolean isFast2Click(){ | ||||
long curTime = System.currentTimeMillis(); | long curTime = System.currentTimeMillis(); | ||||
@@ -136,6 +139,34 @@ public class GoodEditClassifyFragment extends BaseFragment { | |||||
* 删除子属性 | * 删除子属性 | ||||
*/ | */ | ||||
private void initView(){ | private void initView(){ | ||||
viewBinding.edittext.addTextChangedListener(new TextWatcher() { | |||||
@Override | |||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||||
} | |||||
@Override | |||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||||
} | |||||
@Override | |||||
public void afterTextChanged(Editable editable) { | |||||
if(editable.toString().isEmpty()){ | |||||
goodsList.clear(); | |||||
goodsList.addAll(goodsListOld); | |||||
goodsAdapter.notifyDataSetChanged(); | |||||
}else { | |||||
goodsList.clear(); | |||||
for(BPA_GOODS bean :goodsListOld){ | |||||
if(bean.name.contains(editable.toString())){ | |||||
goodsList.add(bean); | |||||
} | |||||
} | |||||
goodsAdapter.notifyDataSetChanged(); | |||||
} | |||||
} | |||||
}); | |||||
//下拉选择 | //下拉选择 | ||||
classifyNameList.clear(); | classifyNameList.clear(); | ||||
classifyNameList.addAll(classifyList.keySet()); | classifyNameList.addAll(classifyList.keySet()); | ||||
@@ -233,7 +264,9 @@ public class GoodEditClassifyFragment extends BaseFragment { | |||||
}; | }; | ||||
viewBinding.recyclerGoods.setAdapter(goodsAdapter); | viewBinding.recyclerGoods.setAdapter(goodsAdapter); | ||||
goodsList.clear(); | goodsList.clear(); | ||||
goodsListOld.clear(); | |||||
goodsList.addAll(GoodsDBUtil.getAll()); | goodsList.addAll(GoodsDBUtil.getAll()); | ||||
goodsListOld.addAll(GoodsDBUtil.getAll()); | |||||
goodsAdapter.setNewData(goodsList); | goodsAdapter.setNewData(goodsList); | ||||
} | } | ||||
@@ -6,6 +6,8 @@ import android.os.Bundle; | |||||
import android.os.Handler; | import android.os.Handler; | ||||
import android.os.Looper; | import android.os.Looper; | ||||
import android.os.Message; | import android.os.Message; | ||||
import android.text.Editable; | |||||
import android.text.TextWatcher; | |||||
import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||
import android.view.View; | import android.view.View; | ||||
@@ -52,6 +54,7 @@ public class CloudGoodsHFragment extends BaseFragment { | |||||
private CloudGoodsAdapter goodsAdapter; | private CloudGoodsAdapter goodsAdapter; | ||||
private GoodClassifyAdapter classifyAdapter; | private GoodClassifyAdapter classifyAdapter; | ||||
private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | ||||
private ArrayList<BPA_GOODS> goodsListOld = new ArrayList<>(); | |||||
private ArrayList<BPA_GOODS_CLASSIFY> classifyList = new ArrayList<>(); | private ArrayList<BPA_GOODS_CLASSIFY> classifyList = new ArrayList<>(); | ||||
private static final int MSG_FRESH_GOODS= 1; | private static final int MSG_FRESH_GOODS= 1; | ||||
private HomeGoodsViewModel viewModel; | private HomeGoodsViewModel viewModel; | ||||
@@ -100,6 +103,15 @@ public class CloudGoodsHFragment extends BaseFragment { | |||||
}); | }); | ||||
} | } | ||||
@Override | |||||
public void onDestroyView() { | |||||
super.onDestroyView(); | |||||
if(goodsList!=null){ | |||||
goodsList.clear(); | |||||
goodsListOld.clear(); | |||||
} | |||||
} | |||||
@Override | @Override | ||||
protected int backViewInitOffset() { | protected int backViewInitOffset() { | ||||
return 0; | return 0; | ||||
@@ -107,6 +119,34 @@ public class CloudGoodsHFragment extends BaseFragment { | |||||
@SuppressLint("NotifyDataSetChanged") | @SuppressLint("NotifyDataSetChanged") | ||||
private void initView(){ | private void initView(){ | ||||
viewBinding.edittext.addTextChangedListener(new TextWatcher() { | |||||
@Override | |||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||||
} | |||||
@Override | |||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||||
} | |||||
@Override | |||||
public void afterTextChanged(Editable editable) { | |||||
if(editable.toString().isEmpty()){ | |||||
goodsList.clear(); | |||||
goodsList.addAll(goodsListOld); | |||||
goodsAdapter.notifyDataSetChanged(); | |||||
}else { | |||||
goodsList.clear(); | |||||
for(BPA_GOODS bean :goodsListOld){ | |||||
if(bean.name.contains(editable.toString())){ | |||||
goodsList.add(bean); | |||||
} | |||||
} | |||||
goodsAdapter.notifyDataSetChanged(); | |||||
} | |||||
} | |||||
}); | |||||
DisplayManager.scaleViewGroup(viewBinding.getRoot()); | DisplayManager.scaleViewGroup(viewBinding.getRoot()); | ||||
viewBinding.btnSynchronizedData.setVisibility(isEdit?View.VISIBLE:View.GONE); | viewBinding.btnSynchronizedData.setVisibility(isEdit?View.VISIBLE:View.GONE); | ||||
viewBinding.btnFresh.setOnClickListener(v->{ | viewBinding.btnFresh.setOnClickListener(v->{ | ||||
@@ -211,6 +251,7 @@ public class CloudGoodsHFragment extends BaseFragment { | |||||
private void dealGoodsData(int position){ | private void dealGoodsData(int position){ | ||||
goodsList.clear(); | goodsList.clear(); | ||||
goodsListOld.clear(); | |||||
if(type.equals("0")){ | if(type.equals("0")){ | ||||
if(classifyList.isEmpty()){ | if(classifyList.isEmpty()){ | ||||
return; | return; | ||||
@@ -242,6 +283,7 @@ public class CloudGoodsHFragment extends BaseFragment { | |||||
} | } | ||||
} | } | ||||
goodsList.add(goods); | goodsList.add(goods); | ||||
goodsListOld.add(goods); | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
@@ -261,6 +303,7 @@ public class CloudGoodsHFragment extends BaseFragment { | |||||
EventBus.getDefault().unregister(this); | EventBus.getDefault().unregister(this); | ||||
if(goodsList!=null){ | if(goodsList!=null){ | ||||
goodsList.clear(); | goodsList.clear(); | ||||
goodsListOld.clear(); | |||||
classifyList.clear(); | classifyList.clear(); | ||||
goodsList = null; | goodsList = null; | ||||
classifyList = null; | classifyList = null; | ||||
@@ -7,6 +7,8 @@ import android.os.Bundle; | |||||
import android.os.Handler; | import android.os.Handler; | ||||
import android.os.Looper; | import android.os.Looper; | ||||
import android.os.Message; | import android.os.Message; | ||||
import android.text.Editable; | |||||
import android.text.TextWatcher; | |||||
import android.view.LayoutInflater; | import android.view.LayoutInflater; | ||||
import android.view.View; | import android.view.View; | ||||
@@ -62,6 +64,8 @@ public class LocalGoodsHFragment extends BaseFragment { | |||||
private LocalGoodsAdapter goodsAdapter; | private LocalGoodsAdapter goodsAdapter; | ||||
private GoodClassifyAdapter goodClassifyAdapter; | private GoodClassifyAdapter goodClassifyAdapter; | ||||
private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | private ArrayList<BPA_GOODS> goodsList = new ArrayList<>(); | ||||
private ArrayList<BPA_GOODS> goodsListOld = new ArrayList<>(); | |||||
private ArrayList<BPA_GOODS_CLASSIFY> goodClassifyList = new ArrayList<>(); | private ArrayList<BPA_GOODS_CLASSIFY> goodClassifyList = new ArrayList<>(); | ||||
/** | /** | ||||
* 属性分类列表 | * 属性分类列表 | ||||
@@ -95,6 +99,8 @@ public class LocalGoodsHFragment extends BaseFragment { | |||||
if(goodClassifyAdapter.getCurrentPosition()>=0){ | if(goodClassifyAdapter.getCurrentPosition()>=0){ | ||||
goodsList.clear(); | goodsList.clear(); | ||||
goodsList.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(goodClassifyAdapter.getCurrentPosition()).id)); | goodsList.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(goodClassifyAdapter.getCurrentPosition()).id)); | ||||
goodsListOld.clear(); | |||||
goodsListOld.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(goodClassifyAdapter.getCurrentPosition()).id)); | |||||
} | } | ||||
goodsAdapter.notifyDataSetChanged(); | goodsAdapter.notifyDataSetChanged(); | ||||
break; | break; | ||||
@@ -120,6 +126,36 @@ public class LocalGoodsHFragment extends BaseFragment { | |||||
@SuppressLint("NotifyDataSetChanged") | @SuppressLint("NotifyDataSetChanged") | ||||
private void initView(){ | private void initView(){ | ||||
viewBinding.edittext.addTextChangedListener(new TextWatcher() { | |||||
@Override | |||||
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||||
} | |||||
@Override | |||||
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { | |||||
} | |||||
@Override | |||||
public void afterTextChanged(Editable editable) { | |||||
if(editable.toString().isEmpty()){ | |||||
goodsList.clear(); | |||||
goodsList.addAll(goodsListOld); | |||||
goodsAdapter.notifyDataSetChanged(); | |||||
}else { | |||||
goodsList.clear(); | |||||
for(BPA_GOODS bean :goodsListOld){ | |||||
if(bean.name.contains(editable.toString())){ | |||||
goodsList.add(bean); | |||||
} | |||||
} | |||||
goodsAdapter.notifyDataSetChanged(); | |||||
} | |||||
} | |||||
}); | |||||
viewBinding.allSelectTV.setVisibility(View.GONE); | viewBinding.allSelectTV.setVisibility(View.GONE); | ||||
viewBinding.allSelectTV.setOnClickListener(view->{ | viewBinding.allSelectTV.setOnClickListener(view->{ | ||||
IsAllSelect=!IsAllSelect; | IsAllSelect=!IsAllSelect; | ||||
@@ -435,12 +471,14 @@ public class LocalGoodsHFragment extends BaseFragment { | |||||
public void updateData() { | public void updateData() { | ||||
LogUtils.d("updateData"); | LogUtils.d("updateData"); | ||||
goodsList.clear(); | goodsList.clear(); | ||||
goodsListOld.clear(); | |||||
goodClassifyList.clear(); | goodClassifyList.clear(); | ||||
goodClassifyList.addAll(GoodsClassifyDBUtil.getAll("0")); | goodClassifyList.addAll(GoodsClassifyDBUtil.getAll("0")); | ||||
if(!goodClassifyList.isEmpty()){ | if(!goodClassifyList.isEmpty()){ | ||||
int last = Math.max(goodClassifyAdapter.getCurrentPosition(), 0); | int last = Math.max(goodClassifyAdapter.getCurrentPosition(), 0); | ||||
int last2 = Math.min(last, goodClassifyList.size()-1); | int last2 = Math.min(last, goodClassifyList.size()-1); | ||||
goodsList.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(last2).id)); | goodsList.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(last2).id)); | ||||
goodsListOld.addAll(GoodsDBUtil.getByClassifyId(goodClassifyList.get(last2).id)); | |||||
} | } | ||||
goodsAdapter.setNewData(goodsList); | goodsAdapter.setNewData(goodsList); | ||||
@@ -479,6 +517,7 @@ public class LocalGoodsHFragment extends BaseFragment { | |||||
EventBus.getDefault().unregister(this); | EventBus.getDefault().unregister(this); | ||||
if(goodsList!=null){ | if(goodsList!=null){ | ||||
goodsList.clear(); | goodsList.clear(); | ||||
goodsListOld.clear(); | |||||
goodClassifyList.clear(); | goodClassifyList.clear(); | ||||
goodsList = null; | goodsList = null; | ||||
goodClassifyList = null; | goodClassifyList = null; | ||||
@@ -160,6 +160,22 @@ public class HomeOrderFragment extends BaseFragment { | |||||
Bundle bundle2 = new Bundle(); | Bundle bundle2 = new Bundle(); | ||||
bundle2.putString("orderId",orderDetail.id); | bundle2.putString("orderId",orderDetail.id); | ||||
foodInfoDialog2.setArguments(bundle2); | foodInfoDialog2.setArguments(bundle2); | ||||
foodInfoDialog2.setListener(new MyClickListener() { | |||||
@Override | |||||
public void clickListener(View v, Object data) { | |||||
orderDetails1.clear(); | |||||
orderDetails1.addAll(OrderDetailUtil.getAll()); | |||||
orderAdapter1.notifyDataSetChanged(); | |||||
if(orderAdapter1.getCurrentPosition()>=0){ | |||||
orderClick(orderAdapter1.getData().get(orderAdapter1.getCurrentPosition())); | |||||
} | |||||
} | |||||
@Override | |||||
public void clickListenerNew(View v, int k, Object data) { | |||||
} | |||||
}); | |||||
if(getActivity()!=null){ | if(getActivity()!=null){ | ||||
foodInfoDialog2.show(getActivity().getSupportFragmentManager(),"配料信息"); | foodInfoDialog2.show(getActivity().getSupportFragmentManager(),"配料信息"); | ||||
} | } | ||||
@@ -169,6 +185,22 @@ public class HomeOrderFragment extends BaseFragment { | |||||
Bundle bundle3 = new Bundle(); | Bundle bundle3 = new Bundle(); | ||||
bundle3.putString("orderId",orderDetail.id); | bundle3.putString("orderId",orderDetail.id); | ||||
foodInfoDialog3.setArguments(bundle3); | foodInfoDialog3.setArguments(bundle3); | ||||
foodInfoDialog3.setListener(new MyClickListener() { | |||||
@Override | |||||
public void clickListener(View v, Object data) { | |||||
orderDetails1.clear(); | |||||
orderDetails1.addAll(OrderDetailUtil.getAll()); | |||||
orderAdapter1.notifyDataSetChanged(); | |||||
if(orderAdapter1.getCurrentPosition()>=0){ | |||||
orderClick(orderAdapter1.getData().get(orderAdapter1.getCurrentPosition())); | |||||
} | |||||
} | |||||
@Override | |||||
public void clickListenerNew(View v, int k, Object data) { | |||||
} | |||||
}); | |||||
if(getActivity()!=null){ | if(getActivity()!=null){ | ||||
foodInfoDialog3.show(getActivity().getSupportFragmentManager(),"配料信息"); | foodInfoDialog3.show(getActivity().getSupportFragmentManager(),"配料信息"); | ||||
} | } | ||||
@@ -178,6 +210,22 @@ public class HomeOrderFragment extends BaseFragment { | |||||
Bundle bundle = new Bundle(); | Bundle bundle = new Bundle(); | ||||
bundle.putString("orderId",orderDetail.id); | bundle.putString("orderId",orderDetail.id); | ||||
foodInfoDialog.setArguments(bundle); | foodInfoDialog.setArguments(bundle); | ||||
foodInfoDialog.setListener(new MyClickListener() { | |||||
@Override | |||||
public void clickListener(View v, Object data) { | |||||
orderDetails1.clear(); | |||||
orderDetails1.addAll(OrderDetailUtil.getAll()); | |||||
orderAdapter1.notifyDataSetChanged(); | |||||
if(orderAdapter1.getCurrentPosition()>=0){ | |||||
orderClick(orderAdapter1.getData().get(orderAdapter1.getCurrentPosition())); | |||||
} | |||||
} | |||||
@Override | |||||
public void clickListenerNew(View v, int k, Object data) { | |||||
} | |||||
}); | |||||
if(getActivity()!=null){ | if(getActivity()!=null){ | ||||
foodInfoDialog.show(getActivity().getSupportFragmentManager(),"配料信息"); | foodInfoDialog.show(getActivity().getSupportFragmentManager(),"配料信息"); | ||||
} | } | ||||
@@ -116,6 +116,8 @@ public class UpdateAllDataService { | |||||
RecordManager.getInstance().addLogRecord("数据接收", url+"-成功"); | RecordManager.getInstance().addLogRecord("数据接收", url+"-成功"); | ||||
List<BPA_PROCESS> processeList = new ArrayList<>(); | List<BPA_PROCESS> processeList = new ArrayList<>(); | ||||
List<BPA_PROCESSModel> processModelList = new ArrayList<>(); | List<BPA_PROCESSModel> processModelList = new ArrayList<>(); | ||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_PROCESS.class,null); | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_PROCESSModel.class,null); | |||||
ProcessModelBean processModelBean = response.body(); | ProcessModelBean processModelBean = response.body(); | ||||
int pos = 1; | int pos = 1; | ||||
@@ -18,6 +18,7 @@ import com.bonait.bnframework.Model.upload.UpResData; | |||||
import com.bonait.bnframework.Model.upload.UploadRes; | import com.bonait.bnframework.Model.upload.UploadRes; | ||||
import com.bonait.bnframework.business.RecordManager; | import com.bonait.bnframework.business.RecordManager; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | import com.bonait.bnframework.common.constant.ConfigName; | ||||
import com.bonait.bnframework.common.db.QueryDB; | |||||
import com.bonait.bnframework.common.db.file.DBHelper; | import com.bonait.bnframework.common.db.file.DBHelper; | ||||
import com.bonait.bnframework.common.db.mode.BPA_ATTRIBUTE; | import com.bonait.bnframework.common.db.mode.BPA_ATTRIBUTE; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | import com.bonait.bnframework.common.db.mode.BPA_GOODS; | ||||
@@ -29,6 +30,7 @@ import com.bonait.bnframework.common.db.mode.BPA_MATERIAL_TYPE; | |||||
import com.bonait.bnframework.common.db.mode.BPA_PROCESS; | import com.bonait.bnframework.common.db.mode.BPA_PROCESS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel; | import com.bonait.bnframework.common.db.mode.BPA_PROCESSModel; | ||||
import com.bonait.bnframework.common.db.mode.BPA_PROPERTY_CLASSIFY; | import com.bonait.bnframework.common.db.mode.BPA_PROPERTY_CLASSIFY; | ||||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||||
import com.bonait.bnframework.common.db.mode.BPA_SUBATTRIBUTE; | import com.bonait.bnframework.common.db.mode.BPA_SUBATTRIBUTE; | ||||
import com.bonait.bnframework.common.db.util.AttributeDBUtil; | import com.bonait.bnframework.common.db.util.AttributeDBUtil; | ||||
import com.bonait.bnframework.common.db.util.GoodsClassifyDBUtil; | import com.bonait.bnframework.common.db.util.GoodsClassifyDBUtil; | ||||
@@ -124,6 +126,8 @@ public class UpdateDataService { | |||||
RecordManager.getInstance().addLogRecord("数据接收", url+"-成功"); | RecordManager.getInstance().addLogRecord("数据接收", url+"-成功"); | ||||
List<BPA_PROCESS> processeList = new ArrayList<>(); | List<BPA_PROCESS> processeList = new ArrayList<>(); | ||||
List<BPA_PROCESSModel> processModelList = new ArrayList<>(); | List<BPA_PROCESSModel> processModelList = new ArrayList<>(); | ||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_PROCESS.class,null); | |||||
DBHelper.getInstance(MainApplication.getContext()).DeleteCreateTables(BPA_PROCESSModel.class,null); | |||||
ProcessModelBean processModelBean = response.body(); | ProcessModelBean processModelBean = response.body(); | ||||
int pos = 1; | int pos = 1; | ||||
@@ -78,7 +78,7 @@ public class HomeGoodsViewModel extends ViewModel { | |||||
})); | })); | ||||
if(!UpdateDataService.isDownProcessModel){ | if(!UpdateDataService.isDownProcessModel){ | ||||
UpdateDataService.downLoadProcessModel(null,null); | |||||
UpdateDataService.downLoadProcessModel(null,context); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -9,10 +9,12 @@ import android.widget.ArrayAdapter; | |||||
import android.widget.FrameLayout; | import android.widget.FrameLayout; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.constant.ConfigName; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | import com.bonait.bnframework.common.db.mode.BPA_GOODS_PROCESS_DETAIL; | ||||
import com.bonait.bnframework.common.db.util.GoodsProcessDetailDBUtil; | import com.bonait.bnframework.common.db.util.GoodsProcessDetailDBUtil; | ||||
import com.bonait.bnframework.common.utils.DisplayManager; | import com.bonait.bnframework.common.utils.DisplayManager; | ||||
import com.bonait.bnframework.databinding.ViewFoodPosSetBinding; | import com.bonait.bnframework.databinding.ViewFoodPosSetBinding; | ||||
import com.bonait.bnframework.newui.fragment.setting.SceneSetFragment; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.List; | import java.util.List; | ||||
@@ -105,7 +107,9 @@ public class FoodPosSetView extends FrameLayout { | |||||
list.add("F3"); | list.add("F3"); | ||||
list.add("F4"); | list.add("F4"); | ||||
list.add("F5"); | list.add("F5"); | ||||
list.add("F6"); | |||||
if(!ConfigName.getInstance().versionSelectionEnum.equals(SceneSetFragment.deviceName4)){ | |||||
list.add("F6"); | |||||
} | |||||
String value = detail.processvalue; | String value = detail.processvalue; | ||||
String[] res = value.split("\\|"); | String[] res = value.split("\\|"); | ||||
for (String s:res){ | for (String s:res){ | ||||
@@ -0,0 +1,15 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<selector xmlns:android="http://schemas.android.com/apk/res/android"> | |||||
<item android:state_pressed="true"> | |||||
<shape> | |||||
<solid android:color="#FF9800"/> | |||||
</shape> | |||||
</item> | |||||
<item> | |||||
<shape> | |||||
<solid android:color="#ffffff"/> | |||||
</shape> | |||||
</item> | |||||
</selector> |
@@ -0,0 +1,29 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content" | |||||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:id="@+id/root" | |||||
android:orientation="vertical" | |||||
> | |||||
<LinearLayout | |||||
android:layout_width="match_parent" | |||||
android:orientation="horizontal" | |||||
android:layout_height="@dimen/dp_100"> | |||||
<TextView | |||||
android:id="@+id/name" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="@dimen/dp_100" | |||||
tools:text="1.主料" | |||||
android:textSize="@dimen/sp_36" | |||||
android:gravity="center" | |||||
android:textColor="@color/blue_primary" | |||||
android:textStyle="bold" | |||||
android:background="@drawable/bg_round_white_btn" | |||||
/> | |||||
</LinearLayout> | |||||
</LinearLayout> |
@@ -455,7 +455,7 @@ | |||||
<Spinner | <Spinner | ||||
android:id="@+id/spinner_silos" | android:id="@+id/spinner_silos" | ||||
style="@style/commonSpinnerStyle" | style="@style/commonSpinnerStyle" | ||||
android:layout_width="350dp" | |||||
android:layout_width="400dp" | |||||
app:layout_constraintEnd_toEndOf="parent" | app:layout_constraintEnd_toEndOf="parent" | ||||
app:layout_constraintBottom_toTopOf="@id/edit_silos_weight" | app:layout_constraintBottom_toTopOf="@id/edit_silos_weight" | ||||
android:layout_marginBottom="10dp" | android:layout_marginBottom="10dp" | ||||
@@ -464,7 +464,7 @@ | |||||
android:layout_height="90dp" /> | android:layout_height="90dp" /> | ||||
<EditText | <EditText | ||||
android:id="@+id/edit_silos_weight" | android:id="@+id/edit_silos_weight" | ||||
android:layout_width="@dimen/dp_350" | |||||
android:layout_width="400dp" | |||||
android:layout_height="90dp" | android:layout_height="90dp" | ||||
android:inputType="number" | android:inputType="number" | ||||
android:padding="3dp" | android:padding="3dp" | ||||
@@ -472,6 +472,7 @@ | |||||
android:background="@drawable/input_bj" | android:background="@drawable/input_bj" | ||||
android:layout_marginBottom="10dp" | android:layout_marginBottom="10dp" | ||||
android:hint="液料重量" | android:hint="液料重量" | ||||
android:gravity="center" | |||||
android:textColorHint="@color/gray_light" | android:textColorHint="@color/gray_light" | ||||
android:layout_marginEnd="10dp" | android:layout_marginEnd="10dp" | ||||
android:maxLines="1" | android:maxLines="1" | ||||
@@ -488,7 +489,7 @@ | |||||
android:layout_marginTop="3dp" | android:layout_marginTop="3dp" | ||||
android:layout_gravity="center_horizontal" | android:layout_gravity="center_horizontal" | ||||
android:contentDescription="true" | android:contentDescription="true" | ||||
android:layout_marginEnd="80dp" | |||||
android:layout_marginEnd="105dp" | |||||
style="@style/TextView_btn_dialog" | style="@style/TextView_btn_dialog" | ||||
android:text="料仓出料" | android:text="料仓出料" | ||||
app:layout_constraintEnd_toEndOf="parent" | app:layout_constraintEnd_toEndOf="parent" | ||||
@@ -0,0 +1,68 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||||
android:layout_width="wrap_content" | |||||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||||
xmlns:tools="http://schemas.android.com/tools" | |||||
android:layout_gravity="center" | |||||
android:gravity="center" | |||||
android:background="@color/transparent" | |||||
tools:background="@color/gray" | |||||
tools:layout_width="match_parent" | |||||
tools:layout_height="match_parent" | |||||
android:layout_height="wrap_content"> | |||||
<LinearLayout | |||||
android:layout_width="800dp" | |||||
android:orientation="vertical" | |||||
android:background="@drawable/bg_round25_white" | |||||
android:layout_height="wrap_content"> | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | |||||
android:layout_height="100dp"> | |||||
<TextView | |||||
android:id="@+id/title" | |||||
android:textSize="36sp" | |||||
android:textColor="@color/black" | |||||
tools:text="主料名称" | |||||
android:layout_gravity="center" | |||||
android:gravity="center" | |||||
android:textStyle="bold" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="100dp"/> | |||||
<ImageView | |||||
android:id="@+id/btn_close" | |||||
android:layout_width="@dimen/dp_100" | |||||
android:layout_height="@dimen/dp_100" | |||||
style="@style/TextView_btn_dialog" | |||||
android:layout_marginEnd="20dp" | |||||
android:layout_alignParentEnd="true" | |||||
android:background="@mipmap/file_picker_delete" | |||||
app:layout_constraintTop_toTopOf="parent" | |||||
app:layout_constraintEnd_toEndOf="parent" | |||||
/> | |||||
</RelativeLayout> | |||||
<TextView | |||||
android:layout_width="match_parent" | |||||
android:layout_height="2dp" | |||||
android:background="@color/gray" | |||||
/> | |||||
<androidx.recyclerview.widget.RecyclerView | |||||
android:layout_marginTop="20dp" | |||||
android:layout_marginBottom="20dp" | |||||
android:layout_marginStart="20dp" | |||||
android:layout_marginEnd="20dp" | |||||
android:id="@+id/recycle_view" | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | |||||
android:orientation="vertical" | |||||
android:layout_width="match_parent" | |||||
android:layout_height="wrap_content"/> | |||||
</LinearLayout> | |||||
</LinearLayout> |
@@ -76,7 +76,21 @@ | |||||
android:layout_height="@dimen/dp_3" | android:layout_height="@dimen/dp_3" | ||||
android:background="@color/color3" | android:background="@color/color3" | ||||
/> | /> | ||||
<EditText | |||||
android:id="@+id/edittext" | |||||
android:layout_width="@dimen/dp_400" | |||||
android:layout_height="60dp" | |||||
android:inputType="text" | |||||
android:paddingStart="5dp" | |||||
android:paddingEnd="5dp" | |||||
android:textColor="@color/foreground" | |||||
android:background="@drawable/input_bj" | |||||
android:hint=" 筛选" | |||||
android:layout_marginTop="10dp" | |||||
android:maxLines="1" | |||||
android:layout_alignParentEnd="true" | |||||
android:layout_marginEnd="470dp" | |||||
android:textSize="@dimen/sp_26"/> | |||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
android:layout_marginLeft="@dimen/dp_270" | android:layout_marginLeft="@dimen/dp_270" | ||||
android:id="@+id/recycler_goods" | android:id="@+id/recycler_goods" | ||||
@@ -94,16 +94,35 @@ | |||||
android:background="@color/color3" | android:background="@color/color3" | ||||
/> | /> | ||||
<EditText | |||||
android:id="@+id/edittext" | |||||
android:layout_width="@dimen/dp_600" | |||||
android:layout_height="60dp" | |||||
android:inputType="text" | |||||
android:layout_marginStart="20dp" | |||||
android:paddingStart="5dp" | |||||
android:paddingEnd="5dp" | |||||
android:textColor="@color/foreground" | |||||
android:background="@drawable/input_bj" | |||||
android:hint=" 筛选" | |||||
android:layout_marginTop="120dp" | |||||
android:maxLines="1" | |||||
android:layout_alignParentEnd="true" | |||||
android:layout_marginEnd="470dp" | |||||
app:layout_constraintTop_toTopOf="parent" | |||||
app:layout_constraintStart_toStartOf="parent" | |||||
android:textSize="@dimen/sp_26"/> | |||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
android:layout_marginLeft="@dimen/dp_21" | android:layout_marginLeft="@dimen/dp_21" | ||||
android:layout_marginTop="120dp" | |||||
android:layout_marginTop="10dp" | |||||
android:id="@+id/recycler_goods" | android:id="@+id/recycler_goods" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:orientation="vertical" | android:orientation="vertical" | ||||
app:layout_constraintBottom_toBottomOf="parent" | |||||
app:layout_constraintTop_toBottomOf="@id/edittext" | |||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" | ||||
app:spanCount="3" | |||||
android:layout_height="match_parent"> | |||||
app:spanCount="5" | |||||
android:layout_height="0dp"> | |||||
</androidx.recyclerview.widget.RecyclerView> | </androidx.recyclerview.widget.RecyclerView> | ||||
@@ -104,6 +104,21 @@ | |||||
android:background="@color/color3" | android:background="@color/color3" | ||||
/> | /> | ||||
<EditText | |||||
android:id="@+id/edittext" | |||||
android:layout_width="@dimen/dp_400" | |||||
android:layout_height="60dp" | |||||
android:inputType="text" | |||||
android:paddingStart="5dp" | |||||
android:paddingEnd="5dp" | |||||
android:textColor="@color/foreground" | |||||
android:background="@drawable/input_bj" | |||||
android:hint=" 筛选" | |||||
android:layout_marginTop="10dp" | |||||
android:maxLines="1" | |||||
android:layout_alignParentEnd="true" | |||||
android:layout_marginEnd="470dp" | |||||
android:textSize="@dimen/sp_26"/> | |||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
android:layout_marginLeft="@dimen/dp_21" | android:layout_marginLeft="@dimen/dp_21" | ||||
android:layout_marginTop="80dp" | android:layout_marginTop="80dp" | ||||
@@ -123,7 +138,6 @@ | |||||
android:layout_marginStart="685dp" | android:layout_marginStart="685dp" | ||||
android:visibility="gone" | android:visibility="gone" | ||||
tools:visibility="visible" | tools:visibility="visible" | ||||
android:layout_toRightOf="@id/recycler_classify" | |||||
android:background="@drawable/all_edit_btn" | android:background="@drawable/all_edit_btn" | ||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
android:layout_marginBottom="20dp"> | android:layout_marginBottom="20dp"> | ||||