点数查询新建状态
散料,盘料取消统一状态检查 货架入,bindingdata 新增id,后台根据id判断单据明细状态
This commit is contained in:
parent
0d346bd155
commit
ec33bdf946
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,6 @@
|
||||
# wtm custom
|
||||
.DS_Store
|
||||
Desktop.ini
|
||||
|
||||
demo/WalkingTec.Mvvm.Demo/wwwroot/layuiadminsrc
|
||||
.Publish/
|
||||
|
||||
@ -267,7 +267,8 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
return JsonMore(null, 500, $"数量必须大于0!");
|
||||
}
|
||||
var receiptDetail = _unitwork.FindSingle<ReceiptDetail>(x => x.UniqueCode.Equals(uniqueCode));
|
||||
var receiptDetail = _unitwork.FindSingle<ReceiptDetail>(x => x.UniqueCode.Equals(uniqueCode)
|
||||
&& x.ReceiptHeaderId.ToString() == code);
|
||||
if (receiptDetail != null)
|
||||
{
|
||||
receiptDetail.Qty = qty;
|
||||
|
||||
@ -148,7 +148,8 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
return JsonMore(null, 500, "周转箱存在未捡货任务,请捡货完成后再执行入库操作!");
|
||||
}
|
||||
//单据明细验证
|
||||
/*
|
||||
//单据明细验证
|
||||
var errDetails = _unitWork.Find<ReceiptDetail>(x => data.Select(x => x.UniqueCode).ToList()
|
||||
.Contains(x.UniqueCode)
|
||||
&& x.Status != ReceiptStatusEnum.新建).ToList();
|
||||
@ -160,7 +161,7 @@ namespace HHWMS.Web.Controllers
|
||||
msg += $"{errDetail.UniqueCode}\n";
|
||||
}
|
||||
return JsonMore(null, 500, msg);
|
||||
}
|
||||
}*/
|
||||
|
||||
var receiptHeaderList = _unitWork.Find<ReceiptHeader>(x =>
|
||||
data.Select(x => x.ReceiptCode).ToList().Contains(x.Code))
|
||||
|
||||
@ -159,7 +159,8 @@ public class ReceiptSLInController : BaseController
|
||||
{
|
||||
try
|
||||
{
|
||||
var errDetails = _unitWork.Find<ReceiptDetail>(x => data.Select(x => x.UniqueCode).ToList()
|
||||
/*
|
||||
var errDetails = _unitWork.Find<ReceiptDetail>(x => data.Select(x => x.UniqueCode).ToList()
|
||||
.Contains(x.UniqueCode)
|
||||
&& x.Status != ReceiptStatusEnum.新建).ToList();
|
||||
if (errDetails.Any())
|
||||
@ -171,6 +172,7 @@ public class ReceiptSLInController : BaseController
|
||||
}
|
||||
return JsonMore(null, 500, msg);
|
||||
}
|
||||
*/
|
||||
|
||||
// 查找明细,修改对应状态,并且 绑定物料周转箱
|
||||
foreach (Binding item in data.OrderBy(x => x.ReceiptCode))
|
||||
|
||||
@ -73,9 +73,9 @@ public class ReceiptShelfInController : BaseController
|
||||
{
|
||||
try
|
||||
{
|
||||
var errDetails = _unitWork.Find<ReceiptDetail>(x => data.Select(x => x.UniqueCode).ToList()
|
||||
.Contains(x.UniqueCode)
|
||||
&& x.Status != ReceiptStatusEnum.新建).ToList();
|
||||
var errDetails = _unitWork.Find<ReceiptDetail>(x =>
|
||||
data.Select(y => y.ID).ToList().Contains(x.ID)
|
||||
&& x.Status != ReceiptStatusEnum.新建).ToList();
|
||||
if (errDetails.Any())
|
||||
{
|
||||
var msg = "以下明细不是新建状态:\n";
|
||||
|
||||
@ -185,6 +185,7 @@
|
||||
} else {
|
||||
// 3.已扫描增加
|
||||
_this.bindingData.push({
|
||||
id:json.Data.ID,
|
||||
receiptCode: json.Data.ReceiptHeaderId,
|
||||
uniqueCode: json.Data.UniqueCode,
|
||||
materialCode: json.Data.MaterialCode,
|
||||
|
||||
@ -66,6 +66,7 @@ namespace HHWMS.Web
|
||||
if (count > 0)
|
||||
{
|
||||
var taskList = CreateWCSTask(task, _unitwork);
|
||||
|
||||
foreach (var item in taskList)
|
||||
{
|
||||
task.ErrorMsg += JsonConvert.SerializeObject(item);
|
||||
@ -75,7 +76,7 @@ namespace HHWMS.Web
|
||||
var res = Wtm.CallAPI<ApiJsonResult<dynamic>>("WCS", "TaskAssign", HttpMethodEnum.POST, item).Result.Data;
|
||||
//if (true)
|
||||
if (res.Success)
|
||||
{
|
||||
{
|
||||
var locationList = _unitwork.Find<Location>(x => task.FromLocation.Equals(x.Code) || task.ToLocation.Equals(x.Code)).ToList();
|
||||
var begin = locationList.FirstOrDefault(x => x.Code.Equals(task.FromLocation));
|
||||
var end = locationList.FirstOrDefault(x => x.Code.Equals(task.ToLocation));
|
||||
@ -147,7 +148,9 @@ namespace HHWMS.Web
|
||||
Wtm.DoLog("任务下发", ActionLogTypesEnum.Job, "SendWcsJob");
|
||||
#endregion 更新时间
|
||||
}
|
||||
catch { }
|
||||
catch(Exception ex) {
|
||||
Wtm.DoLog(ex.Message, ActionLogTypesEnum.Job, "SendWcsJob");
|
||||
}
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
/// <summary>
|
||||
@ -383,6 +386,7 @@ namespace HHWMS.Web
|
||||
var locationList = _unitwork.Find<Location>(x => task.FromLocation.Equals(x.Code)
|
||||
|| task.ToLocation.Equals(x.Code)
|
||||
|| "G1,G2,T".Contains(x.Type)).ToList();
|
||||
|
||||
var begin = locationList.FirstOrDefault(x => x.Code.Equals(task.FromLocation));
|
||||
var end = locationList.FirstOrDefault(x => x.Code.Equals(task.ToLocation));
|
||||
// 根据不同任务类型 创建任务
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user