/// <summary> /// 获取检索数据的Sql文 /// </summary> /// <param name="baseFilter"></param> /// <returns></returns> protected override string GetUpdateSql(BaseFilter baseFilter) { SavingCardChangeUpdateFilter filter = baseFilter as SavingCardChangeUpdateFilter; if (filter == null) { return(""); } string sql = "Services\\SQL\\SavingCardChange\\INSERT_SAVINGCARDCHANGE_HISTORY_AUDIT.sql"; sql = sql.ToFileContent(true , filter.BusinessID , filter.CustomerID , filter.OriginalCard , filter.ChangeCard , filter.Status , filter.MeanName , filter.MeanPath , filter.OriginalUser , filter.ChangeUser , filter.BankName , filter.SubBranch , filter.OldSubBranch , filter.OldBankName , filter.OperatorUser , filter.BankKey); return(sql); }
/// <summary> /// 根据条件更新数据 /// </summary> /// <param name="baseFilter"></param> /// <param name="responseEntity"></param> public virtual void UpdateData(SavingCardChangeUpdateFilter baseFilter , ResponseEntity responseEntity) { var lstBusiness = Singleton <GetBusinessByContractNoDAL <SavingCardChangeBusinessViewData> > .Instance.SearchData(baseFilter); if (lstBusiness == null || lstBusiness.Count == 0) { ServiceUtility.SetResponseStatus(responseEntity, EnumResponseState.Others, "提交失败!"); return; } var business = lstBusiness[0]; baseFilter.BusinessID = business.BusinessID; baseFilter.CustomerID = business.CustomerID; // 更新数据 int count = Singleton <SavingCardChangeSubmitDAL> .Instance.Update(baseFilter); if (count > 0) { ServiceUtility.SetResponseStatus(responseEntity, EnumResponseState.Success); } else { ServiceUtility.SetResponseStatus(responseEntity, EnumResponseState.Others); } }
/// <summary> /// 程序执行主入口 /// </summary> /// <param name="requestEntity"></param> /// <param name="responseEntity"></param> protected override void DoExecute(RequestEntity requestEntity, ResponseEntity responseEntity) { // 定义接收客户端参数的变量 SavingCardChangeUpdateFilter filter = ServiceUtility.ConvertToFilterFromDict <SavingCardChangeUpdateFilter>(requestEntity.Parameters); // 储蓄卡修改审核通过 Singleton <SavingCardChangeAuditPassBLL> .Instance.UpdateData(filter, responseEntity); }
/// <summary> /// 获取检索数据的Sql文 /// </summary> /// <param name="baseFilter"></param> /// <returns></returns> protected override string GetSearchSql(BaseFilter baseFilter) { SavingCardChangeUpdateFilter filter = baseFilter as SavingCardChangeUpdateFilter; if (filter == null) { return(""); } string sql = " SELECT TOP 1 b.BusinessID, b.CustomerID " + " FROM Business b " + " WHERE b.ContractNo = '" + filter.ContractNo + "'" + " ORDER BY BusinessID ASC"; return(sql); }