😎新增产品设计库页面
This commit is contained in:
parent
056522314f
commit
179b17a4c8
@ -0,0 +1,230 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Vistar.Application.Service.ProductDesignLibrary.Dto;
|
||||
public class BomPageProductDesignLibraryInput : 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; }
|
||||
public long? fld005296 { get; set; }
|
||||
public long? fld005298 { get; set; }
|
||||
public string? fld005541 { get; set; }
|
||||
public string? fld005542 { get; set; }
|
||||
public string? fld005543 { get; set; }
|
||||
public string? fld005544 { get; set; }
|
||||
public string? fld005545 { get; set; }
|
||||
public string? fld005546 { get; set; }
|
||||
public string? fld005547 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工时
|
||||
/// </summary>
|
||||
public string fld005571 { get; set; }
|
||||
/// <summary>
|
||||
/// 工时单位
|
||||
/// </summary>
|
||||
public string fld005572 { get; set; }
|
||||
/// <summary>
|
||||
/// 控制码
|
||||
/// </summary>
|
||||
public string fld005573 { get; set; }
|
||||
/// <summary>
|
||||
/// 组号
|
||||
/// </summary>
|
||||
public string fld005574 { get; set; }
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public string fld005575 { get; set; }
|
||||
|
||||
}
|
@ -0,0 +1,474 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Vistar.Application.Service.ProductDesignLibrary.Dto;
|
||||
public class ProductDesignLibraryBomOutput
|
||||
{
|
||||
/// <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>
|
||||
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>
|
||||
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>
|
||||
public bool inContext { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string PrimaryFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool bKeepQuantityInSync { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? BOMGuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
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 string? fld005541 { get; set; }
|
||||
public string? fld005542 { get; set; }
|
||||
public string? fld005543 { get; set; }
|
||||
public string? fld005544 { get; set; }
|
||||
public string? fld005545 { get; set; }
|
||||
public string? fld005546 { get; set; }
|
||||
public string? fld005547 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工时
|
||||
/// </summary>
|
||||
public string fld005571 { get; set; }
|
||||
/// <summary>
|
||||
/// 工时单位
|
||||
/// </summary>
|
||||
public string fld005572 { get; set; }
|
||||
/// <summary>
|
||||
/// 控制码
|
||||
/// </summary>
|
||||
public string fld005573 { get; set; }
|
||||
/// <summary>
|
||||
/// 组号
|
||||
/// </summary>
|
||||
public string fld005574 { get; set; }
|
||||
/// <summary>
|
||||
/// 基本数量
|
||||
/// </summary>
|
||||
public string fld005575 { get; set; }
|
||||
}
|
@ -0,0 +1,502 @@
|
||||
// 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.ProductDesignLibrary.Dto;
|
||||
/// <summary>
|
||||
/// 产品设计库输入参数
|
||||
/// </summary>
|
||||
public class ProductDesignLibraryInput
|
||||
{
|
||||
public long idRecord { get; set; }
|
||||
|
||||
public int? CheckedStatus { get; set; }
|
||||
|
||||
public int? VersionIndex { get; set; }
|
||||
|
||||
public bool? IsLatestVersion { get; set; }
|
||||
|
||||
public DateTime? CreatedDate { get; set; }
|
||||
|
||||
public DateTime? VersionCreatedDate { get; set; }
|
||||
|
||||
public DateTime? dateModified { get; set; }
|
||||
|
||||
public long? UserCreatedId { get; set; }
|
||||
|
||||
public long? VersionUserCreatedId { get; set; }
|
||||
|
||||
public long? UserModifiedId { get; set; }
|
||||
|
||||
public string? RecordGuid { get; set; }
|
||||
|
||||
public bool? isVisibilityNormal { get; set; }
|
||||
|
||||
public bool? deleted { get; set; }
|
||||
|
||||
public string? SubObjectGuid { get; set; }
|
||||
|
||||
public bool? PreviousStatus { get; set; }
|
||||
|
||||
public string? revision { get; set; }
|
||||
|
||||
public byte[]? Record_image160_160 { get; set; }
|
||||
|
||||
public byte[]? Record_Image320_240 { get; set; }
|
||||
|
||||
public byte[]? Record_ImageMax { get; set; }
|
||||
|
||||
public string? _System_objNBS { get; set; }
|
||||
|
||||
public string? _System_ObjDescription { get; set; }
|
||||
|
||||
public DateTime? _System_Effectivity_Begin { get; set; }
|
||||
|
||||
public DateTime? _System_Effectivity_End { get; set; }
|
||||
|
||||
public string? CheckedOutPc { get; set; }
|
||||
|
||||
public long? StageId { get; set; }
|
||||
|
||||
public long? ProjectManager { get; set; }
|
||||
|
||||
public long? ProjectManager_Rec { get; set; }
|
||||
|
||||
public bool? EnableNotifications { get; set; }
|
||||
|
||||
public long? GroupObjId { get; set; }
|
||||
|
||||
public bool? _CheckOutInProgress { get; set; }
|
||||
|
||||
public string? ParentRecordGuid { get; set; }
|
||||
|
||||
public string? MaterialType { get; set; }
|
||||
|
||||
public bool? _System_NeedSWRebuild { get; set; }
|
||||
|
||||
public string? _system_objConfigurationName { get; set; }
|
||||
|
||||
public bool? _system_objConfigurationType { get; set; }
|
||||
|
||||
public string? _system_objConfigurationGuid { get; set; }
|
||||
|
||||
public string ShowBomFromConfiguration { get; set; }
|
||||
|
||||
public string _System_ObjNbsAuto { get; set; }
|
||||
|
||||
public long? PreviousIdRecord { get; set; }
|
||||
|
||||
public string? _System_DerivedFrom { get; set; }
|
||||
|
||||
public bool? _system_objLinkedCompare { get; set; }
|
||||
|
||||
public string? _System_WebLink { get; set; }
|
||||
|
||||
public bool? isReleasedVersion { get; set; }
|
||||
|
||||
public string? _System_DerivedFrom_RecordGuid { get; set; }
|
||||
|
||||
public long? SWPDMDocumentId { get; set; }
|
||||
|
||||
public long? SWPDMConfigurationID { get; set; }
|
||||
|
||||
public string? SWPDMConfigurationName { get; set; }
|
||||
|
||||
public long? SWPDMActiveConfigurationId { get; set; }
|
||||
|
||||
public string? SWPDMActiveConfigurationName { get; set; }
|
||||
|
||||
public string? SWPDMFileName { get; set; }
|
||||
|
||||
public long? SWPDMConfigPersistID { get; set; }
|
||||
|
||||
public int? SWPDMStatusId { get; set; }
|
||||
|
||||
public string? SWPDMStatusName { get; set; }
|
||||
|
||||
public bool? _SWPDM_1179__SW_Detailing_Mode_ { get; set; }
|
||||
|
||||
public string? _SWPDM_2__SW_Last_Saved_With_ { get; set; }
|
||||
|
||||
public string? _SWPDM_111_A___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1172_BOM_BOM__ { get; set; }
|
||||
|
||||
public string? _SWPDM_112_BOM___2 { get; set; }
|
||||
|
||||
public string? _SWPDM_113_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_115_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_116_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_117_BOM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_51_BOM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_118_BOM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_119_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_114_BOM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_120_BOM______ { get; set; }
|
||||
|
||||
public string? _SWPDM_121_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_122_BOW___1 { get; set; }
|
||||
|
||||
public string? _SWPDM_123_BOW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_84_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_82_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_80_DWG_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_76_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_77_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_78_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_79_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_83_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_81_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_92_FB___ { get; set; }
|
||||
|
||||
public string? _SWPDM_86_FB_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_87_FB_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_88_FB_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_89_FB_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_90_FB______ { get; set; }
|
||||
|
||||
public string? _SWPDM_85_FB____ { get; set; }
|
||||
|
||||
public string? _SWPDM_91_FB_____ { get; set; }
|
||||
public string? _SWPDM_94_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_101_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_95_PDF_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_96_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_97_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_98_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_93_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_99_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_100_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1194_q { get; set; }
|
||||
|
||||
public string? _SWPDM_1196_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1199_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1187_SAP___ { get; set; }
|
||||
|
||||
public double? _SWPDM_1190_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1191_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1188_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1197_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1210_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1189_SAP___ID_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1200_SAP_____ { get; set; }
|
||||
public string? _SWPDM_1208_SAP___BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1201_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1198_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1193_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1195_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1186_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1209_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1203_SAP____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1185_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1192_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1184_SIP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1183_SIP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1182_SOP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1181_SOP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_46_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_60_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_124_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_102_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_56_SW____ { get; set; }
|
||||
|
||||
public string? _SWPDM_57_SW______ { get; set; }
|
||||
|
||||
public string? _SWPDM_61_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_62_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_125_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_126_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_127_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1205_SW_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_47_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_48_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_54_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_55_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_66_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_154_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_63_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_64_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_65_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_128_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1206_SW_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_52_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_53_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_58_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_59_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1178_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1202_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_49_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_129_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1207_SW_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_130_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_50_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_131_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_155_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1175_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1177_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1170_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1171_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1173_SW____ { get; set; }
|
||||
|
||||
public string? _SWPDM_132_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1204_SW_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_133_SW____ { get; set; }
|
||||
|
||||
public string? _SWPDM_67_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1174_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1168_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1167_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1166_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1165_TEMP____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1164_TEMP_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_1163_TEMP_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_1162_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1161_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1160_TEMP_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_1159_TEMP_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_1176_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1158_TEMP____ { get; set; }
|
||||
|
||||
public string? _SWPDM_134_TY___ { get; set; }
|
||||
|
||||
public string? _SWPDM_135_TY______ { get; set; }
|
||||
|
||||
public string? _SWPDM_136_TY_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_137_TY_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_138_TY_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_139_WD_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_140_WD____ { get; set; }
|
||||
|
||||
public string? _SWPDM_141_WD___ { get; set; }
|
||||
|
||||
public string? _SWPDM_142_WJJ_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_143_WJJ____ { get; set; }
|
||||
|
||||
public string? _SWPDM_144_WJJ___ { get; set; }
|
||||
|
||||
public string? _SWPDM_68_XM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_69_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_70_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1169_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_145_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_146_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_73_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_74_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_71_XM______ { get; set; }
|
||||
|
||||
public string? _SWPDM_72_XM____ { get; set; }
|
||||
|
||||
public string? _SWPDM_75_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1155_XM_________ { get; set; }
|
||||
|
||||
public string? _SWPDM_103___ { get; set; }
|
||||
|
||||
public string? _SWPDM_104___ { get; set; }
|
||||
|
||||
public string? _SWPDM_147_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1211_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1212_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_107___ { get; set; }
|
||||
|
||||
public string? _SWPDM_148_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_108______ { get; set; }
|
||||
|
||||
public string? _SWPDM_149_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_110_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_150________ { get; set; }
|
||||
|
||||
public string? _SWPDM_151________ { get; set; }
|
||||
|
||||
public string? _SWPDM_152________ { get; set; }
|
||||
|
||||
public string? _SWPDM_109______ { get; set; }
|
||||
|
||||
public string? _SWPDM_105___ { get; set; }
|
||||
|
||||
public string? _SWPDM_106_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_153_____ { get; set; }
|
||||
|
||||
public string? fld005529 { get; set; }
|
||||
|
||||
public string? fld005530 { get; set; }
|
||||
|
||||
public string? fld005531 { get; set; }
|
||||
|
||||
public DateTime? fld005532 { get; set; }
|
||||
|
||||
public string? fld005533 { get; set; }
|
||||
|
||||
public string? fld005534 { get; set; }
|
||||
|
||||
public string? fld005535 { get; set; }
|
||||
|
||||
public string? fld005536 { get; set; }
|
||||
|
||||
public string? fld005537 { get; set; }
|
||||
|
||||
public string? fld005538 { get; set; }
|
||||
|
||||
public DateTime? fld005539 { get; set; }
|
||||
|
||||
public DateTime? fld005540 { get; set; }
|
||||
|
||||
public int? fld005678 { get; set; }
|
||||
public int? fld005679 { get; set; }
|
||||
public string? fld005679_Rec { get; set; }
|
||||
public DateTime? fld005680 { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品设计库分页查询输入参数
|
||||
/// </summary>
|
||||
public class PageProductDesignLibraryInput : BasePageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string? _System_objNBS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料描述
|
||||
/// </summary>
|
||||
public string? _SWPDM_1188_SAP___ { get; set; }
|
||||
}
|
@ -0,0 +1,482 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Vistar.Application.Service.ProductDesignLibrary.Dto;
|
||||
/// <summary>
|
||||
/// 产品设计库输出参数
|
||||
/// </summary>
|
||||
public class ProductDesignLibraryOutput
|
||||
{
|
||||
public long idRecord { get; set; }
|
||||
|
||||
public int? CheckedStatus { get; set; }
|
||||
|
||||
public int? VersionIndex { get; set; }
|
||||
|
||||
public bool? IsLatestVersion { get; set; }
|
||||
|
||||
public DateTime? CreatedDate { get; set; }
|
||||
|
||||
public DateTime? VersionCreatedDate { get; set; }
|
||||
|
||||
public DateTime? dateModified { get; set; }
|
||||
|
||||
public long? UserCreatedId { get; set; }
|
||||
|
||||
public long? VersionUserCreatedId { get; set; }
|
||||
|
||||
public long? UserModifiedId { get; set; }
|
||||
|
||||
public string? RecordGuid { get; set; }
|
||||
|
||||
public bool? isVisibilityNormal { get; set; }
|
||||
|
||||
public bool? deleted { get; set; }
|
||||
|
||||
public string? SubObjectGuid { get; set; }
|
||||
|
||||
public bool? PreviousStatus { get; set; }
|
||||
|
||||
public string? revision { get; set; }
|
||||
|
||||
public byte[]? Record_image160_160 { get; set; }
|
||||
|
||||
public byte[]? Record_Image320_240 { get; set; }
|
||||
|
||||
public byte[]? Record_ImageMax { get; set; }
|
||||
|
||||
public string? _System_objNBS { get; set; }
|
||||
|
||||
public string? _System_ObjDescription { get; set; }
|
||||
|
||||
public DateTime? _System_Effectivity_Begin { get; set; }
|
||||
|
||||
public DateTime? _System_Effectivity_End { get; set; }
|
||||
|
||||
public string? CheckedOutPc { get; set; }
|
||||
|
||||
public long? StageId { get; set; }
|
||||
|
||||
public long? ProjectManager { get; set; }
|
||||
|
||||
public long? ProjectManager_Rec { get; set; }
|
||||
|
||||
public bool? EnableNotifications { get; set; }
|
||||
|
||||
public long? GroupObjId { get; set; }
|
||||
|
||||
public bool? _CheckOutInProgress { get; set; }
|
||||
|
||||
public string? ParentRecordGuid { get; set; }
|
||||
|
||||
public string? MaterialType { get; set; }
|
||||
|
||||
public bool? _System_NeedSWRebuild { get; set; }
|
||||
|
||||
public string? _system_objConfigurationName { get; set; }
|
||||
|
||||
public bool? _system_objConfigurationType { get; set; }
|
||||
|
||||
public string? _system_objConfigurationGuid { get; set; }
|
||||
|
||||
public string ShowBomFromConfiguration { get; set; }
|
||||
|
||||
public string _System_ObjNbsAuto { get; set; }
|
||||
|
||||
public long? PreviousIdRecord { get; set; }
|
||||
|
||||
public string? _System_DerivedFrom { get; set; }
|
||||
|
||||
public bool? _system_objLinkedCompare { get; set; }
|
||||
|
||||
public string? _System_WebLink { get; set; }
|
||||
|
||||
public bool? isReleasedVersion { get; set; }
|
||||
|
||||
public string? _System_DerivedFrom_RecordGuid { get; set; }
|
||||
|
||||
public long? SWPDMDocumentId { get; set; }
|
||||
|
||||
public long? SWPDMConfigurationID { get; set; }
|
||||
|
||||
public string? SWPDMConfigurationName { get; set; }
|
||||
|
||||
public long? SWPDMActiveConfigurationId { get; set; }
|
||||
|
||||
public string? SWPDMActiveConfigurationName { get; set; }
|
||||
|
||||
public string? SWPDMFileName { get; set; }
|
||||
|
||||
public long? SWPDMConfigPersistID { get; set; }
|
||||
|
||||
public int? SWPDMStatusId { get; set; }
|
||||
|
||||
public string? SWPDMStatusName { get; set; }
|
||||
|
||||
public bool? _SWPDM_1179__SW_Detailing_Mode_ { get; set; }
|
||||
|
||||
public string? _SWPDM_2__SW_Last_Saved_With_ { get; set; }
|
||||
|
||||
public string? _SWPDM_111_A___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1172_BOM_BOM__ { get; set; }
|
||||
|
||||
public string? _SWPDM_112_BOM___2 { get; set; }
|
||||
|
||||
public string? _SWPDM_113_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_115_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_116_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_117_BOM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_51_BOM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_118_BOM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_119_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_114_BOM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_120_BOM______ { get; set; }
|
||||
|
||||
public string? _SWPDM_121_BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_122_BOW___1 { get; set; }
|
||||
|
||||
public string? _SWPDM_123_BOW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_84_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_82_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_80_DWG_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_76_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_77_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_78_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_79_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_83_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_81_DWG___ { get; set; }
|
||||
|
||||
public string? _SWPDM_92_FB___ { get; set; }
|
||||
|
||||
public string? _SWPDM_86_FB_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_87_FB_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_88_FB_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_89_FB_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_90_FB______ { get; set; }
|
||||
|
||||
public string? _SWPDM_85_FB____ { get; set; }
|
||||
|
||||
public string? _SWPDM_91_FB_____ { get; set; }
|
||||
public string? _SWPDM_94_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_101_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_95_PDF_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_96_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_97_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_98_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_93_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_99_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_100_PDF___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1194_q { get; set; }
|
||||
|
||||
public string? _SWPDM_1196_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1199_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1187_SAP___ { get; set; }
|
||||
|
||||
public double? _SWPDM_1190_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1191_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1188_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1197_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1210_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1189_SAP___ID_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1200_SAP_____ { get; set; }
|
||||
public string? _SWPDM_1208_SAP___BOM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1201_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1198_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1193_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1195_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1186_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1209_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1203_SAP____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1185_SAP___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1192_SAP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1184_SIP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1183_SIP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1182_SOP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1181_SOP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_46_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_60_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_124_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_102_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_56_SW____ { get; set; }
|
||||
|
||||
public string? _SWPDM_57_SW______ { get; set; }
|
||||
|
||||
public string? _SWPDM_61_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_62_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_125_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_126_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_127_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1205_SW_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_47_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_48_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_54_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_55_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_66_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_154_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_63_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_64_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_65_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_128_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1206_SW_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_52_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_53_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_58_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_59_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1178_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1202_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_49_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_129_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1207_SW_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_130_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_50_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_131_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_155_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1175_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1177_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1170_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1171_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1173_SW____ { get; set; }
|
||||
|
||||
public string? _SWPDM_132_SW_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1204_SW_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_133_SW____ { get; set; }
|
||||
|
||||
public string? _SWPDM_67_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1174_SW___ { get; set; }
|
||||
|
||||
public string? _SWPDM_1168_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1167_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1166_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1165_TEMP____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1164_TEMP_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_1163_TEMP_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_1162_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1161_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1160_TEMP_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_1159_TEMP_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_1176_TEMP_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1158_TEMP____ { get; set; }
|
||||
|
||||
public string? _SWPDM_134_TY___ { get; set; }
|
||||
|
||||
public string? _SWPDM_135_TY______ { get; set; }
|
||||
|
||||
public string? _SWPDM_136_TY_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_137_TY_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_138_TY_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_139_WD_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_140_WD____ { get; set; }
|
||||
|
||||
public string? _SWPDM_141_WD___ { get; set; }
|
||||
|
||||
public string? _SWPDM_142_WJJ_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_143_WJJ____ { get; set; }
|
||||
|
||||
public string? _SWPDM_144_WJJ___ { get; set; }
|
||||
|
||||
public string? _SWPDM_68_XM___ { get; set; }
|
||||
|
||||
public string? _SWPDM_69_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_70_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1169_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_145_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_146_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_73_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_74_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_71_XM______ { get; set; }
|
||||
|
||||
public string? _SWPDM_72_XM____ { get; set; }
|
||||
|
||||
public string? _SWPDM_75_XM_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1155_XM_________ { get; set; }
|
||||
|
||||
public string? _SWPDM_103___ { get; set; }
|
||||
|
||||
public string? _SWPDM_104___ { get; set; }
|
||||
|
||||
public string? _SWPDM_147_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1211_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_1212_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_107___ { get; set; }
|
||||
|
||||
public string? _SWPDM_148_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_108______ { get; set; }
|
||||
|
||||
public string? _SWPDM_149_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_110_______ { get; set; }
|
||||
|
||||
public string? _SWPDM_150________ { get; set; }
|
||||
|
||||
public string? _SWPDM_151________ { get; set; }
|
||||
|
||||
public string? _SWPDM_152________ { get; set; }
|
||||
|
||||
public string? _SWPDM_109______ { get; set; }
|
||||
|
||||
public string? _SWPDM_105___ { get; set; }
|
||||
|
||||
public string? _SWPDM_106_____ { get; set; }
|
||||
|
||||
public string? _SWPDM_153_____ { get; set; }
|
||||
|
||||
public string? fld005529 { get; set; }
|
||||
|
||||
public string? fld005530 { get; set; }
|
||||
|
||||
public string? fld005531 { get; set; }
|
||||
|
||||
public DateTime? fld005532 { get; set; }
|
||||
|
||||
public string? fld005533 { get; set; }
|
||||
|
||||
public string? fld005534 { get; set; }
|
||||
|
||||
public string? fld005535 { get; set; }
|
||||
|
||||
public string? fld005536 { get; set; }
|
||||
|
||||
public string? fld005537 { get; set; }
|
||||
|
||||
public string? fld005538 { get; set; }
|
||||
|
||||
public DateTime? fld005539 { get; set; }
|
||||
|
||||
public DateTime? fld005540 { get; set; }
|
||||
public int? fld005678 { get; set; }
|
||||
public int? fld005679 { get; set; }
|
||||
public string? fld005679_Rec { get; set; }
|
||||
public DateTime? fld005680 { get; set; }
|
||||
}
|
@ -0,0 +1,948 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Admin.NET.Core;
|
||||
using Admin.NET.Core.Service;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Vistar.Application.Common;
|
||||
using Vistar.Application.Const;
|
||||
using Vistar.Application.Entity;
|
||||
using Vistar.Application.SapService.Dto;
|
||||
using Vistar.Application.Service.ProductDesignLibrary.Dto;
|
||||
using Vistar.Application.Util;
|
||||
|
||||
namespace Vistar.Application.Service.ProductDesignLibrary;
|
||||
/// <summary>
|
||||
/// 产品设计库服务
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(ApplicationConst.GroupName, Name = "ProductDesignLibrary", Order = 100)]
|
||||
public class ProductDesignLibraryService : IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly SqlSugarRepository<Obj137> _obj137Rep;
|
||||
private readonly SysConfigService _sysConfigService;
|
||||
public SapService.SapService _sapService;
|
||||
private readonly SqlSugarRepository<Configurations> _configurationsRep;
|
||||
private readonly SqlSugarRepository<ConfigurationData> _configurationDataRep;
|
||||
public SqlSugarRepository<Obj118> _obj118Rep;
|
||||
public Common.DataValidationService _dataValidationService;
|
||||
public SqlSugarRepository<Obj122> _obj122Rep;
|
||||
public SqlSugarRepository<Obj121> _obj121Rep;
|
||||
|
||||
public ProductDesignLibraryService(
|
||||
SqlSugarRepository<Obj137> obj137Rep,
|
||||
SysConfigService sysConfigService,
|
||||
SapService.SapService sapService,
|
||||
SqlSugarRepository<Configurations> configurationsRep,
|
||||
SqlSugarRepository<ConfigurationData> configurationDataRep,
|
||||
SqlSugarRepository<Obj118> obj118Rep,
|
||||
DataValidationService dataValidationService,
|
||||
SqlSugarRepository<Obj122> obj122Rep,
|
||||
SqlSugarRepository<Obj121> obj121Rep
|
||||
)
|
||||
{
|
||||
_obj137Rep = obj137Rep;
|
||||
_sysConfigService = sysConfigService;
|
||||
_sapService = sapService;
|
||||
_configurationsRep = configurationsRep;
|
||||
_configurationDataRep = configurationDataRep;
|
||||
_obj118Rep = obj118Rep;
|
||||
_dataValidationService = dataValidationService;
|
||||
_obj122Rep = obj122Rep;
|
||||
_obj121Rep = obj121Rep;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询产品设计库
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "page", Description = "分页查询", Order = 1000), HttpPost]
|
||||
[DisplayName("分页查询产品设计库")]
|
||||
public async Task<SqlSugarPagedList<ProductDesignLibraryOutput>> Page(PageProductDesignLibraryInput input)
|
||||
{
|
||||
var query = await _obj137Rep.AsQueryable()
|
||||
.Where(x => x.CheckedStatus == 0 && x.deleted == false && x.IsLatestVersion == true && x._system_objConfigurationName == "默认" && (x.SWPDMFileName!= "SLDDRW" || x.SWPDMFileName==null))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input._System_objNBS), u => u._System_objNBS.Contains(input._System_objNBS.Trim()))
|
||||
.WhereIF(!string.IsNullOrWhiteSpace(input._SWPDM_1188_SAP___), u => u._SWPDM_1188_SAP___.Contains(input._SWPDM_1188_SAP___.Trim()))
|
||||
.Select<ProductDesignLibraryOutput>()
|
||||
.ToPagedListAsync(input.Page, input.PageSize);
|
||||
return query;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品设计库-同步到 SAP
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "syncToSAP"), HttpPost]
|
||||
[DisplayName("产品设计库-同步到 SAP")]
|
||||
public async Task<SapOutput> SyncToSAP(ProductDesignLibraryInput input)
|
||||
{
|
||||
const string lengthError = "物料描述长度大于40,请检查!";
|
||||
|
||||
// 验证物料描述长度
|
||||
if (input._SWPDM_1188_SAP___.Length > 40)
|
||||
{
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005532 = DateTime.Now,
|
||||
fld005530 = "N",
|
||||
fld005531 = lengthError,
|
||||
fld005529 = "失败"
|
||||
})
|
||||
.Where(it => it.idRecord == input.idRecord)
|
||||
.ExecuteCommandAsync().ConfigureAwait(false);
|
||||
|
||||
return new SapOutput
|
||||
{
|
||||
code = "失败",
|
||||
msg = lengthError,
|
||||
result = lengthError
|
||||
};
|
||||
}
|
||||
|
||||
//获取时间戳精确到毫秒,sap要求每次调用生成不重复guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
|
||||
var sapMaterialInput = new SapMaterialInput()
|
||||
{
|
||||
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._SWPDM_1185_SAP___,
|
||||
Mtart = input._SWPDM_1186_SAP_____,
|
||||
Maktx = input._SWPDM_1188_SAP___,
|
||||
Meins = input._SWPDM_126_SW___,
|
||||
Matkl = input._SWPDM_1203_SAP____,
|
||||
Bismt = input._SWPDM_1189_SAP___ID_____,
|
||||
Groes = input._SWPDM_1200_SAP_____,
|
||||
Normt = input._SWPDM_65_SW___,
|
||||
Ferth = input._SWPDM_62_SW___,
|
||||
Zeinr = input._SWPDM_61_SW_____,
|
||||
Mstae = input._SWPDM_1209_SAP_____,
|
||||
Raube = "",
|
||||
Mhdrz = "",
|
||||
Mhdhb = "",
|
||||
Werks = input._SWPDM_1187_SAP___,
|
||||
Beskz = input._SWPDM_1196_SAP_____,
|
||||
Sobsl = input._SWPDM_1198_SAP_____,
|
||||
Schgt = input._SWPDM_1197_SAP_____,
|
||||
Rgekz = input._SWPDM_1199_SAP___,
|
||||
Zbom = input._SWPDM_1208_SAP___BOM___
|
||||
};
|
||||
|
||||
var apiOutput = await _sapService.SapMaterialApi(sapMaterialInput);
|
||||
string codeVal = apiOutput.code == "S" ? "成功" : "失败";
|
||||
var msg = apiOutput.msg;
|
||||
if (apiOutput.msg == "")
|
||||
{
|
||||
msg = "同步成功";
|
||||
}
|
||||
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005532 = DateTime.Now,
|
||||
fld005529 = codeVal,
|
||||
fld005530 = "N",
|
||||
fld005531 = msg
|
||||
})
|
||||
.Where(it => it.idRecord == input.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
var output = new SapOutput()
|
||||
{
|
||||
parameter = apiOutput.parameter,
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = apiOutput.result
|
||||
};
|
||||
return output;
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取BOM
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "GetBOM", Description = "获取BOM", Order = 1000), HttpPost]
|
||||
[DisplayName("获取BOM")]
|
||||
public async Task<SqlSugarPagedList<ProductDesignLibraryBomOutput>> GetBOM(BomPageProductDesignLibraryInput input)
|
||||
{
|
||||
var configid = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 137 && x.ConfigSystemName == "SolidWorks").FirstAsync();
|
||||
var parent = await _obj137Rep.AsQueryable()
|
||||
.Where(x => x.RecordGuid == input.ParentGuid && x.deleted == false && x._system_objConfigurationName == "默认" && (x.SWPDMFileName != "SLDDRW" || x.SWPDMFileName == null))
|
||||
.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 && (x.fld005577 != "不包含"||x.fld005577==null))
|
||||
.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<ProductDesignLibraryBomOutput>().ToPagedListAsync(input.Page, input.PageSize);
|
||||
return BomData;
|
||||
}
|
||||
/// <summary>
|
||||
/// 产品设计库-Bom同步到SAP
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "SyncToSAPBom"), HttpPost]
|
||||
[DisplayName("产品设计库-Bom同步到SAP")]
|
||||
public async Task<SapOutput> SyncToSAPBom(List<BomPageProductDesignLibraryInput> input)
|
||||
{
|
||||
var ParentData = await _obj137Rep.AsQueryable().Where(x => x.RecordGuid == input[0].ParentGuid && x.deleted == false && x.VersionIndex == input[0].ParentVersion && (x._SWPDM_1202_SW_____ != "不展开"||x._SWPDM_1202_SW_____==null)).FirstAsync();
|
||||
var EcnData = await _obj118Rep.AsQueryable().Where(x => x.RecordGuid == ParentData.fld005679_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++)
|
||||
{
|
||||
var Verification = await _dataValidationService.VerificationMaterial(input[i].ChildObjID, input[i].PartNumber, input[i].ChildGuid);
|
||||
if (Verification == "不存在")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//int sun = i + 1;
|
||||
var itemData = new ItemData()
|
||||
{
|
||||
POSNR = "",//组件序号 sun.ToString()
|
||||
IDNRK = input[i].PartNumber,//组件物料号
|
||||
MENGE = input[i].QtyManual.ToString(),//组件数量
|
||||
SORTF = input[i].fld005541,
|
||||
ITISOB = input[i].fld005542,
|
||||
ALPGR = input[i].fld005543,
|
||||
ALPRF = input[i].fld005544,
|
||||
ZDELETE = input[i].fld005545,
|
||||
POSTP = input[i].fld005546,
|
||||
ZYFMK = input[i].fld005547
|
||||
};
|
||||
itemDataList.Add(itemData);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(ParentData.fld005686))
|
||||
{
|
||||
var configid = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 137 && x.ConfigSystemName == "SolidWorks").FirstAsync();
|
||||
var BomData = await _configurationDataRep.AsQueryable().Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == input[0].ParentGuid && x.isDeleted == false && x.ParentVersion == Convert.ToInt32(ParentData.fld005686) && (x.fld005577 != "不包含" || x.fld005577 == null)).ToListAsync();
|
||||
for (int i = 0; i < BomData.Count; i++)
|
||||
{
|
||||
|
||||
var itemList = itemDataList.Where(x => x.IDNRK == BomData[i].PartNumber).ToList();
|
||||
if (itemList.Count == 0)
|
||||
{
|
||||
var Verification = await _dataValidationService.VerificationMaterial(BomData[i].ChildObjID, BomData[i].PartNumber, BomData[i].ChildGuid);
|
||||
if (Verification == "不存在")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//int sun = i + 1;
|
||||
var itemData = new ItemData()
|
||||
{
|
||||
POSNR = "",//组件序号 sun.ToString()
|
||||
IDNRK = BomData[i].PartNumber,//组件物料号
|
||||
MENGE = BomData[i].QtyManual.ToString(),//组件数量
|
||||
SORTF = BomData[i].fld005541,
|
||||
ITISOB = BomData[i].fld005542,
|
||||
ALPGR = BomData[i].fld005543,
|
||||
ALPRF = BomData[i].fld005544,
|
||||
ZDELETE = "X",
|
||||
POSTP = BomData[i].fld005546,
|
||||
ZYFMK = BomData[i].fld005547
|
||||
};
|
||||
itemDataList.Add(itemData);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//获取时间戳精确到毫秒,sap要求每次调用生成不重复guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
var fld005678 = ParentData.fld005678 ?? 1;
|
||||
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._SWPDM_1187_SAP___,//工厂
|
||||
Bmeng = fld005678.ToString(),
|
||||
Aennr = ecn,
|
||||
Datuv = ParentData.fld005680.ToString(),
|
||||
ItemList = itemDataList
|
||||
};
|
||||
var apiOutput = await _sapService.SapBomApi(isreq);
|
||||
string codeVal = apiOutput.code == "S" ? "成功" : "失败";
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005539 = DateTime.Now,
|
||||
fld005533 = codeVal,
|
||||
fld005534 = "N",
|
||||
fld005535 = apiOutput.msg,
|
||||
fld005686 = input[0].ParentVersion.ToString()
|
||||
})
|
||||
.Where(it => it.idRecord == ParentData.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
var msg = apiOutput.msg;
|
||||
if (apiOutput.msg == "")
|
||||
{
|
||||
msg = "同步成功";
|
||||
}
|
||||
var output = new SapOutput()
|
||||
{
|
||||
parameter = apiOutput.parameter,
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = apiOutput.result
|
||||
};
|
||||
return output;
|
||||
}
|
||||
/// <summary>
|
||||
/// 产品设计库-批量同步到SAP
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "BatchSyncToSAP"), HttpPost]
|
||||
[DisplayName("产品设计库-批量同步到SAP")]
|
||||
public async Task<List<SapOutput>> BatchSyncToSAP(List<ProductDesignLibraryInput> input)
|
||||
{
|
||||
const string lengthError = "物料描述长度大于40,请检查!";
|
||||
const string synchronized = "该物料编码已同步!";
|
||||
var SapOutputList = new List<SapOutput>();
|
||||
var Requser = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName);
|
||||
for (int i = 0; i < input.Count; i++)
|
||||
{
|
||||
// 验证物料描述长度
|
||||
if (input[i]._SWPDM_1188_SAP___.Length > 40)
|
||||
{
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005532 = DateTime.Now,
|
||||
fld005530 = "N",
|
||||
fld005531 = lengthError,
|
||||
fld005529 = "失败"
|
||||
})
|
||||
.Where(it => it.idRecord == input[i].idRecord)
|
||||
.ExecuteCommandAsync().ConfigureAwait(false);
|
||||
|
||||
SapOutputList.Add(new SapOutput()
|
||||
{
|
||||
materialCode = input[i]._System_objNBS,
|
||||
code = "失败",
|
||||
msg = lengthError,
|
||||
result = lengthError
|
||||
});
|
||||
continue;
|
||||
}
|
||||
if (input[i].fld005530 != "A" && input[i].fld005530 != "M")
|
||||
{
|
||||
SapOutputList.Add(new SapOutput()
|
||||
{
|
||||
materialCode = input[i]._System_objNBS,
|
||||
code = "失败",
|
||||
msg = synchronized,
|
||||
result = synchronized
|
||||
});
|
||||
continue;
|
||||
}
|
||||
//获取时间戳精确到毫秒,sap要求每次调用生成不重复guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
var sapMaterialInput = new SapMaterialInput()
|
||||
{
|
||||
Reqkeyid = "",
|
||||
Businessid = "",
|
||||
Messageid = "",
|
||||
Sndprn = "PLM",
|
||||
Rcvprn = "SAP",
|
||||
Requser = Requser,
|
||||
Note1 = "",
|
||||
Note2 = "",
|
||||
Note3 = "",
|
||||
Zwbid = millisecondTimestamp,
|
||||
Matnr = input[i]._System_objNBS,
|
||||
Mbrsh = input[i]._SWPDM_1185_SAP___,
|
||||
Mtart = input[i]._SWPDM_1186_SAP_____,
|
||||
Maktx = input[i]._SWPDM_1188_SAP___,
|
||||
Meins = input[i]._SWPDM_126_SW___,
|
||||
Matkl = input[i]._SWPDM_1203_SAP____,
|
||||
Bismt = input[i]._SWPDM_1189_SAP___ID_____,
|
||||
Groes = input[i]._SWPDM_1200_SAP_____,
|
||||
Normt = input[i]._SWPDM_65_SW___,
|
||||
Ferth = input[i]._SWPDM_62_SW___,
|
||||
Zeinr = input[i]._SWPDM_61_SW_____,
|
||||
Mstae = input[i]._SWPDM_1209_SAP_____,
|
||||
Raube = "",
|
||||
Mhdrz = "",
|
||||
Mhdhb = "",
|
||||
Werks = input[i]._SWPDM_1187_SAP___,
|
||||
Beskz = input[i]._SWPDM_1196_SAP_____,
|
||||
Sobsl = input[i]._SWPDM_1198_SAP_____,
|
||||
Schgt = input[i]._SWPDM_1197_SAP_____,
|
||||
Rgekz = input[i]._SWPDM_1199_SAP___,
|
||||
Zbom = input[i]._SWPDM_1208_SAP___BOM___
|
||||
};
|
||||
var sapOutput = await _sapService.SapMaterialApi(sapMaterialInput);
|
||||
string codeVal = sapOutput.code == "S" ? "成功" : "失败";
|
||||
string msg = sapOutput.msg;
|
||||
|
||||
if (sapOutput.msg == "")
|
||||
{
|
||||
msg = "同步成功";
|
||||
}
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005532 = DateTime.Now,
|
||||
fld005529 = codeVal,
|
||||
fld005530 = "N",
|
||||
fld005531 = msg
|
||||
})
|
||||
.Where(it => it.idRecord == input[i].idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
var output = new SapOutput()
|
||||
{
|
||||
parameter = sapOutput.parameter,
|
||||
materialCode = input[0]._System_objNBS,
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = sapOutput.result
|
||||
};
|
||||
SapOutputList.Add(output);
|
||||
}
|
||||
|
||||
return SapOutputList;
|
||||
}
|
||||
/// <summary>
|
||||
/// 产品设计库-定时同步到SAP
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "TimingSyncToSAP"), HttpGet]
|
||||
[DisplayName("产品设计库-定时同步到SAP")]
|
||||
[AllowAnonymous]
|
||||
public async Task<List<SapOutput>> TimingSyncToSAP()
|
||||
{
|
||||
var input = await _obj137Rep.AsQueryable()
|
||||
.Where(x => x.CheckedStatus == 0 && x.deleted == false && x.IsLatestVersion == true && (x.fld005530 == "A" || x.fld005530 == "M") && x._system_objConfigurationName == "默认" && (x.SWPDMFileName != "SLDDRW" || x.SWPDMFileName == null))
|
||||
.ToListAsync();
|
||||
const string lengthError = "物料描述长度大于40,请检查!";
|
||||
var SapOutputList = new List<SapOutput>();
|
||||
var Requser = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName);
|
||||
for (int i = 0; i < input.Count; i++)
|
||||
{
|
||||
// 验证物料描述长度
|
||||
if (input[i]._SWPDM_1188_SAP___.Length > 40)
|
||||
{
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005532 = DateTime.Now,
|
||||
fld005530 = "N",
|
||||
fld005531 = lengthError,
|
||||
fld005529 = "失败"
|
||||
})
|
||||
.Where(it => it.idRecord == input[i].idRecord)
|
||||
.ExecuteCommandAsync().ConfigureAwait(false);
|
||||
|
||||
SapOutputList.Add(new SapOutput()
|
||||
{
|
||||
materialCode = input[i]._System_objNBS,
|
||||
code = "失败",
|
||||
msg = lengthError,
|
||||
result = lengthError
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
//获取时间戳精确到毫秒,sap要求每次调用生成不重复guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
var sapMaterialInput = new SapMaterialInput()
|
||||
{
|
||||
Reqkeyid = "",
|
||||
Businessid = "",
|
||||
Messageid = "",
|
||||
Sndprn = "PLM",
|
||||
Rcvprn = "SAP",
|
||||
Requser = Requser,
|
||||
Note1 = "",
|
||||
Note2 = "",
|
||||
Note3 = "",
|
||||
Zwbid = millisecondTimestamp,
|
||||
Matnr = input[i]._System_objNBS,
|
||||
Mbrsh = input[i]._SWPDM_1185_SAP___,
|
||||
Mtart = input[i]._SWPDM_1186_SAP_____,
|
||||
Maktx = input[i]._SWPDM_1188_SAP___,
|
||||
Meins = input[i]._SWPDM_126_SW___,
|
||||
Matkl = input[i]._SWPDM_1203_SAP____,
|
||||
Bismt = input[i]._SWPDM_1189_SAP___ID_____,
|
||||
Groes = input[i]._SWPDM_1200_SAP_____,
|
||||
Normt = input[i]._SWPDM_65_SW___,
|
||||
Ferth = input[i]._SWPDM_62_SW___,
|
||||
Zeinr = input[i]._SWPDM_61_SW_____,
|
||||
Mstae = input[i]._SWPDM_1209_SAP_____,
|
||||
Raube = "",
|
||||
Mhdrz = "",
|
||||
Mhdhb = "",
|
||||
Werks = input[i]._SWPDM_1187_SAP___,
|
||||
Beskz = input[i]._SWPDM_1196_SAP_____,
|
||||
Sobsl = input[i]._SWPDM_1198_SAP_____,
|
||||
Schgt = input[i]._SWPDM_1197_SAP_____,
|
||||
Rgekz = input[i]._SWPDM_1199_SAP___,
|
||||
Zbom = input[i]._SWPDM_1208_SAP___BOM___
|
||||
};
|
||||
var sapOutput = await _sapService.SapMaterialApi(sapMaterialInput);
|
||||
string codeVal = sapOutput.code == "S" ? "成功" : "失败";
|
||||
string msg = sapOutput.msg;
|
||||
|
||||
if (sapOutput.msg == "")
|
||||
{
|
||||
msg = "同步成功";
|
||||
}
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005532 = DateTime.Now,
|
||||
fld005529 = codeVal,
|
||||
fld005530 = "N",
|
||||
fld005531 = msg
|
||||
})
|
||||
.Where(it => it.idRecord == input[i].idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
var output = new SapOutput()
|
||||
{
|
||||
parameter = sapOutput.parameter,
|
||||
materialCode = input[0]._System_objNBS,
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = sapOutput.result
|
||||
};
|
||||
SapOutputList.Add(output);
|
||||
}
|
||||
|
||||
return SapOutputList;
|
||||
}
|
||||
/// <summary>
|
||||
/// 产品设计库-定时同步 BOM 到 SAP
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "TimingSyncToSAPBom"), HttpGet]
|
||||
[DisplayName("产品设计库-定时同步 Bom 到 SAP")]
|
||||
[AllowAnonymous]
|
||||
public async Task<List<SapOutput>> TimingSyncToSAPBom()
|
||||
{
|
||||
var sapOutputList = new List<SapOutput>();
|
||||
var sapUserName = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName);
|
||||
// 配置
|
||||
var configid = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 137 && x.ConfigSystemName == "SolidWorks").FirstAsync();
|
||||
|
||||
var materialData = await _obj137Rep.AsQueryable()
|
||||
.Where(x => x.CheckedStatus == 0 && x.deleted == false && x.IsLatestVersion == true && (x.fld005530 == "A" || x.fld005530 == "M") && x._system_objConfigurationName == "默认" && x.SWPDMFileName != "SLDDRW")
|
||||
.ToListAsync();
|
||||
var groupedData = materialData.GroupBy(item => item.RecordGuid)
|
||||
.Select(group => group.OrderByDescending(item => item.VersionIndex).First())
|
||||
.ToList();
|
||||
|
||||
foreach (var item in groupedData)
|
||||
{
|
||||
// 获取版本号
|
||||
var versionIndex = item.VersionIndex;
|
||||
// 获取 ECN guid
|
||||
var ecnGuid = item.fld005679_Rec;
|
||||
// 查询 BOM
|
||||
var bomData = await _configurationDataRep.AsQueryable()
|
||||
.Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == item.RecordGuid && x.isDeleted == false && x.ParentVersion == versionIndex && (x.fld005577 != "不包含" || x.fld005577 == null)).ToListAsync();
|
||||
if (bomData.Count == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// 查询 ECN 编码
|
||||
var ecnData = await _obj118Rep.AsQueryable().Where(x => x.RecordGuid == ecnGuid && x.deleted == false).OrderByDescending(x => x.VersionIndex).FirstAsync();
|
||||
var ecn = ecnData != null ? ecnData._System_objNBS : "";
|
||||
|
||||
var itemDataList = new List<ItemData>();
|
||||
foreach (var bomItem in bomData)
|
||||
{
|
||||
var verification = await _dataValidationService.VerificationMaterial(bomItem.ChildObjID, bomItem.PartNumber, bomItem.ChildGuid);
|
||||
if (verification == "不存在")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var itemData = new ItemData
|
||||
{
|
||||
POSNR = (bomData.IndexOf(bomItem) + 1).ToString(),
|
||||
IDNRK = bomItem.PartNumber,
|
||||
MENGE = bomItem.QtyManual.ToString(),
|
||||
SORTF = bomItem.fld005541,
|
||||
ITISOB = bomItem.fld005542,
|
||||
ALPGR = bomItem.fld005543,
|
||||
ALPRF = bomItem.fld005544,
|
||||
ZDELETE = bomItem.fld004940,
|
||||
POSTP = bomItem.fld005546,
|
||||
ZYFMK = bomItem.fld005547
|
||||
};
|
||||
itemDataList.Add(itemData);
|
||||
|
||||
}
|
||||
|
||||
var ParentData = await _obj137Rep.AsQueryable().Where(x => x.RecordGuid == bomData[0].ParentGuid && x.deleted == false && x.VersionIndex == bomData[0].ParentVersion).FirstAsync();
|
||||
|
||||
if (!string.IsNullOrEmpty(ParentData.fld005686))
|
||||
{
|
||||
var configidold = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 137 && x.ConfigSystemName == "SolidWorks").FirstAsync();
|
||||
var BomData = await _configurationDataRep.AsQueryable().Where(x => x.ConfigId == configidold.ConfigID && x.ParentGuid == bomData[0].ParentGuid && x.isDeleted == false && x.ParentVersion == Convert.ToInt32(ParentData.fld005686) && (x.fld005577 != "不包含" || x.fld005577 == null)).ToListAsync();
|
||||
for (int i = 0; i < BomData.Count; i++)
|
||||
{
|
||||
|
||||
var itemList = itemDataList.Where(x => x.IDNRK == BomData[i].PartNumber).ToList();
|
||||
if (itemList.Count == 0)
|
||||
{
|
||||
var Verification = await _dataValidationService.VerificationMaterial(BomData[i].ChildObjID, BomData[i].PartNumber, BomData[i].ChildGuid);
|
||||
if (Verification == "不存在")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//int sun = i + 1;
|
||||
var itemData = new ItemData()
|
||||
{
|
||||
POSNR = "",//组件序号 sun.ToString()
|
||||
IDNRK = BomData[i].PartNumber,//组件物料号
|
||||
MENGE = BomData[i].QtyManual.ToString(),//组件数量
|
||||
SORTF = BomData[i].fld005541,
|
||||
ITISOB = BomData[i].fld005542,
|
||||
ALPGR = BomData[i].fld005543,
|
||||
ALPRF = BomData[i].fld005544,
|
||||
ZDELETE = "X",
|
||||
POSTP = BomData[i].fld005546,
|
||||
ZYFMK = BomData[i].fld005547
|
||||
};
|
||||
itemDataList.Add(itemData);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 获取时间戳精确到毫秒,sap 要求每次调用生成不重复 guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
|
||||
var fld005678 = item.fld005678 ?? 1;
|
||||
|
||||
var isreq = new IS_REQ
|
||||
{
|
||||
ReqKeyId = "",
|
||||
BusinessId = "",
|
||||
MessageId = "",
|
||||
SndPrn = "PLM",
|
||||
RcvPrn = "SAP",
|
||||
ReqUser = sapUserName,
|
||||
Note1 = "",
|
||||
Note2 = "",
|
||||
Note3 = "",
|
||||
Zwbid = millisecondTimestamp,
|
||||
Matnr = item._System_objNBS,
|
||||
Werks = item._SWPDM_1187_SAP___,
|
||||
Bmeng = fld005678.ToString(),
|
||||
Aennr = ecn,
|
||||
Datuv = item.fld005680.ToString(),
|
||||
ItemList = itemDataList
|
||||
};
|
||||
|
||||
var apiOutput = await _sapService.SapBomApi(isreq);
|
||||
string codeVal = apiOutput.code == "S" ? "成功" : "失败";
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005539 = DateTime.Now,
|
||||
fld005533 = codeVal,
|
||||
fld005534 = "N",
|
||||
fld005535 = apiOutput.msg,
|
||||
fld005686 = bomData[0].ParentVersion.ToString()
|
||||
})
|
||||
.Where(it => it.idRecord == item.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
|
||||
var msg = apiOutput.msg;
|
||||
if (string.IsNullOrEmpty(msg))
|
||||
{
|
||||
msg = "同步成功";
|
||||
}
|
||||
|
||||
var output = new SapOutput
|
||||
{
|
||||
parameter = apiOutput.parameter,
|
||||
materialCode = item._System_objNBS,
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = apiOutput.result
|
||||
};
|
||||
sapOutputList.Add(output);
|
||||
}
|
||||
return sapOutputList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品设计库-获取工艺路线
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "GetProcessRoute", Description = "获取工艺路线", Order = 1000), HttpPost]
|
||||
[DisplayName("获取工艺路线")]
|
||||
public async Task<SqlSugarPagedList<ProductDesignLibraryBomOutput>> GetProcessRoute(BomPageProductDesignLibraryInput input)
|
||||
{
|
||||
var configid = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 137 && x.ConfigSystemName == "pBOM").FirstAsync();
|
||||
var parent = await _obj137Rep.AsQueryable()
|
||||
.Where(x => x.RecordGuid == input.ParentGuid && x.deleted == false && x._system_objConfigurationName == "默认" && (x.SWPDMFileName != "SLDDRW" || x.SWPDMFileName == null))
|
||||
.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<ProductDesignLibraryBomOutput>().ToPagedListAsync(input.Page, input.PageSize);
|
||||
return BomData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品设计库-工艺路线同步到SAP
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "SyncToSAPProcessRoute"), HttpPost]
|
||||
[DisplayName("产品设计库-工艺路线同步到SAP")]
|
||||
public async Task<SapOutput> SyncToSAPProcessRoute(List<BomPageProductDesignLibraryInput> input)
|
||||
{
|
||||
var ParentData = await _obj137Rep.AsQueryable()
|
||||
.Where(x => x.RecordGuid == input[0].ParentGuid && x.deleted == false && x.VersionIndex == input[0].ParentVersion && x._system_objConfigurationName == "默认" && (x.SWPDMFileName != "SLDDRW" || x.SWPDMFileName == null))
|
||||
.FirstAsync();
|
||||
|
||||
var itemDataList = new List<SapProcessRouteItemData>();
|
||||
|
||||
for (int i = 0; i < input.Count; i++)
|
||||
{
|
||||
var Verification = await _dataValidationService.VerificationMaterial(input[i].ChildObjID, input[i].PartNumber, input[i].ChildGuid);
|
||||
if (Verification == "不存在")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//获取工序描述
|
||||
var procedureDescription = await _obj122Rep.AsQueryable().Where(x => x.RecordGuid == input[i].ChildGuid).ToListAsync();
|
||||
//获取工作中心
|
||||
var workCenter = await _obj121Rep.AsQueryable().Where(x => x.RecordGuid == procedureDescription[0].fld005059_Rec).ToListAsync();
|
||||
//int sun = i + 1;
|
||||
var itemData = new SapProcessRouteItemData()
|
||||
{
|
||||
VORNR = input[i].Marker,
|
||||
LTXA1 = procedureDescription[0]._System_ObjDescription,
|
||||
ARBPL = workCenter[0]._System_objNBS,
|
||||
VGW01 = input[i].fld005571.ToString(),
|
||||
VGE01 = input[i].fld005572,
|
||||
STEUS = input[i].fld005573,
|
||||
BMSCH = input[i].fld005575.ToString()
|
||||
|
||||
};
|
||||
itemDataList.Add(itemData);
|
||||
}
|
||||
|
||||
//获取时间戳精确到毫秒,sap要求每次调用生成不重复guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
|
||||
var Datuv = ParentData.fld005680.ToString();
|
||||
if (!string.IsNullOrEmpty(Datuv))
|
||||
{
|
||||
Datuv = ParentData.fld005680.ToDateTime().ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
var isreq = new SapProcessRouteIS_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._SWPDM_1187_SAP___,
|
||||
Datuv = Datuv,
|
||||
Plnal = "",
|
||||
|
||||
ItemList = itemDataList
|
||||
};
|
||||
var apiOutput = await _sapService.SapProcessRouteApi(isreq);
|
||||
string codeVal = apiOutput.code == "S" ? "成功" : "失败";
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005540 = DateTime.Now,
|
||||
fld005536 = codeVal,
|
||||
fld005537 = "N",
|
||||
fld005538 = apiOutput.msg
|
||||
})
|
||||
.Where(it => it.idRecord == ParentData.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
var msg = apiOutput.msg;
|
||||
if (apiOutput.msg == "")
|
||||
{
|
||||
msg = "同步成功";
|
||||
}
|
||||
var output = new SapOutput()
|
||||
{
|
||||
parameter = apiOutput.parameter,
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = apiOutput.result
|
||||
};
|
||||
return output;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 产品设计库-定时同步工艺路线到SAP
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ApiDescriptionSettings(Name = "TimingSyncToSAPProcessRoute"), HttpGet]
|
||||
[DisplayName("产品设计库-定时同步工艺路线到SAP")]
|
||||
[AllowAnonymous]
|
||||
public async Task<List<SapOutput>> TimingSyncToSAPProcessRoute()
|
||||
{
|
||||
var sapOutputList = new List<SapOutput>();
|
||||
var sapUserName = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName);
|
||||
// 配置
|
||||
var configid = await _configurationsRep.AsQueryable().Where(x => x.ObjectId == 137 && x.ConfigSystemName == "pBOM").FirstAsync();
|
||||
|
||||
//查询需要同步的产品
|
||||
var materialData = await _obj137Rep.AsQueryable()
|
||||
.Where(x => x.CheckedStatus == 0 && x.deleted == false && x.IsLatestVersion == true && x.fld005529 == "成功" && (x.fld005537 == "A" || x.fld005537 == "M") && x._system_objConfigurationName == "默认" && (x.SWPDMFileName != "SLDDRW" || x.SWPDMFileName == null))
|
||||
.ToListAsync();
|
||||
//分组查询最大版本的物料
|
||||
var groupedData = materialData.GroupBy(item => item.RecordGuid)
|
||||
.Select(group => group.OrderByDescending(item => item.VersionIndex).First())
|
||||
.ToList();
|
||||
|
||||
foreach (var item in groupedData)
|
||||
{
|
||||
// 获取版本号
|
||||
var versionIndex = item.VersionIndex;
|
||||
// 查询 BOM
|
||||
var processRouteData = await _configurationDataRep.AsQueryable()
|
||||
.Where(x => x.ConfigId == configid.ConfigID && x.ParentGuid == item.RecordGuid && x.isDeleted == false && x.ParentVersion == versionIndex).ToListAsync();
|
||||
if (processRouteData.Count == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var itemDataList = new List<SapProcessRouteItemData>();
|
||||
|
||||
foreach (var processRouteItem in processRouteData)
|
||||
{
|
||||
var verification = await _dataValidationService.VerificationMaterial(processRouteItem.ChildObjID, processRouteItem.PartNumber, processRouteItem.ChildGuid);
|
||||
if (verification == "不存在")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//获取工序描述
|
||||
var procedureDescription = await _obj122Rep.AsQueryable().Where(x => x.RecordGuid == processRouteItem.ChildGuid).ToListAsync();
|
||||
//获取工作中心
|
||||
var workCenter = await _obj121Rep.AsQueryable().Where(x => x.RecordGuid == procedureDescription[0].fld005059_Rec).ToListAsync();
|
||||
var itemData = new SapProcessRouteItemData()
|
||||
{
|
||||
VORNR = processRouteItem.Marker,
|
||||
LTXA1 = procedureDescription[0]._System_ObjDescription,
|
||||
ARBPL = workCenter[0]._System_objNBS,
|
||||
VGW01 = processRouteItem.fld005571.ToString(),
|
||||
VGE01 = processRouteItem.fld005572,
|
||||
STEUS = processRouteItem.fld005573,
|
||||
BMSCH = processRouteItem.fld005575.ToString()
|
||||
|
||||
};
|
||||
itemDataList.Add(itemData);
|
||||
}
|
||||
//获取时间戳精确到毫秒,sap要求每次调用生成不重复guid
|
||||
string millisecondTimestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
|
||||
var Datuv = item.fld005680.ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(Datuv))
|
||||
{
|
||||
Datuv = item.fld005680.ToDateTime().ToString("yyyy-MM-dd");
|
||||
}
|
||||
var isreq = new SapProcessRouteIS_REQ()
|
||||
{
|
||||
ReqKeyId = "",
|
||||
BusinessId = "",
|
||||
MessageId = "",
|
||||
SndPrn = "PLM",
|
||||
RcvPrn = "SAP",
|
||||
ReqUser = await _sysConfigService.GetConfigValueByCode<string>(ConfigConst.SapUserName),
|
||||
Note1 = "",
|
||||
Note2 = "",
|
||||
Note3 = "",
|
||||
Zwbid = millisecondTimestamp,
|
||||
Matnr = item._System_objNBS,
|
||||
Werks = item._SWPDM_1187_SAP___,
|
||||
Datuv = Datuv,
|
||||
Plnal = "",
|
||||
|
||||
ItemList = itemDataList
|
||||
};
|
||||
|
||||
var apiOutput = await _sapService.SapProcessRouteApi(isreq);
|
||||
string codeVal = apiOutput.code == "S" ? "成功" : "失败";
|
||||
await _obj137Rep.AsUpdateable()
|
||||
.SetColumns(it => new Obj137
|
||||
{
|
||||
fld005540 = DateTime.Now,
|
||||
fld005536 = codeVal,
|
||||
fld005537 = "N",
|
||||
fld005538 = apiOutput.msg
|
||||
})
|
||||
.Where(it => it.idRecord == item.idRecord)
|
||||
.ExecuteCommandAsync();
|
||||
var msg = apiOutput.msg;
|
||||
if (apiOutput.msg == "")
|
||||
{
|
||||
msg = "同步成功";
|
||||
}
|
||||
var output = new SapOutput()
|
||||
{
|
||||
parameter = apiOutput.parameter,
|
||||
code = codeVal,
|
||||
msg = msg,
|
||||
result = apiOutput.result
|
||||
};
|
||||
|
||||
sapOutputList.Add(output);
|
||||
}
|
||||
return sapOutputList;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
import request from '/@/utils/request';
|
||||
enum Api {
|
||||
PageProductDesignLibrary = '/api/productDesignLibrary/page',
|
||||
SyncToSAPProductDesignLibrary = '/api/productDesignLibrary/SyncToSAP',
|
||||
GetBOMProductDesignLibrary = '/api/productDesignLibrary/getBOM',
|
||||
SyncToSAPBomProductDesignLibrary = '/api/productDesignLibrary/syncToSAPBom',
|
||||
BatchSyncToSAPProductDesignLibrary = '/api/productDesignLibrary/batchSyncToSAP',
|
||||
GetetProcessRouteProductDesignLibrary = '/api/productDesignLibrary/getProcessRoute',
|
||||
SyncToSAPProcessRouteProductDesignLibrary = '/api/productDesignLibrary/syncToSAPProcessRoute'
|
||||
}
|
||||
|
||||
// 分页查询产品管理
|
||||
export const PageProductDesignLibrary = (params?: any) =>
|
||||
request({
|
||||
url: Api.PageProductDesignLibrary,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 同步到SAP
|
||||
export const SyncToSAPProductDesignLibrary = (params?: any) =>
|
||||
request({
|
||||
url: Api.SyncToSAPProductDesignLibrary,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
// 分页查询产品管理BOM
|
||||
export const GetBOMProductDesignLibrary = (params?: any) =>
|
||||
request({
|
||||
url: Api.GetBOMProductDesignLibrary,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// BOM同步到sap
|
||||
export const SyncToSAPBomProductDesignLibrary = (params?: any) =>
|
||||
request({
|
||||
url: Api.SyncToSAPBomProductDesignLibrary,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
// 批量同步到SAP
|
||||
export const BatchSyncToSAPProductDesignLibrary = (params?: any) =>
|
||||
request({
|
||||
url: Api.BatchSyncToSAPProductDesignLibrary,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
|
||||
// 分页查询工艺路线
|
||||
export const GetetProcessRouteProductDesignLibrary = (params?: any) =>
|
||||
request({
|
||||
url: Api.GetetProcessRouteProductDesignLibrary,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
||||
// 工艺路线同步到sap
|
||||
export const SyncToSAPProcessRouteProductDesignLibrary = (params?: any) =>
|
||||
request({
|
||||
url: Api.SyncToSAPProcessRouteProductDesignLibrary,
|
||||
method: 'post',
|
||||
data: params,
|
||||
});
|
@ -0,0 +1,493 @@
|
||||
<template>
|
||||
<div class="productDesignLibrary-container">
|
||||
<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="产品设计库编号" prop="_System_objNBS">
|
||||
<el-input v-model="state.queryParams._System_objNBS" placeholder="产品设计库编号" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="8" :lg="5" :xl="6" class="mb5">
|
||||
<el-form-item label="产品设计库描述" prop="_SWPDM_1188_SAP___">
|
||||
<el-input v-model="state.queryParams._SWPDM_1188_SAP___" placeholder="产品设计库描述" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</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="'productDesignLibrary/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">
|
||||
<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="batchSyncToSAP" v-auth="'productDesignLibrary/batchSyncToSAP'"> 批量同步到SAP
|
||||
</el-button>
|
||||
</template>
|
||||
<template #row_buttons="{ row }">
|
||||
<el-tooltip content="同步BOM" placement="top">
|
||||
<el-button icon="ele-MessageBox" size="small" text="" type="primary" @click="getBOM(row)"
|
||||
v-auth="'productDesignLibrary/getBOM'" v-if="(row.fld005534=='A'||row.fld005534=='M')&&row.fld005529=='成功'&& row._SWPDM_1202_SW_____ != '不展开'" >
|
||||
同步BOM </el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="工艺路线" placement="top">
|
||||
<el-button icon="ele-MessageBox" size="small" text="" type="primary" @click="examineProcessRoute(row)"
|
||||
v-if="(row.fld005537=='A'||row.fld005537=='M')&&row.fld005529=='成功'">
|
||||
工艺路线 </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="'productDesignLibrary/syncToSAP'" v-if="row.fld005530=='A'||row.fld005530=='M'"> 同步到SAP </el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
|
||||
<!-- 添加 drawer 抽屉 -->
|
||||
<el-drawer v-model="showBom" title="BOM 详情" :direction="'rtl'" :visible.sync="false" size="50%">
|
||||
<!-- 这里可以放置 BOM 的具体内容 -->
|
||||
<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% ;display: none" @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="syncToSAPBom" v-auth="'productDesignLibrary/syncToSAPBom'"> BOM同步到SAP
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
</el-drawer>
|
||||
|
||||
<el-drawer v-model="showProcessRoute" title="工艺路线" :direction="'rtl'" :visible.sync="false" size="50%">
|
||||
<!-- 这里可以放置 BOM 的具体内容 -->
|
||||
<el-card class="full-table" shadow="hover" style="margin-top: 5px;height: 100%;">
|
||||
<el-form :model="stateProcessRoute.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true"
|
||||
label-width="auto" style="flex: 1 1 0%;display: none; " @submit.prevent="handleQueryProcessRoute">
|
||||
<el-input v-model="stateProcessRoute.queryParams.ParentGuid" placeholder="父GUID" @click="handleQueryProcessRoute" />
|
||||
</el-form>
|
||||
|
||||
<vxe-grid ref="processRoutexGrid" v-bind="processRouteOptions" v-on="gridEvents">
|
||||
<template #toolbar_tools>
|
||||
<el-button style="position: absolute; left: 0" icon="ele-Promotion" size="small" text=""
|
||||
type="success" @click="syncToSAPprocessRoute" v-auth="'productDesignLibrary/syncToSAPProcessRoute'"> 工艺路线同步到SAP
|
||||
</el-button>
|
||||
</template>
|
||||
</vxe-grid>
|
||||
</el-card>
|
||||
</el-drawer>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup name="productDesignLibrary">
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { ElMessageBox, ElMessage, ElLoading } from "element-plus";
|
||||
import { auth } from '/@/utils/authFunction';
|
||||
|
||||
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||
import { Local } from '/@/utils/storage';
|
||||
|
||||
import { formatDate } from '/@/utils/formatTime';
|
||||
import { PageProductDesignLibrary, SyncToSAPProductDesignLibrary, GetBOMProductDesignLibrary, BatchSyncToSAPProductDesignLibrary, SyncToSAPBomProductDesignLibrary ,GetetProcessRouteProductDesignLibrary,SyncToSAPProcessRouteProductDesignLibrary} from '/@/api/materialManagement/productDesignLibrary';
|
||||
import { disable } from 'ol/rotationconstraint';
|
||||
|
||||
// 子窗口对象
|
||||
const xGrid = ref<VxeGridInstance>();
|
||||
const editDialogRef = ref();
|
||||
|
||||
let bomTypeList: any;
|
||||
|
||||
// 变量
|
||||
const state = reactive({
|
||||
showAdvanceQueryUI: false,
|
||||
queryParams: {
|
||||
searchKey: undefined,
|
||||
_System_objNBS: undefined,
|
||||
_SWPDM_1188_SAP___: undefined,
|
||||
},
|
||||
localPageParam: {
|
||||
pageSize: 50 as number,
|
||||
defaultSort: { field: 'createTime', order: 'asc', descStr: 'desc' },
|
||||
},
|
||||
visible: false,
|
||||
title: '',
|
||||
});
|
||||
|
||||
// 重置操作
|
||||
const resetQuery = async () => {
|
||||
state.queryParams.searchKey = undefined,
|
||||
state.queryParams._System_objNBS = undefined,
|
||||
state.queryParams._SWPDM_1188_SAP___ = undefined,
|
||||
await xGrid.value?.commitProxy('reload');
|
||||
};
|
||||
|
||||
// 表格事件
|
||||
const gridEvents: VxeGridListeners = {
|
||||
// 只对 pager-config 配置时有效,分页发生改变时会触发该事件
|
||||
async pageChange({ pageSize }) {
|
||||
state.localPageParam.pageSize = pageSize;
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
// 当排序条件发生变化时会触发该事件
|
||||
async sortChange({ field, order }) {
|
||||
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||
Local.set(localPageParamKey, state.localPageParam);
|
||||
},
|
||||
};
|
||||
|
||||
// 本地存储参数
|
||||
const localPageParamKey = 'localPageParam:productDesignLibrary';
|
||||
|
||||
// 表格参数配置
|
||||
const options = useVxeTable(
|
||||
{
|
||||
id: 'productDesignLibrary',
|
||||
name: '产品设计库管理',
|
||||
columns: [
|
||||
{ type: 'checkbox', title: '', width: 60},
|
||||
{ type: 'seq', title: '序号', width: 60 },
|
||||
{ field: '_System_objNBS', title: '产品设计库编号', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: '_SWPDM_1188_SAP___', title: '描述', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005529', title: '物料同步状态', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005532', title: '物料同步时间', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005530', title: '物料同步标识', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005531', title: '物料同步信息', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
|
||||
{ field: 'fld005533', title: 'BOM同步状态', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005539', title: 'BOM同步时间', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005534', title: 'BOM同步标识', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005535', title: 'BOM同步信息', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
|
||||
{ field: 'fld005536', title: '工艺同步状态', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005540', title: '工艺同步时间', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005537', title: '工艺同步标识', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
{ field: 'fld005538', title: '工艺同步信息', minWidth: 100, showOverflow: 'tooltip', sortable: false },
|
||||
|
||||
{ title: '操作', fixed: 'right', width: 300, showOverflow: true, slots: { default: 'row_buttons' } },
|
||||
],
|
||||
},
|
||||
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||
{
|
||||
// 代理配置
|
||||
proxyConfig: { autoLoad: true, ajax: { query: ({ page, sort }) => handleQueryApi(page, sort) } },
|
||||
// 排序配置
|
||||
sortConfig: { defaultSort: Local.get(localPageParamKey)?.defaultSort || state.localPageParam.defaultSort },
|
||||
// 分页配置
|
||||
pagerConfig: { pageSize: Local.get(localPageParamKey)?.pageSize || state.localPageParam.pageSize },
|
||||
// 工具栏配置
|
||||
toolbarConfig: { export: false },
|
||||
// 行设置
|
||||
// rowConfig: { height: 80 },
|
||||
}
|
||||
);
|
||||
|
||||
// 页面初始化
|
||||
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' });
|
||||
var data = PageProductDesignLibrary(params)
|
||||
return data;
|
||||
};
|
||||
|
||||
// 查询操作
|
||||
const handleQuery = async (reset = false) => {
|
||||
options.loading = true;
|
||||
await xGrid.value?.commitProxy('query');
|
||||
options.loading = false;
|
||||
};
|
||||
|
||||
// 同步到SAP
|
||||
const syncToSAP = async (row: any) => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '同步中,请勿操作',
|
||||
});
|
||||
ElMessageBox.confirm(`确定要同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
var data = await SyncToSAPProductDesignLibrary(row);
|
||||
await handleQuery();
|
||||
if (data.data.result.code == "成功") {
|
||||
ElMessage.success("同步成功");
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
|
||||
};
|
||||
|
||||
//物料批量同步到SAP
|
||||
const batchSyncToSAP = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '批量同步中,请勿操作',
|
||||
});
|
||||
|
||||
var data = xGrid.value?.getCheckboxRecords();
|
||||
|
||||
ElMessageBox.confirm(`确定要批量同步物料吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
var output = await BatchSyncToSAPProductDesignLibrary(data);
|
||||
await handleQuery();
|
||||
var succeed = 0;
|
||||
var error = 0;
|
||||
for (let i = 0; i < output.data.result.length; i++) {
|
||||
var code = output.data.result[i].code
|
||||
if (code == "成功") {
|
||||
succeed++
|
||||
} else {
|
||||
error++
|
||||
}
|
||||
}
|
||||
ElMessageBox.alert("同步成功:" + succeed + ";" + "同步失败:" + error, '批量同步结果', {
|
||||
// 如果你想禁用它的自动对焦
|
||||
// autofocus: false,
|
||||
confirmButtonText: 'OK'
|
||||
})
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
// 变量
|
||||
const stateBom = reactive({
|
||||
showAdvanceQueryUI: false,
|
||||
queryParams: {
|
||||
PartNumber: undefined,
|
||||
Description: undefined,
|
||||
ParentGuid: undefined
|
||||
},
|
||||
localPageParam: {
|
||||
pageSize: 2000 as number,//这里
|
||||
defaultSort: { field: 'createTime', order: 'asc', descStr: 'desc' },
|
||||
},
|
||||
visible: false,
|
||||
title: '',
|
||||
});
|
||||
const showBom = ref(false);
|
||||
// 查看BOM
|
||||
const getBOM = async (row: any) => {
|
||||
stateBom.queryParams.ParentGuid = row.recordGuid;
|
||||
showBom.value = true;
|
||||
await handleQueryBom();
|
||||
};
|
||||
|
||||
// 本地存储参数
|
||||
const localPageParamKeyBom = 'localPageParam:productDesignLibraryBom';
|
||||
|
||||
// 表格参数配置
|
||||
const bomOptions = useVxeTable(
|
||||
{
|
||||
id: 'productDesignLibraryBom',
|
||||
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 = GetBOMProductDesignLibrary(params);
|
||||
return data;
|
||||
};
|
||||
|
||||
const bomxGrid = ref<VxeGridInstance>();
|
||||
|
||||
const handleQueryBom = async (reset = false) => {
|
||||
bomOptions.loading = true;
|
||||
await bomxGrid.value?.commitProxy('query');
|
||||
bomOptions.loading = false;
|
||||
};
|
||||
|
||||
//Bom同步到sap
|
||||
const syncToSAPBom = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: 'BOM同步中,请勿操作',
|
||||
});
|
||||
var data = bomxGrid.value?.getTableData().fullData;
|
||||
ElMessageBox.confirm(`确定要同步BOM吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
var output = await SyncToSAPBomProductDesignLibrary(data);
|
||||
await handleQuery();
|
||||
if (output.data.result.code == "成功") {
|
||||
ElMessage.success("同步成功");
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
// 工艺路线查询操作
|
||||
//父Guid
|
||||
const processRoutexGrid = ref<VxeGridInstance>();
|
||||
// 查看BOM
|
||||
const examineProcessRoute = async (row: any) => {
|
||||
stateProcessRoute.queryParams.ParentGuid = row.recordGuid;
|
||||
showProcessRoute.value = true;
|
||||
await handleQueryProcessRoute();
|
||||
};
|
||||
|
||||
const showProcessRoute = ref(false);
|
||||
|
||||
// 变量
|
||||
const stateProcessRoute = reactive({
|
||||
showAdvanceQueryUI: false,
|
||||
queryParams: {
|
||||
PartNumber: undefined,
|
||||
Description: undefined,
|
||||
ParentGuid: undefined
|
||||
},
|
||||
localPageParam: {
|
||||
pageSize: 2000 as number,
|
||||
defaultSort: { field: 'createTime', order: 'asc', descStr: 'desc' },
|
||||
},
|
||||
visible: false,
|
||||
title: '',
|
||||
});
|
||||
|
||||
// 本地存储参数
|
||||
const localPageParamKeyProcessRoute = 'localPageParam:productDesignLibraryProcessRoute';
|
||||
|
||||
// 表格参数配置
|
||||
const processRouteOptions = useVxeTable(
|
||||
{
|
||||
id: 'productDesignLibraryProcessRoute',
|
||||
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 }) => handleProcessRouteQueryApi(page, sort) } },
|
||||
// 排序配置
|
||||
sortConfig: { defaultSort: Local.get(localPageParamKeyProcessRoute)?.defaultSort || stateBom.localPageParam.defaultSort },
|
||||
// 分页配置
|
||||
pagerConfig: { pageSize: Local.get(localPageParamKeyProcessRoute)?.pageSize || stateBom.localPageParam.pageSize },
|
||||
// 工具栏配置
|
||||
toolbarConfig: { export: false },
|
||||
// 行设置
|
||||
// rowConfig: { height: 80 },
|
||||
}
|
||||
);
|
||||
|
||||
// 工艺路线 查询 API
|
||||
const handleProcessRouteQueryApi = async (page: VxeGridPropTypes.ProxyAjaxQueryPageParams, sort: VxeGridPropTypes.ProxyAjaxQuerySortCheckedParams) => {
|
||||
const params = Object.assign(stateProcessRoute.queryParams, { page: page.currentPage, pageSize: page.pageSize, field: sort.field, order: sort.order, descStr: 'desc' });
|
||||
var data = GetetProcessRouteProductDesignLibrary(params);
|
||||
return data;
|
||||
};
|
||||
|
||||
const handleQueryProcessRoute = async (reset = false) => {
|
||||
processRouteOptions.loading = true;
|
||||
await processRoutexGrid.value?.commitProxy('query');
|
||||
processRouteOptions.loading = false;
|
||||
};
|
||||
|
||||
//工艺路线同步到sap
|
||||
const syncToSAPprocessRoute = async () => {
|
||||
options.loading = true;
|
||||
// 显示加载效果
|
||||
const loadingInstance = ElLoading.service({
|
||||
text: '工艺路线同步中,请勿操作',
|
||||
});
|
||||
var data = processRoutexGrid.value?.getTableData().fullData;
|
||||
ElMessageBox.confirm(`确定要同步工艺路线吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
var output = await SyncToSAPProcessRouteProductDesignLibrary(data);
|
||||
await handleQuery();
|
||||
if (output.data.result.code == "成功") {
|
||||
ElMessage.success("同步成功");
|
||||
} else {
|
||||
ElMessage.error("同步失败");
|
||||
}
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
})
|
||||
.catch(() => {
|
||||
// 关闭加载效果
|
||||
loadingInstance.close();
|
||||
});
|
||||
options.loading = false;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user