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
69e9e173
Commit
69e9e173
authored
May 07, 2021
by
Wyh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、修改DaoManager的Context引用 2、加入BlockCanary檢測卡頓
parent
22421977
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
1338 additions
and
212 deletions
+1338
-212
build.gradle
+1
-1
component-login/src/main/AndroidManifest.xml
+0
-1
component-supply-chain/build.gradle
+45
-45
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/OrderWareHouseBean.java
+5
-3
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/PurchaseFoodBean.java
+6
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/PurchaseOrderDetailsBean.java
+2
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/WarehouseOrderBean.java
+90
-17
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/WarehousingOrderDetailsBean.java
+153
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/WarehousingOrderListBean.java
+31
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/content/PurchaseConstant.java
+9
-4
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/content/SupplyShoppingCart.java
+1
-16
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/contract/WarehousingOrderDetailsContract.java
+24
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/contract/WarehousingOrderListContract.java
+19
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/model/WarehouseDetailsModel.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/model/WarehousingOrderDetailsModel.java
+11
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/model/WarehousingOrderListModel.java
+12
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/BuyIngredientsPresenter.java
+1
-5
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/OrderDetailsPresenter.java
+6
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/WarehousingOrderDetailsPresenter.java
+93
-4
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/WarehousingOrderListPresenter.java
+68
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/server/SupplierServer.java
+24
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/activity/SupplyChainMainActivity.java
+6
-0
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/WarehousingOrderListAdapter.kt
+14
-6
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/food/BuyIngredientsFragment.java
+8
-4
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/order/OrderDetailsFragment.java
+1
-1
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/warehouse/WarehousingOrderDetailsFragment.java
+100
-25
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/warehouse/WarehousingOrderListFragment.java
+67
-9
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/widget/ScanSnView.java
+11
-11
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/widget/WarehousingFoodDetailsPopup.java
+88
-0
component-supply-chain/src/main/res/layout/btn_gray_to_blue.xml
+1
-1
component-supply-chain/src/main/res/layout/footer_add.xml
+3
-5
component-supply-chain/src/main/res/layout/fragment_buy_ingredients.xml
+3
-3
component-supply-chain/src/main/res/layout/fragment_warehousing_list.xml
+11
-4
component-supply-chain/src/main/res/layout/fragment_warehousing_order_details.xml
+4
-3
component-supply-chain/src/main/res/layout/item_warehousing_order_list.xml
+46
-31
component-supply-chain/src/main/res/layout/layout_warehousing_details_popup.xml
+113
-0
component-supply-chain/src/main/res/layout/print_warehousing_order.xml
+57
-0
component-supply-chain/src/main/res/values/strings.xml
+6
-1
library-common/build.gradle
+1
-1
library-common/src/main/java/com/gingersoft/gsa/cloud/app/GsaCloudApplication.java
+4
-0
library-common/src/main/java/com/gingersoft/gsa/cloud/common/config/AppBlockCanaryContext.java
+181
-0
library-common/src/main/res/layout/include_horizontal_color_ccc_dividing_line.xml
+1
-1
library-database/src/main/java/com/gingersoft/gsa/cloud/database/DaoManager.java
+5
-2
library-ui/src/main/java/com/gingersoft/gsa/cloud/ui/animator/CustomAnimation3.java
+5
-5
No files found.
build.gradle
View file @
69e9e173
...
@@ -49,7 +49,7 @@ allprojects {
...
@@ -49,7 +49,7 @@ allprojects {
maven
{
url
'http://www.idescout.com/maven/repo/'
}
maven
{
url
'http://www.idescout.com/maven/repo/'
}
// 私有仓库地址
// 私有仓库地址
maven
{
url
"http://lib.gcssloop.com/repository/gcssloop-central/"
}
maven
{
url
"http://lib.gcssloop.com/repository/gcssloop-central/"
}
maven
{
url
'https://storage.googleapis.com/r8-releases/raw'
}
maven
{
url
'https://storage.googleapis.com/r8-releases/raw'
}
//阿里云仓库
//阿里云仓库
maven
{
url
"http://maven.aliyun.com/nexus/content/repositories/releases"
}
maven
{
url
"http://maven.aliyun.com/nexus/content/repositories/releases"
}
maven
{
url
'http://maven.aliyun.com/nexus/content/repositories/google'
}
maven
{
url
'http://maven.aliyun.com/nexus/content/repositories/google'
}
...
...
component-login/src/main/AndroidManifest.xml
View file @
69e9e173
...
@@ -45,7 +45,6 @@
...
@@ -45,7 +45,6 @@
<!-- 自动聚焦权限 -->
<!-- 自动聚焦权限 -->
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<uses-permission
android:name=
"android.permission.CAMERA"
/>
<uses-permission
android:name=
"android.permission.READ_LOGS"
/>
<uses-permission
android:name=
"android.permission.READ_LOGS"
/>
<uses-permission
android:name=
"android.permission.GET_TASKS"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_SETTINGS"
/>
<uses-permission
android:name=
"android.permission.WRITE_SETTINGS"
/>
<!--相机权限-->
<!--相机权限-->
...
...
component-supply-chain/build.gradle
View file @
69e9e173
...
@@ -101,47 +101,47 @@ import org.aspectj.bridge.IMessage
...
@@ -101,47 +101,47 @@ import org.aspectj.bridge.IMessage
import
org.aspectj.bridge.MessageHandler
import
org.aspectj.bridge.MessageHandler
import
org.aspectj.tools.ajc.Main
import
org.aspectj.tools.ajc.Main
if
(
project
.
ext
.
runAsApp
)
{
//if (project.ext.runAsApp) {
final
def
log
=
project
.
logger
// final def log = project.logger
final
def
variants
=
project
.
android
.
applicationVariants
// final def variants = project.android.applicationVariants
//
variants
.
all
{
variant
->
// variants.all { variant ->
if
(!
variant
.
buildType
.
isDebuggable
())
{
// if (!variant.buildType.isDebuggable()) {
log
.
debug
(
"Skipping non-debuggable build type '${variant.buildType.name}'."
)
// log.debug("Skipping non-debuggable build type '${variant.buildType.name}'.")
return
;
// return;
}
// }
//
JavaCompile
javaCompile
=
variant
.
javaCompile
// JavaCompile javaCompile = variant.javaCompile
javaCompile
.
doLast
{
// javaCompile.doLast {
String
[]
args
=
[
"-showWeaveInfo"
,
// String[] args = ["-showWeaveInfo",
"-1.8"
,
// "-1.8",
"-inpath"
,
javaCompile
.
destinationDir
.
toString
(),
// "-inpath", javaCompile.destinationDir.toString(),
"-aspectpath"
,
javaCompile
.
classpath
.
asPath
,
// "-aspectpath", javaCompile.classpath.asPath,
"-d"
,
javaCompile
.
destinationDir
.
toString
(),
// "-d", javaCompile.destinationDir.toString(),
"-classpath"
,
javaCompile
.
classpath
.
asPath
,
// "-classpath", javaCompile.classpath.asPath,
"-bootclasspath"
,
project
.
android
.
bootClasspath
.
join
(
File
.
pathSeparator
)]
// "-bootclasspath", project.android.bootClasspath.join(File.pathSeparator)]
log
.
debug
"ajc args: "
+
Arrays
.
toString
(
args
)
// log.debug "ajc args: " + Arrays.toString(args)
//
MessageHandler
handler
=
new
MessageHandler
(
true
);
// MessageHandler handler = new MessageHandler(true);
new
Main
().
run
(
args
,
handler
);
// new Main().run(args, handler);
for
(
IMessage
message
:
handler
.
getMessages
(
null
,
true
))
{
// for (IMessage message : handler.getMessages(null, true)) {
switch
(
message
.
getKind
())
{
// switch (message.getKind()) {
case
IMessage
.
ABORT
:
// case IMessage.ABORT:
case
IMessage
.
ERROR
:
// case IMessage.ERROR:
case
IMessage
.
FAIL
:
// case IMessage.FAIL:
log
.
error
message
.
message
,
message
.
thrown
// log.error message.message, message.thrown
break
;
// break;
case
IMessage
.
WARNING
:
// case IMessage.WARNING:
log
.
warn
message
.
message
,
message
.
thrown
// log.warn message.message, message.thrown
break
;
// break;
case
IMessage
.
INFO
:
// case IMessage.INFO:
log
.
info
message
.
message
,
message
.
thrown
// log.info message.message, message.thrown
break
;
// break;
case
IMessage
.
DEBUG
:
// case IMessage.DEBUG:
log
.
debug
message
.
message
,
message
.
thrown
// log.debug message.message, message.thrown
break
;
// break;
}
// }
}
// }
}
// }
}
// }
}
//}
\ No newline at end of file
\ No newline at end of file
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/OrderWareHouseBean.java
View file @
69e9e173
...
@@ -29,7 +29,7 @@ public class OrderWareHouseBean {
...
@@ -29,7 +29,7 @@ public class OrderWareHouseBean {
private
String
files
;
private
String
files
;
private
String
remarks
;
private
String
remarks
;
private
double
totalPrice
;
private
double
totalPrice
;
private
int
supplierId
;
private
int
brandId
;
private
int
brandId
;
private
int
restaurantId
;
private
int
restaurantId
;
//入庫原因,字符串
//入庫原因,字符串
...
@@ -38,8 +38,8 @@ public class OrderWareHouseBean {
...
@@ -38,8 +38,8 @@ public class OrderWareHouseBean {
@Data
@Data
public
static
class
PurchaseWarehousingOrderDetail
{
public
static
class
PurchaseWarehousingOrderDetail
{
private
int
orderDetailsId
;
private
Integer
orderDetailsId
;
private
int
purchaseFoodId
;
private
Integer
purchaseFoodId
;
private
int
foodQuantity
;
private
int
foodQuantity
;
private
double
foodPrice
;
private
double
foodPrice
;
private
double
totalPrice
;
private
double
totalPrice
;
...
@@ -61,6 +61,8 @@ public class OrderWareHouseBean {
...
@@ -61,6 +61,8 @@ public class OrderWareHouseBean {
* sn碼
* sn碼
*/
*/
private
List
<
PurchaseFoodEncodeSn
>
purchaseFoodEncodeSn
;
private
List
<
PurchaseFoodEncodeSn
>
purchaseFoodEncodeSn
;
private
int
supplierId
;
}
}
@Data
@Data
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/PurchaseFoodBean.java
View file @
69e9e173
...
@@ -116,6 +116,12 @@ public class PurchaseFoodBean implements Serializable, QMUISection.Model<Purchas
...
@@ -116,6 +116,12 @@ public class PurchaseFoodBean implements Serializable, QMUISection.Model<Purchas
*/
*/
private
DeputyUnitBean
showUnit
;
private
DeputyUnitBean
showUnit
;
/**
/**
* WarehousingOrderDetailsBean
* 入庫訂單專用
*/
private
String
warehousingOrderNo
;
/**
* 庫存預警 模塊
* 庫存預警 模塊
*/
*/
@Data
@Data
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/PurchaseOrderDetailsBean.java
View file @
69e9e173
...
@@ -52,6 +52,8 @@ public class PurchaseOrderDetailsBean {
...
@@ -52,6 +52,8 @@ public class PurchaseOrderDetailsBean {
*/
*/
private
String
files
;
private
String
files
;
private
int
supplierId
;
/**
/**
* 狀態:0全部 1待收貨 2部分收貨 3已完成 4拒收
* 狀態:0全部 1待收貨 2部分收貨 3已完成 4拒收
*/
*/
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/WarehouseOrderBean.java
View file @
69e9e173
...
@@ -8,22 +8,95 @@ package com.gingersoft.supply_chain.mvp.bean;
...
@@ -8,22 +8,95 @@ package com.gingersoft.supply_chain.mvp.bean;
* Use:
* Use:
*/
*/
public
class
WarehouseOrderBean
{
public
class
WarehouseOrderBean
{
public
String
orderNo
;
/**
public
String
warehousingMember
;
* id : 949
public
String
warehousingTime
;
* warehousingOrderNo : RK20210430945580
public
String
warehousingFoodName
;
* uid : 397
public
int
warehousingSpecies
;
* createTime : 2021
public
String
warehousingReason
;
* purchaseFoodCount : 3
* foodName : 山楂糕,好看,哈哈哈
public
WarehouseOrderBean
()
{
* storageType : 調撥入庫
}
* userName : null
*/
public
WarehouseOrderBean
(
String
orderNo
,
String
warehousingMember
,
String
warehousingTime
,
String
warehousingFoodName
,
int
warehousingSpecies
,
String
warehousingReason
)
{
private
int
id
;
this
.
orderNo
=
orderNo
;
private
String
warehousingOrderNo
;
this
.
warehousingMember
=
warehousingMember
;
private
int
uid
;
this
.
warehousingTime
=
warehousingTime
;
private
String
createTime
;
this
.
warehousingFoodName
=
warehousingFoodName
;
private
int
purchaseFoodCount
;
this
.
warehousingSpecies
=
warehousingSpecies
;
private
String
foodName
;
this
.
warehousingReason
=
warehousingReason
;
private
String
storageType
;
private
String
userName
;
private
double
totalPrice
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getWarehousingOrderNo
()
{
return
warehousingOrderNo
;
}
public
void
setWarehousingOrderNo
(
String
warehousingOrderNo
)
{
this
.
warehousingOrderNo
=
warehousingOrderNo
;
}
public
int
getUid
()
{
return
uid
;
}
public
void
setUid
(
int
uid
)
{
this
.
uid
=
uid
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
int
getPurchaseFoodCount
()
{
return
purchaseFoodCount
;
}
public
void
setPurchaseFoodCount
(
int
purchaseFoodCount
)
{
this
.
purchaseFoodCount
=
purchaseFoodCount
;
}
public
String
getFoodName
()
{
return
foodName
;
}
public
void
setFoodName
(
String
foodName
)
{
this
.
foodName
=
foodName
;
}
public
String
getStorageType
()
{
return
storageType
;
}
public
void
setStorageType
(
String
storageType
)
{
this
.
storageType
=
storageType
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
double
getTotalPrice
()
{
return
totalPrice
;
}
public
void
setTotalPrice
(
double
totalPrice
)
{
this
.
totalPrice
=
totalPrice
;
}
}
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/WarehousingOrderDetailsBean.java
0 → 100644
View file @
69e9e173
package
com
.
gingersoft
.
supply_chain
.
mvp
.
bean
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author 宇航. 1239658231@qq.com
* User: admin
* Date: 2021/4/30
* Time: 19:46
* Use:入庫訂單詳情
*/
public
class
WarehousingOrderDetailsBean
{
/**
* id : 1106
* warehousingOrderNo : RK20210430945580
* name : 山楂糕
* foodNo : FD1598602755
* supplierName : 深圳市牛呆呆公司
* basicUnitName : 個
* foodQuantity : 0
* foodPrice : 0
* totalPrice : 0
* remarks :
* foodMarkSn : 0
*/
private
int
id
;
private
String
warehousingOrderNo
;
private
String
name
;
private
String
foodNo
;
private
String
supplierName
;
private
String
basicUnitName
;
private
int
foodQuantity
;
private
double
foodPrice
;
private
int
totalPrice
;
private
String
remarks
;
private
int
foodMarkSn
;
public
static
List
<
PurchaseFoodBean
>
conversionToPurchaseFoodBean
(
List
<
WarehousingOrderDetailsBean
>
warehousingOrderDetailsBean
)
{
List
<
PurchaseFoodBean
>
purchaseFoodBeans
=
new
ArrayList
<>();
if
(
warehousingOrderDetailsBean
!=
null
)
{
for
(
WarehousingOrderDetailsBean
orderDetailsBean
:
warehousingOrderDetailsBean
)
{
purchaseFoodBeans
.
add
(
conversionToPurchaseFoodBean
(
orderDetailsBean
));
}
}
return
purchaseFoodBeans
;
}
public
static
PurchaseFoodBean
conversionToPurchaseFoodBean
(
WarehousingOrderDetailsBean
warehousingOrderDetailsBean
)
{
PurchaseFoodBean
purchaseFoodBean
=
new
PurchaseFoodBean
();
purchaseFoodBean
.
setId
(
warehousingOrderDetailsBean
.
getId
());
purchaseFoodBean
.
setName
(
warehousingOrderDetailsBean
.
getName
());
purchaseFoodBean
.
setFoodNo
(
warehousingOrderDetailsBean
.
getFoodNo
());
purchaseFoodBean
.
setSupplierName
(
warehousingOrderDetailsBean
.
getSupplierName
());
purchaseFoodBean
.
setBasicUnitName
(
warehousingOrderDetailsBean
.
getBasicUnitName
());
purchaseFoodBean
.
setFoodQuantity
(
warehousingOrderDetailsBean
.
getFoodQuantity
());
purchaseFoodBean
.
setUnitPrice
(
warehousingOrderDetailsBean
.
getFoodPrice
());
purchaseFoodBean
.
setRemarks
(
warehousingOrderDetailsBean
.
getRemarks
());
purchaseFoodBean
.
setFoodMarkSn
(
warehousingOrderDetailsBean
.
getFoodMarkSn
());
purchaseFoodBean
.
setWarehousingOrderNo
(
warehousingOrderDetailsBean
.
getWarehousingOrderNo
());
return
purchaseFoodBean
;
}
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getWarehousingOrderNo
()
{
return
warehousingOrderNo
;
}
public
void
setWarehousingOrderNo
(
String
warehousingOrderNo
)
{
this
.
warehousingOrderNo
=
warehousingOrderNo
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getFoodNo
()
{
return
foodNo
;
}
public
void
setFoodNo
(
String
foodNo
)
{
this
.
foodNo
=
foodNo
;
}
public
String
getSupplierName
()
{
return
supplierName
;
}
public
void
setSupplierName
(
String
supplierName
)
{
this
.
supplierName
=
supplierName
;
}
public
String
getBasicUnitName
()
{
return
basicUnitName
;
}
public
void
setBasicUnitName
(
String
basicUnitName
)
{
this
.
basicUnitName
=
basicUnitName
;
}
public
int
getFoodQuantity
()
{
return
foodQuantity
;
}
public
void
setFoodQuantity
(
int
foodQuantity
)
{
this
.
foodQuantity
=
foodQuantity
;
}
public
double
getFoodPrice
()
{
return
foodPrice
;
}
public
void
setFoodPrice
(
int
foodPrice
)
{
this
.
foodPrice
=
foodPrice
;
}
public
int
getTotalPrice
()
{
return
totalPrice
;
}
public
void
setTotalPrice
(
int
totalPrice
)
{
this
.
totalPrice
=
totalPrice
;
}
public
String
getRemarks
()
{
return
remarks
;
}
public
void
setRemarks
(
String
remarks
)
{
this
.
remarks
=
remarks
;
}
public
int
getFoodMarkSn
()
{
return
foodMarkSn
;
}
public
void
setFoodMarkSn
(
int
foodMarkSn
)
{
this
.
foodMarkSn
=
foodMarkSn
;
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/bean/WarehousingOrderListBean.java
0 → 100644
View file @
69e9e173
package
com
.
gingersoft
.
supply_chain
.
mvp
.
bean
;
import
java.util.List
;
/**
* @author 宇航. 1239658231@qq.com
* User: admin
* Date: 2021/4/30
* Time: 19:24
* Use:
*/
public
class
WarehousingOrderListBean
{
private
int
total
;
private
List
<
WarehouseOrderBean
>
PurchaseWarehousingOrdersVO
;
public
int
getTotal
()
{
return
total
;
}
public
void
setTotal
(
int
total
)
{
this
.
total
=
total
;
}
public
List
<
WarehouseOrderBean
>
getPurchaseWarehousingOrdersVO
()
{
return
PurchaseWarehousingOrdersVO
;
}
public
void
setPurchaseWarehousingOrdersVO
(
List
<
WarehouseOrderBean
>
purchaseWarehousingOrdersVO
)
{
PurchaseWarehousingOrdersVO
=
purchaseWarehousingOrdersVO
;
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/content/PurchaseConstant.java
View file @
69e9e173
...
@@ -67,13 +67,13 @@ public class PurchaseConstant {
...
@@ -67,13 +67,13 @@ public class PurchaseConstant {
public
static
final
String
DELETE_FAIL
=
"刪除失敗,請稍後重試"
;
public
static
final
String
DELETE_FAIL
=
"刪除失敗,請稍後重試"
;
public
static
int
getBrandId
()
{
public
static
int
getBrandId
()
{
//
return RestaurantInfoManager.newInstance().getBrandId();
return
RestaurantInfoManager
.
newInstance
().
getBrandId
();
return
BuildConfig
.
DEBUG
?
1
:
RestaurantInfoManager
.
newInstance
().
getBrandId
();
//
return BuildConfig.DEBUG ? 1 : RestaurantInfoManager.newInstance().getBrandId();
}
}
public
static
int
getRestaurantId
()
{
public
static
int
getRestaurantId
()
{
//
return RestaurantInfoManager.newInstance().getRestaurantId();
return
RestaurantInfoManager
.
newInstance
().
getRestaurantId
();
return
BuildConfig
.
DEBUG
?
26
:
RestaurantInfoManager
.
newInstance
().
getRestaurantId
();
//
return BuildConfig.DEBUG ? 26 : RestaurantInfoManager.newInstance().getRestaurantId();
}
}
public
static
void
addBrandId
(
@NonNull
Map
<
String
,
Object
>
map
)
{
public
static
void
addBrandId
(
@NonNull
Map
<
String
,
Object
>
map
)
{
...
@@ -97,4 +97,9 @@ public class PurchaseConstant {
...
@@ -97,4 +97,9 @@ public class PurchaseConstant {
map
.
put
(
"pageSize"
,
PAGE_SIZE
);
map
.
put
(
"pageSize"
,
PAGE_SIZE
);
}
}
public
static
void
addPageIndex
(
Map
<
String
,
Object
>
map
,
int
pageIndex
)
{
map
.
put
(
"pageIndex"
,
pageIndex
*
PAGE_SIZE
);
}
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/content/SupplyShoppingCart.java
View file @
69e9e173
...
@@ -122,22 +122,7 @@ public class SupplyShoppingCart {
...
@@ -122,22 +122,7 @@ public class SupplyShoppingCart {
}
}
public
void
removeFoodsByFoodId
(
int
foodId
)
{
public
void
removeFoodsByFoodId
(
int
foodId
)
{
RxJavaUtils
.
doInIOThread
(
new
RxIOTask
<
Object
>(
0
)
{
foodBeanMap
.
remove
(
foodId
);
@Override
public
Void
doInIOThread
(
Object
o
)
{
//刪除供應商成功後,需要從購物車數據中將這個供應商的食材都刪除掉
List
<
PurchaseFoodBean
>
cartFoods
=
SupplyShoppingCart
.
getInstance
().
getCartFoods
();
Iterator
<
PurchaseFoodBean
>
iterator
=
cartFoods
.
iterator
();
while
(
iterator
.
hasNext
())
{
PurchaseFoodBean
next
=
iterator
.
next
();
if
(
next
.
getId
()
!=
null
&&
next
.
getId
()
==
foodId
)
{
iterator
.
remove
();
break
;
}
}
return
null
;
}
});
}
}
public
void
removeFoodsBySupplier
(
int
supplierId
)
{
public
void
removeFoodsBySupplier
(
int
supplierId
)
{
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/contract/WarehousingOrderDetailsContract.java
View file @
69e9e173
package
com
.
gingersoft
.
supply_chain
.
mvp
.
contract
;
package
com
.
gingersoft
.
supply_chain
.
mvp
.
contract
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.supply_chain.mvp.bean.PurchaseFoodBean
;
import
com.gingersoft.supply_chain.mvp.ui.adapter.ConsumptionReasonAdapter
;
import
com.gingersoft.supply_chain.mvp.ui.adapter.ConsumptionReasonAdapter
;
import
com.gingersoft.supply_chain.mvp.ui.adapter.WareHousingOrderFoodAdapter
;
import
com.gingersoft.supply_chain.mvp.ui.adapter.WareHousingOrderFoodAdapter
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IModel
;
import
com.jess.arms.mvp.IModel
;
import
com.jess.arms.mvp.IView
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -30,6 +31,14 @@ public interface WarehousingOrderDetailsContract {
...
@@ -30,6 +31,14 @@ public interface WarehousingOrderDetailsContract {
void
initReason
(
ConsumptionReasonAdapter
consumptionReasonAdapter
);
void
initReason
(
ConsumptionReasonAdapter
consumptionReasonAdapter
);
void
initFoodView
(
WareHousingOrderFoodAdapter
wareHousingOrderFoodAdapter
);
void
initFoodView
(
WareHousingOrderFoodAdapter
wareHousingOrderFoodAdapter
);
/**
* 新增入庫單成功
*/
void
addOrderSuccess
();
void
setOrderAllInfo
();
void
showSnCodePopup
(
PurchaseFoodBean
infoVosBean
);
}
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
...
@@ -43,5 +52,19 @@ public interface WarehousingOrderDetailsContract {
...
@@ -43,5 +52,19 @@ public interface WarehousingOrderDetailsContract {
* 生成入庫單
* 生成入庫單
*/
*/
Observable
<
BaseResult
>
addWarehousingOrder
(
RequestBody
requestBody
);
Observable
<
BaseResult
>
addWarehousingOrder
(
RequestBody
requestBody
);
/**
* 獲取入庫單詳情
*
* @param warehousingOrderId 入庫訂單id
*/
Observable
<
BaseResult
>
getWarehousingOrderDetails
(
int
warehousingOrderId
);
/**
* 查詢食品sn碼
* @param encodeFoodNo 食品編號
* @param encodeOrderNo 訂單編號
*/
Observable
<
BaseResult
>
querySnCodes
(
String
encodeFoodNo
,
String
encodeOrderNo
);
}
}
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/contract/WarehousingOrderListContract.java
View file @
69e9e173
package
com
.
gingersoft
.
supply_chain
.
mvp
.
contract
;
package
com
.
gingersoft
.
supply_chain
.
mvp
.
contract
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.supply_chain.mvp.bean.WarehouseOrderBean
;
import
com.gingersoft.supply_chain.mvp.ui.adapter.WarehousingOrderListAdapter
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IView
;
import
com.jess.arms.mvp.IModel
;
import
com.jess.arms.mvp.IModel
;
import
java.util.List
;
import
java.util.Map
;
import
io.reactivex.Observable
;
/**
/**
* ================================================
* ================================================
...
@@ -19,11 +27,22 @@ import com.jess.arms.mvp.IModel;
...
@@ -19,11 +27,22 @@ import com.jess.arms.mvp.IModel;
public
interface
WarehousingOrderListContract
{
public
interface
WarehousingOrderListContract
{
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
//对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
interface
View
extends
IView
{
interface
View
extends
IView
{
void
loadList
(
WarehousingOrderListAdapter
adapter
);
/**
* 關閉加載動畫
* @param isNoMore 是否還有更多 true 沒有更多了
*/
void
finishLoad
(
boolean
isNoMore
);
}
}
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
//Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,即是否使用缓存
interface
Model
extends
IModel
{
interface
Model
extends
IModel
{
/**
* 獲取入庫單列表
*/
Observable
<
BaseResult
>
getWarehousingOrderList
(
Map
<
String
,
Object
>
map
);
}
}
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/model/WarehouseDetailsModel.java
View file @
69e9e173
...
@@ -53,7 +53,7 @@ public class WarehouseDetailsModel extends BaseModel implements WarehouseDetails
...
@@ -53,7 +53,7 @@ public class WarehouseDetailsModel extends BaseModel implements WarehouseDetails
@Override
@Override
public
Observable
<
BaseResult
>
getWarehousingOrderDetails
(
Map
<
String
,
Object
>
map
)
{
public
Observable
<
BaseResult
>
getWarehousingOrderDetails
(
Map
<
String
,
Object
>
map
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
SupplierServer
.
class
).
getWarehousing
Order
Details
(
map
);
return
mRepositoryManager
.
obtainRetrofitService
(
SupplierServer
.
class
).
getWarehousingDetails
(
map
);
}
}
@Override
@Override
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/model/WarehousingOrderDetailsModel.java
View file @
69e9e173
...
@@ -60,4 +60,14 @@ public class WarehousingOrderDetailsModel extends BaseModel implements Warehousi
...
@@ -60,4 +60,14 @@ public class WarehousingOrderDetailsModel extends BaseModel implements Warehousi
public
Observable
<
BaseResult
>
addWarehousingOrder
(
RequestBody
requestBody
)
{
public
Observable
<
BaseResult
>
addWarehousingOrder
(
RequestBody
requestBody
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
SupplierServer
.
class
).
addWarehousingOrder
(
requestBody
);
return
mRepositoryManager
.
obtainRetrofitService
(
SupplierServer
.
class
).
addWarehousingOrder
(
requestBody
);
}
}
@Override
public
Observable
<
BaseResult
>
getWarehousingOrderDetails
(
int
warehousingOrderId
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
SupplierServer
.
class
).
getWarehousingOrderDetails
(
warehousingOrderId
);
}
@Override
public
Observable
<
BaseResult
>
querySnCodes
(
String
encodeFoodNo
,
String
encodeOrderNo
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
SupplierServer
.
class
).
querySnCodes
(
encodeFoodNo
,
encodeOrderNo
);
}
}
}
\ No newline at end of file
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/model/WarehousingOrderListModel.java
View file @
69e9e173
...
@@ -2,6 +2,8 @@ package com.gingersoft.supply_chain.mvp.model;
...
@@ -2,6 +2,8 @@ package com.gingersoft.supply_chain.mvp.model;
import
android.app.Application
;
import
android.app.Application
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.supply_chain.mvp.server.SupplierServer
;
import
com.google.gson.Gson
;
import
com.google.gson.Gson
;
import
com.jess.arms.integration.IRepositoryManager
;
import
com.jess.arms.integration.IRepositoryManager
;
import
com.jess.arms.mvp.BaseModel
;
import
com.jess.arms.mvp.BaseModel
;
...
@@ -12,6 +14,10 @@ import javax.inject.Inject;
...
@@ -12,6 +14,10 @@ import javax.inject.Inject;
import
com.gingersoft.supply_chain.mvp.contract.WarehousingOrderListContract
;
import
com.gingersoft.supply_chain.mvp.contract.WarehousingOrderListContract
;
import
java.util.Map
;
import
io.reactivex.Observable
;
/**
/**
* ================================================
* ================================================
...
@@ -43,4 +49,9 @@ public class WarehousingOrderListModel extends BaseModel implements WarehousingO
...
@@ -43,4 +49,9 @@ public class WarehousingOrderListModel extends BaseModel implements WarehousingO
this
.
mGson
=
null
;
this
.
mGson
=
null
;
this
.
mApplication
=
null
;
this
.
mApplication
=
null
;
}
}
@Override
public
Observable
<
BaseResult
>
getWarehousingOrderList
(
Map
<
String
,
Object
>
map
)
{
return
mRepositoryManager
.
obtainRetrofitService
(
SupplierServer
.
class
).
getWarehousingOrderList
(
map
);
}
}
}
\ No newline at end of file
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/BuyIngredientsPresenter.java
View file @
69e9e173
...
@@ -534,13 +534,9 @@ public class BuyIngredientsPresenter extends BasePresenter<BuyIngredientsContrac
...
@@ -534,13 +534,9 @@ public class BuyIngredientsPresenter extends BasePresenter<BuyIngredientsContrac
*/
*/
public
void
addFood
(
PurchaseFoodBean
purchaseFoodBean
)
{
public
void
addFood
(
PurchaseFoodBean
purchaseFoodBean
)
{
if
(
purchaseFoodBean
.
getFoodQuantity
()
==
0
)
{
if
(
purchaseFoodBean
.
getFoodQuantity
()
==
0
)
{
// purchaseFoodBeanMap.remove(purchaseFoodBean.getId());
SupplyShoppingCart
.
getInstance
().
removeFoodsByFoodId
(
purchaseFoodBean
.
getId
());
SupplyShoppingCart
.
getInstance
().
removeFoodsByFoodId
(
purchaseFoodBean
.
getId
());
}
else
{
}
else
{
// purchaseFoodBeanMap.put(purchaseFoodBean.getId(), purchaseFoodBean);
SupplyShoppingCart
.
getInstance
().
addFood
(
purchaseFoodBean
);
if
(!
SupplyShoppingCart
.
getInstance
().
getCartFoods
().
contains
(
purchaseFoodBean
))
{
SupplyShoppingCart
.
getInstance
().
addFood
(
purchaseFoodBean
);
}
}
}
}
}
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/OrderDetailsPresenter.java
View file @
69e9e173
...
@@ -74,6 +74,8 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
...
@@ -74,6 +74,8 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
AppManager
mAppManager
;
AppManager
mAppManager
;
private
int
orderId
;
private
int
orderId
;
private
int
supplierId
;
/**
/**
* 所上傳的圖片路徑集合
* 所上傳的圖片路徑集合
*/
*/
...
@@ -122,6 +124,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
...
@@ -122,6 +124,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
if
(
orderDetailsBean
!=
null
)
{
if
(
orderDetailsBean
!=
null
)
{
OrderDetailsPresenter
.
this
.
orderId
=
orderId
;
OrderDetailsPresenter
.
this
.
orderId
=
orderId
;
try
{
try
{
supplierId
=
orderDetailsBean
.
getSupplierId
();
transformationWareHouse
(
orderDetailsBean
);
transformationWareHouse
(
orderDetailsBean
);
orderState
=
orderDetailsBean
.
getStatus
();
orderState
=
orderDetailsBean
.
getStatus
();
//加載圖片
//加載圖片
...
@@ -334,6 +337,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
...
@@ -334,6 +337,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
if
(
CollectionUtils
.
isNullOrEmpty
(
purchaseWarehousingOrderDetails
))
{
if
(
CollectionUtils
.
isNullOrEmpty
(
purchaseWarehousingOrderDetails
))
{
return
null
;
return
null
;
}
}
orderWareHouseBean
.
setStatus
(
state
);
orderWareHouseBean
.
setStatus
(
state
);
orderWareHouseBean
.
setOrderId
(
orderId
);
orderWareHouseBean
.
setOrderId
(
orderId
);
...
@@ -349,6 +353,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
...
@@ -349,6 +353,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
purchaseWarehousingOrder
.
setRestaurantId
(
PurchaseConstant
.
getRestaurantId
());
purchaseWarehousingOrder
.
setRestaurantId
(
PurchaseConstant
.
getRestaurantId
());
purchaseWarehousingOrder
.
setBrandId
(
PurchaseConstant
.
getBrandId
());
purchaseWarehousingOrder
.
setBrandId
(
PurchaseConstant
.
getBrandId
());
purchaseWarehousingOrder
.
setRemarks
(
remark
);
purchaseWarehousingOrder
.
setRemarks
(
remark
);
purchaseWarehousingOrder
.
setSupplierId
(
supplierId
);
purchaseWarehousingOrder
.
setTotalPrice
(
totalAmount
);
purchaseWarehousingOrder
.
setTotalPrice
(
totalAmount
);
orderWareHouseBean
.
setPurchaseWarehousingOrder
(
purchaseWarehousingOrder
);
orderWareHouseBean
.
setPurchaseWarehousingOrder
(
purchaseWarehousingOrder
);
orderWareHouseBean
.
setPurchaseWarehousingOrderDetailsTOS
(
purchaseWarehousingOrderDetails
);
orderWareHouseBean
.
setPurchaseWarehousingOrderDetailsTOS
(
purchaseWarehousingOrderDetails
);
...
@@ -378,6 +383,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
...
@@ -378,6 +383,7 @@ public class OrderDetailsPresenter extends BasePresenter<OrderDetailsContract.Mo
purchaseWarehousingOrderDetail
.
setPurchaseFoodId
(
purchaseOrderDetailsInfoVosBean
.
getPurchaseFoodId
());
purchaseWarehousingOrderDetail
.
setPurchaseFoodId
(
purchaseOrderDetailsInfoVosBean
.
getPurchaseFoodId
());
purchaseWarehousingOrderDetail
.
setFoodQuantity
(
purchaseOrderDetailsInfoVosBean
.
getFoodQuantity
());
purchaseWarehousingOrderDetail
.
setFoodQuantity
(
purchaseOrderDetailsInfoVosBean
.
getFoodQuantity
());
purchaseWarehousingOrderDetail
.
setFoodPrice
(
purchaseOrderDetailsInfoVosBean
.
getFoodPrice
());
purchaseWarehousingOrderDetail
.
setFoodPrice
(
purchaseOrderDetailsInfoVosBean
.
getFoodPrice
());
purchaseWarehousingOrderDetail
.
setSupplierId
(
supplierId
);
purchaseWarehousingOrderDetail
.
setTotalPrice
(
MoneyUtil
.
priceCalculation
(
purchaseOrderDetailsInfoVosBean
.
getFoodPrice
(),
purchaseOrderDetailsInfoVosBean
.
getFoodQuantity
()));
purchaseWarehousingOrderDetail
.
setTotalPrice
(
MoneyUtil
.
priceCalculation
(
purchaseOrderDetailsInfoVosBean
.
getFoodPrice
(),
purchaseOrderDetailsInfoVosBean
.
getFoodQuantity
()));
DeputyUnitBean
deputyUnitBean
=
purchaseOrderDetailsInfoVosBean
.
getShowUnit
();
DeputyUnitBean
deputyUnitBean
=
purchaseOrderDetailsInfoVosBean
.
getShowUnit
();
WareHousingUnitBean
wareHousingUnitBean
=
DeputyUnitBean
.
getWareHousingUnitByDeputyUnit
(
deputyUnitBean
);
WareHousingUnitBean
wareHousingUnitBean
=
DeputyUnitBean
.
getWareHousingUnitByDeputyUnit
(
deputyUnitBean
);
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/WarehousingOrderDetailsPresenter.java
View file @
69e9e173
...
@@ -3,6 +3,7 @@ package com.gingersoft.supply_chain.mvp.presenter;
...
@@ -3,6 +3,7 @@ package com.gingersoft.supply_chain.mvp.presenter;
import
android.app.Application
;
import
android.app.Application
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.core.restaurant.RestaurantInfoManager
;
import
com.gingersoft.gsa.cloud.common.utils.CollectionUtils
;
import
com.gingersoft.gsa.cloud.common.utils.CollectionUtils
;
import
com.gingersoft.gsa.cloud.common.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.common.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
...
@@ -12,7 +13,9 @@ import com.gingersoft.supply_chain.mvp.bean.DeputyUnitBean;
...
@@ -12,7 +13,9 @@ import com.gingersoft.supply_chain.mvp.bean.DeputyUnitBean;
import
com.gingersoft.supply_chain.mvp.bean.OrderWareHouseBean
;
import
com.gingersoft.supply_chain.mvp.bean.OrderWareHouseBean
;
import
com.gingersoft.supply_chain.mvp.bean.PurchaseFoodBean
;
import
com.gingersoft.supply_chain.mvp.bean.PurchaseFoodBean
;
import
com.gingersoft.supply_chain.mvp.bean.PurchaseFoodEncodeSn
;
import
com.gingersoft.supply_chain.mvp.bean.PurchaseFoodEncodeSn
;
import
com.gingersoft.supply_chain.mvp.bean.PurchaseOrderDetailsBean
;
import
com.gingersoft.supply_chain.mvp.bean.WareHousingUnitBean
;
import
com.gingersoft.supply_chain.mvp.bean.WareHousingUnitBean
;
import
com.gingersoft.supply_chain.mvp.bean.WarehousingOrderDetailsBean
;
import
com.gingersoft.supply_chain.mvp.content.PurchaseConstant
;
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.ui.adapter.ConsumptionReasonAdapter
;
import
com.gingersoft.supply_chain.mvp.ui.adapter.ConsumptionReasonAdapter
;
...
@@ -23,6 +26,7 @@ import com.jess.arms.mvp.BasePresenter;
...
@@ -23,6 +26,7 @@ import com.jess.arms.mvp.BasePresenter;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.annotations.NonNull
;
import
io.reactivex.schedulers.Schedulers
;
import
io.reactivex.schedulers.Schedulers
;
import
me.jessyan.rxerrorhandler.core.RxErrorHandler
;
import
me.jessyan.rxerrorhandler.core.RxErrorHandler
;
import
me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber
;
import
me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber
;
...
@@ -82,6 +86,35 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
...
@@ -82,6 +86,35 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
}
}
/**
/**
* 獲取入庫單詳情
*
* @param warehousingOrderId
*/
public
void
getWarehousingOrderDetails
(
int
warehousingOrderId
)
{
mModel
.
getWarehousingOrderDetails
(
warehousingOrderId
)
.
subscribeOn
(
Schedulers
.
io
())
.
doOnSubscribe
(
disposable
->
mRootView
.
showLoading
(
PurchaseConstant
.
GET_INFO_LOADING
))
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
doAfterTerminate
(()
->
mRootView
.
hideLoading
())
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseResult
>(
mErrorHandler
)
{
@Override
public
void
onNext
(
BaseResult
baseResult
)
{
if
(
baseResult
!=
null
&&
baseResult
.
isSuccess
())
{
List
<
WarehousingOrderDetailsBean
>
warehousingOrderDetailsBeans
=
GsonUtils
.
jsonToList
(
baseResult
.
getData
(),
WarehousingOrderDetailsBean
.
class
);
setAdapter
(
WarehousingOrderDetailsBean
.
conversionToPurchaseFoodBean
(
warehousingOrderDetailsBeans
));
}
else
if
(
baseResult
!=
null
&&
TextUtil
.
isNotEmptyOrNullOrUndefined
(
baseResult
.
getErrMsg
()))
{
mRootView
.
showMessage
(
baseResult
.
getErrMsg
());
}
else
{
mRootView
.
showMessage
(
PurchaseConstant
.
GET_INFO_ERROR
);
}
}
});
}
/**
* 獲取入庫類型:原因
* 獲取入庫類型:原因
*/
*/
public
void
getWarehousingReason
()
{
public
void
getWarehousingReason
()
{
...
@@ -99,7 +132,6 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
...
@@ -99,7 +132,6 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
@Override
@Override
public
void
onNext
(
BaseResult
baseResult
)
{
public
void
onNext
(
BaseResult
baseResult
)
{
if
(
baseResult
!=
null
&&
baseResult
.
isSuccess
())
{
if
(
baseResult
!=
null
&&
baseResult
.
isSuccess
())
{
//消耗完之後,關閉頁面
List
<
ConsumeReasonBean
>
consumeReasonBeans
=
GsonUtils
.
jsonToList
(
baseResult
.
getData
(),
ConsumeReasonBean
.
class
);
List
<
ConsumeReasonBean
>
consumeReasonBeans
=
GsonUtils
.
jsonToList
(
baseResult
.
getData
(),
ConsumeReasonBean
.
class
);
consumptionReasonAdapter
=
new
ConsumptionReasonAdapter
(
consumeReasonBeans
);
consumptionReasonAdapter
=
new
ConsumptionReasonAdapter
(
consumeReasonBeans
);
mRootView
.
initReason
(
consumptionReasonAdapter
);
mRootView
.
initReason
(
consumptionReasonAdapter
);
...
@@ -113,16 +145,64 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
...
@@ -113,16 +145,64 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
}
}
/**
/**
* 查詢商品sn碼
*/
public
void
querySnCodes
(
PurchaseFoodBean
infoVosBean
)
{
mModel
.
querySnCodes
(
infoVosBean
.
getFoodNo
(),
infoVosBean
.
getWarehousingOrderNo
())
.
subscribeOn
(
Schedulers
.
io
())
.
doOnSubscribe
(
disposable
->
mRootView
.
showLoading
(
PurchaseConstant
.
QUERY_LOADING
))
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
doAfterTerminate
(()
->
mRootView
.
hideLoading
())
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseResult
>(
mErrorHandler
)
{
@Override
public
void
onNext
(
@NonNull
BaseResult
info
)
{
if
(
info
.
isSuccess
())
{
List
<
PurchaseFoodEncodeSn
>
purchaseFoodEncodeSns
=
GsonUtils
.
jsonToList
(
info
.
getData
(),
PurchaseFoodEncodeSn
.
class
);
if
(
purchaseFoodEncodeSns
!=
null
)
{
infoVosBean
.
setPurchaseFoodEncodeSn
(
purchaseFoodEncodeSns
);
mRootView
.
showSnCodePopup
(
infoVosBean
);
}
}
}
});
}
public
void
setSelectReason
(
String
warehousingReason
)
{
if
(
consumptionReasonAdapter
!=
null
)
{
int
reasonSize
=
consumptionReasonAdapter
.
getItemCount
();
for
(
int
i
=
0
;
i
<
reasonSize
;
i
++)
{
ConsumeReasonBean
item
=
consumptionReasonAdapter
.
getItem
(
i
);
if
(
item
.
getDescription
().
equals
(
warehousingReason
))
{
consumptionReasonAdapter
.
setSelectIndex
(
i
);
return
;
}
}
}
}
/**
* 獲取食材
* 獲取食材
*/
*/
public
void
initWarehousingFood
()
{
public
void
initWarehousingFood
()
{
List
<
PurchaseFoodBean
>
warehousingFood
=
SupplyShoppingCart
.
getInstance
().
getCartFoods
();
List
<
PurchaseFoodBean
>
warehousingFood
=
SupplyShoppingCart
.
getInstance
().
getCartFoods
();
setAdapter
(
warehousingFood
);
}
private
void
setAdapter
(
List
<
PurchaseFoodBean
>
warehousingFood
)
{
if
(
wareHousingOrderFoodAdapter
==
null
)
{
if
(
wareHousingOrderFoodAdapter
==
null
)
{
wareHousingOrderFoodAdapter
=
new
WareHousingOrderFoodAdapter
(
warehousingFood
);
wareHousingOrderFoodAdapter
=
new
WareHousingOrderFoodAdapter
(
warehousingFood
);
mRootView
.
initFoodView
(
wareHousingOrderFoodAdapter
);
mRootView
.
initFoodView
(
wareHousingOrderFoodAdapter
);
}
else
{
}
else
{
wareHousingOrderFoodAdapter
.
setNewInstance
(
warehousingFood
);
wareHousingOrderFoodAdapter
.
setNewInstance
(
warehousingFood
);
}
}
mRootView
.
setOrderAllInfo
();
}
public
void
notifyAdapter
(
int
position
)
{
wareHousingOrderFoodAdapter
.
notifyItemChanged
(
wareHousingOrderFoodAdapter
.
getHeaderLayoutCount
()
+
position
);
}
}
public
List
<
PurchaseFoodBean
>
getWarehousingFood
()
{
public
List
<
PurchaseFoodBean
>
getWarehousingFood
()
{
...
@@ -198,6 +278,8 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
...
@@ -198,6 +278,8 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
// mRootView.showMessage("食材【" + datum.getName() + "】沒有單位,請修改食材信息");
// mRootView.showMessage("食材【" + datum.getName() + "】沒有單位,請修改食材信息");
// return;
// return;
// }
// }
purchaseWarehousingUnit
.
setBrandId
(
PurchaseConstant
.
getBrandId
());
purchaseWarehousingUnit
.
setRestaurantId
(
PurchaseConstant
.
getRestaurantId
());
purchaseWarehousingUnit
.
setUnitName
(
datum
.
getBasicUnitName
());
purchaseWarehousingUnit
.
setUnitName
(
datum
.
getBasicUnitName
());
purchaseWarehousingUnit
.
setUnitValue
(
datum
.
getFoodQuantity
());
purchaseWarehousingUnit
.
setUnitValue
(
datum
.
getFoodQuantity
());
purchaseWarehousingUnit
.
setUnitPrice
(
datum
.
getUnitPrice
());
purchaseWarehousingUnit
.
setUnitPrice
(
datum
.
getUnitPrice
());
...
@@ -207,16 +289,22 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
...
@@ -207,16 +289,22 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
if
(
datum
.
getFoodMarkSn
()
==
PurchaseFoodBean
.
HAS_SN
)
{
if
(
datum
.
getFoodMarkSn
()
==
PurchaseFoodBean
.
HAS_SN
)
{
List
<
PurchaseFoodEncodeSn
>
purchaseFoodEncodeSn
=
datum
.
getPurchaseFoodEncodeSn
();
List
<
PurchaseFoodEncodeSn
>
purchaseFoodEncodeSn
=
datum
.
getPurchaseFoodEncodeSn
();
if
(
CollectionUtils
.
isNullOrEmpty
(
purchaseFoodEncodeSn
))
{
if
(
CollectionUtils
.
isNullOrEmpty
(
purchaseFoodEncodeSn
))
{
mRootView
.
showMessage
(
"食材【"
+
datum
.
getName
()
+
"】數量不能為0,請掃描SN碼"
);
mRootView
.
showMessage
(
"食材【"
+
datum
.
getName
()
+
"】SN碼數量不能為0,請掃描SN碼"
);
return
;
}
if
(
datum
.
getFoodQuantity
()
!=
purchaseFoodEncodeSn
.
size
())
{
mRootView
.
showMessage
(
"食材【"
+
datum
.
getName
()
+
"】SN碼數量不足"
+
datum
.
getFoodQuantity
()
+
"個,請掃描SN碼!"
);
return
;
return
;
}
}
for
(
PurchaseFoodEncodeSn
foodEncodeSn
:
purchaseFoodEncodeSn
)
{
for
(
PurchaseFoodEncodeSn
foodEncodeSn
:
purchaseFoodEncodeSn
)
{
foodEncodeSn
.
setEncode
Sn
No
(
datum
.
getFoodNo
());
foodEncodeSn
.
setEncode
Food
No
(
datum
.
getFoodNo
());
}
}
orderDetail
.
setPurchaseFoodEncodeSn
(
purchaseFoodEncodeSn
);
orderDetail
.
setPurchaseFoodEncodeSn
(
purchaseFoodEncodeSn
);
}
}
orderDetail
.
setSupplierId
(
datum
.
getSupplierId
());
orderDetail
.
setPurchaseFoodId
(
datum
.
getId
());
orderDetail
.
setPurchaseFoodId
(
datum
.
getId
());
orderDetail
.
setBrandId
(
PurchaseConstant
.
getBrandId
());
orderDetail
.
setBrandId
(
PurchaseConstant
.
getBrandId
());
orderDetail
.
setFoodPrice
(
datum
.
getUnitPrice
());
orderDetail
.
setRestaurantId
(
PurchaseConstant
.
getRestaurantId
());
orderDetail
.
setRestaurantId
(
PurchaseConstant
.
getRestaurantId
());
orderDetail
.
setFoodQuantity
(
datum
.
getFoodQuantity
());
orderDetail
.
setFoodQuantity
(
datum
.
getFoodQuantity
());
double
foodTotalAmount
=
MoneyUtil
.
priceCalculation
(
datum
.
getUnitPrice
(),
datum
.
getFoodQuantity
());
double
foodTotalAmount
=
MoneyUtil
.
priceCalculation
(
datum
.
getUnitPrice
(),
datum
.
getFoodQuantity
());
...
@@ -237,7 +325,8 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
...
@@ -237,7 +325,8 @@ public class WarehousingOrderDetailsPresenter extends BasePresenter<WarehousingO
@Override
@Override
public
void
onNext
(
BaseResult
baseResult
)
{
public
void
onNext
(
BaseResult
baseResult
)
{
if
(
baseResult
!=
null
&&
baseResult
.
isSuccess
())
{
if
(
baseResult
!=
null
&&
baseResult
.
isSuccess
())
{
mRootView
.
showMessage
(
"入庫成功"
);
mRootView
.
addOrderSuccess
();
}
else
if
(
baseResult
!=
null
&&
TextUtil
.
isNotEmptyOrNullOrUndefined
(
baseResult
.
getErrMsg
()))
{
}
else
if
(
baseResult
!=
null
&&
TextUtil
.
isNotEmptyOrNullOrUndefined
(
baseResult
.
getErrMsg
()))
{
mRootView
.
showMessage
(
baseResult
.
getErrMsg
());
mRootView
.
showMessage
(
baseResult
.
getErrMsg
());
}
else
{
}
else
{
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/presenter/WarehousingOrderListPresenter.java
View file @
69e9e173
...
@@ -2,16 +2,34 @@ package com.gingersoft.supply_chain.mvp.presenter;
...
@@ -2,16 +2,34 @@ package com.gingersoft.supply_chain.mvp.presenter;
import
android.app.Application
;
import
android.app.Application
;
import
com.gingersoft.gsa.cloud.common.bean.BaseResult
;
import
com.gingersoft.gsa.cloud.common.utils.CollectionUtils
;
import
com.gingersoft.gsa.cloud.common.utils.gson.GsonUtils
;
import
com.gingersoft.gsa.cloud.common.utils.other.TextUtil
;
import
com.gingersoft.gsa.cloud.ui.animator.CustomAnimation3
;
import
com.gingersoft.supply_chain.mvp.bean.ConsumeReasonBean
;
import
com.gingersoft.supply_chain.mvp.bean.WarehousingOrderListBean
;
import
com.gingersoft.supply_chain.mvp.content.PurchaseConstant
;
import
com.gingersoft.supply_chain.mvp.ui.adapter.ConsumptionReasonAdapter
;
import
com.gingersoft.supply_chain.mvp.ui.adapter.WarehousingOrderListAdapter
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.integration.AppManager
;
import
com.jess.arms.di.scope.FragmentScope
;
import
com.jess.arms.di.scope.FragmentScope
;
import
com.jess.arms.mvp.BasePresenter
;
import
com.jess.arms.mvp.BasePresenter
;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
com.jess.arms.http.imageloader.ImageLoader
;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.schedulers.Schedulers
;
import
me.jessyan.rxerrorhandler.core.RxErrorHandler
;
import
me.jessyan.rxerrorhandler.core.RxErrorHandler
;
import
me.jessyan.rxerrorhandler.handler.ErrorHandleSubscriber
;
import
javax.inject.Inject
;
import
javax.inject.Inject
;
import
com.gingersoft.supply_chain.mvp.contract.WarehousingOrderListContract
;
import
com.gingersoft.supply_chain.mvp.contract.WarehousingOrderListContract
;
import
com.jess.arms.utils.RxLifecycleUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
...
@@ -37,6 +55,10 @@ public class WarehousingOrderListPresenter extends BasePresenter<WarehousingOrde
...
@@ -37,6 +55,10 @@ public class WarehousingOrderListPresenter extends BasePresenter<WarehousingOrde
@Inject
@Inject
AppManager
mAppManager
;
AppManager
mAppManager
;
WarehousingOrderListAdapter
warehousingOrderListAdapter
;
public
int
pageIndex
=
0
;
@Inject
@Inject
public
WarehousingOrderListPresenter
(
WarehousingOrderListContract
.
Model
model
,
WarehousingOrderListContract
.
View
rootView
)
{
public
WarehousingOrderListPresenter
(
WarehousingOrderListContract
.
Model
model
,
WarehousingOrderListContract
.
View
rootView
)
{
super
(
model
,
rootView
);
super
(
model
,
rootView
);
...
@@ -50,4 +72,50 @@ public class WarehousingOrderListPresenter extends BasePresenter<WarehousingOrde
...
@@ -50,4 +72,50 @@ public class WarehousingOrderListPresenter extends BasePresenter<WarehousingOrde
this
.
mImageLoader
=
null
;
this
.
mImageLoader
=
null
;
this
.
mApplication
=
null
;
this
.
mApplication
=
null
;
}
}
public
void
getWarehousingOrderList
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>(
2
);
PurchaseConstant
.
addBrandId
(
map
);
PurchaseConstant
.
addRestaurantId
(
map
);
PurchaseConstant
.
addPageSize
(
map
);
PurchaseConstant
.
addPageIndex
(
map
,
pageIndex
);
mModel
.
getWarehousingOrderList
(
map
)
.
subscribeOn
(
Schedulers
.
io
())
.
doOnSubscribe
(
disposable
->
mRootView
.
showLoading
(
PurchaseConstant
.
GET_INFO_LOADING
))
.
subscribeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
doAfterTerminate
(()
->
mRootView
.
hideLoading
())
.
compose
(
RxLifecycleUtils
.
bindToLifecycle
(
mRootView
))
.
subscribe
(
new
ErrorHandleSubscriber
<
BaseResult
>(
mErrorHandler
)
{
@Override
public
void
onNext
(
BaseResult
baseResult
)
{
if
(
baseResult
!=
null
&&
baseResult
.
isSuccess
())
{
WarehousingOrderListBean
warehousingOrderListBean
=
GsonUtils
.
GsonToBean
(
baseResult
.
getData
(),
WarehousingOrderListBean
.
class
);
if
(
warehousingOrderListBean
==
null
)
{
mRootView
.
showMessage
(
"訂單數據獲取失敗,請稍候重試"
);
mRootView
.
killMyself
();
}
else
{
if
(
warehousingOrderListAdapter
==
null
)
{
warehousingOrderListAdapter
=
new
WarehousingOrderListAdapter
(
warehousingOrderListBean
.
getPurchaseWarehousingOrdersVO
());
warehousingOrderListAdapter
.
setAdapterAnimation
(
new
CustomAnimation3
());
mRootView
.
loadList
(
warehousingOrderListAdapter
);
}
else
{
if
(
pageIndex
==
0
)
{
warehousingOrderListAdapter
.
setList
(
warehousingOrderListBean
.
getPurchaseWarehousingOrdersVO
());
}
else
{
warehousingOrderListAdapter
.
addData
(
warehousingOrderListBean
.
getPurchaseWarehousingOrdersVO
());
mRootView
.
finishLoad
(
CollectionUtils
.
isNullOrEmpty
(
warehousingOrderListBean
.
getPurchaseWarehousingOrdersVO
()));
return
;
}
}
}
}
else
if
(
baseResult
!=
null
&&
TextUtil
.
isNotEmptyOrNullOrUndefined
(
baseResult
.
getErrMsg
()))
{
mRootView
.
showMessage
(
baseResult
.
getErrMsg
());
}
else
{
mRootView
.
showMessage
(
PurchaseConstant
.
GET_INFO_ERROR
);
}
mRootView
.
finishLoad
(
false
);
}
});
}
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/server/SupplierServer.java
View file @
69e9e173
...
@@ -427,7 +427,7 @@ public interface SupplierServer {
...
@@ -427,7 +427,7 @@ public interface SupplierServer {
*/
*/
@Headers
({
"Domain-Name: ricepon-purchase"
})
@Headers
({
"Domain-Name: ricepon-purchase"
})
@GET
(
"purchaseWarehousingOrder/details/get"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@GET
(
"purchaseWarehousingOrder/details/get"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
getWarehousing
Order
Details
(
@QueryMap
Map
<
String
,
Object
>
map
);
Observable
<
BaseResult
>
getWarehousingDetails
(
@QueryMap
Map
<
String
,
Object
>
map
);
/**
/**
* 查詢出庫流水
* 查詢出庫流水
...
@@ -496,7 +496,30 @@ public interface SupplierServer {
...
@@ -496,7 +496,30 @@ public interface SupplierServer {
@GET
(
"purchaseConsumeReason/multipleStorageCauseList"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@GET
(
"purchaseConsumeReason/multipleStorageCauseList"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
getMultipleStorageCauseList
(
@QueryMap
Map
<
String
,
Object
>
map
);
Observable
<
BaseResult
>
getMultipleStorageCauseList
(
@QueryMap
Map
<
String
,
Object
>
map
);
/**
* 下入庫單
* @param requestBody
* @return
*/
@Headers
({
"Domain-Name: ricepon-purchase"
})
@Headers
({
"Domain-Name: ricepon-purchase"
})
@POST
(
"purchaseWarehousingOrder/details/addMultipleStorageDetails"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
@POST
(
"purchaseWarehousingOrder/details/addMultipleStorageDetails"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
addWarehousingOrder
(
@Body
RequestBody
requestBody
);
Observable
<
BaseResult
>
addWarehousingOrder
(
@Body
RequestBody
requestBody
);
/**
* 查詢入庫單列表
* @param map
*/
@Headers
({
"Domain-Name: ricepon-purchase"
})
@GET
(
"purchaseWarehousingOrder/details/getMultipleStorageOrder"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
getWarehousingOrderList
(
@QueryMap
Map
<
String
,
Object
>
map
);
/**
* 查詢入庫單詳情
*/
@Headers
({
"Domain-Name: ricepon-purchase"
})
@GET
(
"purchaseWarehousingOrder/details/getMultipleStorageOrderDetails"
+
RetrofitUrlManager
.
IDENTIFICATION_PATH_SIZE
+
2
)
Observable
<
BaseResult
>
getWarehousingOrderDetails
(
@Query
(
"warehousingOrderId"
)
int
warehousingOrderId
);
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/activity/SupplyChainMainActivity.java
View file @
69e9e173
...
@@ -12,9 +12,15 @@ import android.widget.EditText;
...
@@ -12,9 +12,15 @@ import android.widget.EditText;
import
androidx.annotation.NonNull
;
import
androidx.annotation.NonNull
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.billy.cc.core.component.CC
;
import
com.gingersoft.gsa.cloud.common.constans.PrintConstans
;
import
com.gingersoft.gsa.cloud.component.ComponentAction
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.order.order.TakeawayOrder
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog
;
import
com.gingersoft.gsa.cloud.ui.widget.dialog.LoadingDialog
;
import
com.gingersoft.supply_chain.R
;
import
com.gingersoft.supply_chain.R
;
import
com.gingersoft.supply_chain.di.component.DaggerSupplyChainMainComponent
;
import
com.gingersoft.supply_chain.di.component.DaggerSupplyChainMainComponent
;
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.SupplyChainMainContract
;
import
com.gingersoft.supply_chain.mvp.contract.SupplyChainMainContract
;
import
com.gingersoft.supply_chain.mvp.presenter.SupplyChainMainPresenter
;
import
com.gingersoft.supply_chain.mvp.presenter.SupplyChainMainPresenter
;
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/adapter/WarehousingOrderListAdapter.kt
View file @
69e9e173
package
com.gingersoft.supply_chain.mvp.ui.adapter
package
com.gingersoft.supply_chain.mvp.ui.adapter
import
androidx.core.content.ContextCompat
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.BaseQuickAdapter
import
com.chad.library.adapter.base.viewholder.BaseViewHolder
import
com.chad.library.adapter.base.viewholder.BaseViewHolder
import
com.gingersoft.gsa.cloud.common.utils.MoneyUtil
import
com.gingersoft.gsa.cloud.common.utils.other.TextUtil
import
com.gingersoft.supply_chain.R
import
com.gingersoft.supply_chain.R
import
com.gingersoft.supply_chain.mvp.bean.WarehouseOrderBean
import
com.gingersoft.supply_chain.mvp.bean.WarehouseOrderBean
...
@@ -15,11 +18,15 @@ import com.gingersoft.supply_chain.mvp.bean.WarehouseOrderBean
...
@@ -15,11 +18,15 @@ import com.gingersoft.supply_chain.mvp.bean.WarehouseOrderBean
class
WarehousingOrderListAdapter
(
data
:
MutableList
<
WarehouseOrderBean
>?)
:
BaseQuickAdapter
<
WarehouseOrderBean
,
BaseViewHolder
>(
R
.
layout
.
item_warehousing_order_list
,
data
)
{
class
WarehousingOrderListAdapter
(
data
:
MutableList
<
WarehouseOrderBean
>?)
:
BaseQuickAdapter
<
WarehouseOrderBean
,
BaseViewHolder
>(
R
.
layout
.
item_warehousing_order_list
,
data
)
{
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
WarehouseOrderBean
)
{
override
fun
convert
(
holder
:
BaseViewHolder
,
item
:
WarehouseOrderBean
)
{
holder
.
setText
(
R
.
id
.
tv_warehousing_order_no
,
item
.
orderNo
)
holder
.
setText
(
R
.
id
.
tv_warehousing_order_no
,
item
.
warehousingOrderNo
)
holder
.
setText
(
R
.
id
.
tv_warehousing_order_createTime
,
item
.
warehousingTime
)
holder
.
setText
(
R
.
id
.
tv_warehousing_order_createTime
,
item
.
createTime
)
holder
.
setText
(
R
.
id
.
tv_warehousing_order_species
,
item
.
warehousingSpecies
.
toString
())
holder
.
setText
(
R
.
id
.
tv_warehousing_order_species
,
String
.
format
(
context
.
getString
(
R
.
string
.
str_format_species_colon
),
item
.
purchaseFoodCount
))
holder
.
setText
(
R
.
id
.
tv_warehousing_order_createMember
,
item
.
warehousingMember
)
holder
.
setText
(
R
.
id
.
tv_warehousing_order_createMember
,
String
.
format
(
context
.
getString
(
R
.
string
.
str_format_warehousing_member
),
item
.
userName
))
holder
.
setText
(
R
.
id
.
tv_warehousing_order_foods
,
item
.
warehousingFoodName
)
holder
.
setText
(
R
.
id
.
tv_warehousing_order_foods
,
item
.
foodName
)
holder
.
setText
(
R
.
id
.
tv_warehousing_order_createReason
,
item
.
warehousingReason
)
holder
.
setText
(
R
.
id
.
tv_warehousing_order_createReason
,
item
.
storageType
)
val
amount
=
String
.
format
(
context
.
getString
(
R
.
string
.
str_total_amount_colon_s
),
MoneyUtil
.
formatDouble
(
item
.
totalPrice
))
holder
.
setText
(
R
.
id
.
tv_warehousing_order_amount
,
TextUtil
.
getBoldSpannableString
(
amount
,
ContextCompat
.
getColor
(
context
,
R
.
color
.
required_color
),
4
,
amount
.
length
))
}
}
}
}
\ No newline at end of file
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/food/BuyIngredientsFragment.java
View file @
69e9e173
...
@@ -108,6 +108,8 @@ public class BuyIngredientsFragment extends BaseSupplyChainFragment<BuyIngredien
...
@@ -108,6 +108,8 @@ public class BuyIngredientsFragment extends BaseSupplyChainFragment<BuyIngredien
QMUIAlphaButton
btnFoodIngredientsConfirm
;
QMUIAlphaButton
btnFoodIngredientsConfirm
;
@BindView
(
R2
.
id
.
tv_ingredients_food_num
)
@BindView
(
R2
.
id
.
tv_ingredients_food_num
)
TextView
tvIngredientsFoodNum
;
TextView
tvIngredientsFoodNum
;
@BindView
(
R2
.
id
.
layout_choose_size
)
LinearLayout
layoutChooseSize
;
@BindView
(
R2
.
id
.
btn_food_ingredients_cancel
)
@BindView
(
R2
.
id
.
btn_food_ingredients_cancel
)
QMUIAlphaButton
btnFoodIngredientsCancel
;
QMUIAlphaButton
btnFoodIngredientsCancel
;
@BindView
(
R2
.
id
.
layout_food_ingredients_btn
)
@BindView
(
R2
.
id
.
layout_food_ingredients_btn
)
...
@@ -311,12 +313,13 @@ public class BuyIngredientsFragment extends BaseSupplyChainFragment<BuyIngredien
...
@@ -311,12 +313,13 @@ public class BuyIngredientsFragment extends BaseSupplyChainFragment<BuyIngredien
if
(
pageType
==
FOOD_INGREDIENTS
)
{
if
(
pageType
==
FOOD_INGREDIENTS
)
{
layoutFoodIngredientsBtn
.
setVisibility
(
View
.
GONE
);
layoutFoodIngredientsBtn
.
setVisibility
(
View
.
GONE
);
btnNewFoodIngredient
.
setVisibility
(
View
.
VISIBLE
);
btnNewFoodIngredient
.
setVisibility
(
View
.
VISIBLE
);
tvSelectFood
Size
.
setVisibility
(
View
.
GONE
);
layoutChoose
Size
.
setVisibility
(
View
.
GONE
);
}
else
if
(
pageType
==
GET_FOOD_BY_WAREHOUSING_ORDER
)
{
}
else
if
(
pageType
==
GET_FOOD_BY_WAREHOUSING_ORDER
)
{
//創建入庫單
//創建入庫單
tvSelectFood
Size
.
setVisibility
(
View
.
VISIBLE
);
layoutChoose
Size
.
setVisibility
(
View
.
VISIBLE
);
btnFoodIngredientsCancel
.
setVisibility
(
View
.
GONE
);
btnFoodIngredientsCancel
.
setVisibility
(
View
.
GONE
);
}
else
{
}
else
{
layoutChooseSize
.
setVisibility
(
View
.
GONE
);
layoutFoodIngredientsBtn
.
setVisibility
(
View
.
VISIBLE
);
layoutFoodIngredientsBtn
.
setVisibility
(
View
.
VISIBLE
);
}
}
}
}
...
@@ -519,16 +522,17 @@ public class BuyIngredientsFragment extends BaseSupplyChainFragment<BuyIngredien
...
@@ -519,16 +522,17 @@ public class BuyIngredientsFragment extends BaseSupplyChainFragment<BuyIngredien
if
(
CollectionUtils
.
isNotNullOrEmpty
(
purchaseFood
))
{
if
(
CollectionUtils
.
isNotNullOrEmpty
(
purchaseFood
))
{
if
(
pageType
==
GET_FOOD_BY_WAREHOUSING_ORDER
)
{
if
(
pageType
==
GET_FOOD_BY_WAREHOUSING_ORDER
)
{
//採購入庫單
//採購入庫單
setFragmentResult
(
RESULT_OK
,
null
);
List
<
Fragment
>
fragments
=
requireActivity
().
getSupportFragmentManager
().
getFragments
();
List
<
Fragment
>
fragments
=
requireActivity
().
getSupportFragmentManager
().
getFragments
();
for
(
Fragment
fragment
:
fragments
)
{
for
(
Fragment
fragment
:
fragments
)
{
if
(
fragment
instanceof
WarehousingOrderDetailsFragment
)
{
if
(
fragment
instanceof
WarehousingOrderDetailsFragment
)
{
//有入庫單詳情
//有入庫單詳情
popTo
(
WarehousingOrderDetailsFragment
.
class
,
false
);
killMyself
(
);
return
;
return
;
}
}
}
}
//沒入庫單詳情
//沒入庫單詳情
startWithPop
(
WarehousingOrderDetailsFragment
.
newInstance
());
startWithPop
(
WarehousingOrderDetailsFragment
.
newInstance
(
-
1
,
""
));
}
else
{
}
else
{
startForResult
(
ShoppingCatFragment
.
newInstance
(),
TO_SHOPPING_CART_REQUEST_CODE
);
startForResult
(
ShoppingCatFragment
.
newInstance
(),
TO_SHOPPING_CART_REQUEST_CODE
);
}
}
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/order/OrderDetailsFragment.java
View file @
69e9e173
...
@@ -165,7 +165,7 @@ public class OrderDetailsFragment extends BaseSupplyChainFragment<OrderDetailsPr
...
@@ -165,7 +165,7 @@ public class OrderDetailsFragment extends BaseSupplyChainFragment<OrderDetailsPr
@Override
@Override
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
initTopBar
(
supplyTopBar
,
"入庫單"
);
initTopBar
(
supplyTopBar
,
getString
(
R
.
string
.
str_warehousing_order
)
);
supplyTopBar
.
addRightImageButton
(
R
.
drawable
.
ic_white_more
,
R
.
id
.
id_more
).
setOnClickListener
(
this
);
supplyTopBar
.
addRightImageButton
(
R
.
drawable
.
ic_white_more
,
R
.
id
.
id_more
).
setOnClickListener
(
this
);
edRemark
.
setFilters
(
new
InputFilter
[]{
InputFilterUtils
.
getLengthFilter
(
mContext
,
RemarkProvider
.
REMARK_TEXT_LENGTH
),
InputFilterUtils
.
getChAndEnNumPtWrapInputFilter
(
mContext
)});
edRemark
.
setFilters
(
new
InputFilter
[]{
InputFilterUtils
.
getLengthFilter
(
mContext
,
RemarkProvider
.
REMARK_TEXT_LENGTH
),
InputFilterUtils
.
getChAndEnNumPtWrapInputFilter
(
mContext
)});
Bundle
arguments
=
getArguments
();
Bundle
arguments
=
getArguments
();
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/warehouse/WarehousingOrderDetailsFragment.java
View file @
69e9e173
This diff is collapsed.
Click to expand it.
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/fragment/warehouse/WarehousingOrderListFragment.java
View file @
69e9e173
...
@@ -10,9 +10,12 @@ import androidx.annotation.NonNull;
...
@@ -10,9 +10,12 @@ import androidx.annotation.NonNull;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
androidx.recyclerview.widget.RecyclerView
;
import
androidx.recyclerview.widget.RecyclerView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.listener.OnItemClickListener
;
import
com.gingersoft.gsa.cloud.common.core.user.UserConstans
;
import
com.gingersoft.gsa.cloud.common.core.user.UserConstans
;
import
com.gingersoft.gsa.cloud.common.core.user.UserContext
;
import
com.gingersoft.gsa.cloud.common.core.user.UserContext
;
import
com.gingersoft.gsa.cloud.common.core.user.info.UserInfo
;
import
com.gingersoft.gsa.cloud.common.core.user.info.UserInfo
;
import
com.gingersoft.gsa.cloud.common.loadsir.EmptyCallback
;
import
com.gingersoft.gsa.cloud.common.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.common.utils.time.TimeUtils
;
import
com.gingersoft.gsa.cloud.ui.animator.CustomAnimation1
;
import
com.gingersoft.gsa.cloud.ui.animator.CustomAnimation1
;
import
com.gingersoft.gsa.cloud.ui.animator.CustomAnimation3
;
import
com.gingersoft.gsa.cloud.ui.animator.CustomAnimation3
;
...
@@ -27,7 +30,13 @@ import com.gingersoft.supply_chain.mvp.ui.adapter.WarehousingOrderListAdapter;
...
@@ -27,7 +30,13 @@ import com.gingersoft.supply_chain.mvp.ui.adapter.WarehousingOrderListAdapter;
import
com.gingersoft.supply_chain.mvp.ui.fragment.BaseSupplyChainFragment
;
import
com.gingersoft.supply_chain.mvp.ui.fragment.BaseSupplyChainFragment
;
import
com.gingersoft.supply_chain.mvp.ui.fragment.food.BuyIngredientsFragment
;
import
com.gingersoft.supply_chain.mvp.ui.fragment.food.BuyIngredientsFragment
;
import
com.jess.arms.di.component.AppComponent
;
import
com.jess.arms.di.component.AppComponent
;
import
com.kingja.loadsir.callback.Callback
;
import
com.kingja.loadsir.core.LoadSir
;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
import
com.qmuiteam.qmui.widget.QMUITopBar
;
import
com.scwang.smartrefresh.layout.SmartRefreshLayout
;
import
com.scwang.smartrefresh.layout.api.RefreshLayout
;
import
com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
;
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -55,6 +64,9 @@ public class WarehousingOrderListFragment extends BaseSupplyChainFragment<Wareho
...
@@ -55,6 +64,9 @@ public class WarehousingOrderListFragment extends BaseSupplyChainFragment<Wareho
QMUITopBar
supplyTopBar
;
QMUITopBar
supplyTopBar
;
@BindView
(
R2
.
id
.
rv_second_category
)
@BindView
(
R2
.
id
.
rv_second_category
)
RecyclerView
rvSecondCategory
;
RecyclerView
rvSecondCategory
;
@BindView
(
R2
.
id
.
smart_fresh
)
SmartRefreshLayout
smartRefreshLayout
;
private
final
static
int
NEW_WAREHOUSING_ORDER_REQUEST_CODE
=
1001
;
public
static
WarehousingOrderListFragment
newInstance
()
{
public
static
WarehousingOrderListFragment
newInstance
()
{
WarehousingOrderListFragment
fragment
=
new
WarehousingOrderListFragment
();
WarehousingOrderListFragment
fragment
=
new
WarehousingOrderListFragment
();
...
@@ -78,15 +90,26 @@ public class WarehousingOrderListFragment extends BaseSupplyChainFragment<Wareho
...
@@ -78,15 +90,26 @@ public class WarehousingOrderListFragment extends BaseSupplyChainFragment<Wareho
@Override
@Override
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
public
void
initData
(
@Nullable
Bundle
savedInstanceState
)
{
initTopBar
(
supplyTopBar
,
"入庫單"
);
initTopBar
(
supplyTopBar
,
getString
(
R
.
string
.
str_warehousing_order
));
smartRefreshLayout
.
setPrimaryColorsId
(
R
.
color
.
trans
,
R
.
color
.
black
);
loadService
=
LoadSir
.
getDefault
().
register
(
smartRefreshLayout
,
(
Callback
.
OnReloadListener
)
v
->
{
mPresenter
.
pageIndex
=
0
;
loadOrderList
();
});
smartRefreshLayout
.
setOnRefreshListener
(
refreshLayout
->
loadOrderList
());
smartRefreshLayout
.
setOnLoadMoreListener
(
new
OnLoadMoreListener
()
{
@Override
public
void
onLoadMore
(
@NonNull
RefreshLayout
refreshLayout
)
{
mPresenter
.
pageIndex
++;
loadOrderList
();
}
});
supplyTopBar
.
addRightImageButton
(
R
.
drawable
.
ic_circle_new_food_ingredient
,
R
.
id
.
topbar_right_add_button
).
setOnClickListener
(
this
);
supplyTopBar
.
addRightImageButton
(
R
.
drawable
.
ic_circle_new_food_ingredient
,
R
.
id
.
topbar_right_add_button
).
setOnClickListener
(
this
);
List
<
WarehouseOrderBean
>
warehouseOrderBeanList
=
new
ArrayList
<>();
loadOrderList
();
for
(
int
i
=
0
;
i
<
15
;
i
++)
{
}
warehouseOrderBeanList
.
add
(
new
WarehouseOrderBean
(
"RKO1101"
+
i
,
UserContext
.
newInstance
().
getMemberName
(),
TimeUtils
.
getCurrentDate
(
TimeUtils
.
DEFAULT_DATE_FORMAT_YMDHM
),
"巴西肥牛"
,
1
,
"調撥入庫"
));
}
private
void
loadOrderList
()
{
WarehousingOrderListAdapter
adapter
=
new
WarehousingOrderListAdapter
(
warehouseOrderBeanList
);
mPresenter
.
getWarehousingOrderList
();
adapter
.
setAdapterAnimation
(
new
CustomAnimation3
());
rvSecondCategory
.
setAdapter
(
adapter
);
}
}
@Override
@Override
...
@@ -96,7 +119,42 @@ public class WarehousingOrderListFragment extends BaseSupplyChainFragment<Wareho
...
@@ -96,7 +119,42 @@ public class WarehousingOrderListFragment extends BaseSupplyChainFragment<Wareho
//先清空購物車
//先清空購物車
SupplyShoppingCart
.
getInstance
().
clear
();
SupplyShoppingCart
.
getInstance
().
clear
();
//新增入庫單
//新增入庫單
start
(
BuyIngredientsFragment
.
newInstance
(
BuyIngredientsFragment
.
GET_FOOD_BY_WAREHOUSING_ORDER
));
// start(BuyIngredientsFragment.newInstance(BuyIngredientsFragment.GET_FOOD_BY_WAREHOUSING_ORDER));
startForResult
(
WarehousingOrderDetailsFragment
.
newInstance
(-
1
,
""
),
NEW_WAREHOUSING_ORDER_REQUEST_CODE
);
}
}
@Override
public
void
loadList
(
WarehousingOrderListAdapter
warehousingOrderListAdapter
)
{
finishLoad
(
false
);
if
(
warehousingOrderListAdapter
.
getItemCount
()
<=
0
)
{
loadService
.
showCallback
(
EmptyCallback
.
class
);
}
else
{
loadService
.
showSuccess
();
warehousingOrderListAdapter
.
setOnItemClickListener
((
adapter
,
view
,
position
)
->
{
start
(
WarehousingOrderDetailsFragment
.
newInstance
(
warehousingOrderListAdapter
.
getItem
(
position
).
getId
(),
warehousingOrderListAdapter
.
getItem
(
position
).
getStorageType
()));
});
rvSecondCategory
.
setAdapter
(
warehousingOrderListAdapter
);
}
}
@Override
public
void
finishLoad
(
boolean
isNoMore
)
{
smartRefreshLayout
.
finishRefresh
();
smartRefreshLayout
.
finishLoadMore
();
if
(
isNoMore
)
{
smartRefreshLayout
.
finishLoadMoreWithNoMoreData
();
}
else
{
smartRefreshLayout
.
resetNoMoreData
();
}
}
@Override
public
void
onFragmentResult
(
int
requestCode
,
int
resultCode
,
Bundle
data
)
{
super
.
onFragmentResult
(
requestCode
,
resultCode
,
data
);
if
(
requestCode
==
NEW_WAREHOUSING_ORDER_REQUEST_CODE
)
{
mPresenter
.
pageIndex
=
0
;
loadOrderList
();
}
}
}
}
}
}
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/widget/ScanSnView.java
View file @
69e9e173
...
@@ -197,19 +197,19 @@ public class ScanSnView extends FrameLayout {
...
@@ -197,19 +197,19 @@ public class ScanSnView extends FrameLayout {
});
});
adapter
.
setOnItemChildClickListener
((
adapter1
,
view
,
position
)
->
{
adapter
.
setOnItemChildClickListener
((
adapter1
,
view
,
position
)
->
{
if
(
view
.
getId
()
==
R
.
id
.
iv_sn_code_delete
)
{
if
(
view
.
getId
()
==
R
.
id
.
iv_sn_code_delete
)
{
// if (adapter.getItem(position).newAdd) {
onSingerResultListener
.
onScanValue
(
false
,
adapter
.
getItem
(
position
),
adapter
.
getItemCount
());
if
(
onDeleteSnCodeListener
!=
null
)
{
onDeleteSnCodeListener
.
onDelete
(
adapter
.
getItem
(
position
),
position
);
}
if
(
adapter
.
getItem
(
position
).
newAdd
)
{
if
(
adapter
.
getItem
(
position
).
newAdd
)
{
newCodeSize
--;
onSingerResultListener
.
onScanValue
(
false
,
adapter
.
getItem
(
position
),
adapter
.
getItemCount
());
if
(
onDeleteSnCodeListener
!=
null
)
{
onDeleteSnCodeListener
.
onDelete
(
adapter
.
getItem
(
position
),
position
);
}
if
(
adapter
.
getItem
(
position
).
newAdd
)
{
newCodeSize
--;
}
adapter1
.
removeAt
(
position
);
setConfirmBtnState
();
}
else
{
ToastUtils
.
show
(
getContext
(),
"已入庫的SN碼不可刪除"
);
}
}
adapter1
.
removeAt
(
position
);
setConfirmBtnState
();
// } else {
// ToastUtils.show(getContext(), "已入庫的SN碼不可刪除");
// }
}
}
});
});
addView
(
rootView
);
addView
(
rootView
);
...
...
component-supply-chain/src/main/java/com/gingersoft/supply_chain/mvp/ui/widget/WarehousingFoodDetailsPopup.java
0 → 100644
View file @
69e9e173
package
com
.
gingersoft
.
supply_chain
.
mvp
.
ui
.
widget
;
import
android.content.Context
;
import
android.view.MotionEvent
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
import
androidx.annotation.NonNull
;
import
androidx.core.content.ContextCompat
;
import
com.gingersoft.gsa.cloud.common.utils.MoneyUtil
;
import
com.gingersoft.gsa.cloud.common.utils.glide.GlideUtils
;
import
com.gingersoft.gsa.cloud.common.utils.other.TextUtil
;
import
com.gingersoft.gsa.cloud.common.utils.threadPool.ThreadPoolManager
;
import
com.gingersoft.supply_chain.R
;
import
com.gingersoft.supply_chain.R2
;
import
com.gingersoft.supply_chain.mvp.bean.PurchaseFoodBean
;
import
com.gingersoft.supply_chain.mvp.content.PurchaseConstant
;
import
com.gingersoft.supply_chain.mvp.ui.adapter.BuyIngredientsAdapter
;
import
com.lxj.xpopup.core.CenterPopupView
;
import
com.qmuiteam.qmui.widget.textview.QMUISpanTouchFixTextView
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
/**
* @author 宇航.
* User: admin
* Date: 2021/4/15
* Time: 10:07
* Use:
*/
public
class
WarehousingFoodDetailsPopup
extends
CenterPopupView
{
@BindView
(
R2
.
id
.
tv_goods_name
)
TextView
tvGoodsName
;
@BindView
(
R2
.
id
.
tv_goods_price
)
QMUISpanTouchFixTextView
tvGoodsPrice
;
@BindView
(
R2
.
id
.
tv_goods_no
)
TextView
tvGoodsNo
;
@BindView
(
R2
.
id
.
tv_food_number
)
TextView
tvFoodNumber
;
@BindView
(
R2
.
id
.
tv_food_total_amount
)
QMUISpanTouchFixTextView
tvFoodTotalAmount
;
@BindView
(
R2
.
id
.
tv_goods_specification
)
TextView
tvGoodsSpecification
;
@BindView
(
R2
.
id
.
iv_popup_close
)
ImageView
ivPopupClose
;
private
PurchaseFoodBean
purchaseFoodBean
;
public
WarehousingFoodDetailsPopup
(
@NonNull
Context
context
,
PurchaseFoodBean
purchaseFoodBean
)
{
super
(
context
);
this
.
purchaseFoodBean
=
purchaseFoodBean
;
}
@Override
protected
int
getImplLayoutId
()
{
return
R
.
layout
.
layout_warehousing_details_popup
;
}
@Override
protected
void
onCreate
()
{
super
.
onCreate
();
ButterKnife
.
bind
(
this
);
popupInfo
.
autoOpenSoftInput
=
false
;
tvGoodsName
.
setText
(
purchaseFoodBean
.
getName
());
tvFoodNumber
.
setText
(
String
.
valueOf
(
purchaseFoodBean
.
getFoodQuantity
()));
tvGoodsNo
.
setText
(
purchaseFoodBean
.
getFoodNo
());
String
price
=
String
.
format
(
getContext
().
getString
(
R
.
string
.
str_unit_price_colon_s
),
MoneyUtil
.
formatDouble
(
purchaseFoodBean
.
getUnitPrice
()));
tvGoodsPrice
.
setText
(
TextUtil
.
getBoldSpannableString
(
price
,
ContextCompat
.
getColor
(
getContext
(),
R
.
color
.
required_color
),
3
,
price
.
length
()));
String
totalAmountText
=
String
.
format
(
getContext
().
getString
(
R
.
string
.
str_total_amount_colon_s
),
MoneyUtil
.
formatDouble
(
MoneyUtil
.
priceCalculation
(
purchaseFoodBean
.
getUnitPrice
(),
purchaseFoodBean
.
getFoodQuantity
())));
tvFoodTotalAmount
.
setText
(
TextUtil
.
getBoldSpannableString
(
totalAmountText
,
ContextCompat
.
getColor
(
getContext
(),
R
.
color
.
required_color
),
3
,
price
.
length
()));
if
(
TextUtil
.
isNotEmptyOrNullOrUndefined
(
purchaseFoodBean
.
getPackingDescription
()))
{
tvGoodsSpecification
.
setText
(
purchaseFoodBean
.
getPackingDescription
());
}
else
{
tvGoodsSpecification
.
setText
(
purchaseFoodBean
.
getBasicUnitName
());
}
ivPopupClose
.
setOnClickListener
(
this
::
onClick
);
}
private
void
onClick
(
View
v
)
{
dismiss
();
}
}
component-supply-chain/src/main/res/layout/btn_gray_to_blue.xml
View file @
69e9e173
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_2"
android:layout_marginLeft=
"@dimen/dp_2"
android:layout_marginRight=
"@dimen/dp_2"
android:layout_marginRight=
"@dimen/dp_2"
android:layout_marginBottom=
"@dimen/dp_1
5
"
android:layout_marginBottom=
"@dimen/dp_1
0
"
android:background=
"@drawable/selector_new_order_radio_bg"
android:background=
"@drawable/selector_new_order_radio_bg"
android:button=
"@null"
android:button=
"@null"
android:paddingLeft=
"@dimen/dp_10"
android:paddingLeft=
"@dimen/dp_10"
...
...
component-supply-chain/src/main/res/layout/footer_add.xml
View file @
69e9e173
...
@@ -10,13 +10,11 @@
...
@@ -10,13 +10,11 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_gravity=
"center"
android:gravity=
"center"
android:gravity=
"center"
android:paddingLeft=
"@dimen/dp_10"
android:paddingTop=
"@dimen/dp_10"
android:paddingTop=
"@dimen/dp_5"
android:paddingBottom=
"@dimen/dp_10"
android:paddingRight=
"@dimen/dp_10"
android:paddingBottom=
"@dimen/dp_5"
android:text=
"+添加食材"
android:text=
"+添加食材"
android:textColor=
"@color/theme_333_color"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/supply_chain_textSize_1
6
"
/>
android:textSize=
"@dimen/supply_chain_textSize_1
8
"
/>
<include
<include
layout=
"@layout/include_horizontal_color_ccc_dividing_line"
layout=
"@layout/include_horizontal_color_ccc_dividing_line"
...
...
component-supply-chain/src/main/res/layout/fragment_buy_ingredients.xml
View file @
69e9e173
...
@@ -224,11 +224,12 @@
...
@@ -224,11 +224,12 @@
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/layout_choose_size"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"@dimen/dp_20"
android:layout_marginRight=
"@dimen/dp_20"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:visibility=
"
visibl
e"
>
android:visibility=
"
gon
e"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -302,8 +303,7 @@
...
@@ -302,8 +303,7 @@
android:layout_marginTop=
"@dimen/dp_5"
android:layout_marginTop=
"@dimen/dp_5"
android:layout_marginBottom=
"@dimen/dp_5"
android:layout_marginBottom=
"@dimen/dp_5"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:text=
"取消"
android:text=
"取消"
/>
android:visibility=
"gone"
/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
...
...
component-supply-chain/src/main/res/layout/fragment_warehousing_list.xml
View file @
69e9e173
...
@@ -7,10 +7,16 @@
...
@@ -7,10 +7,16 @@
<include
layout=
"@layout/supply_chain_top_bar"
/>
<include
layout=
"@layout/supply_chain_top_bar"
/>
<
androidx.recyclerview.widget.RecyclerView
<
com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/
rv_second_category
"
android:id=
"@+id/
smart_fresh
"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
>
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_second_category"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
/>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
component-supply-chain/src/main/res/layout/fragment_warehousing_order_details.xml
View file @
69e9e173
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
android:id=
"@+id/rv_warehousing_food"
android:id=
"@+id/rv_warehousing_food"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_height=
"0dp"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_weight=
"1"
android:layout_weight=
"1"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
/>
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
/>
...
@@ -47,7 +46,8 @@
...
@@ -47,7 +46,8 @@
android:textColor=
"@color/theme_333_color"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/supply_chain_textSize_16"
android:textSize=
"@dimen/supply_chain_textSize_16"
android:thumb=
"@drawable/shape_thumb_on"
android:thumb=
"@drawable/shape_thumb_on"
android:track=
"@drawable/selector_switch_track"
/>
android:track=
"@drawable/selector_switch_track"
android:visibility=
"gone"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -101,12 +101,13 @@
...
@@ -101,12 +101,13 @@
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_2"
android:layout_marginTop=
"@dimen/dp_2"
android:layout_marginRight=
"@dimen/dp_15"
android:layout_marginRight=
"@dimen/dp_15"
android:textCursorDrawable=
"@drawable/cursor_theme"
android:hint=
"@string/str_remark"
android:hint=
"@string/str_remark"
android:textColorHint=
"@color/color_ccc"
android:textColorHint=
"@color/color_ccc"
android:textCursorDrawable=
"@drawable/cursor_theme"
android:textSize=
"@dimen/supply_chain_textSize_16"
/>
android:textSize=
"@dimen/supply_chain_textSize_16"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/layout_btn"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginLeft=
"@dimen/dp_15"
...
...
component-supply-chain/src/main/res/layout/item_warehousing_order_list.xml
View file @
69e9e173
...
@@ -13,31 +13,30 @@
...
@@ -13,31 +13,30 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_40"
android:layout_height=
"@dimen/dp_40"
android:
layout_marginLeft=
"@dimen/dp_8
"
android:
orientation=
"horizontal
"
android:
layout_marginRigh
t=
"@dimen/dp_8"
android:
paddingLef
t=
"@dimen/dp_8"
android:
orientation=
"horizontal
"
>
android:
paddingRight=
"@dimen/dp_8
"
>
<TextView
<TextView
android:id=
"@+id/tv_warehousing_order_
no
"
android:id=
"@+id/tv_warehousing_order_
createReason
"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:ellipsize=
"end"
android:ellipsize=
"end"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:maxLines=
"1"
android:maxLines=
"1"
android:textColor=
"@color/theme_333_color"
android:textColor=
"@color/theme_333_color"
android:textSize=
"@dimen/dp_17"
android:textSize=
"@dimen/dp_17"
tools:text=
"
入庫單號
"
/>
tools:text=
"
調撥入庫
"
/>
<TextView
<TextView
android:id=
"@+id/tv_warehousing_order_
createTime
"
android:id=
"@+id/tv_warehousing_order_
amount
"
style=
"@style/Food_Ingredient_Info_TextStyle"
style=
"@style/Food_Ingredient_Info_TextStyle"
android:layout_width=
"
0dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_gravity=
"end|center_vertical"
android:ellipsize=
"end"
tools:text=
"總價:"
/>
android:gravity=
"right"
android:maxLines=
"1"
tools:text=
"2020-11-20 12:00"
/>
</LinearLayout>
</LinearLayout>
<include
layout=
"@layout/include_horizontal_color_eee_dividing_line"
/>
<include
layout=
"@layout/include_horizontal_color_eee_dividing_line"
/>
...
@@ -47,24 +46,27 @@
...
@@ -47,24 +46,27 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:padding=
"@dimen/dp_8"
>
android:paddingLeft=
"@dimen/dp_8"
android:paddingTop=
"@dimen/dp_5"
android:paddingRight=
"@dimen/dp_8"
>
<TextView
<TextView
android:id=
"@+id/tv_warehousing_order_
species
"
android:id=
"@+id/tv_warehousing_order_
no
"
style=
"@style/Food_Ingredient_Info_TextStyle"
style=
"@style/Food_Ingredient_Info_TextStyle"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"種類:12
"
/>
tools:text=
"入庫單號
"
/>
<TextView
<TextView
android:id=
"@+id/tv_warehousing_order_create
Member
"
android:id=
"@+id/tv_warehousing_order_create
Time
"
style=
"@style/Food_Ingredient_Info_TextStyle"
style=
"@style/Food_Ingredient_Info_TextStyle"
android:layout_width=
"0dp"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_5"
android:layout_weight=
"1"
android:layout_weight=
"1"
android:gravity=
"end"
android:ellipsize=
"end"
tools:text=
"入庫人"
/>
android:gravity=
"right"
android:maxLines=
"1"
tools:text=
"2020-11-20 12:00"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
...
@@ -72,26 +74,38 @@
...
@@ -72,26 +74,38 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
android:orientation=
"horizontal"
android:paddingLeft=
"@dimen/dp_8"
android:paddingLeft=
"@dimen/dp_8"
android:padding
Right=
"@dimen/dp_8
"
android:padding
Top=
"@dimen/dp_5
"
android:padding
Bottom
=
"@dimen/dp_8"
>
android:padding
Right
=
"@dimen/dp_8"
>
<TextView
<TextView
android:id=
"@+id/tv_warehousing_order_
food
s"
android:id=
"@+id/tv_warehousing_order_
specie
s"
style=
"@style/Food_Ingredient_Info_TextStyle"
style=
"@style/Food_Ingredient_Info_TextStyle"
android:layout_width=
"
0dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
tools:text=
"種類:12"
/>
android:ellipsize=
"end"
android:singleLine=
"true"
tools:text=
"巴西肥牛、澳洲牛排"
/>
<TextView
<TextView
android:id=
"@+id/tv_warehousing_order_create
Reason
"
android:id=
"@+id/tv_warehousing_order_create
Member
"
style=
"@style/Food_Ingredient_Info_TextStyle"
style=
"@style/Food_Ingredient_Info_TextStyle"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
tools:text=
"調撥入庫"
/>
android:layout_marginLeft=
"@dimen/dp_5"
android:layout_weight=
"1"
android:gravity=
"end"
tools:text=
"入庫人"
/>
</LinearLayout>
</LinearLayout>
<TextView
android:id=
"@+id/tv_warehousing_order_foods"
style=
"@style/Food_Ingredient_Info_TextStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:paddingBottom=
"@dimen/dp_5"
android:paddingLeft=
"@dimen/dp_8"
android:paddingTop=
"@dimen/dp_5"
android:paddingRight=
"@dimen/dp_8"
android:singleLine=
"true"
tools:text=
"巴西肥牛、澳洲牛排"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
component-supply-chain/src/main/res/layout/layout_warehousing_details_popup.xml
0 → 100644
View file @
69e9e173
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/shape_white_eight_corners_bg"
android:orientation=
"vertical"
android:padding=
"@dimen/dp_10"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/tv_goods_name"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:layout_weight=
"1"
android:textColor=
"@color/color_3c"
android:textSize=
"@dimen/dp_16"
tools:text=
"巴西费缪"
/>
<TextView
android:id=
"@+id/tv_goods_no"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center_vertical|end"
android:textColor=
"@color/color_3c"
android:textSize=
"@dimen/dp_16"
tools:text=
"SP001"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_goods_specification"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:includeFontPadding=
"false"
android:textColor=
"@color/color_3c"
android:textSize=
"@dimen/dp_16"
tools:text=
"1KG/盒"
/>
<TextView
android:id=
"@+id/tv_food_number"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_5"
android:layout_weight=
"1"
android:gravity=
"end"
android:textColor=
"@color/color_3c"
android:textSize=
"@dimen/dp_16"
tools:text=
"海鮮天地"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_9"
android:orientation=
"horizontal"
>
<com.qmuiteam.qmui.widget.textview.QMUISpanTouchFixTextView
android:id=
"@+id/tv_goods_price"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:includeFontPadding=
"false"
android:text=
"單價:$100.0"
android:textColor=
"@color/color_3c"
android:textSize=
"@dimen/dp_16"
/>
<com.qmuiteam.qmui.widget.textview.QMUISpanTouchFixTextView
android:id=
"@+id/tv_food_total_amount"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"center_vertical|end"
android:includeFontPadding=
"false"
android:textColor=
"@color/color_3c"
android:textSize=
"@dimen/dp_16"
tools:text=
"總價:$100.0"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<ImageView
android:id=
"@+id/iv_popup_close"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_19"
android:layout_marginBottom=
"@dimen/dp_10"
android:src=
"@drawable/dialog_close"
/>
</LinearLayout>
\ No newline at end of file
component-supply-chain/src/main/res/layout/print_warehousing_order.xml
0 → 100644
View file @
69e9e173
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:text=
"@string/str_warehousing_order"
android:textColor=
"@color/black"
android:textSize=
"@dimen/dp_30"
/>
<TextView
android:id=
"@+id/tv_warehousing_no"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/black"
android:textSize=
"@dimen/dp_16"
tools:text=
"入庫單號"
/>
<TextView
android:id=
"@+id/tv_warehousing_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_5"
android:textColor=
"@color/black"
android:textSize=
"@dimen/dp_16"
tools:text=
"入庫日期"
/>
<include
layout=
"@layout/include_horizontal_color_eee_dividing_line"
/>
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/rv_warehousing_food"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_marginTop=
"@dimen/dp_5"
android:layout_weight=
"1"
app:layoutManager=
"androidx.recyclerview.widget.LinearLayoutManager"
/>
<TextView
android:id=
"@+id/tv_total_amount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_30"
android:layout_marginBottom=
"@dimen/dp_10"
android:textColor=
"@color/black"
android:textSize=
"@dimen/dp_16"
tools:text=
"總計:1111"
/>
</LinearLayout>
\ No newline at end of file
component-supply-chain/src/main/res/values/strings.xml
View file @
69e9e173
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
<string
name=
"str_supplier"
>
供應商
</string>
<string
name=
"str_supplier"
>
供應商
</string>
<string
name=
"str_species"
>
種類
</string>
<string
name=
"str_species"
>
種類
</string>
<string
name=
"str_species_colon"
>
種類:
</string>
<string
name=
"str_species_colon"
>
種類:
</string>
<string
name=
"str_format_species_colon"
>
種類:%1$d
</string>
<string
name=
"str_add_subtype"
>
+子類別
</string>
<string
name=
"str_add_subtype"
>
+子類別
</string>
<string
name=
"str_inventory_consumption"
>
庫存消耗
</string>
<string
name=
"str_inventory_consumption"
>
庫存消耗
</string>
<string
name=
"str_consumption_inventory"
>
消耗庫存:
</string>
<string
name=
"str_consumption_inventory"
>
消耗庫存:
</string>
...
@@ -27,6 +29,7 @@
...
@@ -27,6 +29,7 @@
<string
name=
"str_latest_unit_price_colon"
>
最新單價:$%1$.2f
</string>
<string
name=
"str_latest_unit_price_colon"
>
最新單價:$%1$.2f
</string>
<string
name=
"str_total_amount_colon"
>
總價:$%1$.2f
</string>
<string
name=
"str_total_amount_colon"
>
總價:$%1$.2f
</string>
<string
name=
"str_total_amount_colon_s"
>
總金額:$%1$s
</string>
<string
name=
"str_delete_category_tip"
>
是否確認刪除該類別【%1$s】,子類和食材將一同刪除?
</string>
<string
name=
"str_delete_category_tip"
>
是否確認刪除該類別【%1$s】,子類和食材將一同刪除?
</string>
<string
name=
"str_preview"
>
預覽
</string>
<string
name=
"str_preview"
>
預覽
</string>
<string
name=
"str_ingredients_name"
>
食材名:
</string>
<string
name=
"str_ingredients_name"
>
食材名:
</string>
...
@@ -58,6 +61,7 @@
...
@@ -58,6 +61,7 @@
<string
name=
"str_confirm_receipt"
>
是否確認收貨?
</string>
<string
name=
"str_confirm_receipt"
>
是否確認收貨?
</string>
<string
name=
"str_new_add_ingredients"
>
新增食材
</string>
<string
name=
"str_new_add_ingredients"
>
新增食材
</string>
<string
name=
"str_chosen"
>
已選擇
</string>
<string
name=
"str_chosen"
>
已選擇
</string>
<string
name=
"str_warehousing_order"
>
入庫單
</string>
<string
name=
"str_format_warehousing_member"
>
入庫人:%1$s
</string>
</resources>
</resources>
\ No newline at end of file
library-common/build.gradle
View file @
69e9e173
...
@@ -135,7 +135,7 @@ dependencies {
...
@@ -135,7 +135,7 @@ dependencies {
api
'com.github.huangyanbin:SmartTable:2.2.0'
api
'com.github.huangyanbin:SmartTable:2.2.0'
implementation
'com.lxj:xpopup:2.2.10'
implementation
'com.lxj:xpopup:2.2.10'
implementation
"androidx.documentfile:documentfile:1.0.1"
implementation
"androidx.documentfile:documentfile:1.0.1"
implementation
'com.github.markzhai:blockcanary-android:1.5.0'
implementation
'org.aspectj:aspectjrt:1.8.14'
implementation
'org.aspectj:aspectjrt:1.8.14'
aspectjx
{
aspectjx
{
exclude
'androidx'
,
'org.jetbrains.kotlin'
,
"module-info"
,
'com.google'
,
'com.squareup'
,
'org.apache'
,
'versions.9'
,
'com.squareup.okio'
,
'okio'
,
'leakcanary'
,
'com.google.firebase'
,
'com.google.android'
exclude
'androidx'
,
'org.jetbrains.kotlin'
,
"module-info"
,
'com.google'
,
'com.squareup'
,
'org.apache'
,
'versions.9'
,
'com.squareup.okio'
,
'okio'
,
'leakcanary'
,
'com.google.firebase'
,
'com.google.android'
...
...
library-common/src/main/java/com/gingersoft/gsa/cloud/app/GsaCloudApplication.java
View file @
69e9e173
...
@@ -16,6 +16,7 @@ import com.dianping.logan.Logan;
...
@@ -16,6 +16,7 @@ import com.dianping.logan.Logan;
import
com.dianping.logan.OnLoganProtocolStatus
;
import
com.dianping.logan.OnLoganProtocolStatus
;
import
com.gingersoft.gsa.cloud.common.BuildConfig
;
import
com.gingersoft.gsa.cloud.common.BuildConfig
;
import
com.gingersoft.gsa.cloud.common.R
;
import
com.gingersoft.gsa.cloud.common.R
;
import
com.gingersoft.gsa.cloud.common.config.AppBlockCanaryContext
;
import
com.gingersoft.gsa.cloud.common.config.LoganConfig
;
import
com.gingersoft.gsa.cloud.common.config.LoganConfig
;
import
com.gingersoft.gsa.cloud.common.config.expandconfig.ExpandInfoSetting
;
import
com.gingersoft.gsa.cloud.common.config.expandconfig.ExpandInfoSetting
;
import
com.gingersoft.gsa.cloud.common.config.expandconfig.FunctionExtendedConfiguration
;
import
com.gingersoft.gsa.cloud.common.config.expandconfig.FunctionExtendedConfiguration
;
...
@@ -47,6 +48,7 @@ import com.gingersoft.gsa.cloud.common.utils.other.SPUtils;
...
@@ -47,6 +48,7 @@ import com.gingersoft.gsa.cloud.common.utils.other.SPUtils;
import
com.gingersoft.gsa.cloud.component.ComponentAction
;
import
com.gingersoft.gsa.cloud.component.ComponentAction
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.component.ComponentName
;
import
com.gingersoft.gsa.cloud.database.DaoManager
;
import
com.gingersoft.gsa.cloud.database.DaoManager
;
import
com.github.moduth.blockcanary.BlockCanary
;
import
com.hyweb.n5.lib.exception.NoInitPrinterException
;
import
com.hyweb.n5.lib.exception.NoInitPrinterException
;
import
com.hyweb.n5.lib.util.PrinterUtil
;
import
com.hyweb.n5.lib.util.PrinterUtil
;
import
com.jess.arms.base.BaseApplication
;
import
com.jess.arms.base.BaseApplication
;
...
@@ -153,6 +155,8 @@ public class GsaCloudApplication extends BaseApplication {
...
@@ -153,6 +155,8 @@ public class GsaCloudApplication extends BaseApplication {
initAutoSize
();
initAutoSize
();
//上傳餐廳擴展信息
//上傳餐廳擴展信息
uploadExpandInfo
();
uploadExpandInfo
();
BlockCanary
.
install
(
mAppContext
,
new
AppBlockCanaryContext
()).
start
();
LoganManager
.
w_action
(
TAG
,
"init end....."
);
LoganManager
.
w_action
(
TAG
,
"init end....."
);
return
null
;
return
null
;
}
}
...
...
library-common/src/main/java/com/gingersoft/gsa/cloud/common/config/AppBlockCanaryContext.java
0 → 100644
View file @
69e9e173
package
com
.
gingersoft
.
gsa
.
cloud
.
common
.
config
;
import
android.content.Context
;
import
com.github.moduth.blockcanary.BlockCanaryContext
;
import
com.github.moduth.blockcanary.internal.BlockInfo
;
import
java.io.File
;
import
java.util.LinkedList
;
import
java.util.List
;
/**
* @author 宇航. 1239658231@qq.com
* User: admin
* Date: 2021/5/6
* Time: 14:12
* Use:
*/
public
class
AppBlockCanaryContext
extends
BlockCanaryContext
{
// 实现各种上下文,包括应用标示符,用户uid,网络类型,卡慢判断阙值,Log保存位置等
/**
* Implement in your project.
*
* @return Qualifier which can specify this installation, like version + flavor.
*/
@Override
public
String
provideQualifier
()
{
return
"unknown"
;
}
/**
* Implement in your project.
*
* @return user id
*/
@Override
public
String
provideUid
()
{
return
"uid"
;
}
/**
* Network type
*
* @return {@link String} like 2G, 3G, 4G, wifi, etc.
*/
@Override
public
String
provideNetworkType
()
{
return
"unknown"
;
}
/**
* Config monitor duration, after this time BlockCanary will stop, use
* with {@code BlockCanary}'s isMonitorDurationEnd
*
* @return monitor last duration (in hour)
*/
@Override
public
int
provideMonitorDuration
()
{
return
-
1
;
}
/**
* Config block threshold (in millis), dispatch over this duration is regarded as a BLOCK. You may set it
* from performance of device.
*
* @return threshold in mills
*/
@Override
public
int
provideBlockThreshold
()
{
return
1000
;
}
/**
* Thread stack dump interval, use when block happens, BlockCanary will dump on main thread
* stack according to current sample cycle.
* <p>
* Because the implementation mechanism of Looper, real dump interval would be longer than
* the period specified here (especially when cpu is busier).
* </p>
*
* @return dump interval (in millis)
*/
@Override
public
int
provideDumpInterval
()
{
return
provideBlockThreshold
();
}
/**
* Path to save log, like "/blockcanary/", will save to sdcard if can.
*
* @return path of log files
*/
@Override
public
String
providePath
()
{
return
"/blockcanary/"
;
}
/**
* If need notification to notice block.
*
* @return true if need, else if not need.
*/
@Override
public
boolean
displayNotification
()
{
return
true
;
}
/**
* Implement in your project, bundle files into a zip file.
*
* @param src files before compress
* @param dest files compressed
* @return true if compression is successful
*/
@Override
public
boolean
zip
(
File
[]
src
,
File
dest
)
{
return
false
;
}
/**
* Implement in your project, bundled log files.
*
* @param zippedFile zipped file
*/
@Override
public
void
upload
(
File
zippedFile
)
{
throw
new
UnsupportedOperationException
();
}
/**
* Packages that developer concern, by default it uses process name,
* put high priority one in pre-order.
*
* @return null if simply concern only package with process name.
*/
@Override
public
List
<
String
>
concernPackages
()
{
return
null
;
}
/**
* Filter stack without any in concern package, used with @{code concernPackages}.
*
* @return true if filter, false it not.
*/
@Override
public
boolean
filterNonConcernStack
()
{
return
false
;
}
/**
* Provide white list, entry in white list will not be shown in ui list.
*
* @return return null if you don't need white-list filter.
*/
@Override
public
List
<
String
>
provideWhiteList
()
{
LinkedList
<
String
>
whiteList
=
new
LinkedList
<>();
whiteList
.
add
(
"org.chromium"
);
return
whiteList
;
}
/**
* Whether to delete files whose stack is in white list, used with white-list.
*
* @return true if delete, false it not.
*/
@Override
public
boolean
deleteFilesInWhiteList
()
{
return
true
;
}
/**
* Block interceptor, developer may provide their own actions.
*/
@Override
public
void
onBlock
(
Context
context
,
BlockInfo
blockInfo
)
{
}
}
library-common/src/main/res/layout/include_horizontal_color_ccc_dividing_line.xml
View file @
69e9e173
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
<View
xmlns:android=
"http://schemas.android.com/apk/res/android"
<View
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/horizontal_dividing_line"
android:id=
"@+id/horizontal_dividing_line"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_
0_5
"
android:layout_height=
"@dimen/dp_
1
"
android:background=
"@color/color_ccc"
/>
android:background=
"@color/color_ccc"
/>
library-database/src/main/java/com/gingersoft/gsa/cloud/database/DaoManager.java
View file @
69e9e173
package
com
.
gingersoft
.
gsa
.
cloud
.
database
;
package
com
.
gingersoft
.
gsa
.
cloud
.
database
;
import
android.content.Context
;
import
android.content.Context
;
import
com.gingersoft.gsa.cloud.database.greendao.DaoMaster
;
import
com.gingersoft.gsa.cloud.database.greendao.DaoMaster
;
import
com.gingersoft.gsa.cloud.database.greendao.DaoSession
;
import
com.gingersoft.gsa.cloud.database.greendao.DaoSession
;
import
org.greenrobot.greendao.query.QueryBuilder
;
import
org.greenrobot.greendao.query.QueryBuilder
;
/**
/**
...
@@ -31,7 +33,7 @@ public class DaoManager {
...
@@ -31,7 +33,7 @@ public class DaoManager {
* @return
* @return
*/
*/
public
static
DaoManager
getInstance
()
{
public
static
DaoManager
getInstance
()
{
synchronized
(
manager
){
synchronized
(
manager
)
{
return
manager
;
return
manager
;
}
}
}
}
...
@@ -41,7 +43,8 @@ public class DaoManager {
...
@@ -41,7 +43,8 @@ public class DaoManager {
}
}
public
void
init
(
Context
context
)
{
public
void
init
(
Context
context
)
{
this
.
context
=
context
;
// this.context = context;//內存洩漏
this
.
context
=
context
.
getApplicationContext
();
}
}
/**
/**
...
...
library-ui/src/main/java/com/gingersoft/gsa/cloud/ui/animator/CustomAnimation3.java
View file @
69e9e173
...
@@ -17,11 +17,11 @@ public class CustomAnimation3 implements BaseAnimation {
...
@@ -17,11 +17,11 @@ public class CustomAnimation3 implements BaseAnimation {
Animator
alpha
=
ObjectAnimator
.
ofFloat
(
view
,
"alpha"
,
0
,
1
f
);
Animator
alpha
=
ObjectAnimator
.
ofFloat
(
view
,
"alpha"
,
0
,
1
f
);
alpha
.
setDuration
(
450
);
alpha
.
setDuration
(
450
);
Animator
translationY
=
//
Animator translationY =
ObjectAnimator
.
ofFloat
(
view
,
"translationY"
,
view
.
getRootView
().
getHeight
(),
0.5
f
);
// ObjectAnimator.ofFloat(view, "translationY", view.getRootView().getHeight(), 1
f);
translationY
.
setDuration
(
450
);
//
translationY.setDuration(450);
translationY
.
setInterpolator
(
new
DecelerateInterpolator
(
1.2f
));
//
translationY.setInterpolator(new DecelerateInterpolator(1.2f));
return
new
Animator
[]{
alpha
,
translationY
};
return
new
Animator
[]{
alpha
};
}
}
}
}
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