rcvr.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654
  1. // Copyright 2019 github.com. All rights reserved.
  2. // Use of this source code is governed by github.com.
  3. package impl
  4. import (
  5. "context"
  6. "smart-site-management/impl/v1/alarm"
  7. "smart-site-management/impl/v1/dust"
  8. "smart-site-management/impl/v1/lift"
  9. "smart-site-management/impl/v1/staff"
  10. "smart-site-management/impl/v1/task"
  11. "smart-site-management/impl/v1/vehicle"
  12. "smart-site-management/impl/v1/tower"
  13. "smart-site-management/pb"
  14. "smart-site-management/pb/v1"
  15. "smart-site-management/impl/v1/camera"
  16. "smart-site-management/impl/v1/project"
  17. "smart-site-management/impl/v1/user"
  18. "github.com/jaryhe/gopkgs/tasker/rpctasker"
  19. "google.golang.org/grpc"
  20. )
  21. // 具体实现
  22. type Rcvr struct {
  23. }
  24. func Register(s *grpc.Server) {
  25. pb.RegisterSmartSiteProjectServer(s, &Rcvr{})
  26. }
  27. // 修改密码
  28. func (c *Rcvr) ChangePasswd(ctx context.Context, req *v1.ChangePasswdRequest) (reply *v1.ChangePasswdReply, err error) {
  29. t1 := func() error {
  30. reply, err = user.ChangePasswd(ctx, req)
  31. return err
  32. }
  33. return reply, rpctasker.Exec(ctx, t1)
  34. }
  35. func (c *Rcvr) EmailUpdate(ctx context.Context, req *v1.EmailUpdateRequest) (reply *v1.EmailUpdateReply, err error) {
  36. t1 := func() error {
  37. reply, err = user.EmailUpdate(ctx, req)
  38. return err
  39. }
  40. return reply, rpctasker.Exec(ctx, t1)
  41. }
  42. func (c *Rcvr) EmailPrepare(ctx context.Context, req *v1.EmailPrepareRequest) (reply *v1.EmailPrepareReply, err error) {
  43. t1 := func() error {
  44. reply, err = user.EmailPrepare(ctx, req)
  45. return err
  46. }
  47. return reply, rpctasker.Exec(ctx, t1)
  48. }
  49. func (c *Rcvr) PhoneUpdate(ctx context.Context, req *v1.PhoneUpdateRequest) (reply *v1.PhoneUpdateReply, err error) {
  50. t1 := func() error {
  51. reply, err = user.PhoneUpdate(ctx, req)
  52. return err
  53. }
  54. return reply, rpctasker.Exec(ctx, t1)
  55. }
  56. func (c *Rcvr) UserInfo(ctx context.Context, req *v1.UserInfoRequest) (reply *v1.UserInfoReply, err error) {
  57. t1 := func() error {
  58. reply, err = user.UserInfo(ctx, req)
  59. return err
  60. }
  61. return reply, rpctasker.Exec(ctx, t1)
  62. }
  63. func (c *Rcvr) Login(ctx context.Context, req *v1.LoginRequest) (reply *v1.LoginReply, err error) {
  64. t1 := func() error {
  65. reply, err = user.Login(ctx, req)
  66. return err
  67. }
  68. return reply, rpctasker.Exec(ctx, t1)
  69. }
  70. // 设置工程平面图或效果图
  71. func (c *Rcvr) ProjectSetPic(ctx context.Context, req *v1.ProjectSetPicRequest) (reply *v1.ProjectSetPicReply, err error) {
  72. t1 := func() error {
  73. reply, err = project.ProjectSetPic(ctx, req)
  74. return err
  75. }
  76. return reply, rpctasker.Exec(ctx, t1)
  77. }
  78. // 设备列表
  79. func (c *Rcvr) DeviceList(ctx context.Context, req *v1.DeviceListRequest) (reply *v1.DeviceListReply, err error) {
  80. t1 := func() error {
  81. reply, err = project.DeviceList(ctx, req)
  82. return err
  83. }
  84. return reply, rpctasker.Exec(ctx, t1)
  85. }
  86. func (c *Rcvr) DeviceState(ctx context.Context, req *v1.DeviceStateRequest) (reply *v1.DeviceStateReply, err error) {
  87. t1 := func() error {
  88. reply, err = project.DeviceState(ctx, req)
  89. return err
  90. }
  91. return reply, rpctasker.Exec(ctx, t1)
  92. }
  93. // 获取设备绑定的摄像头
  94. func (c *Rcvr) DeviceVideoChannel(ctx context.Context, req *v1.DeviceVideoChannelRequest) (reply *v1.DeviceVideoChannelReply, err error) {
  95. t1 := func() error {
  96. reply, err = project.DeviceVideoChannel(ctx, req)
  97. return err
  98. }
  99. return reply, rpctasker.Exec(ctx, t1)
  100. }
  101. func (c *Rcvr) ChannelUpdate(ctx context.Context, req *v1.ChannelUpdateRequest) (reply *v1.ChannelUpdateReply, err error) {
  102. t1 := func() error {
  103. reply, err = camera.ChannelUpdate(ctx, req)
  104. return err
  105. }
  106. return reply, rpctasker.Exec(ctx, t1)
  107. }
  108. // 视频设备列表
  109. func (c *Rcvr) VedioList(ctx context.Context, req *v1.VedioListRequest) (reply *v1.VedioListReply, err error) {
  110. t1 := func() error {
  111. reply, err = camera.VedioList(ctx, req)
  112. return err
  113. }
  114. return reply, rpctasker.Exec(ctx, t1)
  115. }
  116. // 运渣车辆列表
  117. func (c *Rcvr) VehicleList(ctx context.Context, req *v1.VehicleListRequest) (reply *v1.VehicleListReply, err error) {
  118. t1 := func() error {
  119. reply, err = vehicle.VehicleList(ctx, req)
  120. return err
  121. }
  122. return reply, rpctasker.Exec(ctx, t1)
  123. }
  124. // 获取实时播放地址
  125. func (c *Rcvr) RealPlay(ctx context.Context, req *v1.RealPlayRequest) (reply *v1.RealPlayReply, err error) {
  126. t1 := func() error {
  127. reply, err = camera.RealPlay(ctx, req)
  128. return err
  129. }
  130. return reply, rpctasker.Exec(ctx, t1)
  131. }
  132. func (c *Rcvr) Ptz(ctx context.Context, req *v1.PtzRequest) (reply *v1.PtzReply, err error) {
  133. t1 := func() error {
  134. reply, err = camera.Ptz(ctx, req)
  135. return err
  136. }
  137. return reply, rpctasker.Exec(ctx, t1)
  138. }
  139. func (c *Rcvr) VedioPing(ctx context.Context, req *v1.VedioPingRequest) (reply *v1.VedioPingReply, err error) {
  140. t1 := func() error {
  141. reply, err = camera.VedioPing(ctx, req)
  142. return err
  143. }
  144. return reply, rpctasker.Exec(ctx, t1)
  145. }
  146. // 最近一次考勤数据
  147. func (c *Rcvr) LatestStaffData(ctx context.Context, req *v1.LatestStaffDataRequest) (reply *v1.LatestStaffDataReply, err error) {
  148. t1 := func() error {
  149. reply, err = staff.LatestStaffData(ctx, req)
  150. return err
  151. }
  152. return reply, rpctasker.Exec(ctx, t1)
  153. }
  154. func (c *Rcvr) StaffList(ctx context.Context, req *v1.StaffListRequest) (reply *v1.StaffListReply, err error) {
  155. t1 := func() error {
  156. reply, err = staff.StaffList(ctx, req)
  157. return err
  158. }
  159. return reply, rpctasker.Exec(ctx, t1)
  160. }
  161. func (c *Rcvr) StaffAttendance(ctx context.Context, req *v1.StaffAttendanceRequest) (reply *v1.StaffAttendanceReply, err error) {
  162. t1 := func() error {
  163. reply, err = staff.StaffAttendance(ctx, req)
  164. return err
  165. }
  166. return reply, rpctasker.Exec(ctx, t1)
  167. }
  168. // 按工种进行考勤统计
  169. func (c *Rcvr) StaffWorkTypeStatistics(ctx context.Context, req *v1.StaffWorkTypeStatisticsRequest) (reply *v1.StaffWorkTypeStatisticsReply, err error) {
  170. t1 := func() error {
  171. reply, err = staff.StaffWorkTypeStatistics(ctx, req)
  172. return err
  173. }
  174. return reply, rpctasker.Exec(ctx, t1)
  175. }
  176. // 按员工类型进行考勤统计
  177. func (c *Rcvr) StaffTypeStatistics(ctx context.Context, req *v1.StaffTypeStatisticsRequest) (reply *v1.StaffTypeStatisticsReply, err error) {
  178. t1 := func() error {
  179. reply, err = staff.StaffTypeStatistics(ctx, req)
  180. return err
  181. }
  182. return reply, rpctasker.Exec(ctx, t1)
  183. }
  184. // 按劳务公司进行考勤统计
  185. func (c *Rcvr) LaborCompanyStatistics(ctx context.Context, req *v1.LaborCompanyStatisticsRequest) (reply *v1.LaborCompanyStatisticsReply, err error) {
  186. t1 := func() error {
  187. reply, err = staff.LaborCompanyStatistics(ctx, req)
  188. return err
  189. }
  190. return reply, rpctasker.Exec(ctx, t1)
  191. }
  192. // 最近一次扬尘数据
  193. func (c *Rcvr) LatestDustMonitorData(ctx context.Context, req *v1.LatestDustMonitorDataRequest) (reply *v1.LatestDustMonitorDataReply, err error) {
  194. t1 := func() error {
  195. reply, err = dust.LatestDustMonitorData(ctx, req)
  196. return err
  197. }
  198. return reply, rpctasker.Exec(ctx, t1)
  199. }
  200. // 历史扬尘数据
  201. func (c *Rcvr) DustMonitorHistory(ctx context.Context, req *v1.DustMonitorHistoryRequest) (reply *v1.DustMonitorHistoryReply, err error) {
  202. t1 := func() error {
  203. reply, err = dust.DustMonitorHistory(ctx, req)
  204. return err
  205. }
  206. return reply, rpctasker.Exec(ctx, t1)
  207. }
  208. // 扬尘设备列表
  209. func (c *Rcvr) DustList(ctx context.Context, req *v1.DustListRequest) (reply *v1.DustListReply, err error) {
  210. t1 := func() error {
  211. reply, err = dust.DustList(ctx, req)
  212. return err
  213. }
  214. return reply, rpctasker.Exec(ctx, t1)
  215. }
  216. // 扬尘列表
  217. func (c *Rcvr) DustAqi(ctx context.Context, req *v1.DustAqiRequest) (reply *v1.DustAqiReply, err error) {
  218. t1 := func() error {
  219. reply, err = dust.DustAqi(ctx, req)
  220. return err
  221. }
  222. return reply, rpctasker.Exec(ctx, t1)
  223. }
  224. // 告警列表
  225. func (c *Rcvr) AlarmList(ctx context.Context, req *v1.AlarmListRequest) (reply *v1.AlarmListReply, err error) {
  226. t1 := func() error {
  227. reply, err = alarm.AlarmList(ctx, req)
  228. return err
  229. }
  230. return reply, rpctasker.Exec(ctx, t1)
  231. }
  232. // 设备绑定摄像头
  233. func (c *Rcvr) DeviceBindCamera(ctx context.Context, req *v1.DeviceBindCameraRequest) (reply *v1.DeviceBindCameraReply, err error) {
  234. t1 := func() error {
  235. reply, err = camera.DeviceBindCamera(ctx, req)
  236. return err
  237. }
  238. return reply, rpctasker.Exec(ctx, t1)
  239. }
  240. // 设备入库审批
  241. func (c *Rcvr) DeviceApprove(ctx context.Context, req *v1.DeviceApproveRequest) (reply *v1.DeviceApproveReply, err error) {
  242. t1 := func() error {
  243. reply, err = project.DeviceApprove(ctx, req)
  244. return err
  245. }
  246. return reply, rpctasker.Exec(ctx, t1)
  247. }
  248. // 设备解绑摄像头
  249. func (c *Rcvr) DeviceUnbindCamera(ctx context.Context, req *v1.DeviceUnbindCameraRequest) (reply *v1.DeviceUnbindCameraReply, err error) {
  250. t1 := func() error {
  251. reply, err = camera.DeviceUnbindCamera(ctx, req)
  252. return err
  253. }
  254. return reply, rpctasker.Exec(ctx, t1)
  255. }
  256. // 视屏设备下的通道列表
  257. func (c *Rcvr) ChannelList(ctx context.Context, req *v1.ChannelListRequest) (reply *v1.ChannelListReply, err error) {
  258. t1 := func() error {
  259. reply, err = camera.ChannelList(ctx, req)
  260. return err
  261. }
  262. return reply, rpctasker.Exec(ctx, t1)
  263. }
  264. // 项目(工程)信息
  265. func (c *Rcvr) ProjectInfo(ctx context.Context, req *v1.ProjectInfoRequest) (reply *v1.ProjectInfoReply, err error) {
  266. t1 := func() error {
  267. reply, err = project.ProjectInfo(ctx, req)
  268. return err
  269. }
  270. return reply, rpctasker.Exec(ctx, t1)
  271. }
  272. // 项目设备统计
  273. func (c *Rcvr) ProjectDeviceStatistics(ctx context.Context, req *v1.ProjectDeviceStatisticsRequest) (reply *v1.ProjectDeviceStatisticsReply, err error) {
  274. t1 := func() error {
  275. reply, err = project.ProjectDeviceStatistics(ctx, req)
  276. return err
  277. }
  278. return reply, rpctasker.Exec(ctx, t1)
  279. }
  280. // 获取项目进度
  281. func (c *Rcvr) ProjectProgress(ctx context.Context, req *v1.ProjectProgressRequest) (reply *v1.ProjectProgressReply, err error) {
  282. t1 := func() error {
  283. reply, err = project.ProjectProgress(ctx, req)
  284. return err
  285. }
  286. return reply, rpctasker.Exec(ctx, t1)
  287. }
  288. // 添加项目进度
  289. func (c *Rcvr) ProjectProgressAdd(ctx context.Context, req *v1.ProjectProgressAddRequest) (reply *v1.ProjectProgressAddReply, err error) {
  290. t1 := func() error {
  291. reply, err = project.ProjectProgressAdd(ctx, req)
  292. return err
  293. }
  294. return reply, rpctasker.Exec(ctx, t1)
  295. }
  296. // 进度完成设置
  297. func (c *Rcvr) ProjectProgressSet(ctx context.Context, req *v1.ProjectProgressSetRequest) (reply *v1.ProjectProgressSetReply, err error) {
  298. t1 := func() error {
  299. reply, err = project.ProjectProgressSet(ctx, req)
  300. return err
  301. }
  302. return reply, rpctasker.Exec(ctx, t1)
  303. }
  304. // 删除项目进度
  305. func (c *Rcvr) ProjectProgressDel(ctx context.Context, req *v1.ProjectProgressDelRequest) (reply *v1.ProjectProgressDelReply, err error) {
  306. t1 := func() error {
  307. reply, err = project.ProjectProgressDel(ctx, req)
  308. return err
  309. }
  310. return reply, rpctasker.Exec(ctx, t1)
  311. }
  312. // 添加告警规则
  313. func (c *Rcvr) AlarmRuleAdd(ctx context.Context, req *v1.AlarmRuleAddRequest) (reply *v1.AlarmRuleAddReply, err error) {
  314. t1 := func() error {
  315. reply, err = alarm.AlarmRuleAdd(ctx, req)
  316. return err
  317. }
  318. return reply, rpctasker.Exec(ctx, t1)
  319. }
  320. // 删除告警规则
  321. func (c *Rcvr) AlarmRuleDelete(ctx context.Context, req *v1.AlarmRuleDeleteRequest) (reply *v1.AlarmRuleDeleteReply, err error) {
  322. t1 := func() error {
  323. reply, err = alarm.AlarmRuleDelete(ctx, req)
  324. return err
  325. }
  326. return reply, rpctasker.Exec(ctx, t1)
  327. }
  328. // 告警规则列表
  329. func (c *Rcvr) AlarmRuleList(ctx context.Context, req *v1.AlarmRuleListRequest) (reply *v1.AlarmRuleListReply, err error) {
  330. t1 := func() error {
  331. reply, err = alarm.AlarmRuleList(ctx, req)
  332. return err
  333. }
  334. return reply, rpctasker.Exec(ctx, t1)
  335. }
  336. // 更新告警规则
  337. func (c *Rcvr) AlarmRuleUpdate(ctx context.Context, req *v1.AlarmRuleUpdateRequest) (reply *v1.AlarmRuleUpdateReply, err error) {
  338. t1 := func() error {
  339. reply, err = alarm.AlarmRuleUpdate(ctx, req)
  340. return err
  341. }
  342. return reply, rpctasker.Exec(ctx, t1)
  343. }
  344. // 告警规则启停用
  345. func (c *Rcvr) AlarmRuleOnOff(ctx context.Context, req *v1.AlarmRuleOnOffRequest) (reply *v1.AlarmRuleOnOffReply, err error) {
  346. t1 := func() error {
  347. reply, err = alarm.AlarmRuleOnOff(ctx, req)
  348. return err
  349. }
  350. return reply, rpctasker.Exec(ctx, t1)
  351. }
  352. // 添加告警联系人
  353. func (c *Rcvr) AlarmContactAdd(ctx context.Context, req *v1.AlarmContactAddRequest) (reply *v1.AlarmContactAddReply, err error) {
  354. t1 := func() error {
  355. reply, err = alarm.AlarmContactAdd(ctx, req)
  356. return err
  357. }
  358. return reply, rpctasker.Exec(ctx, t1)
  359. }
  360. // 删除告警联系人
  361. func (c *Rcvr) AlarmContactDelete(ctx context.Context, req *v1.AlarmContactDeleteRequest) (reply *v1.AlarmContactDeleteReply, err error) {
  362. t1 := func() error {
  363. reply, err = alarm.AlarmContactDelete(ctx, req)
  364. return err
  365. }
  366. return reply, rpctasker.Exec(ctx, t1)
  367. }
  368. // 编辑告警联系人
  369. func (c *Rcvr) AlarmContactUpdate(ctx context.Context, req *v1.AlarmContactUpdateRequest) (reply *v1.AlarmContactUpdateReply, err error) {
  370. t1 := func() error {
  371. reply, err = alarm.AlarmContactUpdate(ctx, req)
  372. return err
  373. }
  374. return reply, rpctasker.Exec(ctx, t1)
  375. }
  376. // 告警联系人列表
  377. func (c *Rcvr) AlarmContactList(ctx context.Context, req *v1.AlarmContactListRequest) (reply *v1.AlarmContactListReply, err error) {
  378. t1 := func() error {
  379. reply, err = alarm.AlarmContactList(ctx, req)
  380. return err
  381. }
  382. return reply, rpctasker.Exec(ctx, t1)
  383. }
  384. // 最近一次塔吊数据
  385. func (c *Rcvr) LatestTowerMonitorData(ctx context.Context, req *v1.LatestTowerMonitorDataRequest) (reply *v1.LatestTowerMonitorDataReply, err error) {
  386. t1 := func() error {
  387. reply, err = tower.LatestTowerMonitorData(ctx, req)
  388. return err
  389. }
  390. return reply, rpctasker.Exec(ctx, t1)
  391. }
  392. // 历史塔吊数据
  393. func (c *Rcvr) TowerMonitorHistory(ctx context.Context, req *v1.TowerMonitorHistoryRequest) (reply *v1.TowerMonitorHistoryReply, err error) {
  394. t1 := func() error {
  395. reply, err = tower.TowerMonitorHistory(ctx, req)
  396. return err
  397. }
  398. return reply, rpctasker.Exec(ctx, t1)
  399. }
  400. // 最近一次升降机数据
  401. func (c *Rcvr) LatestLiftMonitorData(ctx context.Context, req *v1.LatestLiftMonitorDataRequest) (reply *v1.LatestLiftMonitorDataReply, err error) {
  402. t1 := func() error {
  403. reply, err = lift.LatestLiftMonitorData(ctx, req)
  404. return err
  405. }
  406. return reply, rpctasker.Exec(ctx, t1)
  407. }
  408. // 历史升降机数据
  409. func (c *Rcvr) LiftMonitorHistory(ctx context.Context, req *v1.LiftMonitorHistoryRequest) (reply *v1.LiftMonitorHistoryReply, err error) {
  410. t1 := func() error {
  411. reply, err = lift.LiftMonitorHistory(ctx, req)
  412. return err
  413. }
  414. return reply, rpctasker.Exec(ctx, t1)
  415. }
  416. // 塔机基本属性
  417. func (c *Rcvr) TowerBaseInfoList(ctx context.Context, req *v1.TowerBaseInfoListRequest) (reply *v1.TowerBaseInfoListReply, err error) {
  418. t1 := func() error {
  419. reply, err = tower.TowerBaseInfoList(ctx, req)
  420. return err
  421. }
  422. return reply, rpctasker.Exec(ctx, t1)
  423. }
  424. // 添加参建单位
  425. func (c *Rcvr) ProjectCorpAdd(ctx context.Context, req *v1.ProjectCorpAddRequest) (reply *v1.ProjectCorpAddReply, err error) {
  426. t1 := func() error {
  427. reply, err = project.ProjectCorpAdd(ctx, req)
  428. return err
  429. }
  430. return reply, rpctasker.Exec(ctx, t1)
  431. }
  432. // 删除参建单位
  433. func (c *Rcvr) ProjectCorpDel(ctx context.Context, req *v1.ProjectCorpDelRequest) (reply *v1.ProjectCorpDelReply, err error) {
  434. t1 := func() error {
  435. reply, err = project.ProjectCorpDel(ctx, req)
  436. return err
  437. }
  438. return reply, rpctasker.Exec(ctx, t1)
  439. }
  440. // 更新参建单位
  441. func (c *Rcvr) ProjectCorpUpdate(ctx context.Context, req *v1.ProjectCorpUpdateRequest) (reply *v1.ProjectCorpUpdateReply, err error) {
  442. t1 := func() error {
  443. reply, err = project.ProjectCorpUpdate(ctx, req)
  444. return err
  445. }
  446. return reply, rpctasker.Exec(ctx, t1)
  447. }
  448. // 参建单位列表
  449. func (c *Rcvr) ProjectCorpList(ctx context.Context, req *v1.ProjectCorpListRequest) (reply *v1.ProjectCorpListReply, err error) {
  450. t1 := func() error {
  451. reply, err = project.ProjectCorpList(ctx, req)
  452. return err
  453. }
  454. return reply, rpctasker.Exec(ctx, t1)
  455. }
  456. // 添加管理人员
  457. func (c *Rcvr) ProjectPMAdd(ctx context.Context, req *v1.ProjectPMAddRequest) (reply *v1.ProjectPMAddReply, err error) {
  458. t1 := func() error {
  459. reply, err = project.ProjectPMAdd(ctx, req)
  460. return err
  461. }
  462. return reply, rpctasker.Exec(ctx, t1)
  463. }
  464. // 删除管理人员
  465. func (c *Rcvr) ProjectPMDel(ctx context.Context, req *v1.ProjectPMDelRequest) (reply *v1.ProjectPMDelReply, err error) {
  466. t1 := func() error {
  467. reply, err = project.ProjectPMDel(ctx, req)
  468. return err
  469. }
  470. return reply, rpctasker.Exec(ctx, t1)
  471. }
  472. // 更新管理人员
  473. func (c *Rcvr) ProjectPMUpdate(ctx context.Context, req *v1.ProjectPMUpdateRequest) (reply *v1.ProjectPMUpdateReply, err error) {
  474. t1 := func() error {
  475. reply, err = project.ProjectPMUpdate(ctx, req)
  476. return err
  477. }
  478. return reply, rpctasker.Exec(ctx, t1)
  479. }
  480. // 管理人员列表
  481. func (c *Rcvr) ProjectPMList(ctx context.Context, req *v1.ProjectPMListRequest) (reply *v1.ProjectPMListReply, err error) {
  482. t1 := func() error {
  483. reply, err = project.ProjectPMList(ctx, req)
  484. return err
  485. }
  486. return reply, rpctasker.Exec(ctx, t1)
  487. }
  488. // 行政区域列表
  489. func (c *Rcvr) AreaCodeList(ctx context.Context, req *v1.AreaCodeListRequest) (reply *v1.AreaCodeListReply, err error) {
  490. t1 := func() error {
  491. reply, err = project.AreaCodeList(ctx, req)
  492. return err
  493. }
  494. return reply, rpctasker.Exec(ctx, t1)
  495. }
  496. func (c *Rcvr) TaskList(ctx context.Context, req *v1.TaskListRequest) (reply *v1.TaskListReply, err error) {
  497. t1 := func() error {
  498. reply, err = task.TaskList(ctx, req)
  499. return err
  500. }
  501. return reply, rpctasker.Exec(ctx, t1)
  502. }
  503. func (c *Rcvr) TaskInfo(ctx context.Context, req *v1.TaskInfoRequest) (reply *v1.TaskInfoReply, err error) {
  504. t1 := func() error {
  505. reply, err = task.TaskInfo(ctx, req)
  506. return err
  507. }
  508. return reply, rpctasker.Exec(ctx, t1)
  509. }
  510. func (c *Rcvr) TaskFinish(ctx context.Context, req *v1.TaskFinishRequest) (reply *v1.TaskFinishReply, err error) {
  511. t1 := func() error {
  512. reply, err = task.TaskFinish(ctx, req)
  513. return err
  514. }
  515. return reply, rpctasker.Exec(ctx, t1)
  516. }