ソースを参照

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

See999 5 年 前
コミット
404cb383af

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

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

+ 2 - 0
controllers/mobile_api_controllers/dialysis_api_controller.go ファイルの表示

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

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

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

+ 13 - 0
service/admin_service.go ファイルの表示

273
 	return counts, nil
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
 func GetAdminUserElectronicSignature(orgID int64, appID int64, userID int64) (*models.AdminUserElectronicSignature, error) {
289
 func GetAdminUserElectronicSignature(orgID int64, appID int64, userID int64) (*models.AdminUserElectronicSignature, error) {
277
 	var es models.AdminUserElectronicSignature
290
 	var es models.AdminUserElectronicSignature
278
 	err := readUserDb.Model(&models.AdminUserElectronicSignature{}).Where("org_id=? and app_id=? and creator=? and status=1", orgID, appID, userID).First(&es).Error
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 ファイルの表示

410
 	PsychologicalAssessmentOther string `gorm:"column:psychological_assessment_other" json:"psychological_assessment_other"`
410
 	PsychologicalAssessmentOther string `gorm:"column:psychological_assessment_other" json:"psychological_assessment_other"`
411
 	Score                        string `gorm:"column:score" json:"score"`
411
 	Score                        string `gorm:"column:score" json:"score"`
412
 	SickConditionOther           string `gorm:"column:sick_condition_other" json:"sick_condition_other"`
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
 	PrecautionOther              string `gorm:"column:precaution_other" json:"precaution_other"`
414
 	PrecautionOther              string `gorm:"column:precaution_other" json:"precaution_other"`
415
 	PsychologicalOther           string `gorm:"column:psychological_other" json:"psychological_other"`
415
 	PsychologicalOther           string `gorm:"column:psychological_other" json:"psychological_other"`
416
 	IsPrecaution                 int64  `gorm:"column:is_precaution" json:"is_precaution"`
416
 	IsPrecaution                 int64  `gorm:"column:is_precaution" json:"is_precaution"`
446
 	PsychologicalAssessmentOther string `gorm:"column:psychological_assessment_other" json:"psychological_assessment_other" form:"psychological_assessment_other"`
446
 	PsychologicalAssessmentOther string `gorm:"column:psychological_assessment_other" json:"psychological_assessment_other" form:"psychological_assessment_other"`
447
 	IsPrecaution                 int64  `gorm:"column:is_precaution" json:"is_precaution" form:"is_precaution"`
447
 	IsPrecaution                 int64  `gorm:"column:is_precaution" json:"is_precaution" form:"is_precaution"`
448
 	Score                        string `gorm:"column:score" json:"score" form:"score"`
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
 	PrecautionOther              string `gorm:"column:precaution_other" json:"precaution_other" form:"precaution_other"`
450
 	PrecautionOther              string `gorm:"column:precaution_other" json:"precaution_other" form:"precaution_other"`
451
 	PsychologicalOther           string `gorm:"column:psychological_other" json:"psychological_other" form:"psychological_other"`
451
 	PsychologicalOther           string `gorm:"column:psychological_other" json:"psychological_other" form:"psychological_other"`
452
 	AdmissionNumber              string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`
452
 	AdmissionNumber              string `gorm:"column:admission_number" json:"admission_number" form:"admission_number"`