瀏覽代碼

台州运行质控无阶段小结修改bug

hujing 5 年之前
父節點
當前提交
45e59359b1
共有 1 個文件被更改,包括 10 次插入3 次删除
  1. 10 3
      kernel/src/main/java/com/lantone/qc/kernel/catalogue/dutyshiftsystem/DUT0296.java

+ 10 - 3
kernel/src/main/java/com/lantone/qc/kernel/catalogue/dutyshiftsystem/DUT0296.java

@@ -1,6 +1,7 @@
 package com.lantone.qc.kernel.catalogue.dutyshiftsystem;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
 import com.lantone.qc.pub.model.InputInfo;
 import com.lantone.qc.pub.model.OutputInfo;
 import com.lantone.qc.pub.model.doc.LeaveHospitalDoc;
@@ -192,9 +193,15 @@ public class DUT0296 extends QCCatalogue {
             from.setTime(dateIn);
             Calendar to = Calendar.getInstance();
             to.setTime(dateOut);
-            int fromMonth = from.get(Calendar.DAY_OF_YEAR);
-            int toMonth = to.get(Calendar.DAY_OF_YEAR);
-            day = toMonth - fromMonth;
+            long timeS,timeE,timeDiff = 0;
+            try {
+                timeS = from.getTimeInMillis();
+                timeE = to.getTimeInMillis();
+                timeDiff = (timeE - timeS) / (1000 * 60* 60 * 24);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            day = (int) timeDiff;
         } catch (Exception e) {
             e.printStackTrace();
         }