|
|
|
|
@ -19,6 +19,7 @@ using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
|
using Microsoft.IdentityModel.Tokens;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using SixLabors.ImageSharp.Drawing;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Collections.ObjectModel;
|
|
|
|
|
@ -481,7 +482,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
saleOrderId = t.Key.saleOrderId,
|
|
|
|
|
thisOutAmount = t.Sum(x => x.totalAmount) - t.Sum(x => x.frozenAmount)
|
|
|
|
|
});
|
|
|
|
|
List<WmsRawReturn> endStationCodeOutRaw = wmsRawReturns.Where(t => t.endStationCode == baseEquip.endStationCode).ToList();
|
|
|
|
|
List<WmsRawReturn> endStationCodeOutRaw = wmsRawReturns.Where(t => baseEquip.endStationCode.Contains(t.endStationCode)).ToList();
|
|
|
|
|
List<long?> materialIds = endStationCodeOutRaw.Select(t => t.materialId).ToList();
|
|
|
|
|
List<MesBaseMaterialInfo> mesBaseMaterialInfos = dbContext.MesBaseMaterialInfo.Where(t => materialIds.Contains(t.MaterialId)).ToList();
|
|
|
|
|
var bill = endStationCodeOutRaw.GroupBy(t => new { t.materialId })
|
|
|
|
|
@ -550,10 +551,10 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
this.OutEndStations.ItemsSource = null;
|
|
|
|
|
this.OutEndStations.Items.Clear();
|
|
|
|
|
this.OutEndStations.ItemsSource = list.Distinct().Select(t => new
|
|
|
|
|
this.OutEndStations.ItemsSource = list.Distinct().OrderBy(t => t).Select(t => new
|
|
|
|
|
{
|
|
|
|
|
EndStationName = t,
|
|
|
|
|
ForeColor = baseEquip.endStationCode == null ? Brushes.Black : baseEquip.endStationCode.Contains(t) ? Brushes.Green : Brushes.Black
|
|
|
|
|
ForeColor = baseEquip.endStationCode == null ? Brushes.Black : baseEquip.endStationCode.Contains(t) ? Brushes.Red : Brushes.Black
|
|
|
|
|
});
|
|
|
|
|
this.OutEndStations.Items.Refresh();
|
|
|
|
|
});
|
|
|
|
|
@ -1566,32 +1567,37 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
if (count > 0)
|
|
|
|
|
{
|
|
|
|
|
MessageBoxResult messageBoxResult1 = HandyControl.Controls.MessageBox.Show("是否需要背负式小车返回?", "提示信息", MessageBoxButton.YesNoCancel, MessageBoxImage.Information);
|
|
|
|
|
MessageBoxResult messageBoxResult1 = HandyControl.Controls.MessageBox.Show("本次出库任务是否捡料完成?", "提示信息", MessageBoxButton.YesNo, MessageBoxImage.Information);
|
|
|
|
|
if (messageBoxResult1 == MessageBoxResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
BaseEquip baseEquip = dbContext.BaseEquip.Where(t => t.objid == 10).First();
|
|
|
|
|
List<string>? list = JsonConvert.DeserializeObject<List<string>>(baseEquip.endStationCode);
|
|
|
|
|
new SelectOutRawForm(_host, "", 3, list).ShowDialog();
|
|
|
|
|
if (string.IsNullOrEmpty(SelectOutRawForm.StationCode))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
BaseEquip endEquip = dbContext.BaseEquip.First(t => t.equipNo == SelectOutRawForm.StationCode);
|
|
|
|
|
WcsTask wcsTask = CoreMapper.Map<WcsTask>(wcsCmd);
|
|
|
|
|
wcsTask.taskStatus = 0;
|
|
|
|
|
wcsTask.createTime = DateTime.Now;
|
|
|
|
|
wcsTask.useFlag = 1;
|
|
|
|
|
wcsTask.objid = Global.SnowId.NextId();
|
|
|
|
|
wcsTask.endPointId = endEquip.objid;
|
|
|
|
|
wcsTask.endPointNo = endEquip.equipNo;
|
|
|
|
|
WcsTaskLog wcsTaskLog = CoreMapper.Map<WcsTaskLog>(wcsTask);
|
|
|
|
|
dbContext.Add(wcsTaskLog);
|
|
|
|
|
dbContext.Add(wcsTask);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
//MessageBoxResult messageBoxResult1 = HandyControl.Controls.MessageBox.Show("是否需要背负式小车返回?", "提示信息", MessageBoxButton.YesNoCancel, MessageBoxImage.Information);
|
|
|
|
|
//if (messageBoxResult1 == MessageBoxResult.Yes)
|
|
|
|
|
//{
|
|
|
|
|
// BaseEquip baseEquip = dbContext.BaseEquip.Where(t => t.objid == 10).First();
|
|
|
|
|
// List<string>? list = JsonConvert.DeserializeObject<List<string>>(baseEquip.endStationCode);
|
|
|
|
|
// new SelectOutRawForm(_host, "", 3, list).ShowDialog();
|
|
|
|
|
// if (string.IsNullOrEmpty(SelectOutRawForm.StationCode))
|
|
|
|
|
// {
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// BaseEquip endEquip = dbContext.BaseEquip.First(t => t.equipNo == SelectOutRawForm.StationCode);
|
|
|
|
|
// WcsTask wcsTask = CoreMapper.Map<WcsTask>(wcsCmd);
|
|
|
|
|
// wcsTask.taskStatus = 0;
|
|
|
|
|
// wcsTask.createTime = DateTime.Now;
|
|
|
|
|
// wcsTask.useFlag = 1;
|
|
|
|
|
// wcsTask.objid = Global.SnowId.NextId();
|
|
|
|
|
// wcsTask.endPointId = endEquip.objid;
|
|
|
|
|
// wcsTask.endPointNo = endEquip.equipNo;
|
|
|
|
|
// WcsTaskLog wcsTaskLog = CoreMapper.Map<WcsTaskLog>(wcsTask);
|
|
|
|
|
// dbContext.Add(wcsTaskLog);
|
|
|
|
|
// dbContext.Add(wcsTask);
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
{
|
|
|
|
|
BaseEquip baseEquip = dbContext.BaseEquip.First(t => t.objid == 10);
|
|
|
|
|
baseEquip.endStationCode = string.Empty;
|
|
|
|
|
@ -1608,7 +1614,6 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
baseEquip.ud3 = null;
|
|
|
|
|
dbContext.Update(baseEquip);
|
|
|
|
|
dbContext.SaveChanges();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (wcsCmd.taskStatus == 3)
|
|
|
|
|
@ -2688,193 +2693,186 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
using var scope = _host.Services.CreateScope();
|
|
|
|
|
using var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
|
|
|
|
|
var wmsRawStock = dbContext.WmsRawStock
|
|
|
|
|
.FirstOrDefault(t => t.instockBatch == txtOutBarCode.Text && t.palletInfoCode == txtOutBox.Text);
|
|
|
|
|
if (wmsRawStock == null)
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "库存已经被清空!";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
decimal outScan = Convert.ToDecimal(this.txtOutScan.Text);
|
|
|
|
|
if (outScan > wmsRawStock.totalAmount - wmsRawStock.frozenAmount)
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "出库数量不能大于库存数量!";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
BaseEquip baseEquip = dbContext.BaseEquip.First(t => t.objid == 10);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(txtOutBox.Text) && !string.IsNullOrEmpty(txtOutBarCode.Text))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var wmsRawStock = dbContext.WmsRawStock
|
|
|
|
|
.FirstOrDefault(t => t.instockBatch == txtOutBarCode.Text && t.palletInfoCode == txtOutBox.Text);
|
|
|
|
|
if (wmsRawStock == null)
|
|
|
|
|
var mesBaseBarcodeInfo = dbContext.MesBaseBarcodeInfo.FirstOrDefault(t => t.barcodeInfo == txtOutBarCode.Text);
|
|
|
|
|
if (mesBaseBarcodeInfo != null)
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "库存已经被清空!";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
decimal outScan = Convert.ToDecimal(this.txtOutScan.Text);
|
|
|
|
|
if (outScan > wmsRawStock.totalAmount - wmsRawStock.frozenAmount)
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "出库数量不能大于库存数量!";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var wcsTask = dbContext.WcsTask.Where(t => t.containerNo == txtOutBox.Text).FirstOrDefault();
|
|
|
|
|
if (wcsTask == null)
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "出库失败,非CTU出库任务,无法出库!";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var mesBaseBarcodeInfo = dbContext.MesBaseBarcodeInfo.FirstOrDefault(t => t.barcodeInfo == txtOutBarCode.Text);
|
|
|
|
|
if (mesBaseBarcodeInfo != null)
|
|
|
|
|
var list = JsonConvert.DeserializeObject<List<string>>(baseEquip.endStationCode);
|
|
|
|
|
var wmsRawOutstocks = dbContext.WmsRawOutstock
|
|
|
|
|
.Where(t => t.materialId == mesBaseBarcodeInfo.materialId && t.realOutstockAmount < t.outstockAmount && t.saleOrderId == (mesBaseBarcodeInfo.saleOrderId == null ? 0 : mesBaseBarcodeInfo.saleOrderId) && baseEquip.endStationCode.Contains(t.endStationCode))
|
|
|
|
|
.ToList();
|
|
|
|
|
if (wmsRawOutstocks.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
WmsRawOutstock? wmsRawOutstock = dbContext.WmsRawOutstock
|
|
|
|
|
.Where(t => t.materialId == mesBaseBarcodeInfo.materialId && t.realOutstockAmount < t.outstockAmount && t.saleOrderId == (mesBaseBarcodeInfo.saleOrderId == null ? 0 : mesBaseBarcodeInfo.saleOrderId) && t.endStationCode == baseEquip.endStationCode).FirstOrDefault();
|
|
|
|
|
if (wmsRawOutstock != null)
|
|
|
|
|
int index = 0;
|
|
|
|
|
var sort = list.Select(t => new
|
|
|
|
|
{
|
|
|
|
|
wmsRawOutstock.realOutstockAmount += outScan;
|
|
|
|
|
if (wmsRawOutstock.outstockAmount == wmsRawOutstock.realOutstockAmount)
|
|
|
|
|
stationCode = t,
|
|
|
|
|
index = index++
|
|
|
|
|
});
|
|
|
|
|
wmsRawOutstocks = wmsRawOutstocks.OrderBy(t => sort.FirstOrDefault(s => s.stationCode == t.endStationCode) != null ? sort.FirstOrDefault(s => s.stationCode == t.endStationCode).index : 99).ToList();
|
|
|
|
|
decimal? sum = wmsRawOutstocks.Sum(t => (t.outstockAmount - t.realOutstockAmount));
|
|
|
|
|
if (outScan > sum)
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "出库数量不能大于当前出库的订单的数量";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
foreach (var item in wmsRawOutstocks)
|
|
|
|
|
{
|
|
|
|
|
decimal outAmount = 0;
|
|
|
|
|
if (item.outstockAmount - item.realOutstockAmount > outScan)
|
|
|
|
|
{
|
|
|
|
|
wmsRawOutstock.executeStatus = "2";
|
|
|
|
|
item.realOutstockAmount += outScan;
|
|
|
|
|
outAmount += outScan;
|
|
|
|
|
}
|
|
|
|
|
else if (wmsRawOutstock.realOutstockAmount > wmsRawOutstock.outstockAmount)
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "出库数量不能大于申请单数量,当前出库数量为:" + (wmsRawOutstock.realOutstockAmount - outScan) + ",申请单数量为:" + wmsRawOutstock.outstockAmount + "!";
|
|
|
|
|
return;
|
|
|
|
|
outScan -= (item.outstockAmount - item.realOutstockAmount.Value);
|
|
|
|
|
outAmount = item.outstockAmount - item.realOutstockAmount.Value;
|
|
|
|
|
item.realOutstockAmount = item.outstockAmount;
|
|
|
|
|
item.executeStatus = "2";
|
|
|
|
|
item.endTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
wmsRawStock.totalAmount -= outScan;
|
|
|
|
|
if (wmsRawStock.totalAmount <= 0)
|
|
|
|
|
{
|
|
|
|
|
dbContext.Remove(wmsRawStock);
|
|
|
|
|
dbContext.Update(wmsRawOutstock);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dbContext.Update(wmsRawStock);
|
|
|
|
|
dbContext.Update(wmsRawOutstock);
|
|
|
|
|
}
|
|
|
|
|
if (mesBaseBarcodeInfo != null)
|
|
|
|
|
wmsRawStock.totalAmount -= outAmount;
|
|
|
|
|
if (wmsRawStock.totalAmount == 0)
|
|
|
|
|
{
|
|
|
|
|
WmsRawOutstockDetail wmsProductOutstockDetail = new WmsRawOutstockDetail()
|
|
|
|
|
{
|
|
|
|
|
rawOutstockDetailId = Global.SnowId.NextId(),
|
|
|
|
|
rawOutstockId = wmsRawOutstock.rawOutstockId,
|
|
|
|
|
materialId = mesBaseBarcodeInfo.materialId,
|
|
|
|
|
createDate = DateTime.Now,
|
|
|
|
|
createBy = "WCS",
|
|
|
|
|
taskCode = wcsTask.objid.ToString(),
|
|
|
|
|
executeStatus = "2",
|
|
|
|
|
locationCode = wcsTask.currPointNo,
|
|
|
|
|
outstockAmount = outScan,
|
|
|
|
|
planAmount = outScan,
|
|
|
|
|
warehouseId = 512,
|
|
|
|
|
materialBarcode = mesBaseBarcodeInfo.barcodeInfo,
|
|
|
|
|
instockBatch = mesBaseBarcodeInfo.batchCode,
|
|
|
|
|
stackAmount = outScan,
|
|
|
|
|
outstockPerson = "WCS",
|
|
|
|
|
outstockTime = DateTime.Now,
|
|
|
|
|
outstockWay = "2",
|
|
|
|
|
materialProductionDate = mesBaseBarcodeInfo.productionDate
|
|
|
|
|
};
|
|
|
|
|
dbContext.WmsRawOutstockDetail.Add(wmsProductOutstockDetail);
|
|
|
|
|
dbContext.WmsRawStock.Remove(wmsRawStock);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dbContext.WmsRawStock.Update(wmsRawStock);
|
|
|
|
|
}
|
|
|
|
|
WmsRawOutstockDetail wmsProductOutstockDetail = new WmsRawOutstockDetail()
|
|
|
|
|
{
|
|
|
|
|
rawOutstockDetailId = Global.SnowId.NextId(),
|
|
|
|
|
rawOutstockId = item.rawOutstockId,
|
|
|
|
|
materialId = mesBaseBarcodeInfo.materialId,
|
|
|
|
|
createDate = DateTime.Now,
|
|
|
|
|
createBy = "WCS",
|
|
|
|
|
executeStatus = "2",
|
|
|
|
|
locationCode = wmsRawStock.locationCode,
|
|
|
|
|
outstockAmount = outScan,
|
|
|
|
|
planAmount = item.outstockAmount,
|
|
|
|
|
warehouseId = 512,
|
|
|
|
|
materialBarcode = mesBaseBarcodeInfo.barcodeInfo,
|
|
|
|
|
instockBatch = mesBaseBarcodeInfo.batchCode,
|
|
|
|
|
stackAmount = mesBaseBarcodeInfo.batchFlag == "1" ? mesBaseBarcodeInfo.amount : 1,
|
|
|
|
|
outstockPerson = "WCS",
|
|
|
|
|
outstockTime = DateTime.Now,
|
|
|
|
|
outstockWay = "2",
|
|
|
|
|
materialProductionDate = mesBaseBarcodeInfo.productionDate
|
|
|
|
|
};
|
|
|
|
|
dbContext.Add(wmsProductOutstockDetail);
|
|
|
|
|
dbContext.Update(item);
|
|
|
|
|
dbContext.SaveChanges();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (wmsRawStock.safeFlag != "1")
|
|
|
|
|
{
|
|
|
|
|
// 没有申请单
|
|
|
|
|
// 如果选中了出库单,并且无需要出库的申请单,则禁止出库
|
|
|
|
|
|
|
|
|
|
//if (!string.IsNullOrEmpty(baseEquip.endStationCode))
|
|
|
|
|
//{
|
|
|
|
|
// scanOutMsg.Text = "申请单里该条码无需出库!";
|
|
|
|
|
// return;
|
|
|
|
|
//}
|
|
|
|
|
if (wmsRawStock.safeFlag != "1")
|
|
|
|
|
scanOutMsg.Text = "该条码不是安全库存,且无申请单,禁止出库!";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (mesBaseBarcodeInfo.PurchaseOrderId == null)
|
|
|
|
|
{
|
|
|
|
|
wmsRawStock.totalAmount -= outScan;
|
|
|
|
|
if (wmsRawStock.totalAmount == 0)
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "该条码不是安全库存,且无申请单,禁止出库!";
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (mesBaseBarcodeInfo.PurchaseOrderId == null)
|
|
|
|
|
{
|
|
|
|
|
wmsRawStock.totalAmount -= outScan;
|
|
|
|
|
if (wmsRawStock.totalAmount == 0)
|
|
|
|
|
{
|
|
|
|
|
dbContext.WmsRawStock.Remove(wmsRawStock);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
dbContext.WmsRawStock.Update(wmsRawStock);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#region 插入rawOutstock
|
|
|
|
|
string timeStamp = DateTime.Now.ToString("yyyyMMddHHmmss");
|
|
|
|
|
WmsRawOutstock newWmsRawOutstock = new WmsRawOutstock();
|
|
|
|
|
newWmsRawOutstock.taskCode = timeStamp + "CTU" + Random.Shared.Next(10, 99);
|
|
|
|
|
newWmsRawOutstock.warehouseId = 512;
|
|
|
|
|
newWmsRawOutstock.locationCode = wcsTask.currPointNo;
|
|
|
|
|
newWmsRawOutstock.stationId = 512;
|
|
|
|
|
newWmsRawOutstock.materialId = mesBaseBarcodeInfo.materialId;
|
|
|
|
|
newWmsRawOutstock.materialBatch = mesBaseBarcodeInfo.barcodeInfo;
|
|
|
|
|
newWmsRawOutstock.palletInfoCode = wcsTask.containerNo;
|
|
|
|
|
newWmsRawOutstock.outstockAmount = outScan;
|
|
|
|
|
newWmsRawOutstock.realOutstockAmount = outScan;
|
|
|
|
|
newWmsRawOutstock.operationType = "1";
|
|
|
|
|
newWmsRawOutstock.taskType = "1";
|
|
|
|
|
newWmsRawOutstock.auditStatus = "1";
|
|
|
|
|
newWmsRawOutstock.applyBy = "CtuGun";
|
|
|
|
|
newWmsRawOutstock.applyDate = DateTime.Now;
|
|
|
|
|
newWmsRawOutstock.executeStatus = "2";
|
|
|
|
|
newWmsRawOutstock.saleOrderId = mesBaseBarcodeInfo.saleOrderId;
|
|
|
|
|
newWmsRawOutstock.updateDate = DateTime.Now;
|
|
|
|
|
newWmsRawOutstock.beginTime = DateTime.Now;
|
|
|
|
|
newWmsRawOutstock.endTime = DateTime.Now;
|
|
|
|
|
dbContext.WmsRawOutstock.Add(newWmsRawOutstock);
|
|
|
|
|
dbContext.SaveChanges();
|
|
|
|
|
#endregion
|
|
|
|
|
//if (mesBaseBarcodeInfo != null)
|
|
|
|
|
//{
|
|
|
|
|
// WmsRawOutstockDetail wmsProductOutstockDetail = new WmsRawOutstockDetail()
|
|
|
|
|
// {
|
|
|
|
|
// rawOutstockDetailId = Global.SnowId.NextId(),
|
|
|
|
|
// rawOutstockId = 0,
|
|
|
|
|
// materialId = mesBaseBarcodeInfo.materialId,
|
|
|
|
|
// createDate = DateTime.Now,
|
|
|
|
|
// createBy = "WCS",
|
|
|
|
|
// taskCode = wcsTask.objid.ToString(),
|
|
|
|
|
// executeStatus = "2",
|
|
|
|
|
// locationCode = wcsTask.currPointNo,
|
|
|
|
|
// outstockAmount = outScan,
|
|
|
|
|
// planAmount = outScan,
|
|
|
|
|
// warehouseId = 512,
|
|
|
|
|
// materialBarcode = mesBaseBarcodeInfo.barcodeInfo,
|
|
|
|
|
// instockBatch = mesBaseBarcodeInfo.batchCode,
|
|
|
|
|
// stackAmount = outScan,
|
|
|
|
|
// outstockPerson = "WCS",
|
|
|
|
|
// outstockTime = DateTime.Now,
|
|
|
|
|
// outstockWay = "2",
|
|
|
|
|
// materialProductionDate = mesBaseBarcodeInfo.productionDate
|
|
|
|
|
// };
|
|
|
|
|
// dbContext.WmsRawOutstockDetail.Add(wmsProductOutstockDetail);
|
|
|
|
|
//}
|
|
|
|
|
// dbContext.SaveChanges();
|
|
|
|
|
dbContext.WmsRawStock.Remove(wmsRawStock);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "该条码的销售订单不正确";
|
|
|
|
|
txtOutScan.Text = string.Empty;
|
|
|
|
|
txtOutBarCode.Text = string.Empty;
|
|
|
|
|
outMaterialSpecTxt.Text = string.Empty;
|
|
|
|
|
outMaterialNameTxt.Text = string.Empty;
|
|
|
|
|
txtOutBox.Text = string.Empty;
|
|
|
|
|
txtOutBox.Focus();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
dbContext.WmsRawStock.Update(wmsRawStock);
|
|
|
|
|
|
|
|
|
|
scanOutMsg.Text = "出库成功!";
|
|
|
|
|
txtOutScan.Text = string.Empty;
|
|
|
|
|
txtOutBarCode.Text = string.Empty;
|
|
|
|
|
outMaterialSpecTxt.Text = string.Empty;
|
|
|
|
|
outMaterialNameTxt.Text = string.Empty;
|
|
|
|
|
txtOutBox.Text = string.Empty;
|
|
|
|
|
txtOutBox.Focus();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "未查询到该条码信息!";
|
|
|
|
|
}
|
|
|
|
|
#region 插入rawOutstock
|
|
|
|
|
string timeStamp = DateTime.Now.ToString("yyyyMMddHHmmss");
|
|
|
|
|
WmsRawOutstock newWmsRawOutstock = new WmsRawOutstock();
|
|
|
|
|
newWmsRawOutstock.taskCode = timeStamp + "CTU" + Random.Shared.Next(10, 99);
|
|
|
|
|
newWmsRawOutstock.warehouseId = 512;
|
|
|
|
|
newWmsRawOutstock.locationCode = wmsRawStock.locationCode;
|
|
|
|
|
newWmsRawOutstock.stationId = 512;
|
|
|
|
|
newWmsRawOutstock.materialId = mesBaseBarcodeInfo.materialId;
|
|
|
|
|
newWmsRawOutstock.materialBatch = mesBaseBarcodeInfo.barcodeInfo;
|
|
|
|
|
newWmsRawOutstock.palletInfoCode = wmsRawStock.palletInfoCode;
|
|
|
|
|
newWmsRawOutstock.outstockAmount = outScan;
|
|
|
|
|
newWmsRawOutstock.realOutstockAmount = outScan;
|
|
|
|
|
newWmsRawOutstock.operationType = "1";
|
|
|
|
|
newWmsRawOutstock.taskType = "1";
|
|
|
|
|
newWmsRawOutstock.auditStatus = "1";
|
|
|
|
|
newWmsRawOutstock.applyBy = "CtuGun";
|
|
|
|
|
newWmsRawOutstock.applyDate = DateTime.Now;
|
|
|
|
|
newWmsRawOutstock.executeStatus = "2";
|
|
|
|
|
newWmsRawOutstock.saleOrderId = mesBaseBarcodeInfo.saleOrderId;
|
|
|
|
|
newWmsRawOutstock.updateDate = DateTime.Now;
|
|
|
|
|
newWmsRawOutstock.beginTime = DateTime.Now;
|
|
|
|
|
newWmsRawOutstock.endTime = DateTime.Now;
|
|
|
|
|
dbContext.WmsRawOutstock.Add(newWmsRawOutstock);
|
|
|
|
|
dbContext.SaveChanges();
|
|
|
|
|
#endregion
|
|
|
|
|
//if (mesBaseBarcodeInfo != null)
|
|
|
|
|
//{
|
|
|
|
|
// WmsRawOutstockDetail wmsProductOutstockDetail = new WmsRawOutstockDetail()
|
|
|
|
|
// {
|
|
|
|
|
// rawOutstockDetailId = Global.SnowId.NextId(),
|
|
|
|
|
// rawOutstockId = 0,
|
|
|
|
|
// materialId = mesBaseBarcodeInfo.materialId,
|
|
|
|
|
// createDate = DateTime.Now,
|
|
|
|
|
// createBy = "WCS",
|
|
|
|
|
// taskCode = wcsTask.objid.ToString(),
|
|
|
|
|
// executeStatus = "2",
|
|
|
|
|
// locationCode = wcsTask.currPointNo,
|
|
|
|
|
// outstockAmount = outScan,
|
|
|
|
|
// planAmount = outScan,
|
|
|
|
|
// warehouseId = 512,
|
|
|
|
|
// materialBarcode = mesBaseBarcodeInfo.barcodeInfo,
|
|
|
|
|
// instockBatch = mesBaseBarcodeInfo.batchCode,
|
|
|
|
|
// stackAmount = outScan,
|
|
|
|
|
// outstockPerson = "WCS",
|
|
|
|
|
// outstockTime = DateTime.Now,
|
|
|
|
|
// outstockWay = "2",
|
|
|
|
|
// materialProductionDate = mesBaseBarcodeInfo.productionDate
|
|
|
|
|
// };
|
|
|
|
|
// dbContext.WmsRawOutstockDetail.Add(wmsProductOutstockDetail);
|
|
|
|
|
//}
|
|
|
|
|
// dbContext.SaveChanges();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "该条码的销售订单不正确";
|
|
|
|
|
txtOutScan.Text = string.Empty;
|
|
|
|
|
txtOutBarCode.Text = string.Empty;
|
|
|
|
|
outMaterialSpecTxt.Text = string.Empty;
|
|
|
|
|
outMaterialNameTxt.Text = string.Empty;
|
|
|
|
|
txtOutBox.Text = string.Empty;
|
|
|
|
|
txtOutBox.Focus();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -2882,10 +2880,209 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
scanOutMsg.Text = "请先扫描容器号和条码!";
|
|
|
|
|
}
|
|
|
|
|
#region 原逻辑
|
|
|
|
|
//if (!string.IsNullOrEmpty(txtOutBox.Text) && !string.IsNullOrEmpty(txtOutBarCode.Text))
|
|
|
|
|
//{
|
|
|
|
|
|
|
|
|
|
// var wmsRawStock = dbContext.WmsRawStock
|
|
|
|
|
// .FirstOrDefault(t => t.instockBatch == txtOutBarCode.Text && t.palletInfoCode == txtOutBox.Text);
|
|
|
|
|
// if (wmsRawStock == null)
|
|
|
|
|
// {
|
|
|
|
|
// scanOutMsg.Text = "库存已经被清空!";
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// decimal outScan = Convert.ToDecimal(this.txtOutScan.Text);
|
|
|
|
|
// if (outScan > wmsRawStock.totalAmount - wmsRawStock.frozenAmount)
|
|
|
|
|
// {
|
|
|
|
|
// scanOutMsg.Text = "出库数量不能大于库存数量!";
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// var wcsTask = dbContext.WcsTask.Where(t => t.containerNo == txtOutBox.Text).FirstOrDefault();
|
|
|
|
|
// if (wcsTask == null)
|
|
|
|
|
// {
|
|
|
|
|
// scanOutMsg.Text = "出库失败,非CTU出库任务,无法出库!";
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// var mesBaseBarcodeInfo = dbContext.MesBaseBarcodeInfo.FirstOrDefault(t => t.barcodeInfo == txtOutBarCode.Text);
|
|
|
|
|
// if (mesBaseBarcodeInfo != null)
|
|
|
|
|
// {
|
|
|
|
|
// var list = JsonConvert.DeserializeObject<List<string>>(baseEquip.endStationCode);
|
|
|
|
|
// var wmsRawOutstocks = dbContext.WmsRawOutstock
|
|
|
|
|
// .Where(t => t.materialId == mesBaseBarcodeInfo.materialId && t.realOutstockAmount < t.outstockAmount && t.saleOrderId == (mesBaseBarcodeInfo.saleOrderId == null ? 0 : mesBaseBarcodeInfo.saleOrderId) && baseEquip.endStationCode.Contains(t.endStationCode))
|
|
|
|
|
// .ToList();
|
|
|
|
|
// WmsRawOutstock wmsRawOutstock = null;
|
|
|
|
|
// foreach (var item in list)
|
|
|
|
|
// {
|
|
|
|
|
// wmsRawOutstock ??= wmsRawOutstocks.Where(t => t.endStationCode == item).FirstOrDefault();
|
|
|
|
|
// }
|
|
|
|
|
// if (wmsRawOutstock != null)
|
|
|
|
|
// {
|
|
|
|
|
// wmsRawOutstock.realOutstockAmount += outScan;
|
|
|
|
|
// if (wmsRawOutstock.outstockAmount == wmsRawOutstock.realOutstockAmount)
|
|
|
|
|
// {
|
|
|
|
|
// wmsRawOutstock.executeStatus = "2";
|
|
|
|
|
// }
|
|
|
|
|
// else if (wmsRawOutstock.realOutstockAmount > wmsRawOutstock.outstockAmount)
|
|
|
|
|
// {
|
|
|
|
|
// scanOutMsg.Text = "出库数量不能大于申请单数量,当前出库数量为:" + (wmsRawOutstock.realOutstockAmount - outScan) + ",申请单数量为:" + wmsRawOutstock.outstockAmount + "!";
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// wmsRawStock.totalAmount -= outScan;
|
|
|
|
|
// if (wmsRawStock.totalAmount <= 0)
|
|
|
|
|
// {
|
|
|
|
|
// dbContext.Remove(wmsRawStock);
|
|
|
|
|
// dbContext.Update(wmsRawOutstock);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// dbContext.Update(wmsRawStock);
|
|
|
|
|
// dbContext.Update(wmsRawOutstock);
|
|
|
|
|
// }
|
|
|
|
|
// if (mesBaseBarcodeInfo != null)
|
|
|
|
|
// {
|
|
|
|
|
// WmsRawOutstockDetail wmsProductOutstockDetail = new WmsRawOutstockDetail()
|
|
|
|
|
// {
|
|
|
|
|
// rawOutstockDetailId = Global.SnowId.NextId(),
|
|
|
|
|
// rawOutstockId = wmsRawOutstock.rawOutstockId,
|
|
|
|
|
// materialId = mesBaseBarcodeInfo.materialId,
|
|
|
|
|
// createDate = DateTime.Now,
|
|
|
|
|
// createBy = "WCS",
|
|
|
|
|
// taskCode = wcsTask.objid.ToString(),
|
|
|
|
|
// executeStatus = "2",
|
|
|
|
|
// locationCode = wcsTask.currPointNo,
|
|
|
|
|
// outstockAmount = outScan,
|
|
|
|
|
// planAmount = outScan,
|
|
|
|
|
// warehouseId = 512,
|
|
|
|
|
// materialBarcode = mesBaseBarcodeInfo.barcodeInfo,
|
|
|
|
|
// instockBatch = mesBaseBarcodeInfo.batchCode,
|
|
|
|
|
// stackAmount = outScan,
|
|
|
|
|
// outstockPerson = "WCS",
|
|
|
|
|
// outstockTime = DateTime.Now,
|
|
|
|
|
// outstockWay = "2",
|
|
|
|
|
// materialProductionDate = mesBaseBarcodeInfo.productionDate
|
|
|
|
|
// };
|
|
|
|
|
// dbContext.WmsRawOutstockDetail.Add(wmsProductOutstockDetail);
|
|
|
|
|
// }
|
|
|
|
|
// dbContext.SaveChanges();
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// // 没有申请单
|
|
|
|
|
// // 如果选中了出库单,并且无需要出库的申请单,则禁止出库
|
|
|
|
|
|
|
|
|
|
// //if (!string.IsNullOrEmpty(baseEquip.endStationCode))
|
|
|
|
|
// //{
|
|
|
|
|
// // scanOutMsg.Text = "申请单里该条码无需出库!";
|
|
|
|
|
// // return;
|
|
|
|
|
// //}
|
|
|
|
|
// if (wmsRawStock.safeFlag != "1")
|
|
|
|
|
// {
|
|
|
|
|
// scanOutMsg.Text = "该条码不是安全库存,且无申请单,禁止出库!";
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// if (mesBaseBarcodeInfo.PurchaseOrderId == null)
|
|
|
|
|
// {
|
|
|
|
|
// wmsRawStock.totalAmount -= outScan;
|
|
|
|
|
// if (wmsRawStock.totalAmount == 0)
|
|
|
|
|
// {
|
|
|
|
|
// dbContext.WmsRawStock.Remove(wmsRawStock);
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// dbContext.WmsRawStock.Update(wmsRawStock);
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
// #region 插入rawOutstock
|
|
|
|
|
// string timeStamp = DateTime.Now.ToString("yyyyMMddHHmmss");
|
|
|
|
|
// WmsRawOutstock newWmsRawOutstock = new WmsRawOutstock();
|
|
|
|
|
// newWmsRawOutstock.taskCode = timeStamp + "CTU" + Random.Shared.Next(10, 99);
|
|
|
|
|
// newWmsRawOutstock.warehouseId = 512;
|
|
|
|
|
// newWmsRawOutstock.locationCode = wcsTask.currPointNo;
|
|
|
|
|
// newWmsRawOutstock.stationId = 512;
|
|
|
|
|
// newWmsRawOutstock.materialId = mesBaseBarcodeInfo.materialId;
|
|
|
|
|
// newWmsRawOutstock.materialBatch = mesBaseBarcodeInfo.barcodeInfo;
|
|
|
|
|
// newWmsRawOutstock.palletInfoCode = wcsTask.containerNo;
|
|
|
|
|
// newWmsRawOutstock.outstockAmount = outScan;
|
|
|
|
|
// newWmsRawOutstock.realOutstockAmount = outScan;
|
|
|
|
|
// newWmsRawOutstock.operationType = "1";
|
|
|
|
|
// newWmsRawOutstock.taskType = "1";
|
|
|
|
|
// newWmsRawOutstock.auditStatus = "1";
|
|
|
|
|
// newWmsRawOutstock.applyBy = "CtuGun";
|
|
|
|
|
// newWmsRawOutstock.applyDate = DateTime.Now;
|
|
|
|
|
// newWmsRawOutstock.executeStatus = "2";
|
|
|
|
|
// newWmsRawOutstock.saleOrderId = mesBaseBarcodeInfo.saleOrderId;
|
|
|
|
|
// newWmsRawOutstock.updateDate = DateTime.Now;
|
|
|
|
|
// newWmsRawOutstock.beginTime = DateTime.Now;
|
|
|
|
|
// newWmsRawOutstock.endTime = DateTime.Now;
|
|
|
|
|
// dbContext.WmsRawOutstock.Add(newWmsRawOutstock);
|
|
|
|
|
// dbContext.SaveChanges();
|
|
|
|
|
// #endregion
|
|
|
|
|
// //if (mesBaseBarcodeInfo != null)
|
|
|
|
|
// //{
|
|
|
|
|
// // WmsRawOutstockDetail wmsProductOutstockDetail = new WmsRawOutstockDetail()
|
|
|
|
|
// // {
|
|
|
|
|
// // rawOutstockDetailId = Global.SnowId.NextId(),
|
|
|
|
|
// // rawOutstockId = 0,
|
|
|
|
|
// // materialId = mesBaseBarcodeInfo.materialId,
|
|
|
|
|
// // createDate = DateTime.Now,
|
|
|
|
|
// // createBy = "WCS",
|
|
|
|
|
// // taskCode = wcsTask.objid.ToString(),
|
|
|
|
|
// // executeStatus = "2",
|
|
|
|
|
// // locationCode = wcsTask.currPointNo,
|
|
|
|
|
// // outstockAmount = outScan,
|
|
|
|
|
// // planAmount = outScan,
|
|
|
|
|
// // warehouseId = 512,
|
|
|
|
|
// // materialBarcode = mesBaseBarcodeInfo.barcodeInfo,
|
|
|
|
|
// // instockBatch = mesBaseBarcodeInfo.batchCode,
|
|
|
|
|
// // stackAmount = outScan,
|
|
|
|
|
// // outstockPerson = "WCS",
|
|
|
|
|
// // outstockTime = DateTime.Now,
|
|
|
|
|
// // outstockWay = "2",
|
|
|
|
|
// // materialProductionDate = mesBaseBarcodeInfo.productionDate
|
|
|
|
|
// // };
|
|
|
|
|
// // dbContext.WmsRawOutstockDetail.Add(wmsProductOutstockDetail);
|
|
|
|
|
// //}
|
|
|
|
|
// // dbContext.SaveChanges();
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// scanOutMsg.Text = "该条码的销售订单不正确";
|
|
|
|
|
// txtOutScan.Text = string.Empty;
|
|
|
|
|
// txtOutBarCode.Text = string.Empty;
|
|
|
|
|
// outMaterialSpecTxt.Text = string.Empty;
|
|
|
|
|
// outMaterialNameTxt.Text = string.Empty;
|
|
|
|
|
// txtOutBox.Text = string.Empty;
|
|
|
|
|
// txtOutBox.Focus();
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// scanOutMsg.Text = "出库成功!";
|
|
|
|
|
// txtOutScan.Text = string.Empty;
|
|
|
|
|
// txtOutBarCode.Text = string.Empty;
|
|
|
|
|
// outMaterialSpecTxt.Text = string.Empty;
|
|
|
|
|
// outMaterialNameTxt.Text = string.Empty;
|
|
|
|
|
// txtOutBox.Text = string.Empty;
|
|
|
|
|
// txtOutBox.Focus();
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// scanOutMsg.Text = "未查询到该条码信息!";
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//}
|
|
|
|
|
//else
|
|
|
|
|
//{
|
|
|
|
|
// scanOutMsg.Text = "请先扫描容器号和条码!";
|
|
|
|
|
//}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show(ex.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// <summary>
|
|
|
|
|
@ -3252,7 +3449,7 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
if (InventoryCheck.CheckStatus != "2")
|
|
|
|
|
{
|
|
|
|
|
InventoryCheck.CheckStatus = "2";
|
|
|
|
|
InventoryCheck.InventoriedAmount+= InventoryCheck.InventoryingAmount;
|
|
|
|
|
InventoryCheck.InventoriedAmount += InventoryCheck.InventoryingAmount;
|
|
|
|
|
InventoryCheck.InventoryingAmount = 0;
|
|
|
|
|
InventoryCheck.EndTime = DateTime.Now;
|
|
|
|
|
}
|
|
|
|
|
@ -5257,6 +5454,72 @@ namespace Khd.Core.Wpf.Form
|
|
|
|
|
{
|
|
|
|
|
DrawLocaitons();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Window_Closing(object sender, CancelEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
System.Diagnostics.Process p = new System.Diagnostics.Process();
|
|
|
|
|
p.StartInfo.FileName = "cmd.exe";
|
|
|
|
|
p.StartInfo.UseShellExecute = false; //是否使用操作系统shell启动
|
|
|
|
|
p.StartInfo.RedirectStandardInput = true;//接受来自调用程序的输入信息
|
|
|
|
|
p.StartInfo.RedirectStandardOutput = true;//由调用程序获取输出信息
|
|
|
|
|
p.StartInfo.RedirectStandardError = true;//重定向标准错误输出
|
|
|
|
|
p.StartInfo.CreateNoWindow = true;//不显示程序窗口
|
|
|
|
|
p.Start();//启动程序
|
|
|
|
|
|
|
|
|
|
//向cmd窗口发送输入信息
|
|
|
|
|
p.StandardInput.WriteLine("taskkill /f /im Khd.Core.Wpf.exe" + "&exit");
|
|
|
|
|
p.StandardInput.WriteLine("taskkill /f /im Khd.Core.Wpf" + "&exit");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void createBearConfirmBox_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
using var scope = _host.Services.CreateScope();
|
|
|
|
|
using var dbContext = scope.ServiceProvider.GetRequiredService<DefaultDbContext>();
|
|
|
|
|
SelectOutRawForm selectOutRawForm = new SelectOutRawForm(this._host, "", 4);
|
|
|
|
|
selectOutRawForm.ShowDialog();
|
|
|
|
|
if (string.IsNullOrEmpty(SelectOutRawForm.StationCode))
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
bool hasTask = dbContext.WcsTask.Where(t => t.nextPointId == 10).Any();
|
|
|
|
|
bool hasTaskManual = dbContext.WcsTaskManual.Where(t => t.nextPointId == 10).Any();
|
|
|
|
|
if (hasTask || hasTaskManual)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("已经有任务了");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
BaseEquip startStationEquip = dbContext.BaseEquip.First(t => t.objid == 21);
|
|
|
|
|
BaseEquip bearAgvEquip = dbContext.BaseEquip.First(t => t.objid == 10);
|
|
|
|
|
BaseEquip endEquip = dbContext.BaseEquip.First(t => t.equipNo == SelectOutRawForm.StationCode);
|
|
|
|
|
WcsTask bearAgvTask = new()
|
|
|
|
|
{
|
|
|
|
|
objid = _jcSnowId.NextId(),
|
|
|
|
|
taskType = 32,
|
|
|
|
|
containerNo = null,
|
|
|
|
|
currPointId = startStationEquip.objid,
|
|
|
|
|
currPointNo = startStationEquip.equipNo,
|
|
|
|
|
nextPointId = bearAgvEquip.objid,
|
|
|
|
|
nextPointNo = bearAgvEquip.equipNo,
|
|
|
|
|
endPointId = endEquip.objid,
|
|
|
|
|
endPointNo = endEquip.equipNo,
|
|
|
|
|
taskStatus = 0,
|
|
|
|
|
createTime = DateTime.Now,
|
|
|
|
|
createBy = "WCS",
|
|
|
|
|
qty = 1,
|
|
|
|
|
useFlag = 1,
|
|
|
|
|
equipmentNo = startStationEquip.equipNo,
|
|
|
|
|
remark = "组装出库",
|
|
|
|
|
floorNo = 5,
|
|
|
|
|
fromFloorNo = 5,
|
|
|
|
|
};
|
|
|
|
|
dbContext.Add(bearAgvTask);
|
|
|
|
|
WcsTaskLog wcsTaskLog = CoreMapper.Map<WcsTaskLog>(bearAgvTask);
|
|
|
|
|
dbContext.Add(wcsTaskLog);
|
|
|
|
|
dbContext.SaveChanges();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|