Przeglądaj źródła

报修平台功能开发完善 患者随访模块开发完善 双向转诊功能模块开发优化

zhaozhiqiang 5 lat temu
rodzic
commit
2936aa999a

Plik diff jest za duży
+ 3161 - 1609
代码/MadRunFabric.EquipmentApi/EquipmentApi/Controllers/workordermanage/WoRepairBaseController.cs


+ 92 - 96
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Controllers/TestController.cs

@@ -88,14 +88,6 @@ namespace TestUserTypeApi.Controllers
88 88
         [HttpGet("gethzxxsbyid")]
89 89
         public async Task<IActionResult> GetSzmzsbyid(string telphone,string nowdatetime)
90 90
         {
91
-            if (nowdatetime != null)
92
-            {
93
-                nowdatetime = Convert.ToDateTime(nowdatetime).AddDays(-3).ToString("yyyy-MM-dd");
94
-            }
95
-            else
96
-            {
97
-                nowdatetime = DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd");
98
-            }
99 91
             var model = await _Iv_csm_zhuyuanRepository.GetSingle(p => p.CY_DATE == nowdatetime && p.PAT_PHONE == telphone);
100 92
             return Success("成功", model);
101 93
         }
@@ -246,14 +238,14 @@ namespace TestUserTypeApi.Controllers
246 238
         [HttpGet("addfxqytabs")]
247 239
         public async Task<IActionResult> AddFxqytabs(string ids, string nowdatetime)
248 240
         {
249
-            if (nowdatetime != null)
250
-            {
251
-                nowdatetime = Convert.ToDateTime(nowdatetime).AddDays(-3).ToString("yyyy-MM-dd");
252
-            }
253
-            else
254
-            {
255
-                nowdatetime = DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd");
256
-            }
241
+            //if (nowdatetime != null)
242
+            //{
243
+            //    nowdatetime = Convert.ToDateTime(nowdatetime).AddDays(-3).ToString("yyyy-MM-dd");
244
+            //}
245
+            //else
246
+            //{
247
+            //    nowdatetime = DateTime.Now.AddDays(-3).ToString("yyyy-MM-dd");
248
+            //}
257 249
             string[] arrStr = ids.Split(',');
258 250
             foreach (var item in arrStr)
259 251
             {
@@ -263,89 +255,93 @@ namespace TestUserTypeApi.Controllers
263 255
                     continue;
264 256
                 }
265 257
                 var modelinfo =await _Iv_csm_zhuyuanRepository.GetSingle(p=>p.CY_DATE==nowdatetime&&p.PAT_PHONE==item);
266
-                //发送成功一条就添加一条记录var a = _IHzsfMassagesRepository.AddRetID(tp);
267
-                //发送手机号
268
-                var sendtel = item;
269
-                //发送内容
270
-                var sendcenter = _configuration["sendcent:centers"].ToString();
271
-                string resultstrs = sendcyinfo(sendtel, sendcenter);
272
-                if (Convert.ToInt32(resultstrs) > 0)
258
+                if (modelinfo != null)
273 259
                 {
274
-                    //定义发送记录实例
275
-                    #region 添加发送记录信息
276
-                    HzsfMassages tp = new HzsfMassages();
277
-                    tp.sendcenters = sendcenter;// 发送内容
278
-                    tp.replaycenters = "";// 回复内容
279
-                    tp.nomybecause = "";//不满意原因
280
-                    tp.sendmyeds = ""; // 满意度
281
-                    tp.senddate = DateTime.Now;// 发送时间
282
-                    tp.ZY_NO = modelinfo.ZY_NO;  // --住院号
283
-                    tp.NAME = modelinfo.NAME;  // --病人姓名
284
-                    tp.SEX = modelinfo.SEX;    // --病人性别
285
-                    tp.ZY_AGE = modelinfo.ZY_AGE;    // --住院年龄
286
-                    tp.PAT_PHONE = modelinfo.PAT_PHONE;         // --本人联系电话
287
-                    tp.JB_NAME = modelinfo.JB_NAME;    // --疾病描述(名称)
288
-                    tp.CY_ZD = modelinfo.CY_ZD;       //   --出院诊断
289
-                    tp.IS_OP = modelinfo.IS_OP;  // --是否手术
290
-                    tp.DIA_NAME = modelinfo.DIA_NAME;        // --诊断方式
291
-                    tp.NURSE_IN_CHARGE = modelinfo.NURSE_IN_CHARGE;     // --责任护士
292
-                    tp.CY_DEPT_NAME = modelinfo.CY_DEPT_NAME;    // --出院科室名称
293
-                    tp.RY_DATE = modelinfo.RY_DATE; // --入院日期
294
-                    tp.CY_DATE = modelinfo.CY_DATE;  // --出院日期
295
-                    tp.ZY_TIMES = modelinfo.ZY_TIMES; // --住院次数
296
-                    tp.DIRECTOR = modelinfo.DIRECTOR;    // 科主任
297
-                    tp.ZZ_DOC = modelinfo.ZZ_DOC;    // 主治医师
298
-                    tp.JZ_DOC = modelinfo.JZ_DOC; // 经治医师
299
-                    tp.ZY_DAYS = modelinfo.ZY_DAYS;    // 住院天数
300
-                    tp.ZY_DEPT_NAME = modelinfo.ZY_DEPT_NAME;  // 住院科室名称
301
-                    tp.JOB = modelinfo.JOB;           // 职业
302
-                    tp.OUT_OR_IN = modelinfo.OUT_OR_IN;   // 住院或出院
303
-                    tp.statesissuccess = "成功";
304
-                    tp.isdelete = 0;  //是否删除
305
-                    var a = _IHzsfMassagesRepository.AddRetID(tp);
306
-                    #endregion
260
+                    //发送成功一条就添加一条记录var a = _IHzsfMassagesRepository.AddRetID(tp);
261
+                    //发送手机号
262
+                    var sendtel = item;
263
+                    //发送内容
264
+                    var sendcenter = _configuration["sendcent:centers"].ToString();
265
+                    string resultstrs = sendcyinfo(sendtel, sendcenter);
266
+                    if (Convert.ToInt32(resultstrs) > 0)
267
+                    {
268
+                        //定义发送记录实例
269
+                        #region 添加发送记录信息
270
+                        HzsfMassages tp = new HzsfMassages();
271
+                        tp.sendcenters = sendcenter;// 发送内容
272
+                        tp.replaycenters = "";// 回复内容
273
+                        tp.nomybecause = "";//不满意原因
274
+                        tp.sendmyeds = ""; // 满意度
275
+                        tp.senddate = DateTime.Now;// 发送时间
276
+                        tp.ZY_NO = modelinfo.ZY_NO;  // --住院号
277
+                        tp.NAME = modelinfo.NAME;  // --病人姓名
278
+                        tp.SEX = modelinfo.SEX;    // --病人性别
279
+                        tp.ZY_AGE = modelinfo.ZY_AGE;    // --住院年龄
280
+                        tp.PAT_PHONE = modelinfo.PAT_PHONE;         // --本人联系电话
281
+                        tp.JB_NAME = modelinfo.JB_NAME;    // --疾病描述(名称)
282
+                        tp.CY_ZD = modelinfo.CY_ZD;       //   --出院诊断
283
+                        tp.IS_OP = modelinfo.IS_OP;  // --是否手术
284
+                        tp.DIA_NAME = modelinfo.DIA_NAME;        // --诊断方式
285
+                        tp.NURSE_IN_CHARGE = modelinfo.NURSE_IN_CHARGE;     // --责任护士
286
+                        tp.CY_DEPT_NAME = modelinfo.CY_DEPT_NAME;    // --出院科室名称
287
+                        tp.RY_DATE = modelinfo.RY_DATE; // --入院日期
288
+                        tp.CY_DATE = modelinfo.CY_DATE;  // --出院日期
289
+                        tp.ZY_TIMES = modelinfo.ZY_TIMES; // --住院次数
290
+                        tp.DIRECTOR = modelinfo.DIRECTOR;    // 科主任
291
+                        tp.ZZ_DOC = modelinfo.ZZ_DOC;    // 主治医师
292
+                        tp.JZ_DOC = modelinfo.JZ_DOC; // 经治医师
293
+                        tp.ZY_DAYS = modelinfo.ZY_DAYS;    // 住院天数
294
+                        tp.ZY_DEPT_NAME = modelinfo.ZY_DEPT_NAME;  // 住院科室名称
295
+                        tp.JOB = modelinfo.JOB;           // 职业
296
+                        tp.OUT_OR_IN = modelinfo.OUT_OR_IN;   // 住院或出院
297
+                        tp.statesissuccess = "成功";
298
+                        tp.isdelete = 0;  //是否删除
299
+                        var a = _IHzsfMassagesRepository.AddRetID(tp);
300
+                        #endregion
307 301
 
302
+                    }
303
+                    else if (Convert.ToInt32(resultstrs) == -5)
304
+                    {
305
+                        return Error("余额不足,请充值");
306
+                    }
307
+                    else if (Convert.ToInt32(resultstrs) == -6)
308
+                    {
309
+                        return Error("定时发送时间不是有效的时间格式");
310
+                    }
311
+                    else if (Convert.ToInt32(resultstrs) == -7)
312
+                    {
313
+                        return Error("提交信息末尾未签名,请添加中文的企业签名【 】");
314
+                    }
315
+                    else if (Convert.ToInt32(resultstrs) == -8)
316
+                    {
317
+                        return Error("发送内容需在1到300字之间");
318
+                    }
319
+                    else if (Convert.ToInt32(resultstrs) == -9)
320
+                    {
321
+                        return Error("发送号码为空");
322
+                    }
323
+                    else if (Convert.ToInt32(resultstrs) == -10)
324
+                    {
325
+                        return Error("定时时间不能小于系统当前时间");
326
+                    }
327
+                    else if (Convert.ToInt32(resultstrs) == -100)
328
+                    {
329
+                        return Error("IP黑名单");
330
+                    }
331
+                    else if (Convert.ToInt32(resultstrs) == -102)
332
+                    {
333
+                        return Error("账号黑名单");
334
+                    }
335
+                    else if (Convert.ToInt32(resultstrs) == -103)
336
+                    {
337
+                        return Error("IP未导白");
338
+                    }
339
+                    else
340
+                    {
341
+                        return Error("调用接口失败");
342
+                    }
308 343
                 }
309
-                else if (Convert.ToInt32(resultstrs) == -5)
310
-                {
311
-                    return Error("余额不足,请充值");
312
-                }
313
-                else if (Convert.ToInt32(resultstrs) == -6)
314
-                {
315
-                    return Error("定时发送时间不是有效的时间格式");
316
-                }
317
-                else if (Convert.ToInt32(resultstrs) == -7)
318
-                {
319
-                    return Error("提交信息末尾未签名,请添加中文的企业签名【 】");
320
-                }
321
-                else if (Convert.ToInt32(resultstrs) == -8)
322
-                {
323
-                    return Error("发送内容需在1到300字之间");
324
-                }
325
-                else if (Convert.ToInt32(resultstrs) == -9)
326
-                {
327
-                    return Error("发送号码为空");
328
-                }
329
-                else if (Convert.ToInt32(resultstrs) == -10)
330
-                {
331
-                    return Error("定时时间不能小于系统当前时间");
332
-                }
333
-                else if (Convert.ToInt32(resultstrs) == -100)
334
-                {
335
-                    return Error("IP黑名单");
336
-                }
337
-                else if (Convert.ToInt32(resultstrs) == -102)
338
-                {
339
-                    return Error("账号黑名单");
340
-                }
341
-                else if (Convert.ToInt32(resultstrs) == -103)
342
-                {
343
-                    return Error("IP未导白");
344
-                }
345
-                else
346
-                {
347
-                    return Error("调用接口失败");
348
-                }
344
+               
349 345
             }
350 346
 
351 347
             #region 不用的备份

+ 9 - 9
代码/MadRunFabric.TestUserTypeApi/TestUserTypeApi/Controllers/TestUserTypeController.cs

@@ -2246,8 +2246,8 @@ namespace TestUserTypeApi.Controllers
2246 2246
         public async Task<IActionResult> upSzzy(Model.Dto.Szzys tps)
2247 2247
         {
2248 2248
             Szzys tp =await _ISzzysRepository.GetSingle(p=>p.id==tps.id);
2249
-            tp.id = tps.id;
2250
-            //tp.Szzydjsj = tps.Szzydjsj;//登记时间
2249
+            //tp.id = tps.id;
2250
+            tp.Szzydjsj = tps.Szzydjsj;//登记时间
2251 2251
             tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
2252 2252
             tp.Szzyzzys = tps.Szzyzzys;//转诊医师
2253 2253
             tp.Yslxfs = tps.Yslxfs;//联系方式
@@ -2569,7 +2569,7 @@ namespace TestUserTypeApi.Controllers
2569 2569
         {
2570 2570
             Szmzs tp =await _ISzmzsRepository.GetSingle(p=>p.id==tps.id);
2571 2571
             tp.id = tps.id;
2572
-            //tp.Szzydjsj = tps.Szzydjsj;//登记时间
2572
+            tp.Szzydjsj = tps.Szzydjsj;//登记时间
2573 2573
             tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
2574 2574
             tp.Szzyzzys = tps.Szzyzzys;//转诊医师
2575 2575
             tp.Yslxfs = tps.Yslxfs;//联系方式
@@ -2791,7 +2791,7 @@ namespace TestUserTypeApi.Controllers
2791 2791
         {
2792 2792
             Szjcs tp = await _ISzjcsRepository.GetSingle(p => p.id == tps.id);
2793 2793
             tp.id = tps.id;
2794
-            //tp.Szzydjsj = tps.Szzydjsj;//登记时间
2794
+            tp.Szzydjsj = tps.Szzydjsj;//登记时间
2795 2795
             tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
2796 2796
             tp.Szzyzzys = tps.Szzyzzys;//转诊医师
2797 2797
             tp.Yslxfs = tps.Yslxfs;//联系方式
@@ -2995,7 +2995,7 @@ namespace TestUserTypeApi.Controllers
2995 2995
         {
2996 2996
             Xzzls tp = await _IXzzlsRepository.GetSingle(p=>p.id==tps.id);
2997 2997
             tp.id = tps.id;
2998
-            //tp.Szzydjsj = tps.Szzydjsj;//登记时间
2998
+            tp.Szzydjsj = tps.Szzydjsj;//登记时间
2999 2999
             tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
3000 3000
             tp.Szzyzzys = tps.Szzyzzys;//转诊医师
3001 3001
             tp.Yslxfs = tps.Yslxfs;//联系方式
@@ -3209,7 +3209,7 @@ namespace TestUserTypeApi.Controllers
3209 3209
         {
3210 3210
             Xzzys tp = await _IXzzysRepository.GetSingle(p=>p.id==tps.id);
3211 3211
             tp.id = tps.id;
3212
-            //tp.Szzydjsj = tps.Szzydjsj;//登记时间
3212
+            tp.Szzydjsj = tps.Szzydjsj;//登记时间
3213 3213
             tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
3214 3214
             tp.Szzyzzys = tps.Szzyzzys;//转诊医师
3215 3215
             tp.Yslxfs = tps.Yslxfs;//联系方式
@@ -3434,7 +3434,7 @@ namespace TestUserTypeApi.Controllers
3434 3434
         {
3435 3435
             Wjzqjs tp = await _IWjzqjsRepository.GetSingle(p=>p.id==tps.id);
3436 3436
             tp.id = tps.id;
3437
-            //tp.Szzydjsj = tps.Szzydjsj;//登记时间
3437
+            tp.Szzydjsj = tps.Szzydjsj;//登记时间
3438 3438
             tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
3439 3439
             tp.Yslxfs = tps.Yslxfs;//联系方式
3440 3440
             tp.Hzname = tps.Hzname;//患者姓名
@@ -3521,7 +3521,7 @@ namespace TestUserTypeApi.Controllers
3521 3521
         public async Task<IActionResult> GetWjzqjs(int PageIndex, int PageSize, string stardate, string endtime, string zzdwname)
3522 3522
         {
3523 3523
             //排序字段
3524
-            var sort = Builders<Wjzqjs>.Sort.Ascending("Szzydjsj");
3524
+            var sort = Builders<Wjzqjs>.Sort.Descending("Szzydjsj");
3525 3525
             //根据条件查询集合
3526 3526
             var listApp = new List<FilterDefinition<Wjzqjs>>();
3527 3527
             listApp.Add(Builders<Wjzqjs>.Filter.Eq("isdelete", 0));
@@ -3633,7 +3633,7 @@ namespace TestUserTypeApi.Controllers
3633 3633
         {
3634 3634
             Bbsqs tp = await _IBbsqsRepository.GetSingle(p => p.id == tps.id); ;
3635 3635
             tp.id = tps.id;
3636
-            //tp.Szzydjsj = tps.Szzydjsj;//登记时间
3636
+            tp.Szzydjsj = tps.Szzydjsj;//登记时间
3637 3637
             tp.Szzyzzdw = tps.Szzyzzdw;//转诊单位
3638 3638
             tp.Yslxfs = tps.Yslxfs;//联系方式
3639 3639
             tp.Hzname = tps.Hzname;//患者姓名