lighter 2 лет назад
Родитель
Сommit
2724c9bc0a

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/api/forpowersi/drgdip/DrgDipDao.java

@@ -224,7 +224,7 @@ public interface DrgDipDao {
     int selectInHospCount(String patNo, int times);
 
     @Select("select " +
-            "cast(act_order_no as varchar) as mdclAdviceId, " +
+            "cast(cast(order_no as decimal) as varchar) as mdclAdviceId, " +
             "mdclAdviceType=case when frequ_code='ALWAYS' then '00' else '10' end, " +
             "rtrim(order_code) as mdclAdviceCode, " +
             "mdclAdviceSource=case when order_code='06054' then '3' else " +

+ 7 - 3
src/main/java/thyyxxk/webserver/service/inpatient/DismissService.java

@@ -12,6 +12,7 @@ import thyyxxk.webserver.config.exception.BizException;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.constants.Capacity;
 import thyyxxk.webserver.constants.sidicts.MedType;
+import thyyxxk.webserver.constants.sidicts.PsnCertType;
 import thyyxxk.webserver.dao.his.inpatient.DismissDao;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.inpatient.dismiss.*;
@@ -191,11 +192,14 @@ public class DismissService {
             exception.setMessage("没有找到入院时间,请重新获取病人信息。");
             throw new BizException(exception);
         }
-        if (!IdCardUtil.isValidatedIdCard(param.getSocialNo())) {
+        if (param.getPsnCertType().equals(PsnCertType.RESIDENT_IDENTITY_CARD.getCode()) &&
+                !IdCardUtil.isValidatedIdCard(param.getSocialNo())) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "身份证不合法!");
         }
-        Integer age = IdCardUtil.getAgeByIdCard(param.getSocialNo());
-        age = age == null ? param.getAge() : age;
+        Integer age = param.getAge();
+        if (param.getPsnCertType().equals(PsnCertType.RESIDENT_IDENTITY_CARD.getCode())) {
+            age = IdCardUtil.getAgeByIdCard(param.getSocialNo());
+        }
         if (null != age && (age < 16 || age > 60)) {
             if (param.getName().equals(param.getContactName()) ||
                     param.getContactRelation().equals("0")) {