Ejemplo n.º 1
0
        /// <summary>
        /// 数据总体报送得分
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        public string DataUpAllInfo(dynamic _)
        {
            var recdata = this.GetResquetData <DataUpInModel>();

            try
            {
                #region "接口调用验证"
                //bool flag = DataValidation(recdata.DateTime, recdata.Random, recdata.Sign);

                //if (!flag)
                //{
                //    return this.WriteValidationLog("LoginModule", recdata.DeviceId);
                //}
                #endregion
                DataUpBusiness     messageBll = new DataUpBusiness();
                DataUpAllInfoModel list       = messageBll.GetDataUpAllInfo(recdata.data);
                if (list != null)
                {
                    return(this.SendData <DataUpAllInfoModel>(list, "获取数据总体报送得分情况成功", ResponseType.Success));
                }
                else
                {
                    return(this.SendData("数据总体报送得分情况为空!", ResponseType.Success));
                }
            }
            catch (Exception ex)
            {
                return(this.WriteExceptionLog("LoginModule", recdata.DeviceId, recdata.DeviceId, "获取数据总体报送得分情况异常:" + Json.ToJson(recdata) + "[异常信息:" + ex.Message + "]", "获取数据总体报送得分情况异常:" + ex.Message));
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public DataUpAllInfoModel GetDataUpAllInfo(DataUpInModel info)
        {
            DataUpAllInfoModel temp   = null;
            string             strSql = string.Format(@" select id,
                                               total_number,
                                               dataup_score,
                                               quality_score,
                                               dataup_standard_score,
                                               data_complete_score,
                                               data_price_score,
                                               data_weight_score,
                                               meat_trace_score,
                                               veg_trace_score,
                                               check_month,
                                               check_year,
                                               check_date,
                                               insert_time,DATA_GROW_SCORE,
                                               update_time
                                          from bl_data_up_info t where CHECK_MONTH=:V_CHECK_MONTH ");
            DataTable          dt     = OracleHelper.Query(strSql, new OracleParameter(":V_CHECK_MONTH", info.CheckMonth));

            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    temp = new DataUpAllInfoModel();

                    temp.DataCompleteScore   = DBNull.Value == dt.Rows[0]["data_complete_score"] ? string.Empty : dt.Rows[0]["data_complete_score"].ToString();
                    temp.DataPriceScore      = DBNull.Value == dt.Rows[0]["data_price_score"] ? string.Empty : dt.Rows[0]["data_price_score"].ToString();
                    temp.DataUpGrowScore     = DBNull.Value == dt.Rows[0]["DATA_GROW_SCORE"] ? string.Empty : dt.Rows[0]["DATA_GROW_SCORE"].ToString();
                    temp.DataUpScore         = DBNull.Value == dt.Rows[0]["dataup_score"] ? string.Empty : dt.Rows[0]["dataup_score"].ToString();
                    temp.DataUpStandardScore = DBNull.Value == dt.Rows[0]["dataup_standard_score"] ? string.Empty : dt.Rows[0]["dataup_standard_score"].ToString();
                    temp.DataWeightScore     = DBNull.Value == dt.Rows[0]["data_weight_score"] ? string.Empty : dt.Rows[0]["data_weight_score"].ToString();
                    temp.MeatTraceScore      = DBNull.Value == dt.Rows[0]["meat_trace_score"] ? string.Empty : dt.Rows[0]["meat_trace_score"].ToString();
                    temp.QualityScore        = DBNull.Value == dt.Rows[0]["quality_score"] ? string.Empty : dt.Rows[0]["quality_score"].ToString();
                    temp.TotalNumber         = DBNull.Value == dt.Rows[0]["total_number"] ? string.Empty : dt.Rows[0]["total_number"].ToString();
                    temp.VegTraceScore       = DBNull.Value == dt.Rows[0]["veg_trace_score"] ? string.Empty : dt.Rows[0]["veg_trace_score"].ToString();
                }
            }

            return(temp);
        }