| | |
| | | { |
| | | sErrMsg = ""; |
| | | } |
| | | |
| | | //车间在线报工模块 汇报后,根据汇报数量 反写 条码标签数量 |
| | | oCn.RunProc("exec h_p_WMS_UpdateHQtyByBarCodeBill " + oMain.HInterID.ToString() + ",'3711'"); |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | |
| | | string msgReport = dbId + ';' + sCLOUDUseName + ';' + sCLOUDPsd + ';' + 2052; |
| | | |
| | | |
| | | LogService.Write($"{Pub_Class.ClsPub.sCLOUDUrl}、{dbId}、{sCLOUDUseName}、{sCLOUDPsd}"); |
| | | //LogService.Write($"{Pub_Class.ClsPub.sCLOUDUrl}、{dbId}、{sCLOUDUseName}、{sCLOUDPsd}"); |
| | | |
| | | LogService.Write(sJson); |
| | | |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3814"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",3"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3814"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",3"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3814"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",3"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3814"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",3"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3840"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",3"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3840"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",3"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3841"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",3"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3802"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",2"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | sErrMsg = "发料没有选择!"; |
| | | return false; |
| | | } |
| | | //生成领料出库单前判断 |
| | | DataSet DsCheck; |
| | | DsCheck = oCn.RunProcReturn("exec h_p_K3_LoadMateOutCheck " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + sHSourceType + "'", "h_p_K3_LoadMateOutCheck"); |
| | | if (DsCheck == null || DsCheck.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "生成单据前判断失败!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(DsCheck.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(DsCheck.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //K3负库存判断 |
| | | if (oSystemParameterMain.WMS_ERPStockCtl == "Y") //系统参数 提交后ERP负库存控制 |
| | | { |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3803"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",1"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | if (oSystemParameterMain.WMS_MouldManagerCtl == "Y") //系统参数 启用器具管理 |
| | | { |
| | | string HMouldBillType = "3803"; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString()); |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + ",1"); |
| | | } |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | |
| | | { |
| | | sErrMsg = "保管没有选择!"; |
| | | return false; |
| | | } |
| | | //生成产品入库单前判断 |
| | | DataSet DsCheck; |
| | | DsCheck = oCn.RunProcReturn("exec h_p_K3_LoadProductInCheck " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + sHSourceType + "'", "h_p_K3_LoadProductInCheck"); |
| | | if (DsCheck == null || DsCheck.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "生成单据前判断失败!"; |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(DsCheck.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(DsCheck.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | try |
| | |
| | | } |
| | | else |
| | | { |
| | | if (HSourceBillNo != "" && SourceFlag == true) |
| | | { |
| | | if (HBillType == "1202") //生产入库时 条码主内码、子内码和源单主内码、子内码必须一致 |
| | | { |
| | | if (dal.omodel_View.HSourceInterID != DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"]) |
| | | && dal.omodel_View.HSourceEntryID != DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"]) |
| | | ) |
| | | { |
| | | sErrMsg = "该条码的源单与扫描的源单不一致,请确认无误后重新扫描!"; |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | dal.omodel_View.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | dal.omodel_View.HSourceEntryID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"]); |
| | | dal.omodel_View.HSourceInterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"]); |
| | |
| | | #region 扫描源单条码 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_New(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, bool HRedBlueflag, string HHMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HOWNERID, ref string sErrMsg) |
| | | public Model.ClsKf_ICStockBill_WMS get_SourceBarCode_New(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, bool HRedBlueflag, bool SourceFlag, string HMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HOWNERID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_WMS oBar = new Model.ClsKf_ICStockBill_WMS(); |
| | |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单时获取系统参数失败! " + sErrMsg; |
| | | return null; |
| | | } |
| | | oBar = getSourceBill_New(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HRedBlueflag, HHMaker, HPTQty, HPlanMode, HFIFOWhID, HOWNERID, HAccessFlag, oSystemParameter.omodel, ref sErrMsg); |
| | | oBar = getSourceBill_New(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HRedBlueflag, HMaker, HPTQty, HPlanMode, HFIFOWhID, HOWNERID, HAccessFlag, SourceFlag, oSystemParameter.omodel, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单失败!" + sErrMsg; |
| | |
| | | #region 将源单信息存入条码出入库临时表 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_WMS getSourceBill_New(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, bool HRedBlueflag, string HHMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HOWNERID, Int64 HAccessFlag, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | public Model.ClsKf_ICStockBill_WMS getSourceBill_New(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, bool HRedBlueflag, string HMaker, Double HPTQty, Int64 HPlanMode, Int64 HFIFOWhID, Int64 HOWNERID, Int64 HAccessFlag, bool SourceFlag, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, 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_AddSourceBarCode_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "','" + sRedBlue + "'," + sMulSourceFlag.ToString() + ",'" + HHMaker + "'," + HPTQty.ToString() + "," + HPlanMode.ToString() + "," + HFIFOWhID.ToString() + "," + HOWNERID.ToString() + "," + HAccessFlag.ToString(), "h_p_WMS_AddSourceBarCode_New"); |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "','" + sRedBlue + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HPTQty.ToString() + "," + HPlanMode.ToString() + "," + HFIFOWhID.ToString() + "," + HOWNERID.ToString() + "," + HAccessFlag.ToString(), "h_p_WMS_AddSourceBarCode_New"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "将源单信息存入条码出入库临时表失败!"; |
| | |
| | | #endregion |
| | | |
| | | |
| | | // #region 扫描物料条码调用方法 |
| | | |
| | | // #region 扫描物料条码 |
| | | |
| | | // [WebMethod] |
| | | // public Model.ClsKf_ICStockBill_WMS get_MaterBarCode_New(string HBarCode, Int64 HInterID, string HBillType, string HBillNo, string HMaker, Int64 HWhID, Int64 HSPID, Int64 HSCWhID, Int64 HSCSPID, Double HQty, bool HRedBlueFlag, bool SourceFlag, string HSourceBillNo, string HSourceBillType, Int64 HStockOrgID, Int64 HStockOutOrgID, string HExpressNumber, ref string sHSourceBillNo, ref string sHSourceBillType, ref long sHSupID, ref string sHSupName, ref long sHDeptID, ref string sHDeptName, ref string sErrMsg) |
| | | // { |
| | | // SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | // Model.ClsKf_ICStockBill_WMS model = new Model.ClsKf_ICStockBill_WMS(); |
| | | // //获取系统参数 |
| | | // Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | // if (oSystemParameter.ShowBill(ref sErrMsg) == false) |
| | | // { |
| | | // sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | // return null; |
| | | // } |
| | | // //判断条码是否为空 |
| | | // if (HBarCode.Trim() == "") |
| | | // { |
| | | // sErrMsg = "条码不能为空,请重新扫描物料条码!"; |
| | | // return null; |
| | | // } |
| | | // //判断条码是否含特殊符号 # ,如果含有则拆分,截取 # 前字符串 |
| | | // string[] NewBarCode; |
| | | // if (HBarCode.CompareTo("#") > 0) |
| | | // { |
| | | // NewBarCode = HBarCode.Split(Convert.ToChar("#")); |
| | | // HBarCode = NewBarCode[0]; |
| | | // } |
| | | // //获取条码档案信息 |
| | | // Model.ClsGy_BarCodeBill_WMS_Model_View oBar = new Model.ClsGy_BarCodeBill_WMS_Model_View(); |
| | | // DataSet ds1 = oCn.RunProcReturn("Select * from h_v_Gy_BarCodeBill_New Where HBarCode='" + HBarCode + "'", "h_v_Gy_BarCodeBill_New"); |
| | | // if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // sErrMsg = "所扫描物料条码:" + HBarCode + " 无效,不存在条码档案中!"; |
| | | // return null; |
| | | // } |
| | | // else |
| | | // { |
| | | // oBar.HItemID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HItemID"]); |
| | | // oBar.HBarCode = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBarCode"]); |
| | | // oBar.HBarCodeType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBarCodeType"]); |
| | | // oBar.HStopflag = DBUtility.ClsPub.isBool(ds1.Tables[0].Rows[0]["HStopflag"]); |
| | | // oBar.HRemark = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]); |
| | | // oBar.HMaterID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HMaterID"]); |
| | | // oBar.HUnitID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HUnitID"]); |
| | | // oBar.HAuxPropID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HAuxPropID"]); |
| | | // oBar.HBatchNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HBatchNo"]); |
| | | // oBar.HQty = DBUtility.ClsPub.isDoule(ds1.Tables[0].Rows[0]["HQty"]); |
| | | // oBar.HSourceInterID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSourceInterID"]); |
| | | // oBar.HSourceEntryID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSourceEntryID"]); |
| | | // oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | // oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HSourceBillType"]); |
| | | // oBar.HMTONo = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HMTONo"]); |
| | | // oBar.HSTOCKORGID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HSTOCKORGID"]); |
| | | // oBar.HOWNERID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HOWNERID"]); |
| | | // } |
| | | // //判断条码是否可用 |
| | | // if (oBar.HStopflag) |
| | | // { |
| | | // sErrMsg = "所扫描物料条码:" + HBarCode + " 已作废,不允许进行扫码操作!"; |
| | | // return null; |
| | | // } |
| | | // //入库、汇报模块,有源单条码 且 条码类型为唯一条码,扫描物料条码时自动带出源单信息 |
| | | // //采购入库(1201)、产品入库(1202)、委外入库(1210)、生产汇报(3711) |
| | | // if (oBar.HBarCodeType == "唯一条码" && oBar.HSourceBillNo == "" && HSourceBillType != "-1" |
| | | // && (HBillType == "1201" || HBillType == "1202" || HBillType == "1210" || HBillType == "3711")) |
| | | // { |
| | | // Int64 HAccessFlag = 1; //是否物料条码带出源单信息标志(0为直接扫源单条码,1为物料条码带出源单信息) |
| | | // model = getSourceBill_New(HInterID, HBillNo, HBillType, oBar.HSourceBillNo, oBar.HSourceBillType, HRedBlueFlag, HMaker, 0, 0, 0, HStockOrgID, HAccessFlag, SourceFlag, oSystemParameter.omodel, ref sErrMsg); |
| | | // if (model == null) |
| | | // { |
| | | // sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单失败!" + sErrMsg; |
| | | // return null; |
| | | // } |
| | | // else |
| | | // { |
| | | // HSourceBillType = model.HSourceBillType; |
| | | // SourceFlag = true; |
| | | // return model; |
| | | // } |
| | | // } |
| | | |
| | | // //1、首次扫码防串单判断; 2、源单类型是否在源单列表里判断;3、唯一条码是否存在相同条码判断; 4、有源单,物料是否在源单中判断 |
| | | // DataSet ds2 = oCn.RunProcReturn("exec h_p_WMS_GetSourceInterID_AddBarCode " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode + "','" + HSourceBillType + "'," + DBUtility.ClsPub.BoolToString(SourceFlag) + ",'" + oSystemParameter.omodel.WMS_BarCodeMustSameSourceBill + "'," + HStockOrgID.ToString(), "h_p_WMS_GetSourceInterID_AddBarCode"); |
| | | // if (ds2 == null || ds2.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // sErrMsg = "扫描物料条码,判断条码是否在源单中时发生错误!"; |
| | | // return null; |
| | | // } |
| | | // else |
| | | // { |
| | | // if (DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0][0]) == 1) |
| | | // { |
| | | // sErrMsg = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HRemark"]); |
| | | // return null; |
| | | // } |
| | | // else |
| | | // { |
| | | // oBar.HSourceInterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceInterID"]); |
| | | // oBar.HSourceEntryID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HSourceEntryID"]); |
| | | // oBar.HSourceBillNo = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | // oBar.HSourceBillType = DBUtility.ClsPub.isStrNull(ds2.Tables[0].Rows[0]["HSourceBillType"]); |
| | | // oBar.HMaterID = DBUtility.ClsPub.isLong(ds2.Tables[0].Rows[0]["HMaterID"]); |
| | | // oBar.HinitQty = DBUtility.ClsPub.isDoule(ds2.Tables[0].Rows[0]["HQtyMust"]); //剩余未扫码数量(应收数量-扫码总数量 或0),非唯一条码用到 |
| | | // } |
| | | // } |
| | | |
| | | // //获取、判断仓库、仓位 |
| | | // DataSet ds3 = oCn.RunProcReturn("exec h_p_WMS_GetWHIDandSPID_AddBarCode " + HInterID.ToString() + ",'" + HBillType + "'," + HWhID + "," + HSPID + "," + HSCWhID + "," + HSCSPID + "," + oBar.HSourceInterID + "," + oBar.HSourceEntryID + "," + oBar.HMaterID + "," + HStockOrgID + "," + HStockOutOrgID + ",'" + oBar.HBarCodeType + "','" + oSystemParameter.omodel.WMS_WMSStockCtl + "'", "h_p_WMS_GetWHIDandSPID_AddBarCode"); |
| | | // if (ds3 == null || ds3.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // sErrMsg = "扫描物料条码,判断仓库、仓位值时发生错误!"; |
| | | // return null; |
| | | // } |
| | | // else |
| | | // { |
| | | // if (DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0][0]) == 1) |
| | | // { |
| | | // sErrMsg = DBUtility.ClsPub.isStrNull(ds3.Tables[0].Rows[0]["HRemark"]); |
| | | // return null; |
| | | // } |
| | | // else |
| | | // { |
| | | // model.HWhID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HWHID"]); |
| | | // model.HSPID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSPID"]); |
| | | // model.HSCWhID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSCWHID"]); |
| | | // model.HSCSPID = DBUtility.ClsPub.isLong(ds3.Tables[0].Rows[0]["HSCSPID"]); |
| | | // } |
| | | // } |
| | | |
| | | // //初步获取条码数量 |
| | | // if (oBar.HBarCodeType == "唯一条码") |
| | | // { |
| | | // if (HQty > 0 && oBar.HQty > HQty) //0<界面递入数量<条码档案数量,取递入数量 |
| | | // { |
| | | // oBar.HQty = HQty; |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // if (HQty > 0) //界面递入数量>0,取递入数量 |
| | | // { |
| | | // oBar.HQty = HQty; |
| | | // } |
| | | // else if (oBar.HinitQty > 0) //界面递入数量<0,源单剩余未扫码数量>0,取源单剩余未扫码数量 |
| | | // { |
| | | // oBar.HQty = oBar.HinitQty; |
| | | // } |
| | | // } |
| | | |
| | | // //生产领料(1204)、销售出库(1205)、其他出库蓝字(1206)、委外出库(1211) |
| | | // //外购退料(1239)、产品退库(1245)、其他入库红字(1248)、委外退库(1246) |
| | | // //生产补料(1254) |
| | | // if (HBillType == "1204" || HBillType == "1205" || HBillType == "1206" || HBillType == "1211" |
| | | // || HBillType == "1239" || HBillType == "1245" || HBillType == "1248" || HBillType == "1246" |
| | | // || HBillType == "1254") |
| | | // { |
| | | // if (oSystemParameter.omodel.WMS_ERPStockCtl == "Y") |
| | | // { |
| | | |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // //非唯一条码扫描时判断仓库仓位是否已选择 |
| | | // if (dal.omodel_View.HBarCodeType != "唯一条码") |
| | | // { |
| | | // if (oSystemParameter.omodel.WMS_ERPStockCtl == "N") |
| | | // { |
| | | |
| | | // } |
| | | // else |
| | | // { |
| | | // //判断ERP库存 返回ERP库存数量 |
| | | // DataSet ds6 = oCn.RunProcReturn("exec h_p_IF_CheckQtyByERPICInventory " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString() + "," + dal.omodel_View.HMaterID.ToString() + "," + dal.omodel_View.HAuxPropID.ToString() + ",'" + dal.omodel_View.HBatchNo + "'," + sRelQty.ToString() + "," + HOWNERID.ToString(), "h_p_IF_CheckQtyByERPICInventory"); |
| | | // if (ds6 == null || ds6.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // sErrMsg = "判断ERP库存,未知错误!"; |
| | | // return false; |
| | | // } |
| | | // else |
| | | // { |
| | | // if (DBUtility.ClsPub.isLong(ds6.Tables[0].Rows[0][0]) == 0) |
| | | // { |
| | | // dal.omodel_View.HMaterID = DBUtility.ClsPub.isLong(ds6.Tables[0].Rows[0]["HMaterID"]); |
| | | // HQty = DBUtility.ClsPub.isDoule(ds6.Tables[0].Rows[0]["HQty"]); |
| | | // } |
| | | // else |
| | | // { |
| | | // sErrMsg = DBUtility.ClsPub.isStrNull(ds6.Tables[0].Rows[0]["HRemark"]); |
| | | // return false; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // //判断条码库存 返回库存数量 仓库 仓位 |
| | | // DAL.ClsKF_PonderationBillMain_Temp_View Tempdal = new DAL.ClsKF_PonderationBillMain_Temp_View(); |
| | | // if (Tempdal.CheckQtyByBarCode(HBillID, HBillType, sBarCode, ref HWhID, ref HSPID, sRelQty, ref sRelQty)) |
| | | // { |
| | | |
| | | // } |
| | | // else |
| | | // { |
| | | // if (sRelQty == 0) |
| | | // { |
| | | // sErrMsg = "无库存!"; |
| | | // return false; |
| | | // } |
| | | // else |
| | | // { |
| | | // sErrMsg = "库存不足,已获取实际库存数量!"; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // //采购入库(1201)、产品入库(1202)、其他入库蓝字(1203)、委外入库(1210) |
| | | // //生产退料(1244)、销售退库(1247)、其他出库红字(1249)、委外退料(1238) |
| | | // else |
| | | // { |
| | | // //判断并获取 仓库 仓位信息 |
| | | // DataSet ds4 = oCn.RunProcReturn("exec h_p_WMS_GetBillWHID " + HBillID.ToString() + ",'" + HBillType + "','" + sBarCode + "'," + HWhID.ToString() + "," + HSPID.ToString(), "h_p_WMS_GetBillWHID"); |
| | | // if (ds4 == null || ds4.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // sErrMsg = "判断并获取仓库仓位信息,未知错误!"; |
| | | // return false; |
| | | // } |
| | | // else |
| | | // { |
| | | // if (DBUtility.ClsPub.isLong(ds4.Tables[0].Rows[0][0]) == 0) |
| | | // { |
| | | // HWhID = DBUtility.ClsPub.isLong(ds4.Tables[0].Rows[0]["HWHID"]); |
| | | // HSPID = DBUtility.ClsPub.isLong(ds4.Tables[0].Rows[0]["HSPID"]); |
| | | // } |
| | | // else |
| | | // { |
| | | // sErrMsg = DBUtility.ClsPub.isStrNull(ds4.Tables[0].Rows[0]["HRemark"]); |
| | | // return false; |
| | | // } |
| | | // } |
| | | // //判断条码扫描数量 返回剩余未扫描数量 |
| | | // if (tem.IsBarCode_New(sBarCode, HBillType, HRedBlueFlag, ref sRelQty, ref sErrMsg)) |
| | | // { |
| | | |
| | | // } |
| | | // else |
| | | // { |
| | | // sErrMsg = sErrMsg; |
| | | // return false; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // if (HExpressNumber == "工序汇报转移单") |
| | | // { |
| | | // model.HSubBillType = "1270"; |
| | | // HExpressNumber = ""; |
| | | // } |
| | | // model.HInterID = HBillID; |
| | | // model.HBillNo = HBillNo; |
| | | // model.HBillType = HBillType; |
| | | // model.HMaker = HMaker; |
| | | // // |
| | | // model.HMaterID = dal.omodel_View.HMaterID; |
| | | // model.HAuxPropID = dal.omodel_View.HAuxPropID; |
| | | // model.HErpClsID = dal.omodel_View.HErpClsID; |
| | | // model.HQty = sRelQty; |
| | | // model.HQtyMust = dal.omodel_View.HinitQty; |
| | | // model.HBarCode = dal.omodel_View.HBarCode; |
| | | // model.HBatchNo = dal.omodel_View.HBatchNo; |
| | | // model.HMTONo = dal.omodel_View.HMTONo; |
| | | |
| | | // model.HWhID = HWhID; |
| | | // model.HStockPlaceID = HSPID; |
| | | // model.HSourceInterID = dal.omodel_View.HSourceInterID; |
| | | // model.HSourceEntryID = dal.omodel_View.HSourceEntryID; |
| | | // model.HSourceBillNo = dal.omodel_View.HSourceBillNo; |
| | | // model.HSourceBillType = HSourceBillType; |
| | | // model.HRedBlueFlag = HRedBlueFlag; |
| | | // model.HPieceQty = 1; |
| | | // model.HSTOCKORGID = HOWNERID; |
| | | // model.HOWNERID = HOWNERID; |
| | | // model.HCusBarCode = HExpressNumber; |
| | | |
| | | // ////获取系统参数 |
| | | // //Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); |
| | | // //if (oSystemParameter.ShowBill(ref sErrMsg) == false) |
| | | // //{ |
| | | // // sErrMsg = "获取系统参数失败! " + sErrMsg; |
| | | // // return false; |
| | | // //} |
| | | // //生产领料单-先进先出控制 |
| | | // if (HBillType == "1204" && oSystemParameter.omodel.Kf_MateOutBill_FIFOCtl == "Y") //系统参数 生产领料单-先进先出控制 |
| | | // { |
| | | // DataSet FIFO = oCn.RunProcReturn("exec h_p_Kf_ICInventory_FIFO_Tmp_BarCode " + HBillID.ToString() + ",'" + HBillType + "','" + model.HBatchNo + "','" + model.HBarCode + "'," + model.HQty.ToString(), "h_p_Kf_ICInventory_FIFO_Tmp_BarCode"); |
| | | // if (FIFO == null || FIFO.Tables[0].Rows.Count == 0) |
| | | // { |
| | | // sErrMsg = "请根据先进先出清单扫码!"; |
| | | // return false; |
| | | // } |
| | | // else |
| | | //{ |
| | | // model.HWhID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HWHID"]); |
| | | // model.HStockPlaceID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HSPID"]); |
| | | // model.HQty = DBUtility.ClsPub.isDoule(FIFO.Tables[0].Rows[0]["HQty"]); |
| | | // model.HQtyMust = DBUtility.ClsPub.isDoule(FIFO.Tables[0].Rows[0]["HSumQtyMust"]); |
| | | // model.HSourceInterID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HSourceInterID"]); |
| | | // model.HSourceEntryID = DBUtility.ClsPub.isLong(FIFO.Tables[0].Rows[0]["HSourceEntryID"]); |
| | | // model.HSourceBillNo = DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | // model.HSourceBillType = DBUtility.ClsPub.isStrNull(FIFO.Tables[0].Rows[0]["HSourceBillType"]); |
| | | //} |
| | | // } |
| | | |
| | | // //物料条码写入临时表时,判断仓库仓位是否正确 |
| | | // DataSet ds5 = oCn.RunProcReturn("exec h_p_WMS_CheckWHandSP " + model.HWhID.ToString() + "," + model.HStockPlaceID.ToString(), "h_p_WMS_CheckWHandSP"); |
| | | //if (ds5 == null || ds5.Tables[0].Rows.Count == 0) |
| | | //{ |
| | | // sErrMsg = "扫描物料条码存入临时表时判断仓库仓位是否正确,未知错误!"; |
| | | // return false; |
| | | //} |
| | | //else |
| | | //{ |
| | | // if (DBUtility.ClsPub.isLong(ds5.Tables[0].Rows[0][0]) == 1) |
| | | // { |
| | | // sErrMsg = DBUtility.ClsPub.isStrNull(ds5.Tables[0].Rows[0]["HRemark"]); |
| | | // return false; |
| | | // } |
| | | //} |
| | | |
| | | ////将物料条码信息写入出入库条码临时表 |
| | | //if (set_SavePonderationBillMain_Temp_Select_Qty(model, HQty, ref sErrMsg)) |
| | | //{ |
| | | |
| | | //} |
| | | //else |
| | | //{ |
| | | // sErrMsg = "扫描失败!" + sErrMsg; |
| | | // return false; |
| | | //} |
| | | //return true; |
| | | // } |
| | | |
| | | // #endregion |
| | | |
| | | |
| | | // #endregion |
| | | |
| | | |
| | | #region 模具条码处理方法 |
| | | |
| | | #region 扫描模具源单条码 |
| | | |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_Mould get_CheckTypeByMouldSource(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HHMaker, Int64 HOWNERID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_Mould oBar = new Model.ClsKf_ICStockBill_Mould(); |
| | | oBar = getMouldSourceBillList(HInterID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HHMaker, HOWNERID, ref sErrMsg); |
| | | if (oBar == null) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描源单失败!" + sErrMsg; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return oBar; |
| | | } |
| | | } |
| | | |
| | | //将模具源单信息存入模具出入库临时表 |
| | | [WebMethod] |
| | | public Model.ClsKf_ICStockBill_Mould getMouldSourceBillList(Int64 HInterID, string HBillNo, string HBillType, string HSourceBillNo, string HSourceBillType, string HHMaker, Int64 HOWNERID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Model.ClsKf_ICStockBill_Mould oBar = new Model.ClsKf_ICStockBill_Mould(); |
| | | |
| | | DataSet ds1 = oCn.RunProcReturn("exec h_p_Sc_MouldStockBillMain_Temp_AddSource " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "','" + HHMaker + "'," + HOWNERID.ToString(), "h_p_Sc_MouldStockBillMain_Temp_AddSource"); |
| | | if (ds1 == null || ds1.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "将源单信息存入器具出入库临时表失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | 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.HStockStyle = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HStockStyle"]); |
| | | oBar.HStockInOrgID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HStockInOrgID"]); |
| | | oBar.HStockInOrgName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HStockInOrgName"]); |
| | | oBar.HStockOutOrgID = DBUtility.ClsPub.isLong(ds1.Tables[0].Rows[0]["HStockOutOrgID"]); |
| | | oBar.HStockOutOrgName = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HStockOutOrgName"]); |
| | | return oBar; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(ds1.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | //显示模治具列表信息 |
| | | [WebMethod] |
| | | public DataSet GetMouldBillEntry_TmpList(long HInterID, string HBillNo, string HBillType, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet DS = oCn.RunProcReturn("exec h_p_WMS_MouldBillEntryTmpList " + HInterID.ToString() + ",'" + HBillType + "'", "h_p_WMS_MouldBillEntryTmpList"); |
| | | return DS; |
| | | } |
| | | |
| | | //删除模治具列表中选中行记录 |
| | | [WebMethod] |
| | | public bool set_DelSc_MouldStockBillMain_Temp(long HInterID, long HMouldInterID, string sHBillType, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + sHBillType + "' and HMouldID=" + HMouldInterID.ToString() + " and HQty<>0", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "删除模治具出入库临时表记录失败!" + e.Message; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //上传生成模具出入库单 |
| | | [WebMethod] |
| | | public bool set_SaveMouldStockBill_New(Model.ClsSc_MouldStockBillMain oMain, string sHSourceType, ref string sErrMsg) |
| | | { |
| | | //上传前判断 |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_Sc_PreUpload_MouldStockBill " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "'," + oMain.HSupID.ToString(), "h_p_Sc_PreUpload_MouldStockBill"); |
| | | 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(); |
| | | string HMouldBillType = oMain.HBillType; |
| | | oCn.RunProc("EXEC h_p_Sc_MouldStockBill_Insert_New " + oMain.HInterID.ToString() + ",'" + oMain.HBillType + "','" + HMouldBillType + "'," + oMain.HSupID.ToString() + "," + oMain.HKeeperID.ToString() + "," + oMain.HSecManagerID.ToString() + "," + oMain.HDeptID.ToString() + "," + oMain.HCorrespondentTypeID.ToString()); |
| | | //更新关联数量 |
| | | if (oMain.HBillType == "3841" && sHSourceType == "3840") |
| | | { |
| | | //器具分步调入单,源单:器具分步调出单 |
| | | oCn.RunProc("exec h_p_Sc_UpDateMouldMoveStockStepOutRelation_Add " + oMain.HInterID.ToString()); |
| | | } |
| | | oCn.Commit(); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "生成模具出入库单失败!" + e.Message; |
| | | oCn.RollBack(); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #region 模具缓存列表处理方法 |
| | | |
| | | //缓存列表界面,选择编辑时,判断所选单据是否存在已上传记录 |
| | | [WebMethod] |
| | | public bool MouldTempList_Modify(Int64 sHInterID, string sHBillNo, string sHBillType, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_WMS_MouldTempList_Modify " + sHInterID + ",'" + sHBillNo + "','" + sHBillType + "'", "h_p_WMS_MouldTempList_Modify"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "模具缓存列表编辑前判断失败!"; |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | //缓存列表界面,返回缓存表头信息 |
| | | [WebMethod] |
| | | public DataSet GetMouldSource(string HBillType, string HSourceBillNo, string HSourceType, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet DS = oCn.RunProcReturn("exec h_p_Sc_MouldSourceList '" + HBillType.ToString() + "','" + HSourceBillNo + "','" + HSourceType + "'", "h_p_Sc_MouldSourceList"); |
| | | return DS; |
| | | } |
| | | |
| | | //缓存列表界面,返回缓存列表信息 |
| | | [WebMethod] |
| | | public DataSet GetSc_MouldStockBillMain_TempList(string sHBillType, string sHMaker, Int64 sHOWNERID) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_Sc_GetMouldStockBillMain_TempList '" + sHBillType + "','" + sHMaker + "'," + sHOWNERID.ToString(), "h_p_Sc_GetMouldStockBillMain_TempList"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | return Ds; |
| | | } |
| | | } |
| | | |
| | | //缓存列表界面,删除缓存列表单据 |
| | | [WebMethod] |
| | | public bool DeleteMouldBillList(Int64 HInterID, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HInterID=" + HInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "删除失败!" + e.Message; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | #region 单据列表数据处理 |
| | | |
| | | //显示物料明细列表、模治具列表、先进先出列表信息 |
| | |
| | | return DS; |
| | | } |
| | | |
| | | //删除模治具列表中选中行记录 |
| | | [WebMethod] |
| | | public bool set_DelSc_MouldStockBillMain_Temp(long HInterID, long HMouldInterID, string sHBillType, ref string sErrMsg) |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | oCn.RunProc("Delete from Sc_MouldStockBillMain_Temp where HInterID=" + HInterID.ToString() + " and HBillType='" + sHBillType + "' and HMouldID=" + HMouldInterID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); |
| | | return true; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | sErrMsg = "删除模治具出入库临时表记录失败!" + e.Message; |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |