Browse Source

适配最新的读卡插件。

lighter 3 years ago
parent
commit
15af410d98

+ 1 - 1
src/main/java/thyyxxk/webserver/entity/medicalinsurance/inpatient/ZyPatientInfo.java

@@ -53,7 +53,7 @@ public class ZyPatientInfo {
 
     private String mdtrtCertType;
     private String mdtrtCertNo;
-    private Object readCardResult;
+    private String readCardResult;
     private String readCardBizType;
 
     private Integer feeSize;

+ 4 - 4
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiZyService.java

@@ -97,14 +97,14 @@ public class SiZyService {
             MdtrtCertType mdtrtCertType = MdtrtCertType.getByLabel(p.getMdtrtCertType());
             admMdtrtinfo.setMdtrtCertType(mdtrtCertType.getCode());
             if (mdtrtCertType == MdtrtCertType.SOCIAL_SECURITY_CARD) {
-                String[] out = p.getReadCardResult().toString().split("\\|");
+                String[] out = p.getReadCardResult().split("\\|");
                 if (!p.getName().trim().equals(out[4].trim())) {
                     return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "社保卡姓名与HIS姓名不一致,请确认是否人证相符。");
                 }
                 admMdtrtinfo.setMdtrtCertNo(out[2]);
                 admMdtrtinfo.setCardSn(out[3]);
             } else if (mdtrtCertType == MdtrtCertType.MEDICAL_INSURANCE_ELECTRONIC_VOUCHER) {
-                JSONObject qrinfo = new JSONObject(FilterUtil.cast(p.getReadCardResult()));
+                JSONObject qrinfo = JSONObject.parseObject(p.getReadCardResult());
                 if (!p.getName().trim().equals(qrinfo.getString("userName").trim())) {
                     return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "电子医保凭证姓名与HIS姓名不一致,请确认是否人证相符。");
                 }
@@ -402,7 +402,7 @@ public class SiZyService {
             MdtrtCertType mdtrtCertType = MdtrtCertType.getByLabel(p.getMdtrtCertType());
             preSetlmt.setMdtrtCertType(mdtrtCertType.getCode());
             if (mdtrtCertType == MdtrtCertType.SOCIAL_SECURITY_CARD) {
-                String[] out = p.getReadCardResult().toString().split("\\|");
+                String[] out = p.getReadCardResult().split("\\|");
                 if (!p.getName().trim().equals(out[4].trim())) {
                     revokeDischarge(p);
                     return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "社保卡姓名与HIS姓名不一致,请确认是否人证相符。");
@@ -410,7 +410,7 @@ public class SiZyService {
                 preSetlmt.setMdtrtCertNo(out[2]);
                 preSetlmt.setCardSn(out[3]);
             } else if (mdtrtCertType == MdtrtCertType.MEDICAL_INSURANCE_ELECTRONIC_VOUCHER) {
-                JSONObject qrinfo = JSONObject.parseObject(p.getReadCardResult().toString());
+                JSONObject qrinfo = JSONObject.parseObject(p.getReadCardResult());
                 if (!p.getName().trim().equals(qrinfo.getString("userName").trim())) {
                     revokeDischarge(p);
                     return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "电子医保凭证姓名与HIS姓名不一致,请确认是否人证相符。");