feat(wms): 添加钢卷待操作列表查询功能支持已删除记录
- 新增listPendingActionWithDeleted方法用于查询包含已删除记录的钢卷待操作列表 - 新增listDeletedPendingAction方法用于仅查询已删除的钢卷待操作列表 - 在WmsCoilPendingActionBo中添加includeDeleted字段支持三种查询模式 - 修改WmsCoilPendingActionServiceImpl实现支持includeDeleted参数的逻辑删除过滤 - 支持includeDeleted参数值为0(不包含已删除)、1(包含已删除)、2(仅查询已删除)三种模式
This commit is contained in:
@@ -9,6 +9,31 @@ export function listPendingAction(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询钢卷待操作列表(包含已删除记录)
|
||||||
|
// includeDeleted: 0=不包含已删除(默认), 1=包含已删除记录, 2=仅查询已删除记录
|
||||||
|
export function listPendingActionWithDeleted(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/coilPendingAction/list',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
...query,
|
||||||
|
includeDeleted: 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 仅查询已删除的钢卷待操作列表
|
||||||
|
export function listDeletedPendingAction(query) {
|
||||||
|
return request({
|
||||||
|
url: '/wms/coilPendingAction/list',
|
||||||
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
...query,
|
||||||
|
includeDeleted: 2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询钢卷待操作详细
|
// 查询钢卷待操作详细
|
||||||
export function getPendingAction(actionId) {
|
export function getPendingAction(actionId) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -109,5 +109,10 @@ public class WmsCoilPendingActionBo extends BaseEntity {
|
|||||||
|
|
||||||
//备注
|
//备注
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否包含已删除记录(0=不包含,1=包含已删除,2=仅查询已删除)
|
||||||
|
*/
|
||||||
|
private Integer includeDeleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,8 +112,21 @@ public class WmsCoilPendingActionServiceImpl implements IWmsCoilPendingActionSer
|
|||||||
qw.le(bo.getEndTime() != null, "wcpa.complete_time", bo.getEndTime());
|
qw.le(bo.getEndTime() != null, "wcpa.complete_time", bo.getEndTime());
|
||||||
// 根据更新人查询
|
// 根据更新人查询
|
||||||
qw.eq(StringUtils.isNotBlank(bo.getUpdateBy()), "wcpa.update_by", bo.getUpdateBy());
|
qw.eq(StringUtils.isNotBlank(bo.getUpdateBy()), "wcpa.update_by", bo.getUpdateBy());
|
||||||
//逻辑删除
|
//逻辑删除 - 支持查询已删除记录
|
||||||
qw.eq("wcpa.del_flag", 0);
|
if (bo.getIncludeDeleted() != null) {
|
||||||
|
if (bo.getIncludeDeleted() == 1) {
|
||||||
|
// 包含已删除记录:不添加del_flag过滤,查询所有记录
|
||||||
|
} else if (bo.getIncludeDeleted() == 2) {
|
||||||
|
// 仅查询已删除记录
|
||||||
|
qw.eq("wcpa.del_flag", 1);
|
||||||
|
} else {
|
||||||
|
// 默认:仅查询正常记录
|
||||||
|
qw.eq("wcpa.del_flag", 0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 未传参数时默认仅查询正常记录
|
||||||
|
qw.eq("wcpa.del_flag", 0);
|
||||||
|
}
|
||||||
return qw;
|
return qw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user