WD_PartInfoBusinessLogic2.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using HNWD.Pregrant.Model;
  7. namespace HNWD.Pregrant.BusinessLogic
  8. {
  9. public class WD_PartInfoBusinessLogic2 : BusinessLogicBase2<WD_PartInfo>
  10. {
  11. public string id = string.Empty;
  12. public WD_PartInfoBusinessLogic2(string id):base()
  13. {
  14. this.id = id;
  15. }
  16. public WD_PartInfoExt QueryAll()
  17. {
  18. this.wd_PartInfoDataAccess.Query();
  19. return this.wd_PartInfoDataAccess.ext;
  20. }
  21. public override ModelExtBase<WD_PartInfo> Query(string patientid)
  22. {
  23. this.wd_PartInfoDataAccess.Query();
  24. this.wd_PartInfoDataAccess.ext.messageDataList = this.wd_PartInfoDataAccess.ext.messageDataList.FindAll(f => f.ID == this.id).ToList();
  25. return this.wd_PartInfoDataAccess.ext;
  26. }
  27. public override ModelBase Business(string data)
  28. {
  29. base.Business(data);
  30. this.wd_PartInfoDataAccess.Business(this.insert_list, update_list, delete_list);
  31. return this.DefaultReturn();
  32. }
  33. protected override void Dispatch(string data)
  34. {
  35. if (data.Length == 0)
  36. {
  37. this.bSuccess = false;
  38. this.Message = "传入数据长度必须大于0";
  39. return;
  40. }
  41. string[] items = data.Split(new char[] { '$' });
  42. foreach (string item in items)
  43. {
  44. string[] subitems = item.Split(new char[] { '@' });
  45. WD_PartInfo wd_PartInfo = new WD_PartInfo()
  46. {
  47. ID = subitems[1],
  48. PART_HOSPITALNAME = subitems[2],
  49. PART_NAME = subitems[3],
  50. PART_CODE = subitems[4],
  51. PART_CONTENT = subitems[5],
  52. PART_ROOMCOUNT = subitems[6],
  53. PART_SLEEPTIME = subitems[7],
  54. PART_DAY_START = subitems[8],
  55. PART_DAY_BLIGHT = subitems[9],
  56. PART_DAY_SIPVOL = subitems[10],
  57. PART_DAY_RINGVOL = subitems[11],
  58. PART_DAY_RINGTIMES = subitems[12],
  59. PART_DAY_NURSINGLED = subitems[13],
  60. PART_DAY_DOORSIPVOL = subitems[14],
  61. PART_DAY_BEDSIPVOL = subitems[15],
  62. PART_NIGHT_START = subitems[16],
  63. PART_NIGHT_BLIGHT = subitems[17],
  64. PART_NIGHT_RINGVOL = subitems[18],
  65. PART_NIGHT_RINGTIMES = subitems[19],
  66. PART_NIGHT_NURSINGLED = subitems[20],
  67. PART_NIGHT_DOORSIPVOL = subitems[21],
  68. PART_NIGHT_BEDSIPVOL = subitems[22],
  69. PART_SIP_OVERTIME = subitems[23],
  70. PART_ERRORPIC = subitems[24],
  71. PART_NURSE_LEVEL0 = subitems[25],
  72. PART_NURSE_LEVEL1 = subitems[26],
  73. PART_NURSE_LEVEL2 = subitems[27],
  74. PART_NURSE_LEVEL3 = subitems[28],
  75. PART_NURSE_LEVEL4 = subitems[29],
  76. PART_SPECIAL_CARE = subitems[30],
  77. PART_PRIMARY_CARE = subitems[31],
  78. PART_DISPLAY_ILLNESS = subitems[32],
  79. PART_CODESWITCH = subitems[33],
  80. SIPSEV_IP = subitems[34],
  81. SIPSEV_MYSQLPASSWORD = subitems[35],
  82. SIPSEV_MYSQLUSERNAME = subitems[36],
  83. PART_DATETIME = subitems[37],
  84. };
  85. if (subitems[0].ToLower() == "i")
  86. {
  87. this.insert_list.Add(wd_PartInfo);
  88. }
  89. if (subitems[0].ToLower() == "u")
  90. {
  91. this.update_list.Add(wd_PartInfo);
  92. }
  93. if (subitems[0].ToLower() == "d")
  94. {
  95. this.delete_list.Add(wd_PartInfo);
  96. }
  97. }
  98. }
  99. }
  100. }