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
01716094
Commit
01716094
authored
Jun 17, 2021
by
张建升
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增單號數據, 修復無數據閃退bug 庫存消耗數據 消耗後更新
parent
b599f11f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
8 deletions
+29
-8
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/ConsumeWareHousingBean.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/WarehouseDetailsBean.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/WarehouseDetailsPresenter.java
+8
-3
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/WareHousingDetailsAdapter.java
+6
-3
component-supply-chain/src/main/res/layout/item_warehouse_details.xml
+10
-0
component-supply-chain/src/main/res/values/strings.xml
+3
-0
No files found.
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/ConsumeWareHousingBean.java
View file @
01716094
...
@@ -29,6 +29,6 @@ public class ConsumeWareHousingBean {
...
@@ -29,6 +29,6 @@ public class ConsumeWareHousingBean {
private
String
remarks
;
private
String
remarks
;
/***消耗数量*/
/***消耗数量*/
private
String
consumeQuantity
;
private
int
consumeQuantity
;
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/WarehouseDetailsBean.java
View file @
01716094
...
@@ -78,7 +78,7 @@ public class WarehouseDetailsBean implements Serializable {
...
@@ -78,7 +78,7 @@ public class WarehouseDetailsBean implements Serializable {
*/
*/
private
String
purchaseConsumeNoId
;
private
String
purchaseConsumeNoId
;
private
String
consumeQuantity
;
private
int
consumeQuantity
;
//出庫
//出庫
public
static
final
int
TYPE_DELIVERY_HOUSE_TYPE
=
1
;
public
static
final
int
TYPE_DELIVERY_HOUSE_TYPE
=
1
;
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/WarehouseDetailsPresenter.java
View file @
01716094
...
@@ -7,6 +7,7 @@ import com.gingersoft.gsa.cloud.common.bean.BaseResult;
...
@@ -7,6 +7,7 @@ import com.gingersoft.gsa.cloud.common.bean.BaseResult;
import
com.gingersoft.gsa.cloud.common.constans.AppConstant
;
import
com.gingersoft.gsa.cloud.common.constans.AppConstant
;
import
com.gingersoft.gsa.cloud.common.utils.CollectionUtils
;
import
com.gingersoft.gsa.cloud.common.utils.CollectionUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
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.other.TextUtil
;
import
com.gingersoft.supply_chain.mvp.bean.ConsumeReasonBean
;
import
com.gingersoft.supply_chain.mvp.bean.ConsumeReasonBean
;
import
com.gingersoft.supply_chain.mvp.bean.ConsumeWareHousingBean
;
import
com.gingersoft.supply_chain.mvp.bean.ConsumeWareHousingBean
;
...
@@ -204,15 +205,18 @@ public class WarehouseDetailsPresenter extends BasePresenter<WarehouseDetailsCon
...
@@ -204,15 +205,18 @@ public class WarehouseDetailsPresenter extends BasePresenter<WarehouseDetailsCon
//如果需要打印,則是在打印完之後查詢,如果不需要打印,現在就查詢刷新頁面
//如果需要打印,則是在打印完之後查詢,如果不需要打印,現在就查詢刷新頁面
//消耗完之後,刷新列表
//消耗完之後,刷新列表
mRootView
.
getPageInfo
();
mRootView
.
getPageInfo
();
//重新獲取庫存數量
//重新獲取庫存數量
重新获取的数据是错误的,那么自己 计算得出 不获取了 mod by zjs
getWarehousingNum
(
purchaseWarehousingOrderDetailsVO
.
getFoodNo
());
//
getWarehousingNum(purchaseWarehousingOrderDetailsVO.getFoodNo());
}
}
//不需要打印,現在就移除消耗视图,显示流水页面
//不需要打印,現在就移除消耗视图,显示流水页面
//如果需要打印,則在打印完成後執行
//如果需要打印,則在打印完成後執行
mRootView
.
showList
(
View
.
VISIBLE
);
mRootView
.
showList
(
View
.
VISIBLE
);
purchaseWarehousingOrderDetailsVO
.
setFoodNum
(
purchaseWarehousingOrderDetailsVO
.
getFoodNum
()-
consumeQuantity
);
mRootView
.
setWarehousingNum
(
purchaseWarehousingOrderDetailsVO
.
getFoodNum
());
}
else
if
(
baseResult
!=
null
&&
TextUtil
.
isNotEmptyOrNullOrUndefined
(
baseResult
.
getErrMsg
()))
{
}
else
if
(
baseResult
!=
null
&&
TextUtil
.
isNotEmptyOrNullOrUndefined
(
baseResult
.
getErrMsg
()))
{
NoIsFoodSnTipBean
noIsFoodSnTipBean
=
GsonUtils
.
GsonToBean
(
baseResult
.
getData
(),
NoIsFoodSnTipBean
.
class
);
NoIsFoodSnTipBean
noIsFoodSnTipBean
=
GsonUtils
.
GsonToBean
(
baseResult
.
getData
(),
NoIsFoodSnTipBean
.
class
);
if
(
noIsFoodSnTipBean
.
getList
()
!=
null
)
{
if
(
noIsFoodSnTipBean
!=
null
&&
noIsFoodSnTipBean
.
getList
()
!=
null
)
{
mRootView
.
removeNoFoodSn
(
noIsFoodSnTipBean
.
getList
());
mRootView
.
removeNoFoodSn
(
noIsFoodSnTipBean
.
getList
());
}
}
mRootView
.
showMessage
(
baseResult
.
getErrMsg
());
mRootView
.
showMessage
(
baseResult
.
getErrMsg
());
...
@@ -244,6 +248,7 @@ public class WarehouseDetailsPresenter extends BasePresenter<WarehouseDetailsCon
...
@@ -244,6 +248,7 @@ public class WarehouseDetailsPresenter extends BasePresenter<WarehouseDetailsCon
public
void
onNext
(
BaseResult
baseResult
)
{
public
void
onNext
(
BaseResult
baseResult
)
{
if
(
baseResult
!=
null
&&
baseResult
.
isSuccess
())
{
if
(
baseResult
!=
null
&&
baseResult
.
isSuccess
())
{
try
{
try
{
LogUtil
.
i
(
" zjs 重新获取的库存数量=="
+
GsonUtils
.
GsonString
(
baseResult
.
getData
()));
mRootView
.
setWarehousingNum
((
int
)
Double
.
parseDouble
(
GsonUtils
.
GsonString
(
baseResult
.
getData
())));
mRootView
.
setWarehousingNum
((
int
)
Double
.
parseDouble
(
GsonUtils
.
GsonString
(
baseResult
.
getData
())));
}
catch
(
NumberFormatException
e
)
{
}
catch
(
NumberFormatException
e
)
{
mRootView
.
killMyself
();
mRootView
.
killMyself
();
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/WareHousingDetailsAdapter.java
View file @
01716094
...
@@ -104,12 +104,12 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails
...
@@ -104,12 +104,12 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_details_food_num
,
true
);
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_details_food_num
,
true
);
}
else
{
}
else
{
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_details_food_num
,
false
);
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_details_food_num
,
false
);
if
(
item
.
get
Food
Quantity
()
>=
0
)
{
if
(
item
.
get
Consume
Quantity
()
>=
0
)
{
//如果大於0,前面顯示-號
//如果大於0,前面顯示-號
viewHolder
.
setText
(
R
.
id
.
tv_warehouse_details_food_num
,
String
.
format
(
getContext
().
getString
(
R
.
string
.
str_format_less
),
item
.
get
Food
Quantity
()
+
""
));
viewHolder
.
setText
(
R
.
id
.
tv_warehouse_details_food_num
,
String
.
format
(
getContext
().
getString
(
R
.
string
.
str_format_less
),
item
.
get
Consume
Quantity
()
+
""
));
}
else
{
}
else
{
//小於0,顯示正數,負負得正
//小於0,顯示正數,負負得正
viewHolder
.
setText
(
R
.
id
.
tv_warehouse_details_food_num
,
String
.
format
(
getContext
().
getString
(
R
.
string
.
str_format_positive
),
Math
.
abs
(
item
.
get
Food
Quantity
())
+
""
));
viewHolder
.
setText
(
R
.
id
.
tv_warehouse_details_food_num
,
String
.
format
(
getContext
().
getString
(
R
.
string
.
str_format_positive
),
Math
.
abs
(
item
.
get
Consume
Quantity
())
+
""
));
}
}
// 入庫顯示消耗日期,不顯示入庫日期
// 入庫顯示消耗日期,不顯示入庫日期
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_time_text
,
true
);
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_time_text
,
true
);
...
@@ -145,6 +145,9 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails
...
@@ -145,6 +145,9 @@ public class WareHousingDetailsAdapter extends BaseQuickAdapter<WarehouseDetails
viewHolder
.
setText
(
R
.
id
.
tv_warehouse_time_text
,
String
.
format
(
getContext
().
getString
(
R
.
string
.
str_format_warehousing_date
),
item
.
getWarehousingTime
()));
viewHolder
.
setText
(
R
.
id
.
tv_warehouse_time_text
,
String
.
format
(
getContext
().
getString
(
R
.
string
.
str_format_warehousing_date
),
item
.
getWarehousingTime
()));
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_time_text
,
false
);
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_time_text
,
false
);
}
}
//入库显示单号
viewHolder
.
setGone
(
R
.
id
.
tv_order_num
,
false
);
viewHolder
.
setText
(
R
.
id
.
tv_order_num
,
String
.
format
(
getContext
().
getString
(
R
.
string
.
str_order_num
),
item
.
getWarehousingOrderNo
()));
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_details_remarks
,
true
);
viewHolder
.
setGone
(
R
.
id
.
tv_warehouse_details_remarks
,
true
);
}
}
...
...
component-supply-chain/src/main/res/layout/item_warehouse_details.xml
View file @
01716094
...
@@ -48,6 +48,16 @@
...
@@ -48,6 +48,16 @@
<include
layout=
"@layout/include_horizontal_color_eee_dividing_line"
/>
<include
layout=
"@layout/include_horizontal_color_eee_dividing_line"
/>
<TextView
android:visibility=
"gone"
android:paddingLeft=
"@dimen/dp_9"
android:paddingTop=
"@dimen/dp_9"
android:paddingBottom=
"@dimen/dp_4"
android:id=
"@+id/tv_order_num"
android:text=
"@string/str_order_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
component-supply-chain/src/main/res/values/strings.xml
View file @
01716094
...
@@ -99,4 +99,6 @@
...
@@ -99,4 +99,6 @@
<string
name=
"str_food_info_get_error"
>
食材信息獲取失敗,請稍候重試
</string>
<string
name=
"str_food_info_get_error"
>
食材信息獲取失敗,請稍候重試
</string>
<string
name=
"str_order_del_contact_supplier"
>
訂單已刪除,請打電話聯繫供應商訂單刪除!
</string>
<string
name=
"str_order_del_contact_supplier"
>
訂單已刪除,請打電話聯繫供應商訂單刪除!
</string>
<string
name=
"str_order_num"
>
单号:%1$s
</string>
</resources>
</resources>
\ No newline at end of file
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