|
@@ -3,7 +3,6 @@ package service
|
3
|
3
|
import (
|
4
|
4
|
"XT_New/models"
|
5
|
5
|
"github.com/jinzhu/gorm"
|
6
|
|
- "strconv"
|
7
|
6
|
"time"
|
8
|
7
|
)
|
9
|
8
|
|
|
@@ -53,13 +52,15 @@ func UpdateSupplyAndContact(thisStockIn []interface{}, suid, orgId, supplierType
|
53
|
52
|
items := item.(map[string]interface{})
|
54
|
53
|
//查询是否
|
55
|
54
|
if items["id"] == "" {
|
56
|
|
- items["id"] = "0"
|
|
55
|
+ var tmp float64 = 0
|
|
56
|
+ items["id"] = tmp
|
57
|
57
|
}
|
58
|
|
- id, _ := strconv.ParseInt(items["id"].(string), 10, 64)
|
|
58
|
+ //id, _ := strconv.ParseInt(items["id"].(string), 10, 64)
|
|
59
|
+ id := int64(items["id"].(float64))
|
59
|
60
|
name := items["name"].(string)
|
60
|
61
|
phone := items["phone"].(string)
|
61
|
62
|
address := items["address"].(string)
|
62
|
|
- isfirst, _ := strconv.ParseInt(items["isfirst"].(string), 10, 64)
|
|
63
|
+ isfirst := int64(items["isfirst"].(int))
|
63
|
64
|
updatecontacts := models.SpSupplierContacts{
|
64
|
65
|
ID: id,
|
65
|
66
|
Name: name,
|
|
@@ -183,7 +184,7 @@ func SaveSupplyAndContact(thisStockIn []interface{}, orgId, supplierType, tcreat
|
183
|
184
|
name := items["name"].(string)
|
184
|
185
|
phone := items["phone"].(string)
|
185
|
186
|
address := items["address"].(string)
|
186
|
|
- isfirst, _ := strconv.ParseInt(items["isfirst"].(string), 10, 64)
|
|
187
|
+ isfirst := int64(items["isfirst"].(int))
|
187
|
188
|
|
188
|
189
|
spcontacts := models.SpSupplierContacts{
|
189
|
190
|
Name: name,
|