zgq
2021-03-10 bdf99389b5eff2dcee875d89c19cf9d319e00b42
2021-03-10统一更新
9个文件已修改
386 ■■■■ 已修改文件
WebAPI/Controllers/Kf_EntrustInBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/LookingForBillController.cs 266 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/POStockInBillController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/ProductInController.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/WebAPIController.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/WEBAPI.pubxml.user 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web References/WebS/Reference.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Web.config 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebServer.cs 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Kf_EntrustInBillController.cs
@@ -288,7 +288,7 @@
                websLsmain.HMainSourceBillType = "1103";
                websLsmain.HMangerID = lsmain[0].HMangerID;
                websLsmain.HWHID = lsmain[0].HWHID;
                websLsmain.HExplanation = "";
                websLsmain.HExplanation = lsmain[0].HExplanation;
                string sSourceBillType = "1103";
WebAPI/Controllers/LookingForBillController.cs
@@ -186,19 +186,25 @@
                ListModels oListModels = new ListModels();
                List<LookingForBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LookingForBill>>(oMainData);
                oCN.BeginTran();
                var mainSql = "Insert Into LookingForBillMain " +
                    "(HInterID,HBillNo,HSourceInterID,HSourceBillNo,HCreateBy)" +
                //var mainSql1 = "Insert Into Kf_LookingForReturnBillMain " +
                //    "(HInterID,HBillNo,HSourceInterID,HSourceBillNo,HCreateBy)" +
                //    " values" +
                //    "(" + list[0].HInterID + ",'" + list[0].HBillNo + "'," + list[0].HSourceInterID + ",'" + list[0].HSourceBillNo + "','" + list[0].HMaker + "')";
                var mainSql = "Insert Into Kf_LookingForBillMain " +
                    "(HInterID,HBillNo,HSourceInterID,HSourceBillNo,HWhID,HWhName,HSPID,HSPName,HGroupID,HGroup" +
                    ",HSourceID,HSource,HCreateBy)" +
                    " values" +
                    "(" + list[0].HInterID + ",'" + list[0].HBillNo + "'," + list[0].HSourceInterID + ",'" + list[0].HSourceBillNo + "','" + list[0].HMaker + "')";
                    "(" + list[0].HInterID + ",'" + list[0].HBillNo + "'," + list[0].HSourceInterID+ ",'" + list[0].HSourceBillNo + "'," + list[0].HWHID + ",'" + list[0].HWHName + "'," + list[0].HSPID + ",'" + list[0].HSPName + "'," + list[0].HGroupID + ",'" + list[0].HGroup + "',"
                    + list[0].HSourceID + ",'" + list[0].HSource + "','" + list[0].HMaker + "')";
                oCN.RunProc(mainSql);
                for (int i = 0; i < list.Count; i++)
                {
                    var subSql = "Insert Into LookingForBillSub " +
                    "(HWHID,HWHName,HSPID,HSPName,HBillType,HMTONo,HQty,HMaterID,HMaterName,HMaterNumber,HMaterModel,HBarCode,HGroupID,HGroup,HSourceID,HSource,HIsStatus,HStatus,HCreateBy,HMainItemID)" +
                    var subSql = "Insert Into Kf_LookingForBillSub " +
                    "(HWHID,HWHName,HSPID,HSPName,HMTONo,HQty,HMaterID,HMaterName,HMaterNumber,HMaterModel,HBarCode,HGroupID,HGroup,HSourceID,HSource,HCreateBy,HMainItemID)" +
                    " values" +
                    "(" + list[i].HWHID + ",'" + list[i].HWHName + "'," + list[i].HSPID + ",'" + list[i].HSPName + "','1253','" + list[i].HMTONo + "',"+ list[i].HQty + ","
                    "(" + list[i].HWHID + ",'" + list[i].HWHName + "'," + list[i].HSPID + ",'" + list[i].HSPName + "','" + list[i].HMTONo + "',"+ list[i].HQty + ","
                    + list[i].HMaterID + ",'"+ list[i].HMaterName + "','"+ list[i].HMaterNumber + "','"+ list[i].HMaterModel + "','" + list[i].HBarCode + "',"
                    + list[i].HGroupID + ",'"+ list[i].HGroup + "',"+ list[i].HSourceID + ",'" + list[i].HSource + "',' ',' ','"+ list[i].HMaker + "',(select HItemID from LookingForBillMain where HBillNo = '"+ list[i].HBillNo + "'))";
                    + list[i].HGroupID + ",'"+ list[i].HGroup + "',"+ list[i].HSourceID + ",'" + list[i].HSource + "','"+ list[i].HMaker + "',(select HItemID from Kf_LookingForBillMain where HBillNo = '" + list[i].HBillNo + "'))";
                    oCN.RunProc(subSql);
                    var barCodeSql = "update Gy_BarCodeBill set HStatus='裁切中-" + list[i].HSource + "' where HBarCode = '"+ list[i].HBarCode + "'";
                    oCN.RunProc(barCodeSql);
@@ -237,23 +243,40 @@
                List<LookingForBill> lsmain = new List<LookingForBill>();
                ListModels oListModels = new ListModels();
                List<LookingForBill> list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LookingForBill>>(oMainData);
                string flag = "";
                oCN.BeginTran();
                var mainSql = "Insert Into LookingForBillMain " +
                    "(HInterID,HBillNo,HSourceInterID,HSourceBillNo,HCreateBy)" +
                var mainSql = "Insert Into Kf_LookingForReturnBillMain " +
                    "(HInterID,HBillNo,HWhID,HWhName,HSPID,HSPName,HGroupID,HGroup" +
                    ",HSourceID,HSource,HCreateBy)" +
                    " values" +
                    "(" + list[0].HInterID + ",'" + list[0].HBillNo + "'," + list[0].HSourceInterID + ",'" + list[0].HSourceBillNo + "','" + list[0].HMaker + "')";
                    "(" + list[0].HInterID + ",'" + list[0].HBillNo + "'," + list[0].HWHID + ",'" + list[0].HWHName + "'," + list[0].HSPID + ",'" + list[0].HSPName + "'," + list[0].HGroupID + ",'" + list[0].HGroup + "',"
                    + list[0].HSourceID + ",'" + list[0].HSource + "','" + list[0].HMaker + "')";
                oCN.RunProc(mainSql);
                for (int i = 0; i < list.Count; i++)
                {
                    var subSql = "Insert Into LookingForBillSub " +
                    "(HWHID,HWHName,HSPID,HSPName,HBillType,HMTONo,HQty,HMaterID,HMaterName,HMaterNumber,HMaterModel,HBarCode,HGroupID,HGroup,HSourceID,HSource,HIsStatus,HStatus,HCreateBy,HMainItemID)" +
                    var subSql = "Insert Into Kf_LookingForReturnBillSub " +
                    "(HWHID,HWHName,HSPID,HSPName,HMTONo,HQty,HMaterID,HMaterName,HMaterNumber,HMaterModel,HBarCode,HGroupID,HGroup,HSourceID,HSource,HCreateBy,HMainItemID)" +
                    " values" +
                    "(" + list[i].HWHID + ",'" + list[i].HWHName + "'," + list[i].HSPID + ",'" + list[i].HSPName + "','1252','" + list[i].HMTONo + "'," + list[i].HQty + ","
                    "(" + list[i].HWHID + ",'" + list[i].HWHName + "'," + list[i].HSPID + ",'" + list[i].HSPName + "','" + list[i].HMTONo + "'," + list[i].HQty + ","
                    + list[i].HMaterID + ",'" + list[i].HMaterName + "','" + list[i].HMaterNumber + "','" + list[i].HMaterModel + "','" + list[i].HBarCode + "',"
                    + list[i].HGroupID + ",'" + list[i].HGroup + "'," + list[i].HSourceID + ",'" + list[i].HSource + "',' ',' ','" + list[i].HMaker + "',(select HItemID from LookingForBillMain where HBillNo = '" + list[i].HBillNo + "'))";
                    + list[i].HGroupID + ",'" + list[i].HGroup + "'," + list[i].HSourceID + ",'" + list[i].HSource + "','" + list[i].HMaker + "',(select HItemID from Kf_LookingForReturnBillMain where HBillNo = '" + list[i].HBillNo + "'))";
                    oCN.RunProc(subSql);
                    var barCodeSql = "update Gy_BarCodeBill set HStatus='在库' where HBarCode = '" + list[i].HBarCode + "'";
                    var barCodeSql = "update Gy_BarCodeBill set HStatus='" + list[i].HSPName + "-" + list[i].HWHName + "' where HBarCode = '" + list[i].HBarCode + "'";
                    oCN.RunProc(barCodeSql);
                    //判断是否是托条码
                    if (JudgeIsBarCode_s(list[i].HBarCode))
                    {
                        //如果是托条码更新托条码中的实物条码
                        //返回托条码中的实物条码
                        ds = GetHBarCode_s(list[i].HBarCode);
                        int HCount = Pub_Class.ClsPub.isInt(ds.Tables[0].Rows.Count);
                        for (int j = 0; j < HCount; j++)
                        {
                            string HSonBarCode = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[j][0]);
                            var SonBarCodeSql = "update Gy_BarCodeBill set HStatus='" + list[i].HSPName + "-" + list[i].HWHName + "' where HBarCode = '" + HSonBarCode + "'";
                            oCN.RunProc(SonBarCodeSql);
                        }
                    }
                }
                oCN.Commit();
                objJsonResult.code = "1";
@@ -286,7 +309,7 @@
                string[] sArray = HBarCode.Remove(0, 3).Split(';');
                long HSpID = DBUtility.ClsPub.isLong(sArray[1]);
                long HWHID = DBUtility.ClsPub.isLong(sArray[0]);
                string sWhere = " Where HWHID = " + HWHID + " and HItemID = "+ HSpID + "";
                string sWhere = " Where HWHID = " + HWHID + " and HItemID = " + HSpID + "";
                ds = getSpName_Json_s(sWhere);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
@@ -316,16 +339,138 @@
        }
        /// <summary>
        /// 待发区找货根据源单号 返回相关信息
        /// 启用mes仓位,根据老仓库转换成新仓库
        /// </summary>
        /// <returns></returns>
        [Route("LookingFor/getWaitingLookingFor")]
        [Route("LookingFor/GetSpNameMES_Json")]
        [HttpGet]
        public object GetWaitingLookingFor(string HBillType,string HBillNo,string HSourceBillNo,string HCreateBy,string BenginHCreateDate,string EndHCreateDate)
        public object GetSpNameMES_Json(string HERPWHID)
        {
            try
            {
                ds = GetWaitingLookingFor_s(HBillType, HBillNo, HSourceBillNo, HCreateBy, BenginHCreateDate, EndHCreateDate);
                ds = GetSpNameMES_Json_s(HERPWHID);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "请维护新老仓库对应表!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        /// <summary>
        /// 待发区找货根据源单号 返回相关信息
        /// </summary>
        /// <returns></returns>
        //[Route("LookingFor/getWaitingLookingFor")]
        //[HttpGet]
        //public object GetWaitingLookingFor(string HBillType,string HBillNo,string HSourceBillNo,string HCreateBy,string BenginHCreateDate,string EndHCreateDate)
        //{
        //    try
        //    {
        //        ds = GetWaitingLookingFor_s(HBillType, HBillNo, HSourceBillNo, HCreateBy, BenginHCreateDate, EndHCreateDate);
        //        if (ds == null || ds.Tables[0].Rows.Count <= 0)
        //        {
        //            objJsonResult.code = "0";
        //            objJsonResult.count = 0;
        //            objJsonResult.Message = "没有返回任何记录!";
        //            objJsonResult.data = null;
        //            return objJsonResult;
        //        }
        //        else
        //        {
        //            objJsonResult.code = "1";
        //            objJsonResult.count = 1;
        //            objJsonResult.Message = "返回记录成功!";
        //            objJsonResult.data = ds.Tables[0];
        //            return objJsonResult;
        //        }
        //    }
        //    catch (Exception ex)
        //    {
        //        objJsonResult.code = "0";
        //        objJsonResult.count = 0;
        //        objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
        //        objJsonResult.data = null;
        //        return objJsonResult;
        //    }
        //}
        /// <summary>
        /// 上下架单列表
        /// </summary>
        /// <returns></returns>
        [Route("LookingFor/GetLookingForBillList")]
        [HttpGet]
        public object GetLookingForBillList(string HBillType, string sWhere)
        {
            try
            {
                if (HBillType == "ZHXJ")
                {
                    ds = GetLookingForBillListXJ_s(sWhere);
                }
                else if (HBillType == "ZHSJ")
                {
                    ds = GetLookingForBillListSJ_s(sWhere);
                }
                else
                {
                    ds = GetLookingForBillList_s(sWhere);
                }
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "没有返回任何记录!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                else
                {
                    objJsonResult.code = "1";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "返回记录成功!";
                    objJsonResult.data = ds.Tables[0];
                    return objJsonResult;
                }
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "没有返回任何记录!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        //销售出库源单查货-根据销售订单查找实物所在库位
        [Route("LookingFor/GetSellOutFindSP")]
        [HttpGet]
        public object GetSellOutFindSP(string HbillNo)//h_p_Xs_SellOutFindSP
        {
            try
            {
                ds = GetSellOutFindSP_s(HbillNo);
                if (ds == null || ds.Tables[0].Rows.Count <= 0)
                {
                    objJsonResult.code = "0";
@@ -368,6 +513,7 @@
        public static DataSet getSellOrderList_s(string HSourceBillNo)
        {
            //同步销售订单
            new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_IFCLD_ERPSourceBillToLocal_SEOrderToICMO '" + HSourceBillNo+ "'", "h_p_IFCLD_ERPSourceBillToLocal_SEOrderToICMO");
            string sWhere = " Where HSourceBillNo = '" + HSourceBillNo.Trim() + "'";
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_getSellOrderList_s " + sWhere, "h_v_getSellOrderList_s");
@@ -378,15 +524,89 @@
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_getBarCodeDetails_s " + sWhere, "h_v_getBarCodeDetails_s");
        }
        //根据仓位二维码带出仓库仓位相关信息
        public static DataSet getSpName_Json_s(string sWhere)
        {
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_IF_StockPlace " + sWhere, "h_v_IF_StockPlace");
            return new SQLHelper.ClsCN().RunProcReturn("select HWHID,* from h_v_IF_StockPlace " + sWhere, "h_v_IF_StockPlace");
        }
        public static DataSet GetWaitingLookingFor_s(string HBillType, string HBillNo, string HSourceBillNo,string HCreateBy,string BenginHCreateDate,string EndHCreateDate)
        //启用mes仓位,根据老仓库转换成新仓库
        public static DataSet GetSpNameMES_Json_s(string HERPWHID)
        {
            return new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_lookForBillList " + "'" + HBillType + "','" + HBillNo + "','" + HSourceBillNo + "','" + HCreateBy + "','" + HCreateBy + "','" + HCreateBy + "','" + BenginHCreateDate + "','" + EndHCreateDate + "'", "h_p_lookForBillList");
            return new SQLHelper.ClsCN().RunProcReturn("select HMESWHID,HMESWHNAME from Gy_ERPWHRelationMESWH where HERPWHID = " + HERPWHID + "", "Gy_ERPWHRelationMESWH");
        }
        //下架找货单列表
        public static DataSet GetLookingForBillListXJ_s(string sWhere)
        {
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_lookForBillListXJ ", "h_v_lookForBillListXJ");
        }
        //上架归还单列表
        public static DataSet GetLookingForBillListSJ_s(string sWhere)
        {
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_lookForBillListSJ ", "h_v_lookForBillListSJ");
        }
        //上下架单列表
        public static DataSet GetLookingForBillList_s(string sWhere)
        {
            return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_lookForBillList where 1 = 1 " + sWhere, "h_v_lookForBillList");
        }
        //判断是否是托条码
        public static bool JudgeIsBarCode_s(string HBarCode)
        {
            DataSet ds;
            ds = new SQLHelper.ClsCN().RunProcReturn("Select HBarCodeType from Gy_BarCodeBill WITH (NOLOCK) Where HBarCode='" + HBarCode + "'", "Gy_BarCodeBill");
            if (Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0][0]) == "托盘条码")
                return true;
            else
            {
                return false;
            }
        }
        //返回托条码中的实物条码
        public static DataSet GetHBarCode_s(string HBarCode)
        {
            return new SQLHelper.ClsCN().RunProcReturn("select HBarCode from Sc_PackUnionBillMain a inner join Sc_PackUnionBillSub b on a.HInterID = b.HInterID Where a.HBarCode_Pack = '" + HBarCode + "'", "Sc_PackUnionBillMain");
        }
        //根据销售订单查找实物所在库位
        public static DataSet GetSellOutFindSP_s(string HbillNo)
        {
            return new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_Xs_SellOutFindSP '" + HbillNo + "'", "h_p_Xs_SellOutFindSP");
        }
        //测试专用接口
        [Route("LookingFor/Test")]
        [HttpGet]
        public object Test(string HbillNo)//h_p_Xs_SellOutFindSP
        {
            DataSet ds;
            ds = new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_Xs_SellOutFindSP '" + HbillNo + "'", "h_p_Xs_SellOutFindSP");
            if (Pub_Class.ClsPub.isLong(ds.Tables[0].Rows.Count) >= 0 )
            {
                objJsonResult.code = "1";
                objJsonResult.count = 1;
                objJsonResult.Message = "true!";
                objJsonResult.data = ds.Tables[0];//ds.Tables[0].Rows[1][0]
                return objJsonResult;
            }
            else
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "false!";
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
    }
WebAPI/Controllers/POStockInBillController.cs
@@ -572,10 +572,10 @@
                websLsmain.HManagerID = 0;
                websLsmain.HBillerID = lsmain[0].HBillerID;
                websLsmain.HRemark = "";
                websLsmain.HExplanation = "";
                websLsmain.HInnerBillNo = "";
                websLsmain.HRedBlueFlag = false;//false蓝字 true红字
                websLsmain.HMainSourceBillType = lsmain[0].HBillType;
                websLsmain.HExplanation = lsmain[0].HExplanation;
                if (webserver.set_SavePOStockInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
WebAPI/Controllers/ProductInController.cs
@@ -485,6 +485,8 @@
                websLsmain.HMaker = lsmain[0].HMaker;
                websLsmain.HWHID = lsmain[0].HWHID;
                websLsmain.HSupID = lsmain[0].HSupID;
                websLsmain.HExplanation = lsmain[0].HExplanation;
                if (webserver.set_SaveProductInBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo))
                {
WebAPI/Controllers/WebAPIController.cs
@@ -748,6 +748,37 @@
                return objjson;
            }
        }
        /// <summary>
        /// 获取当前数据库名
        /// </summary>
        /// <returns></returns>
        [Route("Web/GetDataBases")]
        [HttpGet]
        public object GetDataBases()
        {
            try
            {
                ClsCN oCn = new ClsCN();
                DataSet oDs = new DataSet();
                //==========
                oDs = oCn.RunProcReturn("Select Name From Master..SysDataBases Where DbId=(Select Dbid From Master..SysProcesses Where Spid = @@spid)", "SysDataBases");
                objjson.code = "1";
                objjson.count = 1;
                objjson.Message = "获取成功!";
                objjson.data = oDs.Tables[0];
                return objjson; ;
            }
            catch (Exception e)
            {
                objjson.code = "0";
                objjson.count = 0;
                objjson.Message = "获取失败!异常" + e.ToString();
                objjson.data = null;
                return objjson; ;
            }
        }
        #endregion
    }
WebAPI/Properties/PublishProfiles/WEBAPI.pubxml.user
@@ -157,10 +157,10 @@
      <publishTime>11/24/2014 11:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>02/25/2021 22:10:11</publishTime>
      <publishTime>03/10/2021 19:29:51</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>02/25/2021 22:10:11</publishTime>
      <publishTime>03/10/2021 19:29:51</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>02/04/2021 21:35:21</publishTime>
@@ -334,7 +334,7 @@
      <publishTime>02/22/2021 09:25:20</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>02/25/2021 22:10:21</publishTime>
      <publishTime>03/10/2021 19:30:04</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/Web References/WebS/Reference.cs
@@ -30709,7 +30709,7 @@
        private string hInnerBillNoField;
        
        private bool hRedBlueFlagField;
        /// <remarks/>
        public string HDateForWeb {
            get {
WebAPI/Web.config
@@ -11,8 +11,8 @@
      
  </configSections>
    <connectionStrings>
        <!--<add name="YqnConn" connectionString="Data Source=192.168.0.175;Initial Catalog=HX_LimsSys_Test;User Id=HX_USER,Password=lc@841022;Integrated Security=True" />-->
    <add name="YqnConn" connectionString="Data Source=.;Initial Catalog=HX_LimsSys_Test;Integrated Security=True" />
        <!--<add name="YqnConn" connectionString="Data Source=192.168.0.175;Initial Catalog=HX_LimsSys;User Id=HX_USER,Password=lc@841022;Integrated Security=True" />-->
    <add name="YqnConn" connectionString="Data Source=.;Initial Catalog=HX_LimsSys;Integrated Security=True" />
    </connectionStrings>
    
  <appSettings>
WebAPI/WebServer.cs
@@ -4438,8 +4438,17 @@
            WebS.WebService1 oWebs = new WebS.WebService1();
            if (oWebs.set_SavePOStockInBill_New(oMain, sHSourceType, ref sErrMsg))
            {
                sErrMsg = "保存成功!" + oMain.HBillNo;
                return true;
                //判断是否反写成功
                if (set_UpdateHStatus(oMain.HInterID, oMain.HExplanation.ToString()))
                {
                    sErrMsg = "保存成功!" + oMain.HBillNo;
                    return true;
                }
                else
                {
                    sErrMsg = "保存成功!" + oMain.HBillNo + "状态反写失败!";
                    return true;
                }
            }
            else
            {
@@ -4790,8 +4799,17 @@
            WebS.WebService1 oWebs = new WebS.WebService1();
            if (oWebs.set_SaveProductInBill_New(oMain, sHSourceType, ref sErrMsg))
            {
                sErrMsg = "保存成功!" + oMain.HBillNo;
                return true;
                //判断是否反写成功
                if (set_UpdateHStatus(oMain.HInterID,oMain.HExplanation.ToString()))
                {
                    sErrMsg = "保存成功!" + oMain.HBillNo;
                    return true;
                }
                else
                {
                    sErrMsg = "保存成功!" + oMain.HBillNo + "状态反写失败!";
                    return true;
                }
            }
            else
            {
@@ -4800,15 +4818,29 @@
            }
        }
        //根据id反写条码档案表状态
        public bool set_UpdateHStatus(long HinterID, string HMESSPName)
        {
            try
            {
                new SQLHelper.ClsCN().RunProcReturn("EXEC h_p_WMS_UpdateMESSPtoBarCode " + HinterID + "," + "'" + HMESSPName + "'", "h_p_WMS_UpdateMESSPtoBarCode");
                return true;
            }
            catch (Exception ex)
            {
                return false;
            }
        }
         /// <summary>
         /// 生成产品入库单
         /// </summary>
         /// <param name="oMain"></param>
         /// <param name="sHSourceType"></param>
         /// <param name="sErrMsg"></param>
         /// <returns></returns>
         public bool set_SaveProductInBill(Model.ClsKf_ProductInBillMain oMain, ref string sErrMsg)
        /// <summary>
        /// 生成产品入库单
        /// </summary>
        /// <param name="oMain"></param>
        /// <param name="sHSourceType"></param>
        /// <param name="sErrMsg"></param>
        /// <returns></returns>
        public bool set_SaveProductInBill(Model.ClsKf_ProductInBillMain oMain, ref string sErrMsg)
         {
             DAL.ClsKf_ProductInBill dal = new DAL.ClsKf_ProductInBill();
             dal.omodel = oMain;
@@ -5313,9 +5345,18 @@
             WebS.WebService1 oWebs = new WebS.WebService1();
             if (oWebs.set_SaveEntrustInBill_New(oMain, sHSourceType, ref sErrMsg))
             {
                 sErrMsg = "保存成功!" + oMain.HBillNo;
                 return true;
             }
                //判断是否反写成功
                if (set_UpdateHStatus(oMain.HInterID, oMain.HExplanation.ToString()))
                {
                    sErrMsg = "保存成功!" + oMain.HBillNo;
                    return true;
                }
                else
                {
                    sErrMsg = "保存成功!" + oMain.HBillNo + "状态反写失败!";
                    return true;
                }
            }
             else
             {
                 sErrMsg = "单据号:" + oMain.HBillNo + ", 单据ID:" + oMain.HInterID + ";" + sErrMsg;