Browse Source

修改bug

授权码生成工具
liup 4 months ago
parent
commit
ff24df8b33
9 changed files with 36 additions and 35 deletions
  1. +2
    -2
      .idea/deploymentTargetSelector.xml
  2. +0
    -1
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  3. +0
    -1
      app/src/main/java/com/bonait/bnframework/ui/fragment/goods/LocalGoodsFragment.java
  4. +20
    -18
      app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateAllDataService.java
  5. +6
    -7
      app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java
  6. +3
    -3
      app/src/main/res/layout/item/layout/layout_add_goods_sel_classify.xml
  7. +1
    -1
      app/src/main/res/values-en/strings.xml
  8. +1
    -1
      app/src/main/res/values/strings.xml
  9. +3
    -1
      app/src/main/res/values/styles.xml

+ 2
- 2
.idea/deploymentTargetSelector.xml View File

@@ -4,10 +4,10 @@
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-07-27T08:20:10.578111Z">
<DropdownSelection timestamp="2024-08-15T03:12:15.673965900Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="Default" identifier="serial=192.168.100.195:5555;connection=accb0ce3" />
<DeviceId pluginId="Default" identifier="serial=127.0.0.1:7555;connection=ab909648" />
</handle>
</Target>
</DropdownSelection>


+ 0
- 1
app/src/main/java/com/bonait/bnframework/business/MainInit.java View File

@@ -275,7 +275,6 @@ public class MainInit {
}
}
}
ConfigData.getInstance().RevertPLCProcess();
if(QueryDB.GetPlcaddressALL().size()<=0)
{
ConfigData.getInstance().RevertPLCProcess();


+ 0
- 1
app/src/main/java/com/bonait/bnframework/ui/fragment/goods/LocalGoodsFragment.java View File

@@ -332,7 +332,6 @@ public class LocalGoodsFragment extends BaseFragment {
protected void addGoods() {
//添加商品的时候选择一个商品分类
//添加商品的时候选择一个属性分类
addGoodsDialog();
if(!propClassifyList.isEmpty() && getActivity()!=null){
String selectPropName="";
BPA_PROPERTY_CLASSIFY classify= PropClassifyDBUtil.getByName(selectPropName);


+ 20
- 18
app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateAllDataService.java View File

@@ -207,13 +207,18 @@ public class UpdateAllDataService {
boolean isSuccess = true;
StringBuffer names = new StringBuffer();
String errorMsg ="";
for(UpResData upResData:response.body().data){
if (upResData.code>30000){
isSuccess = false;
names.append(upResData.name);
errorMsg=upResData.message;
if(response.body().statusCode == 200){
for(UpResData upResData:response.body().data){
if (upResData.code>30000){
isSuccess = false;
names.append(upResData.name);
errorMsg=upResData.message;
}
}
}else{
isSuccess = false;
}

if(!isSuccess){
NewToastUtil.getInstance().showToastError(errorMsg+"-"+names.toString());
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传"+typeInfo+"失败-重复数据-"+names);
@@ -296,7 +301,7 @@ public class UpdateAllDataService {
Post(url,context,upClassifyBeans,"商品分类信息",(response->{
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传商品分类成功");
WaitProcessUtil.getInstance().Dismiss();
Analysis(context,response,"商品工艺",url).OnSource(()->{
Analysis(context,response,"商品分类",url).OnSource(()->{

});
}));
@@ -399,26 +404,22 @@ public class UpdateAllDataService {
WaitProcessUtil.getInstance().Show("正在上传工艺信息,请耐心稍等...","Uploading process information, please wait...");
for(BPA_GOODS goods:goodsList){
GoodsProcessDetail goodsProcessDetail = new GoodsProcessDetail();
goodsProcessDetail.deviceId = ConfigName.getInstance().DeviceAutoKey;
goodsProcessDetail.goodsId = goods.id;
goodsProcessDetail.deviceId = ConfigName.getInstance().DeviceAutoKey;
goodsProcessDetail.goodsName = goods.name;
goodsProcessDetail.deviceName = "中大型炒锅500";
goodsProcessDetail.warehousrTemplateId = "";
goodsProcessDetail.warehousrTemplateName = "";
List<GoodsProcessDetail.TechnologyActionList> technologyActionLists = new ArrayList<>();
BPA_PROPERTY_CLASSIFY classify = PropClassifyDBUtil.getById(goods.propClassifyId);
assert classify != null;

List<BPA_GOODS_SUBATTRIBUTE_GROUP> groups = SubAttributeGroupDBUtil.getByGoodsId(goods.id);
List<BPA_GOODS_PROCESS_DETAIL> goodsProcessDetails = new ArrayList<>();
for(BPA_GOODS_SUBATTRIBUTE_GROUP group:groups){
goodsProcessDetails.addAll(GoodsProcessDetailDBUtil.getByGroupId(group.id));
}

HashMap<String,String> processModel = new LinkedHashMap<>();
List<BPA_PROCESSModel> processModelList = QueryDB.GetProcessModelALL();
for(BPA_PROCESSModel bean : processModelList){
processModel.put(bean.name,bean.id);
}

for(BPA_GOODS_PROCESS_DETAIL bean : goodsProcessDetails){
GoodsProcessDetail.TechnologyActionList technologyActionList = new GoodsProcessDetail.TechnologyActionList();
technologyActionList.id = bean.id;
technologyActionList.sort = bean.sort+"";
technologyActionList.stepName = bean.processname;
BPA_PROCESS process = ProcessModelUtil.getProcessByName(bean.processname);
@@ -468,7 +469,8 @@ public class UpdateAllDataService {
String name = wl[0];
String val = wl[1];
BPA_PROCESSModel model = ProcessModelUtil.getProcessModelByName(process.id,name);
actionJson.add(new GoodsProcessDetail.TechnologyActionList.ActionJson(name,val,model.id,index));
if(model!=null)
actionJson.add(new GoodsProcessDetail.TechnologyActionList.ActionJson(name,val,model.id,index));
index++;
}
}
@@ -483,7 +485,7 @@ public class UpdateAllDataService {
goodsProcessDetail.technologyActionList = technologyActionLists;
goodsProcessDetailList.add(goodsProcessDetail);
}
String url = "http://"+path+"/api/ExternalPlatform/Goods/AddGoods";
String url = "http://"+path+"/api/ExternalPlatform/Goods/AddGoodsTechnologyAction";
Post(url,context,goodsProcessDetailList,"商品工艺",(response->{
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传商品工艺成功");
NewToastUtil.getInstance().showToast("上传商品工艺成功");


+ 6
- 7
app/src/main/java/com/bonait/bnframework/ui/viewmodel/UpdateDataService.java View File

@@ -340,14 +340,13 @@ public class UpdateDataService {
upClassifyBean.name = classify.name;
upClassifyBean.sort = 0;
upClassifyBean.remark = "";
List<BPA_GOODS> goodsList = GoodsDBUtil.getByClassifyId(classify.id);
goodsList.forEach(good->{
UpGoodsClassifyBean.GoodsList bean = new UpGoodsClassifyBean.GoodsList();
bean.goodsId = good.id;
bean.goodsName = good.name;
upClassifyBean.goodsList.add(bean);
});

UpGoodsClassifyBean.GoodsList bean = new UpGoodsClassifyBean.GoodsList();
bean.goodsId = goods.id;
bean.goodsName = goods.name;
upClassifyBean.goodsList.add(bean);
upClassifyBeans.add(upClassifyBean);

String url = "http://"+path+"/api/ExternalPlatform/Goods/AddGoodsClassify";
Post(url,context,upClassifyBeans,"商品分类信息",(response->{
RecordManager.getInstance().addLogRecord("数据接收", url+"-上传商品分类成功");


+ 3
- 3
app/src/main/res/layout/item/layout/layout_add_goods_sel_classify.xml View File

@@ -22,7 +22,7 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_90"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginLeft="@dimen/dp_50"
android:layout_marginLeft="@dimen/dp_20"
app:layout_constraintTop_toTopOf="parent"
android:layout_marginTop="@dimen/dp_130"
android:text="@string/btn_selectclass_1"
@@ -32,12 +32,12 @@
<Spinner
android:id="@+id/spinner_classify"
style="@style/commonSpinnerStyle"
android:layout_width="@dimen/dp_375"
android:layout_width="@dimen/dp_385"
android:layout_height="@dimen/dp_90"
android:layout_centerVertical="true"
app:layout_constraintLeft_toRightOf="@id/desc1"
app:layout_constraintTop_toTopOf="@id/desc1"
android:layout_marginLeft="@dimen/dp_30"
android:layout_marginLeft="@dimen/dp_20"
/>

<TextView


+ 1
- 1
app/src/main/res/values-en/strings.xml View File

@@ -141,7 +141,7 @@
<string name="btn_addclass">Add Class</string>
<string name="text_deleteinfo">Delete or Not?</string>
<string name="btn_selectclass">Select Class</string>
<string name="btn_selectclass_1">Select Class:</string>
<string name="btn_selectclass_1">Select Attribute Class:</string>
<string name="top_editclass">Edit Class</string>
<string name="text_noselect">Unselect</string>
<string name="text_attribute">Attribute</string>


+ 1
- 1
app/src/main/res/values/strings.xml View File

@@ -139,7 +139,7 @@
<string name="info_editprocess">该组合没有工序,请先编辑工序</string>
<string name="info_selectprocess">请选择每行对应的子属性!</string>
<string name="btn_selectclass">选择分类</string>
<string name="btn_selectclass_1">选择分类:</string>
<string name="btn_selectclass_1">选择属性分类:</string>
<string name="btn_addclass">添加分类</string>
<string name="text_deleteinfo">是否删除?</string>
<string name="top_editclass">编辑分类</string>


+ 3
- 1
app/src/main/res/values/styles.xml View File

@@ -253,7 +253,9 @@
<style name="commonSpinnerStyle" parent="Widget.AppCompat.Spinner">
<item name="android:background">@drawable/spinner_border</item>
<!-- <item name="android:popupBackground">@color/main_background</item>-->
<item name="android:dropDownVerticalOffset">50dp</item>
<!-- <item name="android:dropDownVerticalOffset">50dp</item>-->
<item name="android:spinnerMode">dropdown</item>
<item name="android:overlapAnchor">false</item>
<item name="android:paddingLeft">0dp</item>
<item name="android:paddingRight">4dp</item>
<item name="android:paddingTop">0dp</item>


Loading…
Cancel
Save