@@ -4,10 +4,10 @@ | |||||
<selectionStates> | <selectionStates> | ||||
<SelectionState runConfigName="app"> | <SelectionState runConfigName="app"> | ||||
<option name="selectionMode" value="DROPDOWN" /> | <option name="selectionMode" value="DROPDOWN" /> | ||||
<DropdownSelection timestamp="2024-05-20T08:34:01.979512500Z"> | |||||
<DropdownSelection timestamp="2024-05-21T06:28:46.108596400Z"> | |||||
<Target type="DEFAULT_BOOT"> | <Target type="DEFAULT_BOOT"> | ||||
<handle> | <handle> | ||||
<DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\YFB\.android\avd\1208Height.avd" /> | |||||
<DeviceId pluginId="Default" identifier="serial=192.168.1.12:5555;connection=b043ef16" /> | |||||
</handle> | </handle> | ||||
</Target> | </Target> | ||||
</DropdownSelection> | </DropdownSelection> | ||||
@@ -30,6 +30,7 @@ | |||||
android:networkSecurityConfig="@xml/network_security_config" | android:networkSecurityConfig="@xml/network_security_config" | ||||
android:roundIcon="@mipmap/boluo" | android:roundIcon="@mipmap/boluo" | ||||
android:supportsRtl="true" | android:supportsRtl="true" | ||||
android:usesCleartextTraffic="true" | |||||
android:theme="@style/AppTheme" | android:theme="@style/AppTheme" | ||||
tools:ignore="GoogleAppIndexingWarning" | tools:ignore="GoogleAppIndexingWarning" | ||||
tools:node="merge" | tools:node="merge" | ||||
@@ -94,7 +94,7 @@ public class APIService { | |||||
GoodTypeSynchronous(item);//同步云端商品分类信息 | GoodTypeSynchronous(item);//同步云端商品分类信息 | ||||
GoodPropSynchronous(item.goodsAttributeList);//同步云端商品属性 | |||||
GoodPropSynchronous(item.goodsTypeId,item.goodsAttributeList);//同步云端商品属性 | |||||
GoodInfoSynchronous(item,goods);//同步云端商品信息 | GoodInfoSynchronous(item,goods);//同步云端商品信息 | ||||
@@ -118,7 +118,7 @@ public class APIService { | |||||
* 同步云端商品属性到本地 | * 同步云端商品属性到本地 | ||||
* @param goodsAttributeList | * @param goodsAttributeList | ||||
*/ | */ | ||||
private static void GoodPropSynchronous( List<GoodsAttributeList> goodsAttributeList){ | |||||
private static void GoodPropSynchronous(String goodsTypeId, List<GoodsAttributeList> goodsAttributeList){ | |||||
goodsAttributeList.forEach(goodProperty->{ | goodsAttributeList.forEach(goodProperty->{ | ||||
//属性添加 | //属性添加 | ||||
BPA_GOODPROPERTY bpa_goodproperty = new BPA_GOODPROPERTY(); | BPA_GOODPROPERTY bpa_goodproperty = new BPA_GOODPROPERTY(); | ||||
@@ -126,6 +126,7 @@ public class APIService { | |||||
bpa_goodproperty.parentid ="0"; | bpa_goodproperty.parentid ="0"; | ||||
bpa_goodproperty.id = goodProperty.goodsAttributeId; | bpa_goodproperty.id = goodProperty.goodsAttributeId; | ||||
bpa_goodproperty.userID="超级管理员"; | bpa_goodproperty.userID="超级管理员"; | ||||
bpa_goodproperty.GoodsTypeId=goodsTypeId; | |||||
QueryDB.AddGoodsProperty(bpa_goodproperty); | QueryDB.AddGoodsProperty(bpa_goodproperty); | ||||
//子属性添加 | //子属性添加 | ||||
@@ -14,6 +14,7 @@ import android.widget.Button; | |||||
import com.bonait.bnframework.HBL.Dialog.AlertDialogButton; | import com.bonait.bnframework.HBL.Dialog.AlertDialogButton; | ||||
import com.bonait.bnframework.HBL.Dialog.DialogManager; | import com.bonait.bnframework.HBL.Dialog.DialogManager; | ||||
import com.bonait.bnframework.HBL.Thread.ThreadManager; | |||||
import com.bonait.bnframework.HttpModel.APIService; | import com.bonait.bnframework.HttpModel.APIService; | ||||
import com.bonait.bnframework.R; | import com.bonait.bnframework.R; | ||||
import com.bonait.bnframework.common.base.BaseFragment; | import com.bonait.bnframework.common.base.BaseFragment; | ||||
@@ -69,8 +70,13 @@ public class GongnengFragment extends BaseFragment { | |||||
btn_Sync.setOnClickListener(v->{ | btn_Sync.setOnClickListener(v->{ | ||||
DialogManager.showWarn(context,"同步云端商品会参数本地所有配方数据,\r\n请问是否继续?", AlertDialogButton.YesNo,(s)->{ | DialogManager.showWarn(context,"同步云端商品会参数本地所有配方数据,\r\n请问是否继续?", AlertDialogButton.YesNo,(s)->{ | ||||
if(s){ | if(s){ | ||||
APIService.MainInit(); | |||||
ToastUtils.info("同步成功"); | |||||
ThreadManager.get().execute(new Runnable() { | |||||
@Override | |||||
public void run() { | |||||
APIService.MainInit(); | |||||
ToastUtils.info("同步成功"); | |||||
} | |||||
}); | |||||
} | } | ||||
}); | }); | ||||
}); | }); | ||||
@@ -18,6 +18,7 @@ import com.bonait.bnframework.common.constant.ConfigName; | |||||
import com.bonait.bnframework.common.constant.DataBus; | import com.bonait.bnframework.common.constant.DataBus; | ||||
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_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_MATERIAL; | import com.bonait.bnframework.common.db.mode.BPA_MATERIAL; | ||||
import com.bonait.bnframework.common.helper.I.MyClickListener; | import com.bonait.bnframework.common.helper.I.MyClickListener; | ||||
@@ -272,6 +273,12 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis | |||||
ArrayList<BPA_GOODPROPERTY> ddd=QueryDB.GetGoodsPropertyALL(((BPA_GOODPROPERTY) data).id); | ArrayList<BPA_GOODPROPERTY> ddd=QueryDB.GetGoodsPropertyALL(((BPA_GOODPROPERTY) data).id); | ||||
for (BPA_GOODPROPERTY item:ddd) | for (BPA_GOODPROPERTY item:ddd) | ||||
{ | { | ||||
for(BPA_GOODSRECIPENAME goodsrecipename : QueryDB.GetGoodsSrecipeNameALL()){ | |||||
if(goodsrecipename.name.contains(item.name)){ | |||||
ToastUtils.info("已有配方正在使用该属性,请先删除配方【"+goodsrecipename.name+"】再删除该属性"); | |||||
return; | |||||
} | |||||
} | |||||
QueryDB.DeleteGoodsProperty(item); | QueryDB.DeleteGoodsProperty(item); | ||||
} | } | ||||
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data); | QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data); | ||||
@@ -310,6 +317,12 @@ public class Jcsjgl_sxgl_fragment extends BaseFragment {// implements MyClickLis | |||||
AlertDialogUtils.showDialog(context, title1, message1, new QMUIDialogAction.ActionListener() { | AlertDialogUtils.showDialog(context, title1, message1, new QMUIDialogAction.ActionListener() { | ||||
@Override | @Override | ||||
public void onClick(QMUIDialog dialog, int index) { | public void onClick(QMUIDialog dialog, int index) { | ||||
for(BPA_GOODSRECIPENAME goodsrecipename : QueryDB.GetGoodsSrecipeNameALL()){ | |||||
if(goodsrecipename.name.contains(((BPA_GOODPROPERTY) data).name)){ | |||||
ToastUtils.info("已有配方正在使用该属性,请先删除配方【"+goodsrecipename.name+"】再删除该属性"); | |||||
return; | |||||
} | |||||
} | |||||
QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data); | QueryDB.DeleteGoodsProperty((BPA_GOODPROPERTY) data); | ||||
Initdata_sx(); | Initdata_sx(); | ||||
ToastUtils.info("删除成功"); | ToastUtils.info("删除成功"); | ||||