| | |
| | | public AjaxResult addRemark(@ApiParam(value = "体检父项目备注集合") @RequestBody List<TjOrderRemark> remarklList) { |
| | | Long userId = Long.valueOf(SecurityUtils.getLoginUser().getUserId()); |
| | | SysUser sysUser = userService.getById(userId); |
| | | if (remarklList == null || remarklList.size() == 0) { |
| | | if (remarklList == null || remarklList.isEmpty()) { |
| | | return AjaxResult.success("操作失败"); |
| | | } |
| | | for (TjOrderRemark orderRemark : remarklList) { |
| | | List<String> summaryList = orderRemark.getSummaryList(); |
| | | if (null != summaryList && summaryList.size()>0 && !summaryList.contains(null) ) { |
| | | if (null != summaryList && !summaryList.isEmpty() && !summaryList.contains(null) ) { |
| | | orderRemark.setSummary(Joiner.on(";").join(orderRemark.getSummaryList())); |
| | | } |
| | | LambdaQueryWrapper<TjOrder> qw = new LambdaQueryWrapper<>(); |
| | |
| | | List<TjOrderDetail> tjOrderDetailList = orderRemark.getTjOrderDetailList(); |
| | | |
| | | final TjCustomer byId1 = customerService.getById(order.getUserId()); |
| | | if (null != tjOrderDetailList && tjOrderDetailList.size() > 0) { |
| | | if (null != tjOrderDetailList && !tjOrderDetailList.isEmpty()) { |
| | | //----------------------------------start |
| | | for (TjOrderDetail tjOrderDetail : tjOrderDetailList) { |
| | | final TjProject byId = projectService.getById(tjOrderDetail.getProId()); |
| | |
| | | remarkService.save(remark); |
| | | } else { |
| | | one.setRemark(orderRemark.getRemark()); |
| | | if (null != summaryList && summaryList.size()>0 && !summaryList.contains(null)) { |
| | | if (null != summaryList && !summaryList.isEmpty() && !summaryList.contains(null)) { |
| | | one.setSummary(Joiner.on(";").join(orderRemark.getSummaryList())); |
| | | } |
| | | // one.setDeptId(orderRemark.getDeptId()); |
| | |
| | | */ |
| | | @GetMapping("/getDeptAdvice") |
| | | @ApiOperation(value = "根据项目id获取建议") |
| | | public AjaxResult getDeptAdvice(@ApiParam(value = "父项目项目id") @RequestParam(required = false) String proId) { |
| | | public AjaxResult getDeptAdvice(@ApiParam(value = "父项目项目id") @RequestParam(required = false) String proId, |
| | | @ApiParam(value = "内容") @RequestParam(required = false) String nr, |
| | | @ApiParam(value = "拼音码") @RequestParam(required = false) String pym, |
| | | @ApiParam(value = "页码") @RequestParam(defaultValue ="1") int page, |
| | | @ApiParam(value = "每页展示条数") @RequestParam(defaultValue ="10") int pageSize) { |
| | | LambdaQueryWrapper<TjAdvice> wq1 = new LambdaQueryWrapper<>(); |
| | | if(null !=proId){ |
| | | wq1.eq(TjAdvice::getProId, proId); |
| | | } |
| | | wq1.last("limit 20"); |
| | | List<TjAdvice> list = tjAdviceService.list(wq1); |
| | | if(null !=nr && !nr.isEmpty()){ |
| | | wq1.like(TjAdvice::getTitle,nr); |
| | | }else if (null !=pym && !pym.isEmpty()){ |
| | | wq1.like(TjAdvice::getTitle,pym); |
| | | } |
| | | // else { |
| | | // wq1.last("limit 20"); |
| | | // } |
| | | Page<TjAdvice> pages=new Page<>(page,pageSize); |
| | | Page<TjAdvice> advicePage = tjAdviceService.page(pages, wq1); |
| | | Map<String,Object> map=new HashMap<>(); |
| | | map.put("list",advicePage.getRecords()); |
| | | map.put("total",advicePage.getTotal()); |
| | | // List<TjAdvice> list = tjAdviceService.list(wq1); |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @GetMapping("/getAdviceByTjNumAndPro") |
| | | @ApiOperation(value = "根据项目id和体检号获取建议") |
| | | public AjaxResult getAdviceByTjNumAndPro(@ApiParam(value = "父项目项目id") @RequestParam String proId, |
| | | @ApiParam(value = "体检号") @RequestParam String tjNum) { |
| | | LambdaQueryWrapper<TjOrderRemark> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjOrderRemark::getProId, proId); |
| | | wq.eq(TjOrderRemark::getTjNumber,tjNum); |
| | | TjOrderRemark remark = remarkService.getOne(wq); |
| | | List<TjAdvice> list =null; |
| | | if (null != remark && !StringUtils.isBlank(remark.getSummary())) { |
| | | String[] strings = StringUtils.split(remark.getSummary(), ";"); |
| | | if(null !=strings && strings.length>0){ |
| | | list = tjAdviceService.getAdviceStringByIds(strings); |
| | | } |
| | | } |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取部门树列表 |
| | | */ |