|
@@ -898,11 +898,17 @@ func (c *HisApiController) setProjectWithJSON(project *models.HisPrescriptionPro
|
898
|
898
|
fmt.Println(project_id)
|
899
|
899
|
fmt.Println(project.ProjectId)
|
900
|
900
|
}
|
901
|
|
- if json["price"] != nil || reflect.TypeOf(json["price"]).String() == "float64" {
|
902
|
|
- price := int64(json["price"].(float64))
|
903
|
|
- formatInt_price := strconv.FormatInt(price, 10)
|
904
|
|
- float_price, _ := strconv.ParseFloat(formatInt_price, 64)
|
905
|
|
- project.Price = float_price
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+ if json["price"] != nil || reflect.TypeOf(json["price"]).String() == "string" {
|
|
910
|
+ price, _ := strconv.ParseFloat(json["price"].(string), 64)
|
|
911
|
+ project.Price = price
|
906
|
912
|
}
|
907
|
913
|
if json["total"] != nil && reflect.TypeOf(json["total"]).String() == "string" {
|
908
|
914
|
total, _ := json["total"].(string)
|
|
@@ -952,11 +958,16 @@ func (c *HisApiController) setAddtionWithJSON(additionalCharge *models.HisAdditi
|
952
|
958
|
item_id := int64(json["item_id"].(float64))
|
953
|
959
|
additionalCharge.ItemId = item_id
|
954
|
960
|
}
|
955
|
|
- if json["price"] != nil || reflect.TypeOf(json["price"]).String() == "float64" {
|
956
|
|
- price := int64(json["price"].(float64))
|
957
|
|
- formatInt_price := strconv.FormatInt(price, 10)
|
958
|
|
- float_price, _ := strconv.ParseFloat(formatInt_price, 64)
|
959
|
|
- additionalCharge.Price = float_price
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+ if json["price"] != nil || reflect.TypeOf(json["price"]).String() == "string" {
|
|
969
|
+ price, _ := strconv.ParseFloat(json["price"].(string), 64)
|
|
970
|
+ additionalCharge.Price = price
|
960
|
971
|
}
|
961
|
972
|
if json["count"] != nil && reflect.TypeOf(json["count"]).String() == "string" {
|
962
|
973
|
count, _ := json["count"].(string)
|