Browse Source

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

csx 4 years ago
parent
commit
7d9113f0c1

+ 2 - 2
controllers/patient_api_controller.go View File

@@ -1105,7 +1105,7 @@ func (c *PatientApiController) CreateGroupAdvice() {
1105 1105
 		return
1106 1106
 	}
1107 1107
 	adviceType := int64(dataBody["advice_type"].(float64))
1108
-	if adviceType != 1 && adviceType != 2 && adviceType != 3 {
1108
+	if adviceType != 1 && adviceType != 2 && adviceType != 3 && adviceType != 4 {
1109 1109
 		utils.ErrorLog("advice_type != 1&&2")
1110 1110
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
1111 1111
 		return
@@ -2885,7 +2885,7 @@ func adviceFormData(advice *models.DoctorAdvice, data []byte, action string) (co
2885 2885
 			return
2886 2886
 		}
2887 2887
 		adviceType := int64(dataBody["advice_type"].(float64))
2888
-		if adviceType != 1 && adviceType != 2 && adviceType != 3 {
2888
+		if adviceType != 1 && adviceType != 2 && adviceType != 3 && adviceType != 4 {
2889 2889
 			utils.ErrorLog("advice_type != 1&&2")
2890 2890
 			code = enums.ErrorCodeParamWrong
2891 2891
 			return

+ 1 - 1
models/service/device_service.go View File

@@ -557,7 +557,7 @@ func GetZoneId(bednumber int64, orgid int64) (models.DeviceNumber, error) {
557 557
 //}
558 558
 
559 559
 // func CreateMacher(machers *models.DeviceAddmacher) error {
560
-//      fmt.Println("进来了米有")
560
+
561 561
 // 	begin := writeDb.Begin()
562 562
 // 	fmt.Println("hhhhhhhh",begin)
563 563
 // 	err := begin.Model(&models.DeviceAddmacher{}).Create(machers).Error

+ 1 - 1
service/stock_service.go View File

@@ -2013,7 +2013,7 @@ func FindUserDetailById(org_id int64, id int64) (user []*models.AutomaticReduceD
2013 2013
 	db = db.Preload("GoodInfo", "org_id = ? AND status = 1", org_id)
2014 2014
 	db = db.Preload("GoodsType", "status = 1")
2015 2015
 	db = db.Preload("Patients", "user_org_id = ? AND status = 1", org_id)
2016
-	db = db.Where("status = 1 AND org_id = ? AND warehouse_out_id = ? AND good_id != 0", org_id, id)
2016
+	db = db.Where("status = 1 AND org_id = ? AND warehouse_out_id = ? AND good_id != 0 AND count <> 0 ", org_id, id)
2017 2017
 	db = db.Count(&total)
2018 2018
 	err = db.Find(&user).Error
2019 2019
 	return