/// <summary> /// 获取新的FILEID /// </summary> /// <returns></returns> public static string GetNewFileId(Eva.Library.Data.AccessDataTrans.IAccessDataTrans t) { string sql = "select max(id) from tbl_file_menu "; object o; string fileid = ""; if (t == null) { fileid = ((o = _iAccessData.GetSingle(sql)) == null ? "0" : o.ToString()); } else { fileid = ((o = t.GetSingle(sql)) == null ? "0" : o.ToString()); } if (fileid == "") { fileid = "0"; } fileid = (int.Parse(fileid) + 1).ToString(); sql = "insert into tbl_file_menu(id,hascontent) values('" + fileid + "','1')"; if (t == null) { _iAccessData.ExecuteSql(sql); } else { t.ExecuteSql(sql); } return(fileid); }
public string AddAndroidAppLog(string message, string clientInf) { Dictionary <string, string> resultDic = new Dictionary <string, string>(); resultDic["result"] = ""; resultDic["message"] = ""; try { _iAccessData = commonclass.commonclass.CreateIAccessData(); if (message.Length > 2100) { message = message.Substring(message.Length - 2100); } string sqlString = "insert into TBL_ANDROIDAPP_LOG (sys_id, message, clientinfo, sys_creatdate, value1, value2, value3, value4, value5)"; sqlString += "values ((select nvl(max(sys_id),0)+1 from TBL_ANDROIDAPP_LOG), '" + message + "', '" + clientInf + "', sysdate, '', '', '', '', '')"; _iAccessData.ExecuteSql(sqlString); resultDic["result"] = "true"; resultDic["message"] = ""; } catch (Exception ex) { resultDic["result"] = "error"; resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); } return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic)); }
public string Update(string json, string columns, string clientInf) { Dictionary <string, string> resultDic = new Dictionary <string, string>(); resultDic["result"] = ""; resultDic["message"] = ""; try { sara.dd.ldsw.model.tbl_app_version model = Eva.Library.Format.FormatEntityTool.FormatJsonToModel <sara.dd.ldsw.model.tbl_app_version>(json); columns = FormatColumns(columns).Replace("^", ","); resultDic["result"] = "true"; if (model.f_status == "true") { _iAccessData.ExecuteSql("update tbl_app_version set f_status='false' where f_apptypeid='" + model.f_apptypeid + "'"); } resultDic["message"] = _idal_tbl_app_version.Update(model, columns, null); NewLog("数据更新成功,更新的数据为:json:" + json + ",columns:" + columns, "sql_update", clientInf); } catch (Exception ex) { resultDic["result"] = "false"; resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); NewLog("数据更新失败,更新的数据为:json:" + json + ",columns:" + columns + ",异常信息:" + Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace), "sql_update", clientInf); } return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic)); }
public string Delete(string whereString, string clientInf) { Dictionary <string, string> resultDic = new Dictionary <string, string>(); resultDic["result"] = ""; resultDic["message"] = ""; try { //删除附件的功能 string fileIDs = ""; string columnsString = ""; columnsString += "f_drwj,"; columnsString += "f_bcfj,"; columnsString += "f_lcfj,"; columnsString = columnsString.TrimEnd(','); List <sara.dd.ldsw.model.tbl_ld_xgsbds> l_tbl_ld_xgsbds = _idal_tbl_ld_xgsbds.GetList(whereString, "", columnsString, "", "", null); foreach (sara.dd.ldsw.model.tbl_ld_xgsbds model in l_tbl_ld_xgsbds) { fileIDs += model.f_drwj + ","; fileIDs += model.f_bcfj + ","; fileIDs += model.f_lcfj + ","; } fileIDs = fileIDs.TrimEnd(','); sara.dd.ldsw.commonclass.filecontrol.deleteByFileName(fileIDs, null); //删除子表的方法 _iAccessData = sara.dd.ldsw.commonclass.commonclass.CreateIAccessData(); string sqlString = ""; sqlString = "delete from tbl_ld_xgsbdszb where fk_tbl_ld_xgsbds_sys_id in (select sys_id from tbl_ld_xgsbds where " + whereString + ")"; _iAccessData.ExecuteSql(sqlString); //加入删除子表附件文件的方法 resultDic["result"] = "true"; resultDic["message"] = _idal_tbl_ld_xgsbds.Delete(whereString, null); NewLog("数据删除成功,删除的数据条件为:" + whereString, "sql_delete", clientInf); } catch (Exception ex) { resultDic["result"] = "false"; resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); NewLog("数据删除失败,删除的数据条件为:" + whereString + ",异常信息:" + Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace), "sql_delete", clientInf); } return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic)); }
public string UpdateStatus(string notificationIdsString, string userIdString, string clientInf) { Dictionary <string, string> resultDic = new Dictionary <string, string>(); resultDic["result"] = ""; resultDic["message"] = ""; try { IDictionary <String, String> userInfDic = commonclass.commonclass.CheckClientInf(clientInf); if (userInfDic == null) { resultDic["result"] = "false"; resultDic["message"] = "客户端信息错误"; } else { _iAccessData = commonclass.commonclass.CreateIAccessData(); string sqlString = ""; if (notificationIdsString != "-1") { sqlString = "update tbl_app_pushnotification set f_statusid = '2' , f_status = '已接受' where sys_id in ('" + notificationIdsString.Replace("^", "','") + "')"; } else { sqlString = "update tbl_app_pushnotification set f_statusid = '2' , f_status = '已接受' where f_recive_userid = '" + userIdString + "'"; } _iAccessData.ExecuteSql(sqlString); string count = _idal_tbl_app_pushnotification.GetCount(" f_recive_userid = '" + userIdString + "' and f_statusid = '1'", null); resultDic["result"] = "true"; resultDic["message"] = count; } } catch (Exception ex) { resultDic["result"] = "false"; resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); } return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic)); }
public string UpdateUserPassword(string userLoginNameString, string newPassword, string clientInf) { Dictionary <string, string> resultDic = new Dictionary <string, string>(); resultDic["result"] = ""; resultDic["message"] = ""; try { IDictionary <String, String> userInfDic = commonclass.commonclass.CheckClientInf(clientInf); if (userInfDic == null) { resultDic["result"] = "false"; resultDic["message"] = "客户端信息错误"; } else { string sql = "update t_user set u_pwd = '" + sara.platform.service.auth.Service.PassWordEncrypt(newPassword) + "' where u_code = '" + userLoginNameString + "'"; _iAccessData = commonclass.commonclass.CreateIAccessData(); if (_iAccessData.ExecuteSql(sql) > 0) { resultDic["result"] = "true"; resultDic["message"] = "密码修改成功"; } else { resultDic["result"] = "false"; resultDic["message"] = "密码修改失败"; } } } catch (Exception ex) { resultDic["result"] = "error"; resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); } return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic)); }
public string ycICPay(string paynostr, string wdstr, string sfystr, string gmrq, string khbhstr, int sl, decimal je) { //50|0x03|160123456789012345|100300012696|980|2|2012235689456874538125|0820102031|082030394|0820190103 try { _iAccessData = sara.dd.ldsw.commonclass.commonclass.CreateIAccessData(); string sql = "insert into TBL_LD_YCXZJL (f_lsh,f_wd,f_sfy,f_gmrq,f_khbh,f_gmsl,f_sfje,f_lx,sys_id) VALUES ('" + paynostr + "','" + wdstr + "','" + sfystr + "','" + gmrq + "','" + khbhstr + "','" + sl.ToString() + "','" + je.ToString() + "','IC',SEQ_TBL_LD_YCXZJL.nextval)"; int ins = _iAccessData.ExecuteSql(sql); if (ins > 0) { return("true"); } else { return("false"); } } catch (Exception ex) { return("false"); } }
//public string get_resultonlyonesysid(string sys_ids) //{ // string str_result = ""; // if (sys_ids.Length > 0 && sys_ids.Split('^').Length == 1) // { // } // else // { // str_result = "请选择一条数据。"; // } // return str_result; //} //public string get_resultmorethanonesysid(string sys_ids) //{ // string str_result = ""; // if (sys_ids.Length > 0) // { // } // else // { // str_result = "请选择要操作的条目。"; // } // return str_result; //} //public string set_send(string sys_ids, string str_facterid, DataSet ds_facter, string str_txt_bak_message, string clientInf) //{ // string result = ""; // string all_result = ""; // string[] sys_idss = sys_ids.Split(','); // for (int i = 0; i < sys_idss.Length; i++) // { // try // { // _t = commonclass.CreateIAccessDataTrans(); // _t.getTrans().begin(); // NameValueCollection nvc_maintableparameters = new NameValueCollection(); // nvc_maintableparameters.Add("sys_processnextuser", "^nextuser"); // nvc_maintableparameters.Add("fk_tbl_maintable_sys_id", "^null"); // nvc_maintableparameters.Add("sys_processinsid", "^null"); // result = _hic.NextStateItemNew(sys_idss[i].ToString(), nvc_maintableparameters, str_facterid, ds_facter, str_txt_bak_message, "", "", clientInf, _t); // if (result == "") // { // _t.getTrans().commit(); // } // else // { // _t.getTrans().rollback(); // all_result += result; // } // } // catch (Exception ex) // { // _t.getTrans().rollback(); // result = ex.ToString(); // all_result += result; // } // } // return all_result; //} //public string set_sendbak(string sys_ids, string str_facterid, DataSet ds_facter, string str_txt_bak_message, string clientInf) //{ // string result = ""; // string all_result = ""; // string[] sys_idss = sys_ids.Split(','); // for (int i = 0; i < sys_idss.Length; i++) // { // try // { // _t = commonclass.CreateIAccessDataTrans(); // _t.getTrans().begin(); // NameValueCollection nvc_maintableparameters = new NameValueCollection(); // nvc_maintableparameters.Add("sys_processnextuser", "^nextuser"); // nvc_maintableparameters.Add("fk_tbl_maintable_sys_id", "^null"); // nvc_maintableparameters.Add("sys_processinsid", "^null"); // result = _hic.NextStateItemNew(sys_idss[i].ToString(), nvc_maintableparameters, str_facterid, ds_facter, str_txt_bak_message, "", "", clientInf, _t); // if (result == "") // { // _t.getTrans().commit(); // } // else // { // _t.getTrans().rollback(); // all_result += result; // } // } // catch (Exception ex) // { // _t.getTrans().rollback(); // result = ex.ToString(); // all_result += result; // } // } // return all_result; //} //public string set_del(string sys_ids, string str_name) //{ // string[] sys_idss = System.Text.RegularExpressions.Regex.Split(sys_ids, ","); // string str_result_all = ""; // for (int i = 0; i < sys_idss.Length; i++) // { // string result = ""; // try // { // _model_tbl_maintable = _idal_itbl_maintable.GetList("sys_id='" + sys_idss[i] + "'", "", "*", "", "", null)[0]; // _t = commonclass.CreateIAccessDataTrans(); // _t.getTrans().begin(); // //2018-09-07-sk-??!!-businesscode // switch (_model_tbl_maintable.sys_projectclassid) // { // case "1": // break; // default: // break; // } // if (result == "") // { // result = _hic.DelItem(sys_idss[i].ToString(), str_name, _t); // } // if (result == "") // { // _t.getTrans().commit(); // } // else // { // _t.getTrans().rollback(); // str_result_all += result; // } // } // catch (Exception ex) // { // _t.getTrans().rollback(); // result = ex.ToString(); // str_result_all += result; // } // } // return str_result_all; //} //public string get_startworkflow(string sys_ids, string str_facterid, DataSet ds_facter, ref string str_resultmessage, string clientInf, string userInfoJsonString) //{ // string result = ""; // try // { // Eva.Library.ServiceAdapter.IAdapter.IWorkFlow w = Eva.Library.ServiceAdapter.AdapterFactory.WorkFlowFactory.CreateService(Eva.Library.Configuration.ConfigurationManager.AppSettings["AppCode"]); // string lcdyid = _cc.GetWorkFlowLCDYID(str_facterid, ds_facter, clientInf, userInfoJsonString); // DataSet ds; // if (sara.dd.ldsw.commonclass.commonclass.GetPlatformServiceModel() == "dll") // { // ds = sara.platform.service.workflow.Service.GetUserOperationStartByDylcid(lcdyid); // } // else // { // ds = w.GetUserOperationStartByDylcid(lcdyid); // } // #region businesscode // #endregion // str_resultmessage = Eva.Library.Format.FormatEntityTool.FormatDataTableToJson(ds.Tables[0]); // } // catch (Exception ex) // { // result = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); // } // return result; //} ////[sys_id]$[fk_workflow_sys_id]$[selectusernames]$[ds_facter]$[str_shyj]$[processinsid]$[businessparm]$[processdefid]$[facterid]$[trans] //public string get_sendworkflow(string workitemid, ref string str_resultmessage, string clientInf) //{ // string result = ""; // try // { // IDictionary<string, string> clientInfoDic = Eva.Library.Format.FormatEntityTool.FormatJsonToDic(clientInf); // string userid = clientInfoDic["userid"]; // string username = clientInfoDic["username"]; // Eva.Library.ServiceAdapter.IAdapter.IWorkFlow w = Eva.Library.ServiceAdapter.AdapterFactory.WorkFlowFactory.CreateService(Eva.Library.Configuration.ConfigurationManager.AppSettings["AppCode"]); // DataSet useroperation = null; // string shyj = ""; // if (sara.dd.ldsw.commonclass.commonclass.GetPlatformServiceModel() == "dll") // { // shyj = sara.platform.service.workflow.Service.GetUserOperationSHYJ(workitemid); // } // else // { // shyj = w.GetUserOperationSHYJ(workitemid); // } // if (shyj == "-1") // { // if (sara.dd.ldsw.commonclass.commonclass.GetPlatformServiceModel() == "dll") // { // useroperation = sara.platform.service.workflow.Service.GetUserOperation(workitemid, userid, username, DateTime.Now); // } // else // { // useroperation = w.GetUserOperation(workitemid, userid, username, DateTime.Now); // } // } // else // { // DataSet ds_old; // if (sara.dd.ldsw.commonclass.commonclass.GetPlatformServiceModel() == "dll") // { // ds_old = sara.platform.service.workflow.Service.GetUserOperationCZNR(workitemid); // } // else // { // ds_old = w.GetUserOperationCZNR(workitemid); // } // if (ds_old == null || ds_old.Tables.Count == 0) // { // if (sara.dd.ldsw.commonclass.commonclass.GetPlatformServiceModel() == "dll") // { // useroperation = sara.platform.service.workflow.Service.GetUserOperation(workitemid, userid, username, DateTime.Now); // } // else // { // useroperation = w.GetUserOperation(workitemid, userid, username, DateTime.Now); // } // } // else // { // useroperation = ds_old; // } // } // #region businesscode // //在此处添加业务代码,可以控制默认选中哪个tab页,那条连接线,哪个用户 // //具体规则如下: // //1、在datarow["Iselected"]中,设置0表示连接线被选中,设置-1表示连接线没有被选中 // //2、在datarow["userids"]\datarow["usernames"]中存放着备选用户的id和name,以小写逗号分割,例如: // //datarow["userids"] = "1,2";datarow["usernames"] = "张三,李四" // //此时程序会自动选中这2个用户,在id和names前边加“-”,则不会被选中,例如: // //datarow["userids"] = "-1,2";datarow["usernames"] = "-张三,李四" // //则李四默认会被选中,张三默认不会被选中 // //3、可以调整1,2的顺序,实现对审核顺序的调整,(如果当前节点的jdnyh!=1,并且节点类型是串行的话) // //4、在1个useroperation中会存在多个连接线(多个datarow),当某个datarow的iselected=+0时,该连接线所在的页会默认被打开 // //如果不设置+号的话,则默认打开第一个0的连接线所在的页。 // //一个useroperation中只能有一个+0,否则按照最先一个+0计算。 // //传过来的数据里边,默认用户都是被选中的,连接线也是被选中的。 // for (int i = 0; i < useroperation.Tables[0].Rows.Count; i++) // { // //新增水表_居民//业务代码,转给经办人时,默认转给发起的经办人 // if (useroperation.Tables[0].Rows[i]["fk_dy_jd_sys_id_to"].ToString() == "540003020") // { // string lcslid = useroperation.Tables[0].Rows[i]["fk_sl_lc_sys_id"].ToString(); // string sql = "select czrid,czrname from t_workitem where fk_sl_lc_sys_id = '" + lcslid + "' and fk_dy_jd_sys_id = '540003000'"; // DataSet dsczr = _iAccessData.Query(sql); // if (dsczr.Tables[0].Rows.Count > 0) // { // string czrid = dsczr.Tables[0].Rows[0]["czrid"].ToString(); // string czrname = dsczr.Tables[0].Rows[0]["czrname"].ToString(); // string[] oldUserIdArray = useroperation.Tables[0].Rows[i]["userids"].ToString().Split(','); // string[] oldUserNameArray = useroperation.Tables[0].Rows[i]["usernames"].ToString().Split(','); // string newUserIds = ""; // string newUserNames = ""; // for (int ii = 0; ii < oldUserIdArray.Length; ii++) // { // if (oldUserIdArray[ii] == czrid) // { // newUserIds += oldUserIdArray[ii] + ","; // newUserNames += oldUserNameArray[ii] + ","; // } // else // { // newUserIds += "-" + oldUserIdArray[ii] + ","; // newUserNames += "-" + oldUserNameArray[ii] + ","; // } // } // useroperation.Tables[0].Rows[i]["userids"] = newUserIds.TrimEnd(','); // useroperation.Tables[0].Rows[i]["usernames"] = newUserNames.TrimEnd(','); // } // } // } // #endregion // str_resultmessage = Eva.Library.Format.FormatEntityTool.FormatDataTableToJson(useroperation.Tables[0]); // } // catch (Exception ex) // { // result = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); // } // return result; //} ///// <summary> ///// 转件落地 ///// </summary> ///// <param name="sys_ids"></param> ///// <param name="str_facterid"></param> ///// <param name="ds_facter"></param> ///// <param name="p"></param> ///// <param name="str_txt_bak_message"></param> ///// <returns></returns> //public string set_send_ld(string sys_ids, string str_facterid, DataSet ds_facter, string str_txt_bak_message, string clientInf) //{ // /* // all_result返回参数的整理: // * 1、"{\"result\":\"true\",\"message\":\"\"}"----》第二次点击落地按钮,(理论上不应该出现这个情况,有可能是第一次操作时整个操作流程没有完成,所以造成用户可以点击这个按钮,所以此处的操作仅实现状态修改,返回值为true) // * 2、"{\"result\":\"submit\",\"message\":\"" + messageString + "\"}";----》此时message是一个字符串,shpid|path // * 3、"{\"result\":\"false\",\"message\":\"" + messageString + "\"}";----》此时message是一个字符串,异常信息。 // * 4、"{\"result\":\"submitqueue\",\"message\":\"\"}"----》成功加入队列 // */ // string all_result = ""; // string[] sys_idss = sys_ids.Split(','); // for (int i = 0; i < sys_idss.Length; i++) // { // try // { // _model_tbl_maintable = _idal_itbl_maintable.GetList(" sys_id='" + sys_idss[i].ToString() + "'", "", "*", "", "", null)[0]; // if (all_result == "") // { // string result = ""; // _t = commonclass.CreateIAccessDataTrans(); // _t.getTrans().begin(); // //调整数据状态 // NameValueCollection nvc_maintableparameters = new NameValueCollection(); // nvc_maintableparameters.Add("sys_processnextuser", "^nextuser"); // nvc_maintableparameters.Add("fk_tbl_maintable_sys_id", "^null"); // nvc_maintableparameters.Add("fk_workflow_sys_id", "^null"); // result = _hic.NextStateItemNew(sys_idss[i].ToString(), nvc_maintableparameters, str_facterid, ds_facter, str_txt_bak_message, "", "", clientInf, _t); // if (result == "") // { // _t.getTrans().commit(); // } // else // { // _t.getTrans().rollback(); // all_result = "{\"result\":\"false\",\"message\":\"" + result + "\"}"; // } // } // } // catch (Exception ex) // { // all_result = "{\"result\":\"false\",\"message\":\"" + ex.Message + "\"}"; // } // } // if (all_result == "") // { // all_result = "{\"result\":\"true\",\"message\":\"\"}"; // } // return all_result; //} ///// <summary> ///// //projclass = 3时进行的归档操作,执行落数程序 ///// </summary> ///// <param name="sys_ids"></param> ///// <param name="str_facterid"></param> ///// <param name="ds_facter"></param> ///// <param name="str_txt_bak_message"></param> ///// <param name="clientInf"></param> ///// <returns></returns> //public string set_complete_3(string sys_ids, string str_facterid, DataSet ds_facter, string str_txt_bak_message, string clientInf) //{ // /* // all_result返回参数的整理: // * 1、"{\"result\":\"true\",\"message\":\"\"}"----》第二次点击落地按钮,(理论上不应该出现这个情况,有可能是第一次操作时整个操作流程没有完成,所以造成用户可以点击这个按钮,所以此处的操作仅实现状态修改,返回值为true) // * 2、"{\"result\":\"submit\",\"message\":\"" + messageString + "\"}";----》此时message是一个字符串,shpid|path // * 3、"{\"result\":\"false\",\"message\":\"" + messageString + "\"}";----》此时message是一个字符串,异常信息。 // * 4、"{\"result\":\"submitqueue\",\"message\":\"\"}"----》成功加入队列 // */ // string all_result = ""; // string[] sys_idss = sys_ids.Split(','); // for (int i = 0; i < sys_idss.Length; i++) // { // try // { // _model_tbl_maintable = _idal_itbl_maintable.GetList(" sys_id='" + sys_idss[i].ToString() + "'", "", "*", "", "", null)[0]; // if (all_result == "") // { // string result = ""; // _t = commonclass.CreateIAccessDataTrans(); // _t.getTrans().begin(); // //2018-09-07-sk-??!!-businesscode // //调整数据状态 // NameValueCollection nvc_maintableparameters = new NameValueCollection(); // nvc_maintableparameters.Add("sys_processnextuser", "^nextuser"); // nvc_maintableparameters.Add("fk_tbl_maintable_sys_id", "^null"); // nvc_maintableparameters.Add("fk_workflow_sys_id", "^null"); // result = _hic.NextStateItemNew(sys_idss[i].ToString(), nvc_maintableparameters, str_facterid, ds_facter, str_txt_bak_message, "", "", clientInf, _t); // if (result == "") // { // _t.getTrans().commit(); // } // else // { // _t.getTrans().rollback(); // all_result = "{\"result\":\"false\",\"message\":\"" + result + "\"}"; // } // } // } // catch (Exception ex) // { // all_result = "{\"result\":\"false\",\"message\":\"" + ex.Message + "\"}"; // } // } // if (all_result == "") // { // // all_result = "{\"result\":\"true\",\"message\":\"\"}"; // } // return all_result; //} ///// <summary> ///// 删除时验证 ///// </summary> ///// <param name="sys_ids"></param> ///// <returns></returns> //public string get_resultdel(string sys_ids) //{ // string str_result = ""; // str_result = get_resultonlyonesysid(sys_ids); // //2018-09-07-sk-??!!-businesscode // if (str_result != "") // { // return str_result; // } // return str_result; //} ///// <summary> ///// 验证上图后才能转件 ///// </summary> ///// <param name="sys_ids"></param> ///// <returns></returns> //public string get_result_1_1(string sys_ids) //{ // string str_result = ""; // str_result = get_resultmorethanonesysid(sys_ids); // if (str_result != "") // { // return str_result; // } // return str_result; //} #endregion public string set_startworkflow(string sys_id, string sys_processinsid, string selectusernames, DataSet _ds_facter, string str_shyj, string processdefid, string facterid, string clientInf, Eva.Library.Data.AccessDataTrans.IAccessDataTrans t) { string result = ""; NameValueCollection nvc_maintableparameters = new NameValueCollection(); nvc_maintableparameters.Add("sys_processnextuser", selectusernames); nvc_maintableparameters.Add("sys_processinsid", sys_processinsid); nvc_maintableparameters.Add("processdefid", processdefid); nvc_maintableparameters.Add("fk_tbl_maintable_sys_id", "^null"); result = _hic.NextStateItemNew(sys_id, nvc_maintableparameters, facterid, _ds_facter, str_shyj, sys_processinsid, "", clientInf, t); #region //改流程状态为审核中 string sql = ""; switch (processdefid) { case "540003": //新增水表居民 sql = " update tbl_ld_xzsb set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; case "540004": //大用户立户 sql = " update tbl_ld_dyhlh set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; case "540006": //大用户销户 sql = " update tbl_ld_xhhbt set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; case "540007": //大用户报停 sql = " update tbl_ld_xhhbt set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; case "540008": //新增水表大客户 sql = " update tbl_ld_xzsb set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; case "540009": //更换水表居民 sql = " update tbl_ld_ghsb set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; case "540010": //更换水表大客户 sql = " update tbl_ld_ghsb set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; case "540011": //修改水表底数居民 sql = " update tbl_ld_xgsbds set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; case "540012": //修改水表底数大客户 sql = " update tbl_ld_xgsbds set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; case "540013": //申请疫情减免 sql = " update tbl_ld_yqjm set f_zt = '审核中' , f_ztid ='1' where fk_tbl_maintable_sys_id ='" + sys_id + "'"; _iAccessData.ExecuteSql(sql); break; //asdfasd } #endregion return(result); //if (result == "") //{ // #region businesscode // //根据WorkFlowUserControl1.WF_ProcessDefid可以识别业务程序进行业务代码编写 // #endregion //} }
/// <summary> /// 重写添加addlayerconfig /// </summary> /// <param name="json"></param> /// <param name="clientInf"></param> /// <returns></returns> public string Add(sara.dd.ldsw.model.tbl_ld_cben model, Eva.Library.Data.AccessDataTrans.IAccessDataTrans t) { StringBuilder strSql = new StringBuilder(); StringBuilder strSql_use = new StringBuilder(); StringBuilder strSql1 = new StringBuilder(); StringBuilder strSql2 = new StringBuilder(); StringBuilder strSql3 = new StringBuilder(); if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter") { } else //如果是sql形式的话,则进行textFormat { model = Eva.Library.Format.FormatTextTool.ModelFormat(model); } List <OracleParameter> parameterList = new List <OracleParameter>(); OracleParameter parameter = null; string sid = ""; if (model.sys_id <= 0) { if (t == null) { sid = GetMaxId(null).ToString(); } else { sid = GetMaxId(t).ToString(); } model.sys_id = int.Parse(sid); } else { sid = model.sys_id.ToString(); } #region sqlString strSql1.Append("sys_id,"); strSql2.Append("'" + sid + "',"); strSql3.Append(":sys_id,"); parameter = new OracleParameter(":sys_id", OracleType.Number); parameter.Value = sid; parameterList.Add(parameter); if (model.sys_orderid != null) { strSql1.Append("sys_orderid,"); strSql2.Append("'" + (model.sys_orderid) + "',"); strSql3.Append(":sys_orderid,"); parameter = new OracleParameter(":sys_orderid", OracleType.VarChar); parameter.Value = model.sys_orderid; parameterList.Add(parameter); } if (model.sys_creatuserid != null) { strSql1.Append("sys_creatuserid,"); strSql2.Append("'" + (model.sys_creatuserid) + "',"); strSql3.Append(":sys_creatuserid,"); parameter = new OracleParameter(":sys_creatuserid", OracleType.VarChar); parameter.Value = model.sys_creatuserid; parameterList.Add(parameter); } if (model.sys_creatusername != null) { strSql1.Append("sys_creatusername,"); strSql2.Append("'" + (model.sys_creatusername) + "',"); strSql3.Append(":sys_creatusername,"); parameter = new OracleParameter(":sys_creatusername", OracleType.VarChar); parameter.Value = model.sys_creatusername; parameterList.Add(parameter); } if (model.sys_creatdate != null) { strSql1.Append("sys_creatdate,"); strSql2.Append("to_date('" + model.sys_creatdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_creatdate,"); parameter = new OracleParameter(":sys_creatdate", OracleType.DateTime); parameter.Value = model.sys_creatdate; parameterList.Add(parameter); } if (model.sys_lastedituserid != null) { strSql1.Append("sys_lastedituserid,"); strSql2.Append("'" + (model.sys_lastedituserid) + "',"); strSql3.Append(":sys_lastedituserid,"); parameter = new OracleParameter(":sys_lastedituserid", OracleType.VarChar); parameter.Value = model.sys_lastedituserid; parameterList.Add(parameter); } if (model.sys_lasteditusername != null) { strSql1.Append("sys_lasteditusername,"); strSql2.Append("'" + (model.sys_lasteditusername) + "',"); strSql3.Append(":sys_lasteditusername,"); parameter = new OracleParameter(":sys_lasteditusername", OracleType.VarChar); parameter.Value = model.sys_lasteditusername; parameterList.Add(parameter); } if (model.sys_lasteditdate != null) { strSql1.Append("sys_lasteditdate,"); strSql2.Append("to_date('" + model.sys_lasteditdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_lasteditdate,"); parameter = new OracleParameter(":sys_lasteditdate", OracleType.DateTime); parameter.Value = model.sys_lasteditdate; parameterList.Add(parameter); } if (model.sys_deluserid != null) { strSql1.Append("sys_deluserid,"); strSql2.Append("'" + (model.sys_deluserid) + "',"); strSql3.Append(":sys_deluserid,"); parameter = new OracleParameter(":sys_deluserid", OracleType.VarChar); parameter.Value = model.sys_deluserid; parameterList.Add(parameter); } if (model.sys_delusername != null) { strSql1.Append("sys_delusername,"); strSql2.Append("'" + (model.sys_delusername) + "',"); strSql3.Append(":sys_delusername,"); parameter = new OracleParameter(":sys_delusername", OracleType.VarChar); parameter.Value = model.sys_delusername; parameterList.Add(parameter); } if (model.sys_deldate != null) { strSql1.Append("sys_deldate,"); strSql2.Append("to_date('" + model.sys_deldate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_deldate,"); parameter = new OracleParameter(":sys_deldate", OracleType.DateTime); parameter.Value = model.sys_deldate; parameterList.Add(parameter); } if (model.sys_delflag != null) { strSql1.Append("sys_delflag,"); strSql2.Append("'" + (model.sys_delflag) + "',"); strSql3.Append(":sys_delflag,"); parameter = new OracleParameter(":sys_delflag", OracleType.VarChar); parameter.Value = model.sys_delflag; parameterList.Add(parameter); } if (model.f_value1 != null) { strSql1.Append("f_value1,"); strSql2.Append("'" + (model.f_value1) + "',"); strSql3.Append(":f_value1,"); parameter = new OracleParameter(":f_value1", OracleType.VarChar); parameter.Value = model.f_value1; parameterList.Add(parameter); } if (model.f_value2 != null) { strSql1.Append("f_value2,"); strSql2.Append("'" + (model.f_value2) + "',"); strSql3.Append(":f_value2,"); parameter = new OracleParameter(":f_value2", OracleType.VarChar); parameter.Value = model.f_value2; parameterList.Add(parameter); } if (model.f_value3 != null) { strSql1.Append("f_value3,"); strSql2.Append("'" + (model.f_value3) + "',"); strSql3.Append(":f_value3,"); parameter = new OracleParameter(":f_value3", OracleType.VarChar); parameter.Value = model.f_value3; parameterList.Add(parameter); } if (model.f_value4 != null) { strSql1.Append("f_value4,"); strSql2.Append("'" + (model.f_value4) + "',"); strSql3.Append(":f_value4,"); parameter = new OracleParameter(":f_value4", OracleType.VarChar); parameter.Value = model.f_value4; parameterList.Add(parameter); } if (model.f_value5 != null) { strSql1.Append("f_value5,"); strSql2.Append("'" + (model.f_value5) + "',"); strSql3.Append(":f_value5,"); parameter = new OracleParameter(":f_value5", OracleType.VarChar); parameter.Value = model.f_value5; parameterList.Add(parameter); } if (model.f_value6 != null) { strSql1.Append("f_value6,"); strSql2.Append("'" + (model.f_value6) + "',"); strSql3.Append(":f_value6,"); parameter = new OracleParameter(":f_value6", OracleType.VarChar); parameter.Value = model.f_value6; parameterList.Add(parameter); } if (model.f_value7 != null) { strSql1.Append("f_value7,"); strSql2.Append("'" + (model.f_value7) + "',"); strSql3.Append(":f_value7,"); parameter = new OracleParameter(":f_value7", OracleType.VarChar); parameter.Value = model.f_value7; parameterList.Add(parameter); } if (model.f_value8 != null) { strSql1.Append("f_value8,"); strSql2.Append("'" + (model.f_value8) + "',"); strSql3.Append(":f_value8,"); parameter = new OracleParameter(":f_value8", OracleType.VarChar); parameter.Value = model.f_value8; parameterList.Add(parameter); } if (model.f_value9 != null) { strSql1.Append("f_value9,"); strSql2.Append("'" + (model.f_value9) + "',"); strSql3.Append(":f_value9,"); parameter = new OracleParameter(":f_value9", OracleType.VarChar); parameter.Value = model.f_value9; parameterList.Add(parameter); } if (model.f_value10 != null) { strSql1.Append("f_value10,"); strSql2.Append("'" + (model.f_value10) + "',"); strSql3.Append(":f_value10,"); parameter = new OracleParameter(":f_value10", OracleType.VarChar); parameter.Value = model.f_value10; parameterList.Add(parameter); } if (model.f_cbbh != null) { strSql1.Append("f_cbbh,"); strSql2.Append("'" + (model.f_cbbh) + "',"); strSql3.Append(":f_cbbh,"); parameter = new OracleParameter(":f_cbbh", OracleType.VarChar); parameter.Value = model.f_cbbh; parameterList.Add(parameter); } if (model.f_cbmc != null) { strSql1.Append("f_cbmc,"); strSql2.Append("'" + (model.f_cbmc) + "',"); strSql3.Append(":f_cbmc,"); parameter = new OracleParameter(":f_cbmc", OracleType.VarChar); parameter.Value = model.f_cbmc; parameterList.Add(parameter); } if (model.f_cbzq != null) { strSql1.Append("f_cbzq,"); strSql2.Append("'" + (model.f_cbzq) + "',"); strSql3.Append(":f_cbzq,"); parameter = new OracleParameter(":f_cbzq", OracleType.VarChar); parameter.Value = model.f_cbzq; parameterList.Add(parameter); } if (model.f_ksyf != null) { strSql1.Append("f_ksyf,"); strSql2.Append("'" + (model.f_ksyf) + "',"); strSql3.Append(":f_ksyf,"); parameter = new OracleParameter(":f_ksyf", OracleType.VarChar); parameter.Value = model.f_ksyf; parameterList.Add(parameter); } if (model.f_cbymc != null) { strSql1.Append("f_cbymc,"); strSql2.Append("'" + (model.f_cbymc) + "',"); strSql3.Append(":f_cbymc,"); parameter = new OracleParameter(":f_cbymc", OracleType.VarChar); parameter.Value = model.f_cbymc; parameterList.Add(parameter); } if (model.f_cbyid != null) { strSql1.Append("f_cbyid,"); strSql2.Append("'" + (model.f_cbyid) + "',"); strSql3.Append(":f_cbyid,"); parameter = new OracleParameter(":f_cbyid", OracleType.VarChar); parameter.Value = model.f_cbyid; parameterList.Add(parameter); } if (model.f_cbyphoto != null) { strSql1.Append("f_cbyphoto,"); strSql2.Append("'" + (model.f_cbyphoto) + "',"); strSql3.Append(":f_cbyphoto,"); parameter = new OracleParameter(":f_cbyphoto", OracleType.VarChar); parameter.Value = model.f_cbyphoto; parameterList.Add(parameter); } if (model.f_zt != null) { strSql1.Append("f_zt,"); strSql2.Append("'" + (model.f_zt) + "',"); strSql3.Append(":f_zt,"); parameter = new OracleParameter(":f_zt", OracleType.VarChar); parameter.Value = model.f_zt; parameterList.Add(parameter); } if (model.f_ztid != null) { strSql1.Append("f_ztid,"); strSql2.Append("'" + (model.f_ztid) + "',"); strSql3.Append(":f_ztid,"); parameter = new OracleParameter(":f_ztid", OracleType.VarChar); parameter.Value = model.f_ztid; parameterList.Add(parameter); } if (model.f_bz != null) { strSql1.Append("f_bz,"); strSql2.Append("'" + (model.f_bz) + "',"); strSql3.Append(":f_bz,"); parameter = new OracleParameter(":f_bz", OracleType.VarChar); parameter.Value = model.f_bz; parameterList.Add(parameter); } strSql.Append("insert into tbl_ld_cben("); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(")"); strSql.Append(" values ("); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(")"); strSql_use.Append("insert into tbl_ld_cben("); strSql_use.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql_use.Append(")"); strSql_use.Append(" values ("); strSql_use.Append(strSql3.ToString().Remove(strSql3.Length - 1)); strSql_use.Append(")"); #endregion if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter") { #region parameter if (parameterList.Count > 0) { if (t == null) { _iAccessData.ExecuteSql(strSql_use.ToString(), parameterList.ToArray()); } else { t.ExecuteSql(strSql_use.ToString(), parameterList.ToArray()); } } #endregion } else { #region sql if (t == null) { _iAccessData.ExecuteSql(strSql.ToString()); } else { t.ExecuteSql(strSql.ToString()); } List <string> paraStrList = new List <string>(); List <OracleParameter> pList = new List <OracleParameter>(); OracleParameter p = null; if (paraStrList.Count > 0) { string updateSqlString = " update tbl_ld_cben set " + string.Join(" , ", paraStrList.ToArray()) + " where sys_id = '" + sid + "' "; if (pList.Count > 0) { if (t == null) { _iAccessData.ExecuteSql(updateSqlString, pList.ToArray()); } else { t.ExecuteSql(updateSqlString, pList.ToArray()); } } } #endregion } return(sid); }
public void ProcessRequest(HttpContext context) { try { Stream s = System.Web.HttpContext.Current.Request.InputStream; byte[] b = new byte[s.Length]; s.Read(b, 0, (int)s.Length); //string xmlstr = UTF8Encoding.UTF8.GetString(b); string xmlstr = System.Text.Encoding.GetEncoding("gbk").GetString(b); if (xmlstr != null && xmlstr != "") { xmlstr = xmlstr.TrimEnd('0'); XmlDocument document = new XmlDocument(); document.LoadXml(xmlstr); //交易码 string FTranCode = ""; //公缴单位分配机构号 string InstID = ""; //交易日期时间 string TranDateTime = ""; //银行端系统流水号 string BankNum = ""; //缴费交易日期 string payDate = ""; //缴费交易流水 string bankBillNo = ""; //客户编号 string billKey = ""; //客户姓名 string customerName = ""; //缴费金额 string payAmount = ""; ////起始笔数 //string beginNum = ""; ////查询笔数 //string queryNum = ""; FTranCode = document.GetElementsByTagName("FTranCode")[0].InnerText; InstID = document.GetElementsByTagName("InstID")[0].InnerText; TranDateTime = document.GetElementsByTagName("TranDateTime")[0].InnerText; BankNum = document.GetElementsByTagName("BankNum")[0].InnerText; payDate = document.GetElementsByTagName("payDate")[0].InnerText; bankBillNo = document.GetElementsByTagName("bankBillNo")[0].InnerText; billKey = document.GetElementsByTagName("billKey")[0].InnerText; customerName = document.GetElementsByTagName("customerName")[0].InnerText; payAmount = document.GetElementsByTagName("payAmount")[0].InnerText; //beginNum = document.GetElementsByTagName("beginNum")[0].InnerText; //queryNum = document.GetElementsByTagName("queryNum")[0].InnerText; _iAccessData = commonclass.commonclass.CreateIAccessData(); if (billKey.Length == 10) { //查询该用户未缴费的抄表记录 string add_sqlStr = "sum(f_dyjtsl) as f_dyjtsl ,sum(f_dyjtsf) as f_dyjtsf ,sum(f_dejtsl) as f_dejtsl ,sum(f_dejtsf) as f_dejtsf ,sum(f_dsjtsl) as f_dsjtsl ,sum(f_dsjtsf) as f_dsjtsf "; DataTable dt = _iAccessData.Query("select wm_concat(sys_id) as sys_id,wm_concat(f_cb_cbbh) as f_cbbh,sum(f_bqje) as f_bqje,sum(f_bqsl) as f_bqsl,sum(f_sf) as f_sf,sum(f_pwf) as f_pwf,f_yhm,REPLACE(wm_concat(f_sfjl),',','|') as f_sfjl , " + add_sqlStr + " from TBL_LD_CBIAO where f_khbh='" + billKey + "' and f_ztid='2' and f_cbbh not like 'PZ%' and f_cbbh not like 'YC%' group by f_yhm").Tables[0]; DataTable ye_dt = _iAccessData.Query("select NVL(f_ye,0) as f_ye from TBL_LD_KHB where f_khbh='" + billKey + "'").Tables[0]; double ye = Eva.Library.Text.NumberTool.Parse(ye_dt.Rows[0]["f_ye"].ToString()); double bqje = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_bqje"].ToString()); double bqsl = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_bqsl"].ToString()); double sf = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_sf"].ToString()); double pwf = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_pwf"].ToString()); double f_dyjtsl = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_dyjtsl"].ToString()); double f_dyjtsf = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_dyjtsf"].ToString()); double f_dejtsl = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_dejtsl"].ToString()); double f_dejtsf = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_dejtsf"].ToString()); double f_dsjtsl = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_dsjtsl"].ToString()); double f_dsjtsf = Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_dsjtsf"].ToString()); //核实缴费信息正确性 if (customerName.Trim() == dt.Rows[0]["f_yhm"].ToString() && (Eva.Library.Text.NumberTool.Parse(dt.Rows[0]["f_bqje"].ToString()) - ye) == Eva.Library.Text.NumberTool.Parse(payAmount)) { //客户信息 sara.dd.ldsw.idal.Itbl_ld_khb idal_tbl_ld_khb = new sara.dd.ldsw.dal.tbl_ld_khb(); sara.dd.ldsw.idal.Itbl_ld_jfb idal_tbl_ld_jfb = new sara.dd.ldsw.dal.tbl_ld_jfb(); sara.dd.ldsw.model.tbl_ld_khb model_tbl_ld_khb = idal_tbl_ld_khb.GetList("f_khbh='" + billKey + "'", "", "*", "", "", null)[0]; #region 创建缴费记录 sara.dd.ldsw.model.tbl_ld_jfb jfmodel = new model.tbl_ld_jfb(); DateTime currentTime = System.DateTime.Now; jfmodel.sys_creatuserid = "1565"; jfmodel.sys_creatusername = "******"; jfmodel.sys_creatdate = currentTime; jfmodel.sys_lastedituserid = "1565"; jfmodel.sys_lasteditusername = "******"; jfmodel.sys_lasteditdate = currentTime; jfmodel.sys_deldate = DateTime.Parse("1900-01-01"); jfmodel.sys_delflag = "0"; jfmodel.f_jfbh = commonclass.commonclass.getBusinessNum("JF", "", null); jfmodel.f_jfrq = currentTime; jfmodel.f_jffs = "光大银行网上缴费"; jfmodel.f_jffsid = "05740010"; jfmodel.f_jcfs = "全额找零"; jfmodel.f_jcfsid = "05750001"; jfmodel.f_yyy = "光大"; jfmodel.f_yyyid = "1565"; jfmodel.f_czsj = currentTime; jfmodel.f_sfykfp = "false"; jfmodel.f_zt = "已提交"; jfmodel.f_ztid = "2"; jfmodel.f_khbh = model_tbl_ld_khb.f_khbh; jfmodel.f_khbhid = model_tbl_ld_khb.sys_id.ToString(); jfmodel.f_yhbh = model_tbl_ld_khb.f_yhbh; jfmodel.f_yhbhid = model_tbl_ld_khb.f_yhbhid; jfmodel.f_yhm = model_tbl_ld_khb.f_yhm; jfmodel.f_jfm = model_tbl_ld_khb.f_jfm; jfmodel.f_dh = model_tbl_ld_khb.f_dh; jfmodel.f_dz = model_tbl_ld_khb.f_dz; jfmodel.f_dy = model_tbl_ld_khb.f_dy; jfmodel.f_dyid = model_tbl_ld_khb.f_dyid; jfmodel.f_sc = model_tbl_ld_khb.f_sc; jfmodel.f_scid = model_tbl_ld_khb.f_scid; jfmodel.f_qy = model_tbl_ld_khb.f_qy; jfmodel.f_qyid = model_tbl_ld_khb.f_qyid; jfmodel.f_pq = model_tbl_ld_khb.f_pq; jfmodel.f_pqid = model_tbl_ld_khb.f_pqid; jfmodel.f_sbbh = model_tbl_ld_khb.f_sbbh; jfmodel.f_sbbhid = model_tbl_ld_khb.f_sbbhid; jfmodel.f_sblx = model_tbl_ld_khb.f_sblx; jfmodel.f_sblxid = model_tbl_ld_khb.f_sblxid; jfmodel.f_yslx = model_tbl_ld_khb.f_yslx; jfmodel.f_yslxid = model_tbl_ld_khb.f_yslxid; jfmodel.f_lxtkhh = model_tbl_ld_khb.f_lxth; jfmodel.f_rs = model_tbl_ld_khb.f_rs; jfmodel.f_cbbh = dt.Rows[0]["f_cbbh"].ToString(); jfmodel.f_cbbhid = dt.Rows[0]["sys_id"].ToString(); jfmodel.f_cbyslj = Eva.Library.Text.NumberTool.GetNumberByLength(bqje, 2); jfmodel.f_sllj = Eva.Library.Text.NumberTool.GetNumberByLength(bqsl, 0); jfmodel.f_sflj = Eva.Library.Text.NumberTool.GetNumberByLength(sf, 2); jfmodel.f_pwflj = Eva.Library.Text.NumberTool.GetNumberByLength(pwf, 2); jfmodel.f_dj = Eva.Library.Text.NumberTool.GetNumberByLength(Eva.Library.Text.NumberTool.Parse(jfmodel.f_cbyslj) / Eva.Library.Text.NumberTool.Parse(jfmodel.f_sllj), 2); jfmodel.f_jmhyslj = Eva.Library.Text.NumberTool.GetNumberByLength(bqje, 2); jfmodel.f_khytjjzsf = model_tbl_ld_khb.f_tjjzsf; jfmodel.f_khytjjzpwf = model_tbl_ld_khb.f_tjjzpwf; jfmodel.f_sfsytjjz = "false"; jfmodel.f_sytjjzsf = "0"; jfmodel.f_sytjjzpwf = "0"; jfmodel.f_syhtjjzsf = model_tbl_ld_khb.f_tjjzsf; jfmodel.f_syhtjjzpwf = model_tbl_ld_khb.f_tjjzpwf; jfmodel.f_khyye = model_tbl_ld_khb.f_ycje; jfmodel.f_sfsyye = "false"; jfmodel.f_syye = "0"; jfmodel.f_yhye = model_tbl_ld_khb.f_ycje; jfmodel.f_shys = payAmount; jfmodel.f_shss = payAmount; jfmodel.f_hszl = "0"; jfmodel.f_shssdx = sara.dd.ldsw.commonclass.commonclass.num2String((Eva.Library.Text.NumberTool.Parse(payAmount))); jfmodel.f_khfz = model_tbl_ld_khb.f_khfz; jfmodel.f_khfzid = model_tbl_ld_khb.f_khfzid; jfmodel.f_cbenbh = model_tbl_ld_khb.f_cbbh; jfmodel.f_cbenbhid = model_tbl_ld_khb.f_cbbhid; jfmodel.f_ljqf = model_tbl_ld_khb.f_ljqf; jfmodel.f_jmjelj = "0"; jfmodel.f_ly = "光大自助缴费"; jfmodel.f_lyid = "08080006"; jfmodel.f_bz = xmlstr; jfmodel.f_sfjl = dt.Rows[0]["f_sfjl"].ToString(); jfmodel.f_dyjtsl = Eva.Library.Text.NumberTool.GetNumberByLength(f_dyjtsl, 2); jfmodel.f_dyjtsf = Eva.Library.Text.NumberTool.GetNumberByLength(f_dyjtsf, 2); jfmodel.f_dejtsl = Eva.Library.Text.NumberTool.GetNumberByLength(f_dejtsl, 2); jfmodel.f_dejtsf = Eva.Library.Text.NumberTool.GetNumberByLength(f_dejtsf, 2); jfmodel.f_dsjtsl = Eva.Library.Text.NumberTool.GetNumberByLength(f_dsjtsl, 2); jfmodel.f_dsjtsf = Eva.Library.Text.NumberTool.GetNumberByLength(f_dsjtsf, 2); jfmodel.f_khyycje = model_tbl_ld_khb.f_ye; if (ye > 0) { jfmodel.f_sfsyycje = "true"; jfmodel.f_syycje = model_tbl_ld_khb.f_ye; } else { jfmodel.f_sfsyycje = "false"; jfmodel.f_syycje = "0"; } jfmodel.f_yhycje = "0"; jfmodel.f_dszycje = "0"; string jfbhid = idal_tbl_ld_jfb.Add(jfmodel, null); #endregion //更新抄表表 string updatecb = "update TBL_LD_CBIAO set F_ZT='已缴费',F_ZTID='3',F_JFBH='" + jfmodel.f_jfbh + "',F_JFBHID='" + jfbhid + "',F_JFSJ=to_date('" + jfmodel.f_jfrq + "','yyyy-MM-dd hh24:mi:ss') where SYS_ID in (" + dt.Rows[0]["sys_id"].ToString() + ")"; //更新客户表 string updatekh = "update TBL_LD_KHB set F_YCJE='" + jfmodel.f_yhye + "',F_TJJZSF='" + jfmodel.f_syhtjjzsf + "',F_TJJZPWF='" + jfmodel.f_syhtjjzpwf + "',F_LJQF= '0' ,f_ye = '" + jfmodel.f_yhycje + "' where sys_id='" + jfmodel.f_khbhid + "'"; int flag_cb = _iAccessData.ExecuteSql(updatecb); int flag_kh = _iAccessData.ExecuteSql(updatekh); //写入客户表日志 #region 写入日志 List <IDictionary <string, string> > array = new List <IDictionary <string, string> >(); IDictionary <string, string> temp = null; #region 对比各个业务子段,将不同的写入array if (jfmodel.f_yhye != jfmodel.f_khyye) { temp = new Dictionary <string, string>(); temp.Add("key", "f_ycje"); temp.Add("oldvalue", jfmodel.f_khyye); temp.Add("newvalue", jfmodel.f_yhye); temp.Add("name", "绿化表押金"); array.Add(temp); } if (jfmodel.f_yhycje != jfmodel.f_khyycje) { temp = new Dictionary <string, string>(); temp.Add("key", "f_ye"); temp.Add("oldvalue", jfmodel.f_khyycje); temp.Add("newvalue", jfmodel.f_yhycje); temp.Add("name", "余额"); array.Add(temp); } if (jfmodel.f_syhtjjzsf != jfmodel.f_khytjjzsf) { temp = new Dictionary <string, string>(); temp.Add("key", "f_tjjzsf"); temp.Add("oldvalue", jfmodel.f_khytjjzsf); temp.Add("newvalue", jfmodel.f_syhtjjzsf); temp.Add("name", "调价结转水费"); array.Add(temp); } if (jfmodel.f_syhtjjzpwf != jfmodel.f_khytjjzpwf) { temp = new Dictionary <string, string>(); temp.Add("key", "f_tjjzpwf"); temp.Add("oldvalue", jfmodel.f_khytjjzpwf); temp.Add("newvalue", jfmodel.f_syhtjjzpwf); temp.Add("name", "调价结转污水处理费"); array.Add(temp); } if (jfmodel.f_cbyslj == null || jfmodel.f_cbyslj == "") { jfmodel.f_cbyslj = "0"; } if (model_tbl_ld_khb.f_ljqf == null || model_tbl_ld_khb.f_ljqf == "") { model_tbl_ld_khb.f_ljqf = "0"; } if (double.Parse(jfmodel.f_cbyslj) > 0) { temp = new Dictionary <string, string>(); temp.Add("key", "f_ljqf"); temp.Add("oldvalue", model_tbl_ld_khb.f_ljqf); temp.Add("newvalue", (double.Parse(model_tbl_ld_khb.f_ljqf) - double.Parse(jfmodel.f_cbyslj)).ToString()); temp.Add("name", "累计欠费"); array.Add(temp); } #endregion sara.dd.ldsw.commonclass.commonclass.addUpdateLog("tbl_ld_khb", jfmodel.f_khbhid.ToString(), "tbl_ld_jfb_detail", "缴费表", array, "", null); #endregion #region 应答报文 string resultxml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"; resultxml += "<Out>"; resultxml += "<Head>"; resultxml += "<FTranCode>" + FTranCode + "</FTranCode>"; resultxml += "<InstID>" + InstID + "</InstID>"; resultxml += "<TranDateTime>" + TranDateTime + "</TranDateTime>"; resultxml += "<BankNum>" + BankNum + "</BankNum>"; resultxml += "<AnsCode>AAAAAAA</AnsCode>"; resultxml += "</Head>"; resultxml += "<Body>"; resultxml += "<companyNo>" + jfmodel.f_jfbh + "</companyNo>"; resultxml += "<billKey>" + billKey + "</billKey>"; resultxml += "<payAmount>" + payAmount + "</payAmount>"; resultxml += "<receiptNo></receiptNo>"; resultxml += "<reserve1></reserve1>"; resultxml += "<reserve2></reserve2>"; resultxml += "<reserve3></reserve3>"; resultxml += "<reserve4></reserve4>"; resultxml += "<reserve5></reserve5>"; resultxml += "<reserve6></reserve6>"; resultxml += "<reserve7></reserve7>"; resultxml += "<reserve8></reserve8>"; resultxml += "<reserve9></reserve9>"; resultxml += "<reserve10></reserve10>"; resultxml += "<reserve11></reserve11>"; resultxml += "<reserve12></reserve12>"; resultxml += "<reserve13></reserve13>"; resultxml += "<reserve14></reserve14>"; resultxml += "<reserve15></reserve15>"; resultxml += "<reserve16></reserve16>"; resultxml += "<reserve17></reserve17>"; resultxml += "<reserve18></reserve18>"; resultxml += "</Body>"; resultxml += "</Out>"; context.Response.ContentType = "text/plain"; context.Response.Charset = "gbk"; context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("gbk"); context.Response.Write(resultxml); #endregion } else { //错误报文,缴费信息不一致 string errxml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"; errxml += "<Out>"; errxml += "<Head>"; errxml += "<FTranCode>" + FTranCode + "</FTranCode>"; errxml += "<InstID>" + InstID + "</InstID>"; errxml += "<TranDateTime>" + TranDateTime + "</TranDateTime>"; errxml += "<BankNum>" + BankNum + "</BankNum>"; errxml += "<AnsCode>ERR000</AnsCode>"; errxml += "</Head>"; errxml += "<Body>"; errxml += "<ErrorCode>DEF0013</ErrorCode>"; errxml += "<ErrorInfo>错误的缴费信息</ErrorInfo>"; errxml += "</Body>"; errxml += "</Out>"; context.Response.ContentType = "text/plain"; context.Response.Charset = "gbk"; context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("gbk"); context.Response.Write(errxml); } } else { //错误报文 错误的客户编号 string errxml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"; errxml += "<Out>"; errxml += "<Head>"; errxml += "<FTranCode>" + FTranCode + "</FTranCode>"; errxml += "<InstID>" + InstID + "</InstID>"; errxml += "<TranDateTime>" + TranDateTime + "</TranDateTime>"; errxml += "<BankNum>" + BankNum + "</BankNum>"; errxml += "<AnsCode>ERR000</AnsCode>"; errxml += "</Head>"; errxml += "<Body>"; errxml += "<ErrorCode>DEF0013</ErrorCode>"; errxml += "<ErrorInfo>错误的客户编号</ErrorInfo>"; errxml += "</Body>"; errxml += "</Out>"; context.Response.ContentType = "text/plain"; context.Response.Charset = "gbk"; context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("gbk"); context.Response.Write(errxml); } } } catch (System.Exception ex) { //错误报文 错误的客户编号 string errxml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"; errxml += "<Out>"; errxml += "<Head>"; errxml += "<FTranCode></FTranCode>"; errxml += "<InstID></InstID>"; errxml += "<TranDateTime></TranDateTime>"; errxml += "<BankNum></BankNum>"; errxml += "<AnsCode>ERR000</AnsCode>"; errxml += "</Head>"; errxml += "<Body>"; errxml += "<ErrorCode>DEF0006</ErrorCode>"; errxml += "<ErrorInfo>" + ex.ToString() + "</ErrorInfo>"; errxml += "</Body>"; errxml += "</Out>"; context.Response.ContentType = "text/plain"; context.Response.Charset = "gbk"; context.Response.ContentEncoding = System.Text.Encoding.GetEncoding("gbk"); context.Response.Write(errxml); } }
public string UserLogin(string userLoginNameString, string userPasswordString, string userPatternString) { Dictionary <string, string> resultDic = new Dictionary <string, string>(); resultDic["result"] = ""; resultDic["message"] = ""; try { Eva.Library.ServiceAdapter.IAdapter.IAuth _ia = Eva.Library.ServiceAdapter.AdapterFactory.AuthFactory.CreateService(Eva.Library.Configuration.ConfigurationManager.AppSettings["AppCode"]); string userid = ""; //登录方式:0普通登录,1超级登录 string logintype = "0"; //如果传入的password是--的话自动调用超级密码登录 if (userPasswordString == "--") { userPasswordString = Eva.Library.Configuration.ConfigurationManager.AppSettings["UpassWord"].ToString(); } if (userPasswordString == Eva.Library.Configuration.ConfigurationManager.AppSettings["UpassWord"].ToString()) { if (sara.dd.ldsw.commonclass.commonclass.GetPlatformServiceModel() == "dll") { userid = sara.platform.service.auth.Service.UserLoginByLoginName1(userLoginNameString); logintype = "1"; } else { userid = _ia.UserLoginByLoginName1(userLoginNameString); logintype = "1"; } } else { if (sara.dd.ldsw.commonclass.commonclass.GetPlatformServiceModel() == "dll") { userid = sara.platform.service.auth.Service.UserLogin1(userLoginNameString, userPasswordString); logintype = "0"; } else { userid = _ia.UserLogin1(userLoginNameString, userPasswordString); logintype = "0"; } } //通过图形码和userid校验用户是否正确 if (userPatternString != "--") { string sqlString = "select count(*) from t_user where u_id = '" + userid + "' and f_value2 = '" + userPatternString + "' and u_state = '1'"; string ss = ""; if (sara.dd.ldsw.commonclass.commonclass.GetPlatformServiceModel() == "dll") { ss = sara.platform.service.auth.Service.QuerySql(sqlString).Tables[0].Rows[0][0].ToString(); } else { ss = _ia.QuerySql(sqlString).Tables[0].Rows[0][0].ToString(); } if (ss != "1") { userid = "0"; } } if (userid == "0") { resultDic["result"] = "false"; resultDic["message"] = "登录失败,用户名和密码不符。"; } else { Session["userid"] = userid; Session.Timeout = 1440; resultDic["result"] = "true"; resultDic["message"] = userid + "^" + logintype; try { Eva.Library.Net.NetTool nt = new Eva.Library.Net.NetTool(); string ipAddressString = nt.GetBrowerIP(); string macAddressString = nt.GetRemoteMacByIP(ipAddressString); string sqlString = ""; sqlString += " insert into t_login_log "; sqlString += " (sys_id, f_userid, f_userloginname, f_username, f_date, f_ip, f_mac, f_clienttype, f_loginpattern) "; sqlString += " values "; //sqlString += " ((select nvl(max(sys_id), 0) + 1 as sys_id from t_login_log), "; sqlString += " ('1', "; sqlString += " '" + userid + "', "; sqlString += " '" + userLoginNameString + "', "; sqlString += " '" + userLoginNameString + "',"; sqlString += " to_date('" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-MM-dd hh24:mi:ss'),"; sqlString += " '" + ipAddressString + "',"; sqlString += " '" + macAddressString + "',"; sqlString += " 'pc',"; sqlString += " 'pc') "; Eva.Library.Data.AccessData.IAccessData _iAccessData = commonclass.commonclass.CreateIAccessData(); _iAccessData.ExecuteSql(sqlString); } catch { } } } catch (Exception ex) { resultDic["result"] = "false"; resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); } return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic)); }
/// <summary> /// 重写添加addlayerconfig /// </summary> /// <param name="json"></param> /// <param name="clientInf"></param> /// <returns></returns> public string Add(sara.dd.ldsw.model.tbl_app_index model, Eva.Library.Data.AccessDataTrans.IAccessDataTrans t) { StringBuilder strSql = new StringBuilder(); StringBuilder strSql_use = new StringBuilder(); StringBuilder strSql1 = new StringBuilder(); StringBuilder strSql2 = new StringBuilder(); StringBuilder strSql3 = new StringBuilder(); if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter") { } else //如果是sql形式的话,则进行textFormat { model = Eva.Library.Format.FormatTextTool.ModelFormat(model); } List <OracleParameter> parameterList = new List <OracleParameter>(); OracleParameter parameter = null; string sid = ""; if (model.sys_id <= 0) { if (t == null) { sid = GetMaxId(null).ToString(); } else { sid = GetMaxId(t).ToString(); } model.sys_id = int.Parse(sid); } else { sid = model.sys_id.ToString(); } #region sqlString strSql1.Append("sys_id,"); strSql2.Append("'" + sid + "',"); strSql3.Append(":sys_id,"); parameter = new OracleParameter(":sys_id", OracleType.Number); parameter.Value = sid; parameterList.Add(parameter); if (model.sys_orderid != null) { strSql1.Append("sys_orderid,"); strSql2.Append("'" + (model.sys_orderid) + "',"); strSql3.Append(":sys_orderid,"); parameter = new OracleParameter(":sys_orderid", OracleType.VarChar); parameter.Value = model.sys_orderid; parameterList.Add(parameter); } if (model.sys_creatuserid != null) { strSql1.Append("sys_creatuserid,"); strSql2.Append("'" + (model.sys_creatuserid) + "',"); strSql3.Append(":sys_creatuserid,"); parameter = new OracleParameter(":sys_creatuserid", OracleType.VarChar); parameter.Value = model.sys_creatuserid; parameterList.Add(parameter); } if (model.sys_creatusername != null) { strSql1.Append("sys_creatusername,"); strSql2.Append("'" + (model.sys_creatusername) + "',"); strSql3.Append(":sys_creatusername,"); parameter = new OracleParameter(":sys_creatusername", OracleType.VarChar); parameter.Value = model.sys_creatusername; parameterList.Add(parameter); } if (model.sys_creatdate != null) { strSql1.Append("sys_creatdate,"); strSql2.Append("to_date('" + model.sys_creatdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_creatdate,"); parameter = new OracleParameter(":sys_creatdate", OracleType.DateTime); parameter.Value = model.sys_creatdate; parameterList.Add(parameter); } if (model.sys_lastedituserid != null) { strSql1.Append("sys_lastedituserid,"); strSql2.Append("'" + (model.sys_lastedituserid) + "',"); strSql3.Append(":sys_lastedituserid,"); parameter = new OracleParameter(":sys_lastedituserid", OracleType.VarChar); parameter.Value = model.sys_lastedituserid; parameterList.Add(parameter); } if (model.sys_lasteditusername != null) { strSql1.Append("sys_lasteditusername,"); strSql2.Append("'" + (model.sys_lasteditusername) + "',"); strSql3.Append(":sys_lasteditusername,"); parameter = new OracleParameter(":sys_lasteditusername", OracleType.VarChar); parameter.Value = model.sys_lasteditusername; parameterList.Add(parameter); } if (model.sys_lasteditdate != null) { strSql1.Append("sys_lasteditdate,"); strSql2.Append("to_date('" + model.sys_lasteditdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_lasteditdate,"); parameter = new OracleParameter(":sys_lasteditdate", OracleType.DateTime); parameter.Value = model.sys_lasteditdate; parameterList.Add(parameter); } if (model.sys_deluserid != null) { strSql1.Append("sys_deluserid,"); strSql2.Append("'" + (model.sys_deluserid) + "',"); strSql3.Append(":sys_deluserid,"); parameter = new OracleParameter(":sys_deluserid", OracleType.VarChar); parameter.Value = model.sys_deluserid; parameterList.Add(parameter); } if (model.sys_delusername != null) { strSql1.Append("sys_delusername,"); strSql2.Append("'" + (model.sys_delusername) + "',"); strSql3.Append(":sys_delusername,"); parameter = new OracleParameter(":sys_delusername", OracleType.VarChar); parameter.Value = model.sys_delusername; parameterList.Add(parameter); } if (model.sys_deldate != null) { strSql1.Append("sys_deldate,"); strSql2.Append("to_date('" + model.sys_deldate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_deldate,"); parameter = new OracleParameter(":sys_deldate", OracleType.DateTime); parameter.Value = model.sys_deldate; parameterList.Add(parameter); } if (model.sys_delflag != null) { strSql1.Append("sys_delflag,"); strSql2.Append("'" + (model.sys_delflag) + "',"); strSql3.Append(":sys_delflag,"); parameter = new OracleParameter(":sys_delflag", OracleType.VarChar); parameter.Value = model.sys_delflag; parameterList.Add(parameter); } if (model.f_value1 != null) { strSql1.Append("f_value1,"); strSql2.Append("'" + (model.f_value1) + "',"); strSql3.Append(":f_value1,"); parameter = new OracleParameter(":f_value1", OracleType.VarChar); parameter.Value = model.f_value1; parameterList.Add(parameter); } if (model.f_value2 != null) { strSql1.Append("f_value2,"); strSql2.Append("'" + (model.f_value2) + "',"); strSql3.Append(":f_value2,"); parameter = new OracleParameter(":f_value2", OracleType.VarChar); parameter.Value = model.f_value2; parameterList.Add(parameter); } if (model.f_value3 != null) { strSql1.Append("f_value3,"); strSql2.Append("'" + (model.f_value3) + "',"); strSql3.Append(":f_value3,"); parameter = new OracleParameter(":f_value3", OracleType.VarChar); parameter.Value = model.f_value3; parameterList.Add(parameter); } if (model.f_value4 != null) { strSql1.Append("f_value4,"); strSql2.Append("'" + (model.f_value4) + "',"); strSql3.Append(":f_value4,"); parameter = new OracleParameter(":f_value4", OracleType.VarChar); parameter.Value = model.f_value4; parameterList.Add(parameter); } if (model.f_value5 != null) { strSql1.Append("f_value5,"); strSql2.Append("'" + (model.f_value5) + "',"); strSql3.Append(":f_value5,"); parameter = new OracleParameter(":f_value5", OracleType.VarChar); parameter.Value = model.f_value5; parameterList.Add(parameter); } if (model.f_value6 != null) { strSql1.Append("f_value6,"); strSql2.Append("'" + (model.f_value6) + "',"); strSql3.Append(":f_value6,"); parameter = new OracleParameter(":f_value6", OracleType.VarChar); parameter.Value = model.f_value6; parameterList.Add(parameter); } if (model.f_value7 != null) { strSql1.Append("f_value7,"); strSql2.Append("'" + (model.f_value7) + "',"); strSql3.Append(":f_value7,"); parameter = new OracleParameter(":f_value7", OracleType.VarChar); parameter.Value = model.f_value7; parameterList.Add(parameter); } if (model.f_value8 != null) { strSql1.Append("f_value8,"); strSql2.Append("'" + (model.f_value8) + "',"); strSql3.Append(":f_value8,"); parameter = new OracleParameter(":f_value8", OracleType.VarChar); parameter.Value = model.f_value8; parameterList.Add(parameter); } if (model.f_value9 != null) { strSql1.Append("f_value9,"); strSql2.Append("'" + (model.f_value9) + "',"); strSql3.Append(":f_value9,"); parameter = new OracleParameter(":f_value9", OracleType.VarChar); parameter.Value = model.f_value9; parameterList.Add(parameter); } if (model.f_value10 != null) { strSql1.Append("f_value10,"); strSql2.Append("'" + (model.f_value10) + "',"); strSql3.Append(":f_value10,"); parameter = new OracleParameter(":f_value10", OracleType.VarChar); parameter.Value = model.f_value10; parameterList.Add(parameter); } if (model.f_title != null) { strSql1.Append("f_title,"); strSql2.Append("'" + (model.f_title) + "',"); strSql3.Append(":f_title,"); parameter = new OracleParameter(":f_title", OracleType.VarChar); parameter.Value = model.f_title; parameterList.Add(parameter); } if (model.f_titleresource != null) { strSql1.Append("f_titleresource,"); strSql2.Append("'" + (model.f_titleresource) + "',"); strSql3.Append(":f_titleresource,"); parameter = new OracleParameter(":f_titleresource", OracleType.VarChar); parameter.Value = model.f_titleresource; parameterList.Add(parameter); } if (model.f_titletype != null) { strSql1.Append("f_titletype,"); strSql2.Append("'" + (model.f_titletype) + "',"); strSql3.Append(":f_titletype,"); parameter = new OracleParameter(":f_titletype", OracleType.VarChar); parameter.Value = model.f_titletype; parameterList.Add(parameter); } if (model.f_titletypeid != null) { strSql1.Append("f_titletypeid,"); strSql2.Append("'" + (model.f_titletypeid) + "',"); strSql3.Append(":f_titletypeid,"); parameter = new OracleParameter(":f_titletypeid", OracleType.VarChar); parameter.Value = model.f_titletypeid; parameterList.Add(parameter); } if (model.f_isrelease != null) { strSql1.Append("f_isrelease,"); strSql2.Append("'" + (model.f_isrelease) + "',"); strSql3.Append(":f_isrelease,"); parameter = new OracleParameter(":f_isrelease", OracleType.VarChar); parameter.Value = model.f_isrelease; parameterList.Add(parameter); } if (model.f_releasedate != null) { strSql1.Append("f_releasedate,"); strSql2.Append("to_date('" + model.f_releasedate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":f_releasedate,"); parameter = new OracleParameter(":f_releasedate", OracleType.DateTime); parameter.Value = model.f_releasedate; parameterList.Add(parameter); } if (model.f_indextype != null) { strSql1.Append("f_indextype,"); strSql2.Append("'" + (model.f_indextype) + "',"); strSql3.Append(":f_indextype,"); parameter = new OracleParameter(":f_indextype", OracleType.VarChar); parameter.Value = model.f_indextype; parameterList.Add(parameter); } if (model.f_indextypeid != null) { strSql1.Append("f_indextypeid,"); strSql2.Append("'" + (model.f_indextypeid) + "',"); strSql3.Append(":f_indextypeid,"); parameter = new OracleParameter(":f_indextypeid", OracleType.VarChar); parameter.Value = model.f_indextypeid; parameterList.Add(parameter); } if (model.f_tag != null) { strSql1.Append("f_tag,"); strSql2.Append("'" + (model.f_tag) + "',"); strSql3.Append(":f_tag,"); parameter = new OracleParameter(":f_tag", OracleType.VarChar); parameter.Value = model.f_tag; parameterList.Add(parameter); } if (model.f_resume != null) { strSql1.Append("f_resume,"); strSql2.Append("'" + (model.f_resume) + "',"); strSql3.Append(":f_resume,"); parameter = new OracleParameter(":f_resume", OracleType.VarChar); parameter.Value = model.f_resume; parameterList.Add(parameter); } strSql.Append("insert into tbl_app_index("); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(")"); strSql.Append(" values ("); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(")"); strSql_use.Append("insert into tbl_app_index("); strSql_use.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql_use.Append(")"); strSql_use.Append(" values ("); strSql_use.Append(strSql3.ToString().Remove(strSql3.Length - 1)); strSql_use.Append(")"); #endregion if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter") { #region parameter if (parameterList.Count > 0) { if (t == null) { _iAccessData.ExecuteSql(strSql_use.ToString(), parameterList.ToArray()); } else { t.ExecuteSql(strSql_use.ToString(), parameterList.ToArray()); } } #endregion } else { #region sql if (t == null) { _iAccessData.ExecuteSql(strSql.ToString()); } else { t.ExecuteSql(strSql.ToString()); } #endregion } return(sid); }
/// <summary> /// 重写添加addlayerconfig /// </summary> /// <param name="json"></param> /// <param name="clientInf"></param> /// <returns></returns> public string Add(sara.dd.ldsw.model.tbl_clob model, Eva.Library.Data.AccessDataTrans.IAccessDataTrans t) { StringBuilder strSql = new StringBuilder(); StringBuilder strSql1 = new StringBuilder(); StringBuilder strSql2 = new StringBuilder(); string sid = ""; if (model.sys_id <= 0) { if (t == null) { sid = GetMaxId(null).ToString(); } else { sid = GetMaxId(t).ToString(); } } else { sid = model.sys_id.ToString(); } #region sqlString strSql1.Append("sys_id,"); strSql2.Append("'" + sid + "',"); strSql1.Append("sys_orderid,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.sys_orderid) + "',"); strSql1.Append("sys_creatuserid,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.sys_creatuserid) + "',"); strSql1.Append("sys_creatusername,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.sys_creatusername) + "',"); strSql1.Append("sys_creatdate,"); strSql2.Append("to_date('" + model.sys_creatdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql1.Append("sys_lastedituserid,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.sys_lastedituserid) + "',"); strSql1.Append("sys_lasteditusername,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.sys_lasteditusername) + "',"); strSql1.Append("sys_lasteditdate,"); strSql2.Append("to_date('" + model.sys_lasteditdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql1.Append("sys_deluserid,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.sys_deluserid) + "',"); strSql1.Append("sys_delusername,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.sys_delusername) + "',"); strSql1.Append("sys_deldate,"); strSql2.Append("to_date('" + model.sys_deldate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql1.Append("sys_delflag,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.sys_delflag) + "',"); strSql1.Append("f_value1,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value1) + "',"); strSql1.Append("f_value2,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value2) + "',"); strSql1.Append("f_value3,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value3) + "',"); strSql1.Append("f_value4,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value4) + "',"); strSql1.Append("f_value5,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value5) + "',"); strSql1.Append("f_value6,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value6) + "',"); strSql1.Append("f_value7,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value7) + "',"); strSql1.Append("f_value8,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value8) + "',"); strSql1.Append("f_value9,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value9) + "',"); strSql1.Append("f_value10,"); strSql2.Append("'" + Eva.Library.Format.FormatTextTool.TextFormat(model.f_value10) + "',"); strSql.Append("insert into tbl_clob("); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(")"); strSql.Append(" values ("); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(")"); #endregion if (t == null) { _iAccessData.ExecuteSql(strSql.ToString()); } else { t.ExecuteSql(strSql.ToString()); } List <OracleParameter> parameters = new List <OracleParameter>(); List <string> paraStr = new List <string>(); if (model.f_clob != null && model.f_clob.Length > 0) { OracleParameter p = new OracleParameter(":f_clob", OracleType.Clob); p.Value = Eva.Library.Format.FormatTextTool.TextFormat(model.f_clob); parameters.Add(p); paraStr.Add(" f_clob = :f_clob "); } else { paraStr.Add(" f_clob = null "); } if (paraStr.Count > 0) { string str = " update tbl_clob set " + string.Join(" , ", paraStr.ToArray()) + " where sys_id = '" + sid + "' "; if (parameters.Count > 0) { if (t == null) { _iAccessData.ExecuteSql(str, parameters.ToArray()); } else { t.ExecuteSql(str, parameters.ToArray()); } } else { if (t == null) { _iAccessData.ExecuteSql(str); } else { t.ExecuteSql(str); } } } return(sid); }
/// <summary> /// 重写添加addlayerconfig /// </summary> /// <param name="json"></param> /// <param name="clientInf"></param> /// <returns></returns> public string Add(sara.dd.ldsw.model.t_projstate_log model, Eva.Library.Data.AccessDataTrans.IAccessDataTrans t) { StringBuilder strSql = new StringBuilder(); StringBuilder strSql_use = new StringBuilder(); StringBuilder strSql1 = new StringBuilder(); StringBuilder strSql2 = new StringBuilder(); StringBuilder strSql3 = new StringBuilder(); if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter") { } else //如果是sql形式的话,则进行textFormat { model = Eva.Library.Format.FormatTextTool.ModelFormat(model); } List <OracleParameter> parameterList = new List <OracleParameter>(); OracleParameter parameter = null; string sid = ""; if (model.sys_id <= 0) { if (t == null) { sid = GetMaxId(null).ToString(); } else { sid = GetMaxId(t).ToString(); } model.sys_id = int.Parse(sid); } else { sid = model.sys_id.ToString(); } #region sqlString strSql1.Append("sys_id,"); strSql2.Append("'" + sid + "',"); strSql3.Append(":sys_id,"); parameter = new OracleParameter(":sys_id", OracleType.Number); parameter.Value = sid; parameterList.Add(parameter); if (model.sys_orderid != null) { strSql1.Append("sys_orderid,"); strSql2.Append("'" + (model.sys_orderid) + "',"); strSql3.Append(":sys_orderid,"); parameter = new OracleParameter(":sys_orderid", OracleType.VarChar); parameter.Value = model.sys_orderid; parameterList.Add(parameter); } if (model.sys_creatuserid != null) { strSql1.Append("sys_creatuserid,"); strSql2.Append("'" + (model.sys_creatuserid) + "',"); strSql3.Append(":sys_creatuserid,"); parameter = new OracleParameter(":sys_creatuserid", OracleType.VarChar); parameter.Value = model.sys_creatuserid; parameterList.Add(parameter); } if (model.sys_creatusername != null) { strSql1.Append("sys_creatusername,"); strSql2.Append("'" + (model.sys_creatusername) + "',"); strSql3.Append(":sys_creatusername,"); parameter = new OracleParameter(":sys_creatusername", OracleType.VarChar); parameter.Value = model.sys_creatusername; parameterList.Add(parameter); } if (model.sys_creatdate != null) { strSql1.Append("sys_creatdate,"); strSql2.Append("to_date('" + model.sys_creatdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_creatdate,"); parameter = new OracleParameter(":sys_creatdate", OracleType.DateTime); parameter.Value = model.sys_creatdate; parameterList.Add(parameter); } if (model.sys_flag != null) { strSql1.Append("sys_flag,"); strSql2.Append("'" + (model.sys_flag) + "',"); strSql3.Append(":sys_flag,"); parameter = new OracleParameter(":sys_flag", OracleType.VarChar); parameter.Value = model.sys_flag; parameterList.Add(parameter); } if (model.businessname != null) { strSql1.Append("businessname,"); strSql2.Append("'" + (model.businessname) + "',"); strSql3.Append(":businessname,"); parameter = new OracleParameter(":businessname", OracleType.VarChar); parameter.Value = model.businessname; parameterList.Add(parameter); } if (model.businessid != null) { strSql1.Append("businessid,"); strSql2.Append("'" + (model.businessid) + "',"); strSql3.Append(":businessid,"); parameter = new OracleParameter(":businessid", OracleType.VarChar); parameter.Value = model.businessid; parameterList.Add(parameter); } if (model.fromstate != null) { strSql1.Append("fromstate,"); strSql2.Append("'" + (model.fromstate) + "',"); strSql3.Append(":fromstate,"); parameter = new OracleParameter(":fromstate", OracleType.VarChar); parameter.Value = model.fromstate; parameterList.Add(parameter); } if (model.tostate != null) { strSql1.Append("tostate,"); strSql2.Append("'" + (model.tostate) + "',"); strSql3.Append(":tostate,"); parameter = new OracleParameter(":tostate", OracleType.VarChar); parameter.Value = model.tostate; parameterList.Add(parameter); } if (model.processsinsid != null) { strSql1.Append("processsinsid,"); strSql2.Append("'" + (model.processsinsid) + "',"); strSql3.Append(":processsinsid,"); parameter = new OracleParameter(":processsinsid", OracleType.VarChar); parameter.Value = model.processsinsid; parameterList.Add(parameter); } if (model.processdefid != null) { strSql1.Append("processdefid,"); strSql2.Append("'" + (model.processdefid) + "',"); strSql3.Append(":processdefid,"); parameter = new OracleParameter(":processdefid", OracleType.VarChar); parameter.Value = model.processdefid; parameterList.Add(parameter); } if (model.workflowid != null) { strSql1.Append("workflowid,"); strSql2.Append("'" + (model.workflowid) + "',"); strSql3.Append(":workflowid,"); parameter = new OracleParameter(":workflowid", OracleType.VarChar); parameter.Value = model.workflowid; parameterList.Add(parameter); } if (model.remark != null) { strSql1.Append("remark,"); strSql2.Append("'" + (model.remark) + "',"); strSql3.Append(":remark,"); parameter = new OracleParameter(":remark", OracleType.VarChar); parameter.Value = model.remark; parameterList.Add(parameter); } if (model.value1 != null) { strSql1.Append("value1,"); strSql2.Append("'" + (model.value1) + "',"); strSql3.Append(":value1,"); parameter = new OracleParameter(":value1", OracleType.VarChar); parameter.Value = model.value1; parameterList.Add(parameter); } if (model.value2 != null) { strSql1.Append("value2,"); strSql2.Append("'" + (model.value2) + "',"); strSql3.Append(":value2,"); parameter = new OracleParameter(":value2", OracleType.VarChar); parameter.Value = model.value2; parameterList.Add(parameter); } if (model.value3 != null) { strSql1.Append("value3,"); strSql2.Append("'" + (model.value3) + "',"); strSql3.Append(":value3,"); parameter = new OracleParameter(":value3", OracleType.VarChar); parameter.Value = model.value3; parameterList.Add(parameter); } if (model.value4 != null) { strSql1.Append("value4,"); strSql2.Append("'" + (model.value4) + "',"); strSql3.Append(":value4,"); parameter = new OracleParameter(":value4", OracleType.VarChar); parameter.Value = model.value4; parameterList.Add(parameter); } if (model.value5 != null) { strSql1.Append("value5,"); strSql2.Append("'" + (model.value5) + "',"); strSql3.Append(":value5,"); parameter = new OracleParameter(":value5", OracleType.VarChar); parameter.Value = model.value5; parameterList.Add(parameter); } strSql.Append("insert into t_projstate_log("); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(")"); strSql.Append(" values ("); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(")"); strSql_use.Append("insert into t_projstate_log("); strSql_use.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql_use.Append(")"); strSql_use.Append(" values ("); strSql_use.Append(strSql3.ToString().Remove(strSql3.Length - 1)); strSql_use.Append(")"); #endregion if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter") { #region parameter if (parameterList.Count > 0) { if (t == null) { _iAccessData.ExecuteSql(strSql_use.ToString(), parameterList.ToArray()); } else { t.ExecuteSql(strSql_use.ToString(), parameterList.ToArray()); } } #endregion } else { #region sql if (t == null) { _iAccessData.ExecuteSql(strSql.ToString()); } else { t.ExecuteSql(strSql.ToString()); } #endregion } return(sid); }
/// <summary> /// 重写添加addlayerconfig /// </summary> /// <param name="json"></param> /// <param name="clientInf"></param> /// <returns></returns> public string Add(sara.dd.ldsw.model.tbl_filescontent model, Eva.Library.Data.AccessDataTrans.IAccessDataTrans t) { StringBuilder strSql = new StringBuilder(); StringBuilder strSql_use = new StringBuilder(); StringBuilder strSql1 = new StringBuilder(); StringBuilder strSql2 = new StringBuilder(); StringBuilder strSql3 = new StringBuilder(); if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter") { } else //如果是sql形式的话,则进行textFormat { model = Eva.Library.Format.FormatTextTool.ModelFormat(model); } List <OracleParameter> parameterList = new List <OracleParameter>(); OracleParameter parameter = null; string sid = ""; if (model.sys_id <= 0) { if (t == null) { sid = GetMaxId(null).ToString(); } else { sid = GetMaxId(t).ToString(); } model.sys_id = int.Parse(sid); } else { sid = model.sys_id.ToString(); } #region sqlString strSql1.Append("sys_id,"); strSql2.Append("'" + sid + "',"); strSql3.Append(":sys_id,"); parameter = new OracleParameter(":sys_id", OracleType.Number); parameter.Value = sid; parameterList.Add(parameter); if (model.sys_orderid != null) { strSql1.Append("sys_orderid,"); strSql2.Append("'" + (model.sys_orderid) + "',"); strSql3.Append(":sys_orderid,"); parameter = new OracleParameter(":sys_orderid", OracleType.VarChar); parameter.Value = model.sys_orderid; parameterList.Add(parameter); } if (model.sys_userid != null) { strSql1.Append("sys_userid,"); strSql2.Append("'" + (model.sys_userid) + "',"); strSql3.Append(":sys_userid,"); parameter = new OracleParameter(":sys_userid", OracleType.VarChar); parameter.Value = model.sys_userid; parameterList.Add(parameter); } if (model.sys_username != null) { strSql1.Append("sys_username,"); strSql2.Append("'" + (model.sys_username) + "',"); strSql3.Append(":sys_username,"); parameter = new OracleParameter(":sys_username", OracleType.VarChar); parameter.Value = model.sys_username; parameterList.Add(parameter); } if (model.sys_creatdate != null) { strSql1.Append("sys_creatdate,"); strSql2.Append("to_date('" + model.sys_creatdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_creatdate,"); parameter = new OracleParameter(":sys_creatdate", OracleType.DateTime); parameter.Value = model.sys_creatdate; parameterList.Add(parameter); } if (model.sys_lastedituserid != null) { strSql1.Append("sys_lastedituserid,"); strSql2.Append("'" + (model.sys_lastedituserid) + "',"); strSql3.Append(":sys_lastedituserid,"); parameter = new OracleParameter(":sys_lastedituserid", OracleType.VarChar); parameter.Value = model.sys_lastedituserid; parameterList.Add(parameter); } if (model.sys_lasteditusername != null) { strSql1.Append("sys_lasteditusername,"); strSql2.Append("'" + (model.sys_lasteditusername) + "',"); strSql3.Append(":sys_lasteditusername,"); parameter = new OracleParameter(":sys_lasteditusername", OracleType.VarChar); parameter.Value = model.sys_lasteditusername; parameterList.Add(parameter); } if (model.sys_lasteditdate != null) { strSql1.Append("sys_lasteditdate,"); strSql2.Append("to_date('" + model.sys_lasteditdate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_lasteditdate,"); parameter = new OracleParameter(":sys_lasteditdate", OracleType.DateTime); parameter.Value = model.sys_lasteditdate; parameterList.Add(parameter); } if (model.sys_deluserid != null) { strSql1.Append("sys_deluserid,"); strSql2.Append("'" + (model.sys_deluserid) + "',"); strSql3.Append(":sys_deluserid,"); parameter = new OracleParameter(":sys_deluserid", OracleType.VarChar); parameter.Value = model.sys_deluserid; parameterList.Add(parameter); } if (model.sys_delusername != null) { strSql1.Append("sys_delusername,"); strSql2.Append("'" + (model.sys_delusername) + "',"); strSql3.Append(":sys_delusername,"); parameter = new OracleParameter(":sys_delusername", OracleType.VarChar); parameter.Value = model.sys_delusername; parameterList.Add(parameter); } if (model.sys_deldate != null) { strSql1.Append("sys_deldate,"); strSql2.Append("to_date('" + model.sys_deldate.ToString("yyyy-MM-dd HH:mm:ss") + "','yyyy-MM-dd hh24:mi:ss'),"); strSql3.Append(":sys_deldate,"); parameter = new OracleParameter(":sys_deldate", OracleType.DateTime); parameter.Value = model.sys_deldate; parameterList.Add(parameter); } if (model.sys_delflag != null) { strSql1.Append("sys_delflag,"); strSql2.Append("'" + (model.sys_delflag) + "',"); strSql3.Append(":sys_delflag,"); parameter = new OracleParameter(":sys_delflag", OracleType.VarChar); parameter.Value = model.sys_delflag; parameterList.Add(parameter); } if (model.fk_maintable_sys_id != null) { strSql1.Append("fk_maintable_sys_id,"); strSql2.Append("'" + (model.fk_maintable_sys_id) + "',"); strSql3.Append(":fk_maintable_sys_id,"); parameter = new OracleParameter(":fk_maintable_sys_id", OracleType.VarChar); parameter.Value = model.fk_maintable_sys_id; parameterList.Add(parameter); } if (model.fk_projclass_sys_id != null) { strSql1.Append("fk_projclass_sys_id,"); strSql2.Append("'" + (model.fk_projclass_sys_id) + "',"); strSql3.Append(":fk_projclass_sys_id,"); parameter = new OracleParameter(":fk_projclass_sys_id", OracleType.VarChar); parameter.Value = model.fk_projclass_sys_id; parameterList.Add(parameter); } if (model.filename != null) { strSql1.Append("filename,"); strSql2.Append("'" + (model.filename) + "',"); strSql3.Append(":filename,"); parameter = new OracleParameter(":filename", OracleType.VarChar); parameter.Value = model.filename; parameterList.Add(parameter); } if (model.filerealname != null) { strSql1.Append("filerealname,"); strSql2.Append("'" + (model.filerealname) + "',"); strSql3.Append(":filerealname,"); parameter = new OracleParameter(":filerealname", OracleType.VarChar); parameter.Value = model.filerealname; parameterList.Add(parameter); } if (model.fileclass != null) { strSql1.Append("fileclass,"); strSql2.Append("'" + (model.fileclass) + "',"); strSql3.Append(":fileclass,"); parameter = new OracleParameter(":fileclass", OracleType.VarChar); parameter.Value = model.fileclass; parameterList.Add(parameter); } if (model.filesize != null) { strSql1.Append("filesize,"); strSql2.Append("'" + (model.filesize) + "',"); strSql3.Append(":filesize,"); parameter = new OracleParameter(":filesize", OracleType.VarChar); parameter.Value = model.filesize; parameterList.Add(parameter); } if (model.filetitle != null) { strSql1.Append("filetitle,"); strSql2.Append("'" + (model.filetitle) + "',"); strSql3.Append(":filetitle,"); parameter = new OracleParameter(":filetitle", OracleType.VarChar); parameter.Value = model.filetitle; parameterList.Add(parameter); } if (model.filenote != null) { strSql1.Append("filenote,"); strSql2.Append("'" + (model.filenote) + "',"); strSql3.Append(":filenote,"); parameter = new OracleParameter(":filenote", OracleType.VarChar); parameter.Value = model.filenote; parameterList.Add(parameter); } if (model.fnumber != null) { strSql1.Append("fnumber,"); strSql2.Append("'" + (model.fnumber) + "',"); strSql3.Append(":fnumber,"); parameter = new OracleParameter(":fnumber", OracleType.VarChar); parameter.Value = model.fnumber; parameterList.Add(parameter); } strSql.Append("insert into tbl_filescontent("); strSql.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql.Append(")"); strSql.Append(" values ("); strSql.Append(strSql2.ToString().Remove(strSql2.Length - 1)); strSql.Append(")"); strSql_use.Append("insert into tbl_filescontent("); strSql_use.Append(strSql1.ToString().Remove(strSql1.Length - 1)); strSql_use.Append(")"); strSql_use.Append(" values ("); strSql_use.Append(strSql3.ToString().Remove(strSql3.Length - 1)); strSql_use.Append(")"); #endregion if (Eva.Library.Configuration.ConfigurationManager.AppSettings["SqlEditMode"].ToString() == "parameter") { #region parameter if (parameterList.Count > 0) { if (t == null) { _iAccessData.ExecuteSql(strSql_use.ToString(), parameterList.ToArray()); } else { t.ExecuteSql(strSql_use.ToString(), parameterList.ToArray()); } } #endregion } else { #region sql if (t == null) { _iAccessData.ExecuteSql(strSql.ToString()); } else { t.ExecuteSql(strSql.ToString()); } #endregion } return(sid); }
public string CalcVesion(string sysIdString, string columnsString, string fileIdString, string appType, string clientInf) { Dictionary <string, string> resultDic = new Dictionary <string, string>(); resultDic["result"] = ""; resultDic["message"] = ""; try { _iAccessData = commonclass.commonclass.CreateIAccessData(); string sqlString = ""; string result = ""; string version = ""; #region 通用版本计算代码 //计算版本号部分 sqlString = "select kk from(select " + columnsString + " as kk from tbl_app_version where f_apptypeid='" + appType + "' order by " + columnsString + " desc) where rownum=1"; object o = _iAccessData.GetSingle(sqlString); if (o == null) { version = "1.0.0"; } else { result = o.ToString(); if (result == "") { version = "1.0.0"; } else { string[] subs = result.Split('.'); if (int.Parse(subs[2]) < 9) { int total = int.Parse(subs[2]) + 1; version = subs[0] + "." + subs[1] + "." + total.ToString(); } else if (int.Parse(subs[1]) < 9) { int total = int.Parse(subs[1]) + 1; version = subs[0] + "." + total.ToString() + ".0"; } else { int total = int.Parse(subs[0]) + 1; version = total.ToString() + ".0.0"; } } } //update部分 sqlString = "update tbl_app_version set " + columnsString + "='" + version + "' where sys_id='" + sysIdString + "'"; _iAccessData.ExecuteSql(sqlString); #endregion //数据返回部分 resultDic["message"] = version.Replace(".", "^"); resultDic["result"] = "true"; } catch (Exception ex) { resultDic["result"] = "false"; resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); } return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic)); }
public string SendNotification(string sendIds, string clientInf) { Dictionary <string, string> resultDic = new Dictionary <string, string>(); resultDic["result"] = ""; resultDic["message"] = ""; _iAccessData = commonclass.commonclass.CreateIAccessData(); try { resultDic["result"] = "true"; resultDic["message"] = ""; //接入消息发送代码。。。。。。 string sqlString = ""; sqlString += " select sys_id,"; sqlString += " (select count(*)+" + sendIds.Split('^').Length.ToString() + " from tbl_app_pushnotification where f_recive_userid = a.f_recive_userid and f_statusid in ('1')) as f_badge,"; sqlString += " f_title,"; sqlString += " f_content,"; sqlString += " f_recive_devicetype,"; sqlString += " f_recive_deviceid,"; sqlString += " f_recive_userid,"; //sqlString += " f_recive_certificate,"; sqlString += " f_businesstablename,"; sqlString += " f_businesstablekeyname,"; sqlString += " f_businesstablekeyvalue"; sqlString += " from tbl_app_pushnotification a where a.f_statusid = '0'"; sqlString += " and sys_id in ('" + sendIds.Replace("^", "','") + "')"; DataTable dt = _iAccessData.Query(sqlString).Tables[0]; PushNotificationClass pc = new PushNotificationClass(Server.MapPath("~")); string successId = ""; string result = ""; foreach (DataRow dr in dt.Rows) { switch (dr["f_recive_devicetype"].ToString()) { case "ios": result = pc.PushMessageIos(dr["f_recive_deviceid"].ToString(), dr["f_title"].ToString(), dr["f_businesstablename"].ToString() + "^" + dr["f_businesstablekeyname"].ToString() + "^" + dr["f_businesstablekeyvalue"].ToString() + "^" + dr["sys_id"].ToString(), dr["f_badge"].ToString()); break; case "android": result = pc.PushMessageAndroid(dr["f_recive_deviceid"].ToString(), dr["f_title"].ToString()); break; } if (result == "") { successId += dr["sys_id"].ToString() + "^"; } } sqlString = "update tbl_app_pushnotification set f_statusid = '1',f_status = '已发送' where sys_id in ('" + successId.TrimEnd('^').Replace("^", "','") + "')"; _iAccessData.ExecuteSql(sqlString); NewLog("消息发送成功:" + sendIds, "sql_select", clientInf); } catch (Exception ex) { resultDic["result"] = "false"; resultDic["message"] = Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace); NewLog("消息发送失败:" + sendIds + ",异常信息:" + Eva.Library.Format.FormatTextTool.ErrorMessageFormat(ex.Message + ex.StackTrace), "sql_select", clientInf); } return(Eva.Library.Format.FormatEntityTool.FormatDicToJson(resultDic)); }
public string ycDHPay(string paynostr, string wdstr, string sfystr, string gmrq, string khbh, decimal je) { try { sara.dd.ldsw.idal.Itbl_ld_cbiao _idal_tbl_ld_cbiao = new sara.dd.ldsw.dal.tbl_ld_cbiao(); sara.dd.ldsw.idal.Itbl_ld_khb _idal_tbl_ld_khb = new sara.dd.ldsw.dal.tbl_ld_khb(); sara.dd.ldsw.idal.Itbl_ld_jfb idal_tbl_ld_jfb = new sara.dd.ldsw.dal.tbl_ld_jfb(); List <sara.dd.ldsw.model.tbl_ld_cbiao> modellist = _idal_tbl_ld_cbiao.GetList(" f_khbh='" + khbh + "' and f_ztid='2' and (f_cbbh like 'DH%' or f_cbbh like 'ZB%')", "false", "", "*", "", "", null); List <sara.dd.ldsw.model.tbl_ld_khb> khmodellist = _idal_tbl_ld_khb.GetList(" f_khbh='" + khbh + "'", "", "*", "", "", null); if (modellist.Count == 1 && Eva.Library.Text.NumberTool.Parse(modellist[0].f_bqje) == (double)je) { sara.dd.ldsw.model.tbl_ld_cbiao model = modellist[0]; sara.dd.ldsw.model.tbl_ld_khb khmodel = khmodellist[0]; #region 创建缴费记录 //时间信息 DateTimeFormatInfo dtFormat = new DateTimeFormatInfo(); dtFormat.ShortDatePattern = "yyyy/MM/dd"; System.DateTime currentTime = new System.DateTime(); currentTime = System.DateTime.Now; DateTime blankTime = DateTime.Parse("1900-01-01"); sara.dd.ldsw.model.tbl_ld_jfb jfmodel = new model.tbl_ld_jfb(); //jfmodel.sys_id = int.Parse(idal_tbl_ld_jfb.GetMaxId(null)); jfmodel.sys_creatuserid = "1564"; jfmodel.sys_creatusername = "******"; jfmodel.sys_creatdate = currentTime; jfmodel.sys_lastedituserid = "1564"; jfmodel.sys_lasteditusername = "******"; jfmodel.sys_lasteditdate = currentTime; jfmodel.sys_deldate = blankTime; jfmodel.sys_delflag = "0"; jfmodel.f_jfbh = commonclass.commonclass.getBusinessNum("JF", "", null); jfmodel.f_jfrq = currentTime; jfmodel.f_jffs = "邮储代缴大用户"; jfmodel.f_jffsid = "05740014"; jfmodel.f_jcfs = "全额找零"; jfmodel.f_jcfsid = "05750001"; jfmodel.f_yyy = "PBT"; jfmodel.f_yyyid = "1564"; jfmodel.f_czsj = currentTime; jfmodel.f_sfykfp = "false"; jfmodel.f_zt = "已提交"; jfmodel.f_ztid = "2"; jfmodel.f_khbh = khmodel.f_khbh; jfmodel.f_khbhid = khmodel.sys_id.ToString(); jfmodel.f_yhbh = khmodel.f_yhbh; jfmodel.f_yhbhid = khmodel.f_yhbhid; jfmodel.f_yhm = khmodel.f_yhm; jfmodel.f_jfm = khmodel.f_jfm; jfmodel.f_dh = khmodel.f_dh; jfmodel.f_dz = khmodel.f_dz; jfmodel.f_dy = khmodel.f_dy; jfmodel.f_dyid = khmodel.f_dyid; jfmodel.f_sc = khmodel.f_sc; jfmodel.f_scid = khmodel.f_scid; jfmodel.f_qy = khmodel.f_qy; jfmodel.f_qyid = khmodel.f_qyid; jfmodel.f_pq = khmodel.f_pq; jfmodel.f_pqid = khmodel.f_pqid; jfmodel.f_sbbh = khmodel.f_sbbh; jfmodel.f_sbbhid = khmodel.f_sbbhid; jfmodel.f_sblx = khmodel.f_sblx; jfmodel.f_sblxid = khmodel.f_sblxid; jfmodel.f_yslx = khmodel.f_yslx; jfmodel.f_yslxid = khmodel.f_yslxid; jfmodel.f_lxtkhh = khmodel.f_lxth; jfmodel.f_rs = khmodel.f_rs; jfmodel.f_cbbh = model.f_cb_cbbh; jfmodel.f_cbbhid = model.sys_id.ToString(); jfmodel.f_cbyslj = model.f_bqje; jfmodel.f_sllj = model.f_bqsl; jfmodel.f_sflj = model.f_sf; jfmodel.f_pwflj = model.f_pwf; jfmodel.f_dj = Eva.Library.Text.NumberTool.GetNumberByLength(Eva.Library.Text.NumberTool.Parse(jfmodel.f_cbyslj) / Eva.Library.Text.NumberTool.Parse(jfmodel.f_sllj), 2); jfmodel.f_jmhyslj = model.f_bqje; jfmodel.f_khytjjzsf = khmodel.f_tjjzsf; jfmodel.f_khytjjzpwf = khmodel.f_tjjzpwf; jfmodel.f_sfsytjjz = "false"; jfmodel.f_sytjjzsf = "0"; jfmodel.f_sytjjzpwf = "0"; jfmodel.f_syhtjjzsf = khmodel.f_tjjzsf; jfmodel.f_syhtjjzpwf = khmodel.f_tjjzpwf; jfmodel.f_khyye = khmodel.f_ycje; jfmodel.f_sfsyye = "false"; jfmodel.f_syye = "0"; jfmodel.f_yhye = khmodel.f_ycje; jfmodel.f_shys = model.f_bqje; jfmodel.f_shss = model.f_bqje; jfmodel.f_hszl = "0"; jfmodel.f_shssdx = sara.dd.ldsw.commonclass.commonclass.num2String((Eva.Library.Text.NumberTool.Parse(jfmodel.f_cbyslj))); jfmodel.f_khfz = khmodel.f_khfz; jfmodel.f_khfzid = khmodel.f_khfzid; jfmodel.f_cbenbh = khmodel.f_cbbh; jfmodel.f_cbenbhid = khmodel.f_cbbhid; jfmodel.f_ljqf = khmodel.f_ljqf; jfmodel.f_jmjelj = "0"; jfmodel.f_ly = "邮储银行缴费"; jfmodel.f_lyid = "08080008"; jfmodel.f_sfjl = model.f_sfjl; //插入缴费表 string jfsysid = idal_tbl_ld_jfb.Add(jfmodel, null); #endregion #region 更新抄表表 model.f_zt = "已缴费"; model.f_ztid = "3"; model.f_jfbh = jfmodel.f_jfbh; model.f_jfbhid = jfsysid; model.f_jfsj = jfmodel.f_jfrq; _idal_tbl_ld_cbiao.Update(model, "f_zt,f_ztid,f_jfbh,f_jfbhid,f_jfsj", null); #endregion #region 更新客户表 khmodel.f_ljqf = "0"; _idal_tbl_ld_khb.Update(khmodel, "f_ljqf", null); List <IDictionary <string, string> > array = new List <IDictionary <string, string> >(); IDictionary <string, string> temp = null; temp = new Dictionary <string, string>(); temp.Add("key", "f_ljqf"); temp.Add("oldvalue", khmodel.f_ljqf); temp.Add("newvalue", "0"); temp.Add("name", "累计欠费"); array.Add(temp); sara.dd.ldsw.commonclass.commonclass.addUpdateLog("tbl_ld_khb", model.f_khbhid.ToString(), "tbl_ld_jfb_detail", "邮储代缴大用户", array, "", null); #endregion #region 增加对账记录 _iAccessData = sara.dd.ldsw.commonclass.commonclass.CreateIAccessData(); string sql = "insert into TBL_LD_YCXZJL (f_lsh,f_wd,f_sfy,f_gmrq,f_khbh,f_gmsl,f_sfje,f_lx,sys_id) VALUES ('" + paynostr + "','" + wdstr + "','" + sfystr + "','" + gmrq + "','" + khbh + "','" + model.f_bqsl + "','" + je + "','DH',SEQ_TBL_LD_YCXZJL.nextval)"; int ins = _iAccessData.ExecuteSql(sql); if (ins > 0) { return("true"); } else { return("false"); } #endregion } else { //销账状态 return("false"); } } catch (Exception ex) { //程序异常 return("error"); } }
private string GetUserInfJsonString(string userIdString, string deviceTokenString, string deviceTypeString, string userLoginNameString, IDictionary <String, String> userInfDic, Eva.Library.Data.AccessData.IAccessData _iAccessData) { string sqlString = ""; #region 装载用户信息 DataSet dsInf = sara.platform.service.auth.Service.GetUserInfByUserid(userIdString); DataSet dsOrg = sara.platform.service.auth.Service.GetUserOrganByUserid(userIdString); DataSet dsGroup = sara.platform.service.auth.Service.GetUserGroupByUserid(userIdString); DataSet dsPosition = sara.platform.service.auth.Service.GetUserPositionByUserid(userIdString); DataSet userFieldDataSet = sara.platform.service.auth.Service.GetUserFieldByUserid(userIdString); string userInfJson = "{"; #region user userInfJson += "\"sys_userid\":\"" + userIdString + "\","; userInfJson += "\"sys_username\":\"" + dsInf.Tables[0].Rows[0]["U_Name"].ToString() + "\","; userInfJson += "\"sys_userloginname\":\"" + dsInf.Tables[0].Rows[0]["U_Code"].ToString() + "\","; //手写签名的图片地址 userInfJson += "\"sys_signedurl\":\"" + dsInf.Tables[0].Rows[0]["U_SIGNEDURL"].ToString() + "\","; //头像的图片地址 userInfJson += "\"sys_phototurl\":\"" + dsInf.Tables[0].Rows[0]["U_PHOTOTURL"].ToString() + "\","; userInfJson += "\"sys_devicetoken\":\"" + deviceTokenString + "\","; userInfJson += "\"sys_devicetype\":\"" + deviceTypeString + "\","; #endregion #region organ if (dsOrg.Tables[0].Rows.Count > 0) { userInfJson += "\"sys_organid\":\"" + dsOrg.Tables[0].Rows[0]["O_ID"].ToString() + "\","; userInfJson += "\"sys_organcode\":\"" + dsOrg.Tables[0].Rows[0]["O_CODE"].ToString() + "\",";//用于组装流程编号 userInfJson += "\"sys_organname\":\"" + dsOrg.Tables[0].Rows[0]["O_FullName"].ToString() + "\","; } else { userInfJson += "\"sys_organid\":\"" + "" + "\","; userInfJson += "\"sys_organcode\":\"" + "" + "\","; userInfJson += "\"sys_organname\":\"" + "" + "\","; } if (dsInf.Tables[0].Rows[0]["U_REMARK"].ToString() != "") { sqlString = "select o_id,o_fullname from t_organ where o_id in ('" + dsInf.Tables[0].Rows[0]["U_REMARK"].ToString() + "') "; DataSet ds_TopOrgan = sara.platform.service.auth.Service.QuerySql(sqlString); userInfJson += "\"sys_toporgan\":\"" + dsInf.Tables[0].Rows[0]["U_REMARK"].ToString() + "\","; if (ds_TopOrgan.Tables[0].Rows.Count > 0) { userInfJson += "\"sys_toporganname\":\"" + ds_TopOrgan.Tables[0].Rows[0]["o_fullname"].ToString() + "\","; } else { userInfJson += "\"sys_toporganname\":\"\","; } } else { userInfJson += "\"sys_toporgan\":\"\","; userInfJson += "\"sys_toporganname\":\"\","; } #endregion #region groups if (dsGroup.Tables[0].Rows.Count > 0) { string groups = ""; for (int i = 0; i < dsGroup.Tables[0].Rows.Count; i++) { if (dsGroup.Tables[0].Rows[i]["g_sys_appcode"].ToString() == "" || ("," + dsGroup.Tables[0].Rows[i]["g_sys_appcode"].ToString() + ",").IndexOf("," + Eva.Library.Configuration.ConfigurationManager.AppSettings["APPCODE"] + ",") > -1) { groups += "{"; groups += "\"g_id\":\"" + dsGroup.Tables[0].Rows[i]["g_id"].ToString() + "\","; groups += "\"g_name\":\"" + dsGroup.Tables[0].Rows[i]["g_name"].ToString() + "\","; groups += "\"f_value1\":\"" + dsGroup.Tables[0].Rows[i]["f_value1"].ToString() + "\","; groups += "\"f_value2\":\"" + dsGroup.Tables[0].Rows[i]["f_value2"].ToString() + "\""; groups += "},"; } } userInfJson += "\"sys_groups\":[" + groups.TrimEnd(',') + "],"; } else { userInfJson += "\"sys_groups\":[],"; } #endregion #region position if (dsPosition.Tables[0].Rows.Count > 0) { string positionids = ""; string positionnames = ""; for (int i = 0; i < dsPosition.Tables[0].Rows.Count; i++) { if (("," + dsPosition.Tables[0].Rows[i]["p_sys_appcode"].ToString() + ",").IndexOf("," + Eva.Library.Configuration.ConfigurationManager.AppSettings["APPCODE"] + ",") > -1) { positionids += "" + dsPosition.Tables[0].Rows[i]["p_id"].ToString() + "^"; positionnames += "" + dsPosition.Tables[0].Rows[i]["p_fullname"].ToString() + "^"; } } userInfJson += "\"sys_positionids\":\"" + positionids.TrimEnd('^') + "\","; userInfJson += "\"sys_positionnames\":\"" + positionnames.TrimEnd('^') + "\","; } else { userInfJson += "\"sys_positionids\":\"" + "" + "\","; userInfJson += "\"sys_positionnames\":\"" + "\","; } #endregion #region field string userFieldString = ""; string whereString = " ','+sys_appcode+',' like '%," + Eva.Library.Configuration.ConfigurationManager.AppSettings["AppCode"] + ",%' "; whereString += " and len(F_NODEID) = 4 "; whereString += " and f_type = 'app'"; DataRow[] userFieldDataRow = userFieldDataSet.Tables[0].Select(whereString);//应该只有一行数据 //indexview的nodeid string whereString8 = " ','+sys_appcode+',' like '%," + Eva.Library.Configuration.ConfigurationManager.AppSettings["AppCode"] + ",%' "; whereString8 += " and len(F_NODEID) = 8 "; whereString8 += " and f_value1 = 'htmlview' "; DataRow[] userFieldDataRow8 = userFieldDataSet.Tables[0].Select(whereString8);//应该只有一行数据 string indexViewNodeid = ""; if (userFieldDataRow8.Length > 0) { indexViewNodeid = userFieldDataRow8[0]["F_NODEID"].ToString(); } //meview的nodeid string whereString9 = " ','+sys_appcode+',' like '%," + Eva.Library.Configuration.ConfigurationManager.AppSettings["AppCode"] + ",%' "; whereString9 += " and len(F_NODEID) = 8 "; whereString9 += " and f_value1 = 'meview' "; DataRow[] userFieldDataRow9 = userFieldDataSet.Tables[0].Select(whereString9);//应该只有一行数据 string meViewNodeid = ""; if (userFieldDataRow9.Length > 0) { meViewNodeid = userFieldDataRow9[0]["F_NODEID"].ToString(); } for (int i = 0; i < userFieldDataRow.Length; i++) { string whereString1 = " ','+sys_appcode+',' like '%," + Eva.Library.Configuration.ConfigurationManager.AppSettings["AppCode"] + ",%' "; whereString1 += " and len(F_NODEID) > 4 "; whereString1 += "and F_NODEID like '" + userFieldDataRow[i]["F_NODEID"].ToString() + "%'"; DataRow[] userFieldDataRow1 = userFieldDataSet.Tables[0].Select(whereString1); for (int j = 0; j < userFieldDataRow1.Length; j++) { if (userFieldDataRow1[j]["F_NODEID"].ToString().IndexOf(indexViewNodeid) == 0 && userFieldDataRow1[j]["F_NODEID"].ToString() != indexViewNodeid) { } else if (userFieldDataRow1[j]["F_NODEID"].ToString().IndexOf(meViewNodeid) == 0 && userFieldDataRow1[j]["F_NODEID"].ToString() != meViewNodeid) { } else { userFieldString += "{"; userFieldString += "\"f_id\":\"" + userFieldDataRow1[j]["F_ID"].ToString() + "\","; userFieldString += "\"f_nodeid\":\"" + userFieldDataRow1[j]["F_NODEID"].ToString() + "\","; userFieldString += "\"f_name\":\"" + userFieldDataRow1[j]["F_NAME"].ToString() + "\","; userFieldString += "\"f_type\":\"" + userFieldDataRow1[j]["F_TYPE"].ToString() + "\","; userFieldString += "\"sys_appcode\":\"" + userFieldDataRow1[j]["SYS_APPCODE"].ToString() + "\","; userFieldString += "\"f_value1\":\"" + userFieldDataRow1[j]["F_VALUE1"].ToString() + "\","; userFieldString += "\"f_value2\":\"" + userFieldDataRow1[j]["F_VALUE2"].ToString() + "\","; userFieldString += "\"f_value3\":\"" + userFieldDataRow1[j]["F_VALUE3"].ToString() + "\","; userFieldString += "\"f_value4\":\"" + userFieldDataRow1[j]["F_VALUE4"].ToString() + "\","; userFieldString += "\"f_value5\":\"" + userFieldDataRow1[j]["F_VALUE5"].ToString() + "\","; userFieldString += "\"f_value6\":\"" + userFieldDataRow1[j]["F_VALUE6"].ToString() + "\","; userFieldString += "\"f_value7\":\"" + userFieldDataRow1[j]["F_VALUE7"].ToString() + "\","; userFieldString += "\"f_value8\":\"" + userFieldDataRow1[j]["F_VALUE8"].ToString() + "\","; userFieldString += "\"f_value9\":\"" + userFieldDataRow1[j]["F_VALUE9"].ToString() + "\","; userFieldString += "\"f_value10\":\"" + userFieldDataRow1[j]["F_VALUE10"].ToString() + "\""; //userFieldString += "\"f_children\":["; //userFieldString += GetChildRenField(userFieldDataSet, userFieldDataRow1[j]["F_NODEID"].ToString(), 12); //userFieldString += "]"; userFieldString += "},"; } } } userFieldString = "[" + userFieldString.TrimEnd(',') + "]"; userInfJson += "\"sys_fields\":" + userFieldString + ","; #endregion userInfJson += "\"sys_end\":\"\""; userInfJson += "}"; #endregion //如果没有权限 if (userFieldDataRow.Length == 0) { userInfJson = "-1"; } else { #region update user f_value6更新用户手机类型和deviceTonke //未注册用户不用保存手机类型 if (userLoginNameString != "nouser" && userLoginNameString != "") { string parameterString = "f_value6:" + deviceTypeString + ";"; parameterString += "f_value8:" + deviceTokenString + ";"; sara.platform.service.auth.Service.UpdateUserAttr(userIdString, parameterString); } #endregion #region 写日至 //写入登陆日至 try { //未注册用户不用记录日志 if (userLoginNameString != "nouser" && userLoginNameString != "") { sqlString = ""; sqlString += " insert into t_login_log "; sqlString += " (sys_id, f_userid, f_userloginname, f_username, f_date, f_ip, f_mac, f_clienttype, f_loginpattern) "; sqlString += " values "; //sqlString += " ((select nvl(max(sys_id), 0) + 1 as sys_id from t_login_log), "; sqlString += " ('1', "; sqlString += " '" + userIdString + "', "; sqlString += " '" + userLoginNameString + "', "; sqlString += " '" + dsInf.Tables[0].Rows[0]["U_Name"].ToString() + "',"; sqlString += " to_date('" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "', 'yyyy-MM-dd hh24:mi:ss'),"; sqlString += " '" + userInfDic["userip"].ToString() + "',"; sqlString += " '" + userInfDic["usermac"].ToString() + "',"; sqlString += " '" + userInfDic["devicetype"].ToString() + "',"; sqlString += " '" + userInfDic["devicetype"].ToString() + "') "; _iAccessData.ExecuteSql(sqlString); } } catch { } #endregion } return(userInfJson); }