| | |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.rewardPunishmentDetailService.queryAll(pageQuery); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少rewardPunishmentStandardId"); |
| | | } |
| | | |
| | | List<Long> pIdList = Arrays.stream(rewardPunishmentDetail.getPersonId().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | List<RewardPunishmentDetail> list = new ArrayList<>(); |
| | | pIdList.forEach(f->{ |
| | | RewardPunishmentDetail new1 = BeanCopyUtils.copyBean(rewardPunishmentDetail, RewardPunishmentDetail.class); |
| | | new1.setPersonId(f+""); |
| | | list.add(new1); |
| | | }); |
| | | // List<Long> pIdList = Arrays.stream(rewardPunishmentDetail.getPersonId().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | // .collect(Collectors.toList()); |
| | | // |
| | | // List<RewardPunishmentDetail> list = new ArrayList<>(); |
| | | // pIdList.forEach(f->{ |
| | | // RewardPunishmentDetail new1 = BeanCopyUtils.copyBean(rewardPunishmentDetail, RewardPunishmentDetail.class); |
| | | // new1.setPersonId(f+""); |
| | | // list.add(new1); |
| | | // }); |
| | | if (rewardPunishmentDetail.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailService.saveBatch(list)); |
| | | return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailService.save(rewardPunishmentDetail)); |
| | | } else { |
| | | rewardPunishmentDetailService.updateBatchById(list); |
| | | rewardPunishmentDetailService.updateById(rewardPunishmentDetail); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.rewardPunishmentDetailService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | response.getOutputStream().close(); |
| | | } |
| | | |
| | | } |
| | | } |