From 0a56001e1b8e9ae7d2f39c982912cd6d10c22032 Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期二, 06 二月 2024 11:35:20 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/项目管理/工作任务/PM_WorkTaskBillController.cs |   74 ++++++++++++++++++++++++++++++++-----
 1 files changed, 64 insertions(+), 10 deletions(-)

diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs"
index bdc1de9..f63d04c 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\344\275\234\344\273\273\345\212\241/PM_WorkTaskBillController.cs"
@@ -65,7 +65,6 @@
             public string HMainSourceBillNo;
             public string HMainSourceBillType;
             public int HOrderLevID;
-            public int HHasten;
         }
         #endregion
 
@@ -184,7 +183,7 @@
                 string HMainSourceBillNo = mainList[0].HMainSourceBillNo;
                 string HMainSourceBillType = mainList[0].HMainSourceBillType;
                 int HOrderLevID = mainList[0].HOrderLevID;
-                int HHasten = mainList[0].HHasten;
+
 
 
                 if (OperationType == 2)
@@ -206,7 +205,7 @@
                 {
                     string sql = "insert into PM_WorkTaskBillMain" +
                         "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" +
-                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID,HHasten)" +
+                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID)" +
                         "values(" +
                         "" + HYear +
                         "," + HPeriod +
@@ -227,7 +226,7 @@
                         "','" + HReceiveEmp +
                         "','" + HType +
                         "','" + HCopyEmp +
-                        "','" + HRemark + 
+                        "','" + HRemark +
                         "'," + HOrgID +
                         ",'" + HMaker +
                         "','" + HMakerDate +
@@ -235,8 +234,7 @@
                         "," + HMainSourceEntryID +
                         ",'" + HMainSourceBillNo +
                         "','" + HMainSourceBillType +
-                        "','" + HOrderLevID +
-                        "','" + HHasten +
+                        "','" + HOrderLevID  +
                         "')";
 
                     //涓昏〃
@@ -273,8 +271,7 @@
                         ",HMainSourceEntryID = " + HMainSourceEntryID +
                         ",HMainSourceBillNo = '" + HMainSourceBillNo +
                         "',HMainSourceBillType = '" + HMainSourceBillType +
-                        "',HOrderLevID  = '" + HOrderLevID +
-                        "',HHasten  = '" + HHasten +
+                        "',HOrderLevID  = '" + HOrderLevID  +
                         "' where HInterID = " + HInterID;
 
                     oCN.RunProc(sql);
@@ -288,7 +285,7 @@
                 {
                     string sql = "insert into PM_WorkTaskBillMain" +
                         "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" +
-                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID,HHasten )" +
+                        ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID )" +
                         "values(" +
                         "" + HYear +
                         "," + HPeriod +
@@ -318,7 +315,6 @@
                         ",'" + HMainSourceBillNo +
                         "','" + HMainSourceBillType +
                         "','" + HOrderLevID +
-                        "','" + HHasten +
                         "')";
                     //涓昏〃
                     oCN.RunProc(sql);
@@ -1170,6 +1166,64 @@
         }
         #endregion
 
+        #region 宸ヤ綔浠诲姟  鍌績娆℃暟鍔熻兘
+        [Route("PM_WorkTaskBill/UpdateHHasten")]
+        [HttpGet]
+        public object UpdateHHasten(string HInterID, int HHasten, string user)
+        {
+            try
+            {
+
+                if (string.IsNullOrWhiteSpace(HInterID))
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "HInterID涓虹┖锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+
+                ClsPub.CurUserName = user;
+                BillOld.MvarItemKey = "PM_WorkTaskBillMain";
+                oCN.BeginTran();//寮�濮嬩簨鍔�
+
+                DataSet ds;
+                string sql = "select * from PM_WorkTaskBillMain  where HinterID = " + HInterID;
+                ds = oCN.RunProcReturn(sql, "PM_WorkTaskBillMain");
+                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
+                {
+                    string sql1 = "update PM_WorkTaskBillMain  set   HHasten='"+ HHasten+ "' where HinterID = " + HInterID;
+                    ds = oCN.RunProcReturn(sql1, "PM_WorkTaskBillMain");
+                }
+
+                oCN.Commit();//鎻愪氦浜嬪姟
+
+                objJsonResult.code = "0";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鎵ц鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult; ;
+
+            }
+            catch (Exception e)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
+
         #region 浠诲姟姹囨姤 鏂板/缂栬緫-淇濆瓨
         #region 浠诲姟姹囨姤 琛ㄥご鏁版嵁
         public class PM_WorkTaskReportBill_Main

--
Gitblit v1.9.1