Merge branch 'dev' into deploy-dev-admin

This commit is contained in:
주수현
2025-06-27 09:36:40 +09:00
56 changed files with 960 additions and 44 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

@@ -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.DateUiUtil;
@@ -11,7 +11,7 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
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;
@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.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.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.usecase.admin.view.ports.AdminViewPortIn;
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 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());
} 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;
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.application.domain.SaveForestProductCmd;
import app.module.core.config.application.util.AuditUtil;
@@ -10,15 +13,28 @@ import org.springframework.transaction.annotation.Transactional;
@Repository
@RequiredArgsConstructor
class SaveForestProductDao implements SaveForestProductPortOut {
private final SaveForestProductMapper mapper;
private final SaveForestProductMapper saveForestProductMapper;
private final UpdateMonthlyInputStatusMapper updateMonthlyInputStatusMapper;
@Override
@Transactional
public void operate(SaveForestProductCmd inCmd) {
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 {
mapper.updateForestProduct(AuditUtil.update(inCmd));
// 임산물 현황 update
saveForestProductMapper.updateForestProduct(AuditUtil.update(inCmd));
}
}
}

View File

@@ -5,6 +5,7 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SaveForestProductMapper {
String getForestProductStatus(Long monthlyInputStatusId);
void createForestProduct(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

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

View File

@@ -3,6 +3,13 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
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">
/* createForestProduct : 임산물 현황 등록 */
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,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.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.common.update.done=\uC218\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.

View File

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

View File

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

View File

@@ -502,7 +502,7 @@
<td>
<div class="component-input">
<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>
</div>
</td>
@@ -510,7 +510,7 @@
<td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 -->
<td class="underline">${ifNullHyphen(item.incomeKind)}</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 class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
@@ -817,7 +817,39 @@
const currentListId = $(el).data('listId');
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>
</div>

View File

@@ -13,12 +13,19 @@
<div class="component-btns bottom-btn-group">
<div class="btns-row align-right">
<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 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>
</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>
</button>
</div>
@@ -73,8 +80,14 @@
// 임산물 현황 등록 상태 id set
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();
if(response.forestProducts.length === 0) {
@@ -90,7 +103,7 @@
<td>
<div class="component-input">
<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>
</div>
</td>
@@ -123,6 +136,124 @@
'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>삭제한 항목은 복구할 수 없습니다.',
negativeCallback: function () {
},
positiveCallback: function () {
goDeleteForestProduct(checkedIds);
},
});
}
// 임산물현황 삭제
const goDeleteForestProduct = (checkedIds) => {
const f = document.reqForm;
console.log("f.monthlyInputStatusId.value", f.monthlyInputStatusId.value);
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>
</div>
</html>

View File

@@ -34,7 +34,7 @@
<!-- <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="manifest" ><!-- TODO : 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" />

View File

@@ -3,19 +3,11 @@
xmlns:th="http://www.thymeleaf.org" lang="ko">
<div layout:fragment="content" th:classappend="acco-wrap">
[[${dailyRecord.registrable}]]
[[${moveStep}]],
[[${dailyRecord.modifiable}]]
--
[[${(not dailyRecord.modifiable)}]]
<main id="content" role="main"
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }
, btnDisabled=${(not btnActive)
|| #strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}
, btnIcoClass=${btnDisabled ? 'ico-add-disabled' : 'ico-add'}">
[[${btnActive}]], [[${btnDisabled}]], [[${btnIcoClass}]]
<div class="inner">
<hgroup class="tit-group">
<h3>

View File

@@ -10,13 +10,6 @@
<div>
detail: [[${dailyRecord}]]
</div>
<div>
[[${dailyRecord.registrable}]]
[[${moveStep}]],
[[${dailyRecord.modifiable}]]
<br>
//http://localhost:8080/record/income/202505/12?type=step1&target=income
</div>
</th:block>
<main id="content" role="main"
th:with="btnActive=${(dailyRecord.registrable && moveStep) || dailyRecord.modifiable }