|
@@ -21,6 +21,9 @@
|
|
|
|
|
|
var RecentData = false;
|
|
|
var isNotRecentData = false;
|
|
|
+ var CreatedTime_afterSave = new Date(); // 저장 후 DB 업데이트 시간 저장
|
|
|
+ var CreatedTime_afterEveryQuarter = new Date(); // 저장 후 DB 업데이트 시간 저장
|
|
|
+ var loading_seconds = 0;
|
|
|
|
|
|
// 그리드 도표 작업 : 팝업창 추가
|
|
|
// 팝업창뷰 보이기 속성 제어용 변수 선언
|
|
@@ -66,16 +69,16 @@
|
|
|
var finalDate = new Date();
|
|
|
if (finalDate.getHours() < 21) {
|
|
|
finalDate.setHours(0)
|
|
|
- finalDate.setMinutes(45);
|
|
|
+ finalDate.setMinutes(0);
|
|
|
finalDate.setSeconds(0);
|
|
|
- finalDate = moment(finalDate).add(20, 'hours').toDate();
|
|
|
+ finalDate = moment(finalDate).add(21, 'hours').toDate();
|
|
|
}
|
|
|
else {
|
|
|
finalDate.setHours(0)
|
|
|
- finalDate.setMinutes(45);
|
|
|
+ finalDate.setMinutes(0);
|
|
|
finalDate.setSeconds(0);
|
|
|
finalDate = moment(finalDate).add(1, 'days').toDate();
|
|
|
- finalDate = moment(finalDate).add(20, 'hours').toDate();
|
|
|
+ finalDate = moment(finalDate).add(21, 'hours').toDate();
|
|
|
}
|
|
|
|
|
|
// 행 추가, 제거시 기억할 변수 선언
|
|
@@ -164,16 +167,16 @@
|
|
|
|
|
|
if (finalDate_.getHours() < 21) {
|
|
|
finalDate_.setHours(0)
|
|
|
- finalDate_.setMinutes(45);
|
|
|
+ finalDate_.setMinutes(0);
|
|
|
finalDate_.setSeconds(0);
|
|
|
- finalDate_ = moment(finalDate_).add(20, 'hours').toDate();
|
|
|
+ finalDate_ = moment(finalDate_).add(21, 'hours').toDate();
|
|
|
}
|
|
|
else {
|
|
|
finalDate_.setHours(0)
|
|
|
- finalDate_.setMinutes(45);
|
|
|
+ finalDate_.setMinutes(0);
|
|
|
finalDate_.setSeconds(0);
|
|
|
finalDate_ = moment(finalDate_).add(1, 'days').toDate();
|
|
|
- finalDate_ = moment(finalDate_).add(20, 'hours').toDate();
|
|
|
+ finalDate_ = moment(finalDate_).add(21, 'hours').toDate();
|
|
|
}
|
|
|
for (var i = 0; i < 5; i++) {
|
|
|
BoxInitialize(i + 1, initialDate_, finalDate_);
|
|
@@ -206,7 +209,7 @@
|
|
|
|
|
|
function DeleteRow() {
|
|
|
var now_ = new Date();
|
|
|
- var finalDate_ = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), 20, 45, 0);
|
|
|
+ var finalDate_ = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), 21, 0, 0);
|
|
|
if (now_.getHours() >= 21) {
|
|
|
finalDate_ = moment(finalDate_).add(1, 'days').toDate();
|
|
|
}
|
|
@@ -374,7 +377,7 @@
|
|
|
function DataArrange(initialDate_, finalDate_, facilityTypeId, facilityCode, propertyId, value, simulationCase) {
|
|
|
var now_date = new Date();
|
|
|
var comparedDate = new Date(initialDate_.getFullYear(), initialDate_.getMonth(), initialDate_.getDate(), initialDate_.getHours(), initialDate_.getMinutes(), 0);
|
|
|
- while (comparedDate <= finalDate_) {
|
|
|
+ while (comparedDate < finalDate_) {
|
|
|
//insert
|
|
|
var nowDate_tmp = new Date(now_date.getFullYear(), now_date.getMonth(), now_date.getDate(), now_date.getHours(), now_date.getMinutes(), now_date.getSeconds());
|
|
|
var tmpDate = new Date(comparedDate.getFullYear(), comparedDate.getMonth(), comparedDate.getDate(), comparedDate.getHours(), comparedDate.getMinutes(), 0);
|
|
@@ -467,146 +470,146 @@
|
|
|
]);
|
|
|
BemsIceThermalStorageDataSource.load()
|
|
|
.done(function (result) {
|
|
|
- var now_ = new Date();
|
|
|
if (result.length > 0) {
|
|
|
- //var now_comp = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), now_.getHours(), now_.getMinutes(), now_.getSeconds());
|
|
|
- now_.setSeconds(now_.getSeconds() - 10);
|
|
|
- if (result[0].CreatedDateTime().getTime() > now_.getTime()) {
|
|
|
+ if (result[0].CreatedDateTime().getTime() > CreatedTime_afterSave.getTime()) {
|
|
|
RecentData = true;
|
|
|
+ CreatedTime_afterSave = new Date(result[0].CreatedDateTime().getFullYear(), result[0].CreatedDateTime().getMonth(), result[0].CreatedDateTime().getDate(), result[0].CreatedDateTime().getHours(), result[0].CreatedDateTime().getMinutes(), result[0].CreatedDateTime().getSeconds());
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
// 저장버튼 클릭 후 DB가 업데이트 될때까지 실행
|
|
|
- function RecursiveFunc_isRecentData(isRecentData) {
|
|
|
+ function RecursiveFunc_isRecentData() {
|
|
|
+ CheckRecentData();
|
|
|
setTimeout(function () {
|
|
|
if (RecentData == true) {
|
|
|
- console.log('true');
|
|
|
- $("#LoadPanel").dxLoadPanel('instance').option('visible', false);
|
|
|
- visibleHourGlassPopup(false);
|
|
|
- handleSearchInSearchView();
|
|
|
- return true;
|
|
|
+ setTimeout(function () {
|
|
|
+ $("#LoadPanel").dxLoadPanel('instance').option('visible', false);
|
|
|
+ visibleHourGlassPopup(false);
|
|
|
+ handleSearchInSearchView();
|
|
|
+ return true;
|
|
|
+ }, 1000);
|
|
|
}
|
|
|
else {
|
|
|
- RecursiveFunc_isRecentData(CheckRecentData());
|
|
|
- }
|
|
|
- }, 1000);
|
|
|
+ RecursiveFunc_isRecentData();
|
|
|
+ }
|
|
|
+ loading_seconds += 1;
|
|
|
+ if (loading_seconds > 20) { // 20초 이상 지연되면 동작
|
|
|
+ if (loading_seconds % 5 == 0) { // 5초에 한번씩 메시지 띄움
|
|
|
+ utils.toast.show('데이터 모델이 업데이트 중이라 시간이 조금 소요될 수 있습니다.');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, 1000);
|
|
|
}
|
|
|
|
|
|
function handlePopupButtonSave() {
|
|
|
- var now_date = new Date();
|
|
|
- if (now_date.getHours() != 0 && now_date.getMinutes() % 15 == 1) {
|
|
|
- utils.toast.show('데이터 모델이 업데이트 중입니다. 잠시후 다시 시도해주세요. (약 1분 소요 예정)', 'error');
|
|
|
- }
|
|
|
- else {
|
|
|
- // 0, 4, 8, 12 ...초 시간에만 동작
|
|
|
- visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
-
|
|
|
- if (EditingFirstRow() === true) {
|
|
|
- if (enabledDateRange(1, "save")) {
|
|
|
- initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
- finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
- operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
- ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
- ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
- DataExtract(1);
|
|
|
-
|
|
|
- $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
- visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
- // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
- RecentData = false;
|
|
|
- setTimeout(function () {
|
|
|
- RecursiveFunc_isRecentData(CheckRecentData());
|
|
|
- }, 1000);
|
|
|
- CurrntRowStatusAsSave = 1;
|
|
|
- }
|
|
|
+ visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
+ loading_seconds = 0;
|
|
|
+
|
|
|
+ if (EditingFirstRow() === true) {
|
|
|
+ if (enabledDateRange(1, "save")) {
|
|
|
+ initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
+ finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
+ operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ DataExtract(1);
|
|
|
+
|
|
|
+ $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
+ visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
+ // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
+ RecentData = false;
|
|
|
+ setTimeout(function () {
|
|
|
+ RecursiveFunc_isRecentData();
|
|
|
+ }, 1000);
|
|
|
+ CurrntRowStatusAsSave = 1;
|
|
|
}
|
|
|
- else if (EditingSecondRow() === true) {
|
|
|
- if (enabledDateRange(2, "save")) {
|
|
|
- initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
- finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
- operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
- ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
- ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
- DataExtract(1);
|
|
|
- DataExtract(2);
|
|
|
-
|
|
|
- $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
- visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
- // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
- RecentData = false;
|
|
|
- setTimeout(function () {
|
|
|
- RecursiveFunc_isRecentData(CheckRecentData());
|
|
|
- }, 1000);
|
|
|
- CurrntRowStatusAsSave = 2;
|
|
|
- }
|
|
|
+ }
|
|
|
+ else if (EditingSecondRow() === true) {
|
|
|
+ if (enabledDateRange(2, "save")) {
|
|
|
+ initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
+ finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
+ operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ DataExtract(1);
|
|
|
+ DataExtract(2);
|
|
|
+
|
|
|
+ $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
+ visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
+ // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
+ RecentData = false;
|
|
|
+ setTimeout(function () {
|
|
|
+ RecursiveFunc_isRecentData();
|
|
|
+ }, 1000);
|
|
|
+ CurrntRowStatusAsSave = 2;
|
|
|
}
|
|
|
- else if (EditingThirdRow() === true) {
|
|
|
- if (enabledDateRange(3, "save")) {
|
|
|
- initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
- finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
- operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
- ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
- ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
- DataExtract(1);
|
|
|
- DataExtract(2);
|
|
|
- DataExtract(3);
|
|
|
-
|
|
|
- $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
- visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
- // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
- RecentData = false;
|
|
|
- setTimeout(function () {
|
|
|
- RecursiveFunc_isRecentData(CheckRecentData());
|
|
|
- }, 1000);
|
|
|
- CurrntRowStatusAsSave = 3;
|
|
|
- }
|
|
|
+ }
|
|
|
+ else if (EditingThirdRow() === true) {
|
|
|
+ if (enabledDateRange(3, "save")) {
|
|
|
+ initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
+ finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
+ operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ DataExtract(1);
|
|
|
+ DataExtract(2);
|
|
|
+ DataExtract(3);
|
|
|
+
|
|
|
+ $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
+ visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
+ // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
+ RecentData = false;
|
|
|
+ setTimeout(function () {
|
|
|
+ RecursiveFunc_isRecentData();
|
|
|
+ }, 1000);
|
|
|
+ CurrntRowStatusAsSave = 3;
|
|
|
}
|
|
|
- else if (EditingFourthRow() === true) {
|
|
|
- if (enabledDateRange(4, "save")) {
|
|
|
- initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
- finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
- operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
- ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
- ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
- DataExtract(1);
|
|
|
- DataExtract(2);
|
|
|
- DataExtract(3);
|
|
|
- DataExtract(4);
|
|
|
-
|
|
|
- $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
- visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
- // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
- RecentData = false;
|
|
|
- setTimeout(function () {
|
|
|
- RecursiveFunc_isRecentData(CheckRecentData());
|
|
|
- }, 1000);
|
|
|
- CurrntRowStatusAsSave = 4;
|
|
|
- }
|
|
|
+ }
|
|
|
+ else if (EditingFourthRow() === true) {
|
|
|
+ if (enabledDateRange(4, "save")) {
|
|
|
+ initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
+ finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
+ operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ DataExtract(1);
|
|
|
+ DataExtract(2);
|
|
|
+ DataExtract(3);
|
|
|
+ DataExtract(4);
|
|
|
+
|
|
|
+ $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
+ visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
+ // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
+ RecentData = false;
|
|
|
+ setTimeout(function () {
|
|
|
+ RecursiveFunc_isRecentData(CheckRecentData());
|
|
|
+ }, 1000);
|
|
|
+ CurrntRowStatusAsSave = 4;
|
|
|
}
|
|
|
- else if (EditingFifthRow() === true) {
|
|
|
- if (enabledDateRange(5, "save")) {
|
|
|
- initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
- finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
- operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
- ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
- ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
- DataExtract(1);
|
|
|
- DataExtract(2);
|
|
|
- DataExtract(3);
|
|
|
- DataExtract(4);
|
|
|
- DataExtract(5);
|
|
|
-
|
|
|
- $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
- visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
- // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
- RecentData = false;
|
|
|
- setTimeout(function () {
|
|
|
- RecursiveFunc_isRecentData(CheckRecentData());
|
|
|
- }, 1000);
|
|
|
- CurrntRowStatusAsSave = 5;
|
|
|
- }
|
|
|
+ }
|
|
|
+ else if (EditingFifthRow() === true) {
|
|
|
+ if (enabledDateRange(5, "save")) {
|
|
|
+ initDate_asSave = new Array(new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate), new Date(initialDate));
|
|
|
+ finalDate_asSave = new Array(new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate), new Date(finalDate));
|
|
|
+ operationMode_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref1Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ ref2Status_asSave = new Array(null, null, null, null, null);
|
|
|
+ DataExtract(1);
|
|
|
+ DataExtract(2);
|
|
|
+ DataExtract(3);
|
|
|
+ DataExtract(4);
|
|
|
+ DataExtract(5);
|
|
|
+
|
|
|
+ $("#LoadPanel").dxLoadPanel('instance').option('visible', true);
|
|
|
+ visibleHourGlassPopup(true); // 모래시계 팝업 활성화
|
|
|
+ // Python에서 데이터 처리하고 DB에서 데이터 불러오는 시간 고려
|
|
|
+ RecentData = false;
|
|
|
+ setTimeout(function () {
|
|
|
+ RecursiveFunc_isRecentData();
|
|
|
+ }, 1000);
|
|
|
+ CurrntRowStatusAsSave = 5;
|
|
|
}
|
|
|
}
|
|
|
visibleHourGlassPopup(false); // 모래시계 팝업 비활성화
|
|
@@ -615,7 +618,7 @@
|
|
|
// 데이터 범위 및 필수 입력사항 체크 함수
|
|
|
function enabledDateRange(row_num, mode) {
|
|
|
var now_ = new Date();
|
|
|
- var finalDate_ = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), 20, 45, 0);
|
|
|
+ var finalDate_ = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), 21, 0, 0);
|
|
|
if (now_.getHours() >= 21) {
|
|
|
finalDate_ = moment(finalDate_).add(1, 'days').toDate();
|
|
|
}
|
|
@@ -625,7 +628,7 @@
|
|
|
var BoxFinalTime_tmp = $("#FinalTime" + (row_num).toString()).dxDateBox('instance').option('value');
|
|
|
var input_inialDateTime = new Date(BoxInitDate_tmp.getFullYear(), BoxInitDate_tmp.getMonth(), BoxInitDate_tmp.getDate(), BoxInitTime_tmp.getHours(), BoxInitTime_tmp.getMinutes(), 0);
|
|
|
var input_finalDateTime = new Date(BoxFinalDate_tmp.getFullYear(), BoxFinalDate_tmp.getMonth(), BoxFinalDate_tmp.getDate(), BoxFinalTime_tmp.getHours(), BoxFinalTime_tmp.getMinutes(), 0);
|
|
|
- var comparedDate = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), 20, 45, 0);
|
|
|
+ var comparedDate = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), 21, 0, 0);
|
|
|
if (now_.getHours() >= 21) {
|
|
|
comparedDate = moment(comparedDate).add(1, 'days').toDate();
|
|
|
}
|
|
@@ -663,7 +666,7 @@
|
|
|
function handlePopupButtonAdd() {
|
|
|
// 행추가시 기존 제어 변수 입력 열에 미입력 사항이 있는지 확인하는 기능
|
|
|
var now_ = new Date();
|
|
|
- var finalDate_ = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), 20, 45, 0);
|
|
|
+ var finalDate_ = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), 21, 0, 0);
|
|
|
if (now_.getHours() >= 21) {
|
|
|
finalDate_ = moment(finalDate_).add(1, 'days').toDate();
|
|
|
}
|
|
@@ -686,7 +689,6 @@
|
|
|
EditingSecondRow(true);
|
|
|
isSecondRow(true);
|
|
|
|
|
|
- BoxDate.setMinutes(BoxDate.getMinutes() + 15);
|
|
|
$("#InitialDate2").dxDateBox('instance').option('value', BoxDate);
|
|
|
$("#InitialTime2").dxDateBox('instance').option('value', BoxDate);
|
|
|
$("#FinalDate2").dxDateBox('instance').option('value', finalDate_);
|
|
@@ -715,7 +717,6 @@
|
|
|
EditingThirdRow(true);
|
|
|
isThirdRow(true);
|
|
|
|
|
|
- BoxDate.setMinutes(BoxDate.getMinutes() + 15);
|
|
|
$("#InitialDate3").dxDateBox('instance').option('value', BoxDate);
|
|
|
$("#InitialTime3").dxDateBox('instance').option('value', BoxDate);
|
|
|
$("#FinalDate3").dxDateBox('instance').option('value', finalDate_);
|
|
@@ -741,7 +742,6 @@
|
|
|
EditingFourthRow(true);
|
|
|
isFourthRow(true);
|
|
|
|
|
|
- BoxDate.setMinutes(BoxDate.getMinutes() + 15);
|
|
|
$("#InitialDate4").dxDateBox('instance').option('value', BoxDate);
|
|
|
$("#InitialTime4").dxDateBox('instance').option('value', BoxDate);
|
|
|
$("#FinalDate4").dxDateBox('instance').option('value', finalDate_);
|
|
@@ -767,7 +767,6 @@
|
|
|
EditingFifthRow(true);
|
|
|
isFifthRow(true);
|
|
|
|
|
|
- BoxDate.setMinutes(BoxDate.getMinutes() + 15);
|
|
|
$("#InitialDate5").dxDateBox('instance').option('value', BoxDate);
|
|
|
$("#InitialTime5").dxDateBox('instance').option('value', BoxDate);
|
|
|
$("#FinalDate5").dxDateBox('instance').option('value', finalDate_);
|
|
@@ -956,7 +955,7 @@
|
|
|
var now_15min = new Date();
|
|
|
now_15min.setMinutes(parseInt(now_15min.getMinutes() / 15) * 15); // 15분 단위 맞춰주기 위함
|
|
|
var now_15min_ = new Date(now_15min.getFullYear(), now_15min.getMonth(), now_15min.getDate(), now_15min.getHours(), now_15min.getMinutes(), 0);
|
|
|
- var finalDate_ = new Date(now_15min_.getFullYear(), now_15min_.getMonth(), now_15min_.getDate(), 20, 45, 0);
|
|
|
+ var finalDate_ = new Date(now_15min_.getFullYear(), now_15min_.getMonth(), now_15min_.getDate(), 21, 0, 0);
|
|
|
if (now_15min.getHours() >= 21) {
|
|
|
finalDate_ = moment(finalDate_).add(1, 'days').toDate();
|
|
|
}
|
|
@@ -982,7 +981,7 @@
|
|
|
"and",
|
|
|
["TargetDateTime", ">=", now_15min_],
|
|
|
"and",
|
|
|
- ["TargetDateTime", "<=", finalDate_],
|
|
|
+ ["TargetDateTime", "<", finalDate_],
|
|
|
]);
|
|
|
dataSource.load()
|
|
|
.done(function (Recommended) {
|
|
@@ -1033,7 +1032,7 @@
|
|
|
"and",
|
|
|
["TargetDateTime", ">=", now_15min_],
|
|
|
"and",
|
|
|
- ["TargetDateTime", "<=", finalDate_],
|
|
|
+ ["TargetDateTime", "<", finalDate_],
|
|
|
]);
|
|
|
dataSource.load()
|
|
|
.done(function (RefPowerConsume) {
|
|
@@ -1064,7 +1063,7 @@
|
|
|
var now_15min = new Date();
|
|
|
now_15min.setMinutes(parseInt(now_15min.getMinutes() / 15) * 15); // 15분 단위 맞춰주기 위함
|
|
|
var now_15min_ = new Date(now_15min.getFullYear(), now_15min.getMonth(), now_15min.getDate(), now_15min.getHours(), now_15min.getMinutes(), 0);
|
|
|
- var finalDate_ = new Date(now_15min.getFullYear(), now_15min.getMonth(), now_15min.getDate(), 20, 45, 0);
|
|
|
+ var finalDate_ = new Date(now_15min.getFullYear(), now_15min.getMonth(), now_15min.getDate(), 21, 0, 0);
|
|
|
if (now_15min.getHours() >= 21) {
|
|
|
finalDate_ = moment(finalDate_).add(1, 'days').toDate();
|
|
|
}
|
|
@@ -1080,7 +1079,7 @@
|
|
|
"and",
|
|
|
["TargetDateTime", ">=", now_15min_],
|
|
|
"and",
|
|
|
- ["TargetDateTime", "<=", finalDate_]
|
|
|
+ ["TargetDateTime", "<", finalDate_]
|
|
|
]);
|
|
|
BemsIceThermalStorageDataSource.load()
|
|
|
.done(function (result) {
|
|
@@ -1095,9 +1094,11 @@
|
|
|
CheckNotRecentData();
|
|
|
setTimeout(function () {
|
|
|
if (isNotRecentData == true) {
|
|
|
- timeBoxForSearch.setDefaultDateToday();
|
|
|
- handleSearchInSearchView();
|
|
|
- return true;
|
|
|
+ setTimeout(function () {
|
|
|
+ timeBoxForSearch.setDefaultDateToday();
|
|
|
+ handleSearchInSearchView();
|
|
|
+ return true;
|
|
|
+ }, 1000);
|
|
|
}
|
|
|
else {
|
|
|
RecursiveFunc_isNotRecentData();
|
|
@@ -1155,7 +1156,8 @@
|
|
|
if (now_15min.getHours() >= 21) {
|
|
|
finalDate_ = moment(finalDate_).add(1, 'days').toDate();
|
|
|
}
|
|
|
- // 계산축열량 관제점 : FacilityTypeId = 3 and FacilityCode = 4478 and PropertyId = 2 and SimulationCase = 1
|
|
|
+
|
|
|
+ // 계산축열량 관제점 : FacilityTypeId = 3 and FacilityCode = 4478 and PropertyId = 2 and SimulationCase = 0
|
|
|
BemsIceThermalStorageDataSource.filter([
|
|
|
["SiteId", "=", BWA.UserInfo.SiteId()],
|
|
|
"and",
|
|
@@ -1171,11 +1173,9 @@
|
|
|
.done(function (result) {
|
|
|
var now_ = new Date();
|
|
|
if (result.length > 0) {
|
|
|
- //var now_comp = new Date(now_.getFullYear(), now_.getMonth(), now_.getDate(), now_.getHours(), now_.getMinutes(), now_.getSeconds());
|
|
|
- now_.setSeconds(now_.getSeconds() - 5);
|
|
|
- if (result[0].CreatedDateTime().getTime() > now_.getTime()) {
|
|
|
- console.log('++');
|
|
|
+ if (result[0].CreatedDateTime().getTime() > CreatedTime_afterEveryQuarter.getTime()) {
|
|
|
handleSearchInSearchView();
|
|
|
+ CreatedTime_afterEveryQuarter = new Date(result[0].CreatedDateTime().getFullYear(), result[0].CreatedDateTime().getMonth(), result[0].CreatedDateTime().getDate(), result[0].CreatedDateTime().getHours(), result[0].CreatedDateTime().getMinutes(), result[0].CreatedDateTime().getSeconds());
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -1199,7 +1199,7 @@
|
|
|
var now_15min = new Date();
|
|
|
now_15min.setMinutes(parseInt(now_15min.getMinutes() / 15) * 15); // 15분 단위 맞춰주기 위함
|
|
|
var targetDate_ = new Date(now_15min.getFullYear(), now_15min.getMonth(), now_15min.getDate(), now_15min.getHours(), now_15min.getMinutes(), 0);
|
|
|
- var finalDate_ = new Date(now_15min.getFullYear(), now_15min.getMonth(), now_15min.getDate(), 20, 45, 0);
|
|
|
+ var finalDate_ = new Date(now_15min.getFullYear(), now_15min.getMonth(), now_15min.getDate(), 21, 0, 0);
|
|
|
if (now_15min.getHours() >= 21) {
|
|
|
finalDate_ = moment(finalDate_).add(1, 'days').toDate();
|
|
|
}
|
|
@@ -1214,7 +1214,7 @@
|
|
|
"and",
|
|
|
["TargetDateTime", ">=", targetDate_],
|
|
|
"and",
|
|
|
- ["TargetDateTime", "<=", finalDate_]
|
|
|
+ ["TargetDateTime", "<", finalDate_]
|
|
|
]);
|
|
|
BemsIceThermalStorageDataSource.load()
|
|
|
.done(function (result) {
|