From e157f39528700e7a06d0fa5cb577ce0b04a63a0f Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期五, 27 八月 2021 17:29:30 +0800
Subject: [PATCH] nothing

---
 WebAPI/Controllers/生产管理/质量汇报单/Sc_QualityReportBillController.cs |  101 ++++++++++++++++----------------------------------
 1 files changed, 33 insertions(+), 68 deletions(-)

diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
index 3c61d63..7d70a87 100644
--- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
+++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\350\264\250\351\207\217\346\261\207\346\212\245\345\215\225/Sc_QualityReportBillController.cs"
@@ -29,13 +29,13 @@
             {
                 if (sWhere == null || sWhere.Equals(""))
                 {
-                    ds = oCN.RunProcReturn("select * from h_v_Sc_QualityReportBillList " + sWhere, "h_v_Sc_QualityReportBillList");
+                    ds = oCN.RunProcReturn("select * from h_v_Sc_QualityReportBillListDetail " + sWhere, "h_v_Sc_QualityReportBillListDetail");
                 }
                 else
                 {
-                    string sql1 = "select * from h_v_Sc_QualityReportBillList where 1 = 1 ";
+                    string sql1 = "select * from h_v_Sc_QualityReportBillListDetail where 1 = 1 ";
                     string sql = sql1 + sWhere;
-                    ds = oCN.RunProcReturn(sql, "h_v_Sc_QualityReportBillList");
+                    ds = oCN.RunProcReturn(sql, "h_v_Sc_QualityReportBillListDetail");
                 }
                 if (ds == null || ds.Tables[0].Rows.Count == 0)
                 {
@@ -117,7 +117,6 @@
         }
         #endregion
 
-
         #region 璐ㄩ噺姹囨姤鍗曟壂涓嶈壇鏉$爜淇濆瓨淇℃伅
         [Route("Sc_QualityReportBill/set_SaveBarCode")]
         [HttpPost]
@@ -132,19 +131,18 @@
         {
             string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
             string msg = sArray[0].ToString();
-            string msg3 = sArray[1].ToString();
-            string OperationType = sArray[2].ToString().Trim();
+            string OperationType = sArray[1].ToString().Trim();
             bool bResult;
             try
             {
                 msg = "[" + msg.ToString() + "]";
-                List<Model.ClsQC_FirstPieceCheckBillMain> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillMain>>(msg);
+                List<Model.ClsSc_ICMOBillQualityStatus_Tmp> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsSc_ICMOBillQualityStatus_Tmp>>(msg);
                 DAL.ClsQC_FirstPieceCheckBill BillNew = new DAL.ClsQC_FirstPieceCheckBill();
                 //鍒ゆ柇浼氳鏈熸槸鍚﹀悎鐞�
                 string s = "";
                 int sYear = 0;
                 int sPeriod = 0;
-                DateTime HDate = mainList[0].HDate;//鏃ユ湡
+                DateTime HDate = mainList[0].HMakeDate;
                 if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false)
                 {
                     objJsonResult.code = "0";
@@ -157,73 +155,40 @@
                 BillNew.omodel.HPeriod = sPeriod;
                 //鍥哄畾璧嬪��=================================
                 BillNew.omodel.HInterID = mainList[0].HInterID;//閫掑叆type寰楀埌鐨勫崟鎹甀D
-                BillNew.omodel.HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
-                BillNew.omodel.HDate = HDate;
-                BillNew.omodel.HRemark = mainList[0].HRemark;//澶囨敞
-                BillNew.omodel.HMaker = mainList[0].HMaker;
-                BillNew.omodel.HSourceID = ClsPub.isLong(mainList[0].HSourceID);
-                BillNew.omodel.HICMOInterID = ClsPub.isLong(mainList[0].HICMOInterID);
-                BillNew.omodel.HICMOBillNo = ClsPub.isStrNull(mainList[0].HICMOBillNo);
-                BillNew.omodel.HICMOInterID = ClsPub.isLong(mainList[0].HICMOInterID);
-                BillNew.omodel.HICMOQty = ClsPub.isLong(mainList[0].HICMOQty);
-                BillNew.omodel.HProcExchInterID = ClsPub.isLong(mainList[0].HProcExchInterID);
-                BillNew.omodel.HProcExchEntryID = ClsPub.isLong(mainList[0].HProcExchEntryID);
-                BillNew.omodel.HProcExchBillNo = ClsPub.isStrNull(mainList[0].HProcExchBillNo);
-                BillNew.omodel.HProcExchQty = ClsPub.isLong(mainList[0].HProcExchQty);
-                BillNew.omodel.HMaterID = ClsPub.isLong(mainList[0].HMaterID);
-                BillNew.omodel.HFirstCheckEmp = ClsPub.isLong(mainList[0].HFirstCheckEmp);
-                BillNew.omodel.HLastResult = ClsPub.isBool(mainList[0].HLastResult);
-                BillNew.omodel.HMainSourceInterID = ClsPub.isLong(mainList[0].HMainSourceInterID);
-                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.HBillNo = mainList[0].HBillNo;//閫掑叆type寰楀埌鐨勫崟鎹彿
+                //BillNew.omodel.HDate = HDate;
+                //BillNew.omodel.HRemark = mainList[0].HRemark;//澶囨敞
+                //BillNew.omodel.HMaker = mainList[0].HMaker;
+                //BillNew.omodel.HSourceID = ClsPub.isLong(mainList[0].HSourceID);
+                //BillNew.omodel.HICMOInterID = ClsPub.isLong(mainList[0].HICMOInterID);
+                //BillNew.omodel.HICMOBillNo = ClsPub.isStrNull(mainList[0].HICMOBillNo);
+                //BillNew.omodel.HICMOInterID = ClsPub.isLong(mainList[0].HICMOInterID);
+                //BillNew.omodel.HICMOQty = ClsPub.isLong(mainList[0].HICMOQty);
+                //BillNew.omodel.HProcExchInterID = ClsPub.isLong(mainList[0].HProcExchInterID);
+                //BillNew.omodel.HProcExchEntryID = ClsPub.isLong(mainList[0].HProcExchEntryID);
+                //BillNew.omodel.HProcExchBillNo = ClsPub.isStrNull(mainList[0].HProcExchBillNo);
+                //BillNew.omodel.HProcExchQty = ClsPub.isLong(mainList[0].HProcExchQty);
+                //BillNew.omodel.HMaterID = ClsPub.isLong(mainList[0].HMaterID);
+                //BillNew.omodel.HFirstCheckEmp = ClsPub.isLong(mainList[0].HFirstCheckEmp);
+                //BillNew.omodel.HLastResult = ClsPub.isBool(mainList[0].HLastResult);
+                //BillNew.omodel.HMainSourceInterID = ClsPub.isLong(mainList[0].HMainSourceInterID);
+                //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.HBillStatus = 1;
-                List<Model.ClsQC_FirstPieceCheckBillSub> subList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Model.ClsQC_FirstPieceCheckBillSub>>(msg3);
-                BillNew.DetailColl = new List<Model.ClsQC_FirstPieceCheckBillSub>();
-                for (int i = 0; i < subList.ToArray().Length; i++)
-                {
-                    if (i >= 0)//HQty
-                    {
-                        Model.ClsQC_FirstPieceCheckBillSub oSub = new Model.ClsQC_FirstPieceCheckBillSub();
-                        oSub.HEntryID = i + 1;
-                        oSub.HRemark = ClsPub.isStrNull(subList[i].HRemark);
-                        oSub.HSourceInterID = ClsPub.isLong(subList[i].HSourceInterID);
-                        oSub.HSourceEntryID = ClsPub.isLong(subList[i].HSourceEntryID);
-                        oSub.HSourceBillType = ClsPub.isStrNull(subList[i].HSourceBillType);
-                        oSub.HSourceBillNo = ClsPub.isStrNull(subList[i].HSourceBillNo);
-                        oSub.HRelationQty = DBUtility.ClsPub.isDoule(subList[i].HRelationQty);
-                        oSub.HRelationMoney = DBUtility.ClsPub.isDoule(subList[i].HRelationMoney);
-                        oSub.HCloseMan = DBUtility.ClsPub.isStrNull(subList[i].HCloseMan);
-                        oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(subList[i].HEntryCloseDate);
-                        oSub.HCloseType = DBUtility.ClsPub.isBool(subList[i].HCloseType);
-                        oSub.HQCCheckItemID = DBUtility.ClsPub.isLong(subList[i].HQCCheckItemID);
-                        oSub.HQCStd = DBUtility.ClsPub.isStrNull(subList[i].HQCStd);
-                        oSub.HUnit = DBUtility.ClsPub.isStrNull(subList[i].HUnit);
-                        oSub.HQCNote = DBUtility.ClsPub.isStrNull(subList[i].HQCNote);
-                        oSub.HResult = DBUtility.ClsPub.isStrNull(subList[i].HResult);
-                        oSub.HMax = DBUtility.ClsPub.isStrNull(subList[i].HMax);
-                        oSub.HMin = DBUtility.ClsPub.isStrNull(subList[i].HMin);
-                        oSub.HAvg = DBUtility.ClsPub.isStrNull(subList[i].HAvg);
-                        oSub.HBillNo_bak = DBUtility.ClsPub.isStrNull(mainList[0].HBillNo);
-                        BillNew.DetailColl.Add(oSub);
-                    }
-                    else
-                    {
-                        objJsonResult.code = "0";
-                        objJsonResult.count = 0;
-                        objJsonResult.Message = "鏃犳槑缁嗚淇℃伅!";
-                        objJsonResult.data = null;
-                        return objJsonResult;
-                    }
-                }
                 //淇濆瓨瀹屾瘯鍚庡鐞�
                 if (OperationType.Equals("1") || OperationType.Equals("2"))
                 {
                     bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo);
                 }
-                else
+                else if (OperationType.Equals("3"))
                 {
                     bResult = BillNew.ModifyBill(BillNew.omodel.HInterID, ref ClsPub.sExeReturnInfo);
+                }
+                else
+                {
+                    ClsPub.sExeReturnInfo = "鏃犳晥鐨勬搷浣滅被鍨嬶紒";
+                    bResult = false;
                 }
                 //鎻愮ず
                 if (bResult == true)
@@ -231,7 +196,7 @@
                     objJsonResult.code = "1";
                     objJsonResult.count = 1;
                     //objJsonResult.Message = "鍗曟嵁瀛樼洏瀹屾瘯!鍗曟嵁鍙�:" + mainList[0].HBillNo.Trim();
-                    objJsonResult.Message = ClsPub.sExeReturnInfo + "鍗曟嵁鍙�:" + mainList[0].HBillNo.Trim();
+                    objJsonResult.Message = ClsPub.sExeReturnInfo + "鍗曟嵁鍙�:" ;
                     objJsonResult.data = null;
                     return objJsonResult;
                 }

--
Gitblit v1.9.1