ch
2022-06-12 94d3e60d2d4b5f56826ef1511e13d79662a4cb55
合并
3个文件已修改
871 ■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 871 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/DAL.dll 补丁 | 查看 | 原始文档 | blame | 历史
DLL/Pub_Class.dll 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -2114,6 +2114,19 @@
        #region 其他入库--来源单据  *
        //返回入库申请列表
        /// <summary>
        /// 返回入库申请列表
        /// </summary>
        /// <param name="sWhere">过滤条件</param>
        /// <returns></returns>
        [WebMethod]
        public DataSet GetKf_StockInRequestBillList(string sWhere)
        {
            DAL.Cls_S_IF_StockInRequestBill_Lite dal = new DAL.Cls_S_IF_StockInRequestBill_Lite();
            return dal.DisSourceBillList(sWhere);
        }
        //返回k3未审核其他入库
        /// <summary>
        /// 返回k3未审核其他入库
@@ -8443,7 +8456,7 @@
                            sJson_Entry = sJson_Entry + " {" +
                            "\"FEntryID\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FEntryID"]) + "\"," +
                            "\"FQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FQty"]) + "\"," +
                            "\"FQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FQty"]) + "\" " +
                            "}";
                        }
                        string sJson_End = "  ]  }}";
@@ -13021,7 +13034,7 @@
                    string sJson_MainCustom = "";    //主表自定义字段
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                        "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
                        "\"IsEntryBatchFill\":\"false\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
                        "\"Model\":{ " +
                        //\"FID\":\"0\",
                        "\"FBillTypeID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillTypeID"]) + "\"}," +
@@ -15762,7 +15775,7 @@
                            sJson_Entry = sJson_Entry + "{" +
                            "\"FEntryID\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FEntryID"]) + "\"," +
                            "\"FActualQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FActualQty"]) + "\"," +
                            "\"FActualQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FActualQty"]) + "\" " +
                            "}";
                        }
                        string sJson_End = "  ]  }}";
@@ -21706,11 +21719,13 @@
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
                ",HArrivalDate" +
                ") " +
                " values('1201','1201'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
                ",'" + oMain.HArrivalDate.ToShortDateString() + "'" +
                ") ");
                //新增K3子表、主表
@@ -27460,22 +27475,45 @@
        #endregion
        #region 其它入库CLOUD   *New
        #region 其他入库CLOUD   *New
        //生成入库单 
        [WebMethod]
        public bool set_SaveOtherInBill_CLD_New(Model.ClsKf_OtherInBillMain oMain, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        {
            if (SaveOtherInBill_CLD(oMain, sHSourceType, oSystemParameterMain, ref sErrMsg))
            if (sHSourceType == "-1")   //无源单
            {
                //"保存成功!";
                sErrMsg = "保存成功!" + oMain.HBillNo;
                return true;
                if (SaveOtherInBill_CLD(oMain, sHSourceType, oSystemParameterMain, ref sErrMsg))
                {
                    //"保存成功!";
                    sErrMsg = "保存成功!" + oMain.HBillNo;
                    return true;
                }
                else
                {
                    //"保存失败!";
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + sErrMsg;
                    return false;
                }
            }
            else if (oSystemParameterMain.WMS_CampanyName == "森楷" || sHSourceType == "1241")    //入库申请单
            {
                if (SaveOtherInBill_StockInRequest_CLD_SenKai(oMain, sHSourceType, oSystemParameterMain, ref sErrMsg))
                {
                    //"保存成功!";
                    sErrMsg = "保存成功!" + oMain.HBillNo;
                    return true;
                }
                else
                {
                    //"保存失败!";
                    sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + sErrMsg;
                    return false;
                }
            }
            else
            {
                //"保存失败!";
                sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + sErrMsg;
                sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";错误的源单类型";
                return false;
            }
        }
@@ -27722,6 +27760,491 @@
            catch (Exception e)
            {
                sErrMsg = "其他入库单失败!" + e.Message;
                oCn.RollBack();
                return false;
            }
        }
        /// <summary>
        /// 其他入库单   源单:入库申请单
        /// </summary>
        /// <param name="oMain"></param>
        /// <param name="sErrMsg"></param>
        /// <returns></returns>
        public bool SaveOtherInBill_StockInRequest_CLD_SenKai(Model.ClsKf_OtherInBillMain oMain, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            try
            {
                //判断会计期是否合理
                string s = "";
                int sYear = 0;
                int sPeriod = 0;
                if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(oMain.HDate, ref sYear, ref sPeriod, ref s) == false)
                {
                    sErrMsg = s;
                    return false;
                }
                oMain.HYear = sYear;
                oMain.HPeriod = sPeriod;
                oCn.BeginTran();
                //生成出入库单据
                //插入子表
                oCn.RunProc("EXEC h_p_Kf_OtherInBillSub_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + sHSourceType + "'");
                //插入主表
                oCn.RunProc("Insert Into Kf_ICStockBillMain   " +
                "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" +
                ",HYear,HPeriod,HRemark,HMaker,HMakeDate" +
                ",HSupID,HWHID,HSCWHID,HEmpID,HManagerID,HSecManagerID" +
                ",HKeeperID,HDeptID,HExplanation,HInnerBillNo,HRedBlueFlag" +
                ",HStockStyle" +
                ",HSTOCKORGID,HOWNERID" +
                ") " +
                " values('1203','1203'," + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "',convert(varchar(10),getdate(),120),'" + oMain.HMainSourceBillType + "'" +
                ", " + oMain.HYear.ToString() + "," + oMain.HPeriod.ToString() + ",'" + oMain.HRemark + "','" + oMain.HMaker + "',convert(varchar(10),getdate(),120)" +
                ", " + oMain.HSupID.ToString() + "," + oMain.HWHID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HEmpID.ToString() + "," + oMain.HManagerID.ToString() + "," + oMain.HSecManagerID.ToString() +
                ", " + oMain.HKeeperID.ToString() + "," + oMain.HDeptID.ToString() + ",'" + oMain.HExplanation + "','" + oMain.HInnerBillNo + "'," + DBUtility.ClsPub.BoolToString(oMain.HRedBlueFlag) +
                ",'" + oMain.HStockStyle + "'" +
                ", " + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() +
                ") ");
                //更新关联数量
                oCn.RunProc("exec h_p_Kf_UpDateRelation_StockInRequestToOtherIn_Add " + oMain.HInterID.ToString());
                if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数  自动审核
                {
                    //审核单据
                    oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString());
                }
                //根据TMP表 返回 子表信息
                DataSet Ds;
                Ds = oCn.RunProcReturn("exec h_p_Kf_GetOtherInBill_StockInRequest_CLD_SenKai " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherInBill_StockInRequest_CLD_SenKai");
                if (Ds == null || Ds.Tables[0].Rows.Count == 0 || Ds.Tables[1].Rows.Count == 0)
                {
                    sErrMsg = "获取子表信息失败!";
                    oCn.RollBack();
                    return false;
                }
                else
                {
                    string sJson_MainCustom = "";    //主表自定义字段
                    sJson_MainCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["MainCustom"]);
                    string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[],\"NeedReturnFields\":[],\"IsDeleteEntry\":\"True\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\",\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
                        "\"Model\":{ " +
                        //"FID": 0,
                        "\"FBillNo\":\"" + oMain.HBillNo + "\"," +
                        "\"FBillTypeID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBillTypeID"]) + "\"}," +
                        "\"FStockOrgId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockOrgId"]) + "\"}," +
                        "\"FStockDirect\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockDirect"]) + "\"," +
                        "\"FDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDate"]) + "\"," +
                        "\"FSUPPLIERID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSUPPLIERID"]) + "\"}," +
                        "\"FDeptId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FDeptId"]) + "\"}," +
                        "\"FACCEPTANCE\":{\"FStaffNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FACCEPTANCE"]) + "\"}," +
                        "\"FStockerId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FStockerId"]) + "\"}," +
                        "\"FSTOCKERGROUPID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FSTOCKERGROUPID"]) + "\"}," +
                        "\"FOwnerTypeIdHead\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerTypeIdHead"]) + "\"," +
                        "\"FOwnerIdHead\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FOwnerIdHead"]) + "\"}," +
                        "\"FNOTE\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FNOTE"]) + "\"," +
                        "\"FBaseCurrId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["FBaseCurrId"]) + "\"}," +
                        //"FScanBox": "",
                        //"F_paez_Text": "",
                        sJson_MainCustom +
                        "\"FEntity\":[";
                    string sJson_Entry = "";
                    for (int i = 0; i < Ds.Tables[1].Rows.Count; i++)
                    {
                        if (sJson_Entry != "")
                        {
                            sJson_Entry = sJson_Entry + " , ";
                        }
                        string sJson_BatchNo = "";          //批号
                        string sJson_StockPlace = "";       //仓位
                        string sJson_FAUXPROPID = "";       //辅助属性
                        string sJson_FProduceDate = "";     //生产日期
                        string sJson_FExpiryDate = "";      //有效期至
                        string sJson_SubCustom = "";        //子表自定义字段
                        //子表自定义字段
                        sJson_SubCustom = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["SubCustom"]);
                        //是否启用批次管理
                        if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["HISBATCHMANAGE"]) == "1")
                        {
                            sJson_BatchNo = "  \"FLOT\": {\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"},    \"FLOT_TEXT\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FLOT"]) + "\"  , ";
                        }
                        else
                        {
                            sJson_BatchNo = "";
                        }
                        //仓位
                        if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) == "")
                        {
                            sJson_StockPlace = "";
                        }
                        else
                        {
                            sJson_StockPlace = Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockLocId"]) + "\"}},";
                        }
                        //辅助属性
                        sJson_FAUXPROPID = " \"FAUXPROPID\":{\"FAUXPROPID__FF100002\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FAUXPROPID"]) + "\"}},";
                        //是否启用保质期控制
                        if (Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FISKFPERIOD"]) == "1")
                        {
                            sJson_FProduceDate = " \"FProduceDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProduceDate"]) + "\",";
                            sJson_FExpiryDate = " \"FExpiryDate\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExpiryDate"]) + "\",";
                        }
                        else
                        {
                            sJson_FProduceDate = "";
                            sJson_FExpiryDate = "";
                        }
                        sJson_Entry = sJson_Entry + "{" +
                        //"FEntryID": 0,
                        " \"FInStockType\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FInStockType"]) + "\"," +
                        " \"FMaterialId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMaterialId"]) + "\"}," +
                        " \"FUnitID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FUnitID"]) + "\"}," +
                        " \"FStockId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockId"]) + "\"}," +
                        sJson_StockPlace +
                        " \"FStockStatusId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FStockStatusId"]) + "\"}," +
                        sJson_BatchNo +
                        sJson_FAUXPROPID +
                        //"F_TFKO_Assistant2": {
                        //            "FNumber": ""
                        //},
                        //"F_TFKO_Assistant": {
                        //            "FNumber": ""
                        //},
                        //"F_TFKO_Assistant1": {
                        //            "FNumber": ""
                        //},
                        //"F_TFKO_Assistant3": {
                        //            "FNumber": ""
                        //},
                        //"F_TFKO_Text": "",
                        //"F_TFKO_Text1": "",
                        //"F_TFKO_Text2": "",
                        //"F_TFKO_Text3": "",
                        //"FExtAuxUnitQty": 0,
                        " \"FQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FQty"]) + "\"," +
                        //"FEntryNote": "",
                        " \"FBomId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBomId"]) + "\"}," +
                        sJson_FProduceDate +
                        sJson_FExpiryDate +
                        " \"FExtAuxUnitId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FExtAuxUnitId"]) + "\"}," +
                        " \"FMtoNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FMtoNo"]) + "\"," +
                        " \"FProjectNo\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FProjectNo"]) + "\"," +
                        " \"FOwnerTypeId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOwnerTypeId"]) + "\"," +
                        " \"FOwnerId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FOwnerId"]) + "\"}," +
                        " \"FKeeperTypeId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FKeeperTypeId"]) + "\"," +
                        " \"FKeeperId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FKeeperId"]) + "\"}," +
                        " \"FSRCBILLTYPEID\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSRCBILLTYPEID"]) + "\"," +
                        " \"FSRCBILLNO\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSRCBILLNO"]) + "\"," +
                        " \"FBaseUnitId\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FBaseUnitId"]) + "\"}," +
                        " \"FSECUNITID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSECUNITID"]) + "\"}," +
                        " \"FSNUNITID\":{\"FNumber\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FSNUNITID"]) + "\"}," +
                        sJson_SubCustom +
                        //"FSerialSubEntity": [
                        //    {
                        //            "FDetailID": 0,
                        //        "FSerialNo": "",
                        //        "FSerialNote": ""
                        //    }
                        //]
                        " \"FEntity_Link\": [{" +
                            " \"FEntity_Link_FFlowId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowId"]) + "\"," +
                            " \"FEntity_Link_FFlowLineId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FFlowLineId"]) + "\"," +
                            " \"FEntity_Link_FRuleId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FRuleId"]) + "\"," +
                            " \"FEntity_Link_FSTableName\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSTableName"]) + "\"," +
                            " \"FEntity_Link_FSBillId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSBillId"]) + "\"," +
                            " \"FEntity_Link_FBASEQTYOLD\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FBASEQTYOLD"]) + "\"," +
                            " \"FEntity_Link_FSId\":\"" + Pub_Class.ClsPub.isStrNull(Ds.Tables[1].Rows[i]["FEntity_Link_FSId"]) + "\"" +
                        " } ]   }  ";
                    }
                    string sJson_End = "  ]  }}";
                    string sJson = sJson_Main + sJson_Entry + sJson_End;
                    //从配置文件获取 CLOUD网址、账套信息、登录用户、登录密码
                    if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo))
                    {
                        sErrMsg = Pub_Class.ClsPub.sExeReturnInfo;
                        return false;
                    }
                    //获取CLOUD账号密码
                    string sCLOUDUseName = Pub_Class.ClsPub.sCLOUDUseName;
                    string sCLOUDPsd = Pub_Class.ClsPub.sCLOUDPsd;
                    DataSet ds11 = get_SaveCLOUDUseNameandPsd(oMain.HInterID);
                    if (ds11 == null || ds11.Tables[0].Rows.Count == 0)
                    {
                    }
                    else
                    {
                        sCLOUDUseName = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserName"]);
                        sCLOUDPsd = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserPsd"]);
                    }
                    //生成 其他入库单
                    string HReturn;
                    ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl);
                    string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117
                    bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052);
                    if (bLogin)
                    {
                        var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save",
                        new object[] { "STK_MISCELLANEOUS", sJson });
                        if (oSystemParameterMain.Kf_OtherInBill_AutoCheck == "Y") //系统参数  自动审核
                        {
                            string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
                            var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit",
                            new object[] { "STK_MISCELLANEOUS", sJson2 });
                            string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
                            var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit",
                            new object[] { "STK_MISCELLANEOUS", sJson3 });
                            HReturn = result.ToString() + "," + result2.ToString() + "," + result3.ToString();
                        }
                        else
                        {
                            HReturn = result.ToString();
                        }
                        if (HReturn.Contains("\"IsSuccess\":false") == true)
                        {
                            sErrMsg = "生成其他入库单失败!" + HReturn + sJson;
                            oCn.RollBack();
                            return false;
                        }
                        else
                        {
                            oCn.Commit();
                            return true;
                        }
                    }
                    else
                    {
                        sErrMsg = "生成其他入库单失败!金蝶云登录失败!";
                        oCn.RollBack();
                        return false;
                    }
                }
            }
            catch (Exception e)
            {
                sErrMsg = "生成其他入库单失败!" + e.Message;
                oCn.RollBack();
                return false;
            }
        }
        #endregion
        #region 其他入库    校验模式*
        //校验其它入库
        [WebMethod]
        public bool set_SaveOtherInBill_BillCheck(Model.ClsKf_OtherInBillMain oMain, ref string sErrMsg)
        {
            if (set_SaveOtherInBill_CLD_BillCheck(oMain, ref sErrMsg) == true)
            {
                //上传成功
                return true;
            }
            else
            {
                //上传失败
                sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";上传单据失败!" + sErrMsg;
                return false;
            }
        }
        public bool set_SaveOtherInBill_CLD_BillCheck(Model.ClsKf_OtherInBillMain oMain, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBill(ref sErrMsg) == false)
            {
                sErrMsg = "获取系统参数失败! " + sErrMsg;
                return false;
            }
            //上传前判断
            DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_BeforeUpload_OtherInBillCheck " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "','" + oSystemParameter.omodel.Kf_OtherInBillCheck_MustQtyCtl + "'", "h_p_WMS_BeforeUpload_OtherInBillCheck");
            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "校验上传前判断,发生错误!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1)
                {
                    sErrMsg = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
            try
            {
                oCn.BeginTran();
                //写入条码出入库表
                oCn.RunProc("EXEC h_p_Kf_ICStockBillSub_WMS_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + oMain.HBillNo + "'");
                //从配置文件获取 CLOUD网址、账套信息、登录用户、登录密码
                if (!Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo))
                {
                    sErrMsg = Pub_Class.ClsPub.sExeReturnInfo;
                    return false;
                }
                //获取CLOUD账号密码
                string sCLOUDUseName = Pub_Class.ClsPub.sCLOUDUseName;
                string sCLOUDPsd = Pub_Class.ClsPub.sCLOUDPsd;
                DataSet ds11 = get_SaveCLOUDUseNameandPsd(oMain.HInterID);
                if (ds11 == null || ds11.Tables[0].Rows.Count == 0)
                {
                }
                else
                {
                    sCLOUDUseName = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserName"]);
                    sCLOUDPsd = DBUtility.ClsPub.isStrNull(ds11.Tables[0].Rows[0]["HCloudUserPsd"]);
                }
                if (oSystemParameter.omodel.Kf_OtherInBillCheck_MustQtyCtl == "完全等于应收")
                {
                    string HReturn;
                    ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl);
                    string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117
                    bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052);
                    if (bLogin)
                    {
                        //提交单据
                        string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
                        var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit",
                        new object[] { "STK_MISCELLANEOUS", sJson2 });
                        //审核单据
                        string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
                        var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit",
                        new object[] { "STK_MISCELLANEOUS", sJson3 });
                        HReturn = result3.ToString();
                        if (HReturn.Contains("\"IsSuccess\":false") == true)
                        {
                            sErrMsg = "审核其他入库单失败!" + HReturn;
                            oCn.RollBack();
                            return false;
                        }
                        else
                        {
                            oCn.Commit();
                            return true;
                        }
                    }
                    else
                    {
                        sErrMsg = "校验审核其他入库单失败!金蝶云登录失败!";
                        oCn.RollBack();
                        return false;
                    }
                }
                else
                {
                    //根据TMP表 返回 修改信息
                    DataSet Ds2;
                    Ds2 = oCn.RunProcReturn("exec h_p_Kf_GetOtherInBillCheck " + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "'", "h_p_Kf_GetOtherInBillCheck");
                    if (Ds2 == null || Ds2.Tables[0].Rows.Count == 0 || Ds2.Tables[1].Rows.Count == 0)
                    {
                        sErrMsg = "获取子表信息失败!";
                        oCn.RollBack();
                        return false;
                    }
                    else
                    {
                        string sJson_Main = "{\"Creator\":\"\",\"NeedUpDateFields\":[\"FEntity\",\"FQty\"]," +
                            "\"NeedReturnFields\":[],\"IsDeleteEntry\":\"false\",\"SubSystemId\":\"\",\"IsVerifyBaseDataField\":\"false\"," +
                            "\"IsEntryBatchFill\":\"True\",\"ValidateFlag\":\"True\",\"NumberSearch\":\"True\",\"InterationFlags\":\"\"," +
                            "\"Model\":{ \"FID\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[0].Rows[0]["FID"]) + "\"," +
                            "\"FEntity\":[";
                        string sJson_Entry = "";
                        for (int i = 0; i < Ds2.Tables[1].Rows.Count; i++)
                        {
                            if (sJson_Entry != "")
                            {
                                sJson_Entry = sJson_Entry + " , ";
                            }
                            sJson_Entry = sJson_Entry + "{" +
                            "\"FEntryID\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FEntryID"]) + "\"," +
                            "\"FQty\":\"" + Pub_Class.ClsPub.isStrNull(Ds2.Tables[1].Rows[i]["FQty"]) + "\" " +
                            "}";
                        }
                        string sJson_End = "  ]  }}";
                        string sJson = sJson_Main + sJson_Entry + sJson_End;
                        //验证用户信息
                        string HReturn;
                        ApiClient client = new ApiClient(Pub_Class.ClsPub.sCLOUDUrl);
                        string dbId = Pub_Class.ClsPub.sCLOUDAcc; //AotuTest117
                        bool bLogin = client.Login(dbId, sCLOUDUseName, sCLOUDPsd, 2052);
                        if (bLogin)
                        {
                            //修改单据
                            var result = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Save",
                            new object[] { "STK_MISCELLANEOUS", sJson });
                            HReturn = result.ToString();
                            if (HReturn.Contains("\"IsSuccess\":false") == true)
                            {
                                sErrMsg = "修改其他入库单失败!" + HReturn + sJson;
                                oCn.RollBack();
                                return false;
                            }
                            else
                            {
                                HReturn = "";
                                //提交单据
                                string sJson2 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
                                var result2 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Submit",
                                new object[] { "STK_MISCELLANEOUS", sJson2 });
                                //审核单据
                                string sJson3 = "{\"CreateOrgId\":0,\"Numbers\":[\"" + oMain.HBillNo + "\"]}";
                                var result3 = client.Execute<string>("Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.Audit",
                                new object[] { "STK_MISCELLANEOUS", sJson3 });
                                HReturn = result3.ToString();
                                if (HReturn.Contains("\"IsSuccess\":false") == true)
                                {
                                    sErrMsg = "校验审核其他入库单失败!" + HReturn + sJson;
                                    oCn.RollBack();
                                    return false;
                                }
                                else
                                {
                                    //重新同步其他入库单
                                    oCn.RunProc("exec h_p_IFCLD_ERPSourceBillToLocal_OtherIn '" + oMain.HBillNo + "'");
                                    oCn.Commit();
                                    return true;
                                }
                            }
                        }
                        else
                        {
                            sErrMsg = "校验审核其他入库单失败!金蝶云登录失败!";
                            oCn.RollBack();
                            return false;
                        }
                    }
                }
            }
            catch (Exception e)
            {
                sErrMsg = "校验审核其他入库单失败!" + e.Message;
                oCn.RollBack();
                return false;
            }
@@ -33183,8 +33706,8 @@
            }
            //蓝字产品入库、外购入库、委外入库、生产汇报,根据物料条码得到对应源单信息,非多源单模式
            //未扫描源单的情况下,第一次扫描物料条码获取源单信息并存入临时表
            //采购入库(1201)、产品入库(1202)、委外入库(1210)、生产汇报(3711)
            if (SourceFlag == false && (HBillType == "1201" || HBillType == "1202" || HBillType == "1210" || HBillType == "3711"))
            //采购入库(1201)、产品入库(1202)、其他入库(1203)、委外入库(1210)、生产汇报(3711)
            if (SourceFlag == false && (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1210" || HBillType == "3711"))
            {
                if (HSourceBillType != "-1")
                {
@@ -33468,6 +33991,7 @@
                                {
                                    dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(ds6.Tables[0].Rows[0]["HMaterID"]);
                                    HQty = DBUtility.ClsPub.isDoule(ds6.Tables[0].Rows[0]["HQty"]);
                                    sRelQty = HQty;
                                }
                                else
                                {
@@ -35054,7 +35578,63 @@
        #endregion
        #region 其他入库    扫描源单条码
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_OtherIn(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HMaker, Int64 HOWNERID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
            Int64 sMulSourceFlag = 0;   //多源单标志(0为非多源单模式,1为多源单模式)
            ////获取系统参数
            //Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            //if (oSystemParameter.ShowBill(ref sErrMsg) == false)
            //{
            //    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg;
            //    return null;
            //}
            //if (oSystemParameter.omodel.Kf_OtherInBill_MulSourceBill.ToUpper() == "Y") //系统参数  其他入库单-多源单模式
            //{
            //    sMulSourceFlag = 1;
            //}
            //将源单信息存入条码出入库临时表
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_OtherIn " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_OtherIn");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";将源单信息存入条码出入库临时表失败!";
                return null;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
                {
                    oBar.HMulSourceFlag = sMulSourceFlag;
                    oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]);
                    oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]);
                    oBar.HSupID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSupID"]);
                    oBar.HSupName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSupName"]);
                    oBar.HDeptID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HDeptID"]);
                    oBar.HDeptName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HDeptName"]);
                    oBar.HWhID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HWhID"]);
                    oBar.HWhName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HWhName"]);
                    oBar.HSPFlag = DBUtility.ClsPub.isBool(ds1.Tables[0].Rows[0]["HSPFlag"]);
                    return oBar;
                }
                else
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                    return null;
                }
            }
        }
        #endregion
        #region 生产领料    扫描源单条码
@@ -36095,6 +36675,43 @@
        #endregion
        #region 扫描单据条码      *校验模式
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_BillBarCode_BillCheck(string HBillNo, string HBillType, string HMaker, Int64 HOWNERID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
            //将单据信息存入条码出入库临时表
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBillBarCode_BillCheck '" + HBillNo + "','" + HBillType + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddBillBarCode_BillCheck");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "单据号:" + HBillNo + ";将单据信息存入条码出入库临时表失败!";
                return null;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0)
                {
                    oBar.HInterID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HInterID"]);
                    oBar.HBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBillNo"]);
                    oBar.HWhID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HWhID"]);
                    oBar.HWhName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HWhName"]);
                    oBar.HSPFlag = DBUtility.ClsPub.isBool(ds1.Tables[0].Rows[0]["HSPFlag"]);
                    oBar.HSPID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSPID"]);
                    oBar.HSPName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSPName"]);
                    return oBar;
                }
                else
                {
                    sErrMsg = "单据号:" + HBillNo + ";" + DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]);
                    return null;
                }
            }
        }
        #endregion
        #region 扫描单据条码      领料出库    *校验模式
        [WebMethod]
@@ -36262,26 +36879,40 @@
                        if (dal.omodel_View.HBarCodeType == "托盘条码")
                        {
                            //分解托盘条码得到明细条码信息写入条码出入库临时表
                            DataSet dsTBarCode;
                            string sBarCode_MX;
                            dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " +
                            " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum");
                            DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode");
                            if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                            {
                                sErrMsg = "没有找到托盘条码对应子条码记录!";
                                sErrMsg = "分解托盘条码发生错误!";
                                return null;
                            }
                            else
                            {
                                for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1)
                                {
                                    sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
                                    //将物料条码信息写入条码出入库临时表
                                    if (!set_SavePonderationBillMain_Temp_BarCode_MoveStockBillCheck(dal.omodel_View, sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                    sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]);
                                    return null;
                                }
                                else
                                {
                                    for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                    {
                                        sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                        return null;
                                        dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HBarCode"]);
                                        dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HBarCodeType"]);
                                        dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HMaterID"]);
                                        dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HAuxPropID"]);
                                        dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HBatchNo"]);
                                        dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[0]["HQty"]);
                                        dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceInterID"]);
                                        dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceEntryID"]);
                                        dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillNo"]);
                                        dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HMTONo"]);
                                        //将物料条码信息写入条码出入库临时表
                                        if (!set_SavePonderationBillMain_Temp_BarCode_MoveStockBillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                        {
                                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                            return null;
                                        }
                                    }
                                }
                                return oBar;
@@ -36291,7 +36922,7 @@
                        //条码类型不为托盘条码
                        {
                            //将物料条码信息写入条码出入库临时表
                            if (!set_SavePonderationBillMain_Temp_BarCode_MoveStockBillCheck(dal.omodel_View, sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                            if (!set_SavePonderationBillMain_Temp_BarCode_MoveStockBillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HSCWHID, HSCSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                            {
                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                return null;
@@ -36315,7 +36946,7 @@
        //扫描物料条码  存入条码出入库临时表
        [WebMethod]
        public bool set_SavePonderationBillMain_Temp_BarCode_MoveStockBillCheck(Model.ClsGy_BarCodeBill_WMS_Model_View omodel_View, string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HOWNERID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        public bool set_SavePonderationBillMain_Temp_BarCode_MoveStockBillCheck(Model.ClsGy_BarCodeBill_WMS_Model_View omodel_View, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWHID, Int64 HSCSPID, Double HQty, Int64 HOWNERID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DAL.ClsKF_PonderationBillMain_Temp_Ctl tem = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
@@ -36330,7 +36961,7 @@
            }
            //判断是否存在相同条码,判断是否启用一次扫码控制,判断所扫条码是否在单据中
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_MoveStockBillCheck '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + "," + HSCWHID + "," + HSCSPID + ",'" + sBillTypeOneScan + "'", "h_p_WMS_AddBarCode_MoveStockBillCheck");
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_MoveStockBillCheck '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + "," + HSCWHID + "," + HSCSPID + ",'" + sBillTypeOneScan + "'", "h_p_WMS_AddBarCode_MoveStockBillCheck");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "判断所扫条码是否在单据中发生错误!";
@@ -36417,10 +37048,10 @@
            double sERPQty = 0;     //ERP库存数量
            //库存控制-WMS负库存控制
            if (oSystemParameterMain.WMS_WMSStockCtl == "Y")
            if (omodel_View.HBarCodeType == "唯一条码" && oSystemParameterMain.WMS_WMSStockCtl == "Y")
            {
                //判断ERP库存   返回ERP库存数量
                DataSet DsWMS = oCn.RunProcReturn("exec h_p_KF_ICInventory_WMS_GetWHAndSP " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HSCWHID.ToString() + "," + HSCSPID.ToString(), "h_p_KF_ICInventory_WMS_GetWHAndSP");
                DataSet DsWMS = oCn.RunProcReturn("exec h_p_KF_ICInventory_WMS_GetWHAndSP " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HSCWHID.ToString() + "," + HSCSPID.ToString(), "h_p_KF_ICInventory_WMS_GetWHAndSP");
                if (DsWMS == null || DsWMS.Tables[0].Rows.Count == 0)
                {
                    sErrMsg = "判断WMS条码库存,发生错误!";
@@ -36438,7 +37069,7 @@
            }
            //判断ERP库存   返回ERP库存数量
            DataSet DsERP = oCn.RunProcReturn("exec h_p_IF_CheckQtyByERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HSCWHID.ToString() + "," + HSCSPID.ToString() + "," + omodel_View.HMaterID.ToString() + "," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + sRelQty.ToString() + "," + HOWNERID.ToString(), "h_p_IF_CheckQtyByERPICInventory");
            DataSet DsERP = oCn.RunProcReturn("exec h_p_IF_CheckQtyByERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HSCWHID.ToString() + "," + HSCSPID.ToString() + "," + omodel_View.HMaterID.ToString() + "," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + sRelQty.ToString() + "," + HOWNERID.ToString(), "h_p_IF_CheckQtyByERPICInventory");
            if (DsERP == null || DsERP.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "判断ERP库存,发生错误!";
@@ -36512,7 +37143,7 @@
        //扫描物料条码  存入条码出入库临时表
        [WebMethod]
        public bool set_SavePonderationBillMain_Temp_BarCode_BillCheck(Model.ClsGy_BarCodeBill_WMS_Model_View omodel_View, string sBarCode, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HOWNERID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        public bool set_SavePonderationBillMain_Temp_BarCode_BillCheck(Model.ClsGy_BarCodeBill_WMS_Model_View omodel_View, Int64 HBillID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Double HQty, Int64 HOWNERID, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DAL.ClsKF_PonderationBillMain_Temp_Ctl tem = new DAL.ClsKF_PonderationBillMain_Temp_Ctl();
@@ -36520,9 +37151,9 @@
            double sRelQty = 0;
            string sBillTypeOneScan = "";   //是否启用一次扫码控制('Y'为启用)
            if (HBillType == "1206" && oSystemParameterMain.Kf_OtherOutBill_BillTypeOneScan == "Y")
            if (HBillType == "1203" && oSystemParameterMain.Kf_OtherInBill_BillTypeOneScan == "Y")
            {
                //其他出库单
                //其他入库单
                sBillTypeOneScan = "Y";
            }
            else if (HBillType == "1204" && oSystemParameterMain.Kf_MateOutBill_BillTypeOneScan == "Y")
@@ -36530,9 +37161,14 @@
                //领料出库单
                sBillTypeOneScan = "Y";
            }
            else if (HBillType == "1206" && oSystemParameterMain.Kf_OtherOutBill_BillTypeOneScan == "Y")
            {
                //其他出库单
                sBillTypeOneScan = "Y";
            }
            //判断是否存在相同条码,判断是否启用一次扫码控制,判断所扫条码是否在单据中
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_BillCheck '" + sBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + ",'" + sBillTypeOneScan + "'", "h_p_WMS_AddBarCode_BillCheck");
            DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddBarCode_BillCheck '" + omodel_View.HBarCode + "'," + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "'," + HWhID + "," + HSPID + ",'" + sBillTypeOneScan + "'", "h_p_WMS_AddBarCode_BillCheck");
            if (ds1 == null || ds1.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "判断所扫条码是否在单据中发生错误!";
@@ -36581,8 +37217,22 @@
                    sRelQty = omodel_View.HQty;
                }
                //其他入库校验,根据系统参数:其他入库校验-应收数量 控制扫码数量能否可超单据数量(小于等于应收、完全等于应收、不控制)
                if (HBillType == "1203" && (oSystemParameterMain.Kf_OtherInBillCheck_MustQtyCtl == "小于等于应收" || oSystemParameterMain.Kf_OtherInBillCheck_MustQtyCtl == "完全等于应收"))
                {
                    if (omodel_View.HSourceQty == 0)
                    {
                        sErrMsg = "所扫物料在单据中剩余可扫数量为0,不允许扫码!";
                        return false;
                    }
                    else if (sRelQty > omodel_View.HSourceQty)
                    {
                        sErrMsg = "所扫描条码数量为 " + sRelQty.ToString() + " 大于对应源单剩余可扫描数量" + omodel_View.HSourceQty.ToString() + ",不允许扫码!";
                        return false;
                    }
                }
                //领料出库校验,根据系统参数:领料出库校验-应收数量 控制扫码数量能否可超单据数量(小于等于应收、完全等于应收、不控制)
                if (HBillType == "1204" && (oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "小于等于应收" || oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "完全等于应收"))
                else if (HBillType == "1204" && (oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "小于等于应收" || oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "完全等于应收"))
                {
                    if (omodel_View.HSourceQty == 0)
                    {
@@ -36626,8 +37276,22 @@
                    sRelQty = omodel_View.HQty;
                }
                //其他入库校验,根据系统参数:其他入库校验-应收数量 控制扫码数量能否可超单据数量(小于等于应收、完全等于应收、不控制)
                if (HBillType == "1203" && (oSystemParameterMain.Kf_OtherInBillCheck_MustQtyCtl == "小于等于应收" || oSystemParameterMain.Kf_OtherInBillCheck_MustQtyCtl == "完全等于应收"))
                {
                    if (omodel_View.HSourceQty == 0)
                    {
                        sErrMsg = "所扫物料在单据中剩余可扫数量为0,不允许扫码!";
                        return false;
                    }
                    else if (sRelQty > omodel_View.HSourceQty)
                    {
                        sErrMsg = "所扫描条码数量为 " + sRelQty.ToString() + " 大于对应源单剩余可扫描数量" + omodel_View.HSourceQty.ToString() + ",不允许扫码!";
                        return false;
                    }
                }
                //领料出库校验,根据系统参数:领料出库校验-应收数量 控制扫码数量能否可超单据数量(小于等于应收、完全等于应收、不控制)
                if (HBillType == "1204" && (oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "小于等于应收" || oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "完全等于应收"))
                else if (HBillType == "1204" && (oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "小于等于应收" || oSystemParameterMain.Kf_MateOutBillCheck_MustQtyCtl == "完全等于应收"))
                {
                    if (omodel_View.HSourceQty == 0)
                    {
@@ -36667,10 +37331,10 @@
                || HBillType == "1254")
            {
                //库存控制-WMS负库存控制
                if (oSystemParameterMain.WMS_WMSStockCtl == "Y")
                if (omodel_View.HBarCodeType == "唯一条码" && oSystemParameterMain.WMS_WMSStockCtl == "Y")
                {
                    //判断ERP库存   返回ERP库存数量
                    DataSet DsWMS = oCn.RunProcReturn("exec h_p_KF_ICInventory_WMS_GetWHAndSP " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_KF_ICInventory_WMS_GetWHAndSP");
                    DataSet DsWMS = oCn.RunProcReturn("exec h_p_KF_ICInventory_WMS_GetWHAndSP " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_KF_ICInventory_WMS_GetWHAndSP");
                    if (DsWMS == null || DsWMS.Tables[0].Rows.Count == 0)
                    {
                        sErrMsg = "判断WMS条码库存,发生错误!";
@@ -36688,7 +37352,7 @@
                }
                //判断ERP库存   返回ERP库存数量
                DataSet DsERP = oCn.RunProcReturn("exec h_p_IF_CheckQtyByERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + omodel_View.HMaterID.ToString() + "," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + sRelQty.ToString() + "," + HOWNERID.ToString(), "h_p_IF_CheckQtyByERPICInventory");
                DataSet DsERP = oCn.RunProcReturn("exec h_p_IF_CheckQtyByERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + omodel_View.HBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + omodel_View.HMaterID.ToString() + "," + omodel_View.HAuxPropID.ToString() + ",'" + omodel_View.HBatchNo + "'," + sRelQty.ToString() + "," + HOWNERID.ToString(), "h_p_IF_CheckQtyByERPICInventory");
                if (DsERP == null || DsERP.Tables[0].Rows.Count == 0)
                {
                    sErrMsg = "判断ERP库存,发生错误!";
@@ -36720,7 +37384,7 @@
            else
            {
                //判断条码扫描数量   返回剩余未扫描数量
                if (!tem.IsBarCode_New(sBarCode, HBillType, false, ref sRelQty, ref sErrMsg))
                if (!tem.IsBarCode_New(omodel_View.HBarCode, HBillType, false, ref sRelQty, ref sErrMsg))
                {
                    sErrMsg = sErrMsg;
                    return false;
@@ -36822,26 +37486,40 @@
                            if (dal.omodel_View.HBarCodeType == "托盘条码")
                            {
                                //分解托盘条码得到明细条码信息写入条码出入库临时表
                                DataSet dsTBarCode;
                                string sBarCode_MX;
                                dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " +
                                " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum");
                                DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode");
                                if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                                {
                                    sErrMsg = "没有找到托盘条码对应子条码记录!";
                                    sErrMsg = "分解托盘条码发生错误!";
                                    return null;
                                }
                                else
                                {
                                    for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                    if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1)
                                    {
                                        sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
                                        //将物料条码信息写入条码出入库临时表
                                        if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                        sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]);
                                        return null;
                                    }
                                    else
                                    {
                                        for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                        {
                                            sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                            return null;
                                            dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HBarCode"]);
                                            dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HBarCodeType"]);
                                            dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HMaterID"]);
                                            dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HAuxPropID"]);
                                            dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HBatchNo"]);
                                            dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[0]["HQty"]);
                                            dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceInterID"]);
                                            dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceEntryID"]);
                                            dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillNo"]);
                                            dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HMTONo"]);
                                            //将物料条码信息写入条码出入库临时表
                                            if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                            {
                                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                                return null;
                                            }
                                        }
                                    }
                                    return oBar;
@@ -36851,7 +37529,7 @@
                            //条码类型不为托盘条码
                            {
                                //将物料条码信息写入条码出入库临时表
                                if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                {
                                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                    return null;
@@ -36891,26 +37569,40 @@
                                if (dal.omodel_View.HBarCodeType == "托盘条码")
                                {
                                    //分解托盘条码得到明细条码信息写入条码出入库临时表
                                    DataSet dsTBarCode;
                                    string sBarCode_MX;
                                    dsTBarCode = oCn.RunProcReturn("select HBarCode HBarCodeMX from Sc_PackUnionBillSub_Sum " +
                                    " Where HBarCode_Pack = '" + sBarCode + "'", "Sc_PackUnionBillSub_Sum");
                                    DataSet dsTBarCode = oCn.RunProcReturn("exec h_p_WMS_BeforeCheckToTPBarCode '" + sBarCode + "'", "h_p_WMS_BeforeCheckToTPBarCode");
                                    if (dsTBarCode == null || dsTBarCode.Tables[0].Rows.Count == 0)
                                    {
                                        sErrMsg = "没有找到托盘条码对应子条码记录!";
                                        sErrMsg = "分解托盘条码发生错误!";
                                        return null;
                                    }
                                    else
                                    {
                                        for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                        if (DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0][0]) == 1)
                                        {
                                            sBarCode_MX = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCodeMX"]);
                                            //将物料条码信息写入条码出入库临时表
                                            if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, sBarCode_MX, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                            sErrMsg = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HRemark"]);
                                            return null;
                                        }
                                        else
                                        {
                                            for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++)
                                            {
                                                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                                return null;
                                                dal.omodel_View.HBarCode = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HBarCode"]);
                                                dal.omodel_View.HBarCodeType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HBarCodeType"]);
                                                dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HMaterID"]);
                                                dal.omodel_View.HAuxPropID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HAuxPropID"]);
                                                dal.omodel_View.HBatchNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HBatchNo"]);
                                                dal.omodel_View.HQty = DBUtility.ClsPub.isDoule(dsTBarCode.Tables[0].Rows[0]["HQty"]);
                                                dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceInterID"]);
                                                dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(dsTBarCode.Tables[0].Rows[0]["HSourceEntryID"]);
                                                dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillNo"]);
                                                dal.omodel_View.HMTONo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HMTONo"]);
                                                //将物料条码信息写入条码出入库临时表
                                                if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                                {
                                                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                                    return null;
                                                }
                                            }
                                        }
                                        return oBar;
@@ -36920,7 +37612,7 @@
                                //条码类型不为托盘条码
                                {
                                    //将物料条码信息写入条码出入库临时表
                                    if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, sBarCode, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                    if (!set_SavePonderationBillMain_Temp_BarCode_BillCheck(dal.omodel_View, HBillID, HBillType, HBillNo, HMaker, HWhID, HSPID, HQty, HOWNERID, oSystemParameter.omodel, ref sErrMsg))
                                    {
                                        sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";扫描物料条码失败!" + sErrMsg;
                                        return null;
@@ -37015,51 +37707,16 @@
                        //单据条码
                        else if (sBarBillType == "源单条码")
                        {
                            DataSet Ds = oCn.RunProcReturn(" select HSourceName from Xt_BarCodeType where HSourceNumber= '" + sBarCodePrefix + "' and HBillType= '" + HBillType + "'", "Xt_BarCodeType");
                            if (Ds == null || Ds.Tables[0].Rows.Count == 0)
                            oBar = get_BillBarCode_BillCheck(HBillNo, HBillType, HMaker, HOWNERID, ref sErrMsg);
                            if (oBar == null)
                            {
                                sErrMsg = "所扫单据条码不属于当前模块!";
                                sErrMsg = "启用一键扫码模式," + sErrMsg;
                                return null;
                            }
                            else
                            {
                                sBarBillName = Pub_Class.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSourceName"]);
                                //其他出库单 源单:其他出库单
                                if (sBarBillName == "其他出库单" && HBillType == "1206")
                                {
                                    oBar = get_BillBarCode_OtherOutCheck(HBillNo, HBillType, HMaker, HOWNERID, ref sErrMsg);
                                    if (oBar == null)
                                    {
                                        sErrMsg = "启用一键扫码模式," + sErrMsg;
                                        return null;
                                    }
                                    else
                                    {
                                        oBar.HBarType = "单据条码";
                                        return oBar;
                                    }
                                }
                                //领料出库单 源单:领料出库单
                                else if (sBarBillName == "领料出库单" && HBillType == "1204")
                                {
                                    oBar = get_BillBarCode_MateOutCheck(HBillNo, HBillType, HMaker, HOWNERID, ref sErrMsg);
                                    if (oBar == null)
                                    {
                                        sErrMsg = "启用一键扫码模式," + sErrMsg;
                                        return null;
                                    }
                                    else
                                    {
                                        oBar.HBarType = "单据条码";
                                        return oBar;
                                    }
                                }
                                else
                                {
                                    sErrMsg = "启用一键扫码模式,所扫条码前缀不属于当前模块单据号前缀!";
                                    return null;
                                }
                                oBar.HBarType = "单据条码";
                                return oBar;
                            }
                        }
                        else
DLL/DAL.dll
Binary files differ
DLL/Pub_Class.dll
Binary files differ