@@ -20,6 +20,7 @@ using NPOI.HSSF.UserModel;
using NPOI.SS.UserModel;
using NPOI.SS.Util;
using NPOI.XSSF.UserModel;
using Org.BouncyCastle.Asn1.Cms;
using System;
using System.Collections;
using System.ComponentModel.DataAnnotations.Schema;
@@ -67,7 +68,10 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
{
conModels.Add(new ConditionalModel() { FieldName = "a.Status", ConditionalType = ConditionalType.Like, FieldValue = dto.Status });
}
if (!string.IsNullOrEmpty(dto.Descritption))
{
conModels.Add(new ConditionalModel() { FieldName = "a.Descritption", ConditionalType = ConditionalType.Like, FieldValue = dto.Descritption });
}
#endregion
RefAsync<int> total = 0;
@@ -774,8 +778,8 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
deviceGoodsPositionList.Add(new BPA_DeviceGoodsPosition()
{
DeviceId = thisDevice.Id,
GoodsId = thisGoods.Id,
DeviceId = thisDevice? .Id,
GoodsId = thisGoods? .Id,
Id = Guid.NewGuid().ToString(),
Position1 = item.Position1,
Position2 = item.Position2,
@@ -836,13 +840,14 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
var thisName = goodTechnologyModel[i].Name == null ? cName : goodTechnologyModel[i].Name;
var data = await _db.Queryable<BPA_ProductFunction>()
.Where(x => x.Name == thisName && x.DeviceVersionKey == device.ProductVersionId).FirstAsync();
var data2 = await _db.Queryable<BPA_ProductFunctionAction>()
.Where(x => x.ActionName == goodTechnologyModel[i].Configuration && x.ProductFunctionId == data.Id).FirstAsync();
var data = await _db.Queryable<BPA_Technology>()
.Where(x => x.Name == thisName && x.DeviceVersionId == device.ProductVersionId).FirstAsync();
var data2 = new BPA_TechnologyAction();
if (data != null)
{
data2 = await _db.Queryable<BPA_TechnologyAction>()
.Where(x => x.ActionName == goodTechnologyModel[i].Configuration && x.TechnologyId == data.Id).FirstAsync();
}
var batching = new BPA_Batching();
var IsBatch = goodTechnologyModel[i].Name != "液体料";
@@ -905,8 +910,8 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
{
var v1 = json.FirstOrDefault(x => x.actionName == "主料名称");
var v2 = deviceGoodsPosition.FirstOrDefault(x => x.GoodsName == name2 && x.DeviceName == name1);
var jsondb = await _db.Queryable<BPA_ProductFunction Action>()
.Where(x => x.ProductFunction Id == thisItem.ChnologyId)
var jsondb = await _db.Queryable<BPA_Technology Action>()
.Where(x => x.Technology Id == thisItem.ChnologyId)
.ToListAsync();
foreach (var item in from item in jsondb let insertableJsondb = json.FirstOrDefault(x => x.technologyactionId == item.Id) where insertableJsondb == null select item)
@@ -915,7 +920,7 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
{
actionName = item.ActionName,
actionValue = item.ActionName == "主料重量" ? "0" : item.ActionValue,
chnologyId = item.ProductFunction Id,
chnologyId = item.Technology Id,
index = thisItem.Index,
technologyactionId = item.Id
@@ -978,11 +983,13 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services
}
if (value.ToString().Trim() == goodsName.Trim())
{
if (item2.IsDefined(typeof(ColumnAttribute), false))
{
ColumnAttribute attribute = (ColumnAttribute)item2.GetCustomAttribute(typeof(ColumnAttribute), false);
return attribute.Name;
}
ColumnAttribute attribute = (ColumnAttribute)item2.GetCustomAttribute(typeof(ColumnAttribute), false);
return attribute?.Name;
//if (item2.IsDefined(typeof(ColumnAttribute), false))
//{
// ColumnAttribute attribute = (ColumnAttribute)item2.GetCustomAttribute(typeof(ColumnAttribute), false);
// return attribute.Name;
//}
}
}
return "";