新增销售出库二次校验功能(原单据为扫码生成,审核时对原扫描的条码进行核对)
4个文件已修改
407 ■■■■■ 已修改文件
WebAPI/Controllers/条码管理/WEBSController.cs 272 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/Reference.cs 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/WebService1.wsdl 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/ÌõÂë¹ÜÀí/WEBSController.cs
@@ -1383,6 +1383,13 @@
            string sJXCode = "";
            if (oSystemParameter.ShowBill(ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
                }
                if (oSystemParameter.omodel.WMS_CampanyName == "安瑞") //系统参数  å®¢æˆ·å®šåˆ¶åŒ–名称     ç©ºç™½ä¸ºé€šç”¨
                {
                    sJXCode = POStockInBillController.JX_Json(sBarCode, HBillID, HBillType, HStockOrgID, HBillNo, HMaker);
@@ -1393,22 +1400,47 @@
                }
                try
                {
                    WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                    if (WebSoBar == null)
                    //原单据为扫码生成,校验时不生成条码记录,只对原扫描的条码进行核对
                    if (sSourceBarCodeCtl == "Y")
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                        objJsonResult.data = null;
                        return objJsonResult;
                        WebSoBar = oWebs.get_BillBarCode_Verify(HBillID, HBillNo, HBillType, sJXCode, HQty, HMaker, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                        if (WebSoBar == null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "成功";
                            objJsonResult.data = WebSoBar;
                            return objJsonResult;
                        }
                    }
                    //原单据非扫码生成,校验时生成条码记录
                    else
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "成功";
                        objJsonResult.data = WebSoBar;
                        return objJsonResult;
                        WebSoBar = oWebs.get_CheckTypeByBarCode_BillCheck(sJXCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HStockOrgID, ref DBUtility.ClsPub.sErrInfo);
                        if (WebSoBar == null)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "成功";
                            objJsonResult.data = WebSoBar;
                            return objJsonResult;
                        }
                    }
                }
                catch (Exception e)
@@ -1483,7 +1515,71 @@
        #endregion
        #region è¿”回缓存列表信息
        #region æ‰«ç æ¨¡å—,删除选中行条码出入库临时表记录
        /// <summary>
        /// æ‰«ç æ¨¡å—,删除选中行条码出入库临时表记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/set_DeleteBarCodeByEntryID_BillCheck_Json")]
        [HttpGet]
        public object set_DeleteBarCodeByEntryID_BillCheck_Json(long HInterID, string HBillType, long HMaterID, long HAuxPropID, string HMTONo, long HSourceInterID, long HSourceEntryID, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID,ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
                }
                //原单据为扫码生成,对原扫描的条码进行核对
                if (sSourceBarCodeCtl == "Y")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "校验条码,删除功能不可用! ";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //原单据非扫码生成
                else
                {
                    try
                    {
                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HMaterID=" + HMaterID.ToString() + " and HAuxPropID=" + HAuxPropID.ToString() + " and HMTONo='" + HMTONo + "' and HSourceInterID=" + HSourceInterID.ToString() + " and HSourceEntryID=" + HSourceEntryID.ToString() + " and HQty<>0 ", ref DBUtility.ClsPub.sExeReturnInfo);
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    catch (Exception e)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除所选行条码出入库临时表记录失败!" + e.ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç¼“存模块    è¿”回缓存列表信息
        /// <summary>
        /// è¿”回缓存列表信息    æ ¡éªŒæ¨¡å¼
@@ -1534,6 +1630,156 @@
        #endregion
        #region ç¼“存模块    æ ¹æ®å•据ID,删除临时表记录
        /// <summary>
        /// æ ¹æ®å•据ID,删除临时表记录
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/DeleteBillList_BillCheck_Json")]
        [HttpGet]
        public object DeleteBillList_BillCheck_Json(long HInterID, string HBillType, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
                }
                //原单据为扫码生成,对原扫描的条码进行核对,删除条码出入库校验缓存记录
                if (sSourceBarCodeCtl == "Y")
                {
                    try
                    {
                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp_Verify where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    catch (Exception e)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除所选单据条码出入库临时表记录失败!" + e.ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
                //原单据非扫码生成,删除条码出入库缓存列表记录
                else
                {
                    try
                    {
                        oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "'", ref DBUtility.ClsPub.sExeReturnInfo);
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "删除成功";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    catch (Exception e)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "删除所选单据条码出入库临时表记录失败!" + e.ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region ç¼“存模块    å·²ä¸Šä¼ åˆ—表界面,撤销功能
        /// <summary>
        /// å·²ä¸Šä¼ åˆ—表界面,撤销功能,删除WMS表和本地出入库单记录,并更新TEMP表中的上传字段 HRelationInterID=0
        /// </summary>
        /// <returns></returns>
        [Route("WEBSController/DeleteICStockBillAndWMS_BillCheck_Json")]
        [HttpGet]
        public object DeleteICStockBillAndWMS_BillCheck_Json(Int64 HInterID, string HBillNo, string HBillType, Int64 HStockOrgID)
        {
            //获取系统参数
            string sErrMsg = "";
            if (oSystemParameter.ShowBillByOrgID(HStockOrgID, ref sErrMsg) == true)
            {
                string sSourceBarCodeCtl = "N";   //校验-是否进行源单对应条码核对('Y'为核对)
                if (HBillType == "1205" && oSystemParameter.omodel.Kf_SellOutBillCheck_SourceBarCodeCtl == "Y")
                {
                    //销售出库单
                    sSourceBarCodeCtl = "Y";
                }
                //原单据为扫码生成,对原扫描的条码进行核对
                if (sSourceBarCodeCtl == "Y")
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "校验条码,撤销功能不可用! ";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //原单据非扫码生成
                else
                {
                    try
                    {
                        if (oWebs.DeleteICStockBillAndWMS(HInterID, HBillNo, HBillType, ref DBUtility.ClsPub.sErrInfo))
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //成功!
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = DBUtility.ClsPub.sErrInfo;  //失败!
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                    }
                    catch (Exception e)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "撤销单据已上传记录失败!" + e.ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                }
            }
            else
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "获取系统参数失败! " + sErrMsg;
                    objJsonResult.data = null;
                    return objJsonResult;
                }
            }
        #endregion
        #endregion
WebAPI/Web References/WebS/Reference.cs
@@ -100,6 +100,8 @@
        
        private System.Threading.SendOrPostCallback get_CheckTypeByBarCode_BillCheckOperationCompleted;
        
        private System.Threading.SendOrPostCallback get_BillBarCode_VerifyOperationCompleted;
        private System.Threading.SendOrPostCallback GetKf_PonderationBillMain_Temp_BillCheckOperationCompleted;
        
        private System.Threading.SendOrPostCallback set_UpdateTemp_BillCheckOperationCompleted;
@@ -1276,6 +1278,9 @@
        
        /// <remarks/>
        public event get_CheckTypeByBarCode_BillCheckCompletedEventHandler get_CheckTypeByBarCode_BillCheckCompleted;
        /// <remarks/>
        public event get_BillBarCode_VerifyCompletedEventHandler get_BillBarCode_VerifyCompleted;
        
        /// <remarks/>
        public event GetKf_PonderationBillMain_Temp_BillCheckCompletedEventHandler GetKf_PonderationBillMain_Temp_BillCheckCompleted;
@@ -4179,6 +4184,50 @@
            if ((this.get_CheckTypeByBarCode_BillCheckCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.get_CheckTypeByBarCode_BillCheckCompleted(this, new get_CheckTypeByBarCode_BillCheckCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        /// <remarks/>
        [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/get_BillBarCode_Verify", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
        public ClsKf_ICStockBill_WMS get_BillBarCode_Verify(long HInterID, string HBillNo, string HBillType, string HBarCode, double HQty, string HMaker, long HStockOrgID, ref string sErrMsg) {
            object[] results = this.Invoke("get_BillBarCode_Verify", new object[] {
                        HInterID,
                        HBillNo,
                        HBillType,
                        HBarCode,
                        HQty,
                        HMaker,
                        HStockOrgID,
                        sErrMsg});
            sErrMsg = ((string)(results[1]));
            return ((ClsKf_ICStockBill_WMS)(results[0]));
        }
        /// <remarks/>
        public void get_BillBarCode_VerifyAsync(long HInterID, string HBillNo, string HBillType, string HBarCode, double HQty, string HMaker, long HStockOrgID, string sErrMsg) {
            this.get_BillBarCode_VerifyAsync(HInterID, HBillNo, HBillType, HBarCode, HQty, HMaker, HStockOrgID, sErrMsg, null);
        }
        /// <remarks/>
        public void get_BillBarCode_VerifyAsync(long HInterID, string HBillNo, string HBillType, string HBarCode, double HQty, string HMaker, long HStockOrgID, string sErrMsg, object userState) {
            if ((this.get_BillBarCode_VerifyOperationCompleted == null)) {
                this.get_BillBarCode_VerifyOperationCompleted = new System.Threading.SendOrPostCallback(this.Onget_BillBarCode_VerifyOperationCompleted);
            }
            this.InvokeAsync("get_BillBarCode_Verify", new object[] {
                        HInterID,
                        HBillNo,
                        HBillType,
                        HBarCode,
                        HQty,
                        HMaker,
                        HStockOrgID,
                        sErrMsg}, this.get_BillBarCode_VerifyOperationCompleted, userState);
        }
        private void Onget_BillBarCode_VerifyOperationCompleted(object arg) {
            if ((this.get_BillBarCode_VerifyCompleted != null)) {
                System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
                this.get_BillBarCode_VerifyCompleted(this, new get_BillBarCode_VerifyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
            }
        }
        
@@ -49253,6 +49302,40 @@
    
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3752.0")]
    public delegate void get_BillBarCode_VerifyCompletedEventHandler(object sender, get_BillBarCode_VerifyCompletedEventArgs e);
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3752.0")]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    public partial class get_BillBarCode_VerifyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
        private object[] results;
        internal get_BillBarCode_VerifyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
                base(exception, cancelled, userState) {
            this.results = results;
        }
        /// <remarks/>
        public ClsKf_ICStockBill_WMS Result {
            get {
                this.RaiseExceptionIfNecessary();
                return ((ClsKf_ICStockBill_WMS)(this.results[0]));
            }
        }
        /// <remarks/>
        public string sErrMsg {
            get {
                this.RaiseExceptionIfNecessary();
                return ((string)(this.results[1]));
            }
        }
    }
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.8.3752.0")]
    public delegate void GetKf_PonderationBillMain_Temp_BillCheckCompletedEventHandler(object sender, GetKf_PonderationBillMain_Temp_BillCheckCompletedEventArgs e);
    
    /// <remarks/>
WebAPI/Web References/WebS/WebService1.wsdl
@@ -1180,6 +1180,28 @@
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_BillBarCode_Verify">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="HInterID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="HBillNo" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HBillType" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="HBarCode" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HQty" type="s:double" />
            <s:element minOccurs="0" maxOccurs="1" name="HMaker" type="s:string" />
            <s:element minOccurs="1" maxOccurs="1" name="HStockOrgID" type="s:long" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="get_BillBarCode_VerifyResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="get_BillBarCode_VerifyResult" type="tns:ClsKf_ICStockBill_WMS" />
            <s:element minOccurs="0" maxOccurs="1" name="sErrMsg" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetKf_PonderationBillMain_Temp_BillCheck">
        <s:complexType>
          <s:sequence>
@@ -13854,6 +13876,12 @@
  <wsdl:message name="get_CheckTypeByBarCode_BillCheckSoapOut">
    <wsdl:part name="parameters" element="tns:get_CheckTypeByBarCode_BillCheckResponse" />
  </wsdl:message>
  <wsdl:message name="get_BillBarCode_VerifySoapIn">
    <wsdl:part name="parameters" element="tns:get_BillBarCode_Verify" />
  </wsdl:message>
  <wsdl:message name="get_BillBarCode_VerifySoapOut">
    <wsdl:part name="parameters" element="tns:get_BillBarCode_VerifyResponse" />
  </wsdl:message>
  <wsdl:message name="GetKf_PonderationBillMain_Temp_BillCheckSoapIn">
    <wsdl:part name="parameters" element="tns:GetKf_PonderationBillMain_Temp_BillCheck" />
  </wsdl:message>
@@ -17107,6 +17135,10 @@
      <wsdl:input message="tns:get_CheckTypeByBarCode_BillCheckSoapIn" />
      <wsdl:output message="tns:get_CheckTypeByBarCode_BillCheckSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="get_BillBarCode_Verify">
      <wsdl:input message="tns:get_BillBarCode_VerifySoapIn" />
      <wsdl:output message="tns:get_BillBarCode_VerifySoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetKf_PonderationBillMain_Temp_BillCheck">
      <wsdl:input message="tns:GetKf_PonderationBillMain_Temp_BillCheckSoapIn" />
      <wsdl:output message="tns:GetKf_PonderationBillMain_Temp_BillCheckSoapOut" />
@@ -19480,6 +19512,15 @@
    </wsdl:operation>
    <wsdl:operation name="get_CheckTypeByBarCode_BillCheck">
      <soap:operation soapAction="http://tempuri.org/get_CheckTypeByBarCode_BillCheck" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_BillBarCode_Verify">
      <soap:operation soapAction="http://tempuri.org/get_BillBarCode_Verify" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
@@ -24467,6 +24508,15 @@
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="get_BillBarCode_Verify">
      <soap12:operation soapAction="http://tempuri.org/get_BillBarCode_Verify" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetKf_PonderationBillMain_Temp_BillCheck">
      <soap12:operation soapAction="http://tempuri.org/GetKf_PonderationBillMain_Temp_BillCheck" style="document" />
      <wsdl:input>
WebAPI/WebAPI.csproj.user
@@ -9,7 +9,7 @@
    <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
    <NameOfLastUsedPublishProfile>FolderProfile</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\Git\houduan\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\网站发布\后端代码\MES-WEB-API\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\GIT仓库\MES-WEB-API\WebAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>false</UseIISExpress>
    <Use64BitIISExpress />