去除引用common.props
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Tnb.PerMgr
|
||||
{
|
||||
private readonly ISqlSugarRepository<PerProcessParamType> _repository;
|
||||
private readonly IUserManager _userManager;
|
||||
|
||||
|
||||
public PerProcessParamTypeService(ISqlSugarRepository<PerProcessParamType> repository, IUserManager userManager)
|
||||
{
|
||||
_userManager = userManager;
|
||||
@@ -40,27 +40,27 @@ namespace Tnb.PerMgr
|
||||
//List<PerProcessParamType> perProcessParamTypes = await _repository.GetListAsync(x => x.equip_type_id == equipTypeId);
|
||||
var result = await db.Queryable<PerProcessParamType>()
|
||||
.Where(x => x.equip_type_id == equipTypeId)
|
||||
.OrderBy(x=>x.ordinal)
|
||||
.OrderBy(x => x.ordinal)
|
||||
.Select(x => new
|
||||
{
|
||||
tab_id = x.id,
|
||||
tab_name = x.name,
|
||||
daq_list = SqlFunc.Subqueryable<EqpDaq>().Where(a=>a.equip_id==equipId).ToList<ProcessParamTypeDaqListOutput>(a=>new ProcessParamTypeDaqListOutput
|
||||
daq_list = SqlFunc.Subqueryable<EqpDaq>().Where(a => a.equip_id == equipId).ToList<ProcessParamTypeDaqListOutput>(a => new ProcessParamTypeDaqListOutput
|
||||
{
|
||||
id = a.id,
|
||||
label_name = a.label_name,
|
||||
}),
|
||||
children = SqlFunc.Subqueryable<PerProcessParam>()
|
||||
.LeftJoin<PerToleranceCategory>((y,z)=>y.tolerance_category_id==z.id)
|
||||
.Where(y=>y.process_param_type_id==x.id)
|
||||
.OrderBy((y,z)=>y.ordinal)
|
||||
.ToList<ProcessParamTypeChildrenOutput>((y,z)=>new ProcessParamTypeChildrenOutput
|
||||
{
|
||||
process_param_id = y.id,
|
||||
name = y.name,
|
||||
upper_value = z.upper_value,
|
||||
lower_value = z.lower_value
|
||||
}),
|
||||
.LeftJoin<PerToleranceCategory>((y, z) => y.tolerance_category_id == z.id)
|
||||
.Where(y => y.process_param_type_id == x.id)
|
||||
.OrderBy((y, z) => y.ordinal)
|
||||
.ToList<ProcessParamTypeChildrenOutput>((y, z) => new ProcessParamTypeChildrenOutput
|
||||
{
|
||||
process_param_id = y.id,
|
||||
name = y.name,
|
||||
upper_value = z.upper_value,
|
||||
lower_value = z.lower_value
|
||||
}),
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
@@ -105,10 +105,10 @@ namespace Tnb.PerMgr
|
||||
};
|
||||
await db.Insertable<PerProcessParamEditRecord>(record).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (item==null || string.IsNullOrEmpty(item.id))
|
||||
|
||||
if (item == null || string.IsNullOrEmpty(item.id))
|
||||
{
|
||||
PerProcessStandardsD insertObj = new PerProcessStandardsD()
|
||||
{
|
||||
@@ -116,20 +116,20 @@ namespace Tnb.PerMgr
|
||||
process_param_id = item?.process_param_id ?? "",
|
||||
process_standards_id = item?.process_standards_id ?? "",
|
||||
process_param_type_id = item?.process_param_type_id ?? "",
|
||||
daq_id = item?.daq_id??"",
|
||||
daq_id = item?.daq_id ?? "",
|
||||
};
|
||||
|
||||
|
||||
insertIds.Add(insertObj.id);
|
||||
await db.Insertable<PerProcessStandardsD>(insertObj).ExecuteCommandAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
await db.Updateable<PerProcessStandardsD>()
|
||||
.SetColumns(x=>x.value==item.value)
|
||||
.SetColumns(x=>x.daq_id==item.daq_id)
|
||||
.Where(x=>x.id==item.id).ExecuteCommandAsync();
|
||||
.SetColumns(x => x.value == item.value)
|
||||
.SetColumns(x => x.daq_id == item.daq_id)
|
||||
.Where(x => x.id == item.id).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
List<string> notDeleteIds = input.Select(x => x.id).ToList();
|
||||
@@ -138,9 +138,9 @@ namespace Tnb.PerMgr
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
if (!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||
|
||||
return result.IsSuccess ? "保存成功" : result.ErrorMessage;
|
||||
}
|
||||
@@ -156,31 +156,31 @@ namespace Tnb.PerMgr
|
||||
|
||||
var result = await db.Queryable<PerProcessParamType>()
|
||||
.Where(a => a.equip_type_id == equipTypeId)
|
||||
.OrderBy(a=>a.ordinal)
|
||||
.OrderBy(a => a.ordinal)
|
||||
.Select(a => new
|
||||
{
|
||||
tab_id = a.id,
|
||||
tab_name = a.name,
|
||||
daq_list = SqlFunc.Subqueryable<EqpDaq>().Where(e=>e.equip_id==perProcessStandardsH.equip_id).ToList<ProcessParamTypeDaqListOutput>(e=>new ProcessParamTypeDaqListOutput
|
||||
daq_list = SqlFunc.Subqueryable<EqpDaq>().Where(e => e.equip_id == perProcessStandardsH.equip_id).ToList<ProcessParamTypeDaqListOutput>(e => new ProcessParamTypeDaqListOutput
|
||||
{
|
||||
id = e.id,
|
||||
label_name = e.label_name,
|
||||
}),
|
||||
children = SqlFunc.Subqueryable<PerProcessStandardsD>()
|
||||
.LeftJoin<PerProcessParam>((b,c)=>b.process_param_id==c.id)
|
||||
.LeftJoin<PerToleranceCategory>((b,c,d)=>c.tolerance_category_id==d.id)
|
||||
.Where((b,c,d)=>c.process_param_type_id==a.id && b.process_standards_id==id)
|
||||
.OrderBy((b,c,d)=>c.ordinal)
|
||||
.ToList<ProcessParamTypeChildrenOutput>((b,c,d)=>new ProcessParamTypeChildrenOutput
|
||||
{
|
||||
id = b.id,
|
||||
process_param_id = c.id,
|
||||
name = c.name,
|
||||
value = b.value,
|
||||
upper_value = d.upper_value,
|
||||
lower_value = d.lower_value,
|
||||
daq_id = b.daq_id
|
||||
}),
|
||||
.LeftJoin<PerProcessParam>((b, c) => b.process_param_id == c.id)
|
||||
.LeftJoin<PerToleranceCategory>((b, c, d) => c.tolerance_category_id == d.id)
|
||||
.Where((b, c, d) => c.process_param_type_id == a.id && b.process_standards_id == id)
|
||||
.OrderBy((b, c, d) => c.ordinal)
|
||||
.ToList<ProcessParamTypeChildrenOutput>((b, c, d) => new ProcessParamTypeChildrenOutput
|
||||
{
|
||||
id = b.id,
|
||||
process_param_id = c.id,
|
||||
name = c.name,
|
||||
value = b.value,
|
||||
upper_value = d.upper_value,
|
||||
lower_value = d.lower_value,
|
||||
daq_id = b.daq_id
|
||||
}),
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user