yxj
2022-06-10 31538398f2b9ccab00821c1e6f52dcedf5debd5e
新增其他入库(源单:入库申请单)功能各调用方法
2个文件已修改
391 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 391 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DLL/DAL.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 = "  ]  }}";
@@ -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 = "  ]  }}";
@@ -27383,16 +27396,39 @@
        [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;
            }
        }
@@ -27644,6 +27680,281 @@
            }
        }
        /// <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 其他入库    校验模式*
@@ -27783,7 +28094,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 = "  ]  }}";
@@ -33310,8 +33621,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")
                {
@@ -35182,7 +35493,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 生产领料    扫描源单条码
DLL/DAL.dll
Binary files differ