Merge branch '0.8.X' of http://49.232.154.205:10100/DeXun/klp-oa into 0.8.X
This commit is contained in:
@@ -149,6 +149,15 @@ export function exportPendingAction(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询历史钢卷待完成操作列表(dataType=0 & actionStatus != 2)
|
||||
export function listStalePendingAction(query) {
|
||||
return request({
|
||||
url: '/wms/coilPendingAction/staleList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 还原被删除的钢卷
|
||||
*/
|
||||
|
||||
85
klp-ui/src/views/wms/todo/stale.vue
Normal file
85
klp-ui/src/views/wms/todo/stale.vue
Normal file
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-alert title="以下操作关联的钢卷已是历史钢卷,可手动标记完成" type="warning" show-icon :closable="false" class="mb8" />
|
||||
<KLPTable v-loading="loading" :data="list">
|
||||
<el-table-column label="当前钢卷号" align="center" prop="currentCoilNo"/>
|
||||
<el-table-column label="入场钢卷号" align="center" prop="enterCoilNo" width="180" />
|
||||
<el-table-column label="操作类型" align="center" prop="actionType" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_coil_action_type" :value="scope.row.actionType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作状态" align="center" prop="actionStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wms_action_status" :value="scope.row.actionStatus" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="逻辑库区" align="center" prop="warehouseName" width="150" />
|
||||
<el-table-column label="实际库区" align="center" prop="actualWarehouseName" width="150" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="160">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="160" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="primary" icon="el-icon-check"
|
||||
@click="handleComplete(scope.row)">完成</el-button>
|
||||
<el-button size="mini" type="danger" icon="el-icon-close"
|
||||
@click="handleCancel(scope.row)">取消</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</KLPTable>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listStalePendingAction, completeAction, cancelAction } from "@/api/wms/pendingAction";
|
||||
|
||||
export default {
|
||||
name: "StaleAction",
|
||||
dicts: ['wms_coil_action_type', 'wms_action_status'],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
total: 0,
|
||||
list: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listStalePendingAction(this.queryParams).then(response => {
|
||||
this.list = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
handleComplete(row) {
|
||||
this.$modal.confirm('确认完成操作ID为"' + row.actionId + '"的记录?').then(() => {
|
||||
return completeAction(row.actionId, '-');
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("操作已完成");
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
handleCancel(row) {
|
||||
this.$modal.confirm('确认取消操作ID为"' + row.actionId + '"的记录?').then(() => {
|
||||
return cancelAction(row.actionId);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("操作已取消");
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -177,7 +177,31 @@ public class WmsCoilPendingActionServiceImpl implements IWmsCoilPendingActionSer
|
||||
QueryWrapper<WmsCoilPendingAction> lqw = Wrappers.query();
|
||||
lqw.ne("wcpa.action_status", 2);
|
||||
lqw.eq("wcpa.del_flag", 0);
|
||||
lqw.orderByDesc("wcpa.create_time");
|
||||
lqw.orderByDesc("wcpa.scan_time");
|
||||
Page<WmsCoilPendingActionVo> result = baseMapper.selectStaleActionVoPagePlus(pageQuery.build(), lqw);
|
||||
List<WmsCoilPendingActionVo> records = result.getRecords();
|
||||
if (records != null && !records.isEmpty()) {
|
||||
Set<String> userNames = records.stream()
|
||||
.flatMap(v -> java.util.stream.Stream.of(v.getCreateBy(), v.getOperatorName()))
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.collect(Collectors.toSet());
|
||||
if (!userNames.isEmpty()) {
|
||||
Map<String, String> nickMap = userService.selectNickNameMapByUserNames(records.stream()
|
||||
.flatMap(v -> java.util.stream.Stream.of(v.getCreateBy(), v.getOperatorName()))
|
||||
.filter(StringUtils::isNotBlank)
|
||||
.distinct()
|
||||
.collect(Collectors.toList()));
|
||||
records.forEach(item -> {
|
||||
if (StringUtils.isNotBlank(item.getCreateBy())) {
|
||||
item.setCreateByName(nickMap.getOrDefault(item.getCreateBy(), item.getCreateBy()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(item.getOperatorName())) {
|
||||
item.setOperatorByName(nickMap.getOrDefault(item.getOperatorName(), item.getOperatorName()));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -1344,17 +1344,25 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String updateByBo(WmsMaterialCoilBo bo, String qrcodeStepType) {
|
||||
String result;
|
||||
// 判断是否批量更新
|
||||
if (bo.getNewCoils() != null && !bo.getNewCoils().isEmpty()) {
|
||||
// 批量更新逻辑(分卷/合卷)
|
||||
return updateByBatch(bo); // 分卷返回逗号分隔的ID,合卷返回单个ID
|
||||
result = updateByBatch(bo); // 分卷返回逗号分隔的ID,合卷返回单个ID
|
||||
} else {
|
||||
// 单个更新逻辑,需要coilId
|
||||
if (bo.getCoilId() == null) {
|
||||
throw new RuntimeException("钢卷ID不能为空");
|
||||
}
|
||||
return updateBySingle(bo, qrcodeStepType); // 返回新钢卷ID字符串
|
||||
result = updateBySingle(bo, qrcodeStepType); // 返回新钢卷ID字符串
|
||||
}
|
||||
|
||||
// 如果有关联的操作记录ID,调用完成接口
|
||||
if (bo.getActionId() != null && bo.getActionId() > 0) {
|
||||
coilPendingActionService.completeAction(bo.getActionId(), result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user