From c92523467edf0306bad25f141faa5fcb56da8806 Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期三, 06 三月 2024 11:24:17 +0800 Subject: [PATCH] 代码提交 --- smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java b/smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java index b7c7acd..a943e4c 100644 --- a/smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java +++ b/smartor/src/main/java/com/smartor/yiwudataanalysis/ADT_A03.java @@ -37,7 +37,7 @@ //鎮h�呯浉鍏� ID^^^鎺堟潈鏈烘瀯 CX[] pid3_patientIdentifierList = pid.getPid3_PatientIdentifierList(); - if (pid3_patientIdentifierList != null || pid3_patientIdentifierList.length > 0) { + if (pid3_patientIdentifierList != null && pid3_patientIdentifierList.length > 0) { for (CX cx : pid3_patientIdentifierList) { //鎮h�呯浉鍏矷D String hzxgID = cx.getID().encode(); @@ -48,7 +48,7 @@ //闂ㄨ瘖涓嶅~锛屼綇闄㈠繀濉� CX[] pid4_alternatePatientIDPID = pid.getPid4_AlternatePatientIDPID(); - if (pid4_alternatePatientIDPID != null || pid4_alternatePatientIDPID.length > 0) { + if (pid4_alternatePatientIDPID != null && pid4_alternatePatientIDPID.length > 0) { for (CX cx : pid4_alternatePatientIDPID) { //闈炲┐鍎� 0 濠村効 1 String s = cx.getID().encode(); @@ -313,18 +313,21 @@ //鍏ョ鏃ユ湡 DT[] pv125_contractEffectiveDate = pv1.getPv125_ContractEffectiveDate(); - DT dt = pv125_contractEffectiveDate[0]; - - SimpleDateFormat inputFormattt = new SimpleDateFormat("yyyyMMdd"); // 杈撳叆鏃ユ湡鏍煎紡 Date date22 = null; // 瑙f瀽涓篋ate瀵硅薄 - try { - date22 = inputFormattt.parse(dt.encode()); - } catch (ParseException e) { - e.printStackTrace(); + if (pv125_contractEffectiveDate != null && pv125_contractEffectiveDate.length > 0) { + DT dt = pv125_contractEffectiveDate[0]; + + SimpleDateFormat inputFormattt = new SimpleDateFormat("yyyyMMdd"); // 杈撳叆鏃ユ湡鏍煎紡 + + try { + date22 = inputFormattt.parse(dt.encode()); + } catch (ParseException e) { + e.printStackTrace(); + } } SimpleDateFormat outputFormat2 = new SimpleDateFormat("yyyy-MM-dd"); // 杈撳嚭鏃ユ湡鏍煎紡 - String rkdate = outputFormat2.format(date22); - + String rkdate =null; + if(date22!=null) rkdate = outputFormat2.format(date22); //璐︽埛鍐荤粨寤鸿 String pv128_interestCode = pv1.getPv128_InterestCode().encode(); -- Gitblit v1.9.3