| | |
| | | } |
| | | |
| | | |
| | | ///// <summary> |
| | | ///// 写入临时表 扫源单的方法 |
| | | ///// </summary> |
| | | ///// <param name="HSourceBillNo"></param> |
| | | ///// <returns></returns> |
| | | //[Route("EntrustOut/set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json")] |
| | | //[HttpGet] |
| | | //public object set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json(long sNewInterID, string sNewBillNo,string sSourceBillNo, string HSourceBillType ) |
| | | //{ |
| | | // string sNewBillType = "1211"; |
| | | // string sSourceBillType = "1604"; |
| | | // string sRedBlueflag = "蓝字"; |
| | | // try |
| | | // { |
| | | |
| | | // string sWhere = "where 单据号 like '%" + sSourceBillNo + "%'"; |
| | | // //ds = BLL.ClsSourceBill.getSourceBillList(sWhere, HSourceBillType); |
| | | // ds = new BLL.ClsKf_EntrustOutBill().GetWW_WWPPBomList(sWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | // if (ds == null) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无此源单号!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | |
| | | // //else |
| | | // //{ |
| | | // // objJsonResult.code = "0"; |
| | | // // objJsonResult.count = 1; |
| | | // // objJsonResult.Message = "Success"; |
| | | // // objJsonResult.data = ds; |
| | | // // return objJsonResult; |
| | | // //} |
| | | // DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); |
| | | // if (dal.AddNew_Source(sNewInterID, sNewBillNo, sNewBillType, sSourceBillNo, sSourceBillType, sRedBlueflag, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "保存到出入库条码临时表成功!"; |
| | | // objJsonResult.data = ds; |
| | | // return objJsonResult; |
| | | // } |
| | | // else |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "保存到出入库条码临时表失败!"; |
| | | // objJsonResult.data = null; |
| | | // 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("EntrustOut/set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json")] |
| | | [HttpGet] |
| | | public object set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json(long sNewInterID, string sNewBillNo,string sSourceBillNo, string HSourceBillType ) |
| | | public object set_SavePonderationBillMain_Temp_Entrust_Source_Fast_Json(string HSourceBillType, string HSourceBillNo, Int64 sInterID, string sBillNo) |
| | | { |
| | | string sNewBillType = "1211"; |
| | | string sSourceBillType = "1604"; |
| | |
| | | try |
| | | { |
| | | |
| | | string sWhere = "where 单据号 like '%" + sSourceBillNo + "%'"; |
| | | //ds = BLL.ClsSourceBill.getSourceBillList(sWhere, HSourceBillType); |
| | | ds = new BLL.ClsKf_EntrustOutBill().GetWW_WWPPBomList(sWhere, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (ds == null) |
| | | string sWhere = "where 单据号 like '%" + HSourceBillNo.Trim() + "%'"; |
| | | ds = webserver.GetWW_WWPPBomList(sWhere); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无此源单号!"; |
| | | objJsonResult.Message = "没有返回任何记录,源单类型有错误!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | HSupID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HSupID"]); |
| | | HSupName = Convert.ToString(ds.Tables[0].Rows[0]["HSupName"]); |
| | | HDeptID = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HDeptID"]); |
| | | HDeptName = Convert.ToString(ds.Tables[0].Rows[0]["HDeptName"]); |
| | | |
| | | //else |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "Success"; |
| | | // objJsonResult.data = ds; |
| | | // return objJsonResult; |
| | | //} |
| | | DAL.ClsKF_PonderationBillMain_Temp_Ctl dal = new DAL.ClsKF_PonderationBillMain_Temp_Ctl(); |
| | | if (dal.AddNew_Source(sNewInterID, sNewBillNo, sNewBillType, sSourceBillNo, sSourceBillType, sRedBlueflag, ref DBUtility.ClsPub.sExeReturnInfo)) |
| | | if (webserver.set_SavePonderationBillMain_Temp_Source_Fast(sInterID, sBillNo, HBillType, HSourceBillNo, HSourceBillType, "蓝字", ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存到出入库条码临时表成功!"; |
| | | objJsonResult.data = ds; |
| | | objJsonResult.Message = "返回记录成功!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存到出入库条码临时表失败!"; |
| | | objJsonResult.Message = "写入临时表失败!" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没有返回任何记录!异常"+ex.ToString(); |
| | | objJsonResult.Message = "没有返回任何记录!异常" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | |
| | | public bool AddNew_Source(long sNewInterID, string sNewBillNo, string sNewBillType, string sSourceBillNo, string sSourceBillType, string sRedBlueflag, ref string sReturn) |
| | | { |
| | |
| | | websLsmain.HBillNo = lsmain[0].HBillNo; |
| | | websLsmain.HDeptID = lsmain[0].HDeptID; |
| | | //websLsmain.HEmpID = lsmain[0].HEmpID; |
| | | websLsmain.HKeeperID = lsmain[0].HKeeperID; |
| | | websLsmain.HSecManagerID = lsmain[0].HSecManagerID; |
| | | websLsmain.HRemark = lsmain[0].HRemark; |
| | | websLsmain.HMaker = lsmain[0].HMaker; |
| | | websLsmain.HBillerID = lsmain[0].HBillerID; |
| | | websLsmain.HWHID = lsmain[0].HWHID; |
| | | websLsmain.HMainSourceBillType = "委外订单-投料"; |
| | | websLsmain.HSupID = lsmain[0].HSupID; |
| | | websLsmain.HBillType = "1211";//固定值 |
| | | |
| | | if (webserver.set_SaveEntrustOutBill_New(websLsmain, sSourceBillType, ref DBUtility.ClsPub.sErrInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "生成委外出库单成功!单据号为:"; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功! |
| | | //objJsonResult.Message = "生成委外出库单成功!单据号为:"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "上传失败![webserver.set_SaveEntrustOutBill_New]" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = websLsmain; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败! |
| | | //objJsonResult.Message = "上传失败![webserver.set_SaveEntrustOutBill_New]" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "生成产品退库单成功!单据号为:"; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //成功! |
| | | //objJsonResult.Message = "生成产品退库单成功!单据号为:"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "上传失败!" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.Message = DBUtility.ClsPub.sErrInfo; //失败! |
| | | //objJsonResult.Message = "上传失败!" + DBUtility.ClsPub.sErrInfo; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |