[FO] 일계부 DB 변경에 대한 수정 처리
This commit is contained in:
@@ -47,7 +47,7 @@ DROP TABLE IF EXISTS work_input;
|
|||||||
DROP TABLE IF EXISTS monthly_carryover;
|
DROP TABLE IF EXISTS monthly_carryover;
|
||||||
DROP TABLE IF EXISTS bank_auto_transfer;
|
DROP TABLE IF EXISTS bank_auto_transfer;
|
||||||
DROP TABLE IF EXISTS income_expense_record;
|
DROP TABLE IF EXISTS income_expense_record;
|
||||||
DROP TABLE IF EXISTS daily_input_status;
|
--DROP TABLE IF EXISTS daily_input_status;
|
||||||
DROP TABLE IF EXISTS monthly_input_status;
|
DROP TABLE IF EXISTS monthly_input_status;
|
||||||
|
|
||||||
-- admin
|
-- admin
|
||||||
|
|||||||
@@ -1140,6 +1140,7 @@ COMMENT ON COLUMN monthly_input_status.is_deleted IS '삭제여부';
|
|||||||
-- TABLE : daily_input_status
|
-- TABLE : daily_input_status
|
||||||
-- DESC : 일계부 일별 작성상태
|
-- DESC : 일계부 일별 작성상태
|
||||||
-- ============================================
|
-- ============================================
|
||||||
|
/*
|
||||||
CREATE SEQUENCE daily_input_status_seq START WITH 1 INCREMENT BY 1 CACHE 1 NO CYCLE;
|
CREATE SEQUENCE daily_input_status_seq START WITH 1 INCREMENT BY 1 CACHE 1 NO CYCLE;
|
||||||
|
|
||||||
CREATE TABLE daily_input_status (
|
CREATE TABLE daily_input_status (
|
||||||
@@ -1186,6 +1187,7 @@ COMMENT ON COLUMN daily_input_status.updated_by IS '수정자';
|
|||||||
COMMENT ON COLUMN daily_input_status.deleted_at IS '삭제일';
|
COMMENT ON COLUMN daily_input_status.deleted_at IS '삭제일';
|
||||||
COMMENT ON COLUMN daily_input_status.deleted_by IS '삭제자';
|
COMMENT ON COLUMN daily_input_status.deleted_by IS '삭제자';
|
||||||
COMMENT ON COLUMN daily_input_status.is_deleted IS '삭제여부';
|
COMMENT ON COLUMN daily_input_status.is_deleted IS '삭제여부';
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
-- 4. forest_product → forest_product_yield
|
-- 4. forest_product → forest_product_yield
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.expense.adapters.persistence.model;
|
package app.module.front.usecase.daily.expense.adapters.persistence.model;
|
||||||
|
|
||||||
|
import app.module.front.usecase.daily.income.adapters.web.model.DailyInputType;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
@@ -8,12 +9,11 @@ import lombok.Setter;
|
|||||||
public class DailyExpenseDto {
|
public class DailyExpenseDto {
|
||||||
private Long id;
|
private Long id;
|
||||||
private Long dailyRecordSeq;
|
private Long dailyRecordSeq;
|
||||||
// TODO : SELF, OCR
|
private DailyInputType inputType;
|
||||||
private String inputType;
|
|
||||||
private Boolean credit;
|
private Boolean credit;
|
||||||
private String categorySelf;
|
private String expenseKind;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Double quantity;
|
private String quantity;
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitLabel;
|
private String unitLabel;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.expense.adapters.web.model;
|
package app.module.front.usecase.daily.expense.adapters.web.model;
|
||||||
|
|
||||||
|
import app.module.front.usecase.daily.income.adapters.web.model.DailyInputType;
|
||||||
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
import app.module.front.usecase.daily.record.adapters.web.model.DailyUIReqVO;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -19,9 +20,9 @@ public class CreateDailyExpenseReqVO extends DailyUIReqVO {
|
|||||||
*/
|
*/
|
||||||
private Long dailyRecordSeq;
|
private Long dailyRecordSeq;
|
||||||
/**
|
/**
|
||||||
* 등록 유형(SELF, OCR)
|
* 등록 유형
|
||||||
*/
|
*/
|
||||||
private String inputType;
|
private DailyInputType inputType;
|
||||||
/**
|
/**
|
||||||
* 외상판매 여부
|
* 외상판매 여부
|
||||||
*/
|
*/
|
||||||
@@ -30,7 +31,7 @@ public class CreateDailyExpenseReqVO extends DailyUIReqVO {
|
|||||||
* 지출의 종류 직접입력
|
* 지출의 종류 직접입력
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "지출 종류를 입력해 주세요.")
|
@NotBlank(message = "지출 종류를 입력해 주세요.")
|
||||||
private String categorySelf;
|
private String expenseKind;
|
||||||
/**
|
/**
|
||||||
* 용도
|
* 용도
|
||||||
*/
|
*/
|
||||||
@@ -45,7 +46,7 @@ public class CreateDailyExpenseReqVO extends DailyUIReqVO {
|
|||||||
*/
|
*/
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
/**
|
/**
|
||||||
* 단위 직접입력
|
* 단위 직접 입력
|
||||||
*/
|
*/
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -94,11 +94,11 @@ public class DailyExpenseService implements DailyExpensePortIn {
|
|||||||
new CreateDailyExpenseCmd(
|
new CreateDailyExpenseCmd(
|
||||||
formVO.getId(),
|
formVO.getId(),
|
||||||
formVO.getDailyRecordSeq(),
|
formVO.getDailyRecordSeq(),
|
||||||
(formVO.getCredit() ? "52210" : null), // [정책] 외상판매 Y 일 경우 수입부호 52210 적재
|
|
||||||
null,
|
|
||||||
formVO.getInputType(),
|
formVO.getInputType(),
|
||||||
|
"2", // [정책] 2 고정
|
||||||
|
(formVO.getCredit() ? "52210" : null), // [정책] 외상판매 Y 일 경우 수입부호 52210 적재
|
||||||
formVO.getCredit(),
|
formVO.getCredit(),
|
||||||
formVO.getCategorySelf(),
|
formVO.getExpenseKind(),
|
||||||
formVO.getSourcePurpose(),
|
formVO.getSourcePurpose(),
|
||||||
formVO.getQuantity(),
|
formVO.getQuantity(),
|
||||||
formVO.getUnitCode(),
|
formVO.getUnitCode(),
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package app.module.front.usecase.daily.expense.ports.application.domain;
|
package app.module.front.usecase.daily.expense.ports.application.domain;
|
||||||
|
|
||||||
import app.module.front.config.adapters.persistence.component.FrontAuditCommand;
|
import app.module.front.config.adapters.persistence.component.FrontAuditCommand;
|
||||||
|
import app.module.front.usecase.daily.income.adapters.web.model.DailyInputType;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -13,11 +14,17 @@ import lombok.ToString;
|
|||||||
public class CreateDailyExpenseCmd extends FrontAuditCommand {
|
public class CreateDailyExpenseCmd extends FrontAuditCommand {
|
||||||
private Long id;
|
private Long id;
|
||||||
private Long dailyRecordSeq;
|
private Long dailyRecordSeq;
|
||||||
|
private DailyInputType inputType;
|
||||||
|
/**
|
||||||
|
* 유형
|
||||||
|
*/
|
||||||
|
private String category;
|
||||||
|
/**
|
||||||
|
* 수입 부호
|
||||||
|
*/
|
||||||
private String incomeMark;
|
private String incomeMark;
|
||||||
private String expenseMark;
|
|
||||||
private String inputType;
|
|
||||||
private Boolean credit;
|
private Boolean credit;
|
||||||
private String categorySelf;
|
private String expenseKind;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Double quantity;
|
private Double quantity;
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
|
|||||||
@@ -1,23 +1,21 @@
|
|||||||
package app.module.front.usecase.daily.income.adapters.persistence.model;
|
package app.module.front.usecase.daily.income.adapters.persistence.model;
|
||||||
|
|
||||||
|
import app.module.front.usecase.daily.income.adapters.web.model.DailyInputType;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class DailyIncomeDto {
|
public class DailyIncomeDto {
|
||||||
private Long id;
|
private Long id;
|
||||||
private Long dailyRecordSeq;
|
private Long dailyRecordSeq;
|
||||||
// TODO : SELF, OCR
|
private DailyInputType inputType;
|
||||||
private String inputType;
|
|
||||||
private Boolean credit;
|
private Boolean credit;
|
||||||
private String cropCode;
|
private String cropCode;
|
||||||
private String cropLabel;
|
private String cropLabel;
|
||||||
private String categorySelf;
|
private String incomeKind;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Double quantity;
|
private String quantity;
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
private String unitLabel;
|
private String unitLabel;
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ public class CreateDailyIncomeReqVO extends DailyUIReqVO {
|
|||||||
*/
|
*/
|
||||||
private Long dailyRecordSeq;
|
private Long dailyRecordSeq;
|
||||||
/**
|
/**
|
||||||
* 등록 유형(SELF, OCR)
|
* 등록 유형
|
||||||
*/
|
*/
|
||||||
private String inputType;
|
private DailyInputType inputType;
|
||||||
/**
|
/**
|
||||||
* 외상판매 여부
|
* 외상판매 여부
|
||||||
*/
|
*/
|
||||||
@@ -34,7 +34,7 @@ public class CreateDailyIncomeReqVO extends DailyUIReqVO {
|
|||||||
* 수입의 종류 직접입력
|
* 수입의 종류 직접입력
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "수입 종류를 입력해 주세요.")
|
@NotBlank(message = "수입 종류를 입력해 주세요.")
|
||||||
private String categorySelf;
|
private String incomeKind;
|
||||||
/**
|
/**
|
||||||
* 수입원
|
* 수입원
|
||||||
*/
|
*/
|
||||||
@@ -49,7 +49,7 @@ public class CreateDailyIncomeReqVO extends DailyUIReqVO {
|
|||||||
*/
|
*/
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
/**
|
/**
|
||||||
* 단위 직접입력
|
* 단위 직접 입력
|
||||||
*/
|
*/
|
||||||
private String unitSelf;
|
private String unitSelf;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package app.module.front.usecase.daily.income.adapters.web.model;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
public enum DailyInputType {
|
||||||
|
/**
|
||||||
|
* 직접 입력
|
||||||
|
*/
|
||||||
|
SELF,
|
||||||
|
/**
|
||||||
|
* 영수증 입력
|
||||||
|
*/
|
||||||
|
OCR,
|
||||||
|
;
|
||||||
|
}
|
||||||
@@ -97,12 +97,12 @@ public class DailyIncomeService implements DailyIncomePortIn {
|
|||||||
new CreateDailyIncomeCmd(
|
new CreateDailyIncomeCmd(
|
||||||
formVO.getId(),
|
formVO.getId(),
|
||||||
formVO.getDailyRecordSeq(),
|
formVO.getDailyRecordSeq(),
|
||||||
null,
|
|
||||||
(formVO.getCredit() ? "91206" : null), // [정책] 외상판매 Y 일 경우 지출부호 91206 적재
|
|
||||||
formVO.getInputType(),
|
formVO.getInputType(),
|
||||||
|
"1", // [정책] 1 고정
|
||||||
|
(formVO.getCredit() ? "91206" : null), // [정책] 외상판매 Y 일 경우 지출부호 91206 적재
|
||||||
formVO.getCredit(),
|
formVO.getCredit(),
|
||||||
formVO.getCropCode(),
|
formVO.getCropCode(),
|
||||||
formVO.getCategorySelf(),
|
formVO.getIncomeKind(),
|
||||||
formVO.getSourcePurpose(),
|
formVO.getSourcePurpose(),
|
||||||
formVO.getQuantity(),
|
formVO.getQuantity(),
|
||||||
formVO.getUnitCode(),
|
formVO.getUnitCode(),
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package app.module.front.usecase.daily.income.ports.application.domain;
|
package app.module.front.usecase.daily.income.ports.application.domain;
|
||||||
|
|
||||||
import app.module.front.config.adapters.persistence.component.FrontAuditCommand;
|
import app.module.front.config.adapters.persistence.component.FrontAuditCommand;
|
||||||
|
import app.module.front.usecase.daily.income.adapters.web.model.DailyInputType;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
@@ -13,12 +14,18 @@ import lombok.ToString;
|
|||||||
public class CreateDailyIncomeCmd extends FrontAuditCommand {
|
public class CreateDailyIncomeCmd extends FrontAuditCommand {
|
||||||
private Long id;
|
private Long id;
|
||||||
private Long dailyRecordSeq;
|
private Long dailyRecordSeq;
|
||||||
private String incomeMark;
|
private DailyInputType inputType;
|
||||||
|
/**
|
||||||
|
* 유형
|
||||||
|
*/
|
||||||
|
private String category;
|
||||||
|
/**
|
||||||
|
* 지출 부호
|
||||||
|
*/
|
||||||
private String expenseMark;
|
private String expenseMark;
|
||||||
private String inputType;
|
|
||||||
private Boolean credit;
|
private Boolean credit;
|
||||||
private String cropCode;
|
private String cropCode;
|
||||||
private String categorySelf;
|
private String incomeKind;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Double quantity;
|
private Double quantity;
|
||||||
private String unitCode;
|
private String unitCode;
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ public class DailyPowerDto {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private Long dailyRecordSeq;
|
private Long dailyRecordSeq;
|
||||||
private String equipmentName;
|
private String equipmentName;
|
||||||
private Integer ownedHours;
|
private String ownedHours;
|
||||||
private Integer leasedHours;
|
private String leasedHours;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 수정 가능 여부
|
* 수정 가능 여부
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ public class CreateDailyPowerReqVO extends DailyUIReqVO {
|
|||||||
/**
|
/**
|
||||||
* 자가 사용시간
|
* 자가 사용시간
|
||||||
*/
|
*/
|
||||||
private Integer ownedHours;
|
private Double ownedHours;
|
||||||
/**
|
/**
|
||||||
* 임차 사용시간
|
* 임차 사용시간
|
||||||
*/
|
*/
|
||||||
private Integer leasedHours;
|
private Double leasedHours;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,8 +66,6 @@ public class DailyPowerService implements DailyPowerPortIn {
|
|||||||
new CreateDailyPowerCmd(
|
new CreateDailyPowerCmd(
|
||||||
formVO.getId(),
|
formVO.getId(),
|
||||||
formVO.getDailyRecordSeq(),
|
formVO.getDailyRecordSeq(),
|
||||||
null,
|
|
||||||
null,
|
|
||||||
formVO.getEquipmentName(),
|
formVO.getEquipmentName(),
|
||||||
formVO.getOwnedHours(),
|
formVO.getOwnedHours(),
|
||||||
formVO.getLeasedHours()));
|
formVO.getLeasedHours()));
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ import lombok.ToString;
|
|||||||
public class CreateDailyPowerCmd extends FrontAuditCommand {
|
public class CreateDailyPowerCmd extends FrontAuditCommand {
|
||||||
private Long id;
|
private Long id;
|
||||||
private Long dailyRecordSeq;
|
private Long dailyRecordSeq;
|
||||||
private String incomeMark;
|
|
||||||
private String expenseMark;
|
|
||||||
private String equipmentName;
|
private String equipmentName;
|
||||||
private Integer ownedHours;
|
private Double ownedHours;
|
||||||
private Integer leasedHours;
|
private Double leasedHours;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public class DailyWorkDto {
|
|||||||
private String itemMark;
|
private String itemMark;
|
||||||
private String workName;
|
private String workName;
|
||||||
private String workMark;
|
private String workMark;
|
||||||
private Double workLandArea;
|
private String workLandArea;
|
||||||
private String areaUnitCode;
|
private String areaUnitCode;
|
||||||
private String areaUnitLabel;
|
private String areaUnitLabel;
|
||||||
private String areaUnitSelf;
|
private String areaUnitSelf;
|
||||||
@@ -20,16 +20,16 @@ public class DailyWorkDto {
|
|||||||
private String harvestUnitCode;
|
private String harvestUnitCode;
|
||||||
private String harvestUnitLabel;
|
private String harvestUnitLabel;
|
||||||
private String harvestUnitSelf;
|
private String harvestUnitSelf;
|
||||||
private Double ownerTime;
|
private String ownerTime;
|
||||||
private Double spouseTime;
|
private String spouseTime;
|
||||||
private Double familyMHours;
|
private String familyMHours;
|
||||||
private Double familyFHours;
|
private String familyFHours;
|
||||||
private Double hiredMHours;
|
private String hiredMHours;
|
||||||
private Double hiredFHours;
|
private String hiredFHours;
|
||||||
private Double sharedMHours;
|
private String sharedMHours;
|
||||||
private Double sharedFHours;
|
private String sharedFHours;
|
||||||
private Double volunteerMHours;
|
private String volunteerMHours;
|
||||||
private Double volunteerFHours;
|
private String volunteerFHours;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 수정 가능 여부
|
* 수정 가능 여부
|
||||||
|
|||||||
@@ -24,19 +24,11 @@ public class CreateDailyWorkReqVO extends DailyUIReqVO {
|
|||||||
*/
|
*/
|
||||||
@NotBlank(message = "품목명을 입력해 주세요.")
|
@NotBlank(message = "품목명을 입력해 주세요.")
|
||||||
private String itemName;
|
private String itemName;
|
||||||
/**
|
|
||||||
* 품목부호
|
|
||||||
*/
|
|
||||||
private Boolean itemMark;
|
|
||||||
/**
|
/**
|
||||||
* 작업명
|
* 작업명
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "작업명을 입력해 주세요.")
|
@NotBlank(message = "작업명을 입력해 주세요.")
|
||||||
private String workName;
|
private String workName;
|
||||||
/**
|
|
||||||
* 작업 부호
|
|
||||||
*/
|
|
||||||
private String workMark;
|
|
||||||
/**
|
/**
|
||||||
* 작업 면적
|
* 작업 면적
|
||||||
*/
|
*/
|
||||||
@@ -52,8 +44,7 @@ public class CreateDailyWorkReqVO extends DailyUIReqVO {
|
|||||||
/**
|
/**
|
||||||
* 수확량
|
* 수확량
|
||||||
*/
|
*/
|
||||||
@NotBlank(message = "수확량을 입력해 주세요.")
|
private Double harvestQuantity;
|
||||||
private String harvestQuantity;
|
|
||||||
/**
|
/**
|
||||||
* 수확량 단위 코드
|
* 수확량 단위 코드
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -20,14 +20,10 @@ public class CreateDailyWorkValidator implements Validator {
|
|||||||
public void validate(Object target, Errors errors) {
|
public void validate(Object target, Errors errors) {
|
||||||
CreateDailyWorkReqVO vo = (CreateDailyWorkReqVO) target;
|
CreateDailyWorkReqVO vo = (CreateDailyWorkReqVO) target;
|
||||||
|
|
||||||
if (vo.getOwnerTime() == null && vo.getSpouseTime() == null
|
if (vo.getHarvestQuantity() == null) {
|
||||||
&& vo.getFamilyMHours() == null && vo.getFamilyFHours() == null
|
|
||||||
&& vo.getHiredMHours() == null && vo.getHiredFHours() == null
|
|
||||||
&& vo.getSharedMHours() == null && vo.getSharedFHours() == null
|
|
||||||
&& vo.getVolunteerMHours() == null && vo.getVolunteerFHours() == null) {
|
|
||||||
errors.rejectValue(
|
errors.rejectValue(
|
||||||
"ownerTime", "valid.common.required",
|
"harvestQuantity", "valid.common.required",
|
||||||
"최소 1개의 항목을 입력해주세요.");
|
"수확량을 입력해 주세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("SELF".equals(vo.getAreaUnitCode()) && StringUtils.isBlank(vo.getAreaUnitSelf())) {
|
if ("SELF".equals(vo.getAreaUnitCode()) && StringUtils.isBlank(vo.getAreaUnitSelf())) {
|
||||||
@@ -41,5 +37,15 @@ public class CreateDailyWorkValidator implements Validator {
|
|||||||
"harvestUnitSelf", "valid.common.required",
|
"harvestUnitSelf", "valid.common.required",
|
||||||
"단위를 입력해 주세요.");
|
"단위를 입력해 주세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vo.getOwnerTime() == null && vo.getSpouseTime() == null
|
||||||
|
&& vo.getFamilyMHours() == null && vo.getFamilyFHours() == null
|
||||||
|
&& vo.getHiredMHours() == null && vo.getHiredFHours() == null
|
||||||
|
&& vo.getSharedMHours() == null && vo.getSharedFHours() == null
|
||||||
|
&& vo.getVolunteerMHours() == null && vo.getVolunteerFHours() == null) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"ownerTime", "valid.common.required",
|
||||||
|
"최소 1개의 항목을 입력해주세요.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,9 +101,7 @@ public class DailyWorkService implements DailyWorkPortIn {
|
|||||||
formVO.getId(),
|
formVO.getId(),
|
||||||
formVO.getDailyRecordSeq(),
|
formVO.getDailyRecordSeq(),
|
||||||
formVO.getItemName(),
|
formVO.getItemName(),
|
||||||
null,
|
|
||||||
formVO.getWorkName(),
|
formVO.getWorkName(),
|
||||||
null,
|
|
||||||
formVO.getWorkLandArea(),
|
formVO.getWorkLandArea(),
|
||||||
formVO.getAreaUnitCode(),
|
formVO.getAreaUnitCode(),
|
||||||
formVO.getAreaUnitSelf(),
|
formVO.getAreaUnitSelf(),
|
||||||
|
|||||||
@@ -14,13 +14,11 @@ public class CreateDailyWorkCmd extends FrontAuditCommand {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private Long dailyRecordSeq;
|
private Long dailyRecordSeq;
|
||||||
private String itemName;
|
private String itemName;
|
||||||
private String itemMark;
|
|
||||||
private String workName;
|
private String workName;
|
||||||
private String workMark;
|
|
||||||
private Double workLandArea;
|
private Double workLandArea;
|
||||||
private String areaUnitCode;
|
private String areaUnitCode;
|
||||||
private String areaUnitSelf;
|
private String areaUnitSelf;
|
||||||
private String harvestQuantity;
|
private Double harvestQuantity;
|
||||||
private String harvestUnitCode;
|
private String harvestUnitCode;
|
||||||
private String harvestUnitSelf;
|
private String harvestUnitSelf;
|
||||||
private Double ownerTime;
|
private Double ownerTime;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<select id="getDailyExpenseList"
|
<select id="getDailyExpenseList"
|
||||||
resultType="app.module.front.usecase.daily.expense.adapters.persistence.model.DailyExpenseDto">
|
resultType="app.module.front.usecase.daily.expense.adapters.persistence.model.DailyExpenseDto">
|
||||||
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
||||||
, ds.category_self, ds.source_purpose
|
, ds.expense_kind, ds.source_purpose
|
||||||
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
||||||
from daily_expense ds
|
from daily_expense ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
@@ -29,14 +29,14 @@
|
|||||||
|
|
||||||
<insert id="createDailyExpense" useGeneratedKeys="true" keyProperty="id">
|
<insert id="createDailyExpense" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into daily_expense (
|
insert into daily_expense (
|
||||||
daily_record_seq, income_mark, expense_mark
|
daily_record_seq, input_type, category, income_mark
|
||||||
, input_type, is_credit, category_self, source_purpose
|
, is_credit, expense_kind, source_purpose
|
||||||
, quantity, unit_code, unit_self, price, estimated_value
|
, quantity, unit_code, unit_self, price, estimated_value
|
||||||
, is_deleted
|
, is_deleted
|
||||||
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||||
) values (
|
) values (
|
||||||
#{dailyRecordSeq}, #{incomeMark}, #{expenseMark}
|
#{dailyRecordSeq}, #{inputType}, #{category}, #{incomeMark}
|
||||||
, #{inputType}, #{credit}, #{categorySelf}, #{sourcePurpose}
|
, #{credit}, #{expenseKind}, #{sourcePurpose}
|
||||||
, #{quantity}, #{unitCode}, #{unitSelf}, #{price}, #{estimatedValue}
|
, #{quantity}, #{unitCode}, #{unitSelf}, #{price}, #{estimatedValue}
|
||||||
, false
|
, false
|
||||||
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
||||||
@@ -47,8 +47,7 @@
|
|||||||
update daily_expense set <include refid="common.fields.UpdateBaseSet"/>
|
update daily_expense set <include refid="common.fields.UpdateBaseSet"/>
|
||||||
, is_credit = #{credit}
|
, is_credit = #{credit}
|
||||||
, income_mark = #{incomeMark}
|
, income_mark = #{incomeMark}
|
||||||
, expense_mark = #{expenseMark}
|
, expense_kind = #{expenseKind}
|
||||||
, category_self = #{categorySelf}
|
|
||||||
, source_purpose = #{sourcePurpose}
|
, source_purpose = #{sourcePurpose}
|
||||||
, quantity = #{quantity}
|
, quantity = #{quantity}
|
||||||
, unit_code = #{unitCode}
|
, unit_code = #{unitCode}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<select id="getDailyIncomeList"
|
<select id="getDailyIncomeList"
|
||||||
resultType="app.module.front.usecase.daily.income.adapters.persistence.model.DailyIncomeDto">
|
resultType="app.module.front.usecase.daily.income.adapters.persistence.model.DailyIncomeDto">
|
||||||
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
||||||
, ds.crop_code, ds.category_self, ds.source_purpose
|
, ds.crop_code, ds.income_kind, ds.source_purpose
|
||||||
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
||||||
from daily_income ds
|
from daily_income ds
|
||||||
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.front.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
@@ -29,14 +29,14 @@
|
|||||||
|
|
||||||
<insert id="createDailyIncome" useGeneratedKeys="true" keyProperty="id">
|
<insert id="createDailyIncome" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into daily_income (
|
insert into daily_income (
|
||||||
daily_record_seq, income_mark, expense_mark
|
daily_record_seq, input_type, category, expense_mark
|
||||||
, input_type, is_credit, crop_code, category_self, source_purpose
|
, is_credit, crop_code, income_kind, source_purpose
|
||||||
, quantity, unit_code, unit_self, price, estimated_value
|
, quantity, unit_code, unit_self, price, estimated_value
|
||||||
, is_deleted
|
, is_deleted
|
||||||
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||||
) values (
|
) values (
|
||||||
#{dailyRecordSeq}, #{incomeMark}, #{expenseMark}
|
#{dailyRecordSeq}, #{inputType}, #{category}, #{expenseMark}
|
||||||
, #{inputType}, #{credit}, #{cropCode}, #{categorySelf}, #{sourcePurpose}
|
, #{credit}, #{cropCode}, #{incomeKind}, #{sourcePurpose}
|
||||||
, #{quantity}, #{unitCode}, #{unitSelf}, #{price}, #{estimatedValue}
|
, #{quantity}, #{unitCode}, #{unitSelf}, #{price}, #{estimatedValue}
|
||||||
, false
|
, false
|
||||||
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
||||||
@@ -46,10 +46,9 @@
|
|||||||
<update id="updateDailyIncome">
|
<update id="updateDailyIncome">
|
||||||
update daily_income set <include refid="common.fields.UpdateBaseSet"/>
|
update daily_income set <include refid="common.fields.UpdateBaseSet"/>
|
||||||
, is_credit = #{credit}
|
, is_credit = #{credit}
|
||||||
, income_mark = #{incomeMark}
|
|
||||||
, expense_mark = #{expenseMark}
|
, expense_mark = #{expenseMark}
|
||||||
, crop_code = #{cropCode}
|
, crop_code = #{cropCode}
|
||||||
, category_self = #{categorySelf}
|
, income_kind = #{incomeKind}
|
||||||
, source_purpose = #{sourcePurpose}
|
, source_purpose = #{sourcePurpose}
|
||||||
, quantity = #{quantity}
|
, quantity = #{quantity}
|
||||||
, unit_code = #{unitCode}
|
, unit_code = #{unitCode}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<select id="getDailyWorkList"
|
<select id="getDailyWorkList"
|
||||||
resultType="app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto">
|
resultType="app.module.front.usecase.daily.work.adapters.persistence.model.DailyWorkDto">
|
||||||
select ds.id, ds.daily_record_seq
|
select ds.id, ds.daily_record_seq
|
||||||
, ds.item_name, ds.item_mark, ds.work_name, ds.work_mark
|
, ds.item_name, ds.work_name
|
||||||
, ds.work_land_area, ds.area_unit_code, ds.area_unit_self, ds.harvest_quantity, ds.harvest_unit_code, ds.harvest_unit_self
|
, ds.work_land_area, ds.area_unit_code, ds.area_unit_self, ds.harvest_quantity, ds.harvest_unit_code, ds.harvest_unit_self
|
||||||
, ds.owner_time, ds.spouse_time, ds.family_m_hours, ds.family_f_hours, ds.hired_m_hours
|
, ds.owner_time, ds.spouse_time, ds.family_m_hours, ds.family_f_hours, ds.hired_m_hours
|
||||||
, ds.hired_f_hours, ds.shared_m_hours, ds.shared_f_hours, ds.volunteer_m_hours, ds.volunteer_f_hours
|
, ds.hired_f_hours, ds.shared_m_hours, ds.shared_f_hours, ds.volunteer_m_hours, ds.volunteer_f_hours
|
||||||
@@ -33,14 +33,14 @@
|
|||||||
<insert id="createDailyWork" useGeneratedKeys="true" keyProperty="id">
|
<insert id="createDailyWork" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into daily_work (
|
insert into daily_work (
|
||||||
daily_record_seq
|
daily_record_seq
|
||||||
, item_name, item_mark, work_name, work_mark
|
, item_name, work_name
|
||||||
, work_land_area, area_unit_code, area_unit_self, harvest_quantity, harvest_unit_code, harvest_unit_self
|
, work_land_area, area_unit_code, area_unit_self, harvest_quantity, harvest_unit_code, harvest_unit_self
|
||||||
, owner_time, spouse_time, family_m_hours, family_f_hours, hired_m_hours, hired_f_hours, shared_m_hours, shared_f_hours, volunteer_m_hours, volunteer_f_hours
|
, owner_time, spouse_time, family_m_hours, family_f_hours, hired_m_hours, hired_f_hours, shared_m_hours, shared_f_hours, volunteer_m_hours, volunteer_f_hours
|
||||||
, is_deleted
|
, is_deleted
|
||||||
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||||
) values (
|
) values (
|
||||||
#{dailyRecordSeq}
|
#{dailyRecordSeq}
|
||||||
, #{itemName}, #{itemMark}, #{workName}, #{workMark}
|
, #{itemName}, #{workName}
|
||||||
, #{workLandArea}, #{areaUnitCode}, #{areaUnitSelf}, #{harvestQuantity}, #{harvestUnitCode}, #{harvestUnitSelf}
|
, #{workLandArea}, #{areaUnitCode}, #{areaUnitSelf}, #{harvestQuantity}, #{harvestUnitCode}, #{harvestUnitSelf}
|
||||||
, #{ownerTime}, #{spouseTime}, #{familyMHours}, #{familyFHours}, #{hiredMHours}, #{hiredFHours}, #{sharedMHours}, #{sharedFHours}, #{volunteerMHours}, #{volunteerFHours}
|
, #{ownerTime}, #{spouseTime}, #{familyMHours}, #{familyFHours}, #{hiredMHours}, #{hiredFHours}, #{sharedMHours}, #{sharedFHours}, #{volunteerMHours}, #{volunteerFHours}
|
||||||
, false
|
, false
|
||||||
@@ -51,9 +51,7 @@
|
|||||||
<update id="updateDailyWork">
|
<update id="updateDailyWork">
|
||||||
update daily_work set <include refid="common.fields.UpdateBaseSet"/>
|
update daily_work set <include refid="common.fields.UpdateBaseSet"/>
|
||||||
, item_name = #{itemName}
|
, item_name = #{itemName}
|
||||||
, item_mark = #{itemMark}
|
|
||||||
, work_name = #{workName}
|
, work_name = #{workName}
|
||||||
, work_mark = #{workMark}
|
|
||||||
, work_land_area = #{workLandArea}
|
, work_land_area = #{workLandArea}
|
||||||
, area_unit_code = #{areaUnitCode}
|
, area_unit_code = #{areaUnitCode}
|
||||||
, area_unit_self = #{areaUnitSelf}
|
, area_unit_self = #{areaUnitSelf}
|
||||||
|
|||||||
@@ -48,12 +48,12 @@
|
|||||||
<section class="form-group">
|
<section class="form-group">
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
<label for="categorySelf" class="label-txt">
|
<label for="expenseKind" class="label-txt">
|
||||||
지출의 종류<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
지출의 종류<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="text" id="categorySelf" name="categorySelf" th:value="${detail.categorySelf}" maxlength="30" placeholder="지출의 종류를 입력해 주세요">
|
<input type="text" id="expenseKind" name="expenseKind" th:value="${detail.expenseKind}" maxlength="30" placeholder="지출의 종류를 입력해 주세요">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<div class="list-item"
|
<div class="list-item"
|
||||||
th:each="item, itemStatus : ${expenseList}">
|
th:each="item, itemStatus : ${expenseList}">
|
||||||
<div class="item-tit-group">
|
<div class="item-tit-group">
|
||||||
<p class="item-name">[[${item.categorySelf}]]</p>
|
<p class="item-name">[[${item.expenseKind}]]</p>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
|
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
|
||||||
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
|
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
|
||||||
|
|||||||
@@ -78,12 +78,12 @@
|
|||||||
<section class="form-group">
|
<section class="form-group">
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
<label for="categorySelf" class="label-txt">
|
<label for="incomeKind" class="label-txt">
|
||||||
수입의 종류<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
수입의 종류<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="text" id="categorySelf" name="categorySelf" th:value="${detail.categorySelf}" maxlength="30" placeholder="수입의 종류를 입력해 주세요">
|
<input type="text" id="incomeKind" name="incomeKind" th:value="${detail.incomeKind}" maxlength="30" placeholder="수입의 종류를 입력해 주세요">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<div class="list-item"
|
<div class="list-item"
|
||||||
th:each="item, itemStatus : ${incomeList}">
|
th:each="item, itemStatus : ${incomeList}">
|
||||||
<div class="item-tit-group">
|
<div class="item-tit-group">
|
||||||
<p class="item-name">[[${item.categorySelf}]]</p>
|
<p class="item-name">[[${item.incomeKind}]]</p>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
|
<button type="button" class="delete" th:onclick="krip.daily.removeConfirm([[${item.id}]])"><span class="hide-txt">삭제</span></button>
|
||||||
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
|
<button type="button" class="edit" th:onclick="krip.daily.createModal([[${item.id}]])"><span class="hide-txt">수정</span></button>
|
||||||
|
|||||||
@@ -108,7 +108,8 @@
|
|||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="text" id="harvestQuantity" name="harvestQuantity" th:value="${detail.harvestQuantity}" maxlength="10" placeholder="수확량을 입력해 주세요">
|
<input type="number" inputmode="decimal" pattern="[0-9]*" id="harvestQuantity" name="harvestQuantity"
|
||||||
|
th:value="${detail.harvestQuantity}" maxlength="10" placeholder="수확량을 입력해 주세요">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="select-group">
|
<div class="select-group">
|
||||||
|
|||||||
Reference in New Issue
Block a user