| | |
| | | this.transactionManager = transactionManager; |
| | | } |
| | | |
| | | /** 分页查询诊所。 */ |
| | | public PageResponse<ClinicListItemVO> page(int page, |
| | | int pageSize, |
| | | String regionCode, |
| | |
| | | return PageResponse.of(list, result.getTotal(), result.getCurrent(), result.getSize()); |
| | | } |
| | | |
| | | /** 下载诊所代理导入模板。 */ |
| | | public void downloadClinicImportTemplate(HttpServletResponse response) throws IOException { |
| | | response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); |
| | | response.setCharacterEncoding("utf-8"); |
| | |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | /** 批量导入诊所与代理绑定关系。 */ |
| | | public void importAgentBindings(MultipartFile file) throws IOException { |
| | | if (file == null || file.isEmpty()) { |
| | | throw new IllegalArgumentException("请选择导入文件"); |
| | |
| | | } |
| | | } |
| | | |
| | | /** 导出诊所列表。 */ |
| | | public void export(String regionCode, |
| | | String name, |
| | | String phone, |
| | |
| | | .doWrite(exports); |
| | | } |
| | | |
| | | /** 查询诊所区域选项。 */ |
| | | public List<ClinicRegionOptionVO> regionOptions() { |
| | | List<ClinicRegionOptionRow> rows = clinicQueryMapper.selectRegionOptions(); |
| | | List<ClinicRegionOptionVO> list = new ArrayList<ClinicRegionOptionVO>(); |
| | |
| | | return list; |
| | | } |
| | | |
| | | /** 查询诊所详情。 */ |
| | | public ClinicDetailVO detail(Long id) { |
| | | ClinicDetailRow row = clinicQueryMapper.selectClinicDetail(id); |
| | | if (row == null) { |
| | |
| | | return vo; |
| | | } |
| | | |
| | | /** 更新诊所银行账户信息。 */ |
| | | public ClinicDetailVO updateBankAccount(Long id, ClinicBankAccountUpdateRequest request) { |
| | | // 手动开启事务 |
| | | DefaultTransactionDefinition def = new DefaultTransactionDefinition(); |
| | |
| | | return region == null ? trimToNull(fallback) : region.getName(); |
| | | } |
| | | |
| | | /** 分页查询诊所绑定用户。 */ |
| | | public PageResponse<ClinicBoundUserItemVO> clinicUsers(Long clinicId, |
| | | int page, |
| | | int pageSize, |