main.go 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. package main
  2. import (
  3. "encoding/xml"
  4. "net/http"
  5. _ "XT_New/routers"
  6. "XT_New/service"
  7. "github.com/astaxie/beego"
  8. )
  9. func init() {
  10. service.ConnectDB()
  11. go func() {
  12. http.ListenAndServe("localhost:6060", nil)
  13. }()
  14. }
  15. func main() {
  16. //service.NewAutoCreateWeekSchedules()
  17. //service.BeginAutoCreateWeekDisinfectionJob()
  18. //service.BeginAutoCreatePlanJob()
  19. // //service.AutoClearSchedules()
  20. //service.BeginAutoCreateStaffScheduleJob()
  21. //service.BeginAutoCreateDrugJob()
  22. //service.BeginAutoCreateStockJob()
  23. //beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 6000
  24. //beego.BConfig.WebConfig.AutoRender = false
  25. //
  26. beego.Run()
  27. }
  28. type Envelope struct {
  29. XMLName xml.Name `xml:"soap:Envelope"`
  30. Soap string `xml:"xmlns:soap,attr"`
  31. Xsi string `xml:"xmlns:xsi,attr"`
  32. Xsd string `xml:"xmlns:xsd,attr"`
  33. Body Body `xml:"soap:Body"`
  34. }
  35. type Body struct {
  36. XMLName xml.Name `xml:"soap:Body"`
  37. GetReportReq GetReportReq `xml:"GetReportList"`
  38. }
  39. type GetReportReq struct {
  40. XMLName xml.Name `xml:"http://tempuri.org/ GetReportList"`
  41. Key string `xml:"key"`
  42. BeginDateTime string `xml:"BeginDateTime"`
  43. EndDateTime string `xml:"EndDateTime"`
  44. DateType int `xml:"DateType"`
  45. PrintState int `xml:"PrintState"`
  46. }
  47. type EnvelopeTwo struct {
  48. XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
  49. Body EnvelopeBody `xml:"Body"`
  50. }
  51. type EnvelopeBody struct {
  52. GetReportListResponse GetReportListResponse `xml:"GetReportListResponse"`
  53. }
  54. type GetReportListResponse struct {
  55. XMLName xml.Name `xml:"http://tempuri.org/ GetReportListResponse"`
  56. GetReportListResult string `xml:"GetReportListResult"`
  57. }
  58. type ReportData struct {
  59. Res int `json:"Res"`
  60. Error string `json:"Error"`
  61. Data []Data `json:"Data"`
  62. }
  63. type Data struct {
  64. RecordID string `json:"RecordID"`
  65. PatientName string `json:"PatientName"`
  66. Sex string `json:"Sex"`
  67. Age int `json:"Age"`
  68. AgeUnit string `json:"AgeUnit"`
  69. OfficeName string `json:"OfficeName"`
  70. BedCode string `json:"BedCode"`
  71. Barcode string `json:"Barcode"`
  72. CustomerBarcode string `json:"CustomerBarcode"`
  73. SampleCode string `json:"SampleCode"`
  74. SampleCategory string `json:"SampleCategory"`
  75. SampleDescription string `json:"SampleDescription"`
  76. Diagnostics string `json:"Diagnostics"`
  77. TakeSampleDateTime string `json:"TakeSampleDateTime"`
  78. ReceiveDateTime string `json:"ReceiveDateTime"`
  79. AuditDateTime string `json:"AuditDateTime"`
  80. InspectDate string `json:"InspectDate"`
  81. SendDoctor string `json:"SendDoctor"`
  82. InspectDoctorName string `json:"InspectDoctorName"`
  83. AuditorName string `json:"AuditorName"`
  84. Instrument string `json:"Instrument"`
  85. Comment string `json:"Comment"`
  86. }