POST api/Agent/MicroApp/OnWayAppointment/Instruction/Add
向系统中发起一个预约灌溉(开闸/关闸)的指令,成功后将返回预约ID。
Request Information
URI Parameters
None.
Body Parameters
AgentOnWayAppointmentWateringItemName | Description | Type | Additional information |
---|---|---|---|
AgentId |
运营商ID Bigint PK FK. 注意,执行插入或修改的操作时,这个参数不会被采信。 |
integer |
Required |
UserCode |
用户代码 Int FK, NN |
integer |
Required |
SerialId |
流量计ID Bigint FK, NN |
integer |
Required |
AppointmentTime |
预约时间 Char(12) NN |
string |
Required Max length: 12 |
AppointmentAction |
预约动作,Char(1), NN S’开始交易,‘E’结束交易 |
string |
Required Max length: 1 Min length: 1 |
TradeId |
原交易ID,Bigint |
integer |
None. |
LandGroupId |
组ID,Bigint |
integer |
None. |
TradeType |
交易类型 Char(1) 当预约动作为‘E’时,此值无意义;为“S” 时,此值表示交易类型,取值‘1’灌溉,‘2’泄洪,‘3’测试。 |
string |
Max length: 1 |
FlowLimit |
瞬时流量限定 FlowLimit Numeric(3,1) 立方米/秒 当预约动作为‘E‘时,此值无意义;当预约动作为“S”时,此值表示瞬时流量限定 |
decimal number |
None. |
ExpectWateringSpeed |
预计灌溉速度, Numeric(6,2). |
decimal number |
None. |
GroupLeaderRequestId |
对应的组长请求记录的ID,Bigint。 |
integer |
None. |
ReplyForGroupRequest |
对组长请求记录的回复内容,Varchar(50)。 |
string |
Max length: 50 |
TryTimes |
重次试数 NN Tinyint |
byte |
Required |
NotifyModeWhenSuccess |
成功后的操作 NN Char(1) |
string |
Required Max length: 1 Min length: 1 |
NotifyModeWhenFailed |
失败后的操作 NN Char(1) |
string |
Required Max length: 1 Min length: 1 |
LandList |
土地组清单 T_Parm_FarmerLand ReadOnly |
Collection of AgentParmFarmerLandItem |
None. |
AppointmentId |
预约ID PK Bigint output |
integer |
None. |
Request Formats
application/json, text/json
{ "AgentId": 1, "UserCode": 2, "SerialId": 3, "AppointmentTime": "sample string 4", "AppointmentAction": "sample string 5", "TradeId": 6, "LandGroupId": 7, "TradeType": "sample string 8", "FlowLimit": 9.0, "ExpectWateringSpeed": 10.0, "GroupLeaderRequestId": 11, "ReplyForGroupRequest": "sample string 12", "TryTimes": 64, "NotifyModeWhenSuccess": "sample string 14", "NotifyModeWhenFailed": "sample string 15", "LandList": [ { "FarmerId": 1, "LandArea": 2.0, "WaterWeight": 64 }, { "FarmerId": 1, "LandArea": 2.0, "WaterWeight": 64 } ], "AppointmentId": 16 }
application/xml, text/xml
<AgentOnWayAppointmentWateringItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter"> <AgentId>1</AgentId> <AppointmentAction>sample string 5</AppointmentAction> <AppointmentId>16</AppointmentId> <AppointmentTime>sample string 4</AppointmentTime> <ExpectWateringSpeed>10</ExpectWateringSpeed> <FlowLimit>9</FlowLimit> <GroupLeaderRequestId>11</GroupLeaderRequestId> <LandGroupId>7</LandGroupId> <LandList> <AgentParmFarmerLandItem> <FarmerId>1</FarmerId> <LandArea>2</LandArea> <WaterWeight>64</WaterWeight> </AgentParmFarmerLandItem> <AgentParmFarmerLandItem> <FarmerId>1</FarmerId> <LandArea>2</LandArea> <WaterWeight>64</WaterWeight> </AgentParmFarmerLandItem> </LandList> <NotifyModeWhenFailed>sample string 15</NotifyModeWhenFailed> <NotifyModeWhenSuccess>sample string 14</NotifyModeWhenSuccess> <ReplyForGroupRequest>sample string 12</ReplyForGroupRequest> <SerialId>3</SerialId> <TradeId>6</TradeId> <TradeType>sample string 8</TradeType> <TryTimes>64</TryTimes> <UserCode>2</UserCode> </AgentOnWayAppointmentWateringItem>
application/x-www-form-urlencoded
Sample not available.
application/bson
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
向系统中发起一个预约灌溉(开闸/关闸)的指令,成功后将返回预约ID。
CommonOperationResultWithTagOfInt64Name | Description | Type | Additional information |
---|---|---|---|
errcode | integer |
None. |
|
errmsg | string |
None. |
|
tag | integer |
None. |
Response Formats
application/json, text/json
{ "errcode": 1, "errmsg": "sample string 2", "tag": 3 }
application/xml, text/xml
<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
Binary JSON content. See http://bsonspec.org for details.