新增明细 加判断条件
计数页面修改 散料入新增条件 出库单据接口 修改判断条件
This commit is contained in:
1 parent
4334683c6f
commit
1365920fee
15 files changed
+66
-32
No files matched your search
@@ -167,10 +167,22 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在重复的唯一码!");
|
||||
}
|
||||
// 判断唯一码是否已在库内
|
||||
var invList = _unitwork.Find<Inventory>(x => 1 == 1)
|
||||
.Select(x => x.UniqueCode)
|
||||
.ToList();
|
||||
if(invList.Intersect(detailList.Select(x => x.UniqueCode)).Count() > 0)
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在已在库内的唯一码!");
|
||||
}
|
||||
// 补充物料明细
|
||||
foreach(var item in detailList)
|
||||
foreach (var item in detailList)
|
||||
{
|
||||
var materialqr = _unitwork.FindSingle<MaterialQr>(x => x.UniqueCode.Equals(item.UniqueCode));
|
||||
if(materialqr == null)
|
||||
{
|
||||
return FFResult().Alert("新增明细中,存在不是WMS生成的唯一码!");
|
||||
}
|
||||
var material = _unitwork.FindSingle<Material>(x => x.QRCode.Equals(materialqr.QRCode));
|
||||
item.MaterialCode = material.MaterialCode;
|
||||
item.MaterialName = material.MaterialName;
|
||||
|
||||
@@ -46,8 +46,10 @@ public class ReceiptSLInController : BaseController
|
||||
&& x.Status != LocationStatus.任务锁
|
||||
&& x.Status != LocationStatus.满货
|
||||
&& x.Status != LocationStatus.空仓位
|
||||
&& x.IsStop == false
|
||||
&& x.Row == stations.First().Row)
|
||||
.OrderBy(x => x.Layer)
|
||||
.OrderBy(x => x.Status)
|
||||
.ThenBy(x => x.Layer)
|
||||
.ThenByDescending(x => x.Line)
|
||||
.FirstOrDefault();
|
||||
if (box == null && stations.Count == 2)
|
||||
@@ -55,8 +57,10 @@ public class ReceiptSLInController : BaseController
|
||||
&& x.Status != LocationStatus.任务锁
|
||||
&& x.Status != LocationStatus.满货
|
||||
&& x.Status != LocationStatus.空仓位
|
||||
&& x.IsStop == false
|
||||
&& x.Row == stations.Last().Row)
|
||||
.OrderBy(x => x.Layer)
|
||||
.OrderBy(x => x.Status)
|
||||
.ThenBy(x => x.Layer)
|
||||
.ThenByDescending(x => x.Line)
|
||||
.FirstOrDefault();
|
||||
|
||||
@@ -104,9 +108,9 @@ public class ReceiptSLInController : BaseController
|
||||
|
||||
if (box != null)
|
||||
{
|
||||
if (box.Type != LocationTypeEnum.散料库站台)
|
||||
if (string.IsNullOrEmpty(box.ContainerCode))
|
||||
{
|
||||
return JsonMore(null, 500, $"{boxCode}不在站台,无法入库!");
|
||||
return JsonMore(null, 500, $"{boxCode}站台没有料箱,无法入库!");
|
||||
}
|
||||
return JsonMore(null);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<script>
|
||||
var str = "";
|
||||
@{
|
||||
<text>str = @Model.Entity.ID; </text>
|
||||
<text>str = @Model.Entity.ID; </text>
|
||||
}
|
||||
|
||||
var app = new Vue({
|
||||
@@ -81,13 +81,14 @@ var app = new Vue({
|
||||
// 绑定
|
||||
onSubmit() {
|
||||
var _this = this;
|
||||
console.log(this.form);
|
||||
|
||||
var qty = _this.form.qty;
|
||||
if (qty == "")
|
||||
qty = _this.qtyPlaceholder;
|
||||
// 提交已绑定数据
|
||||
$.ajax({
|
||||
type: "post",
|
||||
dataType: "json",
|
||||
data: { code: str, uniqueCode: _this.form.uniqueCode, qty: _this.form.qty },
|
||||
data: { code: str, uniqueCode: _this.form.uniqueCode, qty: qty },
|
||||
url: "/receipt/ReceiptHeader/CountCommit",
|
||||
success: function (json) {
|
||||
if (json.Code == 200) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-form ref="form" :model="form" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="散料盒编码">
|
||||
<el-form-item label="散料盒编码" prop="code">
|
||||
<el-input v-model="form.code"
|
||||
placeholder="请扫描散料盒编码"
|
||||
@@change="scanBox">
|
||||
@@ -224,7 +224,7 @@
|
||||
// 重置
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
this.boxSize = [];
|
||||
this.form.code = "";
|
||||
this.bindingData = [];
|
||||
},
|
||||
// 选择尺寸后
|
||||
|
||||
@@ -123,7 +123,12 @@ public class ShipOutController : BaseController
|
||||
&& x.Type == LocationTypeEnum.散料库站台);
|
||||
if(station == null)
|
||||
{
|
||||
return JsonMore(null, 500, $"站台{boxCode}不存在,无法入库!");
|
||||
return JsonMore(null, 500, $"站台{boxCode}不存在,无法回库!");
|
||||
}
|
||||
//判断是否拣货完成
|
||||
if(_unitWork.IsExit<Inventory>(x => x.LocationCode.Equals(station.Code)))
|
||||
{
|
||||
return JsonMore(null, 500, $"站台{boxCode}存在未拣货物料,无法回库!");
|
||||
}
|
||||
// 判断箱号是否合理
|
||||
var box = _unitWork.FindSingle<Location>(x => x.ContainerCode.Equals(station.ContainerCode)
|
||||
|
||||
@@ -24,8 +24,10 @@ namespace HHWMS.Web
|
||||
try
|
||||
{
|
||||
var _unitwork = new UnitWork(Wtm);
|
||||
List<Inventory> inventories = _unitwork.Find<Inventory>(x => x.Status == "0").ToList();
|
||||
var Invs = inventories.Take(5).ToList();
|
||||
List<Inventory> inventories = _unitwork.Find<Inventory>(x => x.Status == "0"
|
||||
&& x.TaskStatus == InventoryTaskStatus.无任务)
|
||||
.ToList();
|
||||
var Invs = inventories.Take(20).ToList();
|
||||
|
||||
var bizData = new InStore
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace HHWMS.Web
|
||||
var _unitwork = new UnitWork(Wtm);
|
||||
|
||||
var PTask = _unitwork.Find<TaskHeader>(x =>x.TaskNo.Contains("PLoop")).Include(x => x.TaskDetails).ToList();
|
||||
var STask = _unitwork.Find<TaskHeader>(x => x.TaskNo.Contains("SLoop")).Include(x => x.TaskDetails).ToList();
|
||||
//var STask = _unitwork.Find<TaskHeader>(x => x.TaskNo.Contains("SLoop")).Include(x => x.TaskDetails).ToList();
|
||||
//没有盘料循环任务
|
||||
if (PTask.Count() == 0)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ namespace HHWMS.Web
|
||||
if (station != null && count > 0)
|
||||
{
|
||||
var container = _unitwork.Find<Location>(x => x.Row == station.Row && x.Type == LocationTypeEnum.盘料库位
|
||||
&& (x.Status == LocationStatus.有货 || x.Status == LocationStatus.空容器) && x.Length == Length && !x.IsStop && x.Height < inventory.Qty)
|
||||
&& (x.Status == LocationStatus.有货 || x.Status == LocationStatus.空容器) && x.Length == Length && !x.IsStop && x.Height < 1)
|
||||
.OrderBy(x => x.Height).FirstOrDefault();
|
||||
if (Length == 23 && container == null && station.Row == 3)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ namespace HHWMS.Web
|
||||
&& x.Status != LocationStatus.任务锁 && x.Row == 1).FirstOrDefault();
|
||||
|
||||
container = _unitwork.Find<Location>(x => x.Row == station.Row && x.Type == LocationTypeEnum.盘料库位
|
||||
&& (x.Status == LocationStatus.有货 || x.Status == LocationStatus.空容器) && x.Length == Length && !x.IsStop && x.Height < inventory.Qty)
|
||||
&& (x.Status == LocationStatus.有货 || x.Status == LocationStatus.空容器) && x.Length == Length && !x.IsStop && x.Height < 1)
|
||||
.OrderBy(x => x.Height).FirstOrDefault();
|
||||
}
|
||||
if (station != null && container != null)
|
||||
@@ -195,7 +195,7 @@ namespace HHWMS.Web
|
||||
var locCon = _unitwork.Find<Location>(x => x.Type == Inventory.ZoneCode
|
||||
&& (x.Status == LocationStatus.有货 || x.Status == LocationStatus.空容器)
|
||||
&& x.Length == Length
|
||||
&& x.Height < Inventory.Qty).Count();
|
||||
&& x.Height < 1).Count();
|
||||
if (locCon == 0)
|
||||
{
|
||||
Inventory.Qty += 1;
|
||||
@@ -269,7 +269,7 @@ namespace HHWMS.Web
|
||||
}
|
||||
}
|
||||
}
|
||||
if (STask.Count() ==0)
|
||||
/*if (STask.Count() ==0)
|
||||
{
|
||||
Location location = _unitwork.Find<Location>(x => x.Type == LocationTypeEnum.散料库站台 && !string.IsNullOrEmpty(x.ContainerCode)).FirstOrDefault();
|
||||
//创建入库任务
|
||||
@@ -327,7 +327,7 @@ namespace HHWMS.Web
|
||||
_unitwork.Add(task);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
#region 更新时间
|
||||
|
||||
var job = _unitwork.FindSingle<SysJob>(x => x.JobName == context.JobDetail.Key.Name);
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace HHWMS.Web
|
||||
}
|
||||
else if (task.TaskType == TaskTypeEnum.盘料出库)
|
||||
{
|
||||
//if(OutGenTask(task, _unitwork))
|
||||
// OutGenTask(task, _unitwork);
|
||||
count = task.TaskDetails.Where(x => x.Status <= TaskStatusEnum.待下发).Count();
|
||||
}
|
||||
else if (task.TaskType == TaskTypeEnum.散料盒出库)
|
||||
@@ -109,7 +109,7 @@ namespace HHWMS.Web
|
||||
}
|
||||
else
|
||||
{
|
||||
task.ErrorMsg += ",任务下发失败,失败原因:";
|
||||
task.ErrorMsg += $",任务下发失败,失败原因:{res.Msg}";
|
||||
_unitwork.Update(task);
|
||||
continue;
|
||||
}
|
||||
@@ -117,9 +117,9 @@ namespace HHWMS.Web
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
task.ErrorMsg += ex.Message;
|
||||
task.ErrorMsg += $"任务下发失败:{ex.Message}";
|
||||
}
|
||||
if (task.TaskDetails.Count(x => x.Status == TaskStatusEnum.新建) == 0 && (task.TaskType == TaskTypeEnum.盘料入库 || task.TaskType == TaskTypeEnum.盘料出库))
|
||||
if (task.TaskDetails.Count(x => x.Status == TaskStatusEnum.待下发) == 0 && (task.TaskType == TaskTypeEnum.盘料入库 || task.TaskType == TaskTypeEnum.盘料出库))
|
||||
{
|
||||
task.Status = TaskStatusEnum.已下发;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace HHWMS.Web
|
||||
return AllJob.FirstOrDefault(x => x.Value.ToString() == entity.JobName).Text;
|
||||
}),
|
||||
this.MakeGridHeader(x => x.JobGroup).SetHide(),
|
||||
this.MakeGridHeader(x => x.MethodName).SetHide(),
|
||||
this.MakeGridHeader(x => x.MethodName),
|
||||
this.MakeGridHeader(x => x.MethodParams).SetHide(),
|
||||
this.MakeGridHeader(x => x.CronExpression, 120),
|
||||
this.MakeGridHeader(x => x.LastFireTime, 150),
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
<wt:form vm="@Model">
|
||||
<wt:row items-per-row="ItemsPerRowEnum.Two">
|
||||
<wt:combobox field="Entity.JobName" disabled/>
|
||||
<wt:textbox field="Entity.JobName" disabled />
|
||||
<wt:textbox field="Entity.CronExpression" />
|
||||
<wt:textbox field="Entity.Remark" />
|
||||
</wt:row>
|
||||
|
||||
@@ -51,13 +51,13 @@ namespace HHWMS.Web
|
||||
{
|
||||
var data = ZoneCodes.FirstOrDefault(x => x.Value.ToString() == a.ZoneCode);
|
||||
return data?.Text ?? a.ZoneCode;
|
||||
}),
|
||||
}).SetWidth(150),
|
||||
this.MakeGridHeader(x => x.TaskNo)
|
||||
.SetFormat((a,b) =>
|
||||
{
|
||||
string rv = UIService.MakeScriptButton(ButtonTypesEnum.Link,a.TaskNo,$"details('{a.ID}')");
|
||||
return rv;
|
||||
}).SetWidth(150),
|
||||
}).SetWidth(220),
|
||||
this.MakeGridHeader(x => x.TaskType,150),
|
||||
this.MakeGridHeader(x => x.FromLocation,150),
|
||||
this.MakeGridHeader(x => x.ToLocation, 150),
|
||||
|
||||
@@ -77,7 +77,9 @@ namespace MESTOWMSService
|
||||
};
|
||||
foreach(var item in data.OUTWMS.OUTITEM)
|
||||
{
|
||||
var material = _unitwork.FindSingle<Material>(x => x.UniqueCode.Equals(item.SN));
|
||||
var materialqr = _unitwork.FindSingle<MaterialQr>(x => x.UniqueCode.Equals(item.SN));
|
||||
var material = _unitwork.FindSingle<Material>(x => x.QRCode.Equals(materialqr.QRCode));
|
||||
|
||||
var detail = new ShipmentDetail
|
||||
{
|
||||
UniqueCode = item.SN,
|
||||
|
||||
@@ -25,6 +25,10 @@ namespace HHWMS.Web.Models
|
||||
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
public string MaterialCode { get; set; }
|
||||
|
||||
[Display(Name = "Inventory.UniqueCode", Description = "唯一编码")]
|
||||
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
public string UniqueCode { get; set; }
|
||||
|
||||
[Display(Name = "Inventory.MaterialType", Description = "物料类型")]
|
||||
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
public string MaterialType { get; set; }
|
||||
@@ -64,11 +68,11 @@ namespace HHWMS.Web.Models
|
||||
|
||||
[Display(Name = "Receipt.CompletedQty", Description = "完成数量")]
|
||||
[Column(TypeName = "decimal(12,4)")]
|
||||
public decimal? CompletedQty { get; set; }
|
||||
public decimal? CompletedQty { get; set; } = Decimal.Zero;
|
||||
|
||||
[Display(Name = "Inventory.Qty", Description = "数量")]
|
||||
[Column(TypeName = "decimal(12,4)")]
|
||||
public decimal? Qty { get; set; }
|
||||
public decimal? Qty { get; set; } = Decimal.Zero;
|
||||
|
||||
[Display(Name = "Inventory.Status", Description = "物料状态")]
|
||||
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
|
||||
@@ -25,6 +25,10 @@ namespace HHWMS.Web.Models
|
||||
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
public string MaterialCode { get; set; }
|
||||
|
||||
[Display(Name = "Inventory.UniqueCode", Description = "唯一编码")]
|
||||
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
public string UniqueCode { get; set; }
|
||||
|
||||
[Display(Name = "Inventory.MaterialType", Description = "物料类型")]
|
||||
[StringLength(50, ErrorMessage = "Validate.{0}stringmax{1}")]
|
||||
public string MaterialType { get; set; }
|
||||
|
||||
Reference in new issue
Block a user