Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }

            //工号
            string strWork_No = Request.Params["Work_No"];
            //作业日期
            string strWork_Date = Request.Params["Work_Date"];
            //夜班标志
            string strNight_Mark = Request.Params["Night_Mark"];

            //strWork_No = "020974";
            //strWork_Date = "2018-06-04 09:33:02";
            //strNight_Mark = "01";

            if (strWork_No == null || strWork_Date == null || strNight_Mark == null)
            {
                Json = Result.Failure("参数错误");
                return;
            }

            Log log = new Log(Request);

            log.strBehavior    = "获取派工航次";
            log.strBehaviorURL = "/Voyage/GetArrangeVoyages.aspx";
            Json = new Con_Tally(log).GetArrangeVoyages(strWork_No, strWork_Date, strNight_Mark);
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //参数1
            string strParam1 = Request.Params["Param1"];
            //参数2
            string strParam2 = Request.Params["Param2"];

            try
            {
                if (strParam1 == null || strParam2 == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,登陆失败!").DicInfo());
                    return;
                }

                string[] strArray = new string[4];
                strArray[0] = strParam1;
                strArray[1] = strParam2;
                strArray[2] = Request.Params["AppName"];
                strArray[3] = Request.Params["Sign"];

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:用户登陆数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }

            //航次ID
            string strShip_Id = Request.Params["Ship_Id"];
            //进出口类型
            string strInOutType = Request.Params["InOutType"];
            //工号
            string strWork_No = Request.Params["Work_No"];


            if (strShip_Id == null || strInOutType == null || strWork_No == null)
            {
                Json = Result.Failure("参数错误");
                return;
            }

            Log log = new Log(Request);

            log.strBehavior    = "获取个人作业进度";
            log.strBehaviorURL = "/Query/GetWorkProgress_Perssonal.aspx";
            Json = new Con_Tally(log).GetWorkProgress_Perssonal(strShip_Id, strInOutType, strWork_No);
        }
Пример #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }


            TallyE tallyE = new TallyE();

            tallyE.StrShip_Id      = Request.Params["Ship_Id"];
            tallyE.StrNewShip_Id   = Request.Params["NewShip_Id"];
            tallyE.StrContainer_No = Request.Params["Container_No"];
            tallyE.StrWork_No      = Request.Params["Work_No"];

            if (tallyE.StrShip_Id == null || tallyE.StrNewShip_Id == null || tallyE.StrContainer_No == null || tallyE.StrWork_No == null)
            {
                Json = Result.Failure("参数错误");
                return;
            }

            Log log = new Log(Request, tallyE);

            log.strBehavior    = "理箱回滚";
            log.strBehaviorURL = "/Tally/Rollback.aspx";
            log.strWorkType    = "rollback";
            Json = new Pub(log).Rollback(tallyE);
        }
Пример #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }

            //航次ID
            string strShip_Id = Request.Params["Ship_Id"];
            //查询箱号
            string strContainer_No = Request.Params["Container_No"];

            //strShip_Id = "6887";
            //strContainer_No = "185";

            if (strShip_Id == null || strContainer_No == null)
            {
                Json = Result.Failure("参数错误");
                return;
            }

            Log log = new Log(Request);

            log.strBehavior    = "查找匹配箱号列表";
            log.strBehaviorURL = "/Container/FindMatchedContainerNoList.aspx";
            Json = new Con_Tally(log).FindMatchedContainerNoList(strShip_Id, strContainer_No);
        }
Пример #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //二维码内容
            string strQRCode = Request.Form["QRCode"];

            try
            {
                if (strQRCode == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取电子提送货单详细信息失败!").DicInfo());
                    return;
                }

                IBillDetail iBillDetail = new IBillDetail();
                Json = iBillDetail.GetBillDetail(strQRCode);
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取电子提送货单详细信息数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }

            //航次ID
            string strV_Id = Request.Params["V_Id"];

            //strV_Id = "2664";

            if (strV_Id == null)
            {
                Json = Result.Failure("参数错误");
                return;
            }

            Log log = new Log(Request);

            log.strBehavior    = "下载贝位规范";
            log.strBehaviorURL = "/Download/DownloadBayStandard.aspx";
            Json = new Con_Tally(log).DownloadBayStandard(strV_Id);
        }
Пример #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //ID
            string strId = Request.Params["Id"];

            try
            {
                if (strId == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,删除评价记录失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"delete
                                    from CGATE.TB_FREIGHT_EVALUATE
                                    where id ='{0}'",
                                  strId);
                new Leo.Oracle.DataAccess(RegistryKey.KeyPathHarbor).ExecuteNonQuery(strSql);

                Json = JsonConvert.SerializeObject(new DicPackage(true, null, "删除成功!").DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:删除评价记录数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }

            //航次ID
            string strShip_Id = Request.Params["Ship_Id"];
            //查询箱号
            string strContainer_No = Request.Params["Container_No"];
            //作业类型——0普通,1出舱,2重装,3调贝,4甩箱
            string strWorkType = Request.Params["WorkType"];
            //指令标志
            string strBLInstruction = Request.Params["BLInstruction"];

            //strShip_Id = "6887";
            //strContainer_No = "TCNU5462434";
            //strWorkType = "0";
            //strBLInstruction = "1";

            if (strShip_Id == null || strContainer_No == null || strWorkType == null || strBLInstruction == null)
            {
                Json = Result.Failure("参数错误");
                return;
            }

            Log log = new Log(Request);

            log.strBehavior    = "获取理箱信息";
            log.strBehaviorURL = "/Container/GetContainerInfo.aspx";
            Json = new Con_Tally(log).GetContainerInfo(strShip_Id, strContainer_No, strWorkType, strBLInstruction);
        }
Пример #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }

            //用户名
            string strAccount = Request.Params["Account"];
            //密码
            string strPassword = Request.Params["Password"];

            //strAccount = "wlgch";
            //strPassword = "******";

            if (strAccount == null || strPassword == null)
            {
                Json = Result.Failure("参数错误");
                return;
            }

            Log log = new Log(Request);

            log.strBehavior    = "登录";
            log.strBehaviorURL = "/Entrance/Login.aspx";
            log.strUserName    = strAccount;
            log.strWorkType    = "login";

            Json = new Con_Tally(log).Login(strAccount, strPassword);
        }
Пример #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }

            TallyE tallyE = new TallyE();

            tallyE.StrShip_Id      = Request.Params["Ship_Id"];
            tallyE.StrContainer_No = Request.Params["Container_No"];
            tallyE.StrBay_No       = Request.Params["Bay_No"];
            tallyE.StrWork_No      = Request.Params["Work_No"];
            tallyE.StrTime         = Request.Params["Time"];

            //strShip_Id = "6887";
            //strContainer_No = "185";

            if (tallyE.StrShip_Id == null || tallyE.StrContainer_No == null || tallyE.StrBay_No == null || tallyE.StrWork_No == null || tallyE.StrTime == null)
            {
                Json = Result.Failure("参数错误");
                return;
            }

            Log log = new Log(Request, tallyE);

            log.strBehavior    = "出口调贝";
            log.strBehaviorURL = "/Tally/Export/MoveBay.aspx";
            log.strWorkType    = "chgbay";
            Json = new Con_Tally(log).MoveBay(tallyE);
        }
Пример #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }

            //航次ID
            string strShip_Id = Request.Params["Ship_Id"];
            //夜班标志
            string strNight_Mark = Request.Params["Night_Mark"];

            if (strShip_Id == null || strNight_Mark == null)
            {
                Json = Result.Failure("参数错误");
                return;
            }

            Log log = new Log(Request);

            log.strBehavior    = "获取同班人员";
            log.strBehaviorURL = "/Query/GetWorkerOfSameClass.aspx";
            Json = new Con_Tally(log).GetWorkerOfSameClass(strShip_Id, strNight_Mark);
        }
Пример #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            try
            {
                string strSql =
                    string.Format(@"select a.mobile 
                                    from IPORT.TB_SYS_USERINFO a,TB_APP_SYS_USERINFO b 
                                    where a.code_user=b.code_user and a.mobile is not null and b.appname='DDJG'");
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathMa).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "暂无数据!").DicInfo());
                    return;
                }

                string[] strArray = new string[dt.Rows.Count];
                for (int iRow = 0; iRow < dt.Rows.Count; iRow++)
                {
                    strArray[iRow] = dt.Rows[iRow]["mobile"].ToString();
                }

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取所有用户信息数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //船舶编码
            string strV_Id = Request.Params["strV_Id"];

            //strV_Id = "6945";


            try
            {
                if (strV_Id == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取某船贝位规范数据失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"select id,v_id,eng_vessel,chi_vessel,bay_num,board_col_count,board_col_mark,board_row_count,cabin_col_count,cabin_col_mark,cabin_row_count,joint,low_row_mark,board_unuse_col,cabin_unuse_col 
                                    from code_con_bay 
                                    WHERE v_id='{0}'",
                                  strV_Id);
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathTally).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(true, null, "暂无数据!").DicInfo());
                    return;
                }

                string[,] strArray = new string[dt.Rows.Count, 12];
                for (int iRow = 0; iRow < dt.Rows.Count; iRow++)
                {
                    strArray[iRow, 0]  = dt.Rows[iRow]["id"].ToString();
                    strArray[iRow, 1]  = dt.Rows[iRow]["v_id"].ToString();
                    strArray[iRow, 2]  = dt.Rows[iRow]["bay_num"].ToString();
                    strArray[iRow, 3]  = dt.Rows[iRow]["board_col_count"].ToString();
                    strArray[iRow, 4]  = dt.Rows[iRow]["board_col_mark"].ToString();
                    strArray[iRow, 5]  = dt.Rows[iRow]["board_row_count"].ToString();
                    strArray[iRow, 6]  = dt.Rows[iRow]["cabin_col_count"].ToString();
                    strArray[iRow, 7]  = dt.Rows[iRow]["cabin_col_mark"].ToString();
                    strArray[iRow, 8]  = dt.Rows[iRow]["cabin_row_count"].ToString();
                    strArray[iRow, 9]  = dt.Rows[iRow]["joint"].ToString();
                    strArray[iRow, 10] = dt.Rows[iRow]["eng_vessel"].ToString();
                    strArray[iRow, 11] = dt.Rows[iRow]["chi_vessel"].ToString();
                }

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取某船贝位规范数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            string strKey        = Request.Params["Key"];
            string strCipherText = HttpUtility.UrlDecode(Request.Params["Value"]);
            string password2     = DES_IV.IV;
            string cipher        = string.Empty;

            try
            {
                if (strKey == null || strCipherText == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,DES解密失败!").DicInfo());
                    return;
                }

                char[] key = new char[8];
                if (strKey.Length > 8)
                {
                    strKey = strKey.Remove(8);
                }
                strKey.CopyTo(0, key, 0, strKey.Length);

                char[] iv = new char[8];
                if (password2.Length > 8)
                {
                    password2 = password2.Remove(8);
                }
                password2.CopyTo(0, iv, 0, password2.Length);

                strCipherText = strCipherText.Replace(" ", "+");
                SymmetricAlgorithm serviceProvider = new DESCryptoServiceProvider();
                serviceProvider.Key = Encoding.ASCII.GetBytes(key);
                serviceProvider.IV  = Encoding.ASCII.GetBytes(iv);

                byte[]       contentArray = Convert.FromBase64String(strCipherText);
                MemoryStream memoryStream = new MemoryStream(contentArray);
                CryptoStream cryptoStream = new CryptoStream(memoryStream, serviceProvider.CreateDecryptor(), CryptoStreamMode.Read);
                StreamReader streamReader = new StreamReader(cryptoStream);

                Json = JsonConvert.SerializeObject(new DicPackage(true, streamReader.ReadToEnd(), null).DicInfo());

                streamReader.Dispose();
                cryptoStream.Dispose();
                memoryStream.Dispose();
                serviceProvider.Clear();
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:DES解密数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #16
0
        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"];

            //strMobile = "18036600293";
            //strAuthCode = "603862";

            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());
                    return;
                }

                //校验验证码
                if (Identity.RijndaelDecode(dt.Rows[0]["dynamic_authcode"].ToString()) != strAuthCode)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "验证码不匹配!").DicInfo());
                }
                else
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(true, null, null).DicInfo());
                }
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:校验手机验证码数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //用户编码
            string strCodeUser = Request.Params["CodeUser"];
            //运输申报编号
            string strInGateNo = Request.Params["InGateNo"];
            //导航评价
            string strLevelNavigation = Request.Params["LevelNavigation"];
            //效率评价
            string strLevelEfficiency = Request.Params["LevelEfficiency"];
            //服务平滑
            string strLevelService = Request.Params["LevelService"];
            //评价
            string strComment = Request.Params["Comment"];

            strComment = strComment == null ? string.Empty : strComment;

            try
            {
                if (strCodeUser == null || strInGateNo == null || strLevelNavigation == null || strLevelEfficiency == null || strLevelService == null || strComment == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,发布评价失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"select id,vehicle,cgno,taskno from V_CONSIGN_VEHICLE_QUICK
                                    where ingateno ='{0}'",
                                  strInGateNo);
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathHarbor).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "无效运输申报编号!").DicInfo());
                    return;
                }

                strSql =
                    string.Format(@"insert into CGATE.TB_FREIGHT_EVALUATE (consignvehicle_id,driver_mark,cgno,taskno,ingateno,vehicle,level_navigation,level_efficiency,level_service,code_user,driver_remark) 
                                    values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}')",
                                  Convert.ToString(dt.Rows[0]["id"]), "0", Convert.ToString(dt.Rows[0]["cgno"]), Convert.ToString(dt.Rows[0]["taskno"]), strInGateNo, Convert.ToString(dt.Rows[0]["vehicle"]),
                                  strLevelNavigation, strLevelEfficiency, strLevelService, strCodeUser, strComment);
                new Leo.Oracle.DataAccess(RegistryKey.KeyPathHarbor).ExecuteNonQuery(strSql);

                Json = JsonConvert.SerializeObject(new DicPackage(true, null, "发布成功!").DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:发布评价数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }


            //航次编码
            string strShip_Id = Request.Params["Ship_Id"];

            //strShip_Id = "600";


            try
            {
                if (strShip_Id == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取航次数据失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"select ID SHIP_ID,V_ID,CODE_STATU,INOUTPORT,VOYAGE,CHI_VESSEL,ENG_VESSEL,TRADE,INOUT,WHEEL,VESSEL_CODE,VESSEL_IMO,SHIPAGENT_CHA,BERTHNO,GOODS 
                                    from VDD_SHIP_SHOW 
                                    WHERE ID='{0}'",
                                  strShip_Id);
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathTally).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(true, null, "暂无数据!").DicInfo());
                    return;
                }

                string[,] strArray = new string[dt.Rows.Count, 8];
                for (int iRow = 0; iRow < dt.Rows.Count; iRow++)
                {
                    strArray[iRow, 0] = dt.Rows[iRow]["SHIP_ID"].ToString();
                    strArray[iRow, 1] = dt.Rows[iRow]["V_ID"].ToString();
                    strArray[iRow, 2] = dt.Rows[iRow]["BERTHNO"].ToString();
                    strArray[iRow, 3] = dt.Rows[iRow]["VOYAGE"].ToString();
                    strArray[iRow, 4] = dt.Rows[iRow]["CHI_VESSEL"].ToString();
                    strArray[iRow, 5] = dt.Rows[iRow]["INOUTPORT"].ToString();
                    strArray[iRow, 6] = dt.Rows[iRow]["TRADE"].ToString();
                    strArray[iRow, 7] = dt.Rows[iRow]["WHEEL"].ToString();
                }

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取航次录数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //数据起始行
            var strStartRow = Request.Params["StartRow"];
            //行数
            var strCount = Request.Params["Count"];
            //用户编码
            string strCodeUser = Request.Params["CodeUser"];

            try
            {
                if (strStartRow == null || strCount == null || strCodeUser == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取评价记录失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"select id,level_navigation,level_efficiency,level_service,to_char(createtime, 'yyyy-mm-dd HH24:mi:ss') as createtime,driver_remark
                                    from CGATE.TB_FREIGHT_EVALUATE
                                    where code_user ='******' and rownum < {1}
                                    order by createtime desc",
                                  strCodeUser, Convert.ToUInt32(strStartRow) + Convert.ToUInt32(strCount));
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathHarbor).ExecuteTable(strSql, Convert.ToInt32(strStartRow), Convert.ToInt32(strStartRow) + Convert.ToInt32(strCount) - 1);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "暂无评价记录").DicInfo());
                    return;
                }

                string[,] strArray = new string[dt.Rows.Count, 6];
                for (int iRow = 0; iRow < dt.Rows.Count; iRow++)
                {
                    strArray[iRow, 0] = Convert.ToString(dt.Rows[iRow]["id"]);
                    strArray[iRow, 1] = Convert.ToString(dt.Rows[iRow]["level_navigation"]);
                    strArray[iRow, 2] = Convert.ToString(dt.Rows[iRow]["level_efficiency"]);
                    strArray[iRow, 3] = Convert.ToString(dt.Rows[iRow]["level_service"]);
                    strArray[iRow, 4] = Convert.ToString(dt.Rows[iRow]["createtime"]);
                    strArray[iRow, 5] = Convert.ToString(dt.Rows[iRow]["driver_remark"]);
                }

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取评价记录数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //航次编码
            string strShip_Id = Request.Params["Ship_Id"];
            //集装箱号
            string strContainerNo = Request.Params["ContainerNo"];


            try
            {
                if (strShip_Id == null || strContainerNo == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取集装箱信息数据失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"select t.bayno,t.sealno,t.moved,t.code_unload_port,t.size_con,t.container_type,t.fullorempty,t.unload_mark 
                                    from con_image t 
                                    where t.ship_id='{0}' and t.container_no='{1}'",
                                  strShip_Id, strContainerNo);
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathTally).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "暂无数据!").DicInfo());
                    return;
                }

                string[] strArray = new string[8];
                strArray[0] = dt.Rows[0]["bayno"].ToString();
                strArray[1] = dt.Rows[0]["sealno"].ToString();
                strArray[2] = dt.Rows[0]["moved"].ToString();
                strArray[3] = dt.Rows[0]["code_unload_port"].ToString();
                strArray[4] = dt.Rows[0]["size_con"].ToString();
                strArray[5] = dt.Rows[0]["container_type"].ToString();
                strArray[6] = dt.Rows[0]["fullorempty"].ToString();
                strArray[7] = dt.Rows[0]["unload_mark"].ToString();


                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取集装箱信息数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #21
0
        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));
            }
        }
Пример #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //ID
            string strId = Request.Params["Id"];
            //新车牌号
            string strVehicleNum = Request.Params["VehicleNum"];

            //strId = "2F4FBC8B9B16938AE053A8640169938A";
            //strVehicleNum = "豫E66569";

            try
            {
                if (strId == null || strVehicleNum == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,更新已关联车辆!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"update TB_SPH_VEHICLE_RELATION_PASSED
                                    set vehiclenum='{0}',operatetime=to_date('{1}', 'yyyy/mm/dd HH24:mi:ss')
                                    where id ='{2}'",
                                  strVehicleNum, DateTime.Now, strId);
                new Leo.Oracle.DataAccess(RegistryKey.KeyPathWlxgx).ExecuteNonQuery(strSql);

                strSql =
                    string.Format(@"select *
                                       from TB_SPH_VEHICLE_RELATION_PASSED
                                       where id='{0}'",
                                  strId);
                var      dt       = new Leo.Oracle.DataAccess(RegistryKey.KeyPathWlxgx).ExecuteTable(strSql);
                string[] strArray = new string[3];
                strArray[0] = Convert.ToString(dt.Rows[0]["id"].ToString());
                strArray[1] = Convert.ToString(dt.Rows[0]["vehiclenum"].ToString());
                strArray[2] = Convert.ToString(dt.Rows[0]["operatetime"].ToString());

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, "更新车辆成功!").DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:更新已关联车辆数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //航次编码
            string strShip_Id = Request.Params["Ship_Id"];
            //集装箱号
            string strKeyword = Request.Params["Keyword"];

            //strShip_Id = "1221";
            //strKeyword = "57";


            try
            {
                if (strShip_Id == null || strKeyword == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,通过关键字获取匹配的集装箱号列表数据失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"select distinct t.container_no from con_image t where t.ship_id='{0}' and t.container_no like '%{1}'",
                                  strShip_Id, strKeyword);
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathTally).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(true, null, "暂无数据!").DicInfo());
                    return;
                }

                string[] strArray = new string[dt.Rows.Count];
                for (int iRow = 0; iRow < dt.Rows.Count; iRow++)
                {
                    strArray[iRow] = dt.Rows[iRow]["container_no"].ToString();
                }

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:通过关键字获取匹配的集装箱号列表数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #24
0
        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));
            }
        }
Пример #25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误").DicInfo());
                return;
            }

            //ID
            string strId = Request.Params["Id"];

            //strId = "41";

            try
            {
                if (strId == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取我的评价数据失败").DicInfo());
                    return;
                }

                //获取我的评价(处理结果)
                string strSql =
                    string.Format(@"select evaluate,index_satisfy,to_char(evaluate_time, 'yyyy/mm/dd hh24:mi:ss') as evaluate_time 
                                    from ser_complain  
                                    where id='{0}'",
                                  strId);
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathCGate).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(true, null, null).DicInfo());
                    return;
                }

                string[] strArray = new string[3];

                strArray[0] = Convert.ToString(dt.Rows[0]["evaluate"]);
                string strIndex_satisfy = string.IsNullOrWhiteSpace(Convert.ToString(dt.Rows[0]["index_satisfy"])) == true ? string.Empty : GetChineseEvaluate(Convert.ToInt16(dt.Rows[0]["index_satisfy"]));
                strArray[1] = strIndex_satisfy;
                strArray[2] = Convert.ToString(dt.Rows[0]["evaluate_time"]);

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取我的评价数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //用户编码
            string strCodeUser = Request.Params["CodeUser"];

            //strCodeUser = "******";

            try
            {
                if (strCodeUser == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取已关联车辆记录失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"select *
                                    from TB_SPH_VEHICLE_RELATION_PASSED
                                    where code_user ='******'",
                                  strCodeUser);
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathWlxgx).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "暂无关联车辆记录").DicInfo());
                    return;
                }

                string[,] strArray = new string[dt.Rows.Count, 3];
                for (int iRow = 0; iRow < dt.Rows.Count; iRow++)
                {
                    strArray[iRow, 0] = Convert.ToString(dt.Rows[iRow]["id"]);
                    strArray[iRow, 1] = Convert.ToString(dt.Rows[iRow]["vehiclenum"]);
                    strArray[iRow, 2] = Convert.ToString(dt.Rows[iRow]["operatetime"]);;
                }

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:关联车辆数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //航次编码
            string strShip_Id = Request.Params["Ship_Id"];

            //strShip_Id = "600";


            try
            {
                if (strShip_Id == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取某航次所有贝位号数据失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"select t.SHIP_ID,t.V_ID,t.ENG_VESSEL,t.CHI_VESSEL,t.LOCATION,t.BAY_NUM,t.BAY_COL,t.BAY_ROW,t.SBAYNO,t.TBAYNO,t.JBAYNO,t.USER_CHAR,t.SCREEN_ROW,t.SCREEN_COL,t.JOINT,t.CODE_LOAD_PORT,t.CODE_UNLOAD_PORT,t.CODE_DELIVERY,t.MOVED,t.UNLOAD_MARK,t.WORK_NO,t.DANGER_GRADE,t.DEGREE_SETTING,t.DEGREE_UNIT,t.MIN_DEGREE,t.MAX_DEGREE,t.BAYNO,t.OLDBAYNO,t.CODE_CRANE,t.IMAGE_ID,t.BAYNUM,t.BAYCOL,t.BAYROW,t.CONTAINER_NO,t.SIZE_CON,t.CONTAINER_TYPE,t.CODE_EMPTY,t.WEIGHT,t.WORK_DATE,t.SEALNO,t.MOVED_NAME,t.INOUTMARK,t.TransMark,t.JJR,t.YB,t.NAME 
                                    from vcon_bay_detail t  
                                    where t.SHIP_ID='{0}'",
                                  strShip_Id);
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathTally).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(true, null, "暂无数据!").DicInfo());
                    return;
                }

                string[] strArray = new string[dt.Rows.Count];
                for (int iRow = 0; iRow < dt.Rows.Count; iRow++)
                {
                    strArray[iRow] = dt.Rows[iRow]["baynum"].ToString();
                }

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取某航次所有贝位号数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }
Пример #28
0
        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));
            }
        }
Пример #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = Result.Failure("身份认证错误");
                return;
            }

            try
            {
            }
            catch (Exception ex)
            {
                Json = Result.Failure(string.Format("{0}:{1}发生异常。{2}", OPERATION, ex.Source, ex.Message));
            }
        }
Пример #30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //身份校验
            if (!InterfaceTool.IdentityVerify(Request))
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, "身份认证错误!").DicInfo());
                return;
            }

            //公司编码
            string strCodeCompany = Request.Params["CodeCompany"];
            //库场编码
            string strCodeStorage = Request.Params["CodeStorage"];

            try
            {
                if (strCodeCompany == null || strCodeStorage == null)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "参数错误,获取场地进出点经、纬度坐标失败!").DicInfo());
                    return;
                }

                string strSql =
                    string.Format(@"select a.in_long,a.in_latitude,a.out_long,a.out_latitude
                                              from TB_CODE_STORAGE a, TB_CODE_DEPARTMENT b
                                              where a.code_department=b.code_department and a.code_storage='{0}' and b.code_company_pbas='{1}' and a.isusing='1'",
                                  strCodeStorage, strCodeCompany);
                var dt = new Leo.Oracle.DataAccess(RegistryKey.KeyPathHarbor).ExecuteTable(strSql);
                if (dt.Rows.Count <= 0)
                {
                    Json = JsonConvert.SerializeObject(new DicPackage(false, null, "暂无数据!").DicInfo());
                    return;
                }

                string[] strArray = new string[4];
                strArray[0] = Convert.ToString(dt.Rows[0]["in_long"].ToString());
                strArray[1] = Convert.ToString(dt.Rows[0]["in_latitude"].ToString());
                strArray[2] = Convert.ToString(dt.Rows[0]["out_long"].ToString());
                strArray[3] = Convert.ToString(dt.Rows[0]["out_latitude"].ToString());

                Json = JsonConvert.SerializeObject(new DicPackage(true, strArray, null).DicInfo());
            }
            catch (Exception ex)
            {
                Json = JsonConvert.SerializeObject(new DicPackage(false, null, string.Format("{0}:获取场地进出点经、纬度坐标数据发生异常。{1}", ex.Source, ex.Message)).DicInfo());
            }
        }