From 7bc1a0a3d3f00e50af0c599c5d2b5ec00bfa6610 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期三, 23 十一月 2022 10:16:18 +0800
Subject: [PATCH] 修改了 采购入库条码解析方法
---
WebAPI/Web References/WebS/Reference.cs | 3 +
WebAPI/Web.config | 10 ++--
WebAPI/Controllers/OtherInStockController.cs | 3 +
WebAPI/WebAPI.csproj | 4 +-
WebAPI/Controllers/POStockInBillController.cs | 43 +++++++++++++--------
5 files changed, 38 insertions(+), 25 deletions(-)
diff --git a/WebAPI/Controllers/OtherInStockController.cs b/WebAPI/Controllers/OtherInStockController.cs
index f66269e..72a4c4b 100644
--- a/WebAPI/Controllers/OtherInStockController.cs
+++ b/WebAPI/Controllers/OtherInStockController.cs
@@ -167,6 +167,7 @@
{
try
{
+
string sErrMsg = "";
bool sBool = false;
oView = webserver.get_InfoByBarCode_Source(sBarCode, sInterID, ref sBool, ref sErrMsg);
@@ -233,6 +234,8 @@
string msg1 = _value.ToString();
try
{
+
+
List<Model.ClsKf_ICStockBillMain> lsmain = new List<Model.ClsKf_ICStockBillMain>();
ListModels oListModels = new ListModels();
lsmain = oListModels.getICStockBillMainByJson(msg1);
diff --git a/WebAPI/Controllers/POStockInBillController.cs b/WebAPI/Controllers/POStockInBillController.cs
index 135fc92..8a6e008 100644
--- a/WebAPI/Controllers/POStockInBillController.cs
+++ b/WebAPI/Controllers/POStockInBillController.cs
@@ -82,6 +82,8 @@
{
try
{
+
+ var sJXCode = POStockInBillController.JX_Json(sCode, HOWNERID);
//if (sRedBlue == true)
//{
// HBillType = "1239";
@@ -90,7 +92,7 @@
WebS.WebService1 oWebs = new WebS.WebService1();
WebS.ClsKf_ICStockBill_WMS WebSoBar = new WebS.ClsKf_ICStockBill_WMS();
string sExpressNumber = "";
- WebSoBar = oWebs.get_CheckTypeByBarCode_All(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
+ WebSoBar = oWebs.get_CheckTypeByBarCode_All(sJXCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
//WebSoBar = oWebs.get_ba(sCode, sInterID, HBillType, sBillNo, sMaker, WhID, SPID, sQty, sRedBlue, SourceFlag, sSourceBillNo, sSourceType, HOWNERID, sExpressNumber, ref DBUtility.ClsPub.sErrInfo);
if (WebSoBar == null)
{
@@ -173,10 +175,12 @@
[Route("kf_PoStockInBill/JX_Json")]
[HttpGet]
- public Object JX_Json(string sBarCodeNew, Int64 HOrgID)
+ public static string JX_Json(string sBarCodeNew, Int64 HOrgID)
{
try
{
+ //鍔犱簡 鐢熶骇鏃ユ湡 鏈夋晥鏈熻嚦 淇濊川鏈熸爣蹇�
+
string[] sArray = sBarCodeNew.Split('@');
string HMaterNumber = "";
HMaterNumber = sArray[0];
@@ -184,6 +188,10 @@
HQty = ClsPub.isInt(sArray[4]);
string HBarchNo = "";
HBarchNo = sArray[6];
+
+ DateTime HSCRQ = ClsPub.isDate(sArray[3]);
+ DateTime HYXQZ = ClsPub.isDate(sArray[5]);
+
Int64 HMaterID = 0;
@@ -202,40 +210,41 @@
string HTM = "";
HTM = HOrgNumber + HMaterID + HBarchNo;
string ModName = "85";
- HInterID = DBUtility.ClsPub.CreateBillID_Prod(ModName, ref DBUtility.ClsPub.sExeReturnInfo);
+ var HInterID = DBUtility.ClsPub.CreateBillID_Prod(ModName, ref DBUtility.ClsPub.sExeReturnInfo);
+ Int64 HSupID = 0;
oCn.RunProc("insert into Gy_BarCodeBill (HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" +
",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" +
",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " +
",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " +
- ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate " +
+ ",HCusID,HCusType,HEndDate,HProduceDate,HExpiryDate,HWorkLineName,HBarCodeDate " +
",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HEntryID " +
",HGiveAwayFlag,HSeOrderSEQ,HInitSourceEntryID " +
- ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " +
+ ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HExpirationDateFlag " +
") values ("
+ "'" + HTM + "','鎵规鏉$爜'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty.ToString()
+ ",'" + HBarchNo + "'," + HSupID.ToString() + ",0,'" + ClsPub.CurUserName + "',getdate(),0," + HQty.ToString()
+ ", 0,0,'','',0"
+ ", 0,'',0,0,0,''"
- + ",0,'','','',getdate()"
+ + ",0,'',''," + HSCRQ.ToShortDateString() + "," + HYXQZ.ToShortDateString() + ",'',getdate()"
+ ", " + HOrgID.ToString() + "," + HOrgID.ToString() + ",''," + HInterID.ToString() + ",1"
+ ",0,0,0"
- + ",'" + HMaterName + "','" + HMaterModel + "','',0,'','')");
+ + ",'" + HMaterName + "','" + HMaterModel + "','',0,'','',1)");
string sExpressNumber = "";
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
- objJsonResult.data = HTM;
- return objJsonResult;
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 1;
+ //objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
+ //objJsonResult.data = ;
+ return HTM;
}
catch (Exception e)
{
- objJsonResult.code = "0";
- objJsonResult.count = 1;
- objJsonResult.Message = e.Message + ";" + e.StackTrace;
- objJsonResult.data = null;
- return objJsonResult;
+ //objJsonResult.code = "0";
+ //objJsonResult.count = 1;
+ //objJsonResult.Message = e.Message + ";" + e.StackTrace;
+ //objJsonResult.data = null;
+ return e.Message + ";" + e.StackTrace;
}
}
diff --git a/WebAPI/Web References/WebS/Reference.cs b/WebAPI/Web References/WebS/Reference.cs
index e218693..5c6b4ec 100644
--- a/WebAPI/Web References/WebS/Reference.cs
+++ b/WebAPI/Web References/WebS/Reference.cs
@@ -1075,7 +1075,8 @@
/// <remarks/>
public WebService1() {
- this.Url = global::WebAPI.Properties.Settings.Default.WebAPI_WebS_WebService1;
+ //this.Url = global::WebAPI.Properties.Settings.Default.WebAPI_WebS_WebService1;
+ this.Url = System.Configuration.ConfigurationManager.AppSettings["sUrl"];
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
diff --git a/WebAPI/Web.config b/WebAPI/Web.config
index 96a0b9a..4cd5998 100644
--- a/WebAPI/Web.config
+++ b/WebAPI/Web.config
@@ -22,7 +22,7 @@
<!--<add key="FileIP" value="http://localhost:8082/LuBaoAPI"/>-->
<add key="FileIP" value="http://localhost:8080/" />
<!--<add key="sUrl" value="http://183.129.128.86:9090/WEBS-WMSTest/WebService1.asmx"/> -->
- <add key="sUrl" value="http://192.168.63.195/WEBS-WMS/WebService1.asmx"/> <!--棰滃彴寮忔満-->
+ <!--<add key="sUrl" value="http://192.168.63.195/WEBS-WMS/WebService1.asmx"/> 棰滃彴寮忔満-->
<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> 澶忓疂-->
<!--<add key="sUrl" value="http://60.190.4.42:9003/WebService/WebService1.asmx" /> -->
<!--<add key="sUrl" value="http://10.10.130.181/WEBS-WMS/WebService1.asmx"/> 鍗氭棩绉戞妧-->
@@ -96,7 +96,7 @@
</basicHttpBinding>
</bindings>
<client>
- <endpoint address="http://192.168.63.195/WEBS-WMS/WebService1.asmx" binding="basicHttpBinding"
+ <endpoint address="http://192.168.80.90:9090/WEBS/WebService1.asmx" binding="basicHttpBinding"
bindingConfiguration="WebService1Soap" contract="Webs1.WebService1Soap"
name="WebService1Soap" />
</client>
@@ -104,9 +104,9 @@
<applicationSettings>
<WebAPI.Properties.Settings>
- <setting name="WebAPI_WebS_WebService1" serializeAs="String">
- <value>http://192.168.63.195/WEBS-WMS/WebService1.asmx</value>
- </setting>
+ <setting name="WebAPI_WebS_WebService1" serializeAs="String">
+ <value>http://192.168.80.90:9090/WEBS/WebService1.asmx</value>
+ </setting>
</WebAPI.Properties.Settings>
</applicationSettings>
</configuration>
\ No newline at end of file
diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj
index 2d2d391..203209e 100644
--- a/WebAPI/WebAPI.csproj
+++ b/WebAPI/WebAPI.csproj
@@ -953,10 +953,10 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <WebReferenceUrl Include="http://192.168.63.195/WEBS-WMS/WebService1.asmx">
+ <WebReferenceUrl Include="http://192.168.80.90:9090/WEBS/WebService1.asmx">
<UrlBehavior>Dynamic</UrlBehavior>
<RelPath>Web References\WebS\</RelPath>
- <UpdateFromURL>http://192.168.63.195/WEBS-WMS/WebService1.asmx</UpdateFromURL>
+ <UpdateFromURL>http://192.168.80.90:9090/WEBS/WebService1.asmx</UpdateFromURL>
<ServiceLocationURL>
</ServiceLocationURL>
<CachedDynamicPropName>
--
Gitblit v1.9.1