瀏覽代碼

Merge branch '20230223_xt_api_new_branch' of http://git.shengws.com/csx/XT_New into 20230223_xt_api_new_branch

陈少旭 2 年之前
父節點
當前提交
57b797baf5
共有 57 個文件被更改,包括 984 次插入538 次删除
  1. 二進制
      XT_New.exe
  2. 1 1
      conf/app.conf
  3. 4 4
      controllers/base_api_controller.go
  4. 0 1
      controllers/base_controller.go
  5. 58 2
      controllers/dialysis_api_controller.go
  6. 6 0
      controllers/dialysis_record_api_controller.go
  7. 0 0
      controllers/doctors_api_controller.go
  8. 1 1
      controllers/gobal_config_api_controller.go
  9. 21 21
      controllers/his_deposit_controller.go
  10. 4 1
      controllers/his_project_api_controller.go
  11. 78 80
      controllers/integration_config_api_controller.go
  12. 102 115
      controllers/manage_api_controller.go
  13. 8 4
      controllers/manager_center_api_controller.go
  14. 1 0
      controllers/mobile_api_controllers/dialysis_api_controller.go
  15. 8 0
      controllers/mobile_api_controllers/dialysis_api_controller_extend.go
  16. 34 29
      controllers/mobile_api_controllers/patient_api_controller.go
  17. 2 2
      controllers/new_mobile_api_controllers/index_evaluation_api_controller.go
  18. 43 6
      controllers/patient_api_controller.go
  19. 9 9
      controllers/pay_api_controller.go
  20. 2 2
      controllers/pc_index_evaluation_api_controller.go
  21. 1 0
      controllers/pharmacy_controller.go
  22. 2 2
      controllers/secondary_order_api_contorller.go
  23. 9 9
      controllers/supply_order_api_contorller.go
  24. 30 0
      go.mod
  25. 205 0
      go.sum
  26. 15 0
      models/dialysis.go
  27. 3 3
      models/his_deposit_models.go
  28. 2 0
      models/his_models.go
  29. 13 13
      models/pharmacy_models.go
  30. 3 3
      models/secondary_models.go
  31. 1 1
      models/supply.models.go
  32. 3 3
      service/auto_create_drug.go
  33. 1 1
      service/auto_create_stock.go
  34. 1 1
      service/auto_create_week_disinfection.go
  35. 41 2
      service/dialysis_service.go
  36. 8 8
      service/gdyb_service.go
  37. 53 53
      service/his_deposit_service.go
  38. 0 1
      service/his_hospital_service.go
  39. 7 3
      service/his_project_service.go
  40. 3 3
      service/integration_service.go
  41. 2 3
      service/login_service.go
  42. 1 1
      service/manage_center_service.go
  43. 1 1
      service/manage_service.go
  44. 1 1
      service/management_service/management_analyse_service.go
  45. 10 3
      service/patient_service.go
  46. 1 1
      service/pharmacy_service.go
  47. 1 0
      service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go
  48. 1 1
      service/role_service.go
  49. 62 62
      service/secondary_service.go
  50. 1 1
      service/sign_weigh_service.go
  51. 6 6
      service/statistics_service/index_evaluation_service.go
  52. 19 19
      service/supply_service.go
  53. 53 46
      service/verify_login_token_service.go
  54. 37 4
      service/warhouse_service.go
  55. 0 1
      src/golang.org/x/sync
  56. 1 0
      tests/default_test.go
  57. 4 4
      utils/tools.go

二進制
XT_New.exe 查看文件


+ 1 - 1
conf/app.conf 查看文件

@@ -1,6 +1,6 @@
1 1
 appname = 血透
2 2
 httpport = 9531
3
-runmode = dev
3
+runmode = prod
4 4
 #dev/prod
5 5
 
6 6
 #

+ 4 - 4
controllers/base_api_controller.go 查看文件

@@ -82,7 +82,7 @@ func (this *BaseAuthAPIController) Prepare() {
82 82
 		userAdmin.ModifyTime = 1530786071
83 83
 		var subscibe models.ServeSubscibe
84 84
 		subscibe.ID = 11
85
-		subscibe.OrgId = 10341 //机构id
85
+		subscibe.OrgId = 10394 //机构id
86 86
 		subscibe.PeriodStart = 1547447814
87 87
 		subscibe.PeriodEnd = 1550039814
88 88
 		subscibe.State = 1
@@ -92,7 +92,7 @@ func (this *BaseAuthAPIController) Prepare() {
92 92
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
93 93
 		subscibes[4] = &subscibe
94 94
 		var adminUserInfo service.AdminUserInfo
95
-		adminUserInfo.CurrentOrgId = 10341 //机构id小英9675或4
95
+		adminUserInfo.CurrentOrgId = 10394 //机构id小英9675或4
96 96
 		adminUserInfo.CurrentAppId = 3295  //4
97 97
 		adminUserInfo.AdminUser = &userAdmin
98 98
 		adminUserInfo.Subscibes = subscibes
@@ -328,7 +328,7 @@ func (this *BaseServeAPIController) Prepare() {
328 328
 		userAdmin.ModifyTime = 1530786071
329 329
 		var subscibe models.ServeSubscibe
330 330
 		subscibe.ID = 11
331
-		subscibe.OrgId = 10341 //机构id小英9675或4
331
+		subscibe.OrgId = 10394 //机构id小英9675或4
332 332
 		subscibe.PeriodStart = 1538035409
333 333
 		subscibe.PeriodEnd = 1569571409
334 334
 		subscibe.State = 1
@@ -338,7 +338,7 @@ func (this *BaseServeAPIController) Prepare() {
338 338
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
339 339
 		subscibes[4] = &subscibe
340 340
 		var adminUserInfo service.AdminUserInfo
341
-		adminUserInfo.CurrentOrgId = 10341 //机构id小英9675或4
341
+		adminUserInfo.CurrentOrgId = 10394 //机构id小英9675或4
342 342
 		adminUserInfo.CurrentAppId = 3295  //4
343 343
 		adminUserInfo.AdminUser = &userAdmin
344 344
 		adminUserInfo.Subscibes = subscibes

+ 0 - 1
controllers/base_controller.go 查看文件

@@ -37,4 +37,3 @@ func (this *BaseController) DebugLog(format string, a ...interface{}) {
37 37
 func (this *BaseController) TraceLog(format string, a ...interface{}) {
38 38
 	//beego.Trace(fmt.Sprintf(format, a...))
39 39
 }
40
-

+ 58 - 2
controllers/dialysis_api_controller.go 查看文件

@@ -111,6 +111,10 @@ func DialysisApiRegistRouters() {
111 111
 	beego.Router("/api/patient/getdialysisadvicetoday", &DialysisApiController{}, "Get:GetDialysisAdviceToday")
112 112
 
113 113
 	beego.Router("/api/schedule/getmobileschedulelist", &DialysisApiController{}, "Get:GetMobileScheduleList")
114
+
115
+	beego.Router("/api/patient/savedialysisInformationsetting", &DialysisApiController{}, "Get:SaveDialysisInformationSetting")
116
+
117
+	beego.Router("/api/patient/getdialyisinformationsetting", &DialysisApiController{}, "Get:GetDialysisInformationSetting")
114 118
 }
115 119
 
116 120
 func (c *DialysisApiController) GetQueueCall() {
@@ -584,7 +588,13 @@ func (c *DialysisApiController) PostPrescription() {
584 588
 			} else {
585 589
 				str = dialysis_dialyszers + "/" + dialysis_irrigation + " " + dialysis_strainer
586 590
 			}
587
-			service.ModifyScheduleMode(mode_id, patient, recordDate.Unix(), adminUserInfo.CurrentOrgId, str)
591
+
592
+			if adminUserInfo.CurrentOrgId == 10346 {
593
+				service.ModifyScheduleModeOne(mode_id, patient, recordDate.Unix(), adminUserInfo.CurrentOrgId, str)
594
+			} else {
595
+				service.ModifyScheduleMode(mode_id, patient, recordDate.Unix(), adminUserInfo.CurrentOrgId, str)
596
+			}
597
+
588 598
 		}
589 599
 
590 600
 		prescription.Creater = adminUserInfo.AdminUser.Id
@@ -862,7 +872,12 @@ func (c *DialysisApiController) PostSoulution() {
862 872
 			str = dialysis_dialyszers + "/" + dialysis_irrigation + " " + dialysis_strainer
863 873
 
864 874
 		}
865
-		service.ModifyScheduleMode(mode_id, patient, recordDate.Unix(), adminUserInfo.CurrentOrgId, str)
875
+		if adminUserInfo.CurrentOrgId == 10346 {
876
+			service.ModifyScheduleModeOne(mode_id, patient, recordDate.Unix(), adminUserInfo.CurrentOrgId, str)
877
+		} else {
878
+			service.ModifyScheduleMode(mode_id, patient, recordDate.Unix(), adminUserInfo.CurrentOrgId, str)
879
+		}
880
+
866 881
 	}
867 882
 
868 883
 	//template, _ := service.GetOrgInfoTemplate(adminUserInfo.CurrentOrgId)
@@ -3106,6 +3121,8 @@ func (c *DialysisApiController) CreateMonitor() {
3106 3121
 
3107 3122
 	monitor_anticoagulant, _ := c.GetInt64("monitor_anticoagulant")
3108 3123
 	monitor_anticoagulant_value := c.GetString("monitor_anticoagulant_value")
3124
+	replacement_speed, _ := c.GetFloat("replacement_speed")
3125
+	dicarbonate, _ := c.GetFloat("dicarbonate")
3109 3126
 	monitoring_date = monitoring_date / 1000
3110 3127
 	// operate_time = operate_time / 1000
3111 3128
 	if patient <= 0 {
@@ -3160,6 +3177,8 @@ func (c *DialysisApiController) CreateMonitor() {
3160 3177
 		DialysateFlow:             dialysate_flow,
3161 3178
 		MonitorAnticoagulant:      monitor_anticoagulant,
3162 3179
 		MonitorAnticoagulantValue: monitor_anticoagulant_value,
3180
+		ReplacementSpeed:          replacement_speed,
3181
+		Dicarbonate:               dicarbonate,
3163 3182
 	}
3164 3183
 
3165 3184
 	err := service.CreateMonitor(&monitorRecord)
@@ -6098,3 +6117,40 @@ func (this *DialysisApiController) GetMobileScheduleList() {
6098 6117
 	return
6099 6118
 
6100 6119
 }
6120
+
6121
+func (this *DialysisApiController) SaveDialysisInformationSetting() {
6122
+
6123
+	week_day, _ := this.GetInt64("week_day")
6124
+	orgId := this.GetAdminUserInfo().CurrentOrgId
6125
+	informaitonSetting := models.XtDialysisInformaitonSetting{
6126
+		WeekDay:   week_day,
6127
+		UserOrgId: orgId,
6128
+		Status:    1,
6129
+		Ctime:     time.Now().Unix(),
6130
+		Mtime:     0,
6131
+	}
6132
+	information, _ := service.GetInformationSettingByOrgId(orgId)
6133
+	if information.ID == 0 {
6134
+		service.CreateInformationSetting(informaitonSetting)
6135
+	}
6136
+	if information.ID > 0 {
6137
+		service.UpdateInformationSettingById(orgId, week_day)
6138
+	}
6139
+
6140
+	this.ServeSuccessJSON(map[string]interface{}{
6141
+		"informaitonSetting": informaitonSetting,
6142
+	})
6143
+	return
6144
+}
6145
+
6146
+func (this *DialysisApiController) GetDialysisInformationSetting() {
6147
+
6148
+	orgId := this.GetAdminUserInfo().CurrentOrgId
6149
+
6150
+	informationSetting, _ := service.GetDialysisInformationSetting(orgId)
6151
+
6152
+	this.ServeSuccessJSON(map[string]interface{}{
6153
+		"informaitonSetting": informationSetting,
6154
+	})
6155
+	return
6156
+}

+ 6 - 0
controllers/dialysis_record_api_controller.go 查看文件

@@ -565,6 +565,8 @@ type EditMonitorParamObject struct {
565 565
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
566 566
 	Dehydration                 float64 `gorm:"column:dehydration" json:"dehydration" form:"dehydration"`
567 567
 	FilterPressure              string  `gorm:"column:filter_pressure" json:"filter_pressure" form:"filter_pressure"`
568
+	ReplacementSpeed            float64 `gorm:"column:replacement_speed" json:"replacement_speed" form:"replacement_speed"`
569
+	Dicarbonate                 float64 `gorm:"column:dicarbonate" json:"dicarbonate" form:"dicarbonate"`
568 570
 }
569 571
 
570 572
 // /api/dislysis/monitor/edit [post]
@@ -687,6 +689,8 @@ func (this *DialysisRecordAPIController) EditMonitor() {
687 689
 			HeparinAmount:               monitorParam.HeparinAmount,
688 690
 			Dehydration:                 monitorParam.Dehydration,
689 691
 			FilterPressure:              monitorParam.FilterPressure,
692
+			ReplacementSpeed:            monitorParam.ReplacementSpeed,
693
+			Dicarbonate:                 monitorParam.Dicarbonate,
690 694
 		}
691 695
 		createErr := service.CreateMonitor(&monitor)
692 696
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
@@ -772,6 +776,8 @@ func (this *DialysisRecordAPIController) EditMonitor() {
772 776
 		monitor.HeparinAmount = monitorParam.HeparinAmount
773 777
 		monitor.Dehydration = monitorParam.Dehydration
774 778
 		monitor.FilterPressure = monitorParam.FilterPressure
779
+		monitor.ReplacementSpeed = monitorParam.ReplacementSpeed
780
+		monitor.Dicarbonate = monitorParam.Dicarbonate
775 781
 		updateErr := service.UpdateMonitor(monitor)
776 782
 		key := strconv.FormatInt(adminUserInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(scheduleDate, 10) + ":monitor_records"
777 783
 		redis := service.RedisClient()

+ 0 - 0
controllers/doctors_api_controller.go 查看文件


+ 1 - 1
controllers/gobal_config_api_controller.go 查看文件

@@ -600,7 +600,7 @@ func (c *GobalConfigApiController) GetDoctorAdviceConfig() {
600 600
 	})
601 601
 }
602 602
 
603
-//SF6090214798525
603
+// SF6090214798525
604 604
 func (c *GobalConfigApiController) Load(filename string, v interface{}) {
605 605
 	//ReadFile函数会读取文件的全部内容,并将结果以[]byte类型返回
606 606
 	data, err := ioutil.ReadFile(filename)

+ 21 - 21
controllers/his_deposit_controller.go 查看文件

@@ -59,7 +59,7 @@ func HisDepositApiRegistRouters() {
59 59
 //	return
60 60
 //}
61 61
 
62
-//获取病例中心,有效患者名称(去除了转出和死亡的)
62
+// 获取病例中心,有效患者名称(去除了转出和死亡的)
63 63
 func (this *HisDepositApiController) GetHisUserToAlive() {
64 64
 	orgid := this.GetAdminUserInfo().CurrentOrgId
65 65
 	list, err := service.GetHisUserToAlive(orgid)
@@ -73,7 +73,7 @@ func (this *HisDepositApiController) GetHisUserToAlive() {
73 73
 	return
74 74
 }
75 75
 
76
-//获取病例中心,有效患者名称
76
+// 获取病例中心,有效患者名称
77 77
 func (this *HisDepositApiController) GetHisUser() {
78 78
 	orgid := this.GetAdminUserInfo().CurrentOrgId
79 79
 	token := this.Ctx.Request.Header.Get("Cookie")
@@ -89,7 +89,7 @@ func (this *HisDepositApiController) GetHisUser() {
89 89
 	return
90 90
 }
91 91
 
92
-//新增押金
92
+// 新增押金
93 93
 func (this *HisDepositApiController) AddDeposit() {
94 94
 	orgid := this.GetAdminUserInfo().CurrentOrgId
95 95
 	dataBody := make(map[string]interface{}, 0)
@@ -162,7 +162,7 @@ func (this *HisDepositApiController) AddDeposit() {
162 162
 	return
163 163
 }
164 164
 
165
-//获取新增押金编号
165
+// 获取新增押金编号
166 166
 func (this *HisDepositApiController) GetDepositCode() {
167 167
 	orgid := this.GetAdminUserInfo().CurrentOrgId
168 168
 	var code string
@@ -179,7 +179,7 @@ func (this *HisDepositApiController) GetDepositCode() {
179 179
 	return
180 180
 }
181 181
 
182
-//获取退款编号
182
+// 获取退款编号
183 183
 func (this *HisDepositApiController) GetDeleteCode() {
184 184
 	orgid := this.GetAdminUserInfo().CurrentOrgId
185 185
 	var code string
@@ -196,7 +196,7 @@ func (this *HisDepositApiController) GetDeleteCode() {
196 196
 	return
197 197
 }
198 198
 
199
-//充值明细列表
199
+// 充值明细列表
200 200
 func (this *HisDepositApiController) RechargeDetails() {
201 201
 	orgid := this.GetAdminUserInfo().CurrentOrgId
202 202
 	timeLayout := "2006-01-02"
@@ -253,7 +253,7 @@ func (this *HisDepositApiController) RechargeDetails() {
253 253
 	return
254 254
 }
255 255
 
256
-//充值汇总列表
256
+// 充值汇总列表
257 257
 func (this *HisDepositApiController) RechargeSummary() {
258 258
 	orgid := this.GetAdminUserInfo().CurrentOrgId
259 259
 	timeLayout := "2006-01-02"
@@ -328,7 +328,7 @@ func (this *HisDepositApiController) RechargeSummary() {
328 328
 	return
329 329
 }
330 330
 
331
-//审核
331
+// 审核
332 332
 func (this *HisDepositApiController) UpDeposit() {
333 333
 	id, _ := this.GetInt64("id", 0)
334 334
 	if id == 0 {
@@ -386,7 +386,7 @@ func (this *HisDepositApiController) DeleteHistory() {
386 386
 	return
387 387
 }
388 388
 
389
-//根据id获取押金流水
389
+// 根据id获取押金流水
390 390
 func (this *HisDepositApiController) DepositFlow() {
391 391
 	orgid := this.GetAdminUserInfo().CurrentOrgId
392 392
 	check := map[string][]string{
@@ -454,7 +454,7 @@ func (this *HisDepositApiController) DepositFlow() {
454 454
 	return
455 455
 }
456 456
 
457
-//获取患者押金列表
457
+// 获取患者押金列表
458 458
 func (this *HisDepositApiController) GetUserList() {
459 459
 	orgid := this.GetAdminUserInfo().CurrentOrgId
460 460
 	keyword := this.GetString("keyword")
@@ -499,7 +499,7 @@ func (this *HisDepositApiController) GetUserList() {
499 499
 	return
500 500
 }
501 501
 
502
-//扣费明细查询
502
+// 扣费明细查询
503 503
 func (this *HisDepositApiController) DeductionDetails() {
504 504
 	orgid := this.GetAdminUserInfo().CurrentOrgId
505 505
 	timeLayout := "2006-01-02"
@@ -566,7 +566,7 @@ func (this *HisDepositApiController) DeductionDetails() {
566 566
 	return
567 567
 }
568 568
 
569
-//扣费汇总
569
+// 扣费汇总
570 570
 func (this *HisDepositApiController) DeSummary() {
571 571
 	orgid := this.GetAdminUserInfo().CurrentOrgId
572 572
 	timeLayout := "2006-01-02"
@@ -648,7 +648,7 @@ func (this *HisDepositApiController) DeSummary() {
648 648
 	return
649 649
 }
650 650
 
651
-//根据患者id查询患者的余额
651
+// 根据患者id查询患者的余额
652 652
 func (this *HisDepositApiController) IdToBalance() {
653 653
 	check := map[string][]string{
654 654
 		"his_patient_id": {"must", "int", "his_patient_id"},
@@ -667,7 +667,7 @@ func (this *HisDepositApiController) IdToBalance() {
667 667
 	return
668 668
 }
669 669
 
670
-//新增一条退款申请
670
+// 新增一条退款申请
671 671
 func (this *HisDepositApiController) RefundApplication() {
672 672
 	orgid := this.GetAdminUserInfo().CurrentOrgId
673 673
 	createid := this.GetAdminUserInfo().AdminUser.Id
@@ -734,7 +734,7 @@ func (this *HisDepositApiController) RefundApplication() {
734 734
 
735 735
 }
736 736
 
737
-//退款审核通过/拒绝
737
+// 退款审核通过/拒绝
738 738
 func (this *HisDepositApiController) RefundReview() {
739 739
 	check := map[string][]string{
740 740
 		"ids":          {"must", "string", "ids"},
@@ -770,7 +770,7 @@ func (this *HisDepositApiController) RefundReview() {
770 770
 	return
771 771
 }
772 772
 
773
-//退款删除
773
+// 退款删除
774 774
 func (this *HisDepositApiController) DeleteRefund() {
775 775
 	check := map[string][]string{
776 776
 		"id": {"must", "int", "id"},
@@ -793,7 +793,7 @@ func (this *HisDepositApiController) DeleteRefund() {
793 793
 	return
794 794
 }
795 795
 
796
-//更改退款申请
796
+// 更改退款申请
797 797
 func (this *HisDepositApiController) ChangeRefund() {
798 798
 	orgid := this.GetAdminUserInfo().CurrentOrgId
799 799
 	dataBody := make(map[string]interface{}, 0)
@@ -861,7 +861,7 @@ func (this *HisDepositApiController) ChangeRefund() {
861 861
 	return
862 862
 }
863 863
 
864
-//退款分页
864
+// 退款分页
865 865
 func (this *HisDepositApiController) RefundList() {
866 866
 	check := map[string][]string{
867 867
 		"refundtype":  {"must", "int", "refundtype"},
@@ -949,7 +949,7 @@ func (this *HisDepositApiController) GetorgName() {
949 949
 	return
950 950
 }
951 951
 
952
-//获取本月时间
952
+// 获取本月时间
953 953
 func (this *HisDepositApiController) GetMonthTime() {
954 954
 	stime, etime := service.GetMonth()
955 955
 	srart_time := fmt.Sprintf(time.Unix(stime, 0).Format("2006-01-02"))
@@ -962,7 +962,7 @@ func (this *HisDepositApiController) GetMonthTime() {
962 962
 	return
963 963
 }
964 964
 
965
-//获取本周时间
965
+// 获取本周时间
966 966
 func (this *HisDepositApiController) GetWeekTime() {
967 967
 	stime, etime := service.GetMondayOfWeek()
968 968
 	srart_time := fmt.Sprintf(time.Unix(stime, 0).Format("2006-01-02"))
@@ -975,7 +975,7 @@ func (this *HisDepositApiController) GetWeekTime() {
975 975
 	return
976 976
 }
977 977
 
978
-//判断前端参数是否为空
978
+// 判断前端参数是否为空
979 979
 func checks(this *HisDepositApiController, m *map[string][]string) (map[string]string, error) {
980 980
 	tmp := make(map[string]string)
981 981
 	for k, v := range *m {

+ 4 - 1
controllers/his_project_api_controller.go 查看文件

@@ -331,6 +331,7 @@ func (this *HisProjectApiController) SaveProjectTeam() {
331 331
 	tube_color, _ := this.GetInt64("tube_color")
332 332
 	team_type, _ := this.GetInt64("team_type")
333 333
 	remark := this.GetString("remark")
334
+	sort, _ := this.GetInt64("sort")
334 335
 	//ids := this.GetString("ids")
335 336
 	//item_id := this.GetString("item_id")
336 337
 
@@ -355,6 +356,7 @@ func (this *HisProjectApiController) SaveProjectTeam() {
355 356
 		UserOrgId:   orgId,
356 357
 		Status:      1,
357 358
 		CreatedTime: time.Now().Unix(),
359
+		Sort:        sort,
358 360
 		//ProjectId:   ids,
359 361
 		//ItemId:      item_id,
360 362
 	}
@@ -479,7 +481,7 @@ func (this *HisProjectApiController) UpdatedProjectTeam() {
479 481
 	tube_color, _ := this.GetInt64("tube_color")
480 482
 	team_type, _ := this.GetInt64("team_type")
481 483
 	remark := this.GetString("remark")
482
-
484
+	sort, _ := this.GetInt64("sort")
483 485
 	projectTeam, _ := service.GetProjectTeamDetail(id)
484 486
 
485 487
 	projectTeam.ProjectTeam = project_team
@@ -489,6 +491,7 @@ func (this *HisProjectApiController) UpdatedProjectTeam() {
489 491
 	projectTeam.TubeColor = tube_color
490 492
 	projectTeam.TeamType = team_type
491 493
 	projectTeam.Remark = remark
494
+	projectTeam.Sort = sort
492 495
 
493 496
 	dataBody := make(map[string]interface{}, 0)
494 497
 	err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)

+ 78 - 80
controllers/integration_config_api_controller.go 查看文件

@@ -31,46 +31,44 @@ func IntegrationConfigRegistRouters() {
31 31
 
32 32
 func (c *IntegrationConfigApiController) SaveInspectionSysItemId() {
33 33
 	adminUserInfo := c.GetAdminUserInfo()
34
-	org_id,_ := c.GetInt64("org_id",0)
35
-	sys_item_id,_ := c.GetInt64("sys_item_id",0)
36
-	id,_ := c.GetInt64("id",0)
37
-	if org_id != adminUserInfo.CurrentOrgId || sys_item_id<= 0 || id <= 0 {
34
+	org_id, _ := c.GetInt64("org_id", 0)
35
+	sys_item_id, _ := c.GetInt64("sys_item_id", 0)
36
+	id, _ := c.GetInt64("id", 0)
37
+	if org_id != adminUserInfo.CurrentOrgId || sys_item_id <= 0 || id <= 0 {
38 38
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
39 39
 	}
40 40
 
41 41
 	inspection_reference := &models.InspectionReference{
42
-		ID : id,
43
-		SysItemId : sys_item_id,
44
-		UpdatedTime : time.Now().Unix(),
42
+		ID:          id,
43
+		SysItemId:   sys_item_id,
44
+		UpdatedTime: time.Now().Unix(),
45 45
 	}
46 46
 	err := service.UpdateSysItemIdByID(inspection_reference)
47 47
 	if err != nil {
48 48
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
49 49
 	}
50 50
 	c.ServeSuccessJSON(map[string]interface{}{
51
-		"inspection_reference":  inspection_reference,
51
+		"inspection_reference": inspection_reference,
52 52
 	})
53 53
 	return
54 54
 }
55 55
 
56 56
 func (c *IntegrationConfigApiController) GetSysInspectionList() {
57 57
 	adminUserInfo := c.GetAdminUserInfo()
58
-	sysInspection,ownerInspection,err := service.GetSysInspectionList(adminUserInfo.CurrentOrgId)
58
+	sysInspection, ownerInspection, err := service.GetSysInspectionList(adminUserInfo.CurrentOrgId)
59 59
 	if err != nil {
60 60
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
61 61
 	}
62 62
 
63 63
 	type InspectionStruce struct {
64
-		ProjectName string  `gorm:"-" json:"project_name" form:"project_name"`
65
-		ProjectId int64 `gorm:"-" json:"project_id" form:"project_id"`
66
-		InspectionReference []*models.InspectionReference  `gorm:"-" json:"inspection_reference" form:"inspection_reference"`
64
+		ProjectName         string                        `gorm:"-" json:"project_name" form:"project_name"`
65
+		ProjectId           int64                         `gorm:"-" json:"project_id" form:"project_id"`
66
+		InspectionReference []*models.InspectionReference `gorm:"-" json:"inspection_reference" form:"inspection_reference"`
67 67
 	}
68 68
 
69 69
 	sysInspec := make(map[int64]*InspectionStruce, 0)
70 70
 	ownerInspec := make(map[int64]*InspectionStruce, 0)
71 71
 
72
-	
73
-
74 72
 	for _, item := range sysInspection {
75 73
 		result := sysInspec[item.ProjectId]
76 74
 		if result == nil {
@@ -94,7 +92,7 @@ func (c *IntegrationConfigApiController) GetSysInspectionList() {
94 92
 	}
95 93
 
96 94
 	c.ServeSuccessJSON(map[string]interface{}{
97
-		"sysInspec":  sysInspec,
95
+		"sysInspec":   sysInspec,
98 96
 		"ownerInspec": ownerInspec,
99 97
 	})
100 98
 	return
@@ -123,46 +121,46 @@ func (c *IntegrationConfigApiController) GetSyncList() {
123 121
 
124 122
 func (c *IntegrationConfigApiController) SaveInterface() {
125 123
 	adminUserInfo := c.GetAdminUserInfo()
126
-	ID,_ := c.GetInt64("id",0)
124
+	ID, _ := c.GetInt64("id", 0)
127 125
 	OrgId := adminUserInfo.CurrentOrgId
128
-	Creater := adminUserInfo.AdminUser.Id 
129
-	Pattern,_ := c.GetInt("pattern",0)		
130
-	Dbhost := c.GetString("dbhost") 
126
+	Creater := adminUserInfo.AdminUser.Id
127
+	Pattern, _ := c.GetInt("pattern", 0)
128
+	Dbhost := c.GetString("dbhost")
131 129
 	Dbuser := c.GetString("dbuser")
132
-	Dbpassword := c.GetString("dbpassword") 
130
+	Dbpassword := c.GetString("dbpassword")
133 131
 	Dbname := c.GetString("dbname")
134
-	InterfaceUrl := c.GetString("interface_url") 
132
+	InterfaceUrl := c.GetString("interface_url")
135 133
 	InterFaceToken := c.GetString("interface_token")
136 134
 	AllowIp := c.GetString("allow_ip")
137
-	AllowToken := c.GetString("allow_token")		
138
-	SyncFrequency,_ := c.GetInt("sync_frequency")
135
+	AllowToken := c.GetString("allow_token")
136
+	SyncFrequency, _ := c.GetInt("sync_frequency")
139 137
 	Status := 1
140
-	UpdatedTime :=  time.Now().Unix()
138
+	UpdatedTime := time.Now().Unix()
141 139
 	interfaceinfo := &models.MiddleInterface{
142
-		ID  		: ID,
143
-	OrgId   		: OrgId	,
144
-	Creater   		: Creater	,
145
-	Pattern 		: Pattern	,
146
-	Dbhost 			: Dbhost	,
147
-	Dbuser 			: Dbuser	,
148
-	Dbpassword 		: Dbpassword	,
149
-	Dbname 			: Dbname	,
150
-	InterfaceUrl 	: InterfaceUrl	,
151
-	InterFaceToken 	: InterFaceToken	,
152
-	AllowIp 		: AllowIp	,
153
-	AllowToken 		: AllowToken	,
154
-	SyncFrequency 	: SyncFrequency	,
155
-	Status			: Status	,
156
-	UpdatedTime     : UpdatedTime	,
140
+		ID:             ID,
141
+		OrgId:          OrgId,
142
+		Creater:        Creater,
143
+		Pattern:        Pattern,
144
+		Dbhost:         Dbhost,
145
+		Dbuser:         Dbuser,
146
+		Dbpassword:     Dbpassword,
147
+		Dbname:         Dbname,
148
+		InterfaceUrl:   InterfaceUrl,
149
+		InterFaceToken: InterFaceToken,
150
+		AllowIp:        AllowIp,
151
+		AllowToken:     AllowToken,
152
+		SyncFrequency:  SyncFrequency,
153
+		Status:         Status,
154
+		UpdatedTime:    UpdatedTime,
157 155
 	}
158 156
 	if ID <= 0 {
159
-		interfaceinfo.CreatedTime =  time.Now().Unix()
157
+		interfaceinfo.CreatedTime = time.Now().Unix()
160 158
 	}
161
-	err:= service.SaveInterface(interfaceinfo)
159
+	err := service.SaveInterface(interfaceinfo)
162 160
 
163 161
 	if err == nil {
164 162
 		c.ServeSuccessJSON(map[string]interface{}{
165
-			"interfaceinfo":  interfaceinfo,
163
+			"interfaceinfo": interfaceinfo,
166 164
 		})
167 165
 	} else {
168 166
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
@@ -174,7 +172,7 @@ func (c *IntegrationConfigApiController) GetInterface() {
174 172
 	adminUserInfo := c.GetAdminUserInfo()
175 173
 	interfaceinfo, _ := service.GetInterface(adminUserInfo.CurrentOrgId)
176 174
 	c.ServeSuccessJSON(map[string]interface{}{
177
-		"interfaceinfo":  interfaceinfo,
175
+		"interfaceinfo": interfaceinfo,
178 176
 	})
179 177
 	return
180 178
 
@@ -244,31 +242,31 @@ func (c *IntegrationConfigApiController) CreatePatientHis() {
244 242
 	}
245 243
 
246 244
 	hisPatient := &models.HisPatients{
247
-		UserOrgId:          adminUserInfo.CurrentOrgId,
248
-		UserId:             patient.UserId,
249
-		Avatar:             patient.Avatar,
250
-		PatientType:        patient.PatientType,
251
-		DialysisNo:         patient.DialysisNo,
252
-		AdmissionNumber:    patient.AdmissionNumber,
253
-		Source:             patient.Source,
254
-		Lapseto:            patient.Lapseto,
255
-		PartitionId:        patient.PartitionId,
256
-		BedId:              patient.BedId,
257
-		Name:               patient.Name,
258
-		Alias:              patient.Alias,
259
-		Gender:             patient.Gender,
260
-		Nation:             patient.Nation,
261
-		NativePlace:        patient.NativePlace,
262
-		MaritalStatus:      patient.MaritalStatus,
263
-		IdCardNo:           patient.IdCardNo,
264
-		Birthday:           patient.Birthday,
265
-		ReimbursementWayId: patient.ReimbursementWayId,
266
-		HealthCareType:     patient.HealthCareType,
267
-		HealthCareNo:       patient.HealthCareNo,
268
-		HealthCareDueDate:  patient.HealthCareDueDate,
269
-		Height:             patient.Height,
270
-		BloodType:          patient.BloodType,
271
-		Rh:                 patient.Rh,
245
+		UserOrgId:                    adminUserInfo.CurrentOrgId,
246
+		UserId:                       patient.UserId,
247
+		Avatar:                       patient.Avatar,
248
+		PatientType:                  patient.PatientType,
249
+		DialysisNo:                   patient.DialysisNo,
250
+		AdmissionNumber:              patient.AdmissionNumber,
251
+		Source:                       patient.Source,
252
+		Lapseto:                      patient.Lapseto,
253
+		PartitionId:                  patient.PartitionId,
254
+		BedId:                        patient.BedId,
255
+		Name:                         patient.Name,
256
+		Alias:                        patient.Alias,
257
+		Gender:                       patient.Gender,
258
+		Nation:                       patient.Nation,
259
+		NativePlace:                  patient.NativePlace,
260
+		MaritalStatus:                patient.MaritalStatus,
261
+		IdCardNo:                     patient.IdCardNo,
262
+		Birthday:                     patient.Birthday,
263
+		ReimbursementWayId:           patient.ReimbursementWayId,
264
+		HealthCareType:               patient.HealthCareType,
265
+		HealthCareNo:                 patient.HealthCareNo,
266
+		HealthCareDueDate:            patient.HealthCareDueDate,
267
+		Height:                       patient.Height,
268
+		BloodType:                    patient.BloodType,
269
+		Rh:                           patient.Rh,
272 270
 		HealthCareDueAlertDate:       patient.HealthCareDueAlertDate,
273 271
 		EducationLevel:               patient.EducationLevel,
274 272
 		Profession:                   patient.Profession,
@@ -310,18 +308,18 @@ func (c *IntegrationConfigApiController) CreatePatientHis() {
310 308
 		CreatedTime:                  time.Now().Unix(),
311 309
 		UpdatedTime:                  time.Now().Unix(),
312 310
 		Age:                          patient.Age,
313
-		InfectiousNextRecordTime: patient.InfectiousNextRecordTime,
314
-		IsInfectious:             patient.IsInfectious,
315
-		RemindCycle:              patient.RemindCycle,
316
-		ResponseResult:           patient.ResponseResult,
317
-		IsOpenRemind:             patient.IsOpenRemind,
318
-		DialysisAge:              patient.DialysisAge,
319
-		ExpenseKind:              patient.ExpenseKind,
320
-		TellPhone:                patient.TellPhone,
321
-		FirstTreatmentDate:       patient.FirstTreatmentDate,
322
-		ContactName:              patient.ContactName,
323
-		HisUserId:                his_user_id,
324
-		XtPatientId:              patient.ID,
311
+		InfectiousNextRecordTime:     patient.InfectiousNextRecordTime,
312
+		IsInfectious:                 patient.IsInfectious,
313
+		RemindCycle:                  patient.RemindCycle,
314
+		ResponseResult:               patient.ResponseResult,
315
+		IsOpenRemind:                 patient.IsOpenRemind,
316
+		DialysisAge:                  patient.DialysisAge,
317
+		ExpenseKind:                  patient.ExpenseKind,
318
+		TellPhone:                    patient.TellPhone,
319
+		FirstTreatmentDate:           patient.FirstTreatmentDate,
320
+		ContactName:                  patient.ContactName,
321
+		HisUserId:                    his_user_id,
322
+		XtPatientId:                  patient.ID,
325 323
 	}
326 324
 
327 325
 	err := service.CreatePatientsHis(hisPatient)

+ 102 - 115
controllers/manage_api_controller.go 查看文件

@@ -4910,19 +4910,19 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
4910 4910
 
4911 4911
 	first_start_time := dataBody["first_start_time"].(string)
4912 4912
 
4913
-	if len(first_start_time) == 0 {
4914
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4915
-		return
4913
+	var firstStartTimeUnix int64
4914
+	if len(first_start_time) > 0 {
4915
+		firstStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_start_time)
4916
+		firstStartTimeUnix = firstStartTime.Unix()
4916 4917
 	}
4917
-	firstStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_start_time)
4918 4918
 
4919
+	var firstEndTimeUnix int64
4919 4920
 	first_end_time := dataBody["first_end_time"].(string)
4920 4921
 
4921
-	if len(first_end_time) == 0 {
4922
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4923
-		return
4922
+	if len(first_end_time) > 0 {
4923
+		firstEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_end_time)
4924
+		firstEndTimeUnix = firstEndTime.Unix()
4924 4925
 	}
4925
-	firstEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_end_time)
4926 4926
 
4927 4927
 	first_total_time := dataBody["first_total_time"].(string)
4928 4928
 
@@ -4937,20 +4937,18 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
4937 4937
 	sencond_disinfection_time := dataBody["sencond_disinfection_time"].(string)
4938 4938
 
4939 4939
 	sencond_start_time := dataBody["sencond_start_time"].(string)
4940
-
4941
-	if len(sencond_start_time) == 0 {
4942
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4943
-		return
4940
+	var sencondStartTimeUnixt int64
4941
+	if len(sencond_start_time) > 0 {
4942
+		sencondStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_start_time)
4943
+		sencondStartTimeUnixt = sencondStartTime.Unix()
4944 4944
 	}
4945
-	sencondStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_start_time)
4946 4945
 
4947 4946
 	sencond_end_time := dataBody["sencond_end_time"].(string)
4948
-
4949
-	if len(sencond_end_time) == 0 {
4950
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4951
-		return
4947
+	var sencondEndTimeUnixt int64
4948
+	if len(sencond_end_time) > 0 {
4949
+		sencondEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_end_time)
4950
+		sencondEndTimeUnixt = sencondEndTime.Unix()
4952 4951
 	}
4953
-	sencondEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_end_time)
4954 4952
 
4955 4953
 	sencond_total_time := dataBody["sencond_total_time"].(string)
4956 4954
 
@@ -4965,20 +4963,18 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
4965 4963
 	third_disinfection_time := dataBody["third_disinfection_time"].(string)
4966 4964
 
4967 4965
 	third_start_time := dataBody["third_start_time"].(string)
4968
-
4969
-	if len(third_start_time) == 0 {
4970
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4971
-		return
4966
+	var thirdStartTimeUnix int64
4967
+	if len(third_start_time) > 0 {
4968
+		thirdStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_start_time)
4969
+		thirdStartTimeUnix = thirdStartTime.Unix()
4972 4970
 	}
4973
-	thirdStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_start_time)
4974 4971
 
4975 4972
 	third_end_time := dataBody["third_end_time"].(string)
4976
-
4977
-	if len(third_end_time) == 0 {
4978
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4979
-		return
4973
+	var thirdEndTimeUnix int64
4974
+	if len(third_end_time) > 0 {
4975
+		thirdEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_end_time)
4976
+		thirdEndTimeUnix = thirdEndTime.Unix()
4980 4977
 	}
4981
-	thirdEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_end_time)
4982 4978
 
4983 4979
 	third_total_time := dataBody["third_total_time"].(string)
4984 4980
 
@@ -4993,20 +4989,18 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
4993 4989
 	fourth_disinfection_time := dataBody["fourth_disinfection_time"].(string)
4994 4990
 
4995 4991
 	fourth_start_time := dataBody["fourth_start_time"].(string)
4996
-
4997
-	if len(fourth_start_time) == 0 {
4998
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4999
-		return
4992
+	var fourthiStartTimeUnitx int64
4993
+	if len(fourth_start_time) > 0 {
4994
+		fourthStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_start_time)
4995
+		fourthiStartTimeUnitx = fourthStartTime.Unix()
5000 4996
 	}
5001
-	fourthStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_start_time)
5002 4997
 
5003 4998
 	fourth_end_time := dataBody["fourth_end_time"].(string)
5004
-
5005
-	if len(fourth_end_time) == 0 {
5006
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5007
-		return
4999
+	var fourthEndTimeUnix int64
5000
+	if len(fourth_end_time) > 0 {
5001
+		fourthEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_end_time)
5002
+		fourthEndTimeUnix = fourthEndTime.Unix()
5008 5003
 	}
5009
-	fourthEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_end_time)
5010 5004
 
5011 5005
 	fourth_total_time := dataBody["fourth_total_time"].(string)
5012 5006
 
@@ -5020,20 +5014,19 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
5020 5014
 	last_disinfection_methods := dataBody["last_disinfection_methods"].(string)
5021 5015
 	last_disinfection_time := dataBody["last_disinfection_time"].(string)
5022 5016
 	last_start_time := dataBody["last_start_time"].(string)
5023
-
5024
-	if len(last_start_time) == 0 {
5025
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5026
-		return
5017
+	var lastStartTimeUnix int64
5018
+	if len(last_start_time) > 0 {
5019
+		lastStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_start_time)
5020
+		lastStartTimeUnix = lastStartTime.Unix()
5027 5021
 	}
5028
-	lastStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_start_time)
5029 5022
 
5030 5023
 	last_end_time := dataBody["last_end_time"].(string)
5031 5024
 
5032
-	if len(last_end_time) == 0 {
5033
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5034
-		return
5025
+	var lastEndTimeUnix int64
5026
+	if len(last_end_time) > 0 {
5027
+		lastEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_end_time)
5028
+		lastEndTimeUnix = lastEndTime.Unix()
5035 5029
 	}
5036
-	lastEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_end_time)
5037 5030
 
5038 5031
 	last_total_time := dataBody["last_total_time"].(string)
5039 5032
 
@@ -5051,8 +5044,8 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
5051 5044
 		FirstDisinfectionWater:     first_disinfection_water,
5052 5045
 		FirstDisinfectionMethods:   first_disinfection_methods,
5053 5046
 		FirstDisinfectionTime:      first_disinfection_time,
5054
-		FirstStartTime:             firstStartTime.Unix(),
5055
-		FirstEndTime:               firstEndTime.Unix(),
5047
+		FirstStartTime:             firstStartTimeUnix,
5048
+		FirstEndTime:               firstEndTimeUnix,
5056 5049
 		FirstTotalTime:             first_total_time,
5057 5050
 		FirstIsCheck:               first_is_check,
5058 5051
 		FirstModifications:         first_modifications,
@@ -5060,8 +5053,8 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
5060 5053
 		SencondDisinfectionWater:   sencond_disinfection_water,
5061 5054
 		SencondDisinfectionMethods: sencond_disinfection_methods,
5062 5055
 		SencondDisinfectionTime:    sencond_disinfection_time,
5063
-		SencondStartTime:           sencondStartTime.Unix(),
5064
-		SencondEndTime:             sencondEndTime.Unix(),
5056
+		SencondStartTime:           sencondStartTimeUnixt,
5057
+		SencondEndTime:             sencondEndTimeUnixt,
5065 5058
 		SencondTotalTime:           sencond_total_time,
5066 5059
 		SencondIsCheck:             sencond_is_check,
5067 5060
 		SencondModifications:       sencond_modifications,
@@ -5069,14 +5062,14 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
5069 5062
 		ThirdDisinfectionWater:     third_disinfection_water,
5070 5063
 		ThirdDisinfectionMethods:   third_disinfection_methods,
5071 5064
 		ThirdDisinfectionTime:      third_disinfection_time,
5072
-		ThirdStartTime:             thirdStartTime.Unix(),
5073
-		ThirdEndTime:               thirdEndTime.Unix(),
5065
+		ThirdStartTime:             thirdStartTimeUnix,
5066
+		ThirdEndTime:               thirdEndTimeUnix,
5074 5067
 		ThirdTotalTime:             third_total_time,
5075 5068
 		ThirdIsCheck:               third_is_check,
5076 5069
 		ThirdModifications:         third_modifications,
5077 5070
 		ThirdCreator:               third_creator,
5078
-		LastStartTime:              lastStartTime.Unix(),
5079
-		LastEndTime:                lastEndTime.Unix(),
5071
+		LastStartTime:              lastStartTimeUnix,
5072
+		LastEndTime:                lastEndTimeUnix,
5080 5073
 		LastTotalTime:              last_total_time,
5081 5074
 		LastIsCheck:                last_is_check,
5082 5075
 		LastModifications:          last_modifications,
@@ -5087,8 +5080,8 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
5087 5080
 		FourthDisinfectionWater:    fourth_disinfection_water,
5088 5081
 		FourthDisinfectionMethods:  fourth_disinfection_methods,
5089 5082
 		FourthDisinfectionTime:     fourth_disinfection_time,
5090
-		FourthStartTime:            fourthStartTime.Unix(),
5091
-		FourthEndTime:              fourthEndTime.Unix(),
5083
+		FourthStartTime:            fourthiStartTimeUnitx,
5084
+		FourthEndTime:              fourthEndTimeUnix,
5092 5085
 		FourthTotalTime:            fourth_total_time,
5093 5086
 		FourthIsCheck:              fourth_is_check,
5094 5087
 		FourthModifications:        fourth_modifications,
@@ -5169,8 +5162,9 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5169 5162
 	dataBody := make(map[string]interface{}, 0)
5170 5163
 	err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
5171 5164
 	fmt.Println("err", err)
5172
-	id := int64(dataBody["id"].(float64))
5173 5165
 	record_date := dataBody["record_date"].(string)
5166
+
5167
+	id := int64(dataBody["id"].(float64))
5174 5168
 	recorddate, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
5175 5169
 	recorddateunix := recorddate.Unix()
5176 5170
 
@@ -5180,19 +5174,19 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5180 5174
 
5181 5175
 	first_start_time := dataBody["first_start_time"].(string)
5182 5176
 
5183
-	if len(first_start_time) == 0 {
5184
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5185
-		return
5177
+	var firstStartTimeUnix int64
5178
+	if len(first_start_time) > 0 {
5179
+		firstStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_start_time)
5180
+		firstStartTimeUnix = firstStartTime.Unix()
5186 5181
 	}
5187
-	firstStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_start_time)
5188 5182
 
5183
+	var firstEndTimeUnix int64
5189 5184
 	first_end_time := dataBody["first_end_time"].(string)
5190 5185
 
5191
-	if len(first_end_time) == 0 {
5192
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5193
-		return
5186
+	if len(first_end_time) > 0 {
5187
+		firstEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_end_time)
5188
+		firstEndTimeUnix = firstEndTime.Unix()
5194 5189
 	}
5195
-	firstEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_end_time)
5196 5190
 
5197 5191
 	first_total_time := dataBody["first_total_time"].(string)
5198 5192
 
@@ -5207,20 +5201,18 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5207 5201
 	sencond_disinfection_time := dataBody["sencond_disinfection_time"].(string)
5208 5202
 
5209 5203
 	sencond_start_time := dataBody["sencond_start_time"].(string)
5210
-
5211
-	if len(sencond_start_time) == 0 {
5212
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5213
-		return
5204
+	var sencondStartTimeUnixt int64
5205
+	if len(sencond_start_time) > 0 {
5206
+		sencondStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_start_time)
5207
+		sencondStartTimeUnixt = sencondStartTime.Unix()
5214 5208
 	}
5215
-	sencondStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_start_time)
5216 5209
 
5217 5210
 	sencond_end_time := dataBody["sencond_end_time"].(string)
5218
-
5219
-	if len(sencond_end_time) == 0 {
5220
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5221
-		return
5211
+	var sencondEndTimeUnixt int64
5212
+	if len(sencond_end_time) > 0 {
5213
+		sencondEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_end_time)
5214
+		sencondEndTimeUnixt = sencondEndTime.Unix()
5222 5215
 	}
5223
-	sencondEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_end_time)
5224 5216
 
5225 5217
 	sencond_total_time := dataBody["sencond_total_time"].(string)
5226 5218
 
@@ -5235,20 +5227,18 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5235 5227
 	third_disinfection_time := dataBody["third_disinfection_time"].(string)
5236 5228
 
5237 5229
 	third_start_time := dataBody["third_start_time"].(string)
5238
-
5239
-	if len(third_start_time) == 0 {
5240
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5241
-		return
5230
+	var thirdStartTimeUnix int64
5231
+	if len(third_start_time) > 0 {
5232
+		thirdStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_start_time)
5233
+		thirdStartTimeUnix = thirdStartTime.Unix()
5242 5234
 	}
5243
-	thirdStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_start_time)
5244 5235
 
5245 5236
 	third_end_time := dataBody["third_end_time"].(string)
5246
-
5247
-	if len(third_end_time) == 0 {
5248
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5249
-		return
5237
+	var thirdEndTimeUnix int64
5238
+	if len(third_end_time) > 0 {
5239
+		thirdEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_end_time)
5240
+		thirdEndTimeUnix = thirdEndTime.Unix()
5250 5241
 	}
5251
-	thirdEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_end_time)
5252 5242
 
5253 5243
 	third_total_time := dataBody["third_total_time"].(string)
5254 5244
 
@@ -5263,20 +5253,18 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5263 5253
 	fourth_disinfection_time := dataBody["fourth_disinfection_time"].(string)
5264 5254
 
5265 5255
 	fourth_start_time := dataBody["fourth_start_time"].(string)
5266
-
5267
-	if len(fourth_start_time) == 0 {
5268
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5269
-		return
5256
+	var fourthiStartTimeUnitx int64
5257
+	if len(fourth_start_time) > 0 {
5258
+		fourthStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_start_time)
5259
+		fourthiStartTimeUnitx = fourthStartTime.Unix()
5270 5260
 	}
5271
-	fourthStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_start_time)
5272 5261
 
5273 5262
 	fourth_end_time := dataBody["fourth_end_time"].(string)
5274
-
5275
-	if len(fourth_end_time) == 0 {
5276
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5277
-		return
5263
+	var fourthEndTimeUnix int64
5264
+	if len(fourth_end_time) > 0 {
5265
+		fourthEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_end_time)
5266
+		fourthEndTimeUnix = fourthEndTime.Unix()
5278 5267
 	}
5279
-	fourthEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_end_time)
5280 5268
 
5281 5269
 	fourth_total_time := dataBody["fourth_total_time"].(string)
5282 5270
 
@@ -5290,20 +5278,19 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5290 5278
 	last_disinfection_methods := dataBody["last_disinfection_methods"].(string)
5291 5279
 	last_disinfection_time := dataBody["last_disinfection_time"].(string)
5292 5280
 	last_start_time := dataBody["last_start_time"].(string)
5293
-
5294
-	if len(last_start_time) == 0 {
5295
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5296
-		return
5281
+	var lastStartTimeUnix int64
5282
+	if len(last_start_time) > 0 {
5283
+		lastStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_start_time)
5284
+		lastStartTimeUnix = lastStartTime.Unix()
5297 5285
 	}
5298
-	lastStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_start_time)
5299 5286
 
5300 5287
 	last_end_time := dataBody["last_end_time"].(string)
5301 5288
 
5302
-	if len(last_end_time) == 0 {
5303
-		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
5304
-		return
5289
+	var lastEndTimeUnix int64
5290
+	if len(last_end_time) > 0 {
5291
+		lastEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_end_time)
5292
+		lastEndTimeUnix = lastEndTime.Unix()
5305 5293
 	}
5306
-	lastEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_end_time)
5307 5294
 
5308 5295
 	last_total_time := dataBody["last_total_time"].(string)
5309 5296
 
@@ -5322,8 +5309,8 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5322 5309
 		FirstDisinfectionWater:     first_disinfection_water,
5323 5310
 		FirstDisinfectionMethods:   first_disinfection_methods,
5324 5311
 		FirstDisinfectionTime:      first_disinfection_time,
5325
-		FirstStartTime:             firstStartTime.Unix(),
5326
-		FirstEndTime:               firstEndTime.Unix(),
5312
+		FirstStartTime:             firstStartTimeUnix,
5313
+		FirstEndTime:               firstEndTimeUnix,
5327 5314
 		FirstTotalTime:             first_total_time,
5328 5315
 		FirstIsCheck:               first_is_check,
5329 5316
 		FirstModifications:         first_modifications,
@@ -5331,8 +5318,8 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5331 5318
 		SencondDisinfectionWater:   sencond_disinfection_water,
5332 5319
 		SencondDisinfectionMethods: sencond_disinfection_methods,
5333 5320
 		SencondDisinfectionTime:    sencond_disinfection_time,
5334
-		SencondStartTime:           sencondStartTime.Unix(),
5335
-		SencondEndTime:             sencondEndTime.Unix(),
5321
+		SencondStartTime:           sencondStartTimeUnixt,
5322
+		SencondEndTime:             sencondEndTimeUnixt,
5336 5323
 		SencondTotalTime:           sencond_total_time,
5337 5324
 		SencondIsCheck:             sencond_is_check,
5338 5325
 		SencondModifications:       sencond_modifications,
@@ -5340,14 +5327,14 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5340 5327
 		ThirdDisinfectionWater:     third_disinfection_water,
5341 5328
 		ThirdDisinfectionMethods:   third_disinfection_methods,
5342 5329
 		ThirdDisinfectionTime:      third_disinfection_time,
5343
-		ThirdStartTime:             thirdStartTime.Unix(),
5344
-		ThirdEndTime:               thirdEndTime.Unix(),
5330
+		ThirdStartTime:             thirdStartTimeUnix,
5331
+		ThirdEndTime:               thirdEndTimeUnix,
5345 5332
 		ThirdTotalTime:             third_total_time,
5346 5333
 		ThirdIsCheck:               third_is_check,
5347 5334
 		ThirdModifications:         third_modifications,
5348 5335
 		ThirdCreator:               third_creator,
5349
-		LastStartTime:              lastStartTime.Unix(),
5350
-		LastEndTime:                lastEndTime.Unix(),
5336
+		LastStartTime:              lastStartTimeUnix,
5337
+		LastEndTime:                lastEndTimeUnix,
5351 5338
 		LastTotalTime:              last_total_time,
5352 5339
 		LastIsCheck:                last_is_check,
5353 5340
 		LastModifications:          last_modifications,
@@ -5358,8 +5345,8 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
5358 5345
 		FourthDisinfectionWater:    fourth_disinfection_water,
5359 5346
 		FourthDisinfectionMethods:  fourth_disinfection_methods,
5360 5347
 		FourthDisinfectionTime:     fourth_disinfection_time,
5361
-		FourthStartTime:            fourthStartTime.Unix(),
5362
-		FourthEndTime:              fourthEndTime.Unix(),
5348
+		FourthStartTime:            fourthiStartTimeUnitx,
5349
+		FourthEndTime:              fourthEndTimeUnix,
5363 5350
 		FourthTotalTime:            fourth_total_time,
5364 5351
 		FourthIsCheck:              fourth_is_check,
5365 5352
 		FourthModifications:        fourth_modifications,

+ 8 - 4
controllers/manager_center_api_controller.go 查看文件

@@ -665,7 +665,7 @@ func (c *ManagerCenterApiController) CreateDrugUnitSafeguard() {
665 665
 
666 666
 }
667 667
 
668
-//GetPatientsList 取配置信息列表
668
+// GetPatientsList 取配置信息列表
669 669
 func (c *ManagerCenterApiController) GetConfigList() {
670 670
 	adminUserInfo := c.GetAdminUserInfo()
671 671
 	configList, _ := service.GetDictionaryConfigList(adminUserInfo.CurrentOrgId)
@@ -676,7 +676,7 @@ func (c *ManagerCenterApiController) GetConfigList() {
676 676
 
677 677
 }
678 678
 
679
-//CreateConfig  创建配置信息
679
+// CreateConfig  创建配置信息
680 680
 func (c *ManagerCenterApiController) CreateConfig() {
681 681
 	adminUserInfo := c.GetAdminUserInfo()
682 682
 
@@ -917,7 +917,7 @@ func (c *ManagerCenterApiController) DeleteChildConfig() {
917 917
 	return
918 918
 }
919 919
 
920
-//CreateChildConfig  创建子配置信息
920
+// CreateChildConfig  创建子配置信息
921 921
 func (c *ManagerCenterApiController) CreateChildConfig() {
922 922
 	adminUserInfo := c.GetAdminUserInfo()
923 923
 
@@ -2126,6 +2126,8 @@ func (c *ManagerCenterApiController) CreateDiagnose() {
2126 2126
 	pinyin := c.GetString("pinyin")
2127 2127
 	wubi := c.GetString("wubi")
2128 2128
 
2129
+	sort, _ := c.GetInt64("sort")
2130
+	fmt.Println("sort-------------------", sort)
2129 2131
 	if len(class_name) <= 0 {
2130 2132
 		utils.ErrorLog("len(class_name) == 0")
2131 2133
 
@@ -2153,6 +2155,7 @@ func (c *ManagerCenterApiController) CreateDiagnose() {
2153 2155
 		Status:             1,
2154 2156
 		Pinyin:             pinyin,
2155 2157
 		Wubi:               wubi,
2158
+		Sort:               sort,
2156 2159
 	}
2157 2160
 
2158 2161
 	err, dealers := service.AddSigleDiagnose(&dealer)
@@ -2182,7 +2185,7 @@ func (c *ManagerCenterApiController) ModifyDiagnose() {
2182 2185
 	remark := c.GetString("remark")
2183 2186
 	pinyin := c.GetString("pinyin")
2184 2187
 	wubi := c.GetString("wubi")
2185
-
2188
+	sort, _ := c.GetInt64("sort")
2186 2189
 	if id <= 0 {
2187 2190
 		utils.ErrorLog("id == 0")
2188 2191
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
@@ -2215,6 +2218,7 @@ func (c *ManagerCenterApiController) ModifyDiagnose() {
2215 2218
 		Pinyin:             pinyin,
2216 2219
 		Wubi:               wubi,
2217 2220
 		Status:             1,
2221
+		Sort:               sort,
2218 2222
 	}
2219 2223
 
2220 2224
 	err := service.ModifyDiagnose(&dealer)

+ 1 - 0
controllers/mobile_api_controllers/dialysis_api_controller.go 查看文件

@@ -2902,6 +2902,7 @@ func (this *DialysisAPIController) StartDialysis() {
2902 2902
 			record.PulseFrequency = 80
2903 2903
 			record.Temperature = 36.5
2904 2904
 		}
2905
+
2905 2906
 		err := service.CreateMonitor(&record)
2906 2907
 
2907 2908
 		key := strconv.FormatInt(adminUserInfo.Org.Id, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(recordDate.Unix(), 10) + ":monitor_records"

+ 8 - 0
controllers/mobile_api_controllers/dialysis_api_controller_extend.go 查看文件

@@ -106,6 +106,8 @@ func (this *DialysisAPIController) AddMonitorRecord() {
106 106
 	blood_monitor, _ := this.GetFloat("blood_monitor")
107 107
 	dehydration, _ := this.GetFloat("dehydration")
108 108
 	filter_pressure := this.GetString("filter_pressure")
109
+	replacement_speed, _ := this.GetFloat("replacement_speed")
110
+	dicarbonate, _ := this.GetFloat("dicarbonate")
109 111
 	adminInfo := this.GetMobileAdminUserInfo()
110 112
 	patient, getPatientErr := service.MobileGetPatientById(adminInfo.Org.Id, patientID)
111 113
 	if getPatientErr != nil {
@@ -172,6 +174,8 @@ func (this *DialysisAPIController) AddMonitorRecord() {
172 174
 		HeparinAmount:               heparin_amount,
173 175
 		Dehydration:                 dehydration,
174 176
 		FilterPressure:              filter_pressure,
177
+		Dicarbonate:                 dicarbonate,
178
+		ReplacementSpeed:            replacement_speed,
175 179
 	}
176 180
 
177 181
 	err := service.CreateMonitor(&record)
@@ -286,6 +290,8 @@ func (this *DialysisAPIController) EditMonitorRecord() {
286 290
 	heparin_amount, _ := this.GetFloat("heparin_amount")
287 291
 	dehydration, _ := this.GetFloat("dehydration")
288 292
 	filter_pressure := this.GetString("filter_pressure")
293
+	replacement_speed, _ := this.GetFloat("replacement_speed")
294
+	dicarbonate, _ := this.GetFloat("dicarbonate")
289 295
 	monitor, err := service.GetMonitor(adminInfo.Org.Id, patientID, id)
290 296
 	if err != nil {
291 297
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)
@@ -345,6 +351,8 @@ func (this *DialysisAPIController) EditMonitorRecord() {
345 351
 	monitor.HeparinAmount = heparin_amount
346 352
 	monitor.Dehydration = dehydration
347 353
 	monitor.FilterPressure = filter_pressure
354
+	monitor.ReplacementSpeed = replacement_speed
355
+	monitor.Dicarbonate = dicarbonate
348 356
 	err = service.UpdateMonitor(monitor)
349 357
 	key := strconv.FormatInt(adminInfo.Org.Id, 10) + ":" + strconv.FormatInt(patientID, 10) + ":" + strconv.FormatInt(date, 10) + ":monitor_records"
350 358
 	redis := service.RedisClient()

+ 34 - 29
controllers/mobile_api_controllers/patient_api_controller.go 查看文件

@@ -694,9 +694,10 @@ func (c *PatientApiController) ExecDoctorAdvice() {
694 694
 					var total int64
695 695
 					var prescribing_number_total int64
696 696
 
697
-					//判断库存
697
+					//出库
698 698
 					for _, item := range advices {
699 699
 						if item.Way == 1 {
700
+
700 701
 							houseConfig, _ := service.GetAllStoreHouseConfig(item.UserOrgId)
701 702
 							//查询该药品的剩余库存
702 703
 							list, _ := service.GetDrugTotalCount(item.DrugId, item.UserOrgId, houseConfig.DrugStorehouseOut)
@@ -719,7 +720,7 @@ func (c *PatientApiController) ExecDoctorAdvice() {
719 720
 							}
720 721
 
721 722
 							if medical.IsUse == 1 {
722
-								service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
723
+
723 724
 								c.ServeSuccessJSON(map[string]interface{}{
724 725
 									"msg":    "1",
725 726
 									"advice": advice,
@@ -730,7 +731,13 @@ func (c *PatientApiController) ExecDoctorAdvice() {
730 731
 
731 732
 							if medical.IsUse != 1 {
732 733
 								if (list.Count*medical.MinNumber + list.StockMinNumber) == 0 {
733
-									service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
734
+									if advice.UserOrgId != 10278 {
735
+										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
736
+										advice.ExecutionTime = 0
737
+										advice.ExecutionState = 2
738
+										advice.ExecutionStaff = 0
739
+									}
740
+
734 741
 									c.ServeSuccessJSON(map[string]interface{}{
735 742
 										"msg":    "3",
736 743
 										"advice": advice,
@@ -740,7 +747,12 @@ func (c *PatientApiController) ExecDoctorAdvice() {
740 747
 
741 748
 								}
742 749
 								if prescribing_number_total > total {
743
-									service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
750
+									if advice.UserOrgId != 10278 {
751
+										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
752
+										advice.ExecutionTime = 0
753
+										advice.ExecutionState = 2
754
+										advice.ExecutionStaff = 0
755
+									}
744 756
 									c.ServeSuccessJSON(map[string]interface{}{
745 757
 										"msg":    "2",
746 758
 										"advice": advice,
@@ -749,17 +761,8 @@ func (c *PatientApiController) ExecDoctorAdvice() {
749 761
 									return
750 762
 								}
751 763
 							}
752
-
753
-						}
754
-					}
755
-
756
-					//出库
757
-					for _, item := range advices {
758
-						if item.Way == 1 {
759 764
 							//查询是否出库按钮开启
760 765
 							adviceSetting, _ := service.FindAdviceSettingById(item.UserOrgId)
761
-							//查询改药品信息
762
-							medical, _ := service.GetBaseDrugMedical(item.DrugId)
763 766
 							if adviceSetting.IsAdviceOpen == 1 {
764 767
 								//查询是否出库按钮开启
765 768
 								prescriptionConfig, _ := service.FindPrescriptionConfigById(item.UserOrgId)
@@ -861,16 +864,17 @@ func (c *PatientApiController) ExecDoctorAdvice() {
861 864
 				if len(advices) > 0 {
862 865
 					var total int64
863 866
 					var prescribing_number_total int64
864
-					for _, item := range advices {
865 867
 
868
+					for _, item := range advices {
866 869
 						if item.Way == 1 {
870
+							//查询改药品信息
871
+							medical, _ := service.GetBaseDrugMedical(item.DrugId)
872
+							pharmacyConfig, _ := service.FindPharmacyConfig(item.UserOrgId)
873
+
867 874
 							houseConfig, _ := service.GetAllStoreHouseConfig(item.UserOrgId)
868 875
 							//查询该药品的剩余库存
869 876
 							list, _ := service.GetDrugTotalCount(item.DrugId, item.UserOrgId, houseConfig.DrugStorehouseOut)
870 877
 
871
-							//查询改药品信息
872
-							medical, _ := service.GetBaseDrugMedical(item.DrugId)
873
-
874 878
 							//判断单位是否相等
875 879
 							if medical.MaxUnit == item.PrescribingNumberUnit {
876 880
 								prescribingNumber_temp := strconv.FormatFloat(math.Abs(item.PrescribingNumber), 'f', 0, 64)
@@ -889,7 +893,7 @@ func (c *PatientApiController) ExecDoctorAdvice() {
889 893
 							}
890 894
 
891 895
 							if medical.IsUse == 1 {
892
-								service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
896
+
893 897
 								c.ServeSuccessJSON(map[string]interface{}{
894 898
 									"msg":    "1",
895 899
 									"advice": advice,
@@ -899,7 +903,12 @@ func (c *PatientApiController) ExecDoctorAdvice() {
899 903
 							}
900 904
 							if medical.IsUse != 1 {
901 905
 								if (list.Count*medical.MinNumber + list.StockMinNumber) == 0 {
902
-									service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
906
+									if advice.UserOrgId != 10278 {
907
+										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
908
+										advice.ExecutionTime = 0
909
+										advice.ExecutionState = 2
910
+										advice.ExecutionStaff = 0
911
+									}
903 912
 									c.ServeSuccessJSON(map[string]interface{}{
904 913
 										"msg":    "3",
905 914
 										"advice": advice,
@@ -908,7 +917,12 @@ func (c *PatientApiController) ExecDoctorAdvice() {
908 917
 									return
909 918
 								}
910 919
 								if prescribing_number_total > total {
911
-									service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
920
+									if advice.UserOrgId != 10278 {
921
+										service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
922
+										advice.ExecutionTime = 0
923
+										advice.ExecutionState = 2
924
+										advice.ExecutionStaff = 0
925
+									}
912 926
 									c.ServeSuccessJSON(map[string]interface{}{
913 927
 										"msg":    "2",
914 928
 										"advice": advice,
@@ -917,15 +931,6 @@ func (c *PatientApiController) ExecDoctorAdvice() {
917 931
 									return
918 932
 								}
919 933
 							}
920
-
921
-						}
922
-					}
923
-
924
-					for _, item := range advices {
925
-						if item.Way == 1 {
926
-							//查询改药品信息
927
-							medical, _ := service.GetBaseDrugMedical(item.DrugId)
928
-							pharmacyConfig, _ := service.FindPharmacyConfig(item.UserOrgId)
929 934
 							if medical.IsUse == 2 {
930 935
 								if pharmacyConfig.IsOpen == 1 && medical.IsPharmacy == 0 {
931 936
 									//查询今日是否出库

+ 2 - 2
controllers/new_mobile_api_controllers/index_evaluation_api_controller.go 查看文件

@@ -22,7 +22,7 @@ func (this *IndexEvaluationApiController) GetAdminUser() {
22 22
 
23 23
 //化验指标
24 24
 
25
-//初始化数据
25
+// 初始化数据
26 26
 func (this *IndexEvaluationApiController) GetLaboratoryIndexInitData() {
27 27
 	adminUserInfo := this.GetMobileAdminUserInfo()
28 28
 	var references []*models.InspectionReference
@@ -56,7 +56,7 @@ func (this *IndexEvaluationApiController) GetLaboratoryIndexInitData() {
56 56
 
57 57
 }
58 58
 
59
-//获取取值范围
59
+// 获取取值范围
60 60
 func (this *IndexEvaluationApiController) GetLaboratoryIndexProjectRangeValueData() {
61 61
 	range_type, _ := this.GetInt64("range_type")
62 62
 	project_id, _ := this.GetInt64("project_id")

+ 43 - 6
controllers/patient_api_controller.go 查看文件

@@ -1831,10 +1831,17 @@ func (c *PatientApiController) ExecGroupAdvice() {
1831 1831
 				pharmacyConfig, _ := service.FindPharmacyConfig(advice.UserOrgId)
1832 1832
 				if medical.IsUse == 2 {
1833 1833
 					if pharmacyConfig.IsOpen == 1 && medical.IsPharmacy == 0 {
1834
-						service.DrugsDelivery(adminUserInfo.CurrentOrgId, item.ExecutionStaff, item)
1834
+						drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1835
+						if drugOutInfo.ID == 0 {
1836
+							service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
1837
+						}
1838
+
1835 1839
 					}
1836 1840
 					if pharmacyConfig.IsOpen != 1 {
1837
-						service.DrugsDelivery(adminUserInfo.CurrentOrgId, item.ExecutionStaff, item)
1841
+						drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
1842
+						if drugOutInfo.ID == 0 {
1843
+							service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
1844
+						}
1838 1845
 					}
1839 1846
 
1840 1847
 					//查询默认仓库
@@ -2029,7 +2036,12 @@ func (c *PatientApiController) ExecDoctorAdvice() {
2029 2036
 				}
2030 2037
 
2031 2038
 				if medical.IsUse != 1 {
2039
+
2032 2040
 					if (list.Count*medical.MinNumber + list.StockMinNumber) == 0 {
2041
+						service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
2042
+						advice.ExecutionState = 2
2043
+						advice.ExecutionStaff = 0
2044
+						advice.ExecutionTime = 0
2033 2045
 						c.ServeSuccessJSON(map[string]interface{}{
2034 2046
 							"msg":    "3",
2035 2047
 							"advice": advice,
@@ -2037,6 +2049,10 @@ func (c *PatientApiController) ExecDoctorAdvice() {
2037 2049
 						return
2038 2050
 					}
2039 2051
 					if prescribing_number_total > total {
2052
+						service.UpdateDoctorAdviceByExcecute(advice.ID, advice.UserOrgId)
2053
+						advice.ExecutionState = 2
2054
+						advice.ExecutionStaff = 0
2055
+						advice.ExecutionTime = 0
2040 2056
 						c.ServeSuccessJSON(map[string]interface{}{
2041 2057
 							"msg":    "2",
2042 2058
 							"advice": advice,
@@ -2069,12 +2085,20 @@ func (c *PatientApiController) ExecDoctorAdvice() {
2069 2085
 								//是通过药房发药
2070 2086
 								if pharmacyConfig.IsOpen == 1 && medical.IsPharmacy == 0 {
2071 2087
 									//执行出库
2072
-									service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
2088
+
2089
+									drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
2090
+									if drugOutInfo.ID == 0 {
2091
+										service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
2092
+									}
2073 2093
 								}
2074 2094
 								//不通过药房发药
2075 2095
 								if pharmacyConfig.IsOpen != 1 {
2076 2096
 									//执行出库
2077
-									service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
2097
+
2098
+									drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
2099
+									if drugOutInfo.ID == 0 {
2100
+										service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
2101
+									}
2078 2102
 								}
2079 2103
 
2080 2104
 								//查询默认仓库
@@ -2091,6 +2115,9 @@ func (c *PatientApiController) ExecDoctorAdvice() {
2091 2115
 								}
2092 2116
 
2093 2117
 								service.UpdateBaseDrugSumTwo(item.DrugId, sum_count, item.UserOrgId)
2118
+
2119
+								//剩余库存
2120
+								service.UpdateDrugStockCount(item.DrugId, item.UserOrgId, storeHouseConfig.DrugStorehouseOut, sum_count)
2094 2121
 								break
2095 2122
 								c.ServeSuccessJSON(map[string]interface{}{
2096 2123
 									"msg":    "1",
@@ -2120,11 +2147,19 @@ func (c *PatientApiController) ExecDoctorAdvice() {
2120 2147
 						if medical.IsUse == 2 {
2121 2148
 							//是通过药房发药
2122 2149
 							if pharmacyConfig.IsOpen == 1 && medical.IsPharmacy == 0 {
2123
-								service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
2150
+
2151
+								drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
2152
+								if drugOutInfo.ID == 0 {
2153
+									service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
2154
+								}
2124 2155
 							}
2125 2156
 							//不通过药房发药
2126 2157
 							if pharmacyConfig.IsOpen != 1 {
2127
-								service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
2158
+
2159
+								drugOutInfo, _ := service.GetAdviceIsOut(item.ID, item.UserOrgId, item.PatientId, item.AdviceDate, item.DrugId)
2160
+								if drugOutInfo.ID == 0 {
2161
+									service.DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
2162
+								}
2128 2163
 							}
2129 2164
 							//更新字典里面的库存
2130 2165
 							var sum_count int64
@@ -2136,6 +2171,8 @@ func (c *PatientApiController) ExecDoctorAdvice() {
2136 2171
 								sum_count += its.StockMaxNumber + its.StockMinNumber
2137 2172
 							}
2138 2173
 							service.UpdateBaseDrugSumTwo(item.DrugId, sum_count, item.UserOrgId)
2174
+							//剩余库存
2175
+							service.UpdateDrugStockCount(item.DrugId, item.UserOrgId, storeHouseConfig.DrugStorehouseOut, sum_count)
2139 2176
 							break
2140 2177
 							c.ServeSuccessJSON(map[string]interface{}{
2141 2178
 								"msg":    "1",

+ 9 - 9
controllers/pay_api_controller.go 查看文件

@@ -348,7 +348,7 @@ func (this *PayApiController) GetClientIp() string {
348 348
 	return ip
349 349
 }
350 350
 
351
-//截取字符串 start 起点下标 end 终点下标(不包括)
351
+// 截取字符串 start 起点下标 end 终点下标(不包括)
352 352
 func (this *PayApiController) Substr(str string, start int, end int) string {
353 353
 	rs := []rune(str)
354 354
 	length := len(rs)
@@ -362,7 +362,7 @@ func (this *PayApiController) Substr(str string, start int, end int) string {
362 362
 	return string(rs[start:end])
363 363
 }
364 364
 
365
-//设置请求参数
365
+// 设置请求参数
366 366
 func (this *PayApiController) SetParameter(key string, value string) {
367 367
 	if this.parameters == nil {
368 368
 		this.parameters = make(map[string]string)
@@ -370,7 +370,7 @@ func (this *PayApiController) SetParameter(key string, value string) {
370 370
 	this.parameters[key] = value
371 371
 }
372 372
 
373
-//设置请求参数
373
+// 设置请求参数
374 374
 func (this *PayApiController2) SetResultParameter(key string, value string) {
375 375
 	if this.resultParameters == nil {
376 376
 		this.resultParameters = make(map[string]string)
@@ -378,7 +378,7 @@ func (this *PayApiController2) SetResultParameter(key string, value string) {
378 378
 	this.resultParameters[key] = value
379 379
 }
380 380
 
381
-//设置prepay_id
381
+// 设置prepay_id
382 382
 func (this *PayApiController) SetPayUrl(payUrl string) {
383 383
 	this.payUrl = payUrl
384 384
 }
@@ -461,7 +461,7 @@ func (this *PayApiController) CreateXml() (string, error) {
461 461
 	return this.ParamsToXml(this.parameters), nil
462 462
 }
463 463
 
464
-//产生随机字符串,不长于32位
464
+// 产生随机字符串,不长于32位
465 465
 func (this *PayApiController) CreateNoncestr(length int) (nonceStr string) {
466 466
 	chars := "abcdefghijklmnopqrstuvwxyz0123456789"
467 467
 	for i := 0; i < length; i++ {
@@ -479,7 +479,7 @@ func (this *PayApiController) Error(strMsg string, err error) error {
479 479
 	}
480 480
 }
481 481
 
482
-//格式化参数,签名过程需要使用
482
+// 格式化参数,签名过程需要使用
483 483
 func (this *PayApiController) FormatParams(paramsMap map[string]string) string {
484 484
 	//STEP 1, 对key进行升序排序.
485 485
 	var sorted_keys []string
@@ -499,7 +499,7 @@ func (this *PayApiController) FormatParams(paramsMap map[string]string) string {
499 499
 	return strings.Join(paramsStr, "&")
500 500
 }
501 501
 
502
-//生成签名
502
+// 生成签名
503 503
 func (this *PayApiController) GetSign(paramsMap map[string]string, wxKey string) string {
504 504
 	//STEP 1:按字典序排序参数
505 505
 	paramsStr := this.FormatParams(paramsMap)
@@ -512,7 +512,7 @@ func (this *PayApiController) GetSign(paramsMap map[string]string, wxKey string)
512 512
 	return strings.ToUpper(hex.EncodeToString(sign.Sum(nil)))
513 513
 }
514 514
 
515
-//xml结构
515
+// xml结构
516 516
 func (this *PayApiController) ParamsToXml(data map[string]string) string {
517 517
 	fmt.Println(data)
518 518
 	buf := bytes.NewBufferString("<xml>")
@@ -528,7 +528,7 @@ func (this *PayApiController) ParamsToXml(data map[string]string) string {
528 528
 	return buf.String()
529 529
 }
530 530
 
531
-//xml结构
531
+// xml结构
532 532
 func (this *PayApiController2) ParamsToXml2(data map[string]string) string {
533 533
 	fmt.Println(data)
534 534
 	buf := bytes.NewBufferString("<xml>")

+ 2 - 2
controllers/pc_index_evaluation_api_controller.go 查看文件

@@ -49,7 +49,7 @@ type PCIndexEvaluationApiController struct {
49 49
 
50 50
 //化验指标
51 51
 
52
-//初始化数据
52
+// 初始化数据
53 53
 func (this *PCIndexEvaluationApiController) GetLaboratoryIndexInitData() {
54 54
 	adminUserInfo := this.GetAdminUserInfo()
55 55
 
@@ -71,7 +71,7 @@ func (this *PCIndexEvaluationApiController) GetLaboratoryIndexInitData() {
71 71
 	})
72 72
 }
73 73
 
74
-//获取取值范围
74
+// 获取取值范围
75 75
 func (this *PCIndexEvaluationApiController) GetLaboratoryIndexProjectRangeValueData() {
76 76
 	range_type, _ := this.GetInt64("range_type")
77 77
 	project_id, _ := this.GetInt64("project_id")

+ 1 - 0
controllers/pharmacy_controller.go 查看文件

@@ -438,6 +438,7 @@ func (this *PharmacyController) DispensingMedicine() {
438 438
 
439 439
 // 退药按钮点击
440 440
 func (this *PharmacyController) DrugWithdrawal() {
441
+	fmt.Println("寄哪里2333333333333333333333333333333")
441 442
 	var err error
442 443
 	defer func() {
443 444
 		if rec := recover(); rec != nil {

+ 2 - 2
controllers/secondary_order_api_contorller.go 查看文件

@@ -1321,12 +1321,12 @@ func (this *SecondaryOrderApiController) CheckSecondOrer() {
1321 1321
 					}
1322 1322
 					//查询该调拨单是否有生成入库单
1323 1323
 					_, errcodess := service.GetWarehouseBySecondWarehouseId(12, item.WarehouseId, orgId, record_date)
1324
-					fmt.Println("ERRCODESSS-------------------", errcodess)
1324
+
1325 1325
 					if errcodess == gorm.ErrRecordNotFound {
1326 1326
 						service.AddSigleWarehouse(&warehousing)
1327 1327
 					}
1328 1328
 					infoObj, _ := service.GetLastWarehouseById(12, item.WarehouseId, orgId, record_date)
1329
-					fmt.Println("INFOR----------------------", infoObj.ID)
1329
+
1330 1330
 					warehouseInfo := &models.WarehousingInfo{
1331 1331
 						WarehousingOrder:      infoObj.WarehousingOrder,
1332 1332
 						WarehousingId:         infoObj.ID,

+ 9 - 9
controllers/supply_order_api_contorller.go 查看文件

@@ -108,7 +108,7 @@ func SupplyOrderApiRegistRouters() {
108 108
 	beego.Router("/api/supply/getgoodorderdetaillist", &SupplyOrderApiController{}, "Get:GetGoodOrderDetailList")
109 109
 }
110 110
 
111
-//判断前端参数是否为空
111
+// 判断前端参数是否为空
112 112
 func CheckParams(this *SupplyOrderApiController, m *map[string][]string) (map[string]string, error) {
113 113
 	tmp := make(map[string]string)
114 114
 	for k, v := range *m {
@@ -121,7 +121,7 @@ func CheckParams(this *SupplyOrderApiController, m *map[string][]string) (map[st
121 121
 	return tmp, nil
122 122
 }
123 123
 
124
-//获取供应商列表GetSupplyList
124
+// 获取供应商列表GetSupplyList
125 125
 func (this *SupplyOrderApiController) GetSupplyList() {
126 126
 	var err error
127 127
 	defer func() {
@@ -224,7 +224,7 @@ func (this *SupplyOrderApiController) GetSupplyList() {
224 224
 	}
225 225
 }
226 226
 
227
-//保存供应商及联系人(用于更改)
227
+// 保存供应商及联系人(用于更改)
228 228
 func (this *SupplyOrderApiController) UpdateSupply() {
229 229
 	orgId := this.GetAdminUserInfo().CurrentOrgId
230 230
 	dataBody := make(map[string]interface{}, 0)
@@ -371,7 +371,7 @@ func (this *SupplyOrderApiController) UpdateSupply() {
371 371
 	return
372 372
 }
373 373
 
374
-//获取单条供应商和涉及到的联系人记录
374
+// 获取单条供应商和涉及到的联系人记录
375 375
 func (this *SupplyOrderApiController) GetSupplyAndContactOne() {
376 376
 	orgId := this.GetAdminUserInfo().CurrentOrgId
377 377
 	id, _ := this.GetInt64("id")
@@ -441,7 +441,7 @@ func (this *SupplyOrderApiController) GetSupplyAndContactOne() {
441 441
 	return
442 442
 }
443 443
 
444
-//获取供应商类别
444
+// 获取供应商类别
445 445
 func (this *SupplyOrderApiController) GetSupplyType() {
446 446
 	orgId := this.GetAdminUserInfo().CurrentOrgId
447 447
 	costClassify := "供应商类别"
@@ -453,7 +453,7 @@ func (this *SupplyOrderApiController) GetSupplyType() {
453 453
 	return
454 454
 }
455 455
 
456
-//删除供应商及联系人
456
+// 删除供应商及联系人
457 457
 func (this *SupplyOrderApiController) DelSupply() {
458 458
 	orgId := this.GetAdminUserInfo().CurrentOrgId
459 459
 	//拿到供应商的id
@@ -478,7 +478,7 @@ func (this *SupplyOrderApiController) DelSupply() {
478 478
 	return
479 479
 }
480 480
 
481
-//删除单条联系人记录
481
+// 删除单条联系人记录
482 482
 func (this *SupplyOrderApiController) DelContactOne() {
483 483
 	id, _ := this.GetInt64("id")
484 484
 	if id == 0 {
@@ -499,7 +499,7 @@ func (this *SupplyOrderApiController) DelContactOne() {
499 499
 	return
500 500
 }
501 501
 
502
-//获取供应商编码
502
+// 获取供应商编码
503 503
 func (this *SupplyOrderApiController) GetSupplyCode() {
504 504
 	orgId := this.GetAdminUserInfo().CurrentOrgId
505 505
 	supply, err := service.GetSuppliyCode(orgId)
@@ -531,7 +531,7 @@ func (this *SupplyOrderApiController) GetSupplyCode() {
531 531
 	return
532 532
 }
533 533
 
534
-//保存供应商(用于新增)
534
+// 保存供应商(用于新增)
535 535
 func (this *SupplyOrderApiController) SaveSupply() {
536 536
 	orgId := this.GetAdminUserInfo().CurrentOrgId
537 537
 	dataBody := make(map[string]interface{}, 0)

+ 30 - 0
go.mod 查看文件

@@ -0,0 +1,30 @@
1
+module XT_New
2
+
3
+go 1.19
4
+
5
+require (
6
+	github.com/astaxie/beego v1.12.3 // indirect
7
+	github.com/beorn7/perks v1.0.1 // indirect
8
+	github.com/cespare/xxhash/v2 v2.1.1 // indirect
9
+	github.com/go-redis/redis v6.15.9+incompatible // indirect
10
+	github.com/go-sql-driver/mysql v1.7.0 // indirect
11
+	github.com/golang/protobuf v1.4.2 // indirect
12
+	github.com/hashicorp/golang-lru v0.5.4 // indirect
13
+	github.com/jinzhu/gorm v1.9.16 // indirect
14
+	github.com/jinzhu/inflection v1.0.0 // indirect
15
+	github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
16
+	github.com/prometheus/client_golang v1.7.0 // indirect
17
+	github.com/prometheus/client_model v0.2.0 // indirect
18
+	github.com/prometheus/common v0.10.0 // indirect
19
+	github.com/prometheus/procfs v0.1.3 // indirect
20
+	github.com/robfig/cron v1.2.0 // indirect
21
+	github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
22
+	github.com/shopspring/decimal v1.3.1 // indirect
23
+	golang.org/x/crypto v0.7.0 // indirect
24
+	golang.org/x/net v0.8.0 // indirect
25
+	golang.org/x/sync v0.1.0 // indirect
26
+	golang.org/x/sys v0.6.0 // indirect
27
+	golang.org/x/text v0.8.0 // indirect
28
+	google.golang.org/protobuf v1.23.0 // indirect
29
+	gopkg.in/yaml.v2 v2.2.8 // indirect
30
+)

+ 205 - 0
go.sum 查看文件

@@ -0,0 +1,205 @@
1
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
2
+github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
3
+github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
4
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
5
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
6
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
7
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
8
+github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc=
9
+github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk=
10
+github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
11
+github.com/astaxie/beego v1.12.3 h1:SAQkdD2ePye+v8Gn1r4X6IKZM1wd28EyUOVQ3PDSOOQ=
12
+github.com/astaxie/beego v1.12.3/go.mod h1:p3qIm0Ryx7zeBHLljmd7omloyca1s4yu1a8kM1FkpIA=
13
+github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ=
14
+github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU=
15
+github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
16
+github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
17
+github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
18
+github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
19
+github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
20
+github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE=
21
+github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
22
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
23
+github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
24
+github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U=
25
+github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c=
26
+github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs=
27
+github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
28
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
29
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
30
+github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
31
+github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
32
+github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI=
33
+github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
34
+github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
35
+github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
36
+github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw=
37
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
38
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
39
+github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
40
+github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
41
+github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
42
+github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
43
+github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
44
+github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
45
+github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
46
+github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
47
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
48
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
49
+github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
50
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
51
+github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
52
+github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
53
+github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
54
+github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
55
+github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
56
+github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
57
+github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
58
+github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0=
59
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
60
+github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
61
+github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
62
+github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
63
+github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
64
+github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
65
+github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
66
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
67
+github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
68
+github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
69
+github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
70
+github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o=
71
+github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs=
72
+github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
73
+github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
74
+github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
75
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
76
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
77
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
78
+github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
79
+github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
80
+github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
81
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
82
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
83
+github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ=
84
+github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
85
+github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
86
+github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
87
+github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
88
+github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
89
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
90
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
91
+github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
92
+github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
93
+github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
94
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
95
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
96
+github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
97
+github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
98
+github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
99
+github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
100
+github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
101
+github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
102
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
103
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
104
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
105
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
106
+github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
107
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
108
+github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U=
109
+github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
110
+github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
111
+github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
112
+github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
113
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
114
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
115
+github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc=
116
+github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
117
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
118
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
119
+github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8=
120
+github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
121
+github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
122
+github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
123
+github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo=
124
+github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
125
+github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
126
+github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
127
+github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
128
+github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s=
129
+github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA=
130
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
131
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
132
+github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE=
133
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
134
+github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
135
+github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
136
+github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
137
+github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
138
+github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
139
+github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
140
+github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
141
+github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
142
+github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
143
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
144
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
145
+golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
146
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8=
147
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
148
+golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
149
+golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
150
+golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
151
+golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
152
+golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
153
+golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
154
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
155
+golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
156
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
157
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
158
+golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
159
+golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
160
+golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
161
+golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
162
+golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
163
+golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
164
+golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
165
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
166
+golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
167
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
168
+golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
169
+golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
170
+golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
171
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
172
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
173
+golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
174
+golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
175
+golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
176
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
177
+golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80=
178
+golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
179
+golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
180
+golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
181
+golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
182
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
183
+golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
184
+golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
185
+golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
186
+google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
187
+google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
188
+google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
189
+google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
190
+google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
191
+google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
192
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
193
+gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
194
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
195
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
196
+gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
197
+gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
198
+gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
199
+gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
200
+gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
201
+gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
202
+gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
203
+gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
204
+gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
205
+gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

+ 15 - 0
models/dialysis.go 查看文件

@@ -763,6 +763,8 @@ type MonitoringRecord struct {
763 763
 	HeparinAmount               float64 `gorm:"column:heparin_amount" json:"heparin_amount" form:"heparin_amount"`
764 764
 	Dehydration                 float64 `gorm:"column:dehydration" json:"dehydration" form:"dehydration"`
765 765
 	FilterPressure              string  `gorm:"column:filter_pressure" json:"filter_pressure" form:"filter_pressure"`
766
+	ReplacementSpeed            float64 `gorm:"column:replacement_speed" json:"replacement_speed" form:"replacement_speed"`
767
+	Dicarbonate                 float64 `gorm:"column:dicarbonate" json:"dicarbonate" form:"dicarbonate"`
766 768
 }
767 769
 
768 770
 func (MonitoringRecord) TableName() string {
@@ -1472,3 +1474,16 @@ type NewAssessmentAfterDislysis struct {
1472 1474
 func (NewAssessmentAfterDislysis) TableName() string {
1473 1475
 	return "xt_assessment_after_dislysis"
1474 1476
 }
1477
+
1478
+type XtDialysisInformaitonSetting struct {
1479
+	ID        int64 `gorm:"column:id" json:"id" form:"id"`
1480
+	WeekDay   int64 `gorm:"column:week_day" json:"week_day" form:"week_day"`
1481
+	UserOrgId int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
1482
+	Status    int64 `gorm:"column:status" json:"status" form:"status"`
1483
+	Ctime     int64 `gorm:"column:ctime" json:"ctime" form:"ctime"`
1484
+	Mtime     int64 `gorm:"column:mtime" json:"mtime" form:"mtime"`
1485
+}
1486
+
1487
+func (XtDialysisInformaitonSetting) TableName() string {
1488
+	return "xt_dialysis_informaiton_setting"
1489
+}

+ 3 - 3
models/his_deposit_models.go 查看文件

@@ -129,7 +129,7 @@ func (Deposit1) TableName() string {
129 129
 	return "sgj_xt.his_deposit"
130 130
 }
131 131
 
132
-//扣费明细列表
132
+// 扣费明细列表
133 133
 type Details struct {
134 134
 	ID         int64           `json:"id"`          //原始code
135 135
 	Code       string          `json:"code"`        //就诊号
@@ -143,7 +143,7 @@ type Details struct {
143 143
 	ButtonShow int64           `json:"button_show"` //查看详情按钮是否显示,0隐藏,1显示
144 144
 }
145 145
 
146
-//扣费汇总
146
+// 扣费汇总
147 147
 type DeductionSummary struct {
148 148
 	Name    string          `json:"name"`    //患者名字
149 149
 	Total   decimal.Decimal `json:"total"`   //医疗费总额
@@ -159,7 +159,7 @@ func (GetorgName) TableName() string {
159 159
 	return "sgj_users.sgj_user_org"
160 160
 }
161 161
 
162
-//获取就诊号
162
+// 获取就诊号
163 163
 type GetMdtrtId struct {
164 164
 	Id      int64  `json:"id"`
165 165
 	MdtrtId string `json:"mdtrt_id"`

+ 2 - 0
models/his_models.go 查看文件

@@ -65,6 +65,7 @@ type XtHisProjectTeam struct {
65 65
 	ProjectId   string              `gorm:"column:project_id" json:"project_id" form:"project_id"`
66 66
 	ItemId      string              `gorm:"column:item_id" json:"item_id" form:"item_id"`
67 67
 	List        []*XtHisProjectList `gorm:"-" json:"list" form:"list"`
68
+	Sort        int64               `gorm:"column:sort" json:"sort" form:"sort"`
68 69
 }
69 70
 
70 71
 func (XtHisProjectTeam) TableName() string {
@@ -1403,6 +1404,7 @@ type HisXtDiagnoseConfig struct {
1403 1404
 	Status             int64  `gorm:"column:status" json:"status" form:"status"`
1404 1405
 	Ctime              int64  `gorm:"column:ctime" json:"ctime" form:"ctime"`
1405 1406
 	Mtime              int64  `gorm:"column:mtime" json:"mtime" form:"mtime"`
1407
+	Sort               int64  `gorm:"column:sort" json:"sort" form:"sort"`
1406 1408
 }
1407 1409
 
1408 1410
 func (HisXtDiagnoseConfig) TableName() string {

+ 13 - 13
models/pharmacy_models.go 查看文件

@@ -1,6 +1,6 @@
1 1
 package models
2 2
 
3
-//药房表
3
+// 药房表
4 4
 type Pharmary struct {
5 5
 	ID         int64 `gorm:"column:id" json:"id" form:"id"`
6 6
 	UserOrgId  int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
@@ -26,7 +26,7 @@ func (XtErrs) TableName() string {
26 26
 	return "sgj_xt.xt_errs"
27 27
 }
28 28
 
29
-//病人
29
+// 病人
30 30
 type TmpPatient struct {
31 31
 	PatientID  int64
32 32
 	Name       string
@@ -44,7 +44,7 @@ func (TmpPatientOne) TableName() string {
44 44
 	return "xt_patients"
45 45
 }
46 46
 
47
-//药品信息
47
+// 药品信息
48 48
 type PharmacyContent struct {
49 49
 	Name         string //名称
50 50
 	SingleDosage string //单次用量
@@ -57,7 +57,7 @@ type PharmacyContent struct {
57 57
 	Remarks      string //备注
58 58
 }
59 59
 
60
-//发药明细列表
60
+// 发药明细列表
61 61
 type DispensingList struct {
62 62
 	PatientID  int64  //	患者id
63 63
 	Name       string //患者姓名
@@ -72,7 +72,7 @@ type PrescripDetailsList struct {
72 72
 	Pres []*PrescripDetails
73 73
 }
74 74
 
75
-//处方详情
75
+// 处方详情
76 76
 type PrescripDetails struct {
77 77
 	Drugname     string //药品名称
78 78
 	SingleDosage string //单次用量
@@ -84,7 +84,7 @@ type PrescripDetails struct {
84 84
 	Remarks      string //备注
85 85
 }
86 86
 
87
-//临时医嘱
87
+// 临时医嘱
88 88
 type StatOrder struct {
89 89
 	StartTime             string //开始时间
90 90
 	Name                  string //医嘱名称
@@ -95,7 +95,7 @@ type StatOrder struct {
95 95
 	ExecutionFrequency    string //执行频率
96 96
 }
97 97
 
98
-//退库用的结构体
98
+// 退库用的结构体
99 99
 type SpecialForStock struct {
100 100
 	BatchNumber       string      `json:"batch_number"`
101 101
 	BatchNumberId     int64       `json:"batch_number_id"`
@@ -118,7 +118,7 @@ type SpecialForStock struct {
118 118
 	ReturnCount       string      `json:"return_count"`
119 119
 }
120 120
 
121
-//药品发药药品列表
121
+// 药品发药药品列表
122 122
 type ListOfDrugs struct {
123 123
 	ID             int64  `json:"id"`             //药品id
124 124
 	Name           string `json:"name"`           //药品 名称
@@ -126,7 +126,7 @@ type ListOfDrugs struct {
126 126
 	Stock          string `json:"stock"`          //库存(当前的仓库库存)
127 127
 }
128 128
 
129
-//病人信息
129
+// 病人信息
130 130
 type PatientInformation struct {
131 131
 	Id           string `json:"id"`            //hid表示his_doctor_advice_info的id ,xid表示xt_doctor_advice的id
132 132
 	PatientId    int64  `json:"patient_id"`    //患者id
@@ -274,19 +274,19 @@ type TmpAdviceDoctor struct {
274 274
 	AdviceDoctor int64
275 275
 }
276 276
 
277
-//替换药品名称
277
+// 替换药品名称
278 278
 type ReplacementDrugs struct {
279 279
 	Id   int64  `json:"id"`
280 280
 	Name string `json:"name"`
281 281
 }
282 282
 
283
-//病人
283
+// 病人
284 284
 type DialysisPatient struct {
285 285
 	ID   int64  `json:"id"`
286 286
 	Name string `json:"name"`
287 287
 }
288 288
 
289
-//项目下拉列表
289
+// 项目下拉列表
290 290
 type DropDownList struct {
291 291
 	Id   string `json:"id"`
292 292
 	Name string `json:"name"`
@@ -497,7 +497,7 @@ func (BaseDrugLibL) TableName() string {
497 497
 	return "xt_base_drug"
498 498
 }
499 499
 
500
-//组
500
+// 
501 501
 type HisPrescriptionInfoTemplateL struct {
502 502
 	ID                             int64                              `gorm:"column:id" json:"id" form:"id"`
503 503
 	UserOrgId                      int64                              `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`

+ 3 - 3
models/secondary_models.go 查看文件

@@ -1,6 +1,6 @@
1 1
 package models
2 2
 
3
-//仓库配置
3
+// 仓库配置
4 4
 type StorehouseConfig struct {
5 5
 	ID                 int64 `gorm:"column:id" json:"id" form:"id"`
6 6
 	UserOrgId          int64 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`                         //机构id
@@ -37,7 +37,7 @@ func (UserOrg) TableName() string {
37 37
 	return "sgj_users.sgj_user_org"
38 38
 }
39 39
 
40
-//分页
40
+// 分页
41 41
 type Storehouselist struct {
42 42
 	ID                  int64  `gorm:"column:id" json:"id" form:"id"`
43 43
 	StorehouseCode      string `gorm:"column:storehouse_code" json:"storehouse_code" form:"storehouse_code"`                 //仓库编号
@@ -119,7 +119,7 @@ func (XtStorehouseConfig) TableName() string {
119 119
 	return "xt_storehouse_config"
120 120
 }
121 121
 
122
-//二级仓库
122
+// 二级仓库
123 123
 type Storehouse struct {
124 124
 	ID                int64  `gorm:"column:id" json:"id" form:"id"`
125 125
 	StorehouseCode    string `gorm:"column:storehouse_code" json:"storehouse_code" form:"storehouse_code"`             //仓库编号

+ 1 - 1
models/supply.models.go 查看文件

@@ -1,6 +1,6 @@
1 1
 package models
2 2
 
3
-//供应商联系人
3
+// 供应商联系人
4 4
 type SpSupplierContacts struct {
5 5
 	ID           int64  `gorm:"column:id" json:"id" form:"id"`
6 6
 	Name         string `gorm:"column:name" json:"name" form:"name"`

+ 3 - 3
service/auto_create_drug.go 查看文件

@@ -70,7 +70,7 @@ func AutoCreateDrugJob() {
70 70
 
71 71
 }
72 72
 
73
-//查询当天有排班的所有机构
73
+// 查询当天有排班的所有机构
74 74
 func GetAllOrgName(time int64) (schedule []*models.XtSchedule, err error) {
75 75
 
76 76
 	err = XTReadDB().Raw("select user_org_id,id,partition_id,bed_id,patient_id,schedule_date,schedule_type,schedule_week,mode_id from xt_schedule where schedule_date = ?  group by user_org_id", time).Scan(&schedule).Error
@@ -78,14 +78,14 @@ func GetAllOrgName(time int64) (schedule []*models.XtSchedule, err error) {
78 78
 	return schedule, err
79 79
 }
80 80
 
81
-//根据机构ID查询药品信息
81
+// 根据机构ID查询药品信息
82 82
 func FindAllDrugList(orgid int64) (lib []*models.BaseDrugLib, err error) {
83 83
 
84 84
 	err = XTReadDB().Where("org_id = ? and status = 1", orgid).Find(&lib).Error
85 85
 	return lib, err
86 86
 }
87 87
 
88
-//根据药品ID统计该药品的库存
88
+// 根据药品ID统计该药品的库存
89 89
 func FindAllDrugTotalCount(drug_id int64) (info []*models.DrugWarehouseInfoSix, err error) {
90 90
 
91 91
 	db := XTReadDB().Table("xt_drug_warehouse_info as x").Where("x.status = 1")

+ 1 - 1
service/auto_create_stock.go 查看文件

@@ -79,7 +79,7 @@ func AutoCreateStockJob() {
79 79
 	}
80 80
 }
81 81
 
82
-//查询所有的耗材信息
82
+// 查询所有的耗材信息
83 83
 func FindAlLGoodInformation(orgid int64) (info []*models.GoodInfo, err error) {
84 84
 
85 85
 	err = XTReadDB().Where("org_id = ? and status = 1", orgid).Find(&info).Error

+ 1 - 1
service/auto_create_week_disinfection.go 查看文件

@@ -31,7 +31,7 @@ func BeginAutoCreateWeekDisinfectionJob() {
31 31
 }
32 32
 
33 33
 func AutoCreateWeekDisinfectionJob() {
34
-	fmt.Println("开始执行-----------------------------------------------")
34
+
35 35
 	timeStr := time.Now().Format("2006-01-02")
36 36
 	timeLayout := "2006-01-02 15:04:05"
37 37
 	fmt.Println("timeStr:", timeStr)

+ 41 - 2
service/dialysis_service.go 查看文件

@@ -1111,7 +1111,17 @@ func BatchCheckOldDoctorAdvice(m *models.DoctorAdvice, ids []string, org_id int6
1111 1111
 
1112 1112
 func ModifyScheduleMode(mode_id int64, patient_id int64, recordDate int64, org_id int64, dialysis_machine_name string) {
1113 1113
 	ut := writeDb.Begin()
1114
-	err = writeDb.Model(&models.Schedule{}).Where("status = 1   AND user_org_id = ? AND patient_id = ? AND schedule_date >= ?", org_id, patient_id, recordDate).Updates(map[string]interface{}{"updated_time": time.Now().Unix(), "mode_id": mode_id, "dialysis_machine_name": dialysis_machine_name}).Error
1114
+	err = writeDb.Model(&models.Schedule{}).Where("status = 1   AND user_org_id = ? AND patient_id = ? AND schedule_date = ?", org_id, patient_id, recordDate).Updates(map[string]interface{}{"updated_time": time.Now().Unix(), "mode_id": mode_id, "dialysis_machine_name": dialysis_machine_name}).Error
1115
+	if err != nil {
1116
+		ut.Rollback()
1117
+		return
1118
+	}
1119
+	ut.Commit()
1120
+}
1121
+
1122
+func ModifyScheduleModeOne(mode_id int64, patient_id int64, recordDate int64, org_id int64, dialysis_machine_name string) {
1123
+	ut := writeDb.Begin()
1124
+	err = writeDb.Model(&models.Schedule{}).Where("status = 1   AND user_org_id = ? AND patient_id = ? AND schedule_date >= ? mode_id= ?", org_id, patient_id, recordDate, mode_id).Updates(map[string]interface{}{"updated_time": time.Now().Unix(), "dialysis_machine_name": dialysis_machine_name}).Error
1115 1125
 	if err != nil {
1116 1126
 		ut.Rollback()
1117 1127
 		return
@@ -2093,6 +2103,35 @@ func UpdateLastMonitorRecordToday(accumulated_blood_volume float64, id int64) er
2093 2103
 
2094 2104
 func UpdateDoctorAdviceByExcecute(id int64, user_org_id int64) error {
2095 2105
 
2096
-	err := XTWriteDB().Model(models.DoctorAdvice{}).Where("id = ? and user_org_id = ? and status =1").Updates(map[string]interface{}{"execution_time": 0, "execution_staff": 0, "execution_state": 0}).Error
2106
+	err := XTWriteDB().Model(models.DoctorAdvice{}).Where("id = ? and user_org_id = ? and status =1", id, user_org_id).Updates(map[string]interface{}{"execution_time": 0, "execution_staff": 0, "execution_state": 2}).Error
2107
+	return err
2108
+}
2109
+
2110
+func UpdateInformationSettingById(orgid int64, week_day int64) error {
2111
+
2112
+	err := XTWriteDB().Model(&models.XtDialysisInformaitonSetting{}).Where("user_org_id = ? and status =1", orgid).Updates(map[string]interface{}{"week_day": week_day}).Error
2113
+	return err
2114
+}
2115
+
2116
+func CreateInformationSetting(setting models.XtDialysisInformaitonSetting) error {
2117
+
2118
+	err := XTWriteDB().Create(&setting).Error
2119
+
2097 2120
 	return err
2098 2121
 }
2122
+
2123
+func GetInformationSettingByOrgId(user_org_id int64) (models.XtDialysisInformaitonSetting, error) {
2124
+
2125
+	setting := models.XtDialysisInformaitonSetting{}
2126
+
2127
+	err := XTReadDB().Where("user_org_id = ? and status =1", user_org_id).Find(&setting).Error
2128
+
2129
+	return setting, err
2130
+}
2131
+
2132
+func GetDialysisInformationSetting(user_org_id int64) (infor []*models.XtDialysisInformaitonSetting, err error) {
2133
+
2134
+	err = XTReadDB().Where("user_org_id = ? and status =1", user_org_id).Find(&infor).Error
2135
+
2136
+	return infor, err
2137
+}

+ 8 - 8
service/gdyb_service.go 查看文件

@@ -421,7 +421,7 @@ type Result struct {
421 421
 	OrderId        int64   `json:"order_id" form:"order_id"`
422 422
 }
423 423
 
424
-//  门诊费用明细信息上传
424
+// 门诊费用明细信息上传
425 425
 func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescription, chrg_bchno string, org_name string, doctor string, dept string, fixmedins_code string, dept_code string, doctor_id string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string) string {
426 426
 	// 生成签名
427 427
 	nonce := GetRandomString(32)
@@ -572,7 +572,7 @@ func Gdyb2204(psnNo string, mdtrtId string, hisPrescription []*models.HisPrescri
572 572
 	//return &result
573 573
 }
574 574
 
575
-//  门诊费用明细信息撤销
575
+// 门诊费用明细信息撤销
576 576
 func Gdyb2205(psnNo string, mdtrtId string, chrgBchno string, org_name string, doctor string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string, fixmedins_code string) string {
577 577
 	// 生成签名
578 578
 	nonce := GetRandomString(32)
@@ -633,7 +633,7 @@ func Gdyb2205(psnNo string, mdtrtId string, chrgBchno string, org_name string, d
633 633
 	return str
634 634
 }
635 635
 
636
-//  门诊预结算
636
+// 门诊预结算
637 637
 func Gdyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, insutype string, total string, org_name string, doctor string, secret_key string) string {
638 638
 	// 生成签名
639 639
 	nonce := GetRandomString(32)
@@ -699,7 +699,7 @@ func Gdyb2206(psnNo string, mdtrtId string, chrgBchno string, certNo string, ins
699 699
 	return str
700 700
 }
701 701
 
702
-//  门诊结算
702
+// 门诊结算
703 703
 func Gdyb2207(psnNo string, mdtrtId string, chrgBchno string, certNo string, insutype string, total string, org_name string, doctor string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string, secret_key string) string {
704 704
 	// 生成签名
705 705
 	nonce := GetRandomString(32)
@@ -765,7 +765,7 @@ func Gdyb2207(psnNo string, mdtrtId string, chrgBchno string, certNo string, ins
765 765
 	return str
766 766
 }
767 767
 
768
-//  门诊结算撤销
768
+// 门诊结算撤销
769 769
 func Gdyb2208(psnNo string, mdtrtId string, setlId string, org_name string, doctor string, secret_key string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string) string {
770 770
 	// 生成签名
771 771
 	nonce := GetRandomString(32)
@@ -823,7 +823,7 @@ func Gdyb2208(psnNo string, mdtrtId string, setlId string, org_name string, doct
823 823
 	return str
824 824
 }
825 825
 
826
-//  医药机构费用结算对总账 func Gdyb3201( org_name string, doctor string, secret_key string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string) string {
826
+// 医药机构费用结算对总账 func Gdyb3201( org_name string, doctor string, secret_key string, fixmedins_code string, insuplc_admdvs string, mdtrtarea_admvs string) string {
827 827
 func Gdyb3201(baseParams models.BaseParams, businessParams models.BusinessParams) string {
828 828
 	fmt.Println("11222333-----")
829 829
 
@@ -896,8 +896,8 @@ type Params struct {
896 896
 	FixmedinsCode string `json:"fixmedins_code"` //调用环境生产为1 沙盒2
897 897
 }
898 898
 
899
-//文件上传
900
-//文件上传
899
+// 文件上传
900
+// 文件上传
901 901
 func Gdyb9101(baseParams models.BaseParams, file_name string, file_byte []byte) string {
902 902
 
903 903
 	// 生成签名

+ 53 - 53
service/his_deposit_service.go 查看文件

@@ -12,9 +12,9 @@ import (
12 12
 	"time"
13 13
 )
14 14
 
15
-//生成编号?+yymmdd+随机数(4位)
16
-//新增参数为CP
17
-//退款参数为AF
15
+// 生成编号?+yymmdd+随机数(4位)
16
+// 新增参数为CP
17
+// 退款参数为AF
18 18
 func CreateCPCode(str string) string {
19 19
 	s := fmt.Sprintf("%04v", rand.New(rand.NewSource(time.Now().UnixNano())).Int63n(10000))
20 20
 	t := time.Now().Format("20060102")
@@ -22,25 +22,25 @@ func CreateCPCode(str string) string {
22 22
 	return code
23 23
 }
24 24
 
25
-//获取his中的有效患者
25
+// 获取his中的有效患者
26 26
 func GetHisUser(orgid int64) (hisname []models.GetHisName, err error) {
27 27
 	err = XTReadDB().Model(&models.GetHisName{}).Where("status = 1 and user_org_id = ?", orgid).Find(&hisname).Error
28 28
 	return
29 29
 }
30 30
 
31
-//获取his中的有效患者去除了转出和死亡的
31
+// 获取his中的有效患者去除了转出和死亡的
32 32
 func GetHisUserToAlive(orgid int64) (hisname []models.GetHisName, err error) {
33 33
 	err = XTReadDB().Model(&models.GetHisName{}).Where("status = 1 and user_org_id = ? and lapseto = 1", orgid).Find(&hisname).Error
34 34
 	return
35 35
 }
36 36
 
37
-//获取his中的有效患者
37
+// 获取his中的有效患者
38 38
 func GetHisUserName(orgid, id int64) (hisname models.GetHisName, err error) {
39 39
 	err = XTReadDB().Model(&models.GetHisName{}).Where("status = 1 and user_org_id = ? and id = ?", orgid, id).Find(&hisname).Error
40 40
 	return
41 41
 }
42 42
 
43
-//添加押金(开始)调用接口前记得判断审核状态,确认通过审核后在调用
43
+// 添加押金(开始)调用接口前记得判断审核状态,确认通过审核后在调用
44 44
 func UpDeposit(code, remarks string, his_patient_id, orgid, trial_status, createid int64, deposit decimal.Decimal) (err error) {
45 45
 	//查押金表是否存在记录
46 46
 	tmp, tmpdeposit := IsHisPatientId(his_patient_id, orgid)
@@ -96,13 +96,13 @@ func UpDeposit(code, remarks string, his_patient_id, orgid, trial_status, create
96 96
 	return
97 97
 }
98 98
 
99
-//添加押金记录
99
+// 添加押金记录
100 100
 func AddDepositHistory(dh models.DepositHistory) error {
101 101
 	err := XTWriteDB().Create(&dh).Error
102 102
 	return err
103 103
 }
104 104
 
105
-//押金中添加一条记录,并返回该数据的id和押金余额(当没有该用户记录时调用)
105
+// 押金中添加一条记录,并返回该数据的id和押金余额(当没有该用户记录时调用)
106 106
 func AddDeposit(de models.Deposit) (int64, decimal.Decimal, error) {
107 107
 	var tmp models.Deposit
108 108
 	err := XTWriteDB().Create(&de).Find(&tmp).Error
@@ -112,7 +112,7 @@ func AddDeposit(de models.Deposit) (int64, decimal.Decimal, error) {
112 112
 	return tmp.ID, tmp.Deposit, err
113 113
 }
114 114
 
115
-//更改押金记录
115
+// 更改押金记录
116 116
 func UpdateDeposit(de models.Deposit) (err error) {
117 117
 	err = XTWriteDB().Model(&models.Deposit{}).Where("id = ? and status = 1", de.ID).Updates(map[string]interface{}{
118 118
 		"mtime":   de.Mtime,
@@ -121,7 +121,7 @@ func UpdateDeposit(de models.Deposit) (err error) {
121 121
 	return
122 122
 }
123 123
 
124
-//判断押金表是否存在当前的患者的一条有效数据,如果有返回id和押金余额,没有返回0
124
+// 判断押金表是否存在当前的患者的一条有效数据,如果有返回id和押金余额,没有返回0
125 125
 func IsHisPatientId(his_patient_id, orgid int64) (int64, decimal.Decimal) {
126 126
 	var tmp []models.Deposit
127 127
 	XTReadDB().Model(&models.Deposit{}).Where("user_org_id = ? and his_patient_id = ? and status = 1", orgid, his_patient_id).Find(&tmp)
@@ -131,7 +131,7 @@ func IsHisPatientId(his_patient_id, orgid int64) (int64, decimal.Decimal) {
131 131
 	return tmp[0].ID, tmp[0].Deposit
132 132
 }
133 133
 
134
-//查询押金编号是否重复
134
+// 查询押金编号是否重复
135 135
 func FindDecimalCode(orgid int64, code string) bool {
136 136
 	var total int
137 137
 	XTReadDB().Model(&models.DepositHistory{}).Where("user_org_id = ? and deposit_code = ? and status = 1", orgid, code).Count(&total)
@@ -142,7 +142,7 @@ func FindDecimalCode(orgid int64, code string) bool {
142 142
 	}
143 143
 }
144 144
 
145
-//充值明细列表
145
+// 充值明细列表
146 146
 func DetailsList(orgid, stime, etime int64, keyword string, slicekey []int64) (deposithistory []models.DepositHistoryname, err error) {
147 147
 	db := XTReadDB().Model(&models.DepositHistory{}).Where("status = 1 and user_org_id = ? and deposit_status = 1 ", orgid).Where("ctime >= ? and ctime <= ?", stime, etime)
148 148
 	if len(keyword) > 0 {
@@ -159,7 +159,7 @@ func DetailsList(orgid, stime, etime int64, keyword string, slicekey []int64) (d
159 159
 	return
160 160
 }
161 161
 
162
-//充值汇总列表
162
+// 充值汇总列表
163 163
 func SummaryList(orgid, stime, etime int64, keyword string, slicekey []int64) (deposithistory []models.DepositHistory, err error) {
164 164
 	db := XTReadDB().Model(&models.DepositHistory{}).Where("status = 1 and trial_status = 1 and user_org_id = ? and deposit_status = 1 ", orgid).Where("ctime >= ? and ctime <= ?", stime, etime)
165 165
 	if len(slicekey) > 0 {
@@ -180,7 +180,7 @@ func SummaryList(orgid, stime, etime int64, keyword string, slicekey []int64) (d
180 180
 	return
181 181
 }
182 182
 
183
-//获取本周周一和周日的起止时间戳
183
+// 获取本周周一和周日的起止时间戳
184 184
 func GetMondayOfWeek() (int64, int64) {
185 185
 	t := time.Now()
186 186
 	dayObj := GetZeroTime(t)
@@ -200,7 +200,7 @@ func GetMondayOfWeek() (int64, int64) {
200 200
 	return stime.Unix(), stime.Unix() + 604799
201 201
 }
202 202
 
203
-//获取本月的起止时间戳
203
+// 获取本月的起止时间戳
204 204
 func GetMonth() (int64, int64) {
205 205
 	timeNow := time.Now()
206 206
 	timeToday := time.Date(timeNow.Year(), timeNow.Month(), timeNow.Day(), 0, 0, 0, 0, timeNow.Location()) // 获取当天0点时间 time类型
@@ -209,7 +209,7 @@ func GetMonth() (int64, int64) {
209 209
 	return timeMonthStartUnix1, timeMonthEndUnix1
210 210
 }
211 211
 
212
-//获取当天起止时间戳
212
+// 获取当天起止时间戳
213 213
 func GetNowTime() (int64, int64) {
214 214
 	t := time.Now()
215 215
 	addTime := time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, t.Location())
@@ -217,9 +217,9 @@ func GetNowTime() (int64, int64) {
217 217
 	return timesamp, timesamp + 86399
218 218
 }
219 219
 
220
-//获取创建者的姓名
221
-//原先的(sgj_users.sgj_user_admin)
222
-//新加的(sgj_users.sgj_user_admin_role)
220
+// 获取创建者的姓名
221
+// 原先的(sgj_users.sgj_user_admin)
222
+// 新加的(sgj_users.sgj_user_admin_role)
223 223
 func GetCreateidName(id, orgid int64) string {
224 224
 	//var tmp models.CreateUser
225 225
 	//XTReadDB().Select("name").Where("id = ?", id).Find(&tmp)
@@ -230,7 +230,7 @@ func GetCreateidName(id, orgid int64) string {
230 230
 	return tmp.UserName
231 231
 }
232 232
 
233
-//审核通过
233
+// 审核通过
234 234
 func UpDecimalHistory(id int64) (err error) {
235 235
 	//开事务
236 236
 	tx := XTWriteDB().Begin()
@@ -272,7 +272,7 @@ func UpDecimalHistory(id int64) (err error) {
272 272
 	return
273 273
 }
274 274
 
275
-//删除本次记录
275
+// 删除本次记录
276 276
 func DelDecimalHistory(id int64) (err error) {
277 277
 	err = XTWriteDB().Model(models.DepositHistory{}).Where("id = ?", id).Updates(map[string]interface{}{
278 278
 		"status": 0,
@@ -281,13 +281,13 @@ func DelDecimalHistory(id int64) (err error) {
281 281
 	return
282 282
 }
283 283
 
284
-//根据id获取一条押金历史记录
284
+// 根据id获取一条押金历史记录
285 285
 func GetDecimalHistoryOne(id int64) (history models.DepositHistory, err error) {
286 286
 	err = XTReadDB().Model(&models.DepositHistory{}).Where("id = ?", id).Find(&history).Error
287 287
 	return
288 288
 }
289 289
 
290
-//根据患者id获取该患者当前剩余的押金
290
+// 根据患者id获取该患者当前剩余的押金
291 291
 func GetUserMoney(id, orgid int64) decimal.Decimal {
292 292
 	tmp := models.Deposit{}
293 293
 	err := XTReadDB().Model(&models.Deposit{}).Where("his_patient_id = ? and user_org_id = ? and status = 1", id, orgid).Find(&tmp).Error
@@ -297,14 +297,14 @@ func GetUserMoney(id, orgid int64) decimal.Decimal {
297 297
 	return tmp.Deposit
298 298
 }
299 299
 
300
-//查询时间段内患者的余额
300
+// 查询时间段内患者的余额
301 301
 func GetMoneyforTime(id, orgid, etime int64) decimal.Decimal {
302 302
 	tmp := models.DepositHistory{}
303 303
 	XTReadDB().Model(&models.DepositHistory{}).Where("his_patient_id = ? and user_org_id = ? and status = 1 and mtime <= ?", id, orgid, etime).Order("mtime").Find(&tmp)
304 304
 	return tmp.SurplusDeposit
305 305
 }
306 306
 
307
-//押金流水
307
+// 押金流水
308 308
 func GetFlowList(page, limit, id, orgid, stime, etime, deposit_status int64) (deposit []models.DepositHistory, total int64, err error) {
309 309
 	s := "status = 1 and trial_status = 1 and user_org_id = ? and his_patient_id = ? and mtime >= ? and mtime <= ?"
310 310
 	offset := (page - 1) * limit
@@ -315,7 +315,7 @@ func GetFlowList(page, limit, id, orgid, stime, etime, deposit_status int64) (de
315 315
 	return
316 316
 }
317 317
 
318
-//获取患者押金列表
318
+// 获取患者押金列表
319 319
 func GetUserList(page, limit, orgid int64, keyword string, slicekey []int64) (m []models.Deposit1, total int64, err error) {
320 320
 	db := XTReadDB().Model(&models.Deposit{}).Where("status = 1 and user_org_id = ? ", orgid)
321 321
 	offset := (page - 1) * limit
@@ -326,7 +326,7 @@ func GetUserList(page, limit, orgid int64, keyword string, slicekey []int64) (m
326 326
 	return
327 327
 }
328 328
 
329
-//扣费明细列表
329
+// 扣费明细列表
330 330
 func DeductionList(orgid, stime, etime int64, keyword string, slicekey []int64) (deposithistory []models.DepositHistory, err error) {
331 331
 	db := XTReadDB().Model(&models.DepositHistory{}).Where("status = 1 and user_org_id = ? and deposit_status = 2 ", orgid).Where("ctime >= ? and ctime <= ?", stime, etime)
332 332
 	if len(keyword) > 0 {
@@ -343,7 +343,7 @@ func DeductionList(orgid, stime, etime int64, keyword string, slicekey []int64)
343 343
 	return
344 344
 }
345 345
 
346
-//获取医疗费总额
346
+// 获取医疗费总额
347 347
 func MedicalTotal(orgid, id int64) decimal.Decimal {
348 348
 	tmp := models.HisChargeSettleOrder{}
349 349
 	//and status = 1 and order_status = 2
@@ -351,7 +351,7 @@ func MedicalTotal(orgid, id int64) decimal.Decimal {
351 351
 	return decimal.NewFromFloat(tmp.MedfeeSumamt)
352 352
 }
353 353
 
354
-//根据就诊号查询出医收费类型
354
+// 根据就诊号查询出医收费类型
355 355
 func CodeToChargetype(orgid int64, code string) (s string) {
356 356
 	tmp := models.HisPrintPatient{}
357 357
 	tmp_hhcr := models.HisHospitalCheckRecordTwo{}
@@ -385,12 +385,12 @@ func CodeToChargetype(orgid int64, code string) (s string) {
385 385
 	return
386 386
 }
387 387
 
388
-//扣除患者的押金,并生成一条扣费历史记录
389
-//orgid 机构id;
390
-//his_user_id	患者id;
391
-//create_id		创建者id;
392
-//code		就诊号;
393
-//deposit	本次使用的押金金额,支持float64、int、int64、decimal.Decimal类型
388
+// 扣除患者的押金,并生成一条扣费历史记录
389
+// orgid 机构id;
390
+// his_user_id	患者id;
391
+// create_id		创建者id;
392
+// code		就诊号;
393
+// deposit	本次使用的押金金额,支持float64、int、int64、decimal.Decimal类型
394 394
 func SpendDeposit(orgid, his_user_id, create_id int64, code string, deposit interface{}) (err error) {
395 395
 	tmp_deposit := decimal.Decimal{} //本次患者使用的押金
396 396
 	tmp_deposit, err = ToDecimal(deposit)
@@ -445,7 +445,7 @@ func SpendDeposit(orgid, his_user_id, create_id int64, code string, deposit inte
445 445
 	return
446 446
 }
447 447
 
448
-//新增一条退款申请
448
+// 新增一条退款申请
449 449
 func RefundApplication(orgid, his_patient_id, trial_status, createid int64, code string, deposit decimal.Decimal) (err error) {
450 450
 	//开事务
451 451
 	tx := XTWriteDB().Begin()
@@ -502,7 +502,7 @@ func RefundApplication(orgid, his_patient_id, trial_status, createid int64, code
502 502
 	return
503 503
 }
504 504
 
505
-//退款审核通过/拒绝批量处理
505
+// 退款审核通过/拒绝批量处理
506 506
 func RefundReviewMore(orgid, trial_status int64, ids string) (err error) {
507 507
 	//处理下字符串
508 508
 	t_ids := ""
@@ -537,7 +537,7 @@ func RefundReviewMore(orgid, trial_status int64, ids string) (err error) {
537 537
 	return err
538 538
 }
539 539
 
540
-//退款审核通过/拒绝
540
+// 退款审核通过/拒绝
541 541
 func RefundReview(orgid, id, trial_status int64, tx *gorm.DB) (err error) {
542 542
 	//根据id查询该条历史记录
543 543
 	history := models.DepositHistory{}
@@ -593,7 +593,7 @@ func RefundReview(orgid, id, trial_status int64, tx *gorm.DB) (err error) {
593 593
 	return err
594 594
 }
595 595
 
596
-//退款删除
596
+// 退款删除
597 597
 func DeleteRefund(orgid, id int64) (err error) {
598 598
 	//根据id查询历史记录
599 599
 	history := models.DepositHistory{}
@@ -615,7 +615,7 @@ func DeleteRefund(orgid, id int64) (err error) {
615 615
 	return
616 616
 }
617 617
 
618
-//更改退款申请
618
+// 更改退款申请
619 619
 func ChangeRefund(orgid, his_patient_id, trial_status, id int64, code string, deposit decimal.Decimal) (err error) {
620 620
 	//开事务
621 621
 	tx := XTWriteDB().Begin()
@@ -671,7 +671,7 @@ func ChangeRefund(orgid, his_patient_id, trial_status, id int64, code string, de
671 671
 	return
672 672
 }
673 673
 
674
-//退款分页
674
+// 退款分页
675 675
 func RefundList(page, limit, orgid, stime, etime, refundtype, examinetype int64, keyword string, slicekey []int64) (depo []models.RefundList, total int64, err error) {
676 676
 	db := XTReadDB().Model(&models.DepositHistory{}).Where("status = 1 and user_org_id = ? ", orgid).Where("ctime >= ? and ctime <= ?", stime, etime)
677 677
 	offset := (page - 1) * limit
@@ -710,11 +710,11 @@ func RefundList(page, limit, orgid, stime, etime, refundtype, examinetype int64,
710 710
 
711 711
 }
712 712
 
713
-//退回患者的押金,并生成一条退费历史记录
714
-//orgid 机构id
715
-//his_user_id 患者id
716
-//code 编号
717
-//deposit 本次退费的金额,支持float64、int、int64、decimal.Decimal类型
713
+// 退回患者的押金,并生成一条退费历史记录
714
+// orgid 机构id
715
+// his_user_id 患者id
716
+// code 编号
717
+// deposit 本次退费的金额,支持float64、int、int64、decimal.Decimal类型
718 718
 func MoneyIncrease(orgid, his_user_id int64, code string, deposit interface{}) (err error) {
719 719
 	tmp_deposit := decimal.Decimal{}
720 720
 	tmp_deposit, err = ToDecimal(deposit)
@@ -768,21 +768,21 @@ func GetorgName(orgid int64) (name string) {
768 768
 	return tmp.OrgName
769 769
 }
770 770
 
771
-//根据id查询就诊号
771
+// 根据id查询就诊号
772 772
 func FindcodeToid(id int64) (code string) {
773 773
 	tmp := models.GetMdtrtId{}
774 774
 	XTReadDB().Model(&models.GetMdtrtId{}).Where("id = ?", id).Find(&tmp)
775 775
 	return tmp.MdtrtId
776 776
 }
777 777
 
778
-//根据id查询就诊号
778
+// 根据id查询就诊号
779 779
 func FindnumberToid(id int64) (number string) {
780 780
 	tmp := models.GetMdtrtId{}
781 781
 	XTReadDB().Model(&models.GetMdtrtId{}).Where("id = ?", id).Find(&tmp)
782 782
 	return tmp.Number
783 783
 }
784 784
 
785
-//扣费明细列表,查看详情按钮是否显示,0隐藏,1显示
785
+// 扣费明细列表,查看详情按钮是否显示,0隐藏,1显示
786 786
 func IsButtonShow(code string, orgid, his_patient_id int64) (tmp int64) {
787 787
 	var total int
788 788
 	XTReadDB().Model(&models.RefundList{}).Where(" user_org_id = ? and his_patient_id = ? and deposit_code = ? and deposit_status = 4 and status = 1", orgid, his_patient_id, code).Count(&total)
@@ -798,7 +798,7 @@ func IsButtonShow(code string, orgid, his_patient_id int64) (tmp int64) {
798 798
 	}
799 799
 }
800 800
 
801
-//把其他的类型转换成decimal.Decimal类型
801
+// 把其他的类型转换成decimal.Decimal类型
802 802
 func ToDecimal(i interface{}) (d decimal.Decimal, err error) {
803 803
 	switch i.(type) {
804 804
 	case float64:
@@ -909,8 +909,8 @@ func TypeConversion02(tmp string) (s string) {
909 909
 	return s
910 910
 }
911 911
 
912
-//获取本段时间内患者退款的总额
913
-//orgid:机构id,stime:开始时间,etime:结束时间,patient_id:患者id
912
+// 获取本段时间内患者退款的总额
913
+// orgid:机构id,stime:开始时间,etime:结束时间,patient_id:患者id
914 914
 func RefundListSum(orgid, stime, etime, patient_id int64) (sum decimal.Decimal, err error) {
915 915
 	var depo []models.RefundList
916 916
 	err = XTReadDB().Model(&models.DepositHistory{}).Where("status = 1 and user_org_id = ? and trial_status = 1 and ctime >= ? and ctime <= ? and deposit_status = 3 and his_patient_id = ? ", orgid, stime, etime, patient_id).Find(&depo).Error

+ 0 - 1
service/his_hospital_service.go 查看文件

@@ -172,7 +172,6 @@ func GetChargeHisHospitalPrescriptionFive(org_id int64, patient_id int64, his_pa
172 172
 	return
173 173
 }
174 174
 
175
-//
176 175
 type VMHospitalPatient struct {
177 176
 	ID                     int64                         `gorm:"column:id" json:"id" form:"id"`
178 177
 	UserOrgId              int64                         `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`

+ 7 - 3
service/his_project_service.go 查看文件

@@ -93,11 +93,15 @@ func CreatedProjectTeam(team *models.XtHisProjectTeam) error {
93 93
 func GetProjectTeamList(limit int64, page int64, orgid int64, keyword string) (projectTeam []*models.XtHisProjectTeam, total int64, err error) {
94 94
 	offset := (page - 1) * limit
95 95
 	likeKey := "%" + keyword + "%"
96
-	db := XTReadDB().Model(&projectTeam)
96
+	db := XTReadDB().Model(&projectTeam).Where("status=1")
97 97
 	if len(keyword) > 0 {
98 98
 		db = db.Where("project_team like ?", likeKey)
99 99
 	}
100
-	err = db.Where("user_org_id = ? and status = 1", orgid).Count(&total).Offset(offset).Limit(limit).Order("created_time desc").Find(&projectTeam).Error
100
+	if orgid > 0 {
101
+		db = db.Where("user_org_id = ?", orgid)
102
+	}
103
+
104
+	err = db.Count(&total).Offset(offset).Limit(limit).Order("sort asc").Find(&projectTeam).Error
101 105
 	return projectTeam, total, err
102 106
 }
103 107
 
@@ -110,7 +114,7 @@ func GetProjectTeamDetail(id int64) (models.XtHisProjectTeam, error) {
110 114
 
111 115
 func UpdatedProjectTeam(id int64, team *models.XtHisProjectTeam) error {
112 116
 
113
-	err := XTWriteDB().Model(&team).Where("id=? and status = 1", id).Updates(map[string]interface{}{"project_team": team.ProjectTeam, "price": team.Price, "pinyin": team.Pinyin, "wubi": team.Wubi, "tube_color": team.TubeColor, "team_type": team.TeamType, "remark": team.Remark, "project_id": team.ProjectId, "item_id": team.ItemId}).Error
117
+	err := XTWriteDB().Model(&team).Where("id=? and status = 1", id).Updates(map[string]interface{}{"project_team": team.ProjectTeam, "price": team.Price, "pinyin": team.Pinyin, "wubi": team.Wubi, "tube_color": team.TubeColor, "team_type": team.TeamType, "remark": team.Remark, "project_id": team.ProjectId, "item_id": team.ItemId, "sort": team.Sort}).Error
114 118
 	return err
115 119
 }
116 120
 

+ 3 - 3
service/integration_service.go 查看文件

@@ -12,7 +12,7 @@ func UpdateSysItemIdByID(sysInspection *models.InspectionReference) error {
12 12
 	return err
13 13
 }
14 14
 
15
-func GetSysInspectionList(orgID int64) (sysInspection []*models.InspectionReference,ownerInspection []*models.InspectionReference, err error) {
15
+func GetSysInspectionList(orgID int64) (sysInspection []*models.InspectionReference, ownerInspection []*models.InspectionReference, err error) {
16 16
 	db := XTReadDB()
17 17
 	err = db.Model(&models.InspectionReference{}).Where("org_id= 0 and status=1").Find(&sysInspection).Error
18 18
 	err = db.Model(&models.InspectionReference{}).Where("org_id= ? and status=1", orgID).Find(&ownerInspection).Error
@@ -29,7 +29,7 @@ func GetSyncList(orgID int64, page, limit int64) (patients []*models.MiddleSyncI
29 29
 
30 30
 func SaveInterface(interfaceinfo *models.MiddleInterface) error {
31 31
 	db := MiddleWriteDB()
32
-	if (interfaceinfo.ID > 0 ) {
32
+	if interfaceinfo.ID > 0 {
33 33
 		err := db.Save(&interfaceinfo).Error
34 34
 		return err
35 35
 	} else {
@@ -38,7 +38,7 @@ func SaveInterface(interfaceinfo *models.MiddleInterface) error {
38 38
 	}
39 39
 }
40 40
 
41
-func GetInterface(orgID int64) (interfaceinfo models.MiddleInterface, err error){
41
+func GetInterface(orgID int64) (interfaceinfo models.MiddleInterface, err error) {
42 42
 	db := MiddleReadDB()
43 43
 	err = db.Model(&models.MiddleInterface{}).Where("org_id=? and status=1", orgID).First(&interfaceinfo).Error
44 44
 	return

+ 2 - 3
service/login_service.go 查看文件

@@ -3,9 +3,9 @@ package service
3 3
 import (
4 4
 	"XT_New/models"
5 5
 	"XT_New/utils"
6
-	"strconv"
7
-	"github.com/jinzhu/gorm"
8 6
 	"encoding/json"
7
+	"github.com/jinzhu/gorm"
8
+	"strconv"
9 9
 	"time"
10 10
 )
11 11
 
@@ -206,7 +206,6 @@ func GetOrgServeSubscibe(orgID int64) (*models.ServeSubscibe, error) {
206 206
 	return &model, nil
207 207
 }
208 208
 
209
-//
210 209
 func GetAppRoleById(id int64) (*models.App_Role, error) {
211 210
 	var model models.App_Role
212 211
 	err := readUserDb.Model(&models.App_Role{}).Where("id = ? AND status = 1", id).First(&model).Error

+ 1 - 1
service/manage_center_service.go 查看文件

@@ -406,7 +406,7 @@ func FindAllDiagnoseList(orgId int64, page int64, limit int64) (list []*models.H
406 406
 	offset := (page - 1) * limit
407 407
 	db := readDb.Model(&models.HisXtDiagnoseConfig{})
408 408
 	db = db.Where("user_org_id = ? AND status = 1", orgId)
409
-	err = db.Count(&total).Offset(offset).Limit(limit).Order("ctime desc").Find(&list).Error
409
+	err = db.Count(&total).Offset(offset).Limit(limit).Order("sort asc").Find(&list).Error
410 410
 	return
411 411
 }
412 412
 

+ 1 - 1
service/manage_service.go 查看文件

@@ -1732,7 +1732,7 @@ func DeleteObjectTableDisinfect(id int64) error {
1732 1732
 
1733 1733
 func GetAirDisInfectionLongTime(user_org_id int64) (list []*models.XtNewAriDisinfect, err error) {
1734 1734
 
1735
-	err = XTReadDB().Where("user_org_id = ? and status = 1", user_org_id).Find(&list).Error
1735
+	err = XTReadDB().Where("user_org_id = ? and status = 1", user_org_id).Order("id desc").First(&list).Error
1736 1736
 	return
1737 1737
 }
1738 1738
 

+ 1 - 1
service/management_service/management_analyse_service.go 查看文件

@@ -7,7 +7,7 @@ type ChartDataStruct struct {
7 7
 	Value int64  `json:"value"`
8 8
 }
9 9
 
10
-//患者统计
10
+// 患者统计
11 11
 func GetPatientChartData(user_org_id int64, start_time int64, end_time int64, statistics_type int) (datas []*ChartDataStruct, total int64, err error) {
12 12
 	db := service.XTReadDB()
13 13
 	switch statistics_type {

+ 10 - 3
service/patient_service.go 查看文件

@@ -520,9 +520,16 @@ func GetLapsetoPatientCount(orgID int64, lapseto int64) (total int64) {
520 520
 
521 521
 func ChechLastDialysisNo(orgID int64) (dialysisNo int64) {
522 522
 	var patient models.Patients
523
-	err := readDb.Model(&models.Patients{}).Where("status=1 and user_org_id=?", orgID).Order("dialysis_no desc").First(&patient).Error
524
-	if err != nil {
525
-		return
523
+	if orgID == 10278 {
524
+		err := readDb.Model(&models.Patients{}).Where("status=1 and user_org_id=?", orgID).Order("id desc").First(&patient).Error
525
+		if err != nil {
526
+			return
527
+		}
528
+	} else {
529
+		err := readDb.Model(&models.Patients{}).Where("status=1 and user_org_id=?", orgID).Order("dialysis_no desc").First(&patient).Error
530
+		if err != nil {
531
+			return
532
+		}
526 533
 	}
527 534
 
528 535
 	if patient.ID == 0 {

+ 1 - 1
service/pharmacy_service.go 查看文件

@@ -789,7 +789,7 @@ func DrugWithdrawal(orgid, patient_id, stime, etime, creater int64) (err error)
789 789
 	var hids []*models.TmpID
790 790
 	var xids []*models.TmpID
791 791
 	//var hid,xid []int64//查询已发药的药品
792
-	err = tx.Raw("select id,dispensing_time from his_doctor_advice_info where status = 1 and created_time >= ? and created_time <= ? "+
792
+	err = tx.Raw("select id,dispensing_time from his_doctor_advice_info where status = 1 and advice_date >= ? and advice_date <= ? "+
793 793
 		"and user_org_id = ? and patient_id = ? and is_medicine = 1 and drug_id in (select id from xt_base_drug where org_id = ? and status = 1)", stime, etime, orgid, patient_id, orgid).Scan(&hids).Error
794 794
 	if err != nil {
795 795
 		return

+ 1 - 0
service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go 查看文件

@@ -227,6 +227,7 @@ type PrescriptionVM struct {
227 227
 	SodiumBicarbonateFlow      string  `gorm:"column:sodium_bicarbonate_flow" json:"sodium_bicarbonate_flow" form:"sodium_bicarbonate_flow"`
228 228
 	DisplaceSpeed              string  `gorm:"column:displace_speed" json:"displace_speed" form:"displace_speed"`
229 229
 	DialysisStrainer           string  `gorm:"column:dialysis_strainer" json:"dialysis_strainer" form:"dialysis_strainer"`
230
+	PrescriptionWater          float64 `gorm:"column:prescription_water" json:"prescription_water" form:"prescription_water"`
230 231
 }
231 232
 
232 233
 func (PrescriptionVM) TableName() string {

+ 1 - 1
service/role_service.go 查看文件

@@ -500,7 +500,7 @@ func GetAllGeneralPurviewVMsProcessed(module int) ([]*PurviewTreeViewModel, erro
500 500
 	return purviewVMs, nil
501 501
 }
502 502
 
503
-//用来处理树形结构
503
+// 用来处理树形结构
504 504
 func Totree(map1 map[int64]int64, map2 map[int64]*PurviewTreeViewModel, tmp int64) []*PurviewTreeViewModel {
505 505
 	var j int //用来计数
506 506
 	var tmp_purview []*PurviewTreeViewModel

+ 62 - 62
service/secondary_service.go 查看文件

@@ -10,14 +10,14 @@ import (
10 10
 	"time"
11 11
 )
12 12
 
13
-//生成编号,规则为:"SH-"+4位随机数
13
+// 生成编号,规则为:"SH-"+4位随机数
14 14
 func CreateCode() string {
15 15
 	s := fmt.Sprintf("%04v", rand.New(rand.NewSource(time.Now().UnixNano())).Int63n(10000))
16 16
 	code := "SH-" + s
17 17
 	return code
18 18
 }
19 19
 
20
-//查询仓库名称是否重复(用于修改)
20
+// 查询仓库名称是否重复(用于修改)
21 21
 func IsStorehouseNameUp(orgid, id int64, storehouse_name string) (bool, error) {
22 22
 	var total int
23 23
 	var tmp bool
@@ -30,7 +30,7 @@ func IsStorehouseNameUp(orgid, id int64, storehouse_name string) (bool, error) {
30 30
 	return tmp, err
31 31
 }
32 32
 
33
-//查询仓库地址是否重复(用于修改)
33
+// 查询仓库地址是否重复(用于修改)
34 34
 func IsStorehouseAddressUp(orgid, id int64, storehouse_address string) (bool, error) {
35 35
 	var total int
36 36
 	var tmp bool
@@ -43,7 +43,7 @@ func IsStorehouseAddressUp(orgid, id int64, storehouse_address string) (bool, er
43 43
 	return tmp, err
44 44
 }
45 45
 
46
-//查询编号是否重复
46
+// 查询编号是否重复
47 47
 func FindStorehouseCode(orgid int64, code string) bool {
48 48
 	var total int
49 49
 	XTReadDB().Model(&models.Storehouse{}).Where(" storehouse_code = ? and user_org_id = ? and status = 1", code, orgid).Count(&total)
@@ -54,7 +54,7 @@ func FindStorehouseCode(orgid int64, code string) bool {
54 54
 	}
55 55
 }
56 56
 
57
-//判断仓库的库存是否为零 true为零,false不为零
57
+// 判断仓库的库存是否为零 true为零,false不为零
58 58
 func IsStorehouseNil(id, orgid int64) bool { //根据 id gro_id 查为零的库存
59 59
 	var h, y int
60 60
 	//判断耗材是否为零
@@ -70,19 +70,19 @@ func IsStorehouseNil(id, orgid int64) bool { //根据 id gro_id 查为零的库
70 70
 	return true
71 71
 }
72 72
 
73
-//修改仓库状态
73
+// 修改仓库状态
74 74
 func UpdateStorehouseStatus(id int64) error {
75 75
 	err := XTWriteDB().Exec("UPDATE xt_storehouse,(SELECT CASE storehouse_status WHEN 1 THEN 0 WHEN 0 THEN 1 END AS tt FROM xt_storehouse WHERE id=?)tmp SET storehouse_status = tmp.tt where id=?", id, id).Error
76 76
 	return err
77 77
 }
78 78
 
79
-//删除仓库
79
+// 删除仓库
80 80
 func DeleteStorehouse(id int64) error {
81 81
 	err := XTWriteDB().Model(&models.Storehouse{}).Where("id = ?", id).Update("status", 0).Error
82 82
 	return err
83 83
 }
84 84
 
85
-//查询仓库名称是否重复
85
+// 查询仓库名称是否重复
86 86
 func IsStorehouseName(orgid int64, storehouse_name string) (bool, error) {
87 87
 	var total int
88 88
 	var tmp bool
@@ -95,7 +95,7 @@ func IsStorehouseName(orgid int64, storehouse_name string) (bool, error) {
95 95
 	return tmp, err
96 96
 }
97 97
 
98
-//查询仓库地址是否重复
98
+// 查询仓库地址是否重复
99 99
 func IsStorehouseAddress(orgid int64, storehouse_address string) (bool, error) {
100 100
 	var total int
101 101
 	var tmp bool
@@ -108,7 +108,7 @@ func IsStorehouseAddress(orgid int64, storehouse_address string) (bool, error) {
108 108
 	return tmp, err
109 109
 }
110 110
 
111
-//新增仓库
111
+// 新增仓库
112 112
 func AddStroehouse(storehouse models.Storehouse) (shiwu string, err error) {
113 113
 	tx := XTWriteDB().Begin()
114 114
 	defer func() {
@@ -150,7 +150,7 @@ func AddStroehouse(storehouse models.Storehouse) (shiwu string, err error) {
150 150
 	return shiwu, err
151 151
 }
152 152
 
153
-//修改仓库
153
+// 修改仓库
154 154
 func UpdateStroehouse(storehouse models.Storehouse) error {
155 155
 	err := XTWriteDB().Model(&models.Storehouse{}).Where("id = ? and status = 1", storehouse.ID).Updates(
156 156
 		map[string]interface{}{
@@ -163,13 +163,13 @@ func UpdateStroehouse(storehouse models.Storehouse) error {
163 163
 	return err
164 164
 }
165 165
 
166
-//查询一条仓库的信息
166
+// 查询一条仓库的信息
167 167
 func GetOneStorehouse(id, orgid int64) (storehouse models.Storehouse, err error) {
168 168
 	err = XTReadDB().Model(&models.Storehouse{}).Where("id = ? and user_org_id = ?", id, orgid).Find(&storehouse).Error
169 169
 	return
170 170
 }
171 171
 
172
-//分页
172
+// 分页
173 173
 func StorehouseList(page, limit, orgid int64, keyword string, slicekey []int64) (storehouse []models.Storehouse, total int64, err error) {
174 174
 	db := XTReadDB().Model(&storehouse).Where("status = 1 and user_org_id = ?", orgid)
175 175
 	offset := (page - 1) * limit
@@ -187,13 +187,13 @@ func StorehouseList(page, limit, orgid int64, keyword string, slicekey []int64)
187 187
 	return storehouse, total, err
188 188
 }
189 189
 
190
-//获取当前机构所有可用的仓库名字
190
+// 获取当前机构所有可用的仓库名字
191 191
 func GetAllStorehouseName(orgid int64) (storehouse []models.Storehouse, err error) {
192 192
 	err = XTReadDB().Model(&models.Storehouse{}).Where("storehouse_status = 1 and status = 1 and user_org_id = ?", orgid).Find(&storehouse).Error
193 193
 	return
194 194
 }
195 195
 
196
-//根据机构id,生成一个默认仓库
196
+// 根据机构id,生成一个默认仓库
197 197
 func GetDefaultStorehouse(orgid int64) error {
198 198
 	var code string
199 199
 	for a := true; a == true; {
@@ -222,7 +222,7 @@ func GetDefaultStorehouse(orgid int64) error {
222 222
 	return err
223 223
 }
224 224
 
225
-//查找该机构id是否有仓库存在,ture存在,false不存在
225
+// 查找该机构id是否有仓库存在,ture存在,false不存在
226 226
 func IsStorehouse(orgid int64) bool {
227 227
 	var total int
228 228
 	XTReadDB().Model(&models.Storehouse{}).Where("user_org_id = ?", orgid).Count(&total)
@@ -233,7 +233,7 @@ func IsStorehouse(orgid int64) bool {
233 233
 	}
234 234
 }
235 235
 
236
-//查找该机构id是否有仓库配置存在,ture存在,false不存在
236
+// 查找该机构id是否有仓库配置存在,ture存在,false不存在
237 237
 func IsStorehouseconfigXT(orgid int64, tx *gorm.DB) bool {
238 238
 	var total int
239 239
 	tx.Model(&models.StorehouseConfig{}).Where("user_org_id = ? and status = 1", orgid).Count(&total)
@@ -244,17 +244,18 @@ func IsStorehouseconfigXT(orgid int64, tx *gorm.DB) bool {
244 244
 	}
245 245
 }
246 246
 
247
-//  根据机构id查询仓库配置
248
-//storehouse_info:耗材 自动入库 的仓库id
249
-//storehouse_out_info:耗材 自动出库 的仓库id
250
-//drug_storehouse_info:药品 自动入库 的仓库id
251
-//drug_storehouse_out:药品 自动出库 的仓库id
247
+//	根据机构id查询仓库配置
248
+//
249
+// storehouse_info:耗材 自动入库 的仓库id
250
+// storehouse_out_info:耗材 自动出库 的仓库id
251
+// drug_storehouse_info:药品 自动入库 的仓库id
252
+// drug_storehouse_out:药品 自动出库 的仓库id
252 253
 func FindStorehouseConfig(orgid int64) (storehouse_config models.StorehouseConfig, err error) {
253 254
 	err = XTReadDB().Model(&models.StorehouseConfig{}).Where("status = 1 and user_org_id = ?", orgid).Find(&storehouse_config).Error
254 255
 	return
255 256
 }
256 257
 
257
-//根据机构id,仓库id新建一个仓库配置
258
+// 根据机构id,仓库id新建一个仓库配置
258 259
 func CreateStorehouseConfig(orgid, id int64) (err error) {
259 260
 	storeconfig := models.StorehouseConfig{
260 261
 		UserOrgId:          orgid,
@@ -269,7 +270,7 @@ func CreateStorehouseConfig(orgid, id int64) (err error) {
269 270
 	return
270 271
 }
271 272
 
272
-//根据机构id,仓库id新建一个仓库配置,带事务
273
+// 根据机构id,仓库id新建一个仓库配置,带事务
273 274
 func CreateStorehouseConfigXT(orgid, id int64, tx *gorm.DB) (err error) {
274 275
 	storeconfig := models.StorehouseConfig{
275 276
 		UserOrgId:          orgid,
@@ -284,41 +285,41 @@ func CreateStorehouseConfigXT(orgid, id int64, tx *gorm.DB) (err error) {
284 285
 	return
285 286
 }
286 287
 
287
-//更改耗材自动入库仓库
288
+// 更改耗材自动入库仓库
288 289
 func UpdateInfo(orgid, id int64) (err error) {
289 290
 	mtime := time.Now().Unix()
290 291
 	err = XTWriteDB().Model(&models.StorehouseConfig{}).Where("user_org_id = ? and status = 1", orgid).Updates(map[string]interface{}{"storehouse_info": id, "mtime": mtime}).Error
291 292
 	return
292 293
 }
293 294
 
294
-//更改耗材自动出库仓库
295
+// 更改耗材自动出库仓库
295 296
 func UpdateOutInfo(orgid, id int64) (err error) {
296 297
 	mtime := time.Now().Unix()
297 298
 	err = XTWriteDB().Model(&models.StorehouseConfig{}).Where("user_org_id = ? and status = 1", orgid).Updates(map[string]interface{}{"storehouse_out_info": id, "mtime": mtime}).Error
298 299
 	return
299 300
 }
300 301
 
301
-//更改药品自动入库仓库
302
+// 更改药品自动入库仓库
302 303
 func UpdateDrugInfo2(orgid, id int64) (err error) {
303 304
 	mtime := time.Now().Unix()
304 305
 	err = XTWriteDB().Model(&models.StorehouseConfig{}).Where("user_org_id = ? and status = 1", orgid).Updates(map[string]interface{}{"drug_storehouse_info": id, "mtime": mtime}).Error
305 306
 	return
306 307
 }
307 308
 
308
-//更改药品自动出库仓库
309
+// 更改药品自动出库仓库
309 310
 func UpdateDrugOut(orgid, id int64) (err error) {
310 311
 	mtime := time.Now().Unix()
311 312
 	err = XTWriteDB().Model(&models.StorehouseConfig{}).Where("user_org_id = ? and status = 1", orgid).Updates(map[string]interface{}{"drug_storehouse_out": id, "mtime": mtime}).Error
312 313
 	return
313 314
 }
314 315
 
315
-//根据id查询仓库名称
316
+// 根据id查询仓库名称
316 317
 func FindStorehouseName(id int64) (storehouse models.Storehouse, err error) {
317 318
 	err = XTReadDB().Model(&models.Storehouse{}).Where("id = ?", id).Find(&storehouse).Error
318 319
 	return
319 320
 }
320 321
 
321
-//判断该仓库是否在仓库配置表中
322
+// 判断该仓库是否在仓库配置表中
322 323
 func IsInConfig(orgid, id int64) bool {
323 324
 	var total int
324 325
 	XTReadDB().Model(&models.StorehouseConfig{}).Where("user_org_id = ? and status = 1", orgid).Where(
@@ -330,7 +331,7 @@ func IsInConfig(orgid, id int64) bool {
330 331
 	}
331 332
 }
332 333
 
333
-//兼容旧数据
334
+// 兼容旧数据
334 335
 func Byliinit() (err error) {
335 336
 	tx := XTWriteDB().Begin()
336 337
 	defer func() {
@@ -449,13 +450,13 @@ func Byliinit() (err error) {
449 450
 	return
450 451
 }
451 452
 
452
-//初始化管理员名字
453
+// 初始化管理员名字
453 454
 func initsgj_user_admin(tx *gorm.DB) (err error) {
454 455
 	err = tx.Exec("update sgj_users.sgj_user_admin set name = \"超级管理员\" where name is null or name = \"\"").Error
455 456
 	return
456 457
 }
457 458
 
458
-//根据xt_gobal_template 获取的机构id减去仓库表存在的机构id,把结果插入到仓库表
459
+// 根据xt_gobal_template 获取的机构id减去仓库表存在的机构id,把结果插入到仓库表
459 460
 func StoreReduceOrg(tx *gorm.DB) (err error) {
460 461
 	err = tx.Exec("INSERT INTO sgj_xt.xt_storehouse(storehouse_code,storehouse_name,user_org_id,ctime)" +
461 462
 		"SELECT CONCAT(\"SH-\",FLOOR(RAND()*9000+1000)),\"默认仓库\",tmp.id,UNIX_TIMESTAMP()" +
@@ -470,7 +471,7 @@ func StoreReduceOrg(tx *gorm.DB) (err error) {
470 471
 	return
471 472
 }
472 473
 
473
-//查找仓库表的orgid 减去仓库配置表的orgid,把结果插入到仓库配置表
474
+// 查找仓库表的orgid 减去仓库配置表的orgid,把结果插入到仓库配置表
474 475
 func StoreReduceConfig(tx *gorm.DB) (err error) {
475 476
 	err = tx.Exec("INSERT INTO sgj_xt.xt_storehouse_config(user_org_id,storehouse_info,storehouse_out_info,drug_storehouse_info,drug_storehouse_out,ctime)" +
476 477
 		"SELECT tmp.user_org_id,tmp.id,tmp.id,tmp.id,tmp.id,UNIX_TIMESTAMP()" +
@@ -479,7 +480,7 @@ func StoreReduceConfig(tx *gorm.DB) (err error) {
479 480
 	return
480 481
 }
481 482
 
482
-//初始化 xt_storehouse 管理员的名字
483
+// 初始化 xt_storehouse 管理员的名字
483 484
 func initxt_storehouse(tx *gorm.DB) (err error) {
484 485
 	err = tx.Exec("UPDATE sgj_xt.xt_storehouse as t," +
485 486
 		"(SELECT o.id,o.creator from sgj_users.sgj_user_org as o," +
@@ -490,7 +491,7 @@ func initxt_storehouse(tx *gorm.DB) (err error) {
490 491
 	return
491 492
 }
492 493
 
493
-//初始化 xt_stock_flow(完成)
494
+// 初始化 xt_stock_flow(完成)
494 495
 func initxt_stock_flow(tx *gorm.DB) (err error) {
495 496
 	err = tx.Exec("UPDATE sgj_xt.xt_stock_flow as t," +
496 497
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -501,7 +502,7 @@ func initxt_stock_flow(tx *gorm.DB) (err error) {
501 502
 	return
502 503
 }
503 504
 
504
-//初始化 xt_drug_flow(完成)
505
+// 初始化 xt_drug_flow(完成)
505 506
 func initxt_drug_flow(tx *gorm.DB) (err error) {
506 507
 	err = tx.Exec("UPDATE sgj_xt.xt_drug_flow as t," +
507 508
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -512,7 +513,7 @@ func initxt_drug_flow(tx *gorm.DB) (err error) {
512 513
 	return
513 514
 }
514 515
 
515
-//初始化 dialysis_before_prepare(完成)
516
+// 初始化 dialysis_before_prepare(完成)
516 517
 func initdialysis_before_prepare(tx *gorm.DB) (err error) {
517 518
 	err = tx.Exec("UPDATE sgj_xt.dialysis_before_prepare as t," +
518 519
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -523,7 +524,7 @@ func initdialysis_before_prepare(tx *gorm.DB) (err error) {
523 524
 	return
524 525
 }
525 526
 
526
-//初始化 xt_automatic_reduce_detail(完成)
527
+// 初始化 xt_automatic_reduce_detail(完成)
527 528
 func initxt_automatic_reduce_detail(tx *gorm.DB) (err error) {
528 529
 	err = tx.Exec("UPDATE sgj_xt.xt_automatic_reduce_detail as t," +
529 530
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_out_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -534,7 +535,7 @@ func initxt_automatic_reduce_detail(tx *gorm.DB) (err error) {
534 535
 	return
535 536
 }
536 537
 
537
-//初始化 xt_drug_automatic_reduce_detail(完成)
538
+// 初始化 xt_drug_automatic_reduce_detail(完成)
538 539
 func initxt_drug_automatic_reduce_detail(tx *gorm.DB) (err error) {
539 540
 	err = tx.Exec("UPDATE sgj_xt.xt_drug_automatic_reduce_detail as t," +
540 541
 		"(SELECT t1.user_org_id as orgid,t1.drug_storehouse_out as id from sgj_xt.xt_storehouse_config as t1," +
@@ -545,7 +546,7 @@ func initxt_drug_automatic_reduce_detail(tx *gorm.DB) (err error) {
545 546
 	return
546 547
 }
547 548
 
548
-//初始化 xt_warehouse(完成)
549
+// 初始化 xt_warehouse(完成)
549 550
 func initxt_warehouse(tx *gorm.DB) (err error) {
550 551
 	err = tx.Exec("UPDATE sgj_xt.xt_warehouse as t," +
551 552
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -556,7 +557,7 @@ func initxt_warehouse(tx *gorm.DB) (err error) {
556 557
 	return
557 558
 }
558 559
 
559
-//初始化 xt_warehouse_info(完成)
560
+// 初始化 xt_warehouse_info(完成)
560 561
 func initxt_warehouse_info(tx *gorm.DB) (err error) {
561 562
 	err = tx.Exec("UPDATE sgj_xt.xt_warehouse_info as t," +
562 563
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -567,7 +568,7 @@ func initxt_warehouse_info(tx *gorm.DB) (err error) {
567 568
 	return
568 569
 }
569 570
 
570
-//初始化 xt_warehouse_out(完成)
571
+// 初始化 xt_warehouse_out(完成)
571 572
 func initxt_warehouse_out(tx *gorm.DB) (err error) {
572 573
 	err = tx.Exec("UPDATE sgj_xt.xt_warehouse_out as t," +
573 574
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_out_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -578,7 +579,7 @@ func initxt_warehouse_out(tx *gorm.DB) (err error) {
578 579
 	return
579 580
 }
580 581
 
581
-//初始化 xt_warehouse_out_info(完成)
582
+// 初始化 xt_warehouse_out_info(完成)
582 583
 func initxt_warehouse_out_info(tx *gorm.DB) (err error) {
583 584
 	err = tx.Exec("UPDATE sgj_xt.xt_warehouse_out_info as t," +
584 585
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_out_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -589,7 +590,7 @@ func initxt_warehouse_out_info(tx *gorm.DB) (err error) {
589 590
 	return
590 591
 }
591 592
 
592
-//初始化 xt_drug_warehouse(完成)
593
+// 初始化 xt_drug_warehouse(完成)
593 594
 func initxt_drug_warehouse(tx *gorm.DB) (err error) {
594 595
 	err = tx.Exec("UPDATE sgj_xt.xt_drug_warehouse as t," +
595 596
 		"(SELECT t1.user_org_id as orgid,t1.drug_storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -600,7 +601,7 @@ func initxt_drug_warehouse(tx *gorm.DB) (err error) {
600 601
 	return
601 602
 }
602 603
 
603
-//初始化 xt_drug_warehouse_info(完成)
604
+// 初始化 xt_drug_warehouse_info(完成)
604 605
 func initxt_drug_warehouse_info(tx *gorm.DB) (err error) {
605 606
 	err = tx.Exec("UPDATE sgj_xt.xt_drug_warehouse_info as t," +
606 607
 		"(SELECT t1.user_org_id as orgid,t1.drug_storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -611,7 +612,7 @@ func initxt_drug_warehouse_info(tx *gorm.DB) (err error) {
611 612
 	return
612 613
 }
613 614
 
614
-//初始化 xt_drug_warehouse_out(完成)
615
+// 初始化 xt_drug_warehouse_out(完成)
615 616
 func initxt_drug_warehouse_out(tx *gorm.DB) (err error) {
616 617
 	err = tx.Exec("UPDATE sgj_xt.xt_drug_warehouse_out as t," +
617 618
 		"(SELECT t1.user_org_id as orgid,t1.drug_storehouse_out as id from sgj_xt.xt_storehouse_config as t1," +
@@ -622,7 +623,7 @@ func initxt_drug_warehouse_out(tx *gorm.DB) (err error) {
622 623
 	return
623 624
 }
624 625
 
625
-//初始化 xt_drug_warehouse_out_info(完成)
626
+// 初始化 xt_drug_warehouse_out_info(完成)
626 627
 func initxt_drug_warehouse_out_info(tx *gorm.DB) (err error) {
627 628
 	err = tx.Exec("UPDATE sgj_xt.xt_drug_warehouse_out_info as t," +
628 629
 		"(SELECT t1.user_org_id as orgid,t1.drug_storehouse_out as id from sgj_xt.xt_storehouse_config as t1," +
@@ -633,7 +634,7 @@ func initxt_drug_warehouse_out_info(tx *gorm.DB) (err error) {
633 634
 	return
634 635
 }
635 636
 
636
-//初始化 xt_cancel_stock(完成)
637
+// 初始化 xt_cancel_stock(完成)
637 638
 func initxt_cancel_stock(tx *gorm.DB) (err error) {
638 639
 	err = tx.Exec("UPDATE sgj_xt.xt_cancel_stock as t," +
639 640
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_out_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -644,7 +645,7 @@ func initxt_cancel_stock(tx *gorm.DB) (err error) {
644 645
 	return
645 646
 }
646 647
 
647
-//初始化 xt_cancel_stock_info(完成)
648
+// 初始化 xt_cancel_stock_info(完成)
648 649
 func initxt_cancel_stock_info(tx *gorm.DB) (err error) {
649 650
 	err = tx.Exec("UPDATE sgj_xt.xt_cancel_stock_info as t," +
650 651
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_out_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -655,7 +656,7 @@ func initxt_cancel_stock_info(tx *gorm.DB) (err error) {
655 656
 	return
656 657
 }
657 658
 
658
-//初始化 xt_drug_cancel_stock(完成)
659
+// 初始化 xt_drug_cancel_stock(完成)
659 660
 func initxt_drug_cancel_stock(tx *gorm.DB) (err error) {
660 661
 	err = tx.Exec("UPDATE sgj_xt.xt_drug_cancel_stock as t," +
661 662
 		"(SELECT t1.user_org_id as orgid,t1.drug_storehouse_out as id from sgj_xt.xt_storehouse_config as t1," +
@@ -666,7 +667,7 @@ func initxt_drug_cancel_stock(tx *gorm.DB) (err error) {
666 667
 	return
667 668
 }
668 669
 
669
-//初始化 xt_drug_cancel_stock_info(完成)
670
+// 初始化 xt_drug_cancel_stock_info(完成)
670 671
 func initxt_drug_cancel_stock_info(tx *gorm.DB) (err error) {
671 672
 	err = tx.Exec("UPDATE sgj_xt.xt_drug_cancel_stock_info as t," +
672 673
 		"(SELECT t1.user_org_id as orgid,t1.drug_storehouse_out as id from sgj_xt.xt_storehouse_config as t1," +
@@ -677,7 +678,7 @@ func initxt_drug_cancel_stock_info(tx *gorm.DB) (err error) {
677 678
 	return
678 679
 }
679 680
 
680
-//初始化 xt_supplier_warehouse_info(完成)
681
+// 初始化 xt_supplier_warehouse_info(完成)
681 682
 func initxt_supplier_warehouse_info(tx *gorm.DB) (err error) {
682 683
 	err = tx.Exec("UPDATE sgj_xt.xt_supplier_warehouse_info as t," +
683 684
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -688,7 +689,7 @@ func initxt_supplier_warehouse_info(tx *gorm.DB) (err error) {
688 689
 	return
689 690
 }
690 691
 
691
-//初始化 xt_supplier_warehousing_info_order(完成)
692
+// 初始化 xt_supplier_warehousing_info_order(完成)
692 693
 func initxt_supplier_warehousing_info_order(tx *gorm.DB) (err error) {
693 694
 	err = tx.Exec("UPDATE sgj_xt.xt_supplier_warehousing_info_order as t," +
694 695
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -699,7 +700,7 @@ func initxt_supplier_warehousing_info_order(tx *gorm.DB) (err error) {
699 700
 	return
700 701
 }
701 702
 
702
-//初始化 xt_supplier_warehouse_out(完成)
703
+// 初始化 xt_supplier_warehouse_out(完成)
703 704
 func initxt_supplier_warehouse_out(tx *gorm.DB) (err error) {
704 705
 	err = tx.Exec("UPDATE sgj_xt.xt_supplier_warehouse_out as t," +
705 706
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_out_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -710,7 +711,7 @@ func initxt_supplier_warehouse_out(tx *gorm.DB) (err error) {
710 711
 	return
711 712
 }
712 713
 
713
-//初始化 xt_supplier_warehousing_out_order(完成)
714
+// 初始化 xt_supplier_warehousing_out_order(完成)
714 715
 func initxt_supplier_warehousing_out_order(tx *gorm.DB) (err error) {
715 716
 	err = tx.Exec("UPDATE sgj_xt.xt_supplier_warehousing_out_order as t," +
716 717
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -721,7 +722,7 @@ func initxt_supplier_warehousing_out_order(tx *gorm.DB) (err error) {
721 722
 	return
722 723
 }
723 724
 
724
-//初始化 xt_supplier_warehouse_cancel(完成)
725
+// 初始化 xt_supplier_warehouse_cancel(完成)
725 726
 func initxt_supplier_warehouse_cancel(tx *gorm.DB) (err error) {
726 727
 	err = tx.Exec("UPDATE sgj_xt.xt_supplier_warehouse_cancel as t," +
727 728
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -732,7 +733,7 @@ func initxt_supplier_warehouse_cancel(tx *gorm.DB) (err error) {
732 733
 	return
733 734
 }
734 735
 
735
-//初始化 xt_supplier_warehousing_cancel_order(完成)
736
+// 初始化 xt_supplier_warehousing_cancel_order(完成)
736 737
 func initxt_supplier_warehousing_cancel_order(tx *gorm.DB) (err error) {
737 738
 	err = tx.Exec("UPDATE sgj_xt.xt_supplier_warehousing_cancel_order as t," +
738 739
 		"(SELECT t1.user_org_id as orgid,t1.storehouse_info as id from sgj_xt.xt_storehouse_config as t1," +
@@ -743,13 +744,13 @@ func initxt_supplier_warehousing_cancel_order(tx *gorm.DB) (err error) {
743 744
 	return
744 745
 }
745 746
 
746
-//查询机构创建者的id
747
+// 查询机构创建者的id
747 748
 func Getcreateid(orgid int64) (createid models.UserOrg, err error) {
748 749
 	err = XTReadDB().Select("id,creator").Where("id = ? and status = 1", orgid).Find(&createid).Error
749 750
 	return
750 751
 }
751 752
 
752
-//根据机构id查询拥有仓库管理权限的角色
753
+// 根据机构id查询拥有仓库管理权限的角色
753 754
 func FindRoles(orgid int64) map[string]int {
754 755
 	role := []models.RolePurviews{}
755 756
 	tmp := models.PurviewTmp{}
@@ -764,7 +765,7 @@ func FindRoles(orgid int64) map[string]int {
764 765
 	return roles
765 766
 }
766 767
 
767
-//判断两个切片中的元素是否有重复的,true有重复的元素,false无相同元素
768
+// 判断两个切片中的元素是否有重复的,true有重复的元素,false无相同元素
768 769
 func IsIdentical(str1 []string, str2 []string) (t bool) {
769 770
 	t = false
770 771
 	if len(str1) == 0 || len(str2) == 0 {
@@ -785,7 +786,6 @@ func IsIdentical(str1 []string, str2 []string) (t bool) {
785 786
 	return
786 787
 }
787 788
 
788
-//
789 789
 func GetAllStoreHouseList(orgid int64) (house []*models.XtStorehouse, err error) {
790 790
 
791 791
 	err = XTReadDB().Where("user_org_id = ? and status = 1", orgid).Find(&house).Error

+ 1 - 1
service/sign_weigh_service.go 查看文件

@@ -27,7 +27,7 @@ func GetSignPatients(orgId int64, keywords string, dateTime, schedule_type int64
27 27
 	return
28 28
 }
29 29
 
30
-//GetSignPanels  签到称重班次休息
30
+// GetSignPanels  签到称重班次休息
31 31
 func GetSignPanels(orgid, dateTime int64) (map[int64]map[string]int64, error) {
32 32
 	fmt.Println(dateTime)
33 33
 	fmt.Println("世界的尽头")

+ 6 - 6
service/statistics_service/index_evaluation_service.go 查看文件

@@ -28,7 +28,7 @@ type ProcessIndexDataStruct struct {
28 28
 	Value float64 `json:"value"`
29 29
 }
30 30
 
31
-//透析过程统计
31
+// 透析过程统计
32 32
 func GetDialysisProcessIndexChartData(user_org_id int64, patient_id int64, start_time int64, end_time int64, statistics_type int) (datas []*ProcessIndexDataStruct, err error) {
33 33
 	db := service.XTReadDB()
34 34
 	switch statistics_type {
@@ -176,7 +176,7 @@ func GetAnticoagulantData(user_org_id int64) (config []*models.Dataconfig, tempE
176 176
 
177 177
 //透析过程统计
178 178
 
179
-//透析监测统计
179
+// 透析监测统计
180 180
 func GetDialysisWatchChartData(user_org_id int64, patient_id int64, start_time int64, end_time int64, statistics_type int) (datas []*ProcessIndexDataStruct, err error) {
181 181
 	db := service.XTReadDB()
182 182
 	switch statistics_type {
@@ -334,7 +334,7 @@ func GetDialysisWatchTableData(orgID, patientID int64, page, limit, start, end i
334 334
 
335 335
 //透析监测统计
336 336
 
337
-//透析体重统计
337
+// 透析体重统计
338 338
 func GetDialysisWeightChartData(user_org_id int64, start_time int64, end_time int64, statistics_type int) (item []*otherItemAmount, err error) {
339 339
 	db := service.XTReadDB()
340 340
 	var items []*otherItemAmount
@@ -826,7 +826,7 @@ func GetPatientDialysisWeightChartData(user_org_id int64, patient_id int64, star
826 826
 
827 827
 //透析体重统计
828 828
 
829
-//透析血压统计
829
+// 透析血压统计
830 830
 func GetBloodPressureChartData(user_org_id int64, start_time int64, end_time int64, statistics_type int, patient_id int64) (item []*otherItemAmount, err error) {
831 831
 	db := service.XTReadDB()
832 832
 	var items []*otherItemAmount
@@ -1157,7 +1157,7 @@ func GetPatientBloodPressureChartData(user_org_id int64, patient_id int64, start
1157 1157
 
1158 1158
 //透析血压统计
1159 1159
 
1160
-//工作量统计
1160
+// 工作量统计
1161 1161
 func GetDoctorWorkloadChartData(user_org_id int64, start_time int64, end_time int64, statistics_type int, admin_user_id int64) (datas []*VMUserAdminRole, err error) {
1162 1162
 	userDb := service.UserReadDB()
1163 1163
 	db := service.XTReadDB()
@@ -1550,7 +1550,7 @@ func GetNurseWorkloadTableData(user_org_id int64, start_time int64, end_time int
1550 1550
 //
1551 1551
 //}
1552 1552
 
1553
-//工作量统计
1553
+// 工作量统计
1554 1554
 type AdminUser struct {
1555 1555
 	ID          int64  `gorm:"column:id" json:"id" form:"id"`
1556 1556
 	AdminUserId int64  `gorm:"column:admin_user_id" json:"admin_user_id" form:"admin_user_id"`

+ 19 - 19
service/supply_service.go 查看文件

@@ -8,13 +8,13 @@ import (
8 8
 	"time"
9 9
 )
10 10
 
11
-//根据供应商编号获取首要联系人
11
+// 根据供应商编号获取首要联系人
12 12
 func FindName(code string, orgid int64) (fistname models.SpSupplierContacts, err error) {
13 13
 	err = XTReadDB().Model(&models.SpSupplierContacts{}).Where("supplier_code = ? and status = 1 and is_first = 1 and user_org_id = ?", code, orgid).First(&fistname).Error
14 14
 	return fistname, err
15 15
 }
16 16
 
17
-//供应商分页
17
+// 供应商分页
18 18
 func GetSupplyList(ctype int64, page int64, limit int64, keyword string, orgid int64) (supplylist []*models.SpSupplierName, total int64, err error) {
19 19
 	db := XTReadDB().Model(&supplylist).Where("xt_supplier_name.status = 1 and xt_supplier_name.user_org_id = ?", orgid)
20 20
 	offset := (page - 1) * limit
@@ -30,7 +30,7 @@ func GetSupplyList(ctype int64, page int64, limit int64, keyword string, orgid i
30 30
 	return supplylist, total, err
31 31
 }
32 32
 
33
-//修改供应商和联系人
33
+// 修改供应商和联系人
34 34
 func UpdateSupplyAndContact(thisStockIn []interface{}, suid, orgId, supplierType, tcreater int64, supplierCode, supplierName, number, bank, bankAccount string, vatRate float64) error {
35 35
 	tx := XTWriteDB().Begin()
36 36
 	defer func() {
@@ -130,37 +130,37 @@ func UpdateSupplyAndContact(thisStockIn []interface{}, suid, orgId, supplierType
130 130
 	return err
131 131
 }
132 132
 
133
-//更新一条供应商的信息,添加了事务的
133
+// 更新一条供应商的信息,添加了事务的
134 134
 func UpdateSupplyNameTX(upsupply models.SpSupplierName, tx *gorm.DB) error {
135 135
 	err := tx.Model(&models.SpSupplierName{}).Where("id = ? and status = 1", upsupply.ID).Updates(map[string]interface{}{"supplier_code": upsupply.SupplierCode, "supplier_name": upsupply.SupplierName, "supplier_type": upsupply.SupplierType, "vat_rate": upsupply.VatRate, "number": upsupply.Number, "bank": upsupply.Bank, "bank_account": upsupply.BankAccount, "user_org_id": upsupply.UserOrgId, "status": upsupply.Status, "contacts_id": upsupply.ContactsId, "mtime": upsupply.Mtime, "modify": upsupply.Modify}).Error
136 136
 	return err
137 137
 }
138 138
 
139
-//更新一条供应商的信息,没有添加事务
139
+// 更新一条供应商的信息,没有添加事务
140 140
 func UpdateSupplyName(upsupply models.SpSupplierName) error {
141 141
 	err := XTWriteDB().Model(&models.SpSupplierName{}).Where("id = ? and status = 1", upsupply.ID).Updates(map[string]interface{}{"supplier_code": upsupply.SupplierCode, "supplier_name": upsupply.SupplierName, "supplier_type": upsupply.SupplierType, "vat_rate": upsupply.VatRate, "number": upsupply.Number, "bank": upsupply.Bank, "bank_account": upsupply.BankAccount, "user_org_id": upsupply.UserOrgId, "status": upsupply.Status, "contacts_id": upsupply.ContactsId, "mtime": upsupply.Mtime, "modify": upsupply.Modify}).Error
142 142
 	return err
143 143
 }
144 144
 
145
-//更新一条联系人的信息
145
+// 更新一条联系人的信息
146 146
 func UpdateContact(updatecontacts models.SpSupplierContacts, tx *gorm.DB) error {
147 147
 	err := tx.Model(&models.SpSupplierContacts{}).Where("id = ? and status = 1", updatecontacts.ID).Updates(map[string]interface{}{"name": updatecontacts.Name, "phone": updatecontacts.Phone, "address": updatecontacts.Address, "is_first": updatecontacts.IsFirst, "supplier_code": updatecontacts.SupplierCode, "user_org_id": updatecontacts.UserOrgId, "status": updatecontacts.Status, "mtime": updatecontacts.Mtime}).Error
148 148
 	return err
149 149
 }
150 150
 
151
-//查询供应商单条记录
151
+// 查询供应商单条记录
152 152
 func GetSupplyOne(id int64) (supply models.SpSupplierName, err error) {
153 153
 	err = XTReadDB().Model(&models.SpSupplierName{}).Where("id = ? and status = 1", id).First(&supply).Error
154 154
 	return supply, err
155 155
 }
156 156
 
157
-//删除单条联系人记录
157
+// 删除单条联系人记录
158 158
 func DelContactOne(id int64) error {
159 159
 	err := XTWriteDB().Model(&models.SpSupplierContacts{}).Where("id = ?", id).Update("status", 0).Error
160 160
 	return err
161 161
 }
162 162
 
163
-//获取单条供应商和涉及到的联系人记录
163
+// 获取单条供应商和涉及到的联系人记录
164 164
 func GetSupplyAndContactOne(id, orgId int64) (supply models.SpSupplierName, contact []*models.SpSupplierContacts, err error) {
165 165
 	err = XTReadDB().Model(&models.SpSupplierName{}).Where("id = ? and status = 1 and user_org_id = ?", id, orgId).First(&supply).Error
166 166
 	code := supply.SupplierCode
@@ -168,7 +168,7 @@ func GetSupplyAndContactOne(id, orgId int64) (supply models.SpSupplierName, cont
168 168
 	return supply, contact, err
169 169
 }
170 170
 
171
-//删除供应商及联系人
171
+// 删除供应商及联系人
172 172
 func DelSupply(supply models.SpSupplierName, orgId int64) (shiwu string, err error) {
173 173
 	tx := XTWriteDB().Begin()
174 174
 	defer func() {
@@ -197,7 +197,7 @@ func DelSupply(supply models.SpSupplierName, orgId int64) (shiwu string, err err
197 197
 	return shiwu, err
198 198
 }
199 199
 
200
-//保存供应商和联系人
200
+// 保存供应商和联系人
201 201
 func SaveSupplyAndContact(thisStockIn []interface{}, orgId, supplierType, tcreater int64, supplierCode, supplierName, number, bank, bankAccount string, vatRate float64) error {
202 202
 	tx := XTWriteDB().Begin()
203 203
 	defer func() {
@@ -272,13 +272,13 @@ func SaveSupplyAndContact(thisStockIn []interface{}, orgId, supplierType, tcreat
272 272
 	return err
273 273
 }
274 274
 
275
-//获取供应商编码
275
+// 获取供应商编码
276 276
 func GetSuppliyCode(orgId int64) (spcode []*models.SpSupplierName, err error) {
277 277
 	err = XTReadDB().Model(&models.SpSupplierName{}).Select("supplier_code").Where("supplier_code like 'gys%' and status = 1 and user_org_id = ? ", orgId).Order("supplier_code desc").First(&spcode).Error
278 278
 	return spcode, err
279 279
 }
280 280
 
281
-//查询供应商的名字是否有重复
281
+// 查询供应商的名字是否有重复
282 282
 func FindSupplierName(supplierName string, orgId int64) (sbool bool, err error) {
283 283
 	var total int
284 284
 	err = XTReadDB().Model(&models.SpSupplierName{}).Where("supplier_name = ? and user_org_id = ? and status = 1", supplierName, orgId).Count(&total).Error
@@ -290,7 +290,7 @@ func FindSupplierName(supplierName string, orgId int64) (sbool bool, err error)
290 290
 	return sbool, err
291 291
 }
292 292
 
293
-//查询供应商的编号是否有重复(用于修改)
293
+// 查询供应商的编号是否有重复(用于修改)
294 294
 func FindSupplierCode(supplierCode string, supplierid, orgid int64) (codebool bool, err error) {
295 295
 	var total int
296 296
 	err = XTReadDB().Model(&models.SpSupplierName{}).Where("supplier_code = ? and id != ? and user_org_id = ? and status = 1", supplierCode, supplierid, orgid).Count(&total).Error
@@ -302,7 +302,7 @@ func FindSupplierCode(supplierCode string, supplierid, orgid int64) (codebool bo
302 302
 	return codebool, err
303 303
 }
304 304
 
305
-//查询供应商的编号是否有重复(用于新增)
305
+// 查询供应商的编号是否有重复(用于新增)
306 306
 func FindSupplierCodes(supplierCode string, orgid int64) (codebool bool, err error) {
307 307
 	var total int
308 308
 	err = XTReadDB().Model(&models.SpSupplierName{}).Where("supplier_code = ? and status = 1 and user_org_id = ?", supplierCode, orgid).Count(&total).Error
@@ -314,25 +314,25 @@ func FindSupplierCodes(supplierCode string, orgid int64) (codebool bool, err err
314 314
 	return codebool, err
315 315
 }
316 316
 
317
-//保存一条供应商数据加事务的
317
+// 保存一条供应商数据加事务的
318 318
 func SaveSupplyTx(supply models.SpSupplierName, tx *gorm.DB) error {
319 319
 	err := tx.Create(&supply).Error
320 320
 	return err
321 321
 }
322 322
 
323
-//保存一条供应商数据没有事务的
323
+// 保存一条供应商数据没有事务的
324 324
 func SaveSupply(supply models.SpSupplierName) error {
325 325
 	err := XTWriteDB().Create(&supply).Error
326 326
 	return err
327 327
 }
328 328
 
329
-//获取联系人的id
329
+// 获取联系人的id
330 330
 func SaveContactsId(tx *gorm.DB, orgid int64) (spconid []*models.SpSupplierContacts, err error) {
331 331
 	err = tx.Model(&models.SpSupplierContacts{}).Select("id").Where("status = 1 and user_org_id = ?", orgid).Order("id desc").First(&spconid).Error
332 332
 	return
333 333
 }
334 334
 
335
-//保存一条联系人数据
335
+// 保存一条联系人数据
336 336
 func SaveContacts(spcontacts models.SpSupplierContacts, tx *gorm.DB) error {
337 337
 	err := tx.Create(&spcontacts).Error
338 338
 	return err

+ 53 - 46
service/verify_login_token_service.go 查看文件

@@ -130,7 +130,6 @@ func VerifyToken(token string, ip string, sessionID string) (*AdminUserInfo, err
130 130
 		return nil, err, 0
131 131
 	}
132 132
 
133
-
134 133
 	if respJSON["state"].(float64) != 1 {
135 134
 		msg := respJSON["msg"].(string)
136 135
 		utils.ErrorLog("验证 sso token 接口请求失败: %v", msg)
@@ -204,9 +203,10 @@ func processOrgIds(data map[string]interface{}) []int64 {
204 203
 }
205 204
 
206 205
 // "orgs": { (org_id: Org_Obj)
207
-// 	1: { Org's json },
208
-// 	2: { Org's json },
209
-// },
206
+//
207
+//		1: { Org's json },
208
+//		2: { Org's json },
209
+//	},
210 210
 func processOrgs(data map[string]interface{}) map[int64]*models.Org {
211 211
 	orgJSONs := data["orgs"].(map[string]interface{})
212 212
 	orgs := make(map[int64]*models.Org)
@@ -220,9 +220,10 @@ func processOrgs(data map[string]interface{}) map[int64]*models.Org {
220 220
 }
221 221
 
222 222
 // "org_app_ids": { (org_id: org_app_ids)
223
-// 	1: [11, 12, 13],
224
-// 	2: [21, 22, 23],
225
-// },
223
+//
224
+//		1: [11, 12, 13],
225
+//		2: [21, 22, 23],
226
+//	},
226 227
 func processOrgAppIds(data map[string]interface{}) map[int64][]int64 {
227 228
 	orgAppIdStrs := data["org_app_ids"].(map[string]interface{})
228 229
 	orgAppIds := make(map[int64][]int64)
@@ -239,15 +240,16 @@ func processOrgAppIds(data map[string]interface{}) map[int64][]int64 {
239 240
 }
240 241
 
241 242
 // "org_apps": { (org_id: {app_id: OrgApp_Obj})
242
-// 	1: {
243
-// 		11: { OrgApp's json },
244
-// 		12: { OrgApp's json },
245
-// 	},
246
-// 	2: {
247
-// 		21: { OrgApp's json },
248
-// 		22: { OrgApp's json },
249
-// 	},
250
-// },
243
+//
244
+//		1: {
245
+//			11: { OrgApp's json },
246
+//			12: { OrgApp's json },
247
+//		},
248
+//		2: {
249
+//			21: { OrgApp's json },
250
+//			22: { OrgApp's json },
251
+//		},
252
+//	},
251 253
 func processOrgApps(data map[string]interface{}) map[int64]map[int64]*models.OrgApp {
252 254
 	orgAppJSONs := data["org_apps"].(map[string]interface{})
253 255
 	orgApps := make(map[int64]map[int64]*models.OrgApp)
@@ -269,11 +271,12 @@ func processOrgApps(data map[string]interface{}) map[int64]map[int64]*models.Org
269 271
 }
270 272
 
271 273
 // "app_to_org_ids": { (app_id: org_id)
272
-// 	11: 1,
273
-// 	12: 1,
274
-// 	21: 2,
275
-// 	22: 2,
276
-// },
274
+//
275
+//		11: 1,
276
+//		12: 1,
277
+//		21: 2,
278
+//		22: 2,
279
+//	},
277 280
 func processApp2OrgIds(data map[string]interface{}) map[int64]int64 {
278 281
 	app2OrgIdStrs := data["app_to_org_ids"].(map[string]interface{})
279 282
 	app2OrgIds := make(map[int64]int64)
@@ -286,10 +289,11 @@ func processApp2OrgIds(data map[string]interface{}) map[int64]int64 {
286 289
 }
287 290
 
288 291
 // "app_roles": { (app_id: App_Role Obj)
289
-// 	11: {App_Role's json},
290
-// 	12: {App_Role's json},
291
-// 	21: {App_Role's json},
292
-// },
292
+//
293
+//		11: {App_Role's json},
294
+//		12: {App_Role's json},
295
+//		21: {App_Role's json},
296
+//	},
293 297
 func processAppRoles(data map[string]interface{}) map[int64]*models.App_Role {
294 298
 	appRoleJSONs := data["app_roles"].(map[string]interface{})
295 299
 	appRoles := make(map[int64]*models.App_Role)
@@ -303,18 +307,19 @@ func processAppRoles(data map[string]interface{}) map[int64]*models.App_Role {
303 307
 }
304 308
 
305 309
 // "purviews": { (app_id: [processed Purviews' json])
306
-// 	11: [
307
-// 		{Purview's json .childs[
308
-// 			{Purview's json},
309
-// 			{Purview's json},
310
-// 		]},
311
-// 		{Purview's json},
312
-// 	],
313
-// 	12: [
314
-// 		{Purview's json},
315
-// 		{Purview's json},
316
-// 	],
317
-// },
310
+//
311
+//		11: [
312
+//			{Purview's json .childs[
313
+//				{Purview's json},
314
+//				{Purview's json},
315
+//			]},
316
+//			{Purview's json},
317
+//		],
318
+//		12: [
319
+//			{Purview's json},
320
+//			{Purview's json},
321
+//		],
322
+//	},
318 323
 func processPurviews(data map[string]interface{}) map[int64][]*models.Purview {
319 324
 	appPurviewJSONsStrs := data["purviews"].(map[string]interface{})
320 325
 	appPurviews := make(map[int64][]*models.Purview)
@@ -345,13 +350,14 @@ func processPurviews(data map[string]interface{}) map[int64][]*models.Purview {
345 350
 // }
346 351
 
347 352
 // "purview_urlfors": { (app_id: [url_for])
348
-// 	11: [
349
-// 		"Controller1.Action1",
350
-// 		"Controller1.Action2",
351
-// 		"Controller2.Action1",
352
-// 		"Controller2.Action2",
353
-// 	],
354
-// }
353
+//
354
+//		11: [
355
+//			"Controller1.Action1",
356
+//			"Controller1.Action2",
357
+//			"Controller2.Action1",
358
+//			"Controller2.Action2",
359
+//		],
360
+//	}
355 361
 func processPurviewUrlfors(data map[string]interface{}) map[int64][]string {
356 362
 	appUrlforsStrs := data["purview_urlfors"].(map[string]interface{})
357 363
 	appUrlfors := make(map[int64][]string)
@@ -365,8 +371,9 @@ func processPurviewUrlfors(data map[string]interface{}) map[int64][]string {
365 371
 }
366 372
 
367 373
 // "org_subscibes": { (org_id: ServeSubscibe)
368
-//  11: {ServeSubscibe's json}
369
-// },
374
+//
375
+//	 11: {ServeSubscibe's json}
376
+//	},
370 377
 func processOrgSubscibes(data map[string]interface{}) map[int64]*models.ServeSubscibe {
371 378
 	subscibeJSONs := data["org_subscibes"].(map[string]interface{})
372 379
 	subscibes := make(map[int64]*models.ServeSubscibe)

+ 37 - 4
service/warhouse_service.go 查看文件

@@ -4026,6 +4026,12 @@ func ConsumablesDeliveryTwelve(orgID int64, record_time int64, goods *models.War
4026 4026
 
4027 4027
 		AddWarehosingInfo(warehouseInfo)
4028 4028
 
4029
+		//查询剩余库存
4030
+		goodListOne, _ := GetAllGoodSumCount(goods.GoodId, orgID, warehouseInfo.StorehouseId)
4031
+		var sum_count_one int64
4032
+		for _, item := range goodListOne {
4033
+			sum_count_one += item.StockCount
4034
+		}
4029 4035
 		stockInfoFlow := models.VmStockFlow{
4030 4036
 			WarehousingId:           warehouseInfo.WarehousingId,
4031 4037
 			GoodId:                  goods.GoodId,
@@ -4059,6 +4065,7 @@ func ConsumablesDeliveryTwelve(orgID int64, record_time int64, goods *models.War
4059 4065
 			SupplyWarehouseId:       warehouse.SupplyWarehouseId,
4060 4066
 			StorehouseId:            warehouseInfo.StorehouseId,
4061 4067
 			SecondWarehouseInfoId:   warehouseInfo.SecondWarehouseInfoId,
4068
+			OverCount:               sum_count_one,
4062 4069
 		}
4063 4070
 
4064 4071
 		//创建入库流水
@@ -4199,6 +4206,12 @@ func ConsumablesDeliveryTwelve(orgID int64, record_time int64, goods *models.War
4199 4206
 
4200 4207
 		AddWarehosingInfo(warehouseInfo)
4201 4208
 
4209
+		//查询剩余库存
4210
+		goodListOne, _ := GetAllGoodSumCount(goods.GoodId, orgID, warehouseInfo.StorehouseId)
4211
+		var sum_count_one int64
4212
+		for _, item := range goodListOne {
4213
+			sum_count_one += item.StockCount
4214
+		}
4202 4215
 		stockInfoFlow := models.VmStockFlow{
4203 4216
 			WarehousingId:           warehouseInfo.WarehousingId,
4204 4217
 			GoodId:                  goods.GoodId,
@@ -4232,6 +4245,7 @@ func ConsumablesDeliveryTwelve(orgID int64, record_time int64, goods *models.War
4232 4245
 			SupplyWarehouseId:       warehouse.SupplyWarehouseId,
4233 4246
 			StorehouseId:            warehouseInfo.StorehouseId,
4234 4247
 			SecondWarehouseInfoId:   warehouseInfo.SecondWarehouseInfoId,
4248
+			OverCount:               sum_count_one,
4235 4249
 		}
4236 4250
 
4237 4251
 		//创建出库流水
@@ -4267,8 +4281,8 @@ func AutoDrugDeliverInfoTwelve(orgID int64, prescribingNumber int64, warehouseou
4267 4281
 	//开启事物
4268 4282
 	//storeConfig, _ := GetAllStoreHouseConfig(orgID)
4269 4283
 	lastWarehouse, _ := FindLastDrugWarehousingInfoByID(advice.DrugId, warehouseout.StorehouseId)
4270
-	fmt.Println("lastWarehouse.StockMinNumber", lastWarehouse.StockMinNumber)
4271
-	fmt.Println("drup.MinNumber", drup.MinNumber)
4284
+	//fmt.Println("lastWarehouse.StockMinNumber", lastWarehouse.StockMinNumber)
4285
+	//fmt.Println("drup.MinNumber", drup.MinNumber)
4272 4286
 	if lastWarehouse.StockMinNumber >= drup.MinNumber {
4273 4287
 		var stockMax int64
4274 4288
 		var stockMin int64
@@ -4289,8 +4303,8 @@ func AutoDrugDeliverInfoTwelve(orgID int64, prescribingNumber int64, warehouseou
4289 4303
 
4290 4304
 	stock_number = warehouse.StockMaxNumber*drup.MinNumber + warehouse.StockMinNumber
4291 4305
 
4292
-	fmt.Println("stock23233233232", stock_number)
4293
-	fmt.Println("deliver_number", deliver_number)
4306
+	//fmt.Println("stock23233233232", stock_number)
4307
+	//fmt.Println("deliver_number", deliver_number)
4294 4308
 
4295 4309
 	// 出库完成后,要减去对应批次的库存数量
4296 4310
 	// 判断处方里药品单位是拆零单位还是包装单位,	如果是拆零单位,则根据规格,将拆零数量转为包装数量
@@ -4455,6 +4469,15 @@ func AutoDrugDeliverInfoTwelve(orgID int64, prescribingNumber int64, warehouseou
4455 4469
 
4456 4470
 		CreateDrugWarehouseInfo(drugInfo)
4457 4471
 
4472
+		//查询剩余库存
4473
+		stockInfoOne, _ := GetDrugAllStockInfo(drugWarehouse.StorehouseId, orgID, advice.DrugId)
4474
+		var sum_count_one int64
4475
+		for _, its := range stockInfoOne {
4476
+			if its.MaxUnit == drup.MaxUnit {
4477
+				its.StockMaxNumber = its.StockMaxNumber * drup.MinNumber
4478
+			}
4479
+			sum_count_one += its.StockMaxNumber + its.StockMinNumber
4480
+		}
4458 4481
 		flow := models.DrugFlow{
4459 4482
 			WarehousingId:           drugWarehouse.WarehousingId,
4460 4483
 			DrugId:                  warehouse.DrugId,
@@ -4491,6 +4514,7 @@ func AutoDrugDeliverInfoTwelve(orgID int64, prescribingNumber int64, warehouseou
4491 4514
 			StockMinNumber:          deliver_number,
4492 4515
 			StorehouseId:            drugWarehouse.StorehouseId,
4493 4516
 			SecondWarehouseInfoId:   drugWarehouse.SecondWarehouseInfoId,
4517
+			OverCount:               sum_count_one,
4494 4518
 		}
4495 4519
 
4496 4520
 		CreateDrugFlowOne(flow)
@@ -4623,6 +4647,15 @@ func AutoDrugDeliverInfoTwelve(orgID int64, prescribingNumber int64, warehouseou
4623 4647
 
4624 4648
 		CreateDrugWarehouseInfo(drugInfo)
4625 4649
 
4650
+		//查询剩余库存
4651
+		stockInfoTwo, _ := GetDrugAllStockInfo(drugWarehouse.StorehouseId, orgID, advice.DrugId)
4652
+		var sum_count_one int64
4653
+		for _, its := range stockInfoTwo {
4654
+			if its.MaxUnit == drup.MaxUnit {
4655
+				its.StockMaxNumber = its.StockMaxNumber * drup.MinNumber
4656
+			}
4657
+			sum_count_one += its.StockMaxNumber + its.StockMinNumber
4658
+		}
4626 4659
 		flow := models.DrugFlow{
4627 4660
 			WarehousingId:           drugWarehouse.WarehousingId,
4628 4661
 			DrugId:                  warehouse.DrugId,

+ 0 - 1
src/golang.org/x/sync

@@ -1 +0,0 @@
1
-Subproject commit f12130a5280420d36872ab0a7717d160c768df46

+ 1 - 0
tests/default_test.go 查看文件

@@ -1,4 +1,5 @@
1 1
 package test
2
+
2 3
 //
3 4
 //import (
4 5
 //	_ "XT_New/routers"

+ 4 - 4
utils/tools.go 查看文件

@@ -72,7 +72,7 @@ func TimeAgo(timeUnix int64) string {
72 72
 	return ""
73 73
 }
74 74
 
75
-//Signature sha1签名
75
+// Signature sha1签名
76 76
 func Signature(params ...string) string {
77 77
 	sort.Strings(params)
78 78
 	h := sha1.New()
@@ -82,7 +82,7 @@ func Signature(params ...string) string {
82 82
 	return fmt.Sprintf("%x", h.Sum(nil))
83 83
 }
84 84
 
85
-//RandomStr 随机生成字符串
85
+// RandomStr 随机生成字符串
86 86
 func RandomStr(length int) string {
87 87
 	str := "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
88 88
 	bytes := []byte(str)
@@ -94,7 +94,7 @@ func RandomStr(length int) string {
94 94
 	return string(result)
95 95
 }
96 96
 
97
-//GetCurrTs return current timestamps
97
+// GetCurrTs return current timestamps
98 98
 func GetCurrTs() int64 {
99 99
 	return time.Now().Unix()
100 100
 }
@@ -154,7 +154,7 @@ type jSapiConfig struct {
154 154
 	Signature string `json:"signature"`
155 155
 }
156 156
 
157
-//GetAJTConfig jsapi_ticket config
157
+// GetAJTConfig jsapi_ticket config
158 158
 func GetAJTConfig(jsapiTicket, uri string) (jSapiConfig, error) {
159 159
 	var config jSapiConfig
160 160
 	nonceStr := RandomStr(16)