增加货位信息手动盘点出库功能
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="card-info">
|
<view class="card-info">
|
||||||
<text class="card-title">选择托盘作废绑定信息</text>
|
<text class="card-title">选择托盘作废绑定信息</text>
|
||||||
<text class="card-desc">扫描或输入托盘条码选择版辊绑盘信息作废</text>
|
<text class="card-desc">扫描或输入托盘条码作废全部绑定信息</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
|
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
<uni-icons type="scan" size="24" color="#fff"></uni-icons>
|
<uni-icons type="scan" size="24" color="#fff"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="card-info">
|
<view class="card-info">
|
||||||
<text class="card-title">版辊绑定信息作废</text>
|
<text class="card-title">单版辊绑定作废</text>
|
||||||
<text class="card-desc">扫描或输入辊号执行当前版辊绑盘信息作废</text>
|
<text class="card-desc">扫描或输入辊号执行单独版辊绑盘信息作废</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
|
<uni-icons type="right" size="18" color="#ccc"></uni-icons>
|
||||||
|
|||||||
@@ -58,8 +58,8 @@
|
|||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
<view class="btn-section" >
|
<view class="btn-section" >
|
||||||
<button class="btn btn-blue" v-if="outboundList" @click="handleBarcode">查询</button>
|
<button class="btn btn-blue" v-if="outboundList" @click="handleBarcode">查询</button>
|
||||||
<button class="btn btn-orange" v-if="outboundList" @click="stockoutComplete">托盘确认出库</button>
|
<button class="btn btn-orange" v-if="outboundList" @click="stockoutComplete">托盘确认出库(部分拣选确认)</button>
|
||||||
<button class="btn btn-green" v-if="outboundList" @click="stockoutCompleteAll">一键确认出库</button>
|
<button class="btn btn-green" v-if="outboundList" @click="stockoutCompleteAll">一键确认出库(整托确认)</button>
|
||||||
<button class="btn btn-default" @click="resetForm">重置</button>
|
<button class="btn btn-default" @click="resetForm">重置</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -194,13 +194,23 @@
|
|||||||
|
|
||||||
// console.log(this.barcode)
|
// console.log(this.barcode)
|
||||||
// var that = this
|
// var that = this
|
||||||
stockoutTrayCodeComplete(this.barcode).then(() => {
|
|
||||||
that.$modal.msgSuccess(this.barcode + '出库确认成功')
|
this.$modal.confirm('该操作需要确认版辊数量再统一执行确认出库,点击【确定】后继续执行').then(() => {
|
||||||
that.resetForm()
|
stockoutTrayCodeComplete(this.barcode).then(() => {
|
||||||
}).catch(() => {
|
that.$modal.msgSuccess(this.barcode + '出库确认成功')
|
||||||
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
|
that.resetForm()
|
||||||
// console.log('出库确认失败')
|
}).catch(() => {
|
||||||
})
|
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
|
||||||
|
// console.log('出库确认失败')
|
||||||
|
})
|
||||||
|
}).then(() => {
|
||||||
|
this.$modal.msgSuccess(this.barcode + '出库确认成功');
|
||||||
|
this.resetForm();
|
||||||
|
}).catch(() => {
|
||||||
|
// 全局拦截器通常已处理错误弹窗,这里可只处理状态重置
|
||||||
|
// console.log('出库确认失败或用户取消')
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
stockoutCompleteAll() {
|
stockoutCompleteAll() {
|
||||||
|
|||||||
@@ -49,6 +49,18 @@ public class WcsServiceController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 盘点货位出库
|
||||||
|
*/
|
||||||
|
@PostMapping("/inventoryOutByManual")
|
||||||
|
public AjaxResult inventoryOutyByManual(@RequestBody Map<String, String> params) {
|
||||||
|
AjaxResult ajaxResult = apiWcsService.inventoryOutByManual(params);
|
||||||
|
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(params), "制定货位盘点出库", ajaxResult);
|
||||||
|
requestLogService.insertRequestLog(requestLog);
|
||||||
|
return ajaxResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求补码作业
|
* 请求补码作业
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -619,6 +619,150 @@ public class ApiWcsService implements IApiWcsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 指定货位出库
|
||||||
|
* @param params
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult inventoryOutByManual(Map<String, String> params){
|
||||||
|
|
||||||
|
String cargoSpaceId = params.get("cargoSpaceId");
|
||||||
|
|
||||||
|
//当前货位
|
||||||
|
BasCargoSpace cargoSpaceCurrent = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
|
||||||
|
if (ObjUtil.isNull(cargoSpaceCurrent)){
|
||||||
|
log.warn("【操作失败】找不到该货位,可能是货位异常或参数错误,请联系管理员,货位号:", cargoSpaceId);
|
||||||
|
return AjaxResult.error("找不到该货位信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
// if (!cargoSpaceCurrent.getLocked().equals(CargoSpaceCode.CARGOSPACE_LOCKED_NORMAL)){
|
||||||
|
// log.warn("【操作失败】当前货位已经锁定或禁用,不能执行<指定货位出库>该操作,货位号:", cargoSpaceId);
|
||||||
|
// return AjaxResult.error("当前货位已经锁定或禁用,不能执行<指定货位出库>该操作");
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// MydoJob job = mydoJobService.selectMydoJobBy(cargoSpace.getTrayCode());
|
||||||
|
|
||||||
|
|
||||||
|
//todo 移库判断
|
||||||
|
if(cargoSpaceCurrent.getIssDouble().equals(CargoSpaceCode.CARGOSPACE_ISDOUBLE_Y)){
|
||||||
|
//双伸货位出库判断单伸位置是否有货
|
||||||
|
BasCargoSpace cargoSpaceSingle = basCargoSpaceService.selectAnotherBasCargoSpaceBySameGroup(cargoSpaceCurrent);
|
||||||
|
|
||||||
|
//单伸位非空闲状态 - 触发移库任务
|
||||||
|
if (cargoSpaceSingle.getStatus().equals(CargoSpaceCode.CARGOSPACE_STATUS_OCCUPIED)){
|
||||||
|
String moveJobId = basJobIdService.getId(JobIdType.MYDOJOB_MOVE);
|
||||||
|
String moveTaskNo = basTaskNoService.getTaskNo(TaskIdType.TASK_STOCKOUT);
|
||||||
|
BasCargoSpace targetCargo = basCargoSpaceService.selectBasCargoSpaceForStockin(
|
||||||
|
new BasCargoSpace().builder().theType(cargoSpaceCurrent.getTheType()).roadwayId(cargoSpaceCurrent.getRoadwayId()).build()
|
||||||
|
);
|
||||||
|
|
||||||
|
//生成并推送移库
|
||||||
|
MydoJob moveJob = new MydoJob().builder()
|
||||||
|
.jobId(moveJobId)
|
||||||
|
.taskNo(moveTaskNo)
|
||||||
|
.status(TaskStatusEnum.READY.getCode())
|
||||||
|
.inOrOut(TaskType.TASKTYPE_PICK_STOCK_MOVE)
|
||||||
|
.executionPhase("0")
|
||||||
|
.trayCode(cargoSpaceSingle.getTrayCode())
|
||||||
|
.trayType(cargoSpaceSingle.getTheType().toString())
|
||||||
|
.roadwayId(cargoSpaceSingle.getRoadwayId())
|
||||||
|
.cargoSpaceId(cargoSpaceSingle.getCargoSpaceId())
|
||||||
|
.targetCargoSpaceId(targetCargo.getCargoSpaceId())
|
||||||
|
.priority(0)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
log.info("【指定货位盘点出库】出库双伸货位外侧有货,生成移库作业,作业号:{},移库货位:{},目标货位:{}", moveJobId, cargoSpaceSingle.getCargoSpaceId(), targetCargo.getCargoSpaceId());
|
||||||
|
|
||||||
|
//推送移库
|
||||||
|
AjaxResult ajaxResult;
|
||||||
|
|
||||||
|
/*-----------------推送wcs移库任务----------------- */
|
||||||
|
HashMap<String, Object> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("reqCode", UUID.randomUUID().toString());//请求码
|
||||||
|
paramMap.put("jobId", moveJob.getJobId());//作业号
|
||||||
|
paramMap.put("taskNo", moveJob.getTaskNo());//任务号
|
||||||
|
paramMap.put("trayCode", moveJob.getTrayCode().trim());//容器编号
|
||||||
|
paramMap.put("cargoSpaceId", moveJob.getCargoSpaceId());//货位
|
||||||
|
paramMap.put("targetCargoSpaceId", moveJob.getTargetCargoSpaceId());//目标货位
|
||||||
|
paramMap.put("inOrOut", moveJob.getInOrOut());//任务类型
|
||||||
|
paramMap.put("priority", 0);//任务优先级
|
||||||
|
|
||||||
|
ajaxResult = sendMoveMydoJob(paramMap);
|
||||||
|
log.info(
|
||||||
|
"【盘点出库-移库】推送wcs移库作业,作业号:{},托盘条码:{},移库货位:{},目标货位:{}", moveJob.getJobId(), moveJob.getTrayCode(), moveJob.getCargoSpaceId(), moveJob.getTargetCargoSpaceId()
|
||||||
|
);
|
||||||
|
if (ajaxResult.isSuccess()){
|
||||||
|
//生成托盘主作业
|
||||||
|
mydoJobService.insertMydoJob(moveJob);
|
||||||
|
|
||||||
|
List<BasStock> stocks = basStockService.selectBasStockListByTrayCode(moveJob.getTrayCode());
|
||||||
|
if (!stocks.isEmpty()){
|
||||||
|
for(BasStock stock : stocks){
|
||||||
|
//更新库存表货位【占用】状态
|
||||||
|
stock.setStockStatus(BasStockCode.STOCK_STATUS_OCCUPIED);
|
||||||
|
basStockService.updateBasStock(stock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新货位表【预占用】状态
|
||||||
|
basCargoSpaceService.updateBasCargoSpaceStatus(cargoSpaceSingle.getCargoSpaceId(),cargoSpaceSingle.getTrayCode(),CargoSpaceCode.CARGOSPACE_STATUS_PRE_STOCKOUT);
|
||||||
|
basCargoSpaceService.updateBasCargoSpaceStatus(targetCargo.getCargoSpaceId(),cargoSpaceSingle.getTrayCode(),CargoSpaceCode.CARGOSPACE_STATUS_PRE_STOCKIN);
|
||||||
|
|
||||||
|
log.info(
|
||||||
|
"【手动出库-移库】推送成功,货位和库存更为<占用>状态,作业号:{},托盘条码:{},移库货位:{},目标货位:{}", moveJob.getJobId(), moveJob.getTrayCode(), moveJob.getCargoSpaceId(), moveJob.getTargetCargoSpaceId()
|
||||||
|
);
|
||||||
|
}else{
|
||||||
|
return AjaxResult.error("【手动出库-移库】推送失败,请查看接口错误信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
}else if (cargoSpaceSingle.getStatus().equals(CargoSpaceCode.CARGOSPACE_STATUS_PRE_STOCKIN) ||
|
||||||
|
cargoSpaceSingle.getStatus().equals(CargoSpaceCode.CARGOSPACE_STATUS_PRE_STOCKOUT)){
|
||||||
|
return AjaxResult.error("【盘点出库-移库】推送失败,操作中止,对应的单伸货位状态不符合移库条件");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
List<MydoJob> jobs = mydoJobService.selectMydoJobList(
|
||||||
|
new MydoJob().builder().cargoSpaceId(cargoSpaceId).build()
|
||||||
|
);
|
||||||
|
if (jobs.isEmpty()){
|
||||||
|
|
||||||
|
String jobId = basJobIdService.getId(JobIdType.MYDOJOB_INVENTORY_STOCKOUT);
|
||||||
|
String taskNo = basTaskNoService.getTaskNo(TaskIdType.TASK_STOCKOUT_INVENTORY);
|
||||||
|
int taskType = TaskType.TASKTYPE_STOCKOUT_INVENTORY;
|
||||||
|
|
||||||
|
MydoJob mydoJob = new MydoJob().builder()
|
||||||
|
.jobId(jobId)
|
||||||
|
.taskNo(taskNo)
|
||||||
|
.status(TaskStatusEnum.READY.getCode())
|
||||||
|
.warehouseId(cargoSpaceCurrent.getWarehouseId())
|
||||||
|
.warehouseName("立体库")
|
||||||
|
.executionPhase("0")
|
||||||
|
.inOrOut(taskType)
|
||||||
|
.trayCode(cargoSpaceCurrent.getTrayCode())
|
||||||
|
// .exitId()
|
||||||
|
.roadwayId(cargoSpaceCurrent.getRoadwayId())
|
||||||
|
.cargoSpaceId(cargoSpaceId)
|
||||||
|
.cargoSpaceName(cargoSpaceCurrent.getCargoSpaceName())
|
||||||
|
.trayType(cargoSpaceCurrent.getTheType().toString())
|
||||||
|
.build();
|
||||||
|
|
||||||
|
mydoJobService.insertMydoJob(mydoJob);
|
||||||
|
log.info("【wms生成出库】<货位盘点出库>作业,作业号:{},任务号:{},托盘号:{},盘点货位:{}",mydoJob.getJobId() ,mydoJob.getTaskNo() ,mydoJob.getTrayCode(), cargoSpaceId);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
log.info("【wms指定出库】<货位盘点出库>操作失败,已经存在当前货位的盘点出库任务,盘点货位:{}", cargoSpaceId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return AjaxResult.error();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//todo 补码
|
//todo 补码
|
||||||
/**
|
/**
|
||||||
* 请求补码作业
|
* 请求补码作业
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public interface IPdaService {
|
|||||||
* @param params
|
* @param params
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public AjaxResult inventoryTrayCodeComplete(Map<String, Object> params);
|
AjaxResult inventoryTrayCodeComplete(Map<String, Object> params);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1140,16 +1140,18 @@ public class PdaServiceImpl implements IPdaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!mydoJob.getStatus().equals(TaskStatusEnum.AUTO_FINISHED.getCode())){
|
if (!mydoJob.getStatus().equals(TaskStatusEnum.AUTO_FINISHED.getCode())){
|
||||||
log.warn("【操作失败】请等待当前盘点作业出库完成再执行确认操作,托盘号:{}", trayCode);
|
log.warn("【操作失败】请等待当前盘点完成作业出库再执行确认操作,托盘号:{}", trayCode);
|
||||||
return AjaxResult.error("请等待当前盘点作业出库完成再执行确认操作");
|
return AjaxResult.error("请等待当前盘点作业完成出库再执行确认操作");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<PdStockpdDetail> details = pdStockpdDetailService.selectPdStockpdDetailList(
|
List<PdStockpdDetail> details = pdStockpdDetailService.selectPdStockpdDetailList(
|
||||||
new PdStockpdDetail().builder().trayCode(trayCode).build()
|
new PdStockpdDetail().builder().trayCode(trayCode).build()
|
||||||
);
|
);
|
||||||
for (PdStockpdDetail detail : details){
|
if (!details.isEmpty()){
|
||||||
detail.setAssignNum(BigDecimal.ONE);
|
for (PdStockpdDetail detail : details){
|
||||||
pdStockpdDetailService.updatePdStockpdDetail(detail);
|
detail.setAssignNum(BigDecimal.ONE);
|
||||||
|
pdStockpdDetailService.updatePdStockpdDetail(detail);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String jobId = basJobIdService.getId(JobIdType.JOB_MANUAL_LIST_INVENTORY_STOCKIN);
|
String jobId = basJobIdService.getId(JobIdType.JOB_MANUAL_LIST_INVENTORY_STOCKIN);
|
||||||
|
|||||||
@@ -57,7 +57,16 @@ export function stockoutByManual(cargoSpaceId) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/api/wmsService/wcs/stockoutByManual',
|
url: '/api/wmsService/wcs/stockoutByManual',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: { cargoSpaceId: cargoSpaceId }
|
data: { cargoSpaceId: cargoSpaceId }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 指定货位出库
|
||||||
|
export function inventoryOutByManual(cargoSpaceId) {
|
||||||
|
return request({
|
||||||
|
url: '/api/wmsService/wcs/inventoryOutByManual',
|
||||||
|
method: 'post',
|
||||||
|
data: { cargoSpaceId: cargoSpaceId }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,6 +109,16 @@
|
|||||||
>指定货位出库</el-button>
|
>指定货位出库</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="inventoryOutByManualHandle"
|
||||||
|
:disabled="multiple"
|
||||||
|
>货位盘点出库</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
@@ -117,7 +127,7 @@
|
|||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['bas:cargospace:add']"
|
v-hasPermi="['bas:cargospace:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
@@ -325,7 +335,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listCargospace, getCargospace, delCargospace, addCargospace, updateCargospace, stockoutByManual } from "@/api/bas/cargospace"
|
import { listCargospace, getCargospace, delCargospace, addCargospace, updateCargospace, stockoutByManual, inventoryOutByManual } from "@/api/bas/cargospace"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Cargospace",
|
name: "Cargospace",
|
||||||
@@ -467,6 +477,7 @@ export default {
|
|||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//指定货位出库
|
||||||
stockoutByManualHandle() {
|
stockoutByManualHandle() {
|
||||||
if (!this.cargoSpaces || this.cargoSpaces.length === 0) {
|
if (!this.cargoSpaces || this.cargoSpaces.length === 0) {
|
||||||
this.$modal.msgWarning("请至少选择一个货位执行手动出库操作");
|
this.$modal.msgWarning("请至少选择一个货位执行手动出库操作");
|
||||||
@@ -485,6 +496,25 @@ export default {
|
|||||||
}).catch(() => {})
|
}).catch(() => {})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//货位盘点出库
|
||||||
|
inventoryOutByManualHandle() {
|
||||||
|
if (!this.cargoSpaces || this.cargoSpaces.length === 0) {
|
||||||
|
this.$modal.msgWarning("请至少选择一个货位执行盘点出库操作");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const cargoSpaceId = this.ids[0]
|
||||||
|
var data ={
|
||||||
|
cargoSpaceId: cargoSpaceId
|
||||||
|
}
|
||||||
|
this.$modal.confirm('是否确认将货位编号为"' + cargoSpaceId + '"货位的托盘进行出库盘点?').then(() => {
|
||||||
|
return stockoutByManual(cargoSpaceId)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("操作成功")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset()
|
this.reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user