Merge branch 'dev' into 'kangsun'
# Conflicts: # front/src/main/resources/templates/info/main.html
This commit is contained in:
@@ -21,6 +21,7 @@ import org.springframework.security.core.session.SessionRegistryImpl;
|
|||||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
import org.springframework.security.web.SecurityFilterChain;
|
import org.springframework.security.web.SecurityFilterChain;
|
||||||
import org.springframework.security.web.authentication.rememberme.JdbcTokenRepositoryImpl;
|
import org.springframework.security.web.authentication.rememberme.JdbcTokenRepositoryImpl;
|
||||||
|
|
||||||
import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository;
|
import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository;
|
||||||
import org.springframework.security.web.session.HttpSessionEventPublisher;
|
import org.springframework.security.web.session.HttpSessionEventPublisher;
|
||||||
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
||||||
|
|||||||
@@ -17,27 +17,31 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
@Controller
|
@Controller
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
class GetHouseholdStatusUIController {
|
class GetHouseholdStatusUIController {
|
||||||
private final GetHouseholdStatusPortIn getHouseholdStatusPortIn;
|
private final GetHouseholdStatusPortIn getHouseholdStatusPortIn;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
private final UICodeListPortIn uiCodeListPortIn;
|
||||||
|
|
||||||
@GetMapping(path = "/households/{seq}")
|
@GetMapping(path = "/households/{seq}")
|
||||||
String operate(
|
String operate(
|
||||||
@PathVariable Long seq,
|
@PathVariable Long seq,
|
||||||
@RequestParam(required = false) String recordMonth,
|
@RequestParam(required = false) String recordMonth,
|
||||||
Model model,
|
Model model,
|
||||||
@ModelAttribute("reqVO") GetHouseholdStatusUIReqVO reqVO) {
|
@ModelAttribute("reqVO") GetHouseholdStatusUIReqVO reqVO) {
|
||||||
|
|
||||||
model.addAttribute("seq", seq);
|
model.addAttribute("seq", seq);
|
||||||
model.addAttribute("monthList", DateUiUtil.getRecentMonths(13));
|
model.addAttribute("monthList", DateUiUtil.getRecentMonths(13));
|
||||||
model.addAttribute("recordMonth", recordMonth);
|
model.addAttribute("recordMonth", recordMonth);
|
||||||
model.addAttribute("userRole", AdminUtil.getLoginUserRole());
|
model.addAttribute("userRole", AdminUtil.getLoginUserRole());
|
||||||
|
|
||||||
model.addAttribute("unitCodes", uiCodeListPortIn.connect("code.record.unit"));
|
model.addAttribute("unitCodes", uiCodeListPortIn.connect("code.record.unit"));
|
||||||
|
model.addAttribute("recordCrop", uiCodeListPortIn.connect("code.record.crop"));
|
||||||
|
model.addAttribute("recordUnit", uiCodeListPortIn.connect("code.record.unit"));
|
||||||
|
model.addAttribute("recordArea", uiCodeListPortIn.connect("code.record.area"));
|
||||||
|
model.addAttribute("recordFarming", uiCodeListPortIn.connect("code.record.farming"));
|
||||||
|
|
||||||
// 임가 상세 정보
|
// 임가 상세 정보
|
||||||
model.addAttribute("householdInfo",
|
model.addAttribute("householdInfo",
|
||||||
getHouseholdStatusPortIn.operate(new GetHouseholdStatusCmd(seq)).orElse(null));
|
getHouseholdStatusPortIn.operate(new GetHouseholdStatusCmd(seq)).orElse(null));
|
||||||
|
|
||||||
return "households/{seq}";
|
return "households/{seq}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence;
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence.modal.GetDailyIncomeDto;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.SaveDailyIncomePortOut;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain.SaveDailyIncomeCmd;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain.GetDailyIncomeCmd;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SaveDailyIncomeDao implements SaveDailyIncomePortOut {
|
||||||
|
private final SaveDailyIncomeMapper dailyIncomeMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetDailyIncomeDto detail(GetDailyIncomeCmd command) {
|
||||||
|
|
||||||
|
return dailyIncomeMapper.getDailyIncome(command);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(GetDailyIncomeCmd findCmd, SaveDailyIncomeCmd command) {
|
||||||
|
Integer existCount = dailyIncomeMapper.getRecordExistCount(findCmd);
|
||||||
|
if (existCount == 0) {
|
||||||
|
dailyIncomeMapper.createDailyIncome(command);
|
||||||
|
|
||||||
|
log.debug("[CreateDailyIncome] command={}", command);
|
||||||
|
} else {
|
||||||
|
dailyIncomeMapper.updateDailyIncome(command);
|
||||||
|
|
||||||
|
log.debug("[UpdateDailyIncome] command={}", command);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence;
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence.modal.GetDailyIncomeDto;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain.SaveDailyIncomeCmd;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain.GetDailyIncomeCmd;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface SaveDailyIncomeMapper {
|
||||||
|
/**
|
||||||
|
* 일계부 수입 데이터 조회
|
||||||
|
*
|
||||||
|
* @param command 검색 조건
|
||||||
|
* @return 수입 데이터
|
||||||
|
*/
|
||||||
|
GetDailyIncomeDto getDailyIncome(GetDailyIncomeCmd command);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 수입 데이터 존재 여부
|
||||||
|
*
|
||||||
|
* @param command 검색 조건
|
||||||
|
* @return 중복 개수
|
||||||
|
*/
|
||||||
|
Integer getRecordExistCount(GetDailyIncomeCmd command);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 수입 등록
|
||||||
|
*
|
||||||
|
* @param command 등록 데이터
|
||||||
|
*/
|
||||||
|
void createDailyIncome(SaveDailyIncomeCmd command);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 수입 수정
|
||||||
|
*
|
||||||
|
* @param command 수정 데이터
|
||||||
|
*/
|
||||||
|
void updateDailyIncome(SaveDailyIncomeCmd command);
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence.modal;
|
||||||
|
|
||||||
|
import app.module.core.config.application.enums.DailyInputType;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class GetDailyIncomeDto {
|
||||||
|
private Long id;
|
||||||
|
private Long dailyRecordSeq;
|
||||||
|
private DailyInputType inputType;
|
||||||
|
private Boolean credit;
|
||||||
|
private String cropCode;
|
||||||
|
private String cropLabel;
|
||||||
|
private String incomeKind;
|
||||||
|
private String sourcePurpose;
|
||||||
|
private String quantity;
|
||||||
|
private String unitCode;
|
||||||
|
private String unitLabel;
|
||||||
|
private String unitSelf;
|
||||||
|
private Long price;
|
||||||
|
private Long estimatedValue;
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web;
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence.modal.GetDailyIncomeDto;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.model.SaveDailyIncomeReqVO;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.model.DailyIncomeUIReqVO;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.validator.SaveDailyIncomeValidator;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.SaveDailyIncomePortIn;
|
||||||
|
import app.module.core.config.application.exception.NoRecordDataException;
|
||||||
|
import app.module.core.usecase.daily.record.adapters.persistence.model.DailyRecordDto;
|
||||||
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.BindingResult;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@RequestMapping(path = "/api/household/daily/income")
|
||||||
|
public class SaveDailyIncomeController {
|
||||||
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
|
private final SaveDailyIncomePortIn dailyIncomePortIn;
|
||||||
|
private final SaveDailyIncomeValidator sailyIncomeValidator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 수입 조회
|
||||||
|
*
|
||||||
|
* @param id 수입 일련번호
|
||||||
|
* @param reqVO 검색 조건
|
||||||
|
*/
|
||||||
|
@GetMapping(path = "/{id}")
|
||||||
|
ResponseEntity<?> detail(@PathVariable("id") String id, @ModelAttribute DailyIncomeUIReqVO reqVO) {
|
||||||
|
|
||||||
|
reqVO.setId(Long.parseLong(id));
|
||||||
|
|
||||||
|
GetDailyIncomeDto detail = dailyIncomePortIn.detail(reqVO);
|
||||||
|
if (detail == null) {
|
||||||
|
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseEntity.status(HttpStatus.OK).body(detail);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 수입 등록 처리
|
||||||
|
*
|
||||||
|
* @param formVO 입력 데이터
|
||||||
|
* @param bindingResult BindingResult
|
||||||
|
*/
|
||||||
|
@PostMapping(path = "/save")
|
||||||
|
ResponseEntity<?> create(@Valid @RequestBody SaveDailyIncomeReqVO formVO, BindingResult bindingResult) {
|
||||||
|
|
||||||
|
sailyIncomeValidator.validate(formVO, bindingResult);
|
||||||
|
if (bindingResult.hasErrors()) {
|
||||||
|
return ResponseEntity.status(HttpStatus.UNPROCESSABLE_ENTITY)
|
||||||
|
.body(bindingResult.getFieldErrors());
|
||||||
|
}
|
||||||
|
|
||||||
|
DailyRecordDto dailyRecord = this.vaildGetDailyRecord(formVO.getDailyId());
|
||||||
|
|
||||||
|
formVO.setSearchMonth(dailyRecord.getRecordMonth());
|
||||||
|
formVO.setGroupNo(dailyRecord.getGroupNo());
|
||||||
|
formVO.setDailyId(dailyRecord.getId());
|
||||||
|
log.debug("formVO: {}", formVO);
|
||||||
|
|
||||||
|
dailyIncomePortIn.create(formVO);
|
||||||
|
|
||||||
|
return ResponseEntity.status(HttpStatus.OK).body(formVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 유효성 체크 및 데이터 조회
|
||||||
|
*
|
||||||
|
* @param dailyRecordSeq 항목 일련번호
|
||||||
|
*/
|
||||||
|
private DailyRecordDto vaildGetDailyRecord(Long dailyRecordSeq) {
|
||||||
|
DailyRecordDto dailyRecord = dailyRecordPortIn.detail(dailyRecordSeq);
|
||||||
|
if (dailyRecord == null || dailyRecord.getId() == null) {
|
||||||
|
throw new NoRecordDataException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return dailyRecord;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.model;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class DailyIncomeUIReqVO {
|
||||||
|
/**
|
||||||
|
* 검색 월(yyyyMM)
|
||||||
|
*/
|
||||||
|
private String searchMonth;
|
||||||
|
/**
|
||||||
|
* 검색 그룸번호
|
||||||
|
*/
|
||||||
|
private Integer groupNo;
|
||||||
|
/**
|
||||||
|
* 임가 일련번호
|
||||||
|
*/
|
||||||
|
private Long householdSeq;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 항목 일련번호
|
||||||
|
*/
|
||||||
|
private Long dailyId;
|
||||||
|
/**
|
||||||
|
* 수입 일련번호
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.model;
|
||||||
|
|
||||||
|
import app.module.core.config.application.enums.DailyInputType;
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class SaveDailyIncomeReqVO extends DailyIncomeUIReqVO {
|
||||||
|
/**
|
||||||
|
* 등록 유형
|
||||||
|
*/
|
||||||
|
private DailyInputType inputType;
|
||||||
|
/**
|
||||||
|
* 외상판매 여부
|
||||||
|
*/
|
||||||
|
private Boolean credit;
|
||||||
|
/**
|
||||||
|
* 재배형태 코드
|
||||||
|
*/
|
||||||
|
private String cropCode;
|
||||||
|
/**
|
||||||
|
* 수입의 종류 직접입력
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "수입 종류를 입력해 주세요.")
|
||||||
|
private String incomeKind;
|
||||||
|
/**
|
||||||
|
* 수입원
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "수입원을 입력해 주세요.")
|
||||||
|
private String sourcePurpose;
|
||||||
|
/**
|
||||||
|
* 수량
|
||||||
|
*/
|
||||||
|
private Double quantity;
|
||||||
|
/**
|
||||||
|
* 단위 코드
|
||||||
|
*/
|
||||||
|
private String unitCode;
|
||||||
|
/**
|
||||||
|
* 단위 직접 입력
|
||||||
|
*/
|
||||||
|
private String unitSelf;
|
||||||
|
/**
|
||||||
|
* 현금
|
||||||
|
*/
|
||||||
|
private Long price;
|
||||||
|
/**
|
||||||
|
* 현물평가액
|
||||||
|
*/
|
||||||
|
private Long estimatedValue;
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.validator;
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.model.SaveDailyIncomeReqVO;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.apache.tika.utils.StringUtils;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.validation.Errors;
|
||||||
|
import org.springframework.validation.Validator;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SaveDailyIncomeValidator implements Validator {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supports(Class<?> clazz) {
|
||||||
|
return SaveDailyIncomeReqVO.class.equals(clazz);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void validate(Object target, Errors errors) {
|
||||||
|
SaveDailyIncomeReqVO vo = (SaveDailyIncomeReqVO) 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 ("code.record.unit.self".equals(vo.getUnitCode()) && StringUtils.isBlank(vo.getUnitSelf())) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"unitSelf", "valid.common.required",
|
||||||
|
"단위를 입력해 주세요.");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vo.getPrice() == null && vo.getEstimatedValue() == null) {
|
||||||
|
errors.rejectValue(
|
||||||
|
"price", "valid.common.required",
|
||||||
|
"현금 또는 현물평가액을 입력해 주세요.");
|
||||||
|
errors.rejectValue(
|
||||||
|
"estimatedValue", "valid.common.required",
|
||||||
|
"현금 또는 현물평가액을 입력해 주세요.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports;
|
||||||
|
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence.modal.GetDailyIncomeDto;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.model.SaveDailyIncomeReqVO;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.model.DailyIncomeUIReqVO;
|
||||||
|
|
||||||
|
public interface SaveDailyIncomePortIn {
|
||||||
|
/**
|
||||||
|
* 일계부 수입 조회
|
||||||
|
*
|
||||||
|
* @param reqVO 검색 조건
|
||||||
|
* @return 수입 상세
|
||||||
|
*/
|
||||||
|
GetDailyIncomeDto detail(DailyIncomeUIReqVO reqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 수입 등록
|
||||||
|
*
|
||||||
|
* @param formVO 입력 데이터
|
||||||
|
*/
|
||||||
|
void create(SaveDailyIncomeReqVO formVO);
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports;
|
||||||
|
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence.modal.GetDailyIncomeDto;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain.SaveDailyIncomeCmd;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain.GetDailyIncomeCmd;
|
||||||
|
|
||||||
|
public interface SaveDailyIncomePortOut {
|
||||||
|
/**
|
||||||
|
* 일계부 수입 조회
|
||||||
|
*
|
||||||
|
* @param command 검색 조건
|
||||||
|
* @return 수입 상세
|
||||||
|
*/
|
||||||
|
GetDailyIncomeDto detail(GetDailyIncomeCmd command);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 수입 등록
|
||||||
|
*
|
||||||
|
* @param findCmd 검색 조건
|
||||||
|
* @param command 입력 데이터
|
||||||
|
*/
|
||||||
|
void create(GetDailyIncomeCmd findCmd, SaveDailyIncomeCmd command);
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application;
|
||||||
|
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence.modal.GetDailyIncomeDto;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.model.SaveDailyIncomeReqVO;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.web.model.DailyIncomeUIReqVO;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.SaveDailyIncomePortIn;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.SaveDailyIncomePortOut;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain.SaveDailyIncomeCmd;
|
||||||
|
import app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain.GetDailyIncomeCmd;
|
||||||
|
import app.module.core.config.application.util.AuditUtil;
|
||||||
|
import app.module.core.config.constants.DailyRecordConstants;
|
||||||
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SaveDailyIncomeService implements SaveDailyIncomePortIn {
|
||||||
|
private final SaveDailyIncomePortOut portOut;
|
||||||
|
private final DailyRecordPortIn dailyRecordPortIn;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GetDailyIncomeDto detail(DailyIncomeUIReqVO reqVO) {
|
||||||
|
GetDailyIncomeCmd findCmd = new GetDailyIncomeCmd(
|
||||||
|
reqVO.getSearchMonth(),
|
||||||
|
reqVO.getGroupNo(),
|
||||||
|
reqVO.getHouseholdSeq(),
|
||||||
|
reqVO.getId());
|
||||||
|
|
||||||
|
return portOut.detail(findCmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(SaveDailyIncomeReqVO formVO) {
|
||||||
|
GetDailyIncomeCmd findCmd = new GetDailyIncomeCmd(
|
||||||
|
formVO.getSearchMonth(),
|
||||||
|
formVO.getGroupNo(),
|
||||||
|
formVO.getHouseholdSeq(),
|
||||||
|
formVO.getId());
|
||||||
|
|
||||||
|
SaveDailyIncomeCmd command = AuditUtil.create(
|
||||||
|
new SaveDailyIncomeCmd(
|
||||||
|
formVO.getId(),
|
||||||
|
formVO.getDailyId(),
|
||||||
|
formVO.getInputType(),
|
||||||
|
DailyRecordConstants.INCOME_CATEGORY,
|
||||||
|
(formVO.getCredit() ? DailyRecordConstants.INCOME_EXPENSE_MARK : null),
|
||||||
|
formVO.getCredit(),
|
||||||
|
formVO.getCropCode(),
|
||||||
|
formVO.getIncomeKind(),
|
||||||
|
formVO.getSourcePurpose(),
|
||||||
|
formVO.getQuantity(),
|
||||||
|
formVO.getUnitCode(),
|
||||||
|
formVO.getUnitSelf(),
|
||||||
|
formVO.getPrice(),
|
||||||
|
formVO.getEstimatedValue()));
|
||||||
|
|
||||||
|
portOut.create(findCmd, command);
|
||||||
|
|
||||||
|
dailyRecordPortIn.updateByAllStatus(findCmd.getSearchMonth(), findCmd.getGroupNo(), findCmd.getHouseholdSeq());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class GetDailyIncomeCmd {
|
||||||
|
/**
|
||||||
|
* 검색 월(yyyyMM)
|
||||||
|
*/
|
||||||
|
private String searchMonth;
|
||||||
|
/**
|
||||||
|
* 검색 그룸번호
|
||||||
|
*/
|
||||||
|
private Integer groupNo;
|
||||||
|
/**
|
||||||
|
* 임가 일련번호
|
||||||
|
*/
|
||||||
|
private Long householdSeq;
|
||||||
|
/**
|
||||||
|
* 수입 일련번호
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.ports.application.domain;
|
||||||
|
|
||||||
|
import app.module.core.config.adapters.persistence.component.AuditCommand;
|
||||||
|
import app.module.core.config.application.enums.DailyInputType;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ToString
|
||||||
|
public class SaveDailyIncomeCmd extends AuditCommand {
|
||||||
|
private Long id;
|
||||||
|
private Long dailyRecordSeq;
|
||||||
|
private DailyInputType inputType;
|
||||||
|
/**
|
||||||
|
* 유형
|
||||||
|
*/
|
||||||
|
private String category;
|
||||||
|
/**
|
||||||
|
* 지출 부호
|
||||||
|
*/
|
||||||
|
private String expenseMark;
|
||||||
|
private Boolean credit;
|
||||||
|
private String cropCode;
|
||||||
|
private String incomeKind;
|
||||||
|
private String sourcePurpose;
|
||||||
|
private Double quantity;
|
||||||
|
private String unitCode;
|
||||||
|
private String unitSelf;
|
||||||
|
private Long price;
|
||||||
|
private Long estimatedValue;
|
||||||
|
}
|
||||||
@@ -23,3 +23,15 @@ spring:
|
|||||||
# 메시지 소스 캐시 지속 시간 (단위: 초)
|
# 메시지 소스 캐시 지속 시간 (단위: 초)
|
||||||
# 개발 환경에서는 짧은 간격(10-60초), 운영 환경에서는 긴 간격(3600초 이상) 권장
|
# 개발 환경에서는 짧은 간격(10-60초), 운영 환경에서는 긴 간격(3600초 이상) 권장
|
||||||
cache-duration: 5m
|
cache-duration: 5m
|
||||||
|
|
||||||
|
# ==============================================
|
||||||
|
# 서버 압축 설정
|
||||||
|
# ==============================================
|
||||||
|
server:
|
||||||
|
servlet:
|
||||||
|
session:
|
||||||
|
cookie:
|
||||||
|
domain: fhes.kric.com
|
||||||
|
path: /
|
||||||
|
http-only: true
|
||||||
|
secure: true
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<?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.saveDailyIncome.adapters.persistence.SaveDailyIncomeMapper">
|
||||||
|
|
||||||
|
<select id="getDailyIncome"
|
||||||
|
resultType="app.module.admin.usecase.household.tab.dailyRecord.saveDailyIncome.adapters.persistence.modal.GetDailyIncomeDto">
|
||||||
|
select ds.id, ds.daily_record_seq, ds.input_type, ds.is_credit as credit
|
||||||
|
, ds.crop_code, ds.income_kind, ds.source_purpose
|
||||||
|
, ds.quantity, ds.unit_code, ds.unit_self, ds.price, ds.estimated_value
|
||||||
|
from daily_income ds
|
||||||
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
|
where ds.is_deleted = false
|
||||||
|
and ds.id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getRecordExistCount" resultType="int">
|
||||||
|
select count(1)
|
||||||
|
from daily_income ds
|
||||||
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
|
where ds.is_deleted = false
|
||||||
|
<if test="id != null and id != '0'">
|
||||||
|
and ds.id = #{id}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="createDailyIncome" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into daily_income (
|
||||||
|
daily_record_seq, input_type, category, expense_mark
|
||||||
|
, is_credit, crop_code, income_kind, source_purpose
|
||||||
|
, quantity, unit_code, unit_self, price, estimated_value
|
||||||
|
, is_deleted
|
||||||
|
, <include refid="common.fields.CreateUpdateBaseColumns"/>
|
||||||
|
) values (
|
||||||
|
#{dailyRecordSeq}, #{inputType}, #{category}, #{expenseMark}
|
||||||
|
, #{credit}, #{cropCode}, #{incomeKind}, #{sourcePurpose}
|
||||||
|
, #{quantity}, #{unitCode}, #{unitSelf}, #{price}, #{estimatedValue}
|
||||||
|
, false
|
||||||
|
, <include refid="common.fields.CreateUpdateBaseValues"/>
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateDailyIncome">
|
||||||
|
update daily_income set <include refid="common.fields.UpdateBaseSet"/>
|
||||||
|
, is_credit = #{credit}
|
||||||
|
, expense_mark = #{expenseMark}
|
||||||
|
, crop_code = #{cropCode}
|
||||||
|
, income_kind = #{incomeKind}
|
||||||
|
, source_purpose = #{sourcePurpose}
|
||||||
|
, quantity = #{quantity}
|
||||||
|
, unit_code = #{unitCode}
|
||||||
|
, unit_self = #{unitSelf}
|
||||||
|
, price = #{price}
|
||||||
|
, estimated_value = #{estimatedValue}
|
||||||
|
where is_deleted = false
|
||||||
|
and daily_record_seq = #{dailyRecordSeq}
|
||||||
|
and id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -25,47 +25,17 @@ var ajaxUtil = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_alertError : function (code) {
|
_alertError : function (code) {
|
||||||
var message = ajaxUtil._msg500;
|
let message = ajaxUtil._msg500;
|
||||||
if (code == '400') {
|
if (code === '400') {
|
||||||
message = ajaxUtil._msg400;
|
message = ajaxUtil._msg400;
|
||||||
}
|
}
|
||||||
|
|
||||||
ajaxUtil._alert(message, '오류 안내');
|
ajaxUtil._alert(message, '오류 안내');
|
||||||
},
|
},
|
||||||
_alert : function (alertMessage, alertTitle, afterEvent) {
|
_alert : function (alertMessage, alertTitle) {
|
||||||
etUI.dialog.alert({
|
console.warn(alertTitle)
|
||||||
title: alertTitle,
|
|
||||||
message: alertMessage,
|
|
||||||
type: "alert",
|
|
||||||
callback: function() {
|
|
||||||
console.log("alert callback");
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
_alertId : function (alertId, afterEvent) {
|
|
||||||
ajaxUtil._alertMethod({
|
|
||||||
id: alertId,
|
|
||||||
title: null,
|
|
||||||
message: null,
|
|
||||||
after: afterEvent !== undefined ? (afterEvent ? 'Y' : 'N') : 'N',
|
|
||||||
});
|
|
||||||
},
|
|
||||||
_alertMethod : function (jsonObj) {
|
|
||||||
ajaxUtil._ajaxSyncNoWaiting(
|
|
||||||
'/m/common/alert',
|
|
||||||
jsonObj,
|
|
||||||
function(rstData) {
|
|
||||||
var $wrap = $('#bindWrap');
|
|
||||||
if ($wrap.find('.ui-popup-common-alert').length != 0) {
|
|
||||||
$wrap.find('.ui-popup-common-alert').remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
$wrap.append(rstData);
|
alert(alertMessage);
|
||||||
uxgFn.popup.bind('.ui-popup-common-alert').open();
|
|
||||||
},
|
|
||||||
function(code, rstData) {
|
|
||||||
kri.logger.error('Do nothing. code: '+ code, rstData);
|
|
||||||
},
|
|
||||||
'html');
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@@ -130,22 +100,22 @@ var ajaxUtil = {
|
|||||||
contentType : 'application/json; charset=UTF-8',
|
contentType : 'application/json; charset=UTF-8',
|
||||||
async: async,
|
async: async,
|
||||||
statusCode : {
|
statusCode : {
|
||||||
|
400:function(){
|
||||||
|
ajaxUtil._alertError(ajaxUtil.$400);
|
||||||
|
},
|
||||||
404:function(rstData){
|
404:function(rstData){
|
||||||
ajaxUtil._hideWaiting();
|
ajaxUtil._hideWaiting();
|
||||||
if (typeof errorCallback !== 'undefined') {
|
if (typeof errorCallback !== 'undefined') {
|
||||||
errorCallback(ajaxUtil.$404, rstData);
|
errorCallback(ajaxUtil.$404, rstData);
|
||||||
} else {
|
} else {
|
||||||
// kri.menu.main();
|
console.error('statusCode: 404');
|
||||||
kri.logger.error('statusCode: 404');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
401:function(){
|
401:function(){
|
||||||
// kri.menu.main();
|
console.error('statusCode: 401');
|
||||||
kri.logger.error('statusCode: 401');
|
|
||||||
},
|
},
|
||||||
403:function(rstData){
|
403:function(rstData){
|
||||||
// kri.menu.main();
|
console.error('statusCode: 403');
|
||||||
kri.logger.error('statusCode: 403');
|
|
||||||
},
|
},
|
||||||
422:function(rstData, status) {
|
422:function(rstData, status) {
|
||||||
console.log(rstData);
|
console.log(rstData);
|
||||||
@@ -195,13 +165,15 @@ var ajaxUtil = {
|
|||||||
},
|
},
|
||||||
success : function(rstData, status) {
|
success : function(rstData, status) {
|
||||||
ajaxUtil._hideWaiting();
|
ajaxUtil._hideWaiting();
|
||||||
|
console.log('succ', rstData)
|
||||||
if (typeof successCallback !== 'undefined') {
|
if (typeof successCallback !== 'undefined') {
|
||||||
successCallback(rstData, status);
|
successCallback(rstData, status);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error : function(rstData) {
|
error : function(rstData) {
|
||||||
ajaxUtil._hideWaiting();
|
ajaxUtil._hideWaiting();
|
||||||
if (!(rstData.status == 500 || rstData.status == 422)) {
|
console.log('error')
|
||||||
|
if (!(rstData.status == 500 || rstData.status == 422 || rstData.status == 400)) {
|
||||||
if (typeof errorCallback !== 'undefined') {
|
if (typeof errorCallback !== 'undefined') {
|
||||||
errorCallback(rstData.status, rstData);
|
errorCallback(rstData.status, rstData);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -0,0 +1,265 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
|
||||||
|
layout:decorate="~{layout/layout}">
|
||||||
|
|
||||||
|
<div class="layer-wrap" th:fragment="modalFragment">
|
||||||
|
<form autocomplete="off" method="get" name="reqIncomeForm" data-modal-id=".modal-daily-income">
|
||||||
|
<input type="hidden" name="householdSeq" th:value="${seq}">
|
||||||
|
<input type="hidden" name="searchMonth">
|
||||||
|
<input type="hidden" name="groupNo">
|
||||||
|
<input type="hidden" name="id">
|
||||||
|
<input type="hidden" name="dailyId">
|
||||||
|
|
||||||
|
<div class="component-modal mypage-wrap modal01 modal-daily-income" data-props-dimm-click="true" data-state="close">
|
||||||
|
<div class="modal-dimm"></div>
|
||||||
|
<div class="modal-frame">
|
||||||
|
<div class="modal-container">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h3 class="modal-tit">
|
||||||
|
일계부 수입
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-content-inner">
|
||||||
|
<table class="type-form confirm">
|
||||||
|
<colgroup>
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
<col width="8%" />
|
||||||
|
<col width="25.3%" />
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>외상판매 여부</th>
|
||||||
|
<td class="radio-group">
|
||||||
|
<div class="component-input">
|
||||||
|
<label class="radio-inner">
|
||||||
|
<input type="radio" id="isCredit_N" name="credit" value="false" checked>
|
||||||
|
<span class="radio-item">
|
||||||
|
<span class="radio-txt">N</span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="component-input">
|
||||||
|
<label class="radio-inner">
|
||||||
|
<input type="radio" id="isCredit_Y" name="credit" value="true">
|
||||||
|
<span class="radio-item">
|
||||||
|
<span class="radio-txt">Y</span>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>재배형태</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" name="cropCode" required>
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="item : ${recordCrop}"
|
||||||
|
th:value="${item.id}"
|
||||||
|
th:text="${item.codeText}">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>수입의 종류<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="incomeKind" name="incomeKind" maxlength="30">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<th>수입원<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="sourcePurpose" name="sourcePurpose" maxlength="30">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>수량</th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity" min="1" max="9999999999"
|
||||||
|
maxlength="10" oninput="limitMaxLength(this);">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<th>단위</th>
|
||||||
|
<td colspan="2">
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" name="unitCode" onchange="selectedUnit(this);" required>
|
||||||
|
<option value="">선택</option>
|
||||||
|
<option th:each="item : ${recordUnit}"
|
||||||
|
th:value="${item.id}"
|
||||||
|
th:text="${item.codeText}">
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="component-input unit-self-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="unitSelf" name="unitSelf" maxlength="30" disabled>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>현금(원)<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" inputmode="numeric" pattern="[0-9]*" id="price" name="price" step="0" min="1" max="9999999999"
|
||||||
|
maxlength="10" oninput="limitMaxLength(this); priceDisabled(this, this.form.estimatedValue)">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<th>현물평가액(원)<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||||
|
<td>
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue" step="0" min="1" max="9999999999"
|
||||||
|
maxlength="10" oninput="limitMaxLength(this); priceDisabled(this, this.form.price)">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="component-btns bottom-btn-group">
|
||||||
|
<div class="btns-row align-right">
|
||||||
|
<button type="button" class="btn btn-primary" onclick="saveDailyIncome();">
|
||||||
|
<span class="btn-txt">등록</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="button" class="modal-close"></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script th:inline="javascript">
|
||||||
|
// form 초기화
|
||||||
|
const resetIncomeForm = () => {
|
||||||
|
const form = document.reqIncomeForm;
|
||||||
|
if (!form) return;
|
||||||
|
|
||||||
|
form.cropCode.value = '';
|
||||||
|
form.incomeKind.value = '';
|
||||||
|
form.sourcePurpose.value = '';
|
||||||
|
form.quantity.value = '';
|
||||||
|
form.unitCode.value = '';
|
||||||
|
form.unitSelf.value = '';
|
||||||
|
form.price.value = '';
|
||||||
|
form.estimatedValue.value = '';
|
||||||
|
|
||||||
|
document.getElementById('isCredit_N').checked = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 일계부 상세 값 set
|
||||||
|
const setIncomeFormData = (data) => {
|
||||||
|
const form = document.reqIncomeForm;
|
||||||
|
if (!form) return;
|
||||||
|
|
||||||
|
// 폼에 값 세팅
|
||||||
|
form.cropCode.value = data.cropCode || '';
|
||||||
|
form.incomeKind.value = data.incomeKind || '';
|
||||||
|
form.sourcePurpose.value = data.sourcePurpose || '';
|
||||||
|
form.quantity.value = data.quantity || '';
|
||||||
|
form.unitCode.value = data.unitCode || '';
|
||||||
|
form.unitSelf.value = data.unitSelf || '';
|
||||||
|
form.price.value = data.price || '';
|
||||||
|
form.estimatedValue.value = data.estimatedValue || '';
|
||||||
|
|
||||||
|
// 기타 UI 처리
|
||||||
|
selectedUnit(form.unitCode);
|
||||||
|
if (form.price.value !== '') {
|
||||||
|
priceDisabled(form.price, form.estimatedValue)
|
||||||
|
} else {
|
||||||
|
priceDisabled(form.estimatedValue, form.price)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 라디오 버튼 처리
|
||||||
|
document.getElementById('isCredit_Y').checked = data.credit === true;
|
||||||
|
document.getElementById('isCredit_N').checked = data.credit === false;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script th:inline="javascript">
|
||||||
|
// 일계부 등록 모달창 띄우기
|
||||||
|
const showDailyIncomeModal = (id) => {
|
||||||
|
const mf = document.reqIncomeForm;
|
||||||
|
mf.searchMonth.value = document.reqForm.recordMonth.value;
|
||||||
|
mf.groupNo.value = document.reqForm.groupNo.value;
|
||||||
|
mf.dailyId.value = document.reqForm.dailyId.value;
|
||||||
|
mf.id.value = (id === undefined) ? '' : id;
|
||||||
|
|
||||||
|
resetIncomeForm();
|
||||||
|
|
||||||
|
if (id !== null && id !== undefined) {
|
||||||
|
const obj = $(f).serializeObject();
|
||||||
|
obj.id = mf.id.value;
|
||||||
|
obj.searchMonth = obj.recordMonth;
|
||||||
|
|
||||||
|
ajaxUtil._ajaxAsyncMethod(
|
||||||
|
`/api/household/daily/income/${id}`,
|
||||||
|
obj,
|
||||||
|
function (rstData, status) {
|
||||||
|
setIncomeFormData(rstData);
|
||||||
|
|
||||||
|
document.querySelector($(mf).data('modalId')).ui.open();
|
||||||
|
},
|
||||||
|
function () {
|
||||||
|
console.error('Do nothing error.')
|
||||||
|
},
|
||||||
|
'get'
|
||||||
|
);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
document.querySelector($(mf).data('modalId')).ui.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const saveDailyIncome = () => {
|
||||||
|
const mf = document.reqIncomeForm;
|
||||||
|
let obj = $(mf).serializeObject();
|
||||||
|
obj.inputType = 'SELF';
|
||||||
|
obj.id = (obj.id === '' ? '0' : obj.id);
|
||||||
|
|
||||||
|
ajaxUtil._ajaxAsyncNoWaiting(
|
||||||
|
'/api/household/daily/income/save',
|
||||||
|
obj,
|
||||||
|
function () {
|
||||||
|
alert('등록이 완료되었습니다.');
|
||||||
|
|
||||||
|
document.querySelector($(mf).data('modalId')).ui.close();
|
||||||
|
|
||||||
|
getDailyRecordsView(f.dailyId.value, f.groupNo.value, f.dayGroupText.value);
|
||||||
|
},
|
||||||
|
function (code, rstData) {
|
||||||
|
console.error('Do nothing. code: '+ code, rstData);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
</html>
|
||||||
@@ -508,7 +508,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상판매 -->
|
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상판매 -->
|
||||||
<td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 -->
|
<td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 -->
|
||||||
<td class="underline">${ifNullHyphen(item.incomeKind)}</td><!-- 수입의 종류 -->
|
<td class="underline"><a href="javascript:void(0);" onclick="showDailyIncomeModal(${item.id});">${ifNullHyphen(item.incomeKind)}</a></td> <!-- 수입의 종류 -->
|
||||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
|
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
|
||||||
<td class="align-right">${formatNumberWithComma(item.quantity)}</td><!-- 수량 -->
|
<td class="align-right">${formatNumberWithComma(item.quantity)}</td><!-- 수량 -->
|
||||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||||
@@ -806,9 +806,13 @@
|
|||||||
const saveDaily = (el) => {
|
const saveDaily = (el) => {
|
||||||
const currentStep = $(el).data('step');
|
const currentStep = $(el).data('step');
|
||||||
const currentModalId = $(el).data('modalId');
|
const currentModalId = $(el).data('modalId');
|
||||||
console.log('removeDaily', currentStep, currentModalId);
|
console.log('saveDaily', currentStep, currentModalId);
|
||||||
|
|
||||||
alert('TODO : 추가')
|
if (currentStep === 'INCOME') {
|
||||||
|
showDailyIncomeModal();
|
||||||
|
} else {
|
||||||
|
alert('TODO : 추가');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 일계부 삭제 처리
|
// 일계부 삭제 처리
|
||||||
|
|||||||
@@ -175,6 +175,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<!-- 일계부 모달 -->
|
||||||
|
<th:block th:replace="households/modal/modal-daily-income :: modalFragment"/>
|
||||||
|
|
||||||
<!-- 조사원 매핑 모달 -->
|
<!-- 조사원 매핑 모달 -->
|
||||||
<th:block th:replace="common/modal-researcher-mapping :: modalFragment"/>
|
<th:block th:replace="common/modal-researcher-mapping :: modalFragment"/>
|
||||||
|
|
||||||
@@ -321,6 +324,22 @@
|
|||||||
unitArea.classList.add('input-disabled');
|
unitArea.classList.add('input-disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 금액 1개 입력시 다른 금액 input disable
|
||||||
|
const priceDisabled = (el, disableEl) => {
|
||||||
|
const wrap = disableEl.closest('td');
|
||||||
|
const disableArea = wrap.querySelector('.component-input');
|
||||||
|
const disableInput = wrap.querySelector('input');
|
||||||
|
|
||||||
|
if (el.value === '') {
|
||||||
|
disableInput.disabled = false;
|
||||||
|
disableArea.classList.remove('input-disabled');
|
||||||
|
} else {
|
||||||
|
disableInput.disabled = true;
|
||||||
|
disableInput.value = '';
|
||||||
|
disableArea.classList.add('input-disabled');
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import org.springframework.security.core.userdetails.UserDetails;
|
|||||||
})
|
})
|
||||||
public class AuditFieldInterceptor implements Interceptor {
|
public class AuditFieldInterceptor implements Interceptor {
|
||||||
private static final List<String> IGNORE_AUDIT_QUERIES = Arrays.asList(
|
private static final List<String> IGNORE_AUDIT_QUERIES = Arrays.asList(
|
||||||
"app.module.core.usecase.supplyhistory.mapper.SupplyRequestHistoryMapper.insertSupplyRequestHistory"
|
"app.module.core.usecase.admin.view.adapters.persistence.AdminViewMapper.findById"
|
||||||
// 예외 처리할 쿼리 ID들을 추가하세요.
|
// 예외 처리할 쿼리 ID들을 추가하세요.
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package app.module.core.config.application.enums;
|
||||||
|
|
||||||
|
public enum DailyInputType {
|
||||||
|
/**
|
||||||
|
* 직접 입력
|
||||||
|
*/
|
||||||
|
SELF,
|
||||||
|
/**
|
||||||
|
* 영수증 입력
|
||||||
|
*/
|
||||||
|
OCR,
|
||||||
|
;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package app.module.core.config.constants;
|
||||||
|
|
||||||
|
public class CommonConstants {
|
||||||
|
private CommonConstants() {
|
||||||
|
throw new IllegalAccessError("어플리케이션에서 공통으로 사용되는 상수 클래스로 생성자를 사용할 수 없습니다.");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 단위의 직접입력 코드
|
||||||
|
*/
|
||||||
|
public static final String UNIT_CODE_SELF = "code.record.unit.self";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 작업 면적의 직접입력 코드
|
||||||
|
*/
|
||||||
|
public static final String AREA_CODE_OTHER = "code.record.area.self";
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package app.module.core.config.constants;
|
||||||
|
|
||||||
|
public class DailyRecordConstants {
|
||||||
|
private DailyRecordConstants() {
|
||||||
|
throw new IllegalAccessError("어플리케이션에서 일계부에서 사용되는 상수 클래스로 생성자를 사용할 수 없습니다.");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 수입의 유형
|
||||||
|
* [정책] 1 고정
|
||||||
|
*/
|
||||||
|
public static final String INCOME_CATEGORY = "1";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 수입의 지출부호
|
||||||
|
* [정책] 외상판매 Y 일 경우 지출부호 91206 적재
|
||||||
|
*/
|
||||||
|
public static final String INCOME_EXPENSE_MARK = "91206";
|
||||||
|
}
|
||||||
@@ -76,6 +76,8 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
log.debug("[updateByStatus] command: {}", command);
|
||||||
|
|
||||||
if ("ALL".equals(targetType)) {
|
if ("ALL".equals(targetType)) {
|
||||||
// 전체 입력상태 변경
|
// 전체 입력상태 변경
|
||||||
String allStatus = this.getUpdateAllStatus(recordMonth, dayGroupNo, householdSeq);
|
String allStatus = this.getUpdateAllStatus(recordMonth, dayGroupNo, householdSeq);
|
||||||
@@ -119,10 +121,9 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
);
|
);
|
||||||
|
|
||||||
dailyRecordMapper.updateDailyRecordStatus(command);
|
dailyRecordMapper.updateDailyRecordStatus(command);
|
||||||
|
|
||||||
} else {
|
|
||||||
log.debug("[updateByAllStatus] do nothing. findCmd: {}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.debug("[updateByAllStatus] allStatus: {}", allStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -134,7 +135,7 @@ public class DailyRecordDao implements DailyRecordPortOut {
|
|||||||
* @return 변경할 전체 입력상태
|
* @return 변경할 전체 입력상태
|
||||||
*/
|
*/
|
||||||
private String getUpdateAllStatus(String searchMonth, Integer dayGroupNo, Long householdSeq) {
|
private String getUpdateAllStatus(String searchMonth, Integer dayGroupNo, Long householdSeq) {
|
||||||
GetDailyRecordCmd findCmd = new GetDailyRecordCmd(searchMonth, dayGroupNo, householdSeq);
|
GetDailyRecordCmd findCmd = new GetDailyRecordCmd(searchMonth, dayGroupNo, householdSeq, null);
|
||||||
|
|
||||||
DailyRecordStatusDto statusDetail = null;
|
DailyRecordStatusDto statusDetail = null;
|
||||||
List<DailyRecordStatusDto> statusList = dailyRecordMapper.getDailyRecordStatus(findCmd);
|
List<DailyRecordStatusDto> statusList = dailyRecordMapper.getDailyRecordStatus(findCmd);
|
||||||
|
|||||||
@@ -24,6 +24,11 @@ public class DailyUIReqVO {
|
|||||||
this.householdSeq = householdSeq;
|
this.householdSeq = householdSeq;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DailyUIReqVO(String searchMonth, Integer groupNo) {
|
||||||
|
this.searchMonth = searchMonth;
|
||||||
|
this.groupNo = groupNo;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 검색 월(yyyyMM)
|
* 검색 월(yyyyMM)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -15,6 +15,13 @@ public interface DailyRecordPortIn {
|
|||||||
*/
|
*/
|
||||||
DailyRecordDto detail(String recordMonth, Integer dayGroupNo, Long householdSeq);
|
DailyRecordDto detail(String recordMonth, Integer dayGroupNo, Long householdSeq);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 일계부 항목 조회
|
||||||
|
*
|
||||||
|
* @param dailyRecordSeq
|
||||||
|
*/
|
||||||
|
DailyRecordDto detail(Long dailyRecordSeq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 일계부 항목 등록
|
* 일계부 항목 등록
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -53,6 +53,36 @@ public class DailyRecordService implements DailyRecordPortIn {
|
|||||||
return dailyRecord;
|
return dailyRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DailyRecordDto detail(Long dailyRecordSeq) {
|
||||||
|
DailyRecordDto dailyRecord = portOut.detail(new GetDailyRecordCmd(dailyRecordSeq));
|
||||||
|
|
||||||
|
if (dailyRecord != null) {
|
||||||
|
List<DailySort> targetList = new ArrayList<>();
|
||||||
|
if (this.isTarget(dailyRecord.getIncomeStatus())) {
|
||||||
|
targetList.add(DailySort.INCOME);
|
||||||
|
}
|
||||||
|
if (this.isTarget(dailyRecord.getWorkStatus())) {
|
||||||
|
targetList.add(DailySort.WORK);
|
||||||
|
}
|
||||||
|
if (this.isTarget(dailyRecord.getExpenseStatus())) {
|
||||||
|
targetList.add(DailySort.EXPENSE);
|
||||||
|
}
|
||||||
|
if (this.isTarget(dailyRecord.getPowerStatus())) {
|
||||||
|
targetList.add(DailySort.POWER);
|
||||||
|
}
|
||||||
|
if (this.isTarget(dailyRecord.getForestryStatus())) {
|
||||||
|
targetList.add(DailySort.FORESTRY);
|
||||||
|
}
|
||||||
|
if (this.isTarget(dailyRecord.getFarmingStatus())) {
|
||||||
|
targetList.add(DailySort.FARMING);
|
||||||
|
}
|
||||||
|
dailyRecord.setTargetList(targetList);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dailyRecord;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 데이터 등록 대상 여부
|
* 데이터 등록 대상 여부
|
||||||
*
|
*
|
||||||
@@ -68,7 +98,8 @@ public class DailyRecordService implements DailyRecordPortIn {
|
|||||||
GetDailyRecordCmd findCmd = new GetDailyRecordCmd(
|
GetDailyRecordCmd findCmd = new GetDailyRecordCmd(
|
||||||
formVO.getRecordMonth(),
|
formVO.getRecordMonth(),
|
||||||
formVO.getDayGroupNo(),
|
formVO.getDayGroupNo(),
|
||||||
formVO.getHouseholdSeq());
|
formVO.getHouseholdSeq(),
|
||||||
|
null);
|
||||||
|
|
||||||
CreateDailyRecordCmd command = AuditUtil.create(
|
CreateDailyRecordCmd command = AuditUtil.create(
|
||||||
new CreateDailyRecordCmd(
|
new CreateDailyRecordCmd(
|
||||||
|
|||||||
@@ -8,6 +8,16 @@ import lombok.Setter;
|
|||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class GetDailyRecordCmd {
|
public class GetDailyRecordCmd {
|
||||||
|
public GetDailyRecordCmd(String searchMonth, Integer groupNo, Long householdSeq) {
|
||||||
|
this.searchMonth = searchMonth;
|
||||||
|
this.groupNo = groupNo;
|
||||||
|
this.householdSeq = householdSeq;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetDailyRecordCmd(Long dailyRecordSeq) {
|
||||||
|
this.dailyRecordSeq = dailyRecordSeq;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 검색 월(yyyyMM)
|
* 검색 월(yyyyMM)
|
||||||
*/
|
*/
|
||||||
@@ -20,4 +30,8 @@ public class GetDailyRecordCmd {
|
|||||||
* 임가 일련번호
|
* 임가 일련번호
|
||||||
*/
|
*/
|
||||||
private Long householdSeq;
|
private Long householdSeq;
|
||||||
|
/**
|
||||||
|
* 일계부 항목 일련번호
|
||||||
|
*/
|
||||||
|
private Long dailyRecordSeq;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,12 +8,20 @@
|
|||||||
, dr.id, dr.record_month, dr.day_group_no, dr.start_date, dr.end_date
|
, dr.id, dr.record_month, dr.day_group_no, dr.start_date, dr.end_date
|
||||||
, dr.all_status, dr.income_status, dr.work_status, dr.expense_status, dr.power_status, dr.forestry_status, dr.farming_status
|
, dr.all_status, dr.income_status, dr.work_status, dr.expense_status, dr.power_status, dr.forestry_status, dr.farming_status
|
||||||
from daily_day_group ddg
|
from daily_day_group ddg
|
||||||
|
<if test="dailyRecordSeq == null">
|
||||||
left join
|
left join
|
||||||
daily_record dr on dr.day_group_no = ddg.group_no and dr.is_deleted = false
|
daily_record dr on dr.day_group_no = ddg.group_no and dr.is_deleted = false
|
||||||
and dr.record_month = #{searchMonth}
|
and dr.record_month = #{searchMonth}
|
||||||
and dr.household_seq = #{householdSeq}
|
and dr.household_seq = #{householdSeq}
|
||||||
where ddg.is_deleted = false
|
where ddg.is_deleted = false
|
||||||
and ddg.group_no = #{groupNo}
|
and ddg.group_no = #{groupNo}
|
||||||
|
</if>
|
||||||
|
<if test="dailyRecordSeq != null">
|
||||||
|
inner join
|
||||||
|
daily_record dr on dr.day_group_no = ddg.group_no and dr.is_deleted = false
|
||||||
|
and dr.id = #{dailyRecordSeq}
|
||||||
|
where ddg.is_deleted = false
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDailyRecordStatus"
|
<select id="getDailyRecordStatus"
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.front.usecase.daily.income.ports.application;
|
package app.module.front.usecase.daily.income.ports.application;
|
||||||
|
|
||||||
|
import app.module.core.config.constants.DailyRecordConstants;
|
||||||
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
import app.module.core.usecase.daily.record.ports.DailyRecordPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
||||||
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
import app.module.core.usecase.uicode.list.ports.application.domain.UICodeElement;
|
||||||
@@ -101,8 +102,8 @@ public class DailyIncomeService implements DailyIncomePortIn {
|
|||||||
formVO.getId(),
|
formVO.getId(),
|
||||||
formVO.getDailyRecordSeq(),
|
formVO.getDailyRecordSeq(),
|
||||||
formVO.getInputType(),
|
formVO.getInputType(),
|
||||||
"1", // [정책] 1 고정
|
DailyRecordConstants.INCOME_CATEGORY,
|
||||||
(formVO.getCredit() ? "91206" : null), // [정책] 외상판매 Y 일 경우 지출부호 91206 적재
|
(formVO.getCredit() ? DailyRecordConstants.INCOME_EXPENSE_MARK : null),
|
||||||
formVO.getCredit(),
|
formVO.getCredit(),
|
||||||
formVO.getCropCode(),
|
formVO.getCropCode(),
|
||||||
formVO.getIncomeKind(),
|
formVO.getIncomeKind(),
|
||||||
|
|||||||
@@ -7,3 +7,17 @@ logging:
|
|||||||
level:
|
level:
|
||||||
app:
|
app:
|
||||||
module: INFO # 애플리케이션 기본 패키지 로깅 레벨 (패키지 경로 변경 필요시 수정)
|
module: INFO # 애플리케이션 기본 패키지 로깅 레벨 (패키지 경로 변경 필요시 수정)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ==============================================
|
||||||
|
# 서버 압축 설정
|
||||||
|
# ==============================================
|
||||||
|
server:
|
||||||
|
servlet:
|
||||||
|
session:
|
||||||
|
cookie:
|
||||||
|
domain: fhes.kric.com
|
||||||
|
path: /
|
||||||
|
http-only: true
|
||||||
|
secure: true
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
order by
|
order by
|
||||||
ds.id desc
|
ds.id desc
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
order by
|
order by
|
||||||
ds.id desc
|
ds.id desc
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
order by
|
order by
|
||||||
ds.id desc
|
ds.id desc
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
order by
|
order by
|
||||||
ds.id desc
|
ds.id desc
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
order by
|
order by
|
||||||
ds.id desc
|
ds.id desc
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
order by
|
order by
|
||||||
ds.id desc
|
ds.id desc
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
<include refid="app.module.core.usecase.daily.record.adapters.persistence.DailyRecordMapper.InnerJoinByDailyRecord"/>
|
||||||
where ds.is_deleted = false
|
where ds.is_deleted = false
|
||||||
<if test="id != null and id != '0'">
|
<if test="id != null and id != '0'">
|
||||||
and ds.id = ${id}
|
and ds.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
BIN
front/src/main/resources/static/assets/images/kri_appimg.png
Normal file
BIN
front/src/main/resources/static/assets/images/kri_appimg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
front/src/main/resources/static/assets/images/kri_favicon.ico
Normal file
BIN
front/src/main/resources/static/assets/images/kri_favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
15
front/src/main/resources/static/assets/json/manifest.json
Normal file
15
front/src/main/resources/static/assets/json/manifest.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"name": "My App",
|
||||||
|
"short_name": "MyApp",
|
||||||
|
"start_url": "/",
|
||||||
|
"display": "standalone",
|
||||||
|
"background_color": "#ffffff",
|
||||||
|
//"theme_color": "#4BBC43",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "kri_appimg.png",
|
||||||
|
"sizes": "512x512",
|
||||||
|
"type": "image/png"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -8516,13 +8516,15 @@ button.swiper-pagination-bullet {
|
|||||||
}
|
}
|
||||||
.regist-item-area .item-list .list-item .detail-list li p {
|
.regist-item-area .item-list .list-item .detail-list li p {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
min-width: -webkit-fit-content;
|
||||||
|
min-width: -moz-fit-content;
|
||||||
|
min-width: fit-content;
|
||||||
margin-right: 0.4rem;
|
margin-right: 0.4rem;
|
||||||
padding-right: 0.9rem;
|
padding-right: 0.9rem;
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
line-height: 140%;
|
line-height: 140%;
|
||||||
color: #868e96;
|
color: #868e96;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
white-space: nowrap;
|
|
||||||
}
|
}
|
||||||
.regist-item-area .item-list .list-item .detail-list li p::before {
|
.regist-item-area .item-list .list-item .detail-list li p::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -9067,14 +9069,92 @@ button.swiper-pagination-bullet {
|
|||||||
line-height: 140%;
|
line-height: 140%;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
.regi-wrap .month-detail .btn-column-list a {
|
.regi-wrap .month-detail .btn-column-list li {
|
||||||
|
padding: 2rem 1.6rem;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list li.view {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list li.view .label {
|
||||||
|
position: relative;
|
||||||
|
padding-right: 2rem;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list li.view .label::before {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
content: "";
|
||||||
|
width: 2rem;
|
||||||
|
height: 2rem;
|
||||||
|
background: url("../images/common/ico_arr_right_gray.svg") center/contain no-repeat;
|
||||||
|
right: 0;
|
||||||
|
top: 50%;
|
||||||
|
-webkit-transform: translateY(-50%);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list li.view a {
|
||||||
|
padding: 2rem 1.6rem;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list li.view a:before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.regi-wrap .month-detail .btn-column-list .value li {
|
.regi-wrap .month-detail .btn-column-list .value li {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list .value li + li {
|
||||||
|
margin-top: 0.6rem;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list .value li.total {
|
||||||
|
margin-top: 0.4rem;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list .value li.total span {
|
||||||
|
color: #4bbc43 !important;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list .value li.total span:last-child {
|
||||||
|
display: -webkit-box;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
-webkit-box-align: center;
|
||||||
|
-webkit-align-items: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list .value li.total strong {
|
||||||
|
margin-right: 0.2rem;
|
||||||
|
font-size: 2rem;
|
||||||
|
line-height: 140%;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list .value li span {
|
||||||
|
font-size: 1.6rem;
|
||||||
|
line-height: 140%;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list .value li span:first-child {
|
||||||
|
padding-right: 1.2rem;
|
||||||
|
position: relative;
|
||||||
|
color: #868e96;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.regi-wrap .month-detail .btn-column-list .value li span:first-child:before {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
content: ":";
|
||||||
|
font-size: 1.6rem;
|
||||||
|
line-height: 140%;
|
||||||
|
right: 0.5rem;
|
||||||
|
top: 50%;
|
||||||
|
-webkit-transform: translateY(-50%);
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
.regi-wrap .component-select.bottom-sheet {
|
.regi-wrap .component-select.bottom-sheet {
|
||||||
width: -webkit-fit-content;
|
width: -webkit-fit-content;
|
||||||
width: -moz-fit-content;
|
width: -moz-fit-content;
|
||||||
@@ -9113,6 +9193,7 @@ button.swiper-pagination-bullet {
|
|||||||
padding: 3.2rem 0rem;
|
padding: 3.2rem 0rem;
|
||||||
}
|
}
|
||||||
.regi-wrap .month-filter .summary {
|
.regi-wrap .month-filter .summary {
|
||||||
|
margin-top: 2rem;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
display: -webkit-flex;
|
display: -webkit-flex;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -9157,4 +9238,14 @@ button.swiper-pagination-bullet {
|
|||||||
line-height: 140%;
|
line-height: 140%;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
.regi-wrap .regist-item-area .month-tit {
|
||||||
|
margin-bottom: 1.6rem;
|
||||||
|
font-size: 2rem;
|
||||||
|
line-height: 140%;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #212529;
|
||||||
|
}
|
||||||
|
.regi-wrap .regist-item-area .item-list + .month-tit {
|
||||||
|
margin-top: 2.4rem;
|
||||||
|
}
|
||||||
/*# sourceMappingURL=style.css.map */
|
/*# sourceMappingURL=style.css.map */
|
||||||
|
|||||||
@@ -27,8 +27,13 @@
|
|||||||
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
|
<meta name="_csrf_header" th:content="${_csrf.headerName}"/>
|
||||||
<meta name="robots" content="noindex, nofollow">
|
<meta name="robots" content="noindex, nofollow">
|
||||||
|
|
||||||
<!--/* TODO : theme-color */-->
|
<link rel="icon" th:href="@{/static/assets/images/kri_appimg.png}" sizes="512x512">
|
||||||
|
<!-- iOS 홈화면 -->
|
||||||
|
<link rel="apple-touch-icon" th:href="@{/static/assets/images/kri_appimg.png}">
|
||||||
|
<!-- PWA -->
|
||||||
|
<link rel="manifest" th:href="@{/static/assets/json/manifest.json}">
|
||||||
|
<link rel="icon" type="image/x-icon" th:href="@{/static/assets/images/kri_favicon.ico}" />
|
||||||
|
<link rel="shortcut icon" type="image/x-icon" th:href="@{/static/assets/images/kri_favicon.ico}" />
|
||||||
<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>
|
||||||
<script th:src="@{/static/assets/scripts/common.ui.js}" data-init></script>
|
<script th:src="@{/static/assets/scripts/common.ui.js}" data-init></script>
|
||||||
|
|||||||
@@ -48,16 +48,16 @@
|
|||||||
|
|
||||||
<section class="info-bottom-area bg-white bg-lround">
|
<section class="info-bottom-area bg-white bg-lround">
|
||||||
<ul class="btn-link-list">
|
<ul class="btn-link-list">
|
||||||
<!-- TODO(ks) : 개인정보 변경 숨김처리 (7/4 약관 적용 전까지) -->
|
<!--TODO 개인 정보 동의시 오픈 예정 -->
|
||||||
<!-- <li>-->
|
<!-- <li>
|
||||||
<!-- <a href="/info/user/password">-->
|
<a href="/info/user/password">
|
||||||
<!-- <i class="ico-privacy ico-normal" aria-hidden="true"></i>-->
|
<i class="ico-privacy ico-normal" aria-hidden="true"></i>
|
||||||
<!-- <dl>-->
|
<dl>
|
||||||
<!-- <dt>개인정보 변경</dt>-->
|
<dt>개인정보 변경</dt>
|
||||||
<!-- <dd>이름, 주소, 연락처를 수정할 수 있어요</dd>-->
|
<dd>이름, 주소, 연락처를 수정할 수 있어요</dd>
|
||||||
<!-- </dl>-->
|
</dl>
|
||||||
<!-- </a>-->
|
</a>
|
||||||
<!-- </li>-->
|
</li>-->
|
||||||
<li>
|
<li>
|
||||||
<a href="/info/monthly">
|
<a href="/info/monthly">
|
||||||
<i class="ico-chart ico-normal" aria-hidden="true"></i>
|
<i class="ico-chart ico-normal" aria-hidden="true"></i>
|
||||||
|
|||||||
21
pom.xml
21
pom.xml
@@ -137,21 +137,29 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.tika</groupId>
|
<groupId>org.apache.tika</groupId>
|
||||||
<artifactId>tika-core</artifactId>
|
<artifactId>tika-core</artifactId>
|
||||||
<version>2.9.2</version> </dependency>
|
<version>2.9.2</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.commons</groupId>
|
<groupId>org.apache.commons</groupId>
|
||||||
<artifactId>commons-text</artifactId>
|
<artifactId>commons-text</artifactId>
|
||||||
<version>1.12.0</version> </dependency>
|
<version>1.12.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi</artifactId>
|
<artifactId>poi</artifactId>
|
||||||
<version>5.2.5</version> </dependency>
|
<version>5.2.5</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.poi</groupId>
|
<groupId>org.apache.poi</groupId>
|
||||||
<artifactId>poi-ooxml</artifactId>
|
<artifactId>poi-ooxml</artifactId>
|
||||||
<version>5.2.5</version> </dependency>
|
<version>5.2.5</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.zaxxer</groupId>
|
||||||
|
<artifactId>HikariCP</artifactId>
|
||||||
|
<version>5.1.0</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
@@ -166,7 +174,8 @@
|
|||||||
<groupId>io.florianlopes</groupId>
|
<groupId>io.florianlopes</groupId>
|
||||||
<artifactId>spring-mvc-test-utils</artifactId>
|
<artifactId>spring-mvc-test-utils</artifactId>
|
||||||
<version>3.1.0</version>
|
<version>3.1.0</version>
|
||||||
<scope>test</scope> </dependency>
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|||||||
Reference in New Issue
Block a user