写标签间隔时间由150改为200
This commit is contained in:
parent
36b573c12b
commit
88b97e213f
|
@ -42,7 +42,7 @@
|
||||||
<!-- 无操作退出录像时间,单位秒,为0时不退出录像 -->
|
<!-- 无操作退出录像时间,单位秒,为0时不退出录像 -->
|
||||||
<add key="stopRecord" value="180"/>
|
<add key="stopRecord" value="180"/>
|
||||||
|
|
||||||
<add key="gridConnectionString" value="MYSQL; Database=xiangtan_mazuike_xx; Password=root; Port=3306; Server=127.0.0.1; User=root;"/>
|
<add key="gridConnectionString" value="MYSQL; Database=xiangtan_mazuike; Password=root; Port=3306; Server=127.0.0.1; User=root;"/>
|
||||||
<!-- 查询处方是orderNo还是orderGroupNo -->
|
<!-- 查询处方是orderNo还是orderGroupNo -->
|
||||||
<add key="OrderNoName" value="orderNo" />
|
<add key="OrderNoName" value="orderNo" />
|
||||||
<!-- 后门耗材板地址 没有则填写0-->
|
<!-- 后门耗材板地址 没有则填写0-->
|
||||||
|
|
|
@ -15,6 +15,7 @@ using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace DM_Weight.ViewModels
|
namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
|
@ -88,11 +89,11 @@ namespace DM_Weight.ViewModels
|
||||||
ChannelStock copy = TransExpV2<ChannelStock, ChannelStock>.Trans(Jiaojie_ChannelStocks[i]);
|
ChannelStock copy = TransExpV2<ChannelStock, ChannelStock>.Trans(Jiaojie_ChannelStocks[i]);
|
||||||
ChannelStocks.Add(copy);
|
ChannelStocks.Add(copy);
|
||||||
}
|
}
|
||||||
ChannelStocks = Jiaojie_ChannelStocks.GroupBy(cs => cs.DrugId).Select(g => new
|
ChannelStocks = Jiaojie_ChannelStocks.GroupBy(cs =>new { cs.DrugId, cs.ManuNo }).Select(g => new
|
||||||
{
|
{
|
||||||
DrugId = g.Key,
|
Key = g.Key,
|
||||||
AddQuantity = g.Sum(s => s.AddQuantity)
|
AddQuantity = g.Sum(s => s.AddQuantity)
|
||||||
}).Select(cs => new ChannelStock() { DrugId = cs.DrugId, AddQuantity = cs.AddQuantity }).ToList();
|
}).Select(cs => new ChannelStock() { DrugId = cs.Key.DrugId,ManuNo=cs.Key.ManuNo, AddQuantity = cs.AddQuantity }).ToList();
|
||||||
RequestData();
|
RequestData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,7 +199,7 @@ namespace DM_Weight.ViewModels
|
||||||
.Where(cs => cs.Quantity > 0)
|
.Where(cs => cs.Quantity > 0)
|
||||||
.Where(cs => cs.DrawerType == 1)
|
.Where(cs => cs.DrawerType == 1)
|
||||||
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM3"))
|
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM3"))
|
||||||
.Where(cs => cs.DrugId == ChannelStocks[i].DrugId)
|
.Where(cs => cs.DrugId == ChannelStocks[i].DrugId && cs.ManuNo == ChannelStocks[i].ManuNo)
|
||||||
.OrderBy(cs => cs.EffDate)
|
.OrderBy(cs => cs.EffDate)
|
||||||
.OrderBy(cs => cs.DrawerNo)
|
.OrderBy(cs => cs.DrawerNo)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
@ -603,7 +604,7 @@ namespace DM_Weight.ViewModels
|
||||||
singleChannelsBoxSmart.ForEach(it =>
|
singleChannelsBoxSmart.ForEach(it =>
|
||||||
{
|
{
|
||||||
_portUtil.WriteQuantityMethod((it.Quantity - it.TakeQuantity), it.DrawerNo, it.ColNo);
|
_portUtil.WriteQuantityMethod((it.Quantity - it.TakeQuantity), it.DrawerNo, it.ColNo);
|
||||||
Thread.Sleep(150);
|
Thread.Sleep(200);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -77,15 +77,15 @@ namespace DM_Weight.ViewModels
|
||||||
.OrderBy(cs => cs.Chnguid)
|
.OrderBy(cs => cs.Chnguid)
|
||||||
.OrderBy(cs => cs.DrawerNo)
|
.OrderBy(cs => cs.DrawerNo)
|
||||||
.ToList();
|
.ToList();
|
||||||
ChannelStocks = ChannelStocks.GroupBy(it => new { it.DrawerNo, it.DrugId })
|
//ChannelStocks = ChannelStocks.GroupBy(it => new { it.DrawerNo, it.DrugId })
|
||||||
.Select(it =>
|
// .Select(it =>
|
||||||
{
|
// {
|
||||||
var ret = it.First();
|
// var ret = it.First();
|
||||||
ret.Quantity = it.Sum(itx => itx.Quantity);
|
// ret.Quantity = it.Sum(itx => itx.Quantity);
|
||||||
ret.NeedNum=it.Sum(itx => itx.NeedNum);
|
// ret.NeedNum=it.Sum(itx => itx.NeedNum);
|
||||||
return ret;
|
// return ret;
|
||||||
}).Where(it=>it.BaseQuantity>it.Quantity)
|
// }).Where(it=>it.BaseQuantity>it.Quantity)
|
||||||
.ToList();
|
// .ToList();
|
||||||
ChannelStocks.ForEach(cs => cs.AddQuantity = cs.BaseQuantity - cs.Quantity);
|
ChannelStocks.ForEach(cs => cs.AddQuantity = cs.BaseQuantity - cs.Quantity);
|
||||||
|
|
||||||
ICollectionView vw = CollectionViewSource.GetDefaultView(ChannelStocks);
|
ICollectionView vw = CollectionViewSource.GetDefaultView(ChannelStocks);
|
||||||
|
|
|
@ -166,8 +166,12 @@ namespace DM_Weight.ViewModels
|
||||||
|
|
||||||
private void GetAllDrugInfos()
|
private void GetAllDrugInfos()
|
||||||
{
|
{
|
||||||
var list = SqlSugarHelper.Db.Queryable<DrugInfo>().Includes<DrugManuNo>(di => di.DrugManuNos).OrderBy(di => di.DrugId).ToList();
|
string str = @"SELECT d.drug_id,d.py_code,d.drug_barcode,d.drug_brand_name,d.drug_spec,d.dosage,d.pack_unit,
|
||||||
DrugInfos = list;
|
d.manufactory,d.max_stock,CONCAT(drug_name,' ',drug_spec)as drug_name FROM `drug_info` d";
|
||||||
|
DrugInfos = SqlSugarHelper.Db.SqlQueryable<DrugInfo>(str).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
|
||||||
|
|
||||||
|
//var list = SqlSugarHelper.Db.Queryable<DrugInfo>().Includes<DrugManuNo>(di => di.DrugManuNos).OrderBy(di => di.DrugId).ToList();
|
||||||
|
//DrugInfos = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GetChannelsByDrawerNo()
|
private void GetChannelsByDrawerNo()
|
||||||
|
@ -457,7 +461,7 @@ namespace DM_Weight.ViewModels
|
||||||
public void UpdateComboBoxItems(string text)
|
public void UpdateComboBoxItems(string text)
|
||||||
{
|
{
|
||||||
string str = @"SELECT d.drug_id,d.py_code,d.drug_barcode,d.drug_name,d.drug_brand_name,d.drug_spec,d.dosage,d.pack_unit,
|
string str = @"SELECT d.drug_id,d.py_code,d.drug_barcode,d.drug_name,d.drug_brand_name,d.drug_spec,d.dosage,d.pack_unit,
|
||||||
d.manufactory,d.max_stock,CONCAT(drug_name,' ',drug_spec)as drug_name_spec FROM `drug_info` d";
|
d.manufactory,d.max_stock,CONCAT(drug_name,' ',drug_spec)as DrugName FROM `drug_info` d";
|
||||||
if (string.IsNullOrEmpty(text))
|
if (string.IsNullOrEmpty(text))
|
||||||
{
|
{
|
||||||
DrugInfos = SqlSugarHelper.Db.SqlQueryable<DrugInfo>(str).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
|
DrugInfos = SqlSugarHelper.Db.SqlQueryable<DrugInfo>(str).OrderBy(di => di.DrugName).OrderBy(di => di.DrugId).ToList();
|
||||||
|
|
|
@ -215,7 +215,7 @@ namespace DM_Weight.ViewModels
|
||||||
for (int i = 0; i < singleChannels.Count; i++)
|
for (int i = 0; i < singleChannels.Count; i++)
|
||||||
{
|
{
|
||||||
_portUtil.WriteQuantityMethod((singleChannels[i].CheckQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
_portUtil.WriteQuantityMethod((singleChannels[i].CheckQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
Thread.Sleep(150);
|
Thread.Sleep(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -359,7 +359,7 @@ namespace DM_Weight.ViewModels
|
||||||
//await _portUtil.WriteChannelIn foMethod(2, (singleChannels[i].Quantity + singleChannels[i].AddQuantity).ToString(), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
//await _portUtil.WriteChannelIn foMethod(2, (singleChannels[i].Quantity + singleChannels[i].AddQuantity).ToString(), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
//await Task.Delay(200);
|
//await Task.Delay(200);
|
||||||
//await _portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
//await _portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
Thread.Sleep(150);
|
Thread.Sleep(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -362,7 +362,7 @@ namespace DM_Weight.ViewModels
|
||||||
//await Task.Delay(200);
|
//await Task.Delay(200);
|
||||||
//_portUtil.ShowContentMethod(it.DrawerNo, it.ColNo);
|
//_portUtil.ShowContentMethod(it.DrawerNo, it.ColNo);
|
||||||
_portUtil.WriteQuantityMethod((it.Quantity - it.TakeQuantity), it.DrawerNo, it.ColNo);
|
_portUtil.WriteQuantityMethod((it.Quantity - it.TakeQuantity), it.DrawerNo, it.ColNo);
|
||||||
Thread.Sleep(150);
|
Thread.Sleep(200);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -392,7 +392,7 @@ namespace DM_Weight.ViewModels
|
||||||
//await Task.Delay(200);
|
//await Task.Delay(200);
|
||||||
//_portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
//_portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity + singleChannels[i].AddQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity + singleChannels[i].AddQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -454,7 +454,7 @@ namespace DM_Weight.ViewModels
|
||||||
//await Task.Delay(200);
|
//await Task.Delay(200);
|
||||||
//_portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
//_portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity - singleChannels[i].TakeQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity - singleChannels[i].TakeQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -444,7 +444,7 @@ namespace DM_Weight.ViewModels
|
||||||
for (int i = 0; i < singleChannels.Count; i++)
|
for (int i = 0; i < singleChannels.Count; i++)
|
||||||
{
|
{
|
||||||
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity + singleChannels[i].TakeQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity + singleChannels[i].TakeQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -374,7 +374,7 @@ namespace DM_Weight.ViewModels
|
||||||
//await Task.Delay(200);
|
//await Task.Delay(200);
|
||||||
//_portUtil.ShowContentMethod(ChannelStock.DrawerNo, ChannelStock.ColNo);
|
//_portUtil.ShowContentMethod(ChannelStock.DrawerNo, ChannelStock.ColNo);
|
||||||
_portUtil.WriteQuantityMethod((ChannelStock.Quantity + ChannelStock.TakeQuantity), ChannelStock.DrawerNo, ChannelStock.ColNo);
|
_portUtil.WriteQuantityMethod((ChannelStock.Quantity + ChannelStock.TakeQuantity), ChannelStock.DrawerNo, ChannelStock.ColNo);
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(200);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
AlertMsg alertMsg = new AlertMsg
|
AlertMsg alertMsg = new AlertMsg
|
||||||
|
|
|
@ -383,7 +383,7 @@ namespace DM_Weight.ViewModels
|
||||||
//_portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
//_portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
|
|
||||||
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity + singleChannels[i].AddQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity + singleChannels[i].AddQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
Thread.Sleep(150);
|
Thread.Sleep(200);
|
||||||
}
|
}
|
||||||
//singleChannels.ForEach(async it =>
|
//singleChannels.ForEach(async it =>
|
||||||
//{
|
//{
|
||||||
|
|
|
@ -341,7 +341,7 @@ namespace DM_Weight.ViewModels
|
||||||
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
|
List<ChannelStock> singleChannels = record.FindAll(it => it.BoardType != 1);
|
||||||
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
|
if ((singleChannels.Count > 0 ? singleChannels[0].BoardType : 1) == 5)
|
||||||
{
|
{
|
||||||
singleChannels.ForEach(async it =>
|
singleChannels.ForEach(it =>
|
||||||
{
|
{
|
||||||
_portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.Quantity - it.TakeQuantity);
|
_portUtil.WriteQuantity(it.DrawerNo, it.ColNo, it.Quantity - it.TakeQuantity);
|
||||||
Thread.Sleep(150);
|
Thread.Sleep(150);
|
||||||
|
@ -357,7 +357,7 @@ namespace DM_Weight.ViewModels
|
||||||
//await Task.Delay(200);
|
//await Task.Delay(200);
|
||||||
//_portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
//_portUtil.ShowContentMethod(singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity - singleChannels[i].TakeQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
_portUtil.WriteQuantityMethod((singleChannels[i].Quantity - singleChannels[i].TakeQuantity), singleChannels[i].DrawerNo, singleChannels[i].ColNo);
|
||||||
Thread.Sleep(150);
|
Thread.Sleep(200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -166,6 +166,7 @@
|
||||||
<DataGridTextColumn IsReadOnly="True" Header="药品名称" Binding="{Binding DrugInfo.DrugName}"/>
|
<DataGridTextColumn IsReadOnly="True" Header="药品名称" Binding="{Binding DrugInfo.DrugName}"/>
|
||||||
<DataGridTextColumn IsReadOnly="True" Header="规格" Binding="{Binding DrugInfo.DrugSpec}"/>
|
<DataGridTextColumn IsReadOnly="True" Header="规格" Binding="{Binding DrugInfo.DrugSpec}"/>
|
||||||
<DataGridTextColumn IsReadOnly="True" Header="厂家" Binding="{Binding DrugInfo.Manufactory}"/>
|
<DataGridTextColumn IsReadOnly="True" Header="厂家" Binding="{Binding DrugInfo.Manufactory}"/>
|
||||||
|
<DataGridTextColumn IsReadOnly="True" Header="批次" Binding="{Binding ManuNo}"/>
|
||||||
<DataGridTextColumn IsReadOnly="True" Header="药品基数" Binding="{Binding BaseQuantity}"/>
|
<DataGridTextColumn IsReadOnly="True" Header="药品基数" Binding="{Binding BaseQuantity}"/>
|
||||||
<DataGridTextColumn IsReadOnly="True" Header="需补药数量" Binding="{Binding AddQuantity}"/>
|
<DataGridTextColumn IsReadOnly="True" Header="需补药数量" Binding="{Binding AddQuantity}"/>
|
||||||
<DataGridTextColumn IsReadOnly="True" Header="状态" Binding="{Binding ChannelLst.State,Converter={StaticResource StockStatusConverter},ConverterParameter=TextState}"/>
|
<DataGridTextColumn IsReadOnly="True" Header="状态" Binding="{Binding ChannelLst.State,Converter={StaticResource StockStatusConverter},ConverterParameter=TextState}"/>
|
||||||
|
|
Loading…
Reference in New Issue