Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
raid-app
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴春元
raid-app
Commits
7815d8c6
Commit
7815d8c6
authored
Jan 20, 2026
by
吴春元
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加结束盘点
parent
f310fae4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
132 additions
and
65 deletions
+132
-65
WmsInventory.java
.../main/java/com/sxyz/rfid/greendao/model/WmsInventory.java
+1
-1
WmsInventoryTask.java
...n/java/com/sxyz/rfid/greendao/model/WmsInventoryTask.java
+52
-6
ReviewOfflineActivity.java
...om/sxyz/rfid/ui/review/offline/ReviewOfflineActivity.java
+44
-4
ReviewOfflineTaskActivity.java
...xyz/rfid/ui/review/offline/ReviewOfflineTaskActivity.java
+34
-52
ReviewOfflineDetailAdapter.java
...ui/review/offline/adapter/ReviewOfflineDetailAdapter.java
+1
-2
No files found.
app/src/main/java/com/sxyz/rfid/greendao/model/WmsInventory.java
View file @
7815d8c6
...
@@ -288,5 +288,5 @@ public class WmsInventory implements Serializable {
...
@@ -288,5 +288,5 @@ public class WmsInventory implements Serializable {
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
}
}
app/src/main/java/com/sxyz/rfid/greendao/model/WmsInventoryTask.java
View file @
7815d8c6
...
@@ -67,14 +67,15 @@ public class WmsInventoryTask implements Serializable {
...
@@ -67,14 +67,15 @@ public class WmsInventoryTask implements Serializable {
private
String
updateTime
;
private
String
updateTime
;
@Property
(
nameInDb
=
"remark"
)
@Property
(
nameInDb
=
"remark"
)
private
String
remark
;
private
String
remark
;
@Generated
(
hash
=
1984916082
)
@Generated
(
hash
=
1984916082
)
public
WmsInventoryTask
(
Long
taskId
,
Integer
planId
,
String
taskNo
,
public
WmsInventoryTask
(
Long
taskId
,
Integer
planId
,
String
taskNo
,
String
taskName
,
Integer
warehouseId
,
String
warehouseName
,
String
taskName
,
Integer
warehouseId
,
String
warehouseName
,
String
areaIds
,
String
areaName
,
String
materialIds
,
String
areaIds
,
String
areaName
,
String
materialIds
,
String
locationRange
,
Integer
assigneeId
,
String
assistantIds
,
String
locationRange
,
Integer
assigneeId
,
String
assistantIds
,
String
taskStatus
,
String
startTime
,
String
endTime
,
Integer
totalItems
,
String
taskStatus
,
String
startTime
,
String
endTime
,
Integer
totalItems
,
Integer
countedItems
,
String
inventoryDevice
,
String
delFlag
,
Integer
countedItems
,
String
inventoryDevice
,
String
delFlag
,
String
createTime
,
String
updateTime
,
String
remark
)
{
String
createTime
,
String
updateTime
,
String
remark
)
{
this
.
taskId
=
taskId
;
this
.
taskId
=
taskId
;
this
.
planId
=
planId
;
this
.
planId
=
planId
;
this
.
taskNo
=
taskNo
;
this
.
taskNo
=
taskNo
;
...
@@ -98,138 +99,183 @@ public class WmsInventoryTask implements Serializable {
...
@@ -98,138 +99,183 @@ public class WmsInventoryTask implements Serializable {
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
@Generated
(
hash
=
950900997
)
@Generated
(
hash
=
950900997
)
public
WmsInventoryTask
()
{
public
WmsInventoryTask
()
{
}
}
public
Long
getTaskId
()
{
public
Long
getTaskId
()
{
return
this
.
taskId
;
return
this
.
taskId
;
}
}
public
void
setTaskId
(
Long
taskId
)
{
public
void
setTaskId
(
Long
taskId
)
{
this
.
taskId
=
taskId
;
this
.
taskId
=
taskId
;
}
}
public
Integer
getPlanId
()
{
public
Integer
getPlanId
()
{
return
this
.
planId
;
return
this
.
planId
;
}
}
public
void
setPlanId
(
Integer
planId
)
{
public
void
setPlanId
(
Integer
planId
)
{
this
.
planId
=
planId
;
this
.
planId
=
planId
;
}
}
public
String
getTaskNo
()
{
public
String
getTaskNo
()
{
return
this
.
taskNo
;
return
this
.
taskNo
;
}
}
public
void
setTaskNo
(
String
taskNo
)
{
public
void
setTaskNo
(
String
taskNo
)
{
this
.
taskNo
=
taskNo
;
this
.
taskNo
=
taskNo
;
}
}
public
String
getTaskName
()
{
public
String
getTaskName
()
{
return
this
.
taskName
;
return
this
.
taskName
;
}
}
public
void
setTaskName
(
String
taskName
)
{
public
void
setTaskName
(
String
taskName
)
{
this
.
taskName
=
taskName
;
this
.
taskName
=
taskName
;
}
}
public
Integer
getWarehouseId
()
{
public
Integer
getWarehouseId
()
{
return
this
.
warehouseId
;
return
this
.
warehouseId
;
}
}
public
void
setWarehouseId
(
Integer
warehouseId
)
{
public
void
setWarehouseId
(
Integer
warehouseId
)
{
this
.
warehouseId
=
warehouseId
;
this
.
warehouseId
=
warehouseId
;
}
}
public
String
getWarehouseName
()
{
public
String
getWarehouseName
()
{
return
this
.
warehouseName
;
return
this
.
warehouseName
;
}
}
public
void
setWarehouseName
(
String
warehouseName
)
{
public
void
setWarehouseName
(
String
warehouseName
)
{
this
.
warehouseName
=
warehouseName
;
this
.
warehouseName
=
warehouseName
;
}
}
public
String
getAreaIds
()
{
public
String
getAreaIds
()
{
return
this
.
areaIds
;
return
this
.
areaIds
;
}
}
public
void
setAreaIds
(
String
areaIds
)
{
public
void
setAreaIds
(
String
areaIds
)
{
this
.
areaIds
=
areaIds
;
this
.
areaIds
=
areaIds
;
}
}
public
String
getAreaName
()
{
public
String
getAreaName
()
{
return
this
.
areaName
;
return
this
.
areaName
;
}
}
public
void
setAreaName
(
String
areaName
)
{
public
void
setAreaName
(
String
areaName
)
{
this
.
areaName
=
areaName
;
this
.
areaName
=
areaName
;
}
}
public
String
getMaterialIds
()
{
public
String
getMaterialIds
()
{
return
this
.
materialIds
;
return
this
.
materialIds
;
}
}
public
void
setMaterialIds
(
String
materialIds
)
{
public
void
setMaterialIds
(
String
materialIds
)
{
this
.
materialIds
=
materialIds
;
this
.
materialIds
=
materialIds
;
}
}
public
String
getLocationRange
()
{
public
String
getLocationRange
()
{
return
this
.
locationRange
;
return
this
.
locationRange
;
}
}
public
void
setLocationRange
(
String
locationRange
)
{
public
void
setLocationRange
(
String
locationRange
)
{
this
.
locationRange
=
locationRange
;
this
.
locationRange
=
locationRange
;
}
}
public
Integer
getAssigneeId
()
{
public
Integer
getAssigneeId
()
{
return
this
.
assigneeId
;
return
this
.
assigneeId
;
}
}
public
void
setAssigneeId
(
Integer
assigneeId
)
{
public
void
setAssigneeId
(
Integer
assigneeId
)
{
this
.
assigneeId
=
assigneeId
;
this
.
assigneeId
=
assigneeId
;
}
}
public
String
getAssistantIds
()
{
public
String
getAssistantIds
()
{
return
this
.
assistantIds
;
return
this
.
assistantIds
;
}
}
public
void
setAssistantIds
(
String
assistantIds
)
{
public
void
setAssistantIds
(
String
assistantIds
)
{
this
.
assistantIds
=
assistantIds
;
this
.
assistantIds
=
assistantIds
;
}
}
public
String
getTaskStatus
()
{
public
String
getTaskStatus
()
{
return
this
.
taskStatus
;
return
this
.
taskStatus
;
}
}
public
void
setTaskStatus
(
String
taskStatus
)
{
public
void
setTaskStatus
(
String
taskStatus
)
{
this
.
taskStatus
=
taskStatus
;
this
.
taskStatus
=
taskStatus
;
}
}
public
String
getStartTime
()
{
public
String
getStartTime
()
{
return
this
.
startTime
;
return
this
.
startTime
;
}
}
public
void
setStartTime
(
String
startTime
)
{
public
void
setStartTime
(
String
startTime
)
{
this
.
startTime
=
startTime
;
this
.
startTime
=
startTime
;
}
}
public
String
getEndTime
()
{
public
String
getEndTime
()
{
return
this
.
endTime
;
return
this
.
endTime
;
}
}
public
void
setEndTime
(
String
endTime
)
{
public
void
setEndTime
(
String
endTime
)
{
this
.
endTime
=
endTime
;
this
.
endTime
=
endTime
;
}
}
public
Integer
getTotalItems
()
{
public
Integer
getTotalItems
()
{
return
this
.
totalItems
;
return
this
.
totalItems
;
}
}
public
void
setTotalItems
(
Integer
totalItems
)
{
public
void
setTotalItems
(
Integer
totalItems
)
{
this
.
totalItems
=
totalItems
;
this
.
totalItems
=
totalItems
;
}
}
public
Integer
getCountedItems
()
{
public
Integer
getCountedItems
()
{
return
this
.
countedItems
;
return
this
.
countedItems
;
}
}
public
void
setCountedItems
(
Integer
countedItems
)
{
public
void
setCountedItems
(
Integer
countedItems
)
{
this
.
countedItems
=
countedItems
;
this
.
countedItems
=
countedItems
;
}
}
public
String
getInventoryDevice
()
{
public
String
getInventoryDevice
()
{
return
this
.
inventoryDevice
;
return
this
.
inventoryDevice
;
}
}
public
void
setInventoryDevice
(
String
inventoryDevice
)
{
public
void
setInventoryDevice
(
String
inventoryDevice
)
{
this
.
inventoryDevice
=
inventoryDevice
;
this
.
inventoryDevice
=
inventoryDevice
;
}
}
public
String
getDelFlag
()
{
public
String
getDelFlag
()
{
return
this
.
delFlag
;
return
this
.
delFlag
;
}
}
public
void
setDelFlag
(
String
delFlag
)
{
public
void
setDelFlag
(
String
delFlag
)
{
this
.
delFlag
=
delFlag
;
this
.
delFlag
=
delFlag
;
}
}
public
String
getCreateTime
()
{
public
String
getCreateTime
()
{
return
this
.
createTime
;
return
this
.
createTime
;
}
}
public
void
setCreateTime
(
String
createTime
)
{
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
}
}
public
String
getUpdateTime
()
{
public
String
getUpdateTime
()
{
return
this
.
updateTime
;
return
this
.
updateTime
;
}
}
public
void
setUpdateTime
(
String
updateTime
)
{
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
}
}
public
String
getRemark
()
{
public
String
getRemark
()
{
return
this
.
remark
;
return
this
.
remark
;
}
}
public
void
setRemark
(
String
remark
)
{
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
this
.
remark
=
remark
;
}
}
...
...
app/src/main/java/com/sxyz/rfid/ui/review/offline/ReviewOfflineActivity.java
View file @
7815d8c6
...
@@ -9,6 +9,7 @@ import android.text.TextWatcher;
...
@@ -9,6 +9,7 @@ import android.text.TextWatcher;
import
android.view.View
;
import
android.view.View
;
import
android.view.inputmethod.EditorInfo
;
import
android.view.inputmethod.EditorInfo
;
import
androidx.appcompat.app.AlertDialog
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
androidx.recyclerview.widget.LinearLayoutManager
;
import
com.sxyz.rfid.R
;
import
com.sxyz.rfid.R
;
...
@@ -16,14 +17,17 @@ import com.sxyz.rfid.base.BaseActivity;
...
@@ -16,14 +17,17 @@ import com.sxyz.rfid.base.BaseActivity;
import
com.sxyz.rfid.databinding.ActivityReviewOfflineBinding
;
import
com.sxyz.rfid.databinding.ActivityReviewOfflineBinding
;
import
com.sxyz.rfid.greendao.GreenDaoManager
;
import
com.sxyz.rfid.greendao.GreenDaoManager
;
import
com.sxyz.rfid.greendao.model.WmsInventoryTask
;
import
com.sxyz.rfid.greendao.model.WmsInventoryTask
;
import
com.sxyz.rfid.greendao.model.WmsInventoryTaskDetail
;
import
com.sxyz.rfid.ui.review.offline.adapter.ReviewOfflineAdapter
;
import
com.sxyz.rfid.ui.review.offline.adapter.ReviewOfflineAdapter
;
import
com.sxyz.rfid.utils.StringUtil
;
import
com.sxyz.rfid.utils.StringUtil
;
import
com.sxyz.rfid.utils.ToastUtil
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
sql.com.yz.db.DaoSession
;
import
sql.com.yz.db.DaoSession
;
import
sql.com.yz.db.WmsInventoryTaskDao
;
import
sql.com.yz.db.WmsInventoryTaskDao
;
import
sql.com.yz.db.WmsInventoryTaskDetailDao
;
/**
/**
* 主要功能: 离线执行盘点列表
* 主要功能: 离线执行盘点列表
...
@@ -120,12 +124,48 @@ public class ReviewOfflineActivity extends BaseActivity<ActivityReviewOfflineBin
...
@@ -120,12 +124,48 @@ public class ReviewOfflineActivity extends BaseActivity<ActivityReviewOfflineBin
startActivity
(
ReviewOfflineTaskActivity
.
class
,
bundle
);
startActivity
(
ReviewOfflineTaskActivity
.
class
,
bundle
);
}
}
// 处理结束盘点点击事件
// 处理结束盘点点击事件
TODO
@Override
@Override
public
void
onStopTaskClick
(
int
position
,
WmsInventoryTask
item
)
{
public
void
onStopTaskClick
(
int
position
,
WmsInventoryTask
item
)
{
// new AlertDialog.Builder(mActivity).setTitle("提示").setMessage("确定结束该盘点任务吗?").setPositiveButton("确定", (dialog, which) -> {
if
(
daoSession
!=
null
)
{
// mPresenter.doStopReviewTask(ReviewFragment.this, item.getTaskId());
//根据item.getTaskId()查询任务明细信息列表===========================================================================
// }).setNegativeButton("取消", null).show();
List
<
WmsInventoryTaskDetail
>
mList
=
daoSession
.
getWmsInventoryTaskDetailDao
().
queryBuilder
().
where
(
WmsInventoryTaskDetailDao
.
Properties
.
TaskId
.
eq
(
item
.
getTaskId
())).
list
();
if
(
mList
!=
null
&&
mList
.
size
()
>
0
)
{
int
count
=
0
;
for
(
int
i
=
0
;
i
<
mList
.
size
();
i
++)
{
//结束盘点:如果明细内有 待盘点0 的出库单,属于盘亏
if
(
mList
.
get
(
i
).
getCheckStatus
().
equals
(
"0"
))
{
//计算有几个待盘点,就是盘亏数量
count
++;
//盘亏数量+1
}
}
if
(
count
>
0
)
{
//盘亏数量大于0,提示盘亏数量
new
AlertDialog
.
Builder
(
mActivity
).
setTitle
(
"提示"
).
setMessage
(
"该盘点任务存在"
+
count
+
"个盘亏,是否继续结束?"
).
setPositiveButton
(
"确定"
,
(
dialog
,
which
)
->
{
int
count1
=
0
;
for
(
int
i
=
0
;
i
<
mList
.
size
();
i
++)
{
//结束盘点:如果明细内有 待盘点0 的出库单,属于盘亏
if
(
mList
.
get
(
i
).
getCheckStatus
().
equals
(
"0"
))
{
//计算有几个待盘点,就是盘亏数量
count1
++;
//盘亏数量+1
mList
.
get
(
i
).
setDiffReason
(
"pk"
);
//盘亏
}
//更新数据库
daoSession
.
getWmsInventoryTaskDetailDao
().
update
(
mList
.
get
(
i
));
}
}).
setNegativeButton
(
"取消"
,
null
).
show
();
}
else
{
new
AlertDialog
.
Builder
(
mActivity
).
setTitle
(
"提示"
).
setMessage
(
"确定结束该盘点任务吗?"
).
setPositiveButton
(
"确定"
,
(
dialog
,
which
)
->
{
//盘亏数量等于0,直接结束,正常结束
WmsInventoryTask
wmsInventoryTask
=
daoSession
.
getWmsInventoryTaskDao
().
load
(
item
.
getTaskId
());
wmsInventoryTask
.
setTaskStatus
(
"2"
);
//设置为已结束
daoSession
.
getWmsInventoryTaskDao
().
update
(
wmsInventoryTask
);
}).
setNegativeButton
(
"取消"
,
null
).
show
();
}
}
else
{
ToastUtil
.
showShort
(
"暂无盘点明细数据,请先添加盘点明细数据"
);
}
}
}
}
});
});
}
}
...
...
app/src/main/java/com/sxyz/rfid/ui/review/offline/ReviewOfflineTaskActivity.java
View file @
7815d8c6
This diff is collapsed.
Click to expand it.
app/src/main/java/com/sxyz/rfid/ui/review/offline/adapter/ReviewOfflineDetailAdapter.java
View file @
7815d8c6
...
@@ -55,7 +55,7 @@ public class ReviewOfflineDetailAdapter extends BaseQuickAdapter<WmsInventoryTas
...
@@ -55,7 +55,7 @@ public class ReviewOfflineDetailAdapter extends BaseQuickAdapter<WmsInventoryTas
//差异率
//差异率
baseViewHolder
.
setText
(
R
.
id
.
tv_difference_rate
,
!
StringUtils
.
isEmpty
(
dataBean
.
getDiffQty
()
+
""
)
?
dataBean
.
getDiffQty
()
+
""
:
"-"
);
baseViewHolder
.
setText
(
R
.
id
.
tv_difference_rate
,
!
StringUtils
.
isEmpty
(
dataBean
.
getDiffQty
()
+
""
)
?
dataBean
.
getDiffQty
()
+
""
:
"-"
);
//备注
//备注
//
baseViewHolder.setText(R.id.tv_remark, !StringUtils.isEmpty(dataBean.getRemark()) ? dataBean.getRemark() : "-");
baseViewHolder
.
setText
(
R
.
id
.
tv_remark
,
!
StringUtils
.
isEmpty
(
dataBean
.
getRemark
())
?
dataBean
.
getRemark
()
:
"-"
);
//拣货状态
//拣货状态
TextView
checkStatus
=
baseViewHolder
.
getView
(
R
.
id
.
tv_check_status
);
TextView
checkStatus
=
baseViewHolder
.
getView
(
R
.
id
.
tv_check_status
);
switch
(
dataBean
.
getCheckStatus
())
{
switch
(
dataBean
.
getCheckStatus
())
{
...
@@ -68,7 +68,6 @@ public class ReviewOfflineDetailAdapter extends BaseQuickAdapter<WmsInventoryTas
...
@@ -68,7 +68,6 @@ public class ReviewOfflineDetailAdapter extends BaseQuickAdapter<WmsInventoryTas
checkStatus
.
setText
(
"已盘点"
);
checkStatus
.
setText
(
"已盘点"
);
checkStatus
.
setBackground
(
ContextCompat
.
getDrawable
(
getContext
(),
R
.
drawable
.
status_green_bg
));
checkStatus
.
setBackground
(
ContextCompat
.
getDrawable
(
getContext
(),
R
.
drawable
.
status_green_bg
));
checkStatus
.
setTextColor
(
ContextCompat
.
getColor
(
getContext
(),
R
.
color
.
green
));
checkStatus
.
setTextColor
(
ContextCompat
.
getColor
(
getContext
(),
R
.
color
.
green
));
break
;
break
;
case
"2"
:
case
"2"
:
checkStatus
.
setText
(
"差异待确认"
);
checkStatus
.
setText
(
"差异待确认"
);
...
...
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