Procházet zdrojové kódy

更新PLC地址

调味吧台(白底)
fyf před 1 rokem
rodič
revize
d149739ece
17 změnil soubory, kde provedl 378 přidání a 700 odebrání
  1. +1
    -1
      .idea/misc.xml
  2. +12
    -8
      app/src/main/AndroidManifest.xml
  3. +11
    -0
      app/src/main/java/com/example/bpa/app/ICSApp.java
  4. +1
    -6
      app/src/main/java/com/example/bpa/helper/ModbusTcpServer.java
  5. +78
    -244
      app/src/main/java/com/example/bpa/service/DeviceData.java
  6. +0
    -2
      app/src/main/java/com/example/bpa/service/ReheatServer.java
  7. +8
    -1
      app/src/main/java/com/example/bpa/view/adapter/lc_item_adapter.java
  8. +4
    -3
      app/src/main/java/com/example/bpa/view/fragment/SystemCapabilitiesFragment.java
  9. +24
    -93
      app/src/main/java/com/example/bpa/view/from/dzcjy_activity.java
  10. +2
    -3
      app/src/main/java/com/example/bpa/view/from/lcsz_activity.java
  11. +3
    -104
      app/src/main/java/com/example/bpa/view/from/lsjy_activity.java
  12. +114
    -0
      app/src/main/java/com/example/bpa/view/from/sdkz_new_Activity.java
  13. +2
    -1
      app/src/main/java/com/example/bpa/view/mode/lcMode.java
  14. +1
    -222
      app/src/main/res/layout/from/layout/activity_dzcjy.xml
  15. +12
    -12
      app/src/main/res/layout/from/layout/activity_lsjy.xml
  16. +95
    -0
      app/src/main/res/layout/from/layout/activity_sdkz_new.xml
  17. +10
    -0
      app/src/main/res/layout/item/layout/lc_item.xml

+ 1
- 1
.idea/misc.xml Zobrazit soubor

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">


+ 12
- 8
app/src/main/AndroidManifest.xml Zobrazit soubor

@@ -14,21 +14,23 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

<application
android:name=".app.ICSApp"
android:allowBackup="true"
android:hardwareAccelerated="false"
android:icon="@mipmap/ncd"
android:label="@string/app_name"
android:largeHeap="true"
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:largeHeap="true"
android:hardwareAccelerated="false"
tools:targetApi="31">
<activity
android:name=".view.from.sdkz_new_Activity"
android:exported="false" />
<activity
android:name=".view.fragment.SsjkFragment"
android:exported="false" />
@@ -122,13 +124,17 @@
android:exported="false"
android:windowSoftInputMode="adjustPan|stateHidden" /> <!-- Mqtt Service -->
<service android:name="org.eclipse.paho.android.service.MqttService" />
<receiver android:name=".app.BootReceiver"

<receiver
android:name=".app.BootReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</receiver>

<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
@@ -138,8 +144,6 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/fileproviderpath" />
</provider>


</application>

</manifest>

+ 11
- 0
app/src/main/java/com/example/bpa/app/ICSApp.java Zobrazit soubor

@@ -132,6 +132,17 @@ public class ICSApp extends Application {
BPA_SILOSANDMATERIAL sm = new BPA_SILOSANDMATERIAL();
sm.silosID = silo.id;
sm.materialID = "";

if(i<6)
{
silo.name="外置仓";
} else if (i>=6 && i<10) {
silo.name="粉料仓";
}else if (i==10) {
silo.name="酱油仓";
}else if (i==11) {
silo.name="猪油仓";
}
QueryDB.AddSilos(silo);
QueryDB.AddSilosAndMaterial(sm);
}


+ 1
- 6
app/src/main/java/com/example/bpa/helper/ModbusTcpServer.java Zobrazit soubor

@@ -122,7 +122,7 @@ public class ModbusTcpServer {
*/
public String getBitSingleAdd(String Prefix, int startAdd, int num) {
if (num > 0) {
int FirstAdd = num / 8;
int FirstAdd = num / 8; //
int EndAdd = num % 8;
if (EndAdd == 0) {
FirstAdd--;
@@ -227,17 +227,12 @@ public class ModbusTcpServer {
BusinessServer.Get().Init();
//3.设置自动模式
DeviceData.Get().setHandOrAutoSwitch(true, null);
DeviceData.Get().setCleaningMode(false, null);//关闭自动清洗模式
//4.启动设备服务
DeviceServer.Get().Init();
//5.启动日志服务
LogServer.Get().Init();
//6.云订单服务
OrderServer.Get().Init();
//7.加热服务
ReheatServer.Get().Init();
//8.扫码服务
ScanCodeServer.Get().Init();
}

@Override


+ 78
- 244
app/src/main/java/com/example/bpa/service/DeviceData.java Zobrazit soubor

@@ -30,27 +30,6 @@ public class DeviceData {
public void testAddComm(int value) {
testComms.offer(value);
}

public void TestInit() {
ThreadManager.Get().StartLong("TestInit", true, new IThread() {
@Override
public void Run() throws InterruptedException {
while (testComms.size() > 0) {
Thread.sleep(5000);
if (OnChargeMixtureComNotPar != null) {
OnChargeMixtureComNotPar.Run(testComms.poll());
}
}
Thread.sleep(100);
}

@Override
public void RunComplete() throws InterruptedException {

}
});
;
}
//----------------------------------------------------------------End 模拟测试 ----------------------------------------------------------------

//region 初始化
@@ -60,115 +39,38 @@ public class DeviceData {
public void Run() throws InterruptedException {

//获取校准值-增加两个果糖通道
ModbusTcpServer.get().ReadShort("VW100", 12, (shorts) -> {
ModbusTcpServer.get().ReadShort("VW0", 12, (shorts) -> {
for (int i = 0; i < shorts.length; i++) {
CalibrationValue.put(i + 1, shorts[i]);
}
});

//获取称当前重量
ModbusTcpServer.get().ReadInt("VD260", 9, ints -> {
ModbusTcpServer.get().ReadInt("VD356", 1, ints -> {
for (int i = 0; i < ints.length; i++) {
CallCurrentWeight.put(i + 1, ints[i]);
}
});

//获取校准基准时间
ModbusTcpServer.get().ReadInt("VD124", 1, ints -> {
CalibrationReferenceTime = ints[0];
});

//获取温度参数
ModbusTcpServer.get().ReadInt("VD310", 3, ints -> {
FructoseTemperature1=ints[0];
FructoseTemperature2=ints[1];
WashTheTankTemperature=ints[2];
ModbusTcpServer.get().ReadShort("VW26", 1, (shorts) -> {
CalibrationReferenceTime = shorts[0];
});

//获取温度上下限
ModbusTcpServer.get().ReadInt("VD388", 6, ints -> {
FructoseTemperature1_up=ints[0];
FructoseTemperature1_down=ints[1];
FructoseTemperature2_up=ints[2];
FructoseTemperature2_down=ints[3];
WashTheTankTemperature_up=ints[4];
WashTheTankTemperature_down=ints[5];
//获取温度参数 保温池温度、加热箱温度
ModbusTcpServer.get().ReadInt("VD364", 2, ints -> {
BWX_FructoseTemperature=ints[0];
JRX_FructoseTemperature=ints[1];
});

//获取清洗参数
ModbusTcpServer.get().ReadShort("VW140", 5, shorts -> {
DrainageTime = shorts[0];
AddCleaningAgentTime = shorts[1];
InletTime = shorts[2];
CyclicCleaningTime = shorts[3];
CleaningAndHeatingTime = shorts[4];
});

//获取清洗参数
ModbusTcpServer.get().ReadBool("M6.5", 1, booleans -> {
//获取校准模式
ModbusTcpServer.get().ReadBool("M1.0", 1, booleans -> {
WeightCalibrationMode = booleans[0];
});

ModbusTcpServer.get().ReadBool("M6.5", 1, booleans -> {
WeightCalibrationMode = booleans[0];
});
//IoStatus

//读取1号果糖机按钮状态
ModbusTcpServer.get().ReadBool("M51.7", 1, booleans -> {
ReheatSwitch1 = booleans[0];
});

//读取2号果糖机按钮状态
ModbusTcpServer.get().ReadBool("M52.0", 1, booleans -> {
ReheatSwitch2 = booleans[0];
});

//读取当前扫码信息
ModbusTcpServer.get().ReadString("VW342", 20, (data) -> {

if(!Code.equals(data))
{
if(!data.isEmpty() && OnScanTheCodeInformationT!=null)
{
MessageLog.ShowInfo("当前扫码信息:"+data);
OnScanTheCodeInformationT.Run(data);
}
Code=data;
}
//1.查询订单信息
//2.展示订单界面
//3.制作订单信息
//4.回馈订单信息
});

//读取实时状态
ModbusTcpServer.get().ReadStatus("VW382", 3, data -> {
for (int i = 0; i < data.length; i++) {
byte status=data[i];//0x92
IoStatus.put(i*8+0, ByteHelper.getBit(status,0)==1);
IoStatus.put(i*8+1, ByteHelper.getBit(status,1)==1);
IoStatus.put(i*8+2, ByteHelper.getBit(status,2)==1);
IoStatus.put(i*8+3, ByteHelper.getBit(status,3)==1);
IoStatus.put(i*8+4, ByteHelper.getBit(status,4)==1);
IoStatus.put(i*8+5, ByteHelper.getBit(status,5)==1);
IoStatus.put(i*8+6, ByteHelper.getBit(status,6)==1);
IoStatus.put(i*8+7, ByteHelper.getBit(status,7)==1);
}
});

//配料完成 M0.3
CompleteListen("M0.3", "配料完成", OnChargeMixtureCompleteNotify);

//清洗完成 M0.6
CompleteListen("M0.6", "清洗完成", OnCleaningCompleteNotify);

//去皮完成 M1.3
CompleteListen("M1.3", "去皮完成", OnPeelingCompleteNotify);

//扫码信号 M1.5
//CompleteListen("M1.5", "扫码信号", OnScanTheCodeInformation);

Thread.sleep(10);
}

@@ -179,12 +81,7 @@ public class DeviceData {
});
}
//endregion
/**
* 扫码信息
*/
public String Code="";
//region 完成信号监听

/**
* 完成信号监听
*
@@ -207,26 +104,6 @@ public class DeviceData {
* 配料完成通知
*/
public IRun OnChargeMixtureCompleteNotify;

/**
* 通道配料完成通知
*/
public IRunT OnChargeMixtureComNotPar;

/**
* 清洗完成通知
*/
public IRun OnCleaningCompleteNotify;

/**
* 去皮完成
*/
public IRun OnPeelingCompleteNotify;

/**
* 接收到扫码信息
*/
public IRun OnScanTheCodeInformation;
/**
* 接收到扫码信息,返回
*/
@@ -242,7 +119,7 @@ public class DeviceData {
*/
public void setCalibrationValue(short value, int ch, IWriteCallBack callback) {
if (ch >= 1 && ch <= 12) {
String add = "VW" + (98 + ch * 2);
String add = "VW" + (-2 + ch * 2);
ModbusTcpServer.get().WriteShort(add, value, callback);
}
}
@@ -273,11 +150,7 @@ public class DeviceData {
*/
public void setDemandValue(short value, int ch, IWriteCallBack callback) {
if (ch >= 1 && ch <= 10) {
String add = "VW" + (198 + ch * 2);
ModbusTcpServer.get().WriteShort(add, value, callback);
}else if(ch>=11 && ch<=12)//果糖需求
{
String add = "VW" + (198 +20+ ch * 2);
String add = "VW" + (298 + ch * 2);
ModbusTcpServer.get().WriteShort(add, value, callback);
}
}
@@ -294,21 +167,20 @@ public class DeviceData {
String add="";
if(ch==9)
{
add="M03.0";
add="M3.0";
}else if(ch==10)
{
add="M03.1";
}else if(ch==11)//果糖1
add="M3.1";
}else if(ch==11)
{
add="M03.2";
}else if(ch==12)//果糖2
add="M3.2";
}else if(ch==12)
{
add="M03.3";
add="M3.3";
}else
{
add = ModbusTcpServer.get().getBitSingleAdd("M", 2, ch);
}

if (add.length() > 0)
ModbusTcpServer.get().WriteBool(add, value, callback);
}
@@ -332,68 +204,39 @@ public class DeviceData {
}
//endregion


/**
* 称去皮校准
*
* @param value
* @param ch 设置称的通道号,ch1-ch8
*/
public void setRemovePeelCalibration(boolean value, int ch, IWriteCallBack callback) {
if (ch >= 1 && ch <= 8) {
String add = ModbusTcpServer.get().getBitSingleAdd("M", 5, ch);
if (add.length() > 0)
ModbusTcpServer.get().WriteBool(add, value, callback);
}
}

/**
* 砝码值写入
*
* @param value
* @param ch 设置称的砝码通道号,ch1-ch8
*/
public void setWeightValue(boolean value, int ch, IWriteCallBack callback) {
if (ch >= 1 && ch <= 8) {
String add = ModbusTcpServer.get().getBitSingleAdd("M", 15, ch);
if (add.length() > 0)
ModbusTcpServer.get().WriteBool(add, value, callback);
}
}

/**
* 重量清零
*/
public void setWeightClear(IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M6.0", true, callback);
ModbusTcpServer.get().WriteBool("M1.1", true, callback);
}

/**
* 关闭写保护
*/
public void setCloseWriteProtect(IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M6.1", true, callback);
ModbusTcpServer.get().WriteBool("M1.2", true, callback);
}

/**
* 打开写保护
*/
public void setOpenWriteProtect(IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M6.4", true, callback);
ModbusTcpServer.get().WriteBool("M1.5", true, callback);
}

/**
* 零点校准
*/
public void setZeroPointCalibration(IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M6.2", true, callback);
ModbusTcpServer.get().WriteBool("M1.3", true, callback);
}

/**
* 砝码值写入
*/
public void setWeightValueWrite(IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M6.3", true, callback);
ModbusTcpServer.get().WriteBool("M1.4", true, callback);
}

/**
@@ -405,7 +248,7 @@ public class DeviceData {
* 砝码校准模式
*/
public void setWeightCalibrationMode(Boolean value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M6.5", value, callback);
ModbusTcpServer.get().WriteBool("M1.0", value, callback);
}

/**
@@ -467,7 +310,6 @@ public class DeviceData {
* 清洗模式
*/
boolean CleaningMode;

/**
* 获取清洗模式
*
@@ -483,28 +325,6 @@ public class DeviceData {
public void setStartCleaning(IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M0.5", true, callback);
}

/**
* 设置一键去皮
*/
public void setOneClickPeeling(IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M1.2", true, callback);
}

/**
* 一键去皮完成状态
*/
boolean OneClickPeelingComplete;

/**
* 设置一键去皮完成状态
*
* @param value
*/
public void setOneClickPeelingComplete(boolean value) {
OneClickPeelingComplete = value;
}

/**
* 清洗完成
*/
@@ -519,35 +339,6 @@ public class DeviceData {
return CleaningComplete;
}

//region 获取或设置-校准模式

/**
* 设置校准模式
*
* @param value true:零点校准模式,false:清零去皮模式
*/
public void setCalibrationMode(boolean value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M1.4", value, callback);
}

/**
* 校准模式
*/
boolean CalibrationMode;

/**
* 获取校准模式
*
* @return true:零点校准模式,false:清零去皮模式
*/
public boolean getCalibrationMode() {
return CalibrationMode;
}

//endregion



/**
* 称当前重量
*/
@@ -573,8 +364,8 @@ public class DeviceData {
*
* @param value 需要写入的值
*/
public void setCalibrationReferenceTime(int value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteInt("VD124", value, callback);
public void setCalibrationReferenceTime(short value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteShort("VW26", value, callback);
}

/**
@@ -890,22 +681,15 @@ public class DeviceData {
return IoStatus.get(ch);
}
//endregion
/**
* 设置8路称校准砝码重量
*
* @param value
*/
public void setCalibrationWeight(short value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteShort("VW250", value, callback);
}

//region 设置出料口称重
/**
* 设置称重9校准砝码重量
*
* @param value
*/
public void setCalibrationWeight9(short value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteShort("VW254", value, callback);
ModbusTcpServer.get().WriteShort("VW30", value, callback);
}

/**
@@ -914,4 +698,54 @@ public class DeviceData {
public void setCodeClear(IWriteCallBack callback) {
ModbusTcpServer.get().WriteString("VW342", 20, callback);
}
//endregion

//region 获取或设置保温箱温度信息
/**
* 保温箱
*/
int BWX_FructoseTemperature=0;
/**
* 获取保温箱实际温度
*
* @return
*/
public int getBWX_FructoseTemperature() {
return BWX_FructoseTemperature;
}
public void setBWX_FructoseTemperature(int value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteInt("VD372", value, callback);
}
/**
* 设置保温箱加热启动停止
*
* @param value true:启动,flase:停止
*/
public void setBWXSwitch(boolean value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M102.0", value, callback);
}
/**
* 加热箱
*/
int JRX_FructoseTemperature=0;
/**
* 获取加热箱实际温度
*
* @return
*/
public int getJRX_FructoseTemperature() {
return JRX_FructoseTemperature;
}
public void setJRX_FructoseTemperature(int value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteInt("VD380", value, callback);
}
/**
* 设置加热箱加热启动停止
*
* @param value true:启动,flase:停止
*/
public void setJRXSwitch(boolean value, IWriteCallBack callback) {
ModbusTcpServer.get().WriteBool("M103.4", value, callback);
}
//endregion
}

+ 0
- 2
app/src/main/java/com/example/bpa/service/ReheatServer.java Zobrazit soubor

@@ -125,8 +125,6 @@ public class ReheatServer {
public void RunComplete() throws InterruptedException {
}
});


} catch (Exception ex) {
MessageLog.ShowInfo("错误信息:" + ex.getMessage());
}


+ 8
- 1
app/src/main/java/com/example/bpa/view/adapter/lc_item_adapter.java Zobrazit soubor

@@ -52,6 +52,7 @@ public class lc_item_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
MyLCViewHolder myViewHolder = (MyLCViewHolder) holder;
myViewHolder.materialName.setText(list.get(position).materialName);
myViewHolder.silosmargin.setText(list.get(position).silosmargin);
myViewHolder.SiolsName.setText(list.get(position).name);
myViewHolder.num.setText(Integer.toString(list.get(position).num) );
myViewHolder.id = list.get(position).id;
myViewHolder.MaterialName = list.get(position).materialName;
@@ -69,9 +70,14 @@ public class lc_item_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde

public static class MyLCViewHolder extends RecyclerView.ViewHolder {
/**
* 料名称
* 料名称
*/
public TextView materialName;
/**
* 料仓名称
*/
public TextView SiolsName;

/**、
* 料仓仓号
*/
@@ -99,6 +105,7 @@ public class lc_item_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde
public MyLCViewHolder(View view) {
super(view);
materialName = (TextView) view.findViewById(R.id.lc_item_materialName);
SiolsName = (TextView) view.findViewById(R.id.lc_item_silosname);
num = (TextView) view.findViewById(R.id.lc_item_num);
silosmargin = (TextView) view.findViewById(R.id.lc_item_silosmargin);
image_yj = (RelativeLayout) view.findViewById(R.id.image_yj);


+ 4
- 3
app/src/main/java/com/example/bpa/view/fragment/SystemCapabilitiesFragment.java Zobrazit soubor

@@ -25,6 +25,7 @@ import com.example.bpa.view.from.ddyjrz_activity;
import com.example.bpa.view.from.dzcjy_activity;
import com.example.bpa.view.from.lcsz_activity;
import com.example.bpa.view.from.lsjy_activity;
import com.example.bpa.view.from.sdkz_new_Activity;
import com.example.bpa.view.from.wdgl_activity;
import com.example.bpa.view.from.wlgl_activity;
import com.example.bpa.view.from.yfcl_activity;
@@ -71,11 +72,11 @@ public class SystemCapabilitiesFragment extends Fragment {
menuModes.add(new MenuMode("料仓管理", R.mipmap.lcsz));
menuModes.add(new MenuMode("订单管理", R.mipmap.ddgl));
menuModes.add(new MenuMode("手动控制", R.mipmap.sdkz));
menuModes.add(new MenuMode("温度管理", R.mipmap.wdkz));
// menuModes.add(new MenuMode("温度管理", R.mipmap.wdkz));

menuModes.add(new MenuMode("电子秤校验", R.mipmap.dzcjy));
menuModes.add(new MenuMode("流速校验", R.mipmap.lsjy));
menuModes.add(new MenuMode("自动清洗", R.mipmap.zdqx));
// menuModes.add(new MenuMode("自动清洗", R.mipmap.zdqx));

menuModes.add(new MenuMode("预警日志", R.mipmap.gjrz));
menuModes.add(new MenuMode("操作日志", R.mipmap.czrz));
@@ -127,7 +128,7 @@ public class SystemCapabilitiesFragment extends Fragment {
intent = new Intent(view.getContext(), ddgl_activity.class);
break;
case "手动控制":
intent = new Intent(view.getContext(), sdkz_activity.class);
intent = new Intent(view.getContext(), sdkz_new_Activity.class);
break;
case "温度管理":
intent = new Intent(view.getContext(), wdgl_activity.class);


+ 24
- 93
app/src/main/java/com/example/bpa/view/from/dzcjy_activity.java Zobrazit soubor

@@ -40,7 +40,7 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
* out_switch:称重模块校准
* marialmode_switch:出口称重模块校准
*/
Switch out_switch, marialmode_switch;
Switch out_switch;
/**
* mwSave_button:物料砝码值保存
* owSave_button:出口砝码值保存
@@ -51,15 +51,14 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
* zerocalibration_button:零点校准
* allcalibration_button:一键去皮
*/
Button mwSave_button, owSave_button, materilwrite_button, calibration_button, zeroweight_button, outWrite_button, zerocalibration_button, allcalibration_button;
Button owSave_button, zeroweight_button, outWrite_button, zerocalibration_button;

EditText materialweight_edit, outweight_edit;
EditText outweight_edit;

Spinner values_spinner;

EditText mode_1_realvalue, mode_2_realvalue, mode_3_realvalue, mode_4_realvalue, mode_5_realvalue, mode_6_realvalue, mode_7_realvalue, mode_8_realvalue, mode_out_realvalue;

Map<String, Integer> datamaps = new LinkedHashMap<String, Integer>();
EditText mode_out_realvalue;


//endregion

@@ -75,6 +74,24 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
Initdata();
startListening();
}

@Override
protected void onDestroy() {
DeviceData.Get().setWeightCalibrationMode(false, new IWriteCallBack() {

@Override
public void onSuccess() {

}

@Override
public void onFailure(String ErrorMsg) {

}
});
super.onDestroy();
}

//endregion

//region 公共函数
@@ -89,44 +106,16 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
String msg = getIntent().getStringExtra("data");
gongneng_title.setText(msg);
//edittext
materialweight_edit = this.findViewById(R.id.materialweight_edit);
outweight_edit = this.findViewById(R.id.outweight_edit);
//switch
out_switch = this.findViewById(R.id.out_switch);
marialmode_switch = this.findViewById(R.id.marialmode_switch);
//button
mwSave_button = this.findViewById(R.id.mwSave_button);
owSave_button = this.findViewById(R.id.owSave_button);
materilwrite_button = this.findViewById(R.id.materilwrite_button);
calibration_button = this.findViewById(R.id.calibration_button);
zeroweight_button = this.findViewById(R.id.zeroweight_button);
outWrite_button = this.findViewById(R.id.outWrite_button);
zerocalibration_button = this.findViewById(R.id.zerocalibration_button);

values_spinner = this.findViewById(R.id.values_spinner);
allcalibration_button = this.findViewById(R.id.allcalibration_button);
//edit
mode_1_realvalue = this.findViewById(R.id.mode_1_realvalue);
mode_2_realvalue = this.findViewById(R.id.mode_2_realvalue);
mode_3_realvalue = this.findViewById(R.id.mode_3_realvalue);
mode_4_realvalue = this.findViewById(R.id.mode_4_realvalue);
mode_5_realvalue = this.findViewById(R.id.mode_5_realvalue);
mode_6_realvalue = this.findViewById(R.id.mode_6_realvalue);
mode_7_realvalue = this.findViewById(R.id.mode_7_realvalue);
mode_8_realvalue = this.findViewById(R.id.mode_8_realvalue);
mode_out_realvalue = this.findViewById(R.id.mode_out_realvalue);


datamaps.put("称重_1", 1);
datamaps.put("称重_2", 2);
datamaps.put("称重_3", 3);
datamaps.put("称重_4", 4);
datamaps.put("称重_5", 5);
datamaps.put("称重_6", 6);
datamaps.put("称重_7", 7);
datamaps.put("称重_8", 8);


}

/**
@@ -139,36 +128,19 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
dzcjy_activity.this.finish();
}
});
mwSave_button.setOnClickListener(this);
owSave_button.setOnClickListener(this);
materilwrite_button.setOnClickListener(this);
calibration_button.setOnClickListener(this);
zeroweight_button.setOnClickListener(this);
outWrite_button.setOnClickListener(this);
zerocalibration_button.setOnClickListener(this);
allcalibration_button.setOnClickListener(this);
out_switch.setOnCheckedChangeListener(this);
marialmode_switch.setOnCheckedChangeListener(this);


}

/**
* 初始化数据
*/
private void Initdata() {
marialmode_switch.setChecked(DeviceData.Get().getCalibrationMode());
out_switch.setChecked(DeviceData.Get().getWeightCalibrationMode());
materialweight_edit.setText("0");
outweight_edit.setText("0");
//spinner绑定map数据
ArrayAdapter<String> adapter = new ArrayAdapter<String>(
this,
R.layout.spinner_text_item,
new ArrayList<String>(datamaps.keySet()));
adapter.setDropDownViewResource(R.layout.spinner_dropdown_item);
values_spinner.setAdapter(adapter);

}

/**
@@ -183,15 +155,7 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
runOnUiThread(new Runnable() {
@Override
public void run() {
mode_1_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(1)));
mode_2_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(2)));
mode_3_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(3)));
mode_4_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(4)));
mode_5_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(5)));
mode_6_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(6)));
mode_7_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(7)));
mode_8_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(8)));
mode_out_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(9)/10.0));
mode_out_realvalue.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(1)/10.0));
}
});

@@ -219,28 +183,12 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
public void onClick(View v) {
new Thread(() -> {
switch (v.getId()) {
case R.id.mwSave_button://物料砝码值保存
String mwres = materialweight_edit.getText().toString().trim();
if (!mwres.equals("")) {
DeviceData.Get().setCalibrationWeight(Short.parseShort(mwres), null);
}
break;
case R.id.owSave_button://出口砝码值保存
String outres = outweight_edit.getText().toString().trim();
if (!outres.equals("")) {
DeviceData.Get().setCalibrationWeight9(Short.parseShort(outres), null);
}
break;
case R.id.materilwrite_button://物料砝码值写入
String s = String.valueOf(values_spinner.getSelectedItem());
Integer value = datamaps.get(s);
DeviceData.Get().setWeightValue(true, value, null);
break;
case R.id.calibration_button://物料校准
String s2 = String.valueOf(values_spinner.getSelectedItem());
Integer value2 = datamaps.get(s2);
DeviceData.Get().setRemovePeelCalibration(true, value2, null);
break;
case R.id.zeroweight_button://重量清零
DeviceData.Get().setWeightClear(null);
break;
@@ -250,9 +198,6 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
case R.id.zerocalibration_button://零点校准
DeviceData.Get().setZeroPointCalibration(null);
break;
case R.id.allcalibration_button://一件去皮
DeviceData.Get().setOneClickPeeling(null);
break;

}
}).start();
@@ -268,20 +213,6 @@ public class dzcjy_activity extends AppCompatActivity implements View.OnClickLis
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
switch (buttonView.getId()) {
case R.id.marialmode_switch://称重模块校准
DeviceData.Get().setCalibrationMode(isChecked, new IWriteCallBack() {
@Override
public void onSuccess() {

}

@Override
public void onFailure(String ErrorMsg) {

}
});

break;
case R.id.out_switch://出口称重模块校准
DeviceData.Get().setWeightCalibrationMode(isChecked, new IWriteCallBack() {



+ 2
- 3
app/src/main/java/com/example/bpa/view/from/lcsz_activity.java Zobrazit soubor

@@ -117,11 +117,10 @@ public class lcsz_activity extends AppCompatActivity implements View.OnClickList
// }
List<BPA_MATERIAL> m = QueryDB.GetMaterialBySilosID(silo.id);
if (m.size() > 0) {
datas.add(new lcMode(silo.id, silo.num, m.get(0).name, "0", m.get(0).id, silo.warningValue, silo.thrsoleValue));
datas.add(new lcMode(silo.id, silo.num, m.get(0).name, "0", m.get(0).id, silo.warningValue, silo.thrsoleValue,silo.name));
} else {
datas.add(new lcMode(silo.id, silo.num, "未设置", "0", "", silo.warningValue, silo.thrsoleValue));
datas.add(new lcMode(silo.id, silo.num, "未设置", "0", "", silo.warningValue, silo.thrsoleValue,silo.name));
}

}
}
lc_item_adapter adapter = new lc_item_adapter(this, datas);


+ 3
- 104
app/src/main/java/com/example/bpa/view/from/lsjy_activity.java Zobrazit soubor

@@ -27,7 +27,7 @@ import java.util.List;
/**
* 流速校验
*/
public class lsjy_activity extends AppCompatActivity implements View.OnClickListener, CompoundButton.OnCheckedChangeListener {
public class lsjy_activity extends AppCompatActivity implements View.OnClickListener {
//region 变量
/**
* 返回按钮
@@ -141,17 +141,6 @@ public class lsjy_activity extends AppCompatActivity implements View.OnClickList
StartButton.setOnClickListener(this);
SaveButton.setOnClickListener(this);
ClearText.setOnClickListener(this);
//switch
// Switch_1.setOnCheckedChangeListener(this);
// Switch_2.setOnCheckedChangeListener(this);
// Switch_3.setOnCheckedChangeListener(this);
// Switch_4.setOnCheckedChangeListener(this);
// Switch_5.setOnCheckedChangeListener(this);
// Switch_6.setOnCheckedChangeListener(this);
// Switch_7.setOnCheckedChangeListener(this);
// Switch_8.setOnCheckedChangeListener(this);
// Switch_9.setOnCheckedChangeListener(this);
// Switch_10.setOnCheckedChangeListener(this);
}

/**
@@ -203,7 +192,7 @@ public class lsjy_activity extends AppCompatActivity implements View.OnClickList
return;
}

DeviceData.Get().setCalibrationReferenceTime(ftime, new IWriteCallBack() {
DeviceData.Get().setCalibrationReferenceTime((short) ftime, new IWriteCallBack() {
@Override
public void onSuccess() {
T.show(lsjy_activity.this, "校准时间写入成功");
@@ -292,96 +281,6 @@ public class lsjy_activity extends AppCompatActivity implements View.OnClickList
break;
}
}

/**
* 本页面switch点击事件监听
*
* @param
*/
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
// switch (buttonView.getId()) {
// case R.id.Switch_1:
// SwitchClick(1, isChecked);
// break;
// case R.id.Switch_2:
// SwitchClick(2, isChecked);
// break;
// case R.id.Switch_3:
// SwitchClick(3, isChecked);
// break;
// case R.id.Switch_4:
// SwitchClick(4, isChecked);
// break;
// case R.id.Switch_5:
// SwitchClick(5, isChecked);
// break;
// case R.id.Switch_6:
// SwitchClick(6, isChecked);
// break;
// case R.id.Switch_7:
// SwitchClick(7, isChecked);
// break;
// case R.id.Switch_8:
// SwitchClick(8, isChecked);
// break;
// case R.id.Switch_9:
// SwitchClick(9, isChecked);
// break;
// case R.id.Switch_10:
// SwitchClick(10, isChecked);
// break;
// }

}

/**
* switch切换
*
* @param index
* @param isChecked
*/
private void SwitchClick(int index, boolean isChecked) {
StringBuffer sb = new StringBuffer("PLC写入:");
new Thread(new Runnable() {
public void run() {
if (isChecked) { //校准开关开启状态才会写入值
String value = editTextLists.get(index - 1).getText().toString();
DeviceData.Get().setCalibrationValue(Short.parseShort(value), index, new IWriteCallBack() {
@Override
public void onSuccess() {
sb.append("通道");
sb.append(index);
sb.append("校准值写入成功;");
}

@Override
public void onFailure(String ErrorMsg) {
sb.append("通道");
sb.append(index);
sb.append("校准值写入失败;");
}
});
}
DeviceData.Get().setChCalibrationSwitch(isChecked, index, new IWriteCallBack() {
@Override
public void onSuccess() {
sb.append("通道");
sb.append(index);
sb.append("校准开关成功;");
}

@Override
public void onFailure(String ErrorMsg) {
sb.append("通道");
sb.append(index);
sb.append("校准开关失败;");
}
});
}
});
T.show(lsjy_activity.this, sb.toString());
}
//endregion

//region 线程
@@ -399,7 +298,7 @@ public class lsjy_activity extends AppCompatActivity implements View.OnClickList
@Override
public void run() {
try {
zhongliang.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(9)/10.0)+" g");
zhongliang.setText(String.valueOf(DeviceData.Get().getCallCurrentWeight(1)/10.0)+" g");
} catch (Exception e) {
MessageLog.ShowInfo("重量解析显示异常!"+e.getMessage());
}


+ 114
- 0
app/src/main/java/com/example/bpa/view/from/sdkz_new_Activity.java Zobrazit soubor

@@ -0,0 +1,114 @@
package com.example.bpa.view.from;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.Switch;
import android.widget.TextView;

import com.example.bpa.Model.IWriteCallBack;
import com.example.bpa.R;
import com.example.bpa.helper.T;
import com.example.bpa.service.DeviceData;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class sdkz_new_Activity extends AppCompatActivity implements View.OnClickListener{

//region 变量
/**
* 返回按钮
*/
ImageView gongneng_fanhui;
/**
* 标题设置
*/
TextView gongneng_title;
//endregion

//region 私有函数
@Override
protected void onCreate(Bundle savedInstanceState) {
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sdkz_new);
Init();
initEvents();
}

@Override
protected void onDestroy() {

try {
//设置自动模式
DeviceData.Get().setHandOrAutoSwitch(true, null);
} catch (Exception e) {

}
super.onDestroy();
}
//endregion

//region 公共函数

/**
* 初始化
*/
private void Init(){
gongneng_fanhui = this.findViewById(R.id.gongneng_fanhui);
gongneng_title = this.findViewById(R.id.gongneng_title);

//通过Activity.getIntent()获取当前页面接收到的Intent。 getXxxExtra方法获取Intent传递过来的数据
String msg = getIntent().getStringExtra("data");
gongneng_title.setText(msg);

//校准开关
Initdata();
}

/**
* 初始化按钮事件
*/
private void initEvents() {
gongneng_fanhui.setOnClickListener(this);
//switch
}

/**
* 初始化数据加载
*/
public void Initdata() {
try {

//设置手动模式
DeviceData.Get().setHandOrAutoSwitch(false, null);
} catch (Exception e) {

}
}
//endregion

//region 点击事件
/**
* 本页面点击事件监听
*
* @param v
*/
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.gongneng_fanhui://返回按钮
this.finish();
break;
}
}
//endregion
}

+ 2
- 1
app/src/main/java/com/example/bpa/view/mode/lcMode.java Zobrazit soubor

@@ -12,7 +12,7 @@ public class lcMode extends BPA_SILOS {
public String silosmargin;
//物料ID
public String materialId;
public lcMode(String id, int num,String materialName, String silosmargin,String materialId,int warningValue,int thrsoleValue) {
public lcMode(String id, int num,String materialName, String silosmargin,String materialId,int warningValue,int thrsoleValue,String name) {
this.materialName = materialName;
this.silosmargin = silosmargin;
this.num = num;
@@ -20,6 +20,7 @@ public class lcMode extends BPA_SILOS {
this.materialId = materialId;
this.warningValue=warningValue;
this.thrsoleValue=thrsoleValue;
this.name=name;
}




+ 1
- 222
app/src/main/res/layout/from/layout/activity_dzcjy.xml Zobrazit soubor

@@ -83,95 +83,12 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp">
<Switch
android:id="@+id/marialmode_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/qs_switch"
android:text="清零去皮模式/零点校准模式"
android:layout_margin="5dp"
android:focusable="true"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"

>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:text="砝码重量:"
android:layout_margin="5dp"/>
<EditText
android:id="@+id/materialweight_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="60dp"
android:textColor="@color/white"
android:backgroundTint="@color/colorAccent"
android:inputType="number|numberDecimal"
android:theme="@style/MyEditText_num"
android:maxLines="1"
android:singleLine="true"
android:layout_margin="5dp"/>
<Button
android:id="@+id/mwSave_button"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:background="@drawable/btn_greenblue"
android:layout_gravity="center_vertical"
android:layout_margin="5dp"
android:text="保存"
/>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">

<Spinner
android:id="@+id/values_spinner"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_margin="5dp"
android:spinnerMode="dropdown"
style="@style/commonSpinnerStyle"
/>
<Button
android:id="@+id/materilwrite_button"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:background="@drawable/btn_greenblue"
android:text="写入砝码值"
android:layout_margin="5dp"/>
<Button
android:id="@+id/calibration_button"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:background="@drawable/btn_greenblue"
android:text="去皮/校准"
android:layout_margin="5dp"/>
<Button
android:id="@+id/allcalibration_button"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:background="@drawable/btn_greenblue"
android:text="一键去皮"
android:layout_margin="5dp"/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentRight="true"
android:layout_margin="10dp">
<Switch
android:id="@+id/out_switch"
@@ -253,145 +170,7 @@
android:textSize="24dp"
android:textColor="@color/white"/>

<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:text="模块_1:"/>
<EditText
android:id="@+id/mode_1_realvalue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/EnableEditTextStyle"
android:minWidth="60dp"
android:layout_marginRight="80dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:text="模块_2:"/>
<EditText
android:id="@+id/mode_2_realvalue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/EnableEditTextStyle"
android:minWidth="60dp"
android:layout_marginRight="80dp"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:text="模块_3:"/>
<EditText
android:id="@+id/mode_3_realvalue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/EnableEditTextStyle"
android:minWidth="60dp"
android:layout_marginRight="80dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:text="模块_4:"/>
<EditText
android:id="@+id/mode_4_realvalue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/EnableEditTextStyle"
android:minWidth="60dp"
/>
</TableRow>

<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:text="模块_5:"/>
<EditText
android:id="@+id/mode_5_realvalue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/EnableEditTextStyle"
android:minWidth="60dp"
android:layout_marginRight="80dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:text="模块_6:"/>
<EditText
android:id="@+id/mode_6_realvalue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/EnableEditTextStyle"
android:minWidth="60dp"
android:layout_marginRight="80dp"
/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:text="模块_7:"/>
<EditText
android:id="@+id/mode_7_realvalue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/EnableEditTextStyle"
android:minWidth="60dp"
android:layout_marginRight="80dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_marginRight="10dp"
android:textStyle="bold"
android:text="模块_8:"/>
<EditText
android:id="@+id/mode_8_realvalue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/EnableEditTextStyle"
android:minWidth="60dp"
/>

</TableRow>






</TableLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"


+ 12
- 12
app/src/main/res/layout/from/layout/activity_lsjy.xml Zobrazit soubor

@@ -66,7 +66,7 @@
android:layout_margin="5dp">
<TextView
android:layout_marginRight="15dp"
android:text="通道一:"
android:text="外置仓一:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -97,7 +97,7 @@

<TextView
android:layout_marginRight="15dp"
android:text="通道二:"
android:text="外置仓二:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -134,7 +134,7 @@
android:layout_margin="5dp">
<TextView
android:layout_marginRight="15dp"
android:text="通道三:"
android:text="外置仓三:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -165,7 +165,7 @@

<TextView
android:layout_marginRight="15dp"
android:text="通道四:"
android:text="外置仓四:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -202,7 +202,7 @@
android:layout_margin="5dp">
<TextView
android:layout_marginRight="15dp"
android:text="通道五:"
android:text="外置仓五:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -233,7 +233,7 @@

<TextView
android:layout_marginRight="15dp"
android:text="通道六:"
android:text="外置仓六:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -270,7 +270,7 @@
android:layout_margin="5dp">
<TextView
android:layout_marginRight="15dp"
android:text="通道七:"
android:text="粉料仓一:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -301,7 +301,7 @@

<TextView
android:layout_marginRight="15dp"
android:text="通道八:"
android:text="粉料仓二:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -338,7 +338,7 @@
android:layout_margin="5dp">
<TextView
android:layout_marginRight="15dp"
android:text="通道九:"
android:text="粉料仓三:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -369,7 +369,7 @@

<TextView
android:layout_marginRight="15dp"
android:text="通道十:"
android:text="粉料仓四:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -406,7 +406,7 @@
android:layout_margin="5dp">
<TextView
android:layout_marginRight="15dp"
android:text="果糖一:"
android:text="酱油料仓:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText
@@ -437,7 +437,7 @@

<TextView
android:layout_marginRight="15dp"
android:text="果糖二:"
android:text="猪油料仓:"
android:textColor="@color/white"
android:textStyle="bold"/>
<EditText


+ 95
- 0
app/src/main/res/layout/from/layout/activity_sdkz_new.xml Zobrazit soubor

@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/dpbj"
android:orientation="vertical"
tools:context=".view.from.sdkz_new_Activity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:background="@color/test">

<ImageView
android:id="@+id/gongneng_fanhui"
android:layout_width="26dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="20dp"
android:src="@mipmap/zj"
android:textColor="@color/titleforeground"
android:textSize="@dimen/TitleSize" />

<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true">

<TextView
android:id="@+id/gongneng_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textColor="@color/white"
android:textSize="@dimen/textTitleSize"
android:textStyle="bold" />

<ImageView
android:layout_width="400dp"
android:layout_height="22dp"
android:layout_alignParentBottom="true"
android:layout_marginLeft="5dp"
android:src="@mipmap/tittle" />
</RelativeLayout>
</RelativeLayout>

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#FF03668F" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp">

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@mipmap/zs" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:src="@mipmap/zx" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:src="@mipmap/ys" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:src="@mipmap/yx" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp">


</RelativeLayout>
</RelativeLayout>
</LinearLayout>

+ 10
- 0
app/src/main/res/layout/item/layout/lc_item.xml Zobrazit soubor

@@ -34,6 +34,16 @@
android:text="48.56g"
android:textColor="@color/white"
android:textSize="12dp" />

<TextView
android:id="@+id/lc_item_silosname"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="60dp"
android:layout_marginLeft="10dp"
android:text="外置仓"
android:textColor="@color/lable_color"
android:textSize="10dp" />
</RelativeLayout>
<TextView
android:id="@+id/lc_item_materialName"


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