From 85eb040ef2434291a5cb2ed8a80892de101128d3 Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期二, 22 十一月 2022 20:15:59 +0800
Subject: [PATCH] 扫描物料调用方法增加写入生产日期、有效期至字段到条码出入库临时表

---
 DLL/Model.dll                |    0 
 DLL/DAL.dll                  |    0 
 CLOUDWEB/WebService1.asmx.cs |   42 ++++++++++++++++++++++++++++++++++++++----
 3 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/CLOUDWEB/WebService1.asmx.cs b/CLOUDWEB/WebService1.asmx.cs
index 9af949e..35dce5d 100644
--- a/CLOUDWEB/WebService1.asmx.cs
+++ b/CLOUDWEB/WebService1.asmx.cs
@@ -43978,6 +43978,22 @@
                 oMain.HSourceEntryID = DBUtility.ClsPub.isLong(dsSource.Tables[0].Rows[i]["HSourceEntryID"]);
                 oMain.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillNo"]);
                 oMain.HSourceBillType = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillType"]);
+                if (omodel_View.HProduceDate<Convert.ToDateTime("1950-01-01"))
+                {
+                    oMain.HBeginDate = "";
+                }
+                else
+                {
+                    oMain.HBeginDate = omodel_View.HProduceDate.ToShortDateString();
+                }
+                if (omodel_View.HExpiryDate<Convert.ToDateTime("1950-01-01"))
+                {
+                    oMain.HEndDate = "";
+                }
+                else
+                {
+                    oMain.HEndDate = omodel_View.HExpiryDate.ToShortDateString();
+                } 
                 oMain.HSTOCKORGID = HStockOrgID;
                 oMain.HOWNERID = HStockOrgID;
                 oMain.HCusBarCode = HCustom1;
@@ -43989,14 +44005,15 @@
                 ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" +
                 ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" +
                 ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" +
-                ",HCusID,HDeptID,HCusBarCode,HMulSourceBill) " +
+                ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " +
                 " Values(" + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + "," + oMain.HAuxPropID.ToString() + "," + oMain.HProcID.ToString() +
                 "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" +
                 "," + oMain.HQtyMust.ToString() + "," + oMain.HQty.ToString() + "," + oMain.HPieceQty.ToString() + ",'" + oMain.HBatchNo + "','" + oMain.HBarCode + "',''" +
                 ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" +
                 "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" +
                 "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','','" + oMain.HSubBillType + "'" +
-                ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() +")");
+                ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() + "," + (oMain.HBeginDate == "" ? "NULL": "'"+ oMain.HBeginDate + "'" )  + 
+                "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ")");
 
                 if (sRemQty <= 0)
                 {
@@ -44559,6 +44576,22 @@
             oMain.HSourceEntryID = omodel_View.HSourceEntryID;
             oMain.HSourceBillNo = omodel_View.HSourceBillNo;
             oMain.HSourceBillType = HSourceBillType;
+            if (omodel_View.HProduceDate < Convert.ToDateTime("1950-01-01"))
+            {
+                oMain.HBeginDate = "";
+            }
+            else
+            {
+                oMain.HBeginDate = omodel_View.HProduceDate.ToShortDateString();
+            }
+            if (omodel_View.HExpiryDate < Convert.ToDateTime("1950-01-01"))
+            {
+                oMain.HEndDate = "";
+            }
+            else
+            {
+                oMain.HEndDate = omodel_View.HExpiryDate.ToShortDateString();
+            }
             oMain.HRedBlueFlag = false;
             oMain.HPieceQty = 1;
             oMain.HSTOCKORGID = HStockOutOrgID;
@@ -44594,14 +44627,15 @@
                 ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" +
                 ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" +
                 ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" +
-                ",HCusID,HDeptID,HCusBarCode,HMulSourceBill) " +
+                ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " +
                 " Values(" + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + "," + oMain.HAuxPropID.ToString() + "," + oMain.HProcID.ToString() +
                 "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" +
                 "," + oMain.HQtyMust.ToString() + "," + oMain.HQty.ToString() + "," + oMain.HPieceQty.ToString() + ",'" + oMain.HBatchNo + "','" + oMain.HBarCode + "',''" +
                 ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" +
                 "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" +
                 "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','',0" +
-                ",0,0,'" + oMain.HCusBarCode + "',0)");
+                ",0,0,'" + oMain.HCusBarCode + "',0," + (oMain.HBeginDate == "" ? "NULL": "'"+ oMain.HBeginDate + "'" )  + 
+                "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ")");
             return true;
         }
 
diff --git a/DLL/DAL.dll b/DLL/DAL.dll
index 7e3a437..3b86981 100644
--- a/DLL/DAL.dll
+++ b/DLL/DAL.dll
Binary files differ
diff --git a/DLL/Model.dll b/DLL/Model.dll
index b5c2c6f..c93e187 100644
--- a/DLL/Model.dll
+++ b/DLL/Model.dll
Binary files differ

--
Gitblit v1.9.1