出库,散料 箱子回库逻辑

分解订单 排除入库锁定库存
This commit is contained in:
zgf committed 2023-11-25 12:49:11 +08:00
1 parent 1365920fee
commit 0269655891
5 files changed
+34 -16

No files matched your search

@@ -217,6 +217,10 @@ public class ReceiptSLInController : BaseController
{
return JsonMore(null, 500, $"站台{boxCode}不存在,无法入库!");
}
if (string.IsNullOrEmpty(station.ContainerCode))
{
return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!");
}
// 判断箱号是否合理
var box = _unitWork.FindSingle<Location>(x => x.ContainerCode.Equals(station.ContainerCode)
&& x.Type != LocationTypeEnum.散料库站台);
@@ -93,7 +93,7 @@ public class ShipOutController : BaseController
if (list.Count() == 0)
{
var Sation = _unitWork.Find<Location>(x => x.Code == station).FirstOrDefault();
if (Sation != null)
if (Sation != null && Sation.Type == "L")
{
Sation.ContainerCode = "";
Sation.Height = 0;
@@ -125,8 +125,12 @@ public class ShipOutController : BaseController
{
return JsonMore(null, 500, $"站台{boxCode}不存在,无法回库!");
}
if (string.IsNullOrEmpty(station.ContainerCode))
{
return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!");
}
//判断是否拣货完成
if(_unitWork.IsExit<Inventory>(x => x.LocationCode.Equals(station.Code)))
if (_unitWork.IsExit<Inventory>(x => x.LocationCode.Equals(station.Code)))
{
return JsonMore(null, 500, $"站台{boxCode}存在未拣货物料,无法回库!");
}
@@ -152,7 +156,7 @@ public class ShipOutController : BaseController
ZoneCode = ZoneCodeEnum.散料库,
TaskNo = _unitWork.GetSerialNumber("CIn"),
TaskType = TaskTypeEnum.散料盒入库,
ContainerCode = station.ContainerCode,
ContainerCode = toLocation.Code,
FromLocation = station.Code,
ToLocation = toLocation.Code,
Status = TaskStatusEnum.待下发,
@@ -39,7 +39,7 @@
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="唯一码" prop="uniqueCode">
<el-input v-model="form.uniqueCode" ref="uniqueCode"></el-input>
<el-input v-model="form.uniqueCode" ref="uniqueCode" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -67,7 +67,7 @@
</el-form-item>
</el-row>
<el-row v-show="form.type=='slbox'">
<el-row v-show="showBack">
<el-divider></el-divider>
<el-form-item style="float: right">
<el-button type="primary" @@click="back">回库</el-button>
@@ -98,8 +98,8 @@
{ label: "唯一码", value: "uniqueCode" },
],
invTable:[],
showTable: false
showTable: false,
showBack: false
};
},
methods: {
@@ -114,6 +114,10 @@
select(data) {
this.form.code = "";
this.form.type = data;
if (data == "slbox")
this.showBack = true;
else
this.showBack = fasle;
},
// 扫描料塔站台号
scanCode(data) {
@@ -87,9 +87,15 @@ namespace HHWMS.Web
_unitwork.Update(shipment);
}
var inTaskContainerList = _unitwork.Find<TaskHeader>(x => x.TaskType == TaskTypeEnum.盘料盒入库
|| x.TaskType == TaskTypeEnum.盘料入库
|| x.TaskType == TaskTypeEnum.散料盒入库)
.Select(x => x.ContainerCode)
.ToList();
//出库库存通过托盘号分组
var lockInvs = _unitwork.Find<Inventory>(x => x.TaskStatus == InventoryTaskStatus.任务中
&& !"L01,L02".Contains(x.ContainerCode))
&& !"L01,L02".Contains(x.LocationCode)
&& !inTaskContainerList.Contains(x.LocationCode))
.ToList();
shiInventorys.AddRange(lockInvs);
//已生成任务的库存不再生成任务
@@ -281,7 +287,7 @@ namespace HHWMS.Web
_unitwork.Update(tLoc);
_unitwork.Update(containerTask);
}
else
else if (tLoc != null)
{
task.ZoneCode = ZoneCodeEnum.盘料库;
task.TaskNo = _unitwork.GetSerialNumber("pout", 4);
+7 -7
View File
@@ -27,18 +27,18 @@
// "Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;",
// "DBType": "mysql"
//}
//{
// "Key": "default",
// "Value": "Data Source=.;Initial Catalog=8357wms;User=sa;Password=abc123*;Persist Security Info=True",
// "DbContext": "DataContext",
// "DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle
//}
{
"Key": "default",
"Value": "Data Source=10.18.106.4;Initial Catalog=8357wms;User=wms;Password=abc123*;Persist Security Info=True",
"Value": "Data Source=.;Initial Catalog=8357wms;User=sa;Password=abc123*;Persist Security Info=True",
"DbContext": "DataContext",
"DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle
}
//{
// "Key": "default",
// "Value": "Data Source=10.18.106.4;Initial Catalog=8357wms;User=wms;Password=abc123*;Persist Security Info=True",
// "DbContext": "DataContext",
// "DBType": "sqlserver" //DataBase, you can choose mysql,sqlserver,pgsql,sqlite,oracle
//}
],
"CookiePre": "HHWMS", //cookie前缀
"IsQuickDebug": true, //是否启用debug模式