From 25bf838d771f7f1ab2773c58da76df51329e7dcc Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期四, 24 八月 2023 15:00:51 +0800
Subject: [PATCH] 1

---
 WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
index e393046..4c7b4ce 100644
--- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
+++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs"
@@ -93,6 +93,7 @@
                 BillNew.omodel.HMainSourceEntryID = ClsPub.isLong(mainList[0].HMainSourceEntryID);
                 BillNew.omodel.HMainSourceBillNo = ClsPub.isStrNull(mainList[0].HMainSourceBillNo);
                 BillNew.omodel.HMainSourceBillType = ClsPub.isStrNull(mainList[0].HMainSourceBillType);
+                BillNew.omodel.HQCSchemeID = ClsPub.isLong(mainList[0].HQCSchemeID);                
                 BillNew.omodel.HBillStatus = 1;
                 List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg3);
                 BillNew.DetailColl = new List<Model.ClsQC_FirstPieceCheckBillSub>();
@@ -138,6 +139,8 @@
                         oSub.HDownOffSet= DBUtility.ClsPub.isStrNull(subList[i].HDownOffSet);
                         oSub.HAnalysisMethod = DBUtility.ClsPub.isStrNull(subList[i].HAnalysisMethod);
                         oSub.HKeyInspect = DBUtility.ClsPub.isLong(subList[i].HKeyInspect);
+                        oSub.HInspectInstruMentID = DBUtility.ClsPub.isLong(subList[i].HInspectInstruMentID);
+                        oSub.HInspectResult = DBUtility.ClsPub.isStrNull(subList[i].HResult);
                         BillNew.DetailColl.Add(oSub);
                     }
                     else
@@ -259,7 +262,7 @@
 
 
                 List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid> valueList = new List<Model.ClsQC_FirstPieceCheckBillSub_ValueGrid>();
-                valueList = oListModels.getObjectByJson_ClsClsQC_FirstPieceCheckBillSub_ValueGrid(Value);
+                valueList = oListModels.getObjectByJson_ClsQC_FirstPieceCheckBillSub_ValueGrid(Value);
 
                 DAL.ClsQC_FirstPieceCheckBill BillNew = new DAL.ClsQC_FirstPieceCheckBill();
 
@@ -272,7 +275,7 @@
                         oSub_Value.HEntryID = HEntryID;
                         oSub_Value.HSEQ = i + 1;
                         oSub_Value.HInSpectResult = ClsPub.isStrNull(valueList[i].HInSpectResult);
-                        oSub_Value.HInSpectValue = ClsPub.isLong(valueList[i].HInSpectValue);
+                        oSub_Value.HInSpectValue = ClsPub.isDoule(valueList[i].HInSpectValue);
                         oSub_Value.HInSpectValueB = ClsPub.isLong(valueList[i].HInSpectValueB);
                         oSub_Value.HInSpectValueT = ClsPub.isStrNull(valueList[i].HInSpectValueT);
 
@@ -331,8 +334,17 @@
             try
             {              
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+                List<object> columnNameList = new List<object>();
 
                 ds = oCN.RunProcReturn("select * from QC_FirstPieceCheckBillSub_ValueGrid  where  HInterID="+ HInterID + " and HEntryID="+ HEntryID, "h_v_QC_FirstPieceCheckBillList");
+
+                //娣诲姞鍒楀悕
+                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鍒楀璞$殑鍒楀悕
+                }
 
                 if (ds.Tables[0].Rows.Count > 0)
                 {
@@ -340,13 +352,14 @@
                     objJsonResult.count = 1;
                     objJsonResult.Message = "Sucess锛�";
                     objJsonResult.data = ds.Tables[0];
+                    objJsonResult.list = columnNameList;
                     return objJsonResult;
                 }
                 else
                 {
                     objJsonResult.code = "0";
                     objJsonResult.count = 0;
-                    objJsonResult.Message = "娌℃湁鏌ヨ鍒版暟鎹紒";
+                    objJsonResult.Message = "鏃犳娴嬪�兼暟鎹紒";
                     objJsonResult.data = ds.Tables[0];
                     return objJsonResult;
                 }

--
Gitblit v1.9.1