|
@@ -4,6 +4,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import thyyxxk.wxservice_server.config.exception.ExceptionEnum;
|
|
|
+import thyyxxk.wxservice_server.config.properties.YmlConfig;
|
|
|
import thyyxxk.wxservice_server.constant.medins.Insutype;
|
|
|
import thyyxxk.wxservice_server.constant.medins.MedType;
|
|
|
import thyyxxk.wxservice_server.dao.PayMzFeeDao;
|
|
@@ -27,12 +28,14 @@ public class PayMzFeeService {
|
|
|
private final ElectronicHealthCardService healthCardService;
|
|
|
private final ThmzService thmzService;
|
|
|
private final PayMzFeeDao dao;
|
|
|
+ private final YmlConfig config;
|
|
|
|
|
|
@Autowired
|
|
|
- public PayMzFeeService(ElectronicHealthCardService healthCardService, ThmzService thmzService, PayMzFeeDao dao) {
|
|
|
+ public PayMzFeeService(ElectronicHealthCardService healthCardService, ThmzService thmzService, PayMzFeeDao dao, YmlConfig config) {
|
|
|
this.healthCardService = healthCardService;
|
|
|
this.thmzService = thmzService;
|
|
|
this.dao = dao;
|
|
|
+ this.config = config;
|
|
|
}
|
|
|
|
|
|
public ResultVo<List<Map<String, Object>>> getUnPaidFee(String patientId) {
|
|
@@ -89,6 +92,13 @@ public class PayMzFeeService {
|
|
|
QueryDzfpRequest request = QueryDzfpRequest.builder()
|
|
|
.patientId(patNo).times(times).receiptNo(receiptNum)
|
|
|
.typeFlag(QueryDzfpRequest.Type.MZLZ).build();
|
|
|
- return thmzService.queryInvoiceFile(request);
|
|
|
+
|
|
|
+ ResultVo<String> res = thmzService.queryInvoiceFile(request);
|
|
|
+ if (res.getCode() == ExceptionEnum.SUCCESS.getCode()) {
|
|
|
+ String filename = res.getData();
|
|
|
+ dao.insertWx2del(filename, config.getDzfpdir() + "/" + filename);
|
|
|
+ res.setData(config.getDzfpurl() + "/" + filename);
|
|
|
+ }
|
|
|
+ return res;
|
|
|
}
|
|
|
}
|