| | |
| | | oItem.HShortNumber = sShortNumber;//短代码 |
| | | oItem.HEndFlag = true;//末级标志 |
| | | oItem.HLevel = DBUtility.ClsPub.GetLevel(oItem.HNumber.Trim()); //等级 |
| | | oItem.HMakeEmp = msg2; |
| | | oBill.oModel = oItem; |
| | | } |
| | | //保存 |
| | |
| | | [HttpGet] |
| | | public object DeltetGy_Material(string HItemID, string user) |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | oCN.BeginTran();//开始事务 |
| | | DataSet ds; |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | |
| | | if (user == "10000")//api同步方式 |
| | | { |
| | | oCN.RunProc("delete from Gy_Material where HERPItemID=" + HItemID); |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//开始事务 |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_Material where HItemID=" + HItemID, "Gy_Material"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 获取当前公司名 |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="HInterID">单据ID</param> |
| | | /// <param name="IsAudit">审核(0),反审核(1)</param> |
| | | /// <param name="CurUserName">审核人</param> |
| | | /// <returns></returns> |
| | | [Route("Xt_getInfo/getCompanyName")] |
| | | [HttpGet] |
| | | public object getCompanyName() |
| | | { |
| | | try |
| | | { |
| | | string sErr = ""; |
| | | if(oSystemParameter.ShowBill(ref sErr)) |
| | | { |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = oSystemParameter.omodel.WMS_CampanyName; |
| | | objJsonResult.data = oSystemParameter.omodel.WMS_CampanyName; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "当前公司名获取失败!" ; |
| | | objJsonResult.data = null; |
| | | } |
| | | |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.Message = "[0000-1-058]无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除条码前判断发生错误!"; |
| | | objJsonResult.Message = "[3899-1-001]删除条码前判断发生错误!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.Message = "[0000-1-007]" + DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | //Int64 lngBillKey = 0; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据ID为空!"; |
| | | objJsonResult.Message = "[0000-1-009]单据ID为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | oCN.Commit(); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除成功"; |
| | | objJsonResult.Message = "[0000-1-008]删除成功"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据未找到"; |
| | | objJsonResult.Message = "[0000-1-045]单据未找到"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = e.Message; |
| | | objJsonResult.Message = "[0000-1-007]" + e.Message; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "作废失败!无权限!"; |
| | | objJsonResult.Message = "[0000-1-063]作废失败!无权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID小于0!"; |
| | | objJsonResult.Message = "[0000-1-009]HInterID小于0!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "作废成功"; |
| | | objJsonResult.Message = "[0000-1-040]作废成功"; |
| | | objJsonResult.data = null; |
| | | |
| | | oCN.Commit(); |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.Message = "[0000-1-042]作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | |
| | | oCN.RollBack(); |
| | |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "反作废失败,原因:反作废条码前判断发生错误!"; |
| | | objJsonResult.Message = "[0000-1-042]反作废失败,原因:反作废条码前判断发生错误!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反作废失败,原因:" + DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.Message = "[0000-1-042]反作废失败,原因:" + DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "反作废成功"; |
| | | objJsonResult.Message = "[0000-1-043]反作废成功"; |
| | | objJsonResult.data = null; |
| | | oCN.Commit(); |
| | | return objJsonResult; |
| | |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "反作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.Message = "[0000-1-042]反作废失败!原因:" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "作废失败或者反作废失败!" + e.ToString(); |
| | | objJsonResult.Message = "[0000-1-044]作废失败或者反作废失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |