From f4289ddc9cd67a8457574a8a25688c89565dc613 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 29 十二月 2023 17:44:05 +0800
Subject: [PATCH] 同步生产汇报单时新增 班组,操作员 字段;删除生产汇报单时写入日志;排产模块增加工艺路线按钮

---
 WebAPI/Controllers/SCGL/日计划管理/JIT_DayPlanPlatFormBillController.cs |   57 ++++++++++++++++++++++++++++
 WebAPI/DLL/ClsSc_ICMOReportBill.cs                                 |    4 +
 WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs             |   15 +++++++
 WebAPI/Models/json.cs                                              |    1 
 4 files changed, 76 insertions(+), 1 deletions(-)

diff --git a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
index 16ac943..213f42b 100644
--- a/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ICMOReportBillController.cs
@@ -493,7 +493,22 @@
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
+                ds = oCN.RunProcReturn("select * from Sc_ICMOReportBillMain where HInterID=" + lngBillKey, "Sc_ICMOReportBillMain");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "娌℃湁鏁版嵁锛屾棤娉曞垹闄わ紒";
+                    objJsonResult.data = null;
+                    return objJsonResult; ;
+                }
+
+                oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + "" + "','" + "鍒犻櫎鐢熶骇姹囨姤鍗曞崟鎹細" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','LMES-鐢熶骇姹囨姤鍗曟ā鍧�','" + DBUtility.ClsPub.IPAddress + "','鍒犻櫎鍗曟嵁'", ref DBUtility.ClsPub.sExeReturnInfo);
+
+
                 bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo);
+
+
                 if (IsDete)
                 {
                     objJsonResult.code = "0";
diff --git "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs" "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
index 0b956a5..c362c5f 100644
--- "a/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
+++ "b/WebAPI/Controllers/SCGL/\346\227\245\350\256\241\345\210\222\347\256\241\347\220\206/JIT_DayPlanPlatFormBillController.cs"
@@ -2713,5 +2713,62 @@
         }
         #endregion
 
+        #region 鏍规嵁鐗╂枡ID鑾峰彇宸ヨ壓璺嚎 鍒楄〃
+        [Route("JIT_DayPlanPlatFormBill/GetRoutingListByMater")]
+        [HttpGet]
+        public object GetRoutingListByMater(int HMaterID, string user)
+        {
+            try
+            {
+                List<object> columnNameList = new List<object>();
+
+                int IsHavingPermissions = 1;
+
+                //鍒ゆ柇鏄惁鏈夊伐鑹鸿矾绾跨紪杈戞潈闄�
+                if (!DBUtility.ClsPub.Security_Log("Gy_RoutingBill_Edit", 1, false, user))
+                {
+                    IsHavingPermissions = 0;
+                }
+
+                ds = oCN.RunProcReturn("select * from  h_v_JIT_GetRoutingList_Mater where HMaterID = " + HMaterID , "h_v_JIT_GetRoutingList_Mater");
+
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "褰撳墠鐗╂枡娌℃湁缁存姢宸ヨ壓璺嚎锛佽鑱旂郴璁″垝閮ㄨ繘琛岀淮鎶�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.IsHavingPermissions = IsHavingPermissions;
+                    return objJsonResult;
+                }
+                else
+                {
+                    //娣诲姞鍒楀悕
+                    foreach (DataColumn col in ds.Tables[0].Columns)
+                    {
+                        Type dataType = col.DataType;
+                        string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                        columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                    }
+
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "Sucess锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
+                    objJsonResult.IsHavingPermissions = IsHavingPermissions;
+                    return objJsonResult;
+                }
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "Exception锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file
diff --git a/WebAPI/DLL/ClsSc_ICMOReportBill.cs b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
index 008a29e..80e3a4e 100644
--- a/WebAPI/DLL/ClsSc_ICMOReportBill.cs
+++ b/WebAPI/DLL/ClsSc_ICMOReportBill.cs
@@ -425,8 +425,10 @@
                         FentityModel.Add("FBASEFINISHQTY", item["FBASEFINISHQTY"].ToString());//鍩烘湰鍗曚綅瀹屾垚鏁伴噺
                         FentityModel.Add("FFINISHQTY", item["FFINISHQTY"].ToString());//瀹屾垚鏁伴噺
                         FentityModel.Add("FLot", new JObject() { ["FNumber"] = item["FLot"].ToString() });//鎵瑰彿
+                        FentityModel.Add("FShiftGroupId", new JObject() { ["FNumber"] = item["FShiftGroupId"].ToString() });//鐝粍
+                        FentityModel.Add("F_UUBK_CZG1", new JObject() { ["FSTAFFNUMBER"] = item["F_UUBK_CZG1"].ToString() });// 鎿嶄綔鍛�
                         FentityModel.Add("FBOMID", new JObject() { ["FNumber"] = item["FBOMID"].ToString() });// BOM鐗堟湰
-                        
+
                         //sJson_BatchNo +
                         //sJson_StockPlace +
                         //" \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}}," +
diff --git a/WebAPI/Models/json.cs b/WebAPI/Models/json.cs
index edf95f6..14121c4 100644
--- a/WebAPI/Models/json.cs
+++ b/WebAPI/Models/json.cs
@@ -15,5 +15,6 @@
         public Dictionary<object, object> Dictlist { get; set; }
         public string Verify { get; set; }
         public string HInterID { get; set; }
+        public int IsHavingPermissions { get; set; }
     }
 }

--
Gitblit v1.9.1