Sfoglia il codice sorgente

coding:药师审核

zhangqin 3 giorni fa
parent
commit
a332d26269

+ 2 - 2
fs-common/src/main/java/com/fs/common/utils/ThumbnailatorWatermark.java

@@ -34,8 +34,8 @@ public class ThumbnailatorWatermark {
             InputStream watermarkInputStream = watermarkURL.openStream();
             BufferedImage watermarkImage = ImageIO.read(watermarkInputStream);
             // 缩放水印
-            // 2. 计算并缩放水印图尺寸 (例如:缩放到原图宽度的1/4)
-            int newWatermarkWidth = watermarkImage.getWidth() / 4;
+            // 2. 计算并缩放水印图尺寸 (例如:缩放到原图宽度的1/8)
+            int newWatermarkWidth = watermarkImage.getWidth() / 8;
             // 按水印图原比例计算高度
             int newWatermarkHeight = (int) ((double) newWatermarkWidth / watermarkImage.getWidth() * watermarkImage.getHeight());
             BufferedImage scaledWatermark = Thumbnails.of(watermarkImage)

+ 1 - 1
fs-service/src/main/java/com/fs/his/mapper/FsDoctorMapper.java

@@ -221,6 +221,6 @@ public interface FsDoctorMapper
      */
     List<FsDoctorListUVO> getFsDoctorListUVOListByIds(@Param("doctorIds") List<Long> doctorIds);
 
-    @Select("SELECT * FROM fs_doctor WHERE store_id=#{storeId} and doctor_type = 2 and  `status`=1 and is_audit=1  ORDER BY RAND() LIMIT 1; ")
+    @Select("SELECT * FROM fs_doctor WHERE store_id=#{storeId} and doctor_type = 2 and  `status`=1 and is_audit=1 and sign_url is not null ORDER BY RAND() LIMIT 1; ")
     FsDoctor findByStoreId(@Param("storeId") Long storeId);
 }

+ 1 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsPrescribeServiceImpl.java

@@ -828,7 +828,7 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
         try {
             // 处方添加水印
             CloudStorageService storage = OSSFactory.build();
-            String url = storage.uploadSuffix(ThumbnailatorWatermark.addWatermarkToNetworkImage(prescribe.getDstFilePath(),configService.selectConfigByKey("his.prescription.url"),doctor.getDoctorName()), ".jpg");
+            String url = storage.uploadSuffix(ThumbnailatorWatermark.addWatermarkToNetworkImage(prescribe.getDstFilePath(),configService.selectConfigByKey("his.prescription.url"),doctor.getSignUrl()), ".jpg");
             prescribe.setDstFilePath(url);
         } catch (IOException e) {
         }