Merge branch 'first_dev' into 'deploy-dev-front'
[FO] 개인정보 view 오류 수정 See merge request korea-research/korea-research!91
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -39,3 +39,7 @@ META-INF
|
|||||||
.jpd
|
.jpd
|
||||||
|
|
||||||
*.log
|
*.log
|
||||||
|
front/src/main/resources/static/kri_appimg.png
|
||||||
|
front/src/main/resources/static/kri_favicon.ico
|
||||||
|
front/src/main/resources/static/manifest.json
|
||||||
|
front/web/WEB-INF/web.xml
|
||||||
|
|||||||
19
README.md
19
README.md
@@ -120,6 +120,12 @@ recycle 의 demo 가 궁금하다면 아래 URL 에서 확인 해주세요.
|
|||||||
-Dfile.upload.sftp.id=etribe
|
-Dfile.upload.sftp.id=etribe
|
||||||
-Dfile.upload.sftp.password=Etribe@3415
|
-Dfile.upload.sftp.password=Etribe@3415
|
||||||
-Dfile.upload.sftp.port=22
|
-Dfile.upload.sftp.port=22
|
||||||
|
-Dspring.datasource.hikari.maximum-pool-size=10
|
||||||
|
-Dspring.datasource.hikari.minimum-idle=5
|
||||||
|
-Dspring.datasource.hikari.idle-timeout=120000
|
||||||
|
-Dspring.datasource.hikari.max-lifetime=900000
|
||||||
|
-Dspring.datasource.hikari.connection-timeout=5000
|
||||||
|
-Dspring.datasource.hikari.leak-detection-threshold=30000
|
||||||
```
|
```
|
||||||
** 주의 : 운영서버일 경우 -Dpath.upload.storage=SFTP로 설정
|
** 주의 : 운영서버일 경우 -Dpath.upload.storage=SFTP로 설정
|
||||||
|
|
||||||
@@ -154,12 +160,13 @@ InitAdminData, InitUriFrontData 등 *ApplicationRunner* 구현체에서 내용
|
|||||||
- #### 📡 Ajax 호출 방식 (REST API, JSON 응답)
|
- #### 📡 Ajax 호출 방식 (REST API, JSON 응답)
|
||||||
다음 기능은 Ajax를 통해 REST API(JSON)를 호출합니다
|
다음 기능은 Ajax를 통해 REST API(JSON)를 호출합니다
|
||||||
|
|
||||||
| 기능 | 메서드 | URI | 예시 |
|
| 기능 | 메서드 | URI | 예시 |
|
||||||
|------------|------------|------------------------------------|------------------------|
|
|----------|----------|------------------------------------|------------------------|
|
||||||
| 목록 조회 | GET | `/api/{resource-name}/list` | `/api/articles/list` |
|
| 목록 조회 | GET | `/api/{resource-name}/list` | `/api/articles/list` |
|
||||||
| 등록 | POST | `/api/{resource-name}/create` | `/api/articles/create` |
|
| 등록 | POST | `/api/{resource-name}/create` | `/api/articles/create` |
|
||||||
| 수정 | PUT/PATCH | `/api/{resource-name}/update` | `/api/articles/update` |
|
| 수정 | PUT/PATCH | `/api/{resource-name}/update` | `/api/articles/update` |
|
||||||
| 삭제 | DELETE | `/api/{resource-name}/remove` | `/api/articles/remove` |
|
| 삭제 | DELETE | `/api/{resource-name}/remove` | `/api/articles/remove` |
|
||||||
|
| 등록 & 수정 |POST | `/api/{resource-name}/save` | `/api/articles/save` |
|
||||||
|
|
||||||
|
|
||||||
- #### 🖥️ 서버 렌더링 방식 (SSR)
|
- #### 🖥️ 서버 렌더링 방식 (SSR)
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@@ -42,6 +43,7 @@ class ExcelUploadCreateHouseholdDao implements ExcelUploadCreateHouseholdPortOut
|
|||||||
@Transactional
|
@Transactional
|
||||||
public ExcelUploadResultVO operate(MultipartFile file) throws IOException {
|
public ExcelUploadResultVO operate(MultipartFile file) throws IOException {
|
||||||
// 엑셀 파일 읽기
|
// 엑셀 파일 읽기
|
||||||
|
|
||||||
Workbook workbook = WorkbookFactory.create(file.getInputStream());
|
Workbook workbook = WorkbookFactory.create(file.getInputStream());
|
||||||
Sheet sheet = workbook.getSheetAt(0);
|
Sheet sheet = workbook.getSheetAt(0);
|
||||||
Integer success = 0;
|
Integer success = 0;
|
||||||
@@ -52,6 +54,7 @@ class ExcelUploadCreateHouseholdDao implements ExcelUploadCreateHouseholdPortOut
|
|||||||
List<UICodeElement> IndustryLargeCodeList = uiCodeListMapper.findByParentId("code.industry.large");
|
List<UICodeElement> IndustryLargeCodeList = uiCodeListMapper.findByParentId("code.industry.large");
|
||||||
List<UICodeElement> IndustryMiddleCodeList = uiCodeListMapper.findByParentId("code.industry.middle");
|
List<UICodeElement> IndustryMiddleCodeList = uiCodeListMapper.findByParentId("code.industry.middle");
|
||||||
|
|
||||||
|
List<String> errorList = new ArrayList<>();
|
||||||
// 첫 번째 행은 헤더로 간주하고 스킵
|
// 첫 번째 행은 헤더로 간주하고 스킵
|
||||||
for (int i = 1; i <= sheet.getLastRowNum(); i++) {
|
for (int i = 1; i <= sheet.getLastRowNum(); i++) {
|
||||||
Row row = sheet.getRow(i);
|
Row row = sheet.getRow(i);
|
||||||
@@ -60,9 +63,9 @@ class ExcelUploadCreateHouseholdDao implements ExcelUploadCreateHouseholdPortOut
|
|||||||
CheckHouseholdNum checkHouseholdNum = checkHouseholdNumMapper.checkHouseholdNum(new CheckHouseholdNumCmd(getCellValue(row.getCell(0)))).orElse(null);
|
CheckHouseholdNum checkHouseholdNum = checkHouseholdNumMapper.checkHouseholdNum(new CheckHouseholdNumCmd(getCellValue(row.getCell(0)))).orElse(null);
|
||||||
ExcelUploadContactVO contactVO = getDivisionContact(row.getCell(3));
|
ExcelUploadContactVO contactVO = getDivisionContact(row.getCell(3));
|
||||||
|
|
||||||
|
// 데이터 누락 warn
|
||||||
if(!checkHouseholdNum.getIsDuplicated() && contactVO != null) {
|
if(!checkHouseholdNum.getIsDuplicated() && contactVO != null) {
|
||||||
|
int flag = 0;
|
||||||
ExcelCreateHouseholdVO household = new ExcelCreateHouseholdVO();
|
ExcelCreateHouseholdVO household = new ExcelCreateHouseholdVO();
|
||||||
household.setHouseholdNum(getCellValue(row.getCell(0))); // 임가번호
|
household.setHouseholdNum(getCellValue(row.getCell(0))); // 임가번호
|
||||||
household.setOwnerName(getCellValue(row.getCell(1))); // 경영주명
|
household.setOwnerName(getCellValue(row.getCell(1))); // 경영주명
|
||||||
@@ -80,7 +83,7 @@ class ExcelUploadCreateHouseholdDao implements ExcelUploadCreateHouseholdPortOut
|
|||||||
household.setIndustryDetail(getCellValue(row.getCell(11))); // 규모 / 세부품목
|
household.setIndustryDetail(getCellValue(row.getCell(11))); // 규모 / 세부품목
|
||||||
household.setResearcherSeq(getResearcherSeq(row.getCell(12))); // 조사원
|
household.setResearcherSeq(getResearcherSeq(row.getCell(12))); // 조사원
|
||||||
household.setIsPanel(getIsPanel(row.getCell(13))); // 유지여부
|
household.setIsPanel(getIsPanel(row.getCell(13))); // 유지여부
|
||||||
|
household.setMemo(getCellValue(row.getCell(14))); // 비고
|
||||||
|
|
||||||
CreateHouseholdOutCmd cmd = new CreateHouseholdOutCmd(
|
CreateHouseholdOutCmd cmd = new CreateHouseholdOutCmd(
|
||||||
null,
|
null,
|
||||||
@@ -100,11 +103,17 @@ class ExcelUploadCreateHouseholdDao implements ExcelUploadCreateHouseholdPortOut
|
|||||||
household.getIndustryDetail(),
|
household.getIndustryDetail(),
|
||||||
household.getResearcherSeq(),
|
household.getResearcherSeq(),
|
||||||
household.getIsPanel(),
|
household.getIsPanel(),
|
||||||
null,
|
household.getMemo(),
|
||||||
List.of("ROLE_GENERAL")
|
List.of("ROLE_GENERAL")
|
||||||
);
|
);
|
||||||
|
|
||||||
success += createHouseholdMapper.createHousehold(AuditUtil.create(cmd));
|
flag = createHouseholdMapper.createHousehold(AuditUtil.create(cmd));
|
||||||
|
|
||||||
|
success += flag;
|
||||||
|
|
||||||
|
if(flag == 0){
|
||||||
|
errorList.add(household.getHouseholdNum());
|
||||||
|
}
|
||||||
|
|
||||||
if(cmd.getRoleIds() != null && !cmd.getRoleIds().isEmpty()) {
|
if(cmd.getRoleIds() != null && !cmd.getRoleIds().isEmpty()) {
|
||||||
createHouseholdMapper.createHouseholdHasRole(AuditUtil.create(new CreateHouseholdHasRoleCmd(cmd.getSeq(), cmd.getRoleIds())));
|
createHouseholdMapper.createHouseholdHasRole(AuditUtil.create(new CreateHouseholdHasRoleCmd(cmd.getSeq(), cmd.getRoleIds())));
|
||||||
@@ -116,7 +125,7 @@ class ExcelUploadCreateHouseholdDao implements ExcelUploadCreateHouseholdPortOut
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
workbook.close();
|
workbook.close();
|
||||||
return new ExcelUploadResultVO(sheet.getLastRowNum()-1 , success);
|
return new ExcelUploadResultVO(sheet.getLastRowNum()-1 , success, errorList);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 셀 값을 문자열로 변환
|
// 셀 값을 문자열로 변환
|
||||||
|
|||||||
@@ -24,4 +24,5 @@ public class ExcelCreateHouseholdVO {
|
|||||||
private String industryDetail;
|
private String industryDetail;
|
||||||
private Long researcherSeq;
|
private Long researcherSeq;
|
||||||
private Boolean isPanel;
|
private Boolean isPanel;
|
||||||
|
private String memo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,13 @@ import lombok.AllArgsConstructor;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class ExcelUploadResultVO {
|
public class ExcelUploadResultVO {
|
||||||
private Integer total;
|
private Integer total;
|
||||||
private Integer success;
|
private Integer success;
|
||||||
|
private List<String> errorList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ public class GetBankAutoTransferExpenseRecords {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private String categoryText;
|
private String categoryText;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Integer count;
|
private String count;
|
||||||
private String unitText;
|
private String unitText;
|
||||||
private Integer price;
|
private Integer price;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class GetBankAutoTransferIncomeRecords {
|
|||||||
private String categoryText;
|
private String categoryText;
|
||||||
private String target;
|
private String target;
|
||||||
private String sourcePurpose;
|
private String sourcePurpose;
|
||||||
private Integer count;
|
private String count;
|
||||||
private String unitText;
|
private String unitText;
|
||||||
private Integer price;
|
private Integer price;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -22,4 +22,16 @@ spring:
|
|||||||
messages:
|
messages:
|
||||||
# 메시지 소스 캐시 지속 시간 (단위: 초)
|
# 메시지 소스 캐시 지속 시간 (단위: 초)
|
||||||
# 개발 환경에서는 짧은 간격(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
|
||||||
@@ -42,6 +42,10 @@ server:
|
|||||||
mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript
|
mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript
|
||||||
# 압축 적용 최소 응답 크기(바이트)
|
# 압축 적용 최소 응답 크기(바이트)
|
||||||
min-response-size: 2048
|
min-response-size: 2048
|
||||||
|
servlet:
|
||||||
|
session:
|
||||||
|
cookie:
|
||||||
|
name: ADMIN_SESSION
|
||||||
|
|
||||||
# ==============================================
|
# ==============================================
|
||||||
# 관리자 관련 설정
|
# 관리자 관련 설정
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
dw.work_name, /* 작업명*/
|
dw.work_name, /* 작업명*/
|
||||||
dw.work_land_area, /* 작업 면적 */
|
dw.work_land_area, /* 작업 면적 */
|
||||||
CASE
|
CASE
|
||||||
WHEN dw.area_unit_code = 'code.record.unit.self'
|
WHEN dw.area_unit_code = 'code.record.area.self'
|
||||||
THEN dw.area_unit_self
|
THEN dw.area_unit_self
|
||||||
ELSE ui_area.code_text
|
ELSE ui_area.code_text
|
||||||
END AS areaUnitText, /* 작업면적 단위 텍스트 */
|
END AS areaUnitText, /* 작업면적 단위 텍스트 */
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
dw.updated_at /* 최종수정날짜 */
|
dw.updated_at /* 최종수정날짜 */
|
||||||
FROM daily_work dw
|
FROM daily_work dw
|
||||||
LEFT JOIN uicode ui_area
|
LEFT JOIN uicode ui_area
|
||||||
ON ui_area.parent_id = 'code.record.unit'
|
ON ui_area.parent_id = 'code.record.area'
|
||||||
AND ui_area.id = dw.area_unit_code
|
AND ui_area.id = dw.area_unit_code
|
||||||
LEFT JOIN uicode ui_harvest
|
LEFT JOIN uicode ui_harvest
|
||||||
ON ui_harvest.parent_id = 'code.record.unit'
|
ON ui_harvest.parent_id = 'code.record.unit'
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -39,17 +39,25 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countAll" parameterType="app.module.admin.usecase.researcher.adpaters.web.model.ResearchersListReqVO" resultType="long">
|
<select id="countAll" parameterType="app.module.admin.usecase.researcher.adpaters.web.model.ResearchersListReqVO" resultType="long">
|
||||||
select COUNT(a.seq)
|
select COUNT(DISTINCT a.seq)
|
||||||
from admin a
|
from admin a
|
||||||
join admin_has_role ahr ON a.seq = ahr.admin_seq
|
join admin_has_role ahr ON a.seq = ahr.admin_seq AND ahr.is_deleted = false
|
||||||
where
|
left join researcher_has_household rhh ON rhh.admin_seq = a.seq AND rhh.is_deleted = false
|
||||||
ahr.role_id = 'ROLE_RESEARCHER' and ahr.is_deleted = false
|
left join household h ON h.seq = rhh.household_seq AND h.is_panel IS true AND h.is_deleted = false
|
||||||
|
where ahr.role_id = 'ROLE_RESEARCHER'
|
||||||
|
|
||||||
|
<if test="searchField == '' and searchValue != null and searchValue != ''">
|
||||||
|
and (a.name LIKE CONCAT('%', #{searchValue}, '%') OR a.phone LIKE CONCAT('%', #{searchValue}, '%'))
|
||||||
|
</if>
|
||||||
<if test="searchField == 'name' and searchValue != null and searchValue != ''">
|
<if test="searchField == 'name' and searchValue != null and searchValue != ''">
|
||||||
and a.name LIKE CONCAT('%', #{searchValue}, '%')
|
and a.name LIKE CONCAT('%', #{searchValue}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="searchField == 'phone' and searchValue != null and searchValue != ''">
|
<if test="searchField == 'phone' and searchValue != null and searchValue != ''">
|
||||||
and a.phone LIKE CONCAT('%', #{searchValue}, '%')
|
and a.phone LIKE CONCAT('%', #{searchValue}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="searchArea != null and searchArea != ''">
|
||||||
|
and a.region_main_code = #{searchArea}
|
||||||
|
</if>
|
||||||
<if test="searchAccountDisabled != null and searchAccountDisabled != ''">
|
<if test="searchAccountDisabled != null and searchAccountDisabled != ''">
|
||||||
and a.account_disabled = #{searchAccountDisabled}
|
and a.account_disabled = #{searchAccountDisabled}
|
||||||
</if>
|
</if>
|
||||||
@@ -358,7 +366,6 @@
|
|||||||
OFFSET #{pageable.offset} ROWS FETCH NEXT #{pageable.pageSize} ROWS ONLY
|
OFFSET #{pageable.offset} ROWS FETCH NEXT #{pageable.pageSize} ROWS ONLY
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="selectResearcherId">
|
<select id="selectResearcherId">
|
||||||
select seq
|
select seq
|
||||||
from admin a
|
from admin a
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class Household extends AuditEntity {
|
|||||||
|
|
||||||
private Integer scaleCode;
|
private Integer scaleCode;
|
||||||
|
|
||||||
private Integer employmentCode;
|
private Integer employmentType;
|
||||||
|
|
||||||
private Boolean isPanel;
|
private Boolean isPanel;
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
;
|
||||||
|
}
|
||||||
@@ -87,8 +87,7 @@ public class DailyUtil {
|
|||||||
* @return true=수정 가능, false=수정 불가
|
* @return true=수정 가능, false=수정 불가
|
||||||
*/
|
*/
|
||||||
public boolean isModifiable(LocalDate startDate, LocalDate endDate) {
|
public boolean isModifiable(LocalDate startDate, LocalDate endDate) {
|
||||||
// TODO : 15일로 변경, 테스트를 위해 30일로 진행중
|
LocalDate limitStart = LocalDate.now().minusDays(15);
|
||||||
LocalDate limitStart = LocalDate.now().minusDays(30);
|
|
||||||
log.debug("isModifiable @@limitStart: {}, startDate: {}, endDate: {}", limitStart, startDate, endDate);
|
log.debug("isModifiable @@limitStart: {}, startDate: {}, endDate: {}", limitStart, startDate, endDate);
|
||||||
|
|
||||||
return (limitStart.isBefore(startDate) || limitStart.isEqual(startDate) || limitStart.isEqual(endDate));
|
return (limitStart.isBefore(startDate) || limitStart.isEqual(startDate) || limitStart.isEqual(endDate));
|
||||||
@@ -101,8 +100,7 @@ public class DailyUtil {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isRegisterPossible(LocalDate startDate, LocalDate endDate) {
|
public boolean isRegisterPossible(LocalDate startDate, LocalDate endDate) {
|
||||||
// TODO : 15일로 변경, 테스트를 위해 60일로 진행중
|
LocalDate limitStart = LocalDate.now().minusDays(15);
|
||||||
LocalDate limitStart = LocalDate.now().minusDays(60);
|
|
||||||
log.debug("isRegisterPossible @@limitStart: {}, startDate: {}, endDate: {}", limitStart, startDate, endDate);
|
log.debug("isRegisterPossible @@limitStart: {}, startDate: {}, endDate: {}", limitStart, startDate, endDate);
|
||||||
|
|
||||||
return (limitStart.isBefore(startDate) || limitStart.isEqual(startDate));
|
return (limitStart.isBefore(startDate) || limitStart.isEqual(startDate));
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class GetHousehold {
|
|||||||
private String industryMiddleCode;
|
private String industryMiddleCode;
|
||||||
private String industrySubMiddle;
|
private String industrySubMiddle;
|
||||||
private String industryDetail;
|
private String industryDetail;
|
||||||
private String employmentCode;
|
private String employmentType;
|
||||||
private Boolean isPanel;
|
private Boolean isPanel;
|
||||||
private String memo;
|
private String memo;
|
||||||
private String dropReason;
|
private String dropReason;
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
h.industry_middle_code,
|
h.industry_middle_code,
|
||||||
h.industry_sub_middle,
|
h.industry_sub_middle,
|
||||||
h.industry_detail,
|
h.industry_detail,
|
||||||
h.employment_code,
|
h.employment_type,
|
||||||
h.is_panel,
|
h.is_panel,
|
||||||
h.memo,
|
h.memo,
|
||||||
h.drop_reason,
|
h.drop_reason,
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
FROM uicode
|
FROM uicode
|
||||||
WHERE parent_id = #{parentId}
|
WHERE parent_id = #{parentId}
|
||||||
AND is_deleted = false
|
AND is_deleted = false
|
||||||
|
AND in_use = true
|
||||||
ORDER BY order_no ASC
|
ORDER BY order_no ASC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ CREATE TABLE household (
|
|||||||
owner_name varchar(255) NOT NULL, -- 경영주 이름
|
owner_name varchar(255) NOT NULL, -- 경영주 이름
|
||||||
owner_age integer NOT NULL, -- 경영주 나이
|
owner_age integer NOT NULL, -- 경영주 나이
|
||||||
tel varchar(20), -- 유선 전화번호
|
tel varchar(20), -- 유선 전화번호
|
||||||
phone varchar(255) NOT NULL, -- 휴대폰 번호
|
phone varchar(255), -- 휴대폰 번호
|
||||||
password varchar(255) NOT NULL, -- 비밀번호
|
password varchar(255) NOT NULL, -- 비밀번호
|
||||||
region_main_code varchar(255), -- 실사(공통코드)
|
region_main_code varchar(255), -- 실사(공통코드)
|
||||||
region_sub_code varchar(255), -- 지역(공통코드)
|
region_sub_code varchar(255), -- 지역(공통코드)
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ CREATE TABLE daily_expense (
|
|||||||
is_credit bool, -- 외상판매 여부
|
is_credit bool, -- 외상판매 여부
|
||||||
expense_kind varchar(100), -- 지출의 종류
|
expense_kind varchar(100), -- 지출의 종류
|
||||||
expense_kind_mark varchar(10), -- 종류 부호
|
expense_kind_mark varchar(10), -- 종류 부호
|
||||||
source_purpose varchar(10), -- 지출원(용도)
|
source_purpose varchar(100), -- 지출원(용도)
|
||||||
quantity varchar(10), -- 수량
|
quantity varchar(10), -- 수량
|
||||||
unit_code varchar(255), -- 단위(매핑코드)
|
unit_code varchar(255), -- 단위(매핑코드)
|
||||||
unit_self varchar(100), -- 단위(직접입력)
|
unit_self varchar(100), -- 단위(직접입력)
|
||||||
|
|||||||
@@ -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(),
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class GetUserFront {
|
|||||||
private String industryMiddleCode;
|
private String industryMiddleCode;
|
||||||
private String industrySubMiddle;
|
private String industrySubMiddle;
|
||||||
private String industryDetail;
|
private String industryDetail;
|
||||||
private String employmentCode;
|
private String employmentType;
|
||||||
private Boolean isPanel;
|
private Boolean isPanel;
|
||||||
private String memo;
|
private String memo;
|
||||||
private String dropReason;
|
private String dropReason;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public class UpdateUserFrontCmd extends AuditCommand {
|
|||||||
private Integer ownerAge;
|
private Integer ownerAge;
|
||||||
private String tel;
|
private String tel;
|
||||||
private String phone;
|
private String phone;
|
||||||
private String regionMainCode;
|
|
||||||
private String regionSubCode;
|
private String regionSubCode;
|
||||||
|
private String regionDetailCode;
|
||||||
private String address;
|
private String address;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ class UpdateUserController {
|
|||||||
reqVO.getOwnerAge(),
|
reqVO.getOwnerAge(),
|
||||||
reqVO.getTel1() + '-'+ reqVO.getTel2() + '-' + reqVO.getTel3(),
|
reqVO.getTel1() + '-'+ reqVO.getTel2() + '-' + reqVO.getTel3(),
|
||||||
reqVO.getPhone1() + '-'+ reqVO.getPhone2() + '-' + reqVO.getPhone3(),
|
reqVO.getPhone1() + '-'+ reqVO.getPhone2() + '-' + reqVO.getPhone3(),
|
||||||
reqVO.getRegionMainCode(),
|
|
||||||
reqVO.getRegionSubCode(),
|
reqVO.getRegionSubCode(),
|
||||||
|
reqVO.getRegionDetailCode(),
|
||||||
reqVO.getAddress()
|
reqVO.getAddress()
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
package app.module.front.usecase.info.userUI.updateUserUI.adapters.web;
|
package app.module.front.usecase.info.userUI.updateUserUI.adapters.web;
|
||||||
|
|
||||||
import app.module.core.config.application.enums.UiCodeType;
|
|
||||||
import app.module.core.config.application.util.CommonUtil;
|
import app.module.core.config.application.util.CommonUtil;
|
||||||
import app.module.core.usecase.uicode.list.ports.UICodeListPortIn;
|
import app.module.core.usecase.uicode.toptier.ports.UICodeTopTierPortIn;
|
||||||
import app.module.front.usecase.info.userFront.getUserFront.ports.GetUserFrontPortIn;
|
import app.module.front.usecase.info.userFront.getUserFront.ports.GetUserFrontPortIn;
|
||||||
import app.module.front.usecase.info.userFront.getUserFront.ports.application.domain.GetUserFrontCmd;
|
import app.module.front.usecase.info.userFront.getUserFront.ports.application.domain.GetUserFrontCmd;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
@@ -14,12 +13,9 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
@Controller
|
@Controller
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
class UpdateUserUIController {
|
class UpdateUserUIController {
|
||||||
|
private final UICodeTopTierPortIn uiCodeTopTierPortIn;
|
||||||
private final UICodeListPortIn uiCodeListPortIn;
|
|
||||||
|
|
||||||
private final GetUserFrontPortIn getUserPortIn;
|
private final GetUserFrontPortIn getUserPortIn;
|
||||||
|
|
||||||
|
|
||||||
@GetMapping(path = "/info/user")
|
@GetMapping(path = "/info/user")
|
||||||
String operate(Model model, HttpServletRequest request) {
|
String operate(Model model, HttpServletRequest request) {
|
||||||
|
|
||||||
@@ -28,9 +24,8 @@ class UpdateUserUIController {
|
|||||||
return "redirect:/"; // 요청 처리 중단
|
return "redirect:/"; // 요청 처리 중단
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 지역 + 세부지역 공통코드
|
||||||
model.addAttribute("regionMainList",uiCodeListPortIn.connect(UiCodeType.REGION_MAIN.getCode()));
|
model.addAttribute("regionSubList", uiCodeTopTierPortIn.connect("code.region.sub"));
|
||||||
model.addAttribute("regionSubList",uiCodeListPortIn.connect(UiCodeType.REGION_SUB.getCode()));
|
|
||||||
model.addAttribute("userInfo",
|
model.addAttribute("userInfo",
|
||||||
getUserPortIn.operate(new GetUserFrontCmd(CommonUtil.getLoginUsername())).orElseThrow());
|
getUserPortIn.operate(new GetUserFrontCmd(CommonUtil.getLoginUsername())).orElseThrow());
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ public class UpdateUserReqVO {
|
|||||||
private String phone3;
|
private String phone3;
|
||||||
|
|
||||||
@NotBlank(message = "지역을 선택해주세요.")//"시/도는 필수 항목입니다.")
|
@NotBlank(message = "지역을 선택해주세요.")//"시/도는 필수 항목입니다.")
|
||||||
@Pattern(regexp = "^code\\.region\\.main\\.\\d+$", message = "지역을 선택해주세요.")//"시/도 형식이 올바르지 않습니다.")
|
@Pattern(regexp = "^code\\.region\\.sub\\.\\d+$", message = "지역을 선택해주세요.")//"시/도 형식이 올바르지 않습니다.")
|
||||||
private String regionMainCode;
|
private String regionSubCode;
|
||||||
|
|
||||||
@NotBlank(message = "세부 지역을 선택해주세요.")//"시/군/구는 필수 항목입니다.")
|
@NotBlank(message = "세부 지역을 선택해주세요.")//"시/군/구는 필수 항목입니다.")
|
||||||
@Pattern(regexp = "^code\\.region\\.sub\\.\\d+$", message = "세부 지역을 선택해주세요.")//"시/군/구 형식이 올바르지 않습니다.")
|
@Pattern(regexp = "^code\\.region\\.detail\\.\\d+$", message = "세부 지역을 선택해주세요.")//"시/군/구 형식이 올바르지 않습니다.")
|
||||||
private String regionSubCode;
|
private String regionDetailCode;
|
||||||
|
|
||||||
@NotBlank(message = "전체 주소를 입력해주세요.")//"주소는 필수 항목입니다.")
|
@NotBlank(message = "전체 주소를 입력해주세요.")//"주소는 필수 항목입니다.")
|
||||||
@Size(max = 255, message = "전체 주소를 입력해주세요.")//"주소는 255자 이하여야 합니다.")
|
@Size(max = 255, message = "전체 주소를 입력해주세요.")//"주소는 255자 이하여야 합니다.")
|
||||||
|
|||||||
@@ -6,4 +6,18 @@ logging:
|
|||||||
path: ${user.home}/logs # 로그 파일 저장 경로 (사용자 홈 디렉토리 하위 logs 폴더)
|
path: ${user.home}/logs # 로그 파일 저장 경로 (사용자 홈 디렉토리 하위 logs 폴더)
|
||||||
level:
|
level:
|
||||||
app:
|
app:
|
||||||
module: INFO # 애플리케이션 기본 패키지 로깅 레벨 (패키지 경로 변경 필요시 수정)
|
module: INFO # 애플리케이션 기본 패키지 로깅 레벨 (패키지 경로 변경 필요시 수정)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ==============================================
|
||||||
|
# 서버 압축 설정
|
||||||
|
# ==============================================
|
||||||
|
server:
|
||||||
|
servlet:
|
||||||
|
session:
|
||||||
|
cookie:
|
||||||
|
domain: fhes.kric.com
|
||||||
|
path: /
|
||||||
|
http-only: true
|
||||||
|
secure: true
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ spring:
|
|||||||
messages:
|
messages:
|
||||||
basename: messages/exception,messages/validation,messages/uri,messages/operation
|
basename: messages/exception,messages/validation,messages/uri,messages/operation
|
||||||
encoding: UTF-8
|
encoding: UTF-8
|
||||||
|
|
||||||
# gzip compression 설정
|
# gzip compression 설정
|
||||||
compression:
|
compression:
|
||||||
enabled: true
|
enabled: true
|
||||||
@@ -91,4 +90,12 @@ logging:
|
|||||||
hibernate:
|
hibernate:
|
||||||
orm:
|
orm:
|
||||||
jdbc:
|
jdbc:
|
||||||
bind: trace # Hibernate SQL 파라미터 바인딩 로깅
|
bind: trace # Hibernate SQL 파라미터 바인딩 로깅
|
||||||
|
# ==============================================
|
||||||
|
# 서버 압축 설정
|
||||||
|
# ==============================================
|
||||||
|
server:
|
||||||
|
servlet:
|
||||||
|
session:
|
||||||
|
cookie:
|
||||||
|
name: FRONT_SESSION
|
||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
industry_middle_code,
|
industry_middle_code,
|
||||||
industry_sub_middle,
|
industry_sub_middle,
|
||||||
industry_detail,
|
industry_detail,
|
||||||
employment_code,
|
employment_type,
|
||||||
is_panel,
|
is_panel,
|
||||||
memo,
|
memo,
|
||||||
drop_reason,
|
drop_reason,
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
owner_age = #{ownerAge},
|
owner_age = #{ownerAge},
|
||||||
tel = #{tel},
|
tel = #{tel},
|
||||||
phone = #{phone},
|
phone = #{phone},
|
||||||
region_main_code = #{regionMainCode},
|
|
||||||
region_sub_code = #{regionSubCode},
|
region_sub_code = #{regionSubCode},
|
||||||
|
region_detail_code = #{regionDetailCode},
|
||||||
address = #{address},
|
address = #{address},
|
||||||
<include refid="common.fields.UpdateBaseSet" />
|
<include refid="common.fields.UpdateBaseSet" />
|
||||||
WHERE seq = ${seq}
|
WHERE seq = ${seq}
|
||||||
|
|||||||
@@ -258,4 +258,93 @@ $(function() {
|
|||||||
$el.val($el.val().replace('.', ''));
|
$el.val($el.val().replace('.', ''));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 공통코드 기반의 2단계 셀렉트박스(부모/자식) UI를 구성하는 함수
|
||||||
|
*
|
||||||
|
* @param {Object} codeList - 공통코드 리스트 객체
|
||||||
|
* @param {string} parentSelector - 부모 셀렉트박스 셀렉터 (ex. '#regionSubCode')
|
||||||
|
* @param {string} childSelector - 자식 셀렉트박스 셀렉터 (ex. '#regionDetailCode')
|
||||||
|
* @param {string} selectedParentCode - 초기 선택할 부모 코드값 (ex. 'code.region.sub.31')
|
||||||
|
* @param {string} selectedChildCode - 초기 선택할 자식 코드값 (ex. 'code.region.detail.9')
|
||||||
|
*/
|
||||||
|
kri.form.setSelectBoxUiCode = function({
|
||||||
|
codeList,
|
||||||
|
parentSelector,
|
||||||
|
childSelector,
|
||||||
|
selectedParentCode = '',
|
||||||
|
selectedChildCode = ''
|
||||||
|
}) {
|
||||||
|
const $parent = $(parentSelector);
|
||||||
|
const $child = $(childSelector);
|
||||||
|
|
||||||
|
if (!codeList?.nodes || !$parent.length || !$child.length) return;
|
||||||
|
|
||||||
|
const renderOptions = ($el, list, selected, inputSelector) => {
|
||||||
|
let html = '';
|
||||||
|
list.forEach(item => {
|
||||||
|
const isCurrent = item.id === selected ? 'current' : '';
|
||||||
|
html += `<li class="option ${isCurrent}" data-value="${item.id}">${item.codeText}</li>`;
|
||||||
|
});
|
||||||
|
$el.html(html);
|
||||||
|
|
||||||
|
// 항목 클릭 시 hidden input에 값 반영
|
||||||
|
$el.find('li.option').off('click').on('click', function () {
|
||||||
|
const value = $(this).data('value');
|
||||||
|
const text = $(this).text();
|
||||||
|
|
||||||
|
// 표시 텍스트 업데이트
|
||||||
|
$el.closest('.component-select').find('.select-txt').text(text);
|
||||||
|
|
||||||
|
// 선택 클래스 처리
|
||||||
|
$el.find('li.option').removeClass('current');
|
||||||
|
$(this).addClass('current');
|
||||||
|
|
||||||
|
// hidden input 값 반영
|
||||||
|
$el.closest('.component-select').find('input[data-type="select"]').val(value).trigger('change');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
let childSelectUI = null;
|
||||||
|
const loadChildren = (parentId, selectedChild = '') => {
|
||||||
|
if (!parentId) return;
|
||||||
|
|
||||||
|
const $childEl = document.querySelector(childSelector);
|
||||||
|
if($childEl.ui){
|
||||||
|
$childEl.ui.core.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
const parent = codeList.nodes.find(n => n.id === parentId);
|
||||||
|
if (!parent?.nodes) return;
|
||||||
|
|
||||||
|
const $childList = $child.find('ul');
|
||||||
|
renderOptions($childList, parent.nodes, selectedChild);
|
||||||
|
|
||||||
|
childSelectUI = etUI.components.SelectBox();
|
||||||
|
childSelectUI.core.init($childEl, {})
|
||||||
|
};
|
||||||
|
|
||||||
|
// 초기 렌더링
|
||||||
|
const $parentList = $parent.find('ul');
|
||||||
|
renderOptions($parentList, codeList.nodes, selectedParentCode);
|
||||||
|
|
||||||
|
const $parentEl = document.querySelector(parentSelector);
|
||||||
|
const parentSelectUI = new etUI.components.SelectBox();
|
||||||
|
parentSelectUI.core.init($parentEl, {});
|
||||||
|
|
||||||
|
if (selectedParentCode) {
|
||||||
|
loadChildren(selectedParentCode, selectedChildCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 부모 셀렉션 변경 시 자식 재로드
|
||||||
|
$parent.find('ul').on('click', 'li.option', function () {
|
||||||
|
const newParentCode = $(this).data('value');
|
||||||
|
loadChildren(newParentCode);
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
getParentValue: () => parentSelectUI.getValue(),
|
||||||
|
getChildValue: () => childSelectUI?.getValue() ?? ''
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<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">
|
||||||
|
|
||||||
<link rel="icon" th:href="@{/kri_appimg.png}" sizes="512x512">
|
<link rel="icon" th:href="@{/static/assets/images/kri_appimg.png}" sizes="512x512">
|
||||||
<!-- iOS 홈화면 -->
|
<!-- iOS 홈화면 -->
|
||||||
<link rel="apple-touch-icon" th:href="@{/static/assets/images/kri_appimg.png}">
|
<link rel="apple-touch-icon" th:href="@{/static/assets/images/kri_appimg.png}">
|
||||||
<!-- PWA -->
|
<!-- PWA -->
|
||||||
|
|||||||
@@ -48,7 +48,8 @@
|
|||||||
|
|
||||||
<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">
|
||||||
<li>
|
<!--TODO 개인 정보 동의시 오픈 예정 -->
|
||||||
|
<!-- <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>
|
||||||
@@ -56,7 +57,7 @@
|
|||||||
<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>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
<div id="tel1Id" class="component-select bottom-sheet"
|
<div id="tel1Id" class="component-select bottom-sheet"
|
||||||
th:data-props-default="${userInfo.tel1}" data-props-type="bottomSheet">
|
th:data-props-default="${userInfo.tel1}" data-props-type="bottomSheet">
|
||||||
<input type="hidden" th:field="*{tel1}" data-type="select">
|
<input type="hidden" name="tel1" th:field="*{tel1}" data-type="select">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt"></span>
|
<span class="select-txt"></span>
|
||||||
</button>
|
</button>
|
||||||
@@ -130,15 +130,15 @@
|
|||||||
<div class="select-group">
|
<div class="select-group">
|
||||||
<div class="select-label">
|
<div class="select-label">
|
||||||
<p class="label-txt">
|
<p class="label-txt">
|
||||||
도로명 주소
|
주소
|
||||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div id="regionMainCodeId" class="component-select bottom-sheet" data-props-default="지역 선택"
|
<div id="regionSubCodeId" class="component-select bottom-sheet" data-props-default="지역 선택"
|
||||||
data-props-type="bottomSheet">
|
data-props-type="bottomSheet">
|
||||||
<input type="hidden" name="regionMainCode" data-type="select" th:value="${userInfo.regionMainCode}">
|
<input type="hidden" name="regionSubCode" data-type="select" th:value="${userInfo.regionSubCode}">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt">선택</span>
|
<span class="select-txt">선택</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -152,12 +152,12 @@
|
|||||||
<div class="select-scroll">
|
<div class="select-scroll">
|
||||||
|
|
||||||
<ul class="">
|
<ul class="">
|
||||||
<th:block th:each="item : ${regionMainList}">
|
<!-- <th:block th:each="item : ${regionMainList}">-->
|
||||||
<li class="option" th:data-value="${item.id}"
|
<!-- <li class="option" th:data-value="${item.id}"-->
|
||||||
th:text="${item.codeText}"
|
<!-- th:text="${item.codeText}"-->
|
||||||
th:classappend="${item.id eq userInfo.regionMainCode ? 'current' : ''}">option1
|
<!-- th:classappend="${item.id eq userInfo.regionMainCode ? 'current' : ''}">option1-->
|
||||||
</li>
|
<!-- </li>-->
|
||||||
</th:block>
|
<!-- </th:block>-->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -167,29 +167,29 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="select-group">
|
<div class="select-group">
|
||||||
<div id="regionSubCodeId" class="component-select bottom-sheet"
|
<div id="regionDetailCodeId" class="component-select bottom-sheet"
|
||||||
data-props-default="세부지역 선택" data-props-type="bottomSheet">
|
data-props-default="세부 지역 선택" data-props-type="bottomSheet" data-init="false">
|
||||||
<input type="hidden" th:field="*{regionSubCode}" data-type="select">
|
<!-- <input type="hidden" name="regionDetailCode" data-type="select">-->
|
||||||
|
<input type="hidden" name="regionDetailCode" th:field="*{regionDetailCode}" data-type="select">
|
||||||
<button type="button" class="select-box">
|
<button type="button" class="select-box">
|
||||||
<span class="select-txt">선택</span>
|
<span class="select-txt">선택</span>
|
||||||
</button>
|
</button>
|
||||||
<div class="select-options">
|
<div class="select-options">
|
||||||
<div class="select-header">
|
<div class="select-header">
|
||||||
<p>세부지역 선택</p>
|
<p>세부 지역 선택</p>
|
||||||
<button type="button" class="select-close">
|
<button type="button" class="select-close">
|
||||||
<span class="hide-txt">닫기</span>
|
<span class="hide-txt">닫기</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="select-scroll">
|
<div class="select-scroll">
|
||||||
<ul class="">
|
<ul class="">
|
||||||
<th:block th:each="item : ${regionSubList}">
|
<!-- <th:block th:each="item : ${regionSubList}">-->
|
||||||
<li class="option" th:data-value="${item.id}"
|
<!-- <li class="option" th:data-value="${item.id}"-->
|
||||||
th:text="${item.codeText}"
|
<!-- th:text="${item.codeText}"-->
|
||||||
th:classappend="${item.id eq userInfo.regionSubCode ? 'current' : ''}"
|
<!-- th:classappend="${item.id eq userInfo.regionSubCode ? 'current' : ''}"-->
|
||||||
>option1
|
<!-- >option1-->
|
||||||
</li>
|
<!-- </li>-->
|
||||||
</th:block>
|
<!-- </th:block>-->
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -262,6 +262,21 @@
|
|||||||
|
|
||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
|
const regionList = [[${regionSubList}]];
|
||||||
|
const selectedRegionSubCode = /*[[${userInfo.regionSubCode}]]*/ '';
|
||||||
|
const selectedRegionDetailCode = /*[[${userInfo.regionDetailCode}]]*/ '';
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
// 지역, 세부지역 셀렉트박스 세팅
|
||||||
|
ENV.select.regionSelect = kri.form.setSelectBoxUiCode({
|
||||||
|
codeList: regionList,
|
||||||
|
parentSelector: '#regionSubCodeId',
|
||||||
|
childSelector: '#regionDetailCodeId',
|
||||||
|
selectedParentCode: selectedRegionSubCode,
|
||||||
|
selectedChildCode: selectedRegionDetailCode
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
let ENV = {
|
let ENV = {
|
||||||
httpUrl: {
|
httpUrl: {
|
||||||
root: /*[[#{uri.front.info.user.path}]]*/'rootUrl',
|
root: /*[[#{uri.front.info.user.path}]]*/'rootUrl',
|
||||||
@@ -272,10 +287,9 @@
|
|||||||
confirmPopup: null
|
confirmPopup: null
|
||||||
},
|
},
|
||||||
select:{
|
select:{
|
||||||
select1:null,
|
selectRegion: null,
|
||||||
select2:null,
|
selectTel:null,
|
||||||
select3:null,
|
selectPhone:null
|
||||||
select4:null
|
|
||||||
},
|
},
|
||||||
submitted: false,
|
submitted: false,
|
||||||
};
|
};
|
||||||
@@ -291,45 +305,25 @@
|
|||||||
ENV.initialOwnerName = document.querySelector('input[name="ownerName"]').value;
|
ENV.initialOwnerName = document.querySelector('input[name="ownerName"]').value;
|
||||||
},
|
},
|
||||||
_bindUI() {
|
_bindUI() {
|
||||||
|
|
||||||
console.log("bind")
|
console.log("bind")
|
||||||
ENV.module.confirmPopup = document.querySelector(".confirmPopup").ui;
|
ENV.module.confirmPopup = document.querySelector(".confirmPopup").ui;
|
||||||
|
|
||||||
const $select1 = document.querySelector('#regionMainCodeId');
|
const $selectTel = document.querySelector('#tel1Id');
|
||||||
ENV.select.select1 = new etUI.components.SelectBox();
|
ENV.select.selectTel = new etUI.components.SelectBox();
|
||||||
ENV.select.select1.core.init($select1, {
|
ENV.select.selectTel.core.init($selectTel, {
|
||||||
selectItemCallback({selectValue, dataValue}){
|
|
||||||
|
|
||||||
document.querySelector('#regionMainCode').value = dataValue;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const $select2 = document.querySelector('#regionSubCodeId');
|
|
||||||
ENV.select.select2 = new etUI.components.SelectBox();
|
|
||||||
ENV.select.select2.core.init($select2, {
|
|
||||||
selectItemCallback({selectValue, dataValue}){
|
|
||||||
document.querySelector('#regionSubCode').value = dataValue;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const $select3 = document.querySelector('#tel1Id');
|
|
||||||
ENV.select.select3 = new etUI.components.SelectBox();
|
|
||||||
ENV.select.select3.core.init($select3, {
|
|
||||||
selectItemCallback({selectValue, dataValue}){
|
selectItemCallback({selectValue, dataValue}){
|
||||||
document.querySelector('#tel1').value = dataValue;
|
document.querySelector('#tel1').value = dataValue;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const $selectPhone = document.querySelector('#phone1Id');
|
||||||
const $select4 = document.querySelector('#phone1Id');
|
ENV.select.selectPhone = new etUI.components.SelectBox();
|
||||||
ENV.select.select4 = new etUI.components.SelectBox();
|
ENV.select.selectPhone.core.init($selectPhone, {
|
||||||
ENV.select.select4.core.init($select4, {
|
|
||||||
selectItemCallback({selectValue, dataValue}){
|
selectItemCallback({selectValue, dataValue}){
|
||||||
document.querySelector('#phone1').value = dataValue;
|
document.querySelector('#phone1').value = dataValue;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
|
// selectboxInstance1.setValue($('input[name=regionMainCode]').val());
|
||||||
},
|
},
|
||||||
confirmPopup() {
|
confirmPopup() {
|
||||||
@@ -369,10 +363,10 @@
|
|||||||
// f.regionSubCode.value = regionSubCodeIdElement.value;
|
// f.regionSubCode.value = regionSubCodeIdElement.value;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
f.regionMainCode.value = ENV.select.select1.getValue();
|
f.regionSubCode.value = ENV.select.regionSelect.getParentValue();
|
||||||
f.regionSubCode.value = ENV.select.select2.getValue();
|
f.regionDetailCode.value = ENV.select.regionSelect.getChildValue();
|
||||||
f.tel1.value = ENV.select.select3.getValue();
|
f.tel1.value = ENV.select.selectTel.getValue();
|
||||||
f.phone1.value = ENV.select.select4.getValue();
|
f.phone1.value = ENV.select.selectPhone.getValue();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -389,7 +383,9 @@
|
|||||||
// 이름이 바뀐 경우만 팝업
|
// 이름이 바뀐 경우만 팝업
|
||||||
ENV.module.confirmPopup.open();
|
ENV.module.confirmPopup.open();
|
||||||
} else {
|
} else {
|
||||||
location.href = '/info';
|
ajaxUtil._alert('개인정보 변경이 완료되었습니다.', null, () => {
|
||||||
|
location.href = '/info';
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else if (rstData.code === 'ERROR') {
|
} else if (rstData.code === 'ERROR') {
|
||||||
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
ajaxUtil._alert('잠시 뒤에 다시 시도해 주세요.', null);
|
||||||
|
|||||||
@@ -89,7 +89,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01">
|
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||||
|
th:if="${btnActive}">
|
||||||
<i class="ico-add ico-small" aria-hidden="true"></i>
|
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||||
<span class="btn-txt">추가 등록</span>
|
<span class="btn-txt">추가 등록</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -87,7 +87,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01">
|
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||||
|
th:if="${btnActive}">
|
||||||
<i class="ico-add ico-small" aria-hidden="true"></i>
|
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||||
<span class="btn-txt">추가 등록</span>
|
<span class="btn-txt">추가 등록</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -87,7 +87,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01">
|
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||||
|
th:if="${btnActive}">
|
||||||
<i class="ico-add ico-small" aria-hidden="true"></i>
|
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||||
<span class="btn-txt">추가 등록</span>
|
<span class="btn-txt">추가 등록</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -7,9 +7,10 @@
|
|||||||
<div class="component-btns type-tab"
|
<div class="component-btns type-tab"
|
||||||
th:if="not ${detail.updated}">
|
th:if="not ${detail.updated}">
|
||||||
<div class="btns-row">
|
<div class="btns-row">
|
||||||
<button type="button" class="btn active">수기 등록</button>
|
<button type="button" class="btn active" onclick="modalControl.changeModal('self')">수기 등록</button>
|
||||||
<!--/* TODO : 2차 오픈 */-->
|
<th:block th:if="${@systemProperties['spring.profiles.active'] eq 'local'}">
|
||||||
<!--<button type="button" class="btn">영수증 등록</button>-->
|
<button type="button" class="btn" onclick="modalControl.changeModal('ocr')">영수증 등록</button>
|
||||||
|
</th:block>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -17,187 +18,241 @@
|
|||||||
<form name="reqModalForm">
|
<form name="reqModalForm">
|
||||||
<input type="hidden" name="inputType" th:value="${#strings.defaultString(detail.inputType, 'SELF')}">
|
<input type="hidden" name="inputType" th:value="${#strings.defaultString(detail.inputType, 'SELF')}">
|
||||||
<input type="hidden" name="id" th:value="${detail.id}">
|
<input type="hidden" name="id" th:value="${detail.id}">
|
||||||
<section class="form-group">
|
<!--/* 수기 등록 s */-->
|
||||||
<div class="segment-label">
|
<div id="modelSelf">
|
||||||
<p class="label-txt">
|
<section class="form-group">
|
||||||
외상판매 여부
|
<div class="segment-label">
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="component-segment">
|
|
||||||
<div class="component-radio">
|
|
||||||
<label class="radio-inner">
|
|
||||||
<input type="radio" name="credit" value="true" th:checked="${detail.credit}">
|
|
||||||
<span class="radio-item">
|
|
||||||
<span class="radio-txt">예</span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="component-radio">
|
|
||||||
<label class="radio-inner">
|
|
||||||
<input type="radio" name="credit" value="false" th:checked="not ${detail.credit}">
|
|
||||||
<span class="radio-item">
|
|
||||||
<span class="radio-txt">아니오</span>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="select-group">
|
|
||||||
<div class="select-label">
|
|
||||||
<p class="label-txt">
|
<p class="label-txt">
|
||||||
재배형태
|
외상판매 여부
|
||||||
</p>
|
</p>
|
||||||
<span class="select-sub-txt">임산물 수입이 있는 경우, 등록해 주세요.</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="cropCode" class="component-select bottom-sheet" data-props-default="재배형태를 선택해 주세요" data-props-type="bottomSheet">
|
<div class="component-segment">
|
||||||
<input type="hidden" name="cropCode" th:value="${detail.cropCode}" data-type="select">
|
<div class="component-radio">
|
||||||
<button type="button" class="select-box">
|
<label class="radio-inner">
|
||||||
<span class="select-txt"></span>
|
<input type="radio" name="credit" value="true" th:checked="${detail.credit}">
|
||||||
</button>
|
<span class="radio-item">
|
||||||
<div class="select-options">
|
<span class="radio-txt">예</span>
|
||||||
<div class="select-header">
|
</span>
|
||||||
<p>재배형태</p>
|
</label>
|
||||||
<button type="button" class="select-close">
|
</div>
|
||||||
<span class="hide-txt">닫기</span>
|
<div class="component-radio">
|
||||||
</button>
|
<label class="radio-inner">
|
||||||
</div>
|
<input type="radio" name="credit" value="false" th:checked="not ${detail.credit}">
|
||||||
<div class="select-scroll">
|
<span class="radio-item">
|
||||||
<ul class="">
|
<span class="radio-txt">아니오</span>
|
||||||
<li class="option"
|
</span>
|
||||||
th:each="uiCode : ${recordCrop}"
|
</label>
|
||||||
th:data-value="${uiCode.id}"
|
</div>
|
||||||
th:text="${uiCode.codeText}"></li>
|
</div>
|
||||||
</ul>
|
<div class="select-group">
|
||||||
|
<div class="select-label">
|
||||||
|
<p class="label-txt">
|
||||||
|
재배형태
|
||||||
|
</p>
|
||||||
|
<span class="select-sub-txt">임산물 수입이 있는 경우, 등록해 주세요.</span>
|
||||||
|
</div>
|
||||||
|
<div id="cropCode" class="component-select bottom-sheet" data-props-default="재배형태를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
|
<input type="hidden" name="cropCode" th:value="${detail.cropCode}" data-type="select">
|
||||||
|
<button type="button" class="select-box">
|
||||||
|
<span class="select-txt"></span>
|
||||||
|
</button>
|
||||||
|
<div class="select-options">
|
||||||
|
<div class="select-header">
|
||||||
|
<p>재배형태</p>
|
||||||
|
<button type="button" class="select-close">
|
||||||
|
<span class="hide-txt">닫기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="select-scroll">
|
||||||
|
<ul class="">
|
||||||
|
<li class="option"
|
||||||
|
th:each="uiCode : ${recordCrop}"
|
||||||
|
th:data-value="${uiCode.id}"
|
||||||
|
th:text="${uiCode.codeText}"></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<section class="form-group">
|
<section class="form-group">
|
||||||
<div class="component-input">
|
<div class="component-input">
|
||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
<label for="incomeKind" class="label-txt">
|
<label for="incomeKind" class="label-txt">
|
||||||
수입의 종류<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
수입의 종류<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
|
||||||
<div class="input-field">
|
|
||||||
<input type="text" id="incomeKind" name="incomeKind" th:value="${detail.incomeKind}" maxlength="30" placeholder="수입의 종류를 입력해 주세요">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="component-input">
|
|
||||||
<div class="input-label">
|
|
||||||
<label for="sourcePurpose" class="label-txt">
|
|
||||||
수입원
|
|
||||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="input-field">
|
|
||||||
<input type="text" id="sourcePurpose" name="sourcePurpose" th:value="${detail.sourcePurpose}" maxlength="30" placeholder="수입원을 입력해 주세요">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<section class="form-group">
|
|
||||||
<div class="component-input">
|
|
||||||
<div class="input-label">
|
|
||||||
<label for="quantity" class="label-txt">
|
|
||||||
수량
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="input-field">
|
|
||||||
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity" min="1" max="9999999999"
|
|
||||||
th:value="${detail.quantity}" maxlength="10" placeholder="수량을 입력해 주세요">
|
|
||||||
</div>
|
|
||||||
<ul class="guide-info">
|
|
||||||
<li>예 : 2, 2.5</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="select-group">
|
|
||||||
<div class="select-label">
|
|
||||||
<p class="label-txt">
|
|
||||||
단위
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
|
||||||
<input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
|
|
||||||
<button type="button" class="select-box">
|
|
||||||
<span class="select-txt"></span>
|
|
||||||
</button>
|
|
||||||
<div class="select-options">
|
|
||||||
<div class="select-header">
|
|
||||||
<p>단위</p>
|
|
||||||
<button type="button" class="select-close">
|
|
||||||
<span class="hide-txt">닫기</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="select-scroll">
|
|
||||||
<ul class="">
|
|
||||||
<li class="option" th:each="uiCode : ${recordUnit}"
|
|
||||||
th:data-value="${uiCode.id}"
|
|
||||||
th:text="${uiCode.codeText}"
|
|
||||||
th:selected="${uiCode.id eq detail.unitCode ? 'current' : ''}"
|
|
||||||
></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="component-input" data-option="직접 입력">
|
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<input type="text" name="unitSelf" th:value="${detail.unitSelf}" maxlength="30" placeholder="단위를 입력해 주세요">
|
<input type="text" id="incomeKind" name="incomeKind" th:value="${detail.incomeKind}" maxlength="30" placeholder="수입의 종류를 입력해 주세요">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="component-input">
|
||||||
</section>
|
<div class="input-label">
|
||||||
|
<label for="sourcePurpose" class="label-txt">
|
||||||
<hr>
|
수입원
|
||||||
|
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
<section class="form-group">
|
</label>
|
||||||
<div class="component-input">
|
</div>
|
||||||
<div class="input-label">
|
<div class="input-field">
|
||||||
<label for="price" class="label-txt">
|
<input type="text" id="sourcePurpose" name="sourcePurpose" th:value="${detail.sourcePurpose}" maxlength="30" placeholder="수입원을 입력해 주세요">
|
||||||
현금
|
</div>
|
||||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field type-price">
|
</section>
|
||||||
<input type="number" inputmode="numeric" pattern="[0-9]*" id="price" name="price" step="0" min="1" max="9999999999"
|
|
||||||
th:value="${detail.price}" maxlength="10" placeholder="금액을 입력해 주세요">
|
|
||||||
<span class="input-field-txt">원</span>
|
|
||||||
</div>
|
|
||||||
<ul class="guide-info">
|
|
||||||
<li>예 : 30000</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="component-input">
|
<hr>
|
||||||
<div class="input-label">
|
|
||||||
<label for="estimatedValue" class="label-txt">
|
|
||||||
현물평가액
|
|
||||||
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="input-field type-price">
|
|
||||||
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue" step="0" min="1" max="9999999999"
|
|
||||||
th:value="${detail.estimatedValue}" maxlength="10" placeholder="금액을 입력해 주세요">
|
|
||||||
<span class="input-field-txt">원</span>
|
|
||||||
</div>
|
|
||||||
<ul class="guide-info">
|
|
||||||
<li>예 : 30000</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="component-btns">
|
<section class="form-group">
|
||||||
<div class="btns-row">
|
<div class="component-input">
|
||||||
<button type="button" class="btn btn-full btn-l btn-primary" onclick="modalControl.createVaild();">
|
<div class="input-label">
|
||||||
<span class="btn-txt">등록</span>
|
<label for="quantity" class="label-txt">
|
||||||
</button>
|
수량
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="number" inputmode="decimal" pattern="[0-9]*" id="quantity" name="quantity" min="1" max="9999999999"
|
||||||
|
th:value="${detail.quantity}" maxlength="10" placeholder="수량을 입력해 주세요">
|
||||||
|
</div>
|
||||||
|
<ul class="guide-info">
|
||||||
|
<li>예 : 2, 2.5</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="select-group">
|
||||||
|
<div class="select-label">
|
||||||
|
<p class="label-txt">
|
||||||
|
단위
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div id="unitCode" class="component-select bottom-sheet" data-props-default="단위를 선택해 주세요" data-props-type="bottomSheet">
|
||||||
|
<input type="hidden" name="unitCode" data-type="select" th:value="${detail.unitCode}">
|
||||||
|
<button type="button" class="select-box">
|
||||||
|
<span class="select-txt"></span>
|
||||||
|
</button>
|
||||||
|
<div class="select-options">
|
||||||
|
<div class="select-header">
|
||||||
|
<p>단위</p>
|
||||||
|
<button type="button" class="select-close">
|
||||||
|
<span class="hide-txt">닫기</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="select-scroll">
|
||||||
|
<ul class="">
|
||||||
|
<li class="option" th:each="uiCode : ${recordUnit}"
|
||||||
|
th:data-value="${uiCode.id}"
|
||||||
|
th:text="${uiCode.codeText}"
|
||||||
|
th:selected="${uiCode.id eq detail.unitCode ? 'current' : ''}"
|
||||||
|
></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="component-input" data-option="직접 입력">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" name="unitSelf" th:value="${detail.unitSelf}" maxlength="30" placeholder="단위를 입력해 주세요">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<section class="form-group">
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="price" class="label-txt">
|
||||||
|
현금
|
||||||
|
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field type-price">
|
||||||
|
<input type="number" inputmode="numeric" pattern="[0-9]*" id="price" name="price" step="0" min="1" max="9999999999"
|
||||||
|
th:value="${detail.price}" maxlength="10" placeholder="금액을 입력해 주세요">
|
||||||
|
<span class="input-field-txt">원</span>
|
||||||
|
</div>
|
||||||
|
<ul class="guide-info">
|
||||||
|
<li>예 : 30000</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-label">
|
||||||
|
<label for="estimatedValue" class="label-txt">
|
||||||
|
현물평가액
|
||||||
|
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="input-field type-price">
|
||||||
|
<input type="number" inputmode="numeric" pattern="[0-9]*" id="estimatedValue" name="estimatedValue" step="0" min="1" max="9999999999"
|
||||||
|
th:value="${detail.estimatedValue}" maxlength="10" placeholder="금액을 입력해 주세요">
|
||||||
|
<span class="input-field-txt">원</span>
|
||||||
|
</div>
|
||||||
|
<ul class="guide-info">
|
||||||
|
<li>예 : 30000</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="component-btns">
|
||||||
|
<div class="btns-row">
|
||||||
|
<button type="button" class="btn btn-full btn-l btn-primary" onclick="modalControl.createVaild();">
|
||||||
|
<span class="btn-txt">등록</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--/* 수기 등록 e */-->
|
||||||
|
<!--/* 영수증 등록 s */-->
|
||||||
|
<div id="modelOcr" style="display: none;">
|
||||||
|
<section class="form-group">
|
||||||
|
<div class="segment-label">
|
||||||
|
<p class="label-txt">
|
||||||
|
영수증 첨부
|
||||||
|
<i class="ico-required-mark" role="img" aria-label="필수">*</i>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="component-segment">
|
||||||
|
<div class="component-file">
|
||||||
|
<div class="file-list">
|
||||||
|
<div class="file-item">
|
||||||
|
<img class="profile-image-add" src="../../assets/images/acco/file_sample.png" alt="이미지샘플" />
|
||||||
|
<button type="button" class="btn-delete"><span class="hide-txt">삭제</span></button>
|
||||||
|
</div>
|
||||||
|
<div class="file-item">
|
||||||
|
<img class="profile-image-add" src="../../assets/images/acco/file_sample.png" alt="이미지샘플" />
|
||||||
|
<button type="button" class="btn-delete"><span class="hide-txt">삭제</span></button>
|
||||||
|
</div>
|
||||||
|
<div class="file-item">
|
||||||
|
<img class="profile-image-add" src="../../assets/images/acco/file_sample.png" alt="이미지샘플" />
|
||||||
|
<button type="button" class="btn-delete"><span class="hide-txt">삭제</span></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="button" class="btn btn-m btn-link btn-full">
|
||||||
|
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||||
|
<span class="btn-txt">사진 첨부</span>
|
||||||
|
</button>
|
||||||
|
<ul class="guide-info">
|
||||||
|
<li>영수증은 일일 최대 3개 등록하실 수 있습니다.</li>
|
||||||
|
<li>
|
||||||
|
최대 갯수 등록 후에는 수기 입력만 가능합니다. <br>
|
||||||
|
(사진 1개당 5MB 이하)
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="component-btns">
|
||||||
|
<div class="btns-row">
|
||||||
|
<!-- 버튼비활성 스타일 속성에 disabled 추가 -->
|
||||||
|
<button type="button" class="btn btn-full btn-l btn-primary">
|
||||||
|
<span class="btn-txt">등록</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!--/* 영수증 등록 e */-->
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|||||||
@@ -239,6 +239,15 @@
|
|||||||
$input.val('').attr('disabled', true);
|
$input.val('').attr('disabled', true);
|
||||||
$input.parent().parent().closest('.component-input').addClass('input-disabled');
|
$input.parent().parent().closest('.component-input').addClass('input-disabled');
|
||||||
},
|
},
|
||||||
|
changeModal(type) {
|
||||||
|
if (type === 'self') {
|
||||||
|
$('#modelSelf').show();
|
||||||
|
$('#modelOcr').hide();
|
||||||
|
} else {
|
||||||
|
$('#modelSelf').hide();
|
||||||
|
$('#modelOcr').show();
|
||||||
|
}
|
||||||
|
},
|
||||||
createVaild() {
|
createVaild() {
|
||||||
modalControl.create();
|
modalControl.create();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -77,7 +77,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01">
|
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||||
|
th:if="${btnActive}">
|
||||||
<i class="ico-add ico-small" aria-hidden="true"></i>
|
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||||
<span class="btn-txt">추가 등록</span>
|
<span class="btn-txt">추가 등록</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -129,7 +129,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01">
|
<button type="button" class="btn btn-m btn-secondary btn-full button-modal01" data-testid="button-modal01"
|
||||||
|
th:if="${btnActive}">
|
||||||
<i class="ico-add ico-small" aria-hidden="true"></i>
|
<i class="ico-add ico-small" aria-hidden="true"></i>
|
||||||
<span class="btn-txt">추가 등록</span>
|
<span class="btn-txt">추가 등록</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user