|
@@ -4910,19 +4910,19 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
|
4910
|
4910
|
|
4911
|
4911
|
first_start_time := dataBody["first_start_time"].(string)
|
4912
|
4912
|
|
4913
|
|
- if len(first_start_time) == 0 {
|
4914
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
4915
|
|
- return
|
|
4913
|
+ var firstStartTimeUnix int64
|
|
4914
|
+ if len(first_start_time) > 0 {
|
|
4915
|
+ firstStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_start_time)
|
|
4916
|
+ firstStartTimeUnix = firstStartTime.Unix()
|
4916
|
4917
|
}
|
4917
|
|
- firstStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_start_time)
|
4918
|
4918
|
|
|
4919
|
+ var firstEndTimeUnix int64
|
4919
|
4920
|
first_end_time := dataBody["first_end_time"].(string)
|
4920
|
4921
|
|
4921
|
|
- if len(first_end_time) == 0 {
|
4922
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
4923
|
|
- return
|
|
4922
|
+ if len(first_end_time) > 0 {
|
|
4923
|
+ firstEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_end_time)
|
|
4924
|
+ firstEndTimeUnix = firstEndTime.Unix()
|
4924
|
4925
|
}
|
4925
|
|
- firstEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_end_time)
|
4926
|
4926
|
|
4927
|
4927
|
first_total_time := dataBody["first_total_time"].(string)
|
4928
|
4928
|
|
|
@@ -4937,20 +4937,18 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
|
4937
|
4937
|
sencond_disinfection_time := dataBody["sencond_disinfection_time"].(string)
|
4938
|
4938
|
|
4939
|
4939
|
sencond_start_time := dataBody["sencond_start_time"].(string)
|
4940
|
|
-
|
4941
|
|
- if len(sencond_start_time) == 0 {
|
4942
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
4943
|
|
- return
|
|
4940
|
+ var sencondStartTimeUnixt int64
|
|
4941
|
+ if len(sencond_start_time) > 0 {
|
|
4942
|
+ sencondStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_start_time)
|
|
4943
|
+ sencondStartTimeUnixt = sencondStartTime.Unix()
|
4944
|
4944
|
}
|
4945
|
|
- sencondStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_start_time)
|
4946
|
4945
|
|
4947
|
4946
|
sencond_end_time := dataBody["sencond_end_time"].(string)
|
4948
|
|
-
|
4949
|
|
- if len(sencond_end_time) == 0 {
|
4950
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
4951
|
|
- return
|
|
4947
|
+ var sencondEndTimeUnixt int64
|
|
4948
|
+ if len(sencond_end_time) > 0 {
|
|
4949
|
+ sencondEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_end_time)
|
|
4950
|
+ sencondEndTimeUnixt = sencondEndTime.Unix()
|
4952
|
4951
|
}
|
4953
|
|
- sencondEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_end_time)
|
4954
|
4952
|
|
4955
|
4953
|
sencond_total_time := dataBody["sencond_total_time"].(string)
|
4956
|
4954
|
|
|
@@ -4965,20 +4963,18 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
|
4965
|
4963
|
third_disinfection_time := dataBody["third_disinfection_time"].(string)
|
4966
|
4964
|
|
4967
|
4965
|
third_start_time := dataBody["third_start_time"].(string)
|
4968
|
|
-
|
4969
|
|
- if len(third_start_time) == 0 {
|
4970
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
4971
|
|
- return
|
|
4966
|
+ var thirdStartTimeUnix int64
|
|
4967
|
+ if len(third_start_time) > 0 {
|
|
4968
|
+ thirdStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_start_time)
|
|
4969
|
+ thirdStartTimeUnix = thirdStartTime.Unix()
|
4972
|
4970
|
}
|
4973
|
|
- thirdStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_start_time)
|
4974
|
4971
|
|
4975
|
4972
|
third_end_time := dataBody["third_end_time"].(string)
|
4976
|
|
-
|
4977
|
|
- if len(third_end_time) == 0 {
|
4978
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
4979
|
|
- return
|
|
4973
|
+ var thirdEndTimeUnix int64
|
|
4974
|
+ if len(third_end_time) > 0 {
|
|
4975
|
+ thirdEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_end_time)
|
|
4976
|
+ thirdEndTimeUnix = thirdEndTime.Unix()
|
4980
|
4977
|
}
|
4981
|
|
- thirdEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_end_time)
|
4982
|
4978
|
|
4983
|
4979
|
third_total_time := dataBody["third_total_time"].(string)
|
4984
|
4980
|
|
|
@@ -4993,20 +4989,18 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
|
4993
|
4989
|
fourth_disinfection_time := dataBody["fourth_disinfection_time"].(string)
|
4994
|
4990
|
|
4995
|
4991
|
fourth_start_time := dataBody["fourth_start_time"].(string)
|
4996
|
|
-
|
4997
|
|
- if len(fourth_start_time) == 0 {
|
4998
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
4999
|
|
- return
|
|
4992
|
+ var fourthiStartTimeUnitx int64
|
|
4993
|
+ if len(fourth_start_time) > 0 {
|
|
4994
|
+ fourthStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_start_time)
|
|
4995
|
+ fourthiStartTimeUnitx = fourthStartTime.Unix()
|
5000
|
4996
|
}
|
5001
|
|
- fourthStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_start_time)
|
5002
|
4997
|
|
5003
|
4998
|
fourth_end_time := dataBody["fourth_end_time"].(string)
|
5004
|
|
-
|
5005
|
|
- if len(fourth_end_time) == 0 {
|
5006
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5007
|
|
- return
|
|
4999
|
+ var fourthEndTimeUnix int64
|
|
5000
|
+ if len(fourth_end_time) > 0 {
|
|
5001
|
+ fourthEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_end_time)
|
|
5002
|
+ fourthEndTimeUnix = fourthEndTime.Unix()
|
5008
|
5003
|
}
|
5009
|
|
- fourthEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_end_time)
|
5010
|
5004
|
|
5011
|
5005
|
fourth_total_time := dataBody["fourth_total_time"].(string)
|
5012
|
5006
|
|
|
@@ -5020,20 +5014,19 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
|
5020
|
5014
|
last_disinfection_methods := dataBody["last_disinfection_methods"].(string)
|
5021
|
5015
|
last_disinfection_time := dataBody["last_disinfection_time"].(string)
|
5022
|
5016
|
last_start_time := dataBody["last_start_time"].(string)
|
5023
|
|
-
|
5024
|
|
- if len(last_start_time) == 0 {
|
5025
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5026
|
|
- return
|
|
5017
|
+ var lastStartTimeUnix int64
|
|
5018
|
+ if len(last_start_time) > 0 {
|
|
5019
|
+ lastStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_start_time)
|
|
5020
|
+ lastStartTimeUnix = lastStartTime.Unix()
|
5027
|
5021
|
}
|
5028
|
|
- lastStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_start_time)
|
5029
|
5022
|
|
5030
|
5023
|
last_end_time := dataBody["last_end_time"].(string)
|
5031
|
5024
|
|
5032
|
|
- if len(last_end_time) == 0 {
|
5033
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5034
|
|
- return
|
|
5025
|
+ var lastEndTimeUnix int64
|
|
5026
|
+ if len(last_end_time) > 0 {
|
|
5027
|
+ lastEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_end_time)
|
|
5028
|
+ lastEndTimeUnix = lastEndTime.Unix()
|
5035
|
5029
|
}
|
5036
|
|
- lastEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_end_time)
|
5037
|
5030
|
|
5038
|
5031
|
last_total_time := dataBody["last_total_time"].(string)
|
5039
|
5032
|
|
|
@@ -5051,8 +5044,8 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
|
5051
|
5044
|
FirstDisinfectionWater: first_disinfection_water,
|
5052
|
5045
|
FirstDisinfectionMethods: first_disinfection_methods,
|
5053
|
5046
|
FirstDisinfectionTime: first_disinfection_time,
|
5054
|
|
- FirstStartTime: firstStartTime.Unix(),
|
5055
|
|
- FirstEndTime: firstEndTime.Unix(),
|
|
5047
|
+ FirstStartTime: firstStartTimeUnix,
|
|
5048
|
+ FirstEndTime: firstEndTimeUnix,
|
5056
|
5049
|
FirstTotalTime: first_total_time,
|
5057
|
5050
|
FirstIsCheck: first_is_check,
|
5058
|
5051
|
FirstModifications: first_modifications,
|
|
@@ -5060,8 +5053,8 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
|
5060
|
5053
|
SencondDisinfectionWater: sencond_disinfection_water,
|
5061
|
5054
|
SencondDisinfectionMethods: sencond_disinfection_methods,
|
5062
|
5055
|
SencondDisinfectionTime: sencond_disinfection_time,
|
5063
|
|
- SencondStartTime: sencondStartTime.Unix(),
|
5064
|
|
- SencondEndTime: sencondEndTime.Unix(),
|
|
5056
|
+ SencondStartTime: sencondStartTimeUnixt,
|
|
5057
|
+ SencondEndTime: sencondEndTimeUnixt,
|
5065
|
5058
|
SencondTotalTime: sencond_total_time,
|
5066
|
5059
|
SencondIsCheck: sencond_is_check,
|
5067
|
5060
|
SencondModifications: sencond_modifications,
|
|
@@ -5069,14 +5062,14 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
|
5069
|
5062
|
ThirdDisinfectionWater: third_disinfection_water,
|
5070
|
5063
|
ThirdDisinfectionMethods: third_disinfection_methods,
|
5071
|
5064
|
ThirdDisinfectionTime: third_disinfection_time,
|
5072
|
|
- ThirdStartTime: thirdStartTime.Unix(),
|
5073
|
|
- ThirdEndTime: thirdEndTime.Unix(),
|
|
5065
|
+ ThirdStartTime: thirdStartTimeUnix,
|
|
5066
|
+ ThirdEndTime: thirdEndTimeUnix,
|
5074
|
5067
|
ThirdTotalTime: third_total_time,
|
5075
|
5068
|
ThirdIsCheck: third_is_check,
|
5076
|
5069
|
ThirdModifications: third_modifications,
|
5077
|
5070
|
ThirdCreator: third_creator,
|
5078
|
|
- LastStartTime: lastStartTime.Unix(),
|
5079
|
|
- LastEndTime: lastEndTime.Unix(),
|
|
5071
|
+ LastStartTime: lastStartTimeUnix,
|
|
5072
|
+ LastEndTime: lastEndTimeUnix,
|
5080
|
5073
|
LastTotalTime: last_total_time,
|
5081
|
5074
|
LastIsCheck: last_is_check,
|
5082
|
5075
|
LastModifications: last_modifications,
|
|
@@ -5087,8 +5080,8 @@ func (this *MachineApiController) SaveObjTableDisInfect() {
|
5087
|
5080
|
FourthDisinfectionWater: fourth_disinfection_water,
|
5088
|
5081
|
FourthDisinfectionMethods: fourth_disinfection_methods,
|
5089
|
5082
|
FourthDisinfectionTime: fourth_disinfection_time,
|
5090
|
|
- FourthStartTime: fourthStartTime.Unix(),
|
5091
|
|
- FourthEndTime: fourthEndTime.Unix(),
|
|
5083
|
+ FourthStartTime: fourthiStartTimeUnitx,
|
|
5084
|
+ FourthEndTime: fourthEndTimeUnix,
|
5092
|
5085
|
FourthTotalTime: fourth_total_time,
|
5093
|
5086
|
FourthIsCheck: fourth_is_check,
|
5094
|
5087
|
FourthModifications: fourth_modifications,
|
|
@@ -5169,8 +5162,9 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5169
|
5162
|
dataBody := make(map[string]interface{}, 0)
|
5170
|
5163
|
err := json.Unmarshal(this.Ctx.Input.RequestBody, &dataBody)
|
5171
|
5164
|
fmt.Println("err", err)
|
5172
|
|
- id := int64(dataBody["id"].(float64))
|
5173
|
5165
|
record_date := dataBody["record_date"].(string)
|
|
5166
|
+
|
|
5167
|
+ id := int64(dataBody["id"].(float64))
|
5174
|
5168
|
recorddate, _ := time.ParseInLocation(timeLayout+" 15:04:05", record_date+" 00:00:00", loc)
|
5175
|
5169
|
recorddateunix := recorddate.Unix()
|
5176
|
5170
|
|
|
@@ -5180,19 +5174,19 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5180
|
5174
|
|
5181
|
5175
|
first_start_time := dataBody["first_start_time"].(string)
|
5182
|
5176
|
|
5183
|
|
- if len(first_start_time) == 0 {
|
5184
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5185
|
|
- return
|
|
5177
|
+ var firstStartTimeUnix int64
|
|
5178
|
+ if len(first_start_time) > 0 {
|
|
5179
|
+ firstStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_start_time)
|
|
5180
|
+ firstStartTimeUnix = firstStartTime.Unix()
|
5186
|
5181
|
}
|
5187
|
|
- firstStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_start_time)
|
5188
|
5182
|
|
|
5183
|
+ var firstEndTimeUnix int64
|
5189
|
5184
|
first_end_time := dataBody["first_end_time"].(string)
|
5190
|
5185
|
|
5191
|
|
- if len(first_end_time) == 0 {
|
5192
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5193
|
|
- return
|
|
5186
|
+ if len(first_end_time) > 0 {
|
|
5187
|
+ firstEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_end_time)
|
|
5188
|
+ firstEndTimeUnix = firstEndTime.Unix()
|
5194
|
5189
|
}
|
5195
|
|
- firstEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", first_end_time)
|
5196
|
5190
|
|
5197
|
5191
|
first_total_time := dataBody["first_total_time"].(string)
|
5198
|
5192
|
|
|
@@ -5207,20 +5201,18 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5207
|
5201
|
sencond_disinfection_time := dataBody["sencond_disinfection_time"].(string)
|
5208
|
5202
|
|
5209
|
5203
|
sencond_start_time := dataBody["sencond_start_time"].(string)
|
5210
|
|
-
|
5211
|
|
- if len(sencond_start_time) == 0 {
|
5212
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5213
|
|
- return
|
|
5204
|
+ var sencondStartTimeUnixt int64
|
|
5205
|
+ if len(sencond_start_time) > 0 {
|
|
5206
|
+ sencondStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_start_time)
|
|
5207
|
+ sencondStartTimeUnixt = sencondStartTime.Unix()
|
5214
|
5208
|
}
|
5215
|
|
- sencondStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_start_time)
|
5216
|
5209
|
|
5217
|
5210
|
sencond_end_time := dataBody["sencond_end_time"].(string)
|
5218
|
|
-
|
5219
|
|
- if len(sencond_end_time) == 0 {
|
5220
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5221
|
|
- return
|
|
5211
|
+ var sencondEndTimeUnixt int64
|
|
5212
|
+ if len(sencond_end_time) > 0 {
|
|
5213
|
+ sencondEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_end_time)
|
|
5214
|
+ sencondEndTimeUnixt = sencondEndTime.Unix()
|
5222
|
5215
|
}
|
5223
|
|
- sencondEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", sencond_end_time)
|
5224
|
5216
|
|
5225
|
5217
|
sencond_total_time := dataBody["sencond_total_time"].(string)
|
5226
|
5218
|
|
|
@@ -5235,20 +5227,18 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5235
|
5227
|
third_disinfection_time := dataBody["third_disinfection_time"].(string)
|
5236
|
5228
|
|
5237
|
5229
|
third_start_time := dataBody["third_start_time"].(string)
|
5238
|
|
-
|
5239
|
|
- if len(third_start_time) == 0 {
|
5240
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5241
|
|
- return
|
|
5230
|
+ var thirdStartTimeUnix int64
|
|
5231
|
+ if len(third_start_time) > 0 {
|
|
5232
|
+ thirdStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_start_time)
|
|
5233
|
+ thirdStartTimeUnix = thirdStartTime.Unix()
|
5242
|
5234
|
}
|
5243
|
|
- thirdStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_start_time)
|
5244
|
5235
|
|
5245
|
5236
|
third_end_time := dataBody["third_end_time"].(string)
|
5246
|
|
-
|
5247
|
|
- if len(third_end_time) == 0 {
|
5248
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5249
|
|
- return
|
|
5237
|
+ var thirdEndTimeUnix int64
|
|
5238
|
+ if len(third_end_time) > 0 {
|
|
5239
|
+ thirdEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_end_time)
|
|
5240
|
+ thirdEndTimeUnix = thirdEndTime.Unix()
|
5250
|
5241
|
}
|
5251
|
|
- thirdEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", third_end_time)
|
5252
|
5242
|
|
5253
|
5243
|
third_total_time := dataBody["third_total_time"].(string)
|
5254
|
5244
|
|
|
@@ -5263,20 +5253,18 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5263
|
5253
|
fourth_disinfection_time := dataBody["fourth_disinfection_time"].(string)
|
5264
|
5254
|
|
5265
|
5255
|
fourth_start_time := dataBody["fourth_start_time"].(string)
|
5266
|
|
-
|
5267
|
|
- if len(fourth_start_time) == 0 {
|
5268
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5269
|
|
- return
|
|
5256
|
+ var fourthiStartTimeUnitx int64
|
|
5257
|
+ if len(fourth_start_time) > 0 {
|
|
5258
|
+ fourthStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_start_time)
|
|
5259
|
+ fourthiStartTimeUnitx = fourthStartTime.Unix()
|
5270
|
5260
|
}
|
5271
|
|
- fourthStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_start_time)
|
5272
|
5261
|
|
5273
|
5262
|
fourth_end_time := dataBody["fourth_end_time"].(string)
|
5274
|
|
-
|
5275
|
|
- if len(fourth_end_time) == 0 {
|
5276
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5277
|
|
- return
|
|
5263
|
+ var fourthEndTimeUnix int64
|
|
5264
|
+ if len(fourth_end_time) > 0 {
|
|
5265
|
+ fourthEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_end_time)
|
|
5266
|
+ fourthEndTimeUnix = fourthEndTime.Unix()
|
5278
|
5267
|
}
|
5279
|
|
- fourthEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", fourth_end_time)
|
5280
|
5268
|
|
5281
|
5269
|
fourth_total_time := dataBody["fourth_total_time"].(string)
|
5282
|
5270
|
|
|
@@ -5290,20 +5278,19 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5290
|
5278
|
last_disinfection_methods := dataBody["last_disinfection_methods"].(string)
|
5291
|
5279
|
last_disinfection_time := dataBody["last_disinfection_time"].(string)
|
5292
|
5280
|
last_start_time := dataBody["last_start_time"].(string)
|
5293
|
|
-
|
5294
|
|
- if len(last_start_time) == 0 {
|
5295
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5296
|
|
- return
|
|
5281
|
+ var lastStartTimeUnix int64
|
|
5282
|
+ if len(last_start_time) > 0 {
|
|
5283
|
+ lastStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_start_time)
|
|
5284
|
+ lastStartTimeUnix = lastStartTime.Unix()
|
5297
|
5285
|
}
|
5298
|
|
- lastStartTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_start_time)
|
5299
|
5286
|
|
5300
|
5287
|
last_end_time := dataBody["last_end_time"].(string)
|
5301
|
5288
|
|
5302
|
|
- if len(last_end_time) == 0 {
|
5303
|
|
- this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
|
5304
|
|
- return
|
|
5289
|
+ var lastEndTimeUnix int64
|
|
5290
|
+ if len(last_end_time) > 0 {
|
|
5291
|
+ lastEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_end_time)
|
|
5292
|
+ lastEndTimeUnix = lastEndTime.Unix()
|
5305
|
5293
|
}
|
5306
|
|
- lastEndTime, _ := utils.ParseTimeStringToTime("2006-01-02 15:04", last_end_time)
|
5307
|
5294
|
|
5308
|
5295
|
last_total_time := dataBody["last_total_time"].(string)
|
5309
|
5296
|
|
|
@@ -5322,8 +5309,8 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5322
|
5309
|
FirstDisinfectionWater: first_disinfection_water,
|
5323
|
5310
|
FirstDisinfectionMethods: first_disinfection_methods,
|
5324
|
5311
|
FirstDisinfectionTime: first_disinfection_time,
|
5325
|
|
- FirstStartTime: firstStartTime.Unix(),
|
5326
|
|
- FirstEndTime: firstEndTime.Unix(),
|
|
5312
|
+ FirstStartTime: firstStartTimeUnix,
|
|
5313
|
+ FirstEndTime: firstEndTimeUnix,
|
5327
|
5314
|
FirstTotalTime: first_total_time,
|
5328
|
5315
|
FirstIsCheck: first_is_check,
|
5329
|
5316
|
FirstModifications: first_modifications,
|
|
@@ -5331,8 +5318,8 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5331
|
5318
|
SencondDisinfectionWater: sencond_disinfection_water,
|
5332
|
5319
|
SencondDisinfectionMethods: sencond_disinfection_methods,
|
5333
|
5320
|
SencondDisinfectionTime: sencond_disinfection_time,
|
5334
|
|
- SencondStartTime: sencondStartTime.Unix(),
|
5335
|
|
- SencondEndTime: sencondEndTime.Unix(),
|
|
5321
|
+ SencondStartTime: sencondStartTimeUnixt,
|
|
5322
|
+ SencondEndTime: sencondEndTimeUnixt,
|
5336
|
5323
|
SencondTotalTime: sencond_total_time,
|
5337
|
5324
|
SencondIsCheck: sencond_is_check,
|
5338
|
5325
|
SencondModifications: sencond_modifications,
|
|
@@ -5340,14 +5327,14 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5340
|
5327
|
ThirdDisinfectionWater: third_disinfection_water,
|
5341
|
5328
|
ThirdDisinfectionMethods: third_disinfection_methods,
|
5342
|
5329
|
ThirdDisinfectionTime: third_disinfection_time,
|
5343
|
|
- ThirdStartTime: thirdStartTime.Unix(),
|
5344
|
|
- ThirdEndTime: thirdEndTime.Unix(),
|
|
5330
|
+ ThirdStartTime: thirdStartTimeUnix,
|
|
5331
|
+ ThirdEndTime: thirdEndTimeUnix,
|
5345
|
5332
|
ThirdTotalTime: third_total_time,
|
5346
|
5333
|
ThirdIsCheck: third_is_check,
|
5347
|
5334
|
ThirdModifications: third_modifications,
|
5348
|
5335
|
ThirdCreator: third_creator,
|
5349
|
|
- LastStartTime: lastStartTime.Unix(),
|
5350
|
|
- LastEndTime: lastEndTime.Unix(),
|
|
5336
|
+ LastStartTime: lastStartTimeUnix,
|
|
5337
|
+ LastEndTime: lastEndTimeUnix,
|
5351
|
5338
|
LastTotalTime: last_total_time,
|
5352
|
5339
|
LastIsCheck: last_is_check,
|
5353
|
5340
|
LastModifications: last_modifications,
|
|
@@ -5358,8 +5345,8 @@ func (this *MachineApiController) UpdateObjectTableDisinfect() {
|
5358
|
5345
|
FourthDisinfectionWater: fourth_disinfection_water,
|
5359
|
5346
|
FourthDisinfectionMethods: fourth_disinfection_methods,
|
5360
|
5347
|
FourthDisinfectionTime: fourth_disinfection_time,
|
5361
|
|
- FourthStartTime: fourthStartTime.Unix(),
|
5362
|
|
- FourthEndTime: fourthEndTime.Unix(),
|
|
5348
|
+ FourthStartTime: fourthiStartTimeUnitx,
|
|
5349
|
+ FourthEndTime: fourthEndTimeUnix,
|
5363
|
5350
|
FourthTotalTime: fourth_total_time,
|
5364
|
5351
|
FourthIsCheck: fourth_is_check,
|
5365
|
5352
|
FourthModifications: fourth_modifications,
|