POST api/Agent/Platform/Farmer/AddNew

添加一个新的农户。 注意,手机号是不能重复的。 10040010

Request Information

URI Parameters

None.

Body Parameters

添加的农户的信息

PlatformFarmerTableItem
NameDescriptionTypeAdditional information
FarmerId

农户ID Bigint PK 自增长编号,AUTOID。 注意,在添加一个组,此值不会被采信,可以是任的值;在修改的时候,此值是被修改行的标识。

integer

Required

FarmerName

农户名 varchar(40) IDName

string

Required

Max length: 30

IDNumber

农户身份证号码 Char(18)

string

Required

Max length: 20

IDName

证件人名 varchar(40)

string

Required

Max length: 30

Mobile

手机号码 varchar(40)

string

Required

Max length: 30

Province

省 VarChar(20) 注册地所属的省

string

Required

Max length: 20

City

市 City VarChar(20) 注册地所属的市

string

Required

Max length: 20

County

县 VarChar(20) 注册地所属的县

string

Required

Max length: 20

Address

地址 Varchar(50)

string

Max length: 50

Longitude

经度 Numeric(10,7) 农户家所处的经度

decimal number

None.

Latitude

纬度 Numeric(10,7) 农户家所处的纬度

decimal number

None.

LastestUpdAgentId

最后一次编辑的运营商 LastestUpdAgentId Bigint

integer

None.

LastestUpdTime

最后一次编辑的时间 Char(14),格式YYYYMMDDHHMMSS

string

None.

Request Formats

application/json, text/json

Sample:
{
  "FarmerId": 1,
  "FarmerName": "sample string 2",
  "IDNumber": "sample string 3",
  "IDName": "sample string 4",
  "Mobile": "sample string 5",
  "Province": "sample string 6",
  "City": "sample string 7",
  "County": "sample string 8",
  "Address": "sample string 9",
  "Longitude": 1.0,
  "Latitude": 1.0,
  "LastestUpdAgentId": 10,
  "LastestUpdTime": "sample string 11"
}

application/xml, text/xml

Sample:
<PlatformFarmerTableItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter">
  <Address>sample string 9</Address>
  <City>sample string 7</City>
  <County>sample string 8</County>
  <FarmerId>1</FarmerId>
  <FarmerName>sample string 2</FarmerName>
  <IDName>sample string 4</IDName>
  <IDNumber>sample string 3</IDNumber>
  <LastestUpdAgentId>10</LastestUpdAgentId>
  <LastestUpdTime>sample string 11</LastestUpdTime>
  <Latitude>1</Latitude>
  <Longitude>1</Longitude>
  <Mobile>sample string 5</Mobile>
  <Province>sample string 6</Province>
</PlatformFarmerTableItem>

application/x-www-form-urlencoded

Sample:

Sample not available.

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.

Response Information

Resource Description

添加一个新的农户。 注意,手机号是不能重复的。 10040010

CommonOperationResultWithTagOfInt64
NameDescriptionTypeAdditional information
errcode

integer

None.

errmsg

string

None.

tag

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "errcode": 1,
  "errmsg": "sample string 2",
  "tag": 3
}

application/xml, text/xml

Sample:
<CommonOperationResultWithTagOflong xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer">
  <errcode>1</errcode>
  <errmsg>sample string 2</errmsg>
  <tag>3</tag>
</CommonOperationResultWithTagOflong>

application/bson

Sample:
Binary JSON content. See http://bsonspec.org for details.