Commit 61e61931 by jason

bug 修复

parent 3044f4f2
......@@ -5,7 +5,6 @@ import android.app.Application;
import com.gingersoft.gsa.cloud.common.bean.BaseResult;
import com.gingersoft.gsa.cloud.common.constans.AppConstant;
import com.gingersoft.gsa.cloud.common.utils.JsonUtils;
import com.gingersoft.gsa.cloud.common.utils.log.LogUtil;
import com.gingersoft.gsa.cloud.common.utils.other.TextUtil;
import com.gingersoft.supply_chain.mvp.bean.DishDetailBean;
import com.gingersoft.supply_chain.mvp.bean.DishDetailResultBean;
......
......@@ -8,6 +8,7 @@ import com.gingersoft.gsa.cloud.common.constans.AppConstant;
import com.gingersoft.gsa.cloud.common.utils.JsonUtils;
import com.gingersoft.gsa.cloud.common.utils.MoneyUtil;
import com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils;
import com.gingersoft.gsa.cloud.common.utils.log.LogUtil;
import com.gingersoft.gsa.cloud.common.utils.other.TextUtil;
import com.gingersoft.gsa.cloud.common.utils.time.TimeUtils;
import com.gingersoft.supply_chain.mvp.bean.ConfirmOrderBean;
......@@ -146,16 +147,19 @@ public class ShoppingCatPresenter extends BasePresenter<ShoppingCatContract.Mode
// mod by zjs 默認取下一天時間 改爲 當前時間加上預計多少時間之後的發貨時間
// shoppingCartBean.setInitialShippingTime(TimeUtils.getNextDay(1));
try {
int deliveryTime = Integer.parseInt(food.getDeliveryTime());
Float deliveryTime = Float.parseFloat(food.getDeliveryTime());
LogUtil.i("zjs"," food.getDeliveryTime()="+food.getDeliveryTime()+" deliveryTime="+deliveryTime);
if (deliveryTime <= 0) {
shoppingCartBean.setInitialShippingTime(TimeUtils.getNextDay(1));
} else {
String str = TimeUtils.getCurrentDateByOffset(TimeUtils.DEFAULT_DATE_FORMAT_YMDHM.toPattern(), Calendar.HOUR_OF_DAY, deliveryTime);
int deliveryMinute= (int) (deliveryTime*60);
String str = TimeUtils.getCurrentDateByOffset(TimeUtils.DEFAULT_DATE_FORMAT_YMDHM.toPattern(), Calendar.MINUTE, deliveryMinute);
shoppingCartBean.setInitialShippingTime(str);
}
}catch (Exception e){
e.printStackTrace();
shoppingCartBean.setInitialShippingTime(TimeUtils.getNextDay(1));
LogUtil.e("zjs"," e"+e.getMessage());
}
shoppingCartBean.setSelectFoodAmount(supplierTotalAmount);
......
......@@ -198,7 +198,7 @@ public class DishesFragment extends BaseSupplyChainFragment<DishesPresenter> imp
int lastPost = pNode.getPos()+ppos;
int myPostion=position-ppos;
boolean isCur=position ==lastPost;
// LogUtil.e("ZJS"," lastPost="+lastPost+" myPostion="+myPostion+" isCur="+isCur );
// LogUtil.i("ZJS"," lastPost="+lastPost+" myPostion="+myPostion+" isCur="+isCur );
if (!isCur) {//当前点击的不是上次点击的项目
DishNode lastDishNode= (DishNode) dishesTreeAdapter.getItem(lastPost);
lastDishNode.setSelect(false);
......@@ -276,7 +276,7 @@ public class DishesFragment extends BaseSupplyChainFragment<DishesPresenter> imp
PurchaseFoodBean newBean= purchaseFood.get(i);
for (int j = 0; j < old; j++) {
DishDetailBean oldBean=foodsOld.get(j);
// LogUtil.e("zjs"," oldBean="+oldBean.toString()+" newBean="+newBean.toString());
// LogUtil.i("zjs"," oldBean="+oldBean.toString()+" newBean="+newBean.toString());
if (newBean.getId()==oldBean.getPurchaseFoodId()) {//选择了同一个食材
oldBean.setConsumeQuantity(oldBean.getConsumeQuantity()+newBean.getFoodQuantity());
isNew=false;
......@@ -293,7 +293,7 @@ public class DishesFragment extends BaseSupplyChainFragment<DishesPresenter> imp
}else { //全新
for (int i = 0; i < len; i++) {
PurchaseFoodBean newBean= purchaseFood.get(i);
// LogUtil.e("zjs"," 全新 newBean="+newBean.toString());
// LogUtil.i("zjs"," 全新 newBean="+newBean.toString());
DishDetailBean addNewBean=new DishDetailBean(newBean,curSelectDishNode);
foodsNew.add(addNewBean);
}
......
......@@ -108,7 +108,7 @@ public class FunctionListFragment extends BaseSupplyChainFragment<FunctionListPr
purchaseFunctionBeans.add(new PurchaseFunctionBean("庫存管理", storage));
List<Function> otherFunction = new ArrayList<>();
otherFunction.add(new Function("菜品Boom", R.drawable.ic_inventory_inquiry));
otherFunction.add(new Function("菜品Bom", R.drawable.ic_inventory_inquiry));
purchaseFunctionBeans.add(new PurchaseFunctionBean("其他功能", otherFunction));
......
......@@ -171,7 +171,7 @@ public class NewFoodIngredientsFragment extends BaseSupplyChainFragment<NewFoodI
@Override
public void initAdapter() {
infoMultiAdapter = new InfoMultiAdapter(mContext, mPresenter.getFragmentInfo(mContext, (v, hasFocus) -> {
// LogUtil.e("zjs"," initAdapter currentThread "+v.isPressed()+" hasFocus__"+v.hasFocus()+" hasFocus=="+hasFocus);
// LogUtil.i("zjs"," initAdapter currentThread "+v.isPressed()+" hasFocus__"+v.hasFocus()+" hasFocus=="+hasFocus);
if (hasFocus && purchaseFoodBean != null ) {
Double price= purchaseFoodBean.getUnitPrice();
if (price != null && price>0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment