😎完成产品管理BOM同步,物料同步逻辑更改
This commit is contained in:
parent
ffb7f1073c
commit
5b0d28bba5
@ -14,7 +14,7 @@ namespace Vistar.Application.Entity;
|
||||
/// </summary>
|
||||
[SugarTable("ConfigurationData","")]
|
||||
[Tenant("启威星 1.94.4.74")]
|
||||
public class ConfigurationData : EntityBase
|
||||
public class ConfigurationData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
|
@ -14,7 +14,7 @@ namespace Vistar.Application.Entity;
|
||||
/// </summary>
|
||||
[SugarTable("OBJ110","产品管理")]
|
||||
[Tenant("启威星 1.94.4.74")]
|
||||
public class Obj110 : EntityBase
|
||||
public class Obj110
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
@ -709,5 +709,40 @@ public class Obj110 : EntityBase
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004887", ColumnDescription = "", Length = -1)]
|
||||
public string? fld004887 { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004895", ColumnDescription = "", Length = -1)]
|
||||
public long? fld004895 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004942", ColumnDescription = "", Length = -1)]
|
||||
public float? fld004942 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004943", ColumnDescription = "", Length = -1)]
|
||||
public string? fld004943 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004944", ColumnDescription = "", Length = -1)]
|
||||
public long? fld004944 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004944_Rec", ColumnDescription = "", Length = -1)]
|
||||
public string? fld004944_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004945", ColumnDescription = "", Length = -1)]
|
||||
public DateTime? fld004945 { get; set; }
|
||||
}
|
||||
|
273
admin.net.pro/Admin.NET/Vistar.Application/Entity/Obj118.cs
Normal file
273
admin.net.pro/Admin.NET/Vistar.Application/Entity/Obj118.cs
Normal file
@ -0,0 +1,273 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Core;
|
||||
using SqlSugar;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
namespace Vistar.Application.Entity;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarTable("OBJ118","")]
|
||||
[Tenant("启威星 1.94.4.74")]
|
||||
public class Obj118
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Required]
|
||||
[SugarColumn(ColumnName = "idRecord", IsIdentity = true, ColumnDescription = "", IsPrimaryKey = true)]
|
||||
public long idRecord { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CheckedStatus", ColumnDescription = "")]
|
||||
public bool? CheckedStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "VersionIndex", ColumnDescription = "")]
|
||||
public int? VersionIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "IsLatestVersion", ColumnDescription = "")]
|
||||
public bool? IsLatestVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CreatedDate", ColumnDescription = "")]
|
||||
public DateTime? CreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "VersionCreatedDate", ColumnDescription = "")]
|
||||
public DateTime? VersionCreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "dateModified", ColumnDescription = "")]
|
||||
public DateTime? dateModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "UserCreatedId", ColumnDescription = "")]
|
||||
public long? UserCreatedId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "VersionUserCreatedId", ColumnDescription = "")]
|
||||
public long? VersionUserCreatedId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "UserModifiedId", ColumnDescription = "")]
|
||||
public long? UserModifiedId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "RecordGuid", ColumnDescription = "", Length = 40)]
|
||||
public string? RecordGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "isVisibilityNormal", ColumnDescription = "")]
|
||||
public bool? isVisibilityNormal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "deleted", ColumnDescription = "")]
|
||||
public bool? deleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "SubObjectGuid", ColumnDescription = "", Length = 40)]
|
||||
public string? SubObjectGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "PreviousStatus", ColumnDescription = "")]
|
||||
public bool? PreviousStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "revision", ColumnDescription = "", Length = 10)]
|
||||
public string? revision { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Record_image160_160", ColumnDescription = "")]
|
||||
public byte[]? Record_image160_160 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Record_Image320_240", ColumnDescription = "")]
|
||||
public byte[]? Record_Image320_240 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "Record_ImageMax", ColumnDescription = "")]
|
||||
public byte[]? Record_ImageMax { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "_System_objNBS", ColumnDescription = "", Length = 50)]
|
||||
public string? _System_objNBS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "_System_ObjDescription", ColumnDescription = "", Length = 200)]
|
||||
public string? _System_ObjDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "_System_Effectivity_Begin", ColumnDescription = "")]
|
||||
public DateTime? _System_Effectivity_Begin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "_System_Effectivity_End", ColumnDescription = "")]
|
||||
public DateTime? _System_Effectivity_End { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "CheckedOutPc", ColumnDescription = "", Length = 255)]
|
||||
public string? CheckedOutPc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "StageId", ColumnDescription = "")]
|
||||
public long? StageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ProjectManager", ColumnDescription = "")]
|
||||
public long? ProjectManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "ProjectManager_Rec", ColumnDescription = "")]
|
||||
public long? ProjectManager_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "EnableNotifications", ColumnDescription = "")]
|
||||
public bool? EnableNotifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "GroupObjId", ColumnDescription = "")]
|
||||
public long? GroupObjId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "_CheckOutInProgress", ColumnDescription = "")]
|
||||
public bool? _CheckOutInProgress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "_System_CurrentStage", ColumnDescription = "", Length = 250)]
|
||||
public string? _System_CurrentStage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Required]
|
||||
[SugarColumn(ColumnName = "_System_ObjNbsAuto", ColumnDescription = "", Length = 50)]
|
||||
public string _System_ObjNbsAuto { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "isReleasedVersion", ColumnDescription = "")]
|
||||
public bool? isReleasedVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "_System_WebLink", ColumnDescription = "", Length = 500)]
|
||||
public string? _System_WebLink { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "_System_ObjParentProcess", ColumnDescription = "")]
|
||||
public long? _System_ObjParentProcess { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "_System_ObjParentProcess_Rec", ColumnDescription = "", Length = 40)]
|
||||
public string? _System_ObjParentProcess_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004638", ColumnDescription = "")]
|
||||
public long? fld004638 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004638_Rec", ColumnDescription = "", Length = -1)]
|
||||
public string? fld004638_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004692", ColumnDescription = "")]
|
||||
public long? fld004692 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004692_Rec", ColumnDescription = "", Length = -1)]
|
||||
public string? fld004692_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004693", ColumnDescription = "")]
|
||||
public DateTime? fld004693 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "fld004694", ColumnDescription = "", Length = -1)]
|
||||
public string? fld004694 { get; set; }
|
||||
|
||||
}
|
@ -0,0 +1,201 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Core;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Vistar.Application.Service.MaterialManagement.Dto;
|
||||
public class BomPageProductManagementInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 子物料描述
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子物料编码
|
||||
/// </summary>
|
||||
public string? PartNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父Guid
|
||||
/// </summary>
|
||||
public string ParentGuid { get; set; }
|
||||
|
||||
public string ChildGuid { get; set; }
|
||||
|
||||
public long ChildObjID { get; set; }
|
||||
|
||||
public long ConfigId { get; set; }
|
||||
|
||||
public int? childVersion { get; set; }
|
||||
|
||||
public int ParentVersion { get; set; }
|
||||
|
||||
public bool? isDeleted { get; set; }
|
||||
|
||||
public long ConfigInstanceID { get; set; }
|
||||
|
||||
public long? ChildConfigID { get; set; }
|
||||
|
||||
public long? CreatedUserID { get; set; }
|
||||
|
||||
public long? ModifiedUserID { get; set; }
|
||||
|
||||
public DateTime? CreatedDate { get; set; }
|
||||
|
||||
public DateTime? ModifiedDate { get; set; }
|
||||
|
||||
public double? Quantity { get; set; }
|
||||
|
||||
public DateTime? EffectiveFrom { get; set; }
|
||||
|
||||
public DateTime? EffectiveTo { get; set; }
|
||||
|
||||
public string? Revision { get; set; }
|
||||
|
||||
public string? Marker { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
|
||||
public long? ConfigParent { get; set; }
|
||||
|
||||
public long? OrderIndex { get; set; }
|
||||
|
||||
|
||||
public string? _conf_24_tralala { get; set; }
|
||||
|
||||
public string? _conf_28_hello { get; set; }
|
||||
|
||||
public string? _conf_28_sss { get; set; }
|
||||
|
||||
public string? conf_29_sss { get; set; }
|
||||
|
||||
public byte[]? RecordImage { get; set; }
|
||||
|
||||
public string? Folder { get; set; }
|
||||
|
||||
public int? CheckedStatus { get; set; }
|
||||
|
||||
public string? _TestConfigurimi_tralala { get; set; }
|
||||
|
||||
public string? _TestConfigurimi_asfasd { get; set; }
|
||||
|
||||
public long ParentObjectID { get; set; }
|
||||
|
||||
public string? conf_30_somefields { get; set; }
|
||||
|
||||
public string? conf_30_TestNBS { get; set; }
|
||||
|
||||
public DateTime? conf_30_testDate { get; set; }
|
||||
|
||||
public long? conf_30_testNumber { get; set; }
|
||||
|
||||
public string? conf_30_TestList { get; set; }
|
||||
|
||||
public long? conf_30_testListNo { get; set; }
|
||||
|
||||
public double? conf_30_testListdecimal { get; set; }
|
||||
|
||||
public string? conf_33_Comments { get; set; }
|
||||
|
||||
//public string? conf_33_SerialNo. { get; set; }
|
||||
public string? conf_33_SerialNo { get; set; }
|
||||
|
||||
public long? conf_33_TestContacts2 { get; set; }
|
||||
|
||||
public long? conf_33_TestContacts2_Rec { get; set; }
|
||||
|
||||
public string? conf_6_Comments { get; set; }
|
||||
|
||||
public string? conf_6_SerialNumber { get; set; }
|
||||
|
||||
public int? ChildSwFileType { get; set; }
|
||||
|
||||
public int? ParentSwFileType { get; set; }
|
||||
|
||||
public string? conf_19_Serial { get; set; }
|
||||
|
||||
public string? conf_19_Comments { get; set; }
|
||||
|
||||
public string? conf_21_Comments { get; set; }
|
||||
|
||||
public string? conf_19_testList { get; set; }
|
||||
|
||||
public string? conf_21_BuyStage { get; set; }
|
||||
|
||||
public string? conf_19_testconfigfieldnbs { get; set; }
|
||||
|
||||
public string? conf_32_Comments { get; set; }
|
||||
|
||||
public bool? isSuppressed { get; set; }
|
||||
|
||||
public bool isAddedFromSW { get; set; }
|
||||
|
||||
public double? QtyManual { get; set; }
|
||||
|
||||
public long? SWPDMXrefId { get; set; }
|
||||
|
||||
public string? SwConfiguration { get; set; }
|
||||
|
||||
public bool inContext { get; set; }
|
||||
|
||||
public string PrimaryFile { get; set; }
|
||||
|
||||
public bool bKeepQuantityInSync { get; set; }
|
||||
|
||||
public string? BOMGuid { get; set; }
|
||||
|
||||
public bool IsPDMReference { get; set; }
|
||||
|
||||
public string? BOMGuidCopiedFrom { get; set; }
|
||||
|
||||
public int? SWPDMXRefConfigurationID { get; set; }
|
||||
|
||||
public string? SWPDMXRefConfigurationName { get; set; }
|
||||
|
||||
public string? fld004492 { get; set; }
|
||||
|
||||
public string? fld004670 { get; set; }
|
||||
|
||||
public string? fld004671 { get; set; }
|
||||
|
||||
public string? fld004691 { get; set; }
|
||||
|
||||
public string? fld004936 { get; set; }
|
||||
|
||||
public string? fld004937 { get; set; }
|
||||
|
||||
public string? fld004938 { get; set; }
|
||||
|
||||
public string? fld004939 { get; set; }
|
||||
|
||||
public string? fld004940 { get; set; }
|
||||
|
||||
public string? fld004941 { get; set; }
|
||||
|
||||
public double? fld004994 { get; set; }
|
||||
|
||||
public string? fld004995 { get; set; }
|
||||
|
||||
public string? fld004996 { get; set; }
|
||||
|
||||
public string? fld004997 { get; set; }
|
||||
|
||||
public double? fld005017 { get; set; }
|
||||
|
||||
public string? fld005018 { get; set; }
|
||||
|
||||
public string? fld005019 { get; set; }
|
||||
|
||||
public string? fld005020 { get; set; }
|
||||
}
|
@ -4,8 +4,10 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -13,10 +15,449 @@ using System.Threading.Tasks;
|
||||
namespace Vistar.Application.Service.MaterialManagement.Dto;
|
||||
public class ProductManagementBomOutput
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ParentGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ChildGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long ChildObjID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? childVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ParentVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? isDeleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long ConfigInstanceID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? ChildConfigID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? CreatedUserID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? ModifiedUserID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? CreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? ModifiedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? Quantity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? EffectiveFrom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? EffectiveTo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? Revision { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? Marker { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? ConfigParent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? OrderIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? PartNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _conf_24_tralala { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _conf_28_hello { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _conf_28_sss { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_29_sss { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public byte[]? RecordImage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? Folder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? CheckedStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _TestConfigurimi_tralala { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _TestConfigurimi_asfasd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Required]
|
||||
public long ParentObjectID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_30_somefields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_30_TestNBS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? conf_30_testDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? conf_30_testNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_30_TestList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? conf_30_testListNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? conf_30_testListdecimal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_33_Comments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
//public string? conf_33_SerialNo. { get; set; }
|
||||
public string? conf_33_SerialNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? conf_33_TestContacts2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? conf_33_TestContacts2_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_6_Comments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_6_SerialNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? ChildSwFileType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? ParentSwFileType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_19_Serial { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_19_Comments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_21_Comments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_19_testList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_21_BuyStage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_19_testconfigfieldnbs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? conf_32_Comments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? isSuppressed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool isAddedFromSW { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? QtyManual { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? SWPDMXrefId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? SwConfiguration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool inContext { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Required]
|
||||
public string PrimaryFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool bKeepQuantityInSync { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? BOMGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Required]
|
||||
public bool IsPDMReference { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? BOMGuidCopiedFrom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? SWPDMXRefConfigurationID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? SWPDMXRefConfigurationName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004492 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004670 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004671 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004691 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004936 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004937 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004938 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004939 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004940 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004941 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? fld004994 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004995 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004996 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004997 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? fld005017 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld005018 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld005019 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld005020 { get; set; }
|
||||
}
|
||||
|
||||
public class ProductManagementBomTypeOutput
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
//public class ProductManagementBomTypeOutput
|
||||
//{
|
||||
// public long Id { get; set; }
|
||||
// public string Name { get; set; }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@ -12,503 +14,244 @@ public class ProductManagementOutput
|
||||
{
|
||||
public long idRecord { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? CheckedStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int? VersionIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? IsLatestVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? CreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? VersionCreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? dateModified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? UserCreatedId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? VersionUserCreatedId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? UserModifiedId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? RecordGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? isVisibilityNormal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? deleted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? SubObjectGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? PreviousStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? revision { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public byte[]? Record_image160_160 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public byte[]? Record_Image320_240 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public byte[]? Record_ImageMax { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? _System_objNBS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string? _System_ObjDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? _System_Effectivity_Begin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? _System_Effectivity_End { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? CheckedOutPc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? GroupObjId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? _CheckOutInProgress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? EnableNotifications { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _system_objConfigurationName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? _system_objConfigurationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _system_objConfigurationGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ShowBomFromConfiguration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string _System_ObjNbsAuto { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _System_DerivedFrom { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _System_DerivedFrom_RecordGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? _system_objLinkedCompare { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? isReleasedVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? _System_WebLink { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? LinkDrw { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? ParentRecordGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004283 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004284 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004285 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004286 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? fld004287 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004287_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004288 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004289 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004290 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004291 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004311 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004312 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004313 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004314 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004315 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004316 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004317 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004318 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004319 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004320 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004321 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004322 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004323 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004324 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004325 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? fld004326 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004326_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004327 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料描述
|
||||
/// </summary>
|
||||
public string? fld004484 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004485 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? fld004486 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004487 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? fld004488 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004489 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004490 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004491 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? fld004493 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004493_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime? fld004494 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? fld004495 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004495_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? fld004496 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? fld004497 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004497_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004498 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? fld004499 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long? fld004500 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004500_Rec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004501 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004879 { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004880 { get; set; }
|
||||
public DateTime? fld004629 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004887 { get; set; }
|
||||
public string? fld004630 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004882 { get; set; }
|
||||
public DateTime? fld004631 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004881 { get; set; }
|
||||
public DateTime? fld004632 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004895 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004873 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004872 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004698 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004699 { get; set; }
|
||||
|
||||
public string? fld004700 { get; set; }
|
||||
|
||||
public long? fld004859 { get; set; }
|
||||
|
||||
public string? fld004859_Rec { get; set; }
|
||||
|
||||
public long? fld004860 { get; set; }
|
||||
|
||||
public string? fld004860_Rec { get; set; }
|
||||
|
||||
public string? fld004861 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004876 { get; set; }
|
||||
public DateTime? fld004862 { get; set; }
|
||||
|
||||
public DateTime? fld004863 { get; set; }
|
||||
|
||||
public long? fld004864 { get; set; }
|
||||
|
||||
public string? fld004864_Rec { get; set; }
|
||||
|
||||
public DateTime? fld004865 { get; set; }
|
||||
|
||||
public string? fld004872 { get; set; }
|
||||
|
||||
public string? fld004873 { get; set; }
|
||||
|
||||
public double? fld004876 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004877 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? fld004699 { get; set; }
|
||||
|
||||
public string? fld004878 { get; set; }
|
||||
|
||||
public string? fld004879 { get; set; }
|
||||
|
||||
public string? fld004880 { get; set; }
|
||||
|
||||
public string? fld004881 { get; set; }
|
||||
|
||||
public string? fld004882 { get; set; }
|
||||
|
||||
public string? fld004887 { get; set; }
|
||||
|
||||
public long? fld004895 { get; set; }
|
||||
|
||||
public float? fld004942 { get; set; }
|
||||
|
||||
public string? fld004943 { get; set; }
|
||||
|
||||
public long? fld004944 { get; set; }
|
||||
|
||||
public string? fld004944_Rec { get; set; }
|
||||
|
||||
public DateTime? fld004945 { get; set; }
|
||||
|
||||
}
|
||||
|
@ -28,6 +28,15 @@ using NewLife.Configuration;
|
||||
using Furion;
|
||||
using Admin.NET.Core.Service;
|
||||
using Vistar.Application.Util;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Vistar.Application.SapService.Dto;
|
||||
using DocumentFormat.OpenXml.ExtendedProperties;
|
||||
using Vistar.Application.SapService;
|
||||
using static SKIT.FlurlHttpClient.Wechat.Api.Models.ComponentTCBBatchCreateContainerServiceVersionRequest.Types;
|
||||
using DocumentFormat.OpenXml.Office2010.ExcelAc;
|
||||
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
|
||||
using static COSXML.Model.Object.SelectObjectResult;
|
||||
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
|
||||
|
||||
|
||||
|
||||
@ -43,17 +52,25 @@ public class ProductManagementService : IDynamicApiController, ITransient
|
||||
private readonly SqlSugarRepository<Configurations> _configurationsRep;
|
||||
private readonly SysConfigService _sysConfigService;
|
||||
private readonly SqlSugarRepository<ConfigurationData> _configurationDataRep;
|
||||
public SapService.SapService _sapBomService;
|
||||
public SqlSugarRepository<Obj118> _obj118Rep;
|
||||
|
||||
public ProductManagementService(
|
||||
SqlSugarRepository<Obj110> obj110Rep,
|
||||
SqlSugarRepository<Configurations> configurationsRep,
|
||||
SysConfigService sysConfigService,
|
||||
SqlSugarRepository<ConfigurationData> configurationDataRep)
|
||||
SqlSugarRepository<ConfigurationData> configurationDataRep,
|
||||
SapService.SapService sapBomService,
|
||||
SqlSugarRepository<Obj118> obj118Rep
|
||||
|
||||
)
|
||||
{
|
||||
_obj110Rep = obj110Rep;
|
||||
_configurationsRep = configurationsRep;
|
||||
_sysConfigService = sysConfigService;
|
||||
_configurationDataRep = configurationDataRep;
|
||||
_sapBomService = sapBomService;
|
||||
_obj118Rep = obj118Rep;
|
||||
}
|
||||
/// <summary>
|
||||
/// 分页查询产品管理
|
||||
@ -65,34 +82,35 @@ public class ProductManagementService : IDynamicApiController, ITransient
|
||||
//[Authorize(AuthenticationSchemes = SignatureAuthenticationDefaults.AuthenticationScheme)]
|
||||
public async Task<SqlSugarPagedList<ProductManagementOutput>> Page(PageProductManagementInput input)
|
||||
{
|
||||
var query = _obj110Rep.AsQueryable()
|
||||
var query = await _obj110Rep.AsQueryable()
|
||||
.Where(x => x.CheckedStatus == false && x.deleted == false && x.IsLatestVersion == true)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input._System_objNBS), u => u._System_objNBS.Contains(input._System_objNBS.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.fld004484), u => u.fld004484.Contains(input.fld004484.Trim()))
|
||||
.WhereIF(input.fld004494Range != null && input.fld004494Range.Length == 2, u => u.fld004494 >= input.fld004494Range[0] && u.fld004494 <= input.fld004494Range[1])
|
||||
.Select<ProductManagementOutput>();
|
||||
return await query.ToPagedListAsync(input.Page, input.PageSize);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取BOM类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<List<ProductManagementBomTypeOutput>> BomType()
|
||||
{
|
||||
var BomType = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 110).ToListAsync();
|
||||
var BomTypeData = new List<ProductManagementBomTypeOutput>();
|
||||
for (int i = 0; i < BomType.Count; i++)
|
||||
{
|
||||
var data = new ProductManagementBomTypeOutput()
|
||||
{
|
||||
Id = BomType[i].ConfigID,
|
||||
Name = BomType[i].ConfigLabel
|
||||
};
|
||||
BomTypeData.Add(data);
|
||||
}
|
||||
return BomTypeData;
|
||||
.Select<ProductManagementOutput>()
|
||||
.ToPagedListAsync(input.Page, input.PageSize);
|
||||
return query;
|
||||
}
|
||||
///// <summary>
|
||||
///// 获取BOM类型
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//[HttpGet]
|
||||
//public async Task<List<ProductManagementBomTypeOutput>> BomType()
|
||||
//{
|
||||
// var BomType = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 110).ToListAsync();
|
||||
// var BomTypeData = new List<ProductManagementBomTypeOutput>();
|
||||
// for (int i = 0; i < BomType.Count; i++)
|
||||
// {
|
||||
// var data = new ProductManagementBomTypeOutput()
|
||||
// {
|
||||
// Id = BomType[i].ConfigID,
|
||||
// Name = BomType[i].ConfigLabel
|
||||
// };
|
||||
// BomTypeData.Add(data);
|
||||
// }
|
||||
// return BomTypeData;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 产品管理-同步到 SAP
|
||||
@ -100,7 +118,7 @@ public class ProductManagementService : IDynamicApiController, ITransient
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "syncToSAP"), HttpPost]
|
||||
[DisplayName("产品管理-同步到 SAP")]
|
||||
public async Task<SapMaterialOutput> SyncToSAP(ProductManagementBaseInput input)
|
||||
public async Task<SapOutput> SyncToSAP(ProductManagementBaseInput input)
|
||||
{
|
||||
|
||||
const string lengthError = "物料编码长度大于40,请检查!";
|
||||
@ -118,153 +136,179 @@ public class ProductManagementService : IDynamicApiController, ITransient
|
||||
.Where(it => it.idRecord == input.idRecord)
|
||||
.ExecuteCommandAsync().ConfigureAwait(false);
|
||||
|
||||
return new SapMaterialOutput
|
||||
return new SapOutput
|
||||
{
|
||||
code = "失败",
|
||||
msg = lengthError,
|
||||
result = lengthError
|
||||
};
|
||||
}
|
||||
try
|
||||
|
||||
//获取时间戳精确到毫秒,sap要求每次调用生成不重复guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
|
||||
var sapMaterialInput = new SapMaterialInput()
|
||||
{
|
||||
var httpClientHandler = new HttpClientHandler
|
||||
{
|
||||
ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true,
|
||||
ClientCertificateOptions = ClientCertificateOption.Manual
|
||||
};
|
||||
Reqkeyid = "",
|
||||
Businessid = "",
|
||||
Messageid = "",
|
||||
Sndprn = "PLM",
|
||||
Rcvprn = "SAP",
|
||||
Requser = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName),
|
||||
Note1 = "",
|
||||
Note2 = "",
|
||||
Note3 = "",
|
||||
Zwbid = millisecondTimestamp,
|
||||
Matnr = input._System_objNBS,
|
||||
Mbrsh = input.fld004323,
|
||||
Mtart = input.fld004324,
|
||||
Maktx = input.fld004484,
|
||||
Meins = input.fld004861,
|
||||
Matkl = input.fld004485,
|
||||
Bismt = input.fld004880,
|
||||
Groes = input.fld004879,
|
||||
Normt = input.fld004887,
|
||||
Ferth = input.fld004882,
|
||||
Zeinr = input.fld004881,
|
||||
Mstae = input.fld004699,
|
||||
Raube = input.fld004877,
|
||||
Mhdrz = input.fld004876,
|
||||
Mhdhb = input.fld004895,
|
||||
Werks = input.fld004325,
|
||||
Beskz = input.fld004490,
|
||||
Sobsl = input.fld004491,
|
||||
Schgt = input.fld004873,
|
||||
Rgekz = input.fld004872,
|
||||
Zbom = input.fld004698
|
||||
};
|
||||
|
||||
// 使用 HttpClientHandler 创建 HttpClient
|
||||
using (var httpClient = new HttpClient(httpClientHandler))
|
||||
{
|
||||
// 设置基本身份验证信息
|
||||
var username = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName);
|
||||
var password = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapPassword);
|
||||
var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{username}:{password}"));
|
||||
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", credentials);
|
||||
|
||||
// 定义命名空间
|
||||
XNamespace soapenv = "http://schemas.xmlsoap.org/soap/envelope/";
|
||||
XNamespace urn = "urn:sap-com:document:sap:soap:functions:mc-style";
|
||||
//获取时间戳精确到毫秒,sap要求每次调用生成不重复guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
// 创建 SOAP 请求的 XML 内容
|
||||
XElement envelope = new XElement(soapenv + "Envelope",
|
||||
new XElement(soapenv + "Header"),
|
||||
new XElement(soapenv + "Body",
|
||||
new XElement(urn + "Zmmfm012",
|
||||
new XElement("IsReq",
|
||||
new XElement("Reqkeyid"),
|
||||
new XElement("Businessid"),
|
||||
new XElement("Messageid"),
|
||||
new XElement("Sndprn", "plm"),
|
||||
new XElement("Rcvprn", "sap"),
|
||||
new XElement("Requser", "111"),
|
||||
new XElement("Note1"),
|
||||
new XElement("Note2"),
|
||||
new XElement("Note3")
|
||||
),
|
||||
new XElement("ItData",
|
||||
new XElement("item",
|
||||
new XElement("Zwbid", millisecondTimestamp),
|
||||
new XElement("Matnr", input._System_objNBS),
|
||||
new XElement("Mbrsh", input.fld004323),
|
||||
new XElement("Mtart", input.fld004324),
|
||||
new XElement("Maktx", input.fld004484),
|
||||
new XElement("Meins", input.fld004861),
|
||||
new XElement("Matkl", input.fld004485),
|
||||
new XElement("Bismt", input.fld004880),
|
||||
new XElement("Groes", input.fld004879),
|
||||
new XElement("Normt", input.fld004887),
|
||||
new XElement("Ferth", input.fld004882),
|
||||
new XElement("Zeinr", input.fld004881),
|
||||
new XElement("Mstae", input.fld004699),
|
||||
new XElement("Raube", input.fld004877),
|
||||
new XElement("Mhdrz", input.fld004876),
|
||||
new XElement("Mhdhb", input.fld004895),
|
||||
new XElement("PlantView",
|
||||
new XElement("item",
|
||||
new XElement("Werks", input.fld004325),
|
||||
new XElement("Beskz", input.fld004490),
|
||||
new XElement("Sobsl", input.fld004491),
|
||||
new XElement("Schgt", input.fld004873),
|
||||
new XElement("Rgekz", input.fld004872),
|
||||
new XElement("Zbom", input.fld004698)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// 将 XML 内容转换为字符串并设置请求内容类型为 text/xml
|
||||
var content = new StringContent(envelope.ToString(), Encoding.UTF8, "text/xml");
|
||||
content.Headers.ContentType = new MediaTypeHeaderValue("text/xml");
|
||||
|
||||
// 设置 SAP Web 服务的 URL
|
||||
var url = "https://vhjqeds4ci.sap.vistar-eq.com:44300/sap/bc/srt/rfc/sap/zmmfm012/120/zmmfm012/zmmfm012";
|
||||
|
||||
// 发起 POST 请求到 SAP Web 服务
|
||||
var response = await httpClient.PostAsync(url, content);
|
||||
|
||||
// 处理响应结果
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
var result = await response.Content.ReadAsStringAsync();
|
||||
XDocument doc = XDocument.Parse(result);
|
||||
var item = doc.Descendants("item").FirstOrDefault();
|
||||
var zwbid = item?.Element("Zwbid")?.Value;
|
||||
var matnr = item?.Element("Matnr")?.Value;
|
||||
var code = item?.Element("Code")?.Value;
|
||||
var msg = item?.Element("Msg")?.Value;
|
||||
|
||||
string codeVal = code == "S" ? "成功" : "失败";
|
||||
|
||||
await _obj110Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj110
|
||||
{
|
||||
fld004629 = DateTime.Now,
|
||||
fld004311 = codeVal,
|
||||
fld004312 = "N",
|
||||
fld004313 = msg
|
||||
})
|
||||
.Where(it => it.idRecord == input.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
var output = new SapMaterialOutput()
|
||||
{
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = result
|
||||
};
|
||||
return output;
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = await response.Content.ReadAsStringAsync();
|
||||
Console.WriteLine("调用失败,状态码: " + response.StatusCode);
|
||||
var output = new SapMaterialOutput()
|
||||
{
|
||||
code = "失败",
|
||||
msg="",
|
||||
result = result
|
||||
};
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
var apiOutput = await _sapBomService.SapMaterialApi(sapMaterialInput);
|
||||
string codeVal = apiOutput.code == "S" ? "成功" : "失败";
|
||||
var msg = apiOutput.msg;
|
||||
if (apiOutput.msg=="")
|
||||
{
|
||||
// 记录错误日志
|
||||
Console.WriteLine("发生错误: " + ex.Message);
|
||||
var output = new SapMaterialOutput()
|
||||
{
|
||||
code = "失败",
|
||||
msg = "发生错误",
|
||||
result = "发生错误"
|
||||
};
|
||||
return output;
|
||||
msg = "同步成功";
|
||||
}
|
||||
|
||||
await _obj110Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj110
|
||||
{
|
||||
fld004629 = DateTime.Now,
|
||||
fld004311 = codeVal,
|
||||
fld004312 = "N",
|
||||
fld004313 = msg
|
||||
})
|
||||
.Where(it => it.idRecord == input.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
var output = new SapOutput()
|
||||
{
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = apiOutput.result
|
||||
};
|
||||
return output;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取BOM
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "GetBOM", Description = "分页查询", Order = 1000), HttpPost]
|
||||
[DisplayName("分页查询产品管理")]
|
||||
public async Task<SqlSugarPagedList<ProductManagementBomOutput>> GetBOM(BomPageProductManagementInput input)
|
||||
{
|
||||
var configid = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 110 && x.ConfigLabel == "mBOM").FirstAsync();
|
||||
var parent = await _obj110Rep.AsQueryable().Where(x => x.RecordGuid == input.ParentGuid && x.deleted == false).MaxAsync(x => x.VersionIndex);
|
||||
var BomData = await _configurationDataRep.AsQueryable()
|
||||
.Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == input.ParentGuid && x.isDeleted == false && x.ParentVersion == parent)
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.Description), u => u.Description.Contains(input.Description.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input.PartNumber), u => u.PartNumber.Contains(input.PartNumber.Trim()))
|
||||
.Select<ProductManagementBomOutput>().ToPagedListAsync(input.Page, input.PageSize);
|
||||
return BomData;
|
||||
}
|
||||
/// <summary>
|
||||
/// Bom同步到SAP
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<SapOutput> SyncToSAPBom(List<BomPageProductManagementInput> input)
|
||||
{
|
||||
var ParentData = await _obj110Rep.AsQueryable().Where(x => x.RecordGuid == input[0].ParentGuid && x.deleted == false && x.VersionIndex == input[0].ParentVersion).FirstAsync();
|
||||
var EcnData = await _obj118Rep.AsQueryable().Where(x => x.RecordGuid == ParentData.fld004944_Rec && x.deleted == false).OrderByDescending(x => x.VersionIndex).FirstAsync();
|
||||
var ecn = "";
|
||||
if (EcnData != null)
|
||||
{
|
||||
ecn = EcnData._System_objNBS;
|
||||
}
|
||||
|
||||
|
||||
var itemDataList = new List<ItemData>();
|
||||
|
||||
for (int i = 0; i < input.Count; i++)
|
||||
{
|
||||
int sun = i + 1;
|
||||
var itemData = new ItemData()
|
||||
{
|
||||
POSNR = sun.ToString(),//组件序号
|
||||
IDNRK = input[i].PartNumber,//组件物料号
|
||||
MENGE = input[i].Quantity.ToString(),//组件数量
|
||||
SORTF = input[i].fld004936,
|
||||
ITISOB = input[i].fld004937,
|
||||
ALPGR = input[i].fld004938,
|
||||
ALPRF = input[i].fld004939,
|
||||
ZDELETE = input[i].fld004940,
|
||||
POSTP = input[i].fld004492,
|
||||
ZYFMK = input[i].fld004941
|
||||
};
|
||||
itemDataList.Add(itemData);
|
||||
}
|
||||
|
||||
//获取时间戳精确到毫秒,sap要求每次调用生成不重复guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
|
||||
var isreq = new IS_REQ()
|
||||
{
|
||||
ReqKeyId = "",
|
||||
BusinessId = "",
|
||||
MessageId = "",
|
||||
SndPrn = "PLM",
|
||||
RcvPrn = "SAP",
|
||||
ReqUser = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName),
|
||||
Note1 = "",
|
||||
Note2 = "",
|
||||
Note3 = "",
|
||||
Zwbid = millisecondTimestamp,
|
||||
Matnr = ParentData._System_objNBS,//父物料编码
|
||||
Werks = ParentData.fld004325,//工厂
|
||||
Bmeng = ParentData.fld004942.ToString(),
|
||||
Aennr = ecn,
|
||||
Datuv = ParentData.fld004945.ToString(),
|
||||
ItemList = itemDataList
|
||||
};
|
||||
var apiOutput = await _sapBomService.SapBomApi(isreq);
|
||||
string codeVal = apiOutput.code == "S" ? "成功" : "失败";
|
||||
await _obj110Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj110
|
||||
{
|
||||
fld004631 = DateTime.Now,
|
||||
fld004315 = codeVal,
|
||||
fld004316 = "N",
|
||||
fld004317 = apiOutput.msg
|
||||
})
|
||||
.Where(it => it.idRecord == ParentData.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
var msg = apiOutput.msg;
|
||||
if (apiOutput.msg == "")
|
||||
{
|
||||
msg = "同步成功";
|
||||
}
|
||||
var output = new SapOutput()
|
||||
{
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = apiOutput.result
|
||||
};
|
||||
return output;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -12,9 +12,9 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Vistar.Application.Util;
|
||||
/// <summary>
|
||||
/// 同步物料输出参数
|
||||
/// SAP服务输出参数
|
||||
/// </summary>
|
||||
public class SapMaterialOutput
|
||||
public class SapOutput
|
||||
{
|
||||
public string code { get; set; }
|
||||
public string msg { get; set; }
|
||||
|
@ -3,6 +3,8 @@ enum Api {
|
||||
PageProductManagement = '/api/productManagement/page',
|
||||
BomTypeProductManagement = '/api/productManagement/bomType',
|
||||
SyncToSAPProductManagement = '/api/productManagement/SyncToSAP',
|
||||
GetetBOMProductManagement = '/api/productManagement/getBOM',
|
||||
SyncToSAPBomProductManagement = '/api/productManagement/syncToSAPBom',
|
||||
}
|
||||
|
||||
// 分页查询产品管理
|
||||
@ -27,6 +29,19 @@ export const SyncToSAPProductManagement = (params?: any) =>
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
// 分页查询产品管理BOM
|
||||
export const GetetBOMProductManagement = (params?: any) =>
|
||||
request({
|
||||
url: Api.GetetBOMProductManagement,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
|
||||
// BOM同步到sap
|
||||
export const SyncToSAPBomProductManagement = (params?: any) =>
|
||||
request({
|
||||
url: Api.SyncToSAPBomProductManagement,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
|
@ -35,10 +35,9 @@
|
||||
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
|
||||
<template #toolbar_tools>
|
||||
<el-button style="position: absolute; left: 0" icon="ele-Promotion" size="small" text=""
|
||||
type="success" @click="" v-auth="'productManagement/syncToSAP'"> 批量同步到SAP
|
||||
type="success" @click="batchSyncToSAP" v-auth="'productManagement/syncToSAP'"> 批量同步到SAP
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- <template #empty>
|
||||
@ -49,19 +48,20 @@
|
||||
</template> -->
|
||||
<template #row_buttons="{ row }">
|
||||
<el-tooltip content="查看BOM" placement="top">
|
||||
<el-button icon="ele-MessageBox" size="small" text="" type="primary" @click="showBomDrawer(row)">
|
||||
<el-button icon="ele-MessageBox" size="small" text="" type="primary" @click="showBomDrawer(row)" >
|
||||
查看BOM </el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<!-- v-if="row.fld004316!='N'" -->
|
||||
<el-tooltip content="工艺路线" placement="top">
|
||||
<el-button icon="ele-MessageBox" size="small" text="" type="primary" @click="showBomDrawer">
|
||||
<el-button icon="ele-MessageBox" size="small" text="" type="primary" @click="showBomDrawer" v-if="row.fld004320!='N'">
|
||||
工艺路线 </el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip content="同步到ERP" placement="top">
|
||||
<el-button icon="ele-Promotion" size="small" text="" type="success" @click="syncToSAP(row)"
|
||||
v-auth="'productManagement/syncToSAP'"> 同步到SAP </el-button>
|
||||
v-auth="'productManagement/syncToSAP'" > 同步到SAP </el-button>
|
||||
</el-tooltip>
|
||||
<!-- v-if="row.fld004312!='N'" -->
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
@ -70,60 +70,18 @@
|
||||
<!-- 添加 drawer 抽屉 -->
|
||||
<el-drawer v-model="showBom" title="BOM 详情" :direction="'rtl'" :visible.sync="false" size="50%">
|
||||
<!-- 这里可以放置 BOM 的具体内容 -->
|
||||
<el-card shadow="hover"
|
||||
:body-style="{ padding: '20px 20px 16px 10px', display: 'flex', width: '100%', height: '100%', alignItems: 'start' }">
|
||||
<el-form :model="state.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true"
|
||||
label-width="auto" style="flex: 1 1 0%" @submit.prevent="handleQuery">
|
||||
<el-row :gutter="10">
|
||||
<el-col :xs="24" :sm="12" :md="8" :lg="5" :xl="6" class="mb5">
|
||||
<el-form-item label="BOM类型">
|
||||
<el-select v-model="state.queryParams._System_objNBS" placeholder="请选择">
|
||||
<el-option v-for="item in bomTypeList" :key="item.name" :label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="6" class="mb5">
|
||||
<el-button type="primary" icon="ele-Search" @click="handleQuery"
|
||||
v-auth="'productManagement/page'" :loading="options.loading"> 查询 </el-button>
|
||||
<el-button icon="ele-Refresh" @click="resetQuery" :loading="options.loading"> 重置
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px;height: 90%;" >
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px;height: 100%;">
|
||||
<el-form :model="stateBom.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true"
|
||||
label-width="auto" style="flex: 1 1 0%" @submit.prevent="handleQueryBom">
|
||||
<el-input v-model="stateBom.queryParams.ParentGuid" placeholder="父GUID" @click="handleQueryBom" />
|
||||
</el-form>
|
||||
|
||||
<vxe-grid ref="bomxGrid" v-bind="bomOptions" v-on="gridEvents">
|
||||
<template #toolbar_tools>
|
||||
<el-button style="position: absolute; left: 0" icon="ele-Promotion" size="small" text=""
|
||||
type="success" @click="" v-auth="'productManagement/syncToSAP'"> 批量同步到SAP
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- <template #empty>
|
||||
<el-empty :image-size="200" />
|
||||
<el-button style="position: absolute; left: 0" icon="ele-Promotion" size="small" text=""
|
||||
type="success" @click="syncToSAPBom" v-auth="'productManagement/syncToSAPBom'"> BOM同步到SAP
|
||||
</el-button>
|
||||
</template>
|
||||
<template #row_record="{ row }">
|
||||
<ModifyRecord :data="row" />
|
||||
</template> -->
|
||||
<template #row_buttons="{ row }">
|
||||
<el-tooltip content="查看BOM" placement="top">
|
||||
<el-button icon="ele-MessageBox" size="small" text="" type="primary" @click="showBomDrawer">
|
||||
查看BOM </el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip content="工艺路线" placement="top">
|
||||
<el-button icon="ele-MessageBox" size="small" text="" type="primary" @click="showBomDrawer">
|
||||
工艺路线 </el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-tooltip content="同步到ERP" placement="top">
|
||||
<el-button icon="ele-Promotion" size="small" text="" type="success" @click="syncToSAP(row)"
|
||||
v-auth="'productManagement/syncToSAP'"> 同步到SAP </el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
</el-drawer>
|
||||
@ -142,7 +100,7 @@ import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
|
||||
import { formatDate } from '/@/utils/formatTime';
|
||||
import { PageProductManagement, BomTypeProductManagement, SyncToSAPProductManagement } from '/@/api/materialManagement/productManagement';
|
||||
import { PageProductManagement, BomTypeProductManagement, SyncToSAPProductManagement, GetetBOMProductManagement,SyncToSAPBomProductManagement } from '/@/api/materialManagement/productManagement';
|
||||
|
||||
// 子窗口对象
|
||||
const xGrid = ref<VxeGridInstance>();
|
||||
@ -229,7 +187,8 @@ onMounted(() => {
|
||||
// 查询api
|
||||
const handleQueryApi = async (page: VxeGridPropTypes.ProxyAjaxQueryPageParams, sort: VxeGridPropTypes.ProxyAjaxQuerySortCheckedParams) => {
|
||||
const params = Object.assign(state.queryParams, { page: page.currentPage, pageSize: page.pageSize, field: sort.field, order: sort.order, descStr: 'desc' });
|
||||
return PageProductManagement(params);
|
||||
var data = PageProductManagement(params)
|
||||
return data;
|
||||
};
|
||||
|
||||
// 查询操作
|
||||
@ -270,7 +229,6 @@ const gridEvents: VxeGridListeners = {
|
||||
// 同步到SAP
|
||||
const syncToSAP = async (row: any) => {
|
||||
options.loading = true;
|
||||
|
||||
ElMessageBox.confirm(`确定要同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
@ -290,21 +248,109 @@ const syncToSAP = async (row: any) => {
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//Bom
|
||||
// BOM查询操作
|
||||
//let bomTypeList: any;
|
||||
//父Guid
|
||||
const bomxGrid = ref<VxeGridInstance>();
|
||||
// 查看BOM
|
||||
const showBomDrawer = async (row: any) => {
|
||||
stateBom.queryParams.ParentGuid=row.recordGuid;
|
||||
showBom.value = true;
|
||||
console.log("Bomrow",row.recordGuid)
|
||||
try {
|
||||
const response = await BomTypeProductManagement();
|
||||
bomTypeList = response.data.result;
|
||||
console.log('sss', response);
|
||||
} catch (error) {
|
||||
console.error('Error fetching data:', error);
|
||||
}
|
||||
await handleQueryBom();
|
||||
};
|
||||
|
||||
const showBom = ref(false);
|
||||
|
||||
// 变量
|
||||
const stateBom = reactive({
|
||||
showAdvanceQueryUI: false,
|
||||
queryParams: {
|
||||
PartNumber: undefined,
|
||||
Description: undefined,
|
||||
ParentGuid: undefined
|
||||
},
|
||||
localPageParam: {
|
||||
pageSize: 50 as number,
|
||||
defaultSort: { field: 'createTime', order: 'asc', descStr: 'desc' },
|
||||
},
|
||||
visible: false,
|
||||
title: '',
|
||||
});
|
||||
|
||||
// 本地存储参数
|
||||
const localPageParamKeyBom = 'localPageParam:productManagementBom';
|
||||
|
||||
// 表格参数配置
|
||||
const bomOptions = useVxeTable(
|
||||
{
|
||||
id: 'productManagementBom',
|
||||
name: '产品管理',
|
||||
columns: [
|
||||
{ type: 'seq', title: '序号', width: 60 },
|
||||
{ field: 'partNumber', title: '物料编码', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'description', title: '物料描述', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'quantity', title: '数量', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
],
|
||||
},
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
{
|
||||
// 代理配置
|
||||
proxyConfig: { autoLoad: true, ajax: { query: ({ page, sort }) => handleBOMQueryApi(page, sort) } },
|
||||
// 排序配置
|
||||
sortConfig: { defaultSort: Local.get(localPageParamKeyBom)?.defaultSort || stateBom.localPageParam.defaultSort },
|
||||
// 分页配置
|
||||
pagerConfig: { pageSize: Local.get(localPageParamKeyBom)?.pageSize || stateBom.localPageParam.pageSize },
|
||||
// 工具栏配置
|
||||
toolbarConfig: { export: false },
|
||||
// 行设置
|
||||
// rowConfig: { height: 80 },
|
||||
}
|
||||
);
|
||||
|
||||
// BOM 查询 API
|
||||
const handleBOMQueryApi = async (page: VxeGridPropTypes.ProxyAjaxQueryPageParams, sort: VxeGridPropTypes.ProxyAjaxQuerySortCheckedParams) => {
|
||||
const params = Object.assign(stateBom.queryParams, { page: page.currentPage, pageSize: page.pageSize, field: sort.field, order: sort.order, descStr: 'desc' });
|
||||
var data = GetetBOMProductManagement(params);
|
||||
return data;
|
||||
};
|
||||
|
||||
const handleQueryBom = async (reset = false) => {
|
||||
bomOptions.loading = true;
|
||||
await bomxGrid.value?.commitProxy('query');
|
||||
bomOptions.loading = false;
|
||||
};
|
||||
|
||||
//Bom同步到sap
|
||||
const syncToSAPBom = async () => {
|
||||
//var data=bomxGrid.value?.getCheckboxRecords();
|
||||
options.loading = true;
|
||||
var data=bomxGrid.value?.getTableData().fullData;
|
||||
ElMessageBox.confirm(`确定要同步BOM吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
var output = await SyncToSAPBomProductManagement(data);
|
||||
await handleQuery();
|
||||
if (output.data.result.code == "成功") {
|
||||
ElMessage.success("同步成功");
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
})
|
||||
.catch(() => { });
|
||||
options.loading = false;
|
||||
}
|
||||
//物料批量同步到SAP
|
||||
const batchSyncToSAP = async () =>{
|
||||
var data=xGrid.value?.getCheckboxRecords();
|
||||
console.log("datadatadata",data)
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
Loading…
Reference in New Issue
Block a user