From 3cf3b6cb75b0b3d9f5f2aedfcf5d50ef2dde2f03 Mon Sep 17 00:00:00 2001 From: me Date: Thu, 29 May 2025 11:51:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8F=88=E5=8A=A04=E4=B8=AA=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E6=95=B0=E6=8D=AE=E8=A1=A8=E5=85=B3=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../11-18/SUPPLIER_CON_DATE.cs | 212 +++++++++++++++++ .../11-18/SUPPLIER_CON_MMRP.cs | 117 ++++++++++ .../11-18/SUPPLIER_CON_PO.cs | 52 +++++ .../11-18/SUPPLIER_PRO_ATTACHMENT_DATA.cs | 22 +- .../11-18/SUPPLIER_PRO_ENVIRONMENT.cs | 21 +- .../11-18/SUPPLIER_PRO_FLAW.cs | 30 ++- .../11-18/SUPPLIER_PRO_MATERIAL_DATA.cs | 24 +- .../SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE.cs | 27 ++- .../11-18/SUPPLIER_PRO_OEE_TIME_DETAILS.cs | 22 +- .../11-18/SUPPLIER_PRO_PROCESS.cs | 23 +- .../11-18/SUPPLIER_PRO_PROCESS_EQUIPMENT.cs | 34 ++- .../11-18/SUPPLIER_SINV_DATA.cs | 77 ++++++ API/TaskManager.Entity/Entity.cs | 192 +++++++-------- .../TaskManager.Entity.csproj | 1 + .../JobDbContext.cs | 220 ++++++++++++++++++ 15 files changed, 970 insertions(+), 104 deletions(-) create mode 100644 API/TaskManager.Entity/11-18/SUPPLIER_CON_DATE.cs create mode 100644 API/TaskManager.Entity/11-18/SUPPLIER_CON_MMRP.cs create mode 100644 API/TaskManager.Entity/11-18/SUPPLIER_CON_PO.cs create mode 100644 API/TaskManager.Entity/11-18/SUPPLIER_SINV_DATA.cs diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_CON_DATE.cs b/API/TaskManager.Entity/11-18/SUPPLIER_CON_DATE.cs new file mode 100644 index 0000000..27de5c9 --- /dev/null +++ b/API/TaskManager.Entity/11-18/SUPPLIER_CON_DATE.cs @@ -0,0 +1,212 @@ +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys +{ + /// + /// 日物料需求计划风险确认 + /// + public class SUPPLIER_CON_DATE : BaseEntity + { + /// + /// 供应商代码 + /// + [ExporterHeader(DisplayName = "供应商代码")] + public string SupplierCode { get; set; } + /// + /// 需求发布版次,取自日物料需求计划接口中的需求发布版次,针对与这个版次的需求进行风险反馈 + /// + [ExporterHeader(DisplayName = "需求发布版次,取自日物料需求计划接口中的需求发布版次,针对与这个版次的需求进行风险反馈")] + public string ReleaseEdition { get; set; } + /// + /// 零件号,奇瑞零件号 + /// + [ExporterHeader(DisplayName = "零件号,奇瑞零件号")] + public string MaterialCode { get; set; } + /// + /// 工厂代码 + /// + [ExporterHeader(DisplayName = "工厂代码")] + public string PlantId { get; set; } + /// + /// 反馈结果,1-异常;0-无异常(匹配峰值需求缺口,如果可满足峰值,即选择无异常) + /// + [ExporterHeader(DisplayName = "反馈结果,1-异常;0-无异常(匹配峰值需求缺口,如果可满足峰值,即选择无异常)")] + public string FeedbackResults { get; set; } + /// + /// 风险类型,当反馈结果=1时,此字段必输1.生产节拍不足2.人员不足3.原材料不足4.设备异常5.其他 + /// + [ExporterHeader(DisplayName = "风险类型,当反馈结果=1时,此字段必输1.生产节拍不足2.人员不足3.原材料不足4.设备异常5.其他")] + public string? VentureType { get; set; } + /// + /// 具体风险,当反馈结果=1时,此字段必输描述具体风险 + /// + [ExporterHeader(DisplayName = "具体风险,当反馈结果=1时,此字段必输描述具体风险")] + public string? VentureSpecific { get; set; } + /// + /// 应对措施,当反馈结果=1时,此字段必输描述具体应对措施 + /// + [ExporterHeader(DisplayName = "应对措施,当反馈结果=1时,此字段必输描述具体应对措施")] + public string? Measures { get; set; } + /// + /// 起始日期,格式:yyyy-MM-dd + /// + [ExporterHeader(DisplayName = "起始日期,格式:yyyy-MM-dd")] + public string StartDate { get; set; } + /// + /// 满足数量1,数量锁定,7日内满足数量必须等于需求数量 + /// + [ExporterHeader(DisplayName = "满足数量1,数量锁定,7日内满足数量必须等于需求数量")] + public decimal QuantityMeet1 { get; set; } + /// + /// 满足数量2, + /// + [ExporterHeader(DisplayName = "满足数量2,")] + public decimal QuantityMeet2 { get; set; } + /// + /// 满足数量3, + /// + [ExporterHeader(DisplayName = "满足数量3,")] + public decimal QuantityMeet3 { get; set; } + /// + /// 满足数量4, + /// + [ExporterHeader(DisplayName = "满足数量4,")] + public decimal QuantityMeet4 { get; set; } + /// + /// 满足数量5, + /// + [ExporterHeader(DisplayName = "满足数量5,")] + public decimal QuantityMeet5 { get; set; } + /// + /// 满足数量6, + /// + [ExporterHeader(DisplayName = "满足数量6,")] + public decimal QuantityMeet6 { get; set; } + /// + /// 满足数量7, + /// + [ExporterHeader(DisplayName = "满足数量7,")] + public decimal QuantityMeet7 { get; set; } + /// + /// 满足数量8,根据物料需求计划接口发布的需求天数,针对企业自身产能情况反馈可满足数量注:目前发送数据为滚动12天的数据,13至31天的字段为预留,未来可能会增加至31天 + /// + [ExporterHeader(DisplayName = "满足数量8,根据物料需求计划接口发布的需求天数,针对企业自身产能情况反馈可满足数量注:目前发送数据为滚动12天的数据,13至31天的字段为预留,未来可能会增加至31天")] + public decimal QuantityMeet8 { get; set; } + /// + /// 满足数量9, + /// + [ExporterHeader(DisplayName = "满足数量9,")] + public decimal QuantityMeet9 { get; set; } + /// + /// 满足数量10, + /// + [ExporterHeader(DisplayName = "满足数量10,")] + public decimal QuantityMeet10 { get; set; } + /// + /// 满足数量11, + /// + [ExporterHeader(DisplayName = "满足数量11,")] + public decimal QuantityMeet11 { get; set; } + /// + /// 满足数量12, + /// + [ExporterHeader(DisplayName = "满足数量12,")] + public decimal QuantityMeet12 { get; set; } + /// + /// 满足数量13, + /// + [ExporterHeader(DisplayName = "满足数量13,")] + public decimal? QuantityMeet13 { get; set; } + /// + /// 满足数量14, + /// + [ExporterHeader(DisplayName = "满足数量14,")] + public decimal? QuantityMeet14 { get; set; } + /// + /// 满足数量15, + /// + [ExporterHeader(DisplayName = "满足数量15,")] + public decimal? QuantityMeet15 { get; set; } + /// + /// 满足数量16, + /// + [ExporterHeader(DisplayName = "满足数量16,")] + public decimal? QuantityMeet16 { get; set; } + /// + /// 满足数量17, + /// + [ExporterHeader(DisplayName = "满足数量17,")] + public decimal? QuantityMeet17 { get; set; } + /// + /// 满足数量18, + /// + [ExporterHeader(DisplayName = "满足数量18,")] + public decimal? QuantityMeet18 { get; set; } + /// + /// 满足数量19, + /// + [ExporterHeader(DisplayName = "满足数量19,")] + public decimal? QuantityMeet19 { get; set; } + /// + /// 满足数量20, + /// + [ExporterHeader(DisplayName = "满足数量20,")] + public decimal? QuantityMeet20 { get; set; } + /// + /// 满足数量21, + /// + [ExporterHeader(DisplayName = "满足数量21,")] + public decimal? QuantityMeet21 { get; set; } + /// + /// 满足数量22, + /// + [ExporterHeader(DisplayName = "满足数量22,")] + public decimal? QuantityMeet22 { get; set; } + /// + /// 满足数量23, + /// + [ExporterHeader(DisplayName = "满足数量23,")] + public decimal? QuantityMeet23 { get; set; } + /// + /// 满足数量24, + /// + [ExporterHeader(DisplayName = "满足数量24,")] + public decimal? QuantityMeet24 { get; set; } + /// + /// 满足数量25, + /// + [ExporterHeader(DisplayName = "满足数量25,")] + public decimal? QuantityMeet25 { get; set; } + /// + /// 满足数量26, + /// + [ExporterHeader(DisplayName = "满足数量26,")] + public decimal? QuantityMeet26 { get; set; } + /// + /// 满足数量27, + /// + [ExporterHeader(DisplayName = "满足数量27,")] + public decimal? QuantityMeet27 { get; set; } + /// + /// 满足数量28, + /// + [ExporterHeader(DisplayName = "满足数量28,")] + public decimal? QuantityMeet28 { get; set; } + /// + /// 满足数量29, + /// + [ExporterHeader(DisplayName = "满足数量29,")] + public decimal? QuantityMeet29 { get; set; } + /// + /// 满足数量30, + /// + [ExporterHeader(DisplayName = "满足数量30,")] + public decimal? QuantityMeet30 { get; set; } + /// + /// 满足数量31, + /// + [ExporterHeader(DisplayName = "满足数量31,")] + public decimal? QuantityMeet31 { get; set; } + } + +} diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_CON_MMRP.cs b/API/TaskManager.Entity/11-18/SUPPLIER_CON_MMRP.cs new file mode 100644 index 0000000..cc5530f --- /dev/null +++ b/API/TaskManager.Entity/11-18/SUPPLIER_CON_MMRP.cs @@ -0,0 +1,117 @@ +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys +{ + /// + /// M+6月物料需求计划风险确认 + /// + public class SUPPLIER_CON_MMRP : BaseEntity + { + /// + /// 供应商代码 + /// + [ExporterHeader(DisplayName = "供应商代码")] + public string SupplierCode { get; set; } + /// + /// 需求发布版次,取自M+6月物料需求计划接口中的需求发布版次,针对与这个版次的需求进行风险反馈 + /// + [ExporterHeader(DisplayName = "需求发布版次")] + public string ReleaseEdition { get; set; } + /// + /// 零件号,奇瑞零件号 + /// + [ExporterHeader(DisplayName = "零件号")] + public string MaterialCode { get; set; } + /// + /// 工厂代码, + /// + [ExporterHeader(DisplayName = "工厂代码,")] + public string PlantId { get; set; } + /// + /// 反馈结果,1-异常;0-无异常(匹配峰值需求缺口,如果可满足峰值,即选择无异常) + /// + [ExporterHeader(DisplayName = "反馈结果")] + public string FeedbackResults { get; set; } + /// + /// 风险类型,当反馈结果=1时,此字段必输1.生产节拍不足2.人员不足3.原材料不足4.设备异常5.其他 + /// + [ExporterHeader(DisplayName = "风险类型")] + public string? VentureType { get; set; } + /// + /// 具体风险,当反馈结果=1时,此字段必输描述具体风险 + /// + [ExporterHeader(DisplayName = "具体风险")] + public string? VentureSpecific { get; set; } + /// + /// 应对措施,当反馈结果=1时,此字段必输描述具体应对措施 + /// + [ExporterHeader(DisplayName = "应对措施")] + public string? Measures { get; set; } + /// + /// 起始月份-格式:yyyy-MM + /// + [ExporterHeader(DisplayName = "起始月份")] + public string StartMonth { get; set; } + /// + /// 满足数量1 + /// + [ExporterHeader(DisplayName = "满足数量1")] + public decimal QuantityMeet1 { get; set; } + /// + /// 满足数量2 + /// + [ExporterHeader(DisplayName = "满足数量2")] + public decimal QuantityMeet2 { get; set; } + /// + /// 满足数量3 + /// + [ExporterHeader(DisplayName = "满足数量3")] + public decimal QuantityMeet3 { get; set; } + /// + /// 满足数量4 + /// + [ExporterHeader(DisplayName = "满足数量4")] + public decimal QuantityMeet4 { get; set; } + /// + /// 满足数量5 + /// + [ExporterHeader(DisplayName = "满足数量5")] + public decimal QuantityMeet5 { get; set; } + /// + /// 满足数量6 + /// + [ExporterHeader(DisplayName = "满足数量6")] + public decimal QuantityMeet6 { get; set; } + /// + /// 满足数量7 + /// + [ExporterHeader(DisplayName = "满足数量7")] + public decimal? QuantityMeet7 { get; set; } + /// + /// 满足数量8 + /// + [ExporterHeader(DisplayName = "满足数量8")] + public decimal? QuantityMeet8 { get; set; } + /// + /// 满足数量9 + /// + [ExporterHeader(DisplayName = "满足数量9")] + public decimal? QuantityMeet9 { get; set; } + /// + /// 满足数量10 + /// + [ExporterHeader(DisplayName = "满足数量10")] + public decimal? QuantityMeet10 { get; set; } + /// + /// 满足数量11 + /// + [ExporterHeader(DisplayName = "满足数量11")] + public decimal? QuantityMeet11 { get; set; } + /// + /// 满足数量12 + /// + [ExporterHeader(DisplayName = "满足数量12")] + public decimal? QuantityMeet12 { get; set; } + } + +} diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_CON_PO.cs b/API/TaskManager.Entity/11-18/SUPPLIER_CON_PO.cs new file mode 100644 index 0000000..f19adca --- /dev/null +++ b/API/TaskManager.Entity/11-18/SUPPLIER_CON_PO.cs @@ -0,0 +1,52 @@ +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys +{ + /// + /// 采购订单风险确认 + /// + public class SUPPLIER_CON_PO : BaseEntity + { + /// + /// 供应商代码 + /// + [ExporterHeader(DisplayName = "供应商代码")] + public string SupplierCode { get; set; } + /// + /// 采购订单号 + /// + [ExporterHeader(DisplayName = "采购订单号")] + public string PurchaseOrder { get; set; } + /// + /// 行项目号 + /// + [ExporterHeader(DisplayName = "行项目号")] + public string SerialNumber { get; set; } + /// + /// 满足数量 + /// + [ExporterHeader(DisplayName = "满足数量")] + public decimal QuantityMeet { get; set; } + /// + /// 反馈结果,1-异常;0-无异常(匹配峰值需求缺口,如果可满足峰值,即选择无异常) + /// + [ExporterHeader(DisplayName = "反馈结果,1-异常;0-无异常(匹配峰值需求缺口,如果可满足峰值,即选择无异常)")] + public string FeedbackResults { get; set; } + /// + /// 风险类型,当反馈结果=1时,此字段必输1.生产节拍不足2.人员不足3.原材料不足4.设备异常5.其他 + /// + [ExporterHeader(DisplayName = "风险类型,当反馈结果=1时,此字段必输1.生产节拍不足2.人员不足3.原材料不足4.设备异常5.其他")] + public string? VentureType { get; set; } + /// + /// 具体风险,当反馈结果=1时,此字段必输描述具体风险 + /// + [ExporterHeader(DisplayName = "具体风险,当反馈结果=1时,此字段必输描述具体风险")] + public string? VentureSpecific { get; set; } + /// + /// 应对措施,当反馈结果=1时,此字段必输描述具体应对措施 + /// + [ExporterHeader(DisplayName = "应对措施,当反馈结果=1时,此字段必输描述具体应对措施")] + public string? Measures { get; set; } + } + +} diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ATTACHMENT_DATA.cs b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ATTACHMENT_DATA.cs index 87a1501..567d4b5 100644 --- a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ATTACHMENT_DATA.cs +++ b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ATTACHMENT_DATA.cs @@ -1,4 +1,6 @@ -namespace TaskManager.Entity.Entitys +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys { /// /// 附件类数据 @@ -8,70 +10,88 @@ /// /// 供应商代码 /// + + [ExporterHeader(DisplayName = "供应商代码")] public string SupplierCode { get; set; } /// /// 供应商名称 /// + [ExporterHeader(DisplayName = "供应商名称")] public string SupplierName { get; set; } /// /// 数据类型(1产前管理;2人员资质;3监控视频) /// + [ExporterHeader(DisplayName = "数据类型")] public string Type { get; set; } /// /// 文件名 /// + [ExporterHeader(DisplayName = "文件名")] public string FileName { get; set; } /// /// 图文地址 /// + [ExporterHeader(DisplayName = "图文地址")] public string FileUrl { get; set; } /// /// 生成时间,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "生成时间")] public string DateTime { get; set; } /// /// 产线名称 /// + [ExporterHeader(DisplayName = "产线名称")] public string ProductionLineName { get; set; } /// /// 产线代码 /// + [ExporterHeader(DisplayName = "产线代码")] public string ProductionLineId { get; set; } /// /// 工位名称 /// + [ExporterHeader(DisplayName = "工位名称")] public string StationName { get; set; } /// /// 工位代码 /// + [ExporterHeader(DisplayName = "工位代码")] public string StationId { get; set; } /// /// 设备名称 /// + [ExporterHeader(DisplayName = "设备名称")] public string DeviceName { get; set; } /// /// 设备编码 /// + [ExporterHeader(DisplayName = "设备编码")] public string? DeviceId { get; set; } /// /// 供应商总成零件号 /// + [ExporterHeader(DisplayName = "供应商总成零件号")] public string VendorProductNo { get; set; } /// /// 供应商总成零件名称 /// + [ExporterHeader(DisplayName = "供应商总成零件名称")] public string VendorProductName { get; set; } /// /// 奇瑞零件号 /// + [ExporterHeader(DisplayName = "奇瑞零件号")] public string CheryProductNo { get; set; } /// /// 奇瑞零件名称 /// + [ExporterHeader(DisplayName = "奇瑞零件名称")] public string CheryProductName { get; set; } /// /// 供应商总成SN码 /// + [ExporterHeader(DisplayName = "供应商总成SN码")] public string? VendorProductSn { get; set; } } diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ENVIRONMENT.cs b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ENVIRONMENT.cs index cfcb0d7..a5a9e8a 100644 --- a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ENVIRONMENT.cs +++ b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ENVIRONMENT.cs @@ -1,4 +1,6 @@ -namespace TaskManager.Entity.Entitys +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys { /// /// 环境业务数据 @@ -8,70 +10,87 @@ /// /// 供应商代码 /// + [ExporterHeader(DisplayName = "供应商代码")] public string SupplierCode { get; set; } /// /// 供应商名称 /// + [ExporterHeader(DisplayName = "供应商名称")] public string SupplierName { get; set; } /// /// 工厂代码 /// + [ExporterHeader(DisplayName = "工厂代码")] public string PlantId { get; set; } /// /// 工厂名称 /// + [ExporterHeader(DisplayName = "工厂名称")] public string PlantName { get; set; } /// /// 车间代码 /// + [ExporterHeader(DisplayName = "车间代码)] public string WorkshopId { get; set; } /// /// 车间名称 /// + [ExporterHeader(DisplayName = "车间名称")] public string WorkshopName { get; set; } /// /// 产线代码 /// + [ExporterHeader(DisplayName = "产线代码")] public string ProductionLineId { get; set; } /// /// 产线名称 /// + [ExporterHeader(DisplayName = "产线名称")] public string ProductionLineName { get; set; } /// /// 环境指标名称,例如:温度、湿度、洁净度等 /// + [ExporterHeader(DisplayName = "环境指标名称")] public string EnvIndicatorName { get; set; } /// /// 指标实测值,(最大支持11位整数+5位小数) /// + [ExporterHeader(DisplayName = "指标实测值")] public decimal? NumValue { get; set; } /// /// 上限值,(最大支持11位整数+5位小数) /// + [ExporterHeader(DisplayName = "上限值")] public decimal UpperLimit { get; set; } /// /// 下限值,(最大支持11位整数+5位小数) /// + [ExporterHeader(DisplayName = "下限值")] public decimal LowerLimit { get; set; } /// /// 单位,相应的单位名称,如度数 /// + [ExporterHeader(DisplayName = "单位")] public string ChineseUnit { get; set; } /// /// 采集仪器代码,环境采集的仪器/工具代码 /// + [ExporterHeader(DisplayName = "采集仪器代码")] public string EquipmentCode { get; set; } /// /// 采集仪器名称,环境采集的仪器/工具名称 /// + [ExporterHeader(DisplayName = "采集仪器名称")] public string EquipmentName { get; set; } /// /// 数据采集的点位 /// + [ExporterHeader(DisplayName = "数据采集的点位")] public string? DataCollectionPoint { get; set; } /// /// 数据采集的时间,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "数据采集的时间")] public string CollectTime { get; set; } } diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_FLAW.cs b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_FLAW.cs index 021c9e0..3614976 100644 --- a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_FLAW.cs +++ b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_FLAW.cs @@ -1,4 +1,5 @@ -using System; +using Magicodes.ExporterAndImporter.Core; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -14,110 +15,137 @@ namespace TaskManager.Entity.Entitys /// /// 供应商代码 /// + [ExporterHeader(DisplayName = "供应商代码")] public string SupplierCode { get; set; } /// /// 供应商名称 /// + [ExporterHeader(DisplayName = "供应商名称")] public string SupplierName { get; set; } /// /// 工厂代码 /// + [ExporterHeader(DisplayName = "工厂代码")] public string PlantId { get; set; } /// /// 工厂名称 /// + [ExporterHeader(DisplayName = "工厂名称")] public string PlantName { get; set; } /// /// 车间代码 /// + [ExporterHeader(DisplayName = "车间代码")] public string WorkshopId { get; set; } /// /// 车间名称 /// + [ExporterHeader(DisplayName = "车间名称")] public string WorkshopName { get; set; } /// /// 产线代码 /// + [ExporterHeader(DisplayName = "产线代码")] public string ProductionLineId { get; set; } /// /// 产线名称 /// + [ExporterHeader(DisplayName = "产线名称")] public string ProductionLineName { get; set; } /// /// 工位代码 /// + [ExporterHeader(DisplayName = "工位代码")] public string StationId { get; set; } /// /// 工位名称 /// + [ExporterHeader(DisplayName = "工位名称")] public string StationName { get; set; } /// /// 缺陷代码 /// + [ExporterHeader(DisplayName = "缺陷代码")] public string DefectsCode { get; set; } /// /// 缺陷名称 /// + [ExporterHeader(DisplayName = "缺陷名称")] public string DefectsName { get; set; } /// /// 缺陷分类(外观,尺寸,材料,功能,性能,其他) /// + [ExporterHeader(DisplayName = "缺陷分类")] public string ClassOfName { get; set; } /// /// 供应商总成零件号 /// + [ExporterHeader(DisplayName = "供应商总成零件号")] public string VendorProductNo { get; set; } /// /// 供应商总成零件名称 /// + [ExporterHeader(DisplayName = "供应商总成零件名称")] public string VendorProductName { get; set; } /// /// 供应商总成批次号 /// + [ExporterHeader(DisplayName = "供应商总成批次号")] public string VendorProductBatch { get; set; } /// /// 供应商总成SN码 /// + [ExporterHeader(DisplayName = "供应商总成SN码")] public string VendorProductSn { get; set; } /// /// 奇瑞零件号 /// + [ExporterHeader(DisplayName = "奇瑞零件号")] public string CheryProductNo { get; set; } /// /// 奇瑞零件名称 /// + [ExporterHeader(DisplayName = "奇瑞零件名称")] public string CheryProductName { get; set; } /// /// 奇瑞SN码 /// + [ExporterHeader(DisplayName = "奇瑞SN码")] public string CheryProductSn { get; set; } /// /// 生产批次号 /// + [ExporterHeader(DisplayName = "生产批次号")] public string ProductBatchNo { get; set; } /// /// 生产工单号,或生产批次(工单业务数据) /// + [ExporterHeader(DisplayName = "生产工单号")] public string ManufactureNo { get; set; } /// /// 班次(白班,晚班,中班) /// + [ExporterHeader(DisplayName = "班次")] public string WorkShift { get; set; } /// /// 缺陷件数 /// + [ExporterHeader(DisplayName = "缺陷件数")] public decimal Numberofdefect { get; set; } /// /// 缺陷描述 /// + [ExporterHeader(DisplayName = "缺陷描述")] public string DefectsDesc { get; set; } /// /// 缺陷等级,(1.严重、2.一般、3.轻微) /// + [ExporterHeader(DisplayName = "缺陷等级")] public string DefectsLevel { get; set; } /// /// 缺陷录入时间,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "缺陷录入时间")] public string StatisticalTime { get; set; } } diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_MATERIAL_DATA.cs b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_MATERIAL_DATA.cs index 7521474..e608c16 100644 --- a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_MATERIAL_DATA.cs +++ b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_MATERIAL_DATA.cs @@ -1,4 +1,6 @@ -namespace TaskManager.Entity.Entitys +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys { /// /// 物料主数据 @@ -8,82 +10,102 @@ /// /// 供应商代码 /// + [ExporterHeader(DisplayName = "供应商代码")] public string SupplierCode { get; set; } /// /// 供应商名称 /// + [ExporterHeader(DisplayName = "供应商名称")] public string SupplierName { get; set; } /// /// 供应商物料号 /// + [ExporterHeader(DisplayName = "供应商物料号")] public string VendorProductNo { get; set; } /// /// 供应商物料名称 /// + [ExporterHeader(DisplayName = "供应商物料名称")] public string VendorProductName { get; set; } /// /// 类型(成品,半成品,原材料) /// + [ExporterHeader(DisplayName = "类型")] public decimal Type { get; set; } /// /// 供应商零件版本号 /// + [ExporterHeader(DisplayName = "供应商零件版本号")] public string? VendorHardwareRevision { get; set; } /// /// 奇瑞零件号 /// + [ExporterHeader(DisplayName = "奇瑞零件号")] public string CheryProductNo { get; set; } /// /// 奇瑞零件名称 /// + [ExporterHeader(DisplayName = "奇瑞零件名称")] public string CheryProductName { get; set; } /// /// 奇瑞硬件版本号 /// + [ExporterHeader(DisplayName = "奇瑞硬件版本号")] public string OemHardwareRevision { get; set; } /// /// 奇瑞软件版本号 /// + [ExporterHeader(DisplayName = "奇瑞软件版本号")] public string? OemSoftwareRevision { get; set; } /// /// 车型 /// + [ExporterHeader(DisplayName = "车型")] public string? OemModel { get; set; } /// /// 项目名称 /// + [ExporterHeader(DisplayName = "项目名称")] public string? OemProjectName { get; set; } /// /// 是否SOP(Y/N) /// + [ExporterHeader(DisplayName = "是否SOP")] public string? Launched { get; set; } /// /// 数据同步执行时间,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "数据同步执行时间")] public string? DateTime { get; set; } /// /// 供应商工厂代码 /// + [ExporterHeader(DisplayName = "供应商工厂代码")] public string? PlantId { get; set; } /// /// 供应商工厂名称 /// + [ExporterHeader(DisplayName = "供应商工厂名称")] public string? PlantName { get; set; } /// /// 芯片采购类型(AVAP,CS,CMcontro) /// + [ExporterHeader(DisplayName = "芯片采购类型")] public string? ProcurementType { get; set; } /// /// 芯片MPN标识码 /// + [ExporterHeader(DisplayName = "芯片MPN标识码")] public string? MpnCode { get; set; } /// /// 芯片MPN标识名称 /// + [ExporterHeader(DisplayName = "芯片MPN标识名称")] public string? MpnName { get; set; } /// /// 物料有效期(天) /// + [ExporterHeader(DisplayName = "物料有效期")] public string ValidDays { get; set; } } diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE.cs b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE.cs index ea82703..56dd745 100644 --- a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE.cs +++ b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE.cs @@ -1,4 +1,6 @@ -namespace TaskManager.Entity.Entitys +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys { /// /// 设备OEE达成率 @@ -8,94 +10,117 @@ /// /// 供应商代码 /// + [ExporterHeader(DisplayName = "供应商代码")] public string SupplierCode { get; set; } /// /// 供应商名称 /// + [ExporterHeader(DisplayName = "供应商名称")] public string SupplierName { get; set; } /// /// 工厂代码 /// + [ExporterHeader(DisplayName = "工厂代码")] public string PlantId { get; set; } /// /// 工厂名称 /// + [ExporterHeader(DisplayName = "工厂名称")] public string PlantName { get; set; } /// /// 车间代码 /// + [ExporterHeader(DisplayName = "车间代码")] public string WorkshopId { get; set; } /// /// 车间名称 /// + [ExporterHeader(DisplayName = "车间名称")] public string WorkshopName { get; set; } /// /// 产线代码 /// + [ExporterHeader(DisplayName = "产线代码")] public string ProductionLineId { get; set; } /// /// 产线名称 /// + [ExporterHeader(DisplayName = "产线名称")] public string ProductionLineName { get; set; } /// /// 工位代码 /// + [ExporterHeader(DisplayName = "工位代码")] public string StationId { get; set; } /// /// 工位名称 /// + [ExporterHeader(DisplayName = "工位名称")] public string StationName { get; set; } /// /// 设备代码 /// + [ExporterHeader(DisplayName = "设备代码")] public string DeviceId { get; set; } /// /// 设备名称 /// + [ExporterHeader(DisplayName = "设备名称")] public string? DeviceName { get; set; } /// /// 奇瑞零件号 /// + [ExporterHeader(DisplayName = "奇瑞零件号")] public string CheryProductNo { get; set; } /// /// 奇瑞零件名称 /// + [ExporterHeader(DisplayName = "奇瑞零件名称")] public string CheryProductName { get; set; } /// /// 供应商总成零件号 /// + [ExporterHeader(DisplayName = "供应商总成零件号")] public string VendorProductNo { get; set; } /// /// 供应商总成零件名称 /// + [ExporterHeader(DisplayName = "供应商总成零件名称")] public string VendorProductName { get; set; } /// /// 生产批次号 /// + [ExporterHeader(DisplayName = "生产批次号")] public string ProductBatchNo { get; set; } /// /// 生产工单号 /// + [ExporterHeader(DisplayName = "生产工单号")] public string ManufactureNo { get; set; } /// /// OEE实际值 /// + [ExporterHeader(DisplayName = "OEE实际值")] public decimal Rate { get; set; } /// /// OEE目标值 /// + [ExporterHeader(DisplayName = "OEE目标值")] public decimal RateTagValue { get; set; } /// /// 班次(白班,晚班,中班) /// + [ExporterHeader(DisplayName = "班次")] public string WorkShift { get; set; } /// /// 生产日期,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "生产日期")] public string StatisticalTime { get; set; } /// /// 值统计时间,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "值统计时间")] public string DateTime { get; set; } } diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_OEE_TIME_DETAILS.cs b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_OEE_TIME_DETAILS.cs index df7e0df..cfe3334 100644 --- a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_OEE_TIME_DETAILS.cs +++ b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_OEE_TIME_DETAILS.cs @@ -1,4 +1,6 @@ -namespace TaskManager.Entity.Entitys +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys { /// /// OEE时间明细 @@ -8,74 +10,92 @@ /// /// 供应商代码 /// + [ExporterHeader(DisplayName = "供应商代码")] public string SupplierCode { get; set; } /// /// 供应商名称 /// + [ExporterHeader(DisplayName = "供应商名称")] public string SupplierName { get; set; } /// /// 工厂代码 /// + [ExporterHeader(DisplayName = "工厂代码")] public string PlantId { get; set; } /// /// 工厂名称 /// + [ExporterHeader(DisplayName = "工厂名称")] public string PlantName { get; set; } /// /// 车间代码 /// + [ExporterHeader(DisplayName = "车间代码")] public string WorkshopId { get; set; } /// /// 车间名称 /// + [ExporterHeader(DisplayName = "")] public string? WorkshopName { get; set; } /// /// 产线代码 /// + [ExporterHeader(DisplayName = "产线代码")] public string ProductionLineId { get; set; } /// /// 产线名称 /// + [ExporterHeader(DisplayName = "产线名称")] public string? ProductionLineName { get; set; } /// /// 工位代码 /// + [ExporterHeader(DisplayName = "工位代码")] public string StationId { get; set; } /// /// 工位名称 /// + [ExporterHeader(DisplayName = "工位名称")] public string StationName { get; set; } /// /// 设备代码 /// + [ExporterHeader(DisplayName = "设备代码")] public string DeviceId { get; set; } /// /// 设备名称 /// + [ExporterHeader(DisplayName = "设备名称")] public string DeviceName { get; set; } /// /// 记录ID /// + [ExporterHeader(DisplayName = "记录ID")] public string RecId { get; set; } /// /// 大类(1计划工作,2计划停机,3非计划停机) /// + [ExporterHeader(DisplayName = "大类")] public string Type { get; set; } /// /// 小类编码 /// + [ExporterHeader(DisplayName = "小类编码")] public string SubType { get; set; } /// /// 小类描述 /// + [ExporterHeader(DisplayName = "小类描述")] public string SubTypeName { get; set; } /// /// 开始时间,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "开始时间")] public string StartTime { get; set; } /// /// 结束时间,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "结束时间")] public string EndTime { get; set; } } diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS.cs b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS.cs index dd4af58..c9f11b6 100644 --- a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS.cs +++ b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS.cs @@ -1,4 +1,6 @@ -namespace TaskManager.Entity.Entitys +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys { /// /// 工艺 @@ -8,78 +10,97 @@ /// /// 奇瑞零件号 /// + [ExporterHeader(DisplayName = "奇瑞零件号")] public string CheryProductNo { get; set; } /// /// 奇瑞零件名称 /// + [ExporterHeader(DisplayName = "奇瑞零件名称")] public string CheryProductName { get; set; } /// /// 供应商总成零件号 /// + [ExporterHeader(DisplayName = "供应商总成零件号")] public string VendorProductNo { get; set; } /// /// 供应商总成零件名称 /// + [ExporterHeader(DisplayName = "供应商总成零件名称")] public string VendorProductName { get; set; } /// /// 供应商代码 /// + [ExporterHeader(DisplayName = "供应商代码")] public string SupplierCode { get; set; } /// /// 供应商名称 /// + [ExporterHeader(DisplayName = "供应商名称")] public string SupplierName { get; set; } /// /// 工艺编码 /// + [ExporterHeader(DisplayName = "工艺编码")] public string TechCode { get; set; } /// /// 工艺名称 /// + [ExporterHeader(DisplayName = "工艺名称")] public string TechName { get; set; } /// /// 有效期,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "有效期")] public string ValidPeriod { get; set; } /// /// 工艺版本 /// + [ExporterHeader(DisplayName = "工艺版本")] public string TechVersion { get; set; } /// /// 模具编码 /// + [ExporterHeader(DisplayName = "模具编码")] public string MoldCode { get; set; } /// /// 模具名称 /// + [ExporterHeader(DisplayName = "模具名称")] public string MoldName { get; set; } /// /// 最大加工能力 /// + [ExporterHeader(DisplayName = "最大加工能力")] public string MaxProcessingCapacity { get; set; } /// /// 工序编码 /// + [ExporterHeader(DisplayName = "工序编码")] public string ProcessCode { get; set; } /// /// 工序名称 /// + [ExporterHeader(DisplayName = "工序名称")] public string ProcessName { get; set; } /// /// 工序顺序号 /// + [ExporterHeader(DisplayName = "工序顺序号")] public decimal ProcessOrder { get; set; } /// /// 设备编码 /// + [ExporterHeader(DisplayName = "设备编码")] public string DeviceCode { get; set; } /// /// 工序节拍 /// + [ExporterHeader(DisplayName = "工序节拍")] public decimal Rhythm { get; set; } /// /// 节拍单位 /// + [ExporterHeader(DisplayName = "节拍单位")] public string RhythmUnit { get; set; } } diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS_EQUIPMENT.cs b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS_EQUIPMENT.cs index 4f5a273..0081bcd 100644 --- a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS_EQUIPMENT.cs +++ b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_PROCESS_EQUIPMENT.cs @@ -1,4 +1,6 @@ -namespace TaskManager.Entity.Entitys +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys { /// /// 工艺装备 @@ -8,122 +10,152 @@ /// /// 供应商代码 /// + [ExporterHeader(DisplayName = "供应商代码")] public string SupplierCode { get; set; } /// /// 供应商名称 /// + [ExporterHeader(DisplayName = "供应商名称")] public string SupplierName { get; set; } /// /// 奇瑞零件号 /// + [ExporterHeader(DisplayName = "奇瑞零件号")] public string CheryProductNo { get; set; } /// /// 奇瑞零件名称 /// + [ExporterHeader(DisplayName = "奇瑞零件名称")] public string CheryProductName { get; set; } /// /// 供应商总成零件号 /// + [ExporterHeader(DisplayName = "供应商总成零件号")] public string VendorProductNo { get; set; } /// /// 供应商总成零件名称 /// + [ExporterHeader(DisplayName = "供应商总成零件名称")] public string VendorProductName { get; set; } /// /// 工艺装备类型分类(1模具;2检具;3夹具) /// + [ExporterHeader(DisplayName = "工艺装备类型分类")] public decimal DeviceType { get; set; } /// /// 工艺装备编码 /// + [ExporterHeader(DisplayName = "工艺装备编码")] public string DeviceCode { get; set; } /// /// 工艺装备名称 /// + [ExporterHeader(DisplayName = "工艺装备名称")] public string DeviceName { get; set; } /// /// 生产厂家 /// + [ExporterHeader(DisplayName = "生产厂家")] public string Manufacturer { get; set; } /// /// 工艺装备型号 /// + [ExporterHeader(DisplayName = "工艺装备型号")] public string ModelNumber { get; set; } /// /// 工艺装备序列号 /// + [ExporterHeader(DisplayName = "工艺装备序列号")] public string SerialNumber { get; set; } /// /// 工艺装备制造日期,格式(yyyy-MM-dd) /// + [ExporterHeader(DisplayName = "工艺装备制造日期")] public string ProductionDate { get; set; } /// /// 主要材质 /// + [ExporterHeader(DisplayName = "主要材质")] public string Material { get; set; } /// /// 当前存放地点 /// + [ExporterHeader(DisplayName = "当前存放地点")] public string CurrentLocation { get; set; } /// /// 工艺装备状态 /// + [ExporterHeader(DisplayName = "工艺装备状态")] public string DeviceStatus { get; set; } /// /// 穴腔数量 /// + [ExporterHeader(DisplayName = "穴腔数量")] public decimal CavityCount { get; set; } /// /// 模具尺寸规格 /// + [ExporterHeader(DisplayName = "模具尺寸规格")] public string MoldSize { get; set; } /// /// 设计寿命单位 /// + [ExporterHeader(DisplayName = "设计寿命单位")] public string DesignLifeUnits { get; set; } /// /// 设计寿命 /// + [ExporterHeader(DisplayName = "设计寿命")] public string DesignLifeValue { get; set; } /// /// 当前剩余寿命, /// + [ExporterHeader(DisplayName = "当前剩余寿命")] public string CurrentUsageCount { get; set; } /// /// 模具大修次数 /// + [ExporterHeader(DisplayName = "模具大修次数")] public decimal OverhaulCount { get; set; } /// /// 图纸编号描述 /// + [ExporterHeader(DisplayName = "图纸编号描述")] public string CoolingChannelLayout { get; set; } /// /// 检测精度 /// + [ExporterHeader(DisplayName = "检测精度")] public string DetectionAccuracy { get; set; } /// /// 最近校准日期,格式(yyyy-MM-ddHH:mm:ss) /// + [ExporterHeader(DisplayName = "最近校准日期")] public string CalibrationDate { get; set; } /// /// 校准到期天数 /// + [ExporterHeader(DisplayName = "校准到期天数")] public string CalibrationDueDays { get; set; } /// /// 允许误差范围 /// + [ExporterHeader(DisplayName = "允许误差范围")] public string ToleranceRange { get; set; } /// /// 磨损阈值 /// + [ExporterHeader(DisplayName = "磨损阈值")] public string WearThreshold { get; set; } /// /// 检测范围 /// + [ExporterHeader(DisplayName = "检测范围")] public string DetectionRange { get; set; } /// /// 检测单位 /// + [ExporterHeader(DisplayName = "检测单位")] public string UnitType { get; set; } } diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_SINV_DATA.cs b/API/TaskManager.Entity/11-18/SUPPLIER_SINV_DATA.cs new file mode 100644 index 0000000..6ca6682 --- /dev/null +++ b/API/TaskManager.Entity/11-18/SUPPLIER_SINV_DATA.cs @@ -0,0 +1,77 @@ +using Magicodes.ExporterAndImporter.Core; + +namespace TaskManager.Entity.Entitys +{ + /// + /// 供应商共享库存 + /// + public class SUPPLIER_SINV_DATA : BaseEntity + { + /// + /// 供应商代码 + /// + [ExporterHeader(DisplayName = "供应商代码")] + public string SupplierCode { get; set; } + /// + /// 供应商名称 + /// + [ExporterHeader(DisplayName = "供应商名称")] + public string SupplierName { get; set; } + /// + /// 零件号 + /// + [ExporterHeader(DisplayName = "零件号")] + public string MaterialCode { get; set; } + /// + /// 零件名称 + /// + [ExporterHeader(DisplayName = "零件名称")] + public string MaterialDescription { get; set; } + /// + /// 物料类型(成品,半成品,原材料) + /// + [ExporterHeader(DisplayName = "物料类型")] + public string MaterialType { get; set; } + /// + /// 当前库存数量 + /// + [ExporterHeader(DisplayName = "当前库存数量")] + public decimal QuantityCurrent { get; set; } + /// + /// 原材料在途数量 + /// + [ExporterHeader(DisplayName = "原材料在途数量")] + public decimal QuantityPlan { get; set; } + /// + /// 库存状态(生产件,呆滞件,备件,KD件) + /// + [ExporterHeader(DisplayName = "库存状态")] + public string InventoryStatus { get; set; } + /// + /// 安全库存 + /// + [ExporterHeader(DisplayName = "安全库存")] + public decimal SafetyStock { get; set; } + /// + /// 生产/采购周期:成品即半成品为生产周期(天),原材料为采购周期(天) + /// + [ExporterHeader(DisplayName = "生产/采购周期")] + public string ProductionCycle { get; set; } + /// + /// 库存更新时间-格式:yyyy-MM-ddHH:mm:ss + /// + [ExporterHeader(DisplayName = "库存更新时间")] + public string DataUpdateTime { get; set; } + /// + /// 批次 + /// + [ExporterHeader(DisplayName = "批次")] + public string? SupplierBatch { get; set; } + /// + /// 有效期截止日期 非必填 + /// + [ExporterHeader(DisplayName = "有效期截止日期")] + public string? SupplieryxqDate { get; set; } + } + +} diff --git a/API/TaskManager.Entity/Entity.cs b/API/TaskManager.Entity/Entity.cs index 47f34d3..82856e1 100644 --- a/API/TaskManager.Entity/Entity.cs +++ b/API/TaskManager.Entity/Entity.cs @@ -250,30 +250,30 @@ namespace TaskManager.Entity /// /// M+6月物料需求计划风险确认 /// - public class SUPPLIER_CON_MMRP : BaseEntity - { - public string SupplierCode { get; set; } - public string ReleaseEdition { get; set; } - public string MaterialCode { get; set; } - public string PlantId { get; set; } - public string FeedbackResults { get; set; } - public string VentureType { get; set; } - public string VentureSpecific { get; set; } - public string Measures { get; set; } - public string StartMonth { get; set; } - public int QuantityMeet1 { get; set; } - public int QuantityMeet2 { get; set; } - public int QuantityMeet3 { get; set; } - public int QuantityMeet4 { get; set; } - public int QuantityMeet5 { get; set; } - public int QuantityMeet6 { get; set; } - public int QuantityMeet7 { get; set; } - public int QuantityMeet8 { get; set; } - public int QuantityMeet9 { get; set; } - public int QuantityMeet10 { get; set; } - public int QuantityMeet11 { get; set; } - public int QuantityMeet12 { get; set; } - } + //public class SUPPLIER_CON_MMRP : BaseEntity + //{ + // public string SupplierCode { get; set; } + // public string ReleaseEdition { get; set; } + // public string MaterialCode { get; set; } + // public string PlantId { get; set; } + // public string FeedbackResults { get; set; } + // public string VentureType { get; set; } + // public string VentureSpecific { get; set; } + // public string Measures { get; set; } + // public string StartMonth { get; set; } + // public int QuantityMeet1 { get; set; } + // public int QuantityMeet2 { get; set; } + // public int QuantityMeet3 { get; set; } + // public int QuantityMeet4 { get; set; } + // public int QuantityMeet5 { get; set; } + // public int QuantityMeet6 { get; set; } + // public int QuantityMeet7 { get; set; } + // public int QuantityMeet8 { get; set; } + // public int QuantityMeet9 { get; set; } + // public int QuantityMeet10 { get; set; } + // public int QuantityMeet11 { get; set; } + // public int QuantityMeet12 { get; set; } + //} /// /// 日物料需求计划 @@ -333,51 +333,51 @@ namespace TaskManager.Entity /// /// 日物料需求计划风险确认 /// - public class SUPPLIER_CON_DATE : BaseEntity - { - public string SupplierCode { get; set; } - public string ReleaseEdition { get; set; } - public string MaterialCode { get; set; } - public string PlantId { get; set; } - public string FeedbackResults { get; set; } - public string VentureType { get; set; } - public string VentureSpecific { get; set; } - public string Measures { get; set; } - public string StartDate { get; set; } - - // QuantityMeet from 1 to 31 - public int QuantityMeet1 { get; set; } - public int QuantityMeet2 { get; set; } - public int QuantityMeet3 { get; set; } - public int QuantityMeet4 { get; set; } - public int QuantityMeet5 { get; set; } - public int QuantityMeet6 { get; set; } - public int QuantityMeet7 { get; set; } - public int QuantityMeet8 { get; set; } - public int QuantityMeet9 { get; set; } - public int QuantityMeet10 { get; set; } - public int QuantityMeet11 { get; set; } - public int QuantityMeet12 { get; set; } - public int QuantityMeet13 { get; set; } - public int QuantityMeet14 { get; set; } - public int QuantityMeet15 { get; set; } - public int QuantityMeet16 { get; set; } - public int QuantityMeet17 { get; set; } - public int QuantityMeet18 { get; set; } - public int QuantityMeet19 { get; set; } - public int QuantityMeet20 { get; set; } - public int QuantityMeet21 { get; set; } - public int QuantityMeet22 { get; set; } - public int QuantityMeet23 { get; set; } - public int QuantityMeet24 { get; set; } - public int QuantityMeet25 { get; set; } - public int QuantityMeet26 { get; set; } - public int QuantityMeet27 { get; set; } - public int QuantityMeet28 { get; set; } - public int QuantityMeet29 { get; set; } - public int QuantityMeet30 { get; set; } - public int QuantityMeet31 { get; set; } - } + //public class SUPPLIER_CON_DATE : BaseEntity + //{ + // public string SupplierCode { get; set; } + // public string ReleaseEdition { get; set; } + // public string MaterialCode { get; set; } + // public string PlantId { get; set; } + // public string FeedbackResults { get; set; } + // public string VentureType { get; set; } + // public string VentureSpecific { get; set; } + // public string Measures { get; set; } + // public string StartDate { get; set; } + + // // QuantityMeet from 1 to 31 + // public int QuantityMeet1 { get; set; } + // public int QuantityMeet2 { get; set; } + // public int QuantityMeet3 { get; set; } + // public int QuantityMeet4 { get; set; } + // public int QuantityMeet5 { get; set; } + // public int QuantityMeet6 { get; set; } + // public int QuantityMeet7 { get; set; } + // public int QuantityMeet8 { get; set; } + // public int QuantityMeet9 { get; set; } + // public int QuantityMeet10 { get; set; } + // public int QuantityMeet11 { get; set; } + // public int QuantityMeet12 { get; set; } + // public int QuantityMeet13 { get; set; } + // public int QuantityMeet14 { get; set; } + // public int QuantityMeet15 { get; set; } + // public int QuantityMeet16 { get; set; } + // public int QuantityMeet17 { get; set; } + // public int QuantityMeet18 { get; set; } + // public int QuantityMeet19 { get; set; } + // public int QuantityMeet20 { get; set; } + // public int QuantityMeet21 { get; set; } + // public int QuantityMeet22 { get; set; } + // public int QuantityMeet23 { get; set; } + // public int QuantityMeet24 { get; set; } + // public int QuantityMeet25 { get; set; } + // public int QuantityMeet26 { get; set; } + // public int QuantityMeet27 { get; set; } + // public int QuantityMeet28 { get; set; } + // public int QuantityMeet29 { get; set; } + // public int QuantityMeet30 { get; set; } + // public int QuantityMeet31 { get; set; } + //} /// /// 计划协议 @@ -437,19 +437,19 @@ namespace TaskManager.Entity /// /// 采购订单风险确认 /// - public class SUPPLIER_CON_PO : BaseEntity - { - public string SupplierCode { get; set; } - public string PurchaseOrder { get; set; } - public string SerialNumber { get; set; } - public int QuantityMeet { get; set; } - public string FeedbackResults { get; set; } - public string VentureType { get; set; } - public string VentureSpecific { get; set; } - public string Measures { get; set; } + //public class SUPPLIER_CON_PO : BaseEntity + //{ + // public string SupplierCode { get; set; } + // public string PurchaseOrder { get; set; } + // public string SerialNumber { get; set; } + // public int QuantityMeet { get; set; } + // public string FeedbackResults { get; set; } + // public string VentureType { get; set; } + // public string VentureSpecific { get; set; } + // public string Measures { get; set; } - } + //} /// /// 过焊装未过总装 @@ -610,22 +610,22 @@ namespace TaskManager.Entity /// /// 供应商共享库存 /// - public class SUPPLIER_SINV_DATA : CherryReadBaseEntity - { - public string SupplierCode { get; set; } - public string SupplierName { get; set; } - public string MaterialCode { get; set; } - public string MaterialDescription { get; set; } - public string MaterialType { get; set; } - public int QuantityCurrent { get; set; } - public int QuantityPlan { get; set; } - public string InventoryStatus { get; set; } - public int SafetyStock { get; set; } - public string ProductionCycle { get; set; } - public string DataUpdateTime { get; set; } - public string SupplierBatch { get; set; } - public string SupplieryxqDate { get; set; } - } + //public class SUPPLIER_SINV_DATA : CherryReadBaseEntity + //{ + // public string SupplierCode { get; set; } + // public string SupplierName { get; set; } + // public string MaterialCode { get; set; } + // public string MaterialDescription { get; set; } + // public string MaterialType { get; set; } + // public int QuantityCurrent { get; set; } + // public int QuantityPlan { get; set; } + // public string InventoryStatus { get; set; } + // public int SafetyStock { get; set; } + // public string ProductionCycle { get; set; } + // public string DataUpdateTime { get; set; } + // public string SupplierBatch { get; set; } + // public string SupplieryxqDate { get; set; } + //} /// /// 日MRP状态监控 diff --git a/API/TaskManager.Entity/TaskManager.Entity.csproj b/API/TaskManager.Entity/TaskManager.Entity.csproj index 3b5b170..c23e4a0 100644 --- a/API/TaskManager.Entity/TaskManager.Entity.csproj +++ b/API/TaskManager.Entity/TaskManager.Entity.csproj @@ -7,6 +7,7 @@ + diff --git a/API/TaskManager.EntityFramework/JobDbContext.cs b/API/TaskManager.EntityFramework/JobDbContext.cs index 1e4e1b1..75abd59 100644 --- a/API/TaskManager.EntityFramework/JobDbContext.cs +++ b/API/TaskManager.EntityFramework/JobDbContext.cs @@ -756,6 +756,226 @@ namespace TaskManager.EntityFramework }); #endregion + + #region M+6月物料需求计划风险确认 + modelBuilder.Entity(b => + { + b.ToTable("SUPPLIER_CON_MMRP"); + //供应商代码 + b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(); + //需求发布版次,取自M+6月物料需求计划接口中的需求发布版次,针对与这个版次的需求进行风险反馈 + b.Property(e => e.ReleaseEdition).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(); + //零件号,奇瑞零件号 + b.Property(e => e.MaterialCode).HasColumnType("VARCHAR").HasMaxLength(50).IsRequired(); + //工厂代码, + b.Property(e => e.PlantId).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired(); + //反馈结果,1-异常;0-无异常(匹配峰值需求缺口,如果可满足峰值,即选择无异常) + b.Property(e => e.FeedbackResults).HasColumnType("VARCHAR").HasMaxLength(10).IsRequired(); + //风险类型,当反馈结果=1时,此字段必输1.生产节拍不足2.人员不足3.原材料不足4.设备异常5.其他 + b.Property(e => e.VentureType).HasColumnType("VARCHAR").HasMaxLength(50).IsRequired(false); + //具体风险,当反馈结果=1时,此字段必输描述具体风险 + b.Property(e => e.VentureSpecific).HasColumnType("VARCHAR").HasMaxLength(255).IsRequired(false); + //应对措施,当反馈结果=1时,此字段必输描述具体应对措施 + b.Property(e => e.Measures).HasColumnType("VARCHAR").HasMaxLength(255).IsRequired(false); + //起始月份-格式:yyyy-MM + b.Property(e => e.StartMonth).HasColumnType("CHAR").HasMaxLength(7).IsRequired(); + //满足数量1 + b.Property(e => e.QuantityMeet1).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量2 + b.Property(e => e.QuantityMeet2).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量3 + b.Property(e => e.QuantityMeet3).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量4 + b.Property(e => e.QuantityMeet4).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量5 + b.Property(e => e.QuantityMeet5).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量6 + b.Property(e => e.QuantityMeet6).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量7 + b.Property(e => e.QuantityMeet7).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量8 + b.Property(e => e.QuantityMeet8).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量9 + b.Property(e => e.QuantityMeet9).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量10 + b.Property(e => e.QuantityMeet10).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量11 + b.Property(e => e.QuantityMeet11).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量12 + b.Property(e => e.QuantityMeet12).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired(); + b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false); + b.Property(e => e.ReadState).HasDefaultValue(false); + b.Property(e => e.WriteState).HasDefaultValue(false); + b.HasKey(e => e.UId); + + }); + #endregion + + + #region 日物料需求计划风险确认 + modelBuilder.Entity(b => + { + b.ToTable("SUPPLIER_CON_DATE"); + //供应商代码 + b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(); + //需求发布版次,取自日物料需求计划接口中的需求发布版次,针对与这个版次的需求进行风险反馈 + b.Property(e => e.ReleaseEdition).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(); + //零件号,奇瑞零件号 + b.Property(e => e.MaterialCode).HasColumnType("VARCHAR").HasMaxLength(50).IsRequired(); + //工厂代码 + b.Property(e => e.PlantId).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired(); + //反馈结果,1-异常;0-无异常(匹配峰值需求缺口,如果可满足峰值,即选择无异常) + b.Property(e => e.FeedbackResults).HasColumnType("VARCHAR").HasMaxLength(10).IsRequired(); + //风险类型,当反馈结果=1时,此字段必输1.生产节拍不足2.人员不足3.原材料不足4.设备异常5.其他 + b.Property(e => e.VentureType).HasColumnType("VARCHAR").HasMaxLength(50).IsRequired(false); + //具体风险,当反馈结果=1时,此字段必输描述具体风险 + b.Property(e => e.VentureSpecific).HasColumnType("VARCHAR").HasMaxLength(255).IsRequired(false); + //应对措施,当反馈结果=1时,此字段必输描述具体应对措施 + b.Property(e => e.Measures).HasColumnType("VARCHAR").HasMaxLength(255).IsRequired(false); + //起始日期,格式:yyyy-MM-dd + b.Property(e => e.StartDate).HasColumnType("CHAR").HasMaxLength(10).IsRequired(); + //满足数量1,数量锁定,7日内满足数量必须等于需求数量 + b.Property(e => e.QuantityMeet1).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量2, + b.Property(e => e.QuantityMeet2).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量3, + b.Property(e => e.QuantityMeet3).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量4, + b.Property(e => e.QuantityMeet4).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量5, + b.Property(e => e.QuantityMeet5).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量6, + b.Property(e => e.QuantityMeet6).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量7, + b.Property(e => e.QuantityMeet7).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量8,根据物料需求计划接口发布的需求天数,针对企业自身产能情况反馈可满足数量注:目前发送数据为滚动12天的数据,13至31天的字段为预留,未来可能会增加至31天 + b.Property(e => e.QuantityMeet8).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量9, + b.Property(e => e.QuantityMeet9).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量10, + b.Property(e => e.QuantityMeet10).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量11, + b.Property(e => e.QuantityMeet11).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量12, + b.Property(e => e.QuantityMeet12).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //满足数量13, + b.Property(e => e.QuantityMeet13).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量14, + b.Property(e => e.QuantityMeet14).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量15, + b.Property(e => e.QuantityMeet15).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量16, + b.Property(e => e.QuantityMeet16).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量17, + b.Property(e => e.QuantityMeet17).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量18, + b.Property(e => e.QuantityMeet18).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量19, + b.Property(e => e.QuantityMeet19).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量20, + b.Property(e => e.QuantityMeet20).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量21, + b.Property(e => e.QuantityMeet21).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量22, + b.Property(e => e.QuantityMeet22).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量23, + b.Property(e => e.QuantityMeet23).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量24, + b.Property(e => e.QuantityMeet24).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量25, + b.Property(e => e.QuantityMeet25).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量26, + b.Property(e => e.QuantityMeet26).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量27, + b.Property(e => e.QuantityMeet27).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量28, + b.Property(e => e.QuantityMeet28).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量29, + b.Property(e => e.QuantityMeet29).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量30, + b.Property(e => e.QuantityMeet30).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + //满足数量31, + b.Property(e => e.QuantityMeet31).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(false); + b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired(); + b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false); + b.Property(e => e.ReadState).HasDefaultValue(false); + b.Property(e => e.WriteState).HasDefaultValue(false); + b.HasKey(e => e.UId); + + }); + #endregion + + + #region 采购订单风险确认 + modelBuilder.Entity(b => + { + b.ToTable("SUPPLIER_CON_PO"); + //供应商代码 + b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(); + //采购订单号 + b.Property(e => e.PurchaseOrder).HasColumnType("VARCHAR").HasMaxLength(50).IsRequired(); + //行项目号 + b.Property(e => e.SerialNumber).HasColumnType("VARCHAR").HasMaxLength(10).IsRequired(); + //满足数量 + b.Property(e => e.QuantityMeet).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //反馈结果,1-异常;0-无异常(匹配峰值需求缺口,如果可满足峰值,即选择无异常) + b.Property(e => e.FeedbackResults).HasColumnType("VARCHAR").HasMaxLength(10).IsRequired(); + //风险类型,当反馈结果=1时,此字段必输1.生产节拍不足2.人员不足3.原材料不足4.设备异常5.其他 + b.Property(e => e.VentureType).HasColumnType("VARCHAR").HasMaxLength(50).IsRequired(false); + //具体风险,当反馈结果=1时,此字段必输描述具体风险 + b.Property(e => e.VentureSpecific).HasColumnType("VARCHAR").HasMaxLength(255).IsRequired(false); + //应对措施,当反馈结果=1时,此字段必输描述具体应对措施 + b.Property(e => e.Measures).HasColumnType("VARCHAR").HasMaxLength(255).IsRequired(false); + b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired(); + b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false); + b.Property(e => e.ReadState).HasDefaultValue(false); + b.Property(e => e.WriteState).HasDefaultValue(false); + b.HasKey(e => e.UId); + + }); + #endregion + + + #region 供应商共享库存 + modelBuilder.Entity(b => + { + b.ToTable("SUPPLIER_SINV_DATA"); + //供应商代码 + b.Property(e => e.SupplierCode).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(); + //供应商名称 + b.Property(e => e.SupplierName).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired(); + //零件号 + b.Property(e => e.MaterialCode).HasColumnType("VARCHAR").HasMaxLength(50).IsRequired(); + //零件名称 + b.Property(e => e.MaterialDescription).HasColumnType("VARCHAR").HasMaxLength(100).IsRequired(); + //物料类型(成品,半成品,原材料) + b.Property(e => e.MaterialType).HasColumnType("VARCHAR").HasMaxLength(20).IsRequired(); + //当前库存数量 + b.Property(e => e.QuantityCurrent).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //原材料在途数量 + b.Property(e => e.QuantityPlan).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //库存状态(生产件,呆滞件,备件,KD件) + b.Property(e => e.InventoryStatus).HasColumnType("VARCHAR").HasMaxLength(32).IsRequired(); + //安全库存 + b.Property(e => e.SafetyStock).HasColumnType("DECIMAL").HasPrecision(precision: 16, scale: 5).IsRequired(); + //生产/采购周期:成品即半成品为生产周期(天),原材料为采购周期(天) + b.Property(e => e.ProductionCycle).HasColumnType("VARCHAR").HasMaxLength(10).IsRequired(); + //库存更新时间-格式:yyyy-MM-ddHH:mm:ss + b.Property(e => e.DataUpdateTime).HasColumnType("CHAR").HasMaxLength(19).IsRequired(); + //批次 + b.Property(e => e.SupplierBatch).HasColumnType("VARCHAR").HasMaxLength(64).IsRequired(false); + //有效期截止日期 非必填 + b.Property(e => e.SupplieryxqDate).HasColumnType("CHAR").HasMaxLength(19).IsRequired(false); + b.Property(e => e.UId).HasColumnType("bigint").ValueGeneratedOnAdd().IsRequired(); + b.Property(e => e.Remark).HasColumnType("NVarchar").HasMaxLength(500).IsRequired(false); + b.Property(e => e.ReadState).HasDefaultValue(false); + b.Property(e => e.WriteState).HasDefaultValue(false); + b.HasKey(e => e.UId); + + }); + #endregion + } } } From c1de41345745952d4a1a4e739114ad5debad78df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 29 May 2025 13:19:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API/TaskManager.Contracts/Dtos/Dtos.cs | 213 +++--- API/TaskManager.Entity/Entity.cs | 618 ++++++++++++++---- API/Wood.Service/Controllers/LogController.cs | 76 ++- .../Controllers/NormalBaseController.cs | 110 ++++ .../Controllers/TaskConifgureController.cs | 137 +--- 5 files changed, 809 insertions(+), 345 deletions(-) create mode 100644 API/Wood.Service/Controllers/NormalBaseController.cs diff --git a/API/TaskManager.Contracts/Dtos/Dtos.cs b/API/TaskManager.Contracts/Dtos/Dtos.cs index e26e00f..7035ebb 100644 --- a/API/TaskManager.Contracts/Dtos/Dtos.cs +++ b/API/TaskManager.Contracts/Dtos/Dtos.cs @@ -9,7 +9,9 @@ using System.Text.Json.Serialization; namespace TaskManager.Contracts.Dtos { - + /// + /// + /// public class PAGE_OUT_DTO { /// 数据总数 @@ -100,51 +102,141 @@ namespace TaskManager.Contracts.Dtos public class SUPPLIER_PRO_PLANING_DETIAL_DTO: CherryReadBaseEntityDto { - //public string models { get; set; } - //public decimal? quantity1 { get; set; } - //public decimal? quantity2 { get; set; } - //public string startMonth { get; set; } - //public int isDelete { get; set; } - //public string updateByUser { get; set; } - //public string pattern { get; set; } - //public string omterior { get; set; } - //public string salseDepartment { get; set; } - //public string materialCode { get; set; } - - //public DateTime? updateTime { get; set; } - //public string type { get; set; } - //public decimal? quantity3 { get; set; } - //public string releaseEdition { get; set; } - //public decimal? quantity4 { get; set; } - //public int? version { get; set; } - //public decimal? quantity5 { get; set; } - //public decimal? quantity6 { get; set; } - //public DateTime? createTime { get; set; } - //public string plant { get; set; } - //public string assembly { get; set; } - //public string id { get; set; } - //public string createByUser { get; set; } - - [JsonProperty("models")] - public string Models { get; set; } - [JsonProperty("quantity1")] - public decimal? Quantity1 { get; set; } + - [JsonProperty("quantity2")] - public decimal? Quantity2 { get; set; } + /// + /// 需求发布版次:唯一版次ID + /// + [JsonPropertyName("releaseEdition")] + [MaxLength(50)] + public string ReleaseEdition { get; set; } = string.Empty; + + /// + /// 车型 + /// + [JsonPropertyName("models")] + [MaxLength(50)] + public string Models { get; set; } = string.Empty; + + + /// + /// 类型 + /// + [JsonPropertyName("type")] + [MaxLength(50)] + public string Type { get; set; } = string.Empty; + + /// + /// 动力总成 + /// + [JsonPropertyName("assembly")] + [MaxLength(50)] + public string Assembly { get; set; } = string.Empty; + + /// + /// 版型 + /// + [JsonPropertyName("pattern")] + [MaxLength(50)] + public string Pattern { get; set; } = string.Empty; - [JsonProperty("startMonth")] - public string StartMonth { get; set; } + + /// + /// 物料号 + /// + [JsonPropertyName("materialCode")] + [MaxLength(50)] + public string MaterialCode { get; set; } = string.Empty; + + /// + /// 起始月份-格式:yyyy-MM + /// + [JsonPropertyName("startMonth")] + [MaxLength(50)] + public string StartMonth { get; set; } = string.Empty; + + /// + /// 数量1 + /// + [JsonPropertyName("quantity1")] + public int Quantity1 { get; set; } = 1; + + /// + /// 数量2 + /// + [JsonPropertyName("quantity2")] + public int Quantity2 { get; set; } = 1; + + /// + /// 数量3 + /// + [JsonPropertyName("quantity3")] + public int Quantity3 { get; set; } = 1; + + /// + /// 数量4 + /// + [JsonPropertyName("quantity4")] + public int Quantity4 { get; set; } = 1; + + /// + /// 数量5 + /// + [JsonPropertyName("quantity5")] + public int Quantity5 { get; set; } = 1; + + /// + /// 数量6 + /// + [JsonPropertyName("quantity6")] + public int Quantity6 { get; set; } = 1; + + /// + /// 工厂 + /// + [JsonPropertyName("plant")] + [MaxLength(50)] + public string Plant { get; set; } = string.Empty; + + /// + /// 创建人 + /// + [JsonPropertyName("createByUser")] + [MaxLength(50)] + public string CreateByUser { get; set; } = string.Empty; + + /// + /// 创建时间 + /// + [JsonPropertyName("createTime")] + public DateTime CreateTime { get; set; } - [JsonProperty("isDelete")] - public int IsDelete { get; set; } + /// + /// 修改人 + /// + [JsonPropertyName("updateByUser")] + [MaxLength(50)] + public string UpdateByUser { get; set; } = string.Empty; + + /// + /// 修改时间 + /// + [JsonPropertyName("updateTime")] + public DateTime UpdateTime { get; set; } - [JsonProperty("updateByUser")] - public string UpdateByUser { get; set; } + /// + /// 是否删除(0:否,1:是) + /// + [JsonPropertyName("isDelete")] + public int IsDelete { get; set; } = 0; + + /// + /// 版本号 + /// + [JsonPropertyName("version")] + public int Version { get; set; } = 1; - [JsonProperty("pattern")] - public string Pattern { get; set; } [JsonProperty("omterior")] // 可能是拼写错误,保留原始名称 public string Omterior { get; set; } @@ -152,46 +244,6 @@ namespace TaskManager.Contracts.Dtos [JsonProperty("salseDepartment")] // 可能是拼写错误,保留原始名称 public string SalseDepartment { get; set; } - [JsonProperty("materialCode")] - public string MaterialCode { get; set; } - - [JsonProperty("updateTime")] - public DateTime? UpdateTime { get; set; } - - [JsonProperty("type")] - public string Type { get; set; } - - [JsonProperty("quantity3")] - public decimal? Quantity3 { get; set; } - - [JsonProperty("releaseEdition")] - public string ReleaseEdition { get; set; } - - [JsonProperty("quantity4")] - public decimal? Quantity4 { get; set; } - - [JsonProperty("version")] - public int Version { get; set; } - - [JsonProperty("quantity5")] - public decimal? Quantity5 { get; set; } - - [JsonProperty("quantity6")] - public decimal? Quantity6 { get; set; } - - [JsonProperty("createTime")] - public DateTime? CreateTime { get; set; } - - [JsonProperty("plant")] - public string Plant { get; set; } - - [JsonProperty("assembly")] - public string Assembly { get; set; } - - - - [JsonProperty("createByUser")] - public string CreateByUser { get; set; } } @@ -790,6 +842,7 @@ public class SUPPLIER_MRP_WARNING_DETAIL_DTO : CherryReadBaseEntityDto public class SUPPLIER_MRP_DATE_DETAIL_DTO : CherryReadBaseEntityDto { + public string ReleaseEdition { get; set; } public string MaterialCode { get; set; } public string MaterialDescription { get; set; } diff --git a/API/TaskManager.Entity/Entity.cs b/API/TaskManager.Entity/Entity.cs index 4aecce3..b8b715c 100644 --- a/API/TaskManager.Entity/Entity.cs +++ b/API/TaskManager.Entity/Entity.cs @@ -6,6 +6,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; +using System.Text.Json.Serialization; using System.Threading.Tasks; namespace TaskManager.Entity @@ -66,30 +67,40 @@ namespace TaskManager.Entity } - public class TaskLog + public class TaskLog:BaseEntity { - [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public long UId { get; set; } + + /// /// 详细描述 /// + [ExporterHeader(DisplayName = "信息")] public string Info { get; set; } /// /// 日志类型 /// + [ExporterHeader(DisplayName = "日志类型")] public string Type { get; set; } /// /// 任务名称 /// + [ExporterHeader(DisplayName = "任务名")] public string TaskName { get; set; } + + /// + /// 任务名称 + /// + [ExporterHeader(DisplayName = "任务ID")] + public Guid TaskId { get; set; } /// /// 创建时间 /// + [ExporterHeader(DisplayName = "创建时间")] public DateTime CreationTime { set; get; } /// /// 备注 /// + [ExporterHeader(DisplayName = "备注")] public string Remark { get; set; } } @@ -115,7 +126,13 @@ namespace TaskManager.Entity public class CherryReadBaseEntity:BaseEntity { + /// + /// 请求发出日期 + /// public string RequestDate { get; set; } + /// + /// 同步ID + /// public string Id { get; set; } @@ -128,27 +145,27 @@ namespace TaskManager.Entity /// public class TaskSub:BaseEntity { - [ExporterHeader(DisplayName = "用户名")] + [ExporterHeader(DisplayName = "表名")] /// /// 关联的数据表名称(如:订单表、用户表等,可为空) /// public string? TableName { get; set; } - + [ExporterHeader(DisplayName = "任务名称")] /// /// 任务名称(用于业务层面标识任务,如:数据同步任务、报表生成任务) /// public string? TaskName { get; set; } - + [ExporterHeader(DisplayName = "同步总数量")] /// /// 数据总量(任务处理的数据条目数) /// public int DataCount { get; set; } - + [ExporterHeader(DisplayName = "发布客户")] /// /// 发布给那个客户 /// public string? Subscriber { get; set; } - + [ExporterHeader(DisplayName = "失败次数")] /// /// 失败次数(任务执行失败的累计次数) /// @@ -157,38 +174,41 @@ namespace TaskManager.Entity /// /// 失败详情(记录失败原因、异常堆栈等信息,支持长文本) /// + [ExporterHeader(DisplayName = "失败信息")] public string? FailedInfo { get; set; } /// /// 所属域(多租户场景下标识租户,如:租户A、租户B) /// + [ExporterHeader(DisplayName = "域名")] public string? Domain { get; set; } /// /// 站点标识(多站点部署时标识所属站点,如:Site1、Site2) /// + [ExporterHeader(DisplayName = "站点")] public string? Site { get; set; } - + [ExporterHeader(DisplayName = "创建用户")] /// /// 从那个内部系统创建系统 /// public string? CreateUser { get; set; } - + [ExporterHeader(DisplayName = "创建时间")] /// /// 创建时间(任务创建的时间戳) /// public DateTime CreateTime { get; set; } - + [ExporterHeader(DisplayName = "备注")] /// /// 备注信息(任务相关的补充说明,支持长文本) /// public string? Remark { get; set; } - + [ExporterHeader(DisplayName = "更新客户系统名")] /// /// 最后更新人(记录任务最后修改者) /// public string? UpdateUser { get; set; } - + [ExporterHeader(DisplayName = "更新完成时间")] /// /// 最后更新时间(任务最后修改的时间戳,可为空) /// @@ -196,86 +216,157 @@ namespace TaskManager.Entity } - - - - - - /// /// 整车月度生产计划-2 /// public class SUPPLIER_PRO_PLANING : CherryReadBaseEntity { + /// + /// 主键ID + /// + [JsonPropertyName("id")] + public string Id { get; set; } - [JsonProperty("models")] - public string Models { get; set; } + /// + /// 需求发布版次:唯一版次ID + /// + [JsonPropertyName("releaseEdition")] + [MaxLength(50)] + public string ReleaseEdition { get; set; } = string.Empty; - [JsonProperty("quantity1")] - public decimal? Quantity1 { get; set; } + /// + /// 车型 + /// + [JsonPropertyName("models")] + [MaxLength(50)] + public string Models { get; set; } = string.Empty; - [JsonProperty("quantity2")] - public decimal? Quantity2 { get; set; } - [JsonProperty("startMonth")] - public string StartMonth { get; set; } + /// + /// 类型 + /// + [JsonPropertyName("type")] + [MaxLength(50)] + public string Type { get; set; } = string.Empty; - [JsonProperty("isDelete")] - public int IsDelete { get; set; } + /// + /// 动力总成 + /// + [JsonPropertyName("assembly")] + [MaxLength(50)] + public string Assembly { get; set; } = string.Empty; - [JsonProperty("updateByUser")] - public string UpdateByUser { get; set; } + /// + /// 版型 + /// + [JsonPropertyName("pattern")] + [MaxLength(50)] + public string Pattern { get; set; } = string.Empty; - [JsonProperty("pattern")] - public string Pattern { get; set; } - [JsonProperty("omterior")] // 可能是拼写错误,保留原始名称 - public string Omterior { get; set; } + /// + /// 物料号 + /// + [JsonPropertyName("materialCode")] + [MaxLength(50)] + public string MaterialCode { get; set; } = string.Empty; - [JsonProperty("salseDepartment")] // 可能是拼写错误,保留原始名称 - public string SalseDepartment { get; set; } + /// + /// 起始月份-格式:yyyy-MM + /// + [JsonPropertyName("startMonth")] + [MaxLength(50)] + public string StartMonth { get; set; } = string.Empty; - [JsonProperty("materialCode")] - public string MaterialCode { get; set; } + /// + /// 数量1 + /// + [JsonPropertyName("quantity1")] + public decimal Quantity1 { get; set; } = 1; - [JsonProperty("updateTime")] - public DateTime? UpdateTime { get; set; } + /// + /// 数量2 + /// + [JsonPropertyName("quantity2")] + public decimal Quantity2 { get; set; } = 1; - [JsonProperty("type")] - public string Type { get; set; } + /// + /// 数量3 + /// + [JsonPropertyName("quantity3")] + public decimal Quantity3 { get; set; } = 1; - [JsonProperty("quantity3")] - public decimal? Quantity3 { get; set; } + /// + /// 数量4 + /// + [JsonPropertyName("quantity4")] + public decimal Quantity4 { get; set; } = 1; - [JsonProperty("releaseEdition")] - public string ReleaseEdition { get; set; } + /// + /// 数量5 + /// + [JsonPropertyName("quantity5")] + public decimal Quantity5 { get; set; } = 1; - [JsonProperty("quantity4")] - public decimal? Quantity4 { get; set; } + /// + /// 数量6 + /// + [JsonPropertyName("quantity6")] + public decimal Quantity6 { get; set; } = 1; - [JsonProperty("version")] - public int Version { get; set; } + /// + /// 工厂 + /// + [JsonPropertyName("plant")] + [MaxLength(50)] + public string Plant { get; set; } = string.Empty; - [JsonProperty("quantity5")] - public decimal? Quantity5 { get; set; } + /// + /// 创建人 + /// + [JsonPropertyName("createByUser")] + [MaxLength(50)] + public string CreateByUser { get; set; } = string.Empty; + + /// + /// 创建时间 + /// + [JsonPropertyName("createTime")] + public DateTime CreateTime { get; set; } - [JsonProperty("quantity6")] - public decimal? Quantity6 { get; set; } + /// + /// 修改人 + /// + [JsonPropertyName("updateByUser")] + [MaxLength(50)] + public string UpdateByUser { get; set; } = string.Empty; - [JsonProperty("createTime")] - public DateTime? CreateTime { get; set; } + /// + /// 修改时间 + /// + [JsonPropertyName("updateTime")] + public DateTime UpdateTime { get; set; } - [JsonProperty("plant")] - public string Plant { get; set; } + /// + /// 是否删除(0:否,1:是) + /// + [JsonPropertyName("isDelete")] + public int IsDelete { get; set; } = 0; - [JsonProperty("assembly")] - public string Assembly { get; set; } + /// + /// 版本号 + /// + [JsonPropertyName("version")] + public int Version { get; set; } = 1; - - [JsonProperty("createByUser")] - public string CreateByUser { get; set; } + [JsonProperty("omterior")] // 可能是拼写错误,保留原始名称 + public string Omterior { get; set; } + + [JsonProperty("salseDepartment")] // 可能是拼写错误,保留原始名称 + public string SalseDepartment { get; set; } + } /// @@ -283,37 +374,172 @@ namespace TaskManager.Entity /// public class SUPPLIER_MRP_MONTH : CherryReadBaseEntity { - - public string ReleaseEdition { get; set; } - public string MaterialCode { get; set; } - public string MaterialDescription { get; set; } - public string PlantId { get; set; } - public string PlantName { get; set; } - public string StartMonth { get; set; } - public decimal QuantityDemand1 { get; set; } - public decimal QuantityDemand2 { get; set; } - public decimal QuantityDemand3 { get; set; } - public decimal QuantityDemand4 { get; set; } - public decimal QuantityDemand5 { get; set; } - public decimal QuantityDemand6 { get; set; } - public decimal QuantityDemand7 { get; set; } - public decimal QuantityDemand8 { get; set; } - public decimal QuantityDemand9 { get; set; } - public decimal QuantityDemand10 { get; set; } - public decimal QuantityDemand11 { get; set; } - public decimal QuantityDemand12 { get; set; } - public string IsUpdate { get; set; } - public string CreateByUser { get; set; } - public DateTime CreateTime { get; set; } - public string UpdateByUser { get; set; } - public DateTime UpdateTime { get; set; } - public string IsDelete { get; set; } - public int Version { get; set; } + /// + /// 主键ID + /// + [JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// 需求发布版次:M+6月物料需求计划风险确认接口对应需求版次,需求ID + /// + [JsonPropertyName("releaseEdition")] + [MaxLength(50)] + public string ReleaseEdition { get; set; } = string.Empty; + /// + /// 零件号:奇瑞零件号 + /// + [JsonPropertyName("materialCode")] + [MaxLength(50)] + public string MaterialCode { get; set; } = string.Empty; + /// + /// 零件名称 + /// + [JsonPropertyName("materialDescription")] + [MaxLength(50)] + public string MaterialDescription { get; set; } = string.Empty; + /// + /// 工厂代码 + /// + [JsonPropertyName("plantId")] + [MaxLength(50)] + public string PlantId { get; set; } = string.Empty; + + /// + /// 工厂名称 + /// + [JsonPropertyName("plantName")] + [MaxLength(50)] + public string PlantName { get; set; } = string.Empty; + + /// + /// 起始月份-格式:yyyy-MM + /// + [JsonPropertyName("startMonth")] + [MaxLength(50)] + public string StartMonth { get; set; } = string.Empty; + + /// + /// 需求数量1 + /// + [JsonPropertyName("quantityDemand1")] + public decimal QuantityDemand1 { get; set; } = 1; + + /// + /// 需求数量2 + /// + [JsonPropertyName("quantityDemand2")] + public decimal QuantityDemand2 { get; set; } = 1; + + /// + /// 需求数量3 + /// + [JsonPropertyName("quantityDemand3")] + public decimal QuantityDemand3 { get; set; } = 1; + + /// + /// 需求数量4 + /// + [JsonPropertyName("quantityDemand4")] + public decimal QuantityDemand4 { get; set; } = 1; + + /// + /// 需求数量5 + /// + [JsonPropertyName("quantityDemand5")] + public decimal QuantityDemand5 { get; set; } = 1; + + /// + /// 需求数量6 + /// + [JsonPropertyName("quantityDemand6")] + public decimal QuantityDemand6 { get; set; } = 1; + + /// + /// 需求数量7 + /// + [JsonPropertyName("quantityDemand7")] + public decimal QuantityDemand7 { get; set; } = 1; + + /// + /// 需求数量8 + /// + [JsonPropertyName("quantityDemand8")] + public decimal QuantityDemand8 { get; set; } = 1; + + /// + /// 需求数量9 + /// + [JsonPropertyName("quantityDemand9")] + public decimal QuantityDemand9 { get; set; } = 1; + + /// + /// 需求数量10 + /// + [JsonPropertyName("quantityDemand10")] + public decimal QuantityDemand10 { get; set; } = 1; + + /// + /// 需求数量11 + /// + [JsonPropertyName("quantityDemand11")] + public decimal QuantityDemand11 { get; set; } = 1; + + /// + /// 需求数量12 + /// + [JsonPropertyName("quantityDemand12")] + public int QuantityDemand12 { get; set; } = 1; + + /// + /// 当文件夹数据发生变更时(更新需求=1/否则=0) + /// + [JsonPropertyName("isUpdate")] + [MaxLength(50)] + public string IsUpdate { get; set; } = string.Empty; + + /// + /// 创建人 + /// + [JsonPropertyName("createByUser")] + [MaxLength(50)] + public string CreateByUser { get; set; } = string.Empty; + + /// + /// 创建时间 + /// + [JsonPropertyName("createTime")] + public DateTime CreateTime { get; set; } + + /// + /// 修改人 + /// + [JsonPropertyName("updateByUser")] + [MaxLength(50)] + public string UpdateByUser { get; set; } = string.Empty; + + /// + /// 修改时间 + /// + [JsonPropertyName("updateTime")] + public DateTime UpdateTime { get; set; } + + /// + /// 是否删除(0:否,1是) + /// + [JsonPropertyName("isDelete")] + public int IsDelete { get; set; } = 1; + + /// + /// 版本号 + /// + [JsonPropertyName("version")] + public int Version { get; set; } = 1; } @@ -351,53 +577,171 @@ namespace TaskManager.Entity /// public class SUPPLIER_MRP_DATE : CherryReadBaseEntity { - - public string ReleaseEdition { get; set; } - public string MaterialCode { get; set; } - public string MaterialDescription { get; set; } - public string PlantId { get; set; } - public string PlantName { get; set; } - public string StartDate { get; set; } - public int QuantityDemand1 { get; set; } - public int QuantityDemand2 { get; set; } - public int QuantityDemand3 { get; set; } - public int QuantityDemand4 { get; set; } - public int QuantityDemand5 { get; set; } - public int QuantityDemand6 { get; set; } - public int QuantityDemand7 { get; set; } - public int QuantityDemand8 { get; set; } - public int QuantityDemand9 { get; set; } - public int QuantityDemand10 { get; set; } - public int QuantityDemand11 { get; set; } - public int QuantityDemand12 { get; set; } - public int QuantityDemand13 { get; set; } - public int QuantityDemand14 { get; set; } - public int QuantityDemand15 { get; set; } - public int QuantityDemand16 { get; set; } - public int QuantityDemand17 { get; set; } - public int QuantityDemand18 { get; set; } - public int QuantityDemand19 { get; set; } - public int QuantityDemand20 { get; set; } - public int QuantityDemand21 { get; set; } - public int QuantityDemand22 { get; set; } - public int QuantityDemand23 { get; set; } - public int QuantityDemand24 { get; set; } - public int QuantityDemand25 { get; set; } - public int QuantityDemand26 { get; set; } - public int QuantityDemand27 { get; set; } - public int QuantityDemand28 { get; set; } - public int QuantityDemand29 { get; set; } - public int QuantityDemand30 { get; set; } - public int QuantityDemand31 { get; set; } - - public string IsUpdate { get; set; } - public string CreateByUser { get; set; } - public string CreateTime { get; set; } - public string UpdateByUser { get; set; } - public string UpdateTime { get; set; } - public int IsDelete { get; set; } - public int Version { get; set; } + // + /// 主键ID + /// + [JsonPropertyName("id")] + public int Id { get; set; } + + /// + /// 需求发布版次:M+6月物料需求计划风险确认接口对应需求版次,需求ID + /// + [JsonPropertyName("releaseEdition")] + [MaxLength(50)] + public string ReleaseEdition { get; set; } = string.Empty; + + /// + /// 零件号:奇瑞零件号 + /// + [JsonPropertyName("materialCode")] + [MaxLength(50)] + public string MaterialCode { get; set; } = string.Empty; + + /// + /// 零件名称 + /// + [JsonPropertyName("materialDescription")] + [MaxLength(50)] + public string MaterialDescription { get; set; } = string.Empty; + + /// + /// 工厂代码 + /// + [JsonPropertyName("plantId")] + [MaxLength(50)] + public string PlantId { get; set; } = string.Empty; + + /// + /// 工厂名称 + /// + [JsonPropertyName("plantName")] + [MaxLength(50)] + public string PlantName { get; set; } = string.Empty; + + /// + /// 起始月份-格式:yyyy-MM + /// + [JsonPropertyName("startMonth")] + [MaxLength(50)] + public string StartMonth { get; set; } = string.Empty; + + /// + /// 需求数量1 + /// + [JsonPropertyName("quantityDemand1")] + public int QuantityDemand1 { get; set; } = 1; + + /// + /// 需求数量2 + /// + [JsonPropertyName("quantityDemand2")] + public int QuantityDemand2 { get; set; } = 1; + + /// + /// 需求数量3 + /// + [JsonPropertyName("quantityDemand3")] + public int QuantityDemand3 { get; set; } = 1; + + /// + /// 需求数量4 + /// + [JsonPropertyName("quantityDemand4")] + public int QuantityDemand4 { get; set; } = 1; + + /// + /// 需求数量5 + /// + [JsonPropertyName("quantityDemand5")] + public int QuantityDemand5 { get; set; } = 1; + + /// + /// 需求数量6 + /// + [JsonPropertyName("quantityDemand6")] + public int QuantityDemand6 { get; set; } = 1; + + /// + /// 需求数量7 + /// + [JsonPropertyName("quantityDemand7")] + public int QuantityDemand7 { get; set; } = 1; + + /// + /// 需求数量8 + /// + [JsonPropertyName("quantityDemand8")] + public int QuantityDemand8 { get; set; } = 1; + + /// + /// 需求数量9 + /// + [JsonPropertyName("quantityDemand9")] + public int QuantityDemand9 { get; set; } = 1; + + /// + /// 需求数量10 + /// + [JsonPropertyName("quantityDemand10")] + public int QuantityDemand10 { get; set; } = 1; + + /// + /// 需求数量11 + /// + [JsonPropertyName("quantityDemand11")] + public int QuantityDemand11 { get; set; } = 1; + + /// + /// 需求数量12 + /// + [JsonPropertyName("quantityDemand12")] + public int QuantityDemand12 { get; set; } = 1; + + /// + /// 当文件夹数据发生变更时(更新需求=1/否则=0) + /// + [JsonPropertyName("isUpdate")] + [MaxLength(50)] + public string IsUpdate { get; set; } = string.Empty; + + /// + /// 创建人 + /// + [JsonPropertyName("createByUser")] + [MaxLength(50)] + public string CreateByUser { get; set; } = string.Empty; + + /// + /// 创建时间 + /// + [JsonPropertyName("createTime")] + public DateTime CreateTime { get; set; } + + /// + /// 修改人 + /// + [JsonPropertyName("updateByUser")] + [MaxLength(50)] + public string UpdateByUser { get; set; } = string.Empty; + + /// + /// 修改时间 + /// + [JsonPropertyName("updateTime")] + public DateTime UpdateTime { get; set; } + + /// + /// 是否删除(0:否,1是) + /// + [JsonPropertyName("isDelete")] + public int IsDelete { get; set; } = 1; + + /// + /// 版本号 + /// + [JsonPropertyName("version")] + public int Version { get; set; } = 1; } diff --git a/API/Wood.Service/Controllers/LogController.cs b/API/Wood.Service/Controllers/LogController.cs index c37e785..9aea8d6 100644 --- a/API/Wood.Service/Controllers/LogController.cs +++ b/API/Wood.Service/Controllers/LogController.cs @@ -1,36 +1,41 @@  +using Magicodes.ExporterAndImporter.Excel; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; using TaskManager.Controllers; using TaskManager.Entity; using TaskManager.EntityFramework; +using TaskManager.EntityFramework.Repository; +using Wood.Service.Controllers; namespace TaskManager.Controllers { - public class LogController:ControllerBase + public class LogController:NormalBaseController { - private readonly JobDbContext _dbContext; - public LogController(JobDbContext dbContext) + public LogController(JobDbContext context, IServiceProvider builder, IConfiguration configuration, IRepository repository) : base(context, builder, configuration, repository) { - _dbContext = dbContext; } + public async Task> GetAll() { - var log = await _dbContext.TaskLogs.ToListAsync(); + var log = await _context.TaskLogs.ToListAsync(); return log; } [HttpGet("AddError")] public async Task AddError(string message,string taskname) { - _dbContext.TaskLogs.Add(new TaskLog() { Info = message, Type = "错误",TaskName=taskname ,CreationTime=DateTime.Now}); - var result =await _dbContext.SaveChangesAsync(); + _context.TaskLogs.Add(new TaskLog() { Info = message, Type = "错误",TaskName=taskname ,CreationTime=DateTime.Now}); + var result =await _context.SaveChangesAsync(); if (result > 0) { return true; @@ -40,16 +45,63 @@ namespace TaskManager.Controllers [HttpGet("AddInfo")] public async Task AddInfo(string message, string taskname) { - _dbContext.TaskLogs.Add(new TaskLog() { Info = message, Type = "记录", TaskName = taskname, CreationTime = DateTime.Now }); - var result = await _dbContext.SaveChangesAsync(); + _context.TaskLogs.Add(new TaskLog() { Info = message, Type = "记录", TaskName = taskname, CreationTime = DateTime.Now }); + var result = await _context.SaveChangesAsync(); if (result > 0) { return true; } return false; } - + + + public async Task Export([FromQuery] int pageNumber = 1, + [FromQuery] int pageSize = 10, + [FromQuery] string sortBy = "", + [FromQuery] bool isAscending = true, + [FromQuery] Dictionary filters = null) + { + var pagingParams = new PagingParams + { + PageNumber = pageNumber, + PageSize = pageSize, + SortBy = sortBy, + IsAscending = isAscending, + Filters = filters + }; + + // 可以在这里构建表达式树过滤条件 + Expression> filter = null; + + var pagedResult = await _repository.GetPagedAsync(null, pagingParams); + return await ExportFile(pagedResult.Data, Guid.NewGuid().ToString() + ".xlsx"); + + + } + protected async Task ExportFile(ICollection dtos, string fileName) where T : class, new() + { + var excelExporter = HttpContext.RequestServices.GetRequiredService(); + var res = await excelExporter.ExportAsByteArray(dtos); + return new FileStreamResult(new MemoryStream(res), "application/octet-stream") { FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "_" + fileName }; + } + + } + + /// 导出 + /// + /// 第几页 + /// 每页条数 + /// 排序列 + /// 是否升序 + /// 查询条件 + /// + + + + + + //private readonly IServiceProvider _serviceProvider; //public LogController(IServiceProvider serviceProvider) //{ @@ -63,5 +115,5 @@ namespace TaskManager.Controllers //} - -} + + } diff --git a/API/Wood.Service/Controllers/NormalBaseController.cs b/API/Wood.Service/Controllers/NormalBaseController.cs new file mode 100644 index 0000000..8a877f4 --- /dev/null +++ b/API/Wood.Service/Controllers/NormalBaseController.cs @@ -0,0 +1,110 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Configuration; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using TaskManager.Entity; +using TaskManager.EntityFramework; +using TaskManager.EntityFramework.Repository; + +namespace Wood.Service.Controllers +{ + public class NormalBaseController:ControllerBase where T:BaseEntity + { + + protected readonly JobDbContext _context; + protected readonly IServiceProvider _builder; + protected readonly IConfiguration _configuration; + protected readonly IRepository _repository; + public NormalBaseController(JobDbContext context, IServiceProvider builder, IConfiguration configuration, IRepository repository) + { + _builder = builder; + _context = context; + _configuration = configuration; + _repository = repository; + } + + + /// + /// 通过UID获得实体 + /// + /// + /// + [HttpGet("{id}")] + public async Task> GetById(int id) + { + var entity = await _repository.GetByIdAsync(id); + if (entity == null) return NotFound(); + return entity; + } + + /// + /// 创建实体 + /// + /// + /// + [HttpPost] + public async Task> Create(T entity) + { + entity.CreationTime = DateTime.Now; + var createdEntity = await _repository.AddAsync(entity); + return new JsonResult(new { Code = 200, Message = "创建成功!" }); + } + /// + /// 更新实体UID + /// + /// + /// + [HttpPut("{id}")] + public async Task Update(T entity) + { + var _first = await _repository.GetByIdAsync(entity.UId); + if (_first == null) + { + return new JsonResult(new { Code = 400, Message = "修改失败!" }); + } + + + await _repository.UpdateAsync(entity); + return new JsonResult(new { Code = 200, Message = "修改成功!" }); + } + /// + /// 删除实体通过UID + /// + /// + /// + [HttpDelete("{id}")] + public async Task Delete(int id) + { + await _repository.DeleteAsync(id); + return new JsonResult(new { Code = 200, Message = "删除成功!" }); ; + } + [HttpGet] + public async Task>> GetPaged( + [FromQuery] int pageNumber = 1, + [FromQuery] int pageSize = 10, + [FromQuery] string sortBy = "", + [FromQuery] bool isAscending = true, + [FromQuery] Dictionary filters = null) + { + var pagingParams = new PagingParams + { + PageNumber = pageNumber, + PageSize = pageSize, + SortBy = sortBy, + IsAscending = isAscending, + Filters = filters + }; + + // 可以在这里构建表达式树过滤条件 + Expression> filter = null; + + var pagedResult = await _repository.GetPagedAsync(filter, pagingParams); + return Ok(pagedResult); + } + + } +} diff --git a/API/Wood.Service/Controllers/TaskConifgureController.cs b/API/Wood.Service/Controllers/TaskConifgureController.cs index 61d552c..e98d7d2 100644 --- a/API/Wood.Service/Controllers/TaskConifgureController.cs +++ b/API/Wood.Service/Controllers/TaskConifgureController.cs @@ -18,6 +18,7 @@ using TaskManager.Controllers; using TaskManager.Entity; using TaskManager.EntityFramework; using TaskManager.EntityFramework.Repository; +using Wood.Service.Controllers; namespace TaskManager.Controllers { @@ -25,20 +26,13 @@ namespace TaskManager.Controllers //[Route("[controller]")] [AllowAnonymous] - public class TaskConifgureController : ControllerBase + public class TaskConifgureController :NormalBaseController { - private readonly JobDbContext _context; - private readonly IServiceProvider _builder; - private readonly IConfiguration _configuration; - private readonly IRepository _repository; - public TaskConifgureController(JobDbContext context, IServiceProvider builder, IConfiguration configuration, IRepository repository) + public TaskConifgureController(JobDbContext context, IServiceProvider builder, IConfiguration configuration, IRepository repository) : base(context, builder, configuration, repository) { - _builder = builder; - _context = context; - _configuration = configuration; - _repository = repository; } + protected async Task ExportFile(ICollection dtos, string fileName) where T : class, new() { var excelExporter = HttpContext.RequestServices.GetRequiredService(); @@ -85,38 +79,7 @@ namespace TaskManager.Controllers } /// - /// 导出 - /// - /// 第几页 - /// 每页条数 - /// 排序列 - /// 是否升序 - /// 查询条件 - /// - - public async Task Export([FromQuery] int pageNumber = 1, - [FromQuery] int pageSize = 10, - [FromQuery] string sortBy = "", - [FromQuery] bool isAscending = true, - [FromQuery] Dictionary filters = null) - { - var pagingParams = new PagingParams - { - PageNumber = pageNumber, - PageSize = pageSize, - SortBy = sortBy, - IsAscending = isAscending, - Filters = filters - }; - - // 可以在这里构建表达式树过滤条件 - Expression> filter = null; - - var pagedResult = await _repository.GetPagedAsync(null, pagingParams); - return await ExportFile(pagedResult.Data, Guid.NewGuid().ToString() + ".xlsx"); - - - } + @@ -618,82 +581,23 @@ namespace TaskManager.Controllers } } - - - - } - - /// - /// 获得所有揭露 - /// - /// - [HttpGet] - public async Task>> GetAll() - { - return await _repository.GetAllAsync() as List; - } - - /// - /// 通过UID获得实体 - /// - /// - /// - [HttpGet("{id}")] - public async Task> GetById(int id) - { - var entity = await _repository.GetByIdAsync(id); - if (entity == null) return NotFound(); - return entity; } - /// - /// 创建实体 - /// - /// - /// - [HttpPost] - public async Task> Create(TaskConifgure entity) - { - entity.CreationTime = DateTime.Now; - var createdEntity = await _repository.AddAsync(entity); - return new JsonResult(new { Code = 200, Message = "创建成功!" }); - } - /// - /// 更新实体UID + + /// 导出 /// - /// + /// 第几页 + /// 每页条数 + /// 排序列 + /// 是否升序 + /// 查询条件 /// - [HttpPut("{id}")] - public async Task Update(TaskConifgure entity) - { - var _first = await _repository.GetByIdAsync(entity.UId); - if (_first == null) - { - return new JsonResult(new { Code = 400, Message = "修改失败!" }); - } - - await _repository.UpdateAsync(entity); - return new JsonResult(new { Code = 200, Message = "修改成功!" }); - } - /// - /// 删除实体通过UID - /// - /// - /// - [HttpDelete("{id}")] - public async Task Delete(int id) - { - await _repository.DeleteAsync(id); - return new JsonResult(new { Code = 200, Message = "删除成功!" }); ; - } - [HttpGet] - public async Task>> GetPaged( - [FromQuery] int pageNumber = 1, - [FromQuery] int pageSize = 10, - [FromQuery] string sortBy = "", - [FromQuery] bool isAscending = true, - [FromQuery] Dictionary filters = null) + public async Task Export([FromQuery] int pageNumber = 1, + [FromQuery] int pageSize = 10, + [FromQuery] string sortBy = "", + [FromQuery] bool isAscending = true, + [FromQuery] Dictionary filters = null) { var pagingParams = new PagingParams { @@ -707,11 +611,12 @@ namespace TaskManager.Controllers // 可以在这里构建表达式树过滤条件 Expression> filter = null; - var pagedResult = await _repository.GetPagedAsync(filter, pagingParams); - return Ok(pagedResult); - } + var pagedResult = await _repository.GetPagedAsync(null, pagingParams); + return await ExportFile(pagedResult.Data, Guid.NewGuid().ToString() + ".xlsx"); + } + // 使用 Hangfire 注册定时任务 From 910e73463d43109ca558e362f82623c904057e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A6=20=E8=B5=B5?= <89237069@qq.com> Date: Thu, 29 May 2025 13:23:07 +0800 Subject: [PATCH 3/3] 333 --- .../JobDbContext.cs | 35 +------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/API/TaskManager.EntityFramework/JobDbContext.cs b/API/TaskManager.EntityFramework/JobDbContext.cs index 1e4e1b1..a1ad062 100644 --- a/API/TaskManager.EntityFramework/JobDbContext.cs +++ b/API/TaskManager.EntityFramework/JobDbContext.cs @@ -115,40 +115,7 @@ namespace TaskManager.EntityFramework /// public DbSet SUPPLIER_PRO_FLAW { get; set; } - ///// - ///// 环境业务数据 - ///// - //public DbSet SUPPLIER_PRO_ENVIRONMENT { get; set; } - - ///// - ///// 设备OEE达成率 - ///// - //public DbSet SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE { get; set; } - - ///// - ///// OEE时间明细 - ///// - //public DbSet SUPPLIER_PRO_OEE_TIME_DETAILS { get; set; } - - ///// - ///// 物料主数据 - ///// - //public DbSet SUPPLIER_PRO_MATERIAL_DATA { get; set; } - - ///// - ///// 附件类数据 - ///// - //public DbSet SUPPLIER_PRO_ATTACHMENT_DATA { get; set; } - - ///// - ///// 工艺装备 - ///// - //public DbSet SUPPLIER_PRO_PROCESS_EQUIPMENT { get; set; } - - ///// - ///// 工艺 - ///// - //public DbSet SUPPLIER_PRO_PROCESS { get; set; } + /// /// 整车月度生产计划-2