|
@@ -275,19 +275,28 @@ public class PrescriptionImageServiceImpl implements PrescriptionImageService {
|
|
|
* @param param
|
|
* @param param
|
|
|
*/
|
|
*/
|
|
|
private void drawDoctorNoAndDoctorTitle(Graphics2D pen, PrescribeXyImgParam 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);
|
|
drawMultiLineText(pen, param.getDoctorNo(), x, y, maxWidth);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(param.getDoctorTitle())) {
|
|
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);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|