Bläddra i källkod

Merge branch 'master' of http://git.shengws.com/csx/XT_New

See999 4 år sedan
förälder
incheckning
404cb383af

+ 1 - 1
controllers/mobile_api_controllers/admin_user_api_controller.go Visa fil

@@ -20,7 +20,7 @@ func (c *AdminUserApiController) GetAdminUserElectronicSignature() {
20 20
 	adminUserInfo := c.GetMobileAdminUserInfo()
21 21
 	//orgId, _ := service.GetCreatByOrgId(adminUserInfo.Org.Id)
22 22
 	id := adminUserInfo.AdminUser.Id
23
-	es, _ := service.GetAdminUserElectronicSignature(adminUserInfo.Org.Id, adminUserInfo.App.Id, id)
23
+	es, _ := service.GetAdminUserElectronicSignatureTwo(id)
24 24
 	if es != nil {
25 25
 		c.ServeSuccessJSON(map[string]interface{}{
26 26
 			"state":                1,

+ 2 - 0
controllers/mobile_api_controllers/dialysis_api_controller.go Visa fil

@@ -220,6 +220,7 @@ func (this *DialysisAPIController) WaitingScheduals() {
220 220
 // @param patient_id:int
221 221
 // @param date:string (yyyy-MM-dd)
222 222
 func (this *DialysisAPIController) DialysisRecord() {
223
+
223 224
 	patientID, _ := this.GetInt64("patient_id")
224 225
 	recordDateStr := this.GetString("date")
225 226
 	if patientID <= 0 {
@@ -284,6 +285,7 @@ func (this *DialysisAPIController) DialysisRecord() {
284 285
 	}
285 286
 
286 287
 	dialysisOrder, getDialysisOrderErr := service.MobileGetSchedualDialysisRecord(adminInfo.Org.Id, patientID, date.Unix())
288
+	fmt.Println("----------------------------", getDialysisOrderErr)
287 289
 	if getDialysisOrderErr != nil {
288 290
 		this.ErrorLog("获取透析记录失败:%v", getDialysisOrderErr)
289 291
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeDataException)

+ 1 - 1
controllers/mobile_api_controllers/patient_api_controller.go Visa fil

@@ -2080,6 +2080,7 @@ func (c *PatientApiController) GetDoctorAdvices() {
2080 2080
 }
2081 2081
 
2082 2082
 func (c *PatientApiController) GetPrintDialysisOrder() {
2083
+	fmt.Println("触发-------------------------")
2083 2084
 	xtno := c.GetString("xtno")
2084 2085
 	xtdate := c.GetString("xtdate")
2085 2086
 
@@ -2154,7 +2155,6 @@ func (c *PatientApiController) GetPrintDialysisOrder() {
2154 2155
 	operators, _ := service.GetAdminUserES(adminUserInfo.Org.Id, adminUserInfo.App.Id, operatorIDs)
2155 2156
 	templateInfo, _ := service.GetOrgInfoTemplate(adminUserInfo.Org.Id)
2156 2157
 	check, _ := service.FindDoubleCheckById(adminUserInfo.Org.Id, patientInfo.ID, xttime)
2157
-
2158 2158
 	c.ServeSuccessJSON(map[string]interface{}{
2159 2159
 		"users":                   adminUser,
2160 2160
 		"patientInfo":             patientInfo,

+ 13 - 0
service/admin_service.go Visa fil

@@ -273,6 +273,19 @@ func GetPatientAgeDistribution() ([]*PatientAgeCountStruct, error) {
273 273
 	return counts, nil
274 274
 }
275 275
 
276
+func GetAdminUserElectronicSignatureTwo(userid int64) (*models.AdminUserElectronicSignature, error) {
277
+	var es models.AdminUserElectronicSignature
278
+	err := readUserDb.Model(&models.AdminUserElectronicSignature{}).Where("creator=? and status=1", userid).First(&es).Error
279
+
280
+	if err == gorm.ErrRecordNotFound {
281
+		return nil, nil
282
+	}
283
+	if err != nil {
284
+		return nil, err
285
+	}
286
+	return &es, nil
287
+}
288
+
276 289
 func GetAdminUserElectronicSignature(orgID int64, appID int64, userID int64) (*models.AdminUserElectronicSignature, error) {
277 290
 	var es models.AdminUserElectronicSignature
278 291
 	err := readUserDb.Model(&models.AdminUserElectronicSignature{}).Where("org_id=? and app_id=? and creator=? and status=1", orgID, appID, userID).First(&es).Error

+ 2 - 2
service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go Visa fil

@@ -410,7 +410,7 @@ type ReceiveAssessmentVM struct {
410 410
 	PsychologicalAssessmentOther string `gorm:"column:psychological_assessment_other" json:"psychological_assessment_other"`
411 411
 	Score                        string `gorm:"column:score" json:"score"`
412 412
 	SickConditionOther           string `gorm:"column:sick_condition_other" json:"sick_condition_other"`
413
-	Precaution                   int64  `gorm:"column:precaution" json:"precaution"`
413
+	Precaution                   string `gorm:"column:precaution" json:"precaution"`
414 414
 	PrecautionOther              string `gorm:"column:precaution_other" json:"precaution_other"`
415 415
 	PsychologicalOther           string `gorm:"column:psychological_other" json:"psychological_other"`
416 416
 	IsPrecaution                 int64  `gorm:"column:is_precaution" json:"is_precaution"`
@@ -446,7 +446,7 @@ type XtReceiveTreatmentAsses struct {
446 446
 	PsychologicalAssessmentOther string `gorm:"column:psychological_assessment_other" json:"psychological_assessment_other" form:"psychological_assessment_other"`
447 447
 	IsPrecaution                 int64  `gorm:"column:is_precaution" json:"is_precaution" form:"is_precaution"`
448 448
 	Score                        string `gorm:"column:score" json:"score" form:"score"`
449
-	Precaution                   int64  `gorm:"column:precaution" json:"precaution" form:"precaution"`
449
+	Precaution                   string `gorm:"column:precaution" json:"precaution" form:"precaution"`
450 450
 	PrecautionOther              string `gorm:"column:precaution_other" json:"precaution_other" form:"precaution_other"`
451 451
 	PsychologicalOther           string `gorm:"column:psychological_other" json:"psychological_other" form:"psychological_other"`
452 452
 	AdmissionNumber              string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`