feat(hjgl): 完善焊接任务与质量管理流程
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
@@ -209,6 +210,36 @@ namespace BLL
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按焊材类型获取焊接耗材,1为焊丝,2为焊条。
|
||||
/// </summary>
|
||||
/// <param name="consumablesType">焊材类型:1焊丝,2焊条</param>
|
||||
/// <returns>焊接耗材基础项</returns>
|
||||
public static List<Model.BaseInfoItem> GetWeldingConsumables(string consumablesType)
|
||||
{
|
||||
if (consumablesType != "1" && consumablesType != "2")
|
||||
{
|
||||
throw new ArgumentException("焊材类型只能为1(焊丝)或2(焊条)");
|
||||
}
|
||||
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
// 与PC端焊材下拉框保持一致:ID作为值,名称作为显示文本,并按名称排序。
|
||||
return db.Base_Consumables
|
||||
.Where(x => x.ConsumablesType == consumablesType)
|
||||
.OrderBy(x => x.ConsumablesName)
|
||||
.ThenBy(x => x.ConsumablesCode)
|
||||
.ThenBy(x => x.ConsumablesId)
|
||||
.Select(x => new Model.BaseInfoItem
|
||||
{
|
||||
BaseInfoId = x.ConsumablesId,
|
||||
BaseInfoCode = x.ConsumablesCode,
|
||||
BaseInfoName = x.ConsumablesName,
|
||||
Remark = x.Remark
|
||||
}).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取探伤类型
|
||||
/// </summary>
|
||||
@@ -1016,5 +1047,32 @@ namespace BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 按条码关键字查询入库条码明细。空关键字不返回全表数据。
|
||||
/// </summary>
|
||||
public static Tuple<List<Model.Tw_InputDetailBarCode>, int> GetInputDetailBarCodes(
|
||||
string barCodeKeyword, int pageIndex, int pageSize)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(barCodeKeyword))
|
||||
{
|
||||
return Tuple.Create(new List<Model.Tw_InputDetailBarCode>(), 0);
|
||||
}
|
||||
|
||||
string keyword = barCodeKeyword.Trim();
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var query = db.Tw_InputDetailBarCode
|
||||
.Where(x => x.BarCode != null && x.BarCode.Contains(keyword));
|
||||
int totalCount = query.Count();
|
||||
var data = query
|
||||
.OrderBy(x => x.BarCode)
|
||||
.ThenBy(x => x.Id)
|
||||
.Skip((pageIndex - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToList();
|
||||
return Tuple.Create(data, totalCount);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user