Przeglądaj źródła

益寿缘-优化处方生成逻辑

cgp 3 tygodni temu
rodzic
commit
63d9131c00

+ 6 - 1
fs-service/src/main/java/com/fs/his/param/PrescribeXyImgParam.java

@@ -70,10 +70,15 @@ public class PrescribeXyImgParam {
     private String drugDoctorUrl;
 
     /**
-     * 证号
+     * 医师证号
      */
     private String doctorNo;
 
+    /**
+     * 执业证号
+     */
+    private String jobLicenseNumber;
+
     /**
      * 医生职称
      */

+ 18 - 9
fs-service/src/main/java/com/fs/his/service/impl/PrescriptionImageServiceImpl.java

@@ -275,19 +275,28 @@ public class PrescriptionImageServiceImpl implements PrescriptionImageService {
      * @param param
      */
     private void drawDoctorNoAndDoctorTitle(Graphics2D pen, PrescribeXyImgParam param) {
-
-        if (StringUtils.isNotBlank(param.getDoctorNo())) {
-            int x = 890;
-            int y = 1892;
-            int maxWidth = 760;
+        int x = 890;
+        int y = 1892;
+        int maxWidth = 760;
+        int titleX = 690;
+        // 优先绘制执业证号,没有就绘制医生证号
+        if (StringUtils.isNotBlank(param.getJobLicenseNumber())) {
+            //绘制标题
+            drawMultiLineText(pen, "执业证号", titleX, y, maxWidth);
+            //绘制证内容
+            drawMultiLineText(pen, param.getJobLicenseNumber(), x, y, maxWidth);
+        } else {
+            //绘制标题
+            drawMultiLineText(pen, "医生证号", titleX, y, maxWidth);
+            //绘制内容
             drawMultiLineText(pen, param.getDoctorNo(), x, y, maxWidth);
         }
 
         if (StringUtils.isNotBlank(param.getDoctorTitle())) {
-            int x = 302;
-            int y = 2078;
-            int maxWidth = 760;
-            drawMultiLineText(pen, param.getDoctorTitle(), x, y, maxWidth);
+            int x2 = 302;
+            int y2 = 2078;
+            int maxWidth2 = 760;
+            drawMultiLineText(pen, param.getDoctorTitle(), x2, y2, maxWidth2);
         }
     }