From 10000884c7f8b9262c3142eabafc95f31b63a9e3 Mon Sep 17 00:00:00 2001 From: ky_yusj <2655568377@qq.com> Date: Tue, 1 Jun 2021 17:40:52 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E4=BB=BB=E5=8A=A1=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/Ewide.Application/Entity/BsHouseInfo.cs | 2 +- Api/Ewide.Application/Entity/BsHouseTask.cs | 200 +++++++++ .../Entity/BsHouseTaskOptions.cs | 60 +++ Api/Ewide.Application/Ewide.Application.xml | 395 +++++++++++++++--- .../HouseSafety/HouseCode/HouseCodeService.cs | 6 +- .../HouseInfo/Dto/HouseInfoInput.cs | 12 + .../HouseInfo/Dto/HouseInfoOutput.cs | 12 + .../HouseSafety/HouseInfo/HouseInfoService.cs | 32 ++ .../HouseInfo/IHouseInfoService.cs | 13 + .../HouseSelector/HouseSelectorService.cs | 22 + .../HouseTask/Dto/HouseTaskInput.cs | 129 ++++++ .../HouseTask/Dto/HouseTaskOutput.cs | 12 + .../HouseSafety/HouseTask/HouseTaskService.cs | 46 ++ .../HouseTask/IHouseTaskService.cs | 13 + Api/Ewide.Core/Ewide.Core.xml | 2 +- .../business/houseSafety/houseInfo.js | 3 + .../business/houseSafety/houseTask.js | 4 + .../requests/business/houseSafety/index.js | 6 +- Web/src/pages/business/house/code/index.vue | 16 +- .../house/info/form/base/building.vue | 2 +- .../pages/business/house/info/form/index.vue | 12 +- Web/src/pages/business/house/task/index.vue | 303 ++++++++++++++ 22 files changed, 1224 insertions(+), 78 deletions(-) create mode 100644 Api/Ewide.Application/Entity/BsHouseTask.cs create mode 100644 Api/Ewide.Application/Entity/BsHouseTaskOptions.cs create mode 100644 Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs create mode 100644 Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs create mode 100644 Api/Ewide.Application/Service/HouseSafety/HouseInfo/HouseInfoService.cs create mode 100644 Api/Ewide.Application/Service/HouseSafety/HouseInfo/IHouseInfoService.cs create mode 100644 Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskInput.cs create mode 100644 Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskOutput.cs create mode 100644 Api/Ewide.Application/Service/HouseSafety/HouseTask/HouseTaskService.cs create mode 100644 Api/Ewide.Application/Service/HouseSafety/HouseTask/IHouseTaskService.cs create mode 100644 Web/src/common/api/requests/business/houseSafety/houseInfo.js create mode 100644 Web/src/common/api/requests/business/houseSafety/houseTask.js create mode 100644 Web/src/pages/business/house/task/index.vue diff --git a/Api/Ewide.Application/Entity/BsHouseInfo.cs b/Api/Ewide.Application/Entity/BsHouseInfo.cs index dfe057b..952062a 100644 --- a/Api/Ewide.Application/Entity/BsHouseInfo.cs +++ b/Api/Ewide.Application/Entity/BsHouseInfo.cs @@ -7,7 +7,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Ewide.Application.Entity +namespace Ewide.Application { [Table("bs_house_info")] [Comment("房屋信息表")] diff --git a/Api/Ewide.Application/Entity/BsHouseTask.cs b/Api/Ewide.Application/Entity/BsHouseTask.cs new file mode 100644 index 0000000..5372b1a --- /dev/null +++ b/Api/Ewide.Application/Entity/BsHouseTask.cs @@ -0,0 +1,200 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Ewide.Application +{ + [Table("bs_house_task")] + [Comment("房屋巡查任务表")] + public class BsHouseTask : Core.DEntityBase + { + /// + /// bs_house_code主键Id + /// + [Comment("bs_house_code主键Id")] + [MaxLength(36)] + [Required] + public string HouseCodeId { get; set; } + + /// + /// 巡查日期 + /// + [Comment("巡查日期")] + public DateTime? PatrolDate { get; set; } + + /// + /// 巡查人姓名 + /// + [Comment("巡查人姓名")] + [MaxLength(50)] + public string PatrolUser { get; set; } + + /// + /// 沉降倾斜 + /// + [Comment("沉降倾斜")] + [MaxLength(1000)] + public string SettlementTilt { get; set; } + + /// + /// 沉降倾斜附件 + /// + [Comment("沉降倾斜附件")] + [MaxLength(2000)] + public string SettlementTiltFiles { get; set; } + + /// + /// 其他情况 + /// + [Comment("其他情况")] + [MaxLength(1000)] + public string OtherInfo { get; set; } + + /// + /// 其他情况附件 + /// + [Comment("其他情况附件")] + [MaxLength(2000)] + public string OtherInfoFiles { get; set; } + + /// + /// 初始等级 + /// + [Comment("初始等级")] + public int? InitLevel { get; set; } + + /// + /// 损坏等级 + /// + [Comment("损坏等级")] + public int? DamageLevel { get; set; } + + /// + /// 综合等级 + /// + [Comment("综合等级")] + public int? ComprehensiveLevel { get; set; } + + /// + /// 主要安全隐患综述 + /// + [Comment("主要安全隐患综述")] + [MaxLength(1000)] + public string MainSafety { get; set; } + + /// + /// 处理意见 + /// + [Comment("处理意见")] + public int? HandlingOpinion { get; set; } + + /// + /// 处理意见备注 + /// + [Comment("处理意见备注")] + [MaxLength(1000)] + public string HandlingOpinionRemark { get; set; } + + /// + /// 整改情况 + /// + [Comment("整改情况")] + public int? RectifyAndReform { get; set; } + + /// + /// 整改情况备注 + /// + [Comment("整改情况备注")] + [MaxLength(1000)] + public string RectifyAndReformRemark { get; set; } + + /// + /// 巡查结果:1正常,-1异常 + /// + [Comment("巡查结果:1正常,-1异常")] + public int? PatrolResult { get; set; } + + /// + /// 巡查异常描述 + /// + [Comment("巡查异常描述")] + [MaxLength(1000)] + public string PatrolResultRemark { get; set; } + + /// + /// 任务人员ID + /// + [Comment("任务人员ID")] + [MaxLength(36)] + public string UserID { get; set; } + + /// + /// 任务截止时间 + /// + [Comment("任务截止时间")] + public DateTime? EndTime { get; set; } + + /// + /// 是否过期 + /// + [Comment("是否过期")] + public bool? IsDelay { get; set; } + + /// + /// -1:退回0:待处理1:保存待提交2:待审核3:审核通过 + /// + [Comment("-1:退回0:待处理1:保存待提交2:待审核3:审核通过")] + public int Status { get; set; } = 0; + + /// + /// 0:建档任务1:系统派发的巡查任务2:主动巡查任务 + /// + [Comment("0:建档任务1:系统派发的巡查任务2:主动巡查任务")] + public int? TaskType { get; set; } + + /// + /// 上报街道 + /// + [Comment("上报街道")] + public int? ReportRoad { get; set; } + + /// + /// 上报街道时间 + /// + [Comment("上报街道时间")] + public DateTime? ReportRoadTime { get; set; } + + /// + /// 上报区住建 + /// + [Comment("上报区住建")] + public int? ReportArea { get; set; } + + /// + /// 上报区住建时间 + /// + [Comment("上报区住建时间")] + public DateTime? ReportAreaTime { get; set; } + + /// + /// 上报备注 + /// + [Comment("上报备注")] + [MaxLength(1000)] + public string ReportRemark { get; set; } + + /// + /// 提交时间 + /// + [Comment("提交时间")] + public DateTime? SubmitTime { get; set; } + + /// + /// 最后提交时间 + /// + [Comment("最后提交时间")] + public DateTime? LastSubmitTime { get; set; } + + } +} diff --git a/Api/Ewide.Application/Entity/BsHouseTaskOptions.cs b/Api/Ewide.Application/Entity/BsHouseTaskOptions.cs new file mode 100644 index 0000000..c279a1b --- /dev/null +++ b/Api/Ewide.Application/Entity/BsHouseTaskOptions.cs @@ -0,0 +1,60 @@ +using Microsoft.EntityFrameworkCore; +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +namespace Ewide.Application +{ + [Table("bs_house_task_options")] + [Comment("房屋巡查任务选项表")] + public class BsHouseTaskOptions : Core.DEntityBase + { + /// + /// bs_house_code主键Id + /// + [Comment("bs_house_code主键Id")] + [MaxLength(36)] + [Required] + public string TaskId { get; set; } + + /// + /// 字典类型 + /// + [Comment("字典类型")] + [MaxLength(50)] + public string DictType { get; set; } + + /// + /// 字典code + /// + [Comment("字典code")] + [MaxLength(50)] + public string DictCode { get; set; } + + /// + /// 字典值 + /// + [Comment("字典值")] + [MaxLength(100)] + public string DictValue { get; set; } + + /// + /// 备注 + /// + [Comment("备注")] + [MaxLength(500)] + public string Remark { get; set; } + + /// + /// 附件 + /// + [Comment("附件")] + [MaxLength(2000)] + public string File { get; set; } + + /// + /// 是否选中 + /// + [Comment("是否选中")] + public bool? Checked { get; set; } + } +} diff --git a/Api/Ewide.Application/Ewide.Application.xml b/Api/Ewide.Application/Ewide.Application.xml index b42b0bd..68e6b36 100644 --- a/Api/Ewide.Application/Ewide.Application.xml +++ b/Api/Ewide.Application/Ewide.Application.xml @@ -4,327 +4,327 @@ Ewide.Application - + HouseCode主键ID - + 幢名称 - + 土地性质 - + 结构类型 - + 基础情况 - + 抗震等级 - + 竣工日期 - + 设计使用年限 - + 总层数 - + 地上层数 - + 地上商业层数开始 - + 地上商业层数结束 - + 地上车棚层开始 - + 地上住宅层开始 - + 地上住宅层结束 - + 地下层数 - + 总建筑面积 - + 有无建筑幕墙 - + 有无面砖 - + 有无涂料 - + 有无粉刷 - + 电梯 - + 总户数(户) - + 房屋单元数 - + 各单元每层户数(户) - + 建设单位ID - + 设计单位ID - + 施工单位ID - + 监理单位ID - + 产权性质 - + 总共套数 - + 直管公房套数 - + 自管公房套数 - + 私房套数 - + 商品房套数 - + 房改房套数 - + 拆迁安置房套数 - + 其它套数 - + 产权单位ID - + 物业单位ID - + 房屋场地 - + 相邻施工 - + 化学侵蚀 - + 结构拆改 - + 加层改造 - + 修缮加固 - + 历史灾害 - + 使用功能变更 - + 其他调查内容 - + 图纸资料存档处 - + 其他图纸存档 - + 立项文件 - + 规划许可 - + 竣工验收备案 - + 监理资料 - + 鉴定报告 - + 其它资料 - + 外立面照片 - + 房屋等级 1,2,3,4,C,d - + 房屋使用状态 - + 1、待建档(需要建档的数据未暂存未保存的)2、暂存(点击了暂存的数据)3、待提交(点击了保存的数据) 4、退回(审核被退回的数据)5、审核中6、审核通过 - + 调查登记机构 - + 纸质资料调查人 - + 纸质资料审核人 - + 主管部门 @@ -359,6 +359,186 @@ 单位联系人电话 + + + bs_house_code主键Id + + + + + 巡查日期 + + + + + 巡查人姓名 + + + + + 沉降倾斜 + + + + + 沉降倾斜附件 + + + + + 其他情况 + + + + + 其他情况附件 + + + + + 初始等级 + + + + + 损坏等级 + + + + + 综合等级 + + + + + 主要安全隐患综述 + + + + + 处理意见 + + + + + 处理意见备注 + + + + + 整改情况 + + + + + 整改情况备注 + + + + + 巡查结果:1正常,-1异常 + + + + + 巡查异常描述 + + + + + 任务人员ID + + + + + 任务截止时间 + + + + + 是否过期 + + + + + -1:退回0:待处理1:保存待提交2:待审核3:审核通过 + + + + + 0:建档任务1:系统派发的巡查任务2:主动巡查任务 + + + + + 上报街道 + + + + + 上报街道时间 + + + + + 上报区住建 + + + + + 上报区住建时间 + + + + + 上报备注 + + + + + 提交时间 + + + + + 最后提交时间 + + + + + bs_house_code主键Id + + + + + 字典类型 + + + + + 字典code + + + + + 字典值 + + + + + 备注 + + + + + 附件 + + + + + 是否选中 + + 片区监管员 @@ -545,6 +725,11 @@ + + + 房屋任务(巡查任务/建档任务) + + 片区相关 @@ -564,5 +749,85 @@ + + + 沉降倾斜 + + + + + 沉降倾斜附件 + + + + + 其他情况 + + + + + 其他情况附件 + + + + + 主要安全隐患综述 + + + + + 处理意见 + + + + + 处理意见备注 + + + + + 整改情况 + + + + + 整改情况备注 + + + + + 巡查结果:1正常,-1异常 + + + + + -1:退回 0:待处理 1:保存待提交 2:待审核 3:审核通过 + + + + + 上报街道 + + + + + 上报街道时间 + + + + + 上报区住建 + + + + + 上报区住建时间 + + + + + 上报备注 + + diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseCode/HouseCodeService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseCode/HouseCodeService.cs index 1a6c24a..2523e7c 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseCode/HouseCodeService.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseCode/HouseCodeService.cs @@ -66,12 +66,12 @@ namespace Ewide.Application.Service.HouseCode [HttpPost("/houseCode/page")] public async Task QueryPage([FromBody] QueryHouseCodeInput input) { - var sql = @"SELECT HC.*,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,Proj.AreaCode,Proj.Note,Proj.Name+'('+Proj.Note+')' FullProjName FROM bs_house_code HC + var sql = @"SELECT HC.*,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,Proj.AreaCode,Proj.Note,CONCAT(Proj.Name,'(',Proj.Note,')') FullProjName FROM bs_house_code HC LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId LEFT JOIN sys_area_code CA ON CA.Code = Proj.AreaCode LEFT JOIN sys_area_code RA ON RA.AdCode = SUBSTR(CA.AdCode,1,9) -LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6) WHERE HC.Address LIKE @Address AND HC.HouseCode LIKE @HouseCode"; - return await _dapperRepository.QueryPageData(sql, input, param: new { Address = '%' + input.Address + '%', HouseCode = '%' + input.HouseCode + '%'}); +LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6) "; + return await _dapperRepository.QueryPageDataDynamic(sql, input, filterFields: new string[] {"Type", "Address", "HouseCode" }); } /// diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs new file mode 100644 index 0000000..28de2ae --- /dev/null +++ b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoInput.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Ewide.Application +{ + class HouseInfoInput + { + } +} diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs new file mode 100644 index 0000000..5a1f700 --- /dev/null +++ b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/Dto/HouseInfoOutput.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Ewide.Application +{ + public class HouseInfoOutput + { + } +} diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/HouseInfoService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/HouseInfoService.cs new file mode 100644 index 0000000..b81e2b8 --- /dev/null +++ b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/HouseInfoService.cs @@ -0,0 +1,32 @@ +using Dapper; +using Furion.DatabaseAccessor; +using Furion.DependencyInjection; +using Furion.DynamicApiController; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Ewide.Application.Service.HouseSafety.HouseInfo +{ + public class HouseInfoService : IHouseInfoService, IDynamicApiController, ITransient + { + private readonly IRepository _houseInfoRep; + private readonly IDapperRepository _dapperRepository; + + public HouseInfoService(IRepository HouseInfoRep, IDapperRepository dapperRepository) + { + _houseInfoRep = HouseInfoRep; + _dapperRepository = dapperRepository; + } + + //[HttpGet("/houseInfo/getByTaskId")] + //public async Task GetByTaskId([Required] string taskId) + //{ + + //} + } +} diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseInfo/IHouseInfoService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/IHouseInfoService.cs new file mode 100644 index 0000000..a5b31d3 --- /dev/null +++ b/Api/Ewide.Application/Service/HouseSafety/HouseInfo/IHouseInfoService.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Ewide.Application.Service +{ + public interface IHouseInfoService + { + //async Task GetByTaskId(string taskId); + } +} diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseSelector/HouseSelectorService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseSelector/HouseSelectorService.cs index a1d2a8d..64d4d35 100644 --- a/Api/Ewide.Application/Service/HouseSafety/HouseSelector/HouseSelectorService.cs +++ b/Api/Ewide.Application/Service/HouseSafety/HouseSelector/HouseSelectorService.cs @@ -23,18 +23,21 @@ namespace Ewide.Application.Service private readonly IRepository _bsHouseMemberRelationRep; private readonly IRepository _bsHouseCodeRep; + private readonly IRepository _bsHouseTaskRep; private readonly IHouseZoneService _houseZoneService; public HouseSelectorService( IDapperRepository dapperRep, IRepository bsHouseMemberRelationRep, IRepository bsHouseCodeRep, + IRepository bsHouseTaskRep, IHouseZoneService houseZoneService ) { _dapperRep = dapperRep; _bsHouseMemberRelationRep = bsHouseMemberRelationRep; _bsHouseCodeRep = bsHouseCodeRep; + _bsHouseTaskRep = bsHouseTaskRep; _houseZoneService = houseZoneService; } @@ -145,6 +148,25 @@ WHERE 1=1 SysUserId = input.UserId, HouseCodeId = p }.Insert(); + + var initTask = _bsHouseTaskRep.DetachedEntities.FirstOrDefault(t => t.TaskType == 0); + if (initTask == null) + { + new BsHouseTask + { + Id = System.Guid.NewGuid().ToString(), + HouseCodeId = p, + UserID = input.UserId, + EndTime = System.DateTime.Now.AddMonths(1), + Status = 0, + TaskType = 0 + }.Insert(); + } + else + { + initTask.UserID = input.UserId; + initTask.Update(); + } }); } diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskInput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskInput.cs new file mode 100644 index 0000000..2c35201 --- /dev/null +++ b/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskInput.cs @@ -0,0 +1,129 @@ +using Ewide.Core; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Ewide.Application +{ + public class HouseTaskInput : PageInputBase + { + [Required(ErrorMessage = "房屋编码ID不能为空")] + public string HouseCodeId { get; set; } + + [Required(ErrorMessage = "巡查日期不能为空")] + public DateTime PatrolDate { get; set; } + + [Required(ErrorMessage = "巡查人员/单位不能为空")] + public string PatrolUser { get; set; } + + /// + /// 沉降倾斜 + /// + public string SettlementTilt { get; set; } + + /// + /// 沉降倾斜附件 + /// + public string SettlementTiltFiles { get; set; } + + /// + /// 其他情况 + /// + public string OtherInfo { get; set; } + + /// + /// 其他情况附件 + /// + public string OtherInfoFiles { get; set; } + + [Required(ErrorMessage = "巡查初始等级不能为空")] + public int InitLevel { get; set; } + [Required(ErrorMessage = "巡查损坏等级不能为空")] + public int DamageLevel { get; set; } + [Required(ErrorMessage = "巡查综合等级不能为空")] + public int ComprehensiveLevel { get; set; } + + /// + /// 主要安全隐患综述 + /// + public string MainSafety { get; set; } + + /// + /// 处理意见 + /// + public int? HandlingOpinion { get; set; } + + /// + /// 处理意见备注 + /// + public string HandlingOpinionRemark { get; set; } + + /// + /// 整改情况 + /// + public int? RectifyAndReform { get; set; } + + /// + /// 整改情况备注 + /// + public string RectifyAndReformRemark { get; set; } + + /// + /// 巡查结果:1正常,-1异常 + /// + [Required(ErrorMessage = "巡查结果不能为空")] + public int PatrolResult { get; set; } + + public string PatrolResultRemark { get; set; } + + /// + /// -1:退回 0:待处理 1:保存待提交 2:待审核 3:审核通过 + /// + [Required(ErrorMessage = "任务目标状态能为空")] + public int Status { get; set; } + + /// + /// 上报街道 + /// + public int? ReportRoad { get; set; } + + /// + /// 上报街道时间 + /// + public DateTime? ReportRoadTime { get; set; } + + /// + /// 上报区住建 + /// + public int? ReportArea { get; set; } + + /// + /// 上报区住建时间 + /// + public DateTime? ReportAreaTime { get; set; } + + /// + /// 上报备注 + /// + public string ReportRemark { get; set; } + } + + public class AddHouseTaskInput : HouseTaskInput + { + + } + + public class EditHouseTaskInput + { + [Required(ErrorMessage = "任务Id不能为空")] + public string Id { get; set; } + } + + public class QueryHouseTaskInput : PageInputBase + { + + } +} diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskOutput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskOutput.cs new file mode 100644 index 0000000..bf03eb8 --- /dev/null +++ b/Api/Ewide.Application/Service/HouseSafety/HouseTask/Dto/HouseTaskOutput.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Ewide.Application +{ + public class HouseTaskOutput + { + } +} diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseTask/HouseTaskService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseTask/HouseTaskService.cs new file mode 100644 index 0000000..3dd4d7c --- /dev/null +++ b/Api/Ewide.Application/Service/HouseSafety/HouseTask/HouseTaskService.cs @@ -0,0 +1,46 @@ +using Dapper; +using Ewide.Core.Extension; +using Furion.DatabaseAccessor; +using Furion.DependencyInjection; +using Furion.DynamicApiController; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Ewide.Application.Service +{ + /// + /// 房屋任务(巡查任务/建档任务) + /// + [ApiDescriptionSettings(Name = "HouseTask", Order = 190)] + public class HouseTaskService : IHouseTaskService, IDynamicApiController, ITransient + { + private readonly IRepository _houseTaskRep; + private readonly IDapperRepository _dapperRepository; + + public HouseTaskService(IRepository HouseTaskRep, IDapperRepository dapperRepository) + { + _houseTaskRep = HouseTaskRep; + _dapperRepository = dapperRepository; + } + + [HttpPost("/houseTask/page")] + public async Task QueryPage([FromBody] QueryHouseTaskInput input) + { + var sql = @"SELECT T.Id,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,Proj.AreaCode,Proj.Note,Proj.Name,CONCAT(Proj.Name,'(',Proj.Note,')') FullProjName,HC.HouseCode,HC.Address,T.EndTime,HC.Type,HC.Industry,HC.No FROM `bs_house_task` T +LEFT JOIN bs_house_code HC ON T.HouseCodeId = HC.Id +LEFT JOIN bs_house_info HI ON HI.HouseCodeId = T.HouseCodeId +LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId +LEFT JOIN sys_area_code CA ON CA.Code = Proj.AreaCode +LEFT JOIN sys_area_code RA ON RA.AdCode = SUBSTR(CA.AdCode,1,9) +LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6)"; + return await _dapperRepository.QueryPageDataDynamic(sql, input, filterFields: new string[] { "Type", "Address", "HouseCode" }); + } + + + } +} diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseTask/IHouseTaskService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseTask/IHouseTaskService.cs new file mode 100644 index 0000000..75b2d3d --- /dev/null +++ b/Api/Ewide.Application/Service/HouseSafety/HouseTask/IHouseTaskService.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Ewide.Application.Service +{ + public interface IHouseTaskService + { + Task QueryPage(QueryHouseTaskInput input); + } +} diff --git a/Api/Ewide.Core/Ewide.Core.xml b/Api/Ewide.Core/Ewide.Core.xml index c2cc3e0..61553a2 100644 --- a/Api/Ewide.Core/Ewide.Core.xml +++ b/Api/Ewide.Core/Ewide.Core.xml @@ -2734,7 +2734,7 @@ 用户管理 - + 获取用户信息 diff --git a/Web/src/common/api/requests/business/houseSafety/houseInfo.js b/Web/src/common/api/requests/business/houseSafety/houseInfo.js new file mode 100644 index 0000000..1eaf664 --- /dev/null +++ b/Web/src/common/api/requests/business/houseSafety/houseInfo.js @@ -0,0 +1,3 @@ +export default { + houseInfoGetByTaskId: ['/houseInfo/getByTaskId', 'get'], +} \ No newline at end of file diff --git a/Web/src/common/api/requests/business/houseSafety/houseTask.js b/Web/src/common/api/requests/business/houseSafety/houseTask.js new file mode 100644 index 0000000..7ab3648 --- /dev/null +++ b/Web/src/common/api/requests/business/houseSafety/houseTask.js @@ -0,0 +1,4 @@ +export default { + houseTaskPage: ['/houseTask/page', 'post'], + houseTaskEdit: ['/houseTask/edit', 'post'], +} \ No newline at end of file diff --git a/Web/src/common/api/requests/business/houseSafety/index.js b/Web/src/common/api/requests/business/houseSafety/index.js index 172c834..3263f3b 100644 --- a/Web/src/common/api/requests/business/houseSafety/index.js +++ b/Web/src/common/api/requests/business/houseSafety/index.js @@ -3,11 +3,15 @@ import houseZone from './houseZone' import houseCode from './houseCode' import houseMember from './houseMember' import houseSelector from './houseSelector' +import houseTask from './houseTask' +import houseInfo from './houseInfo' export default { ...houseProjectInfo, ...houseZone, ...houseCode, ...houseMember, - ...houseSelector + ...houseSelector, + ...houseTask, + ...houseInfo } \ No newline at end of file diff --git a/Web/src/pages/business/house/code/index.vue b/Web/src/pages/business/house/code/index.vue index 3078d19..aeb839a 100644 --- a/Web/src/pages/business/house/code/index.vue +++ b/Web/src/pages/business/house/code/index.vue @@ -42,10 +42,10 @@ - 全部 + 全部 {{item.value}} @@ -112,7 +112,7 @@ export default { /* 查询条件 */ query: { - type: 0, + type: '', }, /* 表格字段 */ @@ -179,13 +179,19 @@ export default { */ loadData(params) { const query = this.$_.cloneDeep(this.query); + const searchInfo = this.$getSearchInfo({ + query, + queryType: { type: '=', address: 'like', houseCode: 'like' }, + }); + if (query.areaCode) { query.areaCode = query.areaCode[query.areaCode.length - 1]; } return this.$api[api.page]({ ...params, - ...query, + // ...query,//通过searchInfo传递查询参数 + searchInfo, }).then((res) => { return res.data; }); @@ -206,7 +212,7 @@ export default { onResetQuery() { /** 在这里重置查询条件时,可对特殊的字段做保留处理 */ this.query = { - type: 0, + type: '', }; this.onQuery(); }, diff --git a/Web/src/pages/business/house/info/form/base/building.vue b/Web/src/pages/business/house/info/form/base/building.vue index 65c3e82..f023edf 100644 --- a/Web/src/pages/business/house/info/form/base/building.vue +++ b/Web/src/pages/business/house/info/form/base/building.vue @@ -17,7 +17,7 @@ - + diff --git a/Web/src/pages/business/house/info/form/index.vue b/Web/src/pages/business/house/info/form/index.vue index e4acc4c..bca21f0 100644 --- a/Web/src/pages/business/house/info/form/index.vue +++ b/Web/src/pages/business/house/info/form/index.vue @@ -42,7 +42,7 @@ -
+