/// 审核保存 /// <summary> /// 审核保存 /// </summary> /// <param name="userID"></param> /// <param name="sInfoData"></param> /// <param name="status"></param> /// <returns></returns> public override int AuditSave(int userID, QS_ResultData sInfoData, QSResultStatus status) { QS_IM_ResultInfo model = CommonBll.Instance.GetComAdoInfo <QS_IM_ResultInfo>(CommonFunction.ObjectToInteger(sInfoData.QS_RID)); model.ModifyTime = System.DateTime.Now; model.ModifyUserID = userID; model.ScoreType = Convert.ToInt32(sInfoData.ScoreType); model.Status = (Int32)status; model.StateResult = 1; CommonBll.Instance.UpdateComAdoInfo <QS_IM_ResultInfo>(model); return(model.QS_RID.Value); }
/// 维护成绩表 /// <summary> /// 维护成绩表 /// </summary> /// <param name="sInfoData"></param> /// <param name="userID"></param> /// <param name="QS_RTID"></param> /// <param name="status"></param> /// <returns></returns> private int InsertOrUpdateResult(QS_ResultData sInfoData, int userID, out int QS_RTID, QSResultStatus status) { QS_IM_ResultInfo model = null; DataRow dr = BLL.QS_IM_Result.Instance.GetQS_IM_ResultForCSID(sInfoData.CSID); if (dr == null) { throw new Exception("会话不存在!"); } //说明是初次 if (sInfoData.QS_RID == "0") { if (status == QSResultStatus.Submitted) { if (BLL.QS_IM_Result.Instance.HasScored(sInfoData.CSID)) { // "此话务已评分过分了,不能再次评分!"; QS_RTID = 0; return(-9999); } } model = new QS_IM_ResultInfo(); //QS_RID根据QS_Result表中的自增列生成,两个表的主键不能重复 model.QS_RID = BLL.QS_IM_Result.Instance.CreateQS_RID(); model.CSID = Convert.ToInt64(sInfoData.CSID); model.QS_RTID = Convert.ToInt32(sInfoData.QS_RTID); model.SeatID = dr["AgentUserID"].ToString(); model.ScoreType = Convert.ToInt32(sInfoData.ScoreType); model.CreateTime = System.DateTime.Now; model.CreateUserID = userID; model.QualityAppraisal = sInfoData.QualityAppraisal; model.Status = (Int32)status; CommonBll.Instance.InsertComAdoInfo <QS_IM_ResultInfo>(model); } //再次保存 else { model = CommonBll.Instance.GetComAdoInfo <QS_IM_ResultInfo>(CommonFunction.ObjectToInteger(sInfoData.QS_RID)); model.QualityAppraisal = sInfoData.QualityAppraisal; model.ModifyTime = System.DateTime.Now; model.ModifyUserID = userID; model.ScoreType = Convert.ToInt32(sInfoData.ScoreType); model.Status = (Int32)status; CommonBll.Instance.UpdateComAdoInfo <QS_IM_ResultInfo>(model); } //返回结果 QS_RTID = model.QS_RTID.Value; return(model.QS_RID.Value); }
public void Dispose(Entities.QSResultStatus status, Entities.QSApprovalType type, bool IsReject, out string msg) { msg = string.Empty; int rid = 0; if (int.TryParse(RequestQS_RID, out rid)) { QS_IM_ResultInfo info = CommonBll.Instance.GetComAdoInfo <QS_IM_ResultInfo>(CommonFunction.ObjectToInteger(rid)); if (info != null) { int userId = BLL.Util.GetLoginUserID(); info.Status = (int)status; info.ModifyTime = DateTime.Now; info.ModifyUserID = userId; Entities.QS_ApprovalHistory model = new BitAuto.ISDC.CC2012.Entities.QS_ApprovalHistory(); model.CreateTime = DateTime.Now; model.CreateUserID = userId; model.QS_RID = rid; model.QS_RTID = info.QS_RTID; model.Remark = RequestRemark; model.Status = (int)status; model.ApprovalType = ((int)type).ToString(); if (type != QSApprovalType.ScoreAppeal) { if (IsReject) { model.ApprovalResult = 2; info.StateResult = 2; } else { model.ApprovalResult = 1; info.StateResult = 1; } } model.Type = "1"; CommonBll.Instance.UpdateComAdoInfo(info); BLL.QS_ApprovalHistory.Instance.Insert(model); msg = "success"; } else { msg = "不存在此评分"; } } }
/// 保存成绩 /// <summary> /// 保存成绩 /// </summary> /// <param name="sInfoData"></param> /// <param name="HaveDead"></param> /// <param name="QS_RID"></param> public override void SaveScoreResult(QS_ResultData sInfoData, bool HaveDead, int QS_RID) { //取成绩实体 QS_IM_ResultInfo model = CommonBll.Instance.GetComAdoInfo <QS_IM_ResultInfo>(CommonFunction.ObjectToInteger(QS_RID)); //计算成绩 decimal?Score; int? IsQualified; CalcResult(sInfoData, HaveDead, model.QS_RID.Value, model.QS_RTID.Value, model.ScoreType, out Score, out IsQualified); model.Score = Score; model.IsQualified = IsQualified; model.ModifyTime = DateTime.Now; model.ModifyUserID = BLL.Util.GetLoginUserID(); //保存 CommonBll.Instance.UpdateComAdoInfo <QS_IM_ResultInfo>(model); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!string.IsNullOrEmpty(QS_RID)) { QS_IM_ResultInfo info = CommonBll.Instance.GetComAdoInfo <QS_IM_ResultInfo>(CommonFunction.ObjectToInteger(QS_RID)); if (info != null) { int QS_RTID = info.ValueOrDefault_QS_RTID; int CSID = (int)info.ValueOrDefault_CSID; Entities.QS_RulesTable tablemodel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(QS_RTID); if (tablemodel != null) { //设置标题 TableName = tablemodel.Name; if (tablemodel.ScoreType == 2) { TableName += "(致命项数" + tablemodel.DeadItemNum + ",非致命项数" + tablemodel.NoDeadItemNum + ")"; } //设置页面 QualityStandardViewID.QS_RTID = QS_RTID; QualityStandardViewID.PageFrom = PageFrom; QualityStandardViewID.QS_RID = CommonFunction.ObjectToInteger(QS_RID); UCConversationsViewID.CSID = CSID.ToString(); } } else { AlertMessage("评分成绩不存在"); } } else { AlertMessage("请求参数错误"); } } }
private void BindData() { if (!string.IsNullOrEmpty(QS_RID)) { QS_IM_ResultInfo info = CommonBll.Instance.GetComAdoInfo <QS_IM_ResultInfo>(CommonFunction.ObjectToInteger(QS_RID)); if (info != null) { if (info.Status == 20004) { CanSeeMessage = true; } int QS_RTID = info.ValueOrDefault_QS_RTID; CSID = (int)info.ValueOrDefault_CSID; DataRow dr = BLL.QS_IM_Result.Instance.GetQS_IM_ResultForCSID(CSID.ToString()); Entities.QS_RulesTable tablemodel = BLL.QS_RulesTable.Instance.GetQS_RulesTable(QS_RTID); if (tablemodel != null && dr != null) { //设置标题 TableName = tablemodel.Name; if (tablemodel.ScoreType == 2) { TableName += "(致命项数" + tablemodel.DeadItemNum + ",非致命项数" + tablemodel.NoDeadItemNum + ")"; } //如果具有申诉权限,并且当前人不是此对话的创建人员,关闭此页面 if (AppealButton && CommonFunction.ObjectToInteger(dr["AgentUserID"]) != BLL.Util.GetLoginUserID() & !RecheckButton & !AppealButton) { AlertMessage("您没有权限查看此评分"); } //如果不是本人录音,申诉按钮不显示 if (AppealButton && CommonFunction.ObjectToInteger(dr["AgentUserID"]) != BLL.Util.GetLoginUserID()) { AppealButton = false; } //显示对话 this.UCConversationsViewID.CSID = CSID.ToString(); } //成绩表状态 Status = info.ValueOrDefault_Status.ToString(); switch (Status) { case "20003": Title = "对话质检成绩初审"; this.UCScoreTableView.QS_RID = CommonFunction.ObjectToInteger(QS_RID); this.UCScoreTableView.QS_RTID = QS_RTID; this.UCScoreTableView.PageFrom = "im"; break; case "20004": Title = "对话质检成绩复审"; this.ucTableDispose.CallID = -1; this.ucTableDispose.CSID = CSID; this.ucTableDispose.QS_RID = CommonFunction.ObjectToInteger(QS_RID); this.ucTableDispose.QS_RTID = QS_RTID; break; default: Title = "对话质检成绩查看"; this.UCScoreTableView.QS_RID = CommonFunction.ObjectToInteger(QS_RID); this.UCScoreTableView.QS_RTID = QS_RTID; this.UCScoreTableView.PageFrom = "cc"; break; } } else { AlertMessage("评分成绩不存在"); } } else { AlertMessage("请求参数错误"); } }