| | |
| | | ReturnCode.Success, "读取成功"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 质量,审核,反审核,驳回 |
| | | /// </summary> |
| | | /// <param name="mode"></param> |
| | | /// <returns></returns> |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<ExpandoObject> EditModelSubmitZhiLiang([FromBody] dynamic mode) |
| | | { |
| | | string _guid = mode.guid; |
| | | string _inFieldValue = mode.inFieldValue; |
| | | dynamic m = new ExpandoObject(); |
| | | m.outSum = -1; |
| | | m.outMsg = ""; |
| | | using (var conn = new SqlConnection(DbHelperSQL.strConn)) |
| | | { |
| | | using (var cmd = new SqlCommand("fqc_zhiLiang", conn)) |
| | | { |
| | | try |
| | | { |
| | | conn.Open(); |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | SqlParameter[] parameters = |
| | | { |
| | | new("@outMsg", SqlDbType.NVarChar, 300), |
| | | new("@outSum", SqlDbType.Int), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@inOrderGuid", _guid), |
| | | new("@inFieldValue",_inFieldValue), |
| | | new("@in1", ""), |
| | | new("@in2", "") |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | | parameters[1].Direction = ParameterDirection.Output; |
| | | foreach (var parameter in parameters) |
| | | cmd.Parameters.Add(parameter); |
| | | cmd.ExecuteNonQuery(); |
| | | m.outMsg = parameters[0].Value.ToString(); |
| | | m.outSum = int.Parse(parameters[1].Value.ToString()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Debug(this.ToString(), "fqc_zhiLiang error:" + ex.Message); |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Default, ex.Message); |
| | | } |
| | | finally |
| | | { |
| | | conn.Close(); |
| | | } |
| | | } |
| | | } |
| | | return ReturnDto<dynamic>.QuickReturn(m, ReturnCode.Success, "操作成功!"); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 读取 |
| | |
| | | return GetModel14(dy); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 生成报告 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | [RequestMethod(RequestMethods.POST)] |
| | | public ReturnDto<int?> GetBaoGao([FromBody] dynamic model) |
| | | { |
| | | int? rtnInt = (int)ReturnCode.Default; |
| | | Guid? guid = model.guid; |
| | | var _outMsg = ""; |
| | | var _outSum = -1; |
| | | using (var conn = new SqlConnection(DbHelperSQL.strConn)) |
| | | { |
| | | using (var cmd = new SqlCommand("[prc_fqc_items_add]", conn)) |
| | | { |
| | | try |
| | | { |
| | | conn.Open(); |
| | | cmd.CommandType = CommandType.StoredProcedure; |
| | | SqlParameter[] parameters = |
| | | { |
| | | new("@outMsg", SqlDbType.NVarChar, 300), |
| | | new("@outSum", SqlDbType.Int), |
| | | new("@inOrderGuid", |
| | | UtilityHelper.CheckGuid(guid) |
| | | ? guid |
| | | : DBNull.Value), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | }; |
| | | parameters[0].Direction = ParameterDirection.Output; |
| | | parameters[1].Direction = ParameterDirection.Output; |
| | | foreach (var parameter in parameters) |
| | | cmd.Parameters.Add(parameter); |
| | | cmd.ExecuteNonQuery(); |
| | | _outMsg = parameters[0].Value.ToString(); |
| | | _outSum = int.Parse(parameters[1].Value.ToString()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | LogHelper.Debug(ToString(), |
| | | "prc_QT_del error:" + ex.Message); |
| | | _outMsg = ex.Message; |
| | | _outSum = -1; |
| | | } |
| | | finally |
| | | { |
| | | conn.Close(); |
| | | } |
| | | } |
| | | } |
| | | if (_outSum <= 0) |
| | | return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Exception, |
| | | _outMsg); |
| | | return ReturnDto<int>.QuickReturn(rtnInt, ReturnCode.Success, _outMsg); |
| | | } |
| | | |
| | | #region 提交检验 |
| | | /// <summary> |
| | |
| | | public ReturnDto<ExpandoObject> EditModelSubmit([FromBody] dynamic mode) |
| | | { |
| | | string _guid = mode.guid; |
| | | string _inFieldValue = mode.inFieldValue; |
| | | dynamic m = new ExpandoObject(); |
| | | m.outSum = -1; |
| | | m.outMsg = ""; |
| | |
| | | new("@outSum", SqlDbType.Int), |
| | | new("@inEdtUserGuid", _userGuid), |
| | | new("@inOrderGuid", _guid), |
| | | new("@inFieldValue", 1), |
| | | new("@inFieldValue", _inFieldValue), |
| | | new("@in1", ""), |
| | | new("@in2", "") |
| | | }; |