From 58325c8fff4501ac288e593fa2659e400ca6d011 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 13 十一月 2024 14:16:16 +0800
Subject: [PATCH] 批量驳回

---
 WebAPI/Controllers/数据同步/钉钉同步/DD_DataSynchronizationController.cs |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git "a/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs" "b/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs"
index 4bb6860..e4a1e66 100644
--- "a/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs"
+++ "b/WebAPI/Controllers/\346\225\260\346\215\256\345\220\214\346\255\245/\351\222\211\351\222\211\345\220\214\346\255\245/DD_DataSynchronizationController.cs"
@@ -75,7 +75,7 @@
         private string AppKey = "dingiokapm2dvjrhzl2g";                                                                             //宸插垱寤虹殑浼佷笟鍐呴儴搴旂敤鐨凙ppKey銆�
         private string AppSecret = "dPUD7tN3BGVYAC4lDzhpcBH7O4FWFDdjLJWa6cVRBQj5U7GJ4Gwr7Vohnv0oPBOr";                             //宸插垱寤虹殑浼佷笟鍐呴儴搴旂敤鐨凙ppSecret銆�
         private long AgentID = 3188176952;                                                                                          //搴旂敤鐨凙gentId
-        private string accessToken = "";                                                                                           //璋冪敤璇ユ帴鍙g殑璁块棶鍑瘉銆�
+        public string accessToken = "";                                                                                           //璋冪敤璇ユ帴鍙g殑璁块棶鍑瘉銆�
         private string ProcessInstanceId = "";                                                                                     //瀹℃壒瀹炰緥ID銆�
         #endregion
 
@@ -527,9 +527,9 @@
 
                 //TaskId = "12",                                                                                                //浠诲姟ID銆�
                 //CreateFromTimeGMT = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd"),                                          //鍒涘缓鏃堕棿璧峰鍊笺��
-                //CreateToTimeGMT = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd hh:mm:ss"),                                               //鍒涘缓鏃堕棿缁堟鍊笺��
+                //CreateToTimeGMT = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"),                                               //鍒涘缓鏃堕棿缁堟鍊笺��
                 ModifiedFromTimeGMT = DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd"),                                          //淇敼鏃堕棿璧峰鍊笺��
-                ModifiedToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss"),                                               //淇敼鏃堕棿缁堟鍊笺��
+                ModifiedToTimeGMT = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),                                               //淇敼鏃堕棿缁堟鍊笺��
 
                 PageSize = pageSize,                                                  //鍒嗛〉澶у皬銆�
                 PageNumber = pageNumber,                                                 //鍒嗛〉椤电爜
@@ -2074,7 +2074,7 @@
 
                             if (getInstanceByIdResponse.Body.InstanceStatus != "COMPLETED")
                             {
-                                //continue;
+                                continue;
                             }
 
                             //寮�鍗曟棩鏈�
@@ -2168,7 +2168,7 @@
                             if (keys.Contains("selectField_lq3idkvg"))
                             {
                                 string HDate_Temp = response.Body.Result[i].FormData["selectField_lq3idkvg"].ToString();
-                                DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock)  where HNumber='" + HDate_Temp + "'", "Gy_MouldFileMain");
+                                DataSet ds = oCN.RunProcReturn("select * from Gy_MouldFileMain with(nolock)  where HMouldNo='" + HDate_Temp + "'", "Gy_MouldFileMain");
                                 string HMouldID = "0";
                                 if (ds.Tables[0].Rows.Count > 0)
                                 {
@@ -2182,7 +2182,7 @@
                                 ds = oCN.RunProcReturn(@"select  a.HInterID,a.HBillNo from  Sc_MouldMaintainPlanBillMain a
                                     inner join Sc_MouldMaintainPlanBillSub b on a.HInterID = b.HInterID
                                     where a.HMouldID =" + oItem.HMouldID + " and a.HMaintainLevID = " + oItem.HMaintainLevID, "Sc_MouldMaintainPlanBillMain");
-
+                                oItem.HPlanInterID = "";
                                 if (ds.Tables[0].Rows.Count > 0) {
                                     oItem.HPlanInterID = ds.Tables[0].Rows[0]["HInterID"].ToString();
                                     oItem.HPlanNo = ds.Tables[0].Rows[0]["HInterID"].ToString();
@@ -2404,18 +2404,18 @@
                             string sql_main = "Insert Into Sc_MouldMaintainBillMain " +
                 "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMaker,HMakeDate" +
                 ",HYear,HPeriod,HRemark,HUpDateDate" +
-                ",HPlanNo,HPlanInterID,HMouldID,HBeginDate" +
+                ",HMouldID,HBeginDate" +
                 ",HEndDate" +
-                ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HMaintainLevID,HLastResult" +
+                ",HInnerBillNo,HExplanation,HMouldMaintainRuleInterID,HLastResult" +
                 ",HRequestComDate,HRecentMainModule,HCumulativeModule,HProductionModule" +
                 ",HPlanInterID,HPlanNo,HMaintainLevID)" +
                 "values('" + BillType + "','" + BillType + "'," + HInterID + ",'" + oItem.HBillNo + "','"+ oItem.HDate + "','" + oItem.HOriginator + "','" + oItem.HMakeDate + "'" +
                       ",'" + DateTime.Now.Year + "','" + DateTime.Now.Month + "','"+ oItem.HRemark + "','" + oItem.HUpdateDate + "'" +
-                      ",'','0','" + oItem.HMouldID + "','" + oItem.HRepairBeginDate + "'" +
+                      ",'" + oItem.HMouldID + "','" + oItem.HRepairBeginDate + "'" +
                       ",'" + oItem.HRepairEndDate + "'" +
-                      ",'" + oItem.HInstanceID + "','',"+ HMouldMaintainRuleInterID + ",0,'OK'" +
+                      ",'" + oItem.HInstanceID + "','',"+ HMouldMaintainRuleInterID + ",'OK'" +
                       ",'"+ oItem.HRequestComDate + "'," + oItem.HRecentMainModule + "," + oItem.HCumulativeModule + "," + oItem.HProductionModule + "" +
-                      "," + oItem.HPlanInterID + "," + oItem.HPlanNo + "," + oItem.HMaintainLevID + ")";
+                      "," + (oItem.HPlanInterID == "" ? "0" : oItem.HPlanInterID) + ",'" + oItem.HPlanNo + "'," + oItem.HMaintainLevID + ")";
                             LogService.Write(sql_main);
                             oCN.RunProc(sql_main);
                             int i = 1;
@@ -2562,9 +2562,9 @@
                                 continue;
                             }
 
-                            if (oItem.HInstanceID != "9b6e108c-b7bf-45e4-910d-5629ac30d4aa") {
-                                continue;
-                            }
+                            //if (oItem.HInstanceID != "9b6e108c-b7bf-45e4-910d-5629ac30d4aa") {
+                            //    continue;
+                            //}
 
                             //璁惧缂栫爜
                             if (keys.Contains("textField_lfg9hgys"))

--
Gitblit v1.9.1