POST api/Service/Appointment/RunningWatering/CurrentUser/Land/AddOrUpdate
上传某个在途灌溉交易的土地清单。 替换服务器数据的规则为上传的数据版本号大于服务器现有的数据版本号。 存在个别情况下,上传的数据被丢弃的情形。 这个操作将返回一个对象,展示被更新后数据的最新版本,可以用于客户端更新缓存。
Request Information
URI Parameters
None.
Body Parameters
需要添加的数据。
ServiceRunningWateringLandTableItem| Name | Description | Type | Additional information | 
|---|---|---|---|
| AgentId | 运营商ID。 | integer | Required | 
| UserCode | 用户代码。 | integer | Required | 
| 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:
        
{
  "AgentId": 1,
  "UserCode": 2,
  "TradeId": 3,
  "FarmerId": 4,
  "LandArea": 5.0,
  "WaterWeight": 64,
  "DataVersion": "sample string 7",
  "LastDataFrom": "sample string 8"
}
        application/xml, text/xml
            Sample:
        <ServiceRunningWateringLandTableItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter.ForService"> <DataVersion xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter">sample string 7</DataVersion> <FarmerId xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter">4</FarmerId> <LandArea xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter">5</LandArea> <LastDataFrom xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter">sample string 8</LastDataFrom> <TradeId xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter">3</TradeId> <WaterWeight xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter">64</WaterWeight> <AgentId>1</AgentId> <UserCode>2</UserCode> </ServiceRunningWateringLandTableItem>
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
上传某个在途灌溉交易的土地清单。 替换服务器数据的规则为上传的数据版本号大于服务器现有的数据版本号。 存在个别情况下,上传的数据被丢弃的情形。 这个操作将返回一个对象,展示被更新后数据的最新版本,可以用于客户端更新缓存。
CommonOperationResultWithTagOfAgentRunningWateringLandTableItem| Name | Description | Type | Additional information | 
|---|---|---|---|
| errcode | integer | None. | |
| errmsg | string | None. | |
| tag | AgentRunningWateringLandTableItem | None. | 
Response Formats
application/json, text/json
            Sample:
        
{
  "errcode": 1,
  "errmsg": "sample string 2",
  "tag": {
    "TradeId": 1,
    "FarmerId": 2,
    "LandArea": 3.0,
    "WaterWeight": 64,
    "DataVersion": "sample string 5",
    "LastDataFrom": "sample string 6"
  }
}
        application/xml, text/xml
            Sample:
        
<CommonOperationResultWithTagOfAgentRunningWateringLandTableItemwlCnhfv3 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 xmlns:d2p1="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter">
    <d2p1:DataVersion>sample string 5</d2p1:DataVersion>
    <d2p1:FarmerId>2</d2p1:FarmerId>
    <d2p1:LandArea>3</d2p1:LandArea>
    <d2p1:LastDataFrom>sample string 6</d2p1:LastDataFrom>
    <d2p1:TradeId>1</d2p1:TradeId>
    <d2p1:WaterWeight>64</d2p1:WaterWeight>
  </tag>
</CommonOperationResultWithTagOfAgentRunningWateringLandTableItemwlCnhfv3>
        application/bson
            Sample:
Binary JSON content. See http://bsonspec.org for details.