From 4848a8724265619a07ff6ef5370988556dba2efc Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期一, 17 二月 2025 17:02:24 +0800
Subject: [PATCH] 检验方案 表头增加字段  生产资源HSoucID

---
 WebAPI/Controllers/BLL/Xt_UserController.cs |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/WebAPI/Controllers/BLL/Xt_UserController.cs b/WebAPI/Controllers/BLL/Xt_UserController.cs
index 04cbab1..3ec6fa1 100644
--- a/WebAPI/Controllers/BLL/Xt_UserController.cs
+++ b/WebAPI/Controllers/BLL/Xt_UserController.cs
@@ -221,20 +221,31 @@
                         return objJsonResult;
                     }
 
+                    //鍒ゆ柇鐢ㄦ埛鏁版槸鍚﹀ぇ浜庡鎴疯处鍙锋暟
+                    ds = oCN.RunProcReturn("Exec h_p_Xt_BaseInfo ", "h_p_Xt_BaseInfo");
+                    if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString();
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
                     oCN.RunProc("insert into Gy_Czygl (Czybm,Czymc,Czmm,Explain,HempID,HK3UserID " +
                     ",HKeeperID,HKeeper,HSecManagerID,HSecManager " +
                     ",HSellManID,HSellMan,HDeptID,HDept " +
                     ",HWhID,HWHName,HSupID,HSupName " +
                     ",HSCWHID,HSCWHName " +
                     ",HCloudUserName,HCloudUserPsd,HUSEORGID,HProcID" +
-                    ",HGroupID,HSourceID,HCheckEmpID,HWorkCenterID,HICNumber) " +
+                    ",HGroupID,HSourceID,HCheckEmpID,HWorkCenterID,HICNumber,HDingDingUserID) " +
                     "values ('" + lsmain[0].Czybm.ToString() + "','" + lsmain[0].Czymc.ToString() + "','" + ClsPub.StrToPsd(lsmain[0].Czmm.ToString()) + "','" + lsmain[0].Explain.ToString() + "','" + lsmain[0].HEmpID.ToString() + "',"+ lsmain[0].HK3UserID.ToString() + "" +
                     ","+ lsmain[0].HKeeperID.ToString() + ",'"+ lsmain[0].HKeeper.ToString() + "',"+ lsmain[0].HSecManagerID.ToString() + ",'"+ lsmain[0].HSecManager.ToString() + "'" +
                     "," + lsmain[0].HSellManID.ToString() + ",'" + lsmain[0].HSellMan.ToString() + "'," + lsmain[0].HDeptID.ToString() + ",'" + lsmain[0].HDept.ToString() + "'" +
                     "," + lsmain[0].HWhID.ToString() + ",'" + lsmain[0].HWHName.ToString() + "'," + lsmain[0].HSupID.ToString() + ",'" + lsmain[0].HSupName.ToString() + "'" +
                     "," + lsmain[0].HSCWHID.ToString() + ",'" + lsmain[0].HSCWHName.ToString() + "'" + 
                     ",'" + lsmain[0].HCloudUserName.ToString() + "','" + lsmain[0].HCloudUserPsd.ToString() + "',"+ lsmain[0].HOrgID.ToString() + "," + lsmain[0].HProcID.ToString() + "" +
-                    ","+ lsmain[0].HGroupID.ToString() + ","+ lsmain[0].HSourceID.ToString() + "," + lsmain[0].HCheckEmpID.ToString() + "," + lsmain[0].HWorkCenterID.ToString() + ",'" + lsmain[0].HICNumber + "'" + ")");
+                    ","+ lsmain[0].HGroupID.ToString() + ","+ lsmain[0].HSourceID.ToString() + "," + lsmain[0].HCheckEmpID.ToString() + "," + lsmain[0].HWorkCenterID.ToString() + ",'" + lsmain[0].HICNumber + "','" + lsmain[0].HDingDingUserID + "'" + ")");
 
                     //鏂板鍚庢煡璇�  纭繚鏁版嵁娣诲姞鎴愬姛
                     ds = oCN.RunProcReturn("Select * from  Gy_Czygl where Czybm='" + lsmain[0].Czybm.ToString() + "'", "Gy_Czygl");
@@ -260,6 +271,17 @@
                 }
                 else //淇敼
                 {
+                    //鍒ゆ柇鐢ㄦ埛鏁版槸鍚﹀ぇ浜庡鎴疯处鍙锋暟
+                    ds = oCN.RunProcReturn("Exec h_p_Xt_BaseInfo ", "h_p_Xt_BaseInfo");
+                    if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBack"]) != "0")
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = ds.Tables[0].Rows[0]["HBackRemark"].ToString();
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
+
                     ds = oCN.RunProcReturn("select * from  Gy_Czygl where Czybm='" + lsmain[0].Czybm.ToString() + "'", "Gy_Czygl");
                     if (ds.Tables[0].Rows[0]["Czmm"].ToString() !=  lsmain[0].Czmm)  //淇敼瀵嗙爜
                     {
@@ -291,6 +313,7 @@
                         ",HCloudUserPsd='" + lsmain[0].HCloudUserPsd.ToString() + "'" +
                         ",HUSEORGID=" + lsmain[0].HOrgID.ToString() +
                         ",HICNumber='" + lsmain[0].HICNumber + "'" +
+                        ",HDingDingUserID='" + lsmain[0].HDingDingUserID + "'" +
                         "  where  Czybm='" + lsmain[0].Czybm.ToString() + "'");
                     }
                     else
@@ -321,7 +344,8 @@
                            ",HCloudUserName='" + lsmain[0].HCloudUserName.ToString() + "'" +
                            ",HCloudUserPsd='" + lsmain[0].HCloudUserPsd.ToString() + "'" +
                            ",HUSEORGID=" + lsmain[0].HOrgID.ToString() +
-                            ",HICNumber='" + lsmain[0].HICNumber + "'" +
+                           ",HICNumber='" + lsmain[0].HICNumber + "'" +
+                           ",HDingDingUserID='" + lsmain[0].HDingDingUserID + "'" +
                            "  where  Czybm='" + lsmain[0].Czybm.ToString() + "'");
                     }
 

--
Gitblit v1.9.1