liuwf 1 year ago
parent e464d0b01b
commit f04b6d7531

@ -2996,6 +2996,7 @@ namespace Khd.Core.Wpf.Form
select t1.location_id locationId,
t1.container_code containerCode,
t1.location_code locationCode
from wms_base_location t1
left join wms_raw_stock t2
on t1.location_code=t2.location_code
@ -3003,6 +3004,8 @@ namespace Khd.Core.Wpf.Form
and t1.container_status=1 and t1.warehouse_id=512
order by t1.loc_column,t1.loc_row
");
var wmsLocation = dbContext.WmsBaseLocation.FirstOrDefault(t => t.locationId == idList[0] && t.locationStatus == "1");
if (wmsLocation == null)
{
@ -3017,7 +3020,8 @@ namespace Khd.Core.Wpf.Form
MessageBoxResult messageBoxResult = HandyControl.Controls.MessageBox.Show("选择了一个移库料箱,需要出空料箱,是否确认?", "提示", MessageBoxButton.YesNo, MessageBoxImage.Question);
if (messageBoxResult == MessageBoxResult.Yes)
{
WmsBaseLocation emptyLocation = emptyLocations.First();
var emptyLocation = dbContext.WmsBaseLocation.FirstOrDefault(t => t.locationId == emptyLocations.First().locationId);
//WmsBaseLocation emptyLocation = emptyLocations.First();
emptyLocation.locationStatus = "4";
emptyLocation.ContainerStatus = "2";
wmsLocation.locationStatus = "4";
@ -4126,7 +4130,7 @@ namespace Khd.Core.Wpf.Form
}
else
{
this.removeScan.Text = wmsRawStock.frozenAmount.ToString();
this.removeScan.Text = (wmsRawStock.totalAmount - wmsRawStock.frozenAmount).ToString();
}
}
catch
@ -4159,12 +4163,16 @@ namespace Khd.Core.Wpf.Form
{
WmsBaseLocation removeLocation = dbContext.WmsBaseLocation.Where(t => t.containerCode == this.removeSourceBox.Text).First();
WmsBaseLocation rawLocation = dbContext.WmsBaseLocation.Where(t => t.containerCode == this.rawSourceBox.Text).First();
dbContext.WmsRawStock.Where(t => t.locationCode == rawLocation.locationCode)
// 更新 WmsRawStock 中的记录
dbContext.WmsRawStock
.Where(t => t.locationCode == rawLocation.locationCode)
.Where(t => t.instockBatch == this.removeBarCode.Text)
.Update(t => new WmsRawStock
{
locationCode = removeLocation.locationCode,
locationCode = removeLocation.locationCode, // 更新 locationCode
palletInfoCode = removeLocation.containerCode // 更新 palletInfoCode
});
HandyControl.Controls.MessageBox.Show("移库成功!");
this.removeBarCode.Text = "";
this.removeScan.Text = string.Empty;

@ -3,8 +3,8 @@
//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=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=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"
},
"PlcConfigs": [

Loading…
Cancel
Save