123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using HNWD.Pregrant.Model;
- namespace HNWD.Pregrant.BusinessLogic
- {
- public class WD_PartInfoBusinessLogic2 : BusinessLogicBase2<WD_PartInfo>
- {
- public string id = string.Empty;
- public WD_PartInfoBusinessLogic2(string id):base()
- {
- this.id = id;
- }
- public WD_PartInfoExt QueryAll()
- {
- this.wd_PartInfoDataAccess.Query();
- return this.wd_PartInfoDataAccess.ext;
- }
- public override ModelExtBase<WD_PartInfo> Query(string patientid)
- {
- this.wd_PartInfoDataAccess.Query();
- this.wd_PartInfoDataAccess.ext.messageDataList = this.wd_PartInfoDataAccess.ext.messageDataList.FindAll(f => f.ID == this.id).ToList();
- return this.wd_PartInfoDataAccess.ext;
- }
- public override ModelBase Business(string data)
- {
- base.Business(data);
- this.wd_PartInfoDataAccess.Business(this.insert_list, update_list, delete_list);
- return this.DefaultReturn();
- }
- protected override void Dispatch(string data)
- {
- if (data.Length == 0)
- {
- this.bSuccess = false;
- this.Message = "传入数据长度必须大于0";
- return;
- }
- string[] items = data.Split(new char[] { '$' });
- foreach (string item in items)
- {
- string[] subitems = item.Split(new char[] { '@' });
- WD_PartInfo wd_PartInfo = new WD_PartInfo()
- {
- ID = subitems[1],
- PART_HOSPITALNAME = subitems[2],
- PART_NAME = subitems[3],
- PART_CODE = subitems[4],
- PART_CONTENT = subitems[5],
- PART_ROOMCOUNT = subitems[6],
- PART_SLEEPTIME = subitems[7],
- PART_DAY_START = subitems[8],
- PART_DAY_BLIGHT = subitems[9],
- PART_DAY_SIPVOL = subitems[10],
- PART_DAY_RINGVOL = subitems[11],
- PART_DAY_RINGTIMES = subitems[12],
- PART_DAY_NURSINGLED = subitems[13],
- PART_DAY_DOORSIPVOL = subitems[14],
- PART_DAY_BEDSIPVOL = subitems[15],
- PART_NIGHT_START = subitems[16],
- PART_NIGHT_BLIGHT = subitems[17],
- PART_NIGHT_RINGVOL = subitems[18],
- PART_NIGHT_RINGTIMES = subitems[19],
- PART_NIGHT_NURSINGLED = subitems[20],
- PART_NIGHT_DOORSIPVOL = subitems[21],
- PART_NIGHT_BEDSIPVOL = subitems[22],
- PART_SIP_OVERTIME = subitems[23],
- PART_ERRORPIC = subitems[24],
- PART_NURSE_LEVEL0 = subitems[25],
- PART_NURSE_LEVEL1 = subitems[26],
- PART_NURSE_LEVEL2 = subitems[27],
- PART_NURSE_LEVEL3 = subitems[28],
- PART_NURSE_LEVEL4 = subitems[29],
- PART_SPECIAL_CARE = subitems[30],
- PART_PRIMARY_CARE = subitems[31],
- PART_DISPLAY_ILLNESS = subitems[32],
- PART_CODESWITCH = subitems[33],
- SIPSEV_IP = subitems[34],
- SIPSEV_MYSQLPASSWORD = subitems[35],
- SIPSEV_MYSQLUSERNAME = subitems[36],
- PART_DATETIME = subitems[37],
- };
-
-
- if (subitems[0].ToLower() == "i")
- {
- this.insert_list.Add(wd_PartInfo);
- }
- if (subitems[0].ToLower() == "u")
- {
- this.update_list.Add(wd_PartInfo);
- }
- if (subitems[0].ToLower() == "d")
- {
- this.delete_list.Add(wd_PartInfo);
- }
- }
- }
- }
- }
|