From c1baff1d0e27c57477e90bc91a28223e37491a9e Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期四, 30 十二月 2021 20:52:17 +0800
Subject: [PATCH] 盘点记录表

---
 WebAPI/Controllers/基础资料/基础资料/Gy_StockCheckItemBillController.cs |   95 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 92 insertions(+), 3 deletions(-)

diff --git "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs" "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
index 14262b3..573a432 100644
--- "a/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
+++ "b/WebAPI/Controllers/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_StockCheckItemBillController.cs"
@@ -278,7 +278,7 @@
                         left join Gy_Customer c1 on m.HNowSupID=c1.HItemID
                         left join Gy_Warehouse w on k.HCorrespondentID=w.HItemID
                         left join Gy_Warehouse w1 on m.HNowSupID=w1.HItemID
-						where " + sWhere);
+						where k.HBillType='3822' and " + sWhere);
                 }
                 else
                 {
@@ -296,7 +296,7 @@
                         left join Gy_Customer c1 on m.HNowSupID=c1.HItemID
                         left join Gy_Warehouse w on k.HCorrespondentID=w.HItemID
                         left join Gy_Warehouse w1 on m.HNowSupID=w1.HItemID
-						where " + sWhere + " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ")");
+						where k.HBillType='3822' and " + sWhere + " and k.HSourceInterID=(select HItemID from Gy_StockCheckItem where HItemID=" + sID + ") and k.HMakeDate<=(select HEndDate from Gy_StockCheckItem where HItemID=" + sID + ")");
                 }
                 ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain_Temp");
                 list.Add(ds.Tables[0]);
@@ -317,9 +317,98 @@
         }
         #endregion
 
+        
+        #region 鐩樼偣璁板綍鍒楄〃
+        [Route("Gy_StockCheckItemBill/Get_MouldStockBillMainTemp")]
+        [HttpGet]
+        public object Get_MouldStockBillMainTemp(string sWhere)
+        {
+            try
+            {
+                ds = MouldStockBillMainTemp(sWhere);
+                if (ds == null)
+                {
+                    objJsonResult.code = "0";
+                    objJsonResult.count = 0;
+                    objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�";
+                    objJsonResult.data = null;
+                    return objJsonResult;
+                }
+                else
+                {
+                    objJsonResult.code = "1";
+                    objJsonResult.count = 1;
+                    objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
+                    objJsonResult.data = ds.Tables[0];
+                    return objJsonResult;
+                }
+            }
+            catch (Exception ex)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鏌ヨ鏁版嵁寮傚父锛岃涓庣鐞嗗憳鑱旂郴锛�" + ex.ToString();
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+        }
+
+        public static DataSet MouldStockBillMainTemp(string sWhere)
+        {
+            string sql1 = string.Format(@"select * from h_v_Gy_MouldStockBillMainTempList where 1=1 ");
+            if (sWhere == null || sWhere.Equals(""))
+            {
+                return new SQLHelper.ClsCN().RunProcReturn(sql1 + sWhere + " order by 鍒跺崟鏃ユ湡 desc", "h_v_Gy_MouldStockBillMainTempList");
+            }
+            else
+            {
+                string sql = sql1 + sWhere + "order by 鍒跺崟鏃ユ湡 desc";
+                return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Gy_MouldStockBillMainTempList");
+            }
+        }
+        #endregion
+
+        #region [鐩樼偣鏂规鍒犻櫎鍔熻兘]
+        [Route("Gy_StockCheckItemBill/set_DeleteBill_Temp")]
+        [HttpGet]
+        public object set_DeleteBill_Temp(string HItemID)
+        {
+            Int64 lngBillKey = 0;
+            lngBillKey = DBUtility.ClsPub.isLong(HItemID);
+            if (lngBillKey == 0)
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "鍗曟嵁ID涓虹┖锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            ds = oCn.RunProcReturn("select * from Sc_MouldStockBillMain_Temp where HItemID=" + lngBillKey, "Sc_MouldStockBillMain_Temp");
+            if (ds != null)
+            {
+                oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HItemID=" + lngBillKey);
+                objJsonResult.code = "1";
+                objJsonResult.count = 1;
+                objJsonResult.Message = "鍒犻櫎鎴愬姛锛�";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+            else
+            {
+                objJsonResult.code = "0";
+                objJsonResult.count = 0;
+                objJsonResult.Message = "姝ゅ崟鎹笉瀛樺湪锛岃鏌ョ湅鏄惁閲嶅鍒犻櫎";
+                objJsonResult.data = null;
+                return objJsonResult;
+            }
+
+        }
+
+        #endregion
+
         #region 鐩樼偣鍒嗘瀽瀹℃牳
         #region 璋冩嫧鈥旂洿鎺ヨ皟鎷�
-            [Route("Gy_StockCheckItemBill/MakeProdMove")]
+        [Route("Gy_StockCheckItemBill/MakeProdMove")]
             [HttpGet]
             public object MakeProdMove(string HBarCode, string user, string userID)
         {

--
Gitblit v1.9.1