Browse Source

合并 System控制器

leiy 2 years ago
parent
commit
b24bace4aa

+ 192 - 0
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -0,0 +1,192 @@
+
+
+namespace OASystem.API.Controllers
+{
+    /// <summary>
+    /// 资料相关
+    /// </summary>
+    //[Authorize]
+    [Route("api/[controller]/[action]")]
+    public class ResourceController : ControllerBase
+    {
+        private readonly IMapper _mapper;
+        private readonly IConfiguration _config;
+        private readonly CarDataRepository _carDataRep;
+       
+        public ResourceController(IMapper mapper, IConfiguration config,CarDataRepository carDataRep)
+        {
+            _mapper = mapper;
+            _config = config;
+            _carDataRep = carDataRep;
+        }
+        #region 车公司资料板块
+
+        /// <summary>
+        /// 车公司信息查询
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> QuerCarData(DtoBase dto)
+        {
+            try
+            {
+                if (dto.PortType==1)
+                {
+                    var carDada = _carDataRep.QueryDto<Res_CarData, CarDataView>().ToList();
+                    if (carDada.Count == 0)
+                    {
+                        return Ok(JsonView(false, "暂无数据!"));
+                    }
+                    carDada = carDada.OrderByDescending(s => s.CreateTime).ToList();
+                    return Ok(JsonView(true, "查询成功", carDada));
+                }
+                else if(dto.PortType==2)
+                {
+                    var carDada = _carDataRep.QueryDto<Res_CarData, CarDataView>().ToList();
+                    if (carDada.Count == 0)
+                    {
+                        return Ok(JsonView(false, "暂无数据!"));
+                    }
+                    carDada=carDada.OrderByDescending(s=>s.CreateTime).ToList();
+                    return Ok(JsonView(true, "查询成功", carDada));
+                }
+                else
+                {
+                    return Ok(JsonView(false, "请传入PortType参数!1:Web,2:Android,3:IOS"));
+                }
+               
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+           
+            
+        }
+
+        /// <summary>
+        /// 车公司信息添加
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> AddCarData(AddCarDataDto dto)
+        {
+            try
+            {
+                if (dto.UnitArea == "")
+                {
+                    return Ok(JsonView(false, "请检查单位区域是否填写!"));
+                }
+                if (dto.UnitName == "")
+                {
+                    return Ok(JsonView(false, "请检查单位名称是否填写!"));
+                }
+                if (dto.Contact == "")
+                {
+                    return Ok(JsonView(false, "请检查单位联系人是否填写!"));
+                }
+                if (dto.ContactTel == "")
+                {
+                    return Ok(JsonView(false, "请检查联系方式是否填写正确!"));
+                }
+                Res_CarData _CarData = _mapper.Map<Res_CarData>(dto);
+                int id = await _carDataRep.AddAsyncReturnId(_CarData);
+                if (id == 0) 
+                {
+                    return Ok(JsonView(false, "添加失败!"));
+                }
+                return Ok(JsonView(true, "添加成功", new { Id = id }));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+
+        /// <summary>
+        /// 车公司信息修改
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> UpCarData(UpCarDataDto dto)
+        {
+            try
+            {
+                if (dto.UnitArea == "")
+                {
+                    return Ok(JsonView(false, "请检查单位区域是否填写!"));
+                }
+                if (dto.UnitName == "")
+                {
+                    return Ok(JsonView(false, "请检查单位名称是否填写!"));
+                }
+                if (dto.Contact == "")
+                {
+                    return Ok(JsonView(false, "请检查单位联系人是否填写!"));
+                }
+                if (dto.ContactTel == "")
+                {
+                    return Ok(JsonView(false, "请检查联系方式是否填写正确!"));
+                }
+                bool res = await _carDataRep.UpdateAsync(a => a.Id == dto.Id, a => new Res_CarData
+                {
+                    UnitArea = dto.UnitArea,
+                    UnitName = dto.UnitName,
+                    Address = dto.Address,
+                    Contact = dto.Contact,
+                    ContactTel = dto.ContactTel,
+                    ContactEmail = dto.ContactEmail,
+                    ContactFax = dto.ContactFax,
+                    CarDes = dto.CarDes,
+                    CarPicPaths = dto.CarPicPaths,
+                    OtherInfo = dto.OtherInfo,
+                    Score = dto.Score,
+                    QualificationScore = dto.QualificationScore,
+                    CarAgeScore = dto.CarAgeScore,
+                    CleanImgScore = dto.CleanImgScore,
+                    SmellScore = dto.SmellScore,
+                    WaterPaperScore = dto.WaterPaperScore,
+                    HardwareScore = dto.HardwareScore,
+                    TimeScore = dto.TimeScore,
+                    SafetyScore = dto.SafetyScore,
+                    DrivingAgeScore = dto.DrivingAgeScore,
+                    Remark = dto.Remark,
+                });
+                if (!res) { return Ok(JsonView(false, "修改失败!")); }
+                return Ok(JsonView(true, "修改成功"));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+        /// <summary>
+        /// 车公司信息修改
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost]
+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
+        public async Task<IActionResult> DelCarData(DelCarDataDto dto)
+        {
+            try
+            {
+                bool res = await _carDataRep.SoftDeleteByIdAsync<Res_CarData>(dto.Id.ToString(), dto.DeleteUserId);
+                if (!res) { return Ok(JsonView(false, "删除失败!")); }
+                return Ok(JsonView(true, "删除成功"));
+            }
+            catch (Exception ex)
+            {
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
+            }
+        }
+        #endregion
+
+    }
+}

+ 44 - 74
OASystem/OASystem.Api/Controllers/SystemController.cs

@@ -1,4 +1,4 @@
-using OASystem.Domain.Dtos.System;
+using Org.BouncyCastle.Asn1.Cms;
 using System.Collections;
 using System.Collections;
 using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
 using static OpenAI.GPT3.ObjectModels.SharedModels.IOpenAiModels;
 
 
@@ -16,7 +16,7 @@ namespace OASystem.API.Controllers
         private readonly DepartmentRepository _sysDepRep;
         private readonly DepartmentRepository _sysDepRep;
         private readonly UsersRepository _userRep;
         private readonly UsersRepository _userRep;
         private readonly IMapper _mapper;
         private readonly IMapper _mapper;
-        private readonly MessageRepository _messageRep;
+
         private readonly SetDataRepository _setDataRepository;
         private readonly SetDataRepository _setDataRepository;
         private readonly SystemMenuPermissionRepository _SystemMenuPermissionRepository;
         private readonly SystemMenuPermissionRepository _SystemMenuPermissionRepository;
         private readonly CompanyRepository _CompanyRepository;
         private readonly CompanyRepository _CompanyRepository;
@@ -24,18 +24,18 @@ namespace OASystem.API.Controllers
         private readonly SystemMenuAndFunctionRepository _SystemMenuAndFunctionRepository;
         private readonly SystemMenuAndFunctionRepository _SystemMenuAndFunctionRepository;
         private readonly JobPostAuthorityRepository _JobPostAuthorityRepository;
         private readonly JobPostAuthorityRepository _JobPostAuthorityRepository;
         private readonly JobPostRepository _jobRep;
         private readonly JobPostRepository _jobRep;
+
         private readonly UserAuthorityRepository _UserAuthorityRepository;
         private readonly UserAuthorityRepository _UserAuthorityRepository;
 
 
         public SystemController( CompanyRepository syscom, DepartmentRepository sysDepRep, UsersRepository userRep,
         public SystemController( CompanyRepository syscom, DepartmentRepository sysDepRep, UsersRepository userRep,
             IMapper mapper, SetDataRepository setDataRepository, CompanyRepository companyRepository,
             IMapper mapper, SetDataRepository setDataRepository, CompanyRepository companyRepository,
             SystemMenuPermissionRepository systemMenuPermissionRepository, PageFunctionPermissionRepository pageFunctionPermissionRepository,
             SystemMenuPermissionRepository systemMenuPermissionRepository, PageFunctionPermissionRepository pageFunctionPermissionRepository,
-            SystemMenuAndFunctionRepository systemMenuAndFunctionRepository, JobPostAuthorityRepository jobPostAuthorityRepository, 
+            SystemMenuAndFunctionRepository systemMenuAndFunctionRepository, JobPostAuthorityRepository jobPostAuthorityRepository, JobPostRepository jobRep
-            JobPostRepository jobRep,UserAuthorityRepository userAuthorityRepository, MessageRepository messageRep)
+            , UserAuthorityRepository userAuthorityRepository)
             
             
         {
         {
             _syscomRep = syscom;
             _syscomRep = syscom;
             _sysDepRep = sysDepRep;
             _sysDepRep = sysDepRep;
-            _messageRep = messageRep;
             _userRep = userRep;
             _userRep = userRep;
             _mapper = mapper;
             _mapper = mapper;
             _setDataRepository = setDataRepository;
             _setDataRepository = setDataRepository;
@@ -45,83 +45,42 @@ namespace OASystem.API.Controllers
             _SystemMenuAndFunctionRepository = systemMenuAndFunctionRepository;
             _SystemMenuAndFunctionRepository = systemMenuAndFunctionRepository;
             _JobPostAuthorityRepository = jobPostAuthorityRepository;
             _JobPostAuthorityRepository = jobPostAuthorityRepository;
             _UserAuthorityRepository = userAuthorityRepository;
             _UserAuthorityRepository = userAuthorityRepository;
+            _jobRep = jobRep;
         }
         }
         #region 消息
         #region 消息
 
 
-        /// <summary>
-        /// 获取消息列表
-        /// </summary>
-        /// <param name="dto"></param>
-        /// <returns></returns>
-        [HttpPost]
-        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> GetMsgList(MsgDto dto)
-        {
-            var msgData = await _messageRep.GetMsgList(dto);
 
 
-            if (msgData.Code != 0)
-            {
-                return Ok(JsonView(false, msgData.Msg));
-            }
 
 
-            return Ok(JsonView(true, msgData.Data));
+        #endregion
-        }
-
-        /// <summary>
-        /// 获取消息详细信息
-        /// </summary>
-        /// <param name="dto"></param>
-        /// <returns></returns>
-        [HttpPost]
-        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> GetMsgInfo(MsgInfoDto dto)
-        {
-            var msgData = await _messageRep.GetMsgInfo(dto);
-
-            if (msgData.Code != 0)
-            {
-                return Ok(JsonView(false, msgData.Msg));
-            }
-
-            return Ok(JsonView(true, msgData.Data));
-        }
 
 
+        #region 类型表
         /// <summary>
         /// <summary>
-        /// 消息设置已读
+        /// 查询类型数据
         /// </summary>
         /// </summary>
         /// <param name="dto"></param>
         /// <param name="dto"></param>
         /// <returns></returns>
         /// <returns></returns>
         [HttpPost]
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> SetMessageRead(MsgSetReadDto dto)
+        public async Task<IActionResult> QuerSetData(SetDataDto dto)
         {
         {
-            var msgData = await _messageRep.SetMsgRead(dto);
+            try
-
-            if (msgData.Code != 0)
             {
             {
-                return Ok(JsonView(false, msgData.Msg));
+                if (dto.DataType==0)
+                {
+                    return Ok(JsonView(false, "请传类型Id!"));
+                }
+                var setData = _setDataRepository.QueryDto<Sys_SetData, SetDataView>(s=>s.STid==dto.DataType).ToList();
+                if (setData.Count == 0)
+                {
+                    return Ok(JsonView(false, "暂无数据!"));
+                }
+                return Ok(JsonView(true, "查询成功!",setData));
             }
             }
-
+            catch (Exception ex)
-            return Ok(JsonView(true, msgData.Data));
-        }
-
-        /// <summary>
-        /// 消息设置已读
-        /// </summary>
-        /// <param name="dto"></param>
-        /// <returns></returns>
-        [HttpPost]
-        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
-        public async Task<IActionResult> DeleMsg(MsgDeleteDto dto)
-        {
-            var msgData = await _messageRep.DelMsg(dto);
-
-            if (msgData.Code != 0)
             {
             {
-                return Ok(JsonView(false, msgData.Msg));
+                return Ok(JsonView(false, "程序错误!"));
+                throw;
             }
             }
-
-            return Ok(JsonView(true, msgData.Data));
         }
         }
         #endregion
         #endregion
 
 
@@ -514,12 +473,28 @@ namespace OASystem.API.Controllers
             {
             {
                 if (dto.PortType == 1)
                 if (dto.PortType == 1)
                 {
                 {
-                    var result = _sysDepRep.QueryDto<Sys_JobPost, JobPostView>(s => s.CompanyId == dto.CompanyId && s.DepId == dto.DepId).ToList();
+                    string sqlWhere = string.Empty;
-                    if (result.Count == 0)
+                    if (dto.CompanyId != 0)
+                    {
+                        sqlWhere += string.Format(@" And jp.CompanyId={0}", dto.CompanyId);
+                    }
+                    if (dto.DepId != 0)
+                    {
+                        sqlWhere += string.Format(@" And jp.DepId={0}", dto.DepId);
+                    }
+                    if (!string.IsNullOrEmpty(sqlWhere.Trim()))
+                    {
+                        Regex r = new Regex("And");
+                        sqlWhere = r.Replace(sqlWhere, "Where", 1);
+                    }
+                    List<Sys_JobPostI> jobList = await _jobRep.QueryJobPost(sqlWhere);
+
+                    List<JobPostView> List = _mapper.Map<List<JobPostView>>(jobList);
+                    if (jobList.Count == 0)
                     {
                     {
                         return Ok(JsonView(false, "暂无数据!"));
                         return Ok(JsonView(false, "暂无数据!"));
                     }
                     }
-                    return Ok(JsonView(true, "查询成功!", result));
+                    return Ok(JsonView(true, "查询成功!", jobList));
                 }
                 }
                 else if (dto.PortType == 2)
                 else if (dto.PortType == 2)
                 {
                 {
@@ -683,14 +658,9 @@ namespace OASystem.API.Controllers
                     Regex r = new Regex("And");
                     Regex r = new Regex("And");
                     sqlWhere = r.Replace(sqlWhere, "Where", 1);
                     sqlWhere = r.Replace(sqlWhere, "Where", 1);
                 }
                 }
-                string userSqlWhere = string.Format(@"Select sc.CompanyName,sd.DepName,sjp.JobName,su.* From Sys_Users su 
+                List<UserInfo> _userList =await _userRep.QueryUser(sqlWhere);
-                                                        Inner Join Sys_Company sc On su.CompanyId = sc.Id
-                                                        Inner Join Sys_Department sd On su.DepId = sd.Id
-                                                        Inner Join Sys_JobPost sjp On su.JobPostId = sjp.Id {0}", sqlWhere);
-                var _userList =_userRep.GetListBySqlWithNolock(userSqlWhere);
                 if (_userList.Count == 0)
                 if (_userList.Count == 0)
                 {
                 {
-                    
                     return Ok(JsonView(false, "暂无数据!"));
                     return Ok(JsonView(false, "暂无数据!"));
                 }
                 }
                 List<UserInfoWebView> userList = _mapper.Map<List<UserInfoWebView>>(_userList);
                 List<UserInfoWebView> userList = _mapper.Map<List<UserInfoWebView>>(_userList);

+ 4 - 0
OASystem/OASystem.Api/GlobalUsings.cs

@@ -51,5 +51,9 @@ global using OASystem.Domain.Dtos.System;
 global using OASystem.Domain.Entities.System;
 global using OASystem.Domain.Entities.System;
 global using OASystem.Domain.ViewModels.System;
 global using OASystem.Domain.ViewModels.System;
 global using OASystem.Infrastructure.Repositories.System;
 global using OASystem.Infrastructure.Repositories.System;
+global using OASystem.Domain.Dtos.Resource;
+global using OASystem.Domain.Entities.Resource;
+global using OASystem.Domain.ViewModels.Resource;
+global using OASystem.Infrastructure.Repositories.Resource;
 
 
 
 

+ 11 - 0
OASystem/OASystem.Domain/AutoMappers/_baseMappingProfile.cs

@@ -1,10 +1,13 @@
 using OASystem.Domain.Dtos.Groups;
 using OASystem.Domain.Dtos.Groups;
+using OASystem.Domain.Dtos.Resource;
 using OASystem.Domain.Dtos.System;
 using OASystem.Domain.Dtos.System;
 using OASystem.Domain.Dtos.UserDto;
 using OASystem.Domain.Dtos.UserDto;
 using OASystem.Domain.Entities;
 using OASystem.Domain.Entities;
 using OASystem.Domain.Entities.Groups;
 using OASystem.Domain.Entities.Groups;
+using OASystem.Domain.Entities.Resource;
 using OASystem.Domain.Entities.System;
 using OASystem.Domain.Entities.System;
 using OASystem.Domain.ViewModels;
 using OASystem.Domain.ViewModels;
+using OASystem.Domain.ViewModels.Resource;
 using OASystem.Domain.ViewModels.System;
 using OASystem.Domain.ViewModels.System;
 
 
 namespace OASystem.Domain.AutoMappers
 namespace OASystem.Domain.AutoMappers
@@ -40,6 +43,7 @@ namespace OASystem.Domain.AutoMappers
             #region 岗位板块
             #region 岗位板块
             CreateMap<Sys_JobPost, JobPostView>();
             CreateMap<Sys_JobPost, JobPostView>();
             CreateMap<AddJobPostDto,Sys_JobPost>();
             CreateMap<AddJobPostDto,Sys_JobPost>();
+            CreateMap<Sys_JobPostI, JobPostView>();
             #endregion
             #endregion
 
 
             #region 用户板块
             #region 用户板块
@@ -55,6 +59,13 @@ namespace OASystem.Domain.AutoMappers
 
 
             CreateMap<GroupListDto, Grp_DelegationInfo>();
             CreateMap<GroupListDto, Grp_DelegationInfo>();
             #endregion
             #endregion
+
+            #region Resource
+            #region 车公司资料
+            CreateMap<Res_CarData, CarDataView>();
+            CreateMap<AddCarDataDto, Res_CarData>();
+            #endregion
+            #endregion
         }
         }
     }
     }
 }
 }

+ 311 - 0
OASystem/OASystem.Domain/Dtos/Resource/CarDataDto.cs

@@ -0,0 +1,311 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.Resource
+{
+    /// <summary>
+    /// 添加车公司数据参数
+    /// </summary>
+    public class AddCarDataDto
+    {
+        /// <summary>
+        /// 区域
+        /// </summary>
+        public string UnitArea { get; set; }
+
+        /// <summary>
+        /// 公司名称
+        /// </summary>
+        public string UnitName { get; set; }
+
+        /// <summary>
+        /// 地址
+        /// </summary>
+        public string Address { get; set; }
+
+        /// <summary>
+        /// 联系人
+        /// </summary>
+        public string Contact { get; set; }
+
+        /// <summary>
+        /// 联系人手机号
+        /// </summary>
+        private string contactTel;
+        public string ContactTel
+        {
+            get
+            {
+                return contactTel;
+            }
+            set
+            {
+                if (Regex.IsMatch(value, @"^[1]+[2,3,4,5,6,7,8,9]+\d{9}"))
+                {
+                    contactTel = value;
+                }
+                else
+                {
+                    contactTel = "";
+                }
+
+            }
+        }
+
+        /// <summary>
+        /// 联系人邮箱
+        /// </summary>
+        public string ContactEmail { get; set; }
+
+        /// <summary>
+        /// 联系人传真
+        /// </summary>
+        public string ContactFax { get; set; }
+
+        /// <summary>
+        /// 车描述
+        /// </summary>
+        public string CarDes { get; set; }
+
+        /// <summary>
+        /// 车图片路径
+        /// 存储多个 使用/r/n
+        /// </summary>
+        public string CarPicPaths { get; set; }
+
+
+        /// <summary>
+        /// 其他信息
+        /// </summary>
+        public string OtherInfo { get; set; }
+
+        /// <summary>
+        /// 服务评分
+        /// </summary>
+        public int Score { get; set; }
+
+        /// <summary>
+        /// 相关的车辆资质
+        /// A B C  选择
+        /// </summary>
+        public string QualificationScore { get; set; }
+
+        /// <summary>
+        /// 车辆2-4年新,VIP及以上需要2年新
+        /// A B C  选择
+        /// </summary>
+        public string CarAgeScore { get; set; }
+
+        /// <summary>
+        /// 车身干净,无文字图片等
+        /// A B C  选择
+        /// </summary>
+        public string CleanImgScore { get; set; }
+
+        /// <summary>
+        /// 车内整洁、无异味
+        /// A B C  选择
+        /// </summary>
+        public string SmellScore { get; set; }
+
+        /// <summary>
+        /// 提前备水,纸巾等
+        /// A B C  选择
+        /// </summary>
+        public string WaterPaperScore { get; set; }
+
+        /// <summary>
+        /// 车辆配置高(皮座椅等)
+        /// A B C  选择
+        /// </summary>
+        public string HardwareScore { get; set; }
+
+        /// <summary>
+        /// 时间概念强
+        /// A B C  选择
+        /// </summary>
+        public string TimeScore { get; set; }
+
+        /// <summary>
+        /// 安全意识高
+        /// A B C  选择
+        /// </summary>
+        public string SafetyScore { get; set; }
+
+        /// <summary>
+        /// 司机驾龄时间长,提前熟悉路线
+        /// A B C  选择
+        /// </summary>
+        public string DrivingAgeScore { get; set; }
+        /// <summary>
+        /// 创建者Id
+        /// </summary>
+        public int CreateUserId { get; set; }
+        /// <summary>
+        /// 备注
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
+        public string Remark { get; set; }
+    }
+    /// <summary>
+    /// 修改车公司数据参数
+    /// </summary>
+    public class UpCarDataDto
+    {
+        /// <summary>
+        /// Id
+        /// </summary>
+        public int Id { get; set; }
+        /// <summary>
+        /// 区域
+        /// </summary>
+        public string UnitArea { get; set; }
+
+        /// <summary>
+        /// 公司名称
+        /// </summary>
+        public string UnitName { get; set; }
+
+        /// <summary>
+        /// 地址
+        /// </summary>
+        public string Address { get; set; }
+
+        /// <summary>
+        /// 联系人
+        /// </summary>
+        public string Contact { get; set; }
+
+        /// <summary>
+        /// 联系人手机号
+        /// </summary>
+        private string contactTel;
+        public string ContactTel
+        {
+            get
+            {
+                return contactTel;
+            }
+            set
+            {
+                if (Regex.IsMatch(value, @"^[1]+[2,3,4,5,6,7,8,9]+\d{9}"))
+                {
+                    contactTel = value;
+                }
+                else
+                {
+                    contactTel = "";
+                }
+
+            }
+        }
+
+        /// <summary>
+        /// 联系人邮箱
+        /// </summary>
+        public string ContactEmail { get; set; }
+
+        /// <summary>
+        /// 联系人传真
+        /// </summary>
+        public string ContactFax { get; set; }
+
+        /// <summary>
+        /// 车描述
+        /// </summary>
+        public string CarDes { get; set; }
+
+        /// <summary>
+        /// 车图片路径
+        /// 存储多个 使用/r/n
+        /// </summary>
+        public string CarPicPaths { get; set; }
+
+
+        /// <summary>
+        /// 其他信息
+        /// </summary>
+        public string OtherInfo { get; set; }
+
+        /// <summary>
+        /// 服务评分
+        /// </summary>
+        public int Score { get; set; }
+
+        /// <summary>
+        /// 相关的车辆资质
+        /// A B C  选择
+        /// </summary>
+        public string QualificationScore { get; set; }
+
+        /// <summary>
+        /// 车辆2-4年新,VIP及以上需要2年新
+        /// A B C  选择
+        /// </summary>
+        public string CarAgeScore { get; set; }
+
+        /// <summary>
+        /// 车身干净,无文字图片等
+        /// A B C  选择
+        /// </summary>
+        public string CleanImgScore { get; set; }
+
+        /// <summary>
+        /// 车内整洁、无异味
+        /// A B C  选择
+        /// </summary>
+        public string SmellScore { get; set; }
+
+        /// <summary>
+        /// 提前备水,纸巾等
+        /// A B C  选择
+        /// </summary>
+        public string WaterPaperScore { get; set; }
+
+        /// <summary>
+        /// 车辆配置高(皮座椅等)
+        /// A B C  选择
+        /// </summary>
+        public string HardwareScore { get; set; }
+
+        /// <summary>
+        /// 时间概念强
+        /// A B C  选择
+        /// </summary>
+        public string TimeScore { get; set; }
+
+        /// <summary>
+        /// 安全意识高
+        /// A B C  选择
+        /// </summary>
+        public string SafetyScore { get; set; }
+
+        /// <summary>
+        /// 司机驾龄时间长,提前熟悉路线
+        /// A B C  选择
+        /// </summary>
+        public string DrivingAgeScore { get; set; }
+       
+        /// <summary>
+        /// 备注
+        /// </summary>
+        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
+        public string Remark { get; set; }
+    }
+
+    public class DelCarDataDto
+    {
+        /// <summary>
+        /// 删除Id
+        /// </summary>
+        public int Id { get; set; }
+        /// <summary>
+        /// 删除人Id
+        /// </summary>
+        public int DeleteUserId { get; set; }
+    }
+}

+ 19 - 0
OASystem/OASystem.Domain/Dtos/System/SetDataDto.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.Dtos.System
+{
+    /// <summary>
+    /// 类型表参数
+    /// </summary>
+    public class SetDataDto
+    {
+        /// <summary>
+        /// 数据类型
+        /// </summary>
+        public int DataType { get; set; }
+    }
+}

+ 9 - 0
OASystem/OASystem.Domain/Entities/System/Sys_JobPost.cs

@@ -24,5 +24,14 @@ namespace OASystem.Domain.Entities.System
         public string JobName { get; set; }
         public string JobName { get; set; }
        
        
     }
     }
+    #region 附加字段
+
+    #endregion
+    public class Sys_JobPostI:Sys_JobPost
+    {
+        public string CompanyName { get; set; }
+
+        public string DepName { get; set; }
+    }
 
 
 }
 }

+ 13 - 0
OASystem/OASystem.Domain/ViewModels/Resource/CarDataView.cs

@@ -0,0 +1,13 @@
+using OASystem.Domain.Entities.Resource;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace OASystem.Domain.ViewModels.Resource
+{
+    public class CarDataView:Res_CarData
+    {
+    }
+}

+ 15 - 0
OASystem/OASystem.Domain/ViewModels/System/JobPostView.cs

@@ -24,8 +24,23 @@ namespace OASystem.Domain.ViewModels.System
         /// </summary>
         /// </summary>
         public int CompanyId { get; set; }
         public int CompanyId { get; set; }
         /// <summary>
         /// <summary>
+        /// 公司名称
+        /// </summary>
+        public string CompanyName { get; set; }
+        /// <summary>
         /// 部门Id
         /// 部门Id
         /// </summary>
         /// </summary>
         public int DepId { get; set; }
         public int DepId { get; set; }
+        /// <summary>
+        /// 部门Id
+        /// </summary>
+        public string DepName { get; set; }
+
+        /// <summary>
+        /// 备注
+        /// </summary>
+        public string Remark { get; set; }
     }
     }
+
+
 }
 }

+ 11 - 0
OASystem/OASystem.Infrastructure/Repositories/BaseRepository.cs

@@ -177,6 +177,7 @@ namespace OASystem.Infrastructure.Repositories
             }).ExecuteCommandAsync();
             }).ExecuteCommandAsync();
             return result > 0;
             return result > 0;
         }
         }
+       
         public virtual async Task<bool> SoftDeleteAsync(Expression<Func<TEntity, bool>> wherexp)
         public virtual async Task<bool> SoftDeleteAsync(Expression<Func<TEntity, bool>> wherexp)
         {
         {
             var result = await _sqlSugar.Updateable<TEntity>().Where(wherexp).SetColumns(a => new TEntity()
             var result = await _sqlSugar.Updateable<TEntity>().Where(wherexp).SetColumns(a => new TEntity()
@@ -244,6 +245,16 @@ namespace OASystem.Infrastructure.Repositories
             }).ExecuteCommandAsync();
             }).ExecuteCommandAsync();
             return result > 0;
             return result > 0;
         }
         }
+        public virtual async Task<bool> SoftDeleteByIdAsync<T>(string id,int DeleteUserId) where T : EntityBase, new()
+        {
+            var result = await _sqlSugar.Updateable<TEntity>().Where(a => a.Id.Equals(id)).SetColumns(a => new TEntity()
+            {
+                IsDel = 1,
+                DeleteUserId = DeleteUserId,
+                DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
+            }).ExecuteCommandAsync();
+            return result > 0;
+        }
         public virtual async Task<bool> SoftDeleteAsync<T>(Expression<Func<TEntity, bool>> wherexp) where T : EntityBase, new()
         public virtual async Task<bool> SoftDeleteAsync<T>(Expression<Func<TEntity, bool>> wherexp) where T : EntityBase, new()
         {
         {
             var result = await _sqlSugar.Updateable<TEntity>().Where(wherexp).SetColumns(a => new TEntity()
             var result = await _sqlSugar.Updateable<TEntity>().Where(wherexp).SetColumns(a => new TEntity()

+ 12 - 0
OASystem/OASystem.Infrastructure/Repositories/Resource/CarDataRepository.cs

@@ -0,0 +1,12 @@
+using OASystem.Domain.Entities.Resource;
+using OASystem.Domain.ViewModels.Resource;
+namespace OASystem.Infrastructure.Repositories.Resource
+{
+    public class CarDataRepository: BaseRepository<Res_CarData, CarDataView>
+    {
+        public CarDataRepository(SqlSugarClient sqlSugar) : base(sqlSugar)
+        {
+
+        }
+    }
+}

+ 10 - 1
OASystem/OASystem.Infrastructure/Repositories/System/JobPostRepository.cs

@@ -1,4 +1,5 @@
 using OASystem.Domain.Dtos.System;
 using OASystem.Domain.Dtos.System;
+using SqlSugar;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
@@ -7,11 +8,19 @@ using System.Threading.Tasks;
 
 
 namespace OASystem.Infrastructure.Repositories.System
 namespace OASystem.Infrastructure.Repositories.System
 {
 {
-    public class JobPostRepository : BaseRepository<Sys_JobPost, QueryJobPostDto>
+    public class JobPostRepository : BaseRepository<Sys_JobPost, JobPostView>
     {
     {
         public JobPostRepository(SqlSugarClient sqlSugar) : base(sqlSugar)
         public JobPostRepository(SqlSugarClient sqlSugar) : base(sqlSugar)
         {
         {
 
 
         }
         }
+
+        public async Task<List<Sys_JobPostI>> QueryJobPost(string sqlWhere)
+        {
+            string sql = string.Format(@"select jp.*,dep.DepName as 'DepName',cmp.CompanyName as 'CompanyName' from Sys_JobPost jp left join 
+                                                 Sys_Company cmp on jp.CompanyId=cmp.Id left join Sys_Department dep on jp.DepId=dep.Id  {0}", sqlWhere);
+            return await _sqlSugar.SqlQueryable<Sys_JobPostI>(sql).ToListAsync();
+        }
+
     }
     }
 }
 }

+ 10 - 0
OASystem/OASystem.Infrastructure/Repositories/System/UsersRepository.cs

@@ -2,6 +2,7 @@
 using OASystem.Domain;
 using OASystem.Domain;
 using OASystem.Domain.Entities.System;
 using OASystem.Domain.Entities.System;
 using OASystem.Domain.ViewModels.System;
 using OASystem.Domain.ViewModels.System;
+using SqlSugar;
 using StackExchange.Redis;
 using StackExchange.Redis;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
@@ -142,5 +143,14 @@ namespace OASystem.Infrastructure.Repositories.System
 
 
             return result;
             return result;
         }
         }
+        public async Task<List<UserInfo>> QueryUser(string sqlWhere)
+        {
+            string sql = string.Format(@"Select sc.CompanyName,sd.DepName,sjp.JobName,su.* From Sys_Users su 
+                                                        Inner Join Sys_Company sc On su.CompanyId = sc.Id
+                                                        Inner Join Sys_Department sd On su.DepId = sd.Id
+                                                        Inner Join Sys_JobPost sjp On su.JobPostId = sjp.Id {0}", sqlWhere);
+            return await _sqlSugar.SqlQueryable<UserInfo>(sql).ToListAsync();
+
+        }
     }
     }
 }
 }