Commit 2cd106f2 by jason

同步预计时间和出库流水总价代码

parent 66986a96
...@@ -8,6 +8,7 @@ import lombok.Data; ...@@ -8,6 +8,7 @@ import lombok.Data;
* Date: 2021/1/26 * Date: 2021/1/26
* Time: 11:23 * Time: 11:23
* Use:庫存消耗流水 * Use:庫存消耗流水
* mod by zjs totalPrice
*/ */
@Data @Data
public class ConsumeWareHousingBean { public class ConsumeWareHousingBean {
...@@ -18,6 +19,7 @@ public class ConsumeWareHousingBean { ...@@ -18,6 +19,7 @@ public class ConsumeWareHousingBean {
private String description; private String description;
private int quantity; private int quantity;
private String supplierName; private String supplierName;
private double totalPrice;
/** /**
* 入庫詳情ids,逗號分隔 * 入庫詳情ids,逗號分隔
*/ */
......
...@@ -34,6 +34,8 @@ public class PurchaseFoodBean implements Serializable, QMUISection.Model<Purchas ...@@ -34,6 +34,8 @@ public class PurchaseFoodBean implements Serializable, QMUISection.Model<Purchas
private String images; private String images;
private String foodNo; private String foodNo;
private String name; private String name;
//預計送達時間
private String deliveryTime;
/** /**
* 單價 * 單價
*/ */
......
...@@ -107,6 +107,7 @@ public class WarehouseDetailsBean implements Serializable { ...@@ -107,6 +107,7 @@ public class WarehouseDetailsBean implements Serializable {
warehousingBean.purchaseConsumeNoId = consumeWareHousingBean.getPurchaseConsumeNoId(); warehousingBean.purchaseConsumeNoId = consumeWareHousingBean.getPurchaseConsumeNoId();
warehousingBean.warehousingOrderDetailsIds = consumeWareHousingBean.getWarehousingOrderDetailsIds(); warehousingBean.warehousingOrderDetailsIds = consumeWareHousingBean.getWarehousingOrderDetailsIds();
warehousingBean.remarks = consumeWareHousingBean.getRemarks(); warehousingBean.remarks = consumeWareHousingBean.getRemarks();
warehousingBean.totalPrice = consumeWareHousingBean.getTotalPrice();
warehousingBean.consumeQuantity = consumeWareHousingBean.getConsumeQuantity(); warehousingBean.consumeQuantity = consumeWareHousingBean.getConsumeQuantity();
return warehousingBean; return warehousingBean;
} }
......
...@@ -15,7 +15,6 @@ import com.gingersoft.supply_chain.mvp.bean.NewPurchaseOrderBean; ...@@ -15,7 +15,6 @@ import com.gingersoft.supply_chain.mvp.bean.NewPurchaseOrderBean;
import com.gingersoft.supply_chain.mvp.bean.PurchaseFoodBean; import com.gingersoft.supply_chain.mvp.bean.PurchaseFoodBean;
import com.gingersoft.supply_chain.mvp.bean.ShoppingCartBean; import com.gingersoft.supply_chain.mvp.bean.ShoppingCartBean;
import com.gingersoft.supply_chain.mvp.bean.SupplierInfoBean; import com.gingersoft.supply_chain.mvp.bean.SupplierInfoBean;
import com.gingersoft.supply_chain.mvp.content.PurchaseConstant;
import com.gingersoft.supply_chain.mvp.content.SupplyShoppingCart; import com.gingersoft.supply_chain.mvp.content.SupplyShoppingCart;
import com.gingersoft.supply_chain.mvp.contract.ShoppingCatContract; import com.gingersoft.supply_chain.mvp.contract.ShoppingCatContract;
import com.jess.arms.di.scope.FragmentScope; import com.jess.arms.di.scope.FragmentScope;
...@@ -27,6 +26,7 @@ import com.xuexiang.rxutil2.rxjava.RxJavaUtils; ...@@ -27,6 +26,7 @@ import com.xuexiang.rxutil2.rxjava.RxJavaUtils;
import com.xuexiang.rxutil2.rxjava.task.RxAsyncTask; import com.xuexiang.rxutil2.rxjava.task.RxAsyncTask;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
...@@ -143,7 +143,21 @@ public class ShoppingCatPresenter extends BasePresenter<ShoppingCatContract.Mode ...@@ -143,7 +143,21 @@ public class ShoppingCatPresenter extends BasePresenter<ShoppingCatContract.Mode
} }
//運費 //運費
// shoppingCartBean.setShipping(shipping); // shoppingCartBean.setShipping(shipping);
// mod by zjs 默認取下一天時間 改爲 當前時間加上預計多少時間之後的發貨時間
// shoppingCartBean.setInitialShippingTime(TimeUtils.getNextDay(1));
try {
int deliveryTime = Integer.parseInt(food.getDeliveryTime());
if (deliveryTime <= 0) {
shoppingCartBean.setInitialShippingTime(TimeUtils.getNextDay(1)); shoppingCartBean.setInitialShippingTime(TimeUtils.getNextDay(1));
} else {
String str = TimeUtils.getCurrentDateByOffset(TimeUtils.DEFAULT_DATE_FORMAT_YMDHM.toPattern(), Calendar.HOUR_OF_DAY, deliveryTime);
shoppingCartBean.setInitialShippingTime(str);
}
}catch (Exception e){
e.printStackTrace();
shoppingCartBean.setInitialShippingTime(TimeUtils.getNextDay(1));
}
shoppingCartBean.setSelectFoodAmount(supplierTotalAmount); shoppingCartBean.setSelectFoodAmount(supplierTotalAmount);
shoppingCartBean.setSelectSpeciesNum(supplierTotalSpecies); shoppingCartBean.setSelectSpeciesNum(supplierTotalSpecies);
//統計所有供應商的選中的食材的總金額,加上運費 //統計所有供應商的選中的食材的總金額,加上運費
......
...@@ -61,8 +61,6 @@ public class ShoppingCartAdapter extends BaseQuickAdapter<ShoppingCartBean, Shop ...@@ -61,8 +61,6 @@ public class ShoppingCartAdapter extends BaseQuickAdapter<ShoppingCartBean, Shop
@Override @Override
protected void convert(@NotNull ViewHolder viewHolder, ShoppingCartBean shoppingCartBean) { protected void convert(@NotNull ViewHolder viewHolder, ShoppingCartBean shoppingCartBean) {
long curTime=System.currentTimeMillis();
LogUtil.e("ZJS","shoppingCartBean.getInitialShippingTime()="+shoppingCartBean.getInitialShippingTime());
viewHolder.setText(R.id.rv_purchase_shopping_estimate_delivery_time, String.format(estimateDeliveryTimeStr, shoppingCartBean.getInitialShippingTime())); viewHolder.setText(R.id.rv_purchase_shopping_estimate_delivery_time, String.format(estimateDeliveryTimeStr, shoppingCartBean.getInitialShippingTime()));
//最低採購金額 //最低採購金額
setTvMinimumAmount(viewHolder); setTvMinimumAmount(viewHolder);
......
...@@ -56,7 +56,7 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails ...@@ -56,7 +56,7 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails
//出庫,顯示- //出庫,顯示-
setOutStockData(viewHolder, item); setOutStockData(viewHolder, item);
} }
//顯示總價 //顯示總價 add by zjs
viewHolder.setText(R.id.tv_order_total_price, String.format(getContext().getString(R.string.str_total_amount_colon), item.getTotalPrice())); viewHolder.setText(R.id.tv_order_total_price, String.format(getContext().getString(R.string.str_total_amount_colon), item.getTotalPrice()));
//供應商 //供應商
viewHolder.setText(R.id.tv_warehouse_details_supplier, item.getSupplierName()); viewHolder.setText(R.id.tv_warehouse_details_supplier, item.getSupplierName());
......
...@@ -46,7 +46,6 @@ import com.gingersoft.supply_chain.mvp.ui.fragment.BaseSupplyChainFragment; ...@@ -46,7 +46,6 @@ import com.gingersoft.supply_chain.mvp.ui.fragment.BaseSupplyChainFragment;
import com.gingersoft.supply_chain.mvp.ui.widget.InventoryConsumptionView; import com.gingersoft.supply_chain.mvp.ui.widget.InventoryConsumptionView;
import com.gingersoft.supply_chain.mvp.ui.widget.ScanSnView; import com.gingersoft.supply_chain.mvp.ui.widget.ScanSnView;
import com.jess.arms.di.component.AppComponent; import com.jess.arms.di.component.AppComponent;
import com.jess.arms.utils.DeviceUtils;
import com.qmuiteam.qmui.widget.QMUITopBar; import com.qmuiteam.qmui.widget.QMUITopBar;
import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.SmartRefreshLayout;
......
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