| | |
| | | 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 + ";扫描托条码获取组托单信息失败!"; |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描托条码判断失败!"; |
| | | return null; |
| | | } |
| | | else |
| | |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HInterID + ";扫描托条码失败!" + DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 生产装箱模块 扫描装箱条码 |
| | | |
| | | [WebMethod] |
| | | public bool get_CheckTypeByBarCode_PackUnion(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_PackUnion '" + HBarCode + "'," + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddBarCode_PackUnion"); |
| | | 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 bool set_SavePackUnionBill_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_PackUnionBill_Insert " + HInterID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HBarCode_Pack + "','" + HMaker + "'," + HOWNERID.ToString(), "h_p_Sc_PackUnionBill_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_PackUnionBillSub_Sum_Insert " + 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] |
| | |
| | | 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.RunProc("EXEC h_p_Sc_PackUnionBillSub_Sum_Insert " + HPackUnionInterID.ToString() + ",'" + HPackUnionBillType + "','" + HPackUnionBillNo + "','" + HPackUnionMaker + "'"); |
| | | oCn.Commit(); |
| | | return true; |
| | | } |