Browse Source

电子处方PDF优化

lighter 10 months ago
parent
commit
54dfe3aa4a

+ 2 - 1
src/main/java/thyyxxk/simzfeeoprnsystm/dao/RxDao.java

@@ -11,7 +11,8 @@ import java.util.List;
 @Mapper
 public interface RxDao {
 
-    @Select("select rtrim(code) from a_employee_mi where yb_code=#{ybCode}")
+    @Select("select top 1 rtrim(code) from a_employee_mi " +
+            "where yb_code=#{ybCode} and isnull(del_flag,'0')!='1'")
     String getDoctorHisCode(String ybCode);
 
     @Select("select rtrim(yb_code) as ybCode,rtrim(name) as name from a_employee_mi where code=#{code}")

+ 8 - 7
src/main/java/thyyxxk/simzfeeoprnsystm/service/DigitalReceiptService.java

@@ -318,7 +318,7 @@ public class DigitalReceiptService {
 
     private Paragraph getTitleParagraph(Font font) {
         Paragraph titleParagraph = new Paragraph();
-        Chunk titleChunkLine = new Chunk("长 沙 泰 和 医 院 处 方 笺");
+        Chunk titleChunkLine = new Chunk("长 沙 泰 和 医 院 外 配 药 品 处 方 笺");
         titleChunkLine.setFont(font);
         titleChunkLine.setTextRise(30);
         titleParagraph.add(titleChunkLine);
@@ -424,17 +424,18 @@ public class DigitalReceiptService {
     }
 
     private Image getStamp() throws BadElementException, IOException {
-        Image stamp = Image.getInstance("http://localhost:1100/transparentStamp.png");
-        stamp.scalePercent(40);
-        stamp.setAbsolutePosition(460, 680);
+        Image stamp = Image.getInstance("http://localhost:1100/stamp.png");
+        stamp.scalePercent(50);
+        int absoluteY = new Random().nextInt(20) + 630;
+        stamp.setAbsolutePosition(460, absoluteY);
         return stamp;
     }
 
     private Image getDoctorSign(String ybCode) throws BadElementException, IOException {
         String hisCode = rxDao.getDoctorHisCode(ybCode);
-        Image stamp = Image.getInstance("http://webhis.thyy.cn:8080/doctorSignatureImage/" + hisCode + ".png");
-        stamp.scalePercent(35);
-        return stamp;
+        Image signature = Image.getInstance("http://webhis.thyy.cn:8080/doctorSignatureImage/" + hisCode + ".png");
+        signature.scalePercent(35);
+        return signature;
     }
 
     private String translateGender(String gend) {

BIN
src/main/resources/static/stamp.png