| | |
| | | public R<List<TSysActivity>> listBanner() { |
| | | return R.ok(sysActivityService.list(Wrappers.lambdaQuery(TSysActivity.class) |
| | | .eq(TSysActivity::getStatus,1) |
| | | .eq(TSysActivity::getShowType,1) |
| | | .in(TSysActivity::getShowType,1,3) |
| | | .orderByDesc(TSysActivity::getCreateTime))); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "获取banner管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysBannerVO>> pageList(@RequestBody TSysBannerQuery query) { |
| | | query.setPort(1); |
| | | return R.ok(sysBannerService.pageList(query)); |
| | | } |
| | | |
| | |
| | | public R<List<TSysEducationalInfo>> listBanner() { |
| | | return R.ok(sysEducationalInfoService.list(Wrappers.lambdaQuery(TSysEducationalInfo.class) |
| | | .eq(TSysEducationalInfo::getStatus,1) |
| | | .eq(TSysEducationalInfo::getShowType,1) |
| | | .in(TSysEducationalInfo::getShowType,1,3) |
| | | .orderByDesc(TSysEducationalInfo::getCreateTime))); |
| | | } |
| | | |
| | |
| | | .eq(TSysInspection::getClinicId, crmClinic.getId()) |
| | | .orderByDesc(TSysInspection::getCreateTime) |
| | | .last("LIMIT 1")); |
| | | if(StringUtils.hasLength(sysInspection.getPrescriptionNumber())){ |
| | | // 生成处方编号 总共六位数字,不满6位前面补0 |
| | | String prescriptionNumber = sysInspection.getPrescriptionNumber(); |
| | | prescriptionNumber = prescriptionNumber.substring(prescriptionNumber.length() - 6); |
| | | prescriptionNumber = String.format("%06d", Integer.parseInt(prescriptionNumber) + 1); |
| | | dto.setPrescriptionNumber(prescriptionNumber); |
| | | dto.setHospitalizationNumber(prescriptionNumber); |
| | | }else{ |
| | | if(Objects.isNull(sysInspection)){ |
| | | dto.setPrescriptionNumber("000001"); |
| | | dto.setHospitalizationNumber("000001"); |
| | | }else { |
| | | if(StringUtils.hasLength(sysInspection.getPrescriptionNumber())){ |
| | | // 生成处方编号 总共六位数字,不满6位前面补0 |
| | | String prescriptionNumber = sysInspection.getPrescriptionNumber(); |
| | | prescriptionNumber = prescriptionNumber.substring(prescriptionNumber.length() - 6); |
| | | prescriptionNumber = String.format("%06d", Integer.parseInt(prescriptionNumber) + 1); |
| | | dto.setPrescriptionNumber(prescriptionNumber); |
| | | dto.setHospitalizationNumber(prescriptionNumber); |
| | | }else{ |
| | | dto.setPrescriptionNumber("000001"); |
| | | dto.setHospitalizationNumber("000001"); |
| | | } |
| | | } |
| | | dto.setInspectionType(1); |
| | | sysInspectionService.save(dto); |
| | |
| | | public R<List<TSysProductIntroduction>> listBanner() { |
| | | return R.ok(sysProductIntroductionService.list(Wrappers.lambdaQuery(TSysProductIntroduction.class) |
| | | .eq(TSysProductIntroduction::getStatus,1) |
| | | .eq(TSysProductIntroduction::getShowType,1) |
| | | .in(TSysProductIntroduction::getShowType,1,3) |
| | | .orderByDesc(TSysProductIntroduction::getCreateTime))); |
| | | } |
| | | |
| | |
| | | String inputFile = new File(filePath, fileName).getAbsolutePath(); |
| | | String outputDir = new File(filePath, "pdf").getAbsolutePath(); |
| | | |
| | | log.info("开始转换文件:{}", inputFile); |
| | | // 创建输出目录 |
| | | new File(outputDir).mkdirs(); |
| | | |
| | |
| | | |
| | | // 创建进程构建器 |
| | | ProcessBuilder pb = new ProcessBuilder(command); |
| | | log.info("执行命令:{}", command); |
| | | |
| | | // 设置环境变量 |
| | | Map<String, String> env = pb.environment(); |
| | | env.put("LC_ALL", "zh_CN.UTF-8"); |
| | | env.put("LANG", "zh_CN.UTF-8"); |
| | | env.put("LANGUAGE", "zh_CN.UTF-8"); |
| | | |
| | | log.info("环境变量:{}", env); |
| | | // 重定向错误流到标准输出 |
| | | pb.redirectErrorStream(true); |
| | | |
| | | log.info("启动进程"); |
| | | // 启动进程 |
| | | Process process = pb.start(); |
| | | |
| | | log.info("等待进程完成"); |
| | | // 读取输出 |
| | | StringBuilder output = new StringBuilder(); |
| | | try (BufferedReader reader = new BufferedReader( |
| | |
| | | String line; |
| | | while ((line = reader.readLine()) != null) { |
| | | output.append(line).append("\n"); |
| | | System.out.println(line); |
| | | } |
| | | } |
| | | |
| | | log.info("进程完成,输出:{}", output); |
| | | // 等待进程完成,设置超时 |
| | | if (!process.waitFor(120, TimeUnit.SECONDS)) { |
| | | process.destroyForcibly(); |
| | | throw new RuntimeException("转换超时"); |
| | | } |
| | | |
| | | log.info("进程完成,退出码"); |
| | | int exitCode = process.exitValue(); |
| | | if (exitCode != 0) { |
| | | throw new RuntimeException("转换失败,退出码:" + exitCode + "\n输出:" + output); |
| | | } |
| | | |
| | | log.info("进程完成,退出码:{}", exitCode); |
| | | // 检查生成的PDF文件 |
| | | String pdfFileName = fileName.substring(0, fileName.lastIndexOf(".")) + ".pdf"; |
| | | File pdfFile = new File(outputDir, pdfFileName); |
| | | |
| | | log.info("PDF文件:{}", pdfFile); |
| | | if (!pdfFile.exists() || pdfFile.length() == 0) { |
| | | throw new RuntimeException("PDF文件未生成或为空"); |
| | | } |
| | | String absolutePath = pdfFile.getAbsolutePath(); |
| | | |
| | | log.info("PDF文件绝对路径:{}", absolutePath); |
| | | MultipartFile file = convertFileToMultipartFile(pdfFile); |
| | | log.info("PDF文件转换完成"); |
| | | // String s = tencentCosUtil.upLoadFile(multipartFile,"/wordToPdf"); |
| | | String url = ObsUploadUtil.obsUpload(file); |
| | | log.info("PDF文件上传完成"); |
| | | return url; |
| | | |
| | | } catch (Exception e) { |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.UUID; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | if(sysAppUser != null){ |
| | | sysInspection.setAppUserId(sysAppUser.getId()); |
| | | sysInspection.setClinicId(sysAppUser.getClinicId()); |
| | | }else { |
| | | sysAppUser = new TSysAppUser(); |
| | | sysAppUser.setPhone(phone); |
| | | String identifierNumber = UUID.randomUUID().toString().replace("-", ""); |
| | | sysAppUser.setIdentifierNumber(identifierNumber); |
| | | sysAppUser.setNickName(user_name); |
| | | sysAppUser.setSex("男".equals(sex) ? 1 : 2); |
| | | } |
| | | |
| | | sysInspectionService.save(sysInspection); |
| | |
| | | } |
| | | } |
| | | } |
| | | sysAppUserService.updateById(sysAppUser); |
| | | sysAppUserService.saveOrUpdate(sysAppUser); |
| | | sysInspectionRiskEstimateService.saveBatch(sysInspectionRiskEstimates); |
| | | |
| | | JSONObject response = new JSONObject(); |
| | |
| | | @ApiOperation(value = "获取banner管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TSysBannerVO>> pageList(@RequestBody TSysBannerQuery query) { |
| | | query.setPort(2); |
| | | return R.ok(sysBannerService.pageList(query)); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "获取banner管理列表") |
| | | @PostMapping(value = "/list") |
| | | public R<List<TSysBanner>> list() { |
| | | return R.ok(sysBannerService.list(Wrappers.lambdaQuery(TSysBanner.class).orderByDesc(TSysBanner::getCreateTime))); |
| | | return R.ok(sysBannerService.list(Wrappers.lambdaQuery(TSysBanner.class) |
| | | .eq(TSysBanner::getPort,2) |
| | | .orderByDesc(TSysBanner::getCreateTime))); |
| | | } |
| | | |
| | | /** |
| | |
| | | # 微信支付公钥id |
| | | publicKeyId: PUB_KEY_ID_0117217579152025091800181718000000 |
| | | # 微信支付公钥证书 |
| | | publicKeyPath: /usr/local/project/cert/weixin/apiclient_cert.pem |
| | | publicKeyPath: /usr/local/project/cert/weixin/pub_key.pem |
| | | # 证书序列号 |
| | | mchSerialNo: 39C7F6152E38A62B5786634D5C1F984FB5A38AD5 |
| | | # 支付成功回调地址 |
| | |
| | | @ApiModelProperty(value = " banner名称") |
| | | private String bannerName; |
| | | |
| | | @ApiModelProperty(value = " 2.0新增字段 端口 1诊所 2患者") |
| | | private Integer port; |
| | | |
| | | } |
| | |
| | | if(suppliers.isEmpty()){ |
| | | return pageInfo; |
| | | } |
| | | |
| | | |
| | | PageInfo<TErpGoods> p = erpGoodsMapper.selectPage(pageInfo, new LambdaQueryWrapper<TErpGoods>().eq(TErpGoods::getState,1).eq(TErpGoods::getGoodsSource, 1).in(TErpGoods::getSupplierClinicId, suppliers.stream().map(TCrmSupplier::getId).collect(Collectors.toList())).isNotNull(TErpGoods::getClinicPurchasePrice).orderByDesc(BaseModel::getCreateTime)); |
| | | PageInfo<TErpGoods> p = erpGoodsMapper.selectPage(pageInfo, new LambdaQueryWrapper<TErpGoods>() |
| | | .like(StringUtils.isNotBlank(query.getGoodsName()), TErpGoods::getGoodsName, query.getGoodsName()) |
| | | .like(StringUtils.isNotBlank(query.getGoodsIdCode()), TErpGoods::getGoodsIdCode, query.getGoodsIdCode()) |
| | | .like(StringUtils.isNotBlank(query.getQuasiNumber()), TErpGoods::getQuasiNumber, query.getQuasiNumber()) |
| | | .eq(StringUtils.isNotBlank(query.getTypeId()),TErpGoods::getTypeId, query.getTypeId()) |
| | | .eq(TErpGoods::getState,1) |
| | | .eq(TErpGoods::getGoodsSource, 1) |
| | | .in(TErpGoods::getSupplierClinicId, suppliers.stream().map(TCrmSupplier::getId).collect(Collectors.toList())) |
| | | .isNotNull(TErpGoods::getClinicPurchasePrice) |
| | | .orderByDesc(BaseModel::getCreateTime)); |
| | | List<TErpGoods> list = p.getRecords(); |
| | | |
| | | List<String> typeIds = list.stream().map(TErpGoods::getTypeId).collect(Collectors.toList()); |
| | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public List<DetectionPaymentReportVO> exportDetectionPaymentReport(DetectionPaymentReportQuery query) { |
| | | List<DetectionPaymentReportVO> list = this.baseMapper.exportDetectionPaymentReport(query); |
| | | for (DetectionPaymentReportVO detectionPaymentReportVO : list) { |
| | | String payTimeStr = new SimpleDateFormat("yyyy-MM-dd").format(detectionPaymentReportVO.getPayTime()); |
| | | detectionPaymentReportVO.setPayTimeStr(payTimeStr); |
| | | if(Objects.nonNull(detectionPaymentReportVO.getPayTime())){ |
| | | String payTimeStr = detectionPaymentReportVO.getPayTime().toLocalDate().toString(); |
| | | detectionPaymentReportVO.setPayTimeStr(payTimeStr); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | |
| | | <if test="query.bannerName != null and query.bannerName != ''"> |
| | | and banner_name like concat('%',#{query.bannerName},'%') |
| | | </if> |
| | | <if test="query.port != null"> |
| | | and port = #{query.port} |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |