lj-publish-test3
Version:
A magical vue admin. Typical templates for enterprise applications. Newest development stack of vue. Lots of awesome features
261 lines (243 loc) • 10.6 kB
Plain Text
1 增加账户
post "api/oam/user_permissions/add"
req params: {"username":["new_oam","zte_zhangsan"],"password":"123","right":[{"path","/a"},{"path","/a/b"}],"filters":[{"key":"customerName","op":"like","value":"中兴"},{"key":"address","op":"like","value":"上海"}]}
ack: {status:ok}
2 修改密码 (用户登录自己修改密码)
post "api/oam/user_permissions/modify_pwd"]
req: {"username":Uname,"old":Old,"new":New}
ack: {status:Status,reason:Res}
3 修改权限值
post "api/oam/modify_record"
req: {"table":"user_permission_t","key":username,"attrs":{"filters":New}}
ack: {status:Status,reason:Res}
3 修改角色
post "api/oam/modify_record"
req: {"table":"user_permission_t","key":username,"attrs":{"role":Role}}
ack: {status:Status,reason:Res}
3.1 删除用户账号
post http://priv.x9water.com:18080/api/oam/delete_record
req: {"table":"user_permission_t","key":["new_oam","zhangsan"]}
ack: {status:ok}
4 获取所有帐号
get "api/oam/user_permissions/getall/new_oam"
ack #{status=>ok,result=>UserInfos};
5 用户登录
post "api/oam/user_permissions/login"
req: {"username":["new_oam","zte_zhangsan"],"password":"123"}
ack: {status:ok,result:{"username":["new_oam","zte_zhangsan"],"filters":[{"key":"customerName","op":"like","value":"中兴"},{"key":"address","op":"like","value":"上海"}}
6 重置密码
post "api/oam/user_permissions/reset_pwd"]
req: {"username":Uname}
ack: {status:Status,reason:Res}
和微服务之间的接口
1.根据过滤条件查询设备信息接口
http://inner.x9water.com/api/pudow-service-erp/pdeEquipment/page
req: offset=1&limit=10&conditions=[{"key":"uset","op":"like","value":"华为"}]
ack:{
"usePager": true,
"offset": 1,//当前页数
"limit": 10,分页数量
"order": null,
"sort": null,
"total": 35,//记录总数
"rows": [{
"id": 82,
"classify": 1,
"equipmentNO": "89860056091585001586",
"simcard": "89860056091585001586",
"customerId": 101048,
"clientele": "华为管线机",
"uset": "深圳华为科技有限公司",
"macno": null,
"batchId": null,
"weixinuri": "http://weixin.qq.com/q/JXVrqmXl03mqq1MQWl1-",
"volume": "管线机",
"productsId": 100311176,
"startusing": 4,
"companyId": 10000,
"matching": "9999,10000",
"manufacturer": null,
"state": 1,
"employdate": null,
"maintain": 0,
"location": "培训中心A区3楼",
"productioTime": null,
"address": "深圳华为",
"registrationTime": "2017-08-02 06:04:42",
"longitude": null,
"latitude": null,
"spaceId": null,
"totalflow": null,
"ticket": "gQF68DoAAAAAAAAAASxodHRwOi8vd2VpeGluLnFxLmNvbS9xL0pYVnJxbVhsMDNtcXExTVFXbDEtAAIEZPuxVQMEAAAAAA==",
"rjversion": null,
"yjversion": null,
"remarks": null,
"facilitator": null,
"storagetime": null,
"installTime": "2015-08-17 16:00:00",
"clientelephone": "13764967427",
"mastername": "黄悦",
"masterPhone": "13564507465",
"productionOrder": null,
"registration": null,
"amount": 1,
"sell": 0,
"sgcode": "pudao",
"devicelevel": 1,
"provinceName": null,
"cityName": null,
"countyName": null,
"regionId": 0,
"wxtype": 1,
"clientelecontacts": null
}]
}
1.1设备维护记录
http://inner.x9water.com/api/pudow-service-erp/pdeEquipment/getMaintaininfo
req: conditions=[{"key":"uset","op":"like","value":"华为"}]&equipmentNo=898602B11915A0036597
ack:{
{
"id": 28971,
"taskingId": 2019030338,
"equipmentId": 1056,
"equipmentNo": "898602B11915A0036597",
"masterName": "赵赫",
"cellPhone": "17722443444",
"flow": 44365,
"maintain": 1,
"maintainTime": "2019-03-23 07:56:05",
"filterelement": "1,2,3",
"remarks": "已维护",
"descaling": 0,
"polling": 0,
"state": 1,
"mechanicId": 233,
"customerId": 100871,
"isDetection": 0,
"isSoftware": 0,
"isHardware": 0,
"isComponent": 0,
"isSolve": 1,
"imgPath": "/up/equipmentImg/",
"imgAmount": 1,
"imgNum": "20190323155604924566",
"maintainType": 1,
"isRepair": 0
}]
}
2、根据设备编号查询滤芯信息
http://inner.x9water.com/api/pudow-service-equipment/equipment/getFiltersByEquipmentNos
req:equipmentNos=898602B11915A0036567&equipmentNos=898602B10315C0021281&
ack:[
{
"id": 42,
"createTime": "2017-08-02 16:57:53",
"updateTime": "2018-12-25 13:18:25",
"equipmentId": 32,
"productId": 162,
"simcard": "898602B11915A0036567",
"no": "1001",
"life": "100.00",
"ord": 1,
"ntime": null,
"rtime": null,
"productName": "PP棉",
"equipmentNo": "898602B11915A0036567"
},
{
"id": 63,
"createTime": "2017-08-02 16:57:53",
"updateTime": "2019-03-08 17:02:52",
"equipmentId": 36,
"productId": 178,
"simcard": "898607B6091700071929",
"no": "1004",
"life": "90.15",
"ord": 4,
"ntime": null,
"rtime": null,
"productName": "RO膜滤芯",
"equipmentNo": "898602B10315C0021281"
}
]
3、根据设备编号查看每次上报数据
http://inner.x9water.com/api/pudow-service-flow/flow/getEveryFlowByEquipmentNo
req:offset=1&limit=10&equipmentNo=898602B30316C0630119 (HS007)
req:offset=1&limit=10&equipmentNo=NS1528080962640 (NS005)
ack:{
"usePager": true,
"offset": 1,
"limit": 10,
"order": null,
"sort": null,
"total": 1876,
"rows": [
{
"time": "2019-03-14 10:14:21",
"flow": "4.42"
},
{
"time": "2019-03-14 08:11:48",
"flow": "0.18"
}
]
}
4、根据设备编号查看每天上报数据
http://inner.x9water.com/api/pudow-service-flow/flow/getDayFlowByEquipmentNo
req:offset=1&limit=10&equipmentNo=898602B30316C0630119 (HS007)
req:offset=1&limit=10&equipmentNo=NS1528080962640 (NS005)
ack:{
"usePager": true,
"offset": 1,
"limit": 10,
"order": null,
"sort": null,
"total": 685,
"rows": [
{
"time": "2019-03-14",
"flow": "3"
},
{
"time": "2019-03-13",
"flow": "1"
}
]
}
5、查询多台设备信息
http://inner.x9water.com/api/pudow-service-flow/flow/getStateInfoByEquipmentNos
req:equipmentNos=898602B11915A0036567&equipmentNos=898602B10315C0021281&
ack:
[
{
"equipmentNo": "HS1509595015125",
"onlineState": "在线",
"ph": "7.17",
"tds": "32",
"totalFlow": "52387"
},
{
"equipmentNo": "NS1541578758312",
"onlineState": "在线",
"ph": null,
"tds": "84",
"totalFlow": "0"
},
{
"equipmentNo": "NS1528080963000",
"onlineState": "在线",
"ph": null,
"tds": "50",
"totalFlow": "3,081.43"
}
]
6 获取所有设备的版本信息列表
post http://priv.x9water.com:18080/api/nhome/get_online_devices_verinfo
req: {page_num:10000,curpage:1,conditions:[["erp_equipmentNO","like",xxx],["DId","like",xxxx],["Ver","like",xxxx],["erp_volume","like",xxxx]}
ack: {"status":"ok","result":[{"erp_brand":"J久纯","erp_filter3":98.5,"erp_businessUnit":null,"newest_filename":"","erp_county":"闵行区","erp_mastername":"余晴","erp_productsId":100312610,"erp_weixinuri":"http://weixin.qq.com/q/02gSeONZGYf2210000M073","erp_filter2":93.9,"erp_volume":"PDP001","id":1,"erp_categoryName":"10.03开水器","erp_contacts":"公司","erp_address":"实验室","erp_productName":"PDP001台上型智能饮水机","erp_customerId":104937,"erp_filter4":95.07,"device_type":"幼儿园设备","erp_customerName":"上海朴道水汇环保科技股份有限公司","erp_cellPhone":"12345678912","dev_id":"898607B6091700072142","erp_filter5":95.07,"sendedlen":0,"erp_region":"华东","status":"waiting","erp_equipmentNO":"PDP1541748410031","erp_city":"上海市","erp_productCode":"10.03.12446","erp_registrationTime":"2018-11-09 15:26:50","erp_location":"实验室","erp_installTime":"2019-03-13 11:04:45","Ver":"PDPR06.19040801","erp_province":"上海","erp_binded_equipmentNO":"NS1552445953156","filesize":25621,"erp_customerCode":"PDG104937","erp_binded_simNO":"898607C6091700072142","erp_simNO":"898607B6091700072142","erp_Id":13652,"seqno":0,"erp_filter1":93.9,"erp_customerClass":null},{"erp_brand":"P朴道水汇","erp_filter3":23.51,"erp_businessUnit":null,"erp_filter4_name":"纳滤膜滤芯","newest_filename":"","erp_filter2_name":"颗粒炭滤芯","erp_county":"闵行区","erp_mastername":"许电波","erp_productsId":100313312,"erp_weixinuri":"http://weixin.qq.com/q/02QXhY8CXqb-e10000M07M","erp_filter2":23.51,"erp_volume":"PDD802-1000G-NF","id":2,"erp_categoryName":"10.01商用标准设备","erp_contacts":"公司","erp_address":"上海市青浦区高光路215弄99号4号楼2层","erp_productName":"朴道牌集中供水主机","erp_customerId":104937,"erp_filter3_name":"PP棉滤芯","erp_filter4":74.5,"device_type":"未知","erp_customerName":"上海朴道水汇环保科技股份有限公司","erp_cellPhone":"12345678912","dev_id":"898607B6091700073202","erp_filter5":23.51,"erp_region":"华东","status":"online","erp_equipmentNO":"PDD1555564426765","erp_city":"上海市","erp_productCode":"10.01.13190","erp_registrationTime":"2019-04-18 13:13:46","erp_location":"测试室","erp_installTime":"2019-04-19 11:35:30","erp_filter5_name":"后置活性炭","Ver":"PDD801R01.1905172","erp_province":"上海","erp_customerCode":"PDG104937","erp_binded_simNO":null,"erp_simNO":"898607B6091700073202","erp_filter1_name":"PP棉滤芯","erp_Id":24571,"erp_filter1":0.0,"erp_customerClass":null}]}
7、sim卡绑定
post priv.x9water.com:18080/kinder/sap/bindSimAndEquipmentNO
req {"simNO":"45435hdsfjh","volume":"NBW"}
ack
8、
modifier