zhaozhiqiang преди 4 години
родител
ревизия
54d99fb9f9
променени са 23 файла, в които са добавени 2189 реда и са изтрити 1419 реда
  1. 5 5
      代码/MadRunFabirc.Model/EquipmentApi.Model/Wo_Repair_Base.cs
  2. 4 0
      代码/MadRunFabirc.Model/TestUserTypeApi/CallComeDeptorPeo.cs
  3. 16 0
      代码/MadRunFabirc.Model/TestUserTypeApi/CallComeTpwode.cs
  4. 76 18
      代码/MadRunFabirc.Model/TestUserTypeApi/yyjlinfolist.cs
  5. 1 2
      代码/MadRunFabric.EquipmentApi/EquipmentApi.IRepositories/IWo_Repair_BaseRepository.cs
  6. 59 366
      代码/MadRunFabric.EquipmentApi/EquipmentApi.Repositories/Wo_Repair_BaseRepository.cs
  7. 1214 831
      代码/MadRunFabric.EquipmentApi/EquipmentApi/Controllers/workordermanage/WoRepairBaseController.cs
  8. 25 24
      代码/MadRunFabric.EquipmentApi/EquipmentApi/Model/Dto/ExcelWo_Repair_Base.cs
  9. 93 0
      代码/MadRunFabric.EquipmentApi/EquipmentApi/Model/Dto/ExcelWo_Repair_Bases.cs
  10. 84 0
      代码/MadRunFabric.EquipmentApi/EquipmentApi/Model/Dto/excelcswocodelist.cs
  11. 1 0
      代码/MadRunFabric.EquipmentApi/EquipmentApi/Properties/PublishProfiles/FolderProfile.pubxml.user
  12. 1 1
      代码/MadRunFabric.SignTokenApi/SignTokenApi/Controllers/UserAccountController.cs
  13. 1 0
      代码/MadRunFabric.SignTokenApi/SignTokenApi/Properties/PublishProfiles/FolderProfile.pubxml.user
  14. 1 1
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Model/Dto/Onlineservertypein.cs
  15. 1 1
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Repositories/HzsfMassagesRepository.cs
  16. 6 2
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Repositories/v_csm_zhuyuanRepository.cs
  17. 234 68
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Controllers/TestController.cs
  18. 333 94
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Controllers/TestUserTypeController.cs
  19. 13 0
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Model/getdocttimedetail/response.cs
  20. 14 0
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Model/timeFlag.cs
  21. 1 1
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Properties/PublishProfiles/FolderProfile.pubxml.user
  22. 5 4
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Properties/launchSettings.json
  23. 1 1
      代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/TestUserTypeApi.csproj

+ 5 - 5
代码/MadRunFabirc.Model/EquipmentApi.Model/Wo_Repair_Base.cs

@@ -36,7 +36,7 @@ namespace MadRunFabric.Model
36 36
         public int channel { get; set; } = 1;
37 37
 
38 38
         /// <summary>
39
-        /// 工单状态:0创建工单,1已转派(转派或者抢单),2已处理,3已评价,7挂起,8已取消,9已完成
39
+        /// 工单状态:0创建工单,1已转派(转派或者抢单),2已处理,3已评价,7挂起,8已取消,9已超时
40 40
         /// </summary>
41 41
         public int wostate { get; set; } = 0;
42 42
 
@@ -262,9 +262,9 @@ namespace MadRunFabric.Model
262 262
         /// 选择维修时效说明
263 263
         /// </summary>
264 264
         public string wxdemodes { get; set; }
265
-        ///// <summary>
266
-        ///// 超时了多久
267
-        ///// </summary>
268
-        //public string wxtimecenter { get; set; }
265
+        /// <summary>
266
+        /// 超时了多久
267
+        /// </summary>
268
+        public string wxtimecenter { get; set; }
269 269
     }
270 270
 }

+ 4 - 0
代码/MadRunFabirc.Model/TestUserTypeApi/CallComeDeptorPeo.cs

@@ -20,5 +20,9 @@ namespace MadRunFabric.Model.TestUserTypeApi
20 20
         /// 科室负责人
21 21
         /// </summary>
22 22
         public string  peoplename { get; set; }
23
+        /// <summary>
24
+        /// 工号
25
+        /// </summary>
26
+        public string usercode { get; set; }
23 27
     }
24 28
 }

+ 16 - 0
代码/MadRunFabirc.Model/TestUserTypeApi/CallComeTpwode.cs

@@ -29,6 +29,10 @@ namespace MadRunFabric.Model.TestUserTypeApi
29 29
         /// </summary>
30 30
         public string  phoneinfo { get; set; }
31 31
         /// <summary>
32
+        /// 投诉类别
33
+        /// </summary>
34
+        public string centerinfotype { get; set; }
35
+        /// <summary>
32 36
         /// 咨询、反馈内容
33 37
         /// </summary>
34 38
         public string centerinfo { get; set; }
@@ -41,12 +45,24 @@ namespace MadRunFabric.Model.TestUserTypeApi
41 45
         /// </summary>
42 46
         public string  jspeople { get; set; }
43 47
         /// <summary>
48
+        /// 接收人工号
49
+        /// </summary>
50
+        public string jspeopleusercode { get; set; }
51
+        /// <summary>
44 52
         /// 备注
45 53
         /// </summary>
46 54
         public string  memoinfo { get; set; }
47 55
         /// <summary>
56
+        /// 处理结果
57
+        /// </summary>
58
+        public string resultmassage { get; set; }
59
+        /// <summary>
48 60
         /// 创建时间
49 61
         /// </summary>
50 62
         public DateTime? createdate { get; set; }
63
+        /// <summary>
64
+        /// 创建人
65
+        /// </summary>
66
+        public string createusercode { get; set; }
51 67
     }
52 68
 }

+ 76 - 18
代码/MadRunFabirc.Model/TestUserTypeApi/yyjlinfolist.cs

@@ -15,24 +15,82 @@ namespace MadRunFabric.Model.TestUserTypeApi
15 15
         [Key]
16 16
         [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
17 17
         public string    id          { get; set; }
18
-        public string    hospitalId  {get;set;}      //医院编号      > 41754799-2</hospitalId>
19
-        public string    cardNo      {get;set;}      //预约诊号      ></cardNo>
20
-        public string    userIdCard  {get;set;}      //身份证号      >41022119901010271X</userIdCard>
21
-        public string    userInsurNO {get;set;}      //医保卡号          >01057552</userInsurNO>
22
-        public string    userName    {get;set;}      //患者姓名      >刘圣涛</userName>
23
-        public string    userGender  {get;set;}      //患者性别      >F</userGender>
24
-        public string    userMobile  {get;set;}      //患者手机号      >18066668888</userMobile>
25
-        public string    userAddress { get; set; }   //家庭住址      >
26
-        public string    orderId     {get;set;}//     订单号
27
-        public string    deptid      {get;set;}//     科室编码
28
-        public string  deptname { get; set; }//科室名称
29
-        public string    doctorId    {get;set;}//     医生编码
30
-        public string  docorname { get; set; }//医生姓名
31
-        public string    regDate     {get;set;}//     预约日期
32
-        public string    timeFlag    {get;set;}//     预约时段
33
-        public string orderTime  {get;set;}//      下单时间
34
-        public string    orderstate { get; set; }//订单状态 //0成功1 失败
35
-        public string orderIdHIS { get; set; }//his的订单号用来取消预约
18
+        /// <summary>
19
+        /// 医院编号
20
+        /// </summary>
21
+        public string    hospitalId  {get;set;}      //      > 41754799-2</hospitalId>
22
+        /// <summary>
23
+        /// 预约诊号
24
+        /// </summary>
25
+        public string    cardNo      {get;set;}      //      ></cardNo>
26
+        /// <summary>
27
+        /// 身份证号
28
+        /// </summary>
29
+        public string    userIdCard  {get;set;}      //      >41022119901010271X</userIdCard>
30
+        /// <summary>
31
+        /// 医保卡号
32
+        /// </summary>
33
+        public string    userInsurNO {get;set;}      //          >01057552</userInsurNO>
34
+        /// <summary>
35
+        /// 患者姓名
36
+        /// </summary>
37
+        public string    userName    {get;set;}      //      >刘圣涛</userName>
38
+        /// <summary>
39
+        /// 患者性别
40
+        /// </summary>
41
+        public string    userGender  {get;set;}      //      >F</userGender>
42
+        /// <summary>
43
+        /// 患者手机号
44
+        /// </summary>
45
+        public string    userMobile  {get;set;}      //      >18066668888</userMobile>
46
+        /// <summary>
47
+        /// 家庭住址
48
+        /// </summary>
49
+        public string    userAddress { get; set; }   //      >
50
+        /// <summary>
51
+        /// 订单号
52
+        /// </summary>
53
+        public string    orderId     {get;set;}
54
+        /// <summary>
55
+        /// 科室编码
56
+        /// </summary>
57
+        public string    deptid      {get;set;}
58
+        /// <summary>
59
+        /// 科室名称
60
+        /// </summary>
61
+        public string  deptname { get; set; }
62
+        /// <summary>
63
+        /// 医生编码
64
+        /// </summary>
65
+        public string    doctorId    {get;set;}
66
+        /// <summary>
67
+        /// 医生姓名
68
+        /// </summary>
69
+        public string  docorname { get; set; }
70
+        /// <summary>
71
+        /// 预约日期
72
+        /// </summary>
73
+        public string    regDate     {get;set;}
74
+        /// <summary>
75
+        /// 预约时段
76
+        /// </summary>
77
+        public string    timeFlag    {get;set;}
78
+        /// <summary>
79
+        /// 下单时间
80
+        /// </summary>
81
+        public string orderTime  {get;set;}
82
+        /// <summary>
83
+        /// 订单状态 //0成功1 失败
84
+        /// </summary>
85
+        public string    orderstate { get; set; }
86
+        /// <summary>
87
+        /// his的订单号用来取消预约
88
+        /// </summary>
89
+        public string orderIdHIS { get; set; }
90
+        /// <summary>
91
+        /// 创建人
92
+        /// </summary>
93
+        public string createuser { get; set; }
36 94
         /// <summary>
37 95
         /// 是否删除
38 96
         /// </summary>

+ 1 - 2
代码/MadRunFabric.EquipmentApi/EquipmentApi.IRepositories/IWo_Repair_BaseRepository.cs

@@ -54,8 +54,7 @@ namespace EquipmentApi.IRepositories
54 54
          string replace, string systemid, string equipmentid, string usercode, string stime, string etime, string channel, string Jwocode, string Pwcode, int state, int score, int wxstate,
55 55
          string nowusercode, UserAccountInfoModel userinfo,
56 56
          //string nowrolecode,
57
-         int pageindex, int pagesize, out int recordcount,
58
-         out int totalcount, out int wzpcount, out int yjdcount, out int dpjcount, out int ygqcount, out int ywjcount, out int yqxcount);
57
+         int pageindex, int pagesize);
59 58
 
60 59
         IEnumerable<object> GetListsByPagerolebz(string phone, string wocode, string province, string city, string projectid, string protypeid, string buildid, string floorid,
61 60
          string replace, string systemid, string equipmentid, string usercode, string stime, string etime, int state, int wxstate,

+ 59 - 366
代码/MadRunFabric.EquipmentApi/EquipmentApi.Repositories/Wo_Repair_BaseRepository.cs

@@ -424,6 +424,7 @@ namespace EquipmentApi.Repositories
424 424
                             repairbase.tobztimes,
425 425
                             repairbase.wxtimeid,
426 426
                             repairbase.wxdemodes,
427
+                            repairbase.wxtimecenter,
427 428
                             wxtimecentername = wxtimelisDefa.Count() > 0 ? wxtimelisDefa.First().wxcenter : "",//维修时效信息
428 429
                             wxtimeleths = wxtimelisDefa.Count() > 0 ? wxtimelisDefa.First().timecount : 0,//维修时长
429 430
 
@@ -636,6 +637,7 @@ namespace EquipmentApi.Repositories
636 637
                             postlist = userinfolis.postlist,
637 638
                             repairbase.wxtimeid,
638 639
                             repairbase.wxdemodes,
640
+                            repairbase.wxtimecenter,
639 641
                             wxtimecentername = wxtimelisDefa.Count() > 0 ? wxtimelisDefa.First().wxcenter : "",//维修时效信息
640 642
                             wxtimeleths = wxtimelisDefa.Count() > 0 ? wxtimelisDefa.First().timecount : 0,//维修时长
641 643
                     };
@@ -870,6 +872,7 @@ namespace EquipmentApi.Repositories
870 872
                         repairbase.tobztimes,
871 873
                         repairbase.wxtimeid,
872 874
                         repairbase.wxdemodes,
875
+                        repairbase.wxtimecenter,
873 876
                         wxtimecentername = wxtimelisDefa.Count() > 0 ? wxtimelisDefa.First().wxcenter : "",//维修时效信息
874 877
                         wxtimeleths = wxtimelisDefa.Count() > 0 ? wxtimelisDefa.First().timecount : 0,//维修时长
875 878
                 };
@@ -1049,8 +1052,7 @@ namespace EquipmentApi.Repositories
1049 1052
        string replace, string systemid, string equipmentid, string usercode, string stime, string etime, string channel, string Jwocode,string Pwcode, int state, int score, int wxstate,
1050 1053
        string nowusercode, UserAccountInfoModel userinfo,
1051 1054
        //string nowrolecode,
1052
-       int pageindex, int pagesize, out int recordcount,
1053
-       out int totalcount, out int wzpcount, out int yjdcount, out int dpjcount, out int ygqcount, out int ywjcount, out int yqxcount)
1055
+       int pageindex, int pagesize)
1054 1056
         {
1055 1057
             if (userinfo.role_code == "HFB" || userinfo.role_code == "XTWH")
1056 1058
             {
@@ -1059,67 +1061,32 @@ namespace EquipmentApi.Repositories
1059 1061
                 var query =
1060 1062
                     from repairbase in _collection.AsQueryable()
1061 1063
                     join proje in _collection_pro_project_info.AsQueryable() on repairbase.projectid equals proje.id into projeDefa
1062
-                    join sysprovinces in _collection_sys_provinces.AsQueryable() on repairbase.province equals sysprovinces.provincecode into sys_provincesDefa
1063
-                    join syscity in _collection_sys_city.AsQueryable() on repairbase.city equals syscity.citycode into sys_cityDefa
1064 1064
                     join wxtimelis in _collection_ewxwpstime.AsQueryable() on repairbase.wxtimeid equals wxtimelis.id into wxtimelisDefa
1065 1065
                     where repairbase.isdelete == 0
1066 1066
                     orderby repairbase.createtime descending
1067 1067
                     select new
1068 1068
                     {
1069
-                        repairbase.id,
1069
+                        
1070
+                        repairbase.wostate,
1070 1071
                         repairbase.wocode,
1071
-                        repairbase.projectid,
1072
-                        projectname = projeDefa.Count() > 0 ? projeDefa.First().project_name : null,
1073
-                        repairbase.protypeid,
1074
-                        //protypename = dic_protypeDefa.Count() > 0 ? dic_protypeDefa.First().name : null,
1075
-                        repairbase.faulttypeid,
1076
-                        //faulttypename = dic_faulttypeDefa.Count() > 0 ? dic_faulttypeDefa.First().name : null,
1077
-                        repairbase.systemid,
1078
-                        //systemname = dic_systemDefa.Count() > 0 ? dic_systemDefa.First().name : null,
1079
-                        repairbase.equipmentid,
1080
-                        //equipmentname = dic_equDefa.Count() > 0 ? dic_equDefa.First().equipment_name : null,
1081 1072
                         repairbase.channel,
1082
-                        provincecode = repairbase.province,
1083
-                        province = sys_provincesDefa.Count() > 0 ? sys_provincesDefa.First().provincename : null,
1084
-                        citycode = repairbase.city,
1085
-                        city = sys_cityDefa.Count() > 0 ? sys_cityDefa.First().cityname : null,
1086
-                        repairbase.buildid,
1087
-                        //buildname = bldDefa.Count() > 0 ? bldDefa.First().buildname : null,
1088
-                        repairbase.floorid,
1089
-                        //floorname = flrDefa.Count() > 0 ? flrDefa.First().floorname : null,
1073
+                        projectname = projeDefa.Count() > 0 ? projeDefa.First().project_name : null,
1090 1074
                         repairbase.repairreplace,
1091 1075
                         repairbase.repairoom,
1092 1076
                         repairbase.repairtime,
1093
-                        repairbase.contactway,
1094
-                        repairbase.repairman,
1095
-                        repairbase.faultdescripe,
1096
-                        repairbase.faultpic,
1097
-                        repairbase.appointtime,
1098
-                        repairbase.wostate,
1099 1077
                         repairbase.createtime,
1100
-                        repairbase.createuser,
1078
+                        repairbase.repairman,
1101 1079
                         repairbase.createusername,
1102
-                        repairbase.touser,
1080
+                        repairbase.contactway,
1081
+                        repairbase.faultdescripe,
1082
+                        repairbase.Pwcode,
1083
+                        repairbase.Jwocode,
1084
+                        repairbase.tobztimes,
1103 1085
                         repairbase.tousername,
1104 1086
                         repairbase.totime,
1105
-                        repairbase.totype,
1106
-                        repairbase.dealuser,
1107
-                        repairbase.dealusername,
1108 1087
                         repairbase.dealtime,
1109
-                        repairbase.ismaterials,
1110
-                        repairbase.materials,
1111
-                        repairbase.islosematerials,
1112
-                        repairbase.losematerials,
1113
-                        repairbase.hanguptime,
1114
-                        repairbase.arrivetime,
1115
-                        repairbase.evaluatetime,
1116
-                        repairbase.canceltime,
1117
-                        repairbase.score,
1118
-                        repairbase.Jwocode,
1119
-                        repairbase.Pwcode,
1120 1088
                         repairbase.CLpeoplefrom,
1121
-                        repairbase.tobztimes,
1122
-                        repairbase.wxtimeid,
1089
+                        repairbase.wxtimecenter,
1123 1090
                         wxtimeleths = wxtimelisDefa.Count() > 0 ? wxtimelisDefa.First().timecount : 0,//维修时长
1124 1091
                     };
1125 1092
                 #endregion
@@ -1130,33 +1097,14 @@ namespace EquipmentApi.Repositories
1130 1097
                             || it.Jwocode.Contains(phone) || it.createusername.Contains(phone)
1131 1098
                             || it.repairman.Contains(phone) || it.faultdescripe.Contains(phone)
1132 1099
                             || it.CLpeoplefrom.Contains(phone)
1133
-                            || it.touser.Contains(usercode)
1134
-                            || it.dealuser.Contains(usercode)
1135 1100
                             );
1136 1101
                 if (!string.IsNullOrEmpty(Pwcode))
1137 1102
                     query = query.Where(it => it.Pwcode == Pwcode);
1138 1103
                 if (!string.IsNullOrEmpty(wocode))
1139 1104
                     query = query.Where(it => it.wocode.Contains(wocode));
1140
-                if (!string.IsNullOrEmpty(province))
1141
-                    query = query.Where(it => it.provincecode == province);
1142
-                if (!string.IsNullOrEmpty(city))
1143
-                    query = query.Where(it => it.citycode == city);
1144
-                if (!string.IsNullOrEmpty(projectid))
1145
-                    query = query.Where(it => it.projectid == projectid);
1146
-                if (!string.IsNullOrEmpty(protypeid))
1147
-                    query = query.Where(it => it.protypeid == protypeid);
1148
-                if (!string.IsNullOrEmpty(buildid))
1149
-                    query = query.Where(it => it.buildid == buildid);
1150
-                if (!string.IsNullOrEmpty(floorid))
1151
-                    query = query.Where(it => it.floorid == floorid);
1105
+               
1152 1106
                 if (!string.IsNullOrEmpty(replace))
1153 1107
                     query = query.Where(it => it.repairreplace.Contains(replace) || it.repairoom.Contains(replace));
1154
-                if (!string.IsNullOrEmpty(systemid))
1155
-                    query = query.Where(it => it.systemid == systemid);
1156
-                if (!string.IsNullOrEmpty(equipmentid))
1157
-                    query = query.Where(it => it.equipmentid == equipmentid);
1158
-                if (!string.IsNullOrEmpty(channel))
1159
-                    query = query.Where(it => it.channel == Convert.ToInt32(channel));
1160 1108
                 if (!string.IsNullOrEmpty(Jwocode))
1161 1109
                     query = query.Where(it => it.Jwocode == Jwocode);
1162 1110
                 #region 时间搜索
@@ -1164,41 +1112,7 @@ namespace EquipmentApi.Repositories
1164 1112
                     query = query.Where(it => it.createtime >= Convert.ToDateTime(stime + " 00:00:00"));
1165 1113
                 if (!string.IsNullOrEmpty(etime))
1166 1114
                     query = query.Where(it => it.createtime <= Convert.ToDateTime(etime + " 23:59:59"));
1167
-                if (score != 0)
1168
-                {
1169
-                    //等于1时获取分数为1和2的数据 不满意数据
1170
-                    if (score == 1)
1171
-                    {
1172
-                        query = query.Where(it => it.score == 1 || it.score == 2);
1173
-                    }
1174
-                    //获取基本满意数据
1175
-                    else if (score == 3)
1176
-                    {
1177
-                        query = query.Where(it => it.score == 3);
1178
-                    }
1179
-                    //获取4和5分数的数据 满意数据
1180
-                    else
1181
-                    {
1182
-                        query = query.Where(it => it.score == 4 || it.score == 5);
1183
-                    }
1184
-                }
1185
-
1186
-                if (userinfo.type == 2)//查看自己创建的工单
1187
-                {
1188
-                    query = query.Where(it => it.createuser == userinfo.usercode);
1189
-                }
1190
-                else
1191
-                {
1192
-                    if (!string.IsNullOrEmpty(usercode)) query = query.Where(it => (it.touser.Contains(usercode) || it.dealuser.Contains(usercode)));
1193
-                }
1194
-
1195
-                wzpcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.create);
1196
-                yjdcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.assign);
1197
-                dpjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.deal);
1198
-                ygqcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.hangup);
1199
-                ywjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.evaluate);
1200
-                yqxcount = query.Count(p => p.Pwcode != null && p.Pwcode != "");
1201
-
1115
+                
1202 1116
 
1203 1117
                 if (state != -1)
1204 1118
                 {
@@ -1216,7 +1130,6 @@ namespace EquipmentApi.Repositories
1216 1130
                         case (int)EnumWorkOrderState.assign: query = query.OrderByDescending(p => p.totime); break;
1217 1131
                         case (int)EnumWorkOrderState.deal: query = query.OrderByDescending(p => p.dealtime); break;
1218 1132
                         //case (int)EnumWorkOrderState.evaluate: query = query.OrderBy(p => p.evaluatetime); break;
1219
-                        case (int)EnumWorkOrderState.hangup: query = query.OrderByDescending(p => p.hanguptime); break;
1220 1133
                             //case (int)EnumWorkOrderState.cancle: query = query.OrderBy(p => p.canceltime); break;
1221 1134
                     }
1222 1135
                 }
@@ -1236,15 +1149,11 @@ namespace EquipmentApi.Repositories
1236 1149
                         case (int)EnumWorkOrderState.assign: query = query.OrderByDescending(p => p.totime); break;
1237 1150
                         case (int)EnumWorkOrderState.deal: query = query.OrderByDescending(p => p.dealtime); break;
1238 1151
                         //case (int)EnumWorkOrderState.evaluate: query = query.OrderBy(p => p.evaluatetime); break;
1239
-                        case (int)EnumWorkOrderState.hangup: query = query.OrderByDescending(p => p.hanguptime); break;
1240 1152
                             //case (int)EnumWorkOrderState.cancle: query = query.OrderBy(p => p.canceltime); break;
1241 1153
                     }
1242 1154
                 }
1243 1155
                 #endregion
1244 1156
                 #endregion
1245
-                recordcount = query.Count();
1246
-                //总数
1247
-                totalcount = query.Count();
1248 1157
                 var list1 = query.ToList();
1249 1158
                 return list1;
1250 1159
                 #endregion
@@ -1268,63 +1177,26 @@ namespace EquipmentApi.Repositories
1268 1177
                         orderby repairbase.createtime descending
1269 1178
                         select new
1270 1179
                         {
1271
-                            repairbase.id,
1180
+                            repairbase.wostate,
1272 1181
                             repairbase.wocode,
1273
-                            repairbase.projectid,
1274
-                            projectname = projeDefa.Count() > 0 ? projeDefa.First().project_name : null,
1275
-                            repairbase.protypeid,
1276
-                            //protypename = dic_protypeDefa.Count() > 0 ? dic_protypeDefa.First().name : null,
1277
-                            repairbase.faulttypeid,
1278
-                            //faulttypename = dic_faulttypeDefa.Count() > 0 ? dic_faulttypeDefa.First().name : null,
1279
-                            repairbase.systemid,
1280
-                            //systemname = dic_systemDefa.Count() > 0 ? dic_systemDefa.First().name : null,
1281
-                            repairbase.equipmentid,
1282
-                            //equipmentname = dic_equDefa.Count() > 0 ? dic_equDefa.First().equipment_name : null,
1283 1182
                             repairbase.channel,
1284
-                            provincecode = repairbase.province,
1285
-                            province = sys_provincesDefa.Count() > 0 ? sys_provincesDefa.First().provincename : null,
1286
-                            citycode = repairbase.city,
1287
-                            city = sys_cityDefa.Count() > 0 ? sys_cityDefa.First().cityname : null,
1288
-                            repairbase.buildid,
1289
-                            //buildname = bldDefa.Count() > 0 ? bldDefa.First().buildname : null,
1290
-                            repairbase.floorid,
1291
-                            //floorname = flrDefa.Count() > 0 ? flrDefa.First().floorname : null,
1183
+                            projectname = projeDefa.Count() > 0 ? projeDefa.First().project_name : null,
1292 1184
                             repairbase.repairreplace,
1293 1185
                             repairbase.repairoom,
1294 1186
                             repairbase.repairtime,
1295
-                            repairbase.contactway,
1296
-                            repairbase.repairman,
1297
-                            repairbase.faultdescripe,
1298
-                            repairbase.faultpic,
1299
-                            repairbase.appointtime,
1300
-                            repairbase.wostate,
1301 1187
                             repairbase.createtime,
1302
-                            repairbase.createuser,
1188
+                            repairbase.repairman,
1303 1189
                             repairbase.createusername,
1304
-                            repairbase.touser,
1190
+                            repairbase.contactway,
1191
+                            repairbase.faultdescripe,
1192
+                            repairbase.Pwcode,
1193
+                            repairbase.Jwocode,
1194
+                            repairbase.tobztimes,
1305 1195
                             repairbase.tousername,
1306 1196
                             repairbase.totime,
1307
-                            repairbase.totype,
1308
-                            repairbase.dealuser,
1309
-                            repairbase.dealusername,
1310 1197
                             repairbase.dealtime,
1311
-                            repairbase.ismaterials,
1312
-                            repairbase.materials,
1313
-                            repairbase.islosematerials,
1314
-                            repairbase.losematerials,
1315
-                            repairbase.hanguptime,
1316
-                            repairbase.arrivetime,
1317
-                            repairbase.evaluatetime,
1318
-                            repairbase.canceltime,
1319
-                            repairbase.score,
1320
-                            repairbase.Jwocode,
1321
-                            repairbase.Pwcode,
1322 1198
                             repairbase.CLpeoplefrom,
1323
-                            repairbase.tobztimes,
1324
-                            remark = userinfolis.remark,//备注护士长
1325
-                            temid = userinfolis.team_id,
1326
-                            postlist = userinfolis.postlist,
1327
-                            repairbase.wxtimeid,
1199
+                            repairbase.wxtimecenter,
1328 1200
                             wxtimeleths = wxtimelisDefa.Count() > 0 ? wxtimelisDefa.First().timecount : 0,//维修时长
1329 1201
                         };
1330 1202
                     #endregion
@@ -1335,27 +1207,10 @@ namespace EquipmentApi.Repositories
1335 1207
                                 || it.Jwocode.Contains(phone) || it.createusername.Contains(phone)
1336 1208
                                 || it.repairman.Contains(phone) || it.faultdescripe.Contains(phone)
1337 1209
                                 || it.CLpeoplefrom.Contains(phone)
1338
-                                || it.touser.Contains(usercode)
1339
-                                || it.dealuser.Contains(usercode)
1340 1210
                                 );
1341 1211
                     if (!string.IsNullOrEmpty(Pwcode))
1342 1212
                         query = query.Where(it => it.Pwcode == Pwcode);
1343
-                    if (!string.IsNullOrEmpty(province))
1344
-                        query = query.Where(it => it.provincecode == province);
1345
-                    if (!string.IsNullOrEmpty(city))
1346
-                        query = query.Where(it => it.citycode == city);
1347
-                    if (!string.IsNullOrEmpty(projectid))
1348
-                        query = query.Where(it => it.projectid == projectid);
1349
-                    if (!string.IsNullOrEmpty(protypeid))
1350
-                        query = query.Where(it => it.protypeid == protypeid);
1351
-                    if (!string.IsNullOrEmpty(buildid))
1352
-                        query = query.Where(it => it.buildid == buildid);
1353
-                    if (!string.IsNullOrEmpty(floorid))
1354
-                        query = query.Where(it => it.floorid == floorid);
1355
-                    if (!string.IsNullOrEmpty(systemid))
1356
-                        query = query.Where(it => it.systemid == systemid);
1357
-                    if (!string.IsNullOrEmpty(equipmentid))
1358
-                        query = query.Where(it => it.equipmentid == equipmentid);
1213
+                   
1359 1214
                     if (!string.IsNullOrEmpty(channel))
1360 1215
                         query = query.Where(it => it.channel == Convert.ToInt32(channel));
1361 1216
                     #region 时间搜索
@@ -1363,62 +1218,9 @@ namespace EquipmentApi.Repositories
1363 1218
                         query = query.Where(it => it.createtime >= Convert.ToDateTime(stime + " 00:00:00"));
1364 1219
                     if (!string.IsNullOrEmpty(etime))
1365 1220
                         query = query.Where(it => it.createtime <= Convert.ToDateTime(etime + " 23:59:59"));
1366
-                    if (score != 0)
1367
-                    {
1368
-                        //等于1时获取分数为1和2的数据 不满意数据
1369
-                        if (score == 1)
1370
-                        {
1371
-                            query = query.Where(it => it.score == 1 || it.score == 2);
1372
-                        }
1373
-                        //获取基本满意数据
1374
-                        else if (score == 3)
1375
-                        {
1376
-                            query = query.Where(it => it.score == 3);
1377
-                        }
1378
-                        //获取4和5分数的数据 满意数据
1379
-                        else
1380
-                        {
1381
-                            query = query.Where(it => it.score == 4 || it.score == 5);
1382
-                        }
1383
-                    }
1384
-
1385
-                    if (userinfo.role_name.Contains("班") || userinfo.role_name == "默认角色")
1386
-                    {
1387
-
1388
-                        if (userinfo.remark == "组长")
1389
-                        {
1390
-                            wzpcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.create && (p.postlist == userinfo.postlist || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1391
-                            yjdcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.assign && (p.postlist == userinfo.postlist || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));//
1392
-                            dpjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.deal && (p.postlist == userinfo.postlist || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));//
1393
-                            ygqcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.hangup && (p.postlist == userinfo.postlist || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));//
1394
-                            ywjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.evaluate && (p.postlist == userinfo.postlist | p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));//|| 
1395
-                            yqxcount = query.Count(p => (p.Pwcode != null && p.Pwcode != "") && (p.postlist == userinfo.postlist || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));//|| 
1396
-
1397
-                        }
1398
-                        else
1399
-                        {
1400
-                            wzpcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.create && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1401
-                            yjdcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.assign && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1402
-                            dpjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.deal && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1403
-                            ygqcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.hangup && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1404
-                            ywjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.evaluate && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1405
-                            yqxcount = query.Count(p => (p.Pwcode != null && p.Pwcode != "") && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1406
-
1407
-                        }
1408
-
1409
-
1410
-                    }
1411
-                    else
1412
-                    {
1413
-                        wzpcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.create);
1414
-                        yjdcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.assign);
1415
-                        dpjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.deal);
1416
-                        ygqcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.hangup);
1417
-                        ywjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.evaluate);
1418
-                        yqxcount = query.Count(p => p.Pwcode != null && p.Pwcode != "");
1419
-                    }
1420
-
1221
+                   
1421 1222
 
1223
+                   
1422 1224
 
1423 1225
                     if (state != -1)
1424 1226
                     {
@@ -1432,18 +1234,18 @@ namespace EquipmentApi.Repositories
1432 1234
                         }
1433 1235
                         if (userinfo.role_name.Contains("班") || userinfo.role_name == "默认角色")
1434 1236
                         {
1435
-                            if (userinfo.remark == "组长")
1436
-                            {
1437
-                                query = query.Where(it => it.repairman.Contains(userinfo.usercode) || it.repairman == userinfo.username || it.postlist == userinfo.postlist);// 
1237
+                            //if (userinfo.remark == "组长")
1238
+                            //{
1239
+                            //    query = query.Where(it => it.repairman.Contains(userinfo.usercode) || it.repairman == userinfo.username || it.postlist == userinfo.postlist);// 
1438 1240
 
1439
-                            }
1440
-                            else
1441
-                            {
1241
+                            //}
1242
+                            //else
1243
+                            //{
1442 1244
                                 if (!string.IsNullOrEmpty(userinfo.username))
1443 1245
                                 {
1444 1246
                                     query = query.Where(it => it.createusername == userinfo.username || it.tousername[0] == userinfo.username || it.repairman == userinfo.username || it.repairman.Contains(userinfo.usercode));
1445 1247
                                 }
1446
-                            }
1248
+                            //}
1447 1249
 
1448 1250
 
1449 1251
                         }
@@ -1452,7 +1254,6 @@ namespace EquipmentApi.Repositories
1452 1254
                             case (int)EnumWorkOrderState.assign: query = query.OrderByDescending(p => p.totime); break;
1453 1255
                             case (int)EnumWorkOrderState.deal: query = query.OrderByDescending(p => p.dealtime); break;
1454 1256
                             //case (int)EnumWorkOrderState.evaluate: query = query.OrderBy(p => p.evaluatetime); break;
1455
-                            case (int)EnumWorkOrderState.hangup: query = query.OrderByDescending(p => p.hanguptime); break;
1456 1257
                                 //case (int)EnumWorkOrderState.cancle: query = query.OrderBy(p => p.canceltime); break;
1457 1258
                         }
1458 1259
                     }
@@ -1461,28 +1262,25 @@ namespace EquipmentApi.Repositories
1461 1262
                         //query = query.Where(it => it.wostate==0|| it.wostate == 1||it.wostate == 2|| it.wostate == 3|| it.wostate == 7|| it.wostate == 9);
1462 1263
                         if (userinfo.role_name.Contains("班") || userinfo.role_name == "默认角色")
1463 1264
                         {
1464
-                            if (userinfo.remark == "组长")
1465
-                            {
1466
-                                query = query.Where(it => it.postlist == userinfo.postlist || it.repairman == userinfo.username || it.repairman.Contains(userinfo.usercode));//  
1265
+                            //if (userinfo.remark == "组长")
1266
+                            //{
1267
+                            //    query = query.Where(it => it.postlist == userinfo.postlist || it.repairman == userinfo.username || it.repairman.Contains(userinfo.usercode));//  
1467 1268
 
1468
-                            }
1469
-                            else
1470
-                            {
1269
+                            //}
1270
+                            //else
1271
+                            //{
1471 1272
                                 if (!string.IsNullOrEmpty(userinfo.username))
1472 1273
                                 {
1473 1274
                                     query = query.Where(it => it.createusername == userinfo.username || it.tousername[0] == userinfo.username || it.repairman == userinfo.username || it.repairman.Contains(userinfo.usercode));
1474 1275
                                 }
1475
-                            }
1276
+                            //}
1476 1277
                         }
1477 1278
                         query = query.OrderByDescending(p => p.totime);
1478 1279
                     }
1479 1280
 
1480 1281
                     #endregion
1481 1282
                     #endregion
1482
-                    recordcount = query.Count();
1483
-                    //总数
1484
-                    totalcount = query.Count();
1485
-                    
1283
+                   
1486 1284
                     var list1 = query.ToList();
1487 1285
                     return list1;
1488 1286
                     #endregion
@@ -1502,62 +1300,28 @@ namespace EquipmentApi.Repositories
1502 1300
                         orderby repairbase.createtime descending
1503 1301
                         select new
1504 1302
                         {
1505
-                            repairbase.id,
1303
+                            repairbase.wostate,
1506 1304
                             repairbase.wocode,
1507
-                            repairbase.projectid,
1305
+                            repairbase.channel,
1508 1306
                             projectname = projeDefa.Count() > 0 ? projeDefa.First().project_name : null,
1509
-                            repairbase.protypeid,
1510
-                        //protypename = dic_protypeDefa.Count() > 0 ? dic_protypeDefa.First().name : null,
1511
-                        repairbase.faulttypeid,
1512
-                        //faulttypename = dic_faulttypeDefa.Count() > 0 ? dic_faulttypeDefa.First().name : null,
1513
-                        repairbase.systemid,
1514
-                        //systemname = dic_systemDefa.Count() > 0 ? dic_systemDefa.First().name : null,
1515
-                        repairbase.equipmentid,
1516
-                        //equipmentname = dic_equDefa.Count() > 0 ? dic_equDefa.First().equipment_name : null,
1517
-                        repairbase.channel,
1518
-                            provincecode = repairbase.province,
1519
-                            province = sys_provincesDefa.Count() > 0 ? sys_provincesDefa.First().provincename : null,
1520
-                            citycode = repairbase.city,
1521
-                            city = sys_cityDefa.Count() > 0 ? sys_cityDefa.First().cityname : null,
1522
-                            repairbase.buildid,
1523
-                        //buildname = bldDefa.Count() > 0 ? bldDefa.First().buildname : null,
1524
-                        repairbase.floorid,
1525
-                        //floorname = flrDefa.Count() > 0 ? flrDefa.First().floorname : null,
1526
-                        repairbase.repairreplace,
1307
+                            repairbase.repairreplace,
1527 1308
                             repairbase.repairoom,
1528 1309
                             repairbase.repairtime,
1529
-                            repairbase.contactway,
1530
-                            repairbase.repairman,
1531
-                            repairbase.faultdescripe,
1532
-                            repairbase.faultpic,
1533
-                            repairbase.appointtime,
1534
-                            repairbase.wostate,
1535 1310
                             repairbase.createtime,
1536
-                            repairbase.createuser,
1311
+                            repairbase.repairman,
1537 1312
                             repairbase.createusername,
1538
-                            repairbase.touser,
1313
+                            repairbase.contactway,
1314
+                            repairbase.faultdescripe,
1315
+                            repairbase.Pwcode,
1316
+                            repairbase.Jwocode,
1317
+                            repairbase.tobztimes,
1539 1318
                             repairbase.tousername,
1540 1319
                             repairbase.totime,
1541
-                            repairbase.totype,
1542
-                            repairbase.dealuser,
1543
-                            repairbase.dealusername,
1544 1320
                             repairbase.dealtime,
1545
-                            repairbase.ismaterials,
1546
-                            repairbase.materials,
1547
-                            repairbase.islosematerials,
1548
-                            repairbase.losematerials,
1549
-                            repairbase.hanguptime,
1550
-                            repairbase.arrivetime,
1551
-                            repairbase.evaluatetime,
1552
-                            repairbase.canceltime,
1553
-                            repairbase.score,
1554
-                            repairbase.Jwocode,
1555
-                            repairbase.Pwcode,
1556 1321
                             repairbase.CLpeoplefrom,
1557
-                            repairbase.tobztimes,
1558
-                            repairbase.wxtimeid,
1322
+                            repairbase.wxtimecenter,
1559 1323
                             wxtimeleths = wxtimelisDefa.Count() > 0 ? wxtimelisDefa.First().timecount : 0,//维修时长
1560
-                    };
1324
+                        };
1561 1325
                     #endregion
1562 1326
                     #region 查询条件
1563 1327
                     if (!string.IsNullOrEmpty(phone))
@@ -1566,31 +1330,12 @@ namespace EquipmentApi.Repositories
1566 1330
                                 || it.Jwocode.Contains(phone) || it.createusername.Contains(phone)
1567 1331
                                 || it.repairman.Contains(phone) || it.faultdescripe.Contains(phone)
1568 1332
                                 || it.CLpeoplefrom.Contains(phone)
1569
-                                || it.touser.Contains(usercode)
1570
-                                || it.dealuser.Contains(usercode)
1571 1333
                                 );
1572 1334
                     if (!string.IsNullOrEmpty(Pwcode))
1573 1335
                         query = query.Where(it => it.Pwcode == Pwcode);
1574 1336
                     if (!string.IsNullOrEmpty(wocode))
1575 1337
                         query = query.Where(it => it.wocode.Contains(wocode));
1576
-                    if (!string.IsNullOrEmpty(province))
1577
-                        query = query.Where(it => it.provincecode == province);
1578
-                    if (!string.IsNullOrEmpty(city))
1579
-                        query = query.Where(it => it.citycode == city);
1580
-                    if (!string.IsNullOrEmpty(projectid))
1581
-                        query = query.Where(it => it.projectid == projectid);
1582
-                    if (!string.IsNullOrEmpty(protypeid))
1583
-                        query = query.Where(it => it.protypeid == protypeid);
1584
-                    if (!string.IsNullOrEmpty(buildid))
1585
-                        query = query.Where(it => it.buildid == buildid);
1586
-                    if (!string.IsNullOrEmpty(floorid))
1587
-                        query = query.Where(it => it.floorid == floorid);
1588
-                    if (!string.IsNullOrEmpty(replace))
1589
-                        query = query.Where(it => it.repairreplace.Contains(replace) || it.repairoom.Contains(replace));
1590
-                    if (!string.IsNullOrEmpty(systemid))
1591
-                        query = query.Where(it => it.systemid == systemid);
1592
-                    if (!string.IsNullOrEmpty(equipmentid))
1593
-                        query = query.Where(it => it.equipmentid == equipmentid);
1338
+                 
1594 1339
                     if (!string.IsNullOrEmpty(channel))
1595 1340
                         query = query.Where(it => it.channel == Convert.ToInt32(channel));
1596 1341
                     if (!string.IsNullOrEmpty(Jwocode))
@@ -1600,58 +1345,10 @@ namespace EquipmentApi.Repositories
1600 1345
                         query = query.Where(it => it.createtime >= Convert.ToDateTime(stime + " 00:00:00"));
1601 1346
                     if (!string.IsNullOrEmpty(etime))
1602 1347
                         query = query.Where(it => it.createtime <= Convert.ToDateTime(etime + " 23:59:59"));
1603
-                    if (score != 0)
1604
-                    {
1605
-                        //等于1时获取分数为1和2的数据 不满意数据
1606
-                        if (score == 1)
1607
-                        {
1608
-                            query = query.Where(it => it.score == 1 || it.score == 2);
1609
-                        }
1610
-                        //获取基本满意数据
1611
-                        else if (score == 3)
1612
-                        {
1613
-                            query = query.Where(it => it.score == 3);
1614
-                        }
1615
-                        //获取4和5分数的数据 满意数据
1616
-                        else
1617
-                        {
1618
-                            query = query.Where(it => it.score == 4 || it.score == 5);
1619
-                        }
1620
-                    }
1621
-
1622
-                    if (userinfo.type == 2)//查看自己创建的工单
1623
-                    {
1624
-                        query = query.Where(it => it.createuser == userinfo.usercode);
1625
-                    }
1626
-                    else
1627
-                    {
1628
-                        if (!string.IsNullOrEmpty(usercode)) query = query.Where(it => (it.touser.Contains(usercode) || it.dealuser.Contains(usercode)));
1629
-                    }
1630
-                    if (userinfo.role_name.Contains("班") || userinfo.role_name == "默认角色")
1631
-                    {
1632
-
1633
-
1634
-                        wzpcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.create && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1635
-                        yjdcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.assign && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1636
-                        dpjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.deal && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1637
-                        ygqcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.hangup && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1638
-                        ywjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.evaluate && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1639
-                        yqxcount = query.Count(p => (p.Pwcode != null && p.Pwcode != "") && (p.createusername == userinfo.username || p.tousername[0] == userinfo.username || p.repairman == userinfo.username || p.repairman.Contains(userinfo.usercode)));
1640
-
1641
-
1642
-                    }
1643
-                    else
1644
-                    {
1645
-                        wzpcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.create);
1646
-                        yjdcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.assign);
1647
-                        dpjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.deal);
1648
-                        ygqcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.hangup);
1649
-                        ywjcount = query.Count(p => p.wostate == (int)EnumWorkOrderState.evaluate);
1650
-                        yqxcount = query.Count(p => p.Pwcode != null && p.Pwcode != "");
1651
-                    }
1652
-
1653
-
1348
+                  
1654 1349
 
1350
+                   
1351
+                   
1655 1352
                     if (state != -1)
1656 1353
                     {
1657 1354
                         if (state == 8)
@@ -1679,7 +1376,6 @@ namespace EquipmentApi.Repositories
1679 1376
                             case (int)EnumWorkOrderState.assign: query = query.OrderByDescending(p => p.totime); break;
1680 1377
                             case (int)EnumWorkOrderState.deal: query = query.OrderByDescending(p => p.dealtime); break;
1681 1378
                             //case (int)EnumWorkOrderState.evaluate: query = query.OrderBy(p => p.evaluatetime); break;
1682
-                            case (int)EnumWorkOrderState.hangup: query = query.OrderByDescending(p => p.hanguptime); break;
1683 1379
                                 //case (int)EnumWorkOrderState.cancle: query = query.OrderBy(p => p.canceltime); break;
1684 1380
                         }
1685 1381
                     }
@@ -1710,15 +1406,12 @@ namespace EquipmentApi.Repositories
1710 1406
                             case (int)EnumWorkOrderState.assign: query = query.OrderByDescending(p => p.totime); break;
1711 1407
                             case (int)EnumWorkOrderState.deal: query = query.OrderByDescending(p => p.dealtime); break;
1712 1408
                             //case (int)EnumWorkOrderState.evaluate: query = query.OrderBy(p => p.evaluatetime); break;
1713
-                            case (int)EnumWorkOrderState.hangup: query = query.OrderByDescending(p => p.hanguptime); break;
1714 1409
                                 //case (int)EnumWorkOrderState.cancle: query = query.OrderBy(p => p.canceltime); break;
1715 1410
                         }
1716 1411
                     }
1717 1412
                     #endregion
1718 1413
                     #endregion
1719
-                    recordcount = query.Count();
1720
-                    //总数
1721
-                    totalcount = query.Count();
1414
+                  
1722 1415
                    
1723 1416
                     var list1 = query.ToList();
1724 1417
                     return list1;

Файловите разлики са ограничени, защото са твърде много
+ 1214 - 831
代码/MadRunFabric.EquipmentApi/EquipmentApi/Controllers/workordermanage/WoRepairBaseController.cs


+ 25 - 24
代码/MadRunFabric.EquipmentApi/EquipmentApi/Model/Dto/ExcelWo_Repair_Base.cs

@@ -34,15 +34,15 @@ namespace EquipmentApi.Model.Dto
34 34
         /// <summary>
35 35
         /// //报修时间
36 36
         /// </summary>
37
-        public string repairtime     {get;set;}
37
+        public string createtime { get;set;}
38 38
         /// <summary>
39 39
         /// 报修人
40 40
         /// </summary>
41
-        public string bxddcenter { get; set; }
41
+        public string repairman { get; set; }
42 42
         /// <summary>
43 43
         /// 创建人
44 44
         /// </summary>
45
-        public string createuser { get; set; }
45
+        public string createusername { get; set; }
46 46
         /// <summary>
47 47
         /// //联系方式
48 48
         /// </summary>
@@ -59,33 +59,34 @@ namespace EquipmentApi.Model.Dto
59 59
         ///  //接单班组  
60 60
         /// </summary>
61 61
         public string Jwocode        {get;set;}
62
-        ///// <summary>
63
-        /////  //接单人 
64
-        ///// </summary>
65
-        //public string formatterToUser{get;set;}
66 62
         /// <summary>
67 63
         ///  //接单时间  
68 64
         /// </summary>
69
-        public string tobztimes      {get;set;}
65
+        public DateTime? tobztimes      {get;set;}
70 66
         /// <summary>
71
-        ///   //处理时间 
67
+        /// 接单人姓名
72 68
         /// </summary>
73
-        public string dealtime       {get;set;}
69
+        public List<string> tousername { get; set; }
70
+
71
+        /// <summary>
72
+        /// 接单时间
73
+        /// </summary>
74
+        public DateTime? totime { get; set; }
75
+        /// <summary>
76
+        /// 处理时间
77
+        /// </summary>
78
+        public DateTime? dealtime { get; set; }
79
+        /// <summary>
80
+        /// 处理人来源
81
+        /// </summary>
82
+        public string CLpeoplefrom { get; set; }
83
+        /// <summary>
84
+        /// 超时了多久
85
+        /// </summary>
86
+        public string wxtimecenter { get; set; }
74 87
         /// <summary>
75
-        /// //来源
88
+        /// 维修时效
76 89
         /// </summary>
77
-        public string CLpeoplefrom   {get;set;}
78
-        ///// <summary>
79
-        /////  //满意度   
80
-        ///// </summary>
81
-        //public string score          {get;set;}
82
-        ///// <summary>
83
-        /////  //超时时长 
84
-        ///// </summary>
85
-        //public string cdealtime       {get;set;}
86
-        ///// <summary>
87
-        ///// ///维修时效  
88
-        ///// </summary>
89
-        //public string wxtimeleths { get; set; }
90
+        public string wxtimeleths { get; set; }
90 91
     }
91 92
 }

+ 93 - 0
代码/MadRunFabric.EquipmentApi/EquipmentApi/Model/Dto/ExcelWo_Repair_Bases.cs

@@ -0,0 +1,93 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Threading.Tasks;
5
+
6
+namespace EquipmentApi.Model.Dto
7
+{
8
+    public class ExcelWo_Repair_Bases
9
+    {
10
+
11
+        /// <summary>
12
+        /// //工单状态
13
+        /// </summary>
14
+        public string wostate { get; set; }
15
+        /// <summary>
16
+        /// //工单编号
17
+        /// </summary>
18
+        public string wocode { get; set; }
19
+        /// <summary>
20
+        /// //渠道来源
21
+        /// </summary>
22
+        public string channel { get; set; }
23
+        /// <summary>
24
+        /// //项目名称
25
+        /// </summary>
26
+        public string projectname { get; set; }
27
+        /// <summary>
28
+        /// //报修科室
29
+        /// </summary>
30
+        public string repairreplace { get; set; }
31
+        /// <summary>
32
+        /// //报修地点
33
+        /// </summary>
34
+        public string repairoom { get; set; }
35
+        /// <summary>
36
+        /// //报修时间
37
+        /// </summary>
38
+        public string createtime { get; set; }
39
+        /// <summary>
40
+        /// 报修人
41
+        /// </summary>
42
+        public string repairman { get; set; }
43
+        /// <summary>
44
+        /// 创建人
45
+        /// </summary>
46
+        public string createusername { get; set; }
47
+        /// <summary>
48
+        /// //联系方式
49
+        /// </summary>
50
+        public string contactway { get; set; }
51
+        /// <summary>
52
+        /// //设备名称
53
+        /// </summary>
54
+        public string faultdescripe { get; set; }
55
+        /// <summary>
56
+        /// //原接单班组
57
+        /// </summary>
58
+        public string Pwcode { get; set; }
59
+        /// <summary>
60
+        ///  //接单班组  
61
+        /// </summary>
62
+        public string Jwocode { get; set; }
63
+        /// <summary>
64
+        ///  //接单时间  
65
+        /// </summary>
66
+        public string tobztimes { get; set; }
67
+        /// <summary>
68
+        /// 接单人姓名
69
+        /// </summary>
70
+        public string tousername { get; set; }
71
+
72
+        /// <summary>
73
+        /// 接单时间
74
+        /// </summary>
75
+        public string totime { get; set; }
76
+        /// <summary>
77
+        /// 处理时间
78
+        /// </summary>
79
+        public string dealtime { get; set; }
80
+        /// <summary>
81
+        /// 处理人来源
82
+        /// </summary>
83
+        public string CLpeoplefrom { get; set; }
84
+        /// <summary>
85
+        /// 超时了多久
86
+        /// </summary>
87
+        public string wxtimecenter { get; set; }
88
+        /// <summary>
89
+        /// 维修时效
90
+        /// </summary>
91
+        public string wxtimeleths { get; set; }
92
+    }
93
+}

+ 84 - 0
代码/MadRunFabric.EquipmentApi/EquipmentApi/Model/Dto/excelcswocodelist.cs

@@ -0,0 +1,84 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Threading.Tasks;
5
+
6
+namespace EquipmentApi.Model.Dto
7
+{
8
+    public class excelcswocodelist
9
+    {
10
+
11
+        /// <summary>
12
+        /// 工单状态:0创建工单,1已转派(转派或者抢单),2已处理,3已评价,7挂起,8已取消,9已完成
13
+        /// </summary>
14
+        public string  wostate { get; set; }
15
+        /// <summary>
16
+        /// 工单编号
17
+        /// </summary>
18
+        public string wocode { get; set; } 
19
+        /// <summary>
20
+        /// 渠道来源 1表示PC 2表示安卓 3表示IOS 4表示微信
21
+        /// </summary>
22
+        public string  channel { get; set; }
23
+
24
+        /// <summary>
25
+        /// 报修科室
26
+        /// </summary>
27
+        public string repairreplace { get; set; } 
28
+        /// <summary>
29
+        /// 报修地点
30
+        /// </summary>
31
+        public string repairoom { get; set; } 
32
+        /// <summary>
33
+        /// 报修时间
34
+        /// </summary>
35
+        public string  repairtime { get; set; }
36
+
37
+        /// <summary>
38
+        /// 报修人
39
+        /// </summary>
40
+        public string repairman { get; set; } 
41
+        /// <summary>
42
+        /// 联系方式
43
+        /// </summary>
44
+        public string contactway { get; set; }
45
+
46
+        /// <summary>
47
+        /// 故障说明 设备名称
48
+        /// </summary>
49
+        public string faultdescripe { get; set; }
50
+        /// <summary>
51
+        /// 原接单班组
52
+        /// </summary>
53
+        public string Pwcode { get; set; }
54
+        /// <summary>
55
+        /// 接单班组科室
56
+        /// </summary>
57
+        public string Jwocode { get; set; }
58
+        /// <summary>
59
+        /// 接单人姓名
60
+        /// </summary>
61
+        public string  tousername { get; set; }
62
+
63
+        /// <summary>
64
+        /// 接单时间
65
+        /// </summary>
66
+        public string  totime { get; set; }
67
+        /// <summary>
68
+        /// 处理时间
69
+        /// </summary>
70
+        public string  dealtime { get; set; }
71
+        /// <summary>
72
+        /// 处理人来源
73
+        /// </summary>
74
+        public string CLpeoplefrom { get; set; }
75
+        /// <summary>
76
+        /// 超时了多久
77
+        /// </summary>
78
+        public string wxtimecenter { get; set; }
79
+        /// <summary>
80
+        /// 维修时效
81
+        /// </summary>
82
+        public string  wxtimeleths { get; set; }
83
+    }
84
+}

Файловите разлики са ограничени, защото са твърде много
+ 1 - 0
代码/MadRunFabric.EquipmentApi/EquipmentApi/Properties/PublishProfiles/FolderProfile.pubxml.user


+ 1 - 1
代码/MadRunFabric.SignTokenApi/SignTokenApi/Controllers/UserAccountController.cs

@@ -318,7 +318,7 @@ namespace SignTokenApi.Controllers
318 318
             {
319 319
                 model.certificate = new List<FileBaseModel>();
320 320
             }
321
-            if (input.postlist != null&&input.postlist[0]!=null)
321
+            if (input.postlist != null)
322 322
             {
323 323
                 model.postlist = input.postlist;
324 324
             }

+ 1 - 0
代码/MadRunFabric.SignTokenApi/SignTokenApi/Properties/PublishProfiles/FolderProfile.pubxml.user

@@ -7,6 +7,7 @@
7 7
   <PropertyGroup>
8 8
     <TimeStampOfAssociatedLegacyPublishXmlFile />
9 9
     <_PublishTargetUrl>E:\项目1\医院\后端发布\SignTokenApi</_PublishTargetUrl>
10
+    <History>True|2021-12-24T03:37:05.0120322Z;</History>
10 11
   </PropertyGroup>
11 12
   <ItemGroup>
12 13
     <File Include="Api.SignToken.dll">

+ 1 - 1
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Model/Dto/Onlineservertypein.cs

@@ -6,8 +6,8 @@ namespace TestUserTypeApi.Model.Dto
6 6
 {
7 7
   public   class Onlineservertypein
8 8
     {
9
+        public string zxusercoude { get; set; }
9 10
         public int yyghcount { get; set; }
10
-        public string  zxusercoude { get; set; }
11 11
         public int Tjcount   { get; set; }
12 12
         public int Zpcount   { get; set; }
13 13
         public int bqdhcount { get; set; }

+ 1 - 1
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Repositories/HzsfMassagesRepository.cs

@@ -239,7 +239,7 @@ namespace TestUserTypeApi.Repositories
239 239
             var bxstages = new List<IPipelineStageDefinition>();
240 240
             if (!string.IsNullOrEmpty(start) && !string.IsNullOrEmpty(endt))
241 241
             {
242
-                bxstages.Add(new JsonPipelineStageDefinition<HzsfMassages, BsonDocument>("{$match:{$and:[{CY_DATE:{$gte:new Date('" + start + "')}},{CY_DATE:{$lte:new Date('" + endt + "')}},{iszyormz:'住院患者'}]}}"));
242
+                bxstages.Add(new JsonPipelineStageDefinition<HzsfMassages, BsonDocument>("{$match:{$and:[{CY_DATE:{$gte:new Date('" + start + "')}},{CY_DATE:{$lte:new Date('" + endt + "')}},{iszyormz:'住院患者'}]}}"));//,{statesissuccess:'成功'}
243 243
             }
244 244
             else
245 245
             {

Файловите разлики са ограничени, защото са твърде много
+ 6 - 2
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi.Repositories/v_csm_zhuyuanRepository.cs


Файловите разлики са ограничени, защото са твърде много
+ 234 - 68
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Controllers/TestController.cs


+ 333 - 94
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Controllers/TestUserTypeController.cs

@@ -2061,80 +2061,152 @@ namespace TestUserTypeApi.Controllers
2061 2061
         /// 获取要进行聊天的客服人员工号 
2062 2062
         /// </summary>
2063 2063
         /// <returns></returns>
2064
+        //[HttpGet("getzxuserinfo")]
2065
+        //public async Task<IActionResult> GetZxUserinfo(string fromuserid)
2066
+        //{
2067
+        //    string usercode = "";
2068
+        //    //先判断是否为新客户 已经有过客服人员
2069
+        //    var fromlist = await _ImsgonlineRepository.Get(p => p.fromuserid == fromuserid);
2070
+        //    if (fromlist.Count() != 0)
2071
+        //    {
2072
+        //        var firstusercode= fromlist.FirstOrDefault().touserid;
2073
+        //        var userlistow = await _IFpzxinfosRepository.Get(p => p.usercode == firstusercode);
2074
+        //        foreach (var items in userlistow)
2075
+        //        {
2076
+        //            if (items.loginstate == 1)
2077
+        //            {
2078
+        //                usercode = firstusercode;
2079
+        //            }
2080
+        //            else
2081
+        //            {
2082
+        //                List<Model.UserZxChatlist> list = new List<UserZxChatlist>();
2083
+        //                //先分组获取数量
2084
+
2085
+        //                //获取所有坐席人员名单
2086
+        //                //var userlist = await _sys_user_accountRepository.Get(p => p.seat_flag == true);//seat_flag
2087
+        //                //获取安排坐席人员表中的坐席信息
2088
+        //                var userlist = await _IFpzxinfosRepository.Get(p => p.loginstate == 1);
2089
+
2090
+        //                //再获取坐席服务的人数进行排序返回人少的 
2091
+        //                foreach (var item in userlist)
2092
+        //                {
2093
+        //                    Model.UserZxChatlist model = new UserZxChatlist();
2094
+        //                    // 再根据用户编号获取数量
2095
+        //                    var kflist = _ImsgonlineRepository.getkfcountz(item.usercode);
2096
+        //                    model.usercode = item.usercode;
2097
+        //                    model.chatcount = kflist.Count();
2098
+        //                    list.Add(model);
2099
+        //                }
2100
+        //                var info = list.OrderBy(p => p.chatcount).FirstOrDefault();
2101
+        //                if (info != null)
2102
+        //                {
2103
+        //                    usercode = info.usercode;
2104
+        //                }
2105
+        //            }
2106
+        //        }
2107
+               
2108
+
2109
+        //    }
2110
+        //    else
2111
+        //    {
2112
+        //        List<Model.UserZxChatlist> list = new List<UserZxChatlist>();
2113
+        //        //先分组获取数量
2114
+
2115
+        //        //获取所有坐席人员名单
2116
+        //        //var userlist = await _sys_user_accountRepository.Get(p => p.seat_flag == true);//seat_flag
2117
+        //        //获取安排坐席人员表中的坐席信息
2118
+        //        var userlist = await _IFpzxinfosRepository.Get(p => p.loginstate == 1);
2119
+
2120
+        //        //再获取坐席服务的人数进行排序返回人少的 
2121
+        //        foreach (var item in userlist)
2122
+        //        {
2123
+        //            Model.UserZxChatlist model = new UserZxChatlist();
2124
+        //            // 再根据用户编号获取数量
2125
+        //            var kflist = _ImsgonlineRepository.getkfcountz(item.usercode);
2126
+        //            model.usercode = item.usercode;
2127
+        //            model.chatcount = kflist.Count();
2128
+        //            list.Add(model);
2129
+        //        }
2130
+        //        var info = list.OrderBy(p => p.chatcount).FirstOrDefault();
2131
+        //        if (info != null)
2132
+        //        {
2133
+        //            usercode = info.usercode;
2134
+        //        }
2135
+        //    }
2136
+          
2137
+            
2138
+        //    return Success("成功", usercode);
2139
+        //}
2064 2140
         [HttpGet("getzxuserinfo")]
2065
-        public async Task<IActionResult> GetZxUserinfo(string fromuserid)
2141
+        public async Task<IActionResult> GetZxUserinfotest()
2066 2142
         {
2067
-            string usercode = "";
2068
-            //先判断是否为新客户 已经有过客服人员
2069
-            var fromlist = await _ImsgonlineRepository.Get(p => p.fromuserid == fromuserid);
2070
-            if (fromlist.Count() != 0)
2143
+            var usercode = "";
2144
+            string nowtime = DateTime.Now.ToString("yyyy-MM-dd");
2145
+            DateTime stime =Convert.ToDateTime(nowtime + " 00:00:00");
2146
+            DateTime etime = Convert.ToDateTime(nowtime + " 23:59:59");
2147
+
2148
+            List<ChatInglist> clist = new List<ChatInglist>();
2149
+
2150
+            ///存储坐席服务人数信息
2151
+            List<Model.UserZxChatlist> cclist = new List<UserZxChatlist>();
2152
+            //先分组获取数量
2153
+
2154
+            //获取所有坐席人员名单
2155
+            //var userlist = await _sys_user_accountRepository.Get(p => p.seat_flag == true);//seat_flag
2156
+            //获取安排坐席人员表中的坐席信息
2157
+            var userlist = await _IFpzxinfosRepository.Get(p => p.loginstate == 1);
2158
+            //再获取坐席服务的人数进行排序返回人少的 
2159
+            foreach (var item in userlist)
2071 2160
             {
2072
-                var firstusercode= fromlist.FirstOrDefault().touserid;
2073
-                var userlistow = await _IFpzxinfosRepository.Get(p => p.usercode == firstusercode);
2074
-                foreach (var items in userlistow)
2161
+                //根据用户编号获取聊天记录信息提取出跟几个人聊过天 获取到当前坐席的服务人数
2162
+                var serverlist = await _ImsgonlineRepository.Get(p=>p.touserid==item.usercode&&p.createtime>=stime&&p.createtime<=etime);
2163
+                /////将item object类型转换成wo_repair_base类型方便调用
2164
+                //var worepairbase = ConvertObject<Model.Dto.T_Msg_Chat>(serverlist);
2165
+                if (serverlist.Count()==0)
2075 2166
                 {
2076
-                    if (items.loginstate == 1)
2167
+                    //判断是否有了 有的改数量加一 没有的数量为一
2168
+                    var ifhavelist = cclist.Where(p => p.usercode == item.usercode).ToList();
2169
+                    if (ifhavelist.Count > 0)
2077 2170
                     {
2078
-                        usercode = firstusercode;
2171
+                        var a = cclist.Where(p => p.usercode == item.usercode).FirstOrDefault();
2172
+                        a.chatcount += 1;
2079 2173
                     }
2080 2174
                     else
2081 2175
                     {
2082
-                        List<Model.UserZxChatlist> list = new List<UserZxChatlist>();
2083
-                        //先分组获取数量
2084
-
2085
-                        //获取所有坐席人员名单
2086
-                        //var userlist = await _sys_user_accountRepository.Get(p => p.seat_flag == true);//seat_flag
2087
-                        //获取安排坐席人员表中的坐席信息
2088
-                        var userlist = await _IFpzxinfosRepository.Get(p => p.loginstate == 1);
2089
-
2090
-                        //再获取坐席服务的人数进行排序返回人少的 
2091
-                        foreach (var item in userlist)
2176
+                        UserZxChatlist ccmodel = new UserZxChatlist();
2177
+                        ccmodel.usercode = item.usercode;
2178
+                        ccmodel.chatcount = 0;
2179
+                        cclist.Add(ccmodel);
2180
+                    }
2181
+                }
2182
+                else
2183
+                {
2184
+                    foreach (var items in serverlist)
2185
+                    {
2186
+                        //判断是否有了 有的改数量加一 没有的数量为一
2187
+                        var ifhavelist = cclist.Where(p => p.usercode == items.touserid).ToList();
2188
+                        if (ifhavelist.Count > 0)
2092 2189
                         {
2093
-                            Model.UserZxChatlist model = new UserZxChatlist();
2094
-                            // 再根据用户编号获取数量
2095
-                            var kflist = _ImsgonlineRepository.getkfcountz(item.usercode);
2096
-                            model.usercode = item.usercode;
2097
-                            model.chatcount = kflist.Count();
2098
-                            list.Add(model);
2190
+                            var a = cclist.Where(p => p.usercode == items.touserid).FirstOrDefault();
2191
+                            a.chatcount += 1;
2099 2192
                         }
2100
-                        var info = list.OrderBy(p => p.chatcount).FirstOrDefault();
2101
-                        if (info != null)
2193
+                        else
2102 2194
                         {
2103
-                            usercode = info.usercode;
2195
+                            UserZxChatlist ccmodel = new UserZxChatlist();
2196
+                            ccmodel.usercode = items.touserid;
2197
+                            ccmodel.chatcount = 1;
2198
+                            cclist.Add(ccmodel);
2104 2199
                         }
2105 2200
                     }
2106 2201
                 }
2107 2202
                
2108
-
2203
+                
2109 2204
             }
2110
-            else
2205
+            var info = cclist.OrderBy(p => p.chatcount).FirstOrDefault();
2206
+            if (info != null)
2111 2207
             {
2112
-                List<Model.UserZxChatlist> list = new List<UserZxChatlist>();
2113
-                //先分组获取数量
2114
-
2115
-                //获取所有坐席人员名单
2116
-                //var userlist = await _sys_user_accountRepository.Get(p => p.seat_flag == true);//seat_flag
2117
-                //获取安排坐席人员表中的坐席信息
2118
-                var userlist = await _IFpzxinfosRepository.Get(p => p.loginstate == 1);
2119
-
2120
-                //再获取坐席服务的人数进行排序返回人少的 
2121
-                foreach (var item in userlist)
2122
-                {
2123
-                    Model.UserZxChatlist model = new UserZxChatlist();
2124
-                    // 再根据用户编号获取数量
2125
-                    var kflist = _ImsgonlineRepository.getkfcountz(item.usercode);
2126
-                    model.usercode = item.usercode;
2127
-                    model.chatcount = kflist.Count();
2128
-                    list.Add(model);
2129
-                }
2130
-                var info = list.OrderBy(p => p.chatcount).FirstOrDefault();
2131
-                if (info != null)
2132
-                {
2133
-                    usercode = info.usercode;
2134
-                }
2208
+                usercode = info.usercode;
2135 2209
             }
2136
-          
2137
-            
2138 2210
             return Success("成功", usercode);
2139 2211
         }
2140 2212
         /// <summary>
@@ -2148,12 +2220,32 @@ namespace TestUserTypeApi.Controllers
2148 2220
         public async Task<IActionResult> AddOnlinesertype(string zxusercode, string fwusercode, string fwtype)
2149 2221
         {
2150 2222
             var typemodel = await _IOnlineserTypeRepository.GetSingle(p => p.Zxusercode == zxusercode && p.Fwusercode == fwusercode);
2151
-
2152
-            if (typemodel.createtime == DateTime.Now)
2223
+            if (typemodel != null)
2153 2224
             {
2154
-                return Success("成功");
2225
+                //if (typemodel.createtime == DateTime.Now || typemodel.Fwtype != "" || typemodel.Fwtype != null)
2226
+                //{
2227
+                    return Success("成功", "1");
2228
+                //}
2229
+                //else
2230
+                //{
2231
+                //    OnlineserType model = new OnlineserType();
2232
+                //    model.Zxusercode = zxusercode;//当前登录坐席
2233
+                //    model.Fwusercode = fwusercode;//服务人工号
2234
+                //    model.Fwtype = fwtype;//服务类型
2235
+                //    model.createtime = DateTime.Now;
2236
+                //    var a = await _IOnlineserTypeRepository.Add(model);
2237
+                //    if (a)
2238
+                //    {
2239
+                //        return Success("成功");
2240
+                //    }
2241
+                //    else
2242
+                //    {
2243
+                //        return Error("失败");
2244
+                //    }
2245
+                //}
2155 2246
             }
2156
-            else {
2247
+            else
2248
+            {
2157 2249
                 OnlineserType model = new OnlineserType();
2158 2250
                 model.Zxusercode = zxusercode;//当前登录坐席
2159 2251
                 model.Fwusercode = fwusercode;//服务人工号
@@ -2192,7 +2284,8 @@ namespace TestUserTypeApi.Controllers
2192 2284
                 var sbsjcount =await _IOnlineserTypeRepository.Count(p => p.Zxusercode == zxusercode && p.Fwtype == "上班时间" && p.createtime >= DateTime.Parse(stime.Trim() + " 00:00:00") && p.createtime <= DateTime.Parse(etime.Trim() + " 23:59:59"));
2193 2285
                 var ybcount   =await _IOnlineserTypeRepository.Count(p => p.Zxusercode == zxusercode && p.Fwtype == "医保" && p.createtime >= DateTime.Parse(stime.Trim() + " 00:00:00") && p.createtime <= DateTime.Parse(etime.Trim() + " 23:59:59"));
2194 2286
                 var wnrhcount =await _IOnlineserTypeRepository.Count(p => p.Zxusercode == zxusercode && p.Fwtype == "无内容" && p.createtime >= DateTime.Parse(stime.Trim() + " 00:00:00") && p.createtime <= DateTime.Parse(etime.Trim() + " 23:59:59"));
2195
-                var allcount  =await _IOnlineserTypeRepository.Count(p => p.Zxusercode == zxusercode && p.createtime >= DateTime.Parse(stime.Trim() + " 00:00:00") && p.createtime <= DateTime.Parse(etime.Trim() + " 23:59:59"));
2287
+                //var allcount  =await _IOnlineserTypeRepository.Count(p => p.Zxusercode == zxusercode && p.createtime >= DateTime.Parse(stime.Trim() + " 00:00:00") && p.createtime <= DateTime.Parse(etime.Trim() + " 23:59:59"));
2288
+                var  allcount = Convert.ToInt32(yyghcount) + Convert.ToInt32(Tjcount) + Convert.ToInt32(Zpcount) + Convert.ToInt32(bqdhcount) + Convert.ToInt32(xgymcount) + Convert.ToInt32(sbsjcount) + Convert.ToInt32(ybcount) + Convert.ToInt32(wnrhcount);
2196 2289
                 Model.Dto.Onlineservertypein model = new Model.Dto.Onlineservertypein();
2197 2290
                 model.yyghcount =Convert.ToInt32(yyghcount);
2198 2291
                 model.zxusercoude = zxusercode;
@@ -2241,7 +2334,7 @@ namespace TestUserTypeApi.Controllers
2241 2334
         [HttpGet("upfpzxinfos")]
2242 2335
         public async Task<IActionResult> upFpzxinfos(Model.Fpzxinfosdto tps)
2243 2336
         {
2244
-            var tp = await _IFpzxinfosRepository.GetSingle(p => p.id == tps.id);
2337
+            var tp = await _IFpzxinfosRepository.GetSingle(p => p.id == tps.id);//.GetSingle(p => p.usercode == tps.usercode);
2245 2338
             if (tp != null)
2246 2339
             {
2247 2340
                 tp.usercode = tps.usercode;
@@ -11632,11 +11725,15 @@ namespace TestUserTypeApi.Controllers
11632 11725
             tp.deptname = tps.deptname;//科室名称
11633 11726
             tp.coustomname = tps.coustomname;//客户姓名
11634 11727
             tp.phoneinfo = tps.phoneinfo;//联系电话
11728
+            tp.centerinfotype = tps.centerinfotype;//投诉类型
11635 11729
             tp.centerinfo = tps.centerinfo;//咨询内容/反馈内容
11636 11730
             tp.jsdeptname = tps.jsdeptname;//接收部门名称
11637 11731
             tp.jspeople = tps.jspeople;//接收人名称
11732
+            tp.jspeopleusercode = tps.jspeopleusercode;//接收人工号
11638 11733
             tp.memoinfo = tps.memoinfo;//备注
11734
+            tp.resultmassage = tps.resultmassage;//处理结果
11639 11735
             tp.createdate = DateTime.Now;//创建时间
11736
+            tp.createusercode = tps.createusercode;
11640 11737
             var a = _ICallComeTpwodeRepository.AddRetID(tp);
11641 11738
 
11642 11739
             if (a.Result != null || a.Result != "")
@@ -11662,10 +11759,13 @@ namespace TestUserTypeApi.Controllers
11662 11759
             tp.deptname = tps.deptname;//科室名称
11663 11760
             tp.coustomname = tps.coustomname;//客户姓名
11664 11761
             tp.phoneinfo = tps.phoneinfo;//联系电话
11762
+            tp.centerinfotype = tps.centerinfotype;//投诉类型
11665 11763
             tp.centerinfo = tps.centerinfo;//咨询内容/反馈内容
11666 11764
             tp.jsdeptname = tps.jsdeptname;//接收部门名称
11667 11765
             tp.jspeople = tps.jspeople;//接收人名称
11766
+            tp.jspeopleusercode = tps.jspeopleusercode;//接收人工号
11668 11767
             tp.memoinfo = tps.memoinfo;//备注
11768
+            tp.resultmassage = tps.resultmassage;//处理结果
11669 11769
             var a = _ICallComeTpwodeRepository.Update(tp);
11670 11770
 
11671 11771
             if (a.Result)
@@ -11714,43 +11814,116 @@ namespace TestUserTypeApi.Controllers
11714 11814
         /// <param name="PageSize"></param>
11715 11815
         /// <returns></returns>
11716 11816
         [HttpGet("getcallcometpwode")]
11717
-        public async Task<IActionResult> GetCallComeTpwode(int PageIndex, int PageSize,string phonemodel,string deptname,string stime ,string etime ,int wodetype=0)
11817
+        public async Task<IActionResult> GetCallComeTpwode(int PageIndex, int PageSize,string phonemodel,string deptname,string centerinfo,string stime ,string etime ,string usercode,int wodetype=0)
11718 11818
         {
11719
-            //排序字段
11720
-            var sql = "p => p.wodetype == wodetype";
11721
-           
11722
-           
11723
-            //排序字段
11724
-            var sort = Builders<CallComeTpwode>.Sort.Descending("createdate");
11725
-            //根据条件查询集合
11726
-            var listApp = new List<FilterDefinition<CallComeTpwode>>();
11727
-            listApp.Add(Builders<CallComeTpwode>.Filter.Eq("wodetype", wodetype));
11728
-            
11729
-            if (!string.IsNullOrEmpty(phonemodel))
11730
-            {
11731
-                listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.phoneinfo == phonemodel));
11732
-            }
11733
-            if (!string.IsNullOrEmpty(stime) && !string.IsNullOrEmpty(etime))
11819
+            var usercodelist = _sys_user_accountRepository.GetUseralllistin(usercode).ToList();
11820
+            string rolename = "";
11821
+            if (usercodelist.Count() > 0)
11734 11822
             {
11735
-                stime = stime.Trim() + " 00:00:00";
11736
-                etime = etime.Trim() + " 23:59:59";
11737
-                listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.createdate >= DateTime.Parse(stime) && p.createdate <= DateTime.Parse(etime)));
11738
-               
11739
-            }
11740
-            var filter = Builders<CallComeTpwode>.Filter.And(listApp);
11823
+                foreach (var items in usercodelist)
11824
+                {
11825
+                    //将object转化为类对象
11826
+                    var userinfomodel = JsonHelper.JsonToEntity<UserAccountInfoModel>(items.ToJson());
11827
+                    if (userinfomodel != null)
11828
+                    {
11829
+                        rolename = userinfomodel.role_name;
11830
+                        break;
11831
+                    }
11741 11832
 
11742
-            var list = await _ICallComeTpwodeRepository.GetByPage(filter, PageIndex, PageSize, sort);
11743
-            var count = await _ICallComeTpwodeRepository.CountAsync(filter);   //获取总数
11744
-            var listmodel = new List<CallComeTpwode>();
11833
+                }
11834
+                if (rolename == "回访办"|| rolename == "系统维护"|| rolename == "超级管理")
11835
+                {
11836
+                    //排序字段
11837
+                    var sort = Builders<CallComeTpwode>.Sort.Descending("createdate");
11838
+                    //根据条件查询集合
11839
+                    var listApp = new List<FilterDefinition<CallComeTpwode>>();
11840
+                    listApp.Add(Builders<CallComeTpwode>.Filter.Eq("wodetype", wodetype));
11745 11841
 
11746
-            var obj = new
11747
-            {
11748
-                 rows = list,
11749
-                total = count,
11750
-            };
11842
+                    if (!string.IsNullOrEmpty(phonemodel))
11843
+                    {
11844
+                        listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.phoneinfo.Contains(phonemodel)));
11845
+                    }
11846
+                    if (!string.IsNullOrEmpty(deptname))
11847
+                    {
11848
+                        listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.deptname == deptname));
11849
+                    }
11850
+                    if (!string.IsNullOrEmpty(centerinfo))
11851
+                    {
11852
+                        listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.centerinfo.Contains(centerinfo)));
11853
+                    }
11854
+                    if (!string.IsNullOrEmpty(stime) && !string.IsNullOrEmpty(etime))
11855
+                    {
11856
+                        stime = stime.Trim() + " 00:00:00";
11857
+                        etime = etime.Trim() + " 23:59:59";
11858
+                        listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.createdate >= DateTime.Parse(stime) && p.createdate <= DateTime.Parse(etime)));
11859
+
11860
+                    }
11861
+                    var filter = Builders<CallComeTpwode>.Filter.And(listApp);
11862
+
11863
+                    var list = await _ICallComeTpwodeRepository.GetByPage(filter, PageIndex, PageSize, sort);
11864
+                    var count = await _ICallComeTpwodeRepository.CountAsync(filter);   //获取总数
11865
+                    var listmodel = new List<CallComeTpwode>();
11866
+
11867
+                    var obj = new
11868
+                    {
11869
+                        rows = list,
11870
+                        total = count,
11871
+                    };
11872
+
11873
+
11874
+                    return Success("成功", obj);
11875
+                }
11876
+                else
11877
+                {
11878
+                    //排序字段
11879
+                    var sort = Builders<CallComeTpwode>.Sort.Descending("createdate");
11880
+                    //根据条件查询集合
11881
+                    var listApp = new List<FilterDefinition<CallComeTpwode>>();
11882
+                    listApp.Add(Builders<CallComeTpwode>.Filter.Eq("wodetype", wodetype));
11883
+
11884
+                    if (!string.IsNullOrEmpty(phonemodel))
11885
+                    {
11886
+                        listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.phoneinfo.Contains(phonemodel)));
11887
+                    }
11888
+                    if (!string.IsNullOrEmpty(deptname))
11889
+                    {
11890
+                        listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.deptname == deptname));
11891
+                    }
11892
+                    if (!string.IsNullOrEmpty(centerinfo))
11893
+                    {
11894
+                        listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.centerinfo.Contains(centerinfo)));
11895
+                    }
11896
+                    if (!string.IsNullOrEmpty(stime) && !string.IsNullOrEmpty(etime))
11897
+                    {
11898
+                        stime = stime.Trim() + " 00:00:00";
11899
+                        etime = etime.Trim() + " 23:59:59";
11900
+                        listApp.Add(Builders<CallComeTpwode>.Filter.Where(p => p.createdate >= DateTime.Parse(stime) && p.createdate <= DateTime.Parse(etime)));
11901
+
11902
+                    }
11903
+                    if (wodetype == 1)
11904
+                    {
11905
+                        listApp.Add(Builders<CallComeTpwode>.Filter.Eq("jspeopleusercode", usercode));
11906
+                    }
11907
+                    var filter = Builders<CallComeTpwode>.Filter.And(listApp);
11908
+
11909
+                    var list = await _ICallComeTpwodeRepository.GetByPage(filter, PageIndex, PageSize, sort);
11910
+                    var count = await _ICallComeTpwodeRepository.CountAsync(filter);   //获取总数
11911
+                    var listmodel = new List<CallComeTpwode>();
11912
+
11913
+                    var obj = new
11914
+                    {
11915
+                        rows = list,
11916
+                        total = count,
11917
+                    };
11918
+
11919
+
11920
+                    return Success("成功", obj);
11921
+                }
11922
+            }
11923
+            else {
11924
+                return Success("成功");
11925
+            }
11751 11926
            
11752
-          
11753
-            return Success("成功", obj);
11754 11927
         }
11755 11928
         #endregion
11756 11929
         #region 科室及负责人信息维护
@@ -11766,6 +11939,7 @@ namespace TestUserTypeApi.Controllers
11766 11939
             CallComeDeptorPeo tp = new CallComeDeptorPeo();
11767 11940
             tp.deptname = tps.deptname;//科室名称
11768 11941
             tp.peoplename = tps.peoplename;//负责人姓名
11942
+            tp.usercode = tps.usercode;//负责人工号
11769 11943
 
11770 11944
             var a = _ICallComeDeptorPeoRepository.AddRetID(tp);
11771 11945
 
@@ -11790,6 +11964,7 @@ namespace TestUserTypeApi.Controllers
11790 11964
             CallComeDeptorPeo tp = await _ICallComeDeptorPeoRepository.GetSingle(p => p.id == tps.id);
11791 11965
             tp.deptname = tps.deptname;//科室名称
11792 11966
             tp.peoplename = tps.peoplename;//负责人姓名
11967
+            tp.usercode = tps.usercode;//负责人工号
11793 11968
             var a = _ICallComeDeptorPeoRepository.Update(tp);
11794 11969
 
11795 11970
             if (a.Result)
@@ -12211,5 +12386,69 @@ namespace TestUserTypeApi.Controllers
12211 12386
             return Success("成功", model);
12212 12387
         }
12213 12388
         #endregion
12389
+
12390
+        /// <summary>
12391
+        /// 将object对象转换为实体对象
12392
+        /// </summary>
12393
+        /// <typeparam name="T">实体对象类名</typeparam>
12394
+        /// <param name="asObject">object对象</param>
12395
+        /// <returns></returns>
12396
+        private T ConvertObject<T>(object asObject) where T : new()
12397
+        {
12398
+            //创建实体对象实例
12399
+            var t = Activator.CreateInstance<T>();
12400
+            if (asObject != null)
12401
+            {
12402
+                Type type = asObject.GetType();
12403
+                //遍历实体对象属性
12404
+                foreach (var info in typeof(T).GetProperties())
12405
+                {
12406
+                    object obj = null;
12407
+                    //取得object对象中此属性的值
12408
+                    var val = type.GetProperty(info.Name)?.GetValue(asObject);
12409
+                    if (val != null)
12410
+                    {
12411
+                        //非泛型
12412
+                        if (!info.PropertyType.IsGenericType)
12413
+                            obj = Convert.ChangeType(val, info.PropertyType);
12414
+                        else//泛型Nullable<>
12415
+                        {
12416
+                            Type genericTypeDefinition = info.PropertyType.GetGenericTypeDefinition();
12417
+                            if (genericTypeDefinition == typeof(Nullable<>))
12418
+                            {
12419
+                                obj = Convert.ChangeType(val, Nullable.GetUnderlyingType(info.PropertyType));
12420
+                            }
12421
+                            else
12422
+                            {
12423
+                                obj = Convert.ChangeType(val, info.PropertyType);
12424
+                            }
12425
+                        }
12426
+                        info.SetValue(t, obj, null);
12427
+                    }
12428
+                }
12429
+            }
12430
+            return t;
12431
+        }
12432
+
12433
+
12434
+
12435
+        [HttpGet("ceshishuju")]
12436
+        public async Task<IActionResult> ceshishuju(string stime, string etime,int countsthes)
12437
+        {
12438
+            DateTime dt1 =  Convert.ToDateTime(etime);
12439
+            DateTime dt2 =  Convert.ToDateTime(stime);
12440
+
12441
+            TimeSpan ts = dt1.Subtract(dt2);
12442
+            double hours = ts.TotalHours;//24.0 
12443
+            if ((hours - countsthes) > 0)
12444
+            {
12445
+                var a = hours - countsthes;
12446
+                return Success("超时时长:", a.ToString("0.00"));
12447
+            }
12448
+            else
12449
+            {
12450
+                return Success("没超时");
12451
+            }
12452
+        }
12214 12453
     }
12215 12454
 }

+ 13 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Model/getdocttimedetail/response.cs

@@ -0,0 +1,13 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Threading.Tasks;
5
+
6
+namespace TestUserTypeApi.Model.getdocttimedetail
7
+{
8
+    public class response
9
+    {
10
+        public string resultCode { get; set; }
11
+        public List<timeFlag> timeFlagDS { get; set; }
12
+    }
13
+}

+ 14 - 0
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Model/timeFlag.cs

@@ -0,0 +1,14 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Threading.Tasks;
5
+
6
+namespace TestUserTypeApi.Model
7
+{
8
+    public class timeFlag
9
+    {
10
+        public string startTime { get; set; } 
11
+        public string endTime { get; set; }
12
+        public string usedFlag { get; set; }
13
+    }
14
+}

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Properties/PublishProfiles/FolderProfile.pubxml.user


+ 5 - 4
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Properties/launchSettings.json

@@ -1,13 +1,13 @@
1
-{
2
-  "$schema": "http://json.schemastore.org/launchsettings.json",
1
+{
3 2
   "iisSettings": {
4
-    "windowsAuthentication": false, 
5
-    "anonymousAuthentication": true, 
3
+    "windowsAuthentication": false,
4
+    "anonymousAuthentication": true,
6 5
     "iisExpress": {
7 6
       "applicationUrl": "http://localhost:55488",
8 7
       "sslPort": 0
9 8
     }
10 9
   },
10
+  "$schema": "http://json.schemastore.org/launchsettings.json",
11 11
   "profiles": {
12 12
     "IIS Express": {
13 13
       "commandName": "IISExpress",
@@ -33,6 +33,7 @@
33 33
       "environmentVariables": {
34 34
         "ASPNETCORE_ENVIRONMENT": "Development_Base"
35 35
       },
36
+      "nativeDebugging": true,
36 37
       "applicationUrl": "http://localhost:28340/"
37 38
     },
38 39
     "PLCAutomationApi(Prod)": {

+ 1 - 1
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/TestUserTypeApi.csproj

@@ -6,7 +6,7 @@
6 6
   </PropertyGroup>
7 7
 
8 8
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
9
-    <PlatformTarget>x64</PlatformTarget>
9
+    <PlatformTarget>x86</PlatformTarget>
10 10
   </PropertyGroup>
11 11
 
12 12
   <ItemGroup>