From c5a629655949aa14868b66e8517e6c5505b2ad8a Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 07 三月 2024 10:26:41 +0800
Subject: [PATCH] 工序工价新增字段;PDA 设备,质量模块查询列表

---
 WebAPI/Controllers/品质管理/工序检验单/MES_ProcessCheckBill_PDAController.cs |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/MES_ProcessCheckBill_PDAController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/MES_ProcessCheckBill_PDAController.cs"
index 75b3772..8422d60 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/MES_ProcessCheckBill_PDAController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\345\267\245\345\272\217\346\243\200\351\252\214\345\215\225/MES_ProcessCheckBill_PDAController.cs"
@@ -68,6 +68,10 @@
                 bool HLastResult = list[0].HLastResult;//璇曟牱缁撹
                 Int64 HProcExchInterID = list[0].HProcExchInterID;//鎸囧紩鍗D
                 Int64 HProcExchEntryID = list[0].HProcExchEntryID;//鎸囧紩鍗″瓙ID
+                long HMainSourceInterID = list[0].HMainSourceInterID;//婧愬崟ID
+                long HMainSourceEntryID = list[0].HMainSourceEntryID;//婧愬崟瀛怚D
+                string HMainSourceBillNo = list[0].HMainSourceBillNo;//婧愬崟鍗曞彿
+                string HMainSourceBillType = list[0].HMainSourceBillType;//婧愬崟绫诲瀷
 
                 //琛ㄤ綋鏁版嵁
                 List<Model.ClsQC_ProcessCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_ProcessCheckBillSub>>(msg_entry);
@@ -154,10 +158,11 @@
                     oCN.RunProc("Insert Into QC_ProcessCheckBillMain " +
                     "(HBillType,HBillSubType,HInterID,HBillNo,HBillStatus,HDate,HMaker,HMakeDate" +
                     ",HYear,HPeriod,HMaterID,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HProcExchBillNo" +
-                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HProcID)" +
+                    ",HPRDORGID,HLastResult,HProcExchInterID,HProcExchEntryID,HProcID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType)" +
                     " values('" + BillType + "','" + HBillSubType + "'," + HInterID + ",'" + HBillNo + "'," + HBillStatus + ",getdate(),'" + HMaker + "',getdate()" +
                     "," + HYear + "," + HPeriod + ",'" + HMaterID + "','" + HSourceID + "'," + HICMOInterID + "," + HICMOEntryID + ",'" + HICMOBillNo + "','" + HProcExchBillNo + "'" +
-                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HProcID + ") ");
+                    "," + HPRDORGID + ",'" + HLastResult + "'," + HProcExchInterID + "," + HProcExchEntryID + "," + HProcID + "," + HMainSourceInterID +
+                    "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'" + ") ");
 
                     //鎻掑叆瀛愯〃
                     foreach (Model.ClsQC_ProcessCheckBillSub oSub in BillNew.DetailColl)
@@ -169,8 +174,8 @@
                           ",HQCCheckClassID,HQCCheckItemID,HQCStd,HQCRelValue,HResult" +
                           ",HProcCheckEmp,HProcCheckTime,HStatus,HUnitID,HKeyInspect,HAnalysisMethod,HInspectInstruMentID,HInspectResult" +
                           ") values("
-                          + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() +  ",'" + oSub.HRemark + "'," + HICMOInterID.ToString() +
-                          "," + HICMOEntryID.ToString() + ",'" + HICMOBillNo + "','" + oSub.HSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
+                          + HInterID.ToString() + ",'" + oSub.HBillNo_bak + "'," + oSub.HEntryID.ToString() +  ",'" + oSub.HRemark + "'," + HMainSourceInterID.ToString() +
+                          "," + HMainSourceEntryID.ToString() + ",'" + HMainSourceBillNo + "','" + HMainSourceBillType + "'," + oSub.HRelationQty.ToString() + "," + oSub.HRelationMoney.ToString() +
                           "," + oSub.HQCCheckClassID.ToString() + "," + oSub.HQCCheckItemID.ToString() + ",'" + oSub.HQCStd + "','" + oSub.HQCRelValue + "','" + oSub.HResult + "'" +
                           "," + oSub.HProcCheckEmp.ToString() + ",GETDATE()"  + ",'"  + oSub.HStatus +
                           "'," + oSub.HUnitID + "," + oSub.HKeyInspect + ",'" + oSub.HAnalysisMethod + "'," + oSub.HInspectInstruMentID + ",'" + oSub.HInspectResult + "'"  +
@@ -225,6 +230,13 @@
                     return objJsonResult;
                 }
 
+                ds = oCN.RunProcReturn("select ManagerFlag from gy_czygl where czymc='" + user.Trim() + "'", "gy_czygl");
+                if (!(bool)ds.Tables[0].Rows[0]["ManagerFlag"])  //鏄惁绠$悊鍛�
+                {
+                    //涓嶆槸绠$悊鍛�
+                    sWhere += " and 鍒跺崟浜� = '" + user + "'";
+                }
+
                 string sql = "select * from  h_v_QC_ProcessCheckBillMainList where 1=1  " + sWhere + " order by 鏃ユ湡 ";
 
                 ds = oCN.RunProcReturn(sql, "h_v_QC_ProcessCheckBillMainList");

--
Gitblit v1.9.1