zhaozhiqiang 5 lat temu
rodzic
commit
0c954ae01e

+ 24 - 0
代码/MadRunFabirc.Model/TestUserTypeApi/Fxdjtabs.cs

1
+using MadRunFabric.Common;
2
+using MongoDB.Bson.Serialization.Attributes;
3
+using System;
4
+using System.Collections.Generic;
5
+using System.ComponentModel.DataAnnotations;
6
+using System.Text;
7
+
8
+namespace MadRunFabric.Model.TestUserTypeApi
9
+{
10
+   public  class Fxdjtabs : IBaseModel<string>
11
+    {
12
+        [Key]
13
+        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
14
+        public string id { get; set; }
15
+        /// <summary>
16
+        /// 风险等级名称 红 橙 黄  蓝
17
+        /// </summary>
18
+        public string  Fxdjname { get; set; }
19
+        /// <summary>
20
+        /// 是否删除
21
+        /// </summary>
22
+        public int isdelete { get; set; }
23
+    }
24
+}

+ 24 - 0
代码/MadRunFabirc.Model/TestUserTypeApi/Fxqytabs.cs

1
+using MadRunFabric.Common;
2
+using MongoDB.Bson.Serialization.Attributes;
3
+using System;
4
+using System.Collections.Generic;
5
+using System.ComponentModel.DataAnnotations;
6
+using System.Text;
7
+
8
+namespace MadRunFabric.Model.TestUserTypeApi
9
+{
10
+   public  class Fxqytabs : IBaseModel<string>
11
+    {
12
+        [Key]
13
+        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
14
+        public string id { get; set; }
15
+        /// <summary>
16
+        /// 区域名称
17
+        /// </summary>
18
+        public string Fxqyname { get; set; }
19
+        /// <summary>
20
+        /// 是否删除
21
+        /// </summary>
22
+        public int isdelete { get; set; }
23
+    }
24
+}

+ 64 - 0
代码/MadRunFabirc.Model/TestUserTypeApi/Yhpctabs.cs

1
+using MadRunFabric.Common;
2
+using MongoDB.Bson.Serialization.Attributes;
3
+using System;
4
+using System.Collections.Generic;
5
+using System.ComponentModel.DataAnnotations;
6
+using System.Text;
7
+
8
+namespace MadRunFabric.Model.TestUserTypeApi
9
+{
10
+   public  class Yhpctabs: IBaseModel<string>
11
+    {
12
+        /// <summary>
13
+        /// id
14
+        /// </summary>
15
+        [Key]
16
+        [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
17
+        public string id { get; set; }
18
+        /// <summary>
19
+        /// 排查标题
20
+        /// </summary>
21
+        public string Yhpctitle { get; set; }
22
+        /// <summary>
23
+        /// 风险等级编号 关联风险等级表
24
+        /// </summary>
25
+       [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
26
+        public string  Fxdjid { get; set; }
27
+        /// <summary>
28
+        /// 风险区域编号 关联风险区域表
29
+        /// </summary>
30
+        public string  Fxqyid { get; set; }
31
+        /// <summary>
32
+        /// 详情信息
33
+        /// </summary>
34
+        public string Yhpcincont { get; set; }
35
+        /// <summary>
36
+        /// 故障图片
37
+        /// </summary>
38
+        public List<FileBaseModel> faultpic;
39
+        /// <summary>
40
+        /// 隐患排查录入时间
41
+        /// </summary>
42
+        public DateTime? Yhpcdate { get; set; }
43
+        /// <summary>
44
+        /// 排查班组 有班组时让班组下的用户都可以进行操作 修改等级
45
+        /// </summary>
46
+        public string Pcbz { get; set; }
47
+        /// <summary>
48
+        /// 排查科室 有科室时让科室下的用户和班组下的用户都可以进行操作
49
+        /// </summary>
50
+        public string Pcks { get; set; }
51
+        /// <summary>
52
+        /// 排查部门 同上以此类推
53
+        /// </summary>
54
+        public string  Pcbm { get; set; }
55
+        /// <summary>
56
+        /// 排查院级 同上以此类推
57
+        /// </summary>
58
+        public string  Pcyj { get; set; }
59
+        /// <summary>
60
+        /// 是否启用
61
+        /// </summary>
62
+        public int isdelete { get; set; }
63
+    }
64
+}

+ 12 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.IRepositories/IFxdjtabsRepository.cs

1
+using MadRunFabric.Common;
2
+using MadRunFabric.Model.TestUserTypeApi;
3
+using System;
4
+using System.Collections.Generic;
5
+using System.Text;
6
+
7
+namespace TestUserTypeApi.IRepositories
8
+{
9
+    public interface  IFxdjtabsRepository : IRepository<Fxdjtabs, string>
10
+    {
11
+    }
12
+}

+ 12 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.IRepositories/IFxqytabsRepository.cs

1
+using MadRunFabric.Common;
2
+using MadRunFabric.Model.TestUserTypeApi;
3
+using System;
4
+using System.Collections.Generic;
5
+using System.Text;
6
+
7
+namespace TestUserTypeApi.IRepositories
8
+{
9
+    public interface  IFxqytabsRepository : IRepository<Fxqytabs, string>
10
+    {
11
+    }
12
+}

+ 12 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.IRepositories/IYhpctabsRepository.cs

1
+using MadRunFabric.Common;
2
+using MadRunFabric.Model.TestUserTypeApi;
3
+using System;
4
+using System.Collections.Generic;
5
+using System.Text;
6
+
7
+namespace TestUserTypeApi.IRepositories
8
+{
9
+    public interface  IYhpctabsRepository : IRepository<Yhpctabs, string>
10
+    {
11
+    }
12
+}

+ 19 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Model/Dto/Fxdjtabs.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Text;
4
+
5
+namespace TestUserTypeApi.Model.Dto
6
+{
7
+  public   class Fxdjtabs
8
+    {
9
+        public string id { get; set; }
10
+        /// <summary>
11
+        /// 风险等级名称 红 橙 黄  蓝
12
+        /// </summary>
13
+        public string Fxdjname { get; set; }
14
+        /// <summary>
15
+        /// 是否删除
16
+        /// </summary>
17
+        public int isdelete { get; set; }
18
+    }
19
+}

+ 19 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Model/Dto/Fxqytabs.cs

1
+using System;
2
+using System.Collections.Generic;
3
+using System.Text;
4
+
5
+namespace TestUserTypeApi.Model.Dto
6
+{
7
+   public  class Fxqytabs
8
+    {
9
+        public string id { get; set; }
10
+        /// <summary>
11
+        /// 区域名称
12
+        /// </summary>
13
+        public string Fxqyname { get; set; }
14
+        /// <summary>
15
+        /// 是否删除
16
+        /// </summary>
17
+        public int isdelete { get; set; }
18
+    }
19
+}

+ 56 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Model/Dto/Yhpctabs.cs

1
+using MadRunFabric.Common;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Text;
5
+
6
+namespace TestUserTypeApi.Model.Dto
7
+{
8
+   public  class Yhpctabs
9
+    {
10
+        public string id { get; set; }
11
+        /// <summary>
12
+        /// 排查标题
13
+        /// </summary>
14
+        public string Yhpctitle { get; set; }
15
+        /// <summary>
16
+        /// 风险等级编号 关联风险等级表
17
+        /// </summary>
18
+        public string Fxdjid { get; set; }
19
+        /// <summary>
20
+        /// 风险区域编号 关联风险区域表
21
+        /// </summary>
22
+        public string Fxqyid { get; set; }
23
+        /// <summary>
24
+        /// 详情信息
25
+        /// </summary>
26
+        public string Yhpcincont { get; set; }
27
+        /// <summary>
28
+        /// 故障图片
29
+        /// </summary>
30
+        public List<FileBaseModel> faultpic;
31
+        /// <summary>
32
+        /// 隐患排查录入时间
33
+        /// </summary>
34
+        public DateTime? Yhpcdate { get; set; }
35
+        /// <summary>
36
+        /// 排查班组 有班组时让班组下的用户都可以进行操作 修改等级
37
+        /// </summary>
38
+        public string Pcbz { get; set; }
39
+        /// <summary>
40
+        /// 排查科室 有科室时让科室下的用户和班组下的用户都可以进行操作
41
+        /// </summary>
42
+        public string Pcks { get; set; }
43
+        /// <summary>
44
+        /// 排查部门 同上以此类推
45
+        /// </summary>
46
+        public string Pcbm { get; set; }
47
+        /// <summary>
48
+        /// 排查院级 同上以此类推
49
+        /// </summary>
50
+        public string Pcyj { get; set; }
51
+        /// <summary>
52
+        /// 是否启用
53
+        /// </summary>
54
+        public int isdelete { get; set; }
55
+    }
56
+}

+ 24 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Repositories/FxdjtabsRepository.cs

1
+using MadRunFabric.Common;
2
+using MadRunFabric.Common.Options;
3
+using MadRunFabric.Model.TestUserTypeApi;
4
+using Microsoft.Extensions.Logging;
5
+using Microsoft.Extensions.Options;
6
+using MongoDB.Driver;
7
+using System;
8
+using System.Collections.Generic;
9
+using System.Text;
10
+using TestUserTypeApi.IRepositories;
11
+
12
+namespace TestUserTypeApi.Repositories
13
+{
14
+   public  class FxdjtabsRepository : BaseRepository<Fxdjtabs, string>, IFxdjtabsRepository
15
+    {
16
+        protected readonly ILogger<BaseRepository<Fxdjtabs, string>> _logger;
17
+        protected readonly IMongoCollection<Fxdjtabs> _collection_MassageInfo;
18
+        public FxdjtabsRepository(IOptions<MongodbOptions> settings, ILogger<BaseRepository<Fxdjtabs, string>> logger) : base(settings, logger)
19
+        {
20
+            _collection_MassageInfo = _context.GetCollection<Fxdjtabs>();
21
+            _logger = logger;
22
+        }
23
+    }
24
+}

+ 24 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Repositories/FxqytabsRepository.cs

1
+using MadRunFabric.Common;
2
+using MadRunFabric.Common.Options;
3
+using MadRunFabric.Model.TestUserTypeApi;
4
+using Microsoft.Extensions.Logging;
5
+using Microsoft.Extensions.Options;
6
+using MongoDB.Driver;
7
+using System;
8
+using System.Collections.Generic;
9
+using System.Text;
10
+using TestUserTypeApi.IRepositories;
11
+
12
+namespace TestUserTypeApi.Repositories
13
+{
14
+   public  class FxqytabsRepository : BaseRepository<Fxqytabs, string>, IFxqytabsRepository
15
+    {
16
+        protected readonly ILogger<BaseRepository<Fxqytabs, string>> _logger;
17
+        protected readonly IMongoCollection<Fxqytabs> _collection_MassageInfo;
18
+        public FxqytabsRepository(IOptions<MongodbOptions> settings, ILogger<BaseRepository<Fxqytabs, string>> logger) : base(settings, logger)
19
+        {
20
+            _collection_MassageInfo = _context.GetCollection<Fxqytabs>();
21
+            _logger = logger;
22
+        }
23
+    }
24
+}

+ 24 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Repositories/YhpctabsRepository.cs

1
+using MadRunFabric.Common;
2
+using MadRunFabric.Common.Options;
3
+using MadRunFabric.Model.TestUserTypeApi;
4
+using Microsoft.Extensions.Logging;
5
+using Microsoft.Extensions.Options;
6
+using MongoDB.Driver;
7
+using System;
8
+using System.Collections.Generic;
9
+using System.Text;
10
+using TestUserTypeApi.IRepositories;
11
+
12
+namespace TestUserTypeApi.Repositories
13
+{
14
+  public   class YhpctabsRepository : BaseRepository<Yhpctabs, string>, IYhpctabsRepository
15
+    {
16
+        protected readonly  ILogger<BaseRepository<Yhpctabs, string>> _logger;
17
+        protected readonly IMongoCollection<Yhpctabs> _collection_MassageInfo;
18
+        public YhpctabsRepository(IOptions<MongodbOptions> settings, ILogger<BaseRepository<Yhpctabs, string>> logger) : base(settings, logger)
19
+        {
20
+            _collection_MassageInfo = _context.GetCollection<Yhpctabs>();
21
+            _logger = logger;
22
+        }
23
+    }
24
+}

+ 383 - 4
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Controllers/TestUserTypeController.cs

42
             return View();
42
             return View();
43
         }
43
         }
44
         #region 定义接口模块
44
         #region 定义接口模块
45
-        
46
         #region 试卷满意度调查部分
45
         #region 试卷满意度调查部分
47
         private readonly ILogger<TestUserTypeController> _logger;
46
         private readonly ILogger<TestUserTypeController> _logger;
48
         private readonly IConfiguration _configuration;
47
         private readonly IConfiguration _configuration;
88
         private readonly IGzlrbsRepository _IGzlrbsRepository;//工作量日报
87
         private readonly IGzlrbsRepository _IGzlrbsRepository;//工作量日报
89
         private readonly IYyzlsRepository _IYyzlsRepository;//预约诊疗
88
         private readonly IYyzlsRepository _IYyzlsRepository;//预约诊疗
90
         #endregion
89
         #endregion
90
+        #region 双重预防
91
+        private readonly IFxdjtabsRepository _IFxdjtabsRepository;//风险等级
92
+        private readonly IFxqytabsRepository _IFxqytabsRepository;//风险区域 
93
+        private readonly IYhpctabsRepository _IYhpctabsRepository;//隐患排查
94
+        #endregion
95
+
91
         #region 全局定义
96
         #region 全局定义
92
         public TestUserTypeController(ILogger<TestUserTypeController> logger,
97
         public TestUserTypeController(ILogger<TestUserTypeController> logger,
93
          IConfiguration configuration,
98
          IConfiguration configuration,
114
          IBbsqsRepository IBbsqsRepository,//标本收取
119
          IBbsqsRepository IBbsqsRepository,//标本收取
115
          IHzapsRepository IHzapsRepository,//会诊安排
120
          IHzapsRepository IHzapsRepository,//会诊安排
116
          IGzlrbsRepository IGzlrbsRepository,//工作量日报
121
          IGzlrbsRepository IGzlrbsRepository,//工作量日报
117
-         IYyzlsRepository IYyzlsRepository//预约诊疗
122
+         IYyzlsRepository IYyzlsRepository,//预约诊疗
123
+         IFxdjtabsRepository IFxdjtabsRepository,//风险等级
124
+         IFxqytabsRepository IFxqytabsRepository,//风险区域 
125
+         IYhpctabsRepository IYhpctabsRepository//隐患排查
118
          )
126
          )
119
         {
127
         {
120
             _logger = logger;
128
             _logger = logger;
143
             _IHzapsRepository = IHzapsRepository;
151
             _IHzapsRepository = IHzapsRepository;
144
             _IGzlrbsRepository = IGzlrbsRepository;
152
             _IGzlrbsRepository = IGzlrbsRepository;
145
             _IYyzlsRepository = IYyzlsRepository;
153
             _IYyzlsRepository = IYyzlsRepository;
154
+            _IFxdjtabsRepository = IFxdjtabsRepository;
155
+            _IFxqytabsRepository = IFxqytabsRepository;
156
+            _IYhpctabsRepository = IYhpctabsRepository;
146
         }
157
         }
147
         #endregion
158
         #endregion
148
-        
149
         #endregion
159
         #endregion
150
         #region 满意度模块
160
         #region 满意度模块
151
         /// <summary>
161
         /// <summary>
2139
         }
2149
         }
2140
 
2150
 
2141
         #endregion
2151
         #endregion
2142
-
2143
         #region 双向转诊模块
2152
         #region 双向转诊模块
2144
         #region 上转住院
2153
         #region 上转住院
2145
         /// <summary>
2154
         /// <summary>
3620
         }
3629
         }
3621
         #endregion
3630
         #endregion
3622
         #endregion
3631
         #endregion
3632
+        #region 双重预防 
3633
+        #region 风险等级
3634
+        /// <summary>
3635
+        /// 添加风险等级
3636
+        /// </summary>
3637
+        /// <param name="tps"></param>
3638
+        /// <returns></returns>
3639
+        [HttpGet("addfxdjtabs")]
3640
+        public async Task<IActionResult> AddFxdjtabs(Model.Dto.Fxdjtabs tps)
3641
+        {
3642
+            Fxdjtabs tp = new Fxdjtabs();
3643
+            tp.Fxdjname = tps.Fxdjname;//风险等级名称
3644
+            tp.isdelete = 0;// 是否删除
3645
+            var a = _IFxdjtabsRepository.AddRetID(tp);
3646
+            if (a.Result != null || a.Result != "")
3647
+            {
3648
+                return Success("成功", a.Result);
3649
+            }
3650
+            else
3651
+            {
3652
+                return Error("失败");
3653
+            }
3654
+
3655
+        }
3656
+        /// <summary>
3657
+        /// 修改风险等级
3658
+        /// </summary>
3659
+        /// <param name="tps"></param>
3660
+        /// <returns></returns>
3661
+        [HttpGet("upfxdjtabs")]
3662
+        public async Task<IActionResult> upFxdjtabs(Model.Dto.Fxdjtabs tps)
3663
+        {
3664
+            Fxdjtabs tp = new Fxdjtabs();
3665
+            tp.id = tps.id;
3666
+            tp.Fxdjname = tps.Fxdjname;
3667
+            tp.isdelete = 0;
3668
+            var resua = _IFxdjtabsRepository.Update(tp);
3669
+            if (resua.Result)
3670
+            {
3671
+                return Success("成功");
3672
+            }
3673
+            else
3674
+            {
3675
+                return Error("失败");
3676
+            }
3677
+
3678
+        }
3679
+        /// <summary>
3680
+        /// 根据编号获取风险等级信息
3681
+        /// </summary>
3682
+        /// <param name="id"></param>
3683
+        /// <returns></returns>
3684
+        [HttpGet("getfxdjtabsbyid")]
3685
+        public async Task<IActionResult> GetFxdjtabsbyid(string id)
3686
+        {
3687
+            var model = await _IFxdjtabsRepository.Get(p => p.id == id);
3688
+            return Success("成功", model);
3689
+        }
3690
+        /// <summary>
3691
+        /// 删除风险等级信息
3692
+        /// </summary>
3693
+        /// <param name="id"></param>
3694
+        /// <returns></returns>
3695
+        [HttpGet("delefxdjtabs")]
3696
+        public async Task<IActionResult> deleFxdjtabs(string id)
3697
+        {
3698
+            var result = _IFxdjtabsRepository.Remove(id);
3699
+            if (result.Result)
3700
+            {
3701
+                return Success("成功");
3702
+            }
3703
+            else
3704
+            {
3705
+                return Error("失败");
3706
+            }
3707
+
3708
+        }
3709
+        /// <summary>
3710
+        /// 获取风险等级信息
3711
+        /// </summary>
3712
+        /// <param name="PageIndex"></param>
3713
+        /// <param name="PageSize"></param>
3714
+        /// <returns></returns>
3715
+        [HttpGet("getfxdjtabs")]
3716
+        public async Task<IActionResult> GetFxdjtabs(int PageIndex, int PageSize)
3717
+        {
3718
+            //排序字段
3719
+            //var sort = Builders<Fxdjtabs>.Sort.Ascending("Szzydjsj");
3720
+            //根据条件查询集合
3721
+            var listApp = new List<FilterDefinition<Fxdjtabs>>();
3722
+            listApp.Add(Builders<Fxdjtabs>.Filter.Eq("isdelete", 0));
3723
+
3724
+            var filter = Builders<Fxdjtabs>.Filter.And(listApp);
3725
+
3726
+            var list = await _IFxdjtabsRepository.GetByPage(filter, PageIndex, PageSize);
3727
+            var redCount = await _IFxdjtabsRepository.CountAsync(filter);   //获取总数
3728
+            var listmodel = new List<Fxdjtabs>();
3729
+            foreach (var item in list)
3730
+            {
3731
+                ///定义选项
3732
+                var model = new Fxdjtabs();
3733
+                model.id = item.id;
3734
+                model.Fxdjname = item.Fxdjname;//风险等级名称
3735
+                model.isdelete = item.isdelete;//是否启用
3736
+                listmodel.Add(model);
3737
+            }
3738
+            var obj = new
3739
+            {
3740
+                rows = listmodel,
3741
+                total = redCount
3742
+            };
3743
+            return Success("成功", obj);
3744
+        }
3745
+        #endregion
3746
+        #region 风险区域 
3747
+        /// <summary>
3748
+        /// 添加风险区域
3749
+        /// </summary>
3750
+        /// <param name="tps"></param>
3751
+        /// <returns></returns>
3752
+        [HttpGet("addfxqytabs")]
3753
+        public async Task<IActionResult> AddFxqytabs(Model.Dto.Fxqytabs tps)
3754
+        {
3755
+            Fxqytabs tp = new Fxqytabs();
3756
+            tp.Fxqyname = tps.Fxqyname;//风险区域名称
3757
+            tp.isdelete = 0;// 是否删除
3758
+            var a = _IFxqytabsRepository.AddRetID(tp);
3759
+            if (a.Result != null || a.Result != "")
3760
+            {
3761
+                return Success("成功", a.Result);
3762
+            }
3763
+            else
3764
+            {
3765
+                return Error("失败");
3766
+            }
3767
+
3768
+        }
3769
+        /// <summary>
3770
+        /// 修改风险区域
3771
+        /// </summary>
3772
+        /// <param name="tps"></param>
3773
+        /// <returns></returns>
3774
+        [HttpGet("upfxqytabs")]
3775
+        public async Task<IActionResult> upFxqytabs(Model.Dto.Fxqytabs tps)
3776
+        {
3777
+            Fxqytabs tp = new Fxqytabs();
3778
+            tp.id = tps.id;
3779
+            tp.Fxqyname = tps.Fxqyname;//风险区域名称
3780
+            tp.isdelete = 0;
3781
+            var resua = _IFxqytabsRepository.Update(tp);
3782
+            if (resua.Result)
3783
+            {
3784
+                return Success("成功");
3785
+            }
3786
+            else
3787
+            {
3788
+                return Error("失败");
3789
+            }
3790
+
3791
+        }
3792
+        /// <summary>
3793
+        /// 根据编号获取风险等级信息
3794
+        /// </summary>
3795
+        /// <param name="id"></param>
3796
+        /// <returns></returns>
3797
+        [HttpGet("getfxqytabsbyid")]
3798
+        public async Task<IActionResult> GetFxqytabsbyid(string id)
3799
+        {
3800
+            var model = await _IFxqytabsRepository.Get(p => p.id == id);
3801
+            return Success("成功", model);
3802
+        }
3803
+        /// <summary>
3804
+        /// 删除风险区域信息
3805
+        /// </summary>
3806
+        /// <param name="id"></param>
3807
+        /// <returns></returns>
3808
+        [HttpGet("delefxqytabs")]
3809
+        public async Task<IActionResult> deleFxqytabs(string id)
3810
+        {
3811
+            var result = _IFxqytabsRepository.Remove(id);
3812
+            if (result.Result)
3813
+            {
3814
+                return Success("成功");
3815
+            }
3816
+            else
3817
+            {
3818
+                return Error("失败");
3819
+            }
3820
+
3821
+        }
3822
+        /// <summary>
3823
+        /// 获取风险等级信息
3824
+        /// </summary>
3825
+        /// <param name="PageIndex"></param>
3826
+        /// <param name="PageSize"></param>
3827
+        /// <returns></returns>
3828
+        [HttpGet("getfxqytabs")]
3829
+        public async Task<IActionResult> GetFxqytabs(int PageIndex, int PageSize)
3830
+        {
3831
+            //排序字段
3832
+            //var sort = Builders<Fxdjtabs>.Sort.Ascending("Szzydjsj");
3833
+            //根据条件查询集合
3834
+            var listApp = new List<FilterDefinition<Fxqytabs>>();
3835
+            listApp.Add(Builders<Fxqytabs>.Filter.Eq("isdelete", 0));
3836
+
3837
+            var filter = Builders<Fxqytabs>.Filter.And(listApp);
3838
+
3839
+            var list = await _IFxqytabsRepository.GetByPage(filter, PageIndex, PageSize);
3840
+            var redCount = await _IFxqytabsRepository.CountAsync(filter);   //获取总数
3841
+            var listmodel = new List<Fxqytabs>();
3842
+            foreach (var item in list)
3843
+            {
3844
+                ///定义选项
3845
+                var model = new Fxqytabs();
3846
+                model.id = item.id;
3847
+                model.Fxqyname = item.Fxqyname;//风险区域名称
3848
+                model.isdelete = item.isdelete;//是否启用
3849
+                listmodel.Add(model);
3850
+            }
3851
+            var obj = new
3852
+            {
3853
+                rows = listmodel,
3854
+                total = redCount
3855
+            };
3856
+            return Success("成功", obj);
3857
+        }
3858
+
3859
+        #endregion
3860
+        #region 隐患排查表
3861
+       /// <summary>
3862
+       /// 添加隐患排查信息
3863
+       /// </summary>
3864
+       /// <param name="tps"></param>
3865
+       /// <returns></returns>
3866
+        [HttpGet("addyhpctabs")]
3867
+        public async Task<IActionResult> AddYhpctabs(Model.Dto.Yhpctabs tps)
3868
+        {
3869
+            Yhpctabs tp = new Yhpctabs();
3870
+            tp.Yhpctitle = tps.Yhpctitle;//标题
3871
+            tp.Fxdjid = tps.Fxdjid;//风险等级编号
3872
+            tp.Fxqyid = tps.Fxqyid;//风险区域编号
3873
+            tp.Yhpcincont = tps.Yhpcincont;//风险详情信息
3874
+            tp.Yhpcdate = tps.Yhpcdate;//隐患排查录入时间
3875
+            tp.Pcbz = tps.Pcbz;//排查班组 有班组时让班组下的用户都可以进行操作 修改等级
3876
+            tp.Pcks = tps.Pcks;//排查科室 有科室时让科室下的用户和班组下的用户都可以进行操作
3877
+            tp.Pcbm = tps.Pcbm;//排查部门 同上以此类推
3878
+            tp.Pcyj = tps.Pcyj;//排查院级 同上以此类推
3879
+            tp.faultpic = tps.faultpic;
3880
+            tp.isdelete = 0;//是否启用
3881
+            var a = _IYhpctabsRepository.AddRetID(tp);
3882
+            if (a.Result != null || a.Result != "")
3883
+            {
3884
+                return Success("成功", a.Result);
3885
+            }
3886
+            else
3887
+            {
3888
+                return Error("失败");
3889
+            }
3890
+        }
3891
+
3892
+        /// <summary>
3893
+        /// 修改隐患排查信息
3894
+        /// </summary>
3895
+        /// <param name="tps"></param>
3896
+        /// <returns></returns>
3897
+        [HttpGet("upyhpctabs")]
3898
+        public async Task<IActionResult> upYhpctabs(Model.Dto.Yhpctabs tps)
3899
+        {
3900
+            Yhpctabs tp = new Yhpctabs();
3901
+            tp.id = tps.id;
3902
+            tp.Yhpctitle = tps.Yhpctitle;//标题
3903
+            tp.Fxdjid = tps.Fxdjid;//风险等级编号
3904
+            tp.Fxqyid = tps.Fxqyid;//风险区域编号
3905
+            tp.Yhpcincont = tps.Yhpcincont;//风险详情信息
3906
+            tp.Yhpcdate = tps.Yhpcdate;//隐患排查录入时间
3907
+            tp.Pcbz = tps.Pcbz;//排查班组 有班组时让班组下的用户都可以进行操作 修改等级
3908
+            tp.Pcks = tps.Pcks;//排查科室 有科室时让科室下的用户和班组下的用户都可以进行操作
3909
+            tp.Pcbm = tps.Pcbm;//排查部门 同上以此类推
3910
+            tp.Pcyj = tps.Pcyj;//排查院级 同上以此类推
3911
+            tp.faultpic = tps.faultpic;
3912
+            tp.isdelete = 0;
3913
+            var resua = _IYhpctabsRepository.Update(tp);
3914
+            if (resua.Result)
3915
+            {
3916
+                return Success("成功");
3917
+            }
3918
+            else
3919
+            {
3920
+                return Error("失败");
3921
+            }
3922
+
3923
+        }
3924
+        /// <summary>
3925
+        /// 根据编号获取隐患排查信息
3926
+        /// </summary>
3927
+        /// <param name="id"></param>
3928
+        /// <returns></returns>
3929
+        [HttpGet("getyhpctabsbyid")]
3930
+        public async Task<IActionResult> GetYhpctabsbyid(string id)
3931
+        {
3932
+            var model = await _IYhpctabsRepository.Get(p => p.id == id);
3933
+            return Success("成功", model);
3934
+        }
3935
+        /// <summary>
3936
+        /// 删除隐患排查
3937
+        /// </summary>
3938
+        /// <param name="id"></param>
3939
+        /// <returns></returns>
3940
+        [HttpGet("deleyhpctabs")]
3941
+        public async Task<IActionResult> deleYhpctabs(string id)
3942
+        {
3943
+            var result = _IYhpctabsRepository.Remove(id);
3944
+            if (result.Result)
3945
+            {
3946
+                return Success("成功");
3947
+            }
3948
+            else
3949
+            {
3950
+                return Error("失败");
3951
+            }
3952
+
3953
+        }
3954
+        /// <summary>
3955
+        /// 获取隐患排查信息
3956
+        /// </summary>
3957
+        /// <param name="PageIndex"></param>
3958
+        /// <param name="PageSize"></param>
3959
+        /// <returns></returns>
3960
+        [HttpGet("getyhpctabs")]
3961
+        public async Task<IActionResult> GetYhpctabs(int PageIndex, int PageSize)
3962
+        {
3963
+            //排序字段
3964
+            var sort = Builders<Yhpctabs>.Sort.Ascending("Yhpcdate");
3965
+            //根据条件查询集合
3966
+            var listApp = new List<FilterDefinition<Yhpctabs>>();
3967
+            listApp.Add(Builders<Yhpctabs>.Filter.Eq("isdelete", 0));
3968
+
3969
+            var filter = Builders<Yhpctabs>.Filter.And(listApp);
3970
+
3971
+            var list = await _IYhpctabsRepository.GetByPage(filter, PageIndex, PageSize, sort);
3972
+            var redCount = await _IYhpctabsRepository.CountAsync(filter);   //获取总数
3973
+            var listmodel = new List<Yhpctabs>();
3974
+            foreach (var item in list)
3975
+            {
3976
+                ///定义选项
3977
+                var model = new Yhpctabs();
3978
+                model.id = item.id;
3979
+                model.Yhpctitle = item.Yhpctitle;//标题
3980
+                model.Fxdjid = item.Fxdjid;//风险等级编号
3981
+                model.Fxqyid = item.Fxqyid;//风险区域编号
3982
+                model.Yhpcincont = item.Yhpcincont;//风险详情信息
3983
+                model.Yhpcdate = item.Yhpcdate;//隐患排查录入时间
3984
+                model.Pcbz = item.Pcbz;//排查班组 有班组时让班组下的用户都可以进行操作 修改等级
3985
+                model.Pcks = item.Pcks;//排查科室 有科室时让科室下的用户和班组下的用户都可以进行操作
3986
+                model.Pcbm = item.Pcbm;//排查部门 同上以此类推
3987
+                model.Pcyj = item.Pcyj;//排查院级 同上以此类推
3988
+                model.faultpic = item.faultpic;//图片
3989
+                model.isdelete = 0;
3990
+                listmodel.Add(model);
3991
+            }
3992
+            var obj = new
3993
+            {
3994
+                rows = listmodel,
3995
+                total = redCount
3996
+            };
3997
+            return Success("成功", obj);
3998
+        }
3999
+        #endregion
4000
+        #endregion
4001
+
3623
 
4002
 
3624
 
4003
 
3625
         #region 用户模块
4004
         #region 用户模块

+ 3 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Startup.cs

194
             services.AddTransient<IHzapsRepository, HzapsRepository>();//会诊安排
194
             services.AddTransient<IHzapsRepository, HzapsRepository>();//会诊安排
195
             services.AddTransient<IGzlrbsRepository, GzlrbsRepository>();//工作量日报
195
             services.AddTransient<IGzlrbsRepository, GzlrbsRepository>();//工作量日报
196
             services.AddTransient<IYyzlsRepository, YyzlsRepository>();//预约诊疗
196
             services.AddTransient<IYyzlsRepository, YyzlsRepository>();//预约诊疗
197
+            services.AddTransient<IFxdjtabsRepository, FxdjtabsRepository>();//风险等级
198
+            services.AddTransient<IFxqytabsRepository, FxqytabsRepository>();//风险区域
199
+            services.AddTransient<IYhpctabsRepository, YhpctabsRepository>();//隐患排查
197
             #endregion
200
             #endregion
198
             //services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
201
             //services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
199
         }
202
         }