[FO] 일계수 수입/지출의 종류 selectbox 에서 input 으로 변경
This commit is contained in:
@@ -16,7 +16,6 @@ public class CreateDailyExpenseCmd extends FrontAuditCommand {
|
||||
private String inputType;
|
||||
private Boolean credit;
|
||||
private String incomeMarkCode;
|
||||
private String categoryCode;
|
||||
private String categorySelf;
|
||||
private String sourcePurpose;
|
||||
private Integer quantity;
|
||||
|
||||
@@ -11,8 +11,6 @@ public class DailyExpenseDto {
|
||||
// TODO : SELF, OCR
|
||||
private String inputType;
|
||||
private Boolean credit;
|
||||
private String categoryCode;
|
||||
private String categoryLabel;
|
||||
private String categorySelf;
|
||||
private String sourcePurpose;
|
||||
private Integer quantity;
|
||||
|
||||
@@ -41,11 +41,9 @@ public class DailyExpenseServiceImpl implements DailyExpenseService {
|
||||
private List<DailyExpenseDto> getRefineIncomeList(DailyExpenseUIReqVO reqVO) {
|
||||
List<DailyExpenseDto> list = DailyExpenseMapper.getDailyExpenseList(reqVO);
|
||||
|
||||
List<UICodeElement> recordIncome = uiCodeListPortIn.connect("code.record.expense");
|
||||
List<UICodeElement> recordUnit = uiCodeListPortIn.connect("code.record.unit");
|
||||
|
||||
for (DailyExpenseDto dto : list) {
|
||||
dto.setCategoryLabel(this.getCodeLabel(dto.getCategoryCode(), recordIncome));
|
||||
dto.setUnitLabel(this.getCodeLabel(dto.getUnitCode(), recordUnit));
|
||||
}
|
||||
|
||||
@@ -79,7 +77,6 @@ public class DailyExpenseServiceImpl implements DailyExpenseService {
|
||||
formVO.getInputType(),
|
||||
formVO.getCredit(),
|
||||
(formVO.getCredit() ? "52210" : null), // [정책] 외상판매 Y 일 경우 수입부호 52210 적재
|
||||
formVO.getCategoryCode(),
|
||||
formVO.getCategorySelf(),
|
||||
formVO.getSourcePurpose(),
|
||||
formVO.getQuantity(),
|
||||
|
||||
@@ -82,7 +82,6 @@ public class DailyExpenseUIController {
|
||||
}
|
||||
}
|
||||
|
||||
model.addAttribute("recordExpense", uiCodeListPortIn.connect("code.record.expense"));
|
||||
model.addAttribute("recordCrop", uiCodeListPortIn.connect("code.record.crop"));
|
||||
model.addAttribute("recordUnit", uiCodeListPortIn.connect("code.record.unit"));
|
||||
|
||||
|
||||
@@ -26,14 +26,10 @@ public class CreateDailyExpenseReqVO extends DailyUIReqVO {
|
||||
* 외상판매 여부
|
||||
*/
|
||||
private Boolean credit;
|
||||
/**
|
||||
* 지출의 종류 코드
|
||||
*/
|
||||
@NotBlank(message = "지출 종류를 선택해 주세요.")
|
||||
private String categoryCode;
|
||||
/**
|
||||
* 지출의 종류 직접입력
|
||||
*/
|
||||
@NotBlank(message = "지출 종류를 입력해 주세요.")
|
||||
private String categorySelf;
|
||||
/**
|
||||
* 용도
|
||||
|
||||
@@ -20,18 +20,6 @@ public class CreateDailyExpenseValidator implements Validator {
|
||||
public void validate(Object target, Errors errors) {
|
||||
CreateDailyExpenseReqVO vo = (CreateDailyExpenseReqVO) target;
|
||||
|
||||
if (StringUtils.isBlank(vo.getCategoryCode())) {
|
||||
errors.rejectValue(
|
||||
"categoryCode", "valid.common.required",
|
||||
"지출 종류를 선택해 주세요.");
|
||||
}
|
||||
|
||||
if ("SELF".equals(vo.getCategoryCode()) && StringUtils.isBlank(vo.getCategorySelf())) {
|
||||
errors.rejectValue(
|
||||
"categorySelf", "valid.common.required",
|
||||
"지출 종류를 입력해 주세요.");
|
||||
}
|
||||
|
||||
if (vo.getPrice() == null && vo.getEstimatedValue() == null) {
|
||||
errors.rejectValue(
|
||||
"price", "valid.common.required",
|
||||
|
||||
@@ -18,7 +18,6 @@ public class CreateDailyIncomeCmd extends FrontAuditCommand {
|
||||
private Boolean credit;
|
||||
private String cropCode;
|
||||
private String expenseMarkCode;
|
||||
private String categoryCode;
|
||||
private String categorySelf;
|
||||
private String sourcePurpose;
|
||||
private Integer quantity;
|
||||
|
||||
@@ -15,8 +15,6 @@ public class DailyIncomeDto {
|
||||
private Boolean credit;
|
||||
private String cropCode;
|
||||
private String cropLabel;
|
||||
private String categoryCode;
|
||||
private String categoryLabel;
|
||||
private String categorySelf;
|
||||
private String sourcePurpose;
|
||||
private Integer quantity;
|
||||
|
||||
@@ -41,12 +41,10 @@ public class DailyIncomeServiceImpl implements DailyIncomeService {
|
||||
private List<DailyIncomeDto> getRefineIncomeList(DailyIncomeUIReqVO reqVO) {
|
||||
List<DailyIncomeDto> list = dailyIncomeMapper.getDailyIncomeList(reqVO);
|
||||
|
||||
List<UICodeElement> recordIncome = uiCodeListPortIn.connect("code.record.income");
|
||||
List<UICodeElement> recordCrop = uiCodeListPortIn.connect("code.record.crop");
|
||||
List<UICodeElement> recordUnit = uiCodeListPortIn.connect("code.record.unit");
|
||||
|
||||
for (DailyIncomeDto dto : list) {
|
||||
dto.setCategoryLabel(this.getCodeLabel(dto.getCategoryCode(), recordIncome));
|
||||
dto.setCropLabel(this.getCodeLabel(dto.getCropCode(), recordCrop));
|
||||
dto.setUnitLabel(this.getCodeLabel(dto.getUnitCode(), recordUnit));
|
||||
}
|
||||
@@ -82,7 +80,6 @@ public class DailyIncomeServiceImpl implements DailyIncomeService {
|
||||
formVO.getCredit(),
|
||||
formVO.getCropCode(),
|
||||
(formVO.getCredit() ? "91206" : null), // [정책] 외상판매 Y 일 경우 지출부호 91206 적재
|
||||
formVO.getCategoryCode(),
|
||||
formVO.getCategorySelf(),
|
||||
formVO.getSourcePurpose(),
|
||||
formVO.getQuantity(),
|
||||
|
||||
@@ -80,7 +80,6 @@ public class DailyIncomeUIController {
|
||||
}
|
||||
}
|
||||
|
||||
model.addAttribute("recordIncome", uiCodeListPortIn.connect("code.record.income"));
|
||||
model.addAttribute("recordCrop", uiCodeListPortIn.connect("code.record.crop"));
|
||||
model.addAttribute("recordUnit", uiCodeListPortIn.connect("code.record.unit"));
|
||||
|
||||
|
||||
@@ -30,14 +30,10 @@ public class CreateDailyIncomeReqVO extends DailyUIReqVO {
|
||||
* 재배형태 코드
|
||||
*/
|
||||
private String cropCode;
|
||||
/**
|
||||
* 수입의 종류 코드
|
||||
*/
|
||||
@NotBlank(message = "수입 종류를 선택해 주세요.")
|
||||
private String categoryCode;
|
||||
/**
|
||||
* 수입의 종류 직접입력
|
||||
*/
|
||||
@NotBlank(message = "수입 종류를 입력해 주세요.")
|
||||
private String categorySelf;
|
||||
/**
|
||||
* 수입원
|
||||
|
||||
@@ -23,18 +23,6 @@ public class CreateDailyIncomeValidator implements Validator {
|
||||
public void validate(Object target, Errors errors) {
|
||||
CreateDailyIncomeReqVO vo = (CreateDailyIncomeReqVO) target;
|
||||
|
||||
if (StringUtils.isBlank(vo.getCategoryCode())) {
|
||||
errors.rejectValue(
|
||||
"categoryCode", "valid.common.required",
|
||||
"수입 종류를 선택해 주세요.");
|
||||
}
|
||||
|
||||
if ("SELF".equals(vo.getCategoryCode()) && StringUtils.isBlank(vo.getCategorySelf())) {
|
||||
errors.rejectValue(
|
||||
"categorySelf", "valid.common.required",
|
||||
"수입 종류를 입력해 주세요.");
|
||||
}
|
||||
|
||||
if (vo.getPrice() == null && vo.getEstimatedValue() == null) {
|
||||
errors.rejectValue(
|
||||
"price", "valid.common.required",
|
||||
|
||||
Reference in New Issue
Block a user