@@ -474,24 +474,26 @@ public class ExecuteTheRecipe { | |||||
ModbusTcpServer.get().WriteBool(plcaddress.address, (boolean) value, callback); | ModbusTcpServer.get().WriteBool(plcaddress.address, (boolean) value, callback); | ||||
} else if (plcaddress.address.toUpperCase().startsWith("VW"))//short | } else if (plcaddress.address.toUpperCase().startsWith("VW"))//short | ||||
{ | { | ||||
ModbusTcpServer.get().WriteShort(plcaddress.address, Short.parseShort(value.toString()), callback); | |||||
if(plcaddress.address.contains(".")) | |||||
{ | |||||
String[] res = plcaddress.address.split("[.]"); | |||||
String firstAdd = res[0]; //VW100 | |||||
int endAdd = Integer.parseInt(res[1]); //1 //第几位 | |||||
ModbusTcpServer.get().ReadShort(firstAdd, 1, new IReadCallBack<short[]>() { | |||||
@Override | |||||
public void onSuccess(short[] shorts) { | |||||
Short val=shorts[0]; | |||||
Short valk= ByteHelper.setBit(val,endAdd,(boolean) value); | |||||
ModbusTcpServer.get().WriteShort(firstAdd, valk, null); | |||||
} | |||||
}); | |||||
}else | |||||
{ | |||||
ModbusTcpServer.get().WriteShort(plcaddress.address, Short.parseShort(value.toString()), callback); | |||||
} | |||||
}else if (plcaddress.address.toUpperCase().startsWith("VR"))//float | }else if (plcaddress.address.toUpperCase().startsWith("VR"))//float | ||||
{ | { | ||||
ModbusTcpServer.get().WriteFloat(plcaddress.address, Float.parseFloat(value.toString()), callback); | ModbusTcpServer.get().WriteFloat(plcaddress.address, Float.parseFloat(value.toString()), callback); | ||||
}else if (plcaddress.address.toUpperCase().startsWith("V") && plcaddress.address.contains("."))//位 | |||||
{ | |||||
String[] res = plcaddress.address.split("[.]"); | |||||
String firstAdd = res[0]; //VW100 | |||||
int endAdd = Integer.parseInt(res[1]); //1 //第几位 | |||||
ModbusTcpServer.get().ReadShort(firstAdd, 1, new IReadCallBack<short[]>() { | |||||
@Override | |||||
public void onSuccess(short[] shorts) { | |||||
Short val=shorts[0]; | |||||
Short valk= ByteHelper.setBit(val,endAdd,(boolean) value); | |||||
ModbusTcpServer.get().WriteShort(firstAdd, valk, null); | |||||
} | |||||
}); | |||||
ModbusTcpServer.get().WriteFloat(plcaddress.address, Float.parseFloat(value.toString()), callback); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -526,23 +528,26 @@ public class ExecuteTheRecipe { | |||||
}); | }); | ||||
} else if (plcaddress.address.toUpperCase().startsWith("VW"))//short | } else if (plcaddress.address.toUpperCase().startsWith("VW"))//short | ||||
{ | { | ||||
ModbusTcpServer.get().ReadShort(plcaddress.address, 1, val -> { | |||||
ReturnsVariable[0] = val[0]; | |||||
}); | |||||
if(plcaddress.address.contains(".")) | |||||
{ | |||||
String[] res = plcaddress.address.split("[.]"); | |||||
String firstAdd = res[0].replace("V","VW"); //VW194 | |||||
int endAdd = Integer.parseInt(res[1]); //1 //第几位 | |||||
ModbusTcpServer.get().ReadbcStatus(firstAdd, 1, data -> { | |||||
byte status=data[0];//0x92 | |||||
ReturnsVariable[0] = ByteHelper.getBit(status,endAdd)==1; | |||||
}); | |||||
}else | |||||
{ | |||||
ModbusTcpServer.get().ReadShort(plcaddress.address, 1, val -> { | |||||
ReturnsVariable[0] = val[0]; | |||||
}); | |||||
} | |||||
} else if (plcaddress.address.toUpperCase().startsWith("VR"))//float | } else if (plcaddress.address.toUpperCase().startsWith("VR"))//float | ||||
{ | { | ||||
ModbusTcpServer.get().ReadFloat(plcaddress.address, 1, val -> { | ModbusTcpServer.get().ReadFloat(plcaddress.address, 1, val -> { | ||||
ReturnsVariable[0] = val[0]; | ReturnsVariable[0] = val[0]; | ||||
}); | }); | ||||
}else if (plcaddress.address.toUpperCase().startsWith("V") && plcaddress.address.contains("."))//位 | |||||
{ | |||||
String[] res = plcaddress.address.split("[.]"); | |||||
String firstAdd = res[0].replace("V","VW"); //VW194 | |||||
int endAdd = Integer.parseInt(res[1]); //1 //第几位 | |||||
ModbusTcpServer.get().ReadbcStatus(firstAdd, 1, data -> { | |||||
byte status=data[0];//0x92 | |||||
ReturnsVariable[0] = ByteHelper.getBit(status,endAdd)==1; | |||||
}); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -684,12 +689,15 @@ public class ExecuteTheRecipe { | |||||
if (!plcaddress.address.isEmpty() && ConfigName.getInstance().PlcIsConnect) { | if (!plcaddress.address.isEmpty() && ConfigName.getInstance().PlcIsConnect) { | ||||
ModbusTcpServer.get().ReadString(plcaddress.address, 40, (data) -> { | ModbusTcpServer.get().ReadString(plcaddress.address, 40, (data) -> { | ||||
if (!Code.equals(data)) { | |||||
if (!data.isEmpty() && OnScanTheCodeInformationT != null) { | |||||
ToastUtils.error("当前扫码信息:" + data); | |||||
} | |||||
Code = data; | |||||
if(!data.isEmpty() && !Code.equals(data) && OnScanTheCodeInformationT != null) | |||||
{ | |||||
Log.d("信息", "扫码数据: "+data); | |||||
OnScanTheCodeInformationT.Run(data); | |||||
ModbusTcpServer.get().WriteString(plcaddress.address, 40, null); | |||||
} | } | ||||
//记录上一次读取PLC 扫码数据 | |||||
Code = data; | |||||
}); | }); | ||||
} | } | ||||
} | } | ||||
@@ -378,12 +378,12 @@ public class ConfigName { | |||||
add(new Res_PLCADDRESS("补偿5时间", "VW176", 1, 1)); | add(new Res_PLCADDRESS("补偿5时间", "VW176", 1, 1)); | ||||
add(new Res_PLCADDRESS("补偿6时间", "VW178", 1, 1)); | add(new Res_PLCADDRESS("补偿6时间", "VW178", 1, 1)); | ||||
add(new Res_PLCADDRESS("通道1补偿开关", "V194.0", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道2补偿开关", "V194.1", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道3补偿开关", "V194.2", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道4补偿开关", "V194.3", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道5补偿开关", "V194.4", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道6补偿开关", "V194.5", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道1补偿开关", "VW194.0", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道2补偿开关", "VW194.1", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道3补偿开关", "VW194.2", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道4补偿开关", "VW194.3", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道5补偿开关", "VW194.4", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道6补偿开关", "VW194.5", 1, 1)); | |||||
//电子秤校验 | //电子秤校验 | ||||
add(new Res_PLCADDRESS("电子秤校验", "-------------", 0, 0)); | add(new Res_PLCADDRESS("电子秤校验", "-------------", 0, 0)); | ||||
@@ -678,12 +678,12 @@ public class ConfigName { | |||||
add(new Res_PLCADDRESS("补偿5时间", "VW176", 1, 1)); | add(new Res_PLCADDRESS("补偿5时间", "VW176", 1, 1)); | ||||
add(new Res_PLCADDRESS("补偿6时间", "VW178", 1, 1)); | add(new Res_PLCADDRESS("补偿6时间", "VW178", 1, 1)); | ||||
add(new Res_PLCADDRESS("通道1补偿开关", "V194.0", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道2补偿开关", "V194.1", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道3补偿开关", "V194.2", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道4补偿开关", "V194.3", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道5补偿开关", "V194.4", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道6补偿开关", "V194.5", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道1补偿开关", "VW194.0", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道2补偿开关", "VW194.1", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道3补偿开关", "VW194.2", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道4补偿开关", "VW194.3", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道5补偿开关", "VW194.4", 1, 1)); | |||||
add(new Res_PLCADDRESS("通道6补偿开关", "VW194.5", 1, 1)); | |||||
//电子秤校验 | //电子秤校验 | ||||
add(new Res_PLCADDRESS("电子秤校验", "-------------", 0, 0)); | add(new Res_PLCADDRESS("电子秤校验", "-------------", 0, 0)); | ||||
@@ -801,10 +801,10 @@ public class ConfigName { | |||||
add(new ResSilosModel("粉料仓", 7)); | add(new ResSilosModel("粉料仓", 7)); | ||||
add(new ResSilosModel("粉料仓", 8)); | add(new ResSilosModel("粉料仓", 8)); | ||||
add(new ResSilosModel("粉料仓", 9)); | add(new ResSilosModel("粉料仓", 9)); | ||||
add(new ResSilosModel("酱油仓", 10)); | |||||
add(new ResSilosModel("陈醋仓", 11)); | |||||
add(new ResSilosModel("猪油仓", 12)); | |||||
add(new ResSilosModel("牛油仓", 13)); | |||||
add(new ResSilosModel("液料仓", 10)); | |||||
add(new ResSilosModel("液料仓", 11)); | |||||
add(new ResSilosModel("加热仓", 12)); | |||||
add(new ResSilosModel("加热仓", 13)); | |||||
add(new ResSilosModel("粉料仓", 14)); | add(new ResSilosModel("粉料仓", 14)); | ||||
add(new ResSilosModel("粉料仓", 15)); | add(new ResSilosModel("粉料仓", 15)); | ||||
add(new ResSilosModel("粉料仓", 16)); | add(new ResSilosModel("粉料仓", 16)); | ||||
@@ -202,7 +202,11 @@ public class DataBus { | |||||
make.makeStatus= MakeStatus.等待中; | make.makeStatus= MakeStatus.等待中; | ||||
make.makeMs="等待下发物料!"; | make.makeMs="等待下发物料!"; | ||||
make.makeProcess=0; | make.makeProcess=0; | ||||
GoodsMake.add(make); | |||||
if(make.good!=null) | |||||
{ | |||||
GoodsMake.add(make); | |||||
} | |||||
// MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, "[" + make.good.name + "]准备配料!"); | // MessageLog.ShowUserMessage(UserLogEnum.订单处理日志, "[" + make.good.name + "]准备配料!"); | ||||
if(loadinggoodAdapter!=null) | if(loadinggoodAdapter!=null) | ||||
@@ -318,6 +322,9 @@ public class DataBus { | |||||
m.id = k.id; | m.id = k.id; | ||||
m.name = k.name; | m.name = k.name; | ||||
m.isSelect = false; | m.isSelect = false; | ||||
m.sort=k.sort; | |||||
m.foreignKeyRe=k.foreignKeyRe; | |||||
m.parentid=k.parentid; | |||||
_chid.add(m); | _chid.add(m); | ||||
} | } | ||||
re.child = _chid; | re.child = _chid; | ||||
@@ -1660,6 +1660,19 @@ public class QueryDB { | |||||
} | } | ||||
return data.size() > 0; | return data.size() > 0; | ||||
} | } | ||||
public static boolean GetOrderthirdPartyIDIs(String id) { | |||||
boolean isSucess = false; | |||||
String orderby = Desc_Time_Up;//出料顺序 | |||||
String where = "isDelete=? and thirdPartyID=?"; | |||||
String[] args = new String[]{"0", id}; | |||||
ArrayList<BPA_ORDER> data = new ArrayList<>(); | |||||
ArrayList<Object> obj = Get(BPA_ORDER.class, where, args, orderby); | |||||
for (Object k : obj) { | |||||
data.add((BPA_ORDER) k); | |||||
} | |||||
return data.size() > 0; | |||||
} | |||||
//endregion | //endregion | ||||
//region BPA_SUBORDER 订单子表 | //region BPA_SUBORDER 订单子表 | ||||
@@ -36,7 +36,7 @@ public class TopItemDecoration extends RecyclerView.ItemDecoration{ | |||||
mContext=_context; | mContext=_context; | ||||
mPaint.setColor(ContextCompat.getColor(mContext, R.color.main_background)); | mPaint.setColor(ContextCompat.getColor(mContext, R.color.main_background)); | ||||
textPaint.setColor(ContextCompat.getColor(mContext, R.color.black)); | textPaint.setColor(ContextCompat.getColor(mContext, R.color.black)); | ||||
textPaint.setTextSize(19f); | |||||
textPaint.setTextSize(25f); | |||||
typeListener=type; | typeListener=type; | ||||
} | } | ||||
@@ -52,7 +52,7 @@ public class MakeGoodLeftAdapter extends BaseQuickAdapter<LinkMode, BaseViewHold | |||||
} | } | ||||
//选中行 | //选中行 | ||||
holder.getView(R.id.tv_type).setOnClickListener(new View.OnClickListener() { | |||||
holder.getView(R.id.tv_type_layout).setOnClickListener(new View.OnClickListener() { | |||||
@Override | @Override | ||||
public void onClick(View view) { | public void onClick(View view) { | ||||
setChoose(index_d); | setChoose(index_d); | ||||
@@ -41,7 +41,7 @@ public class MainNavigateTabBar extends LinearLayout implements View.OnClickList | |||||
private ColorStateList mSelectedTextColor; | private ColorStateList mSelectedTextColor; | ||||
private ColorStateList mNormalTextColor; | private ColorStateList mNormalTextColor; | ||||
private float mTabTextSize; | private float mTabTextSize; | ||||
private int mDefaultSelectedTab = 3; | |||||
private int mDefaultSelectedTab = 2; | |||||
private int mCurrentSelectedTab; | private int mCurrentSelectedTab; | ||||
public MainNavigateTabBar(Context context) { | public MainNavigateTabBar(Context context) { | ||||
@@ -350,8 +350,6 @@ public class MainNavigateTabBar extends LinearLayout implements View.OnClickList | |||||
if (index >= 0 && index < mViewHolderList.size()) { | if (index >= 0 && index < mViewHolderList.size()) { | ||||
ViewHolder holder = mViewHolderList.get(index); | ViewHolder holder = mViewHolderList.get(index); | ||||
showFragment(holder); | showFragment(holder); | ||||
} | } | ||||
} | } | ||||
@@ -186,7 +186,6 @@ public class BottomNavigationMainActivity extends BaseActivity { | |||||
break; | break; | ||||
} | } | ||||
viewPager.setCurrentItem(_postion); | viewPager.setCurrentItem(_postion); | ||||
mNavigateTabBar.SetDataResh(_postion); | |||||
} | } | ||||
}; | }; | ||||
/** | /** | ||||
@@ -200,7 +199,6 @@ public class BottomNavigationMainActivity extends BaseActivity { | |||||
@Override | @Override | ||||
public void onPageSelected(int position) { | public void onPageSelected(int position) { | ||||
mNavigateTabBar.setCurrentSelectedTab(position); | mNavigateTabBar.setCurrentSelectedTab(position); | ||||
mNavigateTabBar.SetDataResh(position); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -81,15 +81,15 @@ public class loadinggood_adapter extends RecyclerView.Adapter<RecyclerView.ViewH | |||||
switch (goodsMake.makeStatus.name()) | switch (goodsMake.makeStatus.name()) | ||||
{ | { | ||||
case "等待中": | case "等待中": | ||||
myViewHolder.quxiaozhizuo.setVisibility(View.GONE); | |||||
//myViewHolder.quxiaozhizuo.setVisibility(View.GONE); | |||||
//myViewHolder.loading_status.setTextColor(conmain.getResources().getColor(R.color.text4)); | //myViewHolder.loading_status.setTextColor(conmain.getResources().getColor(R.color.text4)); | ||||
break; | break; | ||||
case "制作中": | case "制作中": | ||||
myViewHolder.quxiaozhizuo.setVisibility(View.VISIBLE);//取消制作 | |||||
// myViewHolder.quxiaozhizuo.setVisibility(View.VISIBLE);//取消制作 | |||||
myViewHolder.loading_status.setTextColor(conmain.getResources().getColor(R.color.green_primary_dark)); | myViewHolder.loading_status.setTextColor(conmain.getResources().getColor(R.color.green_primary_dark)); | ||||
break; | break; | ||||
case "制作完成": | case "制作完成": | ||||
myViewHolder.quxiaozhizuo.setVisibility(View.VISIBLE);//取消制作 | |||||
// myViewHolder.quxiaozhizuo.setVisibility(View.VISIBLE);//取消制作 | |||||
//myViewHolder.loading_status.setTextColor(conmain.getResources().getColor(R.color.tab_text_normal)); | //myViewHolder.loading_status.setTextColor(conmain.getResources().getColor(R.color.tab_text_normal)); | ||||
break; | break; | ||||
} | } | ||||
@@ -109,6 +109,7 @@ public class loadinggood_adapter extends RecyclerView.Adapter<RecyclerView.ViewH | |||||
@Override | @Override | ||||
public void onClick(QMUIDialog dialog, int index) { | public void onClick(QMUIDialog dialog, int index) { | ||||
DataBus.getInstance().DeleteGoodsMake(goodsMake.subOrder.id); | DataBus.getInstance().DeleteGoodsMake(goodsMake.subOrder.id); | ||||
ToastUtils.info("取消订单制作成功!"); | |||||
dialog.dismiss(); | dialog.dismiss(); | ||||
} | } | ||||
}); | }); | ||||
@@ -67,7 +67,7 @@ public class newgood_adapter extends RecyclerView.Adapter<RecyclerView.ViewHolde | |||||
myViewHolder.Tag_text.setText(goods.name); | myViewHolder.Tag_text.setText(goods.name); | ||||
//设置图片 | //设置图片 | ||||
if (!goods.url.equals("未知")) { | |||||
if (!goods.url.equals("未知") && !goods.url.isEmpty() && !goods.url.equals("")) { | |||||
myBitmapUtils.disPlay(myViewHolder.ImageUrl, goods.url); | myBitmapUtils.disPlay(myViewHolder.ImageUrl, goods.url); | ||||
} | } | ||||
@@ -60,7 +60,7 @@ public class newmakegood_adapter extends RecyclerView.Adapter<RecyclerView.View | |||||
myViewHolder.Tag_text.setText(goods.name); | myViewHolder.Tag_text.setText(goods.name); | ||||
//设置图片 | //设置图片 | ||||
if (!goods.url.equals("未知")) { | |||||
if (!goods.url.equals("未知") && !goods.url.isEmpty() && !goods.url.equals("")) { | |||||
myBitmapUtils.disPlay(myViewHolder.ImageUrl, goods.url); | myBitmapUtils.disPlay(myViewHolder.ImageUrl, goods.url); | ||||
} | } | ||||
@@ -7,6 +7,7 @@ import androidx.core.content.ContextCompat; | |||||
import androidx.recyclerview.widget.LinearLayoutManager; | import androidx.recyclerview.widget.LinearLayoutManager; | ||||
import androidx.recyclerview.widget.RecyclerView; | import androidx.recyclerview.widget.RecyclerView; | ||||
import android.app.Activity; | |||||
import android.content.Context; | import android.content.Context; | ||||
import android.content.res.Resources; | import android.content.res.Resources; | ||||
import android.graphics.Color; | import android.graphics.Color; | ||||
@@ -30,11 +31,15 @@ import com.bonait.bnframework.common.constant.MessageName; | |||||
import com.bonait.bnframework.common.db.QueryDB; | import com.bonait.bnframework.common.db.QueryDB; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; | import com.bonait.bnframework.common.db.mode.BPA_GOODPROPERTY; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODS; | import com.bonait.bnframework.common.db.mode.BPA_GOODS; | ||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSRECIPENAME; | |||||
import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE; | import com.bonait.bnframework.common.db.mode.BPA_GOODSTYPE; | ||||
import com.bonait.bnframework.common.db.mode.BPA_ORDER; | |||||
import com.bonait.bnframework.common.db.mode.BPA_SUBORDER; | |||||
import com.bonait.bnframework.common.db.res.ResGoodProperty; | import com.bonait.bnframework.common.db.res.ResGoodProperty; | ||||
import com.bonait.bnframework.common.db.res.ResGoodsMake; | import com.bonait.bnframework.common.db.res.ResGoodsMake; | ||||
import com.bonait.bnframework.common.db.res.SilosLsjyMode; | import com.bonait.bnframework.common.db.res.SilosLsjyMode; | ||||
import com.bonait.bnframework.common.helper.I.IRun; | import com.bonait.bnframework.common.helper.I.IRun; | ||||
import com.bonait.bnframework.common.helper.I.IRunT; | |||||
import com.bonait.bnframework.common.helper.I.IThread; | import com.bonait.bnframework.common.helper.I.IThread; | ||||
import com.bonait.bnframework.common.helper.I.IWriteCallBack; | import com.bonait.bnframework.common.helper.I.IWriteCallBack; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | import com.bonait.bnframework.common.helper.I.MyClickListener; | ||||
@@ -106,9 +111,6 @@ public class MakeGoodFragment extends BaseFragment { | |||||
@BindView(R.id.add_manguan) | @BindView(R.id.add_manguan) | ||||
add_manguan_control add_manguan; | add_manguan_control add_manguan; | ||||
@BindView(R.id.good_gengxin) | |||||
Button good_gengxin; | |||||
/** | /** | ||||
* 当前温度 | * 当前温度 | ||||
*/ | */ | ||||
@@ -132,10 +134,12 @@ public class MakeGoodFragment extends BaseFragment { | |||||
return root; | return root; | ||||
} | } | ||||
public Activity activity; | |||||
@Override | @Override | ||||
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | ||||
super.onViewCreated(view, savedInstanceState); | super.onViewCreated(view, savedInstanceState); | ||||
context = getContext(); | context = getContext(); | ||||
activity=getActivity(); | |||||
initTopBar(); | initTopBar(); | ||||
Initdata(); | Initdata(); | ||||
Run(); | Run(); | ||||
@@ -259,9 +263,12 @@ public class MakeGoodFragment extends BaseFragment { | |||||
return; | return; | ||||
} | } | ||||
if (!ExecuteTheRecipe.IsCup) { | |||||
ToastUtils.warning("出料口没有检测到器皿!"); | |||||
return; | |||||
if (ConfigName.getInstance().versionSelectionEnum.equals("奶茶机")) | |||||
{ | |||||
if (!ExecuteTheRecipe.IsCup) { | |||||
ToastUtils.warning("出料口没有检测到器皿!"); | |||||
return; | |||||
} | |||||
} | } | ||||
@@ -382,6 +389,7 @@ public class MakeGoodFragment extends BaseFragment { | |||||
} | } | ||||
String message=""; | |||||
private Handler mHandler = new Handler() { | private Handler mHandler = new Handler() { | ||||
public void handleMessage(Message msg) { | public void handleMessage(Message msg) { | ||||
switch (msg.what) { | switch (msg.what) { | ||||
@@ -392,10 +400,10 @@ public class MakeGoodFragment extends BaseFragment { | |||||
dianzichen.setText(String.valueOf((int) ExecuteTheRecipe.OutletWeigh / 10.0) + " g"); | dianzichen.setText(String.valueOf((int) ExecuteTheRecipe.OutletWeigh / 10.0) + " g"); | ||||
break; | break; | ||||
case 1: | case 1: | ||||
ToastUtils.warning(message); | |||||
break; | break; | ||||
case 2: | case 2: | ||||
ToastUtils.info(message); | |||||
break; | break; | ||||
} | } | ||||
@@ -420,6 +428,113 @@ public class MakeGoodFragment extends BaseFragment { | |||||
} | } | ||||
}).start(); | }).start(); | ||||
//接收扫码信息 | |||||
ExecuteTheRecipe.OnScanTheCodeInformationT=new IRunT<String>() { | |||||
@Override | |||||
public void Run(String msg) { | |||||
activity.runOnUiThread(new Runnable() { | |||||
@Override | |||||
public void run() { | |||||
if ((msg != null) && (((String) msg).length() > 2) && ((String) msg).contains("|")) { | |||||
//拿到扫码数据 | |||||
//例如 ORD001|P0003|A001,M002,T001|2 | |||||
// OR001|A001|2,22|1 | |||||
String[] res = ((String) msg).split("[|]"); | |||||
if (res.length >= 4) { | |||||
String orderid = res[0];//ORD001 | |||||
String goodid = res[1];//P0003 商品id | |||||
String ggid = res[2];//A001,M002,T001 配方ids | |||||
String ggids = "";//规格id集合 | |||||
String names=""; | |||||
if( QueryDB.GetOrderthirdPartyIDIs(orderid)) | |||||
{ | |||||
message="已有订单,重复扫码!"; | |||||
mHandler.sendEmptyMessage(1); | |||||
return; | |||||
} | |||||
int num = 1; | |||||
try { | |||||
num = Integer.parseInt(res[3]); | |||||
for(String item:ggid.split("[,]")) | |||||
{ | |||||
for(ResGoodProperty k :DataBus.getInstance().bpa_goodproperties) | |||||
{ | |||||
if(k.child!=null && k.child.size()>0) | |||||
{ | |||||
for (ResGoodProperty chd:k.child) | |||||
{ | |||||
if(chd.foreignKeyRe!=null && !chd.foreignKeyRe.isEmpty() && chd.foreignKeyRe.equals(item)) | |||||
{ | |||||
ggids += chd.id + ","; | |||||
names+="/"+chd.name; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
if (!ggids.isEmpty()) { | |||||
ggids = ggids.substring(0, ggids.length() - 1); | |||||
} | |||||
} catch (Exception ex) { | |||||
} | |||||
BPA_GOODS good=QueryDB.GetGoodsforeignKeyId(goodid); | |||||
if(good==null) | |||||
{ | |||||
message="没有查询到该商品!"; | |||||
mHandler.sendEmptyMessage(1); | |||||
}else | |||||
{ | |||||
BPA_GOODSRECIPENAME goodsrecipename = QueryDB.GetGoodsRecipeNameDesignId(ggids,good.id); | |||||
if (goodsrecipename != null) { | |||||
BPA_ORDER order = new BPA_ORDER(); | |||||
order.thirdPartyID =orderid; | |||||
order.status = 0; | |||||
order.deviceID = ConfigName.getInstance().DeviceId; | |||||
order.userID = ConfigName.getInstance().user.userID; | |||||
QueryDB.AddOrder(order); | |||||
for (int mm=0;mm<num;mm++) | |||||
{ | |||||
BPA_SUBORDER suborder = new BPA_SUBORDER(); | |||||
suborder.deviceID = ConfigName.getInstance().DeviceId; | |||||
suborder.userID = ConfigName.getInstance().user.userID; | |||||
suborder.orderID = order.id; | |||||
suborder.goodsID = good.id; | |||||
suborder.recipeID=goodsrecipename.id; | |||||
suborder.number = 1; | |||||
suborder.status = 0; | |||||
suborder.exp=names; | |||||
QueryDB.AddSubOrder(suborder); | |||||
DataBus.getInstance().AddGoodsMake(suborder); | |||||
} | |||||
message="加入订单队列成功!"; | |||||
mHandler.sendEmptyMessage(2); | |||||
} else { | |||||
message="没有查询到该商品配方信息!"; | |||||
mHandler.sendEmptyMessage(1); | |||||
} | |||||
} | |||||
} else { | |||||
message="没有查询到该商品!"; | |||||
mHandler.sendEmptyMessage(1); | |||||
} | |||||
} else { | |||||
message="服务器异常,请稍后重试!"; | |||||
mHandler.sendEmptyMessage(1); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
}; | |||||
} | } | ||||
@Override | @Override | ||||
@@ -183,8 +183,6 @@ public class SilosNewActivity extends BaseActivity { | |||||
Fdata.add(linkMode); | Fdata.add(linkMode); | ||||
i++; | i++; | ||||
} | } | ||||
QMUIFragmentPagerAdapter adapter = new QMUIFragmentPagerAdapter(getSupportFragmentManager()) { | QMUIFragmentPagerAdapter adapter = new QMUIFragmentPagerAdapter(getSupportFragmentManager()) { | ||||
@Override | @Override | ||||
public int getCount() { | public int getCount() { | ||||
@@ -206,8 +204,16 @@ public class SilosNewActivity extends BaseActivity { | |||||
}; | }; | ||||
viewpager_silos.setAdapter(adapter); | viewpager_silos.setAdapter(adapter); | ||||
tabs.setupWithViewPager(viewpager_silos, true); | tabs.setupWithViewPager(viewpager_silos, true); | ||||
tabs.selectTab(0); | |||||
// tabs.selectTab(0); | |||||
// viewpager_silos.setCurrentItem(0); | |||||
adapter.notifyDataSetChanged(); | adapter.notifyDataSetChanged(); | ||||
// for (int l=0;l<Fdata.size();l++) | |||||
// { | |||||
// View view= viewpager_silos.getChildAt(l); | |||||
// } | |||||
} | } | ||||
@@ -59,7 +59,6 @@ public class Silos_item_fragment extends BaseFragment { | |||||
if(dataA!=null) | if(dataA!=null) | ||||
{ | { | ||||
// | // | ||||
// LinearLayoutManager layoutManager = new LinearLayoutManager(context ); | // LinearLayoutManager layoutManager = new LinearLayoutManager(context ); | ||||
// recycler_view_lll.setLayoutManager(layoutManager); | // recycler_view_lll.setLayoutManager(layoutManager); | ||||
@@ -424,9 +424,12 @@ public class Silos_item_jiaoyan_fragment extends LinearLayout { | |||||
return; | return; | ||||
} | } | ||||
if (!ExecuteTheRecipe.IsCup) { | |||||
ToastUtils.warning("出料口没有检测到器皿!"); | |||||
return; | |||||
if (ConfigName.getInstance().versionSelectionEnum.equals("奶茶机")) | |||||
{ | |||||
if (!ExecuteTheRecipe.IsCup) { | |||||
ToastUtils.warning("出料口没有检测到器皿!"); | |||||
return; | |||||
} | |||||
} | } | ||||
short kkk = (short) ((int) (zl * 10)); | short kkk = (short) ((int) (zl * 10)); | ||||
@@ -303,6 +303,7 @@ public class add_yijian_controlextends extends LinearLayout { | |||||
{ | { | ||||
QueryDB.UpdateYL(item.id,item.siloszl); | QueryDB.UpdateYL(item.id,item.siloszl); | ||||
} | } | ||||
ToastUtils.info("料仓加满完成!"); | ToastUtils.info("料仓加满完成!"); | ||||
break; | break; | ||||
case 3://一键清洗 | case 3://一键清洗 | ||||
@@ -31,6 +31,7 @@ import com.bonait.bnframework.business.ExecuteTheRecipe; | |||||
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.QueryDB; | ||||
import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | ||||
import com.bonait.bnframework.common.db.mode.BPA_SILOS; | |||||
import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL; | import com.bonait.bnframework.common.db.mode.BPA_SILOSANDMATERIAL; | ||||
import com.bonait.bnframework.common.db.res.lcMode; | import com.bonait.bnframework.common.db.res.lcMode; | ||||
import com.bonait.bnframework.common.helper.I.IRun; | import com.bonait.bnframework.common.helper.I.IRun; | ||||
@@ -113,6 +114,8 @@ public class silos_jiaoyan extends LinearLayout { | |||||
final int[] time = {0}; | final int[] time = {0}; | ||||
final int[] zl = {0}; | final int[] zl = {0}; | ||||
public boolean isStartMg=false; | |||||
//endregion | //endregion | ||||
//region 物料校准变量 | //region 物料校准变量 | ||||
@@ -173,6 +176,10 @@ public class silos_jiaoyan extends LinearLayout { | |||||
title_bc.setText(lcMode.num+" "+lcMode.materialName); | title_bc.setText(lcMode.num+" "+lcMode.materialName); | ||||
if(lcMode.name.equals("外置仓")) | if(lcMode.name.equals("外置仓")) | ||||
{ | { | ||||
text_jlkz.setVisibility(View.VISIBLE); | |||||
text_bckz.setVisibility(View.VISIBLE); | |||||
text_jlkz1.setVisibility(View.VISIBLE); | |||||
text_bckz1.setVisibility(View.VISIBLE); | |||||
}else | }else | ||||
{ | { | ||||
text_jlkz.setVisibility(View.GONE); | text_jlkz.setVisibility(View.GONE); | ||||
@@ -229,6 +236,22 @@ public class silos_jiaoyan extends LinearLayout { | |||||
InitView("补偿校准"); | InitView("补偿校准"); | ||||
} | } | ||||
}); | }); | ||||
control_switch.setOnCheckedChangeListener(new SwitchButton.OnCheckedChangeListener() { | |||||
@Override | |||||
public void onCheckedChanged(SwitchButton view, boolean isChecked) { | |||||
//设置 | |||||
boolean isopen = control_switch.isChecked(); | |||||
if (ConfigName.getInstance().PlcIsConnect) { | |||||
lcMode.isOpenbcsf=isopen?1:0; | |||||
ExecuteTheRecipe.WritePLC("通道" + lcMode.num + "补偿开关", isopen, null); | |||||
QueryDB.UpdateSilosisOpenbcsf(lcMode.id, isopen); | |||||
ToastUtils.info(lcMode.name.toString() + (isopen ? "打开" : "关闭") + "成功!"); | |||||
} else { | |||||
ToastUtils.warning(lcMode.name.toString() + (isopen ? "打开" : "关闭") + "失败!PLC未连接!!"); | |||||
} | |||||
} | |||||
}); | |||||
} | } | ||||
Activity activity =null; | Activity activity =null; | ||||
@@ -326,8 +349,9 @@ public class silos_jiaoyan extends LinearLayout { | |||||
@Override | @Override | ||||
public void Run() { | public void Run() { | ||||
mHandler.sendEmptyMessage(0); | mHandler.sendEmptyMessage(0); | ||||
if (ExecuteTheRecipe.OutletWeigh >= (zl[0] + 2))//当前重量大于2g | |||||
if ((ExecuteTheRecipe.OutletWeigh >= (zl[0] + 2)) && isStartMg)//当前重量大于2g | |||||
{ | { | ||||
isStartMg=false; | |||||
mHandler.sendEmptyMessage(1); | mHandler.sendEmptyMessage(1); | ||||
} | } | ||||
} | } | ||||
@@ -373,7 +397,7 @@ public class silos_jiaoyan extends LinearLayout { | |||||
new Thread(new Runnable() { | new Thread(new Runnable() { | ||||
@Override | @Override | ||||
public void run() { | public void run() { | ||||
ExecuteTheRecipe.WritePLC("通道" + lcMode.num + "校准开关", true, null); | |||||
if(activity!=null) | if(activity!=null) | ||||
{ | { | ||||
activity.runOnUiThread(new Runnable() { | activity.runOnUiThread(new Runnable() { | ||||
@@ -436,7 +460,7 @@ public class silos_jiaoyan extends LinearLayout { | |||||
R.id.chuliao1, R.id.chuliao2, R.id.chuliao3, | R.id.chuliao1, R.id.chuliao2, R.id.chuliao3, | ||||
R.id.click_mgjz, R.id.click_mgjz_save, | R.id.click_mgjz, R.id.click_mgjz_save, | ||||
R.id.click_wljz, R.id.click_wljz_save, | R.id.click_wljz, R.id.click_wljz_save, | ||||
R.id.control_switch, R.id.click_bcjz_save, | |||||
R.id.click_bcjz_save, | |||||
}) | }) | ||||
public void onViewClicked(View view) { | public void onViewClicked(View view) { | ||||
switch (view.getId()) { | switch (view.getId()) { | ||||
@@ -472,18 +496,6 @@ public class silos_jiaoyan extends LinearLayout { | |||||
case R.id.click_wljz_save://物料校准 保存参数 | case R.id.click_wljz_save://物料校准 保存参数 | ||||
SaveWLJZ(); | SaveWLJZ(); | ||||
break; | break; | ||||
case R.id.control_switch://通道开关 | |||||
boolean isopen = control_switch.isChecked(); | |||||
if (ConfigName.getInstance().PlcIsConnect) { | |||||
lcMode.isOpenbcsf=isopen?1:0; | |||||
ExecuteTheRecipe.WritePLC("通道" + lcMode.num + "补偿开关", isopen, null); | |||||
QueryDB.UpdateSilosisOpenbcsf(lcMode.id, isopen); | |||||
ToastUtils.info(lcMode.name.toString() + (isopen ? "打开" : "关闭") + "成功!"); | |||||
} else { | |||||
ToastUtils.warning(lcMode.name.toString() + (isopen ? "打开" : "关闭") + "失败!PLC未连接!!"); | |||||
} | |||||
break; | |||||
case R.id.click_bcjz_save://补偿校准 保存参数 | case R.id.click_bcjz_save://补偿校准 保存参数 | ||||
SaveBCJZ(); | SaveBCJZ(); | ||||
break; | break; | ||||
@@ -542,11 +554,15 @@ public class silos_jiaoyan extends LinearLayout { | |||||
return; | return; | ||||
} | } | ||||
if (!ExecuteTheRecipe.IsCup) { | |||||
ToastUtils.warning("出料口没有检测到器皿!"); | |||||
return; | |||||
if (ConfigName.getInstance().versionSelectionEnum.equals("奶茶机")) | |||||
{ | |||||
if (!ExecuteTheRecipe.IsCup) { | |||||
ToastUtils.warning("出料口没有检测到器皿!"); | |||||
return; | |||||
} | |||||
} | } | ||||
short kkk = (short) ((int) (zl * 10)); | short kkk = (short) ((int) (zl * 10)); | ||||
new Thread(new Runnable() { | new Thread(new Runnable() { | ||||
@Override | @Override | ||||
@@ -558,6 +574,8 @@ public class silos_jiaoyan extends LinearLayout { | |||||
@Override | @Override | ||||
public void onSuccess() { | public void onSuccess() { | ||||
ExecuteTheRecipe.WritePLC("配料启动", true, null); | ExecuteTheRecipe.WritePLC("配料启动", true, null); | ||||
ToastUtils.warning("启动成功......"); | |||||
} | } | ||||
@Override | @Override | ||||
@@ -630,7 +648,12 @@ public class silos_jiaoyan extends LinearLayout { | |||||
lcMode.fTime=ftime; | lcMode.fTime=ftime; | ||||
lcMode.jTime=stime; | lcMode.jTime=stime; | ||||
lcMode.jValue=zl; | lcMode.jValue=zl; | ||||
QueryDB.UpdateSilosJZTime(lcMode.id, stime, ftime); | |||||
ArrayList<BPA_SILOS> Ss=QueryDB.GetSilosALL(); | |||||
for (BPA_SILOS item:Ss) | |||||
{ | |||||
QueryDB.UpdateSilosJZTime(item.id, stime, ftime); | |||||
} | |||||
QueryDB.UpdateJYZ(lcMode.id, zl); | QueryDB.UpdateJYZ(lcMode.id, zl); | ||||
ExecuteTheRecipe.WritePLC("基准时间", (short) stime_1, new IWriteCallBack() { | ExecuteTheRecipe.WritePLC("基准时间", (short) stime_1, new IWriteCallBack() { | ||||
@Override | @Override | ||||
@@ -648,6 +671,7 @@ public class silos_jiaoyan extends LinearLayout { | |||||
//region 物料校准 | //region 物料校准 | ||||
public void WLJZ() { | public void WLJZ() { | ||||
//判断是否为果糖->判断温度 | //判断是否为果糖->判断温度 | ||||
if (ConfigName.getInstance().versionSelectionEnum.equals("奶茶机")) { | if (ConfigName.getInstance().versionSelectionEnum.equals("奶茶机")) { | ||||
if (lcMode.num == 11) { | if (lcMode.num == 11) { | ||||
@@ -743,6 +767,7 @@ public class silos_jiaoyan extends LinearLayout { | |||||
* 启动定时器 | * 启动定时器 | ||||
*/ | */ | ||||
public void StartTime() { | public void StartTime() { | ||||
isStartMg=true; | |||||
runtime.setBase(SystemClock.elapsedRealtime()); | runtime.setBase(SystemClock.elapsedRealtime()); | ||||
runtime.start(); | runtime.start(); | ||||
new Thread(new Runnable() { | new Thread(new Runnable() { | ||||
@@ -766,6 +791,7 @@ public class silos_jiaoyan extends LinearLayout { | |||||
public int StopTime() { | public int StopTime() { | ||||
long elapsedMillis = SystemClock.elapsedRealtime() - runtime.getBase(); | long elapsedMillis = SystemClock.elapsedRealtime() - runtime.getBase(); | ||||
runtime.stop(); | runtime.stop(); | ||||
isStartMg=false; | |||||
int time = (int) (elapsedMillis / 1000); | int time = (int) (elapsedMillis / 1000); | ||||
new Thread(new Runnable() { | new Thread(new Runnable() { | ||||
@Override | @Override | ||||
@@ -20,7 +20,7 @@ | |||||
<item> | <item> | ||||
<shape> | <shape> | ||||
<solid android:color="#BEAA6A" /> | |||||
<solid android:color="#B68D0C" /> | |||||
<corners android:radius="20dp" /> | <corners android:radius="20dp" /> | ||||
</shape> | </shape> | ||||
</item> | </item> |
@@ -20,7 +20,7 @@ | |||||
<item> | <item> | ||||
<shape> | <shape> | ||||
<solid android:color="#7DCCE1" /> | |||||
<solid android:color="#088BAD" /> | |||||
<corners android:radius="20dp" /> | <corners android:radius="20dp" /> | ||||
</shape> | </shape> | ||||
</item> | </item> |
@@ -20,7 +20,7 @@ | |||||
<item> | <item> | ||||
<shape> | <shape> | ||||
<solid android:color="#EACAF0" /> | |||||
<solid android:color="#8A0FA2" /> | |||||
<corners android:radius="20dp" /> | <corners android:radius="20dp" /> | ||||
</shape> | </shape> | ||||
</item> | </item> |
@@ -20,7 +20,7 @@ | |||||
<item> | <item> | ||||
<shape> | <shape> | ||||
<solid android:color="#7DA342" /> | |||||
<solid android:color="#639F05" /> | |||||
<corners android:radius="20dp" /> | <corners android:radius="20dp" /> | ||||
</shape> | </shape> | ||||
</item> | </item> |
@@ -6,8 +6,8 @@ | |||||
<gradient | <gradient | ||||
android:angle="270" | android:angle="270" | ||||
android:centerY="0" | android:centerY="0" | ||||
android:endColor="#E5E5E5" | |||||
android:startColor="#E5E5E5" | |||||
android:endColor="#200088FF" | |||||
android:startColor="#200088FF" | |||||
/> | /> | ||||
</shape> | </shape> | ||||
</item> | </item> | ||||
@@ -34,8 +34,8 @@ | |||||
<gradient | <gradient | ||||
android:angle="270" | android:angle="270" | ||||
android:centerY="0" | android:centerY="0" | ||||
android:endColor="#00A8E1" | |||||
android:startColor="#00A8E1" /> | |||||
android:endColor="#0088FF" | |||||
android:startColor="#0088FF" /> | |||||
</shape> | </shape> | ||||
</clip> | </clip> | ||||
@@ -20,7 +20,7 @@ | |||||
<item> | <item> | ||||
<shape> | <shape> | ||||
<solid android:color="#E4BACB" /> | |||||
<solid android:color="#B1265E" /> | |||||
<corners android:radius="20dp" /> | <corners android:radius="20dp" /> | ||||
</shape> | </shape> | ||||
</item> | </item> |
@@ -20,7 +20,7 @@ | |||||
<item> | <item> | ||||
<shape> | <shape> | ||||
<solid android:color="#C6D7ED" /> | |||||
<solid android:color="#0956B8" /> | |||||
<corners android:radius="20dp" /> | <corners android:radius="20dp" /> | ||||
</shape> | </shape> | ||||
</item> | </item> |
@@ -20,7 +20,7 @@ | |||||
<item> | <item> | ||||
<shape> | <shape> | ||||
<solid android:color="#CDEA9E" /> | |||||
<solid android:color="#74AF14" /> | |||||
<corners android:radius="20dp" /> | <corners android:radius="20dp" /> | ||||
</shape> | </shape> | ||||
</item> | </item> |
@@ -33,13 +33,13 @@ | |||||
<Button | <Button | ||||
android:id="@+id/add_fl" | android:id="@+id/add_fl" | ||||
android:layout_width="160dp" | android:layout_width="160dp" | ||||
android:layout_height="30dp" | |||||
android:layout_height="45dp" | |||||
android:layout_centerInParent="true" | android:layout_centerInParent="true" | ||||
android:layout_marginLeft="20dp" | android:layout_marginLeft="20dp" | ||||
android:background="@drawable/bg_btn_login_selected" | android:background="@drawable/bg_btn_login_selected" | ||||
android:text="+新建分类" | android:text="+新建分类" | ||||
android:textColor="@color/white" | android:textColor="@color/white" | ||||
android:textSize="14dp" /> | |||||
android:textSize="20dp" /> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
<androidx.recyclerview.widget.RecyclerView | <androidx.recyclerview.widget.RecyclerView | ||||
@@ -66,20 +66,21 @@ | |||||
android:textColor="@color/amber_primary_dark" | android:textColor="@color/amber_primary_dark" | ||||
android:text="(温馨提示:点击商品查看或新建配方.)" | android:text="(温馨提示:点击商品查看或新建配方.)" | ||||
android:textSize="12dp" /> | android:textSize="12dp" /> | ||||
<Button | <Button | ||||
android:id="@+id/add_sp" | android:id="@+id/add_sp" | ||||
android:layout_width="100dp" | android:layout_width="100dp" | ||||
android:layout_height="30dp" | |||||
android:layout_marginTop="10dp" | |||||
android:layout_marginBottom="10dp" | |||||
android:layout_marginRight="20dp" | |||||
android:layout_height="45dp" | |||||
android:layout_alignParentRight="true" | android:layout_alignParentRight="true" | ||||
android:layout_centerInParent="true" | android:layout_centerInParent="true" | ||||
android:layout_marginLeft="@dimen/dp_10" | android:layout_marginLeft="@dimen/dp_10" | ||||
android:layout_marginTop="10dp" | |||||
android:layout_marginRight="20dp" | |||||
android:layout_marginBottom="10dp" | |||||
android:background="@drawable/bg_btn_login_selected" | android:background="@drawable/bg_btn_login_selected" | ||||
android:text="+新建商品" | android:text="+新建商品" | ||||
android:textSize="14dp" | |||||
android:textColor="@color/white"/> | |||||
android:textColor="@color/white" | |||||
android:textSize="20dp" /> | |||||
</RelativeLayout> | </RelativeLayout> | ||||
<RelativeLayout | <RelativeLayout | ||||
@@ -25,18 +25,18 @@ | |||||
android:layout_width="0dp" | android:layout_width="0dp" | ||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:layout_height="match_parent"> | android:layout_height="match_parent"> | ||||
<com.qmuiteam.qmui.widget.tab.QMUITabSegment | <com.qmuiteam.qmui.widget.tab.QMUITabSegment | ||||
android:id="@+id/tabs" | android:id="@+id/tabs" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="43dp" | android:layout_height="43dp" | ||||
android:background="@drawable/qmui_list_item_bg_with_border_bottom" | android:background="@drawable/qmui_list_item_bg_with_border_bottom" | ||||
android:textSize="14sp" | |||||
app:qmui_tab_selected_text_size="16sp" | |||||
app:qmui_tab_normal_text_size="14sp" | |||||
android:textSize="16sp" | |||||
app:qmui_tab_has_indicator="true" | |||||
app:qmui_tab_indicator_height="2dp" | app:qmui_tab_indicator_height="2dp" | ||||
app:qmui_tab_indicator_top="false" | app:qmui_tab_indicator_top="false" | ||||
app:qmui_tab_has_indicator="true" | |||||
/> | |||||
app:qmui_tab_normal_text_size="14sp" | |||||
app:qmui_tab_selected_text_size="16sp" /> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_marginTop="45dp" | android:layout_marginTop="45dp" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
@@ -9,7 +9,7 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginTop="?attr/qmui_topbar_height" | android:layout_marginTop="?attr/qmui_topbar_height" | ||||
android:background="?attr/app_content_bg_color"> | |||||
android:background="@color/main_background"> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
@@ -52,7 +52,7 @@ | |||||
android:fontFamily="sans-serif-condensed-medium" | android:fontFamily="sans-serif-condensed-medium" | ||||
android:text="销量统计" | android:text="销量统计" | ||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="#C6D7ED" | |||||
android:textColor="#0956B8" | |||||
android:textSize="26dp" /> | android:textSize="26dp" /> | ||||
</LinearLayout> | </LinearLayout> | ||||
@@ -86,7 +86,7 @@ | |||||
android:fontFamily="sans-serif-condensed-medium" | android:fontFamily="sans-serif-condensed-medium" | ||||
android:text="订单列表" | android:text="订单列表" | ||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="#EACAF0" | |||||
android:textColor="#8A0FA2" | |||||
android:textSize="26dp" /> | android:textSize="26dp" /> | ||||
</LinearLayout> | </LinearLayout> | ||||
@@ -10,7 +10,7 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginTop="?attr/qmui_topbar_height" | android:layout_marginTop="?attr/qmui_topbar_height" | ||||
android:background="?attr/app_content_bg_color"> | |||||
android:background="@color/main_background"> | |||||
<LinearLayout | <LinearLayout | ||||
android:layout_margin="20dp" | android:layout_margin="20dp" | ||||
@@ -29,16 +29,20 @@ | |||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" | ||||
app:layout_constraintLeft_toLeftOf="parent" | app:layout_constraintLeft_toLeftOf="parent" | ||||
app:layout_constraintTop_toTopOf="parent" /> | app:layout_constraintTop_toTopOf="parent" /> | ||||
<Button | |||||
android:id="@+id/good_gengxin" | |||||
<RelativeLayout | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="30dp" | |||||
android:layout_centerInParent="true" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:background="@drawable/bg_btn_login_selected" | |||||
android:text="刷新" | |||||
android:textColor="@color/white" | |||||
android:textSize="14dp" /> | |||||
android:layout_height="wrap_content"> | |||||
<ImageView | |||||
android:id="@+id/good_gengxin" | |||||
android:layout_width="30dp" | |||||
android:layout_height="30dp" | |||||
android:layout_centerInParent="true" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:src="@mipmap/sxsp" /> | |||||
</RelativeLayout> | |||||
</LinearLayout> | </LinearLayout> | ||||
<LinearLayout | <LinearLayout | ||||
@@ -156,7 +160,7 @@ | |||||
<TextView | <TextView | ||||
android:id="@+id/dianzichen" | android:id="@+id/dianzichen" | ||||
android:layout_width="70dp" | |||||
android:layout_width="100dp" | |||||
android:layout_height="wrap_content" | android:layout_height="wrap_content" | ||||
android:layout_margin="5dp" | android:layout_margin="5dp" | ||||
android:text="11.9g" | android:text="11.9g" | ||||
@@ -9,7 +9,7 @@ | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_marginTop="?attr/qmui_topbar_height" | android:layout_marginTop="?attr/qmui_topbar_height" | ||||
android:background="?attr/app_content_bg_color"> | |||||
android:background="@color/main_background"> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
@@ -51,7 +51,10 @@ | |||||
<ImageView | <ImageView | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_margin="@dimen/dp_10" | |||||
android:layout_marginStart="@dimen/dp_10" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginEnd="@dimen/dp_10" | |||||
android:layout_marginBottom="@dimen/dp_10" | |||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:focusable="false" | android:focusable="false" | ||||
android:src="@mipmap/sz1" /> | android:src="@mipmap/sz1" /> | ||||
@@ -64,7 +67,7 @@ | |||||
android:fontFamily="sans-serif-condensed-medium" | android:fontFamily="sans-serif-condensed-medium" | ||||
android:text="电子秤设置" | android:text="电子秤设置" | ||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="#BEAA6A" | |||||
android:textColor="#B68D0C" | |||||
android:textSize="26dp" /> | android:textSize="26dp" /> | ||||
</LinearLayout> | </LinearLayout> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
@@ -91,7 +94,10 @@ | |||||
<ImageView | <ImageView | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_margin="@dimen/dp_10" | |||||
android:layout_marginStart="@dimen/dp_10" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginEnd="@dimen/dp_10" | |||||
android:layout_marginBottom="@dimen/dp_10" | |||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:focusable="false" | android:focusable="false" | ||||
android:src="@mipmap/sz2" /> | android:src="@mipmap/sz2" /> | ||||
@@ -104,7 +110,7 @@ | |||||
android:fontFamily="sans-serif-condensed-medium" | android:fontFamily="sans-serif-condensed-medium" | ||||
android:text="温度设置" | android:text="温度设置" | ||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="#EACAF0" | |||||
android:textColor="#8A0FA2" | |||||
android:textSize="26dp" /> | android:textSize="26dp" /> | ||||
</LinearLayout> | </LinearLayout> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
@@ -131,7 +137,10 @@ | |||||
<ImageView | <ImageView | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_margin="@dimen/dp_10" | |||||
android:layout_marginStart="@dimen/dp_10" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginEnd="@dimen/dp_10" | |||||
android:layout_marginBottom="@dimen/dp_10" | |||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:focusable="false" | android:focusable="false" | ||||
android:src="@mipmap/sz3" /> | android:src="@mipmap/sz3" /> | ||||
@@ -144,7 +153,7 @@ | |||||
android:fontFamily="sans-serif-condensed-medium" | android:fontFamily="sans-serif-condensed-medium" | ||||
android:text="系统参数" | android:text="系统参数" | ||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="#7DCCE1" | |||||
android:textColor="#088BAD" | |||||
android:textSize="26dp" /> | android:textSize="26dp" /> | ||||
</LinearLayout> | </LinearLayout> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
@@ -183,7 +192,10 @@ | |||||
<ImageView | <ImageView | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_margin="@dimen/dp_10" | |||||
android:layout_marginStart="@dimen/dp_10" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginEnd="@dimen/dp_10" | |||||
android:layout_marginBottom="@dimen/dp_10" | |||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:focusable="false" | android:focusable="false" | ||||
android:src="@mipmap/sz4" /> | android:src="@mipmap/sz4" /> | ||||
@@ -196,7 +208,7 @@ | |||||
android:fontFamily="sans-serif-condensed-medium" | android:fontFamily="sans-serif-condensed-medium" | ||||
android:text="PLC地址" | android:text="PLC地址" | ||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="#7DA342" | |||||
android:textColor="#639F05" | |||||
android:textSize="26dp" /> | android:textSize="26dp" /> | ||||
</LinearLayout> | </LinearLayout> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
@@ -223,7 +235,10 @@ | |||||
<ImageView | <ImageView | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_margin="@dimen/dp_10" | |||||
android:layout_marginStart="@dimen/dp_10" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginEnd="@dimen/dp_10" | |||||
android:layout_marginBottom="@dimen/dp_10" | |||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:focusable="false" | android:focusable="false" | ||||
android:src="@mipmap/sz5" /> | android:src="@mipmap/sz5" /> | ||||
@@ -236,7 +251,7 @@ | |||||
android:fontFamily="sans-serif-condensed-medium" | android:fontFamily="sans-serif-condensed-medium" | ||||
android:text="图片资源" | android:text="图片资源" | ||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="#C6D7ED" | |||||
android:textColor="#0956B8" | |||||
android:textSize="26dp" /> | android:textSize="26dp" /> | ||||
</LinearLayout> | </LinearLayout> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
@@ -262,7 +277,10 @@ | |||||
<ImageView | <ImageView | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:layout_margin="@dimen/dp_10" | |||||
android:layout_marginStart="@dimen/dp_10" | |||||
android:layout_marginTop="@dimen/dp_10" | |||||
android:layout_marginEnd="@dimen/dp_10" | |||||
android:layout_marginBottom="@dimen/dp_10" | |||||
android:layout_weight="1" | android:layout_weight="1" | ||||
android:focusable="false" | android:focusable="false" | ||||
android:src="@mipmap/sz6" /> | android:src="@mipmap/sz6" /> | ||||
@@ -275,7 +293,7 @@ | |||||
android:fontFamily="sans-serif-condensed-medium" | android:fontFamily="sans-serif-condensed-medium" | ||||
android:text="设备信息" | android:text="设备信息" | ||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="#C6D7ED" | |||||
android:textColor="#B1265E" | |||||
android:textSize="26dp" /> | android:textSize="26dp" /> | ||||
</LinearLayout> | </LinearLayout> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
@@ -4,7 +4,7 @@ | |||||
android:orientation="horizontal" | android:orientation="horizontal" | ||||
xmlns:android="http://schemas.android.com/apk/res/android" | xmlns:android="http://schemas.android.com/apk/res/android" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="70dp"> | |||||
android:layout_height="80dp"> | |||||
<LinearLayout | <LinearLayout | ||||
android:layout_marginTop="10dp" | android:layout_marginTop="10dp" | ||||
@@ -27,9 +27,10 @@ | |||||
<TextView | <TextView | ||||
android:id="@+id/tv_type" | android:id="@+id/tv_type" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:textSize="18dp" | |||||
android:textSize="20dp" | |||||
android:layout_marginBottom="@dimen/dp_10" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="wrap_content" | |||||
android:layout_height="match_parent" | |||||
android:layout_marginTop="5dp"/> | android:layout_marginTop="5dp"/> | ||||
<ImageView | <ImageView | ||||
@@ -37,14 +38,14 @@ | |||||
android:layout_centerHorizontal="true" | android:layout_centerHorizontal="true" | ||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="16dp" | |||||
android:layout_height="20dp" | |||||
android:src="@mipmap/update1" | android:src="@mipmap/update1" | ||||
android:layout_marginRight="10dp"/> | android:layout_marginRight="10dp"/> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
<ImageView | <ImageView | ||||
android:id="@+id/tv_delete" | android:id="@+id/tv_delete" | ||||
android:layout_width="20dp" | |||||
android:layout_width="30dp" | |||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:src="@mipmap/delete1" | android:src="@mipmap/delete1" | ||||
android:layout_marginRight="10dp"/> | android:layout_marginRight="10dp"/> | ||||
@@ -7,6 +7,7 @@ | |||||
android:layout_height="80dp"> | android:layout_height="80dp"> | ||||
<RelativeLayout | <RelativeLayout | ||||
android:id="@+id/tv_type_layout" | |||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
android:orientation="vertical"> | android:orientation="vertical"> | ||||
@@ -18,7 +19,7 @@ | |||||
android:layout_centerInParent="true" | android:layout_centerInParent="true" | ||||
android:gravity="center" | android:gravity="center" | ||||
android:text="柠檬茶" | android:text="柠檬茶" | ||||
android:textSize="16dp" /> | |||||
android:textSize="20dp" /> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_alignParentBottom="true" | android:layout_alignParentBottom="true" | ||||
android:id="@+id/tv_image" | android:id="@+id/tv_image" | ||||
@@ -1,8 +1,8 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
xmlns:tools="http://schemas.android.com/tools" | xmlns:tools="http://schemas.android.com/tools" | ||||
android:layout_width="160dp" | |||||
android:layout_height="160dp" | |||||
android:layout_width="220dp" | |||||
android:layout_height="180dp" | |||||
> | > | ||||
<LinearLayout | <LinearLayout | ||||
@@ -17,7 +17,7 @@ | |||||
android:id="@+id/ImageUrl" | android:id="@+id/ImageUrl" | ||||
android:layout_margin="5dp" | android:layout_margin="5dp" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="70dp" | |||||
android:layout_height="90dp" | |||||
android:src="@mipmap/loading3" | android:src="@mipmap/loading3" | ||||
android:scaleType="fitXY" | android:scaleType="fitXY" | ||||
/> | /> | ||||
@@ -30,7 +30,8 @@ | |||||
android:text="清炒三月瓜" | android:text="清炒三月瓜" | ||||
android:textAlignment="center" | android:textAlignment="center" | ||||
android:textColor="@color/gray_deep" | android:textColor="@color/gray_deep" | ||||
tools:ignore="MissingConstraints" /> | |||||
tools:ignore="MissingConstraints" | |||||
android:textSize="20dp"/> | |||||
<RelativeLayout | <RelativeLayout | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="match_parent" | android:layout_height="match_parent" | ||||
@@ -1,9 +1,8 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
xmlns:tools="http://schemas.android.com/tools" | xmlns:tools="http://schemas.android.com/tools" | ||||
android:layout_width="150dp" | |||||
android:layout_height="130dp" | |||||
> | |||||
android:layout_width="220dp" | |||||
android:layout_height="180dp"> | |||||
<LinearLayout | <LinearLayout | ||||
@@ -18,7 +17,7 @@ | |||||
android:id="@+id/ImageUrl" | android:id="@+id/ImageUrl" | ||||
android:layout_margin="5dp" | android:layout_margin="5dp" | ||||
android:layout_width="match_parent" | android:layout_width="match_parent" | ||||
android:layout_height="70dp" | |||||
android:layout_height="115dp" | |||||
android:src="@mipmap/loading3" | android:src="@mipmap/loading3" | ||||
android:scaleType="fitXY" | android:scaleType="fitXY" | ||||
/> | /> | ||||
@@ -33,7 +32,8 @@ | |||||
android:layout_centerInParent="true" | android:layout_centerInParent="true" | ||||
android:layout_marginLeft="5dp" | android:layout_marginLeft="5dp" | ||||
android:text="清炒三月瓜" | android:text="清炒三月瓜" | ||||
android:textColor="@color/gray_deep" | |||||
android:textColor="@color/black" | |||||
android:textSize="20sp" | |||||
tools:ignore="MissingConstraints" /> | tools:ignore="MissingConstraints" /> | ||||
</RelativeLayout> | </RelativeLayout> | ||||
@@ -26,7 +26,8 @@ | |||||
<!-- <color name="blue_primary_dark">#fcc702</color>--> | <!-- <color name="blue_primary_dark">#fcc702</color>--> | ||||
<!-- <color name="app_color_blue">#fcc702</color>--> | <!-- <color name="app_color_blue">#fcc702</color>--> | ||||
<color name="blue_primary_dark">#00A8E1</color> | <color name="blue_primary_dark">#00A8E1</color> | ||||
<color name="app_color_blue">#00A8E1</color> | |||||
<color name="app_color_blue">#0088FF</color> | |||||
<!-- <color name="app_color_blue">#00A8E1</color>--> | |||||
<!-- <color name="blue_primary_dark">#0f70f1</color>--> | <!-- <color name="blue_primary_dark">#0f70f1</color>--> | ||||
<!-- <color name="app_color_blue">#0f70f1</color>--> | <!-- <color name="app_color_blue">#0f70f1</color>--> | ||||
@@ -59,7 +60,7 @@ | |||||
<color name="gray_deep">#666666</color> | <color name="gray_deep">#666666</color> | ||||
<color name="activity_background">#D8D8D8</color> | <color name="activity_background">#D8D8D8</color> | ||||
<color name="activity_background1">#F8F7F7</color> | <color name="activity_background1">#F8F7F7</color> | ||||
<color name="main_background">#EEEEEE</color> | |||||
<color name="main_background">#DCDCDC</color> | |||||
<color name="black_50p">#80000000</color> | <color name="black_50p">#80000000</color> | ||||