public InvokeResult EvaluationFinalResults(EvaluatedRequisition evaluatedRequisition) { InvokeResult result = new InvokeResult { Success = true }; try { List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>(); /***********************begin 自定义代码*******************/ evaluatedRequisition.OperatedBy = NormalSession.UserId.ToGuid(); evaluatedRequisition.OperatedOn = DateTime.Now; evaluatedRequisition.DataSource = GlobalManager.DIKey_00012_ManualEdit; statements.Add(new IBatisNetBatchStatement { StatementName = evaluatedRequisition.GetUpdateMethodName(), ParameterObject = evaluatedRequisition.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE }); //基础信息库 ResidentBaseInfo residentBaseInfo = new ResidentBaseInfo(); residentBaseInfo.ResidentId = evaluatedRequisition.ResidentId; residentBaseInfo.OperatedBy = NormalSession.UserId.ToGuid(); residentBaseInfo.OperatedOn = DateTime.Now; residentBaseInfo.DataSource = GlobalManager.DIKey_00012_ManualEdit; residentBaseInfo.StationId = evaluatedRequisition.StationId; /***********************end 自定义代码*********************/ statements.Add(new IBatisNetBatchStatement { StatementName = residentBaseInfo.GetUpdateMethodName(), ParameterObject = residentBaseInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE }); /***********************begin 自定义代码*******************/ /***********************此处添加自定义代码*****************/ /***********************end 自定义代码*********************/ BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlNoneQuery(statements); } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }
public ModelInvokeResult <ResidentIDNoRequisitionPK> IsRequisitionPass(string strRequisitionId, ResidentIDNoRequisition residentIDNoRequisition) { ModelInvokeResult <ResidentIDNoRequisitionPK> result = new ModelInvokeResult <ResidentIDNoRequisitionPK> { Success = true }; try { List <IBatisNetBatchStatement> statements = new List <IBatisNetBatchStatement>(); Guid?_RequisitionId = strRequisitionId.ToGuid(); if (_RequisitionId == null) { result.Success = false; result.ErrorCode = 59996; return(result); } residentIDNoRequisition.RequisitionId = _RequisitionId; /***********************begin 自定义代码*******************/ residentIDNoRequisition.OperatedBy = NormalSession.UserId.ToGuid(); residentIDNoRequisition.OperatedOn = DateTime.Now; residentIDNoRequisition.ConfirmBy = NormalSession.UserId.ToGuid(); residentIDNoRequisition.ConfirmOn = DateTime.Now; /***********************end 自定义代码*********************/ statements.Add(new IBatisNetBatchStatement { StatementName = residentIDNoRequisition.GetUpdateMethodName(), ParameterObject = residentIDNoRequisition.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE }); if (residentIDNoRequisition.DoStatus == 1) { /***********************begin 更改区级库的身份证号码*******************/ List <IBatisNetBatchStatement> statements_oldManBaseInfo = new List <IBatisNetBatchStatement>(); OldManBaseInfo oldManBaseInfo = new OldManBaseInfo(); oldManBaseInfo.OldManId = residentIDNoRequisition.ResidentId; oldManBaseInfo.OperatedBy = NormalSession.UserId.ToGuid(); oldManBaseInfo.OperatedOn = DateTime.Now; oldManBaseInfo.DataSource = GlobalManager.DIKey_00012_ManualEdit; oldManBaseInfo.IDNo = residentIDNoRequisition.IDNoNew; statements_oldManBaseInfo.Add(new IBatisNetBatchStatement { StatementName = oldManBaseInfo.GetUpdateMethodName(), ParameterObject = oldManBaseInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE }); BuilderFactory.DefaultBulder().ExecuteNativeSqlNoneQuery(statements_oldManBaseInfo); /***********************end 更改区级库的身份证号码*********************/ /***********************begin 更改城市库的身份证号码*******************/ List <IBatisNetBatchStatement> statements_residentBaseInfo = new List <IBatisNetBatchStatement>(); ResidentBaseInfo residentBaseInfo = new ResidentBaseInfo(); residentBaseInfo.ResidentId = residentIDNoRequisition.ResidentId; residentBaseInfo.OperatedBy = NormalSession.UserId.ToGuid(); residentBaseInfo.OperatedOn = DateTime.Now; residentBaseInfo.DataSource = GlobalManager.DIKey_00012_ManualEdit; residentBaseInfo.IDNo = residentIDNoRequisition.IDNoNew; statements_residentBaseInfo.Add(new IBatisNetBatchStatement { StatementName = residentBaseInfo.GetUpdateMethodName(), ParameterObject = residentBaseInfo.ToStringObjectDictionary(false), Type = SqlExecuteType.UPDATE }); BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlNoneQuery(statements_residentBaseInfo); /***********************end 更改城市库的身份证号码*********************/ } BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlNoneQuery(statements); /***********************begin 添加居民活动信息*******************/ string sql_str = " insert into Bas_ResidentActivityLog (CheckInTime,ResidentId,ActivityTime,ActivityType,ActivityData,ActivityDescription,ActivityChangeType)" + " select GETDATE() CheckInTime,a.ResidentId,GETDATE() ActivityTime,'00001' ActivityType" + ",'{\"Source\":\"07\",\"from\":\"07\",\"to\":\"07\",\"Operate\":\"变更身份证\",\"NewIDNo\":\"'+CAST( IDNoNew as varchar(20))+'\",\"OldIDNo\":\"'+CAST( IDNoOld as varchar(20))+'\",\"OperatedBy\":\"'+ISNULL(CAST( ConfirmBy as varchar(36)),'')+'\",\"AreaId\":\"'+CAST( b.AreaId as varchar(36))+'\",\"DoStatus\":\"" + residentIDNoRequisition.DoStatus + "\"}' ActivityData" + ",'变更身份证:结果\"" + (residentIDNoRequisition.DoStatus == 1 ? "通过" : "不通过") + "\",原身份证\"'+IDNoOld+'\"变更为\"'+IDNoNew+'\",\"所在辖区\":\"'+ItemName+'\"' ActivityDescription,'00001' ActivityChangeType" + " from Bas_ResidentIDNoRequisition a inner join Bas_ResidentBaseInfo b on a.ResidentId=b.ResidentId inner join Sys_DictionaryItem c on b.AreaId=c.ItemId" + " where c.DictionaryId='00005' and RequisitionId='" + strRequisitionId + "'"; BuilderFactory.DefaultBulder(GetHttpHeader("ConnectId")).ExecuteNativeSqlNoneQuery(sql_str); /***********************end 添加居民活动信息*******************/ result.instance = new ResidentIDNoRequisitionPK { RequisitionId = _RequisitionId }; } catch (Exception ex) { result.Success = false; result.ErrorMessage = ex.Message; } return(result); }