bug修改
This commit is contained in:
parent
47c0f2ee50
commit
ef6fcf9df6
|
|
@ -95,6 +95,14 @@ public class DocumentOutAdapter extends BaseAdapter {
|
|||
holder.quantity.setText(bean.getTotalNum());
|
||||
holder.alreadyClaimedNum.setText(bean.getOutNum());
|
||||
holder.operation.setText("出库");
|
||||
BigDecimal outNum = new BigDecimal(bean.getOutNum());
|
||||
BigDecimal totalNum = new BigDecimal(bean.getTotalNum());
|
||||
Log.e(TAG, "outNum==" + outNum);
|
||||
Log.e(TAG, "totalNum==" + totalNum);
|
||||
if (totalNum.compareTo(outNum) == 0) {
|
||||
holder.operation.setTextColor(Color.parseColor("#808080"));
|
||||
holder.operation.setEnabled(false);
|
||||
}else{
|
||||
holder.operation.setTextColor(Color.parseColor("#006e6b"));
|
||||
holder.operation.setOnClickListener(new DebounceClickListener() {
|
||||
@Override
|
||||
|
|
@ -112,6 +120,8 @@ public class DocumentOutAdapter extends BaseAdapter {
|
|||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return convertView;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,11 +88,9 @@ public class EnterDetailAdapter extends BaseAdapter {
|
|||
holder.name = convertView.findViewById(R.id.name);
|
||||
holder.type = convertView.findViewById(R.id.type);
|
||||
holder.unit = convertView.findViewById(R.id.unit);
|
||||
holder.num = convertView.findViewById(R.id.num);
|
||||
holder.price = convertView.findViewById(R.id.price);
|
||||
holder.subTotal = convertView.findViewById(R.id.sub_total);
|
||||
holder.inspectedGoodsNum = convertView.findViewById(R.id.inspected_goods_num);
|
||||
holder.enterWarehouseNum = convertView.findViewById(R.id.enter_warehouse_num);
|
||||
convertView.setTag(holder);
|
||||
} else {
|
||||
holder = (ViewHolder) convertView.getTag();
|
||||
|
|
@ -105,11 +103,9 @@ public class EnterDetailAdapter extends BaseAdapter {
|
|||
holder.name.setText(bean.getMaterialName());
|
||||
holder.type.setText(bean.getMaterialTypeName());
|
||||
holder.unit.setText(bean.getUnitName());
|
||||
holder.num.setText(bean.getMaterialTotalNum());
|
||||
holder.price.setText(bean.getUnitPrice());
|
||||
holder.inspectedGoodsNum.setText(bean.getInventoryNum());
|
||||
holder.subTotal.setText(bean.getTotalPrice());
|
||||
holder.inspectedGoodsNum.setText(bean.getTotalQualifiedNum());
|
||||
holder.enterWarehouseNum.setText(bean.getIntoNum());
|
||||
return convertView;
|
||||
}
|
||||
private class ViewHolder {
|
||||
|
|
@ -118,11 +114,9 @@ public class EnterDetailAdapter extends BaseAdapter {
|
|||
TextView code;
|
||||
TextView type;
|
||||
TextView unit;
|
||||
TextView num;
|
||||
TextView price;
|
||||
TextView subTotal;
|
||||
TextView inspectedGoodsNum;
|
||||
TextView enterWarehouseNum;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ import com.bonus.canteen.utils.listener.DebounceClickListener;
|
|||
import org.easydarwin.easypusher.R;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public class GoodsAdapter extends BaseAdapter {
|
||||
|
|
@ -121,6 +122,16 @@ public class GoodsAdapter extends BaseAdapter {
|
|||
@Override
|
||||
public void onDebouncedClick(View v) {
|
||||
if (StringHelper.isEmptyAndNull(bean.getIsSelect()) || !bean.getIsSelect().equals("1")) {
|
||||
//判断当前库存是否大于0
|
||||
if (pageType.equals("out")){
|
||||
if (StringHelper.isEmptyAndNull(bean.getMaterialTotalNum()) || new BigDecimal(bean.getMaterialTotalNum()).compareTo(BigDecimal.valueOf(0)) <= 0) {
|
||||
ProductSelectionFragment tempFragment = productSelectionFragment.get();
|
||||
if(tempFragment != null && !tempFragment.isDetached()){
|
||||
tempFragment.showToast("当前商品库存不足,无法选择!");
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
finalHolder.isSelect.setVisibility(View.VISIBLE);
|
||||
bean.setIsSelect("1");
|
||||
selectedGoodsIdList.add(bean.getMaterialId());
|
||||
|
|
|
|||
|
|
@ -96,8 +96,8 @@ public class OutDetailAdapter extends BaseAdapter {
|
|||
holder.name.setText(bean.getMaterialName());
|
||||
holder.type.setText(bean.getMaterialTypeName());
|
||||
holder.unit.setText(bean.getUnitName());
|
||||
holder.num.setText(bean.getMaterialTotalNum());
|
||||
holder.collectedNum.setText(bean.getOutCount());
|
||||
holder.num.setText(bean.getInventoryNum());
|
||||
holder.collectedNum.setText(bean.getFetchNum());
|
||||
return convertView;
|
||||
}
|
||||
private class ViewHolder {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package com.bonus.canteen.entity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import com.bonus.canteen.utils.StringHelper;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
|
@ -84,8 +86,9 @@ public class DocumentBean {
|
|||
this.title = title;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalIntoNum() {
|
||||
return totalIntoNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(totalIntoNum) ? "0" : String.format("%.2f", Double.parseDouble(totalIntoNum));
|
||||
}
|
||||
|
||||
public void setTotalIntoNum(String totalIntoNum) {
|
||||
|
|
@ -96,16 +99,18 @@ public class DocumentBean {
|
|||
this.supplier = supplier;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getNum() {
|
||||
return num;
|
||||
return StringHelper.isEmptyAndNullOrZero(num) ? "0" : String.format("%.2f", Double.parseDouble(num));
|
||||
}
|
||||
|
||||
public void setNum(String num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getAmount() {
|
||||
return StringHelper.isEmptyAndNull(amount) ? "0" : amount;
|
||||
return StringHelper.isEmptyAndNullOrZero(amount) ? "0" : String.format("%.2f", Double.parseDouble(amount));
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package com.bonus.canteen.entity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import com.bonus.canteen.utils.StringHelper;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
|
@ -87,8 +89,9 @@ public class DocumentOutBean {
|
|||
this.title = title;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalNum() {
|
||||
return StringHelper.isEmptyAndNull(totalNum) ? "0" : totalNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(totalNum) ? "0" : String.format("%.2f", Double.parseDouble(totalNum));
|
||||
}
|
||||
|
||||
public void setTotalNum(String totalNum) {
|
||||
|
|
@ -96,8 +99,9 @@ public class DocumentOutBean {
|
|||
}
|
||||
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getOutNum() {
|
||||
return StringHelper.isEmptyAndNull(outNum) ? "0" : outNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(outNum) ? "0" : String.format("%.2f", Double.parseDouble(outNum));
|
||||
}
|
||||
|
||||
public void setOutNum(String outNum) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
package com.bonus.canteen.entity;
|
||||
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import com.bonus.canteen.utils.StringHelper;
|
||||
|
||||
/**
|
||||
* 入库记录对象 ims_into_inventory
|
||||
*
|
||||
|
|
@ -90,8 +94,9 @@ public class EnterRecordBean {
|
|||
this.intoDate = intoDate;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalNum() {
|
||||
return totalNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(totalNum) ? "0" : String.format("%.2f", Double.parseDouble(totalNum));
|
||||
}
|
||||
|
||||
public void setTotalNum(String totalNum) {
|
||||
|
|
@ -130,8 +135,9 @@ public class EnterRecordBean {
|
|||
this.relateDeliveryGoodsId = relateDeliveryGoodsId;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalAmount() {
|
||||
return totalAmount;
|
||||
return StringHelper.isEmptyAndNullOrZero(totalAmount) ? "0" : String.format("%.2f", Double.parseDouble(totalAmount));
|
||||
}
|
||||
|
||||
public void setTotalAmount(String totalAmount) {
|
||||
|
|
|
|||
|
|
@ -17,10 +17,14 @@
|
|||
|
||||
package com.bonus.canteen.entity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import com.bonus.canteen.utils.StringHelper;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class GoodsBean {
|
||||
import java.io.Serializable;
|
||||
|
||||
public class GoodsBean implements Serializable {
|
||||
@SerializedName("materialId")
|
||||
private String materialId;
|
||||
@SerializedName("materialName")
|
||||
|
|
@ -61,8 +65,9 @@ public class GoodsBean {
|
|||
private String outNum;
|
||||
private String outCount;
|
||||
private String ifFillInventory;
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalQualifiedNum() {
|
||||
return StringHelper.isEmptyAndNull(totalQualifiedNum) ? "0" : totalQualifiedNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(totalQualifiedNum) ? "0" : String.format("%.2f", Double.parseDouble(totalQualifiedNum));
|
||||
}
|
||||
|
||||
public String getWarehouseId() {
|
||||
|
|
@ -89,8 +94,9 @@ public class GoodsBean {
|
|||
this.fetchDetailId = fetchDetailId;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getIntoNum() {
|
||||
return StringHelper.isEmptyAndNull(intoNum) ? "0" : intoNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(intoNum) ? "0" : String.format("%.2f", Double.parseDouble(intoNum));
|
||||
}
|
||||
|
||||
public void setIntoNum(String intoNum) {
|
||||
|
|
@ -101,28 +107,32 @@ public class GoodsBean {
|
|||
this.totalQualifiedNum = totalQualifiedNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getFetchNum() {
|
||||
return StringHelper.isEmptyAndNull(fetchNum) ? "0" : fetchNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(fetchNum) ? "0" : String.format("%.2f", Double.parseDouble(fetchNum));
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getDeliveryNum() {
|
||||
return StringHelper.isEmptyAndNull(deliveryNum) ? "0" : deliveryNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(deliveryNum) ? "0" : String.format("%.2f", Double.parseDouble(deliveryNum));
|
||||
}
|
||||
|
||||
public void setDeliveryNum(String deliveryNum) {
|
||||
this.deliveryNum = deliveryNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getOutNum() {
|
||||
return StringHelper.isEmptyAndNull(outNum) ? "0" : outNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(outNum) ? "0" : String.format("%.2f", Double.parseDouble(outNum));
|
||||
}
|
||||
|
||||
public void setOutNum(String outNum) {
|
||||
this.outNum = outNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getOutCount() {
|
||||
return StringHelper.isEmptyAndNull(outCount) ? "0" : outCount;
|
||||
return StringHelper.isEmptyAndNullOrZero(outCount) ? "0" : String.format("%.2f", Double.parseDouble(outCount));
|
||||
}
|
||||
|
||||
public void setOutCount(String outCount) {
|
||||
|
|
@ -189,8 +199,9 @@ public class GoodsBean {
|
|||
this.unitName = unitName;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getUnitPrice() {
|
||||
return StringHelper.isEmptyAndNull(unitPrice) ? "0.00" : unitPrice;
|
||||
return StringHelper.isEmptyAndNullOrZero(unitPrice) ? "0" : String.format("%.2f", Double.parseDouble(unitPrice));
|
||||
}
|
||||
|
||||
public void setUnitPrice(String unitPrice) {
|
||||
|
|
@ -205,8 +216,9 @@ public class GoodsBean {
|
|||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getMaterialTotalNum() {
|
||||
return StringHelper.isEmptyAndNull(materialTotalNum) ? "0" : materialTotalNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(materialTotalNum) ? "0" : String.format("%.2f", Double.parseDouble(materialTotalNum));
|
||||
}
|
||||
|
||||
public void setMaterialTotalNum(String materialTotalNum) {
|
||||
|
|
@ -245,32 +257,36 @@ public class GoodsBean {
|
|||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalPrice() {
|
||||
return StringHelper.isEmptyAndNull(totalPrice) ? "0.00" : totalPrice;
|
||||
return StringHelper.isEmptyAndNullOrZero(totalPrice) ? "0" : String.format("%.2f", Double.parseDouble(totalPrice));
|
||||
}
|
||||
|
||||
public void setTotalPrice(String totalPrice) {
|
||||
this.totalPrice = totalPrice;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getPurNum() {
|
||||
return StringHelper.isEmptyAndNull(purNum) ? "0" : purNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(purNum) ? "0" : String.format("%.2f", Double.parseDouble(purNum));
|
||||
}
|
||||
|
||||
public void setPurNum(String purNum) {
|
||||
this.purNum = purNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getUnqualifiedNum() {
|
||||
return StringHelper.isEmptyAndNull(unqualifiedNum) ? "0" : unqualifiedNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(unqualifiedNum) ? "0" : String.format("%.2f", Double.parseDouble(unqualifiedNum));
|
||||
}
|
||||
|
||||
public void setUnqualifiedNum(String unqualifiedNum) {
|
||||
this.unqualifiedNum = unqualifiedNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getInventoryNum() {
|
||||
return StringHelper.isEmptyAndNull(inventoryNum) ? "0" : inventoryNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(inventoryNum) ? "0" : String.format("%.2f", Double.parseDouble(inventoryNum));
|
||||
}
|
||||
|
||||
public void setInventoryNum(String inventoryNum) {
|
||||
|
|
@ -285,8 +301,9 @@ public class GoodsBean {
|
|||
this.expireTime = expireTime;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getWeight() {
|
||||
return StringHelper.isEmptyAndNull(weight) ? "0" : weight;
|
||||
return StringHelper.isEmptyAndNullOrZero(weight) ? "0" : String.format("%.2f", Double.parseDouble(weight));
|
||||
}
|
||||
|
||||
public void setWeight(String weight) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,362 @@
|
|||
/*
|
||||
* Copyright (C) 2025 xuexiangjys(xuexiangjys@163.com)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.bonus.canteen.entity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import com.bonus.canteen.utils.StringHelper;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class GoodsUploadBean implements Serializable {
|
||||
@SerializedName("materialId")
|
||||
private String materialId;
|
||||
@SerializedName("materialName")
|
||||
private String materialName;
|
||||
@SerializedName("materialCode")
|
||||
private String materialCode;
|
||||
private String materialTypeId;
|
||||
@SerializedName("materialTypeName")
|
||||
private String materialTypeName;
|
||||
@SerializedName("unitId")
|
||||
private String unitId;
|
||||
@SerializedName("unitName")
|
||||
private String unitName;
|
||||
@SerializedName(value = "unitPrice", alternate = {"singlePrice"})
|
||||
private String unitPrice;
|
||||
private String imgUrl;
|
||||
@SerializedName(value = "materialTotalNum", alternate = {"orderNum","materialNum"})
|
||||
private String materialTotalNum;
|
||||
private String isSelect;
|
||||
|
||||
private String inventoryId;
|
||||
private String fetchDetailId;
|
||||
private String supplierId;
|
||||
private String supplierName;
|
||||
private String totalPrice;
|
||||
private String purNum;
|
||||
private String deliveryNum;
|
||||
private String fetchNum;
|
||||
private String unqualifiedNum;
|
||||
private String totalQualifiedNum;
|
||||
private String inventoryNum;
|
||||
private String warehouseId;
|
||||
private String expireTime;
|
||||
private String productDate;
|
||||
private String weight;
|
||||
private String takePhoto;
|
||||
private String intoNum;
|
||||
private String outNum;
|
||||
private String outCount;
|
||||
private String ifFillInventory;
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalQualifiedNum() {
|
||||
return StringHelper.isEmptyAndNullOrZero(totalQualifiedNum) ? "0" : totalQualifiedNum;
|
||||
}
|
||||
|
||||
public String getWarehouseId() {
|
||||
return warehouseId;
|
||||
}
|
||||
|
||||
public void setWarehouseId(String warehouseId) {
|
||||
this.warehouseId = warehouseId;
|
||||
}
|
||||
|
||||
public String getProductDate() {
|
||||
return productDate;
|
||||
}
|
||||
|
||||
public void setProductDate(String productDate) {
|
||||
this.productDate = productDate;
|
||||
}
|
||||
|
||||
public String getFetchDetailId() {
|
||||
return fetchDetailId;
|
||||
}
|
||||
|
||||
public void setFetchDetailId(String fetchDetailId) {
|
||||
this.fetchDetailId = fetchDetailId;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getIntoNum() {
|
||||
return StringHelper.isEmptyAndNullOrZero(intoNum) ? "0" : intoNum;
|
||||
}
|
||||
|
||||
public void setIntoNum(String intoNum) {
|
||||
this.intoNum = intoNum;
|
||||
}
|
||||
|
||||
public void setTotalQualifiedNum(String totalQualifiedNum) {
|
||||
this.totalQualifiedNum = totalQualifiedNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getFetchNum() {
|
||||
return StringHelper.isEmptyAndNullOrZero(fetchNum) ? "0" : fetchNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getDeliveryNum() {
|
||||
return StringHelper.isEmptyAndNullOrZero(deliveryNum) ? "0" : deliveryNum;
|
||||
}
|
||||
|
||||
public void setDeliveryNum(String deliveryNum) {
|
||||
this.deliveryNum = deliveryNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getOutNum() {
|
||||
return StringHelper.isEmptyAndNullOrZero(outNum) ? "0" : outNum;
|
||||
}
|
||||
|
||||
public void setOutNum(String outNum) {
|
||||
this.outNum = outNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getOutCount() {
|
||||
return StringHelper.isEmptyAndNullOrZero(outCount) ? "0" : outCount;
|
||||
}
|
||||
|
||||
public void setOutCount(String outCount) {
|
||||
this.outCount = outCount;
|
||||
}
|
||||
|
||||
public void setFetchNum(String fetchNum) {
|
||||
this.fetchNum = fetchNum;
|
||||
}
|
||||
|
||||
public String getMaterialId() {
|
||||
return materialId;
|
||||
}
|
||||
|
||||
public void setMaterialId(String materialId) {
|
||||
this.materialId = materialId;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialTypeId() {
|
||||
return materialTypeId;
|
||||
}
|
||||
|
||||
public void setMaterialTypeId(String materialTypeId) {
|
||||
this.materialTypeId = materialTypeId;
|
||||
}
|
||||
|
||||
public String getMaterialTypeName() {
|
||||
return materialTypeName;
|
||||
}
|
||||
|
||||
public void setMaterialTypeName(String materialTypeName) {
|
||||
this.materialTypeName = materialTypeName;
|
||||
}
|
||||
|
||||
public String getUnitId() {
|
||||
return unitId;
|
||||
}
|
||||
|
||||
public void setUnitId(String unitId) {
|
||||
this.unitId = unitId;
|
||||
}
|
||||
|
||||
public String getUnitName() {
|
||||
return unitName;
|
||||
}
|
||||
|
||||
public void setUnitName(String unitName) {
|
||||
this.unitName = unitName;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getUnitPrice() {
|
||||
return StringHelper.isEmptyAndNullOrZero(unitPrice) ? "0" : unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(String unitPrice) {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public String getImgUrl() {
|
||||
return StringHelper.isEmptyAndNull(imgUrl) ? "" : imgUrl;
|
||||
}
|
||||
|
||||
public void setImgUrl(String imgUrl) {
|
||||
this.imgUrl = imgUrl;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getMaterialTotalNum() {
|
||||
return StringHelper.isEmptyAndNullOrZero(materialTotalNum) ? "0" : materialTotalNum;
|
||||
}
|
||||
|
||||
public void setMaterialTotalNum(String materialTotalNum) {
|
||||
this.materialTotalNum = materialTotalNum;
|
||||
}
|
||||
|
||||
public String getIsSelect() {
|
||||
return isSelect;
|
||||
}
|
||||
|
||||
public void setIsSelect(String isSelect) {
|
||||
this.isSelect = isSelect;
|
||||
}
|
||||
|
||||
public String getInventoryId() {
|
||||
return inventoryId;
|
||||
}
|
||||
|
||||
public void setInventoryId(String inventoryId) {
|
||||
this.inventoryId = inventoryId;
|
||||
}
|
||||
|
||||
public String getSupplierId() {
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setSupplierId(String supplierId) {
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalPrice() {
|
||||
return StringHelper.isEmptyAndNullOrZero(totalPrice) ? "0" : totalPrice;
|
||||
}
|
||||
|
||||
public void setTotalPrice(String totalPrice) {
|
||||
this.totalPrice = totalPrice;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getPurNum() {
|
||||
return StringHelper.isEmptyAndNullOrZero(purNum) ? "0" : purNum;
|
||||
}
|
||||
|
||||
public void setPurNum(String purNum) {
|
||||
this.purNum = purNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getUnqualifiedNum() {
|
||||
return StringHelper.isEmptyAndNullOrZero(unqualifiedNum) ? "0" : unqualifiedNum;
|
||||
}
|
||||
|
||||
public void setUnqualifiedNum(String unqualifiedNum) {
|
||||
this.unqualifiedNum = unqualifiedNum;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getInventoryNum() {
|
||||
return StringHelper.isEmptyAndNullOrZero(inventoryNum) ? "0" : inventoryNum;
|
||||
}
|
||||
|
||||
public void setInventoryNum(String inventoryNum) {
|
||||
this.inventoryNum = inventoryNum;
|
||||
}
|
||||
|
||||
public String getExpireTime() {
|
||||
return expireTime;
|
||||
}
|
||||
|
||||
public void setExpireTime(String expireTime) {
|
||||
this.expireTime = expireTime;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getWeight() {
|
||||
return StringHelper.isEmptyAndNullOrZero(weight) ? "0" : weight;
|
||||
}
|
||||
|
||||
public void setWeight(String weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public String getTakePhoto() {
|
||||
return takePhoto;
|
||||
}
|
||||
|
||||
public void setTakePhoto(String takePhoto) {
|
||||
this.takePhoto = takePhoto;
|
||||
}
|
||||
|
||||
public String getIfFillInventory() {
|
||||
return ifFillInventory;
|
||||
}
|
||||
|
||||
public void setIfFillInventory(String ifFillInventory) {
|
||||
this.ifFillInventory = ifFillInventory;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "GoodsBean{" +
|
||||
"materialId='" + materialId + '\'' +
|
||||
", materialName='" + materialName + '\'' +
|
||||
", materialCode='" + materialCode + '\'' +
|
||||
", materialTypeId='" + materialTypeId + '\'' +
|
||||
", materialTypeName='" + materialTypeName + '\'' +
|
||||
", unitId='" + unitId + '\'' +
|
||||
", unitName='" + unitName + '\'' +
|
||||
", unitPrice='" + unitPrice + '\'' +
|
||||
", imgUrl='" + imgUrl + '\'' +
|
||||
", materialTotalNum='" + materialTotalNum + '\'' +
|
||||
", isSelect='" + isSelect + '\'' +
|
||||
", inventoryId='" + inventoryId + '\'' +
|
||||
", fetchDetailId='" + fetchDetailId + '\'' +
|
||||
", supplierId='" + supplierId + '\'' +
|
||||
", supplierName='" + supplierName + '\'' +
|
||||
", totalPrice='" + totalPrice + '\'' +
|
||||
", intoNum='" + intoNum + '\'' +
|
||||
", purNum='" + purNum + '\'' +
|
||||
", deliveryNum='" + deliveryNum + '\'' +
|
||||
", fetchNum='" + fetchNum + '\'' +
|
||||
", totalQualifiedNum='" + totalQualifiedNum + '\'' +
|
||||
", unqualifiedNum='" + unqualifiedNum + '\'' +
|
||||
", inventoryNum='" + inventoryNum + '\'' +
|
||||
", expireTime='" + expireTime + '\'' +
|
||||
", productDate='" + productDate + '\'' +
|
||||
", weight='" + weight + '\'' +
|
||||
", takePhoto='" + takePhoto + '\'' +
|
||||
", ifFillInventory='" + ifFillInventory + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,10 @@
|
|||
package com.bonus.canteen.entity;
|
||||
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import com.bonus.canteen.utils.StringHelper;
|
||||
|
||||
/**
|
||||
* 出库记录对象 ims_out_inventory
|
||||
*
|
||||
|
|
@ -96,8 +100,9 @@ public class OutRecordBean{
|
|||
this.fetchUserId = fetchUserId;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalNum() {
|
||||
return totalNum;
|
||||
return StringHelper.isEmptyAndNullOrZero(totalNum) ? "0" : String.format("%.2f", Double.parseDouble(totalNum));
|
||||
}
|
||||
|
||||
public void setTotalNum(String totalNum) {
|
||||
|
|
@ -128,8 +133,9 @@ public class OutRecordBean{
|
|||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
@SuppressLint("DefaultLocale")
|
||||
public String getTotalAmount() {
|
||||
return totalAmount;
|
||||
return StringHelper.isEmptyAndNullOrZero(totalAmount) ? "0" : String.format("%.2f", Double.parseDouble(totalAmount));
|
||||
}
|
||||
|
||||
public void setTotalAmount(String totalAmount) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue