Sfoglia il codice sorgente

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

28169 4 mesi fa
parent
commit
2cda02795d

+ 22 - 20
controllers/his_api_controller.go Vedi File

@@ -26,6 +26,7 @@ type HisApiController struct {
26 26
 }
27 27
 
28 28
 func HisManagerApiRegistRouters() {
29
+	beego.Router("/test/net", &HisApiController{}, "get:TestNet")
29 30
 
30 31
 	beego.Router("/api/hispatient/list", &HisApiController{}, "get:GetHisPatientList")
31 32
 	beego.Router("/api/hispatient/get", &HisApiController{}, "get:GetHisPatientInfo")
@@ -122,6 +123,12 @@ func HisManagerApiRegistRouters() {
122 123
 
123 124
 }
124 125
 
126
+func (c *HisApiController) TestNet() {
127
+	c.ServeSuccessJSON(map[string]interface{}{
128
+		"msg": "成功",
129
+	})
130
+}
131
+
125 132
 func (c *HisApiController) CheckHisPatient() {
126 133
 	record_date := c.GetString("record_date")
127 134
 	patient_id, _ := c.GetInt64("patient_id")
@@ -4265,11 +4272,11 @@ func (c *HisApiController) CreateHisPrescription() {
4265 4272
 								keySeven := "scheduals_" + record_date + "_" + strconv.FormatInt(adminInfo.CurrentOrgId, 10)
4266 4273
 								redis.Set(keySeven, "", time.Second)
4267 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 4282
 								if adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10489 {
@@ -5438,11 +5445,8 @@ func (c *HisApiController) CreateHisPrescription() {
5438 5445
 
5439 5446
 								service.CreateNewHisProjectTwo(&p, tx)
5440 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 5451
 								goodBase, _ := service.GetBaseGoodById(p.ProjectId, p.UserOrgId)
5448 5452
 
@@ -5795,11 +5799,11 @@ func (c *HisApiController) CreateHisPrescription() {
5795 5799
 								keySeven := "scheduals_" + record_date + "_" + strconv.FormatInt(adminInfo.CurrentOrgId, 10)
5796 5800
 								redis.Set(keySeven, "", time.Second)
5797 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 5807
 								service.CreateHisDoctorAdvice(&s)
5804 5808
 								keySix := strconv.FormatInt(adminInfo.CurrentOrgId, 10) + ":" + strconv.FormatInt(theTime.Unix(), 10) + ":his_advices_list_all"
5805 5809
 								redis.Set(keySix, "", time.Second)
@@ -5903,11 +5907,9 @@ func (c *HisApiController) CreateHisPrescription() {
5903 5907
 
5904 5908
 								projectList = append(projectList, p)
5905 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 5914
 								if p.Type == 2 { //因为项目和耗材的基础库存在id相同的情况,所以需要根据该字段来判断,type为2的话为从项目开出来的
5913 5915
 									//新增或者编辑项目,修改对应的标签数据

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

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