Merge branch 'dev' into 'deploy-dev-front'

Dev

See merge request korea-research/korea-research!58
This commit is contained in:
김현주 개발
2025-06-27 02:49:17 +00:00
93 changed files with 1152 additions and 162 deletions

View File

@@ -0,0 +1,13 @@
package app.module.admin.config.application.enums;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@Getter
@RequiredArgsConstructor
public enum MonthlyInputStatusType {
NONE("미등록"),
NOTHING("등록 내용없음"),
REGISTERED("등록완료");
private final String desc;
}

View File

@@ -48,8 +48,8 @@ public class AdminCreateValidator implements Validator {
if (vo.getName() == null || vo.getName().isBlank()) { if (vo.getName() == null || vo.getName().isBlank()) {
errors.rejectValue("name", "error.name", "이름을 입력해주세요."); errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
} }
if (vo.getName().length() > 4) { if (vo.getName().length() > 10) {
errors.rejectValue("name", "error.name", "이름은 4자리까지 입력가능합니다."); errors.rejectValue("name", "error.name", "이름은 10자까지 입력가능합니다.");
} }
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) { if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요."); errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");

View File

@@ -34,8 +34,8 @@ public class AdminUpdateValidator implements Validator {
if (vo.getName() == null || vo.getName().isBlank()) { if (vo.getName() == null || vo.getName().isBlank()) {
errors.rejectValue("name", "error.name", "이름을 입력해주세요."); errors.rejectValue("name", "error.name", "이름을 입력해주세요.");
} }
if (vo.getName().length() > 4) { if (vo.getName().length() > 10) {
errors.rejectValue("name", "error.name", "이름은 4자리까지 입력가능합니다."); errors.rejectValue("name", "error.name", "이름은 10자까지 입력가능합니다.");
} }
if (vo.getPhone1() == null || vo.getPhone1().isBlank()) { if (vo.getPhone1() == null || vo.getPhone1().isBlank()) {
errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요."); errors.rejectValue("phone1", "error.phone1", "전화번호 앞자리를 입력해주세요.");

View File

@@ -1,4 +1,4 @@
package app.module.admin.usecase.household.getHouseholdStatusUI; package app.module.admin.usecase.household.getHouseholdStatusUI.adapters.web;
import app.module.admin.config.application.util.AdminUtil; import app.module.admin.config.application.util.AdminUtil;
import app.module.admin.config.application.util.DateUiUtil; import app.module.admin.config.application.util.DateUiUtil;
@@ -11,7 +11,7 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import app.module.admin.usecase.household.getHouseholdStatusUI.model.GetHouseholdStatusUIReqVO; import app.module.admin.usecase.household.getHouseholdStatusUI.adapters.web.model.GetHouseholdStatusUIReqVO;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
@Controller @Controller

View File

@@ -1,4 +1,4 @@
package app.module.admin.usecase.household.getHouseholdStatusUI.model; package app.module.admin.usecase.household.getHouseholdStatusUI.adapters.web.model;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;

View File

@@ -1,8 +1,8 @@
package app.module.admin.usecase.household.getHouseholdsStatusUI; package app.module.admin.usecase.household.getHouseholdsStatusUI.adapters.web;
import app.module.admin.config.application.util.AdminUtil; import app.module.admin.config.application.util.AdminUtil;
import app.module.admin.config.application.util.DateUiUtil; import app.module.admin.config.application.util.DateUiUtil;
import app.module.admin.usecase.household.getHouseholdsStatusUI.model.GetHouseholdsUIReqVO; import app.module.admin.usecase.household.getHouseholdsStatusUI.adapters.web.model.GetHouseholdsUIReqVO;
import app.module.core.config.application.util.CommonUtil; import app.module.core.config.application.util.CommonUtil;
import app.module.core.usecase.admin.view.ports.AdminViewPortIn; import app.module.core.usecase.admin.view.ports.AdminViewPortIn;
import app.module.core.usecase.admin.view.ports.application.domain.AdminView; import app.module.core.usecase.admin.view.ports.application.domain.AdminView;

View File

@@ -1,4 +1,4 @@
package app.module.admin.usecase.household.getHouseholdsStatusUI.model; package app.module.admin.usecase.household.getHouseholdsStatusUI.adapters.web.model;
import app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain.ProgressType; import app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain.ProgressType;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;

View File

@@ -0,0 +1,19 @@
package app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.adapters.persistence;
import app.module.core.config.application.annotation.UpdateCommand;
import lombok.RequiredArgsConstructor;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application.domain.UpdateForestProductStatusCmd;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.UpdateMonthlyInputStatusPortOut;
import org.springframework.stereotype.Repository;
@Repository
@RequiredArgsConstructor
class UpdateMonthlyInputStatusDao implements UpdateMonthlyInputStatusPortOut {
private final UpdateMonthlyInputStatusMapper mapper;
@Override
@UpdateCommand
public void updateForestProductStatus(UpdateForestProductStatusCmd cmd) {
mapper.updateForestProductStatus(cmd);
}
}

View File

@@ -0,0 +1,9 @@
package app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.adapters.persistence;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application.domain.UpdateForestProductStatusCmd;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface UpdateMonthlyInputStatusMapper {
void updateForestProductStatus(UpdateForestProductStatusCmd cmd);
}

View File

@@ -0,0 +1,7 @@
package app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application.domain.UpdateForestProductStatusCmd;
public interface UpdateMonthlyInputStatusPortIn {
void updateForestProductStatus(UpdateForestProductStatusCmd cmd);
}

View File

@@ -0,0 +1,7 @@
package app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application.domain.UpdateForestProductStatusCmd;
public interface UpdateMonthlyInputStatusPortOut {
void updateForestProductStatus(UpdateForestProductStatusCmd cmd);
}

View File

@@ -0,0 +1,18 @@
package app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application;
import lombok.RequiredArgsConstructor;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application.domain.UpdateForestProductStatusCmd;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.UpdateMonthlyInputStatusPortIn;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.UpdateMonthlyInputStatusPortOut;
import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
class UpdateMonthlyInputStatusService implements UpdateMonthlyInputStatusPortIn {
private final UpdateMonthlyInputStatusPortOut portOut;
@Override
public void updateForestProductStatus(UpdateForestProductStatusCmd cmd) {
portOut.updateForestProductStatus(cmd);
}
}

View File

@@ -0,0 +1,15 @@
package app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application.domain;
import app.module.core.config.adapters.persistence.component.AuditCommand;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@AllArgsConstructor
public class UpdateForestProductStatusCmd extends AuditCommand {
private Long id;
private String status;
}

View File

@@ -0,0 +1,39 @@
package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.persistence;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.RemoveDailyPortOut;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.application.domain.RemoveDailyCmd;
import app.module.core.config.application.enums.DailySort;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;
@Slf4j
@Repository
@RequiredArgsConstructor
public class RemoveDailyDao implements RemoveDailyPortOut {
private final RemoveDailyMapper mapper;
@Override
public void operate(RemoveDailyCmd command) {
if (command.getCurrentStep() != null) {
log.error("[RemoveDaily] cmd: {}", command);
if (DailySort.INCOME.equals(command.getCurrentStep())) {
mapper.removeDailyIncome(command);
} else if (DailySort.WORK.equals(command.getCurrentStep())) {
mapper.removeDailyWork(command);
} else if (DailySort.EXPENSE.equals(command.getCurrentStep())) {
mapper.removeDailyExpense(command);
} else if (DailySort.POWER.equals(command.getCurrentStep())) {
mapper.removeDailyPower(command);
} else if (DailySort.FORESTRY.equals(command.getCurrentStep())) {
mapper.removeDailyForestry(command);
} else if (DailySort.FARMING.equals(command.getCurrentStep())) {
mapper.removeDailyFarming(command);
}
} else {
log.error("[RemoveDaily] Current step is null. cmd: {}", command);
}
}
}

View File

@@ -0,0 +1,43 @@
package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.persistence;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.application.domain.RemoveDailyCmd;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface RemoveDailyMapper {
/**
* 특정일의 수입 전체 삭제
* @param command 검색 조건
*/
void removeDailyIncome(RemoveDailyCmd command);
/**
* 특정일의 임업노동 투입 전체 삭제
* @param command 검색 조건
*/
void removeDailyWork(RemoveDailyCmd command);
/**
* 특정일의 지출 전체 삭제
* @param command 검색 조건
*/
void removeDailyExpense(RemoveDailyCmd command);
/**
* 동력 사용시간 전체 삭제
* @param command 검색 조건
*/
void removeDailyPower(RemoveDailyCmd command);
/**
* 자가임업 생산물 중 자가소비량 전체 삭제
* @param command 검색 조건
*/
void removeDailyForestry(RemoveDailyCmd command);
/**
* 자가농업 생산물 중 자가소비량 전체 삭제
* @param command 검색 조건
*/
void removeDailyFarming(RemoveDailyCmd command);
}

View File

@@ -0,0 +1,28 @@
package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.web;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.web.modal.RemoveDailyReqVO;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.RemoveDailyPortIn;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequiredArgsConstructor
class RemoveDailyController {
private final RemoveDailyPortIn removeDailyNonePortIn;
@PostMapping(path = "/api/household/daily/remove")
ResponseEntity<?> remove(@RequestBody RemoveDailyReqVO reqVO) {
log.debug("reqVO: {}", reqVO);
if (!reqVO.getSelectedIds().isEmpty()) {
removeDailyNonePortIn.operate(reqVO);
}
return ResponseEntity.status(HttpStatus.OK).body(reqVO);
}
}

View File

@@ -0,0 +1,22 @@
package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.web.modal;
import app.module.core.config.application.enums.DailySort;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.Set;
@Getter
@Setter
@ToString
public class RemoveDailyReqVO {
/**
* 항목 일련번호
*/
private Set<Long> selectedIds;
/**
* 현재 단계
*/
private DailySort currentStep;
}

View File

@@ -0,0 +1,7 @@
package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.web.modal.RemoveDailyReqVO;
public interface RemoveDailyPortIn {
void operate(RemoveDailyReqVO reqVO);
}

View File

@@ -0,0 +1,7 @@
package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.application.domain.RemoveDailyCmd;
public interface RemoveDailyPortOut {
void operate(RemoveDailyCmd command);
}

View File

@@ -0,0 +1,26 @@
package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.application;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.web.modal.RemoveDailyReqVO;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.RemoveDailyPortIn;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.RemoveDailyPortOut;
import app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.application.domain.RemoveDailyCmd;
import app.module.core.config.application.util.AuditUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
public class RemoveDailyService implements RemoveDailyPortIn {
private final RemoveDailyPortOut portOut;
@Override
public void operate(RemoveDailyReqVO reqVO) {
RemoveDailyCmd command = AuditUtil.update(
new RemoveDailyCmd(
reqVO.getSelectedIds(),
reqVO.getCurrentStep())
);
portOut.operate(command);
}
}

View File

@@ -0,0 +1,26 @@
package app.module.admin.usecase.household.tab.dailyRecord.removeDaily.ports.application.domain;
import app.module.core.config.adapters.persistence.component.AuditCommand;
import app.module.core.config.application.enums.DailySort;
import app.module.core.config.application.enums.DailyTargetStatus;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.Set;
@Getter
@Setter
@ToString
@AllArgsConstructor
public class RemoveDailyCmd extends AuditCommand {
/**
* 항목 일련번호
*/
private Set<Long> removeIds;
/**
* 현재 단계
*/
private DailySort currentStep;
}

View File

@@ -41,7 +41,7 @@ class UpdateDailyNoneDao implements UpdateDailyNonePortOut {
dailyRecordPortIn.updateByStatus(command.getSearchMonth(), command.getGroupNo(), command.getHouseholdSeq(), command.getCurrentStep().name(), command.getCurrentStatus().name()); dailyRecordPortIn.updateByStatus(command.getSearchMonth(), command.getGroupNo(), command.getHouseholdSeq(), command.getCurrentStep().name(), command.getCurrentStatus().name());
} else { } else {
log.error("[CreateDailyNone] Current step is null. cmd:{}", command); log.error("[UpdateDailyNone] Current step is null. cmd: {}", command);
} }
} }
} }

View File

@@ -0,0 +1,33 @@
package app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.adapters.persistence;
import app.module.admin.config.application.enums.MonthlyInputStatusType;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.adapters.persistence.UpdateMonthlyInputStatusMapper;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application.domain.UpdateForestProductStatusCmd;
import app.module.core.config.application.annotation.DeleteCommand;
import lombok.RequiredArgsConstructor;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.application.domain.RemoveForestProductsCmd;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.RemoveForestProductsPortOut;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
@Repository
@RequiredArgsConstructor
class RemoveForestProductsDao implements RemoveForestProductsPortOut {
private final RemoveForestProductsMapper removeForestProductsMapper;
private final UpdateMonthlyInputStatusMapper updateMonthlyInputStatusMapper;
@Override
@DeleteCommand
@Transactional
public void operate(RemoveForestProductsCmd cmd) {
// 임산물 현황 삭제
removeForestProductsMapper.removeForestProducts(cmd);
// 임산물 모두 삭제됐을 경우 입력상태 미등록으로 update
if (!removeForestProductsMapper.existsForestProduct(cmd.getMonthlyInputStatusId())) {
updateMonthlyInputStatusMapper.updateForestProductStatus(
new UpdateForestProductStatusCmd(cmd.getMonthlyInputStatusId(),
MonthlyInputStatusType.NONE.name()));
}
}
}

View File

@@ -0,0 +1,10 @@
package app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.adapters.persistence;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.application.domain.RemoveForestProductsCmd;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface RemoveForestProductsMapper {
void removeForestProducts(RemoveForestProductsCmd cmd);
boolean existsForestProduct(Long monthlyInputStatusId);
}

View File

@@ -0,0 +1,36 @@
package app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.adapters.web;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.RemoveForestProductsPortIn;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.application.domain.RemoveForestProductsCmd;
import app.module.core.config.application.util.MessageUtil;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.validation.BindingResult;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.adapters.web.model.RemoveForestProductsReqVO;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.adapters.web.model.RemoveForestProductsResVO;
@RestController
@RequiredArgsConstructor
class RemoveForestProductsController {
private final RemoveForestProductsPortIn portIn;
private final MessageUtil messageUtil;
@DeleteMapping(path = "/api/household/forestProducts/delete")
ResponseEntity<?> operate(@Valid @RequestBody RemoveForestProductsReqVO reqVO,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResponseEntity.status(HttpStatus.UNPROCESSABLE_ENTITY).body(bindingResult);
}
portIn.operate(
new RemoveForestProductsCmd(reqVO.getMonthlyInputStatusId(), reqVO.getForestRemoveIds()));
return ResponseEntity.status(HttpStatus.OK).body(
new RemoveForestProductsResVO(messageUtil.getMessage("operation.common.remove.done")));
}
}

View File

@@ -0,0 +1,17 @@
package app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.adapters.web.model;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode
public class RemoveForestProductsReqVO {
private Long monthlyInputStatusId;
private List<Long> forestRemoveIds;
}

View File

@@ -0,0 +1,14 @@
package app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.adapters.web.model;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@AllArgsConstructor
@EqualsAndHashCode
public class RemoveForestProductsResVO {
private String message;
}

View File

@@ -0,0 +1,7 @@
package app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.application.domain.RemoveForestProductsCmd;
public interface RemoveForestProductsPortIn {
void operate(RemoveForestProductsCmd cmd);
}

View File

@@ -0,0 +1,7 @@
package app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.application.domain.RemoveForestProductsCmd;
public interface RemoveForestProductsPortOut {
void operate(RemoveForestProductsCmd cmd);
}

View File

@@ -0,0 +1,18 @@
package app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.application;
import lombok.RequiredArgsConstructor;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.application.domain.RemoveForestProductsCmd;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.RemoveForestProductsPortIn;
import app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.RemoveForestProductsPortOut;
import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
class RemoveForestProductsService implements RemoveForestProductsPortIn {
private final RemoveForestProductsPortOut portOut;
@Override
public void operate(RemoveForestProductsCmd cmd) {
portOut.operate(cmd);
}
}

View File

@@ -0,0 +1,17 @@
package app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.ports.application.domain;
import app.module.core.config.adapters.persistence.component.AuditCommand;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@AllArgsConstructor
@EqualsAndHashCode
public class RemoveForestProductsCmd extends AuditCommand {
private Long monthlyInputStatusId;
private List<Long> removeIds;
}

View File

@@ -1,5 +1,8 @@
package app.module.admin.usecase.household.tab.forestProduct.saveForestProduct.adapters.persistence; package app.module.admin.usecase.household.tab.forestProduct.saveForestProduct.adapters.persistence;
import app.module.admin.config.application.enums.MonthlyInputStatusType;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.adapters.persistence.UpdateMonthlyInputStatusMapper;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application.domain.UpdateForestProductStatusCmd;
import app.module.admin.usecase.household.tab.forestProduct.saveForestProduct.ports.SaveForestProductPortOut; import app.module.admin.usecase.household.tab.forestProduct.saveForestProduct.ports.SaveForestProductPortOut;
import app.module.admin.usecase.household.tab.forestProduct.saveForestProduct.ports.application.domain.SaveForestProductCmd; import app.module.admin.usecase.household.tab.forestProduct.saveForestProduct.ports.application.domain.SaveForestProductCmd;
import app.module.core.config.application.util.AuditUtil; import app.module.core.config.application.util.AuditUtil;
@@ -10,15 +13,28 @@ import org.springframework.transaction.annotation.Transactional;
@Repository @Repository
@RequiredArgsConstructor @RequiredArgsConstructor
class SaveForestProductDao implements SaveForestProductPortOut { class SaveForestProductDao implements SaveForestProductPortOut {
private final SaveForestProductMapper mapper; private final SaveForestProductMapper saveForestProductMapper;
private final UpdateMonthlyInputStatusMapper updateMonthlyInputStatusMapper;
@Override @Override
@Transactional @Transactional
public void operate(SaveForestProductCmd inCmd) { public void operate(SaveForestProductCmd inCmd) {
if (inCmd.getForestProductId() == null) { if (inCmd.getForestProductId() == null) {
mapper.createForestProduct(AuditUtil.create(inCmd)); String status = saveForestProductMapper.getForestProductStatus(inCmd.getMonthlyInputStatusId());
// 등록 상태가 "REGISTERED"가 아닐 경우 "REGISTERED"로 update
if(!MonthlyInputStatusType.REGISTERED.name().equals(status)) {
updateMonthlyInputStatusMapper.updateForestProductStatus(
new UpdateForestProductStatusCmd(
inCmd.getMonthlyInputStatusId(),
MonthlyInputStatusType.REGISTERED.name()));
}
// 임산물 현황 등록
saveForestProductMapper.createForestProduct(AuditUtil.create(inCmd));
} else { } else {
mapper.updateForestProduct(AuditUtil.update(inCmd)); // 임산물 현황 update
saveForestProductMapper.updateForestProduct(AuditUtil.update(inCmd));
} }
} }
} }

View File

@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface SaveForestProductMapper { public interface SaveForestProductMapper {
String getForestProductStatus(Long monthlyInputStatusId);
void createForestProduct(SaveForestProductCmd cmd); void createForestProduct(SaveForestProductCmd cmd);
void updateForestProduct(SaveForestProductCmd cmd); void updateForestProduct(SaveForestProductCmd cmd);
} }

View File

@@ -0,0 +1,34 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.adapters.persistence;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.adapters.persistence.UpdateMonthlyInputStatusMapper;
import app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.ports.application.domain.UpdateForestProductStatusCmd;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateForestProductNoneOutCmd;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateMonthlyForestProductStatusCmd;
import app.module.core.config.application.util.AuditUtil;
import lombok.RequiredArgsConstructor;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateForestProductNoneInCmd;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.UpdateForestProductNonePortOut;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
@Repository
@RequiredArgsConstructor
class UpdateForestProductNoneDao implements UpdateForestProductNonePortOut {
private final UpdateForestProductNoneMapper updateForestProductNoneMapper;
private final UpdateMonthlyInputStatusMapper updateMonthlyInputStatusMapper;
@Override
@Transactional
public void operate(UpdateForestProductNoneOutCmd outCmd) {
// 금일 데이터 없음 체크시 데이터 일괄 삭제
if ("NOTHING".equals(outCmd.getCurrentStatus())) {
updateForestProductNoneMapper.removeForestProduct(AuditUtil.delete(outCmd));
}
// 임산물 현황 상태값 변경
updateMonthlyInputStatusMapper.updateForestProductStatus(
AuditUtil.update(new UpdateForestProductStatusCmd(
outCmd.getMonthlyInputStatusId(),
outCmd.getCurrentStatus())));
}
}

View File

@@ -0,0 +1,9 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.adapters.persistence;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateForestProductNoneOutCmd;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface UpdateForestProductNoneMapper {
void removeForestProduct(UpdateForestProductNoneOutCmd cmd);
}

View File

@@ -0,0 +1,31 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.adapters.web;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.UpdateForestProductNonePortIn;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateForestProductNoneInCmd;
import app.module.core.config.application.util.MessageUtil;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.GetMapping;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.adapters.web.model.UpdateForestProductNoneReqVO;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.adapters.web.model.UpdateForestProductNoneResVO;
@RestController
@RequiredArgsConstructor
class UpdateForestProductNoneController {
private final UpdateForestProductNonePortIn portIn;
private final MessageUtil messageUtil;
@PatchMapping(path = "/api/household/forestProduct/nothing")
ResponseEntity<?> operate(@RequestBody UpdateForestProductNoneReqVO reqVO) {
portIn.operate(new UpdateForestProductNoneInCmd(reqVO.getMonthlyInputStatusId(),
reqVO.getTodayNone()));
return ResponseEntity.status(HttpStatus.OK).body(new UpdateForestProductNoneResVO(
messageUtil.getMessage("operation.common.update.done")));
}
}

View File

@@ -0,0 +1,16 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.adapters.web.model;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode
public class UpdateForestProductNoneReqVO {
private Long monthlyInputStatusId;
private String todayNone;
}

View File

@@ -0,0 +1,14 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.adapters.web.model;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@AllArgsConstructor
@EqualsAndHashCode
public class UpdateForestProductNoneResVO {
private String message;
}

View File

@@ -0,0 +1,7 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateForestProductNoneInCmd;
public interface UpdateForestProductNonePortIn {
void operate(UpdateForestProductNoneInCmd inCmd);
}

View File

@@ -0,0 +1,8 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateForestProductNoneInCmd;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateForestProductNoneOutCmd;
public interface UpdateForestProductNonePortOut {
void operate(UpdateForestProductNoneOutCmd outCmd);
}

View File

@@ -0,0 +1,22 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateForestProductNoneOutCmd;
import lombok.RequiredArgsConstructor;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain.UpdateForestProductNoneInCmd;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.UpdateForestProductNonePortIn;
import app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.UpdateForestProductNonePortOut;
import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
class UpdateForestProductNoneService implements UpdateForestProductNonePortIn {
private final UpdateForestProductNonePortOut portOut;
@Override
public void operate(UpdateForestProductNoneInCmd inCmd) {
portOut.operate(new UpdateForestProductNoneOutCmd(
inCmd.getMonthlyInputStatusId(),
"Y".equals(inCmd.getTodayNone()) ? "NOTHING" : "NONE"
));
}
}

View File

@@ -0,0 +1,13 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@AllArgsConstructor
public class UpdateForestProductNoneInCmd {
private Long monthlyInputStatusId;
private String todayNone;
}

View File

@@ -0,0 +1,14 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain;
import app.module.core.config.adapters.persistence.component.AuditCommand;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@AllArgsConstructor
public class UpdateForestProductNoneOutCmd extends AuditCommand {
private Long monthlyInputStatusId;
private String currentStatus;
}

View File

@@ -0,0 +1,15 @@
package app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.ports.application.domain;
import app.module.core.config.adapters.persistence.component.AuditCommand;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
@AllArgsConstructor
public class UpdateMonthlyForestProductStatusCmd extends AuditCommand {
private Long monthlyInputStatusId;
private String forestProductStatus;
}

View File

@@ -115,4 +115,5 @@ public class ResearcherDao implements ResearcherPortOut {
} }
return i; return i;
} }
} }

View File

@@ -17,6 +17,7 @@ import java.util.Objects;
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping(path = "/api/researcher") @RequestMapping(path = "/api/researcher")
class ResearcherApiController { class ResearcherApiController {
private final ResearcherPortIn researcherPortIn; private final ResearcherPortIn researcherPortIn;
@GetMapping(path = "/list") @GetMapping(path = "/list")
@@ -63,4 +64,5 @@ class ResearcherApiController {
ResponseEntity<?> updateMappingHousehold(@RequestBody MappingHouseholdListReqVO reqVO ) { ResponseEntity<?> updateMappingHousehold(@RequestBody MappingHouseholdListReqVO reqVO ) {
return ResponseEntity.status(HttpStatus.OK).body(researcherPortIn.updateMappingHousehold(reqVO)); return ResponseEntity.status(HttpStatus.OK).body(researcherPortIn.updateMappingHousehold(reqVO));
} }
} }

View File

@@ -7,6 +7,7 @@ import org.springframework.data.domain.Page;
import java.util.List; import java.util.List;
public interface ResearcherPortIn { public interface ResearcherPortIn {
Page<ResearchersDto> list(ResearchersListReqVO reqVO); Page<ResearchersDto> list(ResearchersListReqVO reqVO);
ResearchersDto detail(Integer adminSeq); ResearchersDto detail(Integer adminSeq);
Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO); Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
@@ -17,4 +18,5 @@ public interface ResearcherPortIn {
Integer visitHouseholdDelete(List<Integer> selectIds); Integer visitHouseholdDelete(List<Integer> selectIds);
Page<GetPopupHouseholds> searchMappingHousehold(HouseholdSearchReqVO reqVO); Page<GetPopupHouseholds> searchMappingHousehold(HouseholdSearchReqVO reqVO);
Integer updateMappingHousehold(MappingHouseholdListReqVO reqVO); Integer updateMappingHousehold(MappingHouseholdListReqVO reqVO);
} }

View File

@@ -64,9 +64,9 @@ app:
permit: 5 permit: 5
session: session:
validity: validity:
# 세션 유효기간(초) - 1시간 (3600초) # 세션 유효기간(초) - 무한정으로 수정,,,
period: period:
seconds: 3600 seconds: -1
maximum: maximum:
# 최대 세션 갯수 (1일 경우 중복 로그인 불가) # 최대 세션 갯수 (1일 경우 중복 로그인 불가)
num: 1 num: 1

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="app.module.admin.usecase.household.tab.dailyRecord.removeDaily.adapters.persistence.RemoveDailyMapper">
<select id="removeDailyIncome">
<if test="removeIds != null and removeIds != ''">
update daily_income set
<include refid="common.fields.DeleteBaseSet"/>
where is_deleted = false
and id IN
<foreach collection="removeIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="removeDailyWork">
<if test="removeIds != null and removeIds != ''">
update daily_work set
<include refid="common.fields.DeleteBaseSet"/>
where is_deleted = false
and daily_record_seq = #{dailyRecordSeq}
</if>
</select>
<select id="removeDailyExpense">
<if test="removeIds != null and removeIds != ''">
update daily_expense set
<include refid="common.fields.DeleteBaseSet"/>
where is_deleted = false
and daily_record_seq = #{dailyRecordSeq}
</if>
</select>
<select id="removeDailyPower">
<if test="removeIds != null and removeIds != ''">
update daily_power set
<include refid="common.fields.DeleteBaseSet"/>
where is_deleted = false
and daily_record_seq = #{dailyRecordSeq}
</if>
</select>
<select id="removeDailyForestry">
<if test="removeIds != null and removeIds != ''">
update daily_forestry set
<include refid="common.fields.DeleteBaseSet"/>
where is_deleted = false
and daily_record_seq = #{dailyRecordSeq}
</if>
</select>
<select id="removeDailyFarming">
<if test="removeIds != null and removeIds != ''">
update daily_farming set
<include refid="common.fields.DeleteBaseSet"/>
where is_deleted = false
and daily_record_seq = #{dailyRecordSeq}
</if>
</select>
</mapper>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.admin.usecase.household.tab.forestProduct.removeForestProducts.adapters.persistence.RemoveForestProductsMapper">
<update id="removeForestProducts">
/* removeForestProducts : 임산물현황 삭제*/
UPDATE forest_product
SET <include refid="common.fields.DeleteBaseSet"/>
WHERE id IN
<foreach collection="removeIds" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<select id="existsForestProduct" resultType="boolean">
/* existsForestProduct : 임산물현황 존재 여부 */
SELECT EXISTS (
SELECT 1
FROM forest_product
WHERE is_deleted = false
AND monthly_input_status_id = #{monthlyInputStatusId}
)
</select>
</mapper>

View File

@@ -3,13 +3,13 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" > "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper <mapper
namespace="app.module.admin.usecase.household.tab.householdVisit.removeHouseholdVisitInfos.adapters.persistence.RemoveHouseholdVisitInfosMapper"> namespace="app.module.admin.usecase.household.tab.householdVisit.removeHouseholdVisitInfos.adapters.persistence.RemoveHouseholdVisitInfosMapper">
<update id="removeHouseholdVisitInfos"> <update id="removeHouseholdVisitInfos">
/* removeHouseholdVisitInfos : 임가방문정보 삭제 */ /* removeHouseholdVisitInfos : 임가방문정보 삭제 */
UPDATE household_visit UPDATE household_visit
SET <include refid="common.fields.DeleteBaseSet"/> SET <include refid="common.fields.DeleteBaseSet"/>
WHERE id IN WHERE id IN
<foreach collection="removeIds" item="id" open="(" separator="," close=")"> <foreach collection="removeIds" item="id" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</update> </update>
</mapper> </mapper>

View File

@@ -3,6 +3,13 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" > "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper <mapper
namespace="app.module.admin.usecase.household.tab.forestProduct.saveForestProduct.adapters.persistence.SaveForestProductMapper"> namespace="app.module.admin.usecase.household.tab.forestProduct.saveForestProduct.adapters.persistence.SaveForestProductMapper">
<select id="getForestProductStatus" resultType="java.lang.String">
/* getForestProductStatus : 임산물 현황 입력상태 조회 */
SELECT forest_product_status
FROM monthly_input_status
WHERE id = #{monthlyInputStatusId}
</select>
<insert id="createForestProduct"> <insert id="createForestProduct">
/* createForestProduct : 임산물 현황 등록 */ /* createForestProduct : 임산물 현황 등록 */
INSERT INTO forest_product INSERT INTO forest_product

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.admin.usecase.household.tab.forestProduct.updateForestProductNone.adapters.persistence.UpdateForestProductNoneMapper">
<update id="removeForestProduct">
/* removeForestProduct : 임산물 현황 삭제 */
UPDATE forest_product
SET <include refid="common.fields.DeleteBaseSet" />
WHERE is_deleted = false
AND monthly_input_status_id = #{monthlyInputStatusId}
</update>
</mapper>

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace="app.module.admin.usecase.household.monthlyInputStatus.updateMonthlyInputStatus.adapters.persistence.UpdateMonthlyInputStatusMapper">
<update id="updateForestProductStatus">
/* updateForestProductStatus : 임산물현황 입력상태 수정 */
UPDATE monthly_input_status
SET forest_product_status = #{status},
<include refid="common.fields.UpdateBaseSet"/>
WHERE is_deleted = false
AND id = #{id}
</update>
</mapper>

View File

@@ -19,6 +19,9 @@
left join household h ON h.seq = rhh.household_seq AND h.is_panel IS true and h.is_deleted = false left join household h ON h.seq = rhh.household_seq AND h.is_panel IS true and h.is_deleted = false
where where
ahr.role_id = 'ROLE_RESEARCHER' ahr.role_id = 'ROLE_RESEARCHER'
<if test="searchField == '' and searchValue != null and searchValue != ''">
and ( a.name LIKE CONCAT('%', #{searchValue}, '%') or a.phone LIKE CONCAT('%', #{searchValue}, '%') )
</if>
<if test="searchField == 'name' and searchValue != null and searchValue != ''"> <if test="searchField == 'name' and searchValue != null and searchValue != ''">
and a.name LIKE CONCAT('%', #{searchValue}, '%') and a.name LIKE CONCAT('%', #{searchValue}, '%')
</if> </if>

View File

@@ -19,3 +19,4 @@ operation.uri.move.cannot.before=\uB354\uC774\uC0C1 \uC774\uC804\uC73C\uB85C \uC
operation.uri.move.cannot.after=\uB354\uC774\uC0C1 \uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. operation.uri.move.cannot.after=\uB354\uC774\uC0C1 \uB2E4\uC74C\uC73C\uB85C \uC774\uB3D9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
operation.role.save.choose.first=\uC800\uC7A5\uD560 '\uAD00\uB9AC\uC790 \uAD8C\uD55C' \uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694. operation.role.save.choose.first=\uC800\uC7A5\uD560 '\uAD00\uB9AC\uC790 \uAD8C\uD55C' \uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.
operation.orderNo.updated=\uC815\uB82C\uC21C\uC11C\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4. operation.orderNo.updated=\uC815\uB82C\uC21C\uC11C\uAC00 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4.
operation.common.update.done=\uC218\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.

View File

@@ -79,7 +79,7 @@
<div class="input-field"> <div class="input-field">
<input id="name" type="text" name="name" <input id="name" type="text" name="name"
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'" th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
th:field="*{name}"/> th:field="*{name}" maxlength="10"/>
<div class="invalid-feedback fw-bold" <div class="invalid-feedback fw-bold"
th:if="${#fields.hasErrors('name')}"> th:if="${#fields.hasErrors('name')}">
에러 메세지 에러 메세지
@@ -97,12 +97,12 @@
</div> </div>
<div class="component-input"> <div class="component-input">
<div class="input-field"> <div class="input-field">
<input type="number" id="phone1" name="phone1" placeholder="" th:field="*{phone1}"> <input type="number" id="phone1" name="phone1" placeholder="" th:field="*{phone1}" maxlength="4">
</div> </div>
</div> </div>
<div class="component-input"> <div class="component-input">
<div class="input-field"> <div class="input-field">
<input type="number" id="phone2" name="phone2" placeholder="" th:field="*{phone2}"> <input type="number" id="phone2" name="phone2" placeholder="" th:field="*{phone2}" maxlength="4">
</div> </div>
</div> </div>
</div> </div>

View File

@@ -165,7 +165,6 @@
f.searchDisabled.value = ''; f.searchDisabled.value = '';
} }
function goUpdate(adminId) { function goUpdate(adminId) {
location.href = '/settings/admins/update/' + adminId; // 쿼리 파라미터 없이 이동 location.href = '/settings/admins/update/' + adminId; // 쿼리 파라미터 없이 이동
} }

View File

@@ -71,7 +71,7 @@
<div class="input-field"> <div class="input-field">
<input id="name" type="text" name="name" <input id="name" type="text" name="name"
th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'" th:classappend="${#fields.hasErrors('name')} ? 'is-invalid'"
th:field="*{name}"/> th:field="*{name}" maxlength="10" />
<div class="invalid-feedback fw-bold" <div class="invalid-feedback fw-bold"
th:if="${#fields.hasErrors('name')}"> th:if="${#fields.hasErrors('name')}">
에러 메세지 에러 메세지
@@ -89,7 +89,7 @@
</div> </div>
<div class="component-input"> <div class="component-input">
<div class="input-field"> <div class="input-field">
<input type="number" id="phone1" name="phone1" placeholder="" <input type="number" id="phone1" name="phone1" placeholder="" maxlength="4"
th:value="${bindingVO.phone1 != null ? bindingVO.phone1 : ''}"> th:value="${bindingVO.phone1 != null ? bindingVO.phone1 : ''}">
</div> </div>
</div> </div>
@@ -99,7 +99,7 @@
</div> </div>
<div class="component-input"> <div class="component-input">
<div class="input-field"> <div class="input-field">
<input type="number" id="phone2" name="phone2" placeholder="" <input type="number" id="phone2" name="phone2" placeholder="" maxlength="4"
th:value="${bindingVO.phone2 != null ? bindingVO.phone2 : ''}"> th:value="${bindingVO.phone2 != null ? bindingVO.phone2 : ''}">
</div> </div>
</div> </div>

View File

@@ -25,6 +25,7 @@
<meta property="og:description" th:content="${currentURI.ogDesc}" th:if="${currentURI != null}"/> <meta property="og:description" th:content="${currentURI.ogDesc}" th:if="${currentURI != null}"/>
<meta property="og:keywords" th:content="${currentURI.ogKeywords}" th:if="${currentURI != null}"/> <meta property="og:keywords" th:content="${currentURI.ogKeywords}" th:if="${currentURI != null}"/>
<meta property="og:image" th:content="${currentURI.ogImage}" th:if="${currentURI != null}"/> <meta property="og:image" th:content="${currentURI.ogImage}" th:if="${currentURI != null}"/>
<meta name="robots" content="noindex, nofollow" th:if="${@environment.getProperty('spring.profiles.active') != 'prod'}">
<!-- 부트스트랩 css 숨김 처리 --> <!-- 부트스트랩 css 숨김 처리 -->
<!-- <link rel="stylesheet" th:href="@{/static/library/bootstrap/bootstrap.min.css}"/>--> <!-- <link rel="stylesheet" th:href="@{/static/library/bootstrap/bootstrap.min.css}"/>-->

View File

@@ -364,7 +364,7 @@
ajaxUtil._ajaxMethod( ajaxUtil._ajaxMethod(
'/api/forestProduct/save', '/api/forestProduct/save',
JSON.stringify(dataOj), JSON.stringify(dataOj),
(response) => { // 성공 () => { // 성공
alert("등록이 완료되었습니다."); alert("등록이 완료되었습니다.");
document.querySelector(".modal-forest-product").ui.close(); document.querySelector(".modal-forest-product").ui.close();

View File

@@ -145,6 +145,7 @@
(response) => { (response) => {
console.log("임가방문정보 상세 응답값 : ", response); console.log("임가방문정보 상세 응답값 : ", response);
setVisitFormData(response); setVisitFormData(response);
document.querySelector(".modal-visit-info").ui.open();
}, },
function (code, rstData) { function (code, rstData) {
console.log("error : ", code); console.log("error : ", code);
@@ -152,9 +153,9 @@
'get', 'get',
'json' 'json'
); );
} else {
document.querySelector(".modal-visit-info").ui.open();
} }
document.querySelector(".modal-visit-info").ui.open();
} }
// 임가방문정보 상세 값 set // 임가방문정보 상세 값 set

View File

@@ -502,7 +502,7 @@
<td> <td>
<div class="component-input"> <div class="component-input">
<label class="checkbox-inner"> <label class="checkbox-inner">
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}"> <input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_income" value="${item.id}">
</label> </label>
</div> </div>
</td> </td>
@@ -510,7 +510,7 @@
<td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 --> <td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 -->
<td class="underline">${ifNullHyphen(item.incomeKind)}</td><!-- 수입의 종류 --> <td class="underline">${ifNullHyphen(item.incomeKind)}</td><!-- 수입의 종류 -->
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 --> <td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 --> <td class="align-right">${formatNumberWithComma(item.quantity)}</td><!-- 수량 -->
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 --> <td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) --> <td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 --> <td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
@@ -817,7 +817,39 @@
const currentListId = $(el).data('listId'); const currentListId = $(el).data('listId');
console.log('removeDaily', currentStep, currentListId); console.log('removeDaily', currentStep, currentListId);
alert('TODO : 삭제') if ($('#'+currentListId).find('input[type="checkbox"]:checked').length === 0) {
alert('삭제내용은 최소 1건은 선택해야 합니다.');
return;
} else if ($('#'+currentListId).find('input[type="checkbox"]').length === $('#'+currentListId).find('input[type="checkbox"]:checked').length) {
alert('등록내용은 최소 1건이 남아 있어야 합니다.');
return;
}
const selectedValues = [];
$('#'+currentListId).find('input[type="checkbox"]:checked').each((idx, item) => {
selectedValues.push($(item).val());
});
const obj = {};
obj.selectedIds = selectedValues;
obj.currentStep = currentStep;
console.log(obj)
etUI.dialog.confirm({
title: '삭제 안내',
message: '선택하신 항목을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
positiveCallback: function () {
ajaxUtil._ajaxAsyncNoWaiting(
'/api/household/daily/remove',
obj,
function () {
alert('데이터 삭제가 완료되었습니다.');
getDailyRecordsView(f.dailyId.value, f.groupNo.value, f.dayGroupText.value);
},
);
},
});
} }
</script> </script>
</div> </div>

View File

@@ -13,12 +13,19 @@
<div class="component-btns bottom-btn-group"> <div class="component-btns bottom-btn-group">
<div class="btns-row align-right"> <div class="btns-row align-right">
<button type="button" class="btn small"> <button type="button" class="btn small">
<span class="btn-txt">등록여부</span> <span class="btn-txt">
<label class="radio-inner">
<span class="radio-item">
<span class="radio-txt">이번달 등록내용 없음</span>
</span>
<input type="checkbox" id="forestProductStatus" data-step="FOREST_PRODUCT" onclick="showForestProductNoneConfirm(this);">
</label>
</span>
</button> </button>
<button type="button" class="btn small btn-secondary"> <button type="button" class="btn small btn-secondary" style="display: none;" onclick="showDeleteForestProductConfirm();">
<span class=" btn-txt">삭제</span> <span class=" btn-txt">삭제</span>
</button> </button>
<button type="button" class="btn small btn-primary" onclick="showForestProductModal();"> <button type="button" class="btn small btn-primary" style="display: none;" onclick="showForestProductModal();">
<span class="btn-txt">추가</span> <span class="btn-txt">추가</span>
</button> </button>
</div> </div>
@@ -73,8 +80,14 @@
// 임산물 현황 등록 상태 id set // 임산물 현황 등록 상태 id set
f.monthlyInputStatusId.value = response.monthlyStatus.id; f.monthlyInputStatusId.value = response.monthlyStatus.id;
const tbody = $('.tab-content.forest-product tbody');
// 이번달 등록내용 없음 체크 - NONE : 미등록, NOTHING : 이번달 등록내용 없음 , REGISTERED : 등록완료
$('#forestProductStatus').attr('checked', response.monthlyStatus.forestStatus === 'NOTHING');
// 이번달 등록내용 없음 에 따라 버튼 hide 처리
showForestProductNoneBtn();
const tbody = $('.tab-content.forest-product tbody');
tbody.empty(); tbody.empty();
if(response.forestProducts.length === 0) { if(response.forestProducts.length === 0) {
@@ -90,7 +103,7 @@
<td> <td>
<div class="component-input"> <div class="component-input">
<label class="checkbox-inner"> <label class="checkbox-inner">
<input type="checkbox" id="temp_checkbox_000${item.id}" name="temp_checkbox_000${item.id}" value="${item.id}"> <input type="checkbox" id="forestRemoveIds_${item.id}" name="forestRemoveIds" value="${item.id}">
</label> </label>
</div> </div>
</td> </td>
@@ -123,6 +136,120 @@
'json' 'json'
); );
} }
// 금일 데이터 없음에 따라 버튼 hide/show 처리
const showForestProductNoneBtn = () => {
$('.table-tit-group').each(function(index, item) {
let checkedIndex = false;
$(item).find('[type="button"]').each(function(indexBtn, itemBtn) {
let $chkBox = $(itemBtn).find('input[type="checkbox"]');
if (($chkBox.length !== 0 && $chkBox.is(':disabled'))) {
checkedIndex = true;
}
if (checkedIndex) {
$(itemBtn).hide();
} else {
$(itemBtn).show();
}
if ($chkBox.length !== 0) {
checkedIndex = $chkBox.is(':checked') || $chkBox.is(':disabled');
}
});
});
}
// 데이터 초기화 Confirm
const showForestProductNoneConfirm = (el) => {
const todayNone = $(el).is(':checked') ? 'Y' : 'N';
const obj = $(f).serializeObject();
obj.todayNone = todayNone;
if (todayNone === 'Y') {
etUI.dialog.confirm({
title: '초기화 안내',
message: '등록하신 모든 내용을 삭제하시겠어요?<br>삭제된 내용은 복구할 수 없습니다.',
negativeCallback: function () {
$(el).prop('checked', todayNone !== 'Y');
},
positiveCallback: function () {
updateForestProductNone(obj);
},
});
} else {
updateForestProductNone(obj);
}
}
// 이번달 등록내용 없음 수정 처리
const updateForestProductNone = (obj) => {
console.log(obj);
ajaxUtil._ajaxMethod(
'/api/household/forestProduct/nothing',
JSON.stringify(obj),
() => {
if (obj.todayNone === 'Y') {
alert('데이터 초기화가 완료되었습니다.');
} else {
alert('등록 상태가 변경되었습니다.');
}
getForestProductsStatus();
},
function (code, rstData) {
},
'patch',
'json',
{ handle422Type: 'alert' }
);
}
// 임산물현황 삭제 Confirm
const showDeleteForestProductConfirm = () => {
const checkedIds = Array.from(
document.querySelectorAll('input[name="forestRemoveIds"]:checked')
).map(el => Number(el.value));
if(checkedIds.length <= 0) {
alert("임산물을 선택해주세요.");
return
}
etUI.dialog.confirm({
title: '삭제 안내',
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
positiveCallback: function () {
goDeleteForestProduct(checkedIds);
},
});
}
// 임산물현황 삭제
const goDeleteForestProduct = (checkedIds) => {
const f = document.reqForm;
ajaxUtil._ajaxMethod(
'/api/household/forestProducts/delete',
JSON.stringify({
monthlyInputStatusId: f.monthlyInputStatusId.value,
forestRemoveIds: checkedIds
}),
() => { // 성공
alert("임산물현황이 삭제되었습니다.");
getForestProductsStatus();
},
function (code, rstData) {
if(code == 422) alert(rstData.responseText);
},
'delete',
'json',
{ handle422Type: 'alert' }
);
}
</script> </script>
</div> </div>
</html> </html>

View File

@@ -10,7 +10,7 @@
<h3></h3> <h3></h3>
<div class="component-btns bottom-btn-group"> <div class="component-btns bottom-btn-group">
<div class="btns-row align-right"> <div class="btns-row align-right">
<button type="button" class="btn small btn-secondary" onclick="goDeleteVisitInfo();"> <button type="button" class="btn small btn-secondary" onclick="showDeleteVisitInfoConfirm();">
<span class=" btn-txt">삭제</span> <span class=" btn-txt">삭제</span>
</button> </button>
<button type="button" class="btn small btn-primary" onclick="showVisitInfoModal();"> <button type="button" class="btn small btn-primary" onclick="showVisitInfoModal();">
@@ -94,38 +94,47 @@
); );
} }
// 임가방문정보 삭제 // 임가방문정보 삭제 confirm
const goDeleteVisitInfo = () => { const showDeleteVisitInfoConfirm = () => {
const checkedIds = Array.from( const checkedIds = Array.from(
document.querySelectorAll('input[name="visitRemoveIds"]:checked') document.querySelectorAll('input[name="visitRemoveIds"]:checked')
).map(el => Number(el.value)); ).map(el => Number(el.value));
if(checkedIds.length <= 0) { if(checkedIds.length <= 0) {
alert("임가방문정보를 선택해주세요."); alert("임가방문정보를 선택해주세요.");
return return;
} }
if(confirm("선택하신 내용을 삭제하시겠습니까? 삭제한 항목은 복구할 수 없습니다.")) { etUI.dialog.confirm({
const f = document.reqForm; title: '삭제 안내',
message: '선택하신 내용을 삭제하시겠습니까?<br>삭제한 항목은 복구할 수 없습니다.',
positiveCallback: function () {
goDeleteVisitInfo(checkedIds);
},
});
}
ajaxUtil._ajaxMethod( // 임가방문정보 삭제
'/api/visitInfo/remove', const goDeleteVisitInfo = (checkedIds) => {
JSON.stringify({ const f = document.reqForm;
householdSeq: f.householdSeq.value,
visitRemoveIds: checkedIds ajaxUtil._ajaxMethod(
}), '/api/visitInfo/remove',
(response) => { // 성공 JSON.stringify({
alert("방문정보가 삭제되었습니다."); householdSeq: f.householdSeq.value,
getVisitInfo(); visitRemoveIds: checkedIds
}, }),
function (code, rstData) { () => { // 성공
if(code == 422) alert(rstData.responseText); alert("방문정보가 삭제되었습니다.");
}, getVisitInfo();
'delete', },
'json', function (code, rstData) {
{ handle422Type: 'alert' } if(code == 422) alert(rstData.responseText);
); },
} 'delete',
'json',
{ handle422Type: 'alert' }
);
} }
</script> </script>
</div> </div>

View File

@@ -25,7 +25,7 @@
</div> </div>
<div class="component-input"> <div class="component-input">
<div class="input-field"> <div class="input-field">
<input type="text" id="temp_input_0001" th:field="*{searchValue}" placeholder="검색어를 입력하세요."> <input type="text" id="temp_input_0001" th:field="*{searchValue}" placeholder="검색어를 입력하세요." onkeypress="if(event.key === 'Enter') goSearch();">
</div> </div>
</div> </div>
</div> </div>
@@ -181,6 +181,8 @@
f.searchValue.value = ''; f.searchValue.value = '';
f.searchArea.value = ''; f.searchArea.value = '';
f.searchAccountDisabled.value = ''; f.searchAccountDisabled.value = '';
f.method = 'GET';
f.submit();
} }
// 상세페이지 이동 // 상세페이지 이동
function goDetail(seq) { function goDetail(seq) {

View File

@@ -101,7 +101,9 @@ public class FrontSecurityConfig {
.clearAuthentication(true) .clearAuthentication(true)
.logoutRequestMatcher(new AntPathRequestMatcher("/logout"))) .logoutRequestMatcher(new AntPathRequestMatcher("/logout")))
.sessionManagement( .sessionManagement(
session -> session.maximumSessions(maxSessionNum).maxSessionsPreventsLogin(false)) session -> session.maximumSessions(maxSessionNum).maxSessionsPreventsLogin(false).expiredUrl("/login"))
.sessionManagement(
session -> session.invalidSessionUrl("/login"))
.oauth2Login( .oauth2Login(
config -> config ->
config config

View File

@@ -9,4 +9,9 @@ public class CommonConstants {
* 단위의 직접입력 코드 * 단위의 직접입력 코드
*/ */
public static final String UNIT_CODE_SELF = "code.record.unit.self"; public static final String UNIT_CODE_SELF = "code.record.unit.self";
/**
* 작업 면적의 직접입력 코드
*/
public static final String AREA_CODE_OTHER = "code.record.area.self";
} }

View File

@@ -21,6 +21,24 @@ public class CreateDailyExpenseValidator implements Validator {
public void validate(Object target, Errors errors) { public void validate(Object target, Errors errors) {
CreateDailyExpenseReqVO vo = (CreateDailyExpenseReqVO) target; CreateDailyExpenseReqVO vo = (CreateDailyExpenseReqVO) target;
if (vo.getQuantity() == null && !StringUtils.isBlank(vo.getUnitCode())) {
errors.rejectValue(
"quantity", "valid.common.required",
"수량을 입력해 주세요.");
}
if (vo.getQuantity() != null && StringUtils.isBlank(vo.getUnitCode())) {
errors.rejectValue(
"unitCode", "valid.common.required",
"단위를 선택해 주세요.");
}
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
errors.rejectValue(
"unitSelf", "valid.common.required",
"단위를 입력해 주세요.");
}
if (vo.getPrice() == null && vo.getEstimatedValue() == null) { if (vo.getPrice() == null && vo.getEstimatedValue() == null) {
errors.rejectValue( errors.rejectValue(
"price", "valid.common.required", "price", "valid.common.required",
@@ -29,11 +47,5 @@ public class CreateDailyExpenseValidator implements Validator {
"estimatedValue", "valid.common.required", "estimatedValue", "valid.common.required",
"현금 또는 현물평가액을 입력해 주세요."); "현금 또는 현물평가액을 입력해 주세요.");
} }
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
errors.rejectValue(
"unitSelf", "valid.common.required",
"단위를 입력해 주세요.");
}
} }
} }

View File

@@ -1,5 +1,6 @@
package app.module.front.usecase.daily.farming.adapters.web.validator; package app.module.front.usecase.daily.farming.adapters.web.validator;
import app.module.front.config.constants.CommonConstants;
import app.module.front.usecase.daily.farming.adapters.web.model.CreateDailyFarmingReqVO; import app.module.front.usecase.daily.farming.adapters.web.model.CreateDailyFarmingReqVO;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.tika.utils.StringUtils; import org.apache.tika.utils.StringUtils;
@@ -20,12 +21,30 @@ public class CreateDailyFarmingValidator implements Validator {
public void validate(Object target, Errors errors) { public void validate(Object target, Errors errors) {
CreateDailyFarmingReqVO vo = (CreateDailyFarmingReqVO) target; CreateDailyFarmingReqVO vo = (CreateDailyFarmingReqVO) target;
if ("SELF".equals(vo.getProductCode()) && StringUtils.isBlank(vo.getProductSelf())) { if (CommonConstants.UNIT_CODE_SELF.equals(vo.getProductCode()) && StringUtils.isBlank(vo.getProductSelf())) {
errors.rejectValue( errors.rejectValue(
"categorySelf", "valid.common.required", "categorySelf", "valid.common.required",
"생산물을 입력해 주세요."); "생산물을 입력해 주세요.");
} }
if (vo.getQuantity() == null && !StringUtils.isBlank(vo.getUnitCode())) {
errors.rejectValue(
"quantity", "valid.common.required",
"수량을 입력해 주세요.");
}
if (vo.getQuantity() != null && StringUtils.isBlank(vo.getUnitCode())) {
errors.rejectValue(
"unitCode", "valid.common.required",
"단위를 선택해 주세요.");
}
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
errors.rejectValue(
"unitSelf", "valid.common.required",
"단위를 입력해 주세요.");
}
if (vo.getEstimatedValue() == null) { if (vo.getEstimatedValue() == null) {
errors.rejectValue( errors.rejectValue(
"estimatedValue", "valid.common.required", "estimatedValue", "valid.common.required",

View File

@@ -1,5 +1,6 @@
package app.module.front.usecase.daily.forestry.adapters.web.validator; package app.module.front.usecase.daily.forestry.adapters.web.validator;
import app.module.front.config.constants.CommonConstants;
import app.module.front.usecase.daily.forestry.adapters.web.model.CreateDailyForestryReqVO; import app.module.front.usecase.daily.forestry.adapters.web.model.CreateDailyForestryReqVO;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.tika.utils.StringUtils; import org.apache.tika.utils.StringUtils;
@@ -20,6 +21,24 @@ public class CreateDailyForestryValidator implements Validator {
public void validate(Object target, Errors errors) { public void validate(Object target, Errors errors) {
CreateDailyForestryReqVO vo = (CreateDailyForestryReqVO) target; CreateDailyForestryReqVO vo = (CreateDailyForestryReqVO) target;
if (vo.getQuantity() == null && !StringUtils.isBlank(vo.getUnitCode())) {
errors.rejectValue(
"quantity", "valid.common.required",
"수량을 입력해 주세요.");
}
if (vo.getQuantity() != null && StringUtils.isBlank(vo.getUnitCode())) {
errors.rejectValue(
"unitCode", "valid.common.required",
"단위를 선택해 주세요.");
}
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
errors.rejectValue(
"unitSelf", "valid.common.required",
"단위를 입력해 주세요.");
}
if (vo.getEstimatedValue() == null) { if (vo.getEstimatedValue() == null) {
errors.rejectValue( errors.rejectValue(
"estimatedValue", "valid.common.required", "estimatedValue", "valid.common.required",

View File

@@ -21,6 +21,24 @@ public class CreateDailyIncomeValidator implements Validator {
public void validate(Object target, Errors errors) { public void validate(Object target, Errors errors) {
CreateDailyIncomeReqVO vo = (CreateDailyIncomeReqVO) target; CreateDailyIncomeReqVO vo = (CreateDailyIncomeReqVO) target;
if (vo.getQuantity() == null && !StringUtils.isBlank(vo.getUnitCode())) {
errors.rejectValue(
"quantity", "valid.common.required",
"수량을 입력해 주세요.");
}
if (vo.getQuantity() != null && StringUtils.isBlank(vo.getUnitCode())) {
errors.rejectValue(
"unitCode", "valid.common.required",
"단위를 선택해 주세요.");
}
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
errors.rejectValue(
"unitSelf", "valid.common.required",
"단위를 입력해 주세요.");
}
if (vo.getPrice() == null && vo.getEstimatedValue() == null) { if (vo.getPrice() == null && vo.getEstimatedValue() == null) {
errors.rejectValue( errors.rejectValue(
"price", "valid.common.required", "price", "valid.common.required",
@@ -29,11 +47,5 @@ public class CreateDailyIncomeValidator implements Validator {
"estimatedValue", "valid.common.required", "estimatedValue", "valid.common.required",
"현금 또는 현물평가액을 입력해 주세요."); "현금 또는 현물평가액을 입력해 주세요.");
} }
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
errors.rejectValue(
"unitSelf", "valid.common.required",
"단위를 입력해 주세요.");
}
} }
} }

View File

@@ -1,5 +1,6 @@
package app.module.front.usecase.daily.work.adapters.web.validator; package app.module.front.usecase.daily.work.adapters.web.validator;
import app.module.front.config.constants.CommonConstants;
import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO; import app.module.front.usecase.daily.work.adapters.web.model.CreateDailyWorkReqVO;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.apache.tika.utils.StringUtils; import org.apache.tika.utils.StringUtils;
@@ -20,19 +21,37 @@ 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.getHarvestQuantity() == null) { if (vo.getWorkLandArea() == null && !StringUtils.isBlank(vo.getAreaUnitCode())) {
errors.rejectValue( errors.rejectValue(
"harvestQuantity", "valid.common.required", "workLandArea", "valid.common.required",
"수확량을 입력해 주세요."); "작업 면적을 입력해 주세요.");
} }
if ("SELF".equals(vo.getAreaUnitCode()) && StringUtils.isBlank(vo.getAreaUnitSelf())) { if (vo.getWorkLandArea() != null && StringUtils.isBlank(vo.getAreaUnitCode())) {
errors.rejectValue(
"areaUnitCode", "valid.common.required",
"단위를 선택해 주세요.");
}
if (CommonConstants.AREA_CODE_OTHER.equals(vo.getAreaUnitCode()) && StringUtils.isBlank(vo.getAreaUnitSelf())) {
errors.rejectValue( errors.rejectValue(
"areaUnitSelf", "valid.common.required", "areaUnitSelf", "valid.common.required",
"단위를 입력해 주세요."); "단위를 입력해 주세요.");
} }
if ("SELF".equals(vo.getHarvestUnitCode()) && StringUtils.isBlank(vo.getHarvestUnitSelf())) { if (vo.getHarvestQuantity() == null && !StringUtils.isBlank(vo.getHarvestUnitCode())) {
errors.rejectValue(
"harvestQuantity", "valid.common.required",
"수확량을 입력해 주세요.");
}
if (vo.getHarvestQuantity() != null && StringUtils.isBlank(vo.getHarvestUnitCode())) {
errors.rejectValue(
"harvestUnitCode", "valid.common.required",
"단위를 선택해 주세요.");
}
if (CommonConstants.UNIT_CODE_SELF.equals(vo.getHarvestUnitCode()) && StringUtils.isBlank(vo.getHarvestUnitSelf())) {
errors.rejectValue( errors.rejectValue(
"harvestUnitSelf", "valid.common.required", "harvestUnitSelf", "valid.common.required",
"단위를 입력해 주세요."); "단위를 입력해 주세요.");

View File

@@ -11,7 +11,7 @@ import lombok.NoArgsConstructor;
public class UpdateUserReqVO { public class UpdateUserReqVO {
@NotBlank(message = "이름을 입력해주세요.")//"이름은 필수 항목입니다.") @NotBlank(message = "이름을 입력해주세요.")//"이름은 필수 항목입니다.")
@Pattern(regexp = "^[가-힣]{2,10}$", message = "이름을 입력해주세요.")//"이름은 2~10자의 한글이어야 합니다.") @Pattern(regexp = "^[가-힣0-9()]{2,10}$", message = "이름을 입력해주세요.")//"이름은 2~10자의 한글이어야 합니다.")
private String ownerName; private String ownerName;
@NotNull(message = "나이를 입력해주세요.") @NotNull(message = "나이를 입력해주세요.")
@@ -19,13 +19,13 @@ public class UpdateUserReqVO {
@Max(value = 120, message = "나이를 입력해주세요.")//"나이는 120세 이하이어야 합니다.") @Max(value = 120, message = "나이를 입력해주세요.")//"나이는 120세 이하이어야 합니다.")
private Integer ownerAge; private Integer ownerAge;
@Pattern(regexp = "^\\d{2,3}$", message = "가구 연락처를 입력해주세요.")//"가구 연락처는 2~3자리 숫자여야 합니다.") @Pattern(regexp = "^$|^\\d{2,3}$", message = "가구 연락처를 입력해주세요.")//"가구 연락처는 2~3자리 숫자여야 합니다.")
private String tel1; private String tel1;
@Pattern(regexp = "^\\d{3,4}$", message = "가구 연락처를 입력해주세요.")//"가운데 번호는 3~4자리 숫자여야 합니다.") @Pattern(regexp = "^$|^\\d{3,4}$", message = "가구 연락처를 입력해주세요.")//"가운데 번호는 3~4자리 숫자여야 합니다.")
private String tel2; private String tel2;
@Pattern(regexp = "^\\d{4}$", message = "가구 연락처를 입력해주세요.")//"끝 번호는 4자리 숫자여야 합니다.") @Pattern(regexp = "^$|^\\d{4}$", message = "가구 연락처를 입력해주세요.")//"끝 번호는 4자리 숫자여야 합니다.")
private String tel3; private String tel3;
@Pattern(regexp = "^\\d{2,3}$", message = "휴대폰 번호를 입력해주세요.")//"휴대폰 번호는 2~3자리 숫자여야 합니다.") @Pattern(regexp = "^\\d{2,3}$", message = "휴대폰 번호를 입력해주세요.")//"휴대폰 번호는 2~3자리 숫자여야 합니다.")

View File

@@ -180,7 +180,7 @@ var ajaxUtil = {
if (formElement.length > 0) { if (formElement.length > 0) {
$(formElement).find('.component-input').removeClass('input-invalid'); $(formElement).find('.component-input').removeClass('input-invalid');
$(formElement).find('.input-flex-group').removeClass('invalid'); $(formElement).find('.input-flex-group').removeClass('invalid');
$(formElement).find('.select-group').removeClass('input-invalid'); $(formElement).find('.select-group').removeClass('select-invalid');
$(formElement).find('.input-info').each(function () { $(formElement).find('.input-info').each(function () {
$(this).remove(); $(this).remove();
}); });
@@ -223,7 +223,7 @@ var ajaxUtil = {
infoBox = $('<ul class="input-info"></ul>').appendTo(component); infoBox = $('<ul class="input-info"></ul>').appendTo(component);
} }
infoBox.html('<li>' + oj.message + '1111</li>'); infoBox.html('<li>' + oj.message + '</li>');
} }
} }
@@ -238,7 +238,10 @@ var ajaxUtil = {
// 포커스 이동 // 포커스 이동
if ($('.input-invalid').length != 0) { if ($('.input-invalid').length != 0) {
$('.input-invalid').eq(0).find('input,select').focus(); $('.input-invalid').eq(0).find('input').focus();
}
if ($('.select-invalid').length != 0) {
$('.select-invalid').eq(0).find('button').focus();
} }
if (typeof errorCallback !== 'undefined') { if (typeof errorCallback !== 'undefined') {

View File

@@ -95,8 +95,6 @@ krip.daily.baseBindUI = function() {
//document.reqForm.todayNone.value = 'N'; //document.reqForm.todayNone.value = 'N';
$noneWrap.val('N'); $noneWrap.val('N');
} }
// TODO 2번 이벤트 발생하는 원인 찾기
console.log(1111)
krip.daily.todayNone(ENV.month, ENV.groupNo, $noneWrap.data('type'), checked); krip.daily.todayNone(ENV.month, ENV.groupNo, $noneWrap.data('type'), checked);
}); });

View File

@@ -26,16 +26,7 @@
<meta name="_csrf" th:content="${_csrf.token}"/> <meta name="_csrf" th:content="${_csrf.token}"/>
<meta name="_csrf_header" th:content="${_csrf.headerName}"/> <meta name="_csrf_header" th:content="${_csrf.headerName}"/>
<meta name="theme-color" content="#4BBC43"> <!--/* TODO : theme-color */-->
<!-- 메인 아이콘 (512x512 PNG) -->
<!-- <link rel="icon" href="/icon-512.png" sizes="512x512"> -->
<link rel="icon" sizes="512x512"><!-- TODO : href="" -->
<!-- iOS 홈화면 -->
<!-- <link rel="apple-touch-icon" href="/icon-512.png"> -->
<link rel="apple-touch-icon"><!-- TODO : href="" -->
<!-- PWA -->
<link rel="manifest" href="/manifest.json">
<link rel="icon" type="image/x-icon" /><!-- TODO : href="" -->
<link th:href="@{/static/assets/styles/style.css}" type="text/css" rel="stylesheet" /> <link th:href="@{/static/assets/styles/style.css}" type="text/css" rel="stylesheet" />
<script th:src="@{/static/assets/scripts/common.ui.plugin.js}"></script> <script th:src="@{/static/assets/scripts/common.ui.plugin.js}"></script>

View File

@@ -369,7 +369,6 @@
errors.push({field: form.transferCategoryCode.value+"_value", message: '수입대상을 입력해주세요.'}); errors.push({field: form.transferCategoryCode.value+"_value", message: '수입대상을 입력해주세요.'});
} }
} }
if (!form.sourcePurpose.value) errors.push({field: 'sourcePurpose', message: '수입원을 입력해주세요.'});
if(form.count.value){ if(form.count.value){
if(!form.unitCode.value){ if(!form.unitCode.value){
@@ -559,7 +558,9 @@
</div> </div>
<ul class="detail-list"> <ul class="detail-list">
<li><p>재배형태</p><span>${getCrop(product.cropCode)}</span></li> <li><p>재배형태</p><span>${getCrop(product.cropCode)}</span></li>
<li><p>수입원</p><span>${product.sourcePurpose}</span></li> ${product.sourcePurpose != null && product.sourcePurpose != ''
? `<li><p>수입원</p><span>${product.sourcePurpose}</span></li>`
: ''}
${tagCount} ${tagCount}
<li><p>현금</p><span>${format(product.price)}원</span></li> <li><p>현금</p><span>${format(product.price)}원</span></li>
</ul> </ul>

View File

@@ -86,12 +86,16 @@
<!-- transferCategory+Text--> <!-- transferCategory+Text-->
<th:block th:each="item : ${transferCategoryList}"> <th:block th:each="item : ${transferCategoryList}">
<div class="component-input " th:data-option="${item.codeText}"> <div class="component-input " th:data-option="${item.codeText}">
<div class="input-field"> <div class="input-field" th:if="${item.id != 'code.bank.input.10' and item.id != 'code.bank.input.12' and item.id != 'code.bank.input.13'}">
<input type="text" th:id="${item.id}+'_value'" th:name="${item.id}+'_value'" value="" placeholder="수입 대상을 입력해 주세요." maxlength="30"> <input type="text" th:id="${item.id}+'_value'" th:name="${item.id}+'_value'"
value="" maxlength="30"
th:placeholder="${item.id == 'code.bank.input.self' ? '수입의 종류를 입력해 주세요.' : '수입 대상을 입력해 주세요.'}">
</div> </div>
<th:block th:if="${item.id == 'code.bank.input.1' or item.id == 'code.bank.input.4'}">
<ul class="guide-info" th:if="${item.msgCode}"> <ul class="guide-info" th:if="${item.msgCode}">
<li class="txt-blue" th:text="${item.msgCode}"></li> <li class="txt-blue" th:text="${item.msgCode}"></li>
</ul> </ul>
</th:block>
</div> </div>
</th:block> </th:block>
</div> </div>
@@ -100,7 +104,6 @@
<div class="input-label"> <div class="input-label">
<label for="sourcePurpose" class="label-txt"> <label for="sourcePurpose" class="label-txt">
수입원 수입원
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label> </label>
</div> </div>
<div class="input-field"> <div class="input-field">

View File

@@ -361,7 +361,6 @@
} }
} }
if (!form.sourcePurpose.value) errors.push({field: 'sourcePurpose', message: '용도 입력해주세요.'});
if(form.count.value){ if(form.count.value){
if(!form.unitCode.value){ if(!form.unitCode.value){
errors.push({ errors.push({
@@ -552,7 +551,9 @@
${buttonGroupHtml} ${buttonGroupHtml}
</div> </div>
<ul class="detail-list"> <ul class="detail-list">
<li><p>용도</p><span>${product.sourcePurpose}</span></li> ${product.sourcePurpose != null && product.sourcePurpose != ''
? `<li><p>용도</p><span>${product.sourcePurpose}</span></li>`
: ''}
${tagCount} ${tagCount}
<li><p>현금</p><span>${format(product.price)}원</span></li> <li><p>현금</p><span>${format(product.price)}원</span></li>
</ul> </ul>

View File

@@ -63,7 +63,6 @@
<div class="input-label"> <div class="input-label">
<label for="sourcePurpose" class="label-txt"> <label for="sourcePurpose" class="label-txt">
용도 용도
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label> </label>
</div> </div>
<div class="input-field"> <div class="input-field">

View File

@@ -93,7 +93,7 @@
</p> </p>
</div> </div>
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet"> <div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
<input type="hidden" name="unitCode" th:value="${detail.unitCode}"> <input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
<button type="button" class="select-box"> <button type="button" class="select-box">
<span class="select-txt"></span> <span class="select-txt"></span>
</button> </button>

View File

@@ -20,7 +20,7 @@
<strong>지출 내역 [[${#lists.isEmpty(expenseList) ? 0 : #lists.size(expenseList)}]]건 등록</strong> <br> <strong>지출 내역 [[${#lists.isEmpty(expenseList) ? 0 : #lists.size(expenseList)}]]건 등록</strong> <br>
되었습니다. 되었습니다.
</h3> </h3>
<p th:if="${#lists.isEmpty(expenseList)}">지출 내역을 등록해 주세요..</p> <p th:if="${#lists.isEmpty(expenseList)}">지출 내역을 등록해 주세요.</p>
<p th:unless="${#lists.isEmpty(expenseList)}">등록 내용을 확인하거나 다음 단계로 이동하세요.</p> <p th:unless="${#lists.isEmpty(expenseList)}">등록 내용을 확인하거나 다음 단계로 이동하세요.</p>
</hgroup> </hgroup>
@@ -140,10 +140,6 @@
<section layout:fragment="script"> <section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script> <script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = { let ENV = {
httpUrl: { httpUrl: {
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl', root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -80,7 +80,7 @@
</p> </p>
</div> </div>
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet"> <div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
<input type="hidden" name="unitCode" th:value="${detail.unitCode}"> <input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
<button type="button" class="select-box"> <button type="button" class="select-box">
<span class="select-txt"></span> <span class="select-txt"></span>
</button> </button>

View File

@@ -3,19 +3,11 @@
xmlns:th="http://www.thymeleaf.org" lang="ko"> xmlns:th="http://www.thymeleaf.org" lang="ko">
<div layout:fragment="content" th:classappend="acco-wrap"> <div layout:fragment="content" th:classappend="acco-wrap">
[[${dailyRecord.registrable}]]
[[${moveStep}]],
[[${dailyRecord.modifiable}]]
--
[[${(not dailyRecord.modifiable)}]]
<main id="content" role="main" <main id="content" role="main"
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable } th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
, btnDisabled=${(not btnActive) , btnDisabled=${(not btnActive)
|| #strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)} || #strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}"> , btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
[[${btnActive}]], [[${btnDisabled}]], [[${btnIcoClass}]]
<div class="inner"> <div class="inner">
<hgroup class="tit-group"> <hgroup class="tit-group">
<h3> <h3>
@@ -151,10 +143,6 @@
<section layout:fragment="script"> <section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script> <script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = { let ENV = {
httpUrl: { httpUrl: {
root: /*[[|/record/farming/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl', root: /*[[|/record/farming/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -55,7 +55,7 @@
</p> </p>
</div> </div>
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet"> <div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
<input type="hidden" name="unitCode" th:value="${detail.unitCode}"> <input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
<button type="button" class="select-box"> <button type="button" class="select-box">
<span class="select-txt"></span> <span class="select-txt"></span>
</button> </button>

View File

@@ -143,10 +143,6 @@
<section layout:fragment="script"> <section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script> <script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = { let ENV = {
httpUrl: { httpUrl: {
root: /*[[|/record/forestry/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl', root: /*[[|/record/forestry/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -123,7 +123,7 @@
</p> </p>
</div> </div>
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet"> <div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
<input type="hidden" name="unitCode" th:value="${detail.unitCode}"> <input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
<button type="button" class="select-box"> <button type="button" class="select-box">
<span class="select-txt"></span> <span class="select-txt"></span>
</button> </button>

View File

@@ -10,13 +10,6 @@
<div> <div>
detail: [[${dailyRecord}]] detail: [[${dailyRecord}]]
</div> </div>
<div>
[[${dailyRecord.registrable}]]
[[${moveStep}]],
[[${dailyRecord.modifiable}]]
<br>
//http://localhost:8080/record/income/202505/12?type=step1&target=income
</div>
</th:block> </th:block>
<main id="content" role="main" <main id="content" role="main"
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable } th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
@@ -162,10 +155,6 @@
<section layout:fragment="script"> <section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script> <script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = { let ENV = {
httpUrl: { httpUrl: {
root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl', root: /*[[|/record/daily/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -128,10 +128,6 @@
<section layout:fragment="script"> <section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script> <script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = { let ENV = {
httpUrl: { httpUrl: {
root: /*[[|/record/power/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl', root: /*[[|/record/power/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -66,7 +66,7 @@
</div> </div>
<div id="areaUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" <div id="areaUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
data-props-type="bottomSheet"> data-props-type="bottomSheet">
<input type="hidden" name="areaUnitCode" th:value="${detail.areaUnitCode}"> <input type="hidden" name="areaUnitCode" data-type="select" th:value="${detail.areaUnitCode}">
<button type="button" class="select-box"> <button type="button" class="select-box">
<span class="select-txt"></span> <span class="select-txt"></span>
</button> </button>
@@ -104,7 +104,6 @@
<div class="input-label"> <div class="input-label">
<label for="harvestQuantity" class="label-txt"> <label for="harvestQuantity" class="label-txt">
수확량 수확량
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
</label> </label>
</div> </div>
<div class="input-field"> <div class="input-field">
@@ -120,7 +119,7 @@
</div> </div>
<div id="harvestUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" <div id="harvestUnitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요"
data-props-type="bottomSheet"> data-props-type="bottomSheet">
<input type="hidden" name="harvestUnitCode" th:value="${detail.harvestUnitCode}"> <input type="hidden" name="harvestUnitCode" data-type="select" th:value="${detail.harvestUnitCode}">
<button type="button" class="select-box"> <button type="button" class="select-box">
<span class="select-txt"></span> <span class="select-txt"></span>
</button> </button>

View File

@@ -189,10 +189,6 @@
<section layout:fragment="script"> <section layout:fragment="script">
<script th:src="@{/static/ui/page/daily-record.js}"></script> <script th:src="@{/static/ui/page/daily-record.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
$(function() {
formControl.init();
});
let ENV = { let ENV = {
httpUrl: { httpUrl: {
root: /*[[|/record/work/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl', root: /*[[|/record/work/${reqVO.searchMonth}/${reqVO.groupNo}|]]*/'rootUrl',

View File

@@ -35,7 +35,7 @@
</label> </label>
</div> </div>
<div class="input-field"> <div class="input-field">
<input type="password" name="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요" maxlength="4"> <input type="password" inputmode="numeric" maxlength="4" name="password" id="floatingPassword" placeholder="비밀번호 4자리를 입력해 주세요">
</div> </div>
<ul class="input-info" id="password-error" style="display: none;"> <ul class="input-info" id="password-error" style="display: none;">
<li>비밀번호를 입력해주세요</li> <li>비밀번호를 입력해주세요</li>