YL
2022-01-10 674dee7f4e35238085be1263f338ce40a85f12e0
Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-WEBS
1个文件已修改
141 ■■■■■ 已修改文件
CLOUDWEB/WebService1.asmx.cs 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CLOUDWEB/WebService1.asmx.cs
@@ -34319,6 +34319,147 @@
        #endregion
        #region 生产装箱、拆箱模块调用方法
        #region 扫描托条码
        [WebMethod]
        public Model.ClsKf_ICStockBill_WMS get_CheckTypeByPackBarCode_Pack(Int64 HInterID, string HBillNo, string HBillType, string HBarCode_Pack, string HHMaker, Int64 HOWNERID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS();
            DataSet ds = oCn.RunProcReturn("exec h_p_KF_PonderationBillMain_Temp_AddPackBarCode_Pack " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HHMaker + "'," + HOWNERID.ToString(), "h_p_KF_PonderationBillMain_Temp_AddPackBarCode_Pack");
            if (ds == null || ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描托条码获取组托单信息失败!";
                return null;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
                {
                    oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HSourceBillNo"]);
                    return oBar;
                }
                else
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描托条码失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    return null;
                }
            }
        }
        #endregion
        #region 生产拆箱模块    扫描拆箱条码
        [WebMethod]
        public bool get_CheckTypeByBarCode_PackSplit(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HOWNERID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            DataSet ds = oCN.RunProcReturn("exec h_p_WMS_AddBarCode_PackSplit '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddBarCode_PackSplit");
            if (ds == null || ds.Tables[0].Rows.Count == 0)
            {
                sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描拆箱条码失败!";
                return false;
            }
            else
            {
                if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
                {
                    return true;
                }
                else
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                    return false;
                }
            }
        }
        #endregion
        #region 生产装箱、拆箱模块,返回列表信息
        [WebMethod]
        public DataSet GetBillEntry_TmpList_Pack(Int64 HInterID, string HBillNo, string HBillType, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            DataSet DS = oCn.RunProcReturn("exec h_p_WMS_BillEntryTmpList_Pack " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_BillEntryTmpList_Pack");
            return DS;
        }
        #endregion
        #region 上传生成生产拆箱单
        [WebMethod]
        public bool set_SavePackSplitBill_New(Int64 HInterID, string HBillType, string HBillNo, string HBarCode_Pack, string HMaker, Int64 HOWNERID, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            try
            {
                oCn.BeginTran();
                DataSet ds = oCn.RunProcReturn("exec h_p_Sc_PackSplitBill_Insert " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_Sc_PackSplitBill_Insert");
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";上传失败!";
                    oCn.RollBack();
                    return false;
                }
                else
                {
                    if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0][0]) == 0)
                    {
                        //根据组托单子表信息重新生成组托单汇总子表,将汇总子表中条码写入条码档案
                        Int64 HPackUnionInterID = Pub_Class.ClsPub.isLong(ds.Tables[0].Rows[0]["HPackUnionInterID"]);
                        string HPackUnionBillType = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HPackUnionBillType"]);
                        string HPackUnionBillNo = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HPackUnionBillNo"]);
                        string HPackUnionMaker = Pub_Class.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HPackUnionMaker"]);
                        oCn.RunProc("EXEC h_p_Sc_PackUnionBill_SumSubBill2 " + HPackUnionInterID.ToString() + ",'" + HPackUnionBillType + "','" + HPackUnionBillNo + "','" + HPackUnionMaker + "'");
                        oCn.Commit();
                        return true;
                    }
                    else
                    {
                        sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]);
                        oCn.RollBack();
                        return false;
                    }
                }
            }
            catch (Exception e)
            {
                sErrMsg = "生成生产拆箱单失败!" + e.Message;
                oCn.RollBack();
                return false;
            }
        }
        #endregion
        #region 删除明细表体选中行记录
        [WebMethod]
        public bool set_DelPonderationBillMain_Temp_Pack(Int64 HInterID, string HBarCode, string HBillType, ref string sErrMsg)
        {
            SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
            try
            {
                oCn.RunProc("Delete from KF_PonderationBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + HBillType + "' and HBarCode='" + HBarCode + "' and HPieceQty=1", ref DBUtility.ClsPub.sExeReturnInfo);
                return true;
            }
            catch (Exception e)
            {
                sErrMsg = "删除模治具出入库临时表记录失败!" + e.Message;
                return false;
            }
        }
        #endregion
        #endregion
        #region  桌面条码生成外网版