任务完成处理和pda盘点界面优化
This commit is contained in:
@@ -37,11 +37,11 @@ export function confirmExcetion(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 确认托盘盘点出库完成 - 盘点出库
|
// 确认托盘盘点出库完成 - 盘点出库
|
||||||
export function inventoryTrayCodeComplete(trayCode) {
|
export function inventoryTrayCodeComplete(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pda/inventoryTrayCodeComplete',
|
url: '/pda/inventoryTrayCodeComplete',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
// data: { trayCode: trayCode }
|
// data: { trayCode: trayCode }
|
||||||
params: { trayCode }
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
"navigationBarTitleText": "盘点管理"
|
"navigationBarTitleText": "盘点管理"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/warehouse/inventory/inventoryConfirm",
|
"path": "pages/warehouse/inventory/jobList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "盘点任务列表"
|
"navigationBarTitleText": "盘点任务列表"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="feature-list">
|
<view class="feature-list">
|
||||||
<view class="feature-card" @click="$modal.showToast('功能开发中')">
|
<view class="feature-card" @click="navigateTo('/pages/warehouse/inventory/jobList')">
|
||||||
<view class="feature-left">
|
<view class="feature-left">
|
||||||
<uni-icons type="list" size="20" color="#1890ff"></uni-icons>
|
<uni-icons type="list" size="20" color="#1890ff"></uni-icons>
|
||||||
<text class="feature-name">盘点任务列表</text>
|
<text class="feature-name">盘点任务列表</text>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<uni-icons type="right" size="16" color="#ccc"></uni-icons>
|
<uni-icons type="right" size="16" color="#ccc"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="feature-card" @click="$modal.showToast('功能开发中')">
|
<!-- <view class="feature-card" @click="$modal.showToast('功能开发中')">
|
||||||
<view class="feature-left">
|
<view class="feature-left">
|
||||||
<uni-icons type="compose" size="20" color="#52c41a"></uni-icons>
|
<uni-icons type="compose" size="20" color="#52c41a"></uni-icons>
|
||||||
<text class="feature-name">盘点差异记录</text>
|
<text class="feature-name">盘点差异记录</text>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<text class="feature-name">盘点报告</text>
|
<text class="feature-name">盘点报告</text>
|
||||||
</view>
|
</view>
|
||||||
<uni-icons type="right" size="16" color="#ccc"></uni-icons>
|
<uni-icons type="right" size="16" color="#ccc"></uni-icons>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="empty-tip">
|
<!-- <view class="empty-tip">
|
||||||
|
|||||||
@@ -153,16 +153,16 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// var data = {
|
var data = {
|
||||||
// // taskNo: this.taskNo,
|
// taskNo: this.taskNo,
|
||||||
// barcode: this.barcode,
|
barcode: this.barcode,
|
||||||
// }
|
}
|
||||||
|
|
||||||
// console.log(this.barcode)
|
// console.log(this.barcode)
|
||||||
var that = this
|
|
||||||
inventoryTrayCodeComplete(this.barcode).then(() => {
|
inventoryTrayCodeComplete(data).then(() => {
|
||||||
that.$modal.msgSuccess(this.barcode + '盘点出库确认成功')
|
this.$modal.msgSuccess(this.barcode + '盘点出库确认成功')
|
||||||
that.resetForm()
|
this.resetForm()
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
|
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
|
||||||
// console.log('出库确认失败')
|
// console.log('出库确认失败')
|
||||||
|
|||||||
373
pda/pages/warehouse/inventory/jobList.vue
Normal file
373
pda/pages/warehouse/inventory/jobList.vue
Normal file
@@ -0,0 +1,373 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page-container">
|
||||||
|
|
||||||
|
<!-- 待处理任务 -->
|
||||||
|
<view class="task-section">
|
||||||
|
<view class="section-header">
|
||||||
|
<text class="section-title">盘点待处理任务</text>
|
||||||
|
<text class="section-more" @click="refreshTasks">刷新</text>
|
||||||
|
</view>
|
||||||
|
<view v-if="taskList.length === 0" class="empty-state">
|
||||||
|
<text class="empty-text">暂无待处理任务</text>
|
||||||
|
</view>
|
||||||
|
<view v-else>
|
||||||
|
<view class="task-card" v-for="(item, index) in taskList" :key="index"
|
||||||
|
@click="handleTask(item)">
|
||||||
|
<view class="task-header">
|
||||||
|
<!-- <text class="task-type" :class="item.typeClass">{{ item.typeName }}</text> -->
|
||||||
|
<!-- <text class="task-no">{{ item.taskNo }}</text> -->
|
||||||
|
<text class="task-no">{{ item.jobId }}</text>
|
||||||
|
<view class="info-btn">
|
||||||
|
<button class="scan-btn-text orange" @click="inventoryComplete(item)">出库确认</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="task-body">
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">托盘条码</text>
|
||||||
|
<text class="info-value">{{ item.trayCode }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">盘点出库货位</text>
|
||||||
|
<text class="info-value">{{ item.cargoSpaceId }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">状态</text>
|
||||||
|
<text class="info-value">{{ inventoryStatusMap[item.status] || '未知状态' }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <view class="task-info-item">
|
||||||
|
<text class="info-label">物料编码</text>
|
||||||
|
<text class="info-value">{{ item.materialCode }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">物料名称</text>
|
||||||
|
<text class="info-value">{{ item.materialName }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">出库数量</text>
|
||||||
|
<text class="info-value">{{ item.quantity }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">出库口</text>
|
||||||
|
<text class="info-value">{{ item.portName }}</text>
|
||||||
|
</view> -->
|
||||||
|
<!-- <view class="task-info-item">
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">版辊编号</text>
|
||||||
|
<text class="info-value">{{ item.rollerNumber }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">颜色</text>
|
||||||
|
<text class="info-value">{{ item.color }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">色序</text>
|
||||||
|
<text class="info-value">{{ item.colorSequence }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="task-info-item">
|
||||||
|
<text class="info-label">规格</text>
|
||||||
|
<text class="info-value">{{ item.spec }}</text>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
<view class="task-footer">
|
||||||
|
<text class="task-time">{{ item.createTime }}</text>
|
||||||
|
<view class="task-status" :class="item.statusClass">{{ item.statusName }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getInventoryOutTaskList } from '@/api/warehouse/inventory'
|
||||||
|
import { inventoryTrayCodeComplete } from '@/api/warehouse/inventory'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
taskList: [],
|
||||||
|
|
||||||
|
inventoryStatusMap: {
|
||||||
|
1: '待执行',
|
||||||
|
2: '执行中',
|
||||||
|
3: '出库完成待确认',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.loadTasks()
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.loadTasks()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navigateTo(url) {
|
||||||
|
this.$tab.navigateTo(url)
|
||||||
|
},
|
||||||
|
loadTasks() {
|
||||||
|
getInventoryOutTaskList().then(res => {
|
||||||
|
console.log('接口返回的完整数据:', res)
|
||||||
|
// this.taskList = res.data || []
|
||||||
|
this.taskList = res.rows || []
|
||||||
|
}).catch(() => {
|
||||||
|
this.taskList = []
|
||||||
|
})
|
||||||
|
},
|
||||||
|
refreshTasks() {
|
||||||
|
this.loadTasks()
|
||||||
|
this.$modal.showToast('刷新成功')
|
||||||
|
},
|
||||||
|
handleTask(item) {
|
||||||
|
if (item.type === 'confirm') {
|
||||||
|
this.$tab.navigateTo('/pages/warehouse/inventory/confirm?taskNo=' + item.taskNo)
|
||||||
|
} else if (item.type === 'exception') {
|
||||||
|
this.$tab.navigateTo('/pages/warehouse/inventory/exception?taskNo=' + item.taskNo)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//托盘物料盘点完成确认回流
|
||||||
|
inventoryComplete(item) {
|
||||||
|
|
||||||
|
var data = {
|
||||||
|
// taskNo: this.taskNo,
|
||||||
|
barcode: item.trayCode,
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(item.trayCode)
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
|
inventoryTrayCodeComplete(data).then(res => {
|
||||||
|
this.$modal.msgSuccess(data.barcode + '盘点出库确认成功')
|
||||||
|
this.refreshTasks()
|
||||||
|
}).catch(() => {
|
||||||
|
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
|
||||||
|
// console.log('出库确认失败')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
min-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-container {
|
||||||
|
padding: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-section {
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-card {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 32rpx 28rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-icon {
|
||||||
|
width: 72rpx;
|
||||||
|
height: 72rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-right: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-icon.orange {
|
||||||
|
background: linear-gradient(135deg, #fa8c16, #ffa940);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-icon.blue {
|
||||||
|
background: linear-gradient(135deg, #3462fa, #3462fa);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-icon.green {
|
||||||
|
background: linear-gradient(135deg, #78d01a, #78d01a);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-icon.red {
|
||||||
|
background: linear-gradient(135deg, #f5222d, #ff4d4f);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-desc {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-section {
|
||||||
|
margin-top: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-more {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #1890ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 80rpx 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-card {
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 28rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
padding-bottom: 16rpx;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-type {
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-type.confirm {
|
||||||
|
color: #fa8c16;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-type.exception {
|
||||||
|
color: #f5222d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-no {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-body {
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-info-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-label {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-value {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 16rpx;
|
||||||
|
border-top: 1rpx solid #f0f0f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-time {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-status {
|
||||||
|
font-size: 22rpx;
|
||||||
|
padding: 4rpx 16rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-status.pending {
|
||||||
|
color: #fa8c16;
|
||||||
|
background: #fff7e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-status.processing {
|
||||||
|
color: #1890ff;
|
||||||
|
background: #e6f7ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-status.completed {
|
||||||
|
color: #52c41a;
|
||||||
|
background: #f6ffed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-status.exception {
|
||||||
|
color: #f5222d;
|
||||||
|
background: #fff1f0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scan-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 8rpx 20rpx;
|
||||||
|
border: 1rpx solid #fa8c16;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scan-btn-text {
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.scan-btn-text.orange {
|
||||||
|
background: #fa8c16;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -96,7 +96,8 @@ public class WcsServiceController extends BaseController {
|
|||||||
@PostMapping("/reMaterial")
|
@PostMapping("/reMaterial")
|
||||||
public AjaxResult reMaterial(@RequestBody WmsJobHandler wmsJobHandler) {
|
public AjaxResult reMaterial(@RequestBody WmsJobHandler wmsJobHandler) {
|
||||||
AjaxResult ajaxResult = apiWcsService.reMaterial(wmsJobHandler);
|
AjaxResult ajaxResult = apiWcsService.reMaterial(wmsJobHandler);
|
||||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(wmsJobHandler), "取货无货重分物料",ajaxResult);
|
// RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(wmsJobHandler), "取货无货重分物料",ajaxResult);
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(wmsJobHandler), "取货无货任务作废-货位需要盘点",ajaxResult);
|
||||||
requestLogService.insertRequestLog(requestLog);
|
requestLogService.insertRequestLog(requestLog);
|
||||||
return ajaxResult;
|
return ajaxResult;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.ruoyi.api.service;
|
package com.ruoyi.api.service;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
import com.ruoyi.api.domain.wcsJobHandle.WmsJobHandler;
|
import com.ruoyi.api.domain.wcsJobHandle.WmsJobHandler;
|
||||||
import com.ruoyi.api.domain.wcsStockin.WcsStockinReceive;
|
import com.ruoyi.api.domain.wcsStockin.WcsStockinReceive;
|
||||||
import com.ruoyi.api.domain.wcsStockout.WcsStockoutParam;
|
import com.ruoyi.api.domain.wcsStockout.WcsStockoutParam;
|
||||||
|
import com.ruoyi.common.WcsUrl;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.log.domain.RequestLog;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -36,47 +39,84 @@ public interface IApiWcsService {
|
|||||||
* @param wcsStockinReiceive
|
* @param wcsStockinReiceive
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult requestMydoJobManual(WcsStockinReceive wcsStockinReiceive);
|
AjaxResult requestMydoJobManual(WcsStockinReceive wcsStockinReiceive);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wcs任务回传
|
* wcs任务回传
|
||||||
* @param wmsJobHandler
|
* @param wmsJobHandler
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult jobFinish(WmsJobHandler wmsJobHandler);
|
AjaxResult jobFinish(WmsJobHandler wmsJobHandler);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 放货有货 - 入库重分
|
* 放货有货 - 入库重分
|
||||||
* @param wmsJobHandler
|
* @param wmsJobHandler
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult reAssign(WmsJobHandler wmsJobHandler);
|
AjaxResult reAssign(WmsJobHandler wmsJobHandler);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取货无货 - 重分物料
|
* 取货无货 - 重分物料
|
||||||
* @param wmsJobHandler
|
* @param wmsJobHandler
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult reMaterial(WmsJobHandler wmsJobHandler);
|
AjaxResult reMaterial(WmsJobHandler wmsJobHandler);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送拣选回流作业
|
* 推送【拣选回流】作业
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult sendBackMydoJob(Map<String, Object> param);
|
AjaxResult sendBackMydoJob(Map<String, Object> param);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送盘点回流作业
|
* 推送【盘点出库】作业
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult sendInventoryBackMydoJob(Map<String, Object> param);
|
AjaxResult sendInventoryOutMydoJob(Map<String, Object> param);
|
||||||
|
|
||||||
public AjaxResult sendOutMydoJob(Map<String, Object> param);
|
/**
|
||||||
|
* 推送【盘点回流】作业
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult sendInventoryBackMydoJob(Map<String, Object> param);
|
||||||
|
|
||||||
public AjaxResult sendMoveMydoJob(Map<String, Object> param);
|
/**
|
||||||
|
* 推送【常规出库】作业
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult sendOutMydoJob(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送【移库】作业
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult sendMoveMydoJob(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送【空托出库】作业
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult sendEmptyTrayOutMydoJob(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手动作废wcs作业
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult cancelWcsMydoJob(Map<String, Object> param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手动完成wcs作业
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AjaxResult manualCompleteWcsMydoJob(Map<String, Object> param);
|
||||||
|
|
||||||
public AjaxResult sendEmptyTrayOutMydoJob(Map<String, Object> param);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -668,7 +668,6 @@ public class ApiWcsService implements IApiWcsService {
|
|||||||
|
|
||||||
String warehouseId = mydoJob.getWarehouseId();
|
String warehouseId = mydoJob.getWarehouseId();
|
||||||
BasCargoSpace basCargoSpaceParam = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(wmsJobHandler.getCargoSpaceId());
|
BasCargoSpace basCargoSpaceParam = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(wmsJobHandler.getCargoSpaceId());
|
||||||
|
|
||||||
//标记异常货位状态
|
//标记异常货位状态
|
||||||
if (ObjUtil.isNotNull(basCargoSpaceParam)) {
|
if (ObjUtil.isNotNull(basCargoSpaceParam)) {
|
||||||
basCargoSpaceParam.setStatus(CargoSpaceCode.CARGOSPACE_STATUS_STOCKIN_EXCEPTION);
|
basCargoSpaceParam.setStatus(CargoSpaceCode.CARGOSPACE_STATUS_STOCKIN_EXCEPTION);
|
||||||
@@ -679,7 +678,6 @@ public class ApiWcsService implements IApiWcsService {
|
|||||||
BasCargoSpace cargoSpaceNew = basCargoSpaceService.selectBasCargoSpaceForStockin(
|
BasCargoSpace cargoSpaceNew = basCargoSpaceService.selectBasCargoSpaceForStockin(
|
||||||
new BasCargoSpace().builder().roadwayId(mydoJob.getRoadwayId()).cargoAreaId(basCargoSpaceParam.getCargoAreaId()).theType(mydoJob.getTrayType()).build()
|
new BasCargoSpace().builder().roadwayId(mydoJob.getRoadwayId()).cargoAreaId(basCargoSpaceParam.getCargoAreaId()).theType(mydoJob.getTrayType()).build()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (ObjUtil.isNotNull(cargoSpaceNew)) {
|
if (ObjUtil.isNotNull(cargoSpaceNew)) {
|
||||||
log.info("【入库重分】重分失败,该区域没有可用的空货位,货区:{},托盘类型:{}", basCargoSpaceParam.getCargoAreaId(), mydoJob.getTrayType());
|
log.info("【入库重分】重分失败,该区域没有可用的空货位,货区:{},托盘类型:{}", basCargoSpaceParam.getCargoAreaId(), mydoJob.getTrayType());
|
||||||
return AjaxResult.error("该区域没有可用的空货位");
|
return AjaxResult.error("该区域没有可用的空货位");
|
||||||
@@ -706,7 +704,7 @@ public class ApiWcsService implements IApiWcsService {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取货无货 - 重分物料
|
* 取货无货 - 重分物料 @@@FT577特殊情况,由于出库版辊唯一,无货情况下不能继续重分,只能手动处理
|
||||||
* @param wmsJobHandler
|
* @param wmsJobHandler
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -751,6 +749,7 @@ public class ApiWcsService implements IApiWcsService {
|
|||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult sendBackMydoJob(Map<String, Object> param) {
|
public AjaxResult sendBackMydoJob(Map<String, Object> param) {
|
||||||
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.PUSH_IN_MYDO_JOB, JSONUtil.toJsonStr(param), "推送入库回流作业");
|
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.PUSH_IN_MYDO_JOB, JSONUtil.toJsonStr(param), "推送入库回流作业");
|
||||||
@@ -767,22 +766,6 @@ public class ApiWcsService implements IApiWcsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaxResult sendInventoryBackMydoJob(Map<String, Object> param) {
|
|
||||||
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.PUSH_IN_MYDO_JOB, JSONUtil.toJsonStr(param), "推送盘点回流作业");
|
|
||||||
requestLog.setResponseBody(JSONUtil.toJsonStr(AjaxResult.success()));
|
|
||||||
requestLog.setResponseStatus("0");
|
|
||||||
requestLog.setIsSuccessful("1");
|
|
||||||
requestLogService.insertRequestLog(requestLog);
|
|
||||||
|
|
||||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
return AjaxResult.error();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送出库作业
|
* 推送出库作业
|
||||||
* @param param
|
* @param param
|
||||||
@@ -826,13 +809,36 @@ public class ApiWcsService implements IApiWcsService {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送盘点作业
|
* 推送盘点出库作业
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult sendInventroyMydoJob(Map<String, Object> param) {
|
@Override
|
||||||
|
public AjaxResult sendInventoryOutMydoJob(Map<String, Object> param) {
|
||||||
|
|
||||||
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.PUSH_MOVE_MYDO_JOB, JSONUtil.toJsonStr(param), "推送盘点作业");
|
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.PUSH_INVENTORY_MYDO_JOB, JSONUtil.toJsonStr(param), "推送盘点出库作业");
|
||||||
|
requestLog.setResponseBody(JSONUtil.toJsonStr(AjaxResult.success()));
|
||||||
|
requestLog.setResponseStatus("0");
|
||||||
|
requestLog.setIsSuccessful("1");
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
|
||||||
|
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送盘点回库作业
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult sendInventoryBackMydoJob(Map<String, Object> param) {
|
||||||
|
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.PUSH_INVENTORY_MYDO_JOB, JSONUtil.toJsonStr(param), "推送盘点回库作业");
|
||||||
requestLog.setResponseBody(JSONUtil.toJsonStr(AjaxResult.success()));
|
requestLog.setResponseBody(JSONUtil.toJsonStr(AjaxResult.success()));
|
||||||
requestLog.setResponseStatus("0");
|
requestLog.setResponseStatus("0");
|
||||||
requestLog.setIsSuccessful("1");
|
requestLog.setIsSuccessful("1");
|
||||||
@@ -851,6 +857,7 @@ public class ApiWcsService implements IApiWcsService {
|
|||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public AjaxResult sendEmptyTrayOutMydoJob(Map<String, Object> param) {
|
public AjaxResult sendEmptyTrayOutMydoJob(Map<String, Object> param) {
|
||||||
|
|
||||||
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.PUSH_OUT_MYDO_JOB, JSONUtil.toJsonStr(param), "推送容器出库作业");
|
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.PUSH_OUT_MYDO_JOB, JSONUtil.toJsonStr(param), "推送容器出库作业");
|
||||||
@@ -866,4 +873,45 @@ public class ApiWcsService implements IApiWcsService {
|
|||||||
return AjaxResult.error();
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手动作废wcs作业
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult cancelWcsMydoJob(Map<String, Object> param){
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.PUSH_OUT_MYDO_JOB, JSONUtil.toJsonStr(param), "wcs手动作废作业");
|
||||||
|
requestLog.setResponseBody(JSONUtil.toJsonStr(AjaxResult.success()));
|
||||||
|
requestLog.setResponseStatus("0");
|
||||||
|
requestLog.setIsSuccessful("1");
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
|
||||||
|
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手动完成wcs作业
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult manualCompleteWcsMydoJob(Map<String, Object> param){
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(WcsUrl.MANUAL_COMPLETE_WCS_MYDOJOB, JSONUtil.toJsonStr(param), "wcs手动完成作业");
|
||||||
|
requestLog.setResponseBody(JSONUtil.toJsonStr(AjaxResult.success()));
|
||||||
|
requestLog.setResponseStatus("0");
|
||||||
|
requestLog.setIsSuccessful("1");
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
|
||||||
|
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||||
|
return AjaxResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ public class WcsUrl {
|
|||||||
/** 推送移库作业 */
|
/** 推送移库作业 */
|
||||||
public static final String PUSH_MOVE_MYDO_JOB = "http://localhost:8081/wcs2wms/api/receiveMoveMydoJob";
|
public static final String PUSH_MOVE_MYDO_JOB = "http://localhost:8081/wcs2wms/api/receiveMoveMydoJob";
|
||||||
|
|
||||||
|
/** 推送盘点作业 */
|
||||||
|
public static final String PUSH_INVENTORY_MYDO_JOB = "http://localhost:8081/wcs2wms/api/receiveInventoryMydoJob";
|
||||||
|
|
||||||
/** 推送回流作业 */
|
/** 推送回流作业 */
|
||||||
public static final String PUSH_RETURN_MYDO_JOB = "http://localhost:8081/wcs2wms/api/receiveReturnMydoJob";
|
public static final String PUSH_RETURN_MYDO_JOB = "http://localhost:8081/wcs2wms/api/receiveReturnMydoJob";
|
||||||
|
|
||||||
@@ -23,8 +26,11 @@ public class WcsUrl {
|
|||||||
/** */
|
/** */
|
||||||
public static final String OUT_MYDOJOB_MS = "http://localhost:8081/wcs2wms/api/outMydojobMakesure";
|
public static final String OUT_MYDOJOB_MS = "http://localhost:8081/wcs2wms/api/outMydojobMakesure";
|
||||||
|
|
||||||
/** */
|
/** 请求wcs手动作废作业 */
|
||||||
public static final String CANCEL_MYDOJOB = "http://localhost:8081/wcs2wms/api/cancelMydoJob";
|
public static final String CANCEL_WCS_MYDOJOB = "http://localhost:8081/wcs2wms/api/cancelMydoJob";
|
||||||
|
|
||||||
|
/** 请求wcs手动完成作业 */
|
||||||
|
public static final String MANUAL_COMPLETE_WCS_MYDOJOB = "http://localhost:8081/wcs2wms/api/manualCompleteMydoJob";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ public class PdaController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/inventoryTrayCodeComplete")
|
@PostMapping("/inventoryTrayCodeComplete")
|
||||||
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
@PreAuthorize("@ss.hasPermi('out:bound:task:info')")
|
||||||
public AjaxResult inventoryTrayCodeComplete(Map<String, Object> params) {
|
public AjaxResult inventoryTrayCodeComplete(@RequestBody Map<String, Object> params) {
|
||||||
return pdaService.inventoryTrayCodeComplete(params);
|
return pdaService.inventoryTrayCodeComplete(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -236,8 +236,6 @@ public class MydoJobHandler {
|
|||||||
mydoJobService.insertMydoJobFinish(mydoJob.getJobId());
|
mydoJobService.insertMydoJobFinish(mydoJob.getJobId());
|
||||||
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
|
||||||
|
|
||||||
// apiWcsService.cancelWcsMydojob()
|
|
||||||
|
|
||||||
log.info("【账务处理-入库】任务作废,移除作业信息,更新货位状态,作业号:{}", mydoJob.getJobId());
|
log.info("【账务处理-入库】任务作废,移除作业信息,更新货位状态,作业号:{}", mydoJob.getJobId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -895,5 +893,9 @@ public class MydoJobHandler {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cancelWcsJob(){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -239,6 +239,112 @@ public class RequestWcsHandler {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送wcs移库任务
|
||||||
|
*/
|
||||||
|
@Scheduled(fixedRate = TIMEINTERVAL_2000)
|
||||||
|
public void sendWcsMoveTask(){
|
||||||
|
List<MydoJob> mydoJobs = mydoJobService.selectOutMydoJobList(
|
||||||
|
new MydoJob().builder()
|
||||||
|
.status(TaskStatusEnum.READY.getCode())
|
||||||
|
.inOrOut(TaskType.TASKTYPE_PICK_BACK)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (mydoJobs.isEmpty()) return;
|
||||||
|
|
||||||
|
for (MydoJob mydoJob : mydoJobs){
|
||||||
|
|
||||||
|
//初始化参数
|
||||||
|
HashMap<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("reqCode", UUID.randomUUID().toString());//请求码
|
||||||
|
paramMap.put("trayCode", mydoJob.getTrayCode());//容器编号
|
||||||
|
paramMap.put("taskNo", mydoJob.getTaskNo());//容器编号
|
||||||
|
paramMap.put("jobId", mydoJob.getJobId());
|
||||||
|
paramMap.put("inOrOut", mydoJob.getInOrOut());
|
||||||
|
paramMap.put("cargoSpaceId", mydoJob.getCargoSpaceId());
|
||||||
|
|
||||||
|
AjaxResult ajaxResult = apiWcsService.sendBackMydoJob(paramMap);
|
||||||
|
|
||||||
|
if (ajaxResult.isSuccess()){
|
||||||
|
log.info("【推送回流入库】<托盘回流>入库,更新货位和库存预占用状态,wms作业号:{},货位:{},托盘号:{}", mydoJob.getJobId(), mydoJob.getCargoSpaceId(), mydoJob.getTrayCode());
|
||||||
|
mydoJob.setStatus(TaskStatusEnum.RUNNING.getCode());
|
||||||
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
|
|
||||||
|
//更新库存状态【占用中】
|
||||||
|
List<BasStock> stocks = basStockService.selectBasStockListByTrayCode(mydoJob.getTrayCode());
|
||||||
|
if (!stocks.isEmpty()){
|
||||||
|
for (BasStock stock : stocks) {
|
||||||
|
stock.setStockStatus(BasStockCode.STOCK_STATUS_OCCUPIED);
|
||||||
|
stock.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||||
|
basStockService.updateBasStock(stock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新货位状态【入库预占用】
|
||||||
|
basCargoSpaceService.updateBasCargoSpaceStatus(mydoJob.getCargoSpaceId(), "", CargoSpaceCode.CARGOSPACE_STATUS_PRE_STOCKIN);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送wcs盘点出库任务
|
||||||
|
*/
|
||||||
|
@Scheduled(fixedRate = TIMEINTERVAL_2000)
|
||||||
|
public void sendWcsInventoryOutTask(){
|
||||||
|
List<MydoJob> mydoJobs = mydoJobService.selectOutMydoJobList(
|
||||||
|
new MydoJob().builder()
|
||||||
|
.status(TaskStatusEnum.READY.getCode())
|
||||||
|
.inOrOut(TaskType.TASKTYPE_STOCKOUT_INVENTORY)
|
||||||
|
.build()
|
||||||
|
);
|
||||||
|
|
||||||
|
if (mydoJobs.isEmpty()) return;
|
||||||
|
|
||||||
|
for (MydoJob mydoJob : mydoJobs){
|
||||||
|
|
||||||
|
//初始化参数
|
||||||
|
HashMap<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("reqCode", UUID.randomUUID().toString());//请求码
|
||||||
|
paramMap.put("trayCode", mydoJob.getTrayCode());//容器编号
|
||||||
|
paramMap.put("taskNo", mydoJob.getTaskNo());//容器编号
|
||||||
|
paramMap.put("jobId", mydoJob.getJobId());
|
||||||
|
paramMap.put("inOrOut", mydoJob.getInOrOut());
|
||||||
|
paramMap.put("cargoSpaceId", mydoJob.getCargoSpaceId());
|
||||||
|
|
||||||
|
AjaxResult ajaxResult = apiWcsService.sendInventoryOutMydoJob(paramMap);
|
||||||
|
|
||||||
|
if (ajaxResult.isSuccess()){
|
||||||
|
log.info("【推送盘点出库】<盘点>出库,更新货位和库存预占用状态,wms作业号:{},货位:{},托盘号:{}", mydoJob.getJobId(), mydoJob.getCargoSpaceId(), mydoJob.getTrayCode());
|
||||||
|
mydoJob.setStatus(TaskStatusEnum.RUNNING.getCode());
|
||||||
|
mydoJobService.updateMydoJob(mydoJob);
|
||||||
|
|
||||||
|
//更新库存状态【占用中】
|
||||||
|
List<BasStock> stocks = basStockService.selectBasStockListByTrayCode(mydoJob.getTrayCode());
|
||||||
|
if (!stocks.isEmpty()){
|
||||||
|
for (BasStock stock : stocks) {
|
||||||
|
stock.setStockStatus(BasStockCode.STOCK_STATUS_OCCUPIED);
|
||||||
|
stock.setCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||||
|
basStockService.updateBasStock(stock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新货位状态【入库预占用】
|
||||||
|
basCargoSpaceService.updateBasCargoSpaceStatus(mydoJob.getCargoSpaceId(), mydoJob.getTrayCode(), CargoSpaceCode.CARGOSPACE_STATUS_PRE_STOCKOUT);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user