diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/bankAutoTransfer/saveBankAutoTransferExpense/adapters/web/validator/SaveBankAutoTransferExpenseValidator.java b/admin/src/main/java/app/module/admin/usecase/household/tab/bankAutoTransfer/saveBankAutoTransferExpense/adapters/web/validator/SaveBankAutoTransferExpenseValidator.java index a3174173..0180d984 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/bankAutoTransfer/saveBankAutoTransferExpense/adapters/web/validator/SaveBankAutoTransferExpenseValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/bankAutoTransfer/saveBankAutoTransferExpense/adapters/web/validator/SaveBankAutoTransferExpenseValidator.java @@ -35,7 +35,7 @@ public class SaveBankAutoTransferExpenseValidator implements Validator { } // 수량 0 이상 입력 - if (StringUtils.hasText(vo.getCount()) && Integer.parseInt(vo.getCount()) == 0) { + if (StringUtils.hasText(vo.getCount()) && Integer.parseInt(vo.getCount()) <= 0) { errors.rejectValue( "count", CommonConstants.VALID_CODE_INVALID_ZERO, "수량은 0 이상 입력해 주세요."); @@ -68,7 +68,7 @@ public class SaveBankAutoTransferExpenseValidator implements Validator { "현금(원)을 입력해주세요."); } - if (vo.getPrice() != null && vo.getPrice() == 0) { + if (vo.getPrice() != null && vo.getPrice() <= 0) { errors.rejectValue( "price", CommonConstants.VALID_CODE_INVALID_ZERO, "현금(원)은 0 이상 입력해 주세요."); diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/bankAutoTransfer/saveBankAutoTransferIncome/adapters/web/validator/SaveBankAutoTransferIncomeValidator.java b/admin/src/main/java/app/module/admin/usecase/household/tab/bankAutoTransfer/saveBankAutoTransferIncome/adapters/web/validator/SaveBankAutoTransferIncomeValidator.java index d0ad9b51..f603d52a 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/bankAutoTransfer/saveBankAutoTransferIncome/adapters/web/validator/SaveBankAutoTransferIncomeValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/bankAutoTransfer/saveBankAutoTransferIncome/adapters/web/validator/SaveBankAutoTransferIncomeValidator.java @@ -44,7 +44,7 @@ public class SaveBankAutoTransferIncomeValidator implements Validator { } // 수량 0 이상 입력 - if (StringUtils.hasText(vo.getCount()) && Integer.parseInt(vo.getCount()) == 0) { + if (StringUtils.hasText(vo.getCount()) && Integer.parseInt(vo.getCount()) <= 0) { errors.rejectValue( "count", CommonConstants.VALID_CODE_INVALID_ZERO, "수량은 0 이상 입력해 주세요."); @@ -77,7 +77,7 @@ public class SaveBankAutoTransferIncomeValidator implements Validator { "현금(원)을 입력해주세요."); } - if (vo.getPrice() != null && vo.getPrice() == 0) { + if (vo.getPrice() != null && vo.getPrice() <= 0) { errors.rejectValue( "price", CommonConstants.VALID_CODE_INVALID_ZERO, "현금(원)은 0 이상 입력해 주세요."); diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyExpense/adapters/web/validator/SaveDailyExpenseValidator.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyExpense/adapters/web/validator/SaveDailyExpenseValidator.java index 8a1ed8e0..a87c974d 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyExpense/adapters/web/validator/SaveDailyExpenseValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyExpense/adapters/web/validator/SaveDailyExpenseValidator.java @@ -27,7 +27,7 @@ public class SaveDailyExpenseValidator implements Validator { "수량을 입력해 주세요."); } - if (vo.getQuantity() != null && vo.getQuantity() == 0) { + if (vo.getQuantity() != null && vo.getQuantity() <= 0) { errors.rejectValue( "quantity", CommonConstants.VALID_CODE_INVALID_ZERO, "수량은 0 이상 입력해 주세요."); @@ -54,8 +54,8 @@ public class SaveDailyExpenseValidator implements Validator { "현금 또는 현물평가액을 입력해 주세요."); } - if ((vo.getPrice() != null && vo.getPrice() == 0) - || (vo.getEstimatedValue() != null && vo.getEstimatedValue() == 0)) { + if ((vo.getPrice() != null && vo.getPrice() <= 0) + || (vo.getEstimatedValue() != null && vo.getEstimatedValue() <= 0)) { errors.rejectValue( "price", CommonConstants.VALID_CODE_INVALID_ZERO, "현금 또는 현물평가액은 0 이상 입력해 주세요."); diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyFarming/adapters/web/validator/SaveDailyFarmingValidator.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyFarming/adapters/web/validator/SaveDailyFarmingValidator.java index ae46726b..9b616511 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyFarming/adapters/web/validator/SaveDailyFarmingValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyFarming/adapters/web/validator/SaveDailyFarmingValidator.java @@ -32,7 +32,7 @@ public class SaveDailyFarmingValidator implements Validator { "수량을 입력해 주세요."); } - if (vo.getQuantity() != null && vo.getQuantity() == 0) { + if (vo.getQuantity() != null && vo.getQuantity() <= 0) { errors.rejectValue( "quantity", CommonConstants.VALID_CODE_INVALID_ZERO, "수량은 0 이상 입력해 주세요."); @@ -56,7 +56,7 @@ public class SaveDailyFarmingValidator implements Validator { "현물평가액을 입력해 주세요."); } - if (vo.getEstimatedValue() != null && vo.getEstimatedValue() == 0) { + if (vo.getEstimatedValue() != null && vo.getEstimatedValue() <= 0) { errors.rejectValue( "estimatedValue", CommonConstants.VALID_CODE_INVALID_ZERO, "현물평가액은 0 이상 입력해 주세요."); diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyForestry/adapters/web/validator/SaveDailyForestryValidator.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyForestry/adapters/web/validator/SaveDailyForestryValidator.java index 2e092c4b..281189bb 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyForestry/adapters/web/validator/SaveDailyForestryValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyForestry/adapters/web/validator/SaveDailyForestryValidator.java @@ -26,7 +26,7 @@ public class SaveDailyForestryValidator implements Validator { "수량을 입력해 주세요."); } - if (vo.getQuantity() != null && vo.getQuantity() == 0) { + if (vo.getQuantity() != null && vo.getQuantity() <= 0) { errors.rejectValue( "quantity", CommonConstants.VALID_CODE_INVALID_ZERO, "수량은 0 이상 입력해 주세요."); @@ -50,7 +50,7 @@ public class SaveDailyForestryValidator implements Validator { "현물평가액을 입력해 주세요."); } - if (vo.getEstimatedValue() != null && vo.getEstimatedValue() == 0) { + if (vo.getEstimatedValue() != null && vo.getEstimatedValue() <= 0) { errors.rejectValue( "estimatedValue", CommonConstants.VALID_CODE_INVALID_ZERO, "현물평가액은 0 이상 입력해 주세요."); diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyIncome/adapters/web/validator/SaveDailyIncomeValidator.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyIncome/adapters/web/validator/SaveDailyIncomeValidator.java index 4645348d..bb6c175e 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyIncome/adapters/web/validator/SaveDailyIncomeValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyIncome/adapters/web/validator/SaveDailyIncomeValidator.java @@ -27,7 +27,7 @@ public class SaveDailyIncomeValidator implements Validator { "수량을 입력해 주세요."); } - if (vo.getQuantity() != null && vo.getQuantity() == 0) { + if (vo.getQuantity() != null && vo.getQuantity() <= 0) { errors.rejectValue( "quantity", CommonConstants.VALID_CODE_INVALID_ZERO, "수량은 0 이상 입력해 주세요."); @@ -54,8 +54,8 @@ public class SaveDailyIncomeValidator implements Validator { "현금 또는 현물평가액을 입력해 주세요."); } - if ((vo.getPrice() != null && vo.getPrice() == 0) - || (vo.getEstimatedValue() != null && vo.getEstimatedValue() == 0)) { + if ((vo.getPrice() != null && vo.getPrice() <= 0) + || (vo.getEstimatedValue() != null && vo.getEstimatedValue() <= 0)) { errors.rejectValue( "price", CommonConstants.VALID_CODE_INVALID_ZERO, "현금 또는 현물평가액은 0 이상 입력해 주세요."); diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyPower/adapters/web/validator/SaveDailyPowerValidator.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyPower/adapters/web/validator/SaveDailyPowerValidator.java index 706bc08a..c580f28d 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyPower/adapters/web/validator/SaveDailyPowerValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyPower/adapters/web/validator/SaveDailyPowerValidator.java @@ -28,8 +28,8 @@ public class SaveDailyPowerValidator implements Validator { "자가 사용시간 또는 임차 사용시간을 입력해 주세요."); } - if ((vo.getOwnedHours() != null && vo.getOwnedHours() == 0) - || (vo.getLeasedHours() != null && vo.getLeasedHours() == 0)) { + if ((vo.getOwnedHours() != null && vo.getOwnedHours() <= 0) + || (vo.getLeasedHours() != null && vo.getLeasedHours() <= 0)) { errors.rejectValue( "ownedHours", CommonConstants.VALID_CODE_INVALID_ZERO, "자가 사용시간 또는 임차 사용시간은 0 이상 입력해 주세요."); diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyWork/adapters/web/validator/SaveDailyWorkValidator.java b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyWork/adapters/web/validator/SaveDailyWorkValidator.java index 5b3f2633..de7e08f3 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyWork/adapters/web/validator/SaveDailyWorkValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/dailyRecord/saveDailyWork/adapters/web/validator/SaveDailyWorkValidator.java @@ -25,7 +25,7 @@ public class SaveDailyWorkValidator implements Validator { "workLandArea", CommonConstants.VALID_CODE_NOTBLANK, "작업 면적을 입력해 주세요."); } - if (vo.getWorkLandArea() != null && vo.getWorkLandArea() == 0) { + if (vo.getWorkLandArea() != null && vo.getWorkLandArea() <= 0) { errors.rejectValue( "workLandArea", CommonConstants.VALID_CODE_INVALID_ZERO, "작업 면적은 0 이상 입력해 주세요."); @@ -48,7 +48,7 @@ public class SaveDailyWorkValidator implements Validator { "수확량을 입력해 주세요."); } - if (vo.getHarvestQuantity() != null && vo.getHarvestQuantity() == 0) { + if (vo.getHarvestQuantity() != null && vo.getHarvestQuantity() <= 0) { errors.rejectValue( "harvestQuantity", CommonConstants.VALID_CODE_INVALID_ZERO, "수확량은 0 이상 입력해 주세요."); @@ -83,16 +83,16 @@ public class SaveDailyWorkValidator implements Validator { errors.rejectValue("volunteerFHours", CommonConstants.VALID_CODE_NOTBLANK); } - if ((vo.getOwnerTime() != null && vo.getOwnerTime() == 0) - || (vo.getSpouseTime() != null && vo.getSpouseTime() == 0) - || (vo.getFamilyMHours() != null && vo.getFamilyMHours() == 0) - || (vo.getFamilyFHours() != null && vo.getFamilyFHours() == 0) - || (vo.getHiredMHours() != null && vo.getHiredMHours() == 0) - || (vo.getHiredFHours() != null && vo.getHiredFHours() == 0) - || (vo.getSharedMHours() != null && vo.getSharedMHours() == 0) - || (vo.getSharedFHours() != null && vo.getSharedFHours() == 0) - || (vo.getVolunteerMHours() != null && vo.getVolunteerMHours() == 0) - || (vo.getVolunteerFHours() != null && vo.getVolunteerFHours() == 0)) { + if ((vo.getOwnerTime() != null && vo.getOwnerTime() <= 0) + || (vo.getSpouseTime() != null && vo.getSpouseTime() <= 0) + || (vo.getFamilyMHours() != null && vo.getFamilyMHours() <= 0) + || (vo.getFamilyFHours() != null && vo.getFamilyFHours() <= 0) + || (vo.getHiredMHours() != null && vo.getHiredMHours() <= 0) + || (vo.getHiredFHours() != null && vo.getHiredFHours() <= 0) + || (vo.getSharedMHours() != null && vo.getSharedMHours() <= 0) + || (vo.getSharedFHours() != null && vo.getSharedFHours() <= 0) + || (vo.getVolunteerMHours() != null && vo.getVolunteerMHours() <= 0) + || (vo.getVolunteerFHours() != null && vo.getVolunteerFHours() <= 0)) { errors.rejectValue("ownerTime", CommonConstants.VALID_CODE_INVALID_ZERO, "노동투입시간은 0 이상 입력해 주세요."); errors.rejectValue("spouseTime", CommonConstants.VALID_CODE_INVALID_ZERO); errors.rejectValue("familyMHours", CommonConstants.VALID_CODE_INVALID_ZERO); diff --git a/admin/src/main/java/app/module/admin/usecase/household/tab/forestProduct/saveForestProduct/adapters/web/validator/SaveForestProductValidator.java b/admin/src/main/java/app/module/admin/usecase/household/tab/forestProduct/saveForestProduct/adapters/web/validator/SaveForestProductValidator.java index 497273d6..797c0367 100644 --- a/admin/src/main/java/app/module/admin/usecase/household/tab/forestProduct/saveForestProduct/adapters/web/validator/SaveForestProductValidator.java +++ b/admin/src/main/java/app/module/admin/usecase/household/tab/forestProduct/saveForestProduct/adapters/web/validator/SaveForestProductValidator.java @@ -23,20 +23,20 @@ public class SaveForestProductValidator implements Validator { errors.rejectValue("cropName", "error.cropName", "재배 작물명을 입력해주세요."); } - if (StringUtils.hasText(vo.getLandArea()) && Integer.parseInt(vo.getLandArea()) == 0) { + if (StringUtils.hasText(vo.getLandArea()) && Integer.parseInt(vo.getLandArea()) <= 0) { errors.rejectValue( "landArea", CommonConstants.VALID_CODE_INVALID_ZERO, "면적(평)은 0 이상 입력해 주세요."); } - if (StringUtils.hasText(vo.getAvailableArea()) && Integer.parseInt(vo.getAvailableArea()) == 0) { + if (StringUtils.hasText(vo.getAvailableArea()) && Integer.parseInt(vo.getAvailableArea()) <= 0) { errors.rejectValue( "availableArea", CommonConstants.VALID_CODE_INVALID_ZERO, "가능면적(평)은 0 이상 입력해 주세요."); } // 주생산물 수확량 - if (StringUtils.hasText(vo.getMainYield()) && Integer.parseInt(vo.getMainYield()) == 0) { + if (StringUtils.hasText(vo.getMainYield()) && Integer.parseInt(vo.getMainYield()) <= 0) { errors.rejectValue( "mainYield", CommonConstants.VALID_CODE_INVALID_ZERO, "주생산물 수확량은 0 이상 입력해 주세요."); @@ -55,7 +55,7 @@ public class SaveForestProductValidator implements Validator { } // 주생산물 판매량 - if (StringUtils.hasText(vo.getMainSaleAmount()) && Integer.parseInt(vo.getMainSaleAmount()) == 0) { + if (StringUtils.hasText(vo.getMainSaleAmount()) && Integer.parseInt(vo.getMainSaleAmount()) <= 0) { errors.rejectValue( "mainSaleAmount", CommonConstants.VALID_CODE_INVALID_ZERO, "주생산물 판매량은 0 이상 입력해 주세요."); @@ -74,7 +74,7 @@ public class SaveForestProductValidator implements Validator { } // 부생산물 수확량 - if (StringUtils.hasText(vo.getSubYield()) && Integer.parseInt(vo.getSubYield()) == 0) { + if (StringUtils.hasText(vo.getSubYield()) && Integer.parseInt(vo.getSubYield()) <= 0) { errors.rejectValue( "subYield", CommonConstants.VALID_CODE_INVALID_ZERO, "부생산물 수확량은 0 이상 입력해 주세요."); @@ -93,7 +93,7 @@ public class SaveForestProductValidator implements Validator { } // 부생산물 판매량 - if (StringUtils.hasText(vo.getSubSaleAmount()) && Integer.parseInt(vo.getSubSaleAmount()) == 0) { + if (StringUtils.hasText(vo.getSubSaleAmount()) && Integer.parseInt(vo.getSubSaleAmount()) <= 0) { errors.rejectValue( "subSaleAmount", CommonConstants.VALID_CODE_INVALID_ZERO, "부생산물 판매량은 0 이상 입력해 주세요.");