| | |
| | | @PostMapping |
| | | public R add(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | comSanshuoExpertDTO.setCreateBy(this.getLoginUserInfo().getName()); |
| | | return comSanShuoExpertService.addExpert(comSanshuoExpertDTO); |
| | | return comSanShuoExpertService.addOrUpdateExpert(comSanshuoExpertDTO); |
| | | } |
| | | |
| | | @GetMapping("/detail") |
| | |
| | | * */ |
| | | @PutMapping |
| | | public R update(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | ComSanshuoExpert expert=new ComSanshuoExpert(); |
| | | BeanUtil.copyProperties(comSanshuoExpertDTO,expert); |
| | | expert.setUpdateTime(new Date()); |
| | | return R.ok(comSanShuoExpertService.updateById(expert)); |
| | | return R.ok(comSanShuoExpertService.addOrUpdateExpert(comSanshuoExpertDTO)); |
| | | } |
| | | |
| | | |
| | |
| | | * */ |
| | | @DeleteMapping("/remove") |
| | | public R remove(@RequestParam("id")Long id){ |
| | | //TODO 是否有为解决事件 |
| | | List<ComEvent> list = comEventService.list(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, id).in(ComEvent::getEventProcessStatus, (1), (2), (5))); |
| | | if (list.size()!=0){ |
| | | return R.fail("有未调解完成事件,无法删除!"); |