Browse Source

11月9日库存管理

XMLWAN 2 years ago
parent
commit
60a04a8702

+ 1 - 1
conf/app.conf View File

@@ -1,5 +1,5 @@
1 1
 appname = 血透
2
-httpport = 9531
2
+httpport = 9529
3 3
 runmode = dev
4 4
 #dev/prod
5 5
 

+ 10 - 0
controllers/new_mobile_api_controllers/new_dialysis_api_controller.go View File

@@ -292,6 +292,7 @@ func (this *NewDialysisApiController) SavePatient() {
292 292
 			RegistrarsId:      adminInfo.AdminUser.Id,
293 293
 			RelativePhone:     relative_phone,
294 294
 			Remark:            remark,
295
+			SchRemark:         remark,
295 296
 		}
296 297
 		err = service.CreateOldPatient(&patients)
297 298
 		fmt.Print("报错", err)
@@ -334,6 +335,7 @@ func (this *NewDialysisApiController) SavePatient() {
334 335
 			RegistrarsId:      adminInfo.AdminUser.Id,
335 336
 			RelativePhone:     relative_phone,
336 337
 			Remark:            remark,
338
+			SchRemark:         remark,
337 339
 		}
338 340
 		err = service.CreateNewPatient(&patientsNew)
339 341
 		key := strconv.FormatInt(orgid, 10) + ":" + strconv.FormatInt(patient.ID, 10) + ":patient_info"
@@ -401,6 +403,7 @@ func (this *NewDialysisApiController) SavePatient() {
401 403
 					IdCardNo:          idCard,
402 404
 					EquitmentId:       requipmentId,
403 405
 					Remark:            remark,
406
+					SchRemark:         remark,
404 407
 				}
405 408
 				err = service.CreateNewPatient(&patientsNew)
406 409
 				if err != nil {
@@ -461,6 +464,8 @@ func (this *NewDialysisApiController) SavePatient() {
461 464
 								MemberPatienttype: patient_type,
462 465
 								MemberTreatement:  treatmentmethod,
463 466
 								RelativePhone:     relative_phone,
467
+								SchRemark:         remark,
468
+								Remark:            remark,
464 469
 							}
465 470
 							err = service.CreateNewPatient(&patientsNew)
466 471
 							fmt.Print("报错", err)
@@ -548,6 +553,7 @@ func (this *NewDialysisApiController) SavePatient() {
548 553
 					MemberTreatement:  treatmentmethod,
549 554
 					RelativePhone:     relative_phone,
550 555
 					Remark:            remark,
556
+					SchRemark:         remark,
551 557
 				}
552 558
 				err = service.CreateNewPatient(&patientsNew)
553 559
 				fmt.Print("报错", err)
@@ -1387,6 +1393,7 @@ func (this *NewDialysisApiController) UpdatedPatient() {
1387 1393
 			OutReason:         out_reason,
1388 1394
 			RelativePhone:     relative_phone,
1389 1395
 			Remark:            remark,
1396
+			SchRemark:         remark,
1390 1397
 		}
1391 1398
 		err = service.UpdatedPatient(patients, patient.BloodId)
1392 1399
 		key := strconv.FormatInt(orgid, 10) + ":" + strconv.FormatInt(patient.BloodId, 10) + ":patient_info"
@@ -1418,6 +1425,7 @@ func (this *NewDialysisApiController) UpdatedPatient() {
1418 1425
 			DeathTime:         death_time,
1419 1426
 			RelativePhone:     relative_phone,
1420 1427
 			Remark:            remark,
1428
+			SchRemark:         remark,
1421 1429
 		}
1422 1430
 		err = service.UpdateXtPatientNew(patientsNew, id)
1423 1431
 		if err != nil {
@@ -1477,6 +1485,7 @@ func (this *NewDialysisApiController) UpdatedPatient() {
1477 1485
 			DeathTime:         death_time,
1478 1486
 			RelativePhone:     relative_phone,
1479 1487
 			Remark:            remark,
1488
+			SchRemark:         remark,
1480 1489
 		}
1481 1490
 		err = service.UpdateXtPatientNew(xtPatientsNew, id)
1482 1491
 		fmt.Print("更新失败", err)
@@ -1535,6 +1544,7 @@ func (this *NewDialysisApiController) UpdatedPatient() {
1535 1544
 			DeathTime:         death_time,
1536 1545
 			RelativePhone:     relative_phone,
1537 1546
 			Remark:            remark,
1547
+			SchRemark:         remark,
1538 1548
 		}
1539 1549
 		err = service.UpdateXtPatientNewOne(patientsNew, id)
1540 1550
 		if err != nil {

+ 1 - 1
controllers/patient_api_controller.go View File

@@ -485,7 +485,6 @@ func (c *PatientApiController) EditPatient() {
485 485
 	patient.UpdatedTime = time.Now().Unix()
486 486
 	patient.IsInfectious = is_infectious
487 487
 	patient.RemindCycle = remind_cycle
488
-	fmt.Println("hhhhh2h32322323332323232323232322323", patient.RemindCycle)
489 488
 	err := service.UpdatePatient(&patient, contagions, diseases)
490 489
 	if err != nil {
491 490
 		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeUpdatePatient)
@@ -581,6 +580,7 @@ func (c *PatientApiController) EditPatient() {
581 580
 		BloodPatients:             1,
582 581
 		Lapseto:                   patient.Lapseto,
583 582
 		TrobleShoot:               patient.TrobleShoot,
583
+		SchRemark:                 patient.SchRemark,
584 584
 	}
585 585
 	//	//更新病人ID获取新表病人ID
586 586
 	err = service.UpdatepatientTwo(&patientsNew, id)

+ 6 - 0
service/new_warehouse_service.go View File

@@ -83,6 +83,7 @@ func ConsumablesGoodDelivery(orgID int64, patient_id int64, record_time int64, g
83 83
 			StorehouseId:            goods.StorehouseId,
84 84
 			IsCheck:                 1,
85 85
 			OverCount:               sum_count,
86
+			RegisterNumber:          warehouse.RegisterNumber,
86 87
 		}
87 88
 		warehouseOutInfo.Count = count
88 89
 		if orgID == 9671 || orgID == 10265 {
@@ -156,6 +157,7 @@ func ConsumablesGoodDelivery(orgID int64, patient_id int64, record_time int64, g
156 157
 				StorehouseId:            goods.StorehouseId,
157 158
 				OverCount:               sum_count,
158 159
 				BuyPrice:                warehouse.Price,
160
+				RegisterNumber:          warehouse.RegisterNumber,
159 161
 			}
160 162
 			if orgID == 9671 || orgID == 10265 {
161 163
 				goodsInfo, _ := FindeGoodInfo(orgID, goods.ProjectId)
@@ -270,6 +272,7 @@ func ConsumablesGoodDelivery(orgID int64, patient_id int64, record_time int64, g
270 272
 				BuyPrice:                warehouse.Price,
271 273
 				ProjectId:               goods.ProjectId,
272 274
 				OverCount:               sum_count,
275
+				RegisterNumber:          warehouse.RegisterNumber,
273 276
 			}
274 277
 			if orgID == 9671 || orgID == 10265 {
275 278
 				goodsInfo, _ := FindeGoodInfo(orgID, goods.ProjectId)
@@ -348,6 +351,7 @@ func ConsumablesGoodDelivery(orgID int64, patient_id int64, record_time int64, g
348 351
 			StorehouseId:            goods.StorehouseId,
349 352
 			IsCheck:                 1,
350 353
 			OverCount:               sum_count,
354
+			RegisterNumber:          warehouse.RegisterNumber,
351 355
 		}
352 356
 		warehouseOutInfo.Count = stock_number
353 357
 		if orgID == 9671 || orgID == 10265 {
@@ -413,6 +417,7 @@ func ConsumablesGoodDelivery(orgID int64, patient_id int64, record_time int64, g
413 417
 				StorehouseId:            goods.StorehouseId,
414 418
 				OverCount:               sum_count,
415 419
 				BuyPrice:                warehouse.Price,
420
+				RegisterNumber:          warehouse.RegisterNumber,
416 421
 			}
417 422
 			if orgID == 9671 || orgID == 10265 {
418 423
 				goodsInfo, _ := FindeGoodInfo(orgID, goods.ProjectId)
@@ -523,6 +528,7 @@ func ConsumablesGoodDelivery(orgID int64, patient_id int64, record_time int64, g
523 528
 				BuyPrice:                warehouse.Price,
524 529
 				ProjectId:               goods.ProjectId,
525 530
 				OverCount:               sum_count,
531
+				RegisterNumber:          warehouse.RegisterNumber,
526 532
 			}
527 533
 			if orgID == 9671 || orgID == 10265 {
528 534
 				goodsInfo, _ := FindeGoodInfo(orgID, goods.ProjectId)

+ 1 - 1
service/patient_service.go View File

@@ -830,7 +830,7 @@ func UpdatePatientLapseto(patientid int64, lapseto models.PatientLapseto) error
830 830
 func UpdatepatientTwo(patientsNew *models.XtPatientsNew, id int64) error {
831 831
 
832 832
 	err := XTWriteDB().Model(&patientsNew).Where("blood_id = ?", id).Update(map[string]interface{}{"user_org_id": patientsNew.UserOrgId, "user_id": patientsNew.UserId, "avatar": patientsNew.Avatar, "patient_type": patientsNew.Avatar, "dialysis_no": patientsNew.DialysisNo, "admission_number": patientsNew.AdmissionNumber, "source": patientsNew.Source, "lapseto": patientsNew.Lapseto, "partition_id": patientsNew.PartitionId, "bed_id": patientsNew.BedId, "name": patientsNew.Name, "alias": patientsNew.Alias, "gender": patientsNew.Gender, "marital_status": patientsNew.MaritalStatus, "id_card_no": patientsNew.IdCardNo, "birthday": patientsNew.Birthday, "reimbursement_way_id": patientsNew.ReimbursementWayId, "health_care_type": patientsNew.HealthCareType, "health_care_no": patientsNew.HealthCareType, "health_care_due_date": patientsNew.HealthCareType, "height": patientsNew.Height, "blood_type": patientsNew.BloodType, "rh": patientsNew.Rh, "health_care_due_alert_date": patientsNew.HealthCareDueAlertDate, "education_level": patientsNew.EducationLevel, "profession": patientsNew.Profession, "phone": patientsNew.Phone, "home_telephone": patientsNew.HomeTelephone, "relative_phone": patientsNew.RelativePhone, "relative_relations": patientsNew.RelativeRelations, "home_address": patientsNew.HomeAddress, "work_unit": patientsNew.WorkUnit, "unit_address": patientsNew.UnitAddress, "children": patientsNew.Children, "receiving_date": patientsNew.ReceivingDate, "is_hospital_first_dialysis": patientsNew.IsHospitalFirstDialysis, "first_dialysis_date": patientsNew.FirstDialysisDate, "first_dialysis_hospital": patientsNew.FirstDialysisHospital, "predialysis_condition": patientsNew.PredialysisCondition, "pre_hospital_dialysis_frequency": patientsNew.PreHospitalDialysisFrequency, "pre_hospital_dialysis_times": patientsNew.PreHospitalDialysisFrequency, "hospital_first_dialysis_date": patientsNew.HospitalFirstDialysisDate, "induction_period": patientsNew.InductionPeriod, "initial_dialysis": patientsNew.InitialDialysis, "total_dialysis": patientsNew.TotalDialysis, "attending_doctor_id": patientsNew.AttendingDoctorId, "head_nurse_id": patientsNew.HeadNurseId, "evaluate": patientsNew.Evaluate, "diagnose": patientsNew.Diagnose, "remark": patientsNew.Remark, "registrars_id": patientsNew.RegistrarsId, "registrars": patientsNew.Registrars, "qr_code": patientsNew.QrCode, "binding_state": patientsNew.BindingState, "patient_complains": patientsNew.PatientComplains, "present_history": patientsNew.PresentHistory, "past_history": patientsNew.PastHistory, "temperature": patientsNew.Temperature,
833
-		"pulse": patientsNew.Pulse, "respiratory": patientsNew.Respiratory, "sbp": patientsNew.Sbp, "dbp": patientsNew.Dbp, "nation": patientsNew.Nation, "native_place": patientsNew.NativePlace, "age": patientsNew.Age, "infectious_next_record_time": patientsNew.InfectiousNextRecordTime, "is_infectious": patientsNew.IsInfectious, "remind_cycle": patientsNew.RemindCycle, "response_result": patientsNew.ResponseResult, "is_open_remind": patientsNew.IsOpenRemind, "first_treatment_date": patientsNew.FirstTreatmentDate, "dialysis_age": patientsNew.DialysisAge, "expense_kind": patientsNew.ExpenseKind, "tell_phone": patientsNew.ExpenseKind, "contact_name": patientsNew.ContactName, "blood_patients": patientsNew.BloodPatients, "slow_patients": patientsNew.SlowPatients, "member_patients": patientsNew.MemberPatients, "ecommer_patients": patientsNew.EcommerPatients, "troble_shoot": patientsNew.TrobleShoot}).Error
833
+		"pulse": patientsNew.Pulse, "respiratory": patientsNew.Respiratory, "sbp": patientsNew.Sbp, "dbp": patientsNew.Dbp, "nation": patientsNew.Nation, "native_place": patientsNew.NativePlace, "age": patientsNew.Age, "infectious_next_record_time": patientsNew.InfectiousNextRecordTime, "is_infectious": patientsNew.IsInfectious, "remind_cycle": patientsNew.RemindCycle, "response_result": patientsNew.ResponseResult, "is_open_remind": patientsNew.IsOpenRemind, "first_treatment_date": patientsNew.FirstTreatmentDate, "dialysis_age": patientsNew.DialysisAge, "expense_kind": patientsNew.ExpenseKind, "tell_phone": patientsNew.ExpenseKind, "contact_name": patientsNew.ContactName, "blood_patients": patientsNew.BloodPatients, "slow_patients": patientsNew.SlowPatients, "member_patients": patientsNew.MemberPatients, "ecommer_patients": patientsNew.EcommerPatients, "troble_shoot": patientsNew.TrobleShoot, "sch_remark": patientsNew.SchRemark}).Error
834 834
 	return err
835 835
 }
836 836
 

+ 2 - 2
service/patientmanage_service.go View File

@@ -950,14 +950,14 @@ func GetNewPatient(id int64) (models.XtPatientsNew, error) {
950 950
 
951 951
 func UpdatedPatient(patients models.Patients, id int64) error {
952 952
 
953
-	err := XTWriteDB().Model(&patients).Where("id=?", id).Update(map[string]interface{}{"name": patients.Name, "gender": patients.Gender, "birthday": patients.Birthday, "age": patients.Age, "phone": patients.Phone, "lapseto": patients.Lapseto, "admission_number": patients.AdmissionNumber, "first_dialysis_date": patients.FirstDialysisDate, "diagnose": patients.Diagnose, "source": patients.Source, "dialysis_no": patients.DialysisNo, "avatar": patients.Avatar, "id_card_no": patients.IdCardNo, "is_infectious": patients.IsInfectious, "out_reason": patients.OutReason, "death_time": patients.DeathTime, "relative_phone": patients.RelativePhone}).Error
953
+	err := XTWriteDB().Model(&patients).Where("id=?", id).Update(map[string]interface{}{"name": patients.Name, "gender": patients.Gender, "birthday": patients.Birthday, "age": patients.Age, "phone": patients.Phone, "lapseto": patients.Lapseto, "admission_number": patients.AdmissionNumber, "first_dialysis_date": patients.FirstDialysisDate, "diagnose": patients.Diagnose, "source": patients.Source, "dialysis_no": patients.DialysisNo, "avatar": patients.Avatar, "id_card_no": patients.IdCardNo, "is_infectious": patients.IsInfectious, "out_reason": patients.OutReason, "death_time": patients.DeathTime, "relative_phone": patients.RelativePhone, "remark": patients.Remark, "sch_remark": patients.SchRemark}).Error
954 954
 
955 955
 	return err
956 956
 }
957 957
 
958 958
 func UpdateXtPatientNew(patients models.XtPatientsNew, id int64) error {
959 959
 
960
-	err := XTWriteDB().Model(&patients).Where("id=?", id).Update(map[string]interface{}{"name": patients.Name, "gender": patients.Gender, "birthday": patients.Birthday, "age": patients.Age, "phone": patients.Phone, "lapseto": patients.Lapseto, "admission_number": patients.AdmissionNumber, "first_dialysis_date": patients.FirstDialysisDate, "diagnose": patients.Diagnose, "source": patients.Source, "dialysis_no": patients.DialysisNo, "avatar": patients.Avatar, "id_card_no": patients.IdCardNo, "is_infectious": patients.IsInfectious, "out_reason": patients.OutReason, "death_time": patients.DeathTime, "relative_phone": patients.RelativePhone, "remark": patients.Remark}).Error
960
+	err := XTWriteDB().Model(&patients).Where("id=?", id).Update(map[string]interface{}{"name": patients.Name, "gender": patients.Gender, "birthday": patients.Birthday, "age": patients.Age, "phone": patients.Phone, "lapseto": patients.Lapseto, "admission_number": patients.AdmissionNumber, "first_dialysis_date": patients.FirstDialysisDate, "diagnose": patients.Diagnose, "source": patients.Source, "dialysis_no": patients.DialysisNo, "avatar": patients.Avatar, "id_card_no": patients.IdCardNo, "is_infectious": patients.IsInfectious, "out_reason": patients.OutReason, "death_time": patients.DeathTime, "relative_phone": patients.RelativePhone, "remark": patients.Remark, "sch_remark": patients.SchRemark}).Error
961 961
 
962 962
 	return err
963 963
 }