From a5e3cae8ab6c4635c316ea0d3a2cfe6b200e0f78 Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期三, 30 六月 2021 15:43:21 +0800
Subject: [PATCH] 新增模具维修记录单

---
 WebAPI/Controllers/MoveStockBillController.cs |   33 ++++++++++++++++++++++++---------
 1 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/WebAPI/Controllers/MoveStockBillController.cs b/WebAPI/Controllers/MoveStockBillController.cs
index 0116978..eea5b23 100644
--- a/WebAPI/Controllers/MoveStockBillController.cs
+++ b/WebAPI/Controllers/MoveStockBillController.cs
@@ -170,7 +170,7 @@
         //        {
         //            sQty = sRelQty;
         //        }
-        //        else if(sRelQty == 0)
+        //        else if (sRelQty == 0)
         //        {
         //            objJsonResult.code = "0";
         //            objJsonResult.count = 0;
@@ -256,8 +256,8 @@
                         for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                         {
                             sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
-                            objJsonResult= (JsonResult)get_InfoByBarCode_Source_Json_s(sBarCode_MX, sInterID, sBillNo, sQty, HWHID, HSPID, SCWhID, SCSPID);
-                            if(objJsonResult.code == "0")
+                            objJsonResult = (JsonResult)get_InfoByBarCode_Source_Json_s(sBarCode_MX, sInterID, sBillNo, sQty, HWHID, HSPID, SCWhID, SCSPID);
+                            if (objJsonResult.code == "0")
                             {
                                 return objJsonResult;
                             }
@@ -265,7 +265,7 @@
                         return objJsonResult;
                     }
                 }
-                
+
             }
             catch (Exception e)
             {
@@ -320,6 +320,7 @@
                 model.HBarCode = oView.HBarCode;
                 model.HBatchNo = oView.HBatchNo;
                 model.HMTONo = oView.HMTONo;
+                model.HMaker = oView.HMaker;
 
                 model.HWhID = DBUtility.ClsPub.isLong(HWHID);
                 model.HStockPlaceID = DBUtility.ClsPub.isLong(HSPID);
@@ -343,7 +344,17 @@
                 bool flag = oWebs.Get_CheckQtyByBarCode_GetWhAndSP(model.HInterID, model.HBillType, model.HBarCode, ref SCWhID, ref SCSPID, sRelQty, ref sRelQty);
                 if (flag)
                 {
-                    sQty = sRelQty;
+                    //sQty = sRelQty;
+                    model.HSCWHID = SCWhID;
+                    model.HOutStockPlaceID = SCSPID;
+                    if(SCWhID<=0)
+                    {
+                        objJsonResult.code = "0";
+                        objJsonResult.count = 0;
+                        objJsonResult.Message = "1-浠撳簱鏃犲簱瀛橈紒";
+                        objJsonResult.data = null;
+                        return objJsonResult;
+                    }
                 }
                 else if (sRelQty == 0)
                 {
@@ -353,10 +364,14 @@
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
-                else
-                {
-                    sQty = sRelQty;
-                }
+                //else
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "2-搴撳瓨涓嶈冻锛�";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
 
                 if (oWebs.set_SavePonderationBillMain_Temp_Qty(model, sQty, ref DBUtility.ClsPub.sErrInfo))
                 {

--
Gitblit v1.9.1