| | |
| | | private LtkjHysqdService ltkjHysqdService; |
| | | |
| | | |
| | | |
| | | @GetMapping("/getOperationPermissionsByTjNum") |
| | | @ApiOperation(value = "(初审页面 和 医生页面)根据体检号获取是否可操作权限接口 true可操作 反之不可") |
| | | public AjaxResult getOperationPermissionsByTjNum(@ApiParam(value = "体检号") @RequestParam String tjNumber) { |
| | |
| | | confirmLog.setTjNum(tjNumber); |
| | | confirmLog.setStatus(status); |
| | | confirmLogService.save(confirmLog); |
| | | asyncService.wCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, 0, null, null, null)); |
| | | asyncService.yCScheckSetCustomerLisByRedis(orderService.getCsTjOrderList(tjNumber, 1, null, null, null)); |
| | | return AjaxResult.success("操作成功"); |
| | | } |
| | | return AjaxResult.error("操作失败"); |
| | |
| | | |
| | | |
| | | /** |
| | | * 同步数据接口 |
| | | * 同步sql server数据到本地数据库数据接口 |
| | | */ |
| | | @GetMapping("/dataSynchronization") |
| | | @ApiOperation(value = "同步数据接口") |
| | | @Transactional |
| | | @ApiOperation(value = "同步sql server数据到本地数据库数据接口") |
| | | public AjaxResult dataSynchronization(@RequestParam String tjNumber){ |
| | | List<LtkjHysqd> one = testMapper.getHysqdByTmh(tjNumber); |
| | | if (one!=null){ |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | for (LtkjHysqd hysqd : one) { |
| | | ltkjHysqdService.save(hysqd); |
| | | |
| | | List<LtkjHybgd> one1 = testMapper.getHybgdByTmh(hysqd.getTmh()); |
| | | ltkjHysqdService.saveBatch(one); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | for (LtkjHysqd ltkjHysqd : one) { |
| | | List<LtkjHybgd> one1 = testMapper.getHybgdByTmh(ltkjHysqd.getTmh()); |
| | | if (one1!=null){ |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | for (LtkjHybgd hybgd : one1) { |
| | | ltkjHybgdService.save(hybgd); |
| | | } |
| | | ltkjHybgdService.saveBatch(one1); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | } |
| | | } |
| | | |
| | | List<LtkjExamJcsqd> one2 = testMapper.getExamJcsqdTmh(tjNumber); |
| | | if (one2!=null){ |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | for (LtkjExamJcsqd examJcsqd : one2) { |
| | | ltkjExamJcsqdService.save(examJcsqd); |
| | | |
| | | List<LtkjExamJcbgd> one3 = testMapper.getExamJcbgdByTjh(examJcsqd.getTmh()); |
| | | ltkjExamJcsqdService.saveBatch(one2); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | for (LtkjExamJcsqd ltkjExamJcsqd : one2) { |
| | | List<LtkjExamJcbgd> one3 = testMapper.getExamJcbgdByTjh(ltkjExamJcsqd.getTmh()); |
| | | if (one3!=null){ |
| | | DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.MASTER.name()); |
| | | for (LtkjExamJcbgd examJcbgd : one3) { |
| | | ltkjExamJcbgdService.save(examJcbgd); |
| | | } |
| | | ltkjExamJcbgdService.saveBatch(one3); |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | } |
| | | DynamicDataSourceContextHolder.clearDataSourceType(); |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
| | | |
| | | |
| | | return AjaxResult.success("同步成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询体检记录客户列表 |