From eb662f5360e6e2c3d6972f4921bc9bd526d81913 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 22 一月 2025 18:31:12 +0800
Subject: [PATCH] 111
---
StandardPda/MES.Service/Dto/webApi/ErpEmployeeInfo.cs | 19
StandardPda/MESApplication/Controllers/BasicData/MesStaffController.cs | 1
StandardPda/MES.Service/Dto/webApi/ErpItems.cs | 50 -
StandardPda/MES.Service/Modes/EmployeeItem.cs | 40 +
StandardPda/MESApplication/Controllers/BasicData/MesItemTypeController.cs | 3
StandardPda/MESApplication/Controllers/BasicData/MesPositionController.cs | 3
StandardPda/MES.Service/Modes/SysDepartment.cs | 2
StandardPda/MESApplication/Controllers/BasicData/OrganizeController.cs | 3
StandardPda/MESApplication/Controllers/BasicData/EmployeeInfoController.cs | 269 +++++++++
StandardPda/MES.Service/Modes/MesItems.cs | 459 ++++++++++-----
StandardPda/MES.Service/service/BasicData/MesItemsManager.cs | 344 +++-------
/dev/null | 162 -----
StandardPda/MESApplication/Controllers/BasicData/MesUnitController.cs | 3
StandardPda/MES.Service/service/BasicData/SysDepartmentManager.cs | 138 ----
StandardPda/MESApplication/Controllers/BasicData/SysDepartmentController.cs | 3
StandardPda/MESApplication/Controllers/BasicData/MesItemsController.cs | 28
StandardPda/MES.Service/Modes/EmployeeInfo.cs | 62 ++
StandardPda/MES.Service/service/BasicData/EmployeeInfoManager.cs | 110 +++
18 files changed, 947 insertions(+), 752 deletions(-)
diff --git a/StandardPda/MES.Service/Dto/webApi/ErpEmployeeInfo.cs b/StandardPda/MES.Service/Dto/webApi/ErpEmployeeInfo.cs
new file mode 100644
index 0000000..5af21e1
--- /dev/null
+++ b/StandardPda/MES.Service/Dto/webApi/ErpEmployeeInfo.cs
@@ -0,0 +1,19 @@
+锘縩amespace MES.Service.Dto.webApi;
+
+public class ErpEmployeeInfo
+{
+ public string Id { get; set; }
+ public string? Type { get; set; }
+ public string? fNumber { get; set; }
+ public string? fName { get; set; }
+ public string? fPostDeptid { get; set; }
+ public List<ErpEmployeeInfoDto>? OperatorTypes { get; set; }
+ public string? FForbidStatus { get; set; }
+ public string? FUseOrgId { get; set; }
+ public string? FDocumentStatus { get; set; }
+}
+
+public class ErpEmployeeInfoDto
+{
+ public string? OperatorType { get; set; }
+}
\ No newline at end of file
diff --git a/StandardPda/MES.Service/Dto/webApi/ErpItems.cs b/StandardPda/MES.Service/Dto/webApi/ErpItems.cs
index 8eb4e79..a1a8072 100644
--- a/StandardPda/MES.Service/Dto/webApi/ErpItems.cs
+++ b/StandardPda/MES.Service/Dto/webApi/ErpItems.cs
@@ -6,55 +6,37 @@
public string? Type { get; set; }
public string? FNumber { get; set; }
public string? FOldNumber { get; set; }
+ public string? CatalogNo { get; set; }
public string? FName { get; set; }
public string? FSpecification { get; set; }
public string? FBaseUnitId { get; set; }
public double? FSafeStock { get; set; }
public double? FMaxStock { get; set; }
public double? FMinStock { get; set; }
- public double? FMinPackCount { get; set; }
public string? FStockId { get; set; }
- /// <summary>
- /// 鎺ュ彛瀛楁璋冩暣锛氬凡鍒犻櫎鎴栦笉鍐嶄娇鐢≒PBOM00019124瀛楁銆�
- /// </summary>
- /// <remarks>
- /// 淇敼浜猴細姹犲崡楠�
- /// 淇敼鏃ユ湡锛�2024-12-25
- /// 璇存槑锛氭瀛楁宸茶鍒犻櫎鎴栦笉鍐嶄娇鐢ㄤ簬褰撳墠鎺ュ彛涓��
- /// 淇濈暀琚敞閲婄殑浠g爜浠ヨ褰曚慨鏀瑰巻鍙层��
- /// </remarks>
- // public string? PPBOM00019124 { get; set; }
public string? FMaterialGroup { get; set; }
-
- public string? FDescription { get; set; }
- public decimal? FFinishReceiptOverRate { get; set; }
- public decimal? FFinishReceiptShortRate { get; set; }
- public string? FIssueType { get; set; }
public int? FIsBatchManage { get; set; }
- public string? FPurchaserId { get; set; }
- public string? FDefaultVendor { get; set; }
public string? FPurchaseUnitId { get; set; }
public string? FStoreUnitID { get; set; }
public string? FSaleUnitId { get; set; }
public string? FDocumentStatus { get; set; }
public string? FForbidStatus { get; set; }
public string? FErpClsID { get; set; }
- public string? FMfgPolicyId { get; set; }
- public string? FWorkShopId { get; set; }
- public string? FBOMUnitId { get; set; }
public string? FPRODUCEUNITID { get; set; }
- public string? FIsKitting { get; set; }
- public string? FIsCoby { get; set; }
- public string? FOverControlMode { get; set; }
- public string? FSUBCONUNITID { get; set; }
- public string? FCreateOrgId { get; set; }
- public string? FUseOrgId { get; set; }
- public string? FLOSSPERCENT { get; set; }
- public string? FMnemonicCode { get; set; }
-
- public string? FExpPeriod { get; set; }
-
- //public string? FColor { get; set; }
- public string? F_MJBH { get; set; }
+ public List<ErpDetail>? FUseOrgId { get; set; }
+ public string? MaterialOutUomid { get; set; }
+ public string? CreateBy { get; set; }
+ public string? PubDescSeg38 { get; set; }
+ public string? Description { get; set; }
+ public string? PrivateDescSeg4 { get; set; }
+ public string? PrivateDescSeg9 { get; set; }
+ public string? IsDualQuantity { get; set; }
+ public string? IsDualUom { get; set; }
+ public string? IsMultyUom { get; set; }
+ public string? IsVarRatio { get; set; }
+ public string? ConverRatioRule { get; set; }
+ public string? PrivateDescSeg11 { get; set; }
+ public string? PrivateDescSeg7 { get; set; }
+ public string? PrivateDescSeg2 { get; set; }
}
\ No newline at end of file
diff --git a/StandardPda/MES.Service/Modes/EmployeeInfo.cs b/StandardPda/MES.Service/Modes/EmployeeInfo.cs
new file mode 100644
index 0000000..a1f8b4b
--- /dev/null
+++ b/StandardPda/MES.Service/Modes/EmployeeInfo.cs
@@ -0,0 +1,62 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+
+namespace MES.Service.Modes
+{
+ /// <summary>
+ ///
+ ///</summary>
+ [SugarTable("EMPLOYEE_INFO")]
+ public class EmployeeInfo
+ {
+ /// <summary>
+ /// SEQ_EMP
+ ///</summary>
+ [SugarColumn(ColumnName = "ID", IsPrimaryKey = true)]
+ public decimal Id { get; set; }
+
+ /// <summary>
+ /// 鑱屽伐宸ュ彿
+ ///</summary>
+ [SugarColumn(ColumnName = "EMPLOYEE_NO")]
+ public string? EmployeeNo { get; set; }
+
+ /// <summary>
+ /// 鑱屽伐濮撳悕
+ ///</summary>
+ [SugarColumn(ColumnName = "EMPLOYEE_NAME")]
+ public string? EmployeeName { get; set; }
+
+ /// <summary>
+ /// 閮ㄩ棬缂栫爜
+ ///</summary>
+ [SugarColumn(ColumnName = "DEPARTMENT_CODE")]
+ public string? DepartmentCode { get; set; }
+
+ /// <summary>
+ /// 涓氬姟鍛樼被鍨�
+ ///</summary>
+ [SugarColumn(ColumnName = "SALESMAN_TYPE")]
+ public string? SalesmanType { get; set; }
+
+ /// <summary>
+ /// 鍗曟嵁鐘舵��
+ ///</summary>
+ [SugarColumn(ColumnName = "DOCUMENT_STATUS")]
+ public string? DocumentStatus { get; set; }
+
+ /// <summary>
+ /// 鏄惁绂佺敤
+ ///</summary>
+ [SugarColumn(ColumnName = "IS_DISABLED")]
+ public string? IsDisabled { get; set; }
+
+ /// <summary>
+ /// 缁勭粐
+ ///</summary>
+ [SugarColumn(ColumnName = "ORGANIZATION")]
+ public string? Organization { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/StandardPda/MES.Service/Modes/EmployeeItem.cs b/StandardPda/MES.Service/Modes/EmployeeItem.cs
new file mode 100644
index 0000000..b91263e
--- /dev/null
+++ b/StandardPda/MES.Service/Modes/EmployeeItem.cs
@@ -0,0 +1,40 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using SqlSugar;
+
+namespace MES.Service.Modes
+{
+ /// <summary>
+ ///
+ ///</summary>
+ [SugarTable("EMPLOYEE_ITEM")]
+ public class EmployeeItem
+ {
+ /// <summary>
+ ///
+ ///</summary>
+ [SugarColumn(ColumnName = "ID",
+ OracleSequenceName = "SEQ_EMP",
+ IsPrimaryKey = true)]
+ public decimal Id { get; set; }
+
+ /// <summary>
+ /// info鐨刬d
+ ///</summary>
+ [SugarColumn(ColumnName = "EID")]
+ public decimal? Eid { get; set; }
+
+ /// <summary>
+ /// 0=閲囪喘涓氬姟鍛�, 1=閿�鍞笟鍔″憳, 2=搴撶鍛�, 3=鎷h揣鍛�, 4=鐞嗚揣鍛�, 5=璁捐鍛�, 6=璁″垝鍛�, 7=鐢熶骇绠$悊鍛�, 8=缁熻鍛�, 9=璐ㄦ鍛�, 10=鎴愭湰浼氳, 11=鏀舵鍛�, 12=璧勪骇绠$悊鍛�, 13=鍏朵粬, 14=璁惧绠$悊鍛�
+ ///</summary>
+ [SugarColumn(ColumnName = "E_TYPE")]
+ public string? EType { get; set; }
+
+ /// <summary>
+ /// 鏃堕棿
+ ///</summary>
+ [SugarColumn(ColumnName = "CREATE_DATE")]
+ public string? CreateDate { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/StandardPda/MES.Service/Modes/MesItems.cs b/StandardPda/MES.Service/Modes/MesItems.cs
index d830cb6..b6a4f3e 100644
--- a/StandardPda/MES.Service/Modes/MesItems.cs
+++ b/StandardPda/MES.Service/Modes/MesItems.cs
@@ -9,393 +9,518 @@
public class MesItems
{
/// <summary>
- /// 鐗╂枡ID
- /// </summary>
+ /// 鐗╂枡ID
+ ///</summary>
[SugarColumn(ColumnName = "ID", IsPrimaryKey = true)]
public decimal Id { get; set; }
/// <summary>
- /// 宸ュ巶
- /// </summary>
+ /// 宸ュ巶
+ ///</summary>
[SugarColumn(ColumnName = "FACTORY")]
public string? Factory { get; set; }
/// <summary>
- /// 鍏徃缂栧彿
- /// </summary>
+ /// 鍏徃缂栧彿
+ ///</summary>
[SugarColumn(ColumnName = "COMPANY")]
public string? Company { get; set; }
/// <summary>
- /// 鐗╂枡缂栫爜 = ERP鐗╂枡缂栧彿||棰滆壊缂栧彿
- /// </summary>
+ /// 鐗╂枡缂栫爜
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_NO")]
public string? ItemNo { get; set; }
/// <summary>
- /// 鐗╂枡鍚嶇О
- /// </summary>
+ /// 鐗╂枡鍚嶇О
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_NAME")]
public string? ItemName { get; set; }
/// <summary>
- /// 鐗╂枡绠�绉�
- /// </summary>
+ /// 鐗╂枡绠�绉�
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_SNAME")]
public string? ItemSname { get; set; }
/// <summary>
- /// 瑙勬牸鍨嬪彿
- /// </summary>
+ /// 瑙勬牸鍨嬪彿
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_MODEL")]
public string? ItemModel { get; set; }
/// <summary>
- /// 鐗╂枡鎻忚堪
- /// </summary>
+ /// 鐗╂枡鎻忚堪
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_DESCRIPTION")]
public string? ItemDescription { get; set; }
/// <summary>
- /// 鐗╂枡鍗曚綅
- /// </summary>
+ /// 鐗╂枡鍗曚綅
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_UNIT")]
public string? ItemUnit { get; set; }
/// <summary>
- /// 鐗╂枡绫诲瀷
- /// </summary>
+ /// 鐗╂枡绫诲瀷
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_TYPE")]
public string? ItemType { get; set; }
/// <summary>
- /// 浜у搧鐗堟湰
- /// </summary>
+ /// 浜у搧鐗堟湰
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_VERSION")]
public string? ItemVersion { get; set; }
/// <summary>
- /// 瀹㈡埛缂栧彿
- /// </summary>
+ /// 瀹㈡埛缂栧彿
+ ///</summary>
[SugarColumn(ColumnName = "CUST_NO")]
public string? CustNo { get; set; }
/// <summary>
- /// 鍒涘缓浜�
- /// </summary>
+ /// 鍒涘缓浜�
+ ///</summary>
[SugarColumn(ColumnName = "CREATE_BY")]
public string? CreateBy { get; set; }
/// <summary>
- /// 鍒涘缓鏃堕棿
- /// </summary>
+ /// 鍒涘缓鏃堕棿
+ ///</summary>
[SugarColumn(ColumnName = "CREATE_DATE")]
public DateTime? CreateDate { get; set; }
/// <summary>
- /// 鏈�鍚庢洿鏂颁汉
- /// </summary>
+ /// 鏈�鍚庢洿鏂颁汉
+ ///</summary>
[SugarColumn(ColumnName = "LASTUPDATE_BY")]
public string? LastupdateBy { get; set; }
/// <summary>
- /// 鏈�鍚庢洿鏂版椂闂�
- /// </summary>
+ /// 鏈�鍚庢洿鏂版椂闂�
+ ///</summary>
[SugarColumn(ColumnName = "LASTUPDATE_DATE")]
public DateTime? LastupdateDate { get; set; }
/// <summary>
- /// 鏈�浣庡簱瀛�
- /// </summary>
+ /// 鏈�浣庡簱瀛�
+ ///</summary>
[SugarColumn(ColumnName = "LOWLIMIT")]
public double? Lowlimit { get; set; }
/// <summary>
- /// 鏈�澶у簱瀛�
- /// </summary>
+ /// 瀹夊叏搴撳瓨閲�
+ ///</summary>
+ [SugarColumn(ColumnName = "Safe_Stock")]
+ public double? SafeStock { get; set; }
+
+ /// <summary>
+ /// 鏈�澶у簱瀛�
+ ///</summary>
[SugarColumn(ColumnName = "HIGHLIMIT")]
public double? Highlimit { get; set; }
/// <summary>
- /// 鏈�灏忓寘瑁呮暟
- /// </summary>
+ /// 鏈�灏忓寘瑁呮暟
+ ///</summary>
[SugarColumn(ColumnName = "PRD_PACK")]
public double? PrdPack { get; set; }
/// <summary>
- /// 璁㈠崟鍗曚綅
- /// </summary>
+ /// 璁㈠崟鍗曚綅
+ ///</summary>
[SugarColumn(ColumnName = "ORDERUNIT")]
public string? Orderunit { get; set; }
/// <summary>
- /// 閿�鍞崟浣�
- /// </summary>
+ /// 閿�鍞崟浣�
+ ///</summary>
[SugarColumn(ColumnName = "SALEUNIT")]
public string? Saleunit { get; set; }
/// <summary>
- /// 搴撴埧鍗曚綅
- /// </summary>
+ /// 搴撴埧鍗曚綅
+ ///</summary>
[SugarColumn(ColumnName = "STOREUNIT")]
public string? Storeunit { get; set; }
-
+
/// <summary>
- /// 鐢熶骇鍗曚綅
- /// </summary>
- [SugarColumn(ColumnName = "PRODUCTUNIT")]
- public string? Productunit { get; set; }
-
- /// <summary>
- /// 鐗╂枡ID
- /// </summary>
+ /// 鐗╂枡ID
+ ///</summary>
[SugarColumn(ColumnName = "E_ITEM_ID")]
public decimal? EItemId { get; set; }
/// <summary>
- /// ERP鏂欏彿
- /// </summary>
+ /// ERP鏂欏彿
+ ///</summary>
[SugarColumn(ColumnName = "ERP_ITEM_NO")]
public string? ErpItemNo { get; set; }
/// <summary>
- /// 榛樿浠撳簱
- /// </summary>
+ /// 榛樿浠撳簱
+ ///</summary>
[SugarColumn(ColumnName = "DEPOT_CODE")]
public string? DepotCode { get; set; }
/// <summary>
- /// 鐗╂枡鍒嗙被缂栧彿
- /// </summary>
+ /// 鐗╂枡鍒嗙被缂栧彿
+ ///</summary>
[SugarColumn(ColumnName = "PPBOM00019124")]
public string? Ppbom00019124 { get; set; }
/// <summary>
- /// 鐗╂枡鍒嗙粍
- /// </summary>
+ /// 鐗╂枡鍒嗙粍
+ ///</summary>
[SugarColumn(ColumnName = "REMARKS")]
public string? Remarks { get; set; }
/// <summary>
- /// 閲囪喘鍛�
- /// </summary>
+ /// 閲囪喘鍛�
+ ///</summary>
[SugarColumn(ColumnName = "FPURCHASERID")]
public string? Fpurchaserid { get; set; }
/// <summary>
- /// 绂佺敤鐘舵��
- /// </summary>
+ /// 绂佺敤鐘舵��
+ ///</summary>
[SugarColumn(ColumnName = "FFORBIDSTATUS")]
public string? Fforbidstatus { get; set; }
/// <summary>
- /// 鐗╂枡鍒嗙粍
- /// </summary>
+ /// 鐗╂枡鍒嗙粍
+ ///</summary>
[SugarColumn(ColumnName = "FMATERIALGROUP")]
public string? Fmaterialgroup { get; set; }
/// <summary>
- /// 瀹屽伐瓒呮敹姣斾緥
- /// </summary>
+ /// 瀹屽伐瓒呮敹姣斾緥
+ ///</summary>
[SugarColumn(ColumnName = "FFINISHRECEIPTOVERRATE")]
public decimal? Ffinishreceiptoverrate { get; set; }
/// <summary>
- /// 鍙戞枡鏂瑰紡
- /// </summary>
+ /// 鍙戞枡鏂瑰紡
+ ///</summary>
[SugarColumn(ColumnName = "FISSUETYPE")]
public string? Fissuetype { get; set; }
/// <summary>
- /// 鍚敤鎵瑰彿绠$悊
- /// </summary>
+ /// 鍚敤鎵瑰彿绠$悊
+ ///</summary>
[SugarColumn(ColumnName = "FISBATCHMANAGE")]
public decimal? Fisbatchmanage { get; set; }
/// <summary>
- /// 閲囪喘鍗曚綅
- /// </summary>
+ /// 閲囪喘鍗曚綅
+ ///</summary>
[SugarColumn(ColumnName = "FPURCHASEUNITID")]
public string? Fpurchaseunitid { get; set; }
/// <summary>
- /// 鍒涘缓缁勭粐
- /// </summary>
+ /// 鍒涘缓缁勭粐
+ ///</summary>
[SugarColumn(ColumnName = "CREATE_ORG")]
- public decimal CreateOrg { get; set; }
+ public decimal? CreateOrg { get; set; }
/// <summary>
- /// 浣跨敤缁勭粐
- /// </summary>
+ /// 浣跨敤缁勭粐
+ ///</summary>
[SugarColumn(ColumnName = "USE_ORG")]
- public decimal UseOrg { get; set; }
+ public string? UseOrg { get; set; }
/// <summary>
- /// 鎹熻�楃巼
- /// </summary>
+ /// 鎹熻�楃巼
+ ///</summary>
[SugarColumn(ColumnName = "LOSS_PERCENT")]
public string? LossPercent { get; set; }
/// <summary>
- /// 鍔╄鐮�
- /// </summary>
+ /// 鍔╄鐮�
+ ///</summary>
[SugarColumn(ColumnName = "MNEMONIC_CODE")]
public string? MnemonicCode { get; set; }
/// <summary>
- /// 淇濊川鏈�
- /// </summary>
+ /// 淇濊川鏈�
+ ///</summary>
[SugarColumn(ColumnName = "EXP_PERIOD")]
public string? ExpPeriod { get; set; }
/// <summary>
- /// 鐢熶骇杞﹂棿
- /// </summary>
+ /// 鐢熶骇杞﹂棿
+ ///</summary>
[SugarColumn(ColumnName = "PRODUCTION_WORKSHOP")]
public string? ProductionWorkshop { get; set; }
/// <summary>
- /// 鐗╂枡灞炴��
- /// </summary>
+ /// 鐗╂枡灞炴�� 0=妯″瀷锛�1=鎸夎鍗曟嫞璐э紝2=鎸夎鍗曡閰嶏紝3=鍙�夌被锛�4=濮斿鍔犲伐浠讹紝
+ /// 5=宸ュ簭濮斿浠讹紝6=铏氭嫙锛�7=璁″垝锛�8=绯诲垪锛�9=閲囪喘浠讹紝10=鍒堕�犱欢锛�
+ /// 11=鏈�缁堣閰嶄欢锛�12=濂椾欢锛�13=宸ヨ壓锛�14=浣庡�兼槗鑰楀搧锛�15=鍟嗗搧锛�
+ /// 16=鏉傞」鏂欏搧锛�17=鏈嶅姟锛�18=璧勪骇锛�19=澶囦欢锛�20=閰嶆柟锛�
+ /// 21=閲嶅锛�22=璐圭敤鎬ф枡鍝�
+ ///</summary>
[SugarColumn(ColumnName = "MATERIAL_PROPERTI")]
public string? MaterialProperti { get; set; }
/// <summary>
- /// 鐢熶骇鍗曚綅
- /// </summary>
+ /// 鐢熶骇鍗曚綅
+ ///</summary>
[SugarColumn(ColumnName = "PRODUCE_UNIT")]
public string? ProduceUnit { get; set; }
/// <summary>
- /// 濮斿鍗曚綅
- /// </summary>
+ /// 濮斿鍗曚綅
+ ///</summary>
[SugarColumn(ColumnName = "SUBCON_UNIT")]
public string? SubconUnit { get; set; }
/// <summary>
- /// 鍥剧墖1
- /// </summary>
+ /// 鍥剧墖1
+ ///</summary>
[SugarColumn(ColumnName = "BZ06")]
public string? Bz06 { get; set; }
/// <summary>
- /// 鍥剧墖2
- /// </summary>
+ /// 鍥剧墖2
+ ///</summary>
[SugarColumn(ColumnName = "BZ07")]
public string? Bz07 { get; set; }
/// <summary>
- /// 鍥剧墖3
- /// </summary>
+ /// 鍥剧墖3
+ ///</summary>
[SugarColumn(ColumnName = "BZ08")]
public string? Bz08 { get; set; }
/// <summary>
- /// 鍥剧墖4
- /// </summary>
+ /// 鍥剧墖4
+ ///</summary>
[SugarColumn(ColumnName = "BZ09")]
public string? Bz09 { get; set; }
/// <summary>
- /// 鍥剧墖5
- /// </summary>
+ /// 鍥剧墖5
+ ///</summary>
[SugarColumn(ColumnName = "BZ10")]
public string? Bz10 { get; set; }
/// <summary>
- /// QC鍒嗙粍ID
- /// </summary>
+ /// QC鍒嗙粍ID
+ ///</summary>
[SugarColumn(ColumnName = "QC_TEAMID")]
public string? QcTeamid { get; set; }
/// <summary>
- /// 鐗╂枡ID
- /// </summary>
+ /// 鐗╂枡ID
+ ///</summary>
[SugarColumn(ColumnName = "ITEM_ID")]
public decimal? ItemId { get; set; }
/// <summary>
- /// 棰滆壊
- /// </summary>
+ /// 棰滆壊
+ ///</summary>
[SugarColumn(ColumnName = "COLOR_NAME")]
public string? ColorName { get; set; }
- [SugarColumn(IsIgnore = true)] public string? Type { get; set; }
+ /// <summary>
+ /// 璁惧
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_TEXT8")]
+ public string? FWwcText8 { get; set; }
/// <summary>
- /// 鎺ュ彛瀛楁璋冩暣锛氭爣鍑嗙増鎺ュ彛鏂板瀛楁銆�
- /// </summary>
- /// <remarks>
- /// 淇敼浜猴細
- /// <姹犲崡楠�>
- /// 淇敼鏃ユ湡锛�<2024-12-31>
- /// 淇敼璇存槑锛�
- /// - 鍘熶唬鐮侊細绌�
- /// - 鏂板锛�
- /// </remarks>
- /// <summary>
- /// 鏃х墿鏂欑紪鐮�
- /// </summary>
- [SugarColumn(ColumnName = "FOLDNUMBER")]
- public string? FOLDNUMBER { get; set; }
+ /// 鍔熺巼
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_DECIMAL")]
+ public string? FWwcDecimal { get; set; }
/// <summary>
- /// 鏈�灏忓簱瀛�
- /// </summary>
- [SugarColumn(ColumnName = "FMINSTOCK")]
- public double? FMINSTOCK { get; set; }
+ /// 鍗曞皬鏃朵骇鑳�
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_DECIMAL1")]
+ public string? FWwcDecimal1 { get; set; }
/// <summary>
- /// 鍏ュ簱娆犳敹姣斾緥(%)
- /// </summary>
- [SugarColumn(ColumnName = "FFINISHRECEIPTSHORTRATE")]
- public decimal? FFINISHRECEIPTSHORTRATE { get; set; }
+ /// 浜烘暟
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_DECIMAL2")]
+ public string? FWwcDecimal2 { get; set; }
/// <summary>
- /// 榛樿渚涘簲鍟�
- /// </summary>
- [SugarColumn(ColumnName = "FDEFAULTVENDOR")]
- public string? FDEFAULTVENDOR { get; set; }
+ /// 浜哄伐灏忔椂宸ヨ祫
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_DECIMAL3")]
+ public string? FWwcDecimal3 { get; set; }
/// <summary>
- /// 鏁版嵁鐘舵��(Z=鏆傚瓨,A=鍒涘缓,B=瀹℃牳涓�,C=宸插鏍�,D=閲嶆柊瀹℃牳)
- /// </summary>
- [SugarColumn(ColumnName = "FDOCUMENTSTATUS")]
- public string? FDOCUMENTSTATUS { get; set; }
+ /// 浜哄伐瀹氶
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_DECIMAL4")]
+ public string? FWwcDecimal4 { get; set; }
/// <summary>
- /// 鍒堕�犵瓥鐣�
- /// </summary>
- [SugarColumn(ColumnName = "FMFGPOLICYID")]
- public string? FMFGPOLICYID { get; set; }
+ /// 鏍囧噯浜ц兘
+ ///</summary>
+ [SugarColumn(ColumnName = "FBCN")]
+ public string? Fbcn { get; set; }
/// <summary>
- /// 瀛愰」鍗曚綅
- /// </summary>
- [SugarColumn(ColumnName = "FBOMUNITID")]
- public string? FBOMUNITID { get; set; }
+ /// 閽㈢綉
+ ///</summary>
+ [SugarColumn(ColumnName = "FGW")]
+ public string? Fgw { get; set; }
/// <summary>
- /// 鏄惁鍏抽敭浠�
- /// </summary>
- [SugarColumn(ColumnName = "FISKITTING")]
- public string? FISKITTING { get; set; }
+ /// 娌诲叿
+ ///</summary>
+ [SugarColumn(ColumnName = "FYJ")]
+ public string? Fyj { get; set; }
/// <summary>
- /// 鍙负鑱斿壇浜у搧
- /// </summary>
- [SugarColumn(ColumnName = "FISCOBY")]
- public string? FISCOBY { get; set; }
+ /// 璁惧
+ ///</summary>
+ [SugarColumn(ColumnName = "FSB")]
+ public string? Fsb { get; set; }
/// <summary>
- /// 瓒呭彂鎺у埗鏂瑰紡
- /// </summary>
- [SugarColumn(ColumnName = "FOVERCONTROLMODE")]
- public string? FOVERCONTROLMODE { get; set; }
+ /// 鍥惧彿
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_TEXT1")]
+ public string? FWwcText1 { get; set; }
/// <summary>
- /// 妯″叿缂栧彿
- /// </summary>
- [SugarColumn(ColumnName = "F_MJBH")]
- public string? F_MJBH { get; set; }
+ /// 妯″叿缂栧彿
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_TEXT2")]
+ public string? FWwcText2 { get; set; }
+
+ /// <summary>
+ /// 妯″叿鍑烘暟
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_TEXT3")]
+ public string? FWwcText3 { get; set; }
+
+ /// <summary>
+ /// 娉ㄥ鍛ㄦ湡
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_TEXT4")]
+ public string? FWwcText4 { get; set; }
+
+ /// <summary>
+ /// 鍗曞弻鑹�
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_TEXT5")]
+ public string? FWwcText5 { get; set; }
+
+ /// <summary>
+ /// 娉ㄥ浠跺惃浣�
+ ///</summary>
+ [SugarColumn(ColumnName = "F_WWC_TEXT6")]
+ public string? FWwcText6 { get; set; }
+
+ /// <summary>
+ /// 澶栭儴鏂欏彿
+ ///</summary>
+ [SugarColumn(ColumnName = "CATALOG_NO")]
+ public string? CatalogNo { get; set; }
+
+
+
+ /// <summary>
+ /// 棰嗘枡鍗曚綅
+ ///</summary>
+ [SugarColumn(ColumnName = "MATERIAL_OUT_UOMID")]
+ public string? MaterialOutUomid { get; set; }
+
+ /// <summary>
+ /// 鐢熶骇閮ㄩ棬
+ ///</summary>
+ [SugarColumn(ColumnName = "PUB_DESC_SEG38")]
+ public string? PubDescSeg38 { get; set; }
+
+ /// <summary>
+ /// 椤圭洰锛堢爺鍙戯級
+ ///</summary>
+ [SugarColumn(ColumnName = "DESCRIPTION")]
+ public string? Description { get; set; }
+
+ /// <summary>
+ /// 椤圭洰锛堟姤琛級
+ ///</summary>
+ [SugarColumn(ColumnName = "PRIVATE_DESC_SEG4")]
+ public string? PrivateDescSeg4 { get; set; }
+
+ /// <summary>
+ /// 鎶ヨ〃椤圭洰锛堟眹鎬伙級
+ ///</summary>
+ [SugarColumn(ColumnName = "PRIVATE_DESC_SEG9")]
+ public string? PrivateDescSeg9 { get; set; }
+
+ /// <summary>
+ /// 鍙屾暟閲�
+ ///</summary>
+ [SugarColumn(ColumnName = "IS_DUAL_QUANTITY")]
+ public string? IsDualQuantity { get; set; }
+
+ /// <summary>
+ /// 鍙屽崟浣�
+ ///</summary>
+ [SugarColumn(ColumnName = "IS_DUAL_UOM")]
+ public string? IsDualUom { get; set; }
+
+ /// <summary>
+ /// 澶氬崟浣�
+ ///</summary>
+ [SugarColumn(ColumnName = "IS_MULTY_UOM")]
+ public string? IsMultyUom { get; set; }
+
+ /// <summary>
+ /// 鍥哄畾杞崲鐜�
+ ///</summary>
+ [SugarColumn(ColumnName = "IS_VAR_RATIO")]
+ public string? IsVarRatio { get; set; }
+
+ /// <summary>
+ /// 杞崲鐜囩瓥鐣�
+ ///</summary>
+ [SugarColumn(ColumnName = "CONVER_RATIO_RULE")]
+ public string? ConverRatioRule { get; set; }
+
+ /// <summary>
+ /// 鏍囧噯搴撳懆
+ ///</summary>
+ [SugarColumn(ColumnName = "PRIVATE_DESC_SEG11")]
+ public string? PrivateDescSeg11 { get; set; }
+
+ /// <summary>
+ /// 鍝佺墝鍒嗙被
+ ///</summary>
+ [SugarColumn(ColumnName = "PRIVATE_DESC_SEG7")]
+ public string? PrivateDescSeg7 { get; set; }
+
+ /// <summary>
+ /// BU锛堜笟鍔″崟鍏冿級
+ ///</summary>
+ [SugarColumn(ColumnName = "PRIVATE_DESC_SEG2")]
+ public string? PrivateDescSeg2 { get; set; }
+
+ /// <summary>
+ /// BU锛堜笟鍔″崟鍏冿級
+ ///</summary>
+ [SugarColumn(ColumnName = "DOCUMENT_STATUS")]
+ public string? DocumentStatus { get; set; }
+
+ /// <summary>
+ /// 鏄惁鐢熸晥
+ ///</summary>
+ [SugarColumn(ColumnName = "FORBID_STATUS")]
+ public string? ForbidStatus { get; set; }
+
+ /// <summary>
+ /// 鏃х墿鏂欑紪鐮�
+ ///</summary>
+ [SugarColumn(ColumnName = "Old_ITEM_NO")]
+ public string? OldItemNo { get; set; }
}
\ No newline at end of file
diff --git a/StandardPda/MES.Service/Modes/SysDepartment.cs b/StandardPda/MES.Service/Modes/SysDepartment.cs
index 45ea1cf..5084a52 100644
--- a/StandardPda/MES.Service/Modes/SysDepartment.cs
+++ b/StandardPda/MES.Service/Modes/SysDepartment.cs
@@ -149,7 +149,7 @@
/// 涓婄骇閮ㄩ棬
/// </summary>
[SugarColumn(ColumnName = "PARENT_ID")]
- public decimal? ParentId { get; set; }
+ public string? ParentId { get; set; }
/// <summary>
/// 鑷畾涔夊瓧娈�4
diff --git a/StandardPda/MES.Service/service/BasicData/EmployeeInfoManager.cs b/StandardPda/MES.Service/service/BasicData/EmployeeInfoManager.cs
new file mode 100644
index 0000000..47c3324
--- /dev/null
+++ b/StandardPda/MES.Service/service/BasicData/EmployeeInfoManager.cs
@@ -0,0 +1,110 @@
+锘縰sing SqlSugar;
+using System;
+using System.Collections.Generic;
+using MES.Service.DB;
+using MES.Service.Dto.webApi;
+using MES.Service.Modes;
+using MES.Service.util;
+
+namespace MES.Service.service
+{
+ public class EmployeeInfoManager : Repository<EmployeeInfo>
+ {
+ public bool Save(ErpEmployeeInfo unit)
+ {
+ var entity = GetMesItems(unit); // 灏� ErpStaff 杞崲涓� MesStaff
+
+ return UseTransaction(db =>
+ {
+ switch (unit.Type)
+ {
+ case "2":
+ case "4":
+ if (InsertOrUpdateEmp(db, entity.employeeInfo,
+ entity.employeeItems)) // 鎻掑叆鎴栨洿鏂板憳宸�
+ return 1;
+ break;
+ case "3":
+ if (DeleteEmp(db, entity.employeeInfo,
+ entity.employeeItems)) // 鍒犻櫎鍛樺伐
+ return 1;
+ break;
+ default:
+ throw new ArgumentNullException(
+ $"type娌℃湁{unit.Type}杩欎釜绫诲瀷鐨勫弬鏁�");
+ }
+
+ throw new NotImplementedException("鎿嶄綔澶辫触");
+ }) > 0;
+ }
+
+ public bool SaveList(List<ErpEmployeeInfo> departments)
+ {
+ var result = departments.Select(Save).ToList();
+ return result.All(b => b);
+ }
+
+ private bool InsertOrUpdateEmp(SqlSugarScope db,
+ EmployeeInfo entityEmployeeInfo,
+ List<EmployeeItem> entityEmployeeItems)
+ {
+ db.Deleteable<EmployeeInfo>().Where(
+ s => s.Id == entityEmployeeInfo.Id).ExecuteCommand();
+
+ db.Deleteable<EmployeeItem>()
+ .Where(a => a.Eid == entityEmployeeInfo.Id).ExecuteCommand();
+
+ var executeCommand =
+ db.Insertable(entityEmployeeInfo).ExecuteCommand();
+ var command = db.Insertable(entityEmployeeItems).ExecuteCommand();
+
+ return executeCommand > 0 && command > 0;
+ }
+
+ private bool DeleteEmp(SqlSugarScope db,
+ EmployeeInfo entityEmployeeInfo,
+ List<EmployeeItem> entityEmployeeItems)
+ {
+ var command = db.Deleteable<EmployeeInfo>().Where(
+ s => s.Id == entityEmployeeInfo.Id).ExecuteCommand();
+
+ var executeCommand = db.Deleteable<EmployeeItem>()
+ .Where(a => a.Eid == entityEmployeeInfo.Id).ExecuteCommand();
+
+ return executeCommand > 0 && command > 0;
+ }
+
+
+ private (EmployeeInfo employeeInfo, List<EmployeeItem> employeeItems)
+ GetMesItems(
+ ErpEmployeeInfo item)
+ {
+ var items = new EmployeeInfo
+ {
+ Id = Convert.ToDecimal(item.Id),
+ EmployeeNo = item.fNumber,
+ EmployeeName = item.fName,
+ DepartmentCode = item.fPostDeptid,
+ DocumentStatus = item.FDocumentStatus,
+ IsDisabled = item.FForbidStatus,
+ Organization = item.FUseOrgId
+ };
+
+ var employeeItems = new List<EmployeeItem>();
+
+ foreach (var erpEmployeeInfoDto in item.OperatorTypes)
+ {
+ var employee = new EmployeeItem
+ {
+ Eid = items.Id,
+ EType = erpEmployeeInfoDto.OperatorType,
+ CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
+ };
+
+ employeeItems.Add(employee);
+ }
+
+ return (items, employeeItems);
+ }
+ }
+}
\ No newline at end of file
diff --git a/StandardPda/MES.Service/service/BasicData/MesItemsManager.cs b/StandardPda/MES.Service/service/BasicData/MesItemsManager.cs
index 491b84b..d5a23f8 100644
--- a/StandardPda/MES.Service/service/BasicData/MesItemsManager.cs
+++ b/StandardPda/MES.Service/service/BasicData/MesItemsManager.cs
@@ -8,15 +8,6 @@
public class MesItemsManager : Repository<MesItems>
{
- public MesItems GetItemQcPrint(WarehouseQuery query)
- {
- return Db.Queryable<MesItems>()
- .Where(c => c.Factory == query.Factory
- && c.Company == query.Company
- && c.ItemNo == query.ItemNo).First();
- }
-
-
public bool Save(ErpItems item)
{
var entity = GetMesItems(item);
@@ -25,20 +16,8 @@
{
switch (item.Type)
{
- case "0":
- if (UpdateItemStatus(db, entity.Id, "A"))
- return 1;
- break;
- case "1":
- if (UpdateItemStatus(db, entity.Id, "B"))
- return 1;
- break;
- //case "2":
- // if (InsertItem(db, entity))
- // return 1;
- // break;
case "3":
- if (DeleteItem(db, entity.Id))
+ if (DeleteItem(db, entity))
return 1;
break;
case "2":
@@ -58,224 +37,129 @@
public bool SaveList(List<ErpItems> items)
{
- var list = items.Select(GetMesItems).ToList();
- var groupBy = list.GroupBy(s => s.Type)
- .ToDictionary(g => g.Key, g => g.ToList());
-
- return UseTransaction(db =>
- {
- foreach (var itemGroup in groupBy)
- switch (itemGroup.Key)
- {
- case "0":
- if (!UpdateItemStatusBatch(db, itemGroup.Value, "A"))
- throw new NotImplementedException("鍚敤澶辫触");
- break;
- case "1":
- if (!UpdateItemStatusBatch(db, itemGroup.Value, "B"))
- throw new NotImplementedException("绂佺敤澶辫触");
- break;
- //case "2":
- // if (!InsertItemBatch(db, itemGroup.Value))
- // throw new NotImplementedException("鎻掑叆澶辫触");
- // break;
- case "3":
- if (!DeleteItemBatch(db, itemGroup.Value))
- throw new NotImplementedException("鍒犻櫎澶辫触");
- break;
- case "2":
- case "4":
- case "5":
- if (!InsertOrUpdateBatch(db, itemGroup.Value))
- throw new NotImplementedException("鍚屾澶辫触");
- break;
- default:
- throw new ArgumentNullException(
- $"type娌℃湁{itemGroup.Key}杩欎釜绫诲瀷鐨勫弬鏁�");
- }
-
- return 1;
- }) > 0;
+ var result = items.Select(Save).ToList();
+ return result.All(b => b);
}
- private bool UpdateItemStatus(SqlSugarScope db, decimal itemId,
- string status)
+ private bool DeleteItem(SqlSugarScope db, List<MesItems> listItem)
{
- var result = db.Updateable<MesItems>()
- .SetColumns(s => s.Fforbidstatus == status)
- .Where(s => s.Id == itemId).ExecuteCommand();
+ // 鎻愬彇鎵�鏈夐渶瑕佺殑 MesId 缁勫悎
+ var ids = listItem.Select(customer => customer.Id.ToString())
+ .ToList();
- if (result > 0)
- return true;
+ // 浣跨敤杩欎簺 MesId 鍘绘煡璇� MesLinkU9 琛紝鎵惧埌瀵瑰簲鐨� U9Id
+ var u9Ids = Db.Queryable<MesLinkU9>()
+ .Where(u =>
+ ids.Contains(u.MesId) && u.TableType == "MES_ITEMS")
+ .Select(u => u.U9Id)
+ .Distinct() // 搴旂敤 Distinct 鍘婚噸
+ .ToList();
- throw new NotImplementedException(status == "A" ? "鍚敤澶辫触" : "绂佺敤澶辫触");
- }
+ // 鏍规嵁 U9Id 鎵惧埌鎵�鏈夊搴旂殑 MesId锛岃繘琛屽垹闄�
+ // 娉ㄦ剰锛氳繖閲屽亣璁炬偍纭疄鎯宠鍒犻櫎杩欎簺璁板綍銆傚鏋滀笉纭畾锛岃鍏堟煡璇互楠岃瘉缁撴灉銆�
+ var idsToDelete = Db.Queryable<MesLinkU9>()
+ .Where(u => u9Ids.Contains(u.U9Id) && u.TableType == "MES_ITEMS")
+ .Select(u => u.MesId)
+ .Distinct() // 搴旂敤 Distinct 鍘婚噸
+ .ToList();
- private bool InsertItem(SqlSugarScope db, MesItems entity)
- {
- var insert = db.Insertable(entity).ExecuteCommand();
- if (insert > 0)
- return true;
-
- throw new NotImplementedException("鎻掑叆澶辫触");
- }
-
- private bool DeleteItem(SqlSugarScope db, decimal itemId)
- {
- var deleteById = db.Deleteable<MesItems>().In(itemId).ExecuteCommand();
- if (deleteById > 0)
- return true;
-
- throw new NotImplementedException("鍒犻櫎澶辫触");
- }
-
- private MesItems GetMesItems(ErpItems item)
- {
- return new MesItems
- {
- Id = Convert.ToDecimal(item.Id),
- ItemId = Convert.ToDecimal(item.Id),
- ItemNo = item.FNumber,
- ItemName = item.FName,
- ItemModel = item.FSpecification,
- ItemUnit = item.FBaseUnitId,
- Lowlimit = item.FSafeStock,
- Highlimit = item.FMaxStock,
- PrdPack = item.FMinPackCount,
- DepotCode = item.FStockId,
- /// <summary>
- /// 鎺ュ彛瀛楁璋冩暣锛氬凡鍒犻櫎鎴栦笉鍐嶄娇鐢≒PBOM00019124瀛楁銆�
- /// </summary>
- /// <remarks>
- /// 淇敼浜猴細姹犲崡楠�
- /// 淇敼鏃ユ湡锛�2024-12-25
- /// 璇存槑锛氭瀛楁宸茶鍒犻櫎鎴栦笉鍐嶄娇鐢ㄤ簬褰撳墠鎺ュ彛涓��
- /// 淇濈暀琚敞閲婄殑浠g爜浠ヨ褰曚慨鏀瑰巻鍙层��
- /// </remarks>
- //Ppbom00019124 = item.PPBOM00019124,
- Fmaterialgroup = item.FMaterialGroup,
- Remarks = item.FDescription,
- Ffinishreceiptoverrate = item.FFinishReceiptOverRate,
- Fissuetype = item.FIssueType,
- Fisbatchmanage = item.FIsBatchManage,
- Fpurchaserid = item.FPurchaserId,
- Fpurchaseunitid = item.FPurchaseUnitId,
- Storeunit = item.FStoreUnitID,
- Saleunit = item.FSaleUnitId,
- Fforbidstatus = item.FForbidStatus,
- MaterialProperti = item.FErpClsID,
- ProductionWorkshop = item.FWorkShopId,
- ProduceUnit = item.FPRODUCEUNITID,
- SubconUnit = item.FSUBCONUNITID,
- CreateOrg = Convert.ToDecimal(item.FCreateOrgId),
- UseOrg = Convert.ToDecimal(item.FUseOrgId),
- LossPercent = item.FLOSSPERCENT,
- MnemonicCode = item.FMnemonicCode,
- ExpPeriod = item.FExpPeriod,
- //ColorName = item.FColor,
- CreateDate = DateTime.Now,
- Company = "1000",
- Factory = "1000",
- /// <summary>
- /// 鎺ュ彛瀛楁璋冩暣锛氭爣鍑嗙増鎺ュ彛鏂板瀛楁銆�
- /// </summary>
- /// <remarks>
- /// 淇敼浜猴細<姹犲崡楠�>
- /// 淇敼鏃ユ湡锛�<2024-12-31>
- /// 淇敼璇存槑锛�
- /// - 鍘熶唬鐮侊細绌�
- /// - 淇敼鍚庯細
- /// </remarks>
- FOLDNUMBER = item.FOldNumber,
- FMINSTOCK = item.FMinStock,
- FFINISHRECEIPTSHORTRATE = item.FFinishReceiptShortRate,
- FDEFAULTVENDOR = item.FDefaultVendor,
- FDOCUMENTSTATUS = item.FDocumentStatus,
- FMFGPOLICYID = item.FMfgPolicyId,
- FBOMUNITID = item.FBOMUnitId,
- FISKITTING = item.FIsKitting,
- FISCOBY = item.FIsCoby,
- FOVERCONTROLMODE = item.FOverControlMode,
- F_MJBH = item.F_MJBH
- };
- }
-
- private bool UpdateItemStatusBatch(SqlSugarScope db,
- List<MesItems> itemList, string status)
- {
- var ids = itemList.Select(it => it.Id).ToArray();
- var result = db.Updateable<MesItems>()
- .SetColumns(s => s.Fforbidstatus == status)
- .Where(s => ids.Contains(s.Id)).ExecuteCommand();
-
- if (result > 0)
- return true;
-
- throw new NotImplementedException(status == "A" ? "鍚敤澶辫触" : "绂佺敤澶辫触");
- }
-
- private bool InsertItemBatch(SqlSugarScope db, List<MesItems> itemList)
- {
- var insertRange = db.Insertable(itemList).ExecuteCommand();
- if (insertRange > 0)
- return true;
-
- throw new NotImplementedException("鎻掑叆澶辫触");
- }
-
- private bool DeleteItemBatch(SqlSugarScope db, List<MesItems> itemList)
- {
- var ids = itemList.Select(it => it.Id).ToArray();
- var deleteByIds = db.Deleteable<MesItems>().In(ids).ExecuteCommand();
- if (deleteByIds > 0)
- return true;
-
- throw new NotImplementedException("鍒犻櫎澶辫触");
- }
-
- /// <summary>
- /// "鎻掑叆鎴栨洿鏂扮殑鏂规硶"璋冩暣锛氫慨鏀逛负鍏堝垹闄ゅ啀鎻掑叆銆�
- /// </summary>
- /// <remarks>
- /// 淇敼浜猴細姹犲崡楠�
- /// 淇敼鏃ユ湡锛�2024-12-31
- /// 淇敼璇存槑锛歚
- /// </remarks>
- /// 鍘熶唬鐮侊細
- //private bool InsertOrUpdate(SqlSugarScope db, MesItems entity)
- //{
- // var exists = db.Queryable<MesItems>().Any(e => e.Id == entity.Id);
- // if (exists)
- // {
- // var update = db.Updateable(entity).ExecuteCommand();
- // if (update > 0)
- // return true;
- // }
- // else
- // {
- // var insert = db.Insertable(entity).ExecuteCommand();
- // if (insert > 0)
- // return true;
- // }
-
- // return false;
- //}
- private bool InsertOrUpdate(SqlSugarScope db, MesItems entity)
- {
- db.Deleteable<MesItems>()
- .Where(s => s.Id == entity.Id)
+ var deleteByIds = Db.Deleteable<MesProject>().In(idsToDelete)
.ExecuteCommand();
-
- var insert = db.Insertable(entity).ExecuteCommand();
- return insert > 0;
+ // if (deleteByIds > 0)
+ // return true;
+ return true;
+ //throw new NotImplementedException("鍒犻櫎澶辫触");
}
- private bool InsertOrUpdateBatch(SqlSugarScope db, List<MesItems> itemList)
+ private List<MesItems> GetMesItems(ErpItems item)
{
- foreach (var entity in itemList)
- if (!InsertOrUpdate(db, entity))
- return false;
+ List<MesItems> list = new();
- return true;
+ foreach (var erpDetail in item.FUseOrgId)
+ {
+ var exists = Db.Queryable<MesLinkU9>().Any(u =>
+ u.U9Id == item.Id && u.OrgId == erpDetail.FUseOrgId &&
+ u.TableType == "MES_ITEMS");
+
+ decimal mesId = 0;
+ if (exists)
+ {
+ //鑾峰彇mesid
+ mesId = Convert.ToDecimal(Db.Queryable<MesLinkU9>()
+ .Where(u =>
+ u.U9Id == item.Id && u.OrgId == erpDetail.FUseOrgId &&
+ u.TableType == "MES_ITEMS")
+ .Select(u => u.MesId) // 閫夋嫨 MesId 瀛楁
+ .First());
+ }
+ else
+ {
+ var entity = new MesLinkU9
+ {
+ CreateDate = DateTime.Now,
+ MesId = mesId.ToString(),
+ U9Id = item.Id,
+ OrgId = erpDetail.FUseOrgId,
+ TableType = "MES_ITEMS"
+ };
+ mesId = Db.Insertable(entity).ExecuteReturnIdentity();
+ }
+
+ var items = new MesItems
+ {
+ Id = mesId,
+ ItemId = mesId,
+
+ Fmaterialgroup = item.FMaterialGroup,
+ ItemNo = item.FNumber,
+ OldItemNo = item.FOldNumber,
+ ItemName = item.FName,
+ CatalogNo = item.CatalogNo,
+ ItemModel = item.FSpecification,
+ SafeStock = item.FSafeStock,
+ Lowlimit = item.FMinStock,
+ Highlimit = item.FMaxStock,
+ DepotCode = item.FStockId,
+ Fisbatchmanage = item.FIsBatchManage,
+ MaterialProperti = item.FErpClsID,
+ Storeunit = item.FStoreUnitID,
+ ItemUnit = item.FBaseUnitId,
+ Fpurchaseunitid = item.FPurchaseUnitId,
+ Saleunit = item.FSaleUnitId,
+ ProduceUnit = item.FPRODUCEUNITID,
+ MaterialOutUomid = item.MaterialOutUomid,
+ CreateBy = item.CreateBy,
+ PubDescSeg38 = item.PubDescSeg38,
+ Description = item.Description,
+ PrivateDescSeg4 = item.PrivateDescSeg4,
+ PrivateDescSeg9 = item.PrivateDescSeg9,
+ IsDualQuantity = item.IsDualQuantity,
+ IsDualUom = item.IsDualUom,
+ IsMultyUom = item.IsMultyUom,
+ IsVarRatio = item.IsVarRatio,
+ ConverRatioRule = item.ConverRatioRule,
+ PrivateDescSeg11 = item.PrivateDescSeg11,
+ PrivateDescSeg7 = item.PrivateDescSeg7,
+ PrivateDescSeg2 = item.PrivateDescSeg2,
+ DocumentStatus = item.FDocumentStatus,
+ ForbidStatus = item.FForbidStatus,
+ UseOrg = erpDetail.FUseOrgId,
+ CreateDate = DateTime.Now,
+ Company = "1000",
+ Factory = "1000",
+ };
+ list.Add(items);
+ }
+
+ return list;
+ }
+
+ private bool InsertOrUpdate(SqlSugarScope db, List<MesItems> listItem)
+ {
+ DeleteItem(db, listItem);
+
+ var insert = db.Insertable(listItem).IgnoreColumns(true)
+ .ExecuteCommand();
+ return insert > 0;
}
}
\ No newline at end of file
diff --git a/StandardPda/MES.Service/service/BasicData/SysDepartmentManager.cs b/StandardPda/MES.Service/service/BasicData/SysDepartmentManager.cs
index 7329c00..c8bc92c 100644
--- a/StandardPda/MES.Service/service/BasicData/SysDepartmentManager.cs
+++ b/StandardPda/MES.Service/service/BasicData/SysDepartmentManager.cs
@@ -83,40 +83,7 @@
throw new NotImplementedException("鍒犻櫎澶辫触");
}
- /// <summary>
- /// "鎻掑叆鎴栨洿鏂伴儴闂ㄧ殑鏂规硶"璋冩暣锛氫慨鏀逛负鍏堝垹闄ゅ啀鎻掑叆
- /// </summary>
- /// <remarks>
- /// 淇敼浜猴細姹犲崡楠�
- /// 淇敼鏃ユ湡锛�2024-12-31
- /// 淇敼璇存槑锛歚
- /// </remarks>
-
- ///鍘熶唬鐮�
- // 鎻掑叆鎴栨洿鏂伴儴闂ㄧ殑鏂规硶
- //private bool InsertOrUpdateDepartment(SqlSugarScope db,
- // SysDepartment entity)
- //{
- // var exists = db.Queryable<SysDepartment>().Any(e => e.Id == entity.Id);
- // if (exists)
- // {
- // var update = db.Updateable(entity).ExecuteCommand();
- // if (update > 0)
- // return true;
- // }
- // else
- // {
- // var insert = db.Insertable(entity).ExecuteCommand();
- // if (insert > 0)
- // return true;
- // }
-
- // return false;
- //}
-
-
- // 灏� ErpDepartment 瀵硅薄杞崲涓� SysDepartment 瀵硅薄鐨勬柟娉�
-
+
///鏂颁唬鐮�
// 鎻掑叆鎴栨洿鏂伴儴闂ㄧ殑鏂规硶
private bool InsertOrUpdateDepartment(SqlSugarScope db,
@@ -145,7 +112,7 @@
CreateDate = DateTime.Now,
CreateOrg = Convert.ToDecimal(department.FCreateOrgId),
UseOrg = Convert.ToDecimal(department.FUseOrgId),
- ParentId = Convert.ToDecimal(department.FParentID),
+ ParentId = department.FParentID,
FDOCUMENTSTATUS = department.FDocumentStatus,
Company = "1000",
Factory = "1000"
@@ -155,104 +122,7 @@
// SaveList 鏂规硶鐢ㄤ簬淇濆瓨澶氫釜閮ㄩ棬璁板綍锛屾牴鎹被鍨嬫壒閲忔墽琛屼笉鍚岀殑鎿嶄綔
public bool SaveList(List<ErpDepartment> departments)
{
- var list = new List<SysDepartment>();
- departments.ForEach(s =>
- {
- var entity =
- GetSysDepartment(s); // 灏� ErpDepartment 杞崲涓� SysDepartment
- entity.Type = s.Type;
- list.Add(entity);
- });
-
- var groupBy = list.GroupBy(s => s.Type)
- .ToDictionary(g => g.Key, g => g.ToList());
- return UseTransaction(db =>
- {
- foreach (var departmentGroup in groupBy)
- switch (departmentGroup.Key)
- {
- case "0":
- if (!UpdateDepartmentStatusBatch(db,
- departmentGroup.Value, "A")) // 鎵归噺鍚敤閮ㄩ棬
- throw new NotImplementedException("鍚敤澶辫触");
- break;
- case "1":
- if (!UpdateDepartmentStatusBatch(db,
- departmentGroup.Value, "B")) // 鎵归噺绂佺敤閮ㄩ棬
- throw new NotImplementedException("绂佺敤澶辫触");
- break;
- //case "2":
- // if (!InsertDepartmentBatch(db,
- // departmentGroup.Value)) // 鎵归噺鎻掑叆閮ㄩ棬
- // throw new NotImplementedException("鎻掑叆澶辫触");
- // break;
- case "3":
- if (!DeleteDepartmentBatch(db,
- departmentGroup.Value)) // 鎵归噺鍒犻櫎閮ㄩ棬
- throw new NotImplementedException("鍒犻櫎澶辫触");
- break;
- case "2":
- case "4":
- if (!InsertOrUpdateDepartmentBatch(db,
- departmentGroup.Value)) // 鎵归噺鎻掑叆鎴栨洿鏂伴儴闂�
- throw new NotImplementedException("鍚屾澶辫触");
- break;
- default:
- throw new ArgumentNullException(
- $"type娌℃湁{departmentGroup.Key}杩欎釜绫诲瀷鐨勫弬鏁�");
- }
-
- return 1;
- }) > 0;
- }
-
- // 鎵归噺鏇存柊閮ㄩ棬鐘舵�佺殑鏂规硶
- private bool UpdateDepartmentStatusBatch(SqlSugarScope db,
- List<SysDepartment> departmentList, string status)
- {
- var ids = departmentList.Select(it => it.Id).ToArray();
- var result = db.Updateable<SysDepartment>()
- .SetColumns(s => s.Depextr4 == status)
- .Where(s => ids.Contains(s.Id)).ExecuteCommand();
-
- if (result > 0)
- return true;
-
- throw new NotImplementedException(status == "A" ? "鍚敤澶辫触" : "绂佺敤澶辫触");
- }
-
- // 鎵归噺鎻掑叆閮ㄩ棬鐨勬柟娉�
- private bool InsertDepartmentBatch(SqlSugarScope db,
- List<SysDepartment> departmentList)
- {
- var insertRange = db.Insertable(departmentList).ExecuteCommand();
- if (insertRange > 0)
- return true;
-
- throw new NotImplementedException("鎻掑叆澶辫触");
- }
-
- // 鎵归噺鍒犻櫎閮ㄩ棬鐨勬柟娉�
- private bool DeleteDepartmentBatch(SqlSugarScope db,
- List<SysDepartment> departmentList)
- {
- var ids = departmentList.Select(it => it.Id).ToArray();
- var deleteByIds =
- db.Deleteable<SysDepartment>().In(ids).ExecuteCommand();
- if (deleteByIds > 0)
- return true;
-
- throw new NotImplementedException("鍒犻櫎澶辫触");
- }
-
- // 鎵归噺鎻掑叆鎴栨洿鏂伴儴闂ㄧ殑鏂规硶
- private bool InsertOrUpdateDepartmentBatch(SqlSugarScope db,
- List<SysDepartment> departmentList)
- {
- foreach (var entity in departmentList)
- if (!InsertOrUpdateDepartment(db, entity))
- return false;
-
- return true;
+ var result = departments.Select(Save).ToList();
+ return result.All(b => b);
}
}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/BasicData/EmployeeInfoController.cs b/StandardPda/MESApplication/Controllers/BasicData/EmployeeInfoController.cs
new file mode 100644
index 0000000..1d80bb4
--- /dev/null
+++ b/StandardPda/MESApplication/Controllers/BasicData/EmployeeInfoController.cs
@@ -0,0 +1,269 @@
+锘縰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 Masuit.Tools;
+using MES.Service.Dto.webApi;
+using MES.Service.Modes;
+using MES.Service.service;
+using MES.Service.util;
+using Newtonsoft.Json;
+
+namespace MESApplication.Controllers
+{
+ [ApiController]
+ [Route("api/[controller]")]
+ public class EmployeeInfoController : ControllerBase
+ {
+ private EmployeeInfoManager m = new EmployeeInfoManager();
+
+ private readonly MessageCenterManager _manager = new();
+
+ private readonly string METHOD = "POST";
+
+ private readonly string TableName = "MES_ITEMS";
+
+ private readonly string
+ URL = "http://localhost:10054/api/EmployeeInfo/";
+
+ [HttpPost("Save")]
+ public ResponseResult Save(ErpEmployeeInfo unit)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "Save";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(unit);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ entity.Route = unit.fNumber;
+
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var save = m.Save(unit);
+ 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<ErpEmployeeInfo> 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";
+ entity.Route = units.Select(it => it.fNumber).Join(",");
+ 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] EmployeeInfo 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] EmployeeInfo 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] EmployeeInfo 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);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/BasicData/MesDeliveryNoteDetails.cs b/StandardPda/MESApplication/Controllers/BasicData/MesDeliveryNoteDetails.cs
deleted file mode 100644
index c7905dc..0000000
--- a/StandardPda/MESApplication/Controllers/BasicData/MesDeliveryNoteDetails.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-锘縰sing System.Dynamic;
-using MES.Service.Modes;
-using MES.Service.service.BasicData;
-using MES.Service.util;
-using Microsoft.AspNetCore.Mvc;
-
-namespace MESApplication.Controllers.BasicData;
-
-[ApiController]
-[Route("api/[controller]")]
-public class MesDeliveryNoteDetailsController : ControllerBase
-{
- private readonly MesDeliveryDetailsManager m = new();
-
-
- /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
-
- /// <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] MesDeliveryNoteDetails 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] MesDeliveryNoteDetails 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] MesDeliveryNoteDetails 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);
- }
- }
-}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/BasicData/MesItemTypeController.cs b/StandardPda/MESApplication/Controllers/BasicData/MesItemTypeController.cs
index a71b56f..5ea2023 100644
--- a/StandardPda/MESApplication/Controllers/BasicData/MesItemTypeController.cs
+++ b/StandardPda/MESApplication/Controllers/BasicData/MesItemTypeController.cs
@@ -1,4 +1,5 @@
锘縰sing System.Dynamic;
+using Masuit.Tools;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using MES.Service.service;
@@ -33,6 +34,7 @@
entity.Data = JsonConvert.SerializeObject(unit);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = unit.FNumber;
try
{
dynamic resultInfos = new ExpandoObject();
@@ -76,6 +78,7 @@
entity.Data = JsonConvert.SerializeObject(units);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = units.Select(it => it.FNumber).Join(",");
try
{
dynamic resultInfos = new ExpandoObject();
diff --git a/StandardPda/MESApplication/Controllers/BasicData/MesItemsController.cs b/StandardPda/MESApplication/Controllers/BasicData/MesItemsController.cs
index 9fce676..05acb5e 100644
--- a/StandardPda/MESApplication/Controllers/BasicData/MesItemsController.cs
+++ b/StandardPda/MESApplication/Controllers/BasicData/MesItemsController.cs
@@ -1,4 +1,5 @@
锘縰sing System.Dynamic;
+using Masuit.Tools;
using MES.Service.Dto.service;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
@@ -22,30 +23,7 @@
private readonly string TableName = "MES_ITEMS";
private readonly string URL = "http://localhost:10054/api/MesItems/";
-
- //GetItemQcPrint
- [HttpPost("GetItemQcPrint")]
- public ResponseResult GetItemQcPrint(WarehouseQuery query)
- {
- try
- {
- dynamic resultInfos = new ExpandoObject();
- var save = m.GetItemQcPrint(query);
- resultInfos.tbBillList = save;
-
- return new ResponseResult
- {
- status = 0,
- message = "OK",
- data = resultInfos
- };
- }
- catch (Exception ex)
- {
- return ResponseResult.ResponseError(ex);
- }
- }
-
+
[HttpPost("Save")]
public ResponseResult Save(ErpItems unit)
{
@@ -56,6 +34,7 @@
entity.Data = JsonConvert.SerializeObject(unit);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = unit.FNumber;
try
{
@@ -100,6 +79,7 @@
entity.Data = JsonConvert.SerializeObject(units);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = units.Select(it => it.FNumber).Join(",");
try
{
dynamic resultInfos = new ExpandoObject();
diff --git a/StandardPda/MESApplication/Controllers/BasicData/MesPositionController.cs b/StandardPda/MESApplication/Controllers/BasicData/MesPositionController.cs
index 655941c..34964d9 100644
--- a/StandardPda/MESApplication/Controllers/BasicData/MesPositionController.cs
+++ b/StandardPda/MESApplication/Controllers/BasicData/MesPositionController.cs
@@ -1,4 +1,5 @@
锘縰sing System.Dynamic;
+using Masuit.Tools;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using MES.Service.service;
@@ -33,6 +34,7 @@
entity.Data = JsonConvert.SerializeObject(unit);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = unit.FNumber;
try
{
dynamic resultInfos = new ExpandoObject();
@@ -76,6 +78,7 @@
entity.Data = JsonConvert.SerializeObject(units);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = units.Select(it => it.FNumber).Join(",");
try
{
dynamic resultInfos = new ExpandoObject();
diff --git a/StandardPda/MESApplication/Controllers/BasicData/MesStaffController.cs b/StandardPda/MESApplication/Controllers/BasicData/MesStaffController.cs
index 9a11979..3935d79 100644
--- a/StandardPda/MESApplication/Controllers/BasicData/MesStaffController.cs
+++ b/StandardPda/MESApplication/Controllers/BasicData/MesStaffController.cs
@@ -32,6 +32,7 @@
entity.Data = JsonConvert.SerializeObject(staff);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = staff.FName;
try
{
dynamic resultInfos = new ExpandoObject();
diff --git a/StandardPda/MESApplication/Controllers/BasicData/MesUnitController.cs b/StandardPda/MESApplication/Controllers/BasicData/MesUnitController.cs
index 3d20342..e4b505e 100644
--- a/StandardPda/MESApplication/Controllers/BasicData/MesUnitController.cs
+++ b/StandardPda/MESApplication/Controllers/BasicData/MesUnitController.cs
@@ -1,4 +1,5 @@
锘縰sing System.Dynamic;
+using Masuit.Tools;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using MES.Service.service;
@@ -32,6 +33,7 @@
entity.Data = JsonConvert.SerializeObject(unit);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = unit.FNumber;
try
{
dynamic resultInfos = new ExpandoObject();
@@ -75,6 +77,7 @@
entity.Data = JsonConvert.SerializeObject(units);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = units.Select(it => it.FNumber).Join(",");
try
{
dynamic resultInfos = new ExpandoObject();
diff --git a/StandardPda/MESApplication/Controllers/BasicData/OrganizeController.cs b/StandardPda/MESApplication/Controllers/BasicData/OrganizeController.cs
index 688a4c8..9d0a8a0 100644
--- a/StandardPda/MESApplication/Controllers/BasicData/OrganizeController.cs
+++ b/StandardPda/MESApplication/Controllers/BasicData/OrganizeController.cs
@@ -1,4 +1,5 @@
锘縰sing System.Dynamic;
+using Masuit.Tools;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using MES.Service.service;
@@ -33,6 +34,7 @@
entity.Data = JsonConvert.SerializeObject(unit);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = unit.FNumber;
try
{
dynamic resultInfos = new ExpandoObject();
@@ -76,6 +78,7 @@
entity.Data = JsonConvert.SerializeObject(units);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = units.Select(it => it.FNumber).Join(",");
try
{
dynamic resultInfos = new ExpandoObject();
diff --git a/StandardPda/MESApplication/Controllers/BasicData/SalesOrderController.cs b/StandardPda/MESApplication/Controllers/BasicData/SalesOrderController.cs
deleted file mode 100644
index 74cc41f..0000000
--- a/StandardPda/MESApplication/Controllers/BasicData/SalesOrderController.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-锘縰sing System.Dynamic;
-using MES.Service.Modes;
-using MES.Service.service.BasicData;
-using MES.Service.util;
-using Microsoft.AspNetCore.Mvc;
-
-namespace MESApplication.Controllers.BasicData;
-
-[ApiController]
-[Route("api/[controller]")]
-public class SalesOrderController : ControllerBase
-{
- private readonly SalesOrderManager m = new();
-
-
- /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
-
- /// <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] SalesOrder 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] SalesOrder 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] SalesOrder 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);
- }
- }
-}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/BasicData/SalesOrderDetailController.cs b/StandardPda/MESApplication/Controllers/BasicData/SalesOrderDetailController.cs
deleted file mode 100644
index 1a5a9b0..0000000
--- a/StandardPda/MESApplication/Controllers/BasicData/SalesOrderDetailController.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-锘縰sing System.Dynamic;
-using MES.Service.Modes;
-using MES.Service.service.BasicData;
-using MES.Service.util;
-using Microsoft.AspNetCore.Mvc;
-
-namespace MESApplication.Controllers.BasicData;
-
-[ApiController]
-[Route("api/[controller]")]
-public class SalesOrderDetailController : ControllerBase
-{
- private readonly SalesOrderDetailManager m = new();
-
-
- /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
-
- /// <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] SalesOrderDetail 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] SalesOrderDetail 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] SalesOrderDetail 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);
- }
- }
-}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs b/StandardPda/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
deleted file mode 100644
index 8df7421..0000000
--- a/StandardPda/MESApplication/Controllers/BasicData/SalesReturnNoticeController.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-锘縰sing System.Dynamic;
-using MES.Service.Modes;
-using MES.Service.service.BasicData;
-using MES.Service.util;
-using Microsoft.AspNetCore.Mvc;
-
-namespace MESApplication.Controllers.BasicData;
-
-[ApiController]
-[Route("api/[controller]")]
-public class SalesReturnNoticeController : ControllerBase
-{
- private readonly SalesReturnNoticeManager m = new();
-
-
- /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
-
- /// <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] SalesReturnNotice 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] SalesReturnNotice 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] SalesReturnNotice 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);
- }
- }
-}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs b/StandardPda/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs
deleted file mode 100644
index 3ed35a0..0000000
--- a/StandardPda/MESApplication/Controllers/BasicData/SalesReturnNoticeDetailController.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-锘縰sing System.Dynamic;
-using MES.Service.Modes;
-using MES.Service.service.BasicData;
-using MES.Service.util;
-using Microsoft.AspNetCore.Mvc;
-
-namespace MESApplication.Controllers.BasicData;
-
-[ApiController]
-[Route("api/[controller]")]
-public class SalesReturnNoticeDetailController : ControllerBase
-{
- private readonly SalesReturnNoticeDetailManager m = new();
-
-
- /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
-
- /// <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] SalesReturnNoticeDetail 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] SalesReturnNoticeDetail 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] SalesReturnNoticeDetail 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);
- }
- }
-}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/BasicData/ShipmentDetailController.cs b/StandardPda/MESApplication/Controllers/BasicData/ShipmentDetailController.cs
deleted file mode 100644
index a2a764f..0000000
--- a/StandardPda/MESApplication/Controllers/BasicData/ShipmentDetailController.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-锘縰sing System.Dynamic;
-using MES.Service.Modes;
-using MES.Service.service.BasicData;
-using MES.Service.util;
-using Microsoft.AspNetCore.Mvc;
-
-namespace MESApplication.Controllers.BasicData;
-
-[ApiController]
-[Route("api/[controller]")]
-public class ShipmentDetailController : ControllerBase
-{
- private readonly ShipmentDetailManager m = new();
-
-
- /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
-
- /// <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] ShipmentDetail 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] ShipmentDetail 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] ShipmentDetail 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);
- }
- }
-}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/BasicData/ShipmentNoticeController.cs b/StandardPda/MESApplication/Controllers/BasicData/ShipmentNoticeController.cs
deleted file mode 100644
index 67f6e27..0000000
--- a/StandardPda/MESApplication/Controllers/BasicData/ShipmentNoticeController.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-锘縰sing System.Dynamic;
-using MES.Service.Modes;
-using MES.Service.service.BasicData;
-using MES.Service.util;
-using Microsoft.AspNetCore.Mvc;
-
-namespace MESApplication.Controllers.BasicData;
-
-[ApiController]
-[Route("api/[controller]")]
-public class ShipmentNoticeController : ControllerBase
-{
- private readonly ShipmentNoticeManager m = new();
-
-
- /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
-
- /// <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] ShipmentNotice 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] ShipmentNotice 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] ShipmentNotice 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);
- }
- }
-}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/BasicData/SysDepartmentController.cs b/StandardPda/MESApplication/Controllers/BasicData/SysDepartmentController.cs
index 7fff07b..4b5c2f1 100644
--- a/StandardPda/MESApplication/Controllers/BasicData/SysDepartmentController.cs
+++ b/StandardPda/MESApplication/Controllers/BasicData/SysDepartmentController.cs
@@ -1,4 +1,5 @@
锘縰sing System.Dynamic;
+using Masuit.Tools;
using MES.Service.Dto.webApi;
using MES.Service.Modes;
using MES.Service.service;
@@ -32,6 +33,7 @@
entity.Data = JsonConvert.SerializeObject(unit);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = unit.FNumber;
try
{
dynamic resultInfos = new ExpandoObject();
@@ -75,6 +77,7 @@
entity.Data = JsonConvert.SerializeObject(units);
entity.Status = 1;
entity.CreateBy = "PL017";
+ entity.Route = units.Select(it => it.FNumber).Join(",");
try
{
dynamic resultInfos = new ExpandoObject();
--
Gitblit v1.9.3