| | |
| | | [WebMethod] |
| | | public bool set_SaveMoveBill_CLD(Model.ClsKf_MoveStockBillMain oMain, string sHSourceType, Pub_Class.ClsXt_SystemParameterMain oSystemParameterMain, ref string sErrMsg) |
| | | { |
| | | //领料调拨(源单:生产任务单-投料) |
| | | if (sHSourceType == "3720") |
| | | if (sHSourceType == "3720")//生产用料清单 |
| | | { |
| | | if (SaveMoveMaterOut_CLD(oMain, oSystemParameterMain, ref sErrMsg)) |
| | | if (SaveMoveStockBill_PPBom_CLD(oMain, sHSourceType, oSystemParameterMain, ref sErrMsg)) |
| | | { |
| | | //"保存成功!"; |
| | | sErrMsg = "保存成功!" + oMain.HBillNo; |
| | |
| | | { |
| | | //"保存失败!"; |
| | | sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + sErrMsg; |
| | | //sErrMsg = sErrMsg; |
| | | return false; |
| | | } |
| | | } |
| | | ////领料调拨(源单:生产任务单-投料) |
| | | //if (sHSourceType == "3720") |
| | | //{ |
| | | // if (SaveMoveMaterOut_CLD(oMain, oSystemParameterMain, ref sErrMsg)) |
| | | // { |
| | | // //"保存成功!"; |
| | | // sErrMsg = "保存成功!" + oMain.HBillNo; |
| | | // return true; |
| | | // } |
| | | // else |
| | | // { |
| | | // //"保存失败!"; |
| | | // sErrMsg = "单据号:" + oMain.HBillNo + ",单据ID:" + oMain.HInterID + ";" + sErrMsg; |
| | | // //sErrMsg = sErrMsg; |
| | | // return false; |
| | | // } |
| | | //} |
| | | //发货调拨(源单:发货通知单) |
| | | else if (sHSourceType == "1402") |
| | | { |
| | |
| | | //审核单据 |
| | | oCn.RunProc("Update Kf_ICStockBillMain Set HChecker='" + oMain.HMaker + "',HCheckDate=convert(varchar(10),getdate(),120) where HInterID= " + oMain.HInterID.ToString()); |
| | | } |
| | | |
| | | 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() + ",3"); |
| | | } |
| | | |
| | | |
| | | //根据TMP表 返回 子表信息 |
| | | DataSet Ds; |
| | |
| | | //蓝字产品入库、外购入库、委外入库、生产汇报,根据物料条码得到对应源单信息,非多源单模式 |
| | | //未扫描源单的情况下,第一次扫描物料条码获取源单信息并存入临时表 |
| | | //采购入库(1201)、产品入库(1202)、其他入库(1203)、委外入库(1210)、生产汇报(3711) |
| | | if (SourceFlag == false && (HBillType == "1201" || HBillType == "1202" || HBillType == "1203" || HBillType == "1210" || HBillType == "3711")) |
| | | if (SourceFlag == false && (HBillType == "1201" || HBillType == "1202" || HBillType == "1210" || HBillType == "3711")) |
| | | { |
| | | if (HSourceBillType != "-1") |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | if (HBillType == "1203") |
| | | { |
| | | HSourceBillNo = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillNo"]); |
| | | HSourceBillType = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[0]["HSourceBillType"]); |
| | | //oBar = get_SourceBarCode_OtherIn(HBillID, HBillNo, HBillType, HSourceBillNo, HSourceBillType, HMaker, HOWNERID, ref sErrMsg); |
| | | //if (oBar == null) |
| | | //{ |
| | | // return null; |
| | | //} |
| | | //SourceFlag = true; |
| | | |
| | | Int64 sMulSourceFlag = 0; //多源单标志(0为非多源单模式,1为多源单模式) |
| | | if (oSystemParameter.omodel.Kf_OtherInBill_MulSourceBill.ToUpper() == "Y") //系统参数 其他入库单-多源单模式 |
| | | { |
| | | sMulSourceFlag = 1; |
| | | } |
| | | |
| | | //将源单信息存入条码出入库临时表 |
| | | DataSet dsyd = oCn.RunProcReturn("exec h_p_WMS_AddSourceBarCode_OtherIn " + HBillID.ToString() + ",'" + HBillNo + "','" + HBillType + "','" + HSourceBillNo + "','" + HSourceBillType + "'," + sMulSourceFlag.ToString() + ",'" + HMaker + "'," + HOWNERID.ToString(), "h_p_WMS_AddSourceBarCode_OtherIn"); |
| | | if (dsyd == null || dsyd.Tables[0].Rows.Count == 0) |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";将条码对应源单信息存入条码出入库临时表失败!"; |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(dsyd.Tables[0].Rows[0][0]) == 0) |
| | | { |
| | | SourceFlag = true; |
| | | } |
| | | else |
| | | { |
| | | sErrMsg = "单据号:" + HBillNo + ",单据ID:" + HBillID + ";" + DBUtility.ClsPub.isStrNull(dsyd.Tables[0].Rows[0]["HRemark"]); |
| | | return null; |
| | | } |
| | | } |
| | | } |
| | | |
| | | for (int i = 0; i < dsTBarCode.Tables[0].Rows.Count; i++) |
| | | { |
| | | sBarCode_New = DBUtility.ClsPub.isStrNull(dsTBarCode.Tables[0].Rows[i]["HBarCode"]); |
| | |
| | | oBar.HSupName = sHSupName; |
| | | oBar.HDeptID = sHDeptID; |
| | | oBar.HDeptName = sHDeptName; |
| | | if (HBillType == "1203") |
| | | { |
| | | SourceFlag = true; |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | 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; |
| | | //} |
| | | //获取系统参数 |
| | | 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; |
| | | //} |
| | | 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"); |
| | |
| | | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | #endregion |
| | | |
| | | |