| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | ///// <summary> |
| | | ///// 获取仓位列表 |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //[Route("Web/GetStockPlaceList_Json_NEW")] |
| | | //[HttpGet] |
| | | //public object GetStockPlaceList_Json_NEW(string StockPlace, Int64 HWhID, Int64 HOrgID) |
| | | //{ |
| | | // WebS.WebService1 oWeb = new WebS.WebService1(); |
| | | // sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + HOrgID + ""; |
| | | // //sWhere = " Where HStopFlag=0 and HEndFlag=1 and HUSEORGID = " + DBUtility.ClsPub.HORGANIZATIONSID.ToString(); |
| | | // if (HWhID == 0) |
| | | // { |
| | | // if (StockPlace != "") |
| | | // { |
| | | // sWhere = " Where HStopFlag=0 and HUSEORGID = " + HOrgID + " and ( HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%' ) "; |
| | | // } |
| | | // else |
| | | // { |
| | | // sWhere = " Where HStopFlag=0 "; |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // if (StockPlace != "") |
| | | // { |
| | | // sWhere = " Where HStopFlag=0 and HWHID=" + HWhID.ToString() + " and HWHID=" + HWhID.ToString() + " and ( HNumber like '%" + StockPlace + "%' or HName like '%" + StockPlace + "%' ) "; |
| | | // } |
| | | // else |
| | | // { |
| | | // sWhere = " Where HStopFlag=0 and HWHID=" + HWhID.ToString(); |
| | | // } |
| | | // } |
| | | // try |
| | | // { |
| | | // //ds = webserver.GetStockPlaceList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | // ds = oWeb.GetStockPlaceList(sWhere, ref DBUtility.ClsPub.sErrInfo); |
| | | // if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | // { |
| | | // objjson.code = "0"; |
| | | // objjson.count = 0; |
| | | // objjson.Message = "获取失败" + DBUtility.ClsPub.sErrInfo; |
| | | // objjson.data = null; |
| | | // return objjson; |
| | | // } |
| | | // else |
| | | // { |
| | | // objjson.code = "0"; |
| | | // objjson.count = 1; |
| | | // objjson.Message = "获取成功!"; |
| | | // objjson.data = ds.Tables[0]; |
| | | // return objjson; |
| | | // } |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | |
| | | // objjson.code = "0"; |
| | | // objjson.count = 0; |
| | | // objjson.Message = "获取失败" + ex.ToString(); |
| | | // objjson.data = null; |
| | | // return objjson; |
| | | // } |
| | | //} |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取仓位列表 |
| | | /// </summary> |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取环境检验方案列表 |
| | | /// <summary> |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Web/Gy_EnvironmentTestSchemeBillList_Json")] |
| | | [HttpGet] |
| | | public object Gy_EnvironmentTestSchemeBillList_Json(string sWhere) |
| | | { |
| | | DataSet ds; |
| | | |
| | | if (sWhere != "") |
| | | { |
| | | sWhere = " and ( 生产部门 like '%" + sWhere + "%' or 工作中心 like '%" + sWhere + "%' or 工序名称 like '%" + sWhere + "%' or 检测项目 like '%" + sWhere + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("select * from h_v_Gy_EnvironmentTestSchemeBillList_PDA where 审核人 !='' and 关闭人='' " + sWhere + " Order by 单据号 ", "h_v_Gy_EnvironmentTestSchemeBillList_PDA"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取环境检测项目列表 |
| | | /// <summary> |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Web/Gy_EnvironmentTestItemList_Json")] |
| | | [HttpGet] |
| | | public object Gy_EnvironmentTestItemList_Json(string sWhere) |
| | | { |
| | | DataSet ds; |
| | | |
| | | if (sWhere != "") |
| | | { |
| | | sWhere = " and ( HNumber like '%" + sWhere + "%' or HName like '%" + sWhere + "%' ) "; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | ds = oCN.RunProcReturn("select HItemID ,HName 环境检测项目,HNumber 环境检测代码 from Gy_EnvironmentTestItem where ISNULL(HCheckTime,'')!='' and HStopflag =0 " + sWhere + " Order by HNumber ", "Gy_EnvironmentTestItem"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败"; |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | else |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 1; |
| | | objjson.Message = "获取成功!"; |
| | | objjson.data = ds.Tables[0]; |
| | | return objjson; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "获取失败" + e.ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取银行列表 |
| | |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | #region 不良后果 设置列表/保存/编辑/删除方法 |
| | | /// <summary> |
| | | /// 保存不良后果 |
| | |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | if (oBill.oModel.HItemID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | { |
| | | bResult = oBill.AddNew(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | else |
| | |
| | | public object DeltetGy_BadResult(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | try |
| | | { |
| | | //删除权限 |
| | |
| | | #endregion |
| | | |
| | | #endregion |
| | | |
| | | |
| | | #region 检测值 设置列表/保存/编辑/删除方法 |
| | | /// <summary> |
| | |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 岗位技能 设置列表/保存/编辑/删除方法 |
| | | /// <summary> |
| | | /// 保存岗位技能 |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region 岗位技能 文件导入保存 |
| | | #region 岗位技能 文件上传 |
| | |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | if (oBill.oModel.HItemID == 0) |
| | | { |
| | | // bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); |
| | | { |
| | | bResult = oBill.AddNew(); |
| | | } |
| | | else |
| | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | //WebAPIController.Add_Log("送货单下推", UserName, "生成送货单"); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | |
| | | public object DeltetGy_ProjectMoney(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | //string ModRightNameCheck = "Sc_ProcessReport_check"; |
| | | try |
| | | { |
| | | //删除权限 |
| | |
| | | } |
| | | |
| | | |
| | | //删除前控制========================================= |
| | | string sql1 = "exec h_p_Gy_ProjectMoney_BeforeDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_ProjectMoney_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | oCN.RunProc("delete Gy_ProjectMoney where HItemID=" + HItemID); |
| | | |
| | | |
| | | //删除后控制========================================= |
| | | string sql2 = "exec h_p_Gy_ProjectMoney_AfterDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_ProjectMoney_AfterDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | oCN.Commit();//提交事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "数据删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 项目费用分类 设置列表/保存/编辑/删除方法 |
| | | /// <summary> |
| | | /// 项目费用分类 保存 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | [Route("SaveGy_ProjectMoneyClassList")] |
| | | [HttpPost] |
| | | public object SaveGy_ProjectMoneyClassList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | | var _value = msg["msg"].ToString(); |
| | | string msg3 = _value.ToString(); |
| | | string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg1 = sArray[0].ToString(); |
| | | string msg2 = sArray[1].ToString(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ProjectMoneyClass_Edit", 1, false, msg2)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Int64 HItemID = 0; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //获取最大ID值赋值 |
| | | DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_ProjectMoneyClass ", "Gy_ProjectMoneyClass"); |
| | | if (Maxds != null || Maxds.Tables[0].Rows.Count > 0) |
| | | { |
| | | //HItemID= Maxds.Tables[0].Rows[0]["HItemID"] |
| | | var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]); |
| | | maxid += 1; |
| | | HItemID = maxid; |
| | | } |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | |
| | | WebAPI.DLL.ClsGy_ProjectMoneyClass_Ctl oBill = new WebAPI.DLL.ClsGy_ProjectMoneyClass_Ctl(); |
| | | List<Model.ClsGy_ProjectMoneyClass_Model> lsmain = new List<Model.ClsGy_ProjectMoneyClass_Model>(); |
| | | msg1 = msg1.Replace("\\", ""); |
| | | msg1 = msg1.Replace("\n", ""); |
| | | lsmain = oListModels.getObjectByJson_Gy_ProjectMoneyClass(msg1); |
| | | foreach (Model.ClsGy_ProjectMoneyClass_Model oItem in lsmain) |
| | | { |
| | | if (oItem.HNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码不能为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (oItem.HName.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!名称不能为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //查询数据中是否存在重复代码 |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_ProjectMoneyClass where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_ProjectMoneyClass"); |
| | | if (oItem.HNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //新增时判断 |
| | | if (oItem.HItemID == 0) |
| | | { |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码重复!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //检查父级是否存在 |
| | | string sParent; |
| | | sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); |
| | | if (sParent.Trim() == "") |
| | | { |
| | | oBill.oModel.HParentID = 0; |
| | | } |
| | | else |
| | | { |
| | | if (oBill.HavParentCode(sParent.Trim(), HItemID)) |
| | | { |
| | | oBill.oModel.HParentID = oBill.oModel.HItemID; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!上级代码不存在或被禁用!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else//编辑时判断 |
| | | { |
| | | //检查父级是否存在 |
| | | string sParent; |
| | | sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); |
| | | if (sParent.Trim() == "") |
| | | { |
| | | oBill.oModel.HParentID = 0; |
| | | } |
| | | else |
| | | { |
| | | if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID)) |
| | | { |
| | | oBill.oModel.HParentID = oBill.oModel.HItemID; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!上级代码不存在或被禁用!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | //得到短代码 |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!短代码为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oItem.HShortNumber = sShortNumber;//短代码 |
| | | oItem.HEndFlag = true;//末级标志 |
| | | DataSet ds2 = oCN.RunProcReturn("select HLevel from Gy_MaterType where HItemID =" + oItem.HParentID, "Gy_MaterType");//搜索父类等级 |
| | | if (ds2.Tables[0].Rows.Count > 0) |
| | | { |
| | | oItem.HLevel = (int)ds2.Tables[0].Rows[0]["HLevel"] + 1; |
| | | } |
| | | else |
| | | { |
| | | oItem.HLevel = 1; |
| | | } |
| | | oItem.HMakeEmp = msg2; //创建人 |
| | | |
| | | oBill.oModel = oItem; |
| | | } |
| | | |
| | | //保存 |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | if (oBill.oModel.HItemID == 0) |
| | | { |
| | | bResult = oBill.AddNew(); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyByID(oBill.oModel.HItemID); |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 项目费用分类 获取信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("GetGy_ProjectMoneyClassDetail")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetGy_ProjectMoneyClassDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_ProjectMoneyClassDetail(HID); |
| | | return model; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 项目费用分类 删除功能 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_ProjectMoneyClass")] |
| | | [HttpGet] |
| | | public object DeltetGy_ProjectMoneyClass(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_ProjectMoneyClass_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HItemID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//开始事务 |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_ProjectMoneyClass where HItemID=" + HItemID, "Gy_ProjectMoneyClass"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已审核!不能进行删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已禁用!不能进行删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据不存在!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //删除前控制========================================= |
| | | string sql1 = "exec h_p_Gy_ProjectMoneyClass_BeforeDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_ProjectMoneyClass_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | oCN.RunProc("delete Gy_ProjectMoneyClass where HItemID=" + HItemID); |
| | | |
| | | //删除后控制========================================= |
| | | string sql2 = "exec h_p_Gy_ProjectMoneyClass_AfterDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_ProjectMoneyClass_AfterDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | oCN.Commit();//提交事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 管径 设置列表/保存/编辑/删除方法 |
| | | /// <summary> |
| | | /// 管径 保存 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | [Route("SaveGy_PiPeList")] |
| | | [HttpPost] |
| | | public object SaveGy_PiPeList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | | var _value = msg["msg"].ToString(); |
| | | string msg3 = _value.ToString(); |
| | | string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg1 = sArray[0].ToString(); |
| | | string msg2 = sArray[1].ToString(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_PiPe_Edit", 1, false, msg2)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Int64 HItemID = 0; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //获取最大ID值赋值 |
| | | DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_PiPe ", "Gy_PiPe"); |
| | | if (Maxds != null || Maxds.Tables[0].Rows.Count > 0) |
| | | { |
| | | var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]); |
| | | maxid += 1; |
| | | HItemID = maxid; |
| | | } |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | |
| | | WebAPI.DLL.ClsGy_PiPe_Ctl oBill = new WebAPI.DLL.ClsGy_PiPe_Ctl(); |
| | | List<Model.ClsGy_PiPe_Model> lsmain = new List<Model.ClsGy_PiPe_Model>(); |
| | | msg1 = msg1.Replace("\\", ""); |
| | | msg1 = msg1.Replace("\n", ""); |
| | | lsmain = oListModels.getObjectByJson_Gy_PiPe(msg1); |
| | | foreach (Model.ClsGy_PiPe_Model oItem in lsmain) |
| | | { |
| | | if (oItem.HNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码不能为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (oItem.HName.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!名称不能为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //查询数据中是否存在重复代码 |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_PiPe where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_PiPe"); |
| | | if (oItem.HNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //新增时判断 |
| | | if (oItem.HItemID == 0) |
| | | { |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码重复!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //检查父级是否存在 |
| | | string sParent; |
| | | sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); |
| | | if (sParent.Trim() == "") |
| | | { |
| | | oBill.oModel.HParentID = 0; |
| | | } |
| | | else |
| | | { |
| | | if (oBill.HavParentCode(sParent.Trim(), HItemID)) |
| | | { |
| | | oBill.oModel.HParentID = oBill.oModel.HItemID; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!上级代码不存在或被禁用!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else//编辑时判断 |
| | | { |
| | | //检查父级是否存在 |
| | | string sParent; |
| | | sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); |
| | | if (sParent.Trim() == "") |
| | | { |
| | | oBill.oModel.HParentID = 0; |
| | | } |
| | | else |
| | | { |
| | | if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID)) |
| | | { |
| | | oBill.oModel.HParentID = oBill.oModel.HItemID; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!上级代码不存在或被禁用!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | //得到短代码 |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!短代码为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oItem.HShortNumber = sShortNumber;//短代码 |
| | | oItem.HEndFlag = true;//末级标志 |
| | | DataSet ds2 = oCN.RunProcReturn("select HLevel from Gy_PiPe where HItemID =" + oItem.HParentID, "Gy_PiPe");//搜索父类等级 |
| | | if (ds2.Tables[0].Rows.Count > 0) |
| | | { |
| | | oItem.HLevel = (int)ds2.Tables[0].Rows[0]["HLevel"] + 1; |
| | | } |
| | | else |
| | | { |
| | | oItem.HLevel = 1; |
| | | } |
| | | oItem.HMakeEmp = msg2; //创建人 |
| | | |
| | | oBill.oModel = oItem; |
| | | } |
| | | |
| | | //保存 |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | if (oBill.oModel.HItemID == 0) |
| | | { |
| | | bResult = oBill.AddNew(); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyByID(oBill.oModel.HItemID); |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 管径 获取信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("GetGy_PiPeDetail")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetGy_PiPeDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_PiPeDetail(HID); |
| | | return model; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 管径 删除功能 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_PiPe")] |
| | | [HttpGet] |
| | | public object DeltetGy_PiPe(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_PiPe_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HItemID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//开始事务 |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_PiPe where HItemID=" + HItemID, "Gy_PiPe"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已审核!不能进行删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已禁用!不能进行删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据不存在!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //删除前控制========================================= |
| | | string sql1 = "exec h_p_Gy_PiPe_BeforeDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_PiPe_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | |
| | | oCN.RunProc("delete Gy_PiPe where HItemID=" + HItemID); |
| | | |
| | | //删除后控制========================================= |
| | | string sql2 = "exec h_p_Gy_PiPe_AfterDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_PiPe_AfterDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | oCN.Commit();//提交事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "数据删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 管径材质 设置列表/保存/编辑/删除方法 |
| | | /// <summary> |
| | | /// 管径材质 保存 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | [Route("SaveGy_PiPeMaterialList")] |
| | | [HttpPost] |
| | | public object SaveGy_PiPeMaterialList([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | | var _value = msg["msg"].ToString(); |
| | | string msg3 = _value.ToString(); |
| | | string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg1 = sArray[0].ToString(); |
| | | string msg2 = sArray[1].ToString(); |
| | | |
| | | //查看权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_PiPeMaterial_Edit", 1, false, msg2)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | Int64 HItemID = 0; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //获取最大ID值赋值 |
| | | DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from Gy_PiPeMaterial ", "Gy_PiPeMaterial"); |
| | | if (Maxds != null || Maxds.Tables[0].Rows.Count > 0) |
| | | { |
| | | //HItemID= Maxds.Tables[0].Rows[0]["HItemID"] |
| | | var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]); |
| | | maxid += 1; |
| | | HItemID = maxid; |
| | | } |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | |
| | | WebAPI.DLL.ClsGy_PiPeMaterial_Ctl oBill = new WebAPI.DLL.ClsGy_PiPeMaterial_Ctl(); |
| | | List<Model.ClsGy_PiPeMaterial_Model> lsmain = new List<Model.ClsGy_PiPeMaterial_Model>(); |
| | | msg1 = msg1.Replace("\\", ""); |
| | | msg1 = msg1.Replace("\n", ""); |
| | | lsmain = oListModels.getObjectByJson_Gy_PiPeMaterial(msg1); |
| | | foreach (Model.ClsGy_PiPeMaterial_Model oItem in lsmain) |
| | | { |
| | | if (oItem.HNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码不能为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (oItem.HName.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!名称不能为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | if (!DBUtility.ClsPub.AllowNumber(oItem.HNumber.Trim())) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码中不能出现连续‘.’并且首位末位不能为‘.’!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //查询数据中是否存在重复代码 |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_PiPeMaterial where HStopflag=0 and HNumber='" + oItem.HNumber.Trim() + "'", "Gy_PiPeMaterial"); |
| | | if (oItem.HNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //新增时判断 |
| | | if (oItem.HItemID == 0) |
| | | { |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!代码重复!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | //检查父级是否存在 |
| | | string sParent; |
| | | sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); |
| | | if (sParent.Trim() == "") |
| | | { |
| | | oBill.oModel.HParentID = 0; |
| | | } |
| | | else |
| | | { |
| | | if (oBill.HavParentCode(sParent.Trim(), HItemID)) |
| | | { |
| | | oBill.oModel.HParentID = oBill.oModel.HItemID; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!上级代码不存在或被禁用!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | else//编辑时判断 |
| | | { |
| | | //检查父级是否存在 |
| | | string sParent; |
| | | sParent = DBUtility.ClsPub.GetParentCode(oItem.HNumber.Trim()); |
| | | if (sParent.Trim() == "") |
| | | { |
| | | oBill.oModel.HParentID = 0; |
| | | } |
| | | else |
| | | { |
| | | if (oBill.HavParentCode(sParent.Trim(), oItem.HItemID)) |
| | | { |
| | | oBill.oModel.HParentID = oBill.oModel.HItemID; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!上级代码不存在或被禁用!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | //得到短代码 |
| | | string sShortNumber; |
| | | sShortNumber = DBUtility.ClsPub.GetShortNumber(oItem.HNumber.Trim()); |
| | | if (sShortNumber.Trim() == "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!短代码为空!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | oItem.HShortNumber = sShortNumber;//短代码 |
| | | oItem.HEndFlag = true;//末级标志 |
| | | DataSet ds2 = oCN.RunProcReturn("select HLevel from Gy_PiPeMaterial where HItemID =" + oItem.HParentID, "Gy_PiPeMaterial");//搜索父类等级 |
| | | if (ds2.Tables[0].Rows.Count > 0) |
| | | { |
| | | oItem.HLevel = (int)ds2.Tables[0].Rows[0]["HLevel"] + 1; |
| | | } |
| | | else |
| | | { |
| | | oItem.HLevel = 1; |
| | | } |
| | | oItem.HMakeEmp = msg2; //创建人 |
| | | |
| | | oBill.oModel = oItem; |
| | | } |
| | | |
| | | //保存 |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | if (oBill.oModel.HItemID == 0) |
| | | { |
| | | bResult = oBill.AddNew(); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyByID(oBill.oModel.HItemID); |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 管径材质 获取信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("GetGy_PiPeMaterialDetail")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetGy_PiPeMaterialDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetGy_PiPeMaterialDetail(HID); |
| | | return model; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 管径材质 删除功能 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("DeltetGy_PiPeMaterial")] |
| | | [HttpGet] |
| | | public object DeltetGy_PiPeMaterial(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("Gy_PiPeMaterial_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HItemID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//开始事务 |
| | | |
| | | ds = oCN.RunProcReturn("select * from Gy_PiPeMaterial where HItemID=" + HItemID, "Gy_PiPeMaterial"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已审核!不能进行删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已禁用!不能进行删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据不存在!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //删除前控制========================================= |
| | | string sql1 = "exec h_p_Gy_PiPeMaterial_BeforeDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql1, "h_p_Gy_PiPeMaterial_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除前判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | |
| | | oCN.RunProc("delete Gy_PiPeMaterial where HItemID=" + HItemID); |
| | | |
| | | //删除后控制========================================= |
| | | string sql2 = "exec h_p_Gy_PiPeMaterial_AfterDelCtrl " + HItemID + ",'" + user + "'"; |
| | | ds = oCN.RunProcReturn(sql2, "h_p_Gy_PiPeMaterial_AfterDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:删除后判断失败,请与网络管理人员联系"; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "删除失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCN.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | oCN.Commit();//提交事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "数据删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 设备节拍维护 设置列表/保存/编辑/删除方法 |
| | | /// <summary> |
| | | /// 项目费用分类 保存 |
| | | /// </summary> |
| | | /// <param name="msg"></param> |
| | | /// <returns></returns> |
| | | [Route("SaveSb_EqiupMaterWorkTime")] |
| | | [HttpPost] |
| | | public object SaveSb_EqiupMaterWorkTime([FromBody] JObject msg) |
| | | { |
| | | DataSet ds; |
| | | var _value = msg["msg"].ToString(); |
| | | string msg3 = _value.ToString(); |
| | | string[] sArray = msg3.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | string msg1 = sArray[0].ToString(); |
| | | string msg2 = sArray[1].ToString(); |
| | | |
| | | |
| | | Int64 HItemID = 0; |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | //获取最大ID值赋值 |
| | | DataSet Maxds = oCN.RunProcReturn("select isNull(MAX(HItemID),0) HItemID from EqiupMaterWorkTimes ", "EqiupMaterWorkTimes"); |
| | | if (Maxds != null || Maxds.Tables[0].Rows.Count > 0) |
| | | { |
| | | //HItemID= Maxds.Tables[0].Rows[0]["HItemID"] |
| | | var maxid = Convert.ToInt32(Maxds.Tables[0].Rows[0]["HItemID"]); |
| | | maxid += 1; |
| | | HItemID = maxid; |
| | | } |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | //保存权限 |
| | | if (!DBUtility.ClsPub.Security_Log("EqiupMaterWorkTimes_Edit", 1, false, msg2)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无保存权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | WebAPI.DLL.ClsEqiupMaterWorkTimes_Ctl oBill = new WebAPI.DLL.ClsEqiupMaterWorkTimes_Ctl(); |
| | | List<Model.ClsEqiupMaterWorkTimes_Model> lsmain = new List<Model.ClsEqiupMaterWorkTimes_Model>(); |
| | | msg1 = msg1.Replace("\\", ""); |
| | | msg1 = msg1.Replace("\n", ""); |
| | | lsmain = oListModels.getObjectByJson_EqiupMaterWorkTimes(msg1); |
| | | foreach (ClsEqiupMaterWorkTimes_Model item in lsmain) |
| | | { |
| | | oBill.oModel = item; |
| | | } |
| | | |
| | | //保存 |
| | | //保存完毕后处理 |
| | | bool bResult; |
| | | if (oBill.oModel.HItemID == 0) |
| | | { |
| | | bResult = oBill.AddNew(); |
| | | } |
| | | else |
| | | { |
| | | bResult = oBill.ModifyByID(oBill.oModel.HItemID); |
| | | } |
| | | if (bResult) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "保存成功!"; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + DBUtility.ClsPub.sExeReturnInfo; |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "保存失败!" + e.ToString(); |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设备节拍维护 获取信息 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("GetEqiupMaterWorkTimeDetail")] |
| | | [HttpGet] |
| | | public ApiResult<DataSet> GetEqiupMaterWorkTimeDetail(string HID) |
| | | { |
| | | var model = LuBaoSevice.GetEqiupMaterWorkTimeDetail(HID); |
| | | return model; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设备节拍维护 删除功能 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | [Route("DeltetEqiupMaterWorkTime")] |
| | | [HttpGet] |
| | | public object DeltetEqiupMaterWorkTime(string HItemID, string user) |
| | | { |
| | | DataSet ds; |
| | | try |
| | | { |
| | | //删除权限 |
| | | if (!DBUtility.ClsPub.Security_Log("EqiupMaterWorkTimes_Delete", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "无删除权限!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (string.IsNullOrWhiteSpace(HItemID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HItemID为空!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran();//开始事务 |
| | | |
| | | ds = oCN.RunProcReturn("select * from EqiupMaterWorkTimes where HItemID=" + HItemID, "EqiupMaterWorkTimes"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (ds.Tables[0].Rows[0]["HCheckEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已审核!不能进行删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0].Rows[0]["HStopEmp"].ToString() != "") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据已禁用!不能进行删除!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "单据不存在!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | |
| | | oCN.RunProc("delete from EqiupMaterWorkTimes where HItemID=" + HItemID); |
| | | |
| | | |
| | | oCN.Commit();//提交事务 |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "数据删除成功!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "删除失败!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | /// <summary> |
| | | /// 用关联工序获取信息 |
| | |
| | | } |
| | | } |
| | | |
| | | #region 核算方式组 |
| | | |
| | | /// <summary> |
| | | /// 获取核算方式组列表 |
| | | /// </summary> |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 核算方式组编辑 |
| | | /// </summary> |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 保存获取核算方式组 |
| | | /// </summary> |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// 获取岗位列表 |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取生产任务单列表 |
| | | /// </summary> |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取生产任务单列表 |
| | | /// </summary> |
| | |
| | | /// <returns></returns> |
| | | [Route("Web/GetSc_ProcessExchangeBillListView")] |
| | | [HttpGet] |
| | | public object GetSc_ProcessExchangeBillListView(string ICMOBill, int OrganizationID) |
| | | { |
| | | if (ICMOBill != "" & ICMOBill != null) |
| | | { |
| | | sWhere = " where 1=1 and 单据号 like '%" + ICMOBill + "%' "; |
| | | } |
| | | public object GetSc_ProcessExchangeBillListView(string sWhere,int OrganizationID) |
| | | { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | ds = oCN.RunProcReturn("select top 500 * from h_v_Sc_ProcessExchangeBillList where 1=1 order by 单据号 desc,hsubid", "h_v_Sc_ProcessExchangeBillList"); |
| | | } |
| | | ds = oCN.RunProcReturn("select top 300 * from h_v_Sc_ProcessExchangeBillList where 1=1 order by 单据号 desc,hsubid", "h_v_Sc_ProcessExchangeBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql = "select * from h_v_Sc_ProcessExchangeBillList " + sWhere + " order by 单据号 desc,hsubid "; |
| | | string sql = "select * from h_v_Sc_ProcessExchangeBillList where 1=1 " + sWhere + " order by 单据号 desc,hsubid "; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Sc_ProcessExchangeBillList"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | |
| | | ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_QCCheckProjectList_Main where 物料名称='"+HName+ "' and 工序名称='" + HProName + "' and HSourceID='" + HSourceID + "' order by 日期 desc ", "h_v_Gy_QCCheckProjectList_Main"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | | ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_QCCheckProjectList_Main where 物料名称='" + HName + "' and ='" + HProName + "' order by 日期 desc ", "h_v_Gy_QCCheckProjectList_Main"); |
| | | ds = oCN.RunProcReturn("select top 1 * from h_v_Gy_QCCheckProjectList_Main where 物料名称='" + HName + "' and 工序名称 ='" + HProName + "' order by 日期 desc ", "h_v_Gy_QCCheckProjectList_Main"); |
| | | } |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |
| | |
| | | return objjson; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据器具主内码获取器具保养检验项目 |
| | | /// </summary> |
| | |
| | | { |
| | | objjson.code = "0"; |
| | | objjson.count = 0; |
| | | objjson.Message = "该设备有多个计划单或点检规程,手动选着" ; |
| | | objjson.Message = ds.Tables[0].Rows[0]["HRemark"].ToString(); |
| | | objjson.data = null; |
| | | return objjson; |
| | | } |
| | |
| | | { |
| | | List<MenuLoad> mu = new List<MenuLoad>(); //以父子级结构存放菜单清单信息 |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); //数据库操作工具 |
| | | string sql = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum,HShowMode from Gy_MenuDefineSet where HMakeName = '" + HMakeName + "' and HType = '" + HType + "' order by HPosition"; |
| | | string sql = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Gy_MenuDefineSet where HMakeName = '" + HMakeName + "' and HType = '" + HType + "' order by HPosition"; |
| | | ds = oCn.RunProcReturn(sql, "Gy_MenuDefineSet"); //查询当前用户的自定义菜单数据 |
| | | if (ds.Tables[0] == null || ds.Tables[0].Rows.Count == 0) //判断当前用户是否有设置过自定义信息,若记录数为0,则没有设置过,加载所有的菜单信息 |
| | | { |
| | | string sql1 = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum,HShowMode from Gy_MenuDefineSet where HMakeName=" + |
| | | string sql1 = "select HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HPicNum,HShowMode,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Gy_MenuDefineSet where HMakeName=" + |
| | | "(select top 1 c.GroupName from Gy_Czygl a left join System_UserGroupInfo b on a.Czybm = b.UserId " + |
| | | "left join System_UserGroup c on b.GroupId = c.GroupID where a.Czymc ='"+HMakeName+"' order by len(c.GroupName ))"; |
| | | ds = oCn.RunProcReturn(sql1, "Gy_MenuDefineSet"); //查询用户绑定的角色 是否设置菜单信息 取角色名称最短的一个 |
| | |
| | | string Hurl = ds.Tables[0].Rows[0]["Hurl"].ToString(); |
| | | string HType = ds.Tables[0].Rows[0]["HType"].ToString(); |
| | | string HPicNum = ds.Tables[0].Rows[0]["HPicNum"].ToString(); |
| | | string HTranslationText_English = ds.Tables[0].Rows[0]["HTranslationText_English"].ToString(); |
| | | string HTranslationText_Spain = ds.Tables[0].Rows[0]["HTranslationText_Spain"].ToString(); |
| | | |
| | | if (HPartentID == "0" || HPartentID == ds.Tables[0].Rows[0]["HItemID"].ToString()) |
| | | { |
| | | string HPosition = ds.Tables[0].Rows[0]["HPosition"].ToString(); |
| | | sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','" + HPosition + "')"; |
| | | sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition,HTranslationText_English,HTranslationText_Spain) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','" + HPosition + "','"+ HTranslationText_English + "','" + HTranslationText_Spain + "')"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | else |
| | | { |
| | | sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','z')"; |
| | | sql = "insert into Gy_MenuDefineSet(HItemID,HPartentID,HNumber,HName,HLevel,Hurl,HType,HMakeName,HPicNum,HPosition,HTranslationText_English,HTranslationText_Spain) values('" + saveDataList[i].HItemID + "','" + HPartentID + "','" + HNumber + "','" + saveDataList[i].HName + "'," + HLevel + ",'" + Hurl + "','" + HType + "','" + HMakeName + "','" + HPicNum + "','z','" + HTranslationText_English + "','" + HTranslationText_Spain + "')"; |
| | | oCN.RunProc(sql); |
| | | } |
| | | |
| | |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' Order by a.HItemID"; |
| | | string sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = '" + HMakeName + "' and b.HType = '" + HType + "' Order by a.HItemID"; |
| | | ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //获取Xt_UserFastMenu中该用户设置的自定义菜单信息,用于在前端加载 |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = 'admin' and b.HType = '" + HType + "' Order by a.HItemID"; |
| | | sql = "select a.HSubFuncID, a.HCaption,a.HPicNum,b.Hurl,isnull(HTranslationText_English,HName) HTranslationText_English,isnull(HTranslationText_Spain,HName) HTranslationText_Spain from Xt_UserFastMenu as a join Gy_Menu_1 as b on a.HSubFuncID = b.HItemID where a.HUserID = 'admin' and b.HType = '" + HType + "' Order by a.HItemID"; |
| | | ds = oCn.RunProcReturn(sql, "Xt_UserFastMenu"); //获取Xt_UserFastMenu中该用户设置的自定义菜单信息,用于在前端加载 |
| | | } |
| | | |
| | |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ///// <summary> |
| | | ///// 产品入库缓存列表刷新信息 |
| | | ///// </summary> |
| | | ///// <returns></returns> |
| | | //[Route("Web/chanpinruk")] |
| | | //[HttpGet] |
| | | //public object chanpinruk(string HBillType, string sHMaker, Int64 HOrgID) |
| | | //{ |
| | | // try |
| | | // { |
| | | // ds = webserver.GetKf_PonderationBillMain_TempList_New(HBillType, sHMaker, HOrgID); |
| | | // if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没有返回任何记录!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // //DBUtility.ClsPub.MessageBeep((int)DBUtility.ClsPub.BeepType.Warning); |
| | | // } |
| | | // else |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 1; |
| | | // objJsonResult.Message = "获取信息成功!"; |
| | | // objJsonResult.data = ds.Tables[0]; |
| | | // return objJsonResult; |
| | | // } |
| | | // } |
| | | // catch (Exception e) |
| | | // { |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "没有返回任何记录!" + e.ToString(); |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | // } |
| | | //} |
| | | |
| | | |
| | | /// <summary> |