Commit 2cd106f2 by jason

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

parent 66986a96
......@@ -8,6 +8,7 @@ import lombok.Data;
* Date: 2021/1/26
* Time: 11:23
* Use:庫存消耗流水
* mod by zjs totalPrice
*/
@Data
public class ConsumeWareHousingBean {
......@@ -18,6 +19,7 @@ public class ConsumeWareHousingBean {
private String description;
private int quantity;
private String supplierName;
private double totalPrice;
/**
* 入庫詳情ids,逗號分隔
*/
......
......@@ -34,6 +34,8 @@ public class PurchaseFoodBean implements Serializable, QMUISection.Model<Purchas
private String images;
private String foodNo;
private String name;
//預計送達時間
private String deliveryTime;
/**
* 單價
*/
......
......@@ -107,6 +107,7 @@ public class WarehouseDetailsBean implements Serializable {
warehousingBean.purchaseConsumeNoId = consumeWareHousingBean.getPurchaseConsumeNoId();
warehousingBean.warehousingOrderDetailsIds = consumeWareHousingBean.getWarehousingOrderDetailsIds();
warehousingBean.remarks = consumeWareHousingBean.getRemarks();
warehousingBean.totalPrice = consumeWareHousingBean.getTotalPrice();
warehousingBean.consumeQuantity = consumeWareHousingBean.getConsumeQuantity();
return warehousingBean;
}
......
......@@ -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.ShoppingCartBean;
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.contract.ShoppingCatContract;
import com.jess.arms.di.scope.FragmentScope;
......@@ -27,6 +26,7 @@ import com.xuexiang.rxutil2.rxjava.RxJavaUtils;
import com.xuexiang.rxutil2.rxjava.task.RxAsyncTask;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
......@@ -143,7 +143,21 @@ public class ShoppingCatPresenter extends BasePresenter<ShoppingCatContract.Mode
}
//運費
// shoppingCartBean.setShipping(shipping);
shoppingCartBean.setInitialShippingTime(TimeUtils.getNextDay(1));
// mod by zjs 默認取下一天時間 改爲 當前時間加上預計多少時間之後的發貨時間
// shoppingCartBean.setInitialShippingTime(TimeUtils.getNextDay(1));
try {
int deliveryTime = Integer.parseInt(food.getDeliveryTime());
if (deliveryTime <= 0) {
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.setSelectSpeciesNum(supplierTotalSpecies);
//統計所有供應商的選中的食材的總金額,加上運費
......
......@@ -61,8 +61,6 @@ public class ShoppingCartAdapter extends BaseQuickAdapter<ShoppingCartBean, Shop
@Override
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()));
//最低採購金額
setTvMinimumAmount(viewHolder);
......
......@@ -56,7 +56,7 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails
//出庫,顯示-
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_warehouse_details_supplier, item.getSupplierName());
......
......@@ -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.ScanSnView;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.utils.DeviceUtils;
import com.qmuiteam.qmui.widget.QMUITopBar;
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