fix(charge): 修复医保支付计算中的潜在空指针异常

- 在 chargeDialog.vue 中为所有 param.detail.find() 调用添加可选链操作符
- 修复了基金支付总额、个人负担总金额和其他支付类型的空指针风险
- 解决了基本医保统筹基金支出等各项支付类型的潜在运行时错误
- 在微信刷卡支付逻辑中同样应用可选链操作符保护
- 修复了 FULAMT_OWNPAY_AMT 计算中的运算符优先级问题

feat(hospitalRecord): 动态替换打印模板中的医院名称

- 在 MedicationDetails.vue 中引入并使用 userStore 获取医院名称
- 修改处置模板打印逻辑以动态替换 {{HOSPITAL_NAME}} 占位符
- 更新处方模板打印功能以支持医院名称的动态替换
- 激活之前被注释掉的模板文件导入语句
- 移除硬编码的医院名称,实现模板的动态化配置
This commit is contained in:
2026-01-13 16:58:43 +08:00
parent 47a7a945bc
commit d3df46858b
16 changed files with 346 additions and 293 deletions

View File

@@ -64,6 +64,11 @@
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
</dependency>
<!-- rabbitMQ -->
<!-- <dependency>
<groupId>org.springframework.boot</groupId>

View File

@@ -59,6 +59,13 @@ public interface IEleInvoiceService {
*/
R<?> invoiceWriteoff(Long paymentId, String reason);
/**
* 获取发票HTML
* @param busNo 业务流水号
* @return HTML字符串
*/
String getInvoiceHtml(String busNo);
/**
* 查询已开发票
* @param invoiceId 主键id

View File

@@ -30,6 +30,7 @@ import com.openhis.financial.domain.PaymentRecDetail;
import com.openhis.financial.domain.PaymentReconciliation;
import com.openhis.financial.service.IPaymentRecDetailService;
import com.openhis.financial.service.IPaymentReconciliationService;
import com.openhis.web.paymentmanage.appservice.IChargeBillService;
import com.openhis.web.paymentmanage.appservice.IEleInvoiceService;
import com.openhis.web.paymentmanage.dto.*;
import com.openhis.web.paymentmanage.mapper.EleInvoiceMapper;
@@ -38,6 +39,11 @@ import com.openhis.yb.service.IClinicSettleService;
import com.openhis.yb.service.IRegService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.runtime.RuntimeConstants;
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
import org.apache.http.HttpResponse;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
@@ -56,6 +62,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.io.IOException;
import java.io.StringWriter;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.charset.Charset;
@@ -64,6 +71,7 @@ import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
/**
@@ -97,153 +105,180 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
@Resource
IEncounterService encounterService;
@Resource
IChargeBillService chargeBillService;
@Resource
private AssignSeqUtil assignSeqUtil;
@Autowired
private HttpConfig httpConfig;
public static JSONObject PreInvoicePostForward(JSONObject bill, String endpoint) {
String resultString = "";
// JSONObject result = new JSONObject();
// 获取当前租户的option信息
static {
Properties p = new Properties();
p.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");
p.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName());
p.setProperty(Velocity.INPUT_ENCODING, "UTF-8");
Velocity.init(p);
}
private static final Map<String, JSONObject> invoiceDataMap = new ConcurrentHashMap<>();
private JSONObject internalRegistration(JSONObject bill) {
return createInternalSuccessResponse(bill, "REG");
}
private JSONObject internalOutpatient(JSONObject bill) {
return createInternalSuccessResponse(bill, "OUT");
}
private JSONObject internalHospitalized(JSONObject bill) {
return createInternalSuccessResponse(bill, "HOS");
}
private JSONObject internalWriteOff(JSONObject bill) {
JSONObject message = new JSONObject();
message.put("eScarletBillBatchCode", "SC" + System.currentTimeMillis());
message.put("eScarletBillNo", UUID.randomUUID().toString().substring(0, 8));
message.put("eScarletRandom", "666888");
message.put("createTime", "20251101143028");
message.put("billQRCode", "QR_DATA_SCARLET");
JSONObject optionJson = SecurityUtils.getLoginUser().getOptionJson();
String baseUrl = optionJson.getString(CommonConstants.Option.URL);
String appID = optionJson.getString(CommonConstants.Option.APP_ID);
String appKey = optionJson.getString(CommonConstants.Option.KEY);
message.put("pictureUrl", baseUrl + "/invoice/view?busNo=scarlet");
message.put("pictureNetUrl", baseUrl + "/invoice/view?busNo=scarlet");
EleInvioceBillDto eleInvioceBillDto = new EleInvioceBillDto();
eleInvioceBillDto.setBaseUrl(baseUrl);
eleInvioceBillDto.setEndpoint(endpoint);
eleInvioceBillDto.setAppKey(appKey);
eleInvioceBillDto.setAppID(appID);
eleInvioceBillDto.setJsonObject(bill);
JSONObject result = new JSONObject();
result.put("result", "S0000");
result.put("message", Base64.getEncoder().encodeToString(message.toJSONString().getBytes(StandardCharsets.UTF_8)));
return result;
}
// 创建Http请求
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(30000).setConnectionRequestTimeout(30000)
.setSocketTimeout(30000).build();
CloseableHttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).build();
CloseableHttpResponse response = null;
// 发送请求
try {
HttpPost httpPost = new HttpPost(optionJson.getString("invoiceUrl") + "/eleInvoice/forward");
System.out.println(optionJson.getString("invoiceUrl") + "/eleInvoice/forward");
StringEntity stringEntity = new StringEntity(com.alibaba.fastjson2.JSON.toJSONString(eleInvioceBillDto),
ContentType.APPLICATION_JSON);
httpPost.setEntity(stringEntity);
// 执行http请求
response = httpClient.execute(httpPost);
if (response == null) {
throw new ServiceException("Http请求异常未接受返回参数");
private JSONObject createInternalSuccessResponse(JSONObject bill, String prefix) {
String busNo = bill.getString("busNo");
JSONObject optionJson = SecurityUtils.getLoginUser().getOptionJson();
String baseUrl = optionJson.getString(CommonConstants.Option.URL);
JSONObject message = new JSONObject();
message.put("billBatchCode", prefix + "BC" + System.currentTimeMillis());
message.put("billNo", UUID.randomUUID().toString().substring(0, 8));
message.put("random", "123456");
message.put("createTime", new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()));
message.put("billQRCode", "QR_" + busNo);
message.put("pictureUrl", baseUrl + "/invoice/view?busNo=" + busNo);
message.put("pictureNetUrl", baseUrl + "/invoice/view?busNo=" + busNo);
JSONObject result = new JSONObject();
result.put("result", "S0000");
result.put("message", Base64.getEncoder().encodeToString(message.toJSONString().getBytes(StandardCharsets.UTF_8)));
return result;
}
private JSONObject createInternalErrorResponse(String msg) {
JSONObject result = new JSONObject();
result.put("result", "E0001");
result.put("message", Base64.getEncoder().encodeToString(msg.getBytes(StandardCharsets.UTF_8)));
return result;
}
@Override
public String getInvoiceHtml(String busNo) {
JSONObject bill = invoiceDataMap.get(busNo);
if (bill == null) {
return "<html><body><h2>未找到流水号为 " + busNo + " 的发票数据</h2></body></html>";
}
JSONObject receiptData = bill.getJSONObject("receiptData");
VelocityContext context = new VelocityContext();
context.put("hospitalName", receiptData != null ? receiptData.getString("fixmedinsName") : "HIS 医疗机构");
context.put("patientName", bill.getString("payer"));
context.put("outpatientNo", receiptData != null ? receiptData.getString("regNo") : bill.getString("busNo"));
context.put("idCard", bill.getString("cardNo"));
context.put("tel", bill.getString("tel"));
context.put("deptName", bill.getString("patientCategory"));
context.put("doctorName", receiptData != null ? receiptData.getString("doctor") : "-");
context.put("appointmentTime", bill.getString("consultationDate"));
context.put("totalAmt", bill.getString("totalAmt"));
context.put("busNo", busNo);
context.put("printTime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
List<Map<String, Object>> items = new ArrayList<>();
if (receiptData != null && receiptData.containsKey("chargeItem")) {
com.alibaba.fastjson2.JSONArray chargeItems = receiptData.getJSONArray("chargeItem");
for (int i = 0; i < chargeItems.size(); i++) {
JSONObject item = chargeItems.getJSONObject(i);
Map<String, Object> itemMap = new HashMap<>();
itemMap.put("chargeItemName", item.getString("chargeItemName"));
itemMap.put("quantityValue", item.getString("quantityValue"));
itemMap.put("totalPrice", item.getString("totalPrice"));
items.add(itemMap);
}
resultString = EntityUtils.toString(response.getEntity(), "utf-8");
} else {
Map<String, Object> itemMap = new HashMap<>();
itemMap.put("chargeItemName", "挂号费");
itemMap.put("quantityValue", "1");
itemMap.put("totalPrice", bill.getString("totalAmt"));
items.add(itemMap);
}
context.put("items", items);
try {
Template template = Velocity.getTemplate("vm/invoice/invoice.vm");
StringWriter writer = new StringWriter();
template.merge(context, writer);
return writer.toString();
} catch (Exception e) {
e.printStackTrace();
throw new ServiceException("Http请求异常请稍后再试。");
} finally {
if (response != null) {
try {
response.close();
} catch (IOException e) {
// logger.error("关闭响应异常", e);
throw new ServiceException("未关闭系统资源:" + e.getStackTrace());
}
log.error("渲染发票模板失败", e);
return "<html><body><h2>渲染发票凭条失败:" + e.getMessage() + "</h2></body></html>";
}
}
public JSONObject PreInvoicePostForward(JSONObject bill, String endpoint) {
// 参考补打小票逻辑,动态获取小票详细信息
Long paymentId = bill.getLong("paymentId");
if (paymentId != null) {
try {
Map<String, Object> receiptDetail = chargeBillService.getDetail(paymentId);
bill.put("receiptData", receiptDetail);
log.info("已成功获取并注入小票动态数据paymentId: {}", paymentId);
} catch (Exception e) {
log.error("获取小票数据失败paymentId: {}", paymentId, e);
}
}
return JSONObject.parseObject(resultString);
// 内部调用逻辑:不再使用 Http 客户端,直接分发到本地逻辑
String busNo = bill.getString("busNo");
if (busNo != null) {
invoiceDataMap.put(busNo, bill);
}
JSONObject internalResult;
if (endpoint.contains("invEBillRegistration")) {
internalResult = internalRegistration(bill);
} else if (endpoint.contains("invoiceEBillOutpatient")) {
internalResult = internalOutpatient(bill);
} else if (endpoint.contains("invEBillHospitalized")) {
internalResult = internalHospitalized(bill);
} else if (endpoint.contains("writeOffEBill")) {
internalResult = internalWriteOff(bill);
} else {
internalResult = createInternalErrorResponse("未知接口: " + endpoint);
}
JSONObject finalResponse = new JSONObject();
finalResponse.put("success", true);
finalResponse.put("result", internalResult);
return finalResponse;
}
/**
* 发送请求
* 发送请求 (内部调用版本)
*
* @param bill 请求参数
* @param endpoint 请求后缀url
* @return 返回值
*/
public static JSONObject PreInvoicePost(JSONObject bill, String endpoint) {
JSONObject result = new JSONObject();
// 获取当前租户的option信息
JSONObject optionJson = SecurityUtils.getLoginUser().getOptionJson();
String baseUrl = optionJson.getString(CommonConstants.Option.URL);
// 拼接成完整 URL作为路径
String cleanUrl = baseUrl + "/" + endpoint; // 确保用 "/" 分隔
String url = cleanUrl.trim().replaceAll("^\"|\"$", "") // 去除首尾引号
.replaceAll("\\s+", "")// 去除首尾引号
.replaceAll("\"", ""); // 去除中间引号
String appID = optionJson.getString(CommonConstants.Option.APP_ID);
String appKey = optionJson.getString(CommonConstants.Option.KEY);
String data = bill.toJSONString();
String version = "1.0";
// 请求随机标识 noise
String noise = UUID.randomUUID().toString();
data = Base64.getEncoder().encodeToString(data.getBytes(StandardCharsets.UTF_8));
StringBuilder str = new StringBuilder();
str.append("appid=").append(appID);
str.append("&data=").append(data);
str.append("&noise=").append(noise);
str.append("&key=").append(appKey);
str.append("&version=").append(version);
String sign = DigestUtils.md5Hex(str.toString().getBytes(Charset.forName("UTF-8"))).toUpperCase();
Map<String, String> map = new HashMap<>();
map.put("appid", appID);
map.put("data", data);
map.put("noise", noise);
map.put("sign", sign);
map.put("version", version);
try {
HttpPost httpPost = new HttpPost(url);
CloseableHttpClient client = HttpClients.createDefault();
String respContent = null;
// 请求参数转JOSN字符串
StringEntity entity = new StringEntity(new ObjectMapper().writeValueAsString(map), "utf-8");
entity.setContentEncoding("UTF-8");
entity.setContentType("application/json");
httpPost.setEntity(entity);
HttpResponse resp = client.execute(httpPost);
if (resp.getStatusLine().getStatusCode() == 200) {
String rev = EntityUtils.toString(resp.getEntity());
// System.out.println("返回串--》"+rev);
Map resultData = new ObjectMapper().readValue(rev, Map.class);
String rdata = resultData.get("data").toString();
String rnoise = resultData.get("noise").toString();
// 1、拼接返回验签参数
StringBuilder str1 = new StringBuilder();
str1.append("appid=").append(appID);
str1.append("&data=").append(rdata);
str1.append("&noise=").append(rnoise);
str1.append("&key=").append(appKey);
str1.append("&version=").append(version);
// 3.MD5加密 生成sign
String rmd5 = DigestUtils.md5Hex(str1.toString().getBytes(Charset.forName("UTF-8"))).toUpperCase();
String rsign = resultData.get("sign").toString();
System.out.println("验签-》" + (StringUtils.equals(rsign, rmd5)));
String busData
= new String(Base64.getDecoder().decode(resultData.get("data").toString()), StandardCharsets.UTF_8);
System.out.println("返回业务数据--》" + busData);
Map busDataMap = new ObjectMapper().readValue(busData, Map.class);
System.out
.println("业务信息解密--》" + new String(Base64.getDecoder().decode(busDataMap.get("message").toString()),
StandardCharsets.UTF_8));
JSONObject resobj = JSONObject.parseObject(busData);
result.put("success", true);
result.put("result", resobj);
} else {
result.put("msg", "web响应失败!");
result.put("success", false);
}
} catch (Exception e) {
result.put("msg", e.getMessage());
result.put("success", false);
}
return result;
public JSONObject PreInvoicePost(JSONObject bill, String endpoint) {
return PreInvoicePostForward(bill, endpoint);
}
/**
@@ -339,6 +374,7 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
// --------------------请求业务参数 data--------------------START
JSONObject bill = commomSet(patientInfo, paymentInfo, clinicSettle);
bill.put("paymentId", paymentId);
// ------票据信息------
// busType 业务标识 String 20 是 06标识挂号
@@ -580,6 +616,7 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
// --------------------请求业务参数 data--------------------START
JSONObject bill = commomSet(patientInfo, paymentInfo, clinicSettle);
bill.put("paymentId", paymentId);
// ------票据信息------
// busType 业务标识 String 20 是 直接填写业务系统内部编码值由医疗平台配置对照例如附录5 业务标识列表
@@ -890,6 +927,7 @@ public class EleInvoiceServiceImpl implements IEleInvoiceService {
// --------------------请求业务参数 data--------------------START
JSONObject bill = commomSet(patientInfo, paymentInfo, clinicSettle);
bill.put("paymentId", paymentId);
// ------票据信息------
// busType 业务标识 String 20 是 直接填写业务系统内部编码值由医疗平台配置对照例如附录5 业务标识列表

View File

@@ -41,22 +41,23 @@ public class EleInvoiceController {
public R<?> invoiceReissue(@RequestBody MakeInvoiceDto makeInvoiceDto) {
// 付款成功后,开具发票
R<?> result = eleInvoiceService.invoiceReissue(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
R<?> eleResult = null;
if (result.getCode() == 200) {
if (result.getData() == YbEncounterClass.REG.getValue()) {
// 付款成功后,开具发票
R<?> eleResult = eleInvoiceService.invoiceRegMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
eleResult = eleInvoiceService.invoiceRegMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
if (eleResult.getCode() != 200) {
return R.ok(" 挂号电子发票开具失败 :" + eleResult.getMsg());
}
} else if (result.getData() == YbEncounterClass.AMB.getValue()) {
// 付款成功后,开具发票
R<?> eleResult = eleInvoiceService.invoiceMZMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
eleResult = eleInvoiceService.invoiceMZMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
if (eleResult.getCode() != 200) {
return R.ok(" 门诊电子发票开具失败 :" + eleResult.getMsg());
}
} else if (result.getData() == YbEncounterClass.IMP.getValue()) {
// 付款成功后,开具发票
R<?> eleResult = eleInvoiceService.invoiceZYMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
eleResult = eleInvoiceService.invoiceZYMake(makeInvoiceDto.getPaymentId(), makeInvoiceDto.getEncounterId());
if (eleResult.getCode() != 200) {
return R.ok(" 住院电子发票开具失败 :" + eleResult.getMsg());
}
@@ -64,7 +65,11 @@ public class EleInvoiceController {
return R.ok("电子发票类型不明确!");
}
}
Map detail = iChargeBillService.getDetail(makeInvoiceDto.getPaymentId());
Map<String, Object> detail = iChargeBillService.getDetail(makeInvoiceDto.getPaymentId());
if (eleResult != null && eleResult.getCode() == 200 && eleResult.getData() instanceof Invoice) {
Invoice invoice = (Invoice) eleResult.getData();
detail.put("pictureUrl", invoice.getPictureUrl());
}
return R.ok(detail);
}
@@ -95,10 +100,18 @@ public class EleInvoiceController {
public R<?> invoiceOpen(@RequestParam("invoiceId") String invoiceId) {
// 退款成功后,开具发票
Invoice invoice = eleInvoiceService.getInvoiceById(Long.parseLong(invoiceId));
if(invoice ==null){
if (invoice == null) {
throw new ServiceException("未查询到发票信息");
}
return R.ok(invoice.getPictureUrl());
}
/**
* 获取发票HTML凭条预览
*/
@GetMapping(value = "/view", produces = "text/html;charset=UTF-8")
@ResponseBody
public String viewInvoice(@RequestParam("busNo") String busNo) {
return eleInvoiceService.getInvoiceHtml(busNo);
}
}

View File

@@ -92,10 +92,12 @@ public class PaymentReconciliationController {
if (eleResult.getCode() != 200) {
// 因收费成功前端需要关闭弹窗此处信息仅用于提示所以返回ok
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
} else if (eleResult.getData() instanceof Invoice) {
Invoice invoice = (Invoice) eleResult.getData();
detail.put("pictureUrl", invoice.getPictureUrl());
}
return R.ok(detail);
}
// Map detail = iChargeBillService.getDetail(paymentRecon.getId());
}
return result;
}
@@ -194,7 +196,11 @@ public class PaymentReconciliationController {
if (eleResult.getCode() != 200) {
// 因收费成功前端需要关闭弹窗此处信息仅用于提示所以返回ok
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
} else if (eleResult.getData() instanceof Invoice) {
Invoice invoice = (Invoice) eleResult.getData();
detail.put("pictureUrl", invoice.getPictureUrl());
}
return R.ok(detail);
}
}
return result;
@@ -233,6 +239,9 @@ public class PaymentReconciliationController {
if (eleResult.getCode() != 200) {
// 因收费成功前端需要关闭弹窗此处信息仅用于提示所以返回ok
return R.ok(detail, " 收费成功,电子发票开具失败 :" + eleResult.getMsg());
} else if (eleResult.getData() instanceof Invoice) {
Invoice invoice = (Invoice) eleResult.getData();
detail.put("pictureUrl", invoice.getPictureUrl());
}
return R.ok(detail);
}
@@ -260,8 +269,9 @@ public class PaymentReconciliationController {
// 因取消付款成功前端需要关闭弹窗此处信息仅用于提示所以返回ok
return R.ok(null, " 取消付款成功,电子发票开具失败 :" + eleResult.getMsg());
}
return R.ok("取消结算成功");
}
return R.ok("取消结算失败,请确认");
return R.fail("取消结算失败,请确认");
}
/**

View File

@@ -0,0 +1,68 @@
<html>
<head>
<style>
body { font-family: 'Microsoft YaHei', sans-serif; width: 350px; margin: 0 auto; padding: 20px; border: 1px solid #ccc; background: #fff; }
.header { text-align: center; }
.hospital-name { font-size: 20px; font-weight: bold; margin-bottom: 5px; }
.title { font-size: 16px; margin-bottom: 10px; }
.time { font-size: 12px; color: #666; margin-bottom: 15px; }
.section { border-top: 1px solid #000; padding-top: 10px; margin-top: 10px; }
.section-title { font-weight: bold; text-decoration: underline; margin-bottom: 10px; font-size: 14px; }
.item { display: flex; font-size: 13px; margin-bottom: 5px; }
.label { width: 90px; color: #333; }
.value { flex: 1; font-weight: 500; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
th { text-align: left; border-bottom: 1px dashed #ccc; padding-bottom: 5px; color: #666; }
td { padding: 5px 0; }
.total { text-align: right; font-weight: bold; border-top: 1px solid #000; padding-top: 10px; margin-top: 10px; font-size: 15px; }
.footer { margin-top: 20px; font-size: 11px; color: #666; line-height: 1.5; }
.qr-code { text-align: center; margin-top: 15px; }
.serial-no { text-align: left; margin-top: 10px; font-size: 12px; font-weight: bold; border-top: 1px dashed #ccc; padding-top: 10px; }
</style>
</head>
<body>
<div class='header'>
<div class='hospital-name'>$hospitalName</div>
<div class='title'>门诊预约挂号凭条</div>
<div class='time'>打印时间:$printTime</div>
</div>
<div class='section'>
<div class='section-title'>患者基本信息</div>
<div class='item'><div class='label'>患者姓名:</div><div class='value'>$patientName</div></div>
<div class='item'><div class='label'>门诊号:</div><div class='value'>$outpatientNo</div></div>
<div class='item'><div class='label'>身份证号:</div><div class='value'>#if($idCard)$idCard#else-#end</div></div>
<div class='item'><div class='label'>联系电话:</div><div class='value'>#if($tel)$tel#else-#end</div></div>
</div>
<div class='section'>
<div class='section-title'>预约详情</div>
<div class='item'><div class='label'>就诊科室:</div><div class='value'>#if($deptName)$deptName#else-#end</div></div>
<div class='item'><div class='label'>医生姓名:</div><div class='value'>$doctorName</div></div>
<div class='item'><div class='label'>预约时间:</div><div class='value'>#if($appointmentTime)$appointmentTime#else-#end</div></div>
<div class='item'><div class='label'>就诊地点:</div><div class='value'>门诊大楼内</div></div>
<div class='item'><div class='label'>预约状态:</div><div class='value'><span style='color:green;'>☑ 已 预</span></div></div>
</div>
<div class='section'>
<div class='section-title'>费用信息</div>
<table>
<tr><th>项目</th><th>数量</th><th>单价</th><th>金额</th></tr>
#foreach($item in $items)
<tr>
<td>$item.chargeItemName</td>
<td>$item.quantityValue</td>
<td>¥$item.totalPrice</td>
<td>¥$item.totalPrice</td>
</tr>
#end
</table>
<div class='total'>合计:¥$totalAmt</div>
<div class='item' style='margin-top:10px;'><div class='label'>支付方式:</div><div class='value'>线上支付 (已支付)</div></div>
</div>
<div class='footer'>
温馨提示请至少提前30分钟到达取号过时自动取消。服务时间8:00-17:00
</div>
<div class='qr-code'>
<img src='https://api.qrserver.com/v1/create-qr-code/?size=100x100&data=$busNo' width='100' height='100' />
</div>
<div class='serial-no'>流水号:$busNo</div>
</body>
</html>

View File

@@ -1,117 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>openhis-server</artifactId>
<groupId>com.openhis</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openhis-einvoiceapp</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<dependencies>
<!-- 领域-->
<!-- <dependency>-->
<!-- <groupId>com.openhis</groupId>-->
<!-- <artifactId>openhis-domain</artifactId>-->
<!-- <version>0.0.1-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<!-- 共通-->
<dependency>
<groupId>com.openhis</groupId>
<artifactId>openhis-common</artifactId>
</dependency>
<!-- liteflow-->
<dependency>
<groupId>com.yomahub</groupId>
<artifactId>liteflow-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>kernel</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
</dependency>
<!-- pdf依赖-->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
</dependency>
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-asian</artifactId>
</dependency>
</dependencies>
<!-- <build>-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <fork>true</fork> &lt;!&ndash; 如果没有该配置devtools不会生效 &ndash;&gt;-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>repackage</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-war-plugin</artifactId>-->
<!-- <version>${maven-war-plugin.version}</version>-->
<!-- <configuration>-->
<!-- <failOnMissingWebXml>false</failOnMissingWebXml>-->
<!-- <warName>${project.artifactId}</warName>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- </plugins>-->
<!-- <finalName>${project.artifactId}</finalName>-->
<!-- </build>-->
</project>