Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
supplier
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王宇航
supplier
Commits
8a4d2d49
Commit
8a4d2d49
authored
Jul 30, 2021
by
jason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
食材数量 支持小数点
parent
044908ec
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
21 additions
and
21 deletions
+21
-21
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/ConfirmOrderBean.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/DishDetailBean.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/NewPurchaseOrderBean.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/OrderWareHouseBean.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/PurchaseFoodBean.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/BuyIngredientsAdapter.java
+2
-2
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/FoodListAdapter.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/ShoppingCartAdapter.java
+5
-5
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/dishes/DishDetailAdapter.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/FunctionListFragment.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/food/BuyIngredientsFragment.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/food/OtherFunctionFragment.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/widget/GoodsDetailsPopup.java
+3
-3
component-supply-chain/src/main/res/layout/item_dishes_foods.xml
+1
-1
No files found.
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/ConfirmOrderBean.java
View file @
8a4d2d49
...
...
@@ -64,7 +64,7 @@ public class ConfirmOrderBean {
@Data
public
static
class
PurchaseOrderDetails
{
private
int
purchaseFoodId
;
private
int
foodQuantity
;
private
double
foodQuantity
;
private
double
foodPrice
;
private
int
orderId
;
}
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/DishDetailBean.java
View file @
8a4d2d49
...
...
@@ -17,7 +17,7 @@ public class DishDetailBean {
private
int
restaurantId
;
// number 非必须
private
int
purchaseFoodId
;
// number 非必须 食材编号
private
String
foodName
;
// string 非必须 食材名称
private
int
consumeQuantity
;
// number 非必须 消耗个数
private
double
consumeQuantity
;
// number 非必须 消耗个数
private
String
basicUnitName
;
// string 非必须 配置单位
private
String
foodNo
;
// string 非必须 食材编号
private
int
type
;
// number 非必须 状态 0 食材 1 细项
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/NewPurchaseOrderBean.java
View file @
8a4d2d49
...
...
@@ -22,7 +22,7 @@ public class NewPurchaseOrderBean {
@Data
public
static
class
NewPurchaseOrderDetailsBean
{
private
int
foodId
;
private
int
foodQuantity
;
private
double
foodQuantity
;
private
double
foodPrice
;
private
int
supplierId
;
}
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/OrderWareHouseBean.java
View file @
8a4d2d49
...
...
@@ -40,7 +40,7 @@ public class OrderWareHouseBean {
public
static
class
PurchaseWarehousingOrderDetail
{
private
Integer
orderDetailsId
;
private
Integer
purchaseFoodId
;
private
int
foodQuantity
;
private
double
foodQuantity
;
private
double
foodPrice
;
private
double
totalPrice
;
private
int
brandId
;
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/PurchaseFoodBean.java
View file @
8a4d2d49
...
...
@@ -56,7 +56,7 @@ public class PurchaseFoodBean implements Serializable, QMUISection.Model<Purchas
*/
private
String
packingDescription
;
private
long
createTime
;
private
int
foodQuantity
;
private
double
foodQuantity
;
/**
* 最低採購金額,食品列表用
*/
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/BuyIngredientsAdapter.java
View file @
8a4d2d49
...
...
@@ -288,7 +288,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi
});
}
private
void
foodNumberChange
(
BaseViewHolder
itemViewHolder
,
PurchaseFoodBean
purchaseFoodBean
,
int
groupPosition
,
int
childPosition
,
int
changeNum
)
{
private
void
foodNumberChange
(
BaseViewHolder
itemViewHolder
,
PurchaseFoodBean
purchaseFoodBean
,
int
groupPosition
,
int
childPosition
,
double
changeNum
)
{
purchaseFoodBean
.
setFoodQuantity
(
purchaseFoodBean
.
getFoodQuantity
()
+
changeNum
);
itemViewHolder
.
setText
(
R
.
id
.
ed_food_ingredient_number
,
String
.
valueOf
(
purchaseFoodBean
.
getFoodQuantity
()));
setSubAndNumShow
(
itemViewHolder
,
purchaseFoodBean
.
getFoodQuantity
()
<=
0
);
...
...
@@ -308,7 +308,7 @@ public class BuyIngredientsAdapter extends GroupedRecyclerViewAdapter<BuyIngredi
* @param beforeNum 之前的數量
* @param currentNum 現在的數量
*/
void
onChange
(
PurchaseFoodBean
purchaseFoodBean
,
int
parentCategoryIndex
,
int
categoryIndex
,
int
beforeNum
,
int
currentNum
);
void
onChange
(
PurchaseFoodBean
purchaseFoodBean
,
int
parentCategoryIndex
,
int
categoryIndex
,
double
beforeNum
,
double
currentNum
);
}
public
void
setOnFoodNumberChangeListener
(
OnFoodNumberChangeListener
onFoodNumberChangeListener
)
{
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/FoodListAdapter.java
View file @
8a4d2d49
...
...
@@ -146,7 +146,7 @@ public class FoodListAdapter extends BaseQuickAdapter<PurchaseFoodBean, BaseView
* @param number 修改後的食品數量
* @param position 操作的食品下標
*/
void
onChanged
(
int
beforeNumber
,
int
number
,
int
position
);
void
onChanged
(
double
beforeNumber
,
double
number
,
int
position
);
}
public
void
setOnCheckedChangeListener
(
OnCheckedChangeListener
onCheckedChangeListener
)
{
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/ShoppingCartAdapter.java
View file @
8a4d2d49
...
...
@@ -297,7 +297,7 @@ public class ShoppingCartAdapter extends BaseQuickAdapter<ShoppingCartBean, Shop
* @param purchaseFoodBean 需要刪除的食品對象
* @return 是否刪除供應商
*/
private
boolean
deleteFood
(
int
supplierPosition
,
BaseViewHolder
viewHolder
,
TextView
tvFoodTypeNumber
,
FoodListAdapter
foodListAdapter
,
int
beforeNumber
,
int
position
,
PurchaseFoodBean
purchaseFoodBean
)
{
private
boolean
deleteFood
(
int
supplierPosition
,
BaseViewHolder
viewHolder
,
TextView
tvFoodTypeNumber
,
FoodListAdapter
foodListAdapter
,
double
beforeNumber
,
int
position
,
PurchaseFoodBean
purchaseFoodBean
)
{
foodListAdapter
.
removeAt
(
position
);
//如果這個供應商沒有食品了,需要當前adapter刪除掉這個供應商
if
(
foodListAdapter
.
getItemCount
()
==
0
)
{
...
...
@@ -328,7 +328,7 @@ public class ShoppingCartAdapter extends BaseQuickAdapter<ShoppingCartBean, Shop
* @param unitPrice 食品單價
* @param foodQuantity 食品數量
*/
private
void
minusFood
(
BaseViewHolder
viewHolder
,
ShoppingCartBean
cartBean
,
double
unitPrice
,
int
foodQuantity
)
{
private
void
minusFood
(
BaseViewHolder
viewHolder
,
ShoppingCartBean
cartBean
,
double
unitPrice
,
double
foodQuantity
)
{
int
species
=
cartBean
.
getSelectSpeciesNum
()
-
1
;
cartBean
.
setSelectSpeciesNum
(
species
);
viewHolder
.
setText
(
R
.
id
.
tv_order_item_food_type_total
,
String
.
valueOf
(
species
));
...
...
@@ -342,7 +342,7 @@ public class ShoppingCartAdapter extends BaseQuickAdapter<ShoppingCartBean, Shop
* @param unitPrice 食品單價
* @param foodQuantity 食品數量
*/
private
void
addFood
(
BaseViewHolder
viewHolder
,
ShoppingCartBean
cartBean
,
double
unitPrice
,
int
foodQuantity
)
{
private
void
addFood
(
BaseViewHolder
viewHolder
,
ShoppingCartBean
cartBean
,
double
unitPrice
,
double
foodQuantity
)
{
int
species
=
cartBean
.
getSelectSpeciesNum
()
+
1
;
cartBean
.
setSelectSpeciesNum
(
species
);
viewHolder
.
setText
(
R
.
id
.
tv_order_item_food_type_total
,
String
.
valueOf
(
species
));
...
...
@@ -357,7 +357,7 @@ public class ShoppingCartAdapter extends BaseQuickAdapter<ShoppingCartBean, Shop
* @param foodQuantity 食品數量
* @param species 需要增加的種類數量
*/
private
void
addTotalAmount
(
BaseViewHolder
viewHolder
,
ShoppingCartBean
cartBean
,
double
unitPrice
,
int
foodQuantity
,
int
species
)
{
private
void
addTotalAmount
(
BaseViewHolder
viewHolder
,
ShoppingCartBean
cartBean
,
double
unitPrice
,
double
foodQuantity
,
int
species
)
{
//供應商總價減去-這個食品的總價=等於現價
double
currentPrice
=
MoneyUtil
.
sum
(
cartBean
.
getSelectFoodAmount
(),
MoneyUtil
.
priceCalculation
(
unitPrice
,
foodQuantity
));
cartBean
.
setSelectFoodAmount
(
currentPrice
);
...
...
@@ -377,7 +377,7 @@ public class ShoppingCartAdapter extends BaseQuickAdapter<ShoppingCartBean, Shop
* @param foodQuantity 食品數量
* @param species 需要減少的種類數量
*/
private
void
minusTotalPrice
(
BaseViewHolder
viewHolder
,
ShoppingCartBean
cartBean
,
double
unitPrice
,
int
foodQuantity
,
int
species
)
{
private
void
minusTotalPrice
(
BaseViewHolder
viewHolder
,
ShoppingCartBean
cartBean
,
double
unitPrice
,
double
foodQuantity
,
int
species
)
{
//供應商總價減去-這個食品的總價=等於現價
double
currentPrice
=
MoneyUtil
.
sub
(
cartBean
.
getSelectFoodAmount
(),
MoneyUtil
.
priceCalculation
(
unitPrice
,
foodQuantity
));
//修改選中食品的金額
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/dishes/DishDetailAdapter.java
View file @
8a4d2d49
...
...
@@ -54,7 +54,7 @@ public class DishDetailAdapter extends BaseQuickAdapter<DishDetailBean, BaseView
count
.
setText
(
String
.
valueOf
(
tag
.
getConsumeQuantity
()));
count
.
setSelection
(
count
.
getText
().
toString
().
length
());
}
else
{
tag
.
setConsumeQuantity
(
Integer
.
parseInt
(
s
.
toString
()));
tag
.
setConsumeQuantity
(
Double
.
valueOf
(
s
.
toString
()));
}
}
});
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/FunctionListFragment.java
View file @
8a4d2d49
...
...
@@ -158,7 +158,7 @@ public class FunctionListFragment extends BaseSupplyChainFragment<FunctionListPr
case
"設置"
:
new
XPopup
.
Builder
(
requireContext
()).
asCustom
(
new
UpdateRestaurantInfoPop
(
requireContext
())).
show
();
break
;
case
"菜品Bo
o
m"
:
case
"菜品Bom"
:
start
(
DishesFragment
.
newInstance
());
break
;
default
:
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/food/BuyIngredientsFragment.java
View file @
8a4d2d49
...
...
@@ -655,7 +655,7 @@ public class BuyIngredientsFragment extends BaseSupplyChainFragment<BuyIngredien
* @param beforeNum 改变之前的数量
* @param currentNum 改变之后的数量
*/
private
void
foodNumberChanger
(
PurchaseFoodBean
purchaseFoodBean
,
int
parentCategoryIndex
,
int
beforeNum
,
int
currentNum
)
{
private
void
foodNumberChanger
(
PurchaseFoodBean
purchaseFoodBean
,
int
parentCategoryIndex
,
double
beforeNum
,
double
currentNum
)
{
BuyIngredientsBean
firstCategory
=
mPresenter
.
getFirstCategoryByIndex
(
parentCategoryIndex
);
if
(
firstCategory
!=
null
)
{
int
firstCategoryByIndex
=
firstLevelCategoryAdapter
.
getItemPosition
(
new
OrderCategoryBean
.
FoodCategoryTrees
(
firstCategory
.
id
,
firstCategory
.
categoryName
,
firstCategory
.
parentId
));
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/food/OtherFunctionFragment.java
View file @
8a4d2d49
...
...
@@ -667,7 +667,7 @@ public class OtherFunctionFragment extends BaseSupplyChainFragment<OtherFunction
* @param beforeNum 改变之前的数量
* @param currentNum 改变之后的数量
*/
private
void
foodNumberChanger
(
PurchaseFoodBean
purchaseFoodBean
,
int
parentCategoryIndex
,
int
beforeNum
,
int
currentNum
)
{
private
void
foodNumberChanger
(
PurchaseFoodBean
purchaseFoodBean
,
int
parentCategoryIndex
,
double
beforeNum
,
double
currentNum
)
{
BuyIngredientsBean
firstCategory
=
mPresenter
.
getFirstCategoryByIndex
(
parentCategoryIndex
);
if
(
firstCategory
!=
null
)
{
int
firstCategoryByIndex
=
firstLevelCategoryAdapter
.
getItemPosition
(
new
OrderCategoryBean
.
FoodCategoryTrees
(
firstCategory
.
id
,
firstCategory
.
categoryName
,
firstCategory
.
parentId
));
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/widget/GoodsDetailsPopup.java
View file @
8a4d2d49
...
...
@@ -156,7 +156,7 @@ public class GoodsDetailsPopup extends CenterPopupView {
});
}
private
int
hasFocusNum
;
private
double
hasFocusNum
;
public
GoodsDetailsPopup
setEditNumber
(
boolean
editNumber
)
{
isEditNumber
=
editNumber
;
...
...
@@ -186,7 +186,7 @@ public class GoodsDetailsPopup extends CenterPopupView {
public
void
setLongClick
(
boolean
addOrSub
)
{
//開啟線程
ThreadPoolManager
.
getInstence
().
putExecutableTasks
(()
->
{
int
number
=
purchaseFoodBean
.
getFoodQuantity
();
double
number
=
purchaseFoodBean
.
getFoodQuantity
();
delayTime
=
PurchaseConstant
.
LONG_CLICK_INIT_TIME
;
if
(
addOrSub
)
{
//+
...
...
@@ -228,7 +228,7 @@ public class GoodsDetailsPopup extends CenterPopupView {
});
}
private
void
foodNumberChange
(
int
changeNum
)
{
private
void
foodNumberChange
(
double
changeNum
)
{
if
(
changeNum
==
0
)
{
return
;
}
...
...
component-supply-chain/src/main/res/layout/item_dishes_foods.xml
View file @
8a4d2d49
...
...
@@ -54,7 +54,7 @@
android:textColor=
"@color/color_18"
android:background=
"@drawable/shape_border_bg_c8"
android:gravity=
"center"
android:inputType=
"numberDecimal"
android:inputType=
"numberDecimal
|number
"
android:maxLines=
"1"
android:textColorHighlight=
"@color/theme_color"
android:textCursorDrawable=
"@drawable/cursor_theme"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment