Browse Source

添加空指针判断

lighter 2 years ago
parent
commit
e72e829cbc

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

@@ -322,8 +322,10 @@ public class SiMzService {
         int count = dao.selectSiMzInfoCount(mz.getPatNo(), -1);
         if (count == 0) {
             PsnBaseInfo patinfo = dao.selectPsnBaseinfo(mz.getPatNo(), mz.getTimes());
-            patinfo.setTimes(-1);
-            dao.insertSiMzInfoPsnNo(patinfo);
+            if (null != patinfo) {
+                patinfo.setTimes(-1);
+                dao.insertSiMzInfoPsnNo(patinfo);
+            }
         }
     }