|
@@ -192,11 +192,11 @@ func (this *MachineApiController) SaveManageInfo() {
|
192
|
192
|
}
|
193
|
193
|
|
194
|
194
|
addmacher := &models.DeviceAddmacher{
|
195
|
|
- SerialNumber: serial_numbe,
|
196
|
|
- DeviceType: device_type,
|
197
|
|
- BedNumber: number.Number,
|
198
|
|
- BedId: bed_number,
|
199
|
|
- ZoneId: number.ZoneID,
|
|
195
|
+ SerialNumber: serial_numbe,
|
|
196
|
+ DeviceType: device_type,
|
|
197
|
+ BedNumber: number.Number,
|
|
198
|
+ BedId: bed_number,
|
|
199
|
+ //ZoneId: number.ZoneID,
|
200
|
200
|
DeviceName: device_name,
|
201
|
201
|
ManufactureFactory: manufacture_factory,
|
202
|
202
|
ServiceManufacturer: service_manufacturer,
|
|
@@ -1146,38 +1146,38 @@ func (this *MachineApiController) SaveInformation() {
|
1146
|
1146
|
fmt.Print("information", information)
|
1147
|
1147
|
if errinfor == gorm.ErrRecordNotFound {
|
1148
|
1148
|
infor := models.DeviceInformation{
|
1149
|
|
- Date: startdate,
|
1150
|
|
- Class: classtype,
|
1151
|
|
- Zone: zone,
|
1152
|
|
- BedNumber: bednumber,
|
1153
|
|
- PatientId: patient_time,
|
1154
|
|
- Contagion: contagion,
|
1155
|
|
- DialysisMode: dialysis_mode,
|
1156
|
|
- StartTime: startDate.Unix(),
|
1157
|
|
- EndTime: endDate.Unix(),
|
1158
|
|
- DialysisHour: dialysis_time,
|
1159
|
|
- Hyperfiltratio: hyperfiletration,
|
1160
|
|
- WeightLoss: weight_loss,
|
1161
|
|
- WarningValue: warining_value,
|
1162
|
|
- UserTotal: user_total,
|
1163
|
|
- Move: run,
|
1164
|
|
- FailureStage: failure_stage,
|
1165
|
|
- FaultDescription: falult_desciription,
|
1166
|
|
- CodeInformation: code_information,
|
1167
|
|
- DisinfectantType: disinfectant_type,
|
1168
|
|
- DisinfectType: disinfect_type,
|
1169
|
|
- Disinfection: disinfection,
|
1170
|
|
- MachineRun: machine_run,
|
1171
|
|
- FluidPath: fluid_path,
|
1172
|
|
- Disinfectant: disinfectant,
|
1173
|
|
- DisinfectionStatus: disinfection_status,
|
1174
|
|
- DisinfectionResidue: disinfection_residue,
|
1175
|
|
- LongTime: longtime,
|
1176
|
|
- DisinfecStartime: start_Date.Unix(),
|
1177
|
|
- DisinfecEndtime: end_Date.Unix(),
|
1178
|
|
- DialysisChecked: dialysis_checked,
|
1179
|
|
- DialysisName: dialysis_name,
|
1180
|
|
- Norms: norms,
|
|
1149
|
+ Date: startdate,
|
|
1150
|
+ Class: classtype,
|
|
1151
|
+ Zone: zone,
|
|
1152
|
+ BedNumber: bednumber,
|
|
1153
|
+ PatientId: patient_time,
|
|
1154
|
+ Contagion: contagion,
|
|
1155
|
+ DialysisMode: dialysis_mode,
|
|
1156
|
+ StartTime: startDate.Unix(),
|
|
1157
|
+ EndTime: endDate.Unix(),
|
|
1158
|
+ DialysisHour: dialysis_time,
|
|
1159
|
+ Hyperfiltratio: hyperfiletration,
|
|
1160
|
+ WeightLoss: weight_loss,
|
|
1161
|
+ WarningValue: warining_value,
|
|
1162
|
+ UserTotal: user_total,
|
|
1163
|
+ Move: run,
|
|
1164
|
+ FailureStage: failure_stage,
|
|
1165
|
+ FaultDescription: falult_desciription,
|
|
1166
|
+ CodeInformation: code_information,
|
|
1167
|
+ DisinfectantType: disinfectant_type,
|
|
1168
|
+ DisinfectType: disinfect_type,
|
|
1169
|
+ Disinfection: disinfection,
|
|
1170
|
+ MachineRun: machine_run,
|
|
1171
|
+ FluidPath: fluid_path,
|
|
1172
|
+ Disinfectant: disinfectant,
|
|
1173
|
+ DisinfectionStatus: disinfection_status,
|
|
1174
|
+ DisinfectionResidue: disinfection_residue,
|
|
1175
|
+ LongTime: longtime,
|
|
1176
|
+ DisinfecStartime: start_Date.Unix(),
|
|
1177
|
+ DisinfecEndtime: end_Date.Unix(),
|
|
1178
|
+ DialysisChecked: dialysis_checked,
|
|
1179
|
+ DialysisName: dialysis_name,
|
|
1180
|
+ Norms: norms,
|
1181
|
1181
|
DialysisConcentration: dialysis_concentration,
|
1182
|
1182
|
GermChecked: germ_checked,
|
1183
|
1183
|
GermName: germ_name,
|
|
@@ -1198,38 +1198,38 @@ func (this *MachineApiController) SaveInformation() {
|
1198
|
1198
|
})
|
1199
|
1199
|
} else if errinfor == nil {
|
1200
|
1200
|
infor := models.DeviceInformation{
|
1201
|
|
- Date: startdate,
|
1202
|
|
- Class: classtype,
|
1203
|
|
- Zone: zone,
|
1204
|
|
- BedNumber: bednumber,
|
1205
|
|
- PatientId: patient_time,
|
1206
|
|
- Contagion: contagion,
|
1207
|
|
- DialysisMode: dialysis_mode,
|
1208
|
|
- StartTime: startDate.Unix(),
|
1209
|
|
- EndTime: endDate.Unix(),
|
1210
|
|
- DialysisHour: dialysis_time,
|
1211
|
|
- Hyperfiltratio: hyperfiletration,
|
1212
|
|
- WeightLoss: weight_loss,
|
1213
|
|
- WarningValue: warining_value,
|
1214
|
|
- UserTotal: user_total,
|
1215
|
|
- Move: run,
|
1216
|
|
- FailureStage: failure_stage,
|
1217
|
|
- FaultDescription: falult_desciription,
|
1218
|
|
- CodeInformation: code_information,
|
1219
|
|
- DisinfectantType: disinfectant_type,
|
1220
|
|
- DisinfectType: disinfect_type,
|
1221
|
|
- Disinfection: disinfection,
|
1222
|
|
- MachineRun: machine_run,
|
1223
|
|
- FluidPath: fluid_path,
|
1224
|
|
- Disinfectant: disinfectant,
|
1225
|
|
- DisinfectionStatus: disinfection_status,
|
1226
|
|
- DisinfectionResidue: disinfection_residue,
|
1227
|
|
- LongTime: longtime,
|
1228
|
|
- DisinfecStartime: start_Date.Unix(),
|
1229
|
|
- DisinfecEndtime: end_Date.Unix(),
|
1230
|
|
- DialysisChecked: dialysis_checked,
|
1231
|
|
- DialysisName: dialysis_name,
|
1232
|
|
- Norms: norms,
|
|
1201
|
+ Date: startdate,
|
|
1202
|
+ Class: classtype,
|
|
1203
|
+ Zone: zone,
|
|
1204
|
+ BedNumber: bednumber,
|
|
1205
|
+ PatientId: patient_time,
|
|
1206
|
+ Contagion: contagion,
|
|
1207
|
+ DialysisMode: dialysis_mode,
|
|
1208
|
+ StartTime: startDate.Unix(),
|
|
1209
|
+ EndTime: endDate.Unix(),
|
|
1210
|
+ DialysisHour: dialysis_time,
|
|
1211
|
+ Hyperfiltratio: hyperfiletration,
|
|
1212
|
+ WeightLoss: weight_loss,
|
|
1213
|
+ WarningValue: warining_value,
|
|
1214
|
+ UserTotal: user_total,
|
|
1215
|
+ Move: run,
|
|
1216
|
+ FailureStage: failure_stage,
|
|
1217
|
+ FaultDescription: falult_desciription,
|
|
1218
|
+ CodeInformation: code_information,
|
|
1219
|
+ DisinfectantType: disinfectant_type,
|
|
1220
|
+ DisinfectType: disinfect_type,
|
|
1221
|
+ Disinfection: disinfection,
|
|
1222
|
+ MachineRun: machine_run,
|
|
1223
|
+ FluidPath: fluid_path,
|
|
1224
|
+ Disinfectant: disinfectant,
|
|
1225
|
+ DisinfectionStatus: disinfection_status,
|
|
1226
|
+ DisinfectionResidue: disinfection_residue,
|
|
1227
|
+ LongTime: longtime,
|
|
1228
|
+ DisinfecStartime: start_Date.Unix(),
|
|
1229
|
+ DisinfecEndtime: end_Date.Unix(),
|
|
1230
|
+ DialysisChecked: dialysis_checked,
|
|
1231
|
+ DialysisName: dialysis_name,
|
|
1232
|
+ Norms: norms,
|
1233
|
1233
|
DialysisConcentration: dialysis_concentration,
|
1234
|
1234
|
GermChecked: germ_checked,
|
1235
|
1235
|
GermName: germ_name,
|
|
@@ -2367,37 +2367,37 @@ func (this *MachineApiController) UpdateForm() {
|
2367
|
2367
|
fmt.Println("签名", sign_name)
|
2368
|
2368
|
|
2369
|
2369
|
information := models.DeviceInformation{
|
2370
|
|
- Date: startdate,
|
2371
|
|
- Class: classtype,
|
2372
|
|
- Zone: zone,
|
2373
|
|
- BedNumber: bednumber,
|
2374
|
|
- Contagion: contagion,
|
2375
|
|
- DialysisMode: dialysis_mode,
|
2376
|
|
- StartTime: startDate.Unix(),
|
2377
|
|
- EndTime: endDate.Unix(),
|
2378
|
|
- DialysisHour: dialysis_time,
|
2379
|
|
- Hyperfiltratio: hyperfiletration,
|
2380
|
|
- WeightLoss: weight_loss,
|
2381
|
|
- WarningValue: warining_value,
|
2382
|
|
- UserTotal: user_total,
|
2383
|
|
- Move: run,
|
2384
|
|
- FailureStage: failure_stage,
|
2385
|
|
- FaultDescription: falult_desciription,
|
2386
|
|
- CodeInformation: code_information,
|
2387
|
|
- DisinfectantType: disinfectant_type,
|
2388
|
|
- DisinfectType: disinfect_type,
|
2389
|
|
- Disinfection: disinfection,
|
2390
|
|
- MachineRun: machine_run,
|
2391
|
|
- FluidPath: fluid_path,
|
2392
|
|
- Disinfectant: disinfectant,
|
2393
|
|
- DisinfectionStatus: disinfection_status,
|
2394
|
|
- DisinfectionResidue: disinfection_residue,
|
2395
|
|
- LongTime: longtime,
|
2396
|
|
- DisinfecStartime: distartime,
|
2397
|
|
- DisinfecEndtime: diendtime,
|
2398
|
|
- DialysisChecked: dialysis_checked,
|
2399
|
|
- DialysisName: dialysis_name,
|
2400
|
|
- Norms: norms,
|
|
2370
|
+ Date: startdate,
|
|
2371
|
+ Class: classtype,
|
|
2372
|
+ Zone: zone,
|
|
2373
|
+ BedNumber: bednumber,
|
|
2374
|
+ Contagion: contagion,
|
|
2375
|
+ DialysisMode: dialysis_mode,
|
|
2376
|
+ StartTime: startDate.Unix(),
|
|
2377
|
+ EndTime: endDate.Unix(),
|
|
2378
|
+ DialysisHour: dialysis_time,
|
|
2379
|
+ Hyperfiltratio: hyperfiletration,
|
|
2380
|
+ WeightLoss: weight_loss,
|
|
2381
|
+ WarningValue: warining_value,
|
|
2382
|
+ UserTotal: user_total,
|
|
2383
|
+ Move: run,
|
|
2384
|
+ FailureStage: failure_stage,
|
|
2385
|
+ FaultDescription: falult_desciription,
|
|
2386
|
+ CodeInformation: code_information,
|
|
2387
|
+ DisinfectantType: disinfectant_type,
|
|
2388
|
+ DisinfectType: disinfect_type,
|
|
2389
|
+ Disinfection: disinfection,
|
|
2390
|
+ MachineRun: machine_run,
|
|
2391
|
+ FluidPath: fluid_path,
|
|
2392
|
+ Disinfectant: disinfectant,
|
|
2393
|
+ DisinfectionStatus: disinfection_status,
|
|
2394
|
+ DisinfectionResidue: disinfection_residue,
|
|
2395
|
+ LongTime: longtime,
|
|
2396
|
+ DisinfecStartime: distartime,
|
|
2397
|
+ DisinfecEndtime: diendtime,
|
|
2398
|
+ DialysisChecked: dialysis_checked,
|
|
2399
|
+ DialysisName: dialysis_name,
|
|
2400
|
+ Norms: norms,
|
2401
|
2401
|
DialysisConcentration: dialysis_concentration,
|
2402
|
2402
|
GermChecked: germ_checked,
|
2403
|
2403
|
GermName: germ_name,
|
|
@@ -2521,10 +2521,13 @@ func (this *MachineApiController) GetUserForm() {
|
2521
|
2521
|
}
|
2522
|
2522
|
|
2523
|
2523
|
func (this *MachineApiController) GetBedForm() {
|
|
2524
|
+ adminUser := this.GetAdminUserInfo()
|
|
2525
|
+ orgId := adminUser.CurrentOrgId
|
2524
|
2526
|
id, _ := this.GetInt64("id")
|
2525
|
2527
|
fmt.Println("id", id)
|
2526
|
2528
|
addmacher, err := service.GetZoneForm(id)
|
2527
|
|
- number, err := service.GetBedForm(addmacher.ZoneId)
|
|
2529
|
+ bed, err := service.GetZoneId(addmacher.BedId, orgId)
|
|
2530
|
+ number, err := service.GetBedForm(bed.ZoneID)
|
2528
|
2531
|
if err != nil {
|
2529
|
2532
|
this.ServeFailJsonSend(enums.ErrorCodeDBDelete, "查询:("+err.Error()+")")
|
2530
|
2533
|
return
|