From 47d3c9e31edd16c02e3c74ff45e9772f9ca550b2 Mon Sep 17 00:00:00 2001 From: zyf <1071160500@qq.com> Date: 星期三, 28 五月 2025 19:26:49 +0800 Subject: [PATCH] 采购申请和BOM接口 --- MESApplication/bin/Release/net8.0/MESApplication.exe | 0 MESApplication/bin/Release/net8.0/publish/MESApplication.pdb | 0 MESApplication/bin/Debug/net8.0/MES.Service.pdb | 0 MESApplication/bin/Release/net8.0/MESApplication.deps.json | 5 MESApplication/bin/Release/net8.0/publish/MESApplication.dll | 0 MESApplication/bin/Debug/net8.0/MES.Service.dll | 0 MES.Service/Modes/MesCgsqDetail.cs | 154 ++++ MESApplication/bin/Debug/net8.0/MESApplication.pdb | 0 MESApplication/bin/Release/net8.0/MES.Service.dll | 0 MESApplication/bin/Release/net8.0/MESApplication.dll | 0 MESApplication/bin/Release/net8.0/publish/MES.Service.pdb | 0 MES.Service/Modes/BOM/MesBomDetail2.cs | 69 + MESApplication/bin/Release/net8.0/MES.Service.pdb | 0 MESApplication/bin/Release/net8.0/publish/MESApplication.exe | 0 MESApplication/bin/Release/net8.0/MESApplication.pdb | 0 MES.Service/bin/Debug/net8.0/MES.Service.pdb | 0 MES.Service/service/MesCgsqManager.cs | 218 ++++++ MESApplication/bin/Release/net8.0/publish/MES.Service.dll | 0 MES.Service/Modes/MesCgsq.cs | 134 +++ MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json | 5 MES.Service/service/MesCgsqDetailManager.cs | 78 ++ MESApplication/Controllers/MesCgsqController.cs | 267 +++++++ MESApplication/bin/Debug/net8.0/MESApplication.dll | 0 MES.Service/bin/Debug/net8.0/MES.Service.dll | 0 MESApplication/bin/Debug/net8.0/MESApplication.xml | 72 ++ MES.Service/service/BOM/MesBomDetail1Manager.cs | 78 ++ MES.Service/Dto/service/BOMDto.cs | 12 MES.Service/Dto/service/CgsqDto.cs | 12 MES.Service/service/BOM/MesBomMasterManager.cs | 260 +++++++ MESApplication/MESApplication.csproj.user | 2 MES.Service/Modes/BOM/MesBomMaster.cs | 159 ++++ MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user | 4 MES.Service/Modes/BOM/MesBomDetail1.cs | 184 +++++ MES.Service/service/BOM/MesBomDetail2Manager.cs | 78 ++ MESApplication/bin/Debug/net8.0/MESApplication.exe | 0 MES.Service/bin/Release/net8.0/MES.Service.dll | 0 MES.Service/bin/Release/net8.0/MES.Service.pdb | 0 MESApplication/Controllers/BOM/MesBomMasterController.cs | 268 +++++++ 38 files changed, 2,048 insertions(+), 11 deletions(-) diff --git a/MES.Service/Dto/service/BOMDto.cs b/MES.Service/Dto/service/BOMDto.cs new file mode 100644 index 0000000..39cc7c1 --- /dev/null +++ b/MES.Service/Dto/service/BOMDto.cs @@ -0,0 +1,12 @@ +锘縰sing MES.Service.Modes; + +namespace MES.Service.Dto.service; + +public class MesBomDto +{ + public string? Type { get; set; } + public MesBomMaster? Main { get; set; } + public List<MesBomDetail1>? DT1 { get; set; } + public List<MesBomDetail2>? DT2 { get; set; } + +} \ No newline at end of file diff --git a/MES.Service/Dto/service/CgsqDto.cs b/MES.Service/Dto/service/CgsqDto.cs new file mode 100644 index 0000000..58a72cf --- /dev/null +++ b/MES.Service/Dto/service/CgsqDto.cs @@ -0,0 +1,12 @@ +锘縰sing MES.Service.Modes; + +namespace MES.Service.Dto.service; + +public class CgsqDto +{ + public string? Type { get; set; } + public Cgsq? CgsqMain { get; set; } + + public List<CgsqDetail>? CgsqDT { get; set; } + +} \ No newline at end of file diff --git a/MES.Service/Modes/BOM/MesBomDetail1.cs b/MES.Service/Modes/BOM/MesBomDetail1.cs new file mode 100644 index 0000000..d1b19e1 --- /dev/null +++ b/MES.Service/Modes/BOM/MesBomDetail1.cs @@ -0,0 +1,184 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace MES.Service.Modes +{ + /// <summary> + /// + ///</summary> + [SugarTable("MES_BOM_DETAIL1")] + public class MesBomDetail1 + { + /// <summary> + /// + ///</summary> + [SugarColumn(ColumnName="ERPID", IsPrimaryKey = true)] + public decimal? Erpid { get; set; } + /// <summary> + /// + ///</summary> + [SugarColumn(ColumnName="ERPHID" )] + public decimal? Erphid { get; set; } + /// <summary> + /// 椤规 + ///</summary> + [SugarColumn(ColumnName="FREPLACEGROUP" )] + public string Freplacegroup { get; set; } + /// <summary> + /// 鍙樺姩鎹熻�楃巼锛堝 0.05 琛ㄧず 5%锛� + ///</summary> + [SugarColumn(ColumnName="FSCRAPRATE" )] + public decimal Fscraprate { get; set; } + /// <summary> + /// 浣嶇疆鍙� + ///</summary> + [SugarColumn(ColumnName="FPOSITIONNO" )] + public string Fpositionno { get; set; } + /// <summary> + /// 瀛愰」鐗╂枡缂栫爜 + ///</summary> + [SugarColumn(ColumnName="FMATERIALIDCHILD" )] + public string Fmaterialidchild { get; set; } + /// <summary> + /// 鐢ㄩ噺鍒嗗瓙 + ///</summary> + [SugarColumn(ColumnName="FNUMERATOR" )] + public long? Fnumerator { get; set; } + /// <summary> + /// 鐢ㄩ噺鍒嗘瘝 + ///</summary> + [SugarColumn(ColumnName="FDENOMINATOR" )] + public long? Fdenominator { get; set; } + /// <summary> + /// 瀛愰」鐗╂枡鍚嶇О + ///</summary> + [SugarColumn(ColumnName="FCHILDITEMNAME" )] + public string Fchilditemname { get; set; } + /// <summary> + /// 瀛愰」鐗╂枡灞炴�� + ///</summary> + [SugarColumn(ColumnName="FCHILDITEMPROPERTY" )] + public string Fchilditemproperty { get; set; } + /// <summary> + /// 渚涘簲绫诲瀷 + ///</summary> + [SugarColumn(ColumnName="FSUPPLYTYPE" )] + public string Fsupplytype { get; set; } + /// <summary> + /// 瀛愰」绫诲瀷 + ///</summary> + [SugarColumn(ColumnName="FMATERIALTYPE" )] + public string Fmaterialtype { get; set; } + /// <summary> + /// 鏍囧噯鐐规暟 + ///</summary> + [SugarColumn(ColumnName="F_UNW_BZDS_1" )] + public decimal? FUnwBzds1 { get; set; } + /// <summary> + /// 瀛愰」鍗曚綅 + ///</summary> + [SugarColumn(ColumnName="FCHILDUNITID" )] + public string Fchildunitid { get; set; } + /// <summary> + /// 鐢ㄩ噺绫诲瀷 + ///</summary> + [SugarColumn(ColumnName="FDOSAGETYPE" )] + public string Fdosagetype { get; set; } + /// <summary> + /// 瀛愰」 BOM 鐗堟湰 + ///</summary> + [SugarColumn(ColumnName="FBOMID" )] + public string Fbomid { get; set; } + /// <summary> + /// 澶囨敞 + ///</summary> + [SugarColumn(ColumnName="FMEMO" )] + public string Fmemo { get; set; } + /// <summary> + /// 榛樿鍙戞枡浠撳簱 + ///</summary> + [SugarColumn(ColumnName="FSTOCKID" )] + public string Fstockid { get; set; } + /// <summary> + /// 璺冲眰锛圷/N锛� + ///</summary> + [SugarColumn(ColumnName="FISSKIP" )] + public string Fisskip { get; set; } + /// <summary> + /// 瀛樺湪澶氫釜鏇夸唬鏂规锛圷/N锛� + ///</summary> + [SugarColumn(ColumnName="FISMULCSD" )] + public string Fismulcsd { get; set; } + /// <summary> + /// 鐢熸晥鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FEFFECTDATE" )] + public DateTime? Feffectdate { get; set; } + /// <summary> + /// 澶辨晥鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FEXPIREDATE" )] + public DateTime? Fexpiredate { get; set; } + /// <summary> + /// 鍙戞枡鏂瑰紡 + ///</summary> + [SugarColumn(ColumnName="FISSUETYPE" )] + public string Fissuetype { get; set; } + /// <summary> + /// 鍑�闇�姹傛瘮渚� + ///</summary> + [SugarColumn(ColumnName="FNETDEMANDRATE" )] + public decimal Fnetdemandrate { get; set; } + /// <summary> + /// 璐寸墖宸ヨ壓锛堝瓙椤癸級 + ///</summary> + [SugarColumn(ColumnName="F_UNW_TEXT_TPGY_Z" )] + public string FUnwTextTpgyZ { get; set; } + /// <summary> + /// 鍊掑啿鏃舵満 + ///</summary> + [SugarColumn(ColumnName="FBACKFLUSHTYPE" )] + public string Fbackflushtype { get; set; } + /// <summary> + /// 瓒呭彂鎺у埗鏂瑰紡 + ///</summary> + [SugarColumn(ColumnName="FOVERCONTROLMODE" )] + public string Fovercontrolmode { get; set; } + /// <summary> + /// 鏈�灏忓彂鏂欐壒閲� + ///</summary> + [SugarColumn(ColumnName="FBPMINISSUEQTY" )] + public decimal? Fbpminissueqty { get; set; } + /// <summary> + /// 鏄惁鑰冭檻鏈�灏忓彂鏂欙紙Y/N锛� + ///</summary> + [SugarColumn(ColumnName="FISMINISSUEQTY" )] + public string Fisminissueqty { get; set; } + /// <summary> + /// 鏄惁鍙戞崯鑰楋紙Y/N锛� + ///</summary> + [SugarColumn(ColumnName="FISGETSCRAP" )] + public string Fisgetscrap { get; set; } + /// <summary> + /// 宸ュ簭搴忓垪 + ///</summary> + [SugarColumn(ColumnName="FOPTQUEUE" )] + public string Foptqueue { get; set; } + /// <summary> + /// 宸ュ簭ID + ///</summary> + [SugarColumn(ColumnName="FOPERID" )] + public string Foperid { get; set; } + /// <summary> + /// 浣滀笟ID + ///</summary> + [SugarColumn(ColumnName="FPROCESSID" )] + public string Fprocessid { get; set; } + /// <summary> + /// 璁′环鐐规暟 + ///</summary> + [SugarColumn(ColumnName="F_UNW_JJDS_1" )] + public decimal? FUnwJjds1 { get; set; } + } +} diff --git a/MES.Service/Modes/BOM/MesBomDetail2.cs b/MES.Service/Modes/BOM/MesBomDetail2.cs new file mode 100644 index 0000000..5cfac8a --- /dev/null +++ b/MES.Service/Modes/BOM/MesBomDetail2.cs @@ -0,0 +1,69 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace MES.Service.Modes +{ + /// <summary> + /// + ///</summary> + [SugarTable("MES_BOM_DETAIL2")] + public class MesBomDetail2 + { + /// <summary> + /// + ///</summary> + [SugarColumn(ColumnName = "ERPID", IsPrimaryKey = true)] + public decimal? Erpid { get; set; } + /// <summary> + /// + ///</summary> + [SugarColumn(ColumnName="ERPHID" )] + public decimal? Erphid { get; set; } + /// <summary> + /// 闃舵鐢ㄩ噺-鍚鏁伴噺 + ///</summary> + [SugarColumn(ColumnName="FSTARTQTY" )] + public decimal? Fstartqty { get; set; } + /// <summary> + /// 闃舵鐢ㄩ噺-鎴鏁伴噺 + ///</summary> + [SugarColumn(ColumnName="FENDQTY" )] + public decimal? Fendqty { get; set; } + /// <summary> + /// 瀛愰」鍗曚綅 + ///</summary> + [SugarColumn(ColumnName="FUNITIDLOT" )] + public string Funitidlot { get; set; } + /// <summary> + /// 鍥哄畾鎹熻�� + ///</summary> + [SugarColumn(ColumnName="FFIXSCRAPQTYLOT" )] + public decimal? Ffixscrapqtylot { get; set; } + /// <summary> + /// 鍙樺姩鎹熻�楃巼 + ///</summary> + [SugarColumn(ColumnName="FSCRAPRATELOT" )] + public decimal Fscrapratelot { get; set; } + /// <summary> + /// 鐢ㄩ噺锛氬垎瀛� + ///</summary> + [SugarColumn(ColumnName="FNUMERATORLOT" )] + public long? Fnumeratorlot { get; set; } + /// <summary> + /// 鐢ㄩ噺锛氬垎姣� + ///</summary> + [SugarColumn(ColumnName="FDENOMINATORLOT" )] + public long? Fdenominatorlot { get; set; } + /// <summary> + /// 瀛愰」鐗╂枡缂栫爜 + ///</summary> + [SugarColumn(ColumnName="FMATERIALIDLOTBASED" )] + public string Fmaterialidlotbased { get; set; } + /// <summary> + /// 搴忓彿 + ///</summary> + [SugarColumn(ColumnName="LINE_NUMBER" )] + public decimal LineNumber { get; set; } + } +} diff --git a/MES.Service/Modes/BOM/MesBomMaster.cs b/MES.Service/Modes/BOM/MesBomMaster.cs new file mode 100644 index 0000000..0746e75 --- /dev/null +++ b/MES.Service/Modes/BOM/MesBomMaster.cs @@ -0,0 +1,159 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace MES.Service.Modes +{ + /// <summary> + /// + ///</summary> + [SugarTable("MES_BOM_MASTER")] + public class MesBomMaster + { + /// <summary> + /// + ///</summary> + [SugarColumn(ColumnName="ERPID", IsPrimaryKey = true)] + public decimal? Erpid { get; set; } + /// <summary> + /// 鍗曟嵁绫诲瀷 + ///</summary> + [SugarColumn(ColumnName="FBILLTYPE" )] + public string Fbilltype { get; set; } + /// <summary> + /// BOM鍒嗙被 + ///</summary> + [SugarColumn(ColumnName="FBOMCATEGORY" )] + public string Fbomcategory { get; set; } + /// <summary> + /// BOM鐢ㄩ�� + ///</summary> + [SugarColumn(ColumnName="FBOMUSE" )] + public string Fbomuse { get; set; } + /// <summary> + /// BOM鍒嗙粍 + ///</summary> + [SugarColumn(ColumnName="FGROUP" )] + public string Fgroup { get; set; } + /// <summary> + /// BOM缂栫爜 + ///</summary> + [SugarColumn(ColumnName="FNUMBER" )] + public string Fnumber { get; set; } + /// <summary> + /// BOM鐗堟湰鍙� + ///</summary> + [SugarColumn(ColumnName="F_UNW_BOM_BB" )] + public string FUnwBomBb { get; set; } + /// <summary> + /// 鐢熸晥鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="EFFECTIVE_DATE" )] + public DateTime? EffectiveDate { get; set; } + /// <summary> + /// 澶辨晥鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="EXPIRATION_DATE" )] + public DateTime? ExpirationDate { get; set; } + /// <summary> + /// 鐖堕」鐗╂枡缂栫爜 + ///</summary> + [SugarColumn(ColumnName="FMATERIALID" )] + public string Fmaterialid { get; set; } + /// <summary> + /// 鐖堕」鐗╂枡鍚嶇О + ///</summary> + [SugarColumn(ColumnName="FITEMNAME" )] + public string Fitemname { get; set; } + /// <summary> + /// 璁¢噺鍗曚綅 + ///</summary> + [SugarColumn(ColumnName="FBASEUNITID" )] + public string Fbaseunitid { get; set; } + /// <summary> + /// 鍒涘缓浜� + ///</summary> + [SugarColumn(ColumnName="FCREATORID" )] + public string Fcreatorid { get; set; } + /// <summary> + /// 鍒涘缓鏃堕棿 + ///</summary> + [SugarColumn(ColumnName="FCREATEDATE" )] + public DateTime? Fcreatedate { get; set; } + /// <summary> + /// 鐗╂枡灞炴�� + ///</summary> + [SugarColumn(ColumnName="FITEMPPROPERTY" )] + public string Fitempproperty { get; set; } + /// <summary> + /// 鎻忚堪 + ///</summary> + [SugarColumn(ColumnName="FDESCRIPTION" )] + public string Fdescription { get; set; } + /// <summary> + /// 淇敼浜� + ///</summary> + [SugarColumn(ColumnName="FMODIFIERID" )] + public string Fmodifierid { get; set; } + /// <summary> + /// 淇敼鏃堕棿 + ///</summary> + [SugarColumn(ColumnName="FMODIFYDATE" )] + public DateTime? Fmodifydate { get; set; } + /// <summary> + /// 瀹℃牳浜� + ///</summary> + [SugarColumn(ColumnName="FAPPROVERID" )] + public string Fapproverid { get; set; } + /// <summary> + /// 瀹℃牳鏃堕棿 + ///</summary> + [SugarColumn(ColumnName="FAPPROVEDATE" )] + public DateTime? Fapprovedate { get; set; } + /// <summary> + /// 绂佺敤鍘熷洜 + ///</summary> + [SugarColumn(ColumnName="FFORBIDRESON" )] + public string Fforbidreson { get; set; } + /// <summary> + /// 绂佺敤鐘舵�� + ///</summary> + [SugarColumn(ColumnName="FFORBIDSTATUS" )] + public string Fforbidstatus { get; set; } + /// <summary> + /// 绂佺敤浜� + ///</summary> + [SugarColumn(ColumnName="FFORBIDDERID" )] + public string Fforbidderid { get; set; } + /// <summary> + /// 绂佺敤鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FFORBIDDATE" )] + public DateTime? Fforbiddate { get; set; } + /// <summary> + /// 鍒涘缓缁勭粐 + ///</summary> + [SugarColumn(ColumnName="CREATE_ORGANIZATION" )] + public string CreateOrganization { get; set; } + /// <summary> + /// 浣跨敤缁勭粐 + ///</summary> + [SugarColumn(ColumnName="USING_ORGANIZATION" )] + public string UsingOrganization { get; set; } + /// <summary> + /// 宸ヨ壓璺嚎 + ///</summary> + [SugarColumn(ColumnName="ROUTING" )] + public string Routing { get; set; } + /// <summary> + /// 璐寸墖宸ヨ壓 + ///</summary> + [SugarColumn(ColumnName="F_UNW_TEXT_TPGY" )] + public string FUnwTextTpgy { get; set; } + /// <summary> + /// BOM鏇存柊绫诲瀷 + ///</summary> + [SugarColumn(ColumnName="BOM_UPDATE_TYPE" )] + public string BomUpdateType { get; set; } + } +} diff --git a/MES.Service/Modes/MesCgsq.cs b/MES.Service/Modes/MesCgsq.cs new file mode 100644 index 0000000..f778300 --- /dev/null +++ b/MES.Service/Modes/MesCgsq.cs @@ -0,0 +1,134 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace MES.Service.Modes +{ + /// <summary> + /// + ///</summary> + [SugarTable("MES_CGSQ")] + public class Cgsq + { + /// <summary> + /// + ///</summary> + [SugarColumn(ColumnName="ERPID", IsPrimaryKey = true)] + public decimal? ERPID { get; set; } + /// <summary> + /// 鍗曟嵁绫诲瀷 + ///</summary> + [SugarColumn(ColumnName="FBILLTYPEID" )] + public string Fbilltypeid { get; set; } + /// <summary> + /// 鍗曟嵁缂栧彿 + ///</summary> + [SugarColumn(ColumnName="FBILLNO" )] + public string Fbillno { get; set; } + /// <summary> + /// 鐢宠鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FAPPLICATIONDATE" )] + public DateTime? Fapplicationdate { get; set; } + /// <summary> + /// 鐢宠绫诲瀷 + ///</summary> + [SugarColumn(ColumnName="FREQUESTTYPE" )] + public string Frequesttype { get; set; } + /// <summary> + /// 娌诲叿妯″叿鍔犲伐鍙婇噰璐� + ///</summary> + [SugarColumn(ColumnName="F_UNW_COMBO_ZJMJ" )] + public string FUnwComboZjmj { get; set; } + /// <summary> + /// 鐢宠缁勭粐 + ///</summary> + [SugarColumn(ColumnName="APPLYING_ORGANIZATION_ID" )] + public string ApplyingOrganizationId { get; set; } + /// <summary> + /// 鐢宠閮ㄩ棬 + ///</summary> + [SugarColumn(ColumnName="FAPPLICATIONDEPTID" )] + public string Fapplicationdeptid { get; set; } + /// <summary> + /// 鐢宠浜� + ///</summary> + [SugarColumn(ColumnName="FAPPLICANTID" )] + public string Fapplicantid { get; set; } + /// <summary> + /// 甯佸埆 + ///</summary> + [SugarColumn(ColumnName="FCURRENCYID" )] + public string Fcurrencyid { get; set; } + /// <summary> + /// 楠屾敹鏂瑰紡 + ///</summary> + [SugarColumn(ColumnName="FACCTYPE" )] + public string Facctype { get; set; } + /// <summary> + /// 鍗曟嵁鐘舵�� + ///</summary> + [SugarColumn(ColumnName="FDOCUMENTSTATUS" )] + public string Fdocumentstatus { get; set; } + /// <summary> + /// 澶囨敞 + ///</summary> + [SugarColumn(ColumnName="FNOTE" )] + public string Fnote { get; set; } + /// <summary> + /// 鍒涘缓浜� + ///</summary> + [SugarColumn(ColumnName="FCREATORID" )] + public string Fcreatorid { get; set; } + /// <summary> + /// 鍒涘缓鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FCREATEDATE" )] + public DateTime? Fcreatedate { get; set; } + /// <summary> + /// 瀹℃牳浜� + ///</summary> + [SugarColumn(ColumnName="FAPPROVERID" )] + public string Fapproverid { get; set; } + /// <summary> + /// 瀹℃牳鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FAPPROVEDATE" )] + public DateTime? Fapprovedate { get; set; } + /// <summary> + /// 鍏抽棴鐘舵�� + ///</summary> + [SugarColumn(ColumnName="FCLOSESTATUS" )] + public string Fclosestatus { get; set; } + /// <summary> + /// 鍏抽棴鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FCLOSEDATE" )] + public DateTime? Fclosedate { get; set; } + /// <summary> + /// 鍏抽棴浜� + ///</summary> + [SugarColumn(ColumnName="FCLOSERID" )] + public string Fcloserid { get; set; } + /// <summary> + /// 鍏抽棴鍘熷洜 + ///</summary> + [SugarColumn(ColumnName="FCLOSEREASON" )] + public string Fclosereason { get; set; } + /// <summary> + /// 淇悗淇敼浜� + ///</summary> + [SugarColumn(ColumnName="FMODIFIERID" )] + public string Fmodifierid { get; set; } + /// <summary> + /// 淇悗淇敼鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FMODIFYDATE" )] + public DateTime? Fmodifydate { get; set; } + /// <summary> + /// 鎵嬪伐鍏抽棴 + ///</summary> + [SugarColumn(ColumnName="FMANUALCLOSE" )] + public string Fmanualclose { get; set; } + } +} diff --git a/MES.Service/Modes/MesCgsqDetail.cs b/MES.Service/Modes/MesCgsqDetail.cs new file mode 100644 index 0000000..1e78385 --- /dev/null +++ b/MES.Service/Modes/MesCgsqDetail.cs @@ -0,0 +1,154 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace MES.Service.Modes +{ + /// <summary> + /// + ///</summary> + [SugarTable("MES_CGSQ_DETAIL")] + public class CgsqDetail + { + /// <summary> + /// + ///</summary> + [SugarColumn(ColumnName="ERPID", IsPrimaryKey = true )] + public decimal? ERPID { get; set; } + /// <summary> + /// + ///</summary> + [SugarColumn(ColumnName="ERPHID")] + public decimal? ERPHID { get; set; } + /// <summary> + /// 搴忓彿 + ///</summary> + [SugarColumn(ColumnName="LINE_NUMBER" )] + public decimal LineNumber { get; set; } + /// <summary> + /// 閿�鍞鍗曞彿 + ///</summary> + [SugarColumn(ColumnName="F_UNW_TEXT_XSDDH" )] + public string FUnwTextXsddh { get; set; } + /// <summary> + /// 闇�姹傜粍缁� + ///</summary> + [SugarColumn(ColumnName="OWNER_ORGANIZATION_ID" )] + public string OwnerOrganizationId { get; set; } + /// <summary> + /// 鐗╂枡缂栫爜 + ///</summary> + [SugarColumn(ColumnName="FMATERIALID" )] + public string Fmaterialid { get; set; } + /// <summary> + /// 瑙勬牸鍨嬪彿 + ///</summary> + [SugarColumn(ColumnName="FMATERIALMODEL" )] + public string Fmaterialmodel { get; set; } + /// <summary> + /// 鐗╂枡鍚嶇О + ///</summary> + [SugarColumn(ColumnName="FMATERIALNAME" )] + public string Fmaterialname { get; set; } + /// <summary> + /// 鐢宠鍗曚綅 + ///</summary> + [SugarColumn(ColumnName="FUNITID" )] + public string Funitid { get; set; } + /// <summary> + /// 鐢宠鏁伴噺 + ///</summary> + [SugarColumn(ColumnName="FREQQTY" )] + public decimal? Freqqty { get; set; } + /// <summary> + /// 鎵瑰噯鏁伴噺 + ///</summary> + [SugarColumn(ColumnName="FAPPROVEQTY" )] + public decimal? Fapproveqty { get; set; } + /// <summary> + /// 鍒拌揣鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FARRIVALDATE" )] + public DateTime? Farrivaldate { get; set; } + /// <summary> + /// 寤鸿閲囪喘鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FSUGGESTPURDATE" )] + public DateTime? Fsuggestpurdate { get; set; } + /// <summary> + /// 閲囪喘缁勭粐 + ///</summary> + [SugarColumn(ColumnName="BUYER_ORGANIZATION_ID" )] + public string BuyerOrganizationId { get; set; } + /// <summary> + /// 寤鸿渚涘簲鍟� + ///</summary> + [SugarColumn(ColumnName="FSUGGESTSUPPLIERID" )] + public string Fsuggestsupplierid { get; set; } + /// <summary> + /// 鏀舵枡缁勭粐 + ///</summary> + [SugarColumn(ColumnName="WAREHOUSE_ID" )] + public string WarehouseId { get; set; } + /// <summary> + /// 搴撳瓨鍗曚綅 + ///</summary> + [SugarColumn(ColumnName="FREQSTOCKUNITID" )] + public string Freqstockunitid { get; set; } + /// <summary> + /// 搴撳瓨鍗曚綅鏁伴噺 + ///</summary> + [SugarColumn(ColumnName="FREQSTOCKQTY" )] + public decimal? Freqstockqty { get; set; } + /// <summary> + /// 璁′环鍗曚綅 + ///</summary> + [SugarColumn(ColumnName="FPRICEUNITID" )] + public string Fpriceunitid { get; set; } + /// <summary> + /// 璁′环鏁伴噺 + ///</summary> + [SugarColumn(ColumnName="FPRICEUNITQTY" )] + public decimal? Fpriceunitqty { get; set; } + /// <summary> + /// 鎻愬墠鏈� + ///</summary> + [SugarColumn(ColumnName="FLEADTIME" )] + public decimal Fleadtime { get; set; } + /// <summary> + /// 璁″垝璺熻釜鍙� + ///</summary> + [SugarColumn(ColumnName="FMTONO" )] + public string Fmtono { get; set; } + /// <summary> + /// 闇�姹傝窡韪彿 + ///</summary> + [SugarColumn(ColumnName="FREQTRACENO" )] + public string Freqtraceno { get; set; } + /// <summary> + /// 闇�姹傚崟鎹紪鍙� + ///</summary> + [SugarColumn(ColumnName="FDEMANDBILLNO" )] + public string Fdemandbillno { get; set; } + /// <summary> + /// 闇�姹傚崟鎹鍙� + ///</summary> + [SugarColumn(ColumnName="FDEMANDBILLENTRYSEQ" )] + public decimal Fdemandbillentryseq { get; set; } + /// <summary> + /// 涓氬姟缁堟 + ///</summary> + [SugarColumn(ColumnName="FMRPTERMINATESTATUS" )] + public string Fmrpterminatestatus { get; set; } + /// <summary> + /// 缁堟浜� + ///</summary> + [SugarColumn(ColumnName="FTERMINATERID" )] + public string Fterminaterid { get; set; } + /// <summary> + /// 缁堟鏃ユ湡 + ///</summary> + [SugarColumn(ColumnName="FTERMINATEDATE" )] + public DateTime? Fterminatedate { get; set; } + } +} diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.dll b/MES.Service/bin/Debug/net8.0/MES.Service.dll index fd23116..94c9463 100644 --- a/MES.Service/bin/Debug/net8.0/MES.Service.dll +++ b/MES.Service/bin/Debug/net8.0/MES.Service.dll Binary files differ diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.pdb b/MES.Service/bin/Debug/net8.0/MES.Service.pdb index ab8cbd0..ff6b8ea 100644 --- a/MES.Service/bin/Debug/net8.0/MES.Service.pdb +++ b/MES.Service/bin/Debug/net8.0/MES.Service.pdb Binary files differ diff --git a/MES.Service/bin/Release/net8.0/MES.Service.dll b/MES.Service/bin/Release/net8.0/MES.Service.dll index b8f7ee3..fa93127 100644 --- a/MES.Service/bin/Release/net8.0/MES.Service.dll +++ b/MES.Service/bin/Release/net8.0/MES.Service.dll Binary files differ diff --git a/MES.Service/bin/Release/net8.0/MES.Service.pdb b/MES.Service/bin/Release/net8.0/MES.Service.pdb index 0cca38b..b73575e 100644 --- a/MES.Service/bin/Release/net8.0/MES.Service.pdb +++ b/MES.Service/bin/Release/net8.0/MES.Service.pdb Binary files differ diff --git a/MES.Service/service/BOM/MesBomDetail1Manager.cs b/MES.Service/service/BOM/MesBomDetail1Manager.cs new file mode 100644 index 0000000..fccb3dd --- /dev/null +++ b/MES.Service/service/BOM/MesBomDetail1Manager.cs @@ -0,0 +1,78 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using MES.Service.DB; +using MES.Service.Modes; + +namespace MES.Service.service +{ +public class MesBomDetail1Manager : Repository<MesBomDetail1> +{ + + //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉� + + //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 MesBomDetail1Manager.cs + + + #region 鏁欏鏂规硶 + /// <summary> + /// 浠撳偍鏂规硶婊¤冻涓嶄簡澶嶆潅涓氬姟闇�姹傦紝涓氬姟浠g爜璇峰湪杩欓噷闈㈠畾涔夋柟娉� + /// </summary> + public void Study() + { + + /*********鏌ヨ*********/ + + var data1 = base.GetById(1);//鏍规嵁ID鏌ヨ + var data2 = base.GetList();//鏌ヨ鎵�鏈� + var data3 = base.GetList(it => 1 == 1); //鏍规嵁鏉′欢鏌ヨ + //var data4 = base.GetSingle(it => 1 == 1);//鏍规嵁鏉′欢鏌ヨ涓�鏉�,濡傛灉瓒呰繃涓�鏉′細鎶ラ敊 + + var p = new PageModel() { PageIndex = 1, PageSize = 2 };// 鍒嗛〉鏌ヨ + var data5 = base.GetPageList(it => 1 == 1, p); + Console.Write(p.TotalCount);//杩斿洖鎬绘暟 + + var data6 = base.GetPageList(it => 1 == 1, p, it => SqlFunc.GetRandom(), OrderByType.Asc);// 鍒嗛〉鏌ヨ鍔犳帓搴� + Console.Write(p.TotalCount);//杩斿洖鎬绘暟 + + List<IConditionalModel> conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴� + conModels.Add(new ConditionalModel() { FieldName= typeof(MesBomDetail1).GetProperties()[0].Name, ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1 + var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom(), OrderByType.Asc); + + base.AsQueryable().Where(x => 1 == 1).ToList();//鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘 + + + + /*********鎻掑叆*********/ + var insertData = new MesBomDetail1() { };//娴嬭瘯鍙傛暟 + var insertArray = new MesBomDetail1[] { insertData }; + base.Insert(insertData);//鎻掑叆 + base.InsertRange(insertArray);//鎵归噺鎻掑叆 + var id = base.InsertReturnIdentity(insertData);//鎻掑叆杩斿洖鑷鍒� + base.AsInsertable(insertData).ExecuteCommand();//鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆 + + + + /*********鏇存柊*********/ + var updateData = new MesBomDetail1() { };//娴嬭瘯鍙傛暟 + var updateArray = new MesBomDetail1[] { updateData };//娴嬭瘯鍙傛暟 + base.Update(updateData);//鏍规嵁瀹炰綋鏇存柊 + base.UpdateRange(updateArray);//鎵归噺鏇存柊 + //base.Update(it => new MesBomDetail1() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1 + base.AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏� + + + + /*********鍒犻櫎*********/ + var deldata = new MesBomDetail1() { };//娴嬭瘯鍙傛暟 + base.Delete(deldata);//鏍规嵁瀹炰綋鍒犻櫎 + base.DeleteById(1);//鏍规嵁涓婚敭鍒犻櫎 + base.DeleteById(new int[] { 1,2});//鏍规嵁涓婚敭鏁扮粍鍒犻櫎 + base.Delete(it=>1==2);//鏍规嵁鏉′欢鍒犻櫎 + base.AsDeleteable().Where(it=>1==2).ExecuteCommand();//杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣� + } + #endregion + + + } +} \ No newline at end of file diff --git a/MES.Service/service/BOM/MesBomDetail2Manager.cs b/MES.Service/service/BOM/MesBomDetail2Manager.cs new file mode 100644 index 0000000..5237771 --- /dev/null +++ b/MES.Service/service/BOM/MesBomDetail2Manager.cs @@ -0,0 +1,78 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using MES.Service.DB; +using MES.Service.Modes; + +namespace MES.Service.service +{ +public class MesBomDetail2Manager : Repository<MesBomDetail2> +{ + + //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉� + + //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 MesBomDetail2Manager.cs + + + #region 鏁欏鏂规硶 + /// <summary> + /// 浠撳偍鏂规硶婊¤冻涓嶄簡澶嶆潅涓氬姟闇�姹傦紝涓氬姟浠g爜璇峰湪杩欓噷闈㈠畾涔夋柟娉� + /// </summary> + public void Study() + { + + /*********鏌ヨ*********/ + + var data1 = base.GetById(1);//鏍规嵁ID鏌ヨ + var data2 = base.GetList();//鏌ヨ鎵�鏈� + var data3 = base.GetList(it => 1 == 1); //鏍规嵁鏉′欢鏌ヨ + //var data4 = base.GetSingle(it => 1 == 1);//鏍规嵁鏉′欢鏌ヨ涓�鏉�,濡傛灉瓒呰繃涓�鏉′細鎶ラ敊 + + var p = new PageModel() { PageIndex = 1, PageSize = 2 };// 鍒嗛〉鏌ヨ + var data5 = base.GetPageList(it => 1 == 1, p); + Console.Write(p.TotalCount);//杩斿洖鎬绘暟 + + var data6 = base.GetPageList(it => 1 == 1, p, it => SqlFunc.GetRandom(), OrderByType.Asc);// 鍒嗛〉鏌ヨ鍔犳帓搴� + Console.Write(p.TotalCount);//杩斿洖鎬绘暟 + + List<IConditionalModel> conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴� + conModels.Add(new ConditionalModel() { FieldName= typeof(MesBomDetail2).GetProperties()[0].Name, ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1 + var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom(), OrderByType.Asc); + + base.AsQueryable().Where(x => 1 == 1).ToList();//鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘 + + + + /*********鎻掑叆*********/ + var insertData = new MesBomDetail2() { };//娴嬭瘯鍙傛暟 + var insertArray = new MesBomDetail2[] { insertData }; + base.Insert(insertData);//鎻掑叆 + base.InsertRange(insertArray);//鎵归噺鎻掑叆 + var id = base.InsertReturnIdentity(insertData);//鎻掑叆杩斿洖鑷鍒� + base.AsInsertable(insertData).ExecuteCommand();//鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆 + + + + /*********鏇存柊*********/ + var updateData = new MesBomDetail2() { };//娴嬭瘯鍙傛暟 + var updateArray = new MesBomDetail2[] { updateData };//娴嬭瘯鍙傛暟 + base.Update(updateData);//鏍规嵁瀹炰綋鏇存柊 + base.UpdateRange(updateArray);//鎵归噺鏇存柊 + //base.Update(it => new MesBomDetail2() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1 + base.AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏� + + + + /*********鍒犻櫎*********/ + var deldata = new MesBomDetail2() { };//娴嬭瘯鍙傛暟 + base.Delete(deldata);//鏍规嵁瀹炰綋鍒犻櫎 + base.DeleteById(1);//鏍规嵁涓婚敭鍒犻櫎 + base.DeleteById(new int[] { 1,2});//鏍规嵁涓婚敭鏁扮粍鍒犻櫎 + base.Delete(it=>1==2);//鏍规嵁鏉′欢鍒犻櫎 + base.AsDeleteable().Where(it=>1==2).ExecuteCommand();//杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣� + } + #endregion + + + } +} \ No newline at end of file diff --git a/MES.Service/service/BOM/MesBomMasterManager.cs b/MES.Service/service/BOM/MesBomMasterManager.cs new file mode 100644 index 0000000..a6fc4f9 --- /dev/null +++ b/MES.Service/service/BOM/MesBomMasterManager.cs @@ -0,0 +1,260 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using MES.Service.DB; +using MES.Service.Modes; +using MES.Service.Dto.service; +using System.Globalization; + +namespace MES.Service.service +{ +public class MesBomMasterManager : Repository<MesBomMaster> +{ + private readonly MesBomDetail1Manager MesBomDetail1Manager = new(); + private readonly MesBomDetail2Manager MesBomDetail2Manager = new(); + + public bool Save(MesBomDto MesBom) + { + // var MesBomDto = MesBom.Main; + var mesMesBom = ConvertErpToMesBom(MesBom); + var mesMesBomDatas1 = ConvertErpToMesBomDetail1(MesBom); + var mesMesBomDatas2 = ConvertErpToMesBomDetail2(MesBom); + + return UseTransaction(db => + { + switch (MesBom.Type) + { + // case "2": + // return InsertData(db, mesSalesReturn, mesSalesReturnDatas, + // rohInErpRohIn.FBILLTYPE) + // ? 1 + // : 0; + case "3": + return UpdateData(db, mesMesBom, mesMesBomDatas1, mesMesBomDatas2) ? 1 : 0; + case "2": + case "4": + return SaveOrUpdateData(db, mesMesBom, mesMesBomDatas1, mesMesBomDatas2, MesBom.Type) + ? 1 + : 0; + default: + throw new NotImplementedException( + $"type娌℃湁{MesBom.Type}杩欎釜绫诲瀷"); + } + }) > 0; + } + + private bool UpdateData(SqlSugarScope db, MesBomMaster mesMesBom, + List<MesBomDetail1> mesMesBomDatas1, List<MesBomDetail2> mesMesBomDatas2) + { + var decimals1 = mesMesBomDatas1.Select(s => s.Erpid).ToArray(); + var decimals2 = mesMesBomDatas2.Select(s => s.Erpid).ToArray(); + var update = base.DeleteById(mesMesBom.Erpid); + var insertOrUpdate1 = db + .Deleteable<MesBomDetail1>().In(decimals1) + .ExecuteCommand() > 0; + var insertOrUpdate2 = db + .Deleteable<MesBomDetail2>().In(decimals2) + .ExecuteCommand() > 0; + + if (update && insertOrUpdate1 && insertOrUpdate2) return true; + throw new NotImplementedException("鏇存柊澶辫触"); + } + + // 鎻掑叆鎴栨洿鏂版暟鎹殑鏂规硶 + private bool SaveOrUpdateData(SqlSugarScope db, MesBomMaster mesMesBom, + List<MesBomDetail1> mesMesBomDatas1, List<MesBomDetail2> mesMesBomDatas2, string type) + { + if (mesMesBom.Erpid != null) base.DeleteById(mesMesBom.Erpid); + + if (mesMesBomDatas1.Count > 0) + db.Deleteable<MesBomDetail1>() + .Where(s => s.Erphid == mesMesBom.Erpid).ExecuteCommand(); + + if (mesMesBomDatas2.Count > 0) + db.Deleteable<MesBomDetail2>() + .Where(s => s.Erphid == mesMesBom.Erpid).ExecuteCommand(); + + //var orUpdate = base.Insert(mesMesBom); + //var baOrUpdate = MesBomDetail1Manager.InsertRange(mesMesBomDatas1); + //if (orUpdate && baOrUpdate) return true; + + var update_res = UseTransaction(db => + { + + db.Insertable(mesMesBom).ExecuteCommand(); + + for (int i = 0; i < mesMesBomDatas1.Count; i++) + { + var item = mesMesBomDatas1[i]; + //item.PID = id; + db.Insertable(item).IgnoreColumns(true).ExecuteCommand(); + } + + + for (int i = 0; i < mesMesBomDatas2.Count; i++) + { + var item = mesMesBomDatas2[i]; + //item.PID = id; + db.Insertable(item).IgnoreColumns(true).ExecuteCommand(); + } + + return 1; + }); + + if (update_res == 1) return true; + throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�"); + } + + // 鎵归噺淇濆瓨璁板綍鐨勬柟娉� + public bool SaveList(List<MesBomDto> MesBomOrder) + { + var result = MesBomOrder.Select(Save).ToList(); + return result.All(b => b); + } + + private MesBomMaster ConvertErpToMesBom( + MesBomDto erpDto) + { + DateTime parsedDate; + + var main = erpDto.Main; + var MesBomOrder = new MesBomMaster + { + Erpid = main.Erpid, + Fbilltype = main.Fbilltype, + Fbomcategory = main.Fbomcategory, + Fbomuse = main.Fbomuse, + Fgroup = main.Fgroup, + Fnumber = main.Fnumber, + FUnwBomBb = main.FUnwBomBb, + EffectiveDate = main.EffectiveDate, + ExpirationDate = main.ExpirationDate, + Fmaterialid = main.Fmaterialid, + Fitemname = main.Fitemname, + Fbaseunitid = main.Fbaseunitid, + Fcreatorid = main.Fcreatorid, + Fcreatedate = main.Fcreatedate, + Fitempproperty = main.Fitempproperty, + Fdescription = main.Fdescription, + Fmodifierid = main.Fmodifierid, + Fmodifydate = main.Fmodifydate, + Fapproverid = main.Fapproverid, + Fapprovedate = main.Fapprovedate, + Fforbidreson = main.Fforbidreson, + Fforbidstatus = main.Fforbidstatus, + Fforbidderid = main.Fforbidderid, + Fforbiddate = main.Fforbiddate, + CreateOrganization = main.CreateOrganization, + UsingOrganization = main.UsingOrganization, + Routing = main.Routing, + FUnwTextTpgy = main.FUnwTextTpgy, + BomUpdateType = main.BomUpdateType + }; + + // var single = base.GetSingle(it => it.Erpid == main.Erpid); + // if (single != null) MesBomOrder.Erpid = single.Erpid; + + return MesBomOrder; + } + + private List<MesBomDetail1> ConvertErpToMesBomDetail1( + MesBomDto erpDtoList) + + { + var MesBomOrderSubList = + new List<MesBomDetail1>(); + + + foreach (var erpDto in erpDtoList.DT1) + { + var MesBomOrderSub = new MesBomDetail1 + { + Erpid = erpDto.Erpid, + Erphid = erpDto.Erphid, + Freplacegroup = erpDto.Freplacegroup, + Fscraprate = erpDto.Fscraprate, + Fpositionno = erpDto.Fpositionno, + Fmaterialidchild = erpDto.Fmaterialidchild, + Fnumerator = erpDto.Fnumerator, + Fdenominator = erpDto.Fdenominator, + Fchilditemname = erpDto.Fchilditemname, + Fchilditemproperty = erpDto.Fchilditemproperty, + Fsupplytype = erpDto.Fsupplytype, + Fmaterialtype = erpDto.Fmaterialtype, + FUnwBzds1 = erpDto.FUnwBzds1, + Fchildunitid = erpDto.Fchildunitid, + Fdosagetype = erpDto.Fdosagetype, + Fbomid = erpDto.Fbomid, + Fmemo = erpDto.Fmemo, + Fstockid = erpDto.Fstockid, + Fisskip = erpDto.Fisskip, + Fismulcsd = erpDto.Fismulcsd, + Feffectdate = erpDto.Feffectdate, + Fexpiredate = erpDto.Fexpiredate, + Fissuetype = erpDto.Fissuetype, + Fnetdemandrate = erpDto.Fnetdemandrate, + FUnwTextTpgyZ = erpDto.FUnwTextTpgyZ, + Fbackflushtype = erpDto.Fbackflushtype, + Fovercontrolmode = erpDto.Fovercontrolmode, + Fbpminissueqty = erpDto.Fbpminissueqty, + Fisminissueqty = erpDto.Fisminissueqty, + Fisgetscrap = erpDto.Fisgetscrap, + Foptqueue = erpDto.Foptqueue, + Foperid = erpDto.Foperid, + Fprocessid = erpDto.Fprocessid, + FUnwJjds1 = erpDto.FUnwJjds1 + + }; + + var single = MesBomDetail1Manager.GetSingle(it => + it.Erpid == MesBomOrderSub.Erpid); + if (single != null) MesBomOrderSub.Erpid = single.Erpid; + + MesBomOrderSubList.Add(MesBomOrderSub); + } + + return MesBomOrderSubList; + } + + + + + private List<MesBomDetail2> ConvertErpToMesBomDetail2( + MesBomDto erpDtoList) + + { + var MesBomOrderSubList = + new List<MesBomDetail2>(); + + foreach (var erpDto in erpDtoList.DT2) + { + var MesBomOrderSub = new MesBomDetail2 + { + Erpid = erpDto.Erpid, + Erphid = erpDto.Erphid, + Fstartqty = erpDto.Fstartqty, + Fendqty = erpDto.Fendqty, + Funitidlot = erpDto.Funitidlot, + Ffixscrapqtylot = erpDto.Ffixscrapqtylot, + Fscrapratelot = erpDto.Fscrapratelot, + Fnumeratorlot = erpDto.Fnumeratorlot, + Fdenominatorlot = erpDto.Fdenominatorlot, + Fmaterialidlotbased = erpDto.Fmaterialidlotbased, + LineNumber = erpDto.LineNumber + + }; + + var single = MesBomDetail2Manager.GetSingle(it => + it.Erpid == MesBomOrderSub.Erpid); + if (single != null) MesBomOrderSub.Erpid = single.Erpid; + + MesBomOrderSubList.Add(MesBomOrderSub); + } + + return MesBomOrderSubList; + } + } + + + +} \ No newline at end of file diff --git a/MES.Service/service/MesCgsqDetailManager.cs b/MES.Service/service/MesCgsqDetailManager.cs new file mode 100644 index 0000000..dc39af2 --- /dev/null +++ b/MES.Service/service/MesCgsqDetailManager.cs @@ -0,0 +1,78 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using MES.Service.DB; +using MES.Service.Modes; + +namespace MES.Service.service +{ +public class CgsqDetailManager : Repository<CgsqDetail> +{ + + //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉� + + //杩欓噷闈㈠啓鐨勪唬鐮佷笉浼氱粰瑕嗙洊,濡傛灉瑕侀噸鏂扮敓鎴愯鍒犻櫎 CgsqDetailManager.cs + + + #region 鏁欏鏂规硶 + /// <summary> + /// 浠撳偍鏂规硶婊¤冻涓嶄簡澶嶆潅涓氬姟闇�姹傦紝涓氬姟浠g爜璇峰湪杩欓噷闈㈠畾涔夋柟娉� + /// </summary> + public void Study() + { + + /*********鏌ヨ*********/ + + var data1 = base.GetById(1);//鏍规嵁ID鏌ヨ + var data2 = base.GetList();//鏌ヨ鎵�鏈� + var data3 = base.GetList(it => 1 == 1); //鏍规嵁鏉′欢鏌ヨ + //var data4 = base.GetSingle(it => 1 == 1);//鏍规嵁鏉′欢鏌ヨ涓�鏉�,濡傛灉瓒呰繃涓�鏉′細鎶ラ敊 + + var p = new PageModel() { PageIndex = 1, PageSize = 2 };// 鍒嗛〉鏌ヨ + var data5 = base.GetPageList(it => 1 == 1, p); + Console.Write(p.TotalCount);//杩斿洖鎬绘暟 + + var data6 = base.GetPageList(it => 1 == 1, p, it => SqlFunc.GetRandom(), OrderByType.Asc);// 鍒嗛〉鏌ヨ鍔犳帓搴� + Console.Write(p.TotalCount);//杩斿洖鎬绘暟 + + List<IConditionalModel> conModels = new List<IConditionalModel>(); //缁勮鏉′欢鏌ヨ浣滀负鏉′欢瀹炵幇 鍒嗛〉鏌ヨ鍔犳帓搴� + conModels.Add(new ConditionalModel() { FieldName= typeof(CgsqDetail).GetProperties()[0].Name, ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1 + var data7 = base.GetPageList(conModels, p, it => SqlFunc.GetRandom(), OrderByType.Asc); + + base.AsQueryable().Where(x => 1 == 1).ToList();//鏀寔浜嗚浆鎹㈡垚queryable,鎴戜滑鍙互鐢╭ueryable瀹炵幇澶嶆潅鍔熻兘 + + + + /*********鎻掑叆*********/ + var insertData = new CgsqDetail() { };//娴嬭瘯鍙傛暟 + var insertArray = new CgsqDetail[] { insertData }; + base.Insert(insertData);//鎻掑叆 + base.InsertRange(insertArray);//鎵归噺鎻掑叆 + var id = base.InsertReturnIdentity(insertData);//鎻掑叆杩斿洖鑷鍒� + base.AsInsertable(insertData).ExecuteCommand();//鎴戜滑鍙互杞垚 Insertable瀹炵幇澶嶆潅鎻掑叆 + + + + /*********鏇存柊*********/ + var updateData = new CgsqDetail() { };//娴嬭瘯鍙傛暟 + var updateArray = new CgsqDetail[] { updateData };//娴嬭瘯鍙傛暟 + base.Update(updateData);//鏍规嵁瀹炰綋鏇存柊 + base.UpdateRange(updateArray);//鎵归噺鏇存柊 + //base.Update(it => new CgsqDetail() { ClassName = "a", CreateTime = DateTime.Now }, it => it.id==1);// 鍙洿鏂癈lassName鍒楀拰CreateTime鍒楋紝鍏跺畠鍒椾笉鏇存柊锛屾潯浠秈d=1 + base.AsUpdateable(updateData).ExecuteCommand(); //杞垚Updateable鍙互瀹炵幇澶嶆潅鐨勬彃鍏� + + + + /*********鍒犻櫎*********/ + var deldata = new CgsqDetail() { };//娴嬭瘯鍙傛暟 + base.Delete(deldata);//鏍规嵁瀹炰綋鍒犻櫎 + base.DeleteById(1);//鏍规嵁涓婚敭鍒犻櫎 + base.DeleteById(new int[] { 1,2});//鏍规嵁涓婚敭鏁扮粍鍒犻櫎 + base.Delete(it=>1==2);//鏍规嵁鏉′欢鍒犻櫎 + base.AsDeleteable().Where(it=>1==2).ExecuteCommand();//杞垚Deleteable瀹炵幇澶嶆潅鐨勬搷浣� + } + #endregion + + + } +} \ No newline at end of file diff --git a/MES.Service/service/MesCgsqManager.cs b/MES.Service/service/MesCgsqManager.cs new file mode 100644 index 0000000..3ab88dc --- /dev/null +++ b/MES.Service/service/MesCgsqManager.cs @@ -0,0 +1,218 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using MES.Service.DB; +using MES.Service.Modes; +using MES.Service.Dto.webApi; +using System.Globalization; +using MES.Service.Dto.service; + +namespace MES.Service.service +{ +public class CgsqManager : Repository<Cgsq> +{ + + private readonly CgsqDetailManager CgsqDetailManager = new(); + + public bool Save(CgsqDto Cgsq) + { + // var CgsqDto = Cgsq.CgsqMain; + var mesCgsq = ConvertErpToCgsq(Cgsq); + var mesCgsqDatas = ConvertErpToCgsqDetail(Cgsq); + + return UseTransaction(db => + { + switch (Cgsq.Type) + { + // case "2": + // return InsertData(db, mesSalesReturn, mesSalesReturnDatas, + // rohInErpRohIn.FBILLTYPE) + // ? 1 + // : 0; + case "3": + return UpdateData(db, mesCgsq, mesCgsqDatas) ? 1 : 0; + case "2": + case "4": + return SaveOrUpdateData(db, mesCgsq, mesCgsqDatas, Cgsq.Type) + ? 1 + : 0; + default: + throw new NotImplementedException( + $"type娌℃湁{Cgsq.Type}杩欎釜绫诲瀷"); + } + }) > 0; + } + + private bool UpdateData(SqlSugarScope db, Cgsq mesCgsq, + List<CgsqDetail> mesCgsqDatas) + { + var decimals = mesCgsqDatas.Select(s => s.ERPID).ToArray(); + var update = base.DeleteById(mesCgsq.ERPID); + var insertOrUpdate = db + .Deleteable<CgsqDetail>().In(decimals) + .ExecuteCommand() > 0; + + if (update && insertOrUpdate) return true; + throw new NotImplementedException("鏇存柊澶辫触"); + } + + // 鎻掑叆鎴栨洿鏂版暟鎹殑鏂规硶 + private bool SaveOrUpdateData(SqlSugarScope db, Cgsq mesCgsq, + List<CgsqDetail> mesCgsqDatas, string type) + { + if (mesCgsq.ERPID != null) base.DeleteById(mesCgsq.ERPID); + + if (mesCgsqDatas.Count > 0) + db.Deleteable<CgsqDetail>() + .Where(s => s.ERPHID == mesCgsq.ERPID).ExecuteCommand(); + + //var orUpdate = base.Insert(mesCgsq); + //var baOrUpdate = CgsqDetailManager.InsertRange(mesCgsqDatas); + //if (orUpdate && baOrUpdate) return true; + + var update_res = UseTransaction(db => + { + + db.Insertable(mesCgsq).ExecuteCommand(); + + for (int i = 0; i < mesCgsqDatas.Count; i++) + { + var item = mesCgsqDatas[i]; + //item.PID = id; + db.Insertable(item).IgnoreColumns(true).ExecuteCommand(); + } + + return 1; + }); + + if (update_res == 1) return true; + throw new NotImplementedException("鎻掑叆鎴栨洿鏂板け璐�"); + } + + // 鎵归噺淇濆瓨璁板綍鐨勬柟娉� + public bool SaveList(List<CgsqDto> CgsqOrder) + { + var result = CgsqOrder.Select(Save).ToList(); + return result.All(b => b); + } + + private Cgsq ConvertErpToCgsq( + CgsqDto erpDto) + { + DateTime parsedDate; + + // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss" + DateTime? ParseDateTime(string dateStr) + { + if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss", + CultureInfo.InvariantCulture, + DateTimeStyles.None, + out parsedDate)) + return parsedDate; + + return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull + } + var main = erpDto.CgsqMain; + var CgsqOrder = new Cgsq + { + ERPID=main.ERPID, + Fbilltypeid = main.Fbilltypeid, + Fbillno = main.Fbillno, + Fapplicationdate = main.Fapplicationdate, + Frequesttype = main.Frequesttype, + FUnwComboZjmj = main.FUnwComboZjmj, + ApplyingOrganizationId = main.ApplyingOrganizationId, + Fapplicationdeptid = main.Fapplicationdeptid, + Fapplicantid = main.Fapplicantid, + Fcurrencyid = main.Fcurrencyid, + Facctype = main.Facctype, + Fdocumentstatus = main.Fdocumentstatus, + Fnote = main.Fnote, + Fcreatorid = main.Fcreatorid, + Fcreatedate = main.Fcreatedate, + Fapproverid = main.Fapproverid, + Fapprovedate = main.Fapprovedate, + Fclosestatus = main.Fclosestatus, + Fclosedate = main.Fclosedate, + Fcloserid = main.Fcloserid, + Fclosereason = main.Fclosereason, + Fmodifierid = main.Fmodifierid, + Fmodifydate = main.Fmodifydate, + Fmanualclose = main.Fmanualclose + }; + + // var single = base.GetSingle(it => it.ERPID == main.ERPID); + // if (single != null) CgsqOrder.ERPID = single.ERPID; + + return CgsqOrder; + } + + private List<CgsqDetail> ConvertErpToCgsqDetail( + CgsqDto erpDtoList) + + { + var CgsqOrderSubList = + new List<CgsqDetail>(); + + DateTime parsedDate; + // 鏃堕棿鏍煎紡杞崲鍑芥暟锛孍RP鏃堕棿鏍煎紡涓� "yyyy-MM-dd HH:mm:ss" + DateTime? ParseDateTime(string dateStr) + { + if (DateTime.TryParseExact(dateStr, "yyyy-MM-dd HH:mm:ss", + CultureInfo.InvariantCulture, + DateTimeStyles.None, + out parsedDate)) + return parsedDate; + + return null; // 濡傛灉杞崲澶辫触锛岃繑鍥瀗ull + } + + + + foreach (var erpDto in erpDtoList.CgsqDT) + { + var CgsqOrderSub = new CgsqDetail + { + ERPID = erpDto.ERPID, + ERPHID = erpDto.ERPHID, + LineNumber = erpDto.LineNumber, + FUnwTextXsddh = erpDto.FUnwTextXsddh, + OwnerOrganizationId = erpDto.OwnerOrganizationId, + Fmaterialid = erpDto.Fmaterialid, + Fmaterialmodel = erpDto.Fmaterialmodel, + Fmaterialname = erpDto.Fmaterialname, + Funitid = erpDto.Funitid, + Freqqty = erpDto.Freqqty, + Fapproveqty = erpDto.Fapproveqty, + Farrivaldate = erpDto.Farrivaldate, + Fsuggestpurdate = erpDto.Fsuggestpurdate, + BuyerOrganizationId = erpDto.BuyerOrganizationId, + Fsuggestsupplierid = erpDto.Fsuggestsupplierid, + WarehouseId = erpDto.WarehouseId, + Freqstockunitid = erpDto.Freqstockunitid, + Freqstockqty = erpDto.Freqstockqty, + Fpriceunitid = erpDto.Fpriceunitid, + Fpriceunitqty = erpDto.Fpriceunitqty, + Fleadtime = erpDto.Fleadtime, + Fmtono = erpDto.Fmtono, + Freqtraceno = erpDto.Freqtraceno, + Fdemandbillno = erpDto.Fdemandbillno, + Fdemandbillentryseq = erpDto.Fdemandbillentryseq, + Fmrpterminatestatus = erpDto.Fmrpterminatestatus, + Fterminaterid = erpDto.Fterminaterid, + Fterminatedate = erpDto.Fterminatedate + + }; + + var single = CgsqDetailManager.GetSingle(it => + it.ERPID == CgsqOrderSub.ERPID); + if (single != null) CgsqOrderSub.ERPID = single.ERPID; + + CgsqOrderSubList.Add(CgsqOrderSub); + } + + return CgsqOrderSubList; + } + + } +} \ No newline at end of file diff --git a/MESApplication/Controllers/BOM/MesBomMasterController.cs b/MESApplication/Controllers/BOM/MesBomMasterController.cs new file mode 100644 index 0000000..0fb33a7 --- /dev/null +++ b/MESApplication/Controllers/BOM/MesBomMasterController.cs @@ -0,0 +1,268 @@ +锘縰sing Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Dynamic; +using MES.Service.Modes; +using MES.Service.service; +using MES.Service.util; +using MES.Service.Dto.service; +using Newtonsoft.Json; + +namespace MESApplication.Controllers +{ + [ApiController] + [Route("api/[controller]")] + public class MesBomMasterController : ControllerBase + { + + private MesBomMasterManager m = new MesBomMasterManager(); + + private readonly MessageCenterManager _manager = new(); + + private readonly string METHOD = "POST"; + + private readonly string TableName = "MesBomMaster"; + + private readonly string URL = "http://localhost:10054/api/MesBomMaster/"; + + /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/ + + [HttpPost("Save")] + public ResponseResult Save(MesBomDto MesBomOrder) + { + var entity = new MessageCenter(); + entity.TableName = TableName; + entity.Url = URL + "Save"; + entity.Method = METHOD; + entity.Data = JsonConvert.SerializeObject(MesBomOrder); + entity.Status = 1; + entity.CreateBy = "PL017"; + try + { + dynamic resultInfos = new ExpandoObject(); + var save = m.Save(MesBomOrder); + + resultInfos.tbBillList = save; + + entity.Result = 0; + if (save) entity.Result = 1; + + entity.DealWith = 1; + _manager.save(entity); + + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + entity.Result = 0; + + entity.DealWith = 0; + + entity.ResultData = ex.Message; + + _manager.save(entity); + + return ResponseResult.ResponseError(ex); + } + } + + [HttpPost("SaveList")] + public ResponseResult SaveList(List<MesBomDto> units) + { + var entity = new MessageCenter(); + entity.TableName = TableName; + entity.Url = URL + "SaveList"; + entity.Method = METHOD; + entity.Data = JsonConvert.SerializeObject(units); + entity.Status = 1; + entity.CreateBy = "PL017"; + try + { + dynamic resultInfos = new ExpandoObject(); + var save = m.SaveList(units); + resultInfos.tbBillList = save; + + entity.Result = 0; + if (save) entity.Result = 1; + + entity.DealWith = 1; + _manager.save(entity); + + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + entity.Result = 0; + + entity.DealWith = 0; + + entity.ResultData = ex.Message; + + _manager.save(entity); + + return ResponseResult.ResponseError(ex); + } + } + + + /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/ + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + /// <returns></returns> + [HttpPost("GetList")] + public ResponseResult GetList() + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.GetList(); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + + /// <summary> + /// 鏍规嵁涓婚敭鑾峰彇 + /// </summary> + /// <returns></returns> + [HttpPost("GetById")] + public ResponseResult GetById(int id) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.GetById(id); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + /// <summary> + /// 鏍规嵁涓婚敭鍒犻櫎 + /// </summary> + /// <returns></returns> + [HttpPost("DeleteByIds")] + public ResponseResult DeleteByIds([FromBody] object[] ids) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.DeleteByIds(ids); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + /// <summary> + /// 娣诲姞 + /// </summary> + /// <returns></returns> + [HttpPost("Insert")] + public ResponseResult Add([FromBody] MesBomMaster data) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.Insert(data); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + /// <summary> + /// 娣诲姞杩斿洖鑷 + /// </summary> + /// <returns></returns> + [HttpPost("InsertReturnIdentity")] + public ResponseResult InsertReturnIdentity([FromBody] MesBomMaster data) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.InsertReturnIdentity(data); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + /// <summary> + /// 淇敼 + /// </summary> + /// <returns></returns> + [HttpPost("Update")] + public ResponseResult Update([FromBody] MesBomMaster data) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.Update(data); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + } +} diff --git a/MESApplication/Controllers/MesCgsqController.cs b/MESApplication/Controllers/MesCgsqController.cs new file mode 100644 index 0000000..e747ba4 --- /dev/null +++ b/MESApplication/Controllers/MesCgsqController.cs @@ -0,0 +1,267 @@ +锘縰sing Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Dynamic; +using MES.Service.Modes; +using MES.Service.service; +using MES.Service.util; +using MES.Service.service.BasicData; +using MES.Service.Dto.webApi; +using Newtonsoft.Json; +using MES.Service.Dto.service; + +namespace MESApplication.Controllers +{ + [ApiController] + [Route("api/[controller]")] + public class CgsqController : ControllerBase + { + + private CgsqManager m = new CgsqManager(); + + private readonly MessageCenterManager _manager = new(); + + private readonly string METHOD = "POST"; + + private readonly string TableName = "MES_CGSQ"; + + private readonly string URL = "http://localhost:10054/api/CGSQ/"; + + /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/ + + [HttpPost("Save")] + public ResponseResult Save(CgsqDto CgsqOrder) + { + var entity = new MessageCenter(); + entity.TableName = TableName; + entity.Url = URL + "Save"; + entity.Method = METHOD; + entity.Data = JsonConvert.SerializeObject(CgsqOrder); + entity.Status = 1; + entity.CreateBy = "PL017"; + try + { + dynamic resultInfos = new ExpandoObject(); + var save = m.Save(CgsqOrder); + + resultInfos.tbBillList = save; + + entity.Result = 0; + if (save) entity.Result = 1; + + entity.DealWith = 1; + _manager.save(entity); + + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + entity.Result = 0; + + entity.DealWith = 0; + + entity.ResultData = ex.Message; + + _manager.save(entity); + + return ResponseResult.ResponseError(ex); + } + } + + [HttpPost("SaveList")] + public ResponseResult SaveList(List<CgsqDto> units) + { + var entity = new MessageCenter(); + entity.TableName = TableName; + entity.Url = URL + "SaveList"; + entity.Method = METHOD; + entity.Data = JsonConvert.SerializeObject(units); + entity.Status = 1; + entity.CreateBy = "PL017"; + try + { + dynamic resultInfos = new ExpandoObject(); + var save = m.SaveList(units); + resultInfos.tbBillList = save; + + entity.Result = 0; + if (save) entity.Result = 1; + + entity.DealWith = 1; + _manager.save(entity); + + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + entity.Result = 0; + + entity.DealWith = 0; + + entity.ResultData = ex.Message; + + _manager.save(entity); + + return ResponseResult.ResponseError(ex); + } + } + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + /// <returns></returns> + [HttpPost("GetList")] + public ResponseResult GetList() + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.GetList(); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + + /// <summary> + /// 鏍规嵁涓婚敭鑾峰彇 + /// </summary> + /// <returns></returns> + [HttpPost("GetById")] + public ResponseResult GetById(int id) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.GetById(id); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + /// <summary> + /// 鏍规嵁涓婚敭鍒犻櫎 + /// </summary> + /// <returns></returns> + [HttpPost("DeleteByIds")] + public ResponseResult DeleteByIds([FromBody] object[] ids) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.DeleteByIds(ids); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + /// <summary> + /// 娣诲姞 + /// </summary> + /// <returns></returns> + [HttpPost("Insert")] + public ResponseResult Add([FromBody] Cgsq data) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.Insert(data); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + /// <summary> + /// 娣诲姞杩斿洖鑷 + /// </summary> + /// <returns></returns> + [HttpPost("InsertReturnIdentity")] + public ResponseResult InsertReturnIdentity([FromBody] Cgsq data) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.InsertReturnIdentity(data); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + /// <summary> + /// 淇敼 + /// </summary> + /// <returns></returns> + [HttpPost("Update")] + public ResponseResult Update([FromBody] Cgsq data) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.Update(data); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + } +} diff --git a/MESApplication/MESApplication.csproj.user b/MESApplication/MESApplication.csproj.user index 735ae4a..dfe1ae2 100644 --- a/MESApplication/MESApplication.csproj.user +++ b/MESApplication/MESApplication.csproj.user @@ -5,6 +5,6 @@ </PropertyGroup> <PropertyGroup> <ActiveDebugProfile>IIS Express</ActiveDebugProfile> - <NameOfLastUsedPublishProfile>E:\Tool\SG\StandardPda\MESApplication\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> + <NameOfLastUsedPublishProfile>C:\Users\qewqer\Desktop\MES\SG\StandardPda\MESApplication\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> </PropertyGroup> </Project> \ No newline at end of file diff --git a/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user b/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user index f841210..438068c 100644 --- a/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/MESApplication/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -4,8 +4,8 @@ --> <Project> <PropertyGroup> - <_PublishTargetUrl>E:\Tool\SG\StandardPda\MESApplication\bin\Release\net8.0\publish\</_PublishTargetUrl> - <History>True|2025-04-21T04:10:43.8803364Z||;True|2025-04-21T08:27:37.2394337+08:00||;True|2025-04-12T12:05:38.9937329+08:00||;True|2025-04-11T16:26:37.5266569+08:00||;True|2025-03-20T17:58:14.2077893+08:00||;True|2025-03-15T00:59:39.9999573+08:00||;True|2025-03-07T15:42:21.8276566+08:00||;True|2025-02-27T10:43:45.2314689+08:00||;True|2025-02-21T16:39:35.2452658+08:00||;True|2025-01-13T15:35:48.6521519+08:00||;True|2025-01-08T16:15:03.8764923+08:00||;True|2024-12-30T15:00:59.8090011+08:00||;True|2024-12-06T16:11:01.2090466+08:00||;True|2024-11-26T09:07:33.5654976+08:00||;True|2024-11-20T15:49:27.1100474+08:00||;True|2024-11-16T18:18:42.4224922+08:00||;True|2024-11-15T09:32:12.6287354+08:00||;True|2024-11-13T10:19:32.3283327+08:00||;True|2024-09-06T14:40:56.3762241+08:00||;True|2024-08-20T17:12:00.2924570+08:00||;True|2024-08-17T10:57:05.6670396+08:00||;True|2024-08-17T10:56:46.8068041+08:00||;True|2024-08-16T14:09:17.0526491+08:00||;True|2024-08-15T08:40:32.8134665+08:00||;True|2024-08-14T10:00:27.7017207+08:00||;True|2024-08-14T08:54:44.8284031+08:00||;True|2024-08-07T10:32:10.3689256+08:00||;True|2024-08-05T15:45:03.0864530+08:00||;True|2024-08-03T09:59:13.7916520+08:00||;True|2024-07-31T17:27:28.1965929+08:00||;True|2024-07-31T15:27:34.7943845+08:00||;True|2024-07-30T15:04:50.5849235+08:00||;True|2024-07-30T14:09:06.2877325+08:00||;True|2024-07-29T16:11:30.4493940+08:00||;True|2024-07-23T14:30:34.4591002+08:00||;True|2024-07-22T14:17:39.8186158+08:00||;True|2024-04-10T12:55:31.3963752+08:00||;True|2024-04-08T13:59:25.5487203+08:00||;True|2024-04-06T09:30:09.5350539+08:00||;True|2024-04-06T08:46:05.8814658+08:00||;True|2024-04-05T14:06:52.0448024+08:00||;True|2024-04-05T12:47:46.0561601+08:00||;True|2024-02-26T08:46:22.0988887+08:00||;True|2024-02-24T19:17:13.6770376+08:00||;True|2024-02-24T14:32:37.4450337+08:00||;True|2024-02-23T10:22:06.5150173+08:00||;True|2024-02-22T13:19:56.6997993+08:00||;True|2024-02-22T10:53:17.7929585+08:00||;True|2024-02-21T17:08:06.5553444+08:00||;True|2024-02-19T16:24:37.4912012+08:00||;True|2024-02-02T10:07:23.2726075+08:00||;True|2024-02-02T08:36:49.2904460+08:00||;True|2024-01-29T17:44:43.6800769+08:00||;True|2024-01-23T09:47:26.7811926+08:00||;True|2024-01-18T16:23:30.3373836+08:00||;True|2024-01-17T14:22:04.2552286+08:00||;True|2024-01-16T16:54:42.2316892+08:00||;True|2024-01-16T16:37:23.8028858+08:00||;True|2024-01-16T09:25:24.4007775+08:00||;True|2024-01-15T10:18:57.3362616+08:00||;True|2024-01-15T10:07:14.2044763+08:00||;True|2024-01-10T14:03:36.4451130+08:00||;True|2024-01-09T16:45:32.9601815+08:00||;True|2024-01-06T14:16:34.2732220+08:00||;True|2024-01-06T14:11:45.2134717+08:00||;True|2024-01-06T11:30:58.9198887+08:00||;</History> + <_PublishTargetUrl>C:\Users\qewqer\Desktop\MES\SG\StandardPda\MESApplication\bin\Release\net8.0\publish\</_PublishTargetUrl> + <History>True|2025-05-07T01:38:52.4250140Z||;True|2025-04-21T12:10:43.8803364+08:00||;True|2025-04-21T08:27:37.2394337+08:00||;True|2025-04-12T12:05:38.9937329+08:00||;True|2025-04-11T16:26:37.5266569+08:00||;True|2025-03-20T17:58:14.2077893+08:00||;True|2025-03-15T00:59:39.9999573+08:00||;True|2025-03-07T15:42:21.8276566+08:00||;True|2025-02-27T10:43:45.2314689+08:00||;True|2025-02-21T16:39:35.2452658+08:00||;True|2025-01-13T15:35:48.6521519+08:00||;True|2025-01-08T16:15:03.8764923+08:00||;True|2024-12-30T15:00:59.8090011+08:00||;True|2024-12-06T16:11:01.2090466+08:00||;True|2024-11-26T09:07:33.5654976+08:00||;True|2024-11-20T15:49:27.1100474+08:00||;True|2024-11-16T18:18:42.4224922+08:00||;True|2024-11-15T09:32:12.6287354+08:00||;True|2024-11-13T10:19:32.3283327+08:00||;True|2024-09-06T14:40:56.3762241+08:00||;True|2024-08-20T17:12:00.2924570+08:00||;True|2024-08-17T10:57:05.6670396+08:00||;True|2024-08-17T10:56:46.8068041+08:00||;True|2024-08-16T14:09:17.0526491+08:00||;True|2024-08-15T08:40:32.8134665+08:00||;True|2024-08-14T10:00:27.7017207+08:00||;True|2024-08-14T08:54:44.8284031+08:00||;True|2024-08-07T10:32:10.3689256+08:00||;True|2024-08-05T15:45:03.0864530+08:00||;True|2024-08-03T09:59:13.7916520+08:00||;True|2024-07-31T17:27:28.1965929+08:00||;True|2024-07-31T15:27:34.7943845+08:00||;True|2024-07-30T15:04:50.5849235+08:00||;True|2024-07-30T14:09:06.2877325+08:00||;True|2024-07-29T16:11:30.4493940+08:00||;True|2024-07-23T14:30:34.4591002+08:00||;True|2024-07-22T14:17:39.8186158+08:00||;True|2024-04-10T12:55:31.3963752+08:00||;True|2024-04-08T13:59:25.5487203+08:00||;True|2024-04-06T09:30:09.5350539+08:00||;True|2024-04-06T08:46:05.8814658+08:00||;True|2024-04-05T14:06:52.0448024+08:00||;True|2024-04-05T12:47:46.0561601+08:00||;True|2024-02-26T08:46:22.0988887+08:00||;True|2024-02-24T19:17:13.6770376+08:00||;True|2024-02-24T14:32:37.4450337+08:00||;True|2024-02-23T10:22:06.5150173+08:00||;True|2024-02-22T13:19:56.6997993+08:00||;True|2024-02-22T10:53:17.7929585+08:00||;True|2024-02-21T17:08:06.5553444+08:00||;True|2024-02-19T16:24:37.4912012+08:00||;True|2024-02-02T10:07:23.2726075+08:00||;True|2024-02-02T08:36:49.2904460+08:00||;True|2024-01-29T17:44:43.6800769+08:00||;True|2024-01-23T09:47:26.7811926+08:00||;True|2024-01-18T16:23:30.3373836+08:00||;True|2024-01-17T14:22:04.2552286+08:00||;True|2024-01-16T16:54:42.2316892+08:00||;True|2024-01-16T16:37:23.8028858+08:00||;True|2024-01-16T09:25:24.4007775+08:00||;True|2024-01-15T10:18:57.3362616+08:00||;True|2024-01-15T10:07:14.2044763+08:00||;True|2024-01-10T14:03:36.4451130+08:00||;True|2024-01-09T16:45:32.9601815+08:00||;True|2024-01-06T14:16:34.2732220+08:00||;True|2024-01-06T14:11:45.2134717+08:00||;True|2024-01-06T11:30:58.9198887+08:00||;</History> <LastFailureDetails /> </PropertyGroup> </Project> \ No newline at end of file diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.dll b/MESApplication/bin/Debug/net8.0/MES.Service.dll index fd23116..94c9463 100644 --- a/MESApplication/bin/Debug/net8.0/MES.Service.dll +++ b/MESApplication/bin/Debug/net8.0/MES.Service.dll Binary files differ diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.pdb b/MESApplication/bin/Debug/net8.0/MES.Service.pdb index ab8cbd0..ff6b8ea 100644 --- a/MESApplication/bin/Debug/net8.0/MES.Service.pdb +++ b/MESApplication/bin/Debug/net8.0/MES.Service.pdb Binary files differ diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.dll b/MESApplication/bin/Debug/net8.0/MESApplication.dll index 823ab65..724f017 100644 --- a/MESApplication/bin/Debug/net8.0/MESApplication.dll +++ b/MESApplication/bin/Debug/net8.0/MESApplication.dll Binary files differ diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.exe b/MESApplication/bin/Debug/net8.0/MESApplication.exe index 15ae530..6b9b06f 100644 --- a/MESApplication/bin/Debug/net8.0/MESApplication.exe +++ b/MESApplication/bin/Debug/net8.0/MESApplication.exe Binary files differ diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.pdb b/MESApplication/bin/Debug/net8.0/MESApplication.pdb index 34f2888..4046c46 100644 --- a/MESApplication/bin/Debug/net8.0/MESApplication.pdb +++ b/MESApplication/bin/Debug/net8.0/MESApplication.pdb Binary files differ diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.xml b/MESApplication/bin/Debug/net8.0/MESApplication.xml index 2555364..c967b76 100644 --- a/MESApplication/bin/Debug/net8.0/MESApplication.xml +++ b/MESApplication/bin/Debug/net8.0/MESApplication.xml @@ -858,6 +858,78 @@ </summary> <returns></returns> </member> + <member name="M:MESApplication.Controllers.MesBomMasterController.GetList"> + <summary> + 鑾峰彇鎵�鏈� + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.MesBomMasterController.GetById(System.Int32)"> + <summary> + 鏍规嵁涓婚敭鑾峰彇 + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.MesBomMasterController.DeleteByIds(System.Object[])"> + <summary> + 鏍规嵁涓婚敭鍒犻櫎 + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.MesBomMasterController.Add(MES.Service.Modes.MesBomMaster)"> + <summary> + 娣诲姞 + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.MesBomMasterController.InsertReturnIdentity(MES.Service.Modes.MesBomMaster)"> + <summary> + 娣诲姞杩斿洖鑷 + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.MesBomMasterController.Update(MES.Service.Modes.MesBomMaster)"> + <summary> + 淇敼 + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.CgsqController.GetList"> + <summary> + 鑾峰彇鎵�鏈� + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.CgsqController.GetById(System.Int32)"> + <summary> + 鏍规嵁涓婚敭鑾峰彇 + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.CgsqController.DeleteByIds(System.Object[])"> + <summary> + 鏍规嵁涓婚敭鍒犻櫎 + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.CgsqController.Add(MES.Service.Modes.Cgsq)"> + <summary> + 娣诲姞 + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.CgsqController.InsertReturnIdentity(MES.Service.Modes.Cgsq)"> + <summary> + 娣诲姞杩斿洖鑷 + </summary> + <returns></returns> + </member> + <member name="M:MESApplication.Controllers.CgsqController.Update(MES.Service.Modes.Cgsq)"> + <summary> + 淇敼 + </summary> + <returns></returns> + </member> <member name="M:MESApplication.Controllers.MesRfPrnbarcodeController.GetList"> <summary> 鑾峰彇鎵�鏈� diff --git a/MESApplication/bin/Release/net8.0/MES.Service.dll b/MESApplication/bin/Release/net8.0/MES.Service.dll index b8f7ee3..fa93127 100644 --- a/MESApplication/bin/Release/net8.0/MES.Service.dll +++ b/MESApplication/bin/Release/net8.0/MES.Service.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MES.Service.pdb b/MESApplication/bin/Release/net8.0/MES.Service.pdb index 0cca38b..b73575e 100644 --- a/MESApplication/bin/Release/net8.0/MES.Service.pdb +++ b/MESApplication/bin/Release/net8.0/MES.Service.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MESApplication.deps.json b/MESApplication/bin/Release/net8.0/MESApplication.deps.json index 1130aca..a29ce54 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.deps.json +++ b/MESApplication/bin/Release/net8.0/MESApplication.deps.json @@ -1629,10 +1629,7 @@ "SqlSugarCore": "5.1.4.169" }, "runtime": { - "MES.Service.dll": { - "assemblyVersion": "1.0.0", - "fileVersion": "1.0.0.0" - } + "MES.Service.dll": {} } }, "Kingdee.CDP.WebApi.SDK/8.0.6.0": { diff --git a/MESApplication/bin/Release/net8.0/MESApplication.dll b/MESApplication/bin/Release/net8.0/MESApplication.dll index b1d701e..3d1239b 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.dll +++ b/MESApplication/bin/Release/net8.0/MESApplication.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MESApplication.exe b/MESApplication/bin/Release/net8.0/MESApplication.exe index 9fcb3c1..6b9b06f 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.exe +++ b/MESApplication/bin/Release/net8.0/MESApplication.exe Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MESApplication.pdb b/MESApplication/bin/Release/net8.0/MESApplication.pdb index 083733c..c056cab 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.pdb +++ b/MESApplication/bin/Release/net8.0/MESApplication.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll index b8f7ee3..fa93127 100644 --- a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll +++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb index 0cca38b..b73575e 100644 --- a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb +++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json b/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json index 3c82b88..2475459 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.deps.json @@ -1384,10 +1384,7 @@ "SqlSugarCore": "5.1.4.169" }, "runtime": { - "MES.Service.dll": { - "assemblyVersion": "1.0.0", - "fileVersion": "1.0.0.0" - } + "MES.Service.dll": {} } }, "Kingdee.CDP.WebApi.SDK/8.0.6.0": { diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll index b1d701e..3d1239b 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe index 9fcb3c1..6b9b06f 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb index 083733c..c056cab 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb Binary files differ -- Gitblit v1.9.3