change-人工叫料界面还原

master
liuwf 1 year ago
parent 7df4b2ec01
commit 25199b5421

@ -118,6 +118,9 @@ namespace Khd.Core.Wpf.Form
{
try
{
itemsControlItems = new ObservableCollection<SelectItemModel>();
itemsControl.ItemsSource = itemsControlItems;
Task.Run(() =>
{
foreach (var plcConfig in SystemData.PlcConfigs)
@ -1427,12 +1430,33 @@ namespace Khd.Core.Wpf.Form
/// <param name="e"></param>
private void CheckPersonBox_Click(object sender, RoutedEventArgs e)
{
if (sender is CheckBox checkbox)
{
dynamic Currentselected = PersonCallMaterial.SelectedItem;
if (checkbox.IsChecked != null && checkbox.IsChecked.Value)
{
if (itemsControlItems != null && itemsControlItems.Count >= 6)
{
MessageBox.Show("最多只能选择6个");
checkbox.IsChecked = false;
return;
}
CallSelectedItem.Add(Currentselected.baseLocationId);
// 添加选中项
string selectedItem = Currentselected.palletInfoCode;
bool isIn = itemsControlItems.Any(t => t.baseLocationId == Currentselected.baseLocationId);
if (!isIn)
{
itemsControlItems.Add(new SelectItemModel
{
baseLocationId = Currentselected.baseLocationId,
palletInfoCode = Currentselected.palletInfoCode
});
}
}
else
{
@ -1448,8 +1472,11 @@ namespace Khd.Core.Wpf.Form
}
}
}
/// <summary>
/// 删除选中的值
/// </summary>
@ -2612,9 +2639,9 @@ namespace Khd.Core.Wpf.Form
{
BaseEquip ctuEquip = SystemData.BaseEquip.First(t => t.objid == 11);
BaseEquip endEquip = SystemData.BaseEquip.First(t => t.objid == 20);
if (CallSelectedItem.Count == 0)
if (itemsControlItems.Count == 0)
{
HandyControl.Controls.MessageBox.Show("请选择料箱!");
MessageBox.Show("请选择料箱!");
return;
}
@ -2626,7 +2653,12 @@ namespace Khd.Core.Wpf.Form
// HandyControl.Controls.MessageBox.Show($"当前CTU只能有6个任务,当前任务数{taskCount}");
// return;
//}
var wmsBaseLocation = dbContext.WmsBaseLocation.Where(t => t.warehouseId == 512 && t.ContainerStatus == "1").Where(t => CallSelectedItem.Contains(t.locationId)).ToList();
//替换 var wmsBaseLocation = dbContext.WmsBaseLocation.Where(t => t.warehouseId == 512 && t.ContainerStatus == "1").Where(t => CallSelectedItem.Contains(t.locationId)).ToList();
List<long> idList = itemsControlItems.Select(x => x.baseLocationId).ToList();
var wmsBaseLocation = dbContext.WmsBaseLocation.Where(t => t.warehouseId == 512 && t.ContainerStatus == "1").Where(t => idList.Contains(t.locationId)).ToList();
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.AppendLine("确认出库:");
foreach (var item in wmsBaseLocation)

@ -3,9 +3,9 @@
//mysql
//"DefaultConnection": "server=106.12.13.113;port=3306;database=khd_jyhb;uid=root;pwd=root;charset='utf8';persistsecurityinfo=True;SslMode=none;Allow User Variables=True"
//khd
//"DefaultConnection": "server=172.16.12.100;port=3306;database=hwjy-cloud;uid=kehaida;pwd=khdrkjy2024...;charset='utf8';persistsecurityinfo=True;SslMode=None;Allow User Variables=True"
"DefaultConnection": "server=172.16.12.100;port=3306;database=hwjy-cloud;uid=kehaida;pwd=khdrkjy2024...;charset='utf8';persistsecurityinfo=True;SslMode=None;Allow User Variables=True"
//"DefaultConnection": "server=175.27.215.92;port=3306;database=hwjy-cloud;uid=kehaida;pwd=khd2024;charset='utf8';persistsecurityinfo=True;SslMode=none;Allow User Variables=True"
"DefaultConnection": "server=localhost;port=3306;database=jyhb;uid=root;pwd=root;charset='utf8';persistsecurityinfo=True;SslMode=None;Allow User Variables=True"
// "DefaultConnection": "server=localhost;port=3306;database=jyhb;uid=root;pwd=root;charset='utf8';persistsecurityinfo=True;SslMode=None;Allow User Variables=True"
},
"PlcConfigs": [
{

Loading…
Cancel
Save