POST api/Agent/Watering/Land/AddOrUpdate
向一个未核算的灌溉交易中,添加或修改一条灌溉土地的信息。
Request Information
URI Parameters
None.
Body Parameters
AgentRunningWateringLandTableItem| Name | Description | Type | Additional information | 
|---|---|---|---|
| TradeId | 灌溉交易ID bigint PK, FK | integer | Required | 
| FarmerId | 农户ID Bigint FK | integer | Required | 
| LandArea | 土地面积 numeric(6,2) NN 土地面积,单位亩。 | decimal number | Required | 
| WaterWeight | 耗水权重 TinyInt NN 单位%,100表示100%,90表示90%。此值用于核算当前户应该支付的水费的权重。 | byte | Required | 
| DataVersion | 数据版本 Char(14) NN 当前数据的最后一次更新时间。 | string | Required | 
| LastDataFrom | 最后一次数据来源 Char(1) NN M表示手机,S表示服务器,D表示设备云链路 | string | Required | 
Request Formats
application/json, text/json
            Sample:
        
{
  "TradeId": 1,
  "FarmerId": 2,
  "LandArea": 3.0,
  "WaterWeight": 64,
  "DataVersion": "sample string 5",
  "LastDataFrom": "sample string 6"
}
        application/xml, text/xml
            Sample:
        <AgentRunningWateringLandTableItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter"> <DataVersion>sample string 5</DataVersion> <FarmerId>2</FarmerId> <LandArea>3</LandArea> <LastDataFrom>sample string 6</LastDataFrom> <TradeId>1</TradeId> <WaterWeight>64</WaterWeight> </AgentRunningWateringLandTableItem>
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
向一个未核算的灌溉交易中,添加或修改一条灌溉土地的信息。
CommonOperationResult| Name | Description | Type | Additional information | 
|---|---|---|---|
| errcode | 错误代码,通常0表示成功,其他值表示错误。 | integer | None. | 
| errmsg | 错误描述,当errcode不为零时,此值可以用于呈现给用户。 | string | None. | 
| tag | 操作同时,服务器端需要返回的其他值。 | string | None. | 
Response Formats
application/json, text/json
            Sample:
        
{
  "errcode": 1,
  "errmsg": "sample string 2",
  "tag": "sample string 3"
}
        application/xml, text/xml
            Sample:
        <CommonOperationResult 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>sample string 3</tag> </CommonOperationResult>
application/bson
            Sample:
Binary JSON content. See http://bsonspec.org for details.