Просмотр исходного кода

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

XMLWAN 5 лет назад
Родитель
Сommit
c5c331e9db

+ 1 - 1
conf/app.conf Просмотреть файл

1
 appname = 血透
1
 appname = 血透
2
-httpport = 9529
2
+httpport = 9531
3
 runmode = dev
3
 runmode = dev
4
 
4
 
5
 
5
 

+ 1 - 1
controllers/gobal_config_api_controller.go Просмотреть файл

31
 	beego.Router("/api/stock/automaticreduce/isopen", &GobalConfigApiController{}, "post:PostStockConfig")
31
 	beego.Router("/api/stock/automaticreduce/isopen", &GobalConfigApiController{}, "post:PostStockConfig")
32
 	beego.Router("/api/automaticreduce/get", &GobalConfigApiController{}, "get:GetConfig")
32
 	beego.Router("/api/automaticreduce/get", &GobalConfigApiController{}, "get:GetConfig")
33
 
33
 
34
-	beego.Router("/api/print/template/commit", &GobalConfigApiController{}, "post:PostPrintTemplate")
34
+	beego.Router("/api/print/template/commit", &GobalConfigApiController{}, "post:PostPrintTemplateTwo")
35
 	beego.Router("/api/print/template/get", &GobalConfigApiController{}, "get:GetPrintTemplate")
35
 	beego.Router("/api/print/template/get", &GobalConfigApiController{}, "get:GetPrintTemplate")
36
 
36
 
37
 	beego.Router("/api/dataupload/config/commit", &GobalConfigApiController{}, "post:PostConfig")
37
 	beego.Router("/api/dataupload/config/commit", &GobalConfigApiController{}, "post:PostConfig")

+ 6 - 0
controllers/patient_api_controller.go Просмотреть файл

2917
 	age := int64(patientBody["age"].(float64))
2917
 	age := int64(patientBody["age"].(float64))
2918
 	patient.Age = age
2918
 	patient.Age = age
2919
 
2919
 
2920
+	if patientBody["user_sys_before_count"] != nil || reflect.TypeOf(patientBody["user_sys_before_count"]).String() == "string" {
2921
+		user_sys_before_count := patientBody["user_sys_before_count"].(string)
2922
+		count, _ := strconv.ParseInt(user_sys_before_count, 10, 64)
2923
+		patient.UserSysBeforeCount = count
2924
+	}
2925
+
2920
 	timeLayout := "2006-01-02"
2926
 	timeLayout := "2006-01-02"
2921
 	loc, _ := time.LoadLocation("Local")
2927
 	loc, _ := time.LoadLocation("Local")
2922
 
2928
 

+ 2 - 0
controllers/public_api_controller.go Просмотреть файл

163
 }
163
 }
164
 
164
 
165
 func (c *PublicApiController) HandleData() {
165
 func (c *PublicApiController) HandleData() {
166
+	service.HandleData()
167
+
166
 	//org_app, _ := service.GetAllAppOrg()
168
 	//org_app, _ := service.GetAllAppOrg()
167
 	//org_role, _ := service.GetAllRole()
169
 	//org_role, _ := service.GetAllRole()
168
 	//
170
 	//

+ 1 - 0
models/board_models.go Просмотреть файл

76
 	TellPhone                    string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
76
 	TellPhone                    string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
77
 	FirstTreatmentDate           int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
77
 	FirstTreatmentDate           int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
78
 	ContactName                  string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
78
 	ContactName                  string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
79
+	UserSysBeforeCount           int64   `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
79
 }
80
 }
80
 
81
 
81
 func (BoardPatients) TableName() string {
82
 func (BoardPatients) TableName() string {

+ 2 - 0
models/dialysis.go Просмотреть файл

75
 	TellPhone               string                  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
75
 	TellPhone               string                  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
76
 	FirstTreatmentDate      int64                   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
76
 	FirstTreatmentDate      int64                   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
77
 	ContactName             string                  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
77
 	ContactName             string                  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
78
+	UserSysBeforeCount      int64                   `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
78
 }
79
 }
79
 
80
 
80
 func (SchedualPatient) TableName() string {
81
 func (SchedualPatient) TableName() string {
154
 	TellPhone               string           `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
155
 	TellPhone               string           `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
155
 	FirstTreatmentDate      int64            `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
156
 	FirstTreatmentDate      int64            `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
156
 	ContactName             string           `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
157
 	ContactName             string           `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
158
+	UserSysBeforeCount      int64            `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
157
 }
159
 }
158
 
160
 
159
 func (SchedualPatient2) TableName() string {
161
 func (SchedualPatient2) TableName() string {

+ 26 - 25
models/intergration_models.go Просмотреть файл

1
 package models
1
 package models
2
 
2
 
3
 type MiddleSyncInfo struct {
3
 type MiddleSyncInfo struct {
4
-	ID             	int64 `gorm:"column:id" json:"id" form:"id"`
5
-	OrgId       	int64 `gorm:"column:org_id" json:"org_id" form:"org_id"`
6
-	SyncTime       int64 `gorm:"column:sync_time" json:"sync_time" form:"sync_time"`
7
-	SyncResultType  int	  `gorm:"column:sync_result_type" json:"sync_result_type" form:"sync_result_type"`
4
+	ID              int64  `gorm:"column:id" json:"id" form:"id"`
5
+	OrgId           int64  `gorm:"column:org_id" json:"org_id" form:"org_id"`
6
+	SyncTime        int64  `gorm:"column:sync_time" json:"sync_time" form:"sync_time"`
7
+	SyncResultType  int    `gorm:"column:sync_result_type" json:"sync_result_type" form:"sync_result_type"`
8
 	SyncRsultRemark string `gorm:"column:sync_result_remark" json:"sync_result_remark" form:"sync_result_remark"`
8
 	SyncRsultRemark string `gorm:"column:sync_result_remark" json:"sync_result_remark" form:"sync_result_remark"`
9
-	SyncTotalNum    int64 `gorm:"column:sync_total_num" json:"sync_total_num" form:"sync_total_num"`
10
-	SyncSuccessNum  int64 `gorm:"column:sync_success_num" json:"sync_success_num" form:"sync_success_num"`
11
-	SyncInfo      	string `gorm:"column:sync_info" json:"sync_info" form:"sync_info"`
12
-	CreateTime      int64 `gorm:"column:create_time" json:"create_time" form:"create_time"`
13
-	UpdateTime    	int64 `gorm:"column:update_time" json:"update_time" form:"update_time"`
9
+	SyncTotalNum    int64  `gorm:"column:sync_total_num" json:"sync_total_num" form:"sync_total_num"`
10
+	SyncSuccessNum  int64  `gorm:"column:sync_success_num" json:"sync_success_num" form:"sync_success_num"`
11
+	SyncInfo        string `gorm:"column:sync_info" json:"sync_info" form:"sync_info"`
12
+	CreateTime      int64  `gorm:"column:create_time" json:"create_time" form:"create_time"`
13
+	UpdateTime      int64  `gorm:"column:update_time" json:"update_time" form:"update_time"`
14
 }
14
 }
15
 
15
 
16
 func (MiddleSyncInfo) TableName() string {
16
 func (MiddleSyncInfo) TableName() string {
18
 }
18
 }
19
 
19
 
20
 type MiddleInterface struct {
20
 type MiddleInterface struct {
21
-	ID          	int64  `gorm:"column:id" json:"id" form:"id"`
22
-	OrgId   		int64  `gorm:"column:org_id" json:"org_id" form:"org_id"`
23
-	Creater   		int64 `gorm:"column:creater" json:"creater" form:"creater"`
24
-	Pattern 		int  `gorm:"column:pattern" json:"pattern" form:"pattern"`
25
-	Dbhost 			string  `gorm:"column:dbhost" json:"dbhost" form:"dbhost"`
26
-	Dbuser 			string  `gorm:"column:dbuser" json:"dbuser" form:"dbuser"`
27
-	Dbpassword 		string  `gorm:"column:dbpassword" json:"dbpassword" form:"dbpassword"`
28
-	Dbname 			string  `gorm:"column:dbname" json:"dbname" form:"dbname"`
29
-	InterfaceUrl 	string  `gorm:"column:interface_url" json:"interface_url" form:"interface_url"`
30
-	InterFaceToken 	string  `gorm:"column:interface_token" json:"interface_token" form:"interface_token"`
31
-	AllowIp 		string  `gorm:"column:allow_ip" json:"allow_ip" form:"allow_ip"`
32
-	AllowToken 		string  `gorm:"column:allow_token" json:"allow_token" form:"allow_token"`
33
-	SyncFrequency 	int  `gorm:"column:sync_frequency" json:"sync_frequency" form:"sync_frequency"`
34
-	Status			int  `gorm:"column:status" json:"status" form:"status"`
35
-	CreatedTime     int64   `gorm:"column:created_time" json:"created_time" form:"created_time"`
36
-	UpdatedTime     int64   `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
21
+	ID             int64  `gorm:"column:id" json:"id" form:"id"`
22
+	OrgId          int64  `gorm:"column:org_id" json:"org_id" form:"org_id"`
23
+	Creater        int64  `gorm:"column:creater" json:"creater" form:"creater"`
24
+	Pattern        int    `gorm:"column:pattern" json:"pattern" form:"pattern"`
25
+	Dbhost         string `gorm:"column:dbhost" json:"dbhost" form:"dbhost"`
26
+	Dbuser         string `gorm:"column:dbuser" json:"dbuser" form:"dbuser"`
27
+	Dbpassword     string `gorm:"column:dbpassword" json:"dbpassword" form:"dbpassword"`
28
+	Dbname         string `gorm:"column:dbname" json:"dbname" form:"dbname"`
29
+	InterfaceUrl   string `gorm:"column:interface_url" json:"interface_url" form:"interface_url"`
30
+	InterFaceToken string `gorm:"column:interface_token" json:"interface_token" form:"interface_token"`
31
+	AllowIp        string `gorm:"column:allow_ip" json:"allow_ip" form:"allow_ip"`
32
+	AllowToken     string `gorm:"column:allow_token" json:"allow_token" form:"allow_token"`
33
+	SyncFrequency  int    `gorm:"column:sync_frequency" json:"sync_frequency" form:"sync_frequency"`
34
+	Status         int    `gorm:"column:status" json:"status" form:"status"`
35
+	CreatedTime    int64  `gorm:"column:created_time" json:"created_time" form:"created_time"`
36
+	UpdatedTime    int64  `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
37
 }
37
 }
38
 
38
 
39
 func (MiddleInterface) TableName() string {
39
 func (MiddleInterface) TableName() string {
126
 	FirstTreatmentDate       int64         `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
126
 	FirstTreatmentDate       int64         `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
127
 	ContactName              string        `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
127
 	ContactName              string        `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
128
 	VMHisPatients            VMHisPatients `gorm:"ForeignKey:XtPatientId;AssociationForeignKey:ID" json:"his_patient"`
128
 	VMHisPatients            VMHisPatients `gorm:"ForeignKey:XtPatientId;AssociationForeignKey:ID" json:"his_patient"`
129
+	UserSysBeforeCount       int64         `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
129
 }
130
 }
130
 
131
 
131
 func (VMPatients) TableName() string {
132
 func (VMPatients) TableName() string {

+ 1 - 0
models/monitor_models.go Просмотреть файл

103
 	TellPhone                    string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
103
 	TellPhone                    string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
104
 	FirstTreatmentDate           int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
104
 	FirstTreatmentDate           int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
105
 	ContactName                  string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
105
 	ContactName                  string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
106
+	UserSysBeforeCount           int64   `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
106
 }
107
 }
107
 
108
 
108
 func (MonitorPatients) TableName() string {
109
 func (MonitorPatients) TableName() string {

+ 42 - 38
models/patient_models.go Просмотреть файл

85
 	TellPhone                string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
85
 	TellPhone                string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
86
 	FirstTreatmentDate       int64  `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
86
 	FirstTreatmentDate       int64  `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
87
 	ContactName              string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
87
 	ContactName              string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
88
+	UserSysBeforeCount       int64  `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
88
 }
89
 }
89
 
90
 
90
 func (Patients) TableName() string {
91
 func (Patients) TableName() string {
483
 	MemberPatienttype            int64   `gorm:"column:member_patienttype" json:"member_patienttype" form:"member_patienttype"`
484
 	MemberPatienttype            int64   `gorm:"column:member_patienttype" json:"member_patienttype" form:"member_patienttype"`
484
 	MemberTreatement             int64   `gorm:"column:member_treatement" json:"member_treatement" form:"member_treatement"`
485
 	MemberTreatement             int64   `gorm:"column:member_treatement" json:"member_treatement" form:"member_treatement"`
485
 	EquitmentId                  string  `gorm:"column:equitment_id" json:"equitment_id" form:"equitment_id"`
486
 	EquitmentId                  string  `gorm:"column:equitment_id" json:"equitment_id" form:"equitment_id"`
487
+	UserSysBeforeCount           int64   `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
486
 }
488
 }
487
 
489
 
488
 func (XtPatientsNew) TableName() string {
490
 func (XtPatientsNew) TableName() string {
495
 }
497
 }
496
 
498
 
497
 type CdmPatients struct {
499
 type CdmPatients struct {
498
-	ID                int64  `gorm:"column:id" json:"id" form:"id"`
499
-	UserOrgId         int64  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
500
-	UserId            int64  `gorm:"column:user_id" json:"user_id" form:"user_id"`
501
-	Avatar            string `gorm:"column:avatar" json:"avatar" form:"avatar"`
502
-	PatientType       int64  `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
503
-	Source            int64  `gorm:"column:source" json:"source" form:"source"`
504
-	Name              string `gorm:"column:name" json:"name" form:"name"`
505
-	Alias             string `gorm:"column:alias" json:"alias" form:"alias"`
506
-	Gender            int64  `gorm:"column:gender" json:"gender" form:"gender"`
507
-	MaritalStatus     int64  `gorm:"column:marital_status" json:"marital_status" form:"marital_status"`
508
-	IdCardNo          string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
509
-	Birthday          int64  `gorm:"column:birthday" json:"birthday" form:"birthday"`
510
-	HealthCareType    int64  `gorm:"column:health_care_type" json:"health_care_type" form:"health_care_type"`
511
-	HealthCareNo      string `gorm:"column:health_care_no" json:"health_care_no" form:"health_care_no"`
512
-	Height            int64  `gorm:"column:height" json:"height" form:"height"`
513
-	BloodType         int64  `gorm:"column:blood_type" json:"blood_type" form:"blood_type"`
514
-	Rh                int64  `gorm:"column:rh" json:"rh" form:"rh"`
515
-	EducationLevel    int64  `gorm:"column:education_level" json:"education_level" form:"education_level"`
516
-	Profession        int64  `gorm:"column:profession" json:"profession" form:"profession"`
517
-	Phone             string `gorm:"column:phone" json:"phone" form:"phone"`
518
-	HomeTelephone     string `gorm:"column:home_telephone" json:"home_telephone" form:"home_telephone"`
519
-	RelativePhone     string `gorm:"column:relative_phone" json:"relative_phone" form:"relative_phone"`
520
-	RelativeRelations string `gorm:"column:relative_relations" json:"relative_relations" form:"relative_relations"`
521
-	HomeAddress       string `gorm:"column:home_address" json:"home_address" form:"home_address"`
522
-	WorkUnit          string `gorm:"column:work_unit" json:"work_unit" form:"work_unit"`
523
-	UnitAddress       string `gorm:"column:unit_address" json:"unit_address" form:"unit_address"`
524
-	Children          int64  `gorm:"column:children" json:"children" form:"children"`
525
-	AttendingDoctorId int64  `gorm:"column:attending_doctor_id" json:"attending_doctor_id" form:"attending_doctor_id"`
526
-	HeadNurseId       int64  `gorm:"column:head_nurse_id" json:"head_nurse_id" form:"head_nurse_id"`
527
-	Diagnose          string `gorm:"column:diagnose" json:"diagnose" form:"diagnose"`
528
-	Remark            string `gorm:"column:remark" json:"remark" form:"remark"`
529
-	RegistrarsId      int64  `gorm:"column:registrars_id" json:"registrars_id" form:"registrars_id"`
530
-	Registrars        string `gorm:"column:registrars" json:"registrars" form:"registrars"`
531
-	QrCode            string `gorm:"column:qr_code" json:"qr_code" form:"qr_code"`
532
-	BindingState      int64  `gorm:"column:binding_state" json:"binding_state" form:"binding_state"`
533
-	Status            int64  `gorm:"column:status" json:"status" form:"status"`
534
-	CreatedTime       int64  `gorm:"column:created_time" json:"created_time" form:"created_time"`
535
-	UpdatedTime       int64  `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
500
+	ID                 int64  `gorm:"column:id" json:"id" form:"id"`
501
+	UserOrgId          int64  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
502
+	UserId             int64  `gorm:"column:user_id" json:"user_id" form:"user_id"`
503
+	Avatar             string `gorm:"column:avatar" json:"avatar" form:"avatar"`
504
+	PatientType        int64  `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
505
+	Source             int64  `gorm:"column:source" json:"source" form:"source"`
506
+	Name               string `gorm:"column:name" json:"name" form:"name"`
507
+	Alias              string `gorm:"column:alias" json:"alias" form:"alias"`
508
+	Gender             int64  `gorm:"column:gender" json:"gender" form:"gender"`
509
+	MaritalStatus      int64  `gorm:"column:marital_status" json:"marital_status" form:"marital_status"`
510
+	IdCardNo           string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
511
+	Birthday           int64  `gorm:"column:birthday" json:"birthday" form:"birthday"`
512
+	HealthCareType     int64  `gorm:"column:health_care_type" json:"health_care_type" form:"health_care_type"`
513
+	HealthCareNo       string `gorm:"column:health_care_no" json:"health_care_no" form:"health_care_no"`
514
+	Height             int64  `gorm:"column:height" json:"height" form:"height"`
515
+	BloodType          int64  `gorm:"column:blood_type" json:"blood_type" form:"blood_type"`
516
+	Rh                 int64  `gorm:"column:rh" json:"rh" form:"rh"`
517
+	EducationLevel     int64  `gorm:"column:education_level" json:"education_level" form:"education_level"`
518
+	Profession         int64  `gorm:"column:profession" json:"profession" form:"profession"`
519
+	Phone              string `gorm:"column:phone" json:"phone" form:"phone"`
520
+	HomeTelephone      string `gorm:"column:home_telephone" json:"home_telephone" form:"home_telephone"`
521
+	RelativePhone      string `gorm:"column:relative_phone" json:"relative_phone" form:"relative_phone"`
522
+	RelativeRelations  string `gorm:"column:relative_relations" json:"relative_relations" form:"relative_relations"`
523
+	HomeAddress        string `gorm:"column:home_address" json:"home_address" form:"home_address"`
524
+	WorkUnit           string `gorm:"column:work_unit" json:"work_unit" form:"work_unit"`
525
+	UnitAddress        string `gorm:"column:unit_address" json:"unit_address" form:"unit_address"`
526
+	Children           int64  `gorm:"column:children" json:"children" form:"children"`
527
+	AttendingDoctorId  int64  `gorm:"column:attending_doctor_id" json:"attending_doctor_id" form:"attending_doctor_id"`
528
+	HeadNurseId        int64  `gorm:"column:head_nurse_id" json:"head_nurse_id" form:"head_nurse_id"`
529
+	Diagnose           string `gorm:"column:diagnose" json:"diagnose" form:"diagnose"`
530
+	Remark             string `gorm:"column:remark" json:"remark" form:"remark"`
531
+	RegistrarsId       int64  `gorm:"column:registrars_id" json:"registrars_id" form:"registrars_id"`
532
+	Registrars         string `gorm:"column:registrars" json:"registrars" form:"registrars"`
533
+	QrCode             string `gorm:"column:qr_code" json:"qr_code" form:"qr_code"`
534
+	BindingState       int64  `gorm:"column:binding_state" json:"binding_state" form:"binding_state"`
535
+	Status             int64  `gorm:"column:status" json:"status" form:"status"`
536
+	CreatedTime        int64  `gorm:"column:created_time" json:"created_time" form:"created_time"`
537
+	UpdatedTime        int64  `gorm:"column:updated_time" json:"updated_time" form:"updated_time"`
538
+	UserSysBeforeCount int64  `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
536
 }
539
 }
537
 
540
 
538
 func (CdmPatients) TableName() string {
541
 func (CdmPatients) TableName() string {
791
 	ExpenseKind                  int64   `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
794
 	ExpenseKind                  int64   `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
792
 	TellPhone                    string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
795
 	TellPhone                    string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
793
 	ContactName                  string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
796
 	ContactName                  string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
797
+	UserSysBeforeCount           int64   `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
794
 }
798
 }
795
 
799
 
796
 func (XtPatients) TableName() string {
800
 func (XtPatients) TableName() string {

+ 1 - 0
models/vm_models.go Просмотреть файл

85
 	TellPhone                string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
85
 	TellPhone                string `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
86
 	FirstTreatmentDate       int64  `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
86
 	FirstTreatmentDate       int64  `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
87
 	ContactName              string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
87
 	ContactName              string `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
88
+	UserSysBeforeCount       int64  `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
88
 }
89
 }
89
 
90
 
90
 func (VMOrgPatients) TableName() string {
91
 func (VMOrgPatients) TableName() string {

+ 8 - 0
service/app_version.go Просмотреть файл

182
 	}
182
 	}
183
 	return roles, nil
183
 	return roles, nil
184
 }
184
 }
185
+
186
+func HandleData() {
187
+	var prescription []*models.DialysisPrescription
188
+	readDb.Model(&models.DialysisPrescription{}).Where("user_org_id = 12 AND record_date <= 1587571200").Find(&prescription)
189
+	for _, item := range prescription {
190
+		writeDb.Model(&models.AssessmentAfterDislysis{}).Where("user_org_id =12 AND assessment_date = ?", item.RecordDate).Updates(map[string]interface{}{"mtime": time.Now().Unix(), "actual_ultrafiltration": item.Ultrafiltration})
191
+	}
192
+}

+ 1 - 1
service/gobal_config_service.go Просмотреть файл

76
 }
76
 }
77
 
77
 
78
 func UpdateFiledConfig(org_id int64) (err error) {
78
 func UpdateFiledConfig(org_id int64) (err error) {
79
-	err = writeDb.Model(&models.FiledConfig{}).Where("org_id = ?", org_id).Updates(map[string]interface{}{"is_show": 1}).Error
79
+	err = writeDb.Model(&models.FiledConfig{}).Where("org_id = ? AND sys_module = 0", org_id).Updates(map[string]interface{}{"is_show": 1}).Error
80
 	return
80
 	return
81
 }
81
 }
82
 
82
 

+ 13 - 10
service/mobile_dialysis_service.go Просмотреть файл

109
 }
109
 }
110
 
110
 
111
 type MSchedualPatientVMList struct {
111
 type MSchedualPatientVMList struct {
112
-	ID          int64  `gorm:"column:id" json:"id" form:"id"`
113
-	UserOrgId   int64  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
114
-	UserId      int64  `gorm:"column:user_id" json:"user_id" form:"user_id"`
115
-	PatientType int64  `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
116
-	Avatar      string `gorm:"column:avatar" json:"avatar" form:"avatar"`
117
-	Gender      int64  `gorm:"column:gender" json:"gender" form:"gender"`
118
-	Birthday    int64  `gorm:"column:birthday" json:"birthday" form:"birthday"`
119
-	Age         int64  `gorm:"column:age" json:"age"`
120
-	Name        string `gorm:"column:name" json:"name" form:"name"`
121
-	IdCardNo    string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
112
+	ID                 int64  `gorm:"column:id" json:"id" form:"id"`
113
+	UserOrgId          int64  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
114
+	UserId             int64  `gorm:"column:user_id" json:"user_id" form:"user_id"`
115
+	PatientType        int64  `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
116
+	Avatar             string `gorm:"column:avatar" json:"avatar" form:"avatar"`
117
+	Gender             int64  `gorm:"column:gender" json:"gender" form:"gender"`
118
+	Birthday           int64  `gorm:"column:birthday" json:"birthday" form:"birthday"`
119
+	Age                int64  `gorm:"column:age" json:"age"`
120
+	Name               string `gorm:"column:name" json:"name" form:"name"`
121
+	IdCardNo           string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
122
+	UserSysBeforeCount int64  `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
122
 }
123
 }
123
 
124
 
124
 func (MSchedualPatientVMList) TableName() string {
125
 func (MSchedualPatientVMList) TableName() string {
195
 	TellPhone               string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
196
 	TellPhone               string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
196
 	FirstTreatmentDate      int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
197
 	FirstTreatmentDate      int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
197
 	ContactName             string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
198
 	ContactName             string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
199
+	UserSysBeforeCount      int64   `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
198
 }
200
 }
199
 
201
 
200
 func (MSchedualPatientVM) TableName() string {
202
 func (MSchedualPatientVM) TableName() string {
387
 	TellPhone               string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
389
 	TellPhone               string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
388
 	FirstTreatmentDate      int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
390
 	FirstTreatmentDate      int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
389
 	ContactName             string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
391
 	ContactName             string  `gorm:"column:contact_name" json:"contact_name" form:"contact_name"`
392
+	UserSysBeforeCount      int64   `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
390
 }
393
 }
391
 
394
 
392
 func (MPatient) TableName() string {
395
 func (MPatient) TableName() string {

+ 1 - 1
service/patient_service.go Просмотреть файл

67
 
67
 
68
 	offset := (page - 1) * limit
68
 	offset := (page - 1) * limit
69
 
69
 
70
-	err = db.Order("p.id desc").Select(" p.id, p.user_org_id, p.user_id, p.patient_type, p.dialysis_no, p.admission_number, p.source, p.lapseto, p.partition_id, p.bed_id, p.name, p.alias, p.gender, p.marital_status, p.id_card_no, p.birthday, p.reimbursement_way_id, p.health_care_type, p.health_care_no, p.health_care_due_date, p.height, p.blood_type, p.rh, p.health_care_due_alert_date, p.education_level, p.profession, p.phone, p.home_telephone, p.relative_phone, p.relative_relations, p.home_address, p.work_unit, p.unit_address, p.children, p.receiving_date, p.is_hospital_first_dialysis, p.first_dialysis_date, p.first_dialysis_hospital, p.induction_period, p.initial_dialysis, p.total_dialysis, p.attending_doctor_id, p.head_nurse_id, p.evaluate, p.diagnose, p.remark, p.registrars_id, p.registrars, p.qr_code, p.binding_state, p.status, p.created_time, p.updated_time").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
70
+	err = db.Order("p.id desc").Select(" p.id, p.user_org_id, p.user_id, p.patient_type, p.dialysis_no, p.admission_number, p.source, p.lapseto, p.partition_id, p.bed_id, p.name, p.alias, p.gender, p.marital_status, p.id_card_no, p.birthday, p.reimbursement_way_id, p.health_care_type, p.health_care_no, p.health_care_due_date, p.height, p.blood_type, p.rh, p.health_care_due_alert_date, p.education_level, p.profession, p.phone, p.home_telephone, p.relative_phone, p.relative_relations, p.home_address, p.work_unit, p.unit_address, p.children, p.receiving_date, p.is_hospital_first_dialysis, p.first_dialysis_date, p.first_dialysis_hospital, p.induction_period, p.initial_dialysis, p.total_dialysis, p.attending_doctor_id, p.head_nurse_id, p.evaluate, p.diagnose, p.remark, p.registrars_id, p.registrars, p.qr_code, p.binding_state, p.status, p.created_time, p.updated_time,p.user_sys_before_count").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
71
 	return
71
 	return
72
 }
72
 }
73
 
73
 

+ 1 - 0
service/print_data_service/schedule_dialysis/print_schedule_dialysis_models.go Просмотреть файл

75
 	ExpenseKind                  int64   `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
75
 	ExpenseKind                  int64   `gorm:"column:expense_kind" json:"expense_kind" form:"expense_kind"`
76
 	TellPhone                    string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
76
 	TellPhone                    string  `gorm:"column:tell_phone" json:"tell_phone" form:"tell_phone"`
77
 	FirstTreatmentDate           int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
77
 	FirstTreatmentDate           int64   `gorm:"column:first_treatment_date" json:"first_treatment_date" form:"first_treatment_date"`
78
+	UserSysBeforeCount           int64   `gorm:"column:user_sys_before_count" json:"user_sys_before_count" form:"user_sys_before_count"`
78
 }
79
 }
79
 
80
 
80
 func (PatientVM) TableName() string {
81
 func (PatientVM) TableName() string {