Browse Source

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

28169 4 months ago
parent
commit
2cda02795d

+ 22 - 20
controllers/his_api_controller.go View File

26
 }
26
 }
27
 
27
 
28
 func HisManagerApiRegistRouters() {
28
 func HisManagerApiRegistRouters() {
29
+	beego.Router("/test/net", &HisApiController{}, "get:TestNet")
29
 
30
 
30
 	beego.Router("/api/hispatient/list", &HisApiController{}, "get:GetHisPatientList")
31
 	beego.Router("/api/hispatient/list", &HisApiController{}, "get:GetHisPatientList")
31
 	beego.Router("/api/hispatient/get", &HisApiController{}, "get:GetHisPatientInfo")
32
 	beego.Router("/api/hispatient/get", &HisApiController{}, "get:GetHisPatientInfo")
122
 
123
 
123
 }
124
 }
124
 
125
 
126
+func (c *HisApiController) TestNet() {
127
+	c.ServeSuccessJSON(map[string]interface{}{
128
+		"msg": "成功",
129
+	})
130
+}
131
+
125
 func (c *HisApiController) CheckHisPatient() {
132
 func (c *HisApiController) CheckHisPatient() {
126
 	record_date := c.GetString("record_date")
133
 	record_date := c.GetString("record_date")
127
 	patient_id, _ := c.GetInt64("patient_id")
134
 	patient_id, _ := c.GetInt64("patient_id")
4265
 								keySeven := "scheduals_" + record_date + "_" + strconv.FormatInt(adminInfo.CurrentOrgId, 10)
4272
 								keySeven := "scheduals_" + record_date + "_" + strconv.FormatInt(adminInfo.CurrentOrgId, 10)
4266
 								redis.Set(keySeven, "", time.Second)
4273
 								redis.Set(keySeven, "", time.Second)
4267
 								var randNum int
4274
 								var randNum int
4268
-								randNum = rand.Intn(10000) + 1000
4269
-								timestamp := time.Now().Unix()
4270
-								tempTime := time.Unix(timestamp, 0)
4271
-								timeFormat := tempTime.Format("20060102150405")
4272
-								s.FeedetlSn = timeFormat + strconv.FormatInt(int64(randNum), 10) + "-" + "1" + "-" + strconv.FormatInt(s.ID, 10)
4275
+								randNum = rand.Intn(1000) + 1000
4276
+								//timestamp := time.Now().Unix()
4277
+								//tempTime := time.Unix(timestamp, 0)
4278
+								//timeFormat := tempTime.Format("20060102150405")
4279
+								s.FeedetlSn = strconv.FormatInt(int64(randNum), 10) + "-" + "1" + "-" + strconv.FormatInt(s.ID, 10)
4273
 
4280
 
4274
 								//赤峰
4281
 								//赤峰
4275
 								if adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10489 {
4282
 								if adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10489 {
5438
 
5445
 
5439
 								service.CreateNewHisProjectTwo(&p, tx)
5446
 								service.CreateNewHisProjectTwo(&p, tx)
5440
 								var randNum int
5447
 								var randNum int
5441
-								randNum = rand.Intn(10000) + 1000
5442
-								timestamp := time.Now().Unix()
5443
-								tempTime := time.Unix(timestamp, 0)
5444
-								timeFormat := tempTime.Format("20060102150405")
5445
-								p.FeedetlSn = timeFormat + strconv.FormatInt(int64(randNum), 10) + "-" + "2" + "-" + strconv.FormatInt(p.ID, 10)
5448
+								randNum = rand.Intn(1000) + 1000
5449
+								p.FeedetlSn = strconv.FormatInt(int64(randNum), 10) + "-" + "2" + "-" + strconv.FormatInt(p.ID, 10)
5446
 
5450
 
5447
 								goodBase, _ := service.GetBaseGoodById(p.ProjectId, p.UserOrgId)
5451
 								goodBase, _ := service.GetBaseGoodById(p.ProjectId, p.UserOrgId)
5448
 
5452
 
5795
 								keySeven := "scheduals_" + record_date + "_" + strconv.FormatInt(adminInfo.CurrentOrgId, 10)
5799
 								keySeven := "scheduals_" + record_date + "_" + strconv.FormatInt(adminInfo.CurrentOrgId, 10)
5796
 								redis.Set(keySeven, "", time.Second)
5800
 								redis.Set(keySeven, "", time.Second)
5797
 								var randNum int
5801
 								var randNum int
5798
-								randNum = rand.Intn(10000) + 1000
5799
-								timestamp := time.Now().Unix()
5800
-								tempTime := time.Unix(timestamp, 0)
5801
-								timeFormat := tempTime.Format("20060102150405")
5802
-								s.FeedetlSn = timeFormat + strconv.FormatInt(int64(randNum), 10) + "-" + "1" + "-" + strconv.FormatInt(s.ID, 10)
5802
+								randNum = rand.Intn(1000) + 1000
5803
+								//timestamp := time.Now().Unix()
5804
+								//tempTime := time.Unix(timestamp, 0)
5805
+								//timeFormat := tempTime.Format("20060102150405")
5806
+								s.FeedetlSn = strconv.FormatInt(int64(randNum), 10) + "-" + "1" + "-" + strconv.FormatInt(s.ID, 10)
5803
 								service.CreateHisDoctorAdvice(&s)
5807
 								service.CreateHisDoctorAdvice(&s)
5804
 								keySix := strconv.FormatInt(adminInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(theTime.Unix(), 10) + ":his_advices_list_all"
5808
 								keySix := strconv.FormatInt(adminInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(theTime.Unix(), 10) + ":his_advices_list_all"
5805
 								redis.Set(keySix, "", time.Second)
5809
 								redis.Set(keySix, "", time.Second)
5903
 
5907
 
5904
 								projectList = append(projectList, p)
5908
 								projectList = append(projectList, p)
5905
 								var randNum int
5909
 								var randNum int
5906
-								randNum = rand.Intn(10000) + 1000
5907
-								timestamp := time.Now().Unix()
5908
-								tempTime := time.Unix(timestamp, 0)
5909
-								timeFormat := tempTime.Format("20060102150405")
5910
-								p.FeedetlSn = timeFormat + strconv.FormatInt(int64(randNum), 10) + "-" + "2" + "-" + strconv.FormatInt(p.ID, 10)
5910
+								randNum = rand.Intn(1000) + 1000
5911
+
5912
+								p.FeedetlSn = strconv.FormatInt(int64(randNum), 10) + "-" + "2" + "-" + strconv.FormatInt(p.ID, 10)
5911
 
5913
 
5912
 								if p.Type == 2 { //因为项目和耗材的基础库存在id相同的情况,所以需要根据该字段来判断,type为2的话为从项目开出来的
5914
 								if p.Type == 2 { //因为项目和耗材的基础库存在id相同的情况,所以需要根据该字段来判断,type为2的话为从项目开出来的
5913
 									//新增或者编辑项目,修改对应的标签数据
5915
 									//新增或者编辑项目,修改对应的标签数据

+ 1 - 0
service/statistics_service/index_evaluation_service.go View File

1966
 func FindOrgInspectionCount(user_org_id int64) (count int64, err error) {
1966
 func FindOrgInspectionCount(user_org_id int64) (count int64, err error) {
1967
 	db := service.XTReadDB()
1967
 	db := service.XTReadDB()
1968
 	err = db.Model(&models.InspectionReference{}).Where("status = 1 AND org_id = ?", user_org_id).Count(&count).Error
1968
 	err = db.Model(&models.InspectionReference{}).Where("status = 1 AND org_id = ?", user_org_id).Count(&count).Error
1969
+
1969
 	return
1970
 	return
1970
 }
1971
 }
1971
 
1972