| | |
| | | @ApiParam(value = "状态 0同意 1拒绝 默认同意") @RequestParam(defaultValue = "0") Integer status, |
| | | @ApiParam(value = "驳回理由") @RequestParam(required = false) String remark) { |
| | | int num = orderRemarkService.getTjYqOrderRemarkByTjNum(tjNumber); |
| | | if (num > 0) return AjaxResult.error("有延期项目暂不能审核!"); |
| | | if (num > 0) return AjaxResult.error("请先同步体检项目!"); |
| | | if (null != tjNumber) { |
| | | Long userId = Long.valueOf(SecurityUtils.getLoginUser().getUserId()); |
| | | SysUser sysUser = userService.getById(userId); |
| | |
| | | if (null != order) { |
| | | List<LtkjHysqd> one = testMapper.getHysqdByTmh(order.getCardId()); |
| | | if (one != null && one.size() > 0) { |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | ltkjHysqdService.saveBatch(one); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | for (LtkjHysqd ltkjHysqd : one) { |
| | | List<LtkjHybgd> one1 = testMapper.getHybgdByTmh(ltkjHysqd.getTmh()); |
| | | if (one1 != null && one1.size() > 0) { |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | ltkjHybgdService.saveBatch(one1); |
| | | // DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | LtkjHysqd hysqd = ltkjHysqdService.getLtkjHysqdByTjhAndTmh(ltkjHysqd.getTjh(), ltkjHysqd.getTmh()); |
| | | if(hysqd==null){ |
| | | ltkjHysqdService.save(ltkjHysqd); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | List<LtkjHybgd> one1 = testMapper.getHybgdByTmh(ltkjHysqd.getTmh()); |
| | | if (one1 != null && one1.size() > 0) { |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | ltkjHybgdService.saveBatch(one1); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | testMapper.updateDetailByCall(order.getCardId(), String.valueOf(order.getOrderId()),order.getTjNumber(),UserHoder.getLoginUser().getUserId()); |
| | | //同步检查项目 |
| | | testMapper.updateDetailByTjJcCall(order.getCardId(), String.valueOf(order.getOrderId()),order.getTjNumber(),UserHoder.getLoginUser().getUserId()); |
| | | asyncService.updateCheckType(order.getTjNumber()); |
| | | } |
| | | } |
| | | return AjaxResult.success("同步成功"); |
| | |
| | | @GetMapping("/updateCheckType") |
| | | @ApiOperation(value = "总检点击体检信息详情") |
| | | public AjaxResult updateCheckType(@ApiParam(value = "客户体检号") @RequestParam String tjNumber) { |
| | | if (redisCache.hasKey("updateCheckType" + tjNumber)) { |
| | | List<Map<String, Object>> cacheMapValue = redisCache.getCacheMapValue("updateCheckType" + tjNumber, tjNumber); |
| | | return AjaxResult.success(cacheMapValue); |
| | | } |
| | | // if (redisCache.hasKey("updateCheckType" + tjNumber)) { |
| | | // List<Map<String, Object>> cacheMapValue = redisCache.getCacheMapValue("updateCheckType" + tjNumber, tjNumber); |
| | | // return AjaxResult.success(cacheMapValue); |
| | | // } |
| | | return getAjaxResult(tjNumber); |
| | | } |
| | | |