/// <summary> /// 获取通过手机号登陆 /// </summary> /// <param name="account"手机号></param> /// <param name="password">密码</param> /// <returns>返回结果</returns> public string GetInfoByMobileLogin(string strAccount, string strPassword) { Dictionary <string, string> info = new Dictionary <string, string>(); string strJson = string.Empty; string strSql = string.Format(@"select b.code_user,a.password from tb_sys_user a, tb_sys_userinfo b where a.code_user=b.code_user and b.mobile='{0}'", strAccount); //判断用户(手机号)是否存在 var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathIport).ExecuteTable(strSql); if (dt.Rows.Count <= 0) { strJson = JsonConvert.SerializeObject(new DicPackage(false, null, "用户名或密码错误!").DicInfo()); log.LogCatalogFailure("用户名或密码错误!"); return(strJson); } if (!Identity.VerifyText(Format.Trim(strPassword), dt.Rows[0]["password"] as string)) { strJson = JsonConvert.SerializeObject(new DicPackage(false, null, "用户名或密码错误!").DicInfo()); log.LogCatalogFailure("用户名或密码错误!"); return(strJson); } strJson = JsonConvert.SerializeObject(new DicPackage(true, Convert.ToString(dt.Rows[0]["code_user"]), null).DicInfo()); log.LogCatalogSuccess(); return(strJson); }
public string RegisterIportUser() { string strJson = string.Empty; string strXmlParams = string.Format("<params><loginname>{0}</loginname><password>{1}</password><username>{2}</username><companycode>{3}</companycode><departmentcode>{4}</departmentcode><usertypecode>{5}</usertypecode><workno>{6}</workno><mobile>{7}</mobile><phone>{8}</phone><qq>{9}</qq><email>{10}</email></params>", registerE.strLogogram, registerE.strPassword1, registerE.strUserName, registerE.strCompanyCode, registerE.strDepartmentCode, registerE.strUserTypeCode, registerE.strWorkNo, registerE.strMobile, registerE.strPhone, registerE.strQQ, registerE.strEmail); //校验手机号 strJson = VerifyMobile(registerE.strMobile); if (!string.IsNullOrWhiteSpace(strJson)) { return(strJson); } //校验密码 if (registerE.strPassword1.Length < 6 || registerE.strPassword1.Length > 32 || registerE.strPassword2.Length < 6 || registerE.strPassword2.Length > 32) { strJson = JsonConvert.SerializeObject(new DicPackage(false, null, "密码应为6~32个字符!").DicInfo()); log.LogCatalogFailure("密码应为6~32个字符!"); return(strJson); } if (registerE.strPassword1 != registerE.strPassword2) { strJson = JsonConvert.SerializeObject(new DicPackage(false, null, "密码不一致!").DicInfo()); log.LogCatalogFailure("密码不一致!"); return(strJson); } bool isSuccess = YGSoft.IPort.MobileManage.Interface.Core.ServiceUser.Add(strXmlParams).Value; if (!isSuccess) { strJson = JsonConvert.SerializeObject(new DicPackage(false, null, YGSoft.IPort.MobileManage.Interface.Core.ServiceUser.Add(strXmlParams).Message).DicInfo()); log.LogCatalogFailure(YGSoft.IPort.MobileManage.Interface.Core.ServiceUser.Add(strXmlParams).Message); } else { string strSql = string.Format("select code_user from TB_SYS_USER where logogram='{0}'", registerE.strLogogram); var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathIport).ExecuteTable(strSql); strJson = JsonConvert.SerializeObject(new DicPackage(true, Convert.ToString(dt.Rows[0]["code_user"]), null).DicInfo()); log.LogCatalogSuccess(); } return(strJson); }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //账号(手机号或Iport账号) string strAccount = Request.Form["Account"]; //密码 string strPassword = Request.Form["Password"]; ////账号(手机号或Iport账号) //string strAccount = Request.Params["Account"]; ////密码 //string strPassword = Request.Params["Password"]; AppLog log = new AppLog(Request); log.strAccount = strAccount; log.strBehavior = "用户登陆"; log.strBehaviorURL = "/Entrance/Login.aspx"; try { if (strAccount == null || strPassword == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,登陆失败!").DicInfo()); return; } ILogin iLogin = new ILogin(log); //手机号登录&&Iport账号登录 if (TokenTool.VerifyMobile(strAccount) == "ture") { Json = iLogin.GetInfoByMobileLogin(strAccount, strPassword); }//手机号登陆 else { Json = iLogin.GetInfoByUserNameLogin(strAccount, strPassword); }//Iport账号登录 } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:用户登陆数据发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:用户登陆数据发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误").DicInfo()); return; } //账户 string strAccount = Request.Params["Account"]; //ID string strId = Request.Params["Id"]; //处理结果评价 string strHandleResult_Evaluate = Request.Params["HandleResult_Evaluate"]; //处理结果评分 string strHandleResult_Score = Request.Params["HandleResult_Score"]; AppLog log = new AppLog(Request); log.strBehavior = "发布评价"; log.strBehaviorURL = "/Service/Complain/ReleaseEvaluate_Handled_Of_Complain.aspx"; log.strAccount = strAccount; try { if (strAccount == null || strId == null || strHandleResult_Evaluate == null || strHandleResult_Score == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,发布评价失败").DicInfo()); return; } //投诉处理结果发布评价 string strSql = string.Format(@"update SER_COMPLAIN t set t.Evaluate='{0}',t.index_satisfy='{1}',t.evaluate_time=sysdate where id='{2}'", strHandleResult_Evaluate, strHandleResult_Score, strId); new Leo.Oracle.DataAccess(RegistryKey.KeyPathCGate).ExecuteNonQuery(strSql); Json = JsonConvert.SerializeObject(new DicPackage(true, null, "发布成功").DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:发布评价发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:发布评价发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误").DicInfo()); return; } //账户 string strAccount = Request.Params["Account"]; //Id string strId = Request.Params["Id"]; AppLog log = new AppLog(Request); log.strBehavior = "删除待评估"; log.strBehaviorURL = "/Service/Evaluate/DeleteToEvaluate.aspx"; log.strAccount = strAccount; try { if (strAccount == null || strId == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,删除待评估失败").DicInfo()); return; } //删除待评估 string strSql = string.Format(@"update TB_PRO_CONSIGNVEHICLE t set t.delete_mark_ser_evaluate='1' where t.id='{0}'", strId); new Leo.Oracle.DataAccess(RegistryKey.KeyPathHarbor).ExecuteNonQuery(strSql); Json = JsonConvert.SerializeObject(new DicPackage(true, null, "删除成功").DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}删除待评估发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:删除待评估发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误").DicInfo()); return; } //账户 string strAccount = Request.Params["Account"]; //Id string strId = Request.Params["Id"]; AppLog log = new AppLog(Request); log.strBehavior = "删除我的投诉"; log.strBehaviorURL = "/Service/Complain/DeleteMyComplain.aspx"; log.strAccount = strAccount; try { if (strAccount == null || strId == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,删除我的投诉失败").DicInfo()); return; } //删除我的投诉 string strSql = string.Format(@"delete from SER_COMPLAIN where id='{0}'", strId); new Leo.Oracle.DataAccess(RegistryKey.KeyPathCGate).ExecuteNonQuery(strSql); Json = JsonConvert.SerializeObject(new DicPackage(true, null, "删除成功").DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:删除我的投诉发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:删除我的投诉发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //航次Id string strShipId = Request.Params["ShipId"]; //船舶Id string strV_Id = Request.Params["V_Id"]; //箱号 string strContainerNo = Request.Params["ContainerNo"]; //目标贝号 string strEndBayno = Request.Params["EndBayno"]; //用户ID string strUserId = Request.Params["UserId"]; //strShipId = "195"; //strV_Id = "6321"; //strContainerNo = "CXDU2283528"; //strEndBayno = "050304"; //strUserId = "215"; AppLog log = new AppLog(Request); log.strBehavior = "移贝"; log.strBehaviorURL = "/Move/MoveBay.aspx"; log.strAccount = strUserId; try { if (strShipId == null || strV_Id == null || strContainerNo == null || strEndBayno == null || strUserId == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,移贝失败!").DicInfo()); log.LogCatalogFailure(string.Format("参数错误,移贝失败")); return; } da.BeginTransaction(); IMoveBay iMoveBay = new IMoveBay(log); iMoveBay.setDataAccess(da); //校验目标贝位号是否存在 if (!iMoveBay.isExistBayno(strV_Id, strEndBayno)) { Json = JsonConvert.SerializeObject(new DicPackage(true, null, "错误贝位号").DicInfo()); log.LogCatalogFailure(string.Format("错误贝位号")); return; } string strOperareName = string.Empty; string strSql = string.Format(@"select distinct name from SYSTEM_USER_TABLE where user_id='{0}'", strUserId); var dt = new Leo.SqlServer.DataAccess(RegistryKey.KeyPathTallySqlServer).ExecuteTable(strSql); if (dt.Rows.Count > 0) { strOperareName = Convert.ToString(dt.Rows[0]["name"]); } //获取待移集装箱信息 strSql = string.Format(@"select size_con,bayno from con_image where container_no='{0}' and ship_id={1}", strContainerNo, strShipId); dt = da.ExecuteTable(strSql); if (dt.Rows.Count <= 0) { Json = JsonConvert.SerializeObject(new DicPackage(true, null, "待移集装箱号不存在").DicInfo()); log.LogCatalogFailure(string.Format("待移集装箱号不存在")); return; } if (Convert.ToInt16(dt.Rows[0]["size_con"]) == 20) { Json = iMoveBay.MoveBayOfTwenty(strShipId, strContainerNo, Convert.ToString(dt.Rows[0]["bayno"]), strEndBayno, strOperareName); } else { Json = iMoveBay.MoveBayOfForty(strShipId, strContainerNo, Convert.ToString(dt.Rows[0]["bayno"]), strEndBayno, strOperareName); } if (Json != null) { return; } da.CommitTransaction(); Json = JsonConvert.SerializeObject(new DicPackage(true, null, "上传成功!").DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { da.RollbackTransaction(); Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:移贝发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:移贝发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //用户名 string strAccount = Request.Params["Account"]; //密码 string strPassword = Request.Params["Password"]; AppLog log = new AppLog(Request); log.strAccount = strAccount; log.strBehavior = "用户登陆"; log.strBehaviorURL = "/Entrance/Login.aspx"; try { if (strAccount == null || strPassword == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,登录失败!").DicInfo()); return; } string strSql = null; strSql = string.Format("select username from tb_app_tally_user where logogram='{0}'", strAccount); var dt0 = new Leo.Oracle.DataAccess(RegistryKey.KeyPathTally).ExecuteTable(strSql); if (dt0.Rows.Count >= 0) { strSql = string.Format(@"select user_id,password,serial_nam,work_no from SYSTEM_USER_TABLE where serial_nam='{0}' and password='******'", strAccount, strPassword); } else { strSql = string.Format(@"select user_id,password,serial_nam,work_no from SYSTEM_USER_TABLE where serial_nam='{0}' and password='******' and work_no is not null", strAccount, strPassword); } var dt1 = new Leo.SqlServer.DataAccess(RegistryKey.KeyPathTallySqlServer).ExecuteTable(strSql); if (dt1.Rows.Count <= 0) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "用户名或密码错误!").DicInfo()); return; } //string[] strArray = new string[4]; //strArray[0] = Convert.ToString(dt.Rows[0]["user_id"].ToString()); //strArray[1] = Convert.ToString(dt.Rows[0]["serial_nam"].ToString()); //strArray[2] = Convert.ToString(dt.Rows[0]["password"].ToString()); //strArray[3] = Convert.ToString(dt.Rows[0]["work_no"].ToString()); Json = JsonConvert.SerializeObject(new DicPackage(true, dt1.Rows[0]["user_id"].ToString(), null).DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取登录数据发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:获取登录数据发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } ////账号(内部网账号) //string strAccount = Request.Form["Account"]; ////密码 //string strPassword = Request.Form["Password"]; //账号(手机号或Iport账号) string strAccount = Request.Params["Account"]; //密码 string strPassword = Request.Params["Password"]; AppLog log = new AppLog(Request); log.strAccount = strAccount; log.strBehavior = "用户登陆"; log.strBehaviorURL = "/Entrance/Nbw/Login.aspx"; try { if (strAccount == null || strPassword == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,登陆失败!").DicInfo()); return; } string strSql = string.Format(@"select id,pwd from user_info where username='******'", strAccount); //判断用户是否存在 var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathNbw).ExecuteTable(strSql); if (dt.Rows.Count == 0) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "用户名或密码错误!").DicInfo()); log.LogCatalogFailure("用户名或密码错误!"); return; } if (!strPassword.Equals(Convert.ToString(dt.Rows[0]["pwd"]))) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "用户名或密码错误!").DicInfo()); log.LogCatalogFailure("用户名或密码错误!"); return; } Json = JsonConvert.SerializeObject(new DicPackage(true, Convert.ToString(dt.Rows[0]["id"]), null).DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:用户登陆数据发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:用户登陆数据发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //手机号码 string strMobile = Request.Form["Mobile"]; //密码1 string strPassword1 = Request.Form["Password1"]; //密码2 string strPassword2 = Request.Form["Password2"]; AppLog log = new AppLog(Request); log.strBehavior = "找回密码"; log.strBehaviorURL = "/Entrance/RetrievePassword.aspx"; try { if (strMobile == null || strPassword1 == null || strPassword2 == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,修改密码失败!").DicInfo()); return; } string strSql = string.Format("select code_user from TB_SYS_USERINFO where mobile ='{0}'", strMobile); var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathIport).ExecuteTable(strSql); if (dt.Rows.Count <= 0) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "用户名错误!").DicInfo()); return; } //校验新密码 if (strPassword1.Length < 6 || strPassword1.Length > 32 || strPassword2.Length < 6 || strPassword2.Length > 32) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "密码应为6~32个字符!").DicInfo()); return; } if (!strPassword1.Equals(strPassword2)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "新密码不一致!").DicInfo()); return; } //string strXmlParams = // string.Format("<params><usercode>{0}</usercode><oldpassword>{1}</oldpassword><newpassword>{2}</newpassword></params>", // strCodeUser, strOldPassword, strNewPassword1); //ServiceIportUser.WebServiceUserSoapClient service = new ServiceIportUser.WebServiceUserSoapClient(); //string strReturnMessage = service.UpdatePassword(strXmlParams, 1); //RetureMessage retureMessage = JsonConvert.DeserializeObject<RetureMessage>(strReturnMessage); //if ((bool)retureMessage.Value == false) //{ // Json = JsonConvert.SerializeObject(new DicPackage(false, null, retureMessage.Message).DicInfo()); //} //else //{ // Json = JsonConvert.SerializeObject(new DicPackage(true, null, "密码重置成功!").DicInfo()); //} Json = JsonConvert.SerializeObject(new DicPackage(true, null, "接口调式中!").DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:找回密码数据发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:找回密码数据发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //船图列表 string strShipImageList = Request.Params["ShipImageList"]; AppLog log = new AppLog(Request); log.strBehavior = "上传已修改贝船图数据"; log.strBehaviorURL = "/Ship/UploadShipImages.aspx"; try { if (strShipImageList == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,上传已修改贝船图数据失败!").DicInfo()); return; } List <ShipImage> list = JsonConvert.DeserializeObject <List <ShipImage> >(strShipImageList); log.strAccount = list[0].modifier; List <string> containerNoList = new List <string>(); for (int i = 0; i < list.Count; i++) { ShipImage shipImage = list[i]; string strTempContainerNo = shipImage.container_no; string strTempBaynum = shipImage.baynum; //箱号不能为空 if (!string.IsNullOrWhiteSpace(strTempContainerNo) && !string.IsNullOrWhiteSpace(strTempBaynum) && !strTempBaynum.Equals("null") && containerNoList.IndexOf(strTempContainerNo) == -1) { //遍历是否有重复箱号的数据 int j; for (j = i + 1; j < list.Count; j++) { if (strTempContainerNo.Equals(list[j].container_no) && list[j].bayno != null && !list[j].bayno.Equals("null") && !list[j].bayno.Equals("")) { if (!string.IsNullOrWhiteSpace(shipImage.baynum) && !shipImage.baynum.Equals("null")) { if (Convert.ToInt16(shipImage.baynum) > Convert.ToInt16(list[j].baynum)) { shipImage = list[j]; } } } } if (i == list.Count - 1) { shipImage = list[i]; } containerNoList.Add(shipImage.container_no); string strOperareName = string.Empty; string strSql = string.Format(@"select distinct name from SYSTEM_USER_TABLE where user_id='{0}'", shipImage.modifier); var dt = new Leo.SqlServer.DataAccess(RegistryKey.KeyPathTallySqlServer).ExecuteTable(strSql); if (dt.Rows.Count > 0) { strOperareName = dt.Rows[0]["name"].ToString(); } strSql = string.Format(@"select MOVED,BAYNO,OLDBAYNO,USER_NAME,SIZE_CON,WORK_NO from CON_IMAGE where SHIP_ID='{0}' and CONTAINER_NO='{1}'", shipImage.ship_id, shipImage.container_no); dt = da.ExecuteTable(strSql); if (dt.Rows.Count <= 0) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "暂无数据!").DicInfo()); log.LogCatalogFailure(string.Format("上传已修改贝船图数据发生异常。航次'{0}'、箱号'{1}'不存在", shipImage.ship_id, shipImage.container_no)); return; } string strBayno = string.Empty; string strOldbayno = string.Empty; string strUserName = string.Empty; if (shipImage.bayno != null && !shipImage.bayno.Equals("null")) { strBayno = shipImage.bayno; } if (dt.Rows[0]["BAYNO"].ToString() != null && !dt.Rows[0]["BAYNO"].ToString().Equals("null")) { strOldbayno = dt.Rows[0]["BAYNO"].ToString(); } if (strOperareName != null && !strOperareName.Equals("null")) { strUserName = strOperareName; } //保留原船图数据记录 strSql = string.Format(@"insert into TB_APP_TALLY_LOG (SHIP_ID,CONTAINER_NO,BAYNO,OLDBAYNO,MOVED,USER_NAME,BAY_OPERNAME,BAY_OPERTIME,SIZE_CON,WORK_NO,MOVEDBAYNO) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',to_date('{7}','yyyy-mm-dd HH24:mi:ss'),'{8}','{9}','{10}')", shipImage.ship_id, shipImage.container_no, dt.Rows[0]["BAYNO"].ToString(), dt.Rows[0]["OLDBAYNO"].ToString(), dt.Rows[0]["MOVED"].ToString(), dt.Rows[0]["USER_NAME"].ToString(), shipImage.modifier, shipImage.modifytime, dt.Rows[0]["SIZE_CON"].ToString(), dt.Rows[0]["WORK_NO"].ToString(), strBayno); da.ExecuteNonQuery(strSql); //更新 strSql = string.Format(@"update CON_IMAGE set BAYNO='{0}',OLDBAYNO='{1}',BAY_OPERNAME='{2}',BAY_OPERTIME=to_date('{3}', 'yyyy-mm-dd HH24:mi:ss'),USER_NAME='{4}' where SHIP_ID='{5}' and CONTAINER_NO='{6}'", strBayno, strOldbayno, shipImage.modifier, shipImage.modifytime, strUserName, shipImage.ship_id, shipImage.container_no); da.ExecuteNonQuery(strSql); } } da.CommitTransaction(); Json = JsonConvert.SerializeObject(new DicPackage(true, null, "上传成功!").DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { da.RollbackTransaction(); Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:上传已修改贝船图数据发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:上传已修改贝船图数据发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误").DicInfo()); return; } //账户 string strAccount = Request.Params["Account"]; //ID string strId = Request.Params["Id"]; //停车办证 string strParkingCard = Request.Params["ParkingCard"]; //放行装卸 string strReleaseCargo = Request.Params["ReleaseCargo"]; //港区卡口 string strPortBayonet = Request.Params["PortBayonet"]; //服务态度 string strServiceAttitude = Request.Params["ServiceAttitude"]; //放行速度 string strReleaseSpeed = Request.Params["ReleaseSpeed"]; //装卸速度 string strUninstallSpeed = Request.Params["UninstallSpeed"]; //总体评价 string strOverallEvaluation = Request.Params["OverallEvaluation"]; AppLog log = new AppLog(Request); log.strBehavior = "发布评价"; log.strBehaviorURL = "/Service/Evaluate/ReleaseEvaluate.aspx"; log.strAccount = strAccount; try { if (strAccount == null || strId == null || strParkingCard == null || strReleaseCargo == null || strPortBayonet == null || strServiceAttitude == null || strReleaseSpeed == null || strUninstallSpeed == null || strOverallEvaluation == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,发布评价失败").DicInfo()); return; } //运输申报编号 string strVehicleAttestNo = string.Empty; //部门 string strCodeDepartment = string.Empty; //车号 string strVehicle = string.Empty; //内部委托号 string strCgno = string.Empty; //纸面委托号 string strTaskno = string.Empty; //货名 string strCargo = string.Empty; //船名 string strVessel = string.Empty; //集疏运类别 string strFullorempty = string.Empty; //手机号 string strMobile = string.Empty; //获取运输申报数据 string strSql = string.Format(@"select a.ingateno,a.code_department,a.vehicle,a.driverphone,a.cgno,b.taskno,b.cargo,b.vessel,b.fullorempty from TB_PRO_CONSIGNVEHICLE a, V_CONSIGN_QUICK b where a.cgno=b.cgno and a.id='{0}'", strId); var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathHarbor).ExecuteTable(strSql); if (dt.Rows.Count > 0) { strVehicleAttestNo = Convert.ToString(dt.Rows[0]["ingateno"]); strCodeDepartment = Convert.ToString(dt.Rows[0]["code_department"]); strVehicle = Convert.ToString(dt.Rows[0]["vehicle"]); strCgno = Convert.ToString(dt.Rows[0]["cgno"]); strTaskno = Convert.ToString(dt.Rows[0]["taskno"]); strCargo = Convert.ToString(dt.Rows[0]["cargo"]); strVessel = Convert.ToString(dt.Rows[0]["vessel"]); strFullorempty = Convert.ToString(dt.Rows[0]["fullorempty"]); strMobile = Convert.ToString(dt.Rows[0]["driverphone"]);; } //发布评价 strSql = string.Format(@"insert into SER_EVALUATE (veh_attest_no,code_company,taskno,fullorempty,vessel,cargo,vehicle,driverphone,cgno, evaluate_hall,evaluate_dock,evaluate_gate,index_attitude,index_audit,index_make,index_overall,account) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}',{12},{13},{14},{15},'{16}')", strVehicleAttestNo, strCodeDepartment, strTaskno, strFullorempty, strVessel, strCargo, strVehicle, strMobile, strCargo, strParkingCard, strReleaseCargo, strPortBayonet, strServiceAttitude, strReleaseSpeed, strUninstallSpeed, strOverallEvaluation, strAccount); new Leo.Oracle.DataAccess(RegistryKey.KeyPathCGate).ExecuteNonQuery(strSql); //删除我的评估 strSql = string.Format(@"update TB_PRO_CONSIGNVEHICLE t set t.delete_mark_ser_evaluate='1' where t.id='{0}'", strId); new Leo.Oracle.DataAccess(RegistryKey.KeyPathHarbor).ExecuteNonQuery(strSql); Json = JsonConvert.SerializeObject(new DicPackage(true, null, "发布成功").DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:发布评价发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:发布评价发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //航次Id string strShipId = Request.Params["ShipId"]; //船舶Id string strV_Id = Request.Params["V_Id"]; //箱号1 string strContainerNo1 = Request.Params["ContainerNo1"]; //箱号2 string strContainerNo2 = Request.Params["ContainerNo2"]; //目标贝号 string strEndBayno = Request.Params["EndBayno"]; //用户ID string strUserId = Request.Params["UserId"]; //strShipId = "195"; //strV_Id = "6321"; ////strContainerNo1 = "FCIU4708678"; //strContainerNo1 = "ZGXU2382004"; //strContainerNo2 = "CXDU2375239"; //strEndBayno = "090484"; //strUserId = "215"; AppLog log = new AppLog(Request); log.strBehavior = "双吊"; log.strBehaviorURL = "/Move/DoubleLift.aspx"; log.strAccount = strUserId; try { if (strShipId == null || strV_Id == null || strContainerNo1 == null || strContainerNo2 == null || strEndBayno == null || strUserId == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,双吊失败!").DicInfo()); return; } da.BeginTransaction(); IMoveBay iMoveBay = new IMoveBay(log); iMoveBay.setDataAccess(da); //校验目标贝位号是否存在 if (!iMoveBay.isExistBayno(strV_Id, strEndBayno)) { Json = JsonConvert.SerializeObject(new DicPackage(true, null, "错误贝位号").DicInfo()); log.LogCatalogFailure(string.Format("错误贝位号")); return; } //后通目标贝位号 String backEndBayno = Convert.ToString((Convert.ToInt16(strEndBayno.Substring(0, 2)) + 2)).PadLeft(2, '0') + strEndBayno.Substring(2).PadLeft(4, '0'); //校验后通目标贝位号是否存在 if (!iMoveBay.isExistBayno(strV_Id, backEndBayno)) { Json = JsonConvert.SerializeObject(new DicPackage(true, null, Convert.ToString(strEndBayno.Substring(0, 2)) + "贝不通贝").DicInfo()); log.LogCatalogFailure(string.Format(Convert.ToString(strEndBayno.Substring(0, 2)) + "贝不通贝")); return; } string strOperareName = string.Empty; string strSql = string.Format(@"select distinct name from SYSTEM_USER_TABLE where user_id='{0}'", strUserId); var dt = new Leo.SqlServer.DataAccess(RegistryKey.KeyPathTallySqlServer).ExecuteTable(strSql); if (dt.Rows.Count > 0) { strOperareName = Convert.ToString(dt.Rows[0]["name"]); } //获取待移集装箱信息 strSql = string.Format(@"select size_con,bayno from con_image where container_no='{0}' and ship_id={1}", strContainerNo1, strShipId); var dt1 = da.ExecuteTable(strSql); if (dt1.Rows.Count <= 0) { Json = JsonConvert.SerializeObject(new DicPackage(true, null, "待调集装箱号不存在").DicInfo()); log.LogCatalogFailure(string.Format("待调集装箱号不存在")); return; } strSql = string.Format(@"select size_con,bayno from con_image where container_no='{0}' and ship_id={1}", strContainerNo2, strShipId); var dt2 = da.ExecuteTable(strSql); if (dt2.Rows.Count <= 0) { Json = JsonConvert.SerializeObject(new DicPackage(true, null, "待调集装箱号不存在").DicInfo()); log.LogCatalogFailure(string.Format("待调集装箱号不存在")); return; } Json = iMoveBay.DoubleLift(strShipId, strContainerNo1, Convert.ToString(dt1.Rows[0]["bayno"]), strContainerNo2, Convert.ToString(dt2.Rows[0]["bayno"]), strEndBayno, strOperareName); if (Json != null) { return; } da.CommitTransaction(); Json = JsonConvert.SerializeObject(new DicPackage(true, null, "上传成功!").DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { da.RollbackTransaction(); Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:双吊发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:双吊发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误").DicInfo()); return; } //账户 string strAccount = Request.Params["Account"]; //反馈类型 string strFeedbackType = Request.Params["FeedbackType"]; //反馈对象编码 string strCodeFeedbackObject = Request.Params["CodeFeedbackObject"]; //公司名称编码 string strCodeCompany = Request.Params["CodeCompany"]; //反馈标题 string strFeedBackTitle = Request.Params["FeedBackTitle"]; //反馈说明 string strFeedBackExplain = Request.Params["FeedBackExplain"]; //电话号码 string strPhoneNum = Request.Params["PhoneNum"]; //匿名标志 string strAnonymous = Request.Params["Anonymous"]; AppLog log = new AppLog(Request); log.strBehavior = "提交投诉"; log.strBehaviorURL = "/Service/Complain/SubmitComplain.aspx"; log.strAccount = strAccount; try { if (strAccount == null || strFeedbackType == null || strCodeFeedbackObject == null || strCodeCompany == null || strFeedBackTitle == null || strFeedBackExplain == null || strPhoneNum == null || strAnonymous == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,提交投诉失败").DicInfo()); return; } //手机号验证 if (!TokenTool.VerifyMobile(strPhoneNum) && !string.IsNullOrWhiteSpace(strPhoneNum)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "手机号错误").DicInfo()); log.LogCatalogFailure("手机号错误"); return; } //部门 string strCodeDepartment = string.Empty; //车号 string strVehicle = string.Empty; //匿名,手机号和车号加密 if (strAnonymous.Equals("1")) { } //默认公司编码 //公路港——2 if (strCodeFeedbackObject.Equals("1")) { strCodeCompany = "2"; } //港区卡口——21 if (strCodeFeedbackObject.Equals("3")) { strCodeCompany = "21"; } //提交投诉 string strSql = string.Format(@"insert into SER_COMPLAIN (type_mark,code_complain_org,code_company_org,vehicle,driverphone,anonymous_mark,title,detail,account) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}')", strFeedbackType, strCodeFeedbackObject, strCodeCompany, strVehicle, strPhoneNum, strAnonymous, strFeedBackTitle, strFeedBackExplain, strAccount); new Leo.Oracle.DataAccess(RegistryKey.KeyPathCGate).ExecuteNonQuery(strSql); Json = JsonConvert.SerializeObject(new DicPackage(true, null, "提交成功").DicInfo()); log.LogCatalogSuccess(); } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:提交投诉发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:提交投诉发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //手机号 string strMobile = Request.Params["Mobile"]; //strMobile = "17710556243"; //strMobile = "18036600293"; AppLog log = new AppLog(Request); log.strAccount = strMobile; log.strBehavior = "获取手机验证码"; log.strBehaviorURL = "/Entrance/GetMobileAuthCode.aspx"; try { if (strMobile == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取验证码失败!").DicInfo()); return; } //手机号验证 string strMessage = TokenTool.VerifyMobile(strMobile); if (strMessage != "ture") { Json = JsonConvert.SerializeObject(new DicPackage(false, null, strMessage).DicInfo()); return; } //生成随机验证码 string strSql = string.Format("select round(dbms_random.value(100000,1000000)) as authcode from dual"); var dt0 = new Leo.Oracle.DataAccess(RegistryKey.KeyPathHmw).ExecuteTable(strSql); //if (dt0.Rows.Count <= 0) //{ // Json = JsonConvert.SerializeObject(new DicPackage(false, null, "网络错误,请稍后再试!").DicInfo()); // return; //} //获取应用中文名称 strSql = string.Format(@"select fullname from VW_APP_TOKEN where appname='{0}'", Request.Params["AppName"]); var dt1 = new Leo.Oracle.DataAccess(RegistryKey.KeyPathMa).ExecuteTable(strSql); //if (dt.Rows.Count <= 0) //{ // Json = JsonConvert.SerializeObject(new DicPackage(false, null, "网络错误,请稍后再试!").DicInfo()); // return; //} string paramData = "{\"template\":\"SMS_63320388\"," + "\"recipients\":[\"" + strMobile + "\"]," + "\"prefix\":\"连云港港\"," + "\"parameters\":{\"AUTHCODE\":\"" + Convert.ToString(dt0.Rows[0]["authcode"]) + "\",\"APPNAME\":\"" + "(" + Convert.ToString(dt1.Rows[0]["fullname"]) + ")" + "\"}}"; var result = ALiSmsSender.PostRequest(paramData); if (result.Item1 == true) { //保存动态验证码(MobileCenter) //string strDynamicIntervalTime = ConfigTool.GetWebConfigKey("DynamicIntervalTime"); //DateTime dynamicBeginTime = DateTime.Now; //DateTime dynamicEndTime = dynamicBeginTime.AddSeconds(Convert.ToDouble(strDynamicIntervalTime)); strSql = string.Format(@"insert into TB_APP_MOBILE_AUTHCODE (mobile,dynamic_authcode,dynamic_begintime,dynamic_endtime,un_dynamic_authcode) values({0},'{1}',sysdate,sysdate+2/24/60,{2})", strMobile, Identity.RijndaelEncode(Convert.ToString(dt0.Rows[0]["authcode"])), Convert.ToString(dt0.Rows[0]["authcode"])); new Leo.Oracle.DataAccess(RegistryKey.KeyPathMa).ExecuteNonQuery(strSql); Json = JsonConvert.SerializeObject(new DicPackage(true, null, "已成功发送,请注意查看!").DicInfo()); log.LogCatalogSuccess(); } else { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "线路问题,请重新发送").DicInfo()); log.LogCatalogFailure("线路问题,请重新发送1"); } } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取手机验证码数据发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:获取手机验证码数据发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //用户编码 string strCodeUser = Request.Form["CodeUser"]; //旧密码 string strOldPassword = Request.Form["OldPassword"]; //新密码1 string strNewPassword1 = Request.Form["NewPassword1"]; //新密码2 string strNewPassword2 = Request.Form["NewPassword2"]; ////用户编码 //string strCodeUser = Request.Params["CodeUser"]; ////旧密码 //string strOldPassword = Request.Params["OldPassword"]; ////新密码1 //string strNewPassword1 = Request.Params["NewPassword1"]; ////新密码2 //string strNewPassword2 = Request.Params["NewPassword2"]; AppLog log = new AppLog(Request); log.strBehavior = "修改密码"; log.strBehaviorURL = "/Entrance/ChangePassword.aspx"; try { if (strCodeUser == null || strOldPassword == null || strNewPassword1 == null || strNewPassword2 == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,修改密码失败!").DicInfo()); return; } string strSql = string.Format("select password from TB_SYS_USER t where code_user ='******'", strCodeUser); var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathIport).ExecuteTable(strSql); if (dt.Rows.Count <= 0) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "无效用户!").DicInfo()); log.LogCatalogFailure("无效用户!"); return; } //校验旧密码 if (!string.IsNullOrWhiteSpace(dt.Rows[0]["PASSWORD"] as string)) { if (!Identity.VerifyText(strOldPassword, dt.Rows[0]["PASSWORD"] as string)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "当前密码错误,请重新输入!").DicInfo()); log.LogCatalogFailure("当前密码错误,请重新输入!"); return; } } else if (!(string.IsNullOrWhiteSpace(strOldPassword) && string.IsNullOrWhiteSpace(dt.Rows[0]["PASSWORD"] as string))) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "当前密码错误,请重新输入!").DicInfo()); log.LogCatalogFailure("当前密码错误,请重新输入!"); return; } //校验新密码 if (strNewPassword1.Length < 6 || strNewPassword1.Length > 32 || strNewPassword2.Length < 6 || strNewPassword2.Length > 32) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "密码应为6~32个字符!").DicInfo()); log.LogCatalogFailure("密码应为6~32个字符!"); return; } if (!strNewPassword1.Equals(strNewPassword2)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "新密码不一致!").DicInfo()); log.LogCatalogFailure("新密码不一致!"); return; } string strXmlParams = string.Format("<params><usercode>{0}</usercode><oldpassword>{1}</oldpassword><newpassword>{2}</newpassword></params>", strCodeUser, strOldPassword, strNewPassword1); bool isSuccess = YGSoft.IPort.MobileManage.Interface.Core.ServiceUser.UpdatePassword(strXmlParams).Value; if (!isSuccess) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, YGSoft.IPort.MobileManage.Interface.Core.ServiceUser.UpdatePassword(strXmlParams).Message).DicInfo()); log.LogCatalogFailure(YGSoft.IPort.MobileManage.Interface.Core.ServiceUser.UpdatePassword(strXmlParams).Message); } else { Json = JsonConvert.SerializeObject(new DicPackage(true, null, "密码修改成功!").DicInfo()); log.LogCatalogSuccess(); } } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:修改密码数据发生异常。{1}", ex.Source, ex.Message)).DicInfo()); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //手机号 string strMobile = Request.Form["Mobile"]; //验证码 string strAuthCode = Request.Form["AuthCode"]; ////手机号 //string strMobile = Request.Params["Mobile"]; ////验证码 //string strAuthCode = Request.Params["AuthCode"]; AppLog log = new AppLog(Request); log.strAccount = strMobile; log.strBehavior = "校验手机验证码"; log.strBehaviorURL = "/Entrance/VerifyAuthCode.aspx"; try { if (strMobile == null || strAuthCode == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,校验手机验证码失败!").DicInfo()); return; } string strSql = string.Format(@"select * from TB_APP_MOBILE_AUTHCODE where mobile={0} and dynamic_endtime > sysdate order by createtime desc", strMobile); var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathMa).ExecuteTable(strSql); if (dt.Rows.Count <= 0) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "验证码已超时!").DicInfo()); log.LogCatalogFailure("验证码已超时!"); return; } //校验验证码 if (Identity.RijndaelDecode(dt.Rows[0]["dynamic_authcode"].ToString()) != strAuthCode) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "验证码不匹配!").DicInfo()); log.LogCatalogFailure("验证码不匹配!"); } else { Json = JsonConvert.SerializeObject(new DicPackage(true, null, null).DicInfo()); log.LogCatalogSuccess(); } } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:校验手机验证码数据发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:校验手机验证码数据发生异常。{1}", ex.Source, ex.Message)); } }
protected void Page_Load(object sender, EventArgs e) { //身份校验 if (!InterfaceTool.IdentityVerify(Request)) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo()); return; } //手机号 string strMobile = Request.Form["Mobile"]; //速记码(Iport登陆账户) string strLogogram = Request.Form["Logogram"]; //密码1 string strPassword1 = Request.Form["Password1"]; //密码2 string strPassword2 = Request.Form["Password2"]; //用户名称 string strUserName = Request.Form["UserName"]; //公司编码 string strCompanyCode = Request.Form["CompanyCode"]; //部门编码 string strDepartmentCode = Request.Form["DepartmentCode"]; //用户类型编码 string strUserTypeCode = Request.Form["UserTypeCode"]; //员工工号 string strWorkNo = Request.Form["WorkNo"]; //电话 string strPhone = Request.Form["Phone"]; //QQ string strQQ = Request.Form["QQ"]; //邮箱 string strEmail = Request.Form["Email"]; ////手机号 //string strMobile = Request.Params["Mobile"]; ////速记码(Iport登陆账户) //string strLogogram = Request.Params["Logogram"]; ////密码1 //string strPassword1 = Request.Params["Password1"]; ////密码2 //string strPassword2 = Request.Params["Password2"]; ////用户名称 //string strUserName = Request.Params["UserName"]; ////公司编码 //string strCompanyCode = Request.Params["CompanyCode"]; ////部门编码 //string strDepartmentCode = Request.Params["DepartmentCode"]; ////用户类型编码 //string strUserTypeCode = Request.Params["UserTypeCode"]; ////员工工号 //string strWorkNo = Request.Params["WorkNo"]; ////电话 //string strPhone = Request.Params["Phone"]; ////QQ //string strQQ = Request.Params["QQ"]; ////邮箱 //string strEmail = Request.Params["Email"]; strMobile = Format.Trim(strMobile); strPassword1 = Format.Trim(strPassword1); strPassword2 = Format.Trim(strPassword2); strLogogram = Format.Trim(strLogogram); strUserName = Format.Trim(strUserName); strPhone = Format.Trim(strPhone); strQQ = Format.Trim(strQQ); strEmail = Format.Trim(strEmail); //strMobile = "18036600283"; //strPassword1 = "123456"; //strPassword2 = "123456"; AppLog log = new AppLog(Request); log.strAccount = strMobile; log.strBehavior = "用户注册"; log.strBehaviorURL = "/Entrance/Register.aspx"; try { //校验注册参数 string[] strParamArray = RegisterParamsTool.GetParams(Request.Params["AppName"]); if (strParamArray == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,注册失败!").DicInfo()); return; } for (int iParam = 0; iParam < strParamArray.Length; iParam++) { string strParam = "" + strParamArray[iParam] + ""; if (Request.Params[strParam] == null) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,注册失败!").DicInfo()); return; } } //注册数据集 RegisterE registerE = new RegisterE(); registerE.strMobile = strMobile; registerE.strPassword1 = strPassword1; registerE.strPassword2 = strPassword2; if (string.IsNullOrWhiteSpace(strLogogram)) { //生成用户速记码 string strSql = string.Format("select sq_user_logogram.nextval as num from dual"); var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathIport).ExecuteTable(strSql); strLogogram = "IPORT" + Convert.ToString(dt.Rows[0]["num"]); } registerE.strLogogram = strLogogram; if (string.IsNullOrWhiteSpace(strUserName)) { registerE.strUserName = strLogogram; } else { registerE.strUserName = strUserName; } if (!string.IsNullOrWhiteSpace(strCompanyCode)) { registerE.strCompanyCode = strCompanyCode; } if (!string.IsNullOrWhiteSpace(strDepartmentCode)) { registerE.strDepartmentCode = strDepartmentCode; } if (!string.IsNullOrWhiteSpace(strUserTypeCode)) { registerE.strUserTypeCode = strUserTypeCode; } if (!string.IsNullOrWhiteSpace(strWorkNo)) { registerE.strWorkNo = strWorkNo; } if (!string.IsNullOrWhiteSpace(strPhone)) { registerE.strPhone = strPhone; } if (!string.IsNullOrWhiteSpace(strQQ)) { registerE.strQQ = strQQ; } if (!string.IsNullOrWhiteSpace(strEmail)) { registerE.strEmail = strEmail; } //注册Iport IRegister iRegister = new IRegister(log, registerE); Json = iRegister.RegisterIportUser(); } catch (Exception ex) { Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:用户注册数据发生异常。{1}", ex.Source, ex.Message)).DicInfo()); log.LogCatalogFailure(string.Format("{0}:用户注册数据发生异常。{1}", ex.Source, ex.Message)); } }