Exemple #1
0
        public ResponseResult <AppShip> AppGetAllShip(string companyId)
        {
            var result = ResponseResult <AppShip> .Default();

            AppService     appService = new AppService();
            List <AppShip> ships      = new List <AppShip>();

            try
            {
                if (string.IsNullOrEmpty(companyId))
                {
                    return(ResponseResult <AppShip> .Error("公司ID不能为空"));
                }
                else
                {
                    ships  = appService.AppGetAllShip(Convert.ToInt32(companyId));
                    result = ResponseResult <AppShip> .Success(ships, "获取船体信息成功");
                }
            }
            catch (System.Exception ex)
            {
                result = ResponseResult <AppShip> .Error(ex.Message);
            }
            return(result);
        }