Merge branch 'daily' into dev
This commit is contained in:
@@ -153,8 +153,8 @@ CREATE TABLE daily_income (
|
|||||||
quantity varchar(10), -- 수량
|
quantity varchar(10), -- 수량
|
||||||
unit_code varchar(255), -- 단위(매핑코드)
|
unit_code varchar(255), -- 단위(매핑코드)
|
||||||
unit_self varchar(100), -- 단위(직접입력)
|
unit_self varchar(100), -- 단위(직접입력)
|
||||||
price integer, -- 현금(원)
|
price bigint, -- 현금(원)
|
||||||
estimated_value integer, -- 현물(평가액)
|
estimated_value bigint, -- 현물(평가액)
|
||||||
created_at timestamp(6), -- 생성일
|
created_at timestamp(6), -- 생성일
|
||||||
created_by varchar(255), -- 생성자
|
created_by varchar(255), -- 생성자
|
||||||
updated_at timestamp(6), -- 수정일
|
updated_at timestamp(6), -- 수정일
|
||||||
@@ -214,8 +214,8 @@ CREATE TABLE daily_expense (
|
|||||||
quantity varchar(10), -- 수량
|
quantity varchar(10), -- 수량
|
||||||
unit_code varchar(255), -- 단위(매핑코드)
|
unit_code varchar(255), -- 단위(매핑코드)
|
||||||
unit_self varchar(100), -- 단위(직접입력)
|
unit_self varchar(100), -- 단위(직접입력)
|
||||||
price integer, -- 현금(원)
|
price bigint, -- 현금(원)
|
||||||
estimated_value integer, -- 현물(평가액)
|
estimated_value bigint, -- 현물(평가액)
|
||||||
created_at timestamp(6), -- 생성일
|
created_at timestamp(6), -- 생성일
|
||||||
created_by varchar(255), -- 생성자
|
created_by varchar(255), -- 생성자
|
||||||
updated_at timestamp(6), -- 수정일
|
updated_at timestamp(6), -- 수정일
|
||||||
@@ -386,7 +386,7 @@ CREATE TABLE daily_forestry (
|
|||||||
quantity varchar(10), -- 수량
|
quantity varchar(10), -- 수량
|
||||||
unit_code varchar(255), -- 단위(매핑코드)
|
unit_code varchar(255), -- 단위(매핑코드)
|
||||||
unit_self varchar(100), -- 단위(직접입력)
|
unit_self varchar(100), -- 단위(직접입력)
|
||||||
estimated_value integer, -- 현물평가
|
estimated_value bigint, -- 현물평가
|
||||||
created_at timestamp(6), -- 생성일
|
created_at timestamp(6), -- 생성일
|
||||||
created_by varchar(255), -- 생성자
|
created_by varchar(255), -- 생성자
|
||||||
updated_at timestamp(6), -- 수정일
|
updated_at timestamp(6), -- 수정일
|
||||||
@@ -437,7 +437,7 @@ CREATE TABLE daily_farming (
|
|||||||
quantity varchar(10), -- 수량
|
quantity varchar(10), -- 수량
|
||||||
unit_code varchar(255), -- 단위(매핑코드)
|
unit_code varchar(255), -- 단위(매핑코드)
|
||||||
unit_self varchar(100), -- 단위(직접입력)
|
unit_self varchar(100), -- 단위(직접입력)
|
||||||
estimated_value integer, -- 현물평가액
|
estimated_value bigint, -- 현물평가액
|
||||||
created_at timestamp(6), -- 생성일
|
created_at timestamp(6), -- 생성일
|
||||||
created_by varchar(255), -- 생성자
|
created_by varchar(255), -- 생성자
|
||||||
updated_at timestamp(6), -- 수정일
|
updated_at timestamp(6), -- 수정일
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ public class DailyExpenseDto {
|
|||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitLabel;
|
private String unitLabel;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
private Integer price;
|
private Long price;
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 수정 가능 여부
|
* 수정 가능 여부
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ public class CreateDailyExpenseReqVO extends DailyUIReqVO {
|
|||||||
/**
|
/**
|
||||||
* 현금
|
* 현금
|
||||||
*/
|
*/
|
||||||
private Integer price;
|
private Long price;
|
||||||
/**
|
/**
|
||||||
* 현물평가액
|
* 현물평가액
|
||||||
*/
|
*/
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import app.module.front.usecase.daily.expense.ports.DailyExpensePortOut;
|
|||||||
import app.module.front.usecase.daily.expense.ports.application.domain.CreateDailyExpenseCmd;
|
import app.module.front.usecase.daily.expense.ports.application.domain.CreateDailyExpenseCmd;
|
||||||
import app.module.front.usecase.daily.expense.ports.application.domain.GetDailyExpenseCmd;
|
import app.module.front.usecase.daily.expense.ports.application.domain.GetDailyExpenseCmd;
|
||||||
import app.module.front.usecase.daily.expense.ports.application.domain.RemoveDailyExpenseCmd;
|
import app.module.front.usecase.daily.expense.ports.application.domain.RemoveDailyExpenseCmd;
|
||||||
|
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -23,6 +24,7 @@ import java.util.List;
|
|||||||
public class DailyExpenseService implements DailyExpensePortIn {
|
public class DailyExpenseService implements DailyExpensePortIn {
|
||||||
private final DailyExpensePortOut portOut;
|
private final DailyExpensePortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
private final DailyRecordService dailyRecordService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyExpenseDto> list(DailyExpenseUIReqVO reqVO) {
|
public List<DailyExpenseDto> list(DailyExpenseUIReqVO reqVO) {
|
||||||
@@ -107,6 +109,8 @@ public class DailyExpenseService implements DailyExpensePortIn {
|
|||||||
formVO.getEstimatedValue()));
|
formVO.getEstimatedValue()));
|
||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -127,5 +131,7 @@ public class DailyExpenseService implements DailyExpensePortIn {
|
|||||||
formVO.getDailyRecordSeq()));
|
formVO.getDailyRecordSeq()));
|
||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,6 @@ public class CreateDailyExpenseCmd extends FrontAuditCommand {
|
|||||||
private Double quantity;
|
private Double quantity;
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
private Integer price;
|
private Long price;
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class DailyFarmingDto {
|
|||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitLabel;
|
private String unitLabel;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 수정 가능 여부
|
* 수정 가능 여부
|
||||||
|
|||||||
@@ -46,5 +46,5 @@ public class CreateDailyFarmingReqVO extends DailyUIReqVO {
|
|||||||
/**
|
/**
|
||||||
* 현물평가액
|
* 현물평가액
|
||||||
*/
|
*/
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import app.module.front.usecase.daily.farming.ports.DailyFarmingPortOut;
|
|||||||
import app.module.front.usecase.daily.farming.ports.application.domain.CreateDailyFarmingCmd;
|
import app.module.front.usecase.daily.farming.ports.application.domain.CreateDailyFarmingCmd;
|
||||||
import app.module.front.usecase.daily.farming.ports.application.domain.GetDailyFarmingCmd;
|
import app.module.front.usecase.daily.farming.ports.application.domain.GetDailyFarmingCmd;
|
||||||
import app.module.front.usecase.daily.farming.ports.application.domain.RemoveDailyFarmingCmd;
|
import app.module.front.usecase.daily.farming.ports.application.domain.RemoveDailyFarmingCmd;
|
||||||
|
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -25,6 +26,7 @@ import java.util.List;
|
|||||||
public class DailyFarmingService implements DailyFarmingPortIn {
|
public class DailyFarmingService implements DailyFarmingPortIn {
|
||||||
private final DailyFarmingPortOut portOut;
|
private final DailyFarmingPortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
private final DailyRecordService dailyRecordService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyFarmingDto> list(DailyFarmingUIReqVO reqVO) {
|
public List<DailyFarmingDto> list(DailyFarmingUIReqVO reqVO) {
|
||||||
@@ -132,6 +134,8 @@ public class DailyFarmingService implements DailyFarmingPortIn {
|
|||||||
formVO.getEstimatedValue()));
|
formVO.getEstimatedValue()));
|
||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -152,5 +156,7 @@ public class DailyFarmingService implements DailyFarmingPortIn {
|
|||||||
formVO.getDailyRecordSeq()));
|
formVO.getDailyRecordSeq()));
|
||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ public class CreateDailyFarmingCmd extends FrontAuditCommand {
|
|||||||
private Double quantity;
|
private Double quantity;
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class DailyForestryDto {
|
|||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitLabel;
|
private String unitLabel;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 수정 가능 여부
|
* 수정 가능 여부
|
||||||
|
|||||||
@@ -42,5 +42,5 @@ public class CreateDailyForestryReqVO extends DailyUIReqVO {
|
|||||||
/**
|
/**
|
||||||
* 현물평가액
|
* 현물평가액
|
||||||
*/
|
*/
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import app.module.front.usecase.daily.forestry.ports.DailyForestryPortOut;
|
|||||||
import app.module.front.usecase.daily.forestry.ports.application.domain.CreateDailyForestryCmd;
|
import app.module.front.usecase.daily.forestry.ports.application.domain.CreateDailyForestryCmd;
|
||||||
import app.module.front.usecase.daily.forestry.ports.application.domain.GetDailyForestryCmd;
|
import app.module.front.usecase.daily.forestry.ports.application.domain.GetDailyForestryCmd;
|
||||||
import app.module.front.usecase.daily.forestry.ports.application.domain.RemoveDailyForestryCmd;
|
import app.module.front.usecase.daily.forestry.ports.application.domain.RemoveDailyForestryCmd;
|
||||||
|
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -25,6 +26,7 @@ import java.util.List;
|
|||||||
public class DailyForestryService implements DailyForestryPortIn {
|
public class DailyForestryService implements DailyForestryPortIn {
|
||||||
private final DailyForestryPortOut portOut;
|
private final DailyForestryPortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
private final DailyRecordService dailyRecordService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyForestryDto> list(DailyForestryUIReqVO reqVO) {
|
public List<DailyForestryDto> list(DailyForestryUIReqVO reqVO) {
|
||||||
@@ -105,6 +107,8 @@ public class DailyForestryService implements DailyForestryPortIn {
|
|||||||
formVO.getEstimatedValue()));
|
formVO.getEstimatedValue()));
|
||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -125,5 +129,7 @@ public class DailyForestryService implements DailyForestryPortIn {
|
|||||||
formVO.getDailyRecordSeq()));
|
formVO.getDailyRecordSeq()));
|
||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,5 +19,5 @@ public class CreateDailyForestryCmd extends FrontAuditCommand {
|
|||||||
private Double quantity;
|
private Double quantity;
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ public class DailyIncomeDto {
|
|||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitLabel;
|
private String unitLabel;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
private Integer price;
|
private Long price;
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 수정 가능 여부
|
* 수정 가능 여부
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ public class CreateDailyIncomeReqVO extends DailyUIReqVO {
|
|||||||
/**
|
/**
|
||||||
* 현금
|
* 현금
|
||||||
*/
|
*/
|
||||||
private Integer price;
|
private Long price;
|
||||||
/**
|
/**
|
||||||
* 현물평가액
|
* 현물평가액
|
||||||
*/
|
*/
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import app.module.front.usecase.daily.income.ports.DailyIncomePortOut;
|
|||||||
import app.module.front.usecase.daily.income.ports.application.domain.CreateDailyIncomeCmd;
|
import app.module.front.usecase.daily.income.ports.application.domain.CreateDailyIncomeCmd;
|
||||||
import app.module.front.usecase.daily.income.ports.application.domain.GetDailyIncomeCmd;
|
import app.module.front.usecase.daily.income.ports.application.domain.GetDailyIncomeCmd;
|
||||||
import app.module.front.usecase.daily.income.ports.application.domain.RemoveDailyIncomeCmd;
|
import app.module.front.usecase.daily.income.ports.application.domain.RemoveDailyIncomeCmd;
|
||||||
|
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -23,6 +24,7 @@ import java.util.List;
|
|||||||
public class DailyIncomeService implements DailyIncomePortIn {
|
public class DailyIncomeService implements DailyIncomePortIn {
|
||||||
private final DailyIncomePortOut portOut;
|
private final DailyIncomePortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
private final DailyRecordService dailyRecordService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyIncomeDto> list(DailyIncomeUIReqVO reqVO) {
|
public List<DailyIncomeDto> list(DailyIncomeUIReqVO reqVO) {
|
||||||
@@ -111,6 +113,8 @@ public class DailyIncomeService implements DailyIncomePortIn {
|
|||||||
formVO.getEstimatedValue()));
|
formVO.getEstimatedValue()));
|
||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -131,5 +135,7 @@ public class DailyIncomeService implements DailyIncomePortIn {
|
|||||||
formVO.getDailyRecordSeq()));
|
formVO.getDailyRecordSeq()));
|
||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,6 @@ public class CreateDailyIncomeCmd extends FrontAuditCommand {
|
|||||||
private Double quantity;
|
private Double quantity;
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
private Integer price;
|
private Long price;
|
||||||
private Integer estimatedValue;
|
private Long estimatedValue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import app.module.front.usecase.daily.power.ports.DailyPowerPortOut;
|
|||||||
import app.module.front.usecase.daily.power.ports.application.domain.CreateDailyPowerCmd;
|
import app.module.front.usecase.daily.power.ports.application.domain.CreateDailyPowerCmd;
|
||||||
import app.module.front.usecase.daily.power.ports.application.domain.GetDailyPowerCmd;
|
import app.module.front.usecase.daily.power.ports.application.domain.GetDailyPowerCmd;
|
||||||
import app.module.front.usecase.daily.power.ports.application.domain.RemoveDailyPowerCmd;
|
import app.module.front.usecase.daily.power.ports.application.domain.RemoveDailyPowerCmd;
|
||||||
|
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -25,6 +26,7 @@ import java.util.List;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class DailyPowerService implements DailyPowerPortIn {
|
public class DailyPowerService implements DailyPowerPortIn {
|
||||||
private final DailyPowerPortOut portOut;
|
private final DailyPowerPortOut portOut;
|
||||||
|
private final DailyRecordService dailyRecordService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyPowerDto> list(DailyPowerUIReqVO reqVO) {
|
public List<DailyPowerDto> list(DailyPowerUIReqVO reqVO) {
|
||||||
@@ -71,6 +73,8 @@ public class DailyPowerService implements DailyPowerPortIn {
|
|||||||
formVO.getLeasedHours()));
|
formVO.getLeasedHours()));
|
||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -91,5 +95,7 @@ public class DailyPowerService implements DailyPowerPortIn {
|
|||||||
formVO.getDailyRecordSeq()));
|
formVO.getDailyRecordSeq()));
|
||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package app.module.front.usecase.daily.record.adapters.persistence;
|
|||||||
import app.module.front.config.application.util.AuditUtil;
|
import app.module.front.config.application.util.AuditUtil;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
import app.module.front.usecase.daily.record.adapters.persistence.model.DailyRecordStatusDto;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.CreateDailyRecordReqVO;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyStatus;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyTargetStatus;
|
||||||
import app.module.front.usecase.daily.record.ports.DailyRecordPortOut;
|
import app.module.front.usecase.daily.record.ports.DailyRecordPortOut;
|
||||||
import app.module.front.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
import app.module.front.usecase.daily.record.ports.application.domain.CreateDailyRecordCmd;
|
||||||
@@ -15,7 +15,6 @@ import org.springframework.stereotype.Repository;
|
|||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
@@ -64,7 +63,7 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
log.warn("[DailyRecordCreate] existCount={}, recordMonth={}, dayGroupNo={}", existCount, findCmd.getSearchMonth(), findCmd.getGroupNo());
|
log.warn("[DailyRecordCreate] existCount={}, recordMonth={}, dayGroupNo={}", existCount, findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateByAllStatus(findCmd);
|
this.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -79,24 +78,128 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ("ALL".equals(targetType)) {
|
||||||
|
String allStatus = this.getUpdateAllStatus(recordMonth, dayGroupNo, command.getHouseholdSeq());
|
||||||
|
if (allStatus != null) {
|
||||||
|
command.setAllStatus(allStatus);
|
||||||
|
|
||||||
dailyRecordMapper.updateDailyRecordStatus(command);
|
dailyRecordMapper.updateDailyRecordStatus(command);
|
||||||
|
|
||||||
this.updateByAllStatus(new GetDailyRecordCmd(recordMonth, dayGroupNo, command.getHouseholdSeq()));
|
} else {
|
||||||
|
log.debug("[updateByAllStatus] do nothing. findCmd: {}", command);
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
dailyRecordMapper.updateDailyRecordStatus(command);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO : target 업데이트 후 데이터 등록이 완료된 건은 allStatus 값 변경해주기
|
* 일계부 전체 입력상태 변경
|
||||||
* @param findCmd
|
*
|
||||||
|
* @param searchMonth
|
||||||
|
* @param dayGroupNo
|
||||||
|
* @param householdSeq
|
||||||
*/
|
*/
|
||||||
private void updateByAllStatus(GetDailyRecordCmd findCmd) {
|
private void updateByAllStatus(String searchMonth, Integer dayGroupNo, Long householdSeq) {
|
||||||
|
String allStatus = this.getUpdateAllStatus(searchMonth, dayGroupNo, householdSeq);
|
||||||
|
if (allStatus != null) {
|
||||||
|
UpdateDailyRecordStatusCmd command = AuditUtil.update(
|
||||||
|
new UpdateDailyRecordStatusCmd(
|
||||||
|
searchMonth,
|
||||||
|
dayGroupNo,
|
||||||
|
allStatus,
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
dailyRecordMapper.updateDailyRecordStatus(command);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
log.debug("[updateByAllStatus] do nothing. findCmd: {}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO 변경할 전체 입력상태 조회
|
||||||
|
*
|
||||||
|
* @param searchMonth
|
||||||
|
* @param dayGroupNo
|
||||||
|
* @param householdSeq
|
||||||
|
* @return 변경할 전체 입력상태
|
||||||
|
*/
|
||||||
|
private String getUpdateAllStatus(String searchMonth, Integer dayGroupNo, Long householdSeq) {
|
||||||
|
GetDailyRecordCmd findCmd = new GetDailyRecordCmd(searchMonth, dayGroupNo, householdSeq);
|
||||||
|
|
||||||
|
DailyRecordStatusDto statusDetail = null;
|
||||||
List<DailyRecordStatusDto> statusList = dailyRecordMapper.getDailyRecordStatus(findCmd);
|
List<DailyRecordStatusDto> statusList = dailyRecordMapper.getDailyRecordStatus(findCmd);
|
||||||
if (statusList != null && !statusList.isEmpty()) {
|
if (statusList != null && !statusList.isEmpty()) {
|
||||||
DailyRecordStatusDto statusDetail = statusList.get(0);
|
statusDetail = statusList.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (DailyTargetStatus.TARGET.equals(statusDetail.getIncomeStatus()) && statusDetail.getIncomeCount() != 0) {
|
String allStatus = null;
|
||||||
|
|
||||||
|
if (statusDetail != null) {
|
||||||
|
if (DailyStatus.TODAY_NONE.equals(statusDetail.getAllStatus())) {
|
||||||
|
// 전체상태=금일없음, 항목=입력대상이 있는지 여부
|
||||||
|
if (this.checkTarget(statusDetail.getIncomeStatus()) || this.checkTarget(statusDetail.getExpenseStatus())
|
||||||
|
|| this.checkTarget(statusDetail.getWorkStatus()) || this.checkTarget(statusDetail.getPowerStatus())
|
||||||
|
|| this.checkTarget(statusDetail.getForestryStatus()) || this.checkTarget(statusDetail.getFarmingStatus())) {
|
||||||
|
allStatus = DailyStatus.WAITING.name();
|
||||||
|
}
|
||||||
|
} else if (DailyStatus.WAITING.equals(statusDetail.getAllStatus())) {
|
||||||
|
// 전체상태=입력중, 항목 COUNT!=0 이 있는지 여부
|
||||||
|
|
||||||
|
int noneCheck = 0;
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getIncomeStatus(), statusDetail.getIncomeCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getExpenseStatus(), statusDetail.getExpenseCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getWorkStatus(), statusDetail.getWorkCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getPowerStatus(), statusDetail.getPowerCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getForestryStatus(), statusDetail.getForestryCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getFarmingStatus(), statusDetail.getFarmingCount()) ? 1 : 0);
|
||||||
|
|
||||||
|
if (noneCheck == 0) {
|
||||||
|
allStatus = DailyStatus.DONE.name();
|
||||||
|
}
|
||||||
|
} else if (DailyStatus.DONE.equals(statusDetail.getAllStatus())) {
|
||||||
|
// 전체상태=완료, 항목 COUNT=0 체크
|
||||||
|
int noneCheck = 0;
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getIncomeStatus(), statusDetail.getIncomeCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getExpenseStatus(), statusDetail.getExpenseCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getWorkStatus(), statusDetail.getWorkCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getPowerStatus(), statusDetail.getPowerCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getForestryStatus(), statusDetail.getForestryCount()) ? 1 : 0);
|
||||||
|
noneCheck = noneCheck + (this.checkTargetDataNone(statusDetail.getFarmingStatus(), statusDetail.getFarmingCount()) ? 1 : 0);
|
||||||
|
|
||||||
|
if (noneCheck != 0) {
|
||||||
|
allStatus = DailyStatus.WAITING.name();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return allStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 입력 대상 상태 조회
|
||||||
|
*
|
||||||
|
* @param status 조회 상태
|
||||||
|
* @return true=입력 대상, false=금일 데이터 없음 또는 대상 아님
|
||||||
|
*/
|
||||||
|
private boolean checkTarget(DailyTargetStatus status) {
|
||||||
|
// NONE 은 대상이 아니기 때문에 체크에서 제외
|
||||||
|
return DailyTargetStatus.TARGET.equals(status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 등록 대상인데 데이터가 없는 경우 조회
|
||||||
|
*
|
||||||
|
* @param status 조회 상태
|
||||||
|
* @param count 조회 건수
|
||||||
|
* @return true=입력대상인데 데이터가 없는 경우, false=입력대상 아니거나, 데이터가 있는 경우
|
||||||
|
*/
|
||||||
|
private boolean checkTargetDataNone(DailyTargetStatus status, Integer count) {
|
||||||
|
return DailyTargetStatus.TARGET.equals(status) && count == 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -21,4 +21,6 @@ public interface DailyRecordPortIn {
|
|||||||
void create(CreateDailyRecordReqVO formVO);
|
void create(CreateDailyRecordReqVO formVO);
|
||||||
|
|
||||||
void updateByStatus(String recordMonth, Integer dayGroupNo, String targetType, String targetStatus);
|
void updateByStatus(String recordMonth, Integer dayGroupNo, String targetType, String targetStatus);
|
||||||
|
|
||||||
|
void updateByAllStatus(String recordMonth, Integer dayGroupNo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,5 +95,11 @@ public class DailyRecordService implements DailyRecordPortIn {
|
|||||||
@Override
|
@Override
|
||||||
public void updateByStatus(String recordMonth, Integer dayGroupNo, String targetType, String targetStatus) {
|
public void updateByStatus(String recordMonth, Integer dayGroupNo, String targetType, String targetStatus) {
|
||||||
portOut.updateByStatus(recordMonth, dayGroupNo, targetType, targetStatus);
|
portOut.updateByStatus(recordMonth, dayGroupNo, targetType, targetStatus);
|
||||||
|
portOut.updateByStatus(recordMonth, dayGroupNo, "ALL", null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateByAllStatus(String recordMonth, Integer dayGroupNo) {
|
||||||
|
portOut.updateByStatus(recordMonth, dayGroupNo, "ALL", null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package app.module.front.usecase.daily.work.adapters.persistence;
|
package app.module.front.usecase.daily.work.adapters.persistence;
|
||||||
|
|
||||||
|
import app.module.front.usecase.daily.record.adapters.persistence.DailyRecordDao;
|
||||||
|
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
||||||
import app.module.front.usecase.daily.work.ports.DailyWorkPortOut;
|
import app.module.front.usecase.daily.work.ports.DailyWorkPortOut;
|
||||||
import app.module.front.usecase.daily.work.ports.application.domain.CreateDailyWorkCmd;
|
import app.module.front.usecase.daily.work.ports.application.domain.CreateDailyWorkCmd;
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ public class DailyWorkUIController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
model.addAttribute("recordArea", uiCodeListPortIn.connect("code.record.area"));
|
||||||
model.addAttribute("recordUnit", uiCodeListPortIn.connect("code.record.unit"));
|
model.addAttribute("recordUnit", uiCodeListPortIn.connect("code.record.unit"));
|
||||||
|
|
||||||
model.addAttribute("reqVO", reqVO);
|
model.addAttribute("reqVO", reqVO);
|
||||||
|
|||||||
@@ -43,9 +43,16 @@ public class CreateDailyWorkValidator implements Validator {
|
|||||||
&& vo.getHiredMHours() == null && vo.getHiredFHours() == null
|
&& vo.getHiredMHours() == null && vo.getHiredFHours() == null
|
||||||
&& vo.getSharedMHours() == null && vo.getSharedFHours() == null
|
&& vo.getSharedMHours() == null && vo.getSharedFHours() == null
|
||||||
&& vo.getVolunteerMHours() == null && vo.getVolunteerFHours() == null) {
|
&& vo.getVolunteerMHours() == null && vo.getVolunteerFHours() == null) {
|
||||||
errors.rejectValue(
|
errors.rejectValue("ownerTime", "valid.common.required");
|
||||||
"ownerTime", "valid.common.required",
|
errors.rejectValue("spouseTime", "valid.common.required");
|
||||||
"최소 1개의 항목을 입력해주세요.");
|
errors.rejectValue("familyMHours", "valid.common.required");
|
||||||
|
errors.rejectValue("familyFHours", "valid.common.required");
|
||||||
|
errors.rejectValue("hiredMHours", "valid.common.required");
|
||||||
|
errors.rejectValue("hiredFHours", "valid.common.required");
|
||||||
|
errors.rejectValue("sharedMHours", "valid.common.required");
|
||||||
|
errors.rejectValue("sharedFHours", "valid.common.required");
|
||||||
|
errors.rejectValue("volunteerMHours", "valid.common.required");
|
||||||
|
errors.rejectValue("volunteerFHours", "valid.common.required");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
|||||||
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
||||||
import app.module.front.config.application.util.AuditUtil;
|
import app.module.front.config.application.util.AuditUtil;
|
||||||
import app.module.front.config.constants.CommonConstants;
|
import app.module.front.config.constants.CommonConstants;
|
||||||
|
import app.module.front.usecase.daily.record.ports.application.DailyRecordService;
|
||||||
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
import app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
|
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
|
||||||
import app.module.front.usecase.daily.work.adapters.web.model.DailyWorkUIReqVO;
|
import app.module.front.usecase.daily.work.adapters.web.model.DailyWorkUIReqVO;
|
||||||
@@ -23,6 +24,7 @@ import java.util.List;
|
|||||||
public class DailyWorkService implements DailyWorkPortIn {
|
public class DailyWorkService implements DailyWorkPortIn {
|
||||||
private final DailyWorkPortOut portOut;
|
private final DailyWorkPortOut portOut;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
private final DailyRecordService dailyRecordService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DailyWorkDto> list(DailyWorkUIReqVO reqVO) {
|
public List<DailyWorkDto> list(DailyWorkUIReqVO reqVO) {
|
||||||
@@ -51,13 +53,14 @@ public class DailyWorkService implements DailyWorkPortIn {
|
|||||||
reqVO.getHouseholdSeq(),
|
reqVO.getHouseholdSeq(),
|
||||||
reqVO.getId()));
|
reqVO.getId()));
|
||||||
|
|
||||||
|
List<UICodeElement> recordArea = uiCodeListPortIn.connect("code.record.area");
|
||||||
List<UICodeElement> recordUnit = uiCodeListPortIn.connect("code.record.unit");
|
List<UICodeElement> recordUnit = uiCodeListPortIn.connect("code.record.unit");
|
||||||
|
|
||||||
for (DailyWorkDto dto : list) {
|
for (DailyWorkDto dto : list) {
|
||||||
if (CommonConstants.UNIT_CODE_SELF.equals(dto.getAreaUnitCode())) {
|
if (CommonConstants.UNIT_CODE_SELF.equals(dto.getAreaUnitCode())) {
|
||||||
dto.setAreaUnitLabel(dto.getAreaUnitSelf());
|
dto.setAreaUnitLabel(dto.getAreaUnitSelf());
|
||||||
} else {
|
} else {
|
||||||
dto.setAreaUnitLabel(this.getCodeLabel(dto.getAreaUnitCode(), recordUnit));
|
dto.setAreaUnitLabel(this.getCodeLabel(dto.getAreaUnitCode(), recordArea));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CommonConstants.UNIT_CODE_SELF.equals(dto.getHarvestUnitCode())) {
|
if (CommonConstants.UNIT_CODE_SELF.equals(dto.getHarvestUnitCode())) {
|
||||||
@@ -120,6 +123,8 @@ public class DailyWorkService implements DailyWorkPortIn {
|
|||||||
formVO.getVolunteerFHours()));
|
formVO.getVolunteerFHours()));
|
||||||
|
|
||||||
portOut.create(findCmd, command);
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -140,5 +145,7 @@ public class DailyWorkService implements DailyWorkPortIn {
|
|||||||
formVO.getDailyRecordSeq()));
|
formVO.getDailyRecordSeq()));
|
||||||
|
|
||||||
portOut.remove(findCmd, command);
|
portOut.remove(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordService.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,9 @@
|
|||||||
where dr.is_deleted = false
|
where dr.is_deleted = false
|
||||||
and dr.household_seq = #{householdSeq}
|
and dr.household_seq = #{householdSeq}
|
||||||
and dr.record_month = #{searchMonth}
|
and dr.record_month = #{searchMonth}
|
||||||
|
<if test="groupNo != null">
|
||||||
|
and dr.day_group_no = #{groupNo}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDailyRecordExistCount" resultType="int">
|
<select id="getDailyRecordExistCount" resultType="int">
|
||||||
|
|||||||
@@ -163,14 +163,13 @@ var ajaxUtil = {
|
|||||||
kri.logger.error('statusCode: 403');
|
kri.logger.error('statusCode: 403');
|
||||||
},
|
},
|
||||||
422:function(rstData, status) {
|
422:function(rstData, status) {
|
||||||
console.log(rstData)
|
console.log('422', rstData)
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
* 폼이 너무 여러가지 형식이 있는데 서버에러를 가지고 처리하는게 맞는지 검토 필요
|
* 폼이 너무 여러가지 형식이 있는데 서버에러를 가지고 처리하는게 맞는지 검토 필요
|
||||||
* 코드 정리는 나중에 하려고 그냥 만듬.... 정리 필요.
|
* 코드 정리는 나중에 하려고 그냥 만듬.... 정리 필요.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
let isResetDone = false;
|
let isResetDone = false;
|
||||||
|
|
||||||
$(rstData.responseJSON.fieldErrors).each((idx, oj) => {
|
$(rstData.responseJSON.fieldErrors).each((idx, oj) => {
|
||||||
@@ -236,6 +235,15 @@ var ajaxUtil = {
|
|||||||
ajaxUtil._alert(fieldErrors[0].defaultMessage, '유효성 체크');
|
ajaxUtil._alert(fieldErrors[0].defaultMessage, '유효성 체크');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 포커스 이동
|
||||||
|
if ($('.input-invalid').length != 0) {
|
||||||
|
$('.input-invalid').eq(0).find('input,select').focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof errorCallback !== 'undefined') {
|
||||||
|
errorCallback(rstData.status, rstData);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
500:function(rstData){
|
500:function(rstData){
|
||||||
ajaxUtil._hideWaiting();
|
ajaxUtil._hideWaiting();
|
||||||
@@ -263,6 +271,7 @@ var ajaxUtil = {
|
|||||||
},
|
},
|
||||||
error : function(rstData) {
|
error : function(rstData) {
|
||||||
ajaxUtil._hideWaiting();
|
ajaxUtil._hideWaiting();
|
||||||
|
|
||||||
if (!(rstData.status == 500 || rstData.status == 422)) {
|
if (!(rstData.status == 500 || rstData.status == 422)) {
|
||||||
if (typeof errorCallback !== 'undefined') {
|
if (typeof errorCallback !== 'undefined') {
|
||||||
errorCallback(rstData.status, rstData);
|
errorCallback(rstData.status, rstData);
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="select-scroll">
|
<div class="select-scroll">
|
||||||
<ul class="">
|
<ul class="">
|
||||||
<li class="option" th:each="uiCode : ${recordUnit}"
|
<li class="option" th:each="uiCode : ${recordArea}"
|
||||||
th:data-value="${uiCode.id}"
|
th:data-value="${uiCode.id}"
|
||||||
th:text="${uiCode.codeText}"
|
th:text="${uiCode.codeText}"
|
||||||
th:selected="${uiCode.id eq detail.areaUnitCode ? 'current' : ''}"
|
th:selected="${uiCode.id eq detail.areaUnitCode ? 'current' : ''}"
|
||||||
|
|||||||
@@ -258,6 +258,12 @@
|
|||||||
function (rstData, status) {
|
function (rstData, status) {
|
||||||
location.reload();
|
location.reload();
|
||||||
},
|
},
|
||||||
|
function () {
|
||||||
|
// 노동투입시간 invalid reset
|
||||||
|
$('.segment-label .guide-info li').eq(2).addClass('invalid');
|
||||||
|
$('.type-sub').find('.input-info').remove();
|
||||||
|
$('.input-flex-group').find('.input-info').remove();
|
||||||
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user