| | |
| | | } |
| | | |
| | | |
| | | #region 用户设置 |
| | | #region 获取用户信息 |
| | | [Route("Gy_USERSet_PDA/GetGy_Czygl_Info")] |
| | | [HttpGet] |
| | | public object GetGy_Czygl_Info(string Czybm, string user) |
| | | { |
| | | try |
| | | { |
| | | //查看权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无查看权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | string sql = @"select Czybm, Czymc, HWhID, HWhName, HSecManagerID, HSecManager, HKeeperID, HKeeper, HDeptID, HDept, HCloudUserName, HCloudUserPsd from Gy_Czygl where Czybm = '" + Czybm + "'"; |
| | | ds = oCN.RunProcReturn(sql, "Gy_Czygl"); |
| | | |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "未找到相关数据!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #region 保存用户信息 |
| | | [Route("Gy_USERSet_PDA/SaveGy_Czygl_Info")] |
| | | [HttpPost] |
| | | public object SaveGy_Czygl_Info([FromBody] JObject sMainSub) |
| | | { |
| | | try |
| | | { |
| | | //获取参数 |
| | | var _value = sMainSub["sMainSub"].ToString(); |
| | | string msg1 = _value.ToString(); |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | | |
| | | Int64 HWhID = Int64.Parse(sArray[0].ToString()); |
| | | string HWhName = sArray[1].ToString(); |
| | | Int64 HSecManagerID = Int64.Parse(sArray[2].ToString()); |
| | | string HSecManager = sArray[3].ToString(); |
| | | Int64 HKeeperID = Int64.Parse(sArray[4].ToString()); |
| | | string HKeeper = sArray[5].ToString(); |
| | | Int64 HDeptID = Int64.Parse(sArray[6].ToString()); |
| | | string HDept = sArray[7].ToString(); |
| | | string HCloudUserName = sArray[8].ToString().Trim(); |
| | | string HCloudUserPsd = sArray[9].ToString().Trim(); |
| | | |
| | | string Czybm = sArray[10].ToString(); |
| | | string user = sArray[11].ToString(); //操作用户的用户名 |
| | | |
| | | ////判断是否有新增权限 |
| | | //if (!DBUtility.ClsPub.Security_Log("Sc_ICMOBillQualityStatus_Tmp_Edit", 1, false, user)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "无新增权限!"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | |
| | | string sql = "update Gy_Czygl set " + |
| | | "HWhID = " + HWhID + |
| | | ", HWhName = '" + HWhName + |
| | | "', HSecManagerID = " + HSecManagerID + |
| | | ", HSecManager = '" + HSecManager + |
| | | "', HKeeperID = " + HKeeperID + |
| | | ", HKeeper = '" + HKeeper + |
| | | "', HDeptID = " + HDeptID + |
| | | ", HDept = '" + HDept + |
| | | "', HCloudUserName = '" + HCloudUserName + |
| | | "', HCloudUserPsd = '" + HCloudUserPsd + |
| | | "' where Czybm = '" + Czybm + "'"; |
| | | |
| | | oCN.RunProc(sql); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucess!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | |
| | | //撤销缓存列表记录 |
| | | [Route("Web/Rescind_Json")] |
| | |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | string sql = "select c.HItemID HQCCheckItemID,c.HName 检验项目,b.HQCStd,b.HQCUnit HUnit,b.HAnalysisMethod,b.HStatus HResult from Gy_QCCheckProjectMain a left join Gy_QCCheckProjectSub b on a.HInterID = b.HInterID left join Gy_QCCheckItem c on b.HQCCheckItemID = c.HItemID where a.HInterID = " + CheckProjectID; |
| | | string sql = "select * from h_v_Gy_GetQCCheckItemByProject where hmainid = " + CheckProjectID; |
| | | ds = oCN.RunProcReturn(sql, "Gy_QCCheckProjectMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count <= 0) |
| | | { |