ソースを参照

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

陈少旭 3 週間 前
コミット
71676770d3

BIN
XT_New.exe ファイルの表示


+ 23 - 23
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
 #
@@ -51,75 +51,75 @@ sso_domain = https://sso.kuyicloud.com
51 51
 call_domain = https://hf.sgjyun.com
52 52
 front_end_domain = "https://xt.kuyicloud.com/#"
53 53
 
54
-readmysqlhost = shengws1.mysql.rds.aliyuncs.com
54
+readmysqlhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
55 55
 readmysqlport = 3306
56 56
 readmysqluser = syh
57
-readmysqlpass = xhPECP2nFObR8aUK
57
+readmysqlpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
58 58
 readmysqlname = sgj_xt
59 59
 
60 60
 
61 61
 
62
-readmysqlhost2 = rr-kuyicloud.mysql.rds.aliyuncs.com
62
+readmysqlhost2 = read-kuyicloud2024lt.mysql.rds.aliyuncs.com
63 63
 readmysqlport2 = 3306
64 64
 readmysqluser2 = syh
65
-readmysqlpass2 = xhPECP2nFObR8aUK
65
+readmysqlpass2 = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
66 66
 readmysqlname2 = sgj_xt
67 67
 
68
-writemysqlhost = shengws1.mysql.rds.aliyuncs.com
68
+writemysqlhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
69 69
 writemysqlport = 3306
70 70
 writemysqluser = syh
71
-writemysqlpass = xhPECP2nFObR8aUK
71
+writemysqlpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
72 72
 writemysqlname = sgj_xt
73 73
 
74 74
 
75
-readuserhost = shengws1.mysql.rds.aliyuncs.com
75
+readuserhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
76 76
 readuserport = 3306
77 77
 readuseruser = syh
78
-readuserpass = xhPECP2nFObR8aUK
78
+readuserpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
79 79
 readusername = sgj_users
80 80
 
81
-writeuserhost = shengws1.mysql.rds.aliyuncs.com
81
+writeuserhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
82 82
 writeuserport = 3306
83 83
 writeuseruser = syh
84
-writeuserpass = xhPECP2nFObR8aUK
84
+writeuserpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
85 85
 writeusername = sgj_users
86 86
 
87
-readmiddlehost = shengws1.mysql.rds.aliyuncs.com
87
+readmiddlehost = kuyicloud2024lt.mysql.rds.aliyuncs.com
88 88
 readmiddleport = 3306
89 89
 readmiddleuser = syh
90
-readmiddlepass = xhPECP2nFObR8aUK
90
+readmiddlepass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
91 91
 readmiddlename = ky_xt_middle
92 92
 
93
-writemiddlehost = shengws1.mysql.rds.aliyuncs.com
93
+writemiddlehost = kuyicloud2024lt.mysql.rds.aliyuncs.com
94 94
 writemiddleport = 3306
95 95
 writemiddleuser = syh
96
-writemiddlepass = xhPECP2nFObR8aUK
96
+writemiddlepass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
97 97
 writemiddlename = ky_xt_middle
98 98
 
99 99
 
100
-readsgjpatientmysqlhost = shengws1.mysql.rds.aliyuncs.com
100
+readsgjpatientmysqlhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
101 101
 readsgjpatientmysqlport = 3306
102 102
 readsgjpatientmysqluser = syh
103
-readsgjpatientmysqlpass = xhPECP2nFObR8aUK
103
+readsgjpatientmysqlpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
104 104
 readsgjpatientmysqlname = sgj_patient
105 105
 
106
-writesgjpatientmysqlhost = shengws1.mysql.rds.aliyuncs.com
106
+writesgjpatientmysqlhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
107 107
 writesgjpatientmysqlport = 3306
108 108
 writesgjpatientmysqluser = syh
109
-writesgjpatientmysqlpass = xhPECP2nFObR8aUK
109
+writesgjpatientmysqlpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
110 110
 writesgjpatientmysqlname = sgj_patient
111 111
 
112 112
 
113
-readpatienthost = shengws1.mysql.rds.aliyuncs.com
113
+readpatienthost = kuyicloud2024lt.mysql.rds.aliyuncs.com
114 114
 readpatientport = 3306
115 115
 readpatientuser = syh
116
-readpatientpass = xhPECP2nFObR8aUK
116
+readpatientpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
117 117
 readpatientname = sgj_cdm
118 118
 
119
-writepatienthost = shengws1.mysql.rds.aliyuncs.com
119
+writepatienthost = kuyicloud2024lt.mysql.rds.aliyuncs.com
120 120
 writepatientport = 3306
121 121
 writepatientuser = syh
122
-writepatientpass = xhPECP2nFObR8aUK
122
+writepatientpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
123 123
 writepatientname = sgj_cdm
124 124
 
125 125
 redishost = kuyicloud.redis.rds.aliyuncs.com

+ 26 - 22
controllers/his_api_controller.go ファイルの表示

@@ -1918,6 +1918,17 @@ func (c *HisApiController) CreateHisPrescription() {
1918 1918
 		return
1919 1919
 	}
1920 1920
 
1921
+	// 开始主事务
1922
+	db := service.XTWriteDB()
1923
+	tx := db.Begin()
1924
+
1925
+	// 在函数结束时处理事务回滚
1926
+	defer func() {
1927
+		if r := recover(); r != nil {
1928
+			tx.Rollback()
1929
+		}
1930
+	}()
1931
+
1921 1932
 	pharmacyConfig, _ := service.FindPharmacyConfig(adminInfo.CurrentOrgId)
1922 1933
 
1923 1934
 	//药品发药出库
@@ -3089,17 +3100,7 @@ func (c *HisApiController) CreateHisPrescription() {
3089 3100
 	var adviceList []models.HisDoctorAdviceInfo
3090 3101
 	var projectList []models.HisPrescriptionProject
3091 3102
 
3092
-	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10164 {
3093
-		// 开始主事务
3094
-		db := service.XTWriteDB()
3095
-		tx := db.Begin()
3096
-
3097
-		// 在函数结束时处理事务回滚
3098
-		defer func() {
3099
-			if r := recover(); r != nil {
3100
-				tx.Rollback()
3101
-			}
3102
-		}()
3103
+	if adminInfo.CurrentOrgId == 10489 {
3103 3104
 		if dataBody["prescriptions"] != nil && reflect.TypeOf(dataBody["prescriptions"]).String() == "[]interface {}" {
3104 3105
 			prescriptions, _ := dataBody["prescriptions"].([]interface{})
3105 3106
 
@@ -3153,16 +3154,18 @@ func (c *HisApiController) CreateHisPrescription() {
3153 3154
 						utils.ErrorLog("pre_time")
3154 3155
 					}
3155 3156
 					preTime, _ := items["pre_time"].(string)
3156
-
3157
+					fmt.Println("preTime", preTime)
3157 3158
 					timeLayout := "2006-01-02"
3158 3159
 					loc, _ := time.LoadLocation("Local")
3159 3160
 					theTime2, err := time.ParseInLocation(timeLayout+" 15:04", preTime, loc)
3161
+					result := strings.Split(preTime, " ")
3162
+					theTime3, _ := time.ParseInLocation(timeLayout, result[0], loc)
3160 3163
 					if err != nil {
3161 3164
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
3162 3165
 						return
3163 3166
 					}
3164 3167
 					pTime := theTime2.Unix()
3165
-					fmt.Println("pTime----------------------------------------", pTime)
3168
+
3166 3169
 					ctime := time.Now().Unix()
3167 3170
 
3168 3171
 					if tempPrescription.ID == 0 {
@@ -3245,10 +3248,10 @@ func (c *HisApiController) CreateHisPrescription() {
3245 3248
 								s.AdviceDoctor = doctor_id
3246 3249
 								s.StopState = 2
3247 3250
 								s.ExecutionState = 2
3248
-								s.AdviceDate = recordDateTime
3251
+								s.AdviceDate = theTime3.Unix()
3249 3252
 								s.Status = 1
3250 3253
 								s.UserOrgId = adminInfo.CurrentOrgId
3251
-								s.RecordDate = recordDateTime
3254
+								s.RecordDate = theTime3.Unix()
3252 3255
 								s.StartTime = tempPrescription.PreTime
3253 3256
 								s.Groupno = groupNo
3254 3257
 								s.CreatedTime = ctime
@@ -3484,7 +3487,7 @@ func (c *HisApiController) CreateHisPrescription() {
3484 3487
 								p.Ctime = time.Now().Unix()
3485 3488
 								p.Mtime = time.Now().Unix()
3486 3489
 								p.PatientId = patient_id
3487
-								p.RecordDate = recordDateTime
3490
+								p.RecordDate = theTime3.Unix()
3488 3491
 								p.Doctor = doctor_id
3489 3492
 								p.UserOrgId = adminInfo.CurrentOrgId
3490 3493
 								p.HisPatientId = his_patient_id
@@ -3550,9 +3553,6 @@ func (c *HisApiController) CreateHisPrescription() {
3550 3553
 										}
3551 3554
 										parseIntCount, _ := strconv.ParseInt(p.Count, 10, 64)
3552 3555
 
3553
-										fmt.Println("出库数据------------------------------------------", out_count_five)
3554
-										fmt.Println("出库数据------------------------------------------2", parseIntCount)
3555
-
3556 3556
 										//如果当前处方的出库数量和已经出库的数量不一致,需要进行退库或者出库
3557 3557
 										if out_count_five != parseIntCount {
3558 3558
 											//查询耗材最后一次出库记录
@@ -4164,6 +4164,9 @@ func (c *HisApiController) CreateHisPrescription() {
4164 4164
 					timeLayout := "2006-01-02"
4165 4165
 					loc, _ := time.LoadLocation("Local")
4166 4166
 					theTime2, err := time.ParseInLocation(timeLayout+" 15:04", preTime, loc)
4167
+					result := strings.Split(preTime, " ")
4168
+					theTime3, _ := time.ParseInLocation(timeLayout, result[0], loc)
4169
+					fmt.Println("theTime30000000000000000000000", theTime3.Unix())
4167 4170
 					if err != nil {
4168 4171
 						c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
4169 4172
 						return
@@ -4243,10 +4246,10 @@ func (c *HisApiController) CreateHisPrescription() {
4243 4246
 								s.AdviceDoctor = doctor_id
4244 4247
 								s.StopState = 2
4245 4248
 								s.ExecutionState = 2
4246
-								s.AdviceDate = recordDateTime
4249
+								s.AdviceDate = theTime3.Unix()
4247 4250
 								s.Status = 1
4248 4251
 								s.UserOrgId = adminInfo.CurrentOrgId
4249
-								s.RecordDate = recordDateTime
4252
+								s.RecordDate = theTime3.Unix()
4250 4253
 								s.StartTime = tempPrescription.PreTime
4251 4254
 								s.Groupno = groupNo
4252 4255
 								s.CreatedTime = ctime
@@ -4347,7 +4350,7 @@ func (c *HisApiController) CreateHisPrescription() {
4347 4350
 								p.Ctime = time.Now().Unix()
4348 4351
 								p.Mtime = time.Now().Unix()
4349 4352
 								p.PatientId = patient_id
4350
-								p.RecordDate = recordDateTime
4353
+								p.RecordDate = theTime3.Unix()
4351 4354
 								p.Doctor = doctor_id
4352 4355
 								p.UserOrgId = adminInfo.CurrentOrgId
4353 4356
 								p.HisPatientId = his_patient_id
@@ -4772,6 +4775,7 @@ func (c *HisApiController) CreateHisPrescription() {
4772 4775
 				}
4773 4776
 			}
4774 4777
 		}
4778
+		tx.Commit()
4775 4779
 		if err == nil {
4776 4780
 			c.ServeSuccessJSON(map[string]interface{}{
4777 4781
 				"msg": "保存成功",

+ 43 - 6
controllers/his_project_api_controller.go ファイルの表示

@@ -1,14 +1,17 @@
1 1
 package controllers
2 2
 
3 3
 import (
4
+	"encoding/json"
5
+	"fmt"
6
+
4 7
 	"XT_New/enums"
5 8
 	"XT_New/models"
6 9
 	"XT_New/service"
7 10
 	"XT_New/utils"
8
-	"encoding/json"
9
-	"fmt"
10 11
 	"github.com/astaxie/beego"
11 12
 	"github.com/jinzhu/gorm"
13
+	"github.com/mozillazg/go-pinyin"
14
+
12 15
 	"reflect"
13 16
 	"strconv"
14 17
 	"strings"
@@ -94,7 +97,6 @@ func (this *HisProjectApiController) SaveProject() {
94 97
 	timeLayout := "2006-01-02"
95 98
 	loc, _ := time.LoadLocation("Local")
96 99
 	project_name := this.GetString("project_name")
97
-	pinyin := this.GetString("pinyin")
98 100
 	wubi := this.GetString("wubi")
99 101
 	price := this.GetString("price")
100 102
 	price_float, err := strconv.ParseFloat(price, 64)
@@ -133,9 +135,23 @@ func (this *HisProjectApiController) SaveProject() {
133 135
 	theTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
134 136
 	adminUserInfo := this.GetAdminUserInfo()
135 137
 	orgId := adminUserInfo.CurrentOrgId
138
+
139
+	// 创建一个拼音转换器
140
+	p := pinyin.NewArgs()
141
+
142
+	// 将汉字转为拼音
143
+	pinyinSlice := pinyin.Pinyin(project_name, p)
144
+
145
+	// 获取首字母
146
+	firstLetter := ""
147
+	for _, py := range pinyinSlice {
148
+		if len(py) > 0 {
149
+			firstLetter += string(py[0][0])
150
+		}
151
+	}
136 152
 	hisProject := models.XtHisProject{
137 153
 		ProjectName:                 project_name,
138
-		Pinyin:                      pinyin,
154
+		Pinyin:                      firstLetter,
139 155
 		Wubi:                        wubi,
140 156
 		Price:                       price_float,
141 157
 		Unit:                        unit,
@@ -173,6 +189,7 @@ func (this *HisProjectApiController) SaveProject() {
173 189
 		Bbx01:                       bbx01,
174 190
 		Bby01:                       bby01,
175 191
 		ZuobiaoId:                   bbx01,
192
+		FirstLetter:                 firstLetter,
176 193
 	}
177 194
 	//查询项目名称是否存在
178 195
 	_, errcode := service.GetHisProjectIsExist(project_name, orgId)
@@ -235,7 +252,7 @@ func (this *HisProjectApiController) UpdatedProject() {
235 252
 	loc, _ := time.LoadLocation("Local")
236 253
 	id, _ := this.GetInt64("id")
237 254
 	project_name := this.GetString("project_name")
238
-	pinyin := this.GetString("pinyin")
255
+
239 256
 	wubi := this.GetString("wubi")
240 257
 	price := this.GetString("price")
241 258
 	price_float, _ := strconv.ParseFloat(price, 64)
@@ -270,11 +287,25 @@ func (this *HisProjectApiController) UpdatedProject() {
270 287
 	is_print, _ := this.GetInt64("is_print")
271 288
 	bbx01 := this.GetString("bbx01")
272 289
 	bby01 := this.GetString("bby01")
290
+	// 创建一个拼音转换器
291
+	p := pinyin.NewArgs()
292
+
293
+	// 将汉字转为拼音
294
+	pinyinSlice := pinyin.Pinyin(project_name, p)
273 295
 
296
+	// 获取首字母
297
+	firstLetter := ""
298
+	for _, py := range pinyinSlice {
299
+		if len(py) > 0 {
300
+			firstLetter += string(py[0][0])
301
+		}
302
+	}
303
+	orgId := this.GetAdminUserInfo().CurrentOrgId
274 304
 	theTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
275 305
 	hisProject := models.XtHisProject{
276 306
 		ProjectName:                 project_name,
277
-		Pinyin:                      pinyin,
307
+		Pinyin:                      firstLetter,
308
+		FirstLetter:                 firstLetter,
278 309
 		Wubi:                        wubi,
279 310
 		Price:                       price_float,
280 311
 		Unit:                        unit,
@@ -310,9 +341,15 @@ func (this *HisProjectApiController) UpdatedProject() {
310 341
 		Bbx01:                       bbx01,
311 342
 		Bby01:                       bby01,
312 343
 		ZuobiaoId:                   bbx01,
344
+		UserOrgId:                   orgId,
313 345
 	}
314 346
 
315 347
 	err := service.UpdatedProject(id, &hisProject)
348
+
349
+	list, _ := service.GetHisPrescripionProjectListOne(id, orgId)
350
+	for _, item := range list {
351
+		service.UpdateHisPrescriptionProjectList(item.ID, price_float)
352
+	}
316 353
 	if err != nil {
317 354
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeUpdateConfig)
318 355
 		return

+ 94 - 15
controllers/manager_center_api_controller.go ファイルの表示

@@ -1,17 +1,19 @@
1 1
 package controllers
2 2
 
3 3
 import (
4
+	"encoding/json"
5
+	"fmt"
6
+	"reflect"
7
+	"strconv"
8
+	"time"
9
+
4 10
 	"XT_New/enums"
5 11
 	"XT_New/models"
6 12
 	"XT_New/service"
7 13
 	"XT_New/utils"
8
-	"encoding/json"
9
-	"fmt"
10 14
 	"github.com/astaxie/beego"
11 15
 	"github.com/jinzhu/gorm"
12
-	"reflect"
13
-	"strconv"
14
-	"time"
16
+	"github.com/mozillazg/go-pinyin"
15 17
 )
16 18
 
17 19
 type ManagerCenterApiController struct {
@@ -93,7 +95,6 @@ func ManagerCenterRegistRouters() {
93 95
 
94 96
 func (c *ManagerCenterApiController) CreateBaseDrugLib() {
95 97
 	drug_name := c.GetString("drug_name")
96
-	pinyin := c.GetString("pinyin")
97 98
 	wubi := c.GetString("wubi")
98 99
 	drug_alias := c.GetString("drug_alias")
99 100
 	drug_alias_pinyin := c.GetString("drug_alias_pinyin")
@@ -162,9 +163,28 @@ func (c *ManagerCenterApiController) CreateBaseDrugLib() {
162 163
 	bby01 := c.GetString("bby01")
163 164
 	is_project, _ := c.GetInt64("is_project")
164 165
 	adminInfo := c.GetAdminUserInfo()
166
+
167
+	hans := drug_name // 要转换的汉字字符串
168
+
169
+	// 创建一个拼音转换器
170
+	p := pinyin.NewArgs()
171
+
172
+	// 将汉字转为拼音
173
+	pinyinSlice := pinyin.Pinyin(hans, p)
174
+
175
+	// 输出拼音
176
+	fmt.Println("Pinyin:", pinyinSlice)
177
+
178
+	// 获取首字母
179
+	firstLetter := ""
180
+	for _, py := range pinyinSlice {
181
+		if len(py) > 0 {
182
+			firstLetter += string(py[0][0])
183
+		}
184
+	}
185
+
165 186
 	drugLib := &models.BaseDrugLib{
166 187
 		DrugName:                    drug_name,
167
-		Pinyin:                      pinyin,
168 188
 		Wubi:                        wubi,
169 189
 		DrugAlias:                   drug_alias,
170 190
 		DrugAliasPinyin:             drug_alias_pinyin,
@@ -233,6 +253,8 @@ func (c *ManagerCenterApiController) CreateBaseDrugLib() {
233 253
 		Bck01b:                      "10",
234 254
 		IsProject:                   is_project,
235 255
 	}
256
+	drugLib.FirstLetter = firstLetter
257
+	drugLib.Pinyin = firstLetter
236 258
 
237 259
 	total := service.FindAllDrugLibRecordTotal(adminInfo.CurrentOrgId)
238 260
 	drug_code := strconv.FormatInt(total+1, 10)
@@ -267,7 +289,6 @@ func (c *ManagerCenterApiController) CreateBaseDrugLib() {
267 289
 func (c *ManagerCenterApiController) EditBaseDrugLib() {
268 290
 	id, _ := c.GetInt64("id")
269 291
 	drug_name := c.GetString("drug_name")
270
-	pinyin := c.GetString("pinyin")
271 292
 	wubi := c.GetString("wubi")
272 293
 	drug_alias := c.GetString("drug_alias")
273 294
 	drug_alias_pinyin := c.GetString("drug_alias_pinyin")
@@ -344,10 +365,26 @@ func (c *ManagerCenterApiController) EditBaseDrugLib() {
344 365
 	is_project, _ := c.GetInt64("is_project")
345 366
 	adminInfo := c.GetAdminUserInfo()
346 367
 	drug, _ := service.FindBaseDrugLibRecord(adminInfo.CurrentOrgId, id)
368
+
369
+	hans := drug_name // 要转换的汉字字符串
370
+
371
+	// 创建一个拼音转换器
372
+	p := pinyin.NewArgs()
373
+
374
+	// 将汉字转为拼音
375
+	pinyinSlice := pinyin.Pinyin(hans, p)
376
+
377
+	// 获取首字母
378
+	firstLetter := ""
379
+	for _, py := range pinyinSlice {
380
+		if len(py) > 0 {
381
+			firstLetter += string(py[0][0])
382
+		}
383
+	}
347 384
 	drugLib := &models.BaseDrugLib{
348 385
 		ID:                          id,
349 386
 		DrugName:                    drug_name,
350
-		Pinyin:                      pinyin,
387
+		Pinyin:                      firstLetter,
351 388
 		Wubi:                        wubi,
352 389
 		DrugAlias:                   drug_alias,
353 390
 		DrugAliasPinyin:             drug_alias_pinyin,
@@ -419,6 +456,7 @@ func (c *ManagerCenterApiController) EditBaseDrugLib() {
419 456
 		Bbx01:                       bbx01,
420 457
 		Bck01b:                      "10",
421 458
 		IsProject:                   is_project,
459
+		FirstLetter:                 firstLetter,
422 460
 	}
423 461
 	if adminInfo.CurrentOrgId == 10206 || adminInfo.CurrentOrgId == 10344 {
424 462
 
@@ -427,6 +465,16 @@ func (c *ManagerCenterApiController) EditBaseDrugLib() {
427 465
 
428 466
 	err := service.UpdateBaseDrugLib(drugLib)
429 467
 
468
+	//查下医嘱模板
469
+	adviceList, _ := service.GetHisAdvicelistTemplate(id, adminInfo.CurrentOrgId)
470
+
471
+	if len(adviceList) > 0 {
472
+		for _, item := range adviceList {
473
+			service.UpdateHisAdviceListTemplate(item.ID, retail_price)
474
+		}
475
+
476
+	}
477
+
430 478
 	//查询是否存在
431 479
 	_, errOne := service.GetDrugNameIsExist(id, adminInfo.CurrentOrgId)
432 480
 	if errOne == gorm.ErrRecordNotFound {
@@ -710,7 +758,6 @@ func (c *ManagerCenterApiController) GetConfigList() {
710 758
 func (c *ManagerCenterApiController) GetManageConfigList() {
711 759
 	adminUserInfo := c.GetAdminUserInfo()
712 760
 	configList, _ := service.GetConfigList(adminUserInfo.CurrentOrgId)
713
-	fmt.Println("configListwowowowowowowowowowowowo", configList)
714 761
 	c.ServeSuccessJSON(map[string]interface{}{
715 762
 		"configlist": configList,
716 763
 	})
@@ -1515,9 +1562,7 @@ func (c *ManagerCenterApiController) CreateGoodInfo() {
1515 1562
 	expiry_date_warn_day_count, _ := c.GetInt64("expiry_date_warn_day_count", 0)
1516 1563
 	stock_warn_count, _ := c.GetInt64("stock_warn_count", 0)
1517 1564
 	is_reuse, _ := c.GetInt64("is_reuse", 0)
1518
-
1519 1565
 	good_name := c.GetString("good_name")
1520
-	pinyin := c.GetString("pinyin")
1521 1566
 	wubi := c.GetString("wubi")
1522 1567
 	good_kind, _ := c.GetInt64("good_kind", 0)
1523 1568
 	medical_insurance_level, _ := c.GetInt64("medical_insurance_level", 0)
@@ -1568,6 +1613,20 @@ func (c *ManagerCenterApiController) CreateGoodInfo() {
1568 1613
 	code := strconv.FormatInt(total+1, 10)
1569 1614
 	code = "24000000" + code
1570 1615
 
1616
+	// 创建一个拼音转换器
1617
+	p := pinyin.NewArgs()
1618
+
1619
+	// 将汉字转为拼音
1620
+	pinyinSlice := pinyin.Pinyin(good_name, p)
1621
+
1622
+	// 获取首字母
1623
+	firstLetter := ""
1624
+	for _, py := range pinyinSlice {
1625
+		if len(py) > 0 {
1626
+			firstLetter += string(py[0][0])
1627
+		}
1628
+	}
1629
+
1571 1630
 	goodInfo := models.GoodInfo{
1572 1631
 		GoodCode:                    code,
1573 1632
 		SpecificationName:           specification_name,
@@ -1586,7 +1645,8 @@ func (c *ManagerCenterApiController) CreateGoodInfo() {
1586 1645
 		OrgId:                       adminUserInfo.CurrentOrgId,
1587 1646
 		Creater:                     adminUserInfo.AdminUser.Id,
1588 1647
 		GoodName:                    good_name,
1589
-		Pinyin:                      pinyin,
1648
+		Pinyin:                      firstLetter,
1649
+		FirstLetter:                 firstLetter,
1590 1650
 		Wubi:                        wubi,
1591 1651
 		GoodKind:                    good_kind,
1592 1652
 		MedicalInsuranceNumber:      medical_insurance_number,
@@ -1651,7 +1711,6 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1651 1711
 	provinces_code := c.GetString("provinces_code")
1652 1712
 
1653 1713
 	good_name := c.GetString("good_name")
1654
-	pinyin := c.GetString("pinyin")
1655 1714
 	wubi := c.GetString("wubi")
1656 1715
 	good_kind, _ := c.GetInt64("good_kind", 0)
1657 1716
 	medical_insurance_level, _ := c.GetInt64("medical_insurance_level", 0)
@@ -1693,6 +1752,20 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1693 1752
 	bbx01 := c.GetString("bbx01")
1694 1753
 	bby01 := c.GetString("bby01")
1695 1754
 
1755
+	// 创建一个拼音转换器
1756
+	p := pinyin.NewArgs()
1757
+
1758
+	// 将汉字转为拼音
1759
+	pinyinSlice := pinyin.Pinyin(good_name, p)
1760
+
1761
+	// 获取首字母
1762
+	firstLetter := ""
1763
+	for _, py := range pinyinSlice {
1764
+		if len(py) > 0 {
1765
+			firstLetter += string(py[0][0])
1766
+		}
1767
+	}
1768
+
1696 1769
 	adminUserInfo := c.GetAdminUserInfo()
1697 1770
 
1698 1771
 	goodInfo := models.GoodInfo{
@@ -1714,7 +1787,8 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1714 1787
 		OrgId:                       adminUserInfo.CurrentOrgId,
1715 1788
 		Modifier:                    adminUserInfo.AdminUser.Id,
1716 1789
 		GoodName:                    good_name,
1717
-		Pinyin:                      pinyin,
1790
+		Pinyin:                      firstLetter,
1791
+		FirstLetter:                 firstLetter,
1718 1792
 		Wubi:                        wubi,
1719 1793
 		GoodKind:                    good_kind,
1720 1794
 		MedicalInsuranceNumber:      medical_insurance_number,
@@ -1759,6 +1833,11 @@ func (c *ManagerCenterApiController) ModifyGoodInfo() {
1759 1833
 		return
1760 1834
 	}
1761 1835
 	err, goodInfos := service.ModifyGoodInfo(&goodInfo)
1836
+
1837
+	list, _ := service.GetHisPrescripionProjectList(good_id, adminUserInfo.CurrentOrgId)
1838
+	for _, item := range list {
1839
+		service.UpdateHisPrescriptionProjectList(item.ID, sell_price)
1840
+	}
1762 1841
 	if err == nil {
1763 1842
 		c.ServeSuccessJSON(map[string]interface{}{
1764 1843
 			"goodInfo": goodInfos,

+ 1 - 0
controllers/mobile_api_controllers/check_weight_api_controller.go ファイルの表示

@@ -409,6 +409,7 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
409 409
 				newprescribe.Sodium = 138
410 410
 				newprescribe.Bicarbonate = 31.1
411 411
 				newprescribe.DialysateFlow = 500
412
+				newprescribe.TargetUltrafiltration = 0
412 413
 			}
413 414
 			// 针对新化博翔
414 415
 			if adminUserInfo.Org.Id == 10447 {

+ 16 - 16
controllers/mobile_api_controllers/patient_api_controller.go ファイルの表示

@@ -1665,22 +1665,22 @@ func (c *PatientApiController) ExecDoctorAdvice() {
1665 1665
 				}
1666 1666
 
1667 1667
 				//
1668
-				if config.IsOpen == 1 && item.UserOrgId == 10210 {
1669
-
1670
-					service.HisDrugsDelivery(adminInfo.Org.Id, creater, &advice)
1671
-					//更新字典里面的库存
1672
-					stockInfo, _ := service.GetDrugAllStockInfo(storeHouseConfig.DrugStorehouseOut, item.UserOrgId, item.DrugId)
1673
-					var sum_count int64
1674
-					for _, its := range stockInfo {
1675
-						if its.MaxUnit == medical.MaxUnit {
1676
-							its.StockMaxNumber = its.StockMaxNumber * medical.MinNumber
1677
-						}
1678
-						sum_count += its.StockMaxNumber + its.StockMinNumber
1679
-					}
1680
-					service.UpdateBaseDrugSumTwo(item.DrugId, sum_count, item.UserOrgId)
1681
-					//剩余库存
1682
-					service.UpdateDrugStockCount(item.DrugId, item.UserOrgId, storeHouseConfig.DrugStorehouseOut, sum_count)
1683
-				}
1668
+				//if config.IsOpen == 1 && item.UserOrgId == 10210 {
1669
+				//
1670
+				//	service.HisDrugsDelivery(adminInfo.Org.Id, creater, &advice)
1671
+				//	//更新字典里面的库存
1672
+				//	stockInfo, _ := service.GetDrugAllStockInfo(storeHouseConfig.DrugStorehouseOut, item.UserOrgId, item.DrugId)
1673
+				//	var sum_count int64
1674
+				//	for _, its := range stockInfo {
1675
+				//		if its.MaxUnit == medical.MaxUnit {
1676
+				//			its.StockMaxNumber = its.StockMaxNumber * medical.MinNumber
1677
+				//		}
1678
+				//		sum_count += its.StockMaxNumber + its.StockMinNumber
1679
+				//	}
1680
+				//	service.UpdateBaseDrugSumTwo(item.DrugId, sum_count, item.UserOrgId)
1681
+				//	//剩余库存
1682
+				//	service.UpdateDrugStockCount(item.DrugId, item.UserOrgId, storeHouseConfig.DrugStorehouseOut, sum_count)
1683
+				//}
1684 1684
 
1685 1685
 			}
1686 1686
 		}

+ 12 - 5
controllers/patient_api_controller.go ファイルの表示

@@ -8,8 +8,6 @@ import (
8 8
 	"encoding/json"
9 9
 	"github.com/jinzhu/gorm"
10 10
 	"github.com/mozillazg/go-pinyin"
11
-
12
-	//"github.com/jinzhu/gorm"
13 11
 	"math"
14 12
 	"math/rand"
15 13
 	"reflect"
@@ -143,6 +141,8 @@ func PatientApiRegistRouters() {
143 141
 
144 142
 	beego.Router("/api/patient/getpatientcriticalonelist", &PatientApiController{}, "Get:GetPatientCriticalOneList")
145 143
 
144
+	beego.Router("/api/patient/deletesolution", &PatientApiController{}, "Get:DeleteSolution")
145
+
146 146
 }
147 147
 func (c *PatientApiController) GetExportList() {
148 148
 	startTime := c.GetString("start_time")
@@ -330,8 +330,6 @@ func (c *PatientApiController) CreatePatient() {
330 330
 
331 331
 	var patient models.Patients
332 332
 	contagions, diseases, code, formItems := patientFormData(&patient, c.Ctx.Input.RequestBody, "create")
333
-	fmt.Println(code)
334
-	fmt.Println(patient)
335 333
 
336 334
 	if code > 0 {
337 335
 		c.ServeFailJSONWithSGJErrorCode(code)
@@ -1130,7 +1128,7 @@ func (c *PatientApiController) UpdateDialysisSolution() {
1130 1128
 	loc, _ := time.LoadLocation("Local")
1131 1129
 	todayTime, err := time.ParseInLocation(timeLayout, today, loc)
1132 1130
 
1133
-	if adminUserInfo.CurrentOrgId == 9538 || adminUserInfo.CurrentOrgId == 10375 || adminUserInfo.CurrentOrgId == 10164 {
1131
+	if adminUserInfo.CurrentOrgId == 9538 || adminUserInfo.CurrentOrgId == 10164 {
1134 1132
 		prescription := models.DialysisPrescription{
1135 1133
 			Dialyzer:                   solution.Dialyzer,
1136 1134
 			Anticoagulant:              solution.Anticoagulant,
@@ -6776,3 +6774,12 @@ func (c *PatientApiController) GetPatientCriticalOneList() {
6776 6774
 		"list": list,
6777 6775
 	})
6778 6776
 }
6777
+
6778
+func (c *PatientApiController) DeleteSolution() {
6779
+
6780
+	id, _ := c.GetInt64("id")
6781
+	solution, _ := service.DeleteSolutionById(id)
6782
+	c.ServeSuccessJSON(map[string]interface{}{
6783
+		"solution": solution,
6784
+	})
6785
+}

+ 4 - 5
controllers/stock_in_api_controller.go ファイルの表示

@@ -4557,7 +4557,6 @@ func (this *StockManagerApiController) AddDrugInformation() {
4557 4557
 
4558 4558
 	if len(drugList) > 0 {
4559 4559
 		for _, item := range drugList {
4560
-			fmt.Println("retial2332332233232323223322323", item.DoseUnit)
4561 4560
 			goodInfo := models.BaseDrugLib{
4562 4561
 				DrugName:                    item.DrugName,
4563 4562
 				DrugAlias:                   item.DrugAlias,
@@ -7970,13 +7969,13 @@ func (this *StockManagerApiController) GetStockFlowOrderList() {
7970 7969
 			var count int64
7971 7970
 
7972 7971
 			if index == 0 {
7973
-				count = list[index].OverCount - list[index].Count
7972
+				count = list[index].FlushOverCount - list[index].Count
7974 7973
 				service.UpdateOverCount(list[index+1].ID, count)
7975 7974
 			}
7976 7975
 
7977 7976
 			if index >= 1 {
7978 7977
 				lastStockFlow, _ := service.GetLastOverCount(list[index-1].ID)
7979
-				count = lastStockFlow.OverCount - list[index].Count
7978
+				count = lastStockFlow.FlushOverCount - list[index].Count
7980 7979
 				service.UpdateOverCount(list[index].ID, count)
7981 7980
 			}
7982 7981
 
@@ -7984,14 +7983,14 @@ func (this *StockManagerApiController) GetStockFlowOrderList() {
7984 7983
 		if list[index].ConsumableType == 7 || list[index].ConsumableType == 4 || list[index].ConsumableType == 1 || list[index].ConsumableType == 10 || list[index].ConsumableType == 13 {
7985 7984
 			if index == 0 {
7986 7985
 				var count int64
7987
-				count = list[index].OverCount + list[index].Count
7986
+				count = list[index].FlushOverCount + list[index].Count
7988 7987
 				service.UpdateOverCount(list[index+1].ID, count)
7989 7988
 			}
7990 7989
 
7991 7990
 			if index >= 1 {
7992 7991
 				var count int64
7993 7992
 				lastStockFlow, _ := service.GetLastOverCount(list[index-1].ID)
7994
-				count = lastStockFlow.OverCount + list[index].Count
7993
+				count = lastStockFlow.FlushOverCount + list[index].Count
7995 7994
 				service.UpdateOverCount(list[index].ID, count)
7996 7995
 			}
7997 7996
 

+ 0 - 40
go.mod ファイルの表示

@@ -1,40 +0,0 @@
1
-module XT_New
2
-
3
-go 1.19
4
-
5
-require (
6
-	github.com/astaxie/beego v1.12.3
7
-	github.com/go-redis/redis v6.15.9+incompatible
8
-	github.com/jinzhu/gorm v1.9.16
9
-	github.com/robfig/cron v1.2.0
10
-	github.com/shopspring/decimal v1.3.1
11
-	golang.org/x/sync v0.1.0
12
-)
13
-
14
-require (
15
-	github.com/beorn7/perks v1.0.1 // indirect
16
-	github.com/cespare/xxhash/v2 v2.1.1 // indirect
17
-	github.com/go-sql-driver/mysql v1.7.0 // indirect
18
-	github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
19
-	github.com/golang/protobuf v1.5.0 // indirect
20
-	github.com/hashicorp/golang-lru v0.5.4 // indirect
21
-	github.com/jinzhu/inflection v1.0.0 // indirect
22
-	github.com/jung-kurt/gofpdf v1.16.2 // indirect
23
-	github.com/kr/text v0.2.0 // indirect
24
-	github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
25
-	github.com/mozillazg/go-pinyin v0.20.0 // indirect
26
-	github.com/prometheus/client_golang v1.7.0 // indirect
27
-	github.com/prometheus/client_model v0.2.0 // indirect
28
-	github.com/prometheus/common v0.10.0 // indirect
29
-	github.com/prometheus/procfs v0.1.3 // indirect
30
-	github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
31
-	github.com/stretchr/testify v1.8.2 // indirect
32
-	github.com/wcharczuk/go-chart v2.0.1+incompatible // indirect
33
-	golang.org/x/crypto v0.9.0 // indirect
34
-	golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a // indirect
35
-	golang.org/x/net v0.10.0 // indirect
36
-	golang.org/x/sys v0.8.0 // indirect
37
-	golang.org/x/text v0.9.0 // indirect
38
-	google.golang.org/protobuf v1.30.0 // indirect
39
-	gopkg.in/yaml.v2 v2.2.8 // indirect
40
-)

+ 0 - 249
go.sum ファイルの表示

@@ -1,249 +0,0 @@
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/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
20
-github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60=
21
-github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE=
22
-github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
23
-github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
24
-github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
25
-github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U=
26
-github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c=
27
-github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs=
28
-github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
29
-github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY=
30
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
31
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
32
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
-github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM=
34
-github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
35
-github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
36
-github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI=
37
-github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk=
38
-github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
39
-github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y=
40
-github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0=
41
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
42
-github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw=
43
-github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
44
-github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
45
-github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
46
-github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
47
-github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
48
-github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
49
-github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
50
-github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
51
-github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc=
52
-github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
53
-github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
54
-github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
55
-github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
56
-github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
57
-github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
58
-github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
59
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
60
-github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
61
-github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
62
-github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
63
-github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
64
-github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
65
-github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
66
-github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
67
-github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
68
-github.com/golang/protobuf v1.5.0 h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=
69
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
70
-github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
71
-github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
72
-github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
73
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
74
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
75
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
76
-github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
77
-github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
78
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
79
-github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
80
-github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
81
-github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
82
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
83
-github.com/jinzhu/gorm v1.9.16 h1:+IyIjPEABKRpsu/F8OvDPy9fyQlgsg2luMV2ZIH5i5o=
84
-github.com/jinzhu/gorm v1.9.16/go.mod h1:G3LB3wezTOWM2ITLzPxEXgSkOXAntiLHS7UdBefADcs=
85
-github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
86
-github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
87
-github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M=
88
-github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
89
-github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
90
-github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
91
-github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
92
-github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
93
-github.com/jung-kurt/gofpdf v1.16.2 h1:jgbatWHfRlPYiK85qgevsZTHviWXKwB1TTiKdz5PtRc=
94
-github.com/jung-kurt/gofpdf v1.16.2/go.mod h1:1hl7y57EsiPAkLbOwzpzqgx1A30nQCk/YmFV8S2vmK0=
95
-github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
96
-github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
97
-github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
98
-github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
99
-github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
100
-github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
101
-github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
102
-github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ=
103
-github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
104
-github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4=
105
-github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
106
-github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus=
107
-github.com/mattn/go-sqlite3 v2.0.3+incompatible h1:gXHsfypPkaMZrKbD5209QV9jbUTJKjyR5WD3HYQSd+U=
108
-github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
109
-github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
110
-github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
111
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
112
-github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
113
-github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
114
-github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
115
-github.com/mozillazg/go-pinyin v0.20.0 h1:BtR3DsxpApHfKReaPO1fCqF4pThRwH9uwvXzm+GnMFQ=
116
-github.com/mozillazg/go-pinyin v0.20.0/go.mod h1:iR4EnMMRXkfpFVV5FMi4FNB6wGq9NV6uDWbUuPhP4Yc=
117
-github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
118
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
119
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
120
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
121
-github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU=
122
-github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg=
123
-github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ=
124
-github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
125
-github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
126
-github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
127
-github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc=
128
-github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
129
-github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
130
-github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
131
-github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
132
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
133
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
134
-github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
135
-github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
136
-github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U=
137
-github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
138
-github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
139
-github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
140
-github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
141
-github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
142
-github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
143
-github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc=
144
-github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
145
-github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
146
-github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
147
-github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8=
148
-github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
149
-github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
150
-github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
151
-github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
152
-github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo=
153
-github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg=
154
-github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
155
-github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
156
-github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw=
157
-github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s=
158
-github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA=
159
-github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
160
-github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
161
-github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE=
162
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
163
-github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
164
-github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
165
-github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
166
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
167
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
168
-github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
169
-github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
170
-github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
171
-github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
172
-github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
173
-github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
174
-github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0=
175
-github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ=
176
-github.com/wcharczuk/go-chart v2.0.1+incompatible h1:0pz39ZAycJFF7ju/1mepnk26RLVLBCWz1STcD3doU0A=
177
-github.com/wcharczuk/go-chart v2.0.1+incompatible/go.mod h1:PF5tmL4EIx/7Wf+hEkpCqYi5He4u90sw+0+6FhrryuE=
178
-github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc=
179
-github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU=
180
-golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
181
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
182
-golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
183
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
184
-golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
185
-golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
186
-golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
187
-golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a h1:gHevYm0pO4QUbwy8Dmdr01R5r1BuKtfYqRqF0h/Cbh0=
188
-golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
189
-golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
190
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
191
-golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
192
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
193
-golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
194
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
195
-golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
196
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
197
-golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
198
-golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
199
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
200
-golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
201
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
202
-golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
203
-golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
204
-golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
205
-golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
206
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
207
-golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
208
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
209
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
210
-golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
211
-golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
212
-golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
213
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
214
-golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
215
-golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
216
-golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
217
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
218
-golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
219
-golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
220
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
221
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
222
-google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
223
-google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
224
-google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
225
-google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
226
-google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
227
-google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
228
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
229
-google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
230
-google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
231
-gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
232
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
233
-gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
234
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
235
-gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
236
-gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
237
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
238
-gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
239
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
240
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
241
-gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
242
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
243
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
244
-gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
245
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
246
-gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
247
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
248
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
249
-gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

+ 6 - 5
main.go ファイルの表示

@@ -1,15 +1,19 @@
1 1
 package main
2 2
 
3 3
 import (
4
+	"encoding/xml"
5
+	"net/http"
6
+
4 7
 	_ "XT_New/routers"
5 8
 	"XT_New/service"
6
-	"encoding/xml"
7 9
 	"github.com/astaxie/beego"
8
-	"net/http"
9 10
 )
10 11
 
11 12
 func init() {
12 13
 	service.ConnectDB()
14
+	go func() {
15
+		http.ListenAndServe("localhost:6060", nil)
16
+	}()
13 17
 }
14 18
 
15 19
 func main() {
@@ -25,9 +29,6 @@ func main() {
25 29
 	//beego.BConfig.WebConfig.Session.SessionGCMaxLifetime = 6000
26 30
 	//beego.BConfig.WebConfig.AutoRender = false
27 31
 	//
28
-	go func() {
29
-		http.ListenAndServe("localhost:6060", nil)
30
-	}()
31 32
 
32 33
 	beego.Run()
33 34
 

+ 1 - 0
models/patient_models.go ファイルの表示

@@ -1840,6 +1840,7 @@ type NewDialysisPrescription struct {
1840 1840
 	DialysateFlow              float64 `gorm:"column:dialysate_flow" json:"dialysate_flow" form:"dialysate_flow"`
1841 1841
 	DisplaceLiquiValue         float64 `gorm:"column:displace_liqui_value" json:"displace_liqui_value" form:"displace_liqui_value"`
1842 1842
 	BloodFlowVolume            float64 `gorm:"column:blood_flow_volume" json:"blood_flow_volume" form:"blood_flow_volume"`
1843
+	PrescriptionWater          float64 `gorm:"column:prescription_water" json:"prescription_water" form:"prescription_water"`
1843 1844
 }
1844 1845
 
1845 1846
 func (NewDialysisPrescription) TableName() string {

+ 1 - 0
models/stock_models.go ファイルの表示

@@ -693,6 +693,7 @@ type VmStockFlow struct {
693 693
 	OverCount                 int64           `gorm:"column:over_count" json:"over_count" form:"over_count"`
694 694
 	OrderId                   int64           `gorm:"column:order_id" json:"order_id" form:"order_id"`
695 695
 	Remark                    string          `gorm:"column:remark" json:"remark" form:"remark"`
696
+	FlushOverCount            int64           `gorm:"column:flush_over_count" json:"flush_over_count" form:"flush_over_count"`
696 697
 }
697 698
 
698 699
 func (VmStockFlow) TableName() string {

+ 16 - 2
service/manage_center_service.go ファイルの表示

@@ -1,11 +1,12 @@
1 1
 package service
2 2
 
3 3
 import (
4
-	"XT_New/models"
5
-	"github.com/jinzhu/gorm"
6 4
 	"strconv"
7 5
 	"strings"
8 6
 	"time"
7
+
8
+	"XT_New/models"
9
+	"github.com/jinzhu/gorm"
9 10
 )
10 11
 
11 12
 func GetDictionaryConfigList(orgID int64) (dataconfig interface{}, err error) {
@@ -1088,3 +1089,16 @@ func GetPatientGoodStockCount(patient_id int64, record_time int64, user_org_id i
1088 1089
 	err = XTReadDB().Where("patient_id = ? and record_time =? and org_id = ? and status=1", patient_id, record_time, user_org_id).Find(&auto).Error
1089 1090
 	return auto, err
1090 1091
 }
1092
+
1093
+func GetHisAdvicelistTemplate(drug_id int64, user_org_id int64) (advice []*models.HisPrescriptionAdviceTemplate, err error) {
1094
+
1095
+	err = XTReadDB().Where("drug_id = ? and org_id =? and status=1", drug_id, user_org_id).Find(&advice).Error
1096
+
1097
+	return advice, err
1098
+}
1099
+
1100
+func UpdateHisAdviceListTemplate(id int64, price float64) error {
1101
+
1102
+	err := XTWriteDB().Model(&models.HisPrescriptionAdviceTemplate{}).Where("id =? and status=1", id).Updates(map[string]interface{}{"price": price}).Error
1103
+	return err
1104
+}

+ 12 - 7
service/new_warehouse_service.go ファイルの表示

@@ -2752,11 +2752,13 @@ func FindNewDrugCancelStock(return_date int64, org_id int64, tx *gorm.DB) (*mode
2752 2752
 	stock := models.DrugCancelStock{}
2753 2753
 	var err error
2754 2754
 	err = tx.Where("return_time = ? and org_id = ? and status = 1", return_date, org_id).Find(&stock).Error
2755
-
2756
-	if err != nil {
2757
-		tx.Rollback()
2758
-		return &stock, nil
2755
+	if err != gorm.ErrRecordNotFound {
2756
+		if err != nil {
2757
+			tx.Rollback()
2758
+			return &stock, nil
2759
+		}
2759 2760
 	}
2761
+
2760 2762
 	return &stock, nil
2761 2763
 }
2762 2764
 
@@ -2771,10 +2773,13 @@ func FindNewLastDrugCancelStock(advice_date int64, org_id int64, tx *gorm.DB) (m
2771 2773
 
2772 2774
 	cancelStock := models.DrugCancelStock{}
2773 2775
 	err := tx.Where("return_time = ? and org_id = ? and status = 1", advice_date, org_id).Find(&cancelStock).Error
2774
-	if err != nil {
2775
-		tx.Rollback()
2776
-		return cancelStock, err
2776
+	if err != gorm.ErrRecordNotFound {
2777
+		if err != nil {
2778
+			tx.Rollback()
2779
+			return cancelStock, err
2780
+		}
2777 2781
 	}
2782
+
2778 2783
 	return cancelStock, err
2779 2784
 }
2780 2785
 

+ 9 - 0
service/patient_service.go ファイルの表示

@@ -4015,3 +4015,12 @@ func GetInspectionByPatientId(patient_id int64, item_id int64) (models.XtInspect
4015 4015
 	err := XTReadDB().Where("patient_id =? and status =1 and inspect_date>=1704038400 and inspect_date<=1711814400 and item_id =?", patient_id, item_id).Order("id asc").Last(&inspection).Limit(1).Error
4016 4016
 	return inspection, err
4017 4017
 }
4018
+
4019
+func DeleteSolutionById(id int64) (models.DialysisSolution, error) {
4020
+
4021
+	solution := models.DialysisSolution{}
4022
+
4023
+	err := XTWriteDB().Model(&solution).Where("id=? and status=1", id).Updates(map[string]interface{}{"status": 12}).Error
4024
+
4025
+	return solution, err
4026
+}

+ 9 - 8
service/pharmacy_service.go ファイルの表示

@@ -1,19 +1,20 @@
1 1
 package service
2 2
 
3 3
 import (
4
-	"XT_New/models"
5
-	"XT_New/utils"
6 4
 	"encoding/json"
7 5
 	"fmt"
8
-	"github.com/astaxie/beego/config"
9
-	"github.com/astaxie/beego/context"
10
-	"github.com/jinzhu/gorm"
11
-	"golang.org/x/sync/errgroup"
12 6
 	"math"
13 7
 	"strconv"
14 8
 	"strings"
15 9
 	"sync"
16 10
 	"time"
11
+
12
+	"XT_New/models"
13
+	"XT_New/utils"
14
+	"github.com/astaxie/beego/config"
15
+	"github.com/astaxie/beego/context"
16
+	"github.com/jinzhu/gorm"
17
+	"golang.org/x/sync/errgroup"
17 18
 )
18 19
 
19 20
 func SaveErrs(org_id int64, input *context.BeegoInput, err error) {
@@ -897,7 +898,7 @@ func DispensingMedicineOne(orgid, patient_id, stime, etime, creater int64) (err
897 898
 
898 899
 	advice, err := GetDocAdviceList(orgid, patient_id, stime, etime)
899 900
 	//响水不走这里
900
-	if orgid != 10188 {
901
+	if orgid != 10188 && orgid != 10480 && orgid != 10217 {
901 902
 		if len(advice) > 0 {
902 903
 			for _, item := range advice {
903 904
 				err = DrugsDelivery(item.UserOrgId, item.ExecutionStaff, item)
@@ -1024,7 +1025,7 @@ func DrugWithdrawal(orgid, patient_id, stime, etime, creater int64) (err error)
1024 1025
 	}
1025 1026
 
1026 1027
 	//针对阜阳经沃
1027
-	if orgid != 10480 {
1028
+	if orgid != 104801 {
1028 1029
 		for _, v := range advice_info {
1029 1030
 
1030 1031
 			//扣减库存

+ 2 - 2
service/secondary_service.go ファイルの表示

@@ -1152,13 +1152,13 @@ func DeleteSecondOrderInfo(id int64) error {
1152 1152
 
1153 1153
 func GetStockFlowOrderList(good_id int64, user_org_id int64) (list []*models.VmStockFlow, err error) {
1154 1154
 
1155
-	err = XTReadDB().Where("good_id = ? and user_org_id =? and ctime>=1706630400 and ctime<=1709222399 and status=1", good_id, user_org_id).Order("ctime asc").Find(&list).Error
1155
+	err = XTReadDB().Where("good_id = ? and user_org_id =?  and status=1", good_id, user_org_id).Order("ctime asc").Find(&list).Error
1156 1156
 	return list, err
1157 1157
 }
1158 1158
 
1159 1159
 func UpdateOverCount(id int64, count int64) (err error) {
1160 1160
 
1161
-	err = XTWriteDB().Model(models.VmStockFlow{}).Where("id = ? and status=1", id).Updates(map[string]interface{}{"over_count": count}).Error
1161
+	err = XTWriteDB().Model(models.VmStockFlow{}).Where("id = ? and status=1", id).Updates(map[string]interface{}{"flush_over_count": count}).Error
1162 1162
 	return err
1163 1163
 }
1164 1164
 

+ 43 - 12
service/stock_service.go ファイルの表示

@@ -1,13 +1,14 @@
1 1
 package service
2 2
 
3 3
 import (
4
-	"XT_New/models"
5 4
 	"errors"
6 5
 	"fmt"
7
-	"github.com/jinzhu/gorm"
8 6
 	"strconv"
9 7
 	"strings"
10 8
 	"time"
9
+
10
+	"XT_New/models"
11
+	"github.com/jinzhu/gorm"
11 12
 )
12 13
 
13 14
 func AddSigleDealer(dealer *models.Dealer) (error, *models.Dealer) {
@@ -276,6 +277,7 @@ func ModifyGoodInfo(goodInfo *models.GoodInfo) (error, *models.GoodInfo) {
276 277
 		"bbx01":                          goodInfo.Bbx01,
277 278
 		"bby01":                          goodInfo.Bby01,
278 279
 		"zuobiao_id":                     goodInfo.Bbx01,
280
+		"first_letter":                   goodInfo.FirstLetter,
279 281
 	}).Error
280 282
 
281 283
 	writeDb.Model(&models.WarehousingInfo{}).Where("good_id = ? AND org_id = ?", goodInfo.ID, goodInfo.OrgId).Updates(map[string]interface{}{"good_type_id": goodInfo.GoodTypeId})
@@ -2002,10 +2004,13 @@ func GetLastDrugCancelStockById(orgid int64) (models.DrugCancelStock, error) {
2002 2004
 func GetNewLastDrugCancelStockById(orgid int64, tx *gorm.DB) (models.DrugCancelStock, error) {
2003 2005
 	stock := models.DrugCancelStock{}
2004 2006
 	err := tx.Where("org_id = ? and status = 1", orgid).Last(&stock).Error
2005
-	if err != nil {
2006
-		tx.Rollback()
2007
-		return stock, err
2007
+	if err != gorm.ErrRecordNotFound {
2008
+		if err != nil {
2009
+			tx.Rollback()
2010
+			return stock, err
2011
+		}
2008 2012
 	}
2013
+
2009 2014
 	return stock, err
2010 2015
 }
2011 2016
 
@@ -5802,10 +5807,13 @@ func GetHisAdviceListByDrugIdTwo(patient_id int64, advice_date int64, orgid int6
5802 5807
 func GetNewHisAdviceListByDrugIdTwo(patient_id int64, advice_date int64, orgid int64, tx *gorm.DB) (info []*models.HisDoctorAdviceInfo, err error) {
5803 5808
 
5804 5809
 	err = tx.Where("patient_id = ? and advice_date = ? and status = 1 and user_org_id = ?", patient_id, advice_date, orgid).Find(&info).Error
5805
-	if err != nil {
5806
-		tx.Rollback()
5807
-		return info, err
5810
+	if err != gorm.ErrRecordNotFound {
5811
+		if err != nil {
5812
+			tx.Rollback()
5813
+			return info, err
5814
+		}
5808 5815
 	}
5816
+
5809 5817
 	return info, err
5810 5818
 }
5811 5819
 
@@ -5845,11 +5853,13 @@ func GetLastDrugWarehouseOutByDrugIdTwenty(drugid int64, patient_id int64, advic
5845 5853
 func GetLastNewDrugWarehouseOutByDrugIdTwenty(drugid int64, patient_id int64, advice_date int64, advice_id int64, tx *gorm.DB) (out []*models.DrugWarehouseOutInfo, err error) {
5846 5854
 
5847 5855
 	err = tx.Where("advice_id = ?  and drug_id = ? and patient_id = ? and sys_record_time = ? and status = 1 and is_check = 1", advice_id, drugid, patient_id, advice_date).Find(&out).Error
5848
-
5849
-	if err != nil {
5850
-		tx.Rollback()
5851
-		return out, err
5856
+	if err != gorm.ErrRecordNotFound {
5857
+		if err != nil {
5858
+			tx.Rollback()
5859
+			return out, err
5860
+		}
5852 5861
 	}
5862
+
5853 5863
 	return out, err
5854 5864
 }
5855 5865
 
@@ -9118,3 +9128,24 @@ func UpdateWarehouseInfoByProject(good_id int64, id int64, user_org_id int64, co
9118 9128
 
9119 9129
 	return info, err
9120 9130
 }
9131
+
9132
+func GetHisPrescripionProjectList(good_id int64, user_org_id int64) (list []*models.HisPrescriptionProjectTemplate, err error) {
9133
+
9134
+	err = XTReadDB().Where("project_id=? and status=1 and type =3 and user_org_id=?", good_id, user_org_id).Find(&list).Error
9135
+
9136
+	return list, err
9137
+}
9138
+
9139
+func GetHisPrescripionProjectListOne(good_id int64, user_org_id int64) (list []*models.HisPrescriptionProjectTemplate, err error) {
9140
+
9141
+	err = XTReadDB().Where("project_id=? and status=1 and type =2 and user_org_id=?", good_id, user_org_id).Find(&list).Error
9142
+
9143
+	return list, err
9144
+}
9145
+
9146
+func UpdateHisPrescriptionProjectList(id int64, price float64) (models.HisPrescriptionProjectTemplateL, error) {
9147
+
9148
+	templateL := models.HisPrescriptionProjectTemplateL{}
9149
+	err := XTWriteDB().Model(&templateL).Where("id =? and status=1", id).Updates(map[string]interface{}{"price": price}).Error
9150
+	return templateL, err
9151
+}