diff --git a/src/main/resources/static/js/common.js b/src/main/resources/static/js/common.js
index 023b650d..c1e9c83e 100644
--- a/src/main/resources/static/js/common.js
+++ b/src/main/resources/static/js/common.js
@@ -205,9 +205,26 @@ function departmentDynamicOption(targetTagName, code, defaultOptionName='') {
$(targetTagName).empty();
let option = '';
organConfigList.forEach(function (organConfig) {
- if (organConfig.parentOrgan != null && organConfig.organType != 'OGC002' && organConfig.parentOrgan == code) {
+ if (organConfig.parentOrgan != null && organConfig.organType !== 'OGC002' && organConfig.parentOrgan === code) {
option += '';
}
});
$(targetTagName).append('' + option);
+}
+
+function dateTimeCalc(startDateTime, endDateTime) {
+ if (startDateTime !== '' &&endDateTime !== '' && startDateTime !== undefined && endDateTime !== undefined) {
+ const startDate = new Date(startDateTime);
+ const endDate = new Date(endDateTime);
+
+ let diffTime = endDate.getTime() - startDate.getTime();
+
+ const day = Math.floor(diffTime / (1000* 60 * 60 * 24));
+ const hour = Math.floor((diffTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
+ const minute = Math.floor((diffTime % (1000 * 60 * 60)) / (1000 * 60));
+
+ return day + '일' + hour + '시간' + minute + '분';
+ }
+
+ return null;
}
\ No newline at end of file
diff --git a/src/main/resources/static/js/faStatistics/crackdownStatus.js b/src/main/resources/static/js/faStatistics/crackdownStatus.js
index c856cf2a..da1d9642 100644
--- a/src/main/resources/static/js/faStatistics/crackdownStatus.js
+++ b/src/main/resources/static/js/faStatistics/crackdownStatus.js
@@ -459,20 +459,3 @@ function getToday() {
var date = new Date();
var year = date.getFullYear();
}
-
-function dateTimeCalc(startDateTime, endDateTime) {
- if (startDateTime != '' &&endDateTime != '' && startDateTime != undefined && endDateTime != undefined) {
- const startDate = new Date(startDateTime);
- const endDate = new Date(endDateTime);
-
- let diffTime = endDate.getTime() - startDate.getTime();
-
- const day = Math.floor(diffTime / (1000* 60 * 60 * 24));
- const hour = Math.floor((diffTime % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
- const minute = Math.floor((diffTime % (1000 * 60 * 60)) / (1000 * 60));
-
- return day + '일' + hour + '시간' + minute + '분';
- }
-
- return null;
-}