|
@@ -1406,7 +1406,9 @@ func (this *MachineApiController) SaveBacteria() {
|
1406
|
1406
|
|
1407
|
1407
|
detectionResult := dataBody["detection_result"].(string)
|
1408
|
1408
|
sort := dataBody["sort"].(string)
|
1409
|
|
- pass_examination := int64(dataBody["pass_examination"].(float64))
|
|
1409
|
+
|
|
1410
|
+ examination := dataBody["pass_examination"].(string)
|
|
1411
|
+ pass_examination, err := strconv.ParseInt(examination, 10, 64)
|
1410
|
1412
|
modifications := int64(dataBody["modifications"].(float64))
|
1411
|
1413
|
culture := models.DeviceCulture{
|
1412
|
1414
|
BedId: addmacher.BedId,
|
|
@@ -1475,9 +1477,10 @@ func (this *MachineApiController) SaveLinconmycin() {
|
1475
|
1477
|
detectionResult := dataBody["detection_resultb"].(string)
|
1476
|
1478
|
|
1477
|
1479
|
sort := dataBody["sort"].(string)
|
1478
|
|
- pass_examination := int64(dataBody["pass_examination"].(float64))
|
1479
|
|
- modifications := int64(dataBody["modifications"].(float64))
|
1480
|
1480
|
|
|
1481
|
+ modifications := int64(dataBody["modifications"].(float64))
|
|
1482
|
+ examination := dataBody["pass_examination"].(string)
|
|
1483
|
+ pass_examination, _ := strconv.ParseInt(examination, 10, 64)
|
1481
|
1484
|
dialysate := models.DeviceDialysate{
|
1482
|
1485
|
SamplingDate: samp_date,
|
1483
|
1486
|
Specimenb: specimen,
|
|
@@ -1559,8 +1562,11 @@ func (this *MachineApiController) SaveQualityControl() {
|
1559
|
1562
|
detectionUnit := dataBody["detection_unit"].(string)
|
1560
|
1563
|
|
1561
|
1564
|
sort := dataBody["sort"].(string)
|
1562
|
|
- pass_examination := int64(dataBody["pass_examination"].(float64))
|
|
1565
|
+
|
1563
|
1566
|
modifications := int64(dataBody["modifications"].(float64))
|
|
1567
|
+ examination := dataBody["pass_examination"].(string)
|
|
1568
|
+ pass_examination, _ := strconv.ParseInt(examination, 10, 64)
|
|
1569
|
+
|
1564
|
1570
|
ion := models.DeviceIon{
|
1565
|
1571
|
SamplingDate: dateB,
|
1566
|
1572
|
Samplerc: samplerc,
|
|
@@ -1645,34 +1651,37 @@ func (this *MachineApiController) EditCulture() {
|
1645
|
1651
|
func (this *MachineApiController) UpdateCulture() {
|
1646
|
1652
|
dataBody := make(map[string]interface{}, 0)
|
1647
|
1653
|
err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
1648
|
|
- //fmt.Println("err", err)
|
|
1654
|
+
|
1649
|
1655
|
id := int64(dataBody["id"].(float64))
|
1650
|
|
- //fmt.Println("id", id)
|
|
1656
|
+
|
1651
|
1657
|
date := dataBody["date"].(string)
|
1652
|
|
- //fmt.Println("取样日期", date)
|
|
1658
|
+
|
1653
|
1659
|
timeLayout := "2006-01-02"
|
1654
|
1660
|
loc, _ := time.LoadLocation("Local")
|
1655
|
1661
|
theTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", date+" 00:00:00", loc)
|
1656
|
1662
|
state_date := theTime.Unix()
|
1657
|
|
- //fmt.Println("取样日期", state_date)
|
|
1663
|
+
|
1658
|
1664
|
specimen := int64(dataBody["specimen"].(float64))
|
1659
|
|
- //fmt.Println("取样标本", specimen)
|
|
1665
|
+
|
1660
|
1666
|
cona := dataBody["concentrate_noa"].(string)
|
1661
|
|
- //fmt.Println("A浓缩液批号", cona)
|
|
1667
|
+
|
1662
|
1668
|
conb := dataBody["concentrate_nob"].(string)
|
1663
|
|
- //fmt.Println("B浓批号", conb)
|
|
1669
|
+
|
1664
|
1670
|
samplingLoactiona := int64(dataBody["sampling_locationa"].(float64))
|
1665
|
|
- //fmt.Println("采样部位", samplingLoactiona)
|
|
1671
|
+
|
1666
|
1672
|
detectionUnit := dataBody["detection_unit"].(string)
|
1667
|
|
- //fmt.Println("检测单位", detectionUnit)
|
|
1673
|
+
|
1668
|
1674
|
sampler := int64(dataBody["sampler"].(float64))
|
1669
|
|
- //fmt.Println("取样者", sampler)
|
|
1675
|
+
|
1670
|
1676
|
reportDate := dataBody["reporting_date"].(string)
|
1671
|
1677
|
reportTime, _ := time.ParseInLocation(timeLayout+" 15:04:05", reportDate+" 00:00:00", loc)
|
1672
|
1678
|
repDate := reportTime.Unix()
|
1673
|
|
- //fmt.Println("出报告日期", repDate)
|
|
1679
|
+
|
1674
|
1680
|
detectionResult := dataBody["detection_result"].(string)
|
1675
|
|
- //fmt.Println("检测结果", detectionResult)
|
|
1681
|
+
|
|
1682
|
+ sort := dataBody["sort"].(string)
|
|
1683
|
+ pass_examination := int64(dataBody["pass_examination"].(float64))
|
|
1684
|
+ modifications := int64(dataBody["modifications"].(float64))
|
1676
|
1685
|
adminUser := this.GetAdminUserInfo()
|
1677
|
1686
|
orgId := adminUser.CurrentOrgId
|
1678
|
1687
|
culture := models.DeviceCulture{
|
|
@@ -1685,6 +1694,9 @@ func (this *MachineApiController) UpdateCulture() {
|
1685
|
1694
|
Sampler: sampler,
|
1686
|
1695
|
ReportingDate: repDate,
|
1687
|
1696
|
DetectionResult: detectionResult,
|
|
1697
|
+ Sort: sort,
|
|
1698
|
+ PassExamination: pass_examination,
|
|
1699
|
+ Modifications: modifications,
|
1688
|
1700
|
}
|
1689
|
1701
|
err = service.UpdateCulture(id, orgId, &culture)
|
1690
|
1702
|
if err != nil {
|
|
@@ -1779,6 +1791,10 @@ func (this *MachineApiController) Updatedialystate() {
|
1779
|
1791
|
fmt.Println("检测结果", detectionResultb)
|
1780
|
1792
|
detectionUnit := dataBody["detection_unit"].(string)
|
1781
|
1793
|
fmt.Println("检测单位", detectionUnit)
|
|
1794
|
+
|
|
1795
|
+ sort := dataBody["sort"].(string)
|
|
1796
|
+ pass_examination := int64(dataBody["pass_examination"].(float64))
|
|
1797
|
+ modifications := int64(dataBody["modifications"].(float64))
|
1782
|
1798
|
adminUser := this.GetAdminUserInfo()
|
1783
|
1799
|
orgid := adminUser.CurrentOrgId
|
1784
|
1800
|
dialysate := models.DeviceDialysate{
|
|
@@ -1791,6 +1807,9 @@ func (this *MachineApiController) Updatedialystate() {
|
1791
|
1807
|
Samplerb: samplerb,
|
1792
|
1808
|
ReportingDateb: report_date,
|
1793
|
1809
|
DetectionResultb: detectionResultb,
|
|
1810
|
+ Sort: sort,
|
|
1811
|
+ PassExamination: pass_examination,
|
|
1812
|
+ Modifications: modifications,
|
1794
|
1813
|
}
|
1795
|
1814
|
err = service.Updatedialystate(id, orgid, &dialysate)
|
1796
|
1815
|
if err != nil {
|
|
@@ -1863,53 +1882,59 @@ func (this *MachineApiController) UpdateIon() {
|
1863
|
1882
|
dateb := dataBody["dateb"].(string)
|
1864
|
1883
|
inLocation, _ := time.ParseInLocation(timeLayout+" 15:04:05", dateb+" 00:00:00", loc)
|
1865
|
1884
|
dateB := inLocation.Unix()
|
1866
|
|
- fmt.Println("取样日期", dateB)
|
|
1885
|
+
|
1867
|
1886
|
samplerc := int64(dataBody["samplerc"].(float64))
|
1868
|
|
- fmt.Println("取样者", samplerc)
|
|
1887
|
+
|
1869
|
1888
|
concentratenof := dataBody["concentrate_nof"].(string)
|
1870
|
|
- fmt.Println("浓A", concentratenof)
|
|
1889
|
+
|
1871
|
1890
|
concentrateonog := dataBody["concentrate_nog"].(string)
|
1872
|
|
- fmt.Println("浓B", concentrateonog)
|
|
1891
|
+
|
1873
|
1892
|
dateReportc := dataBody["date_reportc"].(string)
|
1874
|
1893
|
parseInLocation, _ := time.ParseInLocation(timeLayout+" 15:04:05", dateReportc+" 00:00:00", loc)
|
1875
|
1894
|
datec := parseInLocation.Unix()
|
1876
|
|
- fmt.Println("报告日期", datec)
|
|
1895
|
+
|
1877
|
1896
|
actualNa := dataBody["actual_na"].(string)
|
1878
|
|
- fmt.Println("钠", actualNa)
|
|
1897
|
+
|
1879
|
1898
|
actualPna := dataBody["actual_pna"].(string)
|
1880
|
|
- fmt.Println("配钠", actualPna)
|
|
1899
|
+
|
1881
|
1900
|
actualK := dataBody["actual_k"].(string)
|
1882
|
|
- fmt.Println("钾", actualK)
|
|
1901
|
+
|
1883
|
1902
|
actualCa := dataBody["actual_ca"].(string)
|
1884
|
|
- fmt.Println("钙", actualCa)
|
|
1903
|
+
|
1885
|
1904
|
actualCi := dataBody["actual_ci"].(string)
|
1886
|
|
- fmt.Println("氯", actualCi)
|
|
1905
|
+
|
1887
|
1906
|
actualHco := dataBody["actual_hco"].(string)
|
1888
|
|
- fmt.Println("HCO", actualHco)
|
|
1907
|
+
|
1889
|
1908
|
actualMg := dataBody["actual_mg"].(string)
|
1890
|
|
- fmt.Println("actualMg", actualMg)
|
|
1909
|
+
|
1891
|
1910
|
actulaPH := dataBody["actual_ph"].(string)
|
1892
|
|
- fmt.Println("PH", actulaPH)
|
|
1911
|
+
|
1893
|
1912
|
remakes := dataBody["remakes"].(string)
|
1894
|
|
- fmt.Println("备注", remakes)
|
|
1913
|
+
|
1895
|
1914
|
detectionUnit := dataBody["detection_unit"].(string)
|
1896
|
|
- fmt.Println("检测单位", detectionUnit)
|
|
1915
|
+
|
|
1916
|
+ sort := dataBody["sort"].(string)
|
|
1917
|
+ pass_examination := int64(dataBody["pass_examination"].(float64))
|
|
1918
|
+ modifications := int64(dataBody["modifications"].(float64))
|
1897
|
1919
|
ion := models.DeviceIon{
|
1898
|
|
- SamplingDate: dateB,
|
1899
|
|
- Samplerc: samplerc,
|
1900
|
|
- DetectionUnit: detectionUnit,
|
1901
|
|
- ConcentrateNof: concentratenof,
|
1902
|
|
- ConcentrateNog: concentrateonog,
|
1903
|
|
- DateReportc: datec,
|
1904
|
|
- ActualNa: actualNa,
|
1905
|
|
- ActualPna: actualPna,
|
1906
|
|
- ActualK: actualK,
|
1907
|
|
- ActualCa: actualCa,
|
1908
|
|
- ActualCi: actualCi,
|
1909
|
|
- ActualHco: actualHco,
|
1910
|
|
- ActualMg: actualMg,
|
1911
|
|
- ActualPh: actulaPH,
|
1912
|
|
- Remakes: remakes,
|
|
1920
|
+ SamplingDate: dateB,
|
|
1921
|
+ Samplerc: samplerc,
|
|
1922
|
+ DetectionUnit: detectionUnit,
|
|
1923
|
+ ConcentrateNof: concentratenof,
|
|
1924
|
+ ConcentrateNog: concentrateonog,
|
|
1925
|
+ DateReportc: datec,
|
|
1926
|
+ ActualNa: actualNa,
|
|
1927
|
+ ActualPna: actualPna,
|
|
1928
|
+ ActualK: actualK,
|
|
1929
|
+ ActualCa: actualCa,
|
|
1930
|
+ ActualCi: actualCi,
|
|
1931
|
+ ActualHco: actualHco,
|
|
1932
|
+ ActualMg: actualMg,
|
|
1933
|
+ ActualPh: actulaPH,
|
|
1934
|
+ Remakes: remakes,
|
|
1935
|
+ Sort: sort,
|
|
1936
|
+ PassExamination: pass_examination,
|
|
1937
|
+ Modifications: modifications,
|
1913
|
1938
|
}
|
1914
|
1939
|
adminUser := this.GetAdminUserInfo()
|
1915
|
1940
|
orgId := adminUser.CurrentOrgId
|
|
@@ -3226,9 +3251,10 @@ func (this *MachineApiController) SaveOxygenates() {
|
3226
|
3251
|
detectionResult := dataBody["detection_resultb"].(string)
|
3227
|
3252
|
|
3228
|
3253
|
sort := dataBody["sort"].(string)
|
3229
|
|
- pass_examination := int64(dataBody["pass_examination"].(float64))
|
3230
|
|
- modifications := int64(dataBody["modifications"].(float64))
|
3231
|
3254
|
|
|
3255
|
+ modifications := int64(dataBody["modifications"].(float64))
|
|
3256
|
+ examination := dataBody["pass_examination"].(string)
|
|
3257
|
+ pass_examination, _ := strconv.ParseInt(examination, 10, 64)
|
3232
|
3258
|
oxygenates := models.XtDeviceOxygenates{
|
3233
|
3259
|
SamplingDate: samp_date,
|
3234
|
3260
|
Specimenb: specimen,
|
|
@@ -3295,9 +3321,10 @@ func (this *MachineApiController) SaveHardWater() {
|
3295
|
3321
|
detectionResult := dataBody["detection_resultb"].(string)
|
3296
|
3322
|
|
3297
|
3323
|
sort := dataBody["sort"].(string)
|
3298
|
|
- pass_examination := int64(dataBody["pass_examination"].(float64))
|
3299
|
|
- modifications := int64(dataBody["modifications"].(float64))
|
3300
|
3324
|
|
|
3325
|
+ modifications := int64(dataBody["modifications"].(float64))
|
|
3326
|
+ examination := dataBody["pass_examination"].(string)
|
|
3327
|
+ pass_examination, _ := strconv.ParseInt(examination, 10, 64)
|
3301
|
3328
|
hadwater := models.XtDeviceHadwater{
|
3302
|
3329
|
SamplingDate: samp_date,
|
3303
|
3330
|
Specimenb: specimen,
|
|
@@ -3365,9 +3392,10 @@ func (this *MachineApiController) SaveWater() {
|
3365
|
3392
|
detectionResult := dataBody["detection_resultb"].(string)
|
3366
|
3393
|
|
3367
|
3394
|
sort := dataBody["sort"].(string)
|
3368
|
|
- pass_examination := int64(dataBody["pass_examination"].(float64))
|
3369
|
|
- modifications := int64(dataBody["modifications"].(float64))
|
3370
|
3395
|
|
|
3396
|
+ modifications := int64(dataBody["modifications"].(float64))
|
|
3397
|
+ examination := dataBody["pass_examination"].(string)
|
|
3398
|
+ pass_examination, _ := strconv.ParseInt(examination, 10, 64)
|
3371
|
3399
|
deviceWater := models.XtDeviceWater{
|
3372
|
3400
|
SamplingDate: samp_date,
|
3373
|
3401
|
Specimenb: specimen,
|
|
@@ -3434,9 +3462,10 @@ func (this *MachineApiController) SaveDevicePH() {
|
3434
|
3462
|
detectionResult := dataBody["detection_resultb"].(string)
|
3435
|
3463
|
|
3436
|
3464
|
sort := dataBody["sort"].(string)
|
3437
|
|
- pass_examination := int64(dataBody["pass_examination"].(float64))
|
3438
|
|
- modifications := int64(dataBody["modifications"].(float64))
|
3439
|
3465
|
|
|
3466
|
+ modifications := int64(dataBody["modifications"].(float64))
|
|
3467
|
+ examination := dataBody["pass_examination"].(string)
|
|
3468
|
+ pass_examination, _ := strconv.ParseInt(examination, 10, 64)
|
3440
|
3469
|
devicePh := models.XtDevicePh{
|
3441
|
3470
|
SamplingDate: samp_date,
|
3442
|
3471
|
Specimenb: specimen,
|
|
@@ -3512,6 +3541,9 @@ func (this *MachineApiController) UpdateOxygenates() {
|
3512
|
3541
|
|
3513
|
3542
|
detectionUnit := dataBody["detection_unit"].(string)
|
3514
|
3543
|
|
|
3544
|
+ sort := dataBody["sort"].(string)
|
|
3545
|
+ pass_examination := int64(dataBody["pass_examination"].(float64))
|
|
3546
|
+ modifications := int64(dataBody["modifications"].(float64))
|
3515
|
3547
|
adminUserInfo := this.GetAdminUserInfo()
|
3516
|
3548
|
orgId := adminUserInfo.CurrentOrgId
|
3517
|
3549
|
oxygenates := models.XtDeviceOxygenates{
|
|
@@ -3524,6 +3556,9 @@ func (this *MachineApiController) UpdateOxygenates() {
|
3524
|
3556
|
Samplerb: samplerb,
|
3525
|
3557
|
ReportingDateb: report_date,
|
3526
|
3558
|
DetectionResultb: detectionResultb,
|
|
3559
|
+ Sort: sort,
|
|
3560
|
+ PassExamination: pass_examination,
|
|
3561
|
+ Modifications: modifications,
|
3527
|
3562
|
}
|
3528
|
3563
|
|
3529
|
3564
|
err = service.UpdateOxygenates(id, orgId, &oxygenates)
|
|
@@ -3906,6 +3941,9 @@ func (this *MachineApiController) UpdateHadWater() {
|
3906
|
3941
|
|
3907
|
3942
|
detectionUnit := dataBody["detection_unit"].(string)
|
3908
|
3943
|
|
|
3944
|
+ sort := dataBody["sort"].(string)
|
|
3945
|
+ pass_examination := int64(dataBody["pass_examination"].(float64))
|
|
3946
|
+ modifications := int64(dataBody["modifications"].(float64))
|
3909
|
3947
|
adminUserInfo := this.GetAdminUserInfo()
|
3910
|
3948
|
orgId := adminUserInfo.CurrentOrgId
|
3911
|
3949
|
hadWater := models.XtDeviceHadwater{
|
|
@@ -3918,6 +3956,9 @@ func (this *MachineApiController) UpdateHadWater() {
|
3918
|
3956
|
Samplerb: samplerb,
|
3919
|
3957
|
ReportingDateb: report_date,
|
3920
|
3958
|
DetectionResultb: detectionResultb,
|
|
3959
|
+ Sort: sort,
|
|
3960
|
+ PassExamination: pass_examination,
|
|
3961
|
+ Modifications: modifications,
|
3921
|
3962
|
}
|
3922
|
3963
|
err = service.UpdateHadWater(id, orgId, &hadWater)
|
3923
|
3964
|
if err != nil {
|
|
@@ -3959,7 +4000,9 @@ func (this *MachineApiController) UpdateWater() {
|
3959
|
4000
|
detectionResultb := dataBody["detection_resultb"].(string)
|
3960
|
4001
|
|
3961
|
4002
|
detectionUnit := dataBody["detection_unit"].(string)
|
3962
|
|
-
|
|
4003
|
+ sort := dataBody["sort"].(string)
|
|
4004
|
+ pass_examination := int64(dataBody["pass_examination"].(float64))
|
|
4005
|
+ modifications := int64(dataBody["modifications"].(float64))
|
3963
|
4006
|
adminUserInfo := this.GetAdminUserInfo()
|
3964
|
4007
|
orgId := adminUserInfo.CurrentOrgId
|
3965
|
4008
|
hadWater := models.XtDeviceWater{
|
|
@@ -3972,6 +4015,9 @@ func (this *MachineApiController) UpdateWater() {
|
3972
|
4015
|
Samplerb: samplerb,
|
3973
|
4016
|
ReportingDateb: report_date,
|
3974
|
4017
|
DetectionResultb: detectionResultb,
|
|
4018
|
+ Sort: sort,
|
|
4019
|
+ PassExamination: pass_examination,
|
|
4020
|
+ Modifications: modifications,
|
3975
|
4021
|
}
|
3976
|
4022
|
err = service.UpdateDeviceWater(id, orgId, &hadWater)
|
3977
|
4023
|
if err != nil {
|
|
@@ -4014,6 +4060,9 @@ func (this *MachineApiController) UpdateDevicePh() {
|
4014
|
4060
|
|
4015
|
4061
|
detectionUnit := dataBody["detection_unit"].(string)
|
4016
|
4062
|
|
|
4063
|
+ sort := dataBody["sort"].(string)
|
|
4064
|
+ pass_examination := int64(dataBody["pass_examination"].(float64))
|
|
4065
|
+ modifications := int64(dataBody["modifications"].(float64))
|
4017
|
4066
|
adminUserInfo := this.GetAdminUserInfo()
|
4018
|
4067
|
orgId := adminUserInfo.CurrentOrgId
|
4019
|
4068
|
hadWater := models.XtDevicePh{
|
|
@@ -4026,6 +4075,9 @@ func (this *MachineApiController) UpdateDevicePh() {
|
4026
|
4075
|
Samplerb: samplerb,
|
4027
|
4076
|
ReportingDateb: report_date,
|
4028
|
4077
|
DetectionResultb: detectionResultb,
|
|
4078
|
+ Sort: sort,
|
|
4079
|
+ PassExamination: pass_examination,
|
|
4080
|
+ Modifications: modifications,
|
4029
|
4081
|
}
|
4030
|
4082
|
err = service.UpdateDivicePh(id, orgId, &hadWater)
|
4031
|
4083
|
if err != nil {
|