|
@@ -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();
|
|
|
}
|