|
|
@@ -36,12 +36,11 @@ public class Main { |
|
|
|
* 初始化 |
|
|
|
*/ |
|
|
|
public void Init() { |
|
|
|
//1.加载系统设置 |
|
|
|
LoadSystem(); |
|
|
|
|
|
|
|
//1.加载配置 |
|
|
|
//LoadingPZ(); |
|
|
|
//2.初始化PLC |
|
|
|
// PLC.getInstance().InitMobus(); |
|
|
|
//2.加载配置 |
|
|
|
LoadingDPPZ(); |
|
|
|
LoadingPZ(); |
|
|
|
//3.初始化业务 |
|
|
|
//4.初始化日志上报adad |
|
|
|
} |
|
|
@@ -56,8 +55,8 @@ public class Main { |
|
|
|
{ |
|
|
|
for (int i = 0; i <10;i++){ |
|
|
|
BPA_SYSTEMSET set=new BPA_SYSTEMSET(); |
|
|
|
set.type=i; |
|
|
|
switch (i) |
|
|
|
set.type=i+1; |
|
|
|
switch (i+1) |
|
|
|
{ |
|
|
|
case 1: |
|
|
|
set.value=String.valueOf(ConfigName.getInstance().OrderPushTime); |
|
|
@@ -137,14 +136,21 @@ public class Main { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 加载店铺配置 |
|
|
|
*/ |
|
|
|
public void LoadingDPPZ() { |
|
|
|
//ConfigName.getInstance().AutKey |
|
|
|
ConfigName.getInstance().Shop_Name="黑菠萝奶茶机"; |
|
|
|
ConfigName.getInstance().DeviceId="20020415-test"; |
|
|
|
} |
|
|
|
/** |
|
|
|
* 加载配置 |
|
|
|
*/ |
|
|
|
public void LoadingPZ() { |
|
|
|
//1.店铺配置 |
|
|
|
ConfigName.getInstance().Shop_Name = ConfigUtil.read(ConfigName.getInstance().dishesCon, "Shop_Name", ConfigName.getInstance().Shop_Name); |
|
|
|
ConfigName.getInstance().AutKey = ConfigUtil.read(ConfigName.getInstance().dishesCon, "AutKey", ConfigName.getInstance().AutKey); |
|
|
|
// ConfigName.getInstance().Shop_Name = ConfigUtil.read(ConfigName.getInstance().dishesCon, "Shop_Name", ConfigName.getInstance().Shop_Name); |
|
|
|
// ConfigName.getInstance().AutKey = ConfigUtil.read(ConfigName.getInstance().dishesCon, "AutKey", ConfigName.getInstance().AutKey); |
|
|
|
//2.用户名称 |
|
|
|
ConfigName.getInstance().user.account = ConfigUtil.read(ConfigName.getInstance().dishesCon, "username", ConfigName.getInstance().user.account); |
|
|
|
ConfigName.getInstance().user.pass = ConfigUtil.read(ConfigName.getInstance().dishesCon, "password", ConfigName.getInstance().user.pass); |
|
|
@@ -156,8 +162,8 @@ public class Main { |
|
|
|
public void SavePZ() |
|
|
|
{ |
|
|
|
//1.店铺配置 |
|
|
|
ConfigUtil.write(ConfigName.getInstance().dishesCon,"Shop_Name", ConfigName.getInstance().Shop_Name); |
|
|
|
ConfigUtil.write(ConfigName.getInstance().dishesCon,"AutKey", ConfigName.getInstance().AutKey); |
|
|
|
// ConfigUtil.write(ConfigName.getInstance().dishesCon,"Shop_Name", ConfigName.getInstance().Shop_Name); |
|
|
|
// ConfigUtil.write(ConfigName.getInstance().dishesCon,"AutKey", ConfigName.getInstance().AutKey); |
|
|
|
//2.用户信息 |
|
|
|
ConfigUtil.write(ConfigName.getInstance().dishesCon,"username", ConfigName.getInstance().user.account); |
|
|
|
ConfigUtil.write(ConfigName.getInstance().dishesCon,"password", ConfigName.getInstance().user.pass); |
|
|
|