Browse Source

2024/6/17

28169 1 month ago
parent
commit
c3d4b384dd

BIN
XT_New.exe View File


+ 4 - 4
controllers/base_api_controller.go View File

@@ -83,7 +83,7 @@ func (this *BaseAuthAPIController) Prepare() {
83 83
 		userAdmin.ModifyTime = 1530786071
84 84
 		var subscibe models.ServeSubscibe
85 85
 		subscibe.ID = 11
86
-		subscibe.OrgId = 10164 //机构id
86
+		subscibe.OrgId = 10702 //机构id
87 87
 		subscibe.PeriodStart = 1547447814
88 88
 		subscibe.PeriodEnd = 1550039814
89 89
 		subscibe.State = 1
@@ -93,7 +93,7 @@ func (this *BaseAuthAPIController) Prepare() {
93 93
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
94 94
 		subscibes[4] = &subscibe
95 95
 		var adminUserInfo service.AdminUserInfo
96
-		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
96
+		adminUserInfo.CurrentOrgId = 10702 //机构id小英9675或4
97 97
 		adminUserInfo.CurrentAppId = 12627 //4
98 98
 		adminUserInfo.AdminUser = &userAdmin
99 99
 		adminUserInfo.Subscibes = subscibes
@@ -329,7 +329,7 @@ func (this *BaseServeAPIController) Prepare() {
329 329
 		userAdmin.ModifyTime = 1530786071
330 330
 		var subscibe models.ServeSubscibe
331 331
 		subscibe.ID = 11
332
-		subscibe.OrgId = 10164 //机构id小英9675或4
332
+		subscibe.OrgId = 10702 //机构id小英9675或4
333 333
 		subscibe.PeriodStart = 1538035409
334 334
 		subscibe.PeriodEnd = 1569571409
335 335
 		subscibe.State = 1
@@ -339,7 +339,7 @@ func (this *BaseServeAPIController) Prepare() {
339 339
 		subscibes := make(map[int64]*models.ServeSubscibe, 0)
340 340
 		subscibes[4] = &subscibe
341 341
 		var adminUserInfo service.AdminUserInfo
342
-		adminUserInfo.CurrentOrgId = 10164 //机构id小英9675或4
342
+		adminUserInfo.CurrentOrgId = 10702 //机构id小英9675或4
343 343
 		adminUserInfo.CurrentAppId = 12627 //4
344 344
 		adminUserInfo.AdminUser = &userAdmin
345 345
 		adminUserInfo.Subscibes = subscibes

+ 1 - 1
controllers/his_api_controller.go View File

@@ -3197,7 +3197,7 @@ func (c *HisApiController) CreateHisPrescription() {
3197 3197
 	var adviceList []models.HisDoctorAdviceInfo
3198 3198
 	var projectList []models.HisPrescriptionProject
3199 3199
 
3200
-	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 10610 || adminInfo.CurrentOrgId == 10402 || adminInfo.CurrentOrgId == 10138 || adminInfo.CurrentOrgId == 10278 || adminInfo.CurrentOrgId == 10537 || adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10644 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10598 || adminInfo.CurrentOrgId == 10028 {
3200
+	if adminInfo.CurrentOrgId == 10489 || adminInfo.CurrentOrgId == 10510 || adminInfo.CurrentOrgId == 10164 || adminInfo.CurrentOrgId == 10478 || adminInfo.CurrentOrgId == 10318 || adminInfo.CurrentOrgId == 10480 || adminInfo.CurrentOrgId == 10633 || adminInfo.CurrentOrgId == 10610 || adminInfo.CurrentOrgId == 10402 || adminInfo.CurrentOrgId == 10138 || adminInfo.CurrentOrgId == 10278 || adminInfo.CurrentOrgId == 10537 || adminInfo.CurrentOrgId == 10265 || adminInfo.CurrentOrgId == 10644 || adminInfo.CurrentOrgId == 10635 || adminInfo.CurrentOrgId == 10598 || adminInfo.CurrentOrgId == 10028 {
3201 3201
 		if dataBody["prescriptions"] != nil && reflect.TypeOf(dataBody["prescriptions"]).String() == "[]interface {}" {
3202 3202
 			prescriptions, _ := dataBody["prescriptions"].([]interface{})
3203 3203
 

+ 7 - 0
controllers/mobile_api_controllers/check_weight_api_controller.go View File

@@ -943,6 +943,10 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
943 943
 				if adminUserInfo.Org.Id == 10471 {
944 944
 					evaluation.Temperature = 36.5
945 945
 				}
946
+
947
+				if adminUserInfo.Org.Id == 10721 {
948
+					evaluation.Temperature = 36.5
949
+				}
946 950
 			}
947 951
 		} else {
948 952
 			evaluation.UpdatedTime = time.Now().Unix()
@@ -1099,6 +1103,9 @@ func (c *CheckWeightApiController) SavePatientInfoDialysis() {
1099 1103
 				afterevaluation.ActualDisplacement = DisplacementQuantityOne
1100 1104
 			}
1101 1105
 		}
1106
+		if adminUserInfo.Org.Id == 10721 {
1107
+			afterevaluation.Temperature = 36.5
1108
+		}
1102 1109
 
1103 1110
 		err := service.UpdateAssessmentAfterDislysisRecord(&afterevaluation)
1104 1111
 

+ 4 - 0
controllers/patient_api_controller.go View File

@@ -6080,6 +6080,10 @@ func patientFormData(patient *models.Patients, data []byte, method string) (cont
6080 6080
 		}
6081 6081
 	}
6082 6082
 
6083
+	if patientBody["patient_type"] != nil && reflect.TypeOf(patientBody["patient_type"]).String() == "float64" {
6084
+		patient_type := int64(patientBody["patient_type"].(float64))
6085
+		patient.PatientType = patient_type
6086
+	}
6083 6087
 	return
6084 6088
 
6085 6089
 }

+ 23 - 0
controllers/self_drug_api_congtroller.go View File

@@ -189,6 +189,8 @@ func SelfDrugRouters() {
189 189
 
190 190
 	beego.Router("/api/drug/getdruginventorymodeprintlist", &SelfDrugApiController{}, "Get:GetDrugInventoryModePrintList")
191 191
 
192
+	beego.Router("/api/drug/modifydrugcodewarehouseinfo", &SelfDrugApiController{}, "Post:ModifyDrugCodeWarehosueInfo")
193
+
192 194
 }
193 195
 
194 196
 func (this *SelfDrugApiController) GetCurrentPatient() {
@@ -6456,3 +6458,24 @@ func (c *SelfDrugApiController) GetDrugInventoryModePrintList() {
6456 6458
 		"cancelOutInfo":     cancelOutInfo,
6457 6459
 	})
6458 6460
 }
6461
+
6462
+func (c *SelfDrugApiController) ModifyDrugCodeWarehosueInfo() {
6463
+
6464
+	dataBody := make(map[string]interface{}, 0)
6465
+	err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody)
6466
+	if err != nil {
6467
+		utils.ErrorLog(err.Error())
6468
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
6469
+		return
6470
+	}
6471
+
6472
+	drug_code := dataBody["drug_code"].(string)
6473
+
6474
+	id := int64(dataBody["id"].(float64))
6475
+
6476
+	info, _ := service.ModifyDrugCodeWarehosueInfo(id, drug_code)
6477
+	c.ServeSuccessJSON(map[string]interface{}{
6478
+		"info": info,
6479
+	})
6480
+
6481
+}

+ 2 - 3
controllers/stock_in_api_controller.go View File

@@ -4920,14 +4920,13 @@ func (this *StockManagerApiController) GetOrderDetailById() {
4920 4920
 	orgId := this.GetAdminUserInfo().CurrentOrgId
4921 4921
 	//自动出库
4922 4922
 	userDetails, err, total := service.FindUserDetailByIdOne(good_id, record_time, orgId)
4923
-	fmt.Println("userDetails00---------", userDetails)
4923
+
4924 4924
 	//手动出库
4925 4925
 	info, _ := service.GetWarehouseOutInfoById(id, good_id)
4926 4926
 
4927 4927
 	//出库数据
4928 4928
 	stockFlowList, err := service.GetStockFlowBatchNumberOne(id, good_id)
4929 4929
 
4930
-	fmt.Println("stockFlowList", stockFlowList)
4931 4930
 	//退库数据
4932 4931
 	cancelInfo, err := service.GetStockFlowCancelInfo(id, good_id)
4933 4932
 	if err == nil {
@@ -8238,7 +8237,7 @@ func (this *StockManagerApiController) UpdateBaseDrugListByUserOrgID() {
8238 8237
 	//	service.UpdateDealerManufacturerOne(item.ID, manufacturer.ManufacturerName)
8239 8238
 	//}
8240 8239
 
8241
-	drugList, _ := service.GetAllBaseDrugListTwentyOne(10265)
8240
+	drugList, _ := service.GetAllBaseDrugListTwentyOne(10598)
8242 8241
 
8243 8242
 	for _, item := range drugList {
8244 8243
 		var drug_spec = item.Dose + item.DoseUnit + "*" + strconv.FormatInt(item.MinNumber, 10) + item.MinUnit + "/" + item.MaxUnit

+ 1 - 0
models/self_drug_models.go View File

@@ -499,6 +499,7 @@ type BloodDrugWarehouseInfo struct {
499 499
 	CountUnit        string  `json:"count_unit"`
500 500
 	IsCheck          string  `gorm:"column:is_check" json:"is_check" form:"is_check"`
501 501
 	BatchNumber      string  `gorm:"column:batch_number" json:"batch_number" form:"batch_number"`
502
+	DrugCode         string  `gorm:"column:drug_code" json:"drug_code" form:"drug_code"`
502 503
 }
503 504
 
504 505
 type BloodDrugCancelStockInfo struct {

+ 2 - 2
service/gobal_config_service.go View File

@@ -349,9 +349,9 @@ func GetDrugInOrderDetail(startime int64, endtime int64, orgid int64, orderType
349 349
 	}
350 350
 
351 351
 	if manufacturerId > 0 {
352
-		err = db.Select("x.id,x.warehousing_id,x.drug_id,x.batch_number,x.number,x.product_date,x.expiry_date,x.warehousing_count,x.price,x.total_price,x.dealer,t.manufacturer,x.remark,x.ctime,x.org_id,x.is_return,x.warehousing_order,x.type,x.retail_price,x.retail_total_price,x.storehouse_id,x.max_unit as count_unit,t.drug_type,t.drug_name,t.drug_spec,t.min_unit,t.dose,t.dose_unit,t.max_unit,t.min_number,s.creater").Joins("left join xt_base_drug as t on t.id = x.drug_id and t.org_id = ? and t.status =1", orgid).Where("t.manufacturer = ?", manufacturerId).Joins("left join xt_drug_warehouse as s on s.id = x.warehousing_id and s.org_id = ? and s.status =1", orgid).Order("x.id desc").Count(&total).Offset(offset).Limit(limit).Scan(&drugInfo).Error
352
+		err = db.Select("x.id,x.warehousing_id,x.drug_id,x.batch_number,x.number,x.product_date,x.expiry_date,x.warehousing_count,x.price,x.total_price,x.dealer,t.manufacturer,x.remark,x.ctime,x.org_id,x.is_return,x.warehousing_order,x.type,x.retail_price,x.retail_total_price,x.storehouse_id,x.max_unit as count_unit,t.drug_type,t.drug_name,t.drug_spec,t.min_unit,t.dose,t.dose_unit,t.max_unit,t.min_number,s.creater,x.drug_code").Joins("left join xt_base_drug as t on t.id = x.drug_id and t.org_id = ? and t.status =1", orgid).Where("t.manufacturer = ?", manufacturerId).Joins("left join xt_drug_warehouse as s on s.id = x.warehousing_id and s.org_id = ? and s.status =1", orgid).Order("x.id desc").Count(&total).Offset(offset).Limit(limit).Scan(&drugInfo).Error
353 353
 	} else {
354
-		err = db.Select("x.id,x.warehousing_id,x.drug_id,x.batch_number,x.number,x.product_date,x.expiry_date,x.warehousing_count,x.price,x.total_price,x.dealer,t.manufacturer,x.remark,x.ctime,x.org_id,x.is_return,x.warehousing_order,x.type,x.retail_price,x.retail_total_price,x.storehouse_id,x.max_unit as count_unit,t.drug_type,t.drug_name,t.drug_spec,t.min_unit,t.dose,t.dose_unit,t.max_unit,t.min_number,s.creater").Joins("left join xt_base_drug as t on t.id = x.drug_id and t.org_id = ? and t.status =1", orgid).Joins("left join xt_drug_warehouse as s on s.id = x.warehousing_id and s.org_id = ? and s.status =1", orgid).Order("x.id desc").Count(&total).Offset(offset).Limit(limit).Scan(&drugInfo).Error
354
+		err = db.Select("x.id,x.warehousing_id,x.drug_id,x.batch_number,x.number,x.product_date,x.expiry_date,x.warehousing_count,x.price,x.total_price,x.dealer,t.manufacturer,x.remark,x.ctime,x.org_id,x.is_return,x.warehousing_order,x.type,x.retail_price,x.retail_total_price,x.storehouse_id,x.max_unit as count_unit,t.drug_type,t.drug_name,t.drug_spec,t.min_unit,t.dose,t.dose_unit,t.max_unit,t.min_number,s.creater,x.drug_code").Joins("left join xt_base_drug as t on t.id = x.drug_id and t.org_id = ? and t.status =1", orgid).Joins("left join xt_drug_warehouse as s on s.id = x.warehousing_id and s.org_id = ? and s.status =1", orgid).Order("x.id desc").Count(&total).Offset(offset).Limit(limit).Scan(&drugInfo).Error
355 355
 	}
356 356
 
357 357
 	return drugInfo, total, err

+ 9 - 8
service/his_service.go View File

@@ -204,6 +204,7 @@ type PatientTwo struct {
204 204
 	HisPatient            []*HisPatientTwo      `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"his_patient"`
205 205
 	VMHisPrescriptionInfo VMHisPrescriptionInfo `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"info"`
206 206
 	FirstLetter           string                `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
207
+	PatientType           int64                 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
207 208
 }
208 209
 
209 210
 func (PatientTwo) TableName() string {
@@ -2298,14 +2299,14 @@ func (NewSZCustomPatients) TableName() string {
2298 2299
 //}
2299 2300
 
2300 2301
 type NewTempPatients struct {
2301
-	ID           int64  `gorm:"column:id" json:"id" form:"id"`
2302
-	UserOrgId    int64  `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
2303
-	Name         string `gorm:"column:name" json:"name" form:"name"`
2304
-	Status       int64  `gorm:"column:status" json:"status" form:"status"`
2305
-	IdCardNo     string `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
2306
-	ScheduleType int64  `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
2307
-	FirstLetter  string `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
2308
-
2302
+	ID                    int64                 `gorm:"column:id" json:"id" form:"id"`
2303
+	UserOrgId             int64                 `gorm:"column:user_org_id" json:"user_org_id" form:"user_org_id"`
2304
+	Name                  string                `gorm:"column:name" json:"name" form:"name"`
2305
+	Status                int64                 `gorm:"column:status" json:"status" form:"status"`
2306
+	IdCardNo              string                `gorm:"column:id_card_no" json:"id_card_no" form:"id_card_no"`
2307
+	ScheduleType          int64                 `gorm:"column:schedule_type" json:"schedule_type" form:"schedule_type"`
2308
+	FirstLetter           string                `gorm:"column:first_letter" json:"first_letter" form:"first_letter"`
2309
+	PatientType           int64                 `gorm:"column:patient_type" json:"patient_type" form:"patient_type"`
2309 2310
 	Schedule              Schedule              `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"schedule"`
2310 2311
 	HisPatient            []*HisPatient         `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"his_patient"`
2311 2312
 	HisPrescription       []*HisPrescription    `gorm:"ForeignKey:PatientId;AssociationForeignKey:ID" json:"prescription"`

+ 4 - 4
service/patient_service.go View File

@@ -76,20 +76,20 @@ func GetPatientList(orgID int64, keywords string, page, limit, schedulType, bind
76 76
 
77 77
 	offset := (page - 1) * limit
78 78
 	if lapseto == 2 || lapseto == 3 {
79
-		err = db.Order("p.death_time 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,p.out_reason,p.death_time,p.is_infectious").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
79
+		err = db.Order("p.death_time 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,p.out_reason,p.death_time,p.is_infectious,p.patient_type").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
80 80
 
81 81
 	}
82 82
 	if lapseto != 2 && lapseto != 3 {
83 83
 		if orgID != 10579 && orgID != 10600 && orgID != 10587 {
84
-			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,p.out_reason,p.death_time,p.is_infectious").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
84
+			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,p.out_reason,p.death_time,p.is_infectious,p.patient_type").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
85 85
 		}
86 86
 
87 87
 		if orgID == 10579 || orgID == 10600 {
88
-			err = db.Order("p.dialysis_no asc").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,p.out_reason,p.death_time,p.is_infectious").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
88
+			err = db.Order("p.dialysis_no asc").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,p.out_reason,p.death_time,p.is_infectious,p.patient_type").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
89 89
 		}
90 90
 
91 91
 		if orgID == 10587 {
92
-			err = db.Order("p.created_time 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,p.out_reason,p.death_time,p.is_infectious").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
92
+			err = db.Order("p.created_time 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,p.out_reason,p.death_time,p.is_infectious,p.patient_type").Group("p.id").Count(&total).Offset(offset).Limit(limit).Find(&patients).Error
93 93
 		}
94 94
 
95 95
 	}

+ 8 - 0
service/self_drug_service.go View File

@@ -5371,3 +5371,11 @@ func GetDrugMonthCancelOutInfo(org_id int64, start_time int64) (flow []*models.X
5371 5371
 
5372 5372
 	return flow, err
5373 5373
 }
5374
+
5375
+func ModifyDrugCodeWarehosueInfo(id int64, drug_code string) (models.XtDrugWarehouseInfo, error) {
5376
+
5377
+	drugWarehouseInfo := models.XtDrugWarehouseInfo{}
5378
+	err := XTWriteDB().Model(&models.XtDrugWarehouseInfo{}).Where("id = ? and status=1", id).Update(map[string]interface{}{"drug_code": drug_code}).Error
5379
+
5380
+	return drugWarehouseInfo, err
5381
+}