增加移库预留空位判断
This commit is contained in:
@@ -306,10 +306,18 @@ public class ApiWcsService implements IApiWcsService {
|
||||
//1500*1350 通用货位510H - 货区3任意层数
|
||||
cargoParam = new BasCargoSpace().builder().theType(type).cargoAreaId(wcsStockinReiceive.getCargoAreaId()).build();
|
||||
}
|
||||
|
||||
//>>>限制:区域货位不能放满,留出移库位置,判断满货位数量
|
||||
boolean isCargoAvailable = basCargoSpaceService.selectBasCargoSpaceIsFull(cargoParam, 10);
|
||||
if (!isCargoAvailable){
|
||||
log.warn("【入库货位分配】该货架区域无可分配空位,请检查货架空位状态,货区:{},托盘类型:{},预留移库空位:{}",wcsStockinReiceive.getCargoAreaId(), type, 10);
|
||||
return AjaxResult.error("【货位分配失败】货架区域可分配货位已满,预留移库空位:10");
|
||||
}
|
||||
|
||||
BasCargoSpace cargoStockin = basCargoSpaceService.selectBasCargoSpaceForStockin(cargoParam);
|
||||
basCargoSpace = cargoStockin;
|
||||
basCargoSpace = cargoStockin;//更新状态用
|
||||
if (cargoParam == null) {
|
||||
log.warn("【货位分配】该类型托盘立库中无可用货位");
|
||||
log.warn("【入库货位分配】该类型托盘立库中无可用货位");
|
||||
return AjaxResult.error("【货位分配失败】该类型托盘立库中无可用货位");
|
||||
}
|
||||
|
||||
@@ -331,7 +339,7 @@ public class ApiWcsService implements IApiWcsService {
|
||||
.build();
|
||||
|
||||
mydoJobService.insertMydoJob(mydoJobNew);
|
||||
log.info("【wms生成入库】<空托入库>作业,作业号:{},任务号:{},托盘号:{},分配货位:{}",mydoJobNew.getJobId() ,mydoJobNew.getTaskNo() ,mydoJobNew.getTrayCode(), cargoStockin.getCargoSpaceId());
|
||||
log.info("【wms生成入库】<常规入库>作业,作业号:{},任务号:{},托盘号:{},分配货位:{}",mydoJobNew.getJobId() ,mydoJobNew.getTaskNo() ,mydoJobNew.getTrayCode(), cargoStockin.getCargoSpaceId());
|
||||
}else{
|
||||
log.info("【提示】<常规入库>wms已存在该条码作业,托盘号:{}",mydoJob.getTrayCode());
|
||||
basCargoSpace = basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(mydoJob.getCargoSpaceId());
|
||||
|
||||
@@ -55,6 +55,17 @@ public interface IBasCargoSpaceService
|
||||
public List<BasCargoSpace> selectBasCargoSpaceListForContainer(BasCargoSpace basCargoSpace);
|
||||
|
||||
|
||||
/**
|
||||
* 查询货位信息列表 - 是否满足入库要求(@@@FT577 - 留出移库空位x10)
|
||||
* true - 可用 false - 无可用货位
|
||||
*
|
||||
* @param basCargoSpace 货位信息
|
||||
* @param restCargo 预留的移库位置数量
|
||||
* @return 货位信息集合
|
||||
*/
|
||||
public boolean selectBasCargoSpaceIsFull(BasCargoSpace basCargoSpace, int restCargo);
|
||||
|
||||
|
||||
/**
|
||||
* 新增货位信息
|
||||
*
|
||||
|
||||
@@ -82,6 +82,39 @@ public class BasCargoSpaceServiceImpl implements IBasCargoSpaceService
|
||||
return basCargoSpaceMapper.selectBasCargoSpaceListForContainer(basCargoSpace);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询货位信息列表 - 是否满足入库要求(@@@FT577 - 留出移库空位x10)
|
||||
* true - 可用 false - 无可用货位
|
||||
*
|
||||
* @param basCargoSpace 货位信息
|
||||
* @return 货位信息集合
|
||||
*/
|
||||
@Override
|
||||
public boolean selectBasCargoSpaceIsFull(BasCargoSpace basCargoSpace, int restCargo){
|
||||
|
||||
String cargoAreaId = basCargoSpace.getCargoAreaId();
|
||||
int type = basCargoSpace.getTheType();
|
||||
|
||||
//可分配区域的所有货位数量
|
||||
int cargoFull = selectBasCargoSpaceList(
|
||||
new BasCargoSpace().builder().cargoAreaId(cargoAreaId).theType(type).locked(CargoSpaceCode.CARGOSPACE_LOCKED_NORMAL).build()
|
||||
).size();
|
||||
|
||||
//可分配区域的所有货位数量
|
||||
int cargoAvailable = selectBasCargoSpaceList(
|
||||
new BasCargoSpace().builder().cargoAreaId(cargoAreaId).theType(type).status("2").locked(CargoSpaceCode.CARGOSPACE_LOCKED_NORMAL).build()
|
||||
).size();
|
||||
|
||||
if (cargoAvailable + restCargo > cargoFull){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 新增货位信息
|
||||
*
|
||||
|
||||
@@ -46,11 +46,11 @@ public class InMydoJobDetailController extends BaseController
|
||||
{
|
||||
startPage();
|
||||
List<MydoJobDetail> list;
|
||||
if (mydoJobDetail.getStatus() != null && Convert.toInt(mydoJobDetail.getStatus()) < 4){
|
||||
// if (mydoJobDetail.getStatus() != null && Convert.toInt(mydoJobDetail.getStatus()) < 4){
|
||||
list = mydoJobDetailService.selectMydoJobDetailList(mydoJobDetail);
|
||||
}else {
|
||||
list = mydoJobDetailService.selectMydoJobDetailFinishList(mydoJobDetail);
|
||||
}
|
||||
// }else {
|
||||
// list = mydoJobDetailService.selectMydoJobDetailFinishList(mydoJobDetail);
|
||||
// }
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
@@ -723,7 +723,10 @@ public class MydoJobHandler {
|
||||
inStockinDetailService.updateInStockinDetail(inStockinDetail);
|
||||
}
|
||||
|
||||
intrayMsgService.deleteInTrayMsgByRollerNumber(detail.getRollerNumber());
|
||||
InTrayMsg msg = intrayMsgService.selectInTrayMsgByRollerNumber(detail.getRollerNumber());
|
||||
if (ObjUtil.isNotNull(msg)){
|
||||
intrayMsgService.deleteInTrayMsgByRollerNumber(detail.getRollerNumber());
|
||||
}
|
||||
|
||||
}//子任务循环处理
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询作业子信息列表
|
||||
export function listJobdetail(query) {
|
||||
export function listJobDetail(query) {
|
||||
return request({
|
||||
url: '/in/jobdetail/list',
|
||||
method: 'get',
|
||||
|
||||
@@ -176,6 +176,11 @@
|
||||
<!-- <el-table-column label="出库数量" align="center" prop="outQuantity" width="100" />-->
|
||||
<!-- <el-table-column label="客户名称" align="center" prop="customerName" width="120" />-->
|
||||
<el-table-column label="供应商名称" align="center" prop="supplierName" width="120" />
|
||||
<el-table-column label="状态" align="center" prop="status" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.stock_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="入库时间" align="center" prop="inDate" width="160">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.inDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>-->
|
||||
@@ -202,11 +207,11 @@
|
||||
|
||||
<script>
|
||||
import { listJob, cancelJob, completeJob } from "@/api/in/job"
|
||||
import { listJobdetail } from "@/api/in/jobdetail"
|
||||
import { listJobDetail } from "@/api/in/jobdetail"
|
||||
|
||||
export default {
|
||||
name: "Job",
|
||||
dicts: ['mydo_job_execution_phase', 'mydo_job_status'],
|
||||
dicts: ['mydo_job_execution_phase', 'mydo_job_status', 'stock_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@@ -321,7 +326,7 @@ export default {
|
||||
getJobDetailList() {
|
||||
if (!this.detailQueryParams.jobId) return
|
||||
this.detailLoading = true
|
||||
listJobdetail(this.detailQueryParams).then(response => {
|
||||
listJobDetail(this.detailQueryParams).then(response => {
|
||||
this.jobDetailList = response.rows || []
|
||||
this.detailTotal = response.total || 0
|
||||
this.detailLoading = false
|
||||
|
||||
Reference in New Issue
Block a user