Explorar el Código

供应商模块保存和更改接口改动

mainqaq hace 3 años
padre
commit
00842c7cd0
Se han modificado 1 ficheros con 6 adiciones y 5 borrados
  1. 6 5
      controllers/supply_order_api_contorller.go

+ 6 - 5
controllers/supply_order_api_contorller.go Ver fichero

190
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
190
 		this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamWrong)
191
 		return
191
 		return
192
 	}
192
 	}
193
-	tmp := this.GetString("tmp")
194
 	supplierName := dataBody["suppliername"].(string)
193
 	supplierName := dataBody["suppliername"].(string)
195
 	if supplierName == "" {
194
 	if supplierName == "" {
196
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商名称不能为空")
195
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商名称不能为空")
197
-		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, tmp)
198
 		return
196
 		return
199
 	}
197
 	}
200
 	//upplierCode := this.GetString("suppliercode") //供应商编码
198
 	//upplierCode := this.GetString("suppliercode") //供应商编码
203
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商编号不能为空")
201
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商编号不能为空")
204
 		return
202
 		return
205
 	}
203
 	}
206
-	supplierid, _ := this.GetInt64("id") //供应商id
204
+	//supplierid, _ := this.GetInt64("id") //供应商id
205
+	supplierid, _ := dataBody["id"].(int64)
207
 	if supplierid == 0 {
206
 	if supplierid == 0 {
208
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商id不能为空")
207
 		this.ServeFailJsonSend(enums.ErrorCodeParamWrong, "供应商id不能为空")
209
 		return
208
 		return
231
 			return
230
 			return
232
 		}
231
 		}
233
 	}
232
 	}
234
-	supplierType, _ := this.GetInt64("suppliertype") //供应商类别
235
-	vatRate, _ := this.GetFloat("vatrate")           //增值税税率
233
+	//supplierType, _ := this.GetInt64("suppliertype") //供应商类别
234
+	supplierType, _ := dataBody["suppliertype"].(int64) //供应商类别
235
+	//vatRate, _ := this.GetFloat("vatrate")           //增值税税率
236
+	vatRate, _ := dataBody["suppliertype"].(float64) //增值税税率
236
 	//number := this.GetString("number")               //纳税人识别号
237
 	//number := this.GetString("number")               //纳税人识别号
237
 	number := dataBody["number"].(string) //纳税人识别号
238
 	number := dataBody["number"].(string) //纳税人识别号
238
 	//bank := this.GetString("bank")                   //开户银行
239
 	//bank := this.GetString("bank")                   //开户银行