/// 解析界面传递的数据,返回实体类型 /// <summary> /// 解析界面传递的数据,返回实体类型 /// </summary> /// <param name="msg"></param> /// <param name="sInfoData"></param> /// <returns></returns> private bool GetData(out string msg, out QS_ResultData sInfoData) { bool ischeck = false; msg = ""; string datainfoStr = DataStr; sInfoData = null; sInfoData = (QS_ResultData)Newtonsoft.Json.JavaScriptConvert.DeserializeObject(datainfoStr, typeof(QS_ResultData)); #region 验证数据正确性 if (sInfoData != null) { CheckData(sInfoData, out msg); if (msg != "") { ischeck = true; } } else { msg += "获取数据出错"; ischeck = true; } #endregion return(ischeck); }
/// 自定义校验 /// <summary> /// 自定义校验 /// </summary> /// <param name="sInfoData"></param> /// <param name="msg"></param> public override void CheckDataForDataID(QS_ResultData sInfoData, ref string msg) { Int64 intVal64 = 0; if (!Int64.TryParse(sInfoData.CSID, out intVal64)) { msg += "对话ID格式不正确<br>"; } }
/// 审核保存 /// <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) { Entities.QS_Result model = null; model = BLL.QS_Result.Instance.GetQS_Result(Convert.ToInt32(sInfoData.QS_RID)); model.ModifyTime = System.DateTime.Now; model.ModifyUserID = userID; model.ScoreType = Convert.ToInt32(sInfoData.ScoreType); model.Status = (Int32)status; model.StateResult = 1; BLL.QS_Result.Instance.Update(model); return(model.QS_RID); }
/// 审核保存 /// <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, string tableEndName) { Entities.QS_Result model = null; //由于易湃外呼业务签入cc系统,易湃不入库CallRecordInfo表,所以此处改成从CallRecord_ORIG_Business取录音创建坐席 modify by qizq 2014-4-17 Entities.CallRecord_ORIG_Business callModel = BLL.CallRecord_ORIG_Business.Instance.GetByCallID(Convert.ToInt64(sInfoData.CallID), tableEndName); //说明是初次 if (sInfoData.QS_RID == "0") { if (status == QSResultStatus.Submitted) { if (BLL.QS_Result.Instance.HasScored(sInfoData.CallID)) { // "此话务已评分过分了,不能再次评分!"; QS_RTID = 0; return(-9999); } } model = new Entities.QS_Result(); model.CallReCordID = Convert.ToInt64(sInfoData.CallID); model.CallID = Convert.ToInt64(sInfoData.CallID); model.QS_RTID = Convert.ToInt32(sInfoData.QS_RTID); model.SeatID = callModel.CreateUserID.ToString(); model.ScoreType = Convert.ToInt32(sInfoData.ScoreType); model.CreateTime = System.DateTime.Now; model.CreateUserID = userID; model.QualityAppraisal = sInfoData.QualityAppraisal; model.Status = (Int32)status; model.QS_RID = BLL.QS_Result.Instance.Insert(model, tableEndName); if (model.QS_RID == -9999) { // "此话务已评分过分了,不能再次评分!"; QS_RTID = 0; return(-9999); } } //再次保存 else { model = BLL.QS_Result.Instance.GetQS_Result(Convert.ToInt32(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; BLL.QS_Result.Instance.Update(model); } //返回结果 QS_RTID = model.QS_RTID; return(model.QS_RID); }
/// 维护成绩表 /// <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); }
/// 明细表维护 /// <summary> /// 明细表维护 /// </summary> /// <param name="userID"></param> /// <param name="sInfoData"></param> /// <param name="QS_RID"></param> /// <param name="HaveDead"></param> private void InsertUpdateResultDetail(int userID, QS_ResultData sInfoData, int QS_RID, out bool HaveDead) { HaveDead = false; BLL.QS_ResultDetail.Instance.DeleteByQS_RID(QS_RID); if (sInfoData.QS_ResultDetailList != null && sInfoData.QS_ResultDetailList.Length > 0) { for (int i = 0; i < sInfoData.QS_ResultDetailList.Length; i++) { Entities.QS_ResultDetail QS_ResultDetailModel = new Entities.QS_ResultDetail(); QS_ResultDetailModel.ScoreType = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].ScoreType); QS_ResultDetailModel.QS_RTID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_RTID); QS_ResultDetailModel.QS_RID = Convert.ToInt32(QS_RID); if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_CID)) { QS_ResultDetailModel.QS_CID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_CID); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_IID)) { QS_ResultDetailModel.QS_IID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_IID); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_SID)) { QS_ResultDetailModel.QS_SID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_SID); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_MID)) { QS_ResultDetailModel.QS_MID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_MID); QS_ResultDetailModel.QS_MID_End = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_MID); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].Type)) { QS_ResultDetailModel.Type = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].Type); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].ScoreDeadID)) { QS_ResultDetailModel.ScoreDeadID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].ScoreDeadID); QS_ResultDetailModel.ScoreDeadID_End = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].ScoreDeadID); HaveDead = true; } QS_ResultDetailModel.Remark = sInfoData.QS_ResultDetailList[i].Remark; QS_ResultDetailModel.Status = 0; QS_ResultDetailModel.CreateTime = System.DateTime.Now; QS_ResultDetailModel.CreateUserID = userID; BLL.QS_ResultDetail.Instance.Insert(QS_ResultDetailModel); } } }
/// 保存成绩 /// <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); }
/// 保存成绩 /// <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) { //取成绩实体 Entities.QS_Result model = BLL.QS_Result.Instance.GetQS_Result(QS_RID); //计算成绩 decimal?Score; int? IsQualified; CalcResult(sInfoData, HaveDead, model.QS_RID, model.QS_RTID, model.ScoreType, out Score, out IsQualified); model.Score = Score; model.IsQualified = IsQualified; model.ModifyTime = DateTime.Now; model.ModifyUserID = BLL.Util.GetLoginUserID(); //保存 BLL.QS_Result.Instance.Update(model); }
/// 验证数据格式 /// <summary> /// 验证数据格式 /// </summary> /// <param name="sInfoData"></param> /// <param name="msg"></param> private void CheckData(QS_ResultData sInfoData, out string msg) { msg = ""; int intVal = 0; if (!int.TryParse(sInfoData.QS_RID, out intVal)) { msg += "评分成绩主键ID格式不正确<br>"; } //自定义校验 CheckDataForDataID(sInfoData, ref msg); if (!int.TryParse(sInfoData.QS_RTID, out intVal)) { msg += "质检表主键ID不正确<br>"; } if (!int.TryParse(sInfoData.ScoreType, out intVal)) { msg += "质检表类型不正确<br>"; } if (!int.TryParse(sInfoData.NoDeadNum, out intVal)) { msg += "质检表非致命项数格式不正确<br>"; } if (!int.TryParse(sInfoData.DeadNum, out intVal)) { msg += "质检表致命项数格式不正确<br>"; } if (sInfoData.QS_ResultDetailList != null) { foreach (QS_ResultDetailData qItem in sInfoData.QS_ResultDetailList) { #region 检查评分明细数据 if (!string.IsNullOrEmpty(qItem.QS_RDID)) { if (!int.TryParse(qItem.QS_RDID, out intVal)) { msg += "评分结果明细表主键ID数据格式不正确<br>"; } } if (!int.TryParse(qItem.ScoreType, out intVal)) { msg += "评分结果明细表评分表类型数据格式不正确<br>"; } if (!int.TryParse(qItem.QS_RTID, out intVal)) { msg += "质检表主键ID数据格式不正确<br>"; } if (!int.TryParse(qItem.QS_RID, out intVal)) { msg += "评分结果主键ID数据格式不正确<br>"; } if (!string.IsNullOrEmpty(qItem.QS_CID)) { if (!int.TryParse(qItem.QS_CID, out intVal)) { msg += "明细表中评分分类数字格式不正确<br>"; } } if (!string.IsNullOrEmpty(qItem.QS_IID)) { if (!int.TryParse(qItem.QS_IID, out intVal)) { msg += "明细表中质检项目ID数字格式不正确<br>"; } } if (!string.IsNullOrEmpty(qItem.QS_SID)) { if (!int.TryParse(qItem.QS_SID, out intVal)) { msg += "明细表中质检标准ID数字格式不正确<br>"; } } if (!string.IsNullOrEmpty(qItem.QS_MID)) { if (!int.TryParse(qItem.QS_MID, out intVal)) { msg += "明细表中评分扣分项ID数字格式不正确<br>"; } } if (!string.IsNullOrEmpty(qItem.QS_MID_End)) { if (!int.TryParse(qItem.QS_MID_End, out intVal)) { msg += "明细表中评分扣分项最终ID数字格式不正确<br>"; } } if (!string.IsNullOrEmpty(qItem.ScoreDeadID)) { if (!int.TryParse(qItem.ScoreDeadID, out intVal)) { msg += "明细表中评分致命项ID数字格式不正确<br>"; } } if (!string.IsNullOrEmpty(qItem.ScoreDeadID_End)) { if (!int.TryParse(qItem.ScoreDeadID_End, out intVal)) { msg += "明细表中评分致命项ID数字格式不正确<br>"; } } #endregion } } }
/// 提交逻辑 /// <summary> /// 提交逻辑 /// </summary> /// <param name="sInfoData"></param> /// <param name="userID"></param> /// <param name="QS_RTID"></param> /// <returns></returns> public override int SubmitResult(QS_ResultData sInfoData, int userID, out int QS_RTID) { //已提交 return(InsertOrUpdateResult(sInfoData, userID, out QS_RTID, QSResultStatus.Submitted)); }
/// 保存逻辑 /// <summary> /// 保存逻辑 /// </summary> /// <param name="sInfoData"></param> /// <param name="userID"></param> /// <param name="QS_RTID"></param> /// <returns></returns> public override int SaveResult(QS_ResultData sInfoData, int userID, out int QS_RTID) { //待评分 return(InsertOrUpdateResult(sInfoData, userID, out QS_RTID, QSResultStatus.WaitScore)); }
/// 计算成绩 /// <summary> /// 计算成绩 /// </summary> /// <param name="sInfoData"></param> /// <param name="modelsub"></param> /// <param name="HaveDead"></param> public void CalcResult(QS_ResultData sInfoData, bool HaveDead, int QS_RID, int QS_RTID, int?ScoreType, out decimal?Score, out int?IsQualified) { IsQualified = null; Score = null; //计算成绩 if (sInfoData.QS_ResultDetailList != null && sInfoData.QS_ResultDetailList.Length > 0) { if (HaveDead) { //有致命项得分为0 Score = 0; } //没有致命项 else { Score = 0; //评分型/五级质检 if (ScoreType == 1 || ScoreType == 3) { string ccOrIm = ""; Int64 callid, csid; if (Int64.TryParse(sInfoData.CallID, out callid)) { if (callid > 0) { ccOrIm = "cc"; } } if (ccOrIm == "" && Int64.TryParse(sInfoData.CSID, out csid)) { if (csid > 0) { ccOrIm = "im"; } } DataTable dtCalculate = BLL.QS_ResultDetail.Instance.GetQS_ResultForCalculate(ScoreType.ToString(), QS_RID, QS_RTID, ccOrIm); if (dtCalculate != null && dtCalculate.Rows.Count > 0) { for (int n = 0; n < dtCalculate.Rows.Count; n++) { decimal outscore = 0; if (decimal.TryParse(dtCalculate.Rows[n]["enscore"].ToString(), out outscore)) { Score += outscore; } } } } //合格型 else { string ccOrIm = ""; Int64 callid, csid; if (Int64.TryParse(sInfoData.CallID, out callid)) { if (callid > 0) { ccOrIm = "cc"; } } if (ccOrIm == "" && Int64.TryParse(sInfoData.CSID, out csid)) { if (csid > 0) { ccOrIm = "im"; } } DataTable dtCalculate = BLL.QS_ResultDetail.Instance.GetQS_ResultForCalculate("2", QS_RID, QS_RTID, ccOrIm); //判断致命项,非致命项判断是否合格 if (dtCalculate != null && dtCalculate.Rows.Count > 0) { int outDeadcount = 0; int outNoDeadcount = 0; for (int i = 0; i < dtCalculate.Rows.Count; i++) { int _outDeadcount = 0; if (int.TryParse(dtCalculate.Rows[i]["deadcount"].ToString(), out _outDeadcount)) { outDeadcount += _outDeadcount; } int _outNoDeadcount = 0; if (int.TryParse(dtCalculate.Rows[i]["nodeadcount"].ToString(), out _outNoDeadcount)) { outNoDeadcount += _outNoDeadcount; } } if (sInfoData.DeadNum == "0") { if (outDeadcount > 0) { IsQualified = -1; } else { IsQualified = 1; if (outNoDeadcount >= Convert.ToInt32(sInfoData.NoDeadNum)) { IsQualified = -1; } } } else if (sInfoData.NoDeadNum == "0") { if (outNoDeadcount > 0) { IsQualified = -1; } else { IsQualified = 1; if (outDeadcount >= Convert.ToInt32(sInfoData.DeadNum)) { IsQualified = -1; } } } else { if (outDeadcount >= Convert.ToInt32(sInfoData.DeadNum) || outNoDeadcount >= Convert.ToInt32(sInfoData.NoDeadNum)) { IsQualified = -1; } else { IsQualified = 1; } } } else { IsQualified = 1; } } } } else { if (ScoreType == 1 || ScoreType == 3) { Score = BLL.QS_Category.Instance.GetSumScore(QS_RTID); } else { IsQualified = 1; } } }
/// 审核时保存明细数据 /// <summary> /// 审核时保存明细数据 /// </summary> /// <param name="userID"></param> /// <param name="sInfoData"></param> /// <param name="model"></param> /// <returns></returns> private bool AuditResultDetail(int userID, QS_ResultData sInfoData, int QS_RID) { bool HaveDead = false; if (sInfoData.QS_ResultDetailList != null && sInfoData.QS_ResultDetailList.Length > 0) { //插入新明细 for (int i = 0; i < sInfoData.QS_ResultDetailList.Length; i++) { Entities.QS_ResultDetail QS_ResultDetailModel = new Entities.QS_ResultDetail(); QS_ResultDetailModel.ScoreType = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].ScoreType); QS_ResultDetailModel.QS_RTID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_RTID); QS_ResultDetailModel.QS_RID = Convert.ToInt32(QS_RID); if (sInfoData.QS_ResultDetailList[i].QS_MID == "-2" && sInfoData.QS_ResultDetailList[i].QS_MID_End == "-2" && sInfoData.QS_ResultDetailList[i].ScoreDeadID == "" && sInfoData.QS_ResultDetailList[i].ScoreDeadID_End == "") { continue; } if (sInfoData.QS_ResultDetailList[i].ScoreDeadID == "-2" && sInfoData.QS_ResultDetailList[i].ScoreDeadID_End == "-2" && sInfoData.QS_ResultDetailList[i].QS_MID == "" && sInfoData.QS_ResultDetailList[i].QS_MID_End == "") { continue; } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_CID)) { QS_ResultDetailModel.QS_CID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_CID); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_IID)) { QS_ResultDetailModel.QS_IID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_IID); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_SID)) { QS_ResultDetailModel.QS_SID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_SID); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_MID)) { QS_ResultDetailModel.QS_MID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_MID); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_MID_End)) { QS_ResultDetailModel.QS_MID_End = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_MID_End); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].Type)) { QS_ResultDetailModel.Type = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].Type); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].ScoreDeadID)) { QS_ResultDetailModel.ScoreDeadID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].ScoreDeadID); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].ScoreDeadID_End)) { QS_ResultDetailModel.ScoreDeadID_End = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].ScoreDeadID_End); if (sInfoData.QS_ResultDetailList[i].ScoreDeadID_End != "-2") { HaveDead = true; } } if (sInfoData.QS_ResultDetailList[i].ScoreType == "3" && !string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].Remark)) { QS_ResultDetailModel.Remark = sInfoData.QS_ResultDetailList[i].Remark; } //更新 if (sInfoData.QS_ResultDetailList[i].QS_RDID != "" && sInfoData.QS_ResultDetailList[i].QS_RDID != "0") { Entities.QS_ResultDetail modelstate = BLL.QS_ResultDetail.Instance.GetQS_ResultDetail(Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_RDID)); if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_MID_End)) { modelstate.QS_MID_End = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_MID_End); } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].ScoreDeadID_End)) { modelstate.ScoreDeadID_End = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].ScoreDeadID_End); } if (sInfoData.QS_ResultDetailList[i].ScoreType == "3") { if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].Remark)) { modelstate.Remark = sInfoData.QS_ResultDetailList[i].Remark; } if (!string.IsNullOrEmpty(sInfoData.QS_ResultDetailList[i].QS_SID)) { modelstate.QS_SID = Convert.ToInt32(sInfoData.QS_ResultDetailList[i].QS_SID); } } modelstate.ModifyTime = System.DateTime.Now; modelstate.ModifyUserID = userID; BLL.QS_ResultDetail.Instance.Update(modelstate); } //插入 else { QS_ResultDetailModel.Status = 0; QS_ResultDetailModel.CreateTime = System.DateTime.Now; QS_ResultDetailModel.CreateUserID = userID; BLL.QS_ResultDetail.Instance.Insert(QS_ResultDetailModel); } } } return(HaveDead); }
/// 审核保存 /// <summary> /// 审核保存 /// </summary> /// <param name="userID"></param> /// <param name="sInfoData"></param> /// <param name="status"></param> /// <returns></returns> public abstract int AuditSave(int userID, QS_ResultData sInfoData, QSResultStatus status);
/// 保存成绩 /// <summary> /// 保存成绩 /// </summary> /// <param name="sInfoData"></param> /// <param name="HaveDead"></param> /// <param name="QS_RID"></param> public abstract void SaveScoreResult(QS_ResultData sInfoData, bool HaveDead, int QS_RID);
/// 提交逻辑 /// <summary> /// 提交逻辑 /// </summary> /// <param name="sInfoData"></param> /// <param name="userID"></param> /// <param name="QS_RTID"></param> /// <returns></returns> public abstract int SubmitResult(QS_ResultData sInfoData, int userID, out int QS_RTID);
/// 自定义校验 /// <summary> /// 自定义校验 /// </summary> /// <param name="sInfoData"></param> /// <param name="msg"></param> public abstract void CheckDataForDataID(QS_ResultData sInfoData, ref string msg);