导出账册中查询修改sql修改;请领列表页面查询条件修改(不根据machin_id,要根据部门名称,请领列表里的machin_id不是申请方的)
This commit is contained in:
parent
e5f3877af5
commit
4654266085
|
@ -308,16 +308,15 @@ namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
SQL += " AND ac.drug_id='" + drug_id + "' ";
|
SQL += " AND ac.drug_id='" + drug_id + "' ";
|
||||||
}
|
}
|
||||||
SQL += " ORDER BY ac.create_date desc,ac.drug_id";
|
|
||||||
if (type > 0)
|
if (type > 0)
|
||||||
{
|
{
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
SQL += " WHERE AddQuantity>0 ";
|
SQL += " WHERE ac.add_quantity>0 ";
|
||||||
}
|
}
|
||||||
if (type == 2)
|
if (type == 2)
|
||||||
{
|
{
|
||||||
SQL += " WHERE OutQuantity>0 ";
|
SQL += " WHERE ac.out_quantity>0 ";
|
||||||
}
|
}
|
||||||
if (type == 3)
|
if (type == 3)
|
||||||
{
|
{
|
||||||
|
@ -328,6 +327,7 @@ namespace DM_Weight.ViewModels
|
||||||
SQL += " WHERE type=4 ";
|
SQL += " WHERE type=4 ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
SQL += " ORDER BY ac.create_date desc,ac.drug_id";
|
||||||
|
|
||||||
|
|
||||||
//ChannelStocks = q.Select(it => { it.CheckQuantity = it.Quantity; return it; }).ToList();
|
//ChannelStocks = q.Select(it => { it.CheckQuantity = it.Quantity; return it; }).ToList();
|
||||||
|
|
|
@ -143,7 +143,7 @@ namespace DM_Weight.ViewModels
|
||||||
CollectDrugLst = SqlSugarHelper.Db.Queryable<CollectDrug>()
|
CollectDrugLst = SqlSugarHelper.Db.Queryable<CollectDrug>()
|
||||||
.Includes<DrugPleaseClaim>(cd => cd.drugPleaseClaim)
|
.Includes<DrugPleaseClaim>(cd => cd.drugPleaseClaim)
|
||||||
.Includes<DrugInfo>(cd => cd.drugInfo)
|
.Includes<DrugInfo>(cd => cd.drugInfo)
|
||||||
.Where(cd => cd.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
|
.Where(cd => cd.DeptName.Equals(ConfigurationManager.AppSettings["department"] ?? ""))
|
||||||
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugId"), (cd) => cd.drugInfo.DrugId.ToString() == SearchValue)
|
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugId"), (cd) => cd.drugInfo.DrugId.ToString() == SearchValue)
|
||||||
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (cd) => cd.drugInfo.DrugName.Contains(SearchValue))
|
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("DrugName"), (cd) => cd.drugInfo.DrugName.Contains(SearchValue))
|
||||||
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("PyCode"), (cd) => cd.drugInfo.PyCode.Contains(SearchValue))
|
.WhereIF(!String.IsNullOrEmpty(SearchValue) && SelectedItem.Code.Equals("PyCode"), (cd) => cd.drugInfo.PyCode.Contains(SearchValue))
|
||||||
|
|
Loading…
Reference in New Issue