[FO] 농업생산물 항목 마지막날 체크 TODO 수정
This commit is contained in:
@@ -48,6 +48,7 @@ public class DailyRecordController {
|
|||||||
formVO.setDayGroupNo(reqVO.getGroupNo());
|
formVO.setDayGroupNo(reqVO.getGroupNo());
|
||||||
formVO.setStartDate(detail.getStartDate());
|
formVO.setStartDate(detail.getStartDate());
|
||||||
formVO.setEndDate(detail.getEndDate());
|
formVO.setEndDate(detail.getEndDate());
|
||||||
|
formVO.setFarmingStatus(detail.isFarmingOpen());
|
||||||
log.debug("formVO: {}", formVO);
|
log.debug("formVO: {}", formVO);
|
||||||
|
|
||||||
dailyRecordPortIn.create(formVO);
|
dailyRecordPortIn.create(formVO);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public class CreateDailyRecordReqVO {
|
|||||||
private DailyTargetStatus farmingStatus;
|
private DailyTargetStatus farmingStatus;
|
||||||
|
|
||||||
public void setTodayNone(String todayNone) {
|
public void setTodayNone(String todayNone) {
|
||||||
|
this.todayNone = todayNone;
|
||||||
if ("Y".equals(todayNone)) {
|
if ("Y".equals(todayNone)) {
|
||||||
this.allStatus = DailyStatus.TODAY_NONE;
|
this.allStatus = DailyStatus.TODAY_NONE;
|
||||||
this.incomeStatus = DailyTargetStatus.TODAY_NONE;
|
this.incomeStatus = DailyTargetStatus.TODAY_NONE;
|
||||||
@@ -30,13 +31,6 @@ public class CreateDailyRecordReqVO {
|
|||||||
this.expenseStatus = DailyTargetStatus.TODAY_NONE;
|
this.expenseStatus = DailyTargetStatus.TODAY_NONE;
|
||||||
this.powerStatus = DailyTargetStatus.TODAY_NONE;
|
this.powerStatus = DailyTargetStatus.TODAY_NONE;
|
||||||
this.forestryStatus = DailyTargetStatus.TODAY_NONE;
|
this.forestryStatus = DailyTargetStatus.TODAY_NONE;
|
||||||
|
|
||||||
// TODO : 7의 배수와 마지막날의 기준
|
|
||||||
if (dayGroupNo == 4 || dayGroupNo == 8 || dayGroupNo == 12 || dayGroupNo == 16 || dayGroupNo == 17) {
|
|
||||||
this.farmingStatus = DailyTargetStatus.TODAY_NONE;
|
|
||||||
} else {
|
|
||||||
this.farmingStatus = DailyTargetStatus.NONE;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.allStatus = DailyStatus.WAITING;
|
this.allStatus = DailyStatus.WAITING;
|
||||||
|
|
||||||
@@ -55,9 +49,18 @@ public class CreateDailyRecordReqVO {
|
|||||||
if (forestryStatus == null) {
|
if (forestryStatus == null) {
|
||||||
this.forestryStatus = DailyTargetStatus.NONE;
|
this.forestryStatus = DailyTargetStatus.NONE;
|
||||||
}
|
}
|
||||||
if (farmingStatus == null) {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFarmingStatus(boolean isOpen) {
|
||||||
|
if ("Y".equals(todayNone)) {
|
||||||
|
if (isOpen) {
|
||||||
|
this.farmingStatus = DailyTargetStatus.TODAY_NONE;
|
||||||
|
} else {
|
||||||
|
this.farmingStatus = DailyTargetStatus.NONE;
|
||||||
|
}
|
||||||
|
} else if (farmingStatus == null) {
|
||||||
this.farmingStatus = DailyTargetStatus.NONE;
|
this.farmingStatus = DailyTargetStatus.NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,8 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--/* [정책] 자가농업 생산물 중 자가소비량은 7일차 등록일에만 노출 및 선택, 21일 이후는 마지막 날 */-->
|
<!--/* [정책] 자가농업 생산물 중 자가소비량은 7일차 등록일에만 노출 및 선택, 21일 이후는 마지막 날 */-->
|
||||||
<div class="component-input"
|
<div class="component-input"
|
||||||
th:if="${reqVO.groupNo eq 4 or reqVO.groupNo eq 8 or reqVO.groupNo eq 12
|
th:if="${dailyRecord.farmingOpen}">
|
||||||
or reqVO.groupNo eq 16 or reqVO.groupNo eq 17}">
|
|
||||||
<label class="switch-inner type-txt">
|
<label class="switch-inner type-txt">
|
||||||
<span class="switch-label">농업생산물 중 자가소비량</span>
|
<span class="switch-label">농업생산물 중 자가소비량</span>
|
||||||
<input type="checkbox" name="farmingStatus" value="TARGET" data-target="farming"
|
<input type="checkbox" name="farmingStatus" value="TARGET" data-target="farming"
|
||||||
|
|||||||
Reference in New Issue
Block a user