Yang 3 years ago
commit c0d0f9d857

@ -28,14 +28,18 @@ namespace FactorySystemBll
.Where((a, b) => a.FTeamID == teamId)
.WhereIF(currUser != null, (a, b) => a.FFactoryID == currUser.FFactoryID)
.WhereIF(viewType > 0, (a, b) => a.FViewType == viewType)
.Select<object>("distinct a.*,b.FTypeID1,b.FTypeID2,b.FK3Code,b.FK3Name,b.FK3ShortCode").ToDictionaryList();
.Select<object>("distinct a.*,b.FTypeID1,b.FTypeID2,b.FK3Code,b.FK3Name,b.FK3ShortCode,b.FTestCode,b.FRelationCode,b.FRelationName,b.FSAPCode,b.FSAPDescription,b.FMaterialGroup,b.FMaterialType,b.FCustomerCode,b.FStoreHouse," +
"b.FBomEntry,b.FLineHouse,b.FProductDesc,b.FWorkCenter,b.FCraftExplain,b.FIidentifier,b.FGuaranteePeriod,b.FBStorageConditions,b.FSafetyStock,b.FTriggerRatio,b.FMinAmount,b.FMaxAmount,b.FYield,b.FFixedLoss,b.FTheoryYield," +
"b.FQualityTest1,b.FQualityTest2").ToDictionaryList();
if (viewType == 1) {
List<Dictionary<string, object>> viewList1 = db.Queryable<TFS_ViewMaterial, TFS_Material>((a, b) =>
new JoinQueryInfos(JoinType.Inner, a.FMaterialID == b.FID))
.Where((a, b) => a.FTeamID == teamId)
.WhereIF(currUser != null, (a, b) => a.FFactoryID == currUser.FFactoryID)
.WhereIF(viewType > 0, (a, b) => a.FViewType == 2)
.Select<object>("distinct a.*,b.FTypeID1,b.FTypeID2,b.FK3Code,b.FK3Name,b.FK3ShortCode").ToDictionaryList();
.Select<object>("distinct a.*,b.FTypeID1,b.FTypeID2,b.FK3Code,b.FK3Name,b.FK3ShortCode,b.FTestCode,b.FRelationCode,b.FRelationName,b.FSAPCode,b.FSAPDescription,b.FMaterialGroup,b.FMaterialType,b.FCustomerCode,b.FStoreHouse," +
"b.FBomEntry,b.FLineHouse,b.FProductDesc,b.FWorkCenter,b.FCraftExplain,b.FIidentifier,b.FGuaranteePeriod,b.FBStorageConditions,b.FSafetyStock,b.FTriggerRatio,b.FMinAmount,b.FMaxAmount,b.FYield,b.FFixedLoss,b.FTheoryYield," +
"b.FQualityTest1,b.FQualityTest2").ToDictionaryList();
List<TFS_MaterialInfo> Minfo = GetMaterialInfoList(viewList1.GroupBy(s => s["FMaterialID"]).Select(s => int.Parse(s.Key.ToString())).ToList(), "", "", currUserId);
if (Minfo.Count > 0) {
FGuaranteePeriod = Minfo[0].FGuaranteePeriod;

@ -362,5 +362,131 @@ namespace FactorySystemModel.SqlSugarModel
/// </summary>
[SugarColumn(IsIgnore = true)]
public int FLevelID { get; set; }
/// <summary>
/// Desc:客供料标识
/// Default:
/// Nullable:False
/// </summary>
public string FCustomerCode { get; set; }
/// <summary>
/// Desc:BOM录入情况
/// Default:
/// Nullable:False
/// </summary>
public string FBomEntry { get; set; }
/// <summary>
/// Desc:产品说明
/// Default:
/// Nullable:False
/// </summary>
public string FProductDesc { get; set; }
/// <summary>
/// Desc:标识符
/// Default:
/// Nullable:False
/// </summary>
public string FIidentifier { get; set; }
/// <summary>
/// Desc:保质期
/// Default:
/// Nullable:False
/// </summary>
public string FGuaranteePeriod { get; set; }
/// <summary>
/// Desc:存储条件
/// Default:
/// Nullable:False
/// </summary>
public string FBStorageConditions { get; set; }
/// <summary>
/// Desc:安全库存
/// Default:
/// Nullable:False
/// </summary>
public string FSafetyStock { get; set; }
/// <summary>
/// Desc:触发比例
/// Default:
/// Nullable:False
/// </summary>
public string FTriggerRatio { get; set; }
/// <summary>
/// Desc:最小量
/// Default:
/// Nullable:False
/// </summary>
public string FMinAmount { get; set; }
/// <summary>
/// Desc:最大量
/// Default:
/// Nullable:False
/// </summary>
public string FMaxAmount { get; set; }
/// <summary>
/// Desc:得率
/// Default:
/// Nullable:False
/// </summary>
public string FYield { get; set; }
/// <summary>
/// Desc:理论得率
/// Default:
/// Nullable:False
/// </summary>
public string FTheoryYield { get; set; }
/// <summary>
/// Desc:品质检验1
/// Default:
/// Nullable:False
/// </summary>
public string FQualityTest1 { get; set; }
/// <summary>
/// Desc:品质检验2
/// Default:
/// Nullable:False
/// </summary>
public string FQualityTest2 { get; set; }
/// <summary>
/// Desc:关联物料代码
/// Default:
/// Nullable:False
/// </summary>
public string FRelationCode { get; set; }
/// <summary>
/// Desc:关联物料名称
/// Default:
/// Nullable:False
/// </summary>
public string FRelationName { get; set; }
/// <summary>
/// Desc:SAP系统代码
/// Default:
/// Nullable:False
/// </summary>
public string FSAPCode { get; set; }
/// <summary>
/// Desc:SAP系统描述
/// Default:
/// Nullable:False
/// </summary>
public string FSAPDescription { get; set; }
}
}

@ -802,5 +802,75 @@ namespace FactorySystemModel.SqlSugarModel
/// </summary>
[SugarColumn(IsIgnore = true)]
public int FBomMaterialID { get; set; }
/// <summary>
/// Desc:MRP1.再订货点
/// Default:
/// Nullable:False
/// </summary>
public string FMRP1ReorderLocation { get; set; }
/// <summary>
/// Desc:MRP1.固定批量大小
/// Default:
/// Nullable:False
/// </summary>
public string FMRP1RegularBatchSize { get; set; }
/// <summary>
/// Desc:MRP1.最大库存水平
/// Default:
/// Nullable:False
/// </summary>
public string FMRP1MaxInventorySize { get; set; }
/// <summary>
/// Desc:MRP1.不计算缺料
/// Default:
/// Nullable:False
/// </summary>
public string FMRP1IgnoreLack { get; set; }
/// <summary>
/// Desc:MRP1.压膜
/// Default:
/// Nullable:False
/// </summary>
public string FMRP1laminated { get; set; }
/// <summary>
/// Desc:MRP1.安全库存带小样
/// Default:
/// Nullable:False
/// </summary>
public string FMRP1SafeStock { get; set; }
/// <summary>
/// Desc:MRP1.需求计算不考虑前置物料库存
/// Default:
/// Nullable:False
/// </summary>
public string FMRP1RequireCount { get; set; }
/// <summary>
/// Desc:MRP4.非连续标识
/// Default:
/// Nullable:False
/// </summary>
public string FMRP4DiscontinuousIidentifier { get; set; }
/// <summary>
/// Desc:MRP4.生效期
/// Default:
/// Nullable:False
/// </summary>
public string FMRP4EffectivePeriod { get; set; }
/// <summary>
/// Desc:MRP4.后续的物料
/// Default:
/// Nullable:False
/// </summary>
public string FMRP4FollowMaterial { get; set; }
}
}

Loading…
Cancel
Save