Compare commits
20 Commits
885b97f4bf
...
85a7a1be6d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85a7a1be6d | ||
|
|
669d1bb0c1 | ||
|
|
0d2f1868fe | ||
|
|
c3555a5f69 | ||
|
|
b04a4ce4f9 | ||
|
|
c6de18850b | ||
|
|
3bb1e244b9 | ||
|
|
91991d85e7 | ||
|
|
d26df41a1b | ||
|
|
d1e529b5b1 | ||
|
|
5adbff0226 | ||
|
|
997f38bf9c | ||
|
|
60b2e8b5c8 | ||
|
|
1b615ddfe5 | ||
|
|
3f74c60266 | ||
|
|
4e8bfcc215 | ||
|
|
18cc8fd146 | ||
|
|
2a51bd0b41 | ||
|
|
d7299d4f5b | ||
|
|
d9a372a3ab |
@@ -12,7 +12,7 @@
|
|||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>admin</name>
|
<name>admin</name>
|
||||||
<description>Admin project</description>
|
<description>Admin project</description>
|
||||||
<packaging>${packaging.type}</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
package app.module.admin.config.application.security;
|
package app.module.admin.config.application.security;
|
||||||
|
|
||||||
import app.module.core.config.application.enums.AppType;
|
|
||||||
import app.module.core.config.application.enums.OperationLogType;
|
|
||||||
import app.module.core.config.application.util.CommonUtil;
|
import app.module.core.config.application.util.CommonUtil;
|
||||||
import app.module.core.config.application.util.MessageUtil;
|
import app.module.core.config.application.util.MessageUtil;
|
||||||
import app.module.core.usecase.admin.status.ports.AdminUpdateAccountLockPortIn;
|
import app.module.core.usecase.admin.status.ports.AdminUpdateAccountLockPortIn;
|
||||||
|
|||||||
@@ -28,53 +28,50 @@ public class ChartDao implements ChartPortOut {
|
|||||||
private final UICodeListMapper uiCodeListMapper;
|
private final UICodeListMapper uiCodeListMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChartDto selectTotalPercentage(String usageType) {
|
public ChartDto selectTotalPercentage(String usageType, String recordMonth) {
|
||||||
TotalPercentageReqVO reqVO = new TotalPercentageReqVO();
|
TotalPercentageReqVO reqVO = new TotalPercentageReqVO();
|
||||||
|
|
||||||
reqVO.setUsageType(usageType);
|
reqVO.setUsageType(usageType);
|
||||||
|
reqVO.setRecordMonth(recordMonth);
|
||||||
|
|
||||||
LocalDate today = LocalDate.now();
|
String year = recordMonth.substring(0, 4);
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
String month = recordMonth.substring(4, 6);
|
||||||
String formattedDate = today.format(formatter);
|
String recordMonthText = year + "년 " + month + "월 현황";
|
||||||
reqVO.setRecordMonth(formattedDate);
|
|
||||||
DateTimeFormatter formatterText = DateTimeFormatter.ofPattern("yyyy년 MM월 현황");
|
|
||||||
String recordMonthText = today.format(formatterText);
|
|
||||||
|
|
||||||
if("ROLE_ADMIN".equals(AdminUtil.getLoginUserRole())) {
|
if ("ROLE_ADMIN".equals(AdminUtil.getLoginUserRole())) {
|
||||||
// 관리자 일경우
|
// 관리자 일경우
|
||||||
return new ChartDto(
|
return new ChartDto(recordMonthText,
|
||||||
recordMonthText,
|
chartMapper.selectTotalPercentage(reqVO, activeProfiles),
|
||||||
chartMapper.selectTotalPercentage(reqVO,activeProfiles),
|
chartMapper.selectLocalRegionPercentage(reqVO, activeProfiles),
|
||||||
chartMapper.selectLocalRegionPercentage(reqVO,activeProfiles),
|
chartMapper.selectLocalRegionResearcherPercentage(reqVO, activeProfiles),
|
||||||
chartMapper.selectLocalRegionResearcherPercentage(reqVO,activeProfiles),
|
uiCodeListMapper.findByParentId("code.region.main", AdminUtil.getLoginUserRole(),
|
||||||
uiCodeListMapper.findByParentId("code.region.main",AdminUtil.getLoginUserRole(),activeProfiles));
|
activeProfiles));
|
||||||
|
|
||||||
} else if("ROLE_LOCAL_INSPECTOR".equals(AdminUtil.getLoginUserRole())) {
|
} else if ("ROLE_LOCAL_INSPECTOR".equals(AdminUtil.getLoginUserRole())) {
|
||||||
// 지방 실사 일경우 실사 지역으로만
|
// 지방 실사 일경우 실사 지역으로만
|
||||||
reqVO.setRegionMainCode(AdminUtil.getLoginUserRegionMainCode());
|
reqVO.setRegionMainCode(AdminUtil.getLoginUserRegionMainCode());
|
||||||
|
|
||||||
return new ChartDto(
|
return new ChartDto(recordMonthText,
|
||||||
recordMonthText,
|
chartMapper.selectTotalPercentage(reqVO, activeProfiles),
|
||||||
chartMapper.selectTotalPercentage(reqVO,activeProfiles),
|
chartMapper.selectLocalRegionPercentage(reqVO, activeProfiles),
|
||||||
chartMapper.selectLocalRegionPercentage(reqVO,activeProfiles),
|
chartMapper.selectLocalRegionResearcherPercentage(reqVO, activeProfiles), null);
|
||||||
chartMapper.selectLocalRegionResearcherPercentage(reqVO,activeProfiles),
|
} else if ("ROLE_LOCAL_INSPECTOR".equals(AdminUtil.getLoginUserRole())) {
|
||||||
null);
|
|
||||||
} else if("ROLE_LOCAL_INSPECTOR".equals(AdminUtil.getLoginUserRole())) {
|
|
||||||
// 조사원 일경우
|
// 조사원 일경우
|
||||||
reqVO.setAdminSeq(AdminUtil.getLoginUserSeq());
|
reqVO.setAdminSeq(AdminUtil.getLoginUserSeq());
|
||||||
return new ChartDto(recordMonthText, chartMapper.selectTotalPercentageResearcher(reqVO,activeProfiles), null,null,null);
|
return new ChartDto(recordMonthText,
|
||||||
|
chartMapper.selectTotalPercentageResearcher(reqVO, activeProfiles), null, null,
|
||||||
|
null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new ChartDto(null,null,null,null,null);
|
return new ChartDto(null, null, null, null, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<LocalRegionResearcherPercentDto> selectRegionMainCodePercentage(String usageType, String regionMainCode) {
|
public List<LocalRegionResearcherPercentDto> selectRegionMainCodePercentage(String usageType, String regionMainCode, String recordMonth) {
|
||||||
LocalDate today = LocalDate.now();
|
if ("ROLE_ADMIN".equals(AdminUtil.getLoginUserRole())) {
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
return chartMapper.selectLocalRegionResearcherPercentage(
|
||||||
String formattedDate = today.format(formatter);
|
new TotalPercentageReqVO(usageType, regionMainCode, recordMonth), activeProfiles);
|
||||||
if("ROLE_ADMIN".equals(AdminUtil.getLoginUserRole())) {
|
} else {
|
||||||
return chartMapper.selectLocalRegionResearcherPercentage(new TotalPercentageReqVO(usageType,regionMainCode,formattedDate),activeProfiles);
|
|
||||||
}else{
|
|
||||||
throw new NoMatchingURIException("잘못된 접근");
|
throw new NoMatchingURIException("잘못된 접근");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,10 @@ import lombok.Data;
|
|||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class RegionDetailExcelDto {
|
public class RegionDetailExcelDto {
|
||||||
|
private String regionMainName;
|
||||||
private String regionDetailName;
|
private String regionDetailName;
|
||||||
private String regionName;
|
|
||||||
private String householdCount;
|
private String householdCount;
|
||||||
private String avgCompletionRate;
|
private String avgCompletionRate;
|
||||||
private String visitCount;
|
private String visitCount;
|
||||||
private String giftSentCount;
|
private String giftSentCount;
|
||||||
private String regionOrder;
|
|
||||||
private String regionDetailOrder;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,18 @@
|
|||||||
package app.module.admin.usecase.dashboard.chart.adapters.web;
|
package app.module.admin.usecase.dashboard.chart.adapters.web;
|
||||||
|
|
||||||
import app.module.admin.config.application.util.DateUiUtil;
|
|
||||||
import app.module.admin.config.application.util.ExcelWriterUtil;
|
import app.module.admin.config.application.util.ExcelWriterUtil;
|
||||||
import app.module.admin.config.application.util.model.ExcelSheetDto;
|
import app.module.admin.config.application.util.model.ExcelSheetDto;
|
||||||
import app.module.admin.usecase.dashboard.chart.adapters.persistence.model.DashboardExcelDto;
|
import app.module.admin.usecase.dashboard.chart.adapters.persistence.model.DashboardExcelDto;
|
||||||
import app.module.admin.usecase.dashboard.chart.adapters.persistence.model.RegionDetailExcelDto;
|
import app.module.admin.usecase.dashboard.chart.adapters.persistence.model.RegionDetailExcelDto;
|
||||||
import app.module.admin.usecase.dashboard.chart.adapters.persistence.model.RegionMainExcelDto;
|
import app.module.admin.usecase.dashboard.chart.adapters.persistence.model.RegionMainExcelDto;
|
||||||
import app.module.admin.usecase.dashboard.chart.ports.ChartPortIn;
|
import app.module.admin.usecase.dashboard.chart.ports.ChartPortIn;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@@ -20,14 +26,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@@ -37,20 +35,24 @@ class ChartApiController {
|
|||||||
private final ChartPortIn chartPortIn;
|
private final ChartPortIn chartPortIn;
|
||||||
|
|
||||||
@GetMapping(path = "/total")
|
@GetMapping(path = "/total")
|
||||||
ResponseEntity<?> selectTotalPercentage(@RequestParam("usageType") String usageType) {
|
ResponseEntity<?> selectTotalPercentage(@RequestParam("usageType") String usageType,
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(chartPortIn.selectTotalPercentage(usageType));
|
@RequestParam("recordMonth") String recordMonth) {
|
||||||
|
return ResponseEntity.status(HttpStatus.OK)
|
||||||
|
.body(chartPortIn.selectTotalPercentage(usageType, recordMonth));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(path = "/researcher")
|
@GetMapping(path = "/researcher")
|
||||||
ResponseEntity<?> selectRegionMainCodePercentage(@RequestParam("usageType") String usageType,@RequestParam("regionMainCode") String regionMainCode) {
|
ResponseEntity<?> selectRegionMainCodePercentage(@RequestParam("usageType") String usageType,
|
||||||
return ResponseEntity.status(HttpStatus.OK).body(chartPortIn.selectRegionMainCodePercentage(usageType,regionMainCode));
|
@RequestParam("regionMainCode") String regionMainCode,
|
||||||
|
@RequestParam("recordMonth") String recordMonth) {
|
||||||
|
return ResponseEntity.status(HttpStatus.OK).body(
|
||||||
|
chartPortIn.selectRegionMainCodePercentage(usageType, regionMainCode, recordMonth));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(path = "/excel")
|
@GetMapping(path = "/excel")
|
||||||
ResponseEntity<byte[]> exportDashboardExcel() {
|
ResponseEntity<byte[]> exportDashboardExcel(@RequestParam("recordMonth") String recordMonth) {
|
||||||
|
|
||||||
DashboardExcelDto dashboardExcel = chartPortIn.selectDashboard(
|
DashboardExcelDto dashboardExcel = chartPortIn.selectDashboard(recordMonth);
|
||||||
DateUiUtil.getCurrentMonthValue());
|
|
||||||
|
|
||||||
List<List<String>> rows1 = new ArrayList<>();
|
List<List<String>> rows1 = new ArrayList<>();
|
||||||
for (RegionMainExcelDto item : dashboardExcel.getRegionMain()) {
|
for (RegionMainExcelDto item : dashboardExcel.getRegionMain()) {
|
||||||
@@ -58,7 +60,7 @@ class ChartApiController {
|
|||||||
StringUtils.defaultString(item.getRegionName()),
|
StringUtils.defaultString(item.getRegionName()),
|
||||||
StringUtils.defaultString(item.getResearcherCount()),
|
StringUtils.defaultString(item.getResearcherCount()),
|
||||||
StringUtils.defaultString(item.getHouseholdCount()),
|
StringUtils.defaultString(item.getHouseholdCount()),
|
||||||
StringUtils.defaultString(item.getAvgCompletionRate()) + "%",
|
StringUtils.defaultString(item.getAvgCompletionRate()),
|
||||||
StringUtils.defaultString(item.getVisitCount()),
|
StringUtils.defaultString(item.getVisitCount()),
|
||||||
StringUtils.defaultString(item.getGiftSentCount())
|
StringUtils.defaultString(item.getGiftSentCount())
|
||||||
));
|
));
|
||||||
@@ -67,7 +69,7 @@ class ChartApiController {
|
|||||||
// 시트 1: 실사
|
// 시트 1: 실사
|
||||||
ExcelSheetDto sheet1 = new ExcelSheetDto(
|
ExcelSheetDto sheet1 = new ExcelSheetDto(
|
||||||
"실사",
|
"실사",
|
||||||
List.of("실사", "할당 조사원 수", "할당 임가 수", "일계부 진행률", "현장 방문 수", "답례품 전달 임가 수"),
|
List.of("실사", "할당 조사원 수", "할당 임가 수", "당월 일계부 현황(%)", "현장 방문 수", "답례품 전달 임가 수"),
|
||||||
rows1,
|
rows1,
|
||||||
null,
|
null,
|
||||||
Map.of(0, IndexedColors.LIGHT_YELLOW)
|
Map.of(0, IndexedColors.LIGHT_YELLOW)
|
||||||
@@ -76,9 +78,10 @@ class ChartApiController {
|
|||||||
List<List<String>> rows2 = new ArrayList<>();
|
List<List<String>> rows2 = new ArrayList<>();
|
||||||
for (RegionDetailExcelDto item : dashboardExcel.getRegionDetail()) {
|
for (RegionDetailExcelDto item : dashboardExcel.getRegionDetail()) {
|
||||||
rows2.add(List.of(
|
rows2.add(List.of(
|
||||||
|
StringUtils.defaultString(item.getRegionMainName()),
|
||||||
StringUtils.defaultString(item.getRegionDetailName()),
|
StringUtils.defaultString(item.getRegionDetailName()),
|
||||||
StringUtils.defaultString(item.getHouseholdCount()),
|
StringUtils.defaultString(item.getHouseholdCount()),
|
||||||
StringUtils.defaultString(item.getAvgCompletionRate()) + "%",
|
StringUtils.defaultString(item.getAvgCompletionRate()),
|
||||||
StringUtils.defaultString(item.getVisitCount()),
|
StringUtils.defaultString(item.getVisitCount()),
|
||||||
StringUtils.defaultString(item.getGiftSentCount())
|
StringUtils.defaultString(item.getGiftSentCount())
|
||||||
));
|
));
|
||||||
@@ -87,7 +90,7 @@ class ChartApiController {
|
|||||||
// 시트 2: 세부지역
|
// 시트 2: 세부지역
|
||||||
ExcelSheetDto sheet2 = new ExcelSheetDto(
|
ExcelSheetDto sheet2 = new ExcelSheetDto(
|
||||||
"세부지역",
|
"세부지역",
|
||||||
List.of("세부지역", "할당 임가 수", "일계부 진행률", "현장 방문 수", "답례품 전달 임가 수"),
|
List.of("실사", "세부지역", "할당 임가 수", "당월 일계부 현황(%)", "현장 방문 수", "답례품 전달 임가 수"),
|
||||||
rows2,
|
rows2,
|
||||||
null,
|
null,
|
||||||
Map.of(0, IndexedColors.LIGHT_YELLOW)
|
Map.of(0, IndexedColors.LIGHT_YELLOW)
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface ChartPortIn {
|
public interface ChartPortIn {
|
||||||
|
|
||||||
ChartDto selectTotalPercentage(String usageType);
|
ChartDto selectTotalPercentage(String usageType, String recordMonth);
|
||||||
List<LocalRegionResearcherPercentDto> selectRegionMainCodePercentage(String usageType,String regionMainCode);
|
List<LocalRegionResearcherPercentDto> selectRegionMainCodePercentage(String usageType,String regionMainCode, String recordMonth);
|
||||||
DashboardExcelDto selectDashboard(String recordMonth);
|
DashboardExcelDto selectDashboard(String recordMonth);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -8,7 +8,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface ChartPortOut {
|
public interface ChartPortOut {
|
||||||
|
|
||||||
ChartDto selectTotalPercentage(String usageType);
|
ChartDto selectTotalPercentage(String usageType, String recordMonth);
|
||||||
List<LocalRegionResearcherPercentDto> selectRegionMainCodePercentage(String usageType,String regionMainCode);
|
List<LocalRegionResearcherPercentDto> selectRegionMainCodePercentage(String usageType,String regionMainCode, String recordMonth);
|
||||||
DashboardExcelDto selectDashboard(String recordMonth);
|
DashboardExcelDto selectDashboard(String recordMonth);
|
||||||
}
|
}
|
||||||
@@ -16,13 +16,14 @@ class ChartService implements ChartPortIn {
|
|||||||
private final ChartPortOut portOut;
|
private final ChartPortOut portOut;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ChartDto selectTotalPercentage(String usageType){
|
public ChartDto selectTotalPercentage(String usageType, String recordMonth){
|
||||||
return portOut.selectTotalPercentage(usageType);
|
return portOut.selectTotalPercentage(usageType, recordMonth);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<LocalRegionResearcherPercentDto> selectRegionMainCodePercentage(String usageType,String regionMainCode) {
|
public List<LocalRegionResearcherPercentDto> selectRegionMainCodePercentage(String usageType,
|
||||||
return portOut.selectRegionMainCodePercentage(usageType,regionMainCode);
|
String regionMainCode, String recordMonth) {
|
||||||
|
return portOut.selectRegionMainCodePercentage(usageType, regionMainCode, recordMonth);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.module.admin.usecase.home.adapters.web;
|
package app.module.admin.usecase.home.adapters.web;
|
||||||
|
|
||||||
|
import app.module.admin.config.application.util.DateUiUtil;
|
||||||
import app.module.admin.usecase.dashboard.getSmsAutoStatus.ports.GetSmsAutoStatusPortIn;
|
import app.module.admin.usecase.dashboard.getSmsAutoStatus.ports.GetSmsAutoStatusPortIn;
|
||||||
import app.module.admin.usecase.dashboard.getSmsAutoStatus.ports.application.domain.GetSmsAutoStatus;
|
import app.module.admin.usecase.dashboard.getSmsAutoStatus.ports.application.domain.GetSmsAutoStatus;
|
||||||
import app.module.core.usecase.admin.view.ports.AdminViewPortIn;
|
import app.module.core.usecase.admin.view.ports.AdminViewPortIn;
|
||||||
@@ -32,6 +33,8 @@ public class HomeController {
|
|||||||
GetSmsAutoStatus smsAutoStatus = getSmsAutoStatusPortIn.operate().orElse(null);
|
GetSmsAutoStatus smsAutoStatus = getSmsAutoStatusPortIn.operate().orElse(null);
|
||||||
|
|
||||||
model.addAttribute("smsActive", smsAutoStatus != null && smsAutoStatus.getActive());
|
model.addAttribute("smsActive", smsAutoStatus != null && smsAutoStatus.getActive());
|
||||||
|
model.addAttribute("monthList", DateUiUtil.getRecentMonths(13));
|
||||||
|
model.addAttribute("currentMonth", DateUiUtil.getCurrentMonthValue());
|
||||||
|
|
||||||
return "home";
|
return "home";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ class GetHouseholdsExcelController {
|
|||||||
getHouseholdsStatusPortIn.operate(pageable,
|
getHouseholdsStatusPortIn.operate(pageable,
|
||||||
new GetHouseholdsStatusCmd(
|
new GetHouseholdsStatusCmd(
|
||||||
reqVO.getRecordMonth(),
|
reqVO.getRecordMonth(),
|
||||||
|
reqVO.getHouseholdNum(),
|
||||||
reqVO.getOwnerField(),
|
reqVO.getOwnerField(),
|
||||||
reqVO.getOwnerValue(),
|
reqVO.getOwnerValue(),
|
||||||
reqVO.getRegionMainCode(),
|
reqVO.getRegionMainCode(),
|
||||||
@@ -154,7 +155,7 @@ class GetHouseholdsExcelController {
|
|||||||
StringUtils.defaultString(item.getIndustryDetail()),
|
StringUtils.defaultString(item.getIndustryDetail()),
|
||||||
StringUtils.defaultString(item.getResearcherName()),
|
StringUtils.defaultString(item.getResearcherName()),
|
||||||
StringUtils.defaultString(item.getResearcherPhone()),
|
StringUtils.defaultString(item.getResearcherPhone()),
|
||||||
StringUtils.defaultString(item.getCompletionRate()) + "%",
|
StringUtils.defaultString(item.getCompletionRate()),
|
||||||
StringUtils.defaultString(item.getFirstVisitDate()),
|
StringUtils.defaultString(item.getFirstVisitDate()),
|
||||||
StringUtils.defaultString(item.getSecondVisitDate()),
|
StringUtils.defaultString(item.getSecondVisitDate()),
|
||||||
StringUtils.defaultString(item.getGiftSend()),
|
StringUtils.defaultString(item.getGiftSend()),
|
||||||
@@ -180,7 +181,7 @@ class GetHouseholdsExcelController {
|
|||||||
"규모/세부품목",
|
"규모/세부품목",
|
||||||
"조사원",
|
"조사원",
|
||||||
"조사원 연락처",
|
"조사원 연락처",
|
||||||
"당월 일계부 현황",
|
"당월 일계부 현황(%)",
|
||||||
"당월 1차 임가방문",
|
"당월 1차 임가방문",
|
||||||
"당월 2차 임가방문",
|
"당월 2차 임가방문",
|
||||||
"답례품 전달",
|
"답례품 전달",
|
||||||
@@ -496,6 +497,7 @@ class GetHouseholdsExcelController {
|
|||||||
StringUtils.defaultString(item.getWorkName()),
|
StringUtils.defaultString(item.getWorkName()),
|
||||||
StringUtils.defaultString(item.getWorkMark()),
|
StringUtils.defaultString(item.getWorkMark()),
|
||||||
StringUtils.defaultString(item.getWorkLandArea()),
|
StringUtils.defaultString(item.getWorkLandArea()),
|
||||||
|
StringUtils.defaultString(item.getAreaMark()),
|
||||||
StringUtils.defaultString(item.getAreaUnitName()),
|
StringUtils.defaultString(item.getAreaUnitName()),
|
||||||
StringUtils.defaultString(item.getHarvestQuantity()),
|
StringUtils.defaultString(item.getHarvestQuantity()),
|
||||||
StringUtils.defaultString(item.getHarvestUnitName()),
|
StringUtils.defaultString(item.getHarvestUnitName()),
|
||||||
@@ -523,6 +525,7 @@ class GetHouseholdsExcelController {
|
|||||||
"작업명",
|
"작업명",
|
||||||
"작업 부호",
|
"작업 부호",
|
||||||
"작업면적",
|
"작업면적",
|
||||||
|
"면적 부호",
|
||||||
"단위",
|
"단위",
|
||||||
"수확량",
|
"수확량",
|
||||||
"단위",
|
"단위",
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import lombok.Setter;
|
|||||||
public class GetHouseholdsExcelReqVO {
|
public class GetHouseholdsExcelReqVO {
|
||||||
// 연월
|
// 연월
|
||||||
private String recordMonth;
|
private String recordMonth;
|
||||||
|
// 임가번호
|
||||||
|
private String householdNum;
|
||||||
// 경영주 검색 필드 (전체, 경영주명, 전화번호)
|
// 경영주 검색 필드 (전체, 경영주명, 전화번호)
|
||||||
private String ownerField;
|
private String ownerField;
|
||||||
// 경영주 검색어
|
// 경영주 검색어
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class GetDailyWork {
|
|||||||
private String workName;
|
private String workName;
|
||||||
private String workMark;
|
private String workMark;
|
||||||
private String workLandArea;
|
private String workLandArea;
|
||||||
|
private String areaMark;
|
||||||
private String areaUnitName;
|
private String areaUnitName;
|
||||||
private String harvestQuantity;
|
private String harvestQuantity;
|
||||||
private String harvestUnitName;
|
private String harvestUnitName;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class GetHouseholdsStatusController {
|
|||||||
getHouseholdsStatusPortIn.operate(pageable,
|
getHouseholdsStatusPortIn.operate(pageable,
|
||||||
new GetHouseholdsStatusCmd(
|
new GetHouseholdsStatusCmd(
|
||||||
reqVO.getRecordMonth(),
|
reqVO.getRecordMonth(),
|
||||||
|
reqVO.getHouseholdNum(),
|
||||||
reqVO.getOwnerField(),
|
reqVO.getOwnerField(),
|
||||||
reqVO.getOwnerValue(),
|
reqVO.getOwnerValue(),
|
||||||
reqVO.getRegionMainCode(),
|
reqVO.getRegionMainCode(),
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import lombok.Setter;
|
|||||||
public class GetHouseholdsStatusReqVO {
|
public class GetHouseholdsStatusReqVO {
|
||||||
// 연월
|
// 연월
|
||||||
private String recordMonth;
|
private String recordMonth;
|
||||||
|
// 임가번호
|
||||||
|
private String householdNum;
|
||||||
// 경영주 검색 필드 (전체, 경영주명, 전화번호)
|
// 경영주 검색 필드 (전체, 경영주명, 전화번호)
|
||||||
private String ownerField;
|
private String ownerField;
|
||||||
// 경영주 검색어
|
// 경영주 검색어
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ import lombok.Setter;
|
|||||||
public class GetHouseholdsStatusCmd {
|
public class GetHouseholdsStatusCmd {
|
||||||
// 연월
|
// 연월
|
||||||
private String recordMonth;
|
private String recordMonth;
|
||||||
|
// 임가번호
|
||||||
|
private String householdNum;
|
||||||
// 경영주 검색 필드 (전체, 경영주명, 전화번호)
|
// 경영주 검색 필드 (전체, 경영주명, 전화번호)
|
||||||
private String ownerField;
|
private String ownerField;
|
||||||
// 경영주 검색어
|
// 경영주 검색어
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ public class GetHouseholdsUIReqVO {
|
|||||||
private String sort;
|
private String sort;
|
||||||
private Integer size;
|
private Integer size;
|
||||||
private String recordMonth;
|
private String recordMonth;
|
||||||
|
private String householdNum;
|
||||||
private String ownerField;
|
private String ownerField;
|
||||||
private String ownerValue;
|
private String ownerValue;
|
||||||
private String regionMainCode;
|
private String regionMainCode;
|
||||||
|
|||||||
@@ -116,18 +116,29 @@
|
|||||||
<select id="selectRegionMainExcel"
|
<select id="selectRegionMainExcel"
|
||||||
resultType="app.module.admin.usecase.dashboard.chart.adapters.persistence.model.RegionMainExcelDto">
|
resultType="app.module.admin.usecase.dashboard.chart.adapters.persistence.model.RegionMainExcelDto">
|
||||||
/* selectRegionMainExcel : 대시보드 엑셀다운로드 (실사) */
|
/* selectRegionMainExcel : 대시보드 엑셀다운로드 (실사) */
|
||||||
|
WITH filtered_uicode AS (
|
||||||
|
SELECT *
|
||||||
|
FROM uicode
|
||||||
|
WHERE parent_id = 'code.region.main'
|
||||||
|
AND is_deleted = false
|
||||||
|
<if test="'prod'.equals(activeProfiles)">
|
||||||
|
AND in_use = true
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
-- 전체 합계
|
||||||
SELECT
|
SELECT
|
||||||
u.code_text AS region_name,
|
'전체' AS region_name,
|
||||||
COUNT(DISTINCT a.seq) AS researcher_count,
|
COUNT(DISTINCT ahr.admin_seq) AS researcher_count,
|
||||||
COUNT(DISTINCT rhh.household_seq) AS household_count,
|
COUNT(DISTINCT h.seq) AS household_count,
|
||||||
CASE
|
CASE
|
||||||
WHEN COALESCE(AVG(v.current_completion_rate), 0) > 0 THEN ROUND(COALESCE(AVG(v.current_completion_rate), 0), 1)
|
WHEN COALESCE(AVG(v.current_completion_rate), 0) > 0
|
||||||
|
THEN ROUND(COALESCE(AVG(v.current_completion_rate), 0), 1)
|
||||||
ELSE 0
|
ELSE 0
|
||||||
END AS avg_completion_rate,
|
END AS avg_completion_rate,
|
||||||
COUNT(DISTINCT CASE WHEN hv.id IS NOT NULL THEN hv.household_seq END) AS visit_count,
|
COUNT(DISTINCT CASE WHEN hv.id IS NOT NULL THEN hv.household_seq END) AS visit_count,
|
||||||
COUNT(DISTINCT CASE WHEN hv.is_gift_sent = true THEN hv.household_seq END) AS gift_sent_count,
|
COUNT(DISTINCT CASE WHEN hv.is_gift_sent = true THEN hv.household_seq END) AS gift_sent_count,
|
||||||
u.order_no
|
-1 AS sort_order
|
||||||
FROM uicode u
|
FROM filtered_uicode u
|
||||||
LEFT JOIN admin a
|
LEFT JOIN admin a
|
||||||
ON a.region_main_code = u.id
|
ON a.region_main_code = u.id
|
||||||
AND a.is_deleted = false
|
AND a.is_deleted = false
|
||||||
@@ -139,7 +150,7 @@
|
|||||||
ON rhh.admin_seq = a.seq
|
ON rhh.admin_seq = a.seq
|
||||||
AND rhh.is_deleted = false
|
AND rhh.is_deleted = false
|
||||||
LEFT JOIN household h
|
LEFT JOIN household h
|
||||||
ON h.seq = rhh.household_seq
|
ON u.id = h.region_main_code
|
||||||
AND h.is_deleted = false
|
AND h.is_deleted = false
|
||||||
AND h.is_panel = true
|
AND h.is_panel = true
|
||||||
LEFT JOIN household_visit hv
|
LEFT JOIN household_visit hv
|
||||||
@@ -149,22 +160,22 @@
|
|||||||
LEFT JOIN v_monthly_completion_rate v
|
LEFT JOIN v_monthly_completion_rate v
|
||||||
ON v.household_seq = h.seq
|
ON v.household_seq = h.seq
|
||||||
AND v.record_month = #{recordMonth}
|
AND v.record_month = #{recordMonth}
|
||||||
WHERE u.parent_id = 'code.region.main' and u.is_deleted = false
|
WHERE u.parent_id = 'code.region.main' AND u.is_deleted = false
|
||||||
<if test="'prod'.equals(activeProfiles)">
|
|
||||||
and u.in_use = true
|
|
||||||
</if>
|
|
||||||
GROUP BY u.code_text, u.order_no
|
|
||||||
UNION ALL
|
UNION ALL
|
||||||
-- 전체 합계 행
|
-- 지역별 집계
|
||||||
SELECT
|
SELECT
|
||||||
'전체' AS region_name,
|
u.code_text AS region_name,
|
||||||
COUNT(DISTINCT a.seq),
|
COUNT(DISTINCT ahr.admin_seq) AS researcher_count,
|
||||||
COUNT(DISTINCT rhh.household_seq),
|
COUNT(DISTINCT h.seq) AS household_count,
|
||||||
COALESCE(ROUND(AVG(v.current_completion_rate), 1), 0),
|
CASE
|
||||||
COUNT(DISTINCT CASE WHEN hv.id IS NOT NULL THEN hv.household_seq END),
|
WHEN COALESCE(AVG(v.current_completion_rate), 0) > 0
|
||||||
COUNT(DISTINCT CASE WHEN hv.is_gift_sent = true THEN hv.household_seq END),
|
THEN ROUND(COALESCE(AVG(v.current_completion_rate), 0), 1)
|
||||||
-1 as order_no
|
ELSE 0
|
||||||
FROM uicode u
|
END AS avg_completion_rate,
|
||||||
|
COUNT(DISTINCT CASE WHEN hv.id IS NOT NULL THEN hv.household_seq END) AS visit_count,
|
||||||
|
COUNT(DISTINCT CASE WHEN hv.is_gift_sent = true THEN hv.household_seq END) AS gift_sent_count,
|
||||||
|
u.order_no AS sort_order
|
||||||
|
FROM filtered_uicode u
|
||||||
LEFT JOIN admin a
|
LEFT JOIN admin a
|
||||||
ON a.region_main_code = u.id
|
ON a.region_main_code = u.id
|
||||||
AND a.is_deleted = false
|
AND a.is_deleted = false
|
||||||
@@ -176,7 +187,7 @@
|
|||||||
ON rhh.admin_seq = a.seq
|
ON rhh.admin_seq = a.seq
|
||||||
AND rhh.is_deleted = false
|
AND rhh.is_deleted = false
|
||||||
LEFT JOIN household h
|
LEFT JOIN household h
|
||||||
ON h.seq = rhh.household_seq
|
ON u.id = h.region_main_code
|
||||||
AND h.is_deleted = false
|
AND h.is_deleted = false
|
||||||
AND h.is_panel = true
|
AND h.is_panel = true
|
||||||
LEFT JOIN household_visit hv
|
LEFT JOIN household_visit hv
|
||||||
@@ -186,86 +197,107 @@
|
|||||||
LEFT JOIN v_monthly_completion_rate v
|
LEFT JOIN v_monthly_completion_rate v
|
||||||
ON v.household_seq = h.seq
|
ON v.household_seq = h.seq
|
||||||
AND v.record_month = #{recordMonth}
|
AND v.record_month = #{recordMonth}
|
||||||
WHERE u.parent_id = 'code.region.main' and u.is_deleted = false
|
WHERE u.parent_id = 'code.region.main' AND u.is_deleted = false
|
||||||
<if test="'prod'.equals(activeProfiles)">
|
GROUP BY u.id, u.code_text, u.order_no
|
||||||
and u.in_use = true
|
ORDER BY sort_order
|
||||||
</if>
|
|
||||||
ORDER BY order_no
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectRegionDetailExcel"
|
<select id="selectRegionDetailExcel"
|
||||||
resultType="app.module.admin.usecase.dashboard.chart.adapters.persistence.model.RegionDetailExcelDto">
|
resultType="app.module.admin.usecase.dashboard.chart.adapters.persistence.model.RegionDetailExcelDto">
|
||||||
/* selectRegionDetailExcel : 대시보드 엑셀다운로드 (세부지역) */
|
/* selectRegionDetailExcel : 대시보드 엑셀다운로드 (세부지역) */
|
||||||
-- 세부 지역별 데이터
|
-- 세부 지역별 데이터
|
||||||
SELECT
|
WITH detail_region AS (
|
||||||
detail_uicode.code_text AS region_detail_name,
|
SELECT *
|
||||||
parent_uicode.code_text AS region_name,
|
FROM uicode
|
||||||
COUNT(DISTINCT rhh.household_seq) AS household_count,
|
WHERE id LIKE 'code.region.detail.%'
|
||||||
|
AND is_deleted = false
|
||||||
|
),
|
||||||
|
sub_region AS (
|
||||||
|
SELECT *
|
||||||
|
FROM uicode
|
||||||
|
WHERE parent_id = 'code.region.sub'
|
||||||
|
AND is_deleted = false
|
||||||
|
),
|
||||||
|
main_region AS (
|
||||||
|
SELECT *
|
||||||
|
FROM uicode
|
||||||
|
WHERE parent_id = 'code.region.main'
|
||||||
|
AND is_deleted = false
|
||||||
|
),
|
||||||
|
-- 지역별 통계 + 전체합계
|
||||||
|
region_stats AS (
|
||||||
|
SELECT
|
||||||
|
COALESCE(main.code_text, '-') AS region_main_name,
|
||||||
|
COALESCE(detail.code_text, '-') AS region_detail_name,
|
||||||
|
COUNT(DISTINCT h.seq) AS household_count,
|
||||||
CASE
|
CASE
|
||||||
WHEN AVG(v.current_completion_rate) > 0 THEN ROUND(AVG(v.current_completion_rate), 1)
|
WHEN COALESCE(AVG(v.current_completion_rate), 0) > 0
|
||||||
ELSE 0
|
THEN ROUND(COALESCE(AVG(v.current_completion_rate), 0), 1)
|
||||||
END AS avg_completion_rate,
|
ELSE 0
|
||||||
COUNT(DISTINCT hv_visit.household_seq) AS visit_count,
|
END AS avg_completion_rate,
|
||||||
COUNT(DISTINCT hv_gift.household_seq) AS gift_sent_count,
|
COUNT(DISTINCT CASE WHEN hv.id IS NOT NULL THEN hv.household_seq END) AS visit_count,
|
||||||
parent_uicode.order_no AS region_order,
|
COUNT(DISTINCT CASE WHEN hv.is_gift_sent = true THEN hv.household_seq END) AS gift_sent_count,
|
||||||
detail_uicode.order_no AS region_detail_order
|
COALESCE(main.order_no, 9999) AS main_order,
|
||||||
FROM uicode detail_uicode
|
COALESCE(sub.order_no, 9999) AS sub_order,
|
||||||
LEFT JOIN uicode parent_uicode ON parent_uicode.id = detail_uicode.parent_id
|
COALESCE(detail.order_no, 9999) AS detail_order
|
||||||
LEFT JOIN household h
|
FROM detail_region detail
|
||||||
ON h.region_detail_code = detail_uicode.id
|
INNER JOIN household h
|
||||||
AND h.is_deleted = false
|
ON h.region_detail_code = detail.id
|
||||||
AND h.is_panel = true
|
AND h.is_deleted = false
|
||||||
LEFT JOIN researcher_has_household rhh
|
AND h.is_panel = true
|
||||||
ON rhh.household_seq = h.seq
|
LEFT JOIN main_region main
|
||||||
AND rhh.is_deleted = false
|
ON main.id = h.region_main_code
|
||||||
LEFT JOIN v_monthly_completion_rate v
|
LEFT JOIN sub_region sub
|
||||||
ON v.household_seq = h.seq
|
ON sub.id = h.region_sub_code
|
||||||
AND v.record_month = #{recordMonth}
|
LEFT JOIN household_visit hv
|
||||||
LEFT JOIN household_visit hv_visit
|
ON hv.household_seq = h.seq
|
||||||
ON hv_visit.household_seq = h.seq
|
AND hv.is_deleted = false
|
||||||
AND hv_visit.is_deleted = false
|
AND TO_CHAR(hv.visit_date, 'YYYYMM') = #{recordMonth}
|
||||||
AND TO_CHAR(hv_visit.visit_date, 'YYYYMM') = #{recordMonth}
|
LEFT JOIN v_monthly_completion_rate v
|
||||||
LEFT JOIN household_visit hv_gift
|
ON v.household_seq = h.seq
|
||||||
ON hv_gift.household_seq = h.seq
|
AND v.record_month = #{recordMonth}
|
||||||
AND hv_gift.is_deleted = false
|
<if test="'prod'.equals(activeProfiles)">
|
||||||
AND hv_gift.is_gift_sent = true
|
WHERE main.in_use IS DISTINCT FROM false
|
||||||
AND TO_CHAR(hv_gift.visit_date, 'YYYYMM') = #{recordMonth}
|
</if>
|
||||||
WHERE detail_uicode.id LIKE 'code.region.detail.%'
|
GROUP BY
|
||||||
GROUP BY
|
main.code_text, main.order_no,
|
||||||
detail_uicode.code_text,
|
sub.order_no,
|
||||||
parent_uicode.code_text,
|
detail.code_text, detail.order_no
|
||||||
parent_uicode.order_no,
|
UNION ALL
|
||||||
detail_uicode.order_no
|
SELECT
|
||||||
UNION ALL
|
'전체' AS region_main_name,
|
||||||
-- 전체 합계 행
|
|
||||||
SELECT
|
|
||||||
'전체' AS region_detail_name,
|
'전체' AS region_detail_name,
|
||||||
'전체' AS region_name,
|
COUNT(DISTINCT h.seq),
|
||||||
COUNT(DISTINCT rhh.household_seq) AS household_count,
|
CASE
|
||||||
COALESCE(ROUND(AVG(v.current_completion_rate), 1), 0),
|
WHEN COALESCE(AVG(v.current_completion_rate), 0) > 0
|
||||||
COUNT(DISTINCT hv_visit.household_seq),
|
THEN ROUND(COALESCE(AVG(v.current_completion_rate), 0), 1)
|
||||||
COUNT(DISTINCT hv_gift.household_seq),
|
ELSE 0
|
||||||
-1 AS region_order,
|
END,
|
||||||
-1 AS region_detail_order
|
COUNT(DISTINCT CASE WHEN hv.id IS NOT NULL THEN hv.household_seq END),
|
||||||
FROM household h
|
COUNT(DISTINCT CASE WHEN hv.is_gift_sent = true THEN hv.household_seq END),
|
||||||
LEFT JOIN researcher_has_household rhh
|
-1 AS main_order, -- 전체합계가 맨 위로 오도록
|
||||||
ON rhh.household_seq = h.seq
|
-1 AS sub_order,
|
||||||
AND rhh.is_deleted = false
|
-1 AS detail_order
|
||||||
LEFT JOIN v_monthly_completion_rate v
|
FROM household h
|
||||||
ON v.household_seq = h.seq
|
LEFT JOIN main_region main
|
||||||
AND v.record_month = #{recordMonth}
|
ON main.id = h.region_main_code
|
||||||
LEFT JOIN household_visit hv_visit
|
LEFT JOIN sub_region sub
|
||||||
ON hv_visit.household_seq = h.seq
|
ON sub.id = h.region_sub_code
|
||||||
AND hv_visit.is_deleted = false
|
LEFT JOIN household_visit hv
|
||||||
AND TO_CHAR(hv_visit.visit_date, 'YYYYMM') = #{recordMonth}
|
ON hv.household_seq = h.seq
|
||||||
LEFT JOIN household_visit hv_gift
|
AND hv.is_deleted = false
|
||||||
ON hv_gift.household_seq = h.seq
|
AND TO_CHAR(hv.visit_date, 'YYYYMM') = #{recordMonth}
|
||||||
AND hv_gift.is_deleted = false
|
LEFT JOIN v_monthly_completion_rate v
|
||||||
AND hv_gift.is_gift_sent = true
|
ON v.household_seq = h.seq
|
||||||
AND TO_CHAR(hv_gift.visit_date, 'YYYYMM') = #{recordMonth}
|
AND v.record_month = #{recordMonth}
|
||||||
WHERE h.is_deleted = false AND h.is_panel = true
|
WHERE h.is_deleted = false
|
||||||
order by
|
AND h.is_panel = true
|
||||||
region_order ASC,
|
<if test="'prod'.equals(activeProfiles)">
|
||||||
region_detail_order ASC
|
AND main.in_use IS DISTINCT FROM false
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
SELECT *
|
||||||
|
FROM region_stats
|
||||||
|
ORDER BY main_order, sub_order, detail_order
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -90,6 +90,11 @@
|
|||||||
<where>
|
<where>
|
||||||
1=1
|
1=1
|
||||||
|
|
||||||
|
<if test="cmd.householdNum != null and cmd.householdNum != ''">
|
||||||
|
/* 임가번호 검색 */
|
||||||
|
AND hvr.householdNum ILIKE '%' || #{cmd.householdNum} || '%'
|
||||||
|
</if>
|
||||||
|
|
||||||
<if test="cmd.ownerValue != null and cmd.ownerValue != ''">
|
<if test="cmd.ownerValue != null and cmd.ownerValue != ''">
|
||||||
/* 경영주 검색 */
|
/* 경영주 검색 */
|
||||||
<choose>
|
<choose>
|
||||||
|
|||||||
@@ -312,6 +312,7 @@
|
|||||||
dw.work_name ,
|
dw.work_name ,
|
||||||
dw.work_mark ,
|
dw.work_mark ,
|
||||||
dw.work_land_area ,
|
dw.work_land_area ,
|
||||||
|
dw.area_mark ,
|
||||||
case when dw.area_unit_code = 'code.record.area.self' then dw.area_unit_self
|
case when dw.area_unit_code = 'code.record.area.self' then dw.area_unit_self
|
||||||
else unit_code.code_value end as area_unit_name,
|
else unit_code.code_value end as area_unit_name,
|
||||||
dw.harvest_quantity ,
|
dw.harvest_quantity ,
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -19,6 +19,15 @@
|
|||||||
<option value="PAPER">지류</option>
|
<option value="PAPER">지류</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="component-select">
|
||||||
|
<select class="select-list" id="recordMonth" name="recordMonth" required>
|
||||||
|
<option th:each="month : ${monthList}"
|
||||||
|
th:value="${month.value}"
|
||||||
|
th:text="${month.label}"
|
||||||
|
th:selected="${month.value == currentMonth}">
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -414,6 +423,10 @@
|
|||||||
$('#regionMainCode').change(function() {
|
$('#regionMainCode').change(function() {
|
||||||
getResearcherArea();
|
getResearcherArea();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#recordMonth').change(function() {
|
||||||
|
getTotalPercentage();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
@@ -459,7 +472,9 @@
|
|||||||
|
|
||||||
// 엑셀 다운로드
|
// 엑셀 다운로드
|
||||||
const goExcel = () => {
|
const goExcel = () => {
|
||||||
excelDownload('/api/dashboard/chart/excel', null);
|
const f = document.reqForm;
|
||||||
|
const data = $(f).serializeObject();
|
||||||
|
excelDownload('/api/dashboard/chart/excel', data);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -31,6 +31,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 임가번호 -->
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-label">
|
||||||
|
<p class="label-txt">
|
||||||
|
임가번호
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="component-input">
|
||||||
|
<div class="input-field">
|
||||||
|
<input type="text" id="householdNum" name="householdNum" th:field="*{householdNum}" placeholder="임가번호 입력">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 경영주 -->
|
<!-- 경영주 -->
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-label">
|
<div class="input-label">
|
||||||
|
|||||||
@@ -40,13 +40,12 @@ public final class DailyRecordConstants {
|
|||||||
* [정책] 해당월 15일까지는 이전달 데이터 등록 가능
|
* [정책] 해당월 15일까지는 이전달 데이터 등록 가능
|
||||||
* 이전 달을 의미하는 상수
|
* 이전 달을 의미하는 상수
|
||||||
*/
|
*/
|
||||||
public static final int REGISTER_LIMIT_MONTH = 3;
|
public static final int REGISTER_LIMIT_MONTH = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 일계부 등록 가능 일
|
* 일계부 등록 가능 일
|
||||||
* [정책] 해당월 15일까지는 이전달 데이터 등록 가능
|
* [정책] 해당월 15일까지는 이전달 데이터 등록 가능
|
||||||
* 날짜 기준 정책
|
* 날짜 기준 정책
|
||||||
* 임시로 31일로 설정해둠 15일로 변경해야됨.
|
|
||||||
*/
|
*/
|
||||||
public static final int REGISTER_LIMIT_DAY = 31;
|
public static final int REGISTER_LIMIT_DAY = 31;
|
||||||
|
|
||||||
@@ -55,13 +54,12 @@ public final class DailyRecordConstants {
|
|||||||
* [정책] 해당월 15일까지는 이전달 데이터 수정 가능
|
* [정책] 해당월 15일까지는 이전달 데이터 수정 가능
|
||||||
* 이전 달을 의미하는 상수
|
* 이전 달을 의미하는 상수
|
||||||
*/
|
*/
|
||||||
public static final int MODIFY_LIMIT_MONTH = 3;
|
public static final int MODIFY_LIMIT_MONTH = 4;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 일계부 수정 가능 일
|
* 일계부 수정 가능 일
|
||||||
* [정책] 해당월 15일까지는 이전달 데이터 수정 가능
|
* [정책] 해당월 15일까지는 이전달 데이터 수정 가능
|
||||||
* 날짜 기준 정책
|
* 날짜 기준 정책
|
||||||
* 임시로 31일로 설정해둠 15일로 변경해야됨.
|
|
||||||
*/
|
*/
|
||||||
public static final int MODIFY_LIMIT_DAY = 31;
|
public static final int MODIFY_LIMIT_DAY = 31;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<name>front</name>
|
<name>front</name>
|
||||||
<description>Front project</description>
|
<description>Front project</description>
|
||||||
<packaging>${packaging.type}</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"depth1": "프로젝트명",
|
"depth1": "KRI 임가경제조사 일계부 구축",
|
||||||
"subDepth": [
|
"subDepth": [
|
||||||
{
|
{
|
||||||
"depth2": "작업 현황판",
|
"depth2": "작업 현황판",
|
||||||
@@ -125,71 +125,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"depth1": "Template",
|
|
||||||
"subDepth": [
|
|
||||||
{
|
|
||||||
"depth2": "메일 기본 템플릿",
|
|
||||||
"link": "../../pages/mailform/mailform_template01",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"depth2": "메일 템플릿 샘플01",
|
|
||||||
"link": "../../pages/mailform/mailform_sample01",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"depth2": "메일 템플릿 샘플02",
|
|
||||||
"link": "../../pages/mailform/mailform_sample02",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"depth2": "메일 템플릿 샘플03",
|
|
||||||
"link": "../../pages/mailform/mailform_sample03",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"depth2": "메일 템플릿 샘플04",
|
|
||||||
"link": "../../pages/mailform/mailform_sample04",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"depth2": "메일 템플릿 샘플05",
|
|
||||||
"link": "../../pages/mailform/mailform_sample05",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"depth2": "메일 템플릿 샘플06",
|
|
||||||
"link": "../../pages/mailform/mailform_sample06",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"depth2": "메일 템플릿 샘플07",
|
|
||||||
"link": "../../pages/mailform/mailform_sample07",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"depth2": "메일 템플릿 샘플08",
|
|
||||||
"link": "../../pages/mailform/mailform_sample08",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"depth2": "메일 템플릿 샘플09",
|
|
||||||
"link": "../../pages/mailform/mailform_sample09",
|
|
||||||
"status": "",
|
|
||||||
"newTab": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"depth1": "Convention",
|
"depth1": "Convention",
|
||||||
"subDepth": [
|
"subDepth": [
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -21,7 +21,7 @@
|
|||||||
<input id="go" type="button" value="Query"/> -->
|
<input id="go" type="button" value="Query"/> -->
|
||||||
<div class="cl-info-area">
|
<div class="cl-info-area">
|
||||||
<h1 class="project-tit">
|
<h1 class="project-tit">
|
||||||
KRI 임가경제조사 모바일 홈페이지 개발.
|
KRI 임가경제조사 모바일 홈페이지 개발
|
||||||
<a href="스크립트로링크삽입" class="cp-google-link" target="_blank" title="Google Sheet"> G </a>
|
<a href="스크립트로링크삽입" class="cp-google-link" target="_blank" title="Google Sheet"> G </a>
|
||||||
<a href="http://uxdev.etribe.co.kr/uxdevLinkFolder/cl.html" class="cp-uxdev-link" target="_blank" title="UX-DEV"> D </a>
|
<a href="http://uxdev.etribe.co.kr/uxdevLinkFolder/cl.html" class="cp-uxdev-link" target="_blank" title="UX-DEV"> D </a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -49,31 +49,39 @@
|
|||||||
|
|
||||||
<main class="uid-main">
|
<main class="uid-main">
|
||||||
<h1 class="uid-title01">프로젝트 가이드</h1>
|
<h1 class="uid-title01">프로젝트 가이드</h1>
|
||||||
<p class="uid-desc">컴포넌트 모음</p>
|
<!-- <p class="uid-desc">컴포넌트 모음</p> -->
|
||||||
|
|
||||||
<section class="uid-component">
|
<section class="uid-component">
|
||||||
<h2 class="uid-title02 bold">안내 From 그룹장</h2>
|
<h2 class="uid-title02">기본 정보</h2>
|
||||||
|
|
||||||
<div class="from-warchief">
|
|
||||||
아래 가이드의 모든 규칙은 현장의 PL 의 그라운드 룰이 우선 이며 모든 규칙은 개발과의 협의와 회의를 통해서 정하셔야 합니다.
|
|
||||||
<br />
|
|
||||||
아래 예제에 사용 하는 실제 데이타를 넣으시면 됨니다! 아래 문서는 안내 From 그룹장 부분을 제거 하시고 산출물로 대체 할수 있습니다.
|
|
||||||
<br />
|
|
||||||
형제 자매님들 오늘도 무탈한 하루가 되길 빕니다!
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="uid-component">
|
|
||||||
<h2 class="uid-title02">기본 가이드 - 리스트 타입</h2>
|
|
||||||
<ul class="uid-list">
|
<ul class="uid-list">
|
||||||
<li>기본 가이드를 프로젝트에 맞게 작성 합니다.</li>
|
<li>코리아리서치 임가경제조사 일계부 모바일웹 구축</li>
|
||||||
|
<li>대응 디바이스 : IOS, AOS 모바일웹</li>
|
||||||
|
<li>대응 해상도 : 기본 390px, 최소 360px</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="uid-component">
|
<section class="uid-component">
|
||||||
<h2 class="uid-title02">기본 가이드 - 리스트 타입</h2>
|
<h2 class="uid-title02">일계부 내 캘린더 UI개발 관련 협의 내용</h2>
|
||||||
<ul class="uid-list">
|
<ul class="uid-list">
|
||||||
<li>기본 가이드를 프로젝트에 맞게 작성 합니다.</li>
|
<li>월과 주 단위를 토글 형태로 제공</li>
|
||||||
|
<li>월 단위
|
||||||
|
<ul class="uid-list02">
|
||||||
|
<li>→ 기본 월력</li>
|
||||||
|
<li>→ 1일~ 21일 : 이틀 씩 그룹핑, 7일, 14일, 21일 은 단독</li>
|
||||||
|
<li>→ 22일 이후는 이틀 씩 그룹핑(월의 마지막 날은 단독일 수 있음)</li>
|
||||||
|
<li>→ ‘오늘’ 기준 미래 시점은 disabled</li>
|
||||||
|
<li>→ 이전 월 이동 시 기본 선택 일은 [ 1 , 2 ]</li>
|
||||||
|
<li>→ 선택한 날짜 또는 기간에 해당하는 목록 노출</li>
|
||||||
|
<li>→ 일계부 등록 유무에 따른 시각적 인지 필요</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>주 단위
|
||||||
|
<ul class="uid-list02">
|
||||||
|
<li>→ 일주일 단위로 노출</li>
|
||||||
|
<li>→ 주력의 시작 일은 1일 부터 7일간 표기(요일 표기가 변경됨)</li>
|
||||||
|
<li>→ 실제 노출은 현재 일이 포함 된 주</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -234,8 +242,24 @@
|
|||||||
<td>컴포넌트 파일 폴더</td>
|
<td>컴포넌트 파일 폴더</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>pages/main</td>
|
<td>pages/COMM</td>
|
||||||
<td>메인 파일 폴더</td>
|
<td>로그인, 푸터메뉴, 이용안내, 에러페이지등 공통 파일 폴더</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pages/ACCO</td>
|
||||||
|
<td>일계부 화면 파일 폴더</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pages/REGI</td>
|
||||||
|
<td>입력현황 화면 파일 폴더</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pages/GUID</td>
|
||||||
|
<td>이용안내 화면 파일 폴더</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>pages/INFO</td>
|
||||||
|
<td>내정보 화면 파일 폴더</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -250,35 +274,35 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/styles/abstracts</td>
|
<td>assets/styles/abstracts</td>
|
||||||
<td> 글로벌 변수, 함수, 믹스인 및 플레이스홀더 등을 포함합니다. </td>
|
<td> 글로벌 변수, 함수, 믹스인 및 플레이스홀더 등</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/styles/base</td>
|
<td>assets/styles/base</td>
|
||||||
<td> 프로젝트의 기본적인 스타일 설정을 포함합니다. 여기에는 HTML 요소(예: h1, p, a)에 대한 기본 스타일이 포함됩니다. </td>
|
<td> 프로젝트의 기본적인 스타일 설정</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/styles/utilities</td>
|
<td>assets/styles/utilities</td>
|
||||||
<td> 유틸리티 클래스를 포함하며, 이들은 프로젝트 전체에서 공통적으로 사용됩니다. </td>
|
<td> 유틸리티 클래스를 포함하며, 이들은 프로젝트 전체에서 공통적으로 사용</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/styles/components</td>
|
<td>assets/styles/components</td>
|
||||||
<td>재사용 가능한 UI 컴포넌트의 스타일을 정의합니다.</td>
|
<td>재사용 가능한 UI 컴포넌트의 스타일을 정의</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/styles/layout</td>
|
<td>assets/styles/layout</td>
|
||||||
<td> 사이트 또는 애플리케이션의 레이아웃 관련 스타일을 정의합니다 (예: 헤더, 푸터, 사이드바). </td>
|
<td> 사이트 또는 애플리케이션의 레이아웃 관련 스타일을 정의 (예: 헤더, 푸터, 사이드바)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/styles/pages</td>
|
<td>assets/styles/pages</td>
|
||||||
<td>특정 페이지에 특화된 스타일을 정의합니다.</td>
|
<td>특정 페이지에 특화된 스타일을 정의</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/styles/themes</td>
|
<td>assets/styles/themes</td>
|
||||||
<td>다양한 테마 또는 스킨에 대한 스타일을 포함합니다.</td>
|
<td>다양한 테마 또는 스킨에 대한 스타일을 포함</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/styles/vendors</td>
|
<td>assets/styles/vendors</td>
|
||||||
<td> 서드파티 라이브러리 및 프레임워크의 오버라이드 및 커스텀 스타일을 포함합니다. </td>
|
<td>서드파티 라이브러리 및 프레임워크의 오버라이드 및 커스텀 스타일을 포함</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -292,20 +316,16 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/common</td>
|
<td>assets/script/lib</td>
|
||||||
<td>-</td>
|
<td>컴포넌트 관련 라이브러리 폴더</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/uiComp</td>
|
<td>assets/script/ui</td>
|
||||||
<td>-</td>
|
<td>ui관련 컴포넌트, 템플릿, 유틸리티를 포함하며, 이들은 프로젝트 전체에서 공통적으로 사용</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/pageComp</td>
|
<td>assets/script/</td>
|
||||||
<td>-</td>
|
<td>init.js, common.js</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>assets/lib</td>
|
|
||||||
<td>-</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -319,8 +339,24 @@
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>assets/images</td>
|
<td>assets/images/common</td>
|
||||||
<td>-</td>
|
<td>공통으로 사용하는 icon, bullet, img 등</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assets/images/acco</td>
|
||||||
|
<td>일계부 화면 이미지 폴더</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assets/images/comm</td>
|
||||||
|
<td>공통 화면 이미지 폴더</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assets/images/guide</td>
|
||||||
|
<td>이용안내 화면 이미지 폴더</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>assets/images/info</td>
|
||||||
|
<td>내정보 화면 이미지 폴더</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -348,3 +348,12 @@ kri.form.setSelectBoxUiCode = function({
|
|||||||
getChildValue: () => childSelectUI?.getValue() ?? ''
|
getChildValue: () => childSelectUI?.getValue() ?? ''
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(window).off('hashchange.modalClose').on('hashchange.modalClose', function() {
|
||||||
|
if (window.location.hash !== '#modal-open') {
|
||||||
|
const modal01 = document.querySelector(ENV.modal.selector)?.ui;
|
||||||
|
if (modal01) {
|
||||||
|
modal01.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -127,8 +127,11 @@ krip.daily.createModal = function(id) {
|
|||||||
|
|
||||||
const modal01 = document.querySelector(ENV.modal.selector).ui;
|
const modal01 = document.querySelector(ENV.modal.selector).ui;
|
||||||
modal01.open();
|
modal01.open();
|
||||||
|
// URL 해시 추가
|
||||||
|
window.location.hash = 'modal-open';
|
||||||
|
|
||||||
modalControl._bindModelUI();
|
modalControl._bindModelUI();
|
||||||
|
|
||||||
},
|
},
|
||||||
function(code, rstData) {
|
function(code, rstData) {
|
||||||
kri.logger.error('Do nothing. code: '+ code, rstData);
|
kri.logger.error('Do nothing. code: '+ code, rstData);
|
||||||
|
|||||||
@@ -69,39 +69,59 @@
|
|||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<!-- 모달 팝업 -->
|
||||||
<div th:replace="guide/modal/modal-mobile-guide:: modalFragment"></div>
|
<div th:replace="guide/modal/modal-mobile-guide:: modalFragment"></div>
|
||||||
<div th:replace="guide/modal/modal-industry-type:: modalFragment"></div>
|
<div th:replace="guide/modal/modal-industry-type:: modalFragment"></div>
|
||||||
<div th:replace="guide/modal/modal-forest-diff:: modalFragment"></div>
|
<div th:replace="guide/modal/modal-forest-diff:: modalFragment"></div>
|
||||||
<div th:replace="guide/modal/modal-usage-type:: modalFragment"></div>
|
<div th:replace="guide/modal/modal-usage-type:: modalFragment"></div>
|
||||||
<div th:replace="guide/modal/modal-contact:: modalFragment"></div>
|
<div th:replace="guide/modal/modal-contact:: modalFragment"></div>
|
||||||
|
<!-- //모달 팝업 -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- 모달 팝업 -->
|
|
||||||
|
|
||||||
<!-- //모달 팝업 -->
|
|
||||||
<section layout:fragment="script">
|
<section layout:fragment="script">
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
|
let currentModal = null;
|
||||||
|
|
||||||
function goMobileGuide(){
|
function goMobileGuide(){
|
||||||
const modal = document.querySelector(".mobileGuide");
|
const modal = document.querySelector(".mobileGuide");
|
||||||
modal.ui.open();
|
openModal(modal, "mobileGuide");
|
||||||
}
|
}
|
||||||
function goIndustryType(){
|
function goIndustryType(){
|
||||||
const modal = document.querySelector(".industryType");
|
const modal = document.querySelector(".industryType");
|
||||||
modal.ui.open();
|
openModal(modal, "industryType");
|
||||||
}
|
}
|
||||||
function goForestDiff(){
|
function goForestDiff(){
|
||||||
const modal = document.querySelector(".forestDiff");
|
const modal = document.querySelector(".forestDiff");
|
||||||
modal.ui.open();
|
openModal(modal, "forestDiff");
|
||||||
}
|
}
|
||||||
function goUsageType(){
|
function goUsageType(){
|
||||||
const modal = document.querySelector(".usageType");
|
const modal = document.querySelector(".usageType");
|
||||||
modal.ui.open();
|
openModal(modal, "usageType");
|
||||||
}
|
}
|
||||||
function goContact(){
|
function goContact(){
|
||||||
const modal = document.querySelector(".contact");
|
const modal = document.querySelector(".contact");
|
||||||
modal.ui.open();
|
openModal(modal, "contact");
|
||||||
}
|
}
|
||||||
|
function openModal(modal, modalId) {
|
||||||
|
if (currentModal && currentModal !== modal) {
|
||||||
|
currentModal.ui.close(); // 기존 모달 닫기
|
||||||
|
}
|
||||||
|
modal.ui.open();
|
||||||
|
modal.dataset.state = "open";
|
||||||
|
currentModal = modal;
|
||||||
|
window.history.pushState({ modal: modalId }, null, "");
|
||||||
|
}
|
||||||
|
// 뒤로 가기 이벤트 처리
|
||||||
|
window.addEventListener("popstate", function () {
|
||||||
|
if (currentModal && currentModal.dataset.state === "open") {
|
||||||
|
currentModal.ui.close();
|
||||||
|
currentModal.dataset.state = "close";
|
||||||
|
currentModal = null;
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</section>
|
</section>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -104,6 +104,10 @@
|
|||||||
module: {
|
module: {
|
||||||
modalPopup: null
|
modalPopup: null
|
||||||
},
|
},
|
||||||
|
modal: {
|
||||||
|
// 등록 영역
|
||||||
|
selector: '.addPopup',
|
||||||
|
},
|
||||||
data: {
|
data: {
|
||||||
transferCategoryCodeList: /*[[${transferCategoryList}]]*/ [],
|
transferCategoryCodeList: /*[[${transferCategoryList}]]*/ [],
|
||||||
codeRecordCropList: /*[[${codeRecordCropList}]]*/ [],
|
codeRecordCropList: /*[[${codeRecordCropList}]]*/ [],
|
||||||
@@ -317,6 +321,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
ENV.module.modalPopup.open();
|
ENV.module.modalPopup.open();
|
||||||
|
window.location.hash = 'modal-open';
|
||||||
|
|
||||||
document.querySelector('.modal-content').scrollTop = 0;
|
document.querySelector('.modal-content').scrollTop = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,10 @@
|
|||||||
module: {
|
module: {
|
||||||
modalPopup: null
|
modalPopup: null
|
||||||
},
|
},
|
||||||
|
modal: {
|
||||||
|
// 등록 영역
|
||||||
|
selector: '.addPopup',
|
||||||
|
},
|
||||||
data: {
|
data: {
|
||||||
transferCategoryCodeList: /*[[${transferCategoryList}]]*/ [],
|
transferCategoryCodeList: /*[[${transferCategoryList}]]*/ [],
|
||||||
codeRecordCropList: /*[[${codeRecordCropList}]]*/ [],
|
codeRecordCropList: /*[[${codeRecordCropList}]]*/ [],
|
||||||
@@ -307,6 +311,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
ENV.module.modalPopup.open();
|
ENV.module.modalPopup.open();
|
||||||
|
window.location.hash = 'modal-open';
|
||||||
document.querySelector('.modal-content').scrollTop = 0;
|
document.querySelector('.modal-content').scrollTop = 0;
|
||||||
|
|
||||||
// 모두 로드된 후 콜백 실행
|
// 모두 로드된 후 콜백 실행
|
||||||
|
|||||||
@@ -108,7 +108,10 @@
|
|||||||
module: {
|
module: {
|
||||||
modalPopup: null
|
modalPopup: null
|
||||||
},
|
},
|
||||||
|
modal: {
|
||||||
|
// 등록 영역
|
||||||
|
selector: '.addPopup',
|
||||||
|
},
|
||||||
data: {
|
data: {
|
||||||
purposeList: /*[[${purposeList}]]*/ [],
|
purposeList: /*[[${purposeList}]]*/ [],
|
||||||
unitList: /*[[${unitList}]]*/ [],
|
unitList: /*[[${unitList}]]*/ [],
|
||||||
@@ -341,6 +344,7 @@
|
|||||||
|
|
||||||
|
|
||||||
ENV.module.modalPopup.open();
|
ENV.module.modalPopup.open();
|
||||||
|
window.location.hash = 'modal-open';
|
||||||
|
|
||||||
document.querySelector('.modal-content').scrollTop = 0;
|
document.querySelector('.modal-content').scrollTop = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -152,6 +152,7 @@
|
|||||||
|
|
||||||
const modal01 = document.querySelector(ENV.modal.selector).ui;
|
const modal01 = document.querySelector(ENV.modal.selector).ui;
|
||||||
modal01.open();
|
modal01.open();
|
||||||
|
window.location.hash = 'modal-open';
|
||||||
},
|
},
|
||||||
function(code, rstData) {
|
function(code, rstData) {
|
||||||
kri.logger.error('Do nothing. code: '+ code, rstData);
|
kri.logger.error('Do nothing. code: '+ code, rstData);
|
||||||
|
|||||||
Reference in New Issue
Block a user