Merge pull request 'kurt/kurt' (#29) from kurt/kurt into dev

Reviewed-on: http://211.119.124.110:3000/cjm/clean-parking/pulls/29
krc/receipt_waiting
cjm 2 weeks ago
commit 8f1cfd02b3

@ -17,7 +17,7 @@ public class CommonContorller {
private final CommonService commonService;
/**
*
* , ,
*/
@GetMapping("/common/code/find.ajax")
public ResponseEntity<?> getCode(@ModelAttribute CommonDto.Request commonDto) {
@ -28,6 +28,7 @@ public class CommonContorller {
return ResponseEntity.ok(result);
}
/**
*
*/

@ -1,8 +1,7 @@
package go.kr.project.biz.common.dto;
import go.kr.project.domain.entity.CpBdong;
import go.kr.project.domain.entity.CpViolation;
import go.kr.project.vo.CpBdongVO;
import go.kr.project.vo.CpCancelAnswerVO;
import go.kr.project.vo.CpViolationVO;
import lombok.Builder;
import lombok.Getter;
@ -37,6 +36,7 @@ public class CommonDto {
public static class CodeResult {
private List<CpViolationVO> cpViolation;
private List<CpBdongVO> cpBdong;
private List<CpCancelAnswerVO> cpCancelAnswer;
}

@ -6,6 +6,7 @@ import go.kr.project.biz.common.dto.CommonDto;
import go.kr.project.domain.entity.CpBdong;
import go.kr.project.domain.entity.CpViolation;
import go.kr.project.vo.CpBdongVO;
import go.kr.project.vo.CpCancelAnswerVO;
import go.kr.project.vo.CpViolationVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Repository;
@ -13,6 +14,7 @@ import org.springframework.stereotype.Repository;
import java.util.List;
import static go.kr.project.domain.entity.QCpBdong.cpBdong;
import static go.kr.project.domain.entity.QCpCancelAnswer.cpCancelAnswer;
import static go.kr.project.domain.entity.QCpViolation.cpViolation;
@Repository
@ -74,6 +76,27 @@ public class CommonRepository {
return result;
}
public List<CpCancelAnswerVO> findCancelAnswerCode(CommonDto.Request commonDto) {
commonDto.setSggCode("41590");
List<CpCancelAnswerVO> result = queryFactory
.select(
Projections.fields(
CpCancelAnswerVO.class,
cpCancelAnswer.id.caSggCode,
cpCancelAnswer.id.caCode,
cpCancelAnswer.caId,
cpCancelAnswer.caAnswerText,
cpCancelAnswer.caIsAnswer
)
)
.from(cpCancelAnswer)
.where(cpCancelAnswer.id.caSggCode.eq(commonDto.getSggCode()))
.fetch();
return result;
}

@ -7,4 +7,5 @@ import java.util.List;
public interface CommonService {
CommonDto.Response.CodeResult findCode(CommonDto.Request commonDto);
}

@ -24,11 +24,11 @@ public class CommonServiceImpl implements CommonService {
return CommonDto.Response.CodeResult.builder()
.cpViolation(commonRepository.findViolationCode(commonDto))
.cpBdong(commonRepository.findBdongCode())
.cpCancelAnswer(commonRepository.findCancelAnswerCode(commonDto))
.build();
}
}

@ -0,0 +1,17 @@
package go.kr.project.vo;
import lombok.*;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CpCancelAnswerVO {
private String caSggCode;
private String caCode;
private String caId;
private String caIsAnswer;
private String caAnswerText;
}

@ -18,6 +18,8 @@ public interface EntityVoMapper {
CpCancelVO toCpCancelVO(CpCancel entity);
CpCancelAnswerVO toCpCancelAnswerVO(CpCancelAnswer entity);
CpGojiPrtVO toCpGojiPrtVO(CpGojiPrt entity);
CpGojiSendHistVO toCpGojiSendHistVO(CpGojiSendHist entity);

@ -0,0 +1,136 @@
<%--
Created by IntelliJ IDEA.
User: kurt
Date: 2025. 11. 28.
Time: 오후 1:46
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div id="destruction_doc_dialog" style="display:none;">
<div class="left">
<div class="form-grid">
<!-- 1줄 -->
<div class="form-row">
<div class="field-group">
<div class="lbl">처리사유</div>
<div class="fld">
<select name="cpCancelAnswer" id="cpCancelAnswer">
<option value=""></option>
</select>
</div>
</div>
<div class="field-group empty"></div>
</div>
<!-- 2줄 -->
<div class="form-row">
<div class="field-group">
<div class="lbl">처리일자</div>
<div class="fld">
<input type="text" id="desDate" name="desDate" class="input calender datepicker" />
</div>
</div>
<div class="field-group empty"></div>
</div>
<!-- 3줄 -->
<div class="form-row block">
<div class="field-group">
<div class="lbl">특기사항</div>
<div class="fld">
<input type="text" name="cpMain" data-field="mmDlgb" id="mmDlgb" value="">
</div>
</div>
</div>
</div>
</div>
<div class="disdoc-btn-area">
<button type="button" class="btn btn-light disdoc-btn" name="" id="dis-doc">미부과처리</button>
</div>
</div>
<script type="text/javascript">
let fnDesDocFn = {
init: () => {
},
updateDestructionDoc: () => {
$.ajax({
url: "",
type: "post",
contentType: 'application/json',
success: function(response) {
//다이얼로그 하이드
//네이게이팅 다음으로
//로컬스토리지 mmCodes에 해당 mmCode 제거
},
error: function(xhr, status, error) {
$("#result").text("서손처리 실패");
}
});
},
eventListener: () => {
$("#dis-doc").on("click", () => {
fnDesDocFn.updateDestructionDoc();
})
}
}
$(function () {
/* 다이얼로그 설정 */
$("#destruction_doc_dialog").dialog({
autoOpen: false,
modal: true,
resizable: true,
// width: "auto",
width: 1000,
maxHeight: 800,
show: { effect: "drop", direction: "left", duration: 200 },
hide: { effect: "drop", direction: "left", duration: 200 },
title: "서손처리",
open: function () {
}
});
/* 오늘날짜 기본세팅 */
$('#desDate').datepicker('setDate', new Date());
});
</script>

@ -26,8 +26,7 @@
<input type="hidden" id="mmCodes" />
<%-- 부모창에서 받아오는 리스크 커서 --%>
<input type="hidden" id="cursor" />
<%-- 개별총정보 상태값 --%>
<input type="hidden" id="infoState" value="init" />
<div class="page-indicator">
<span id="cursorCnt">0</span>of <span id="total">0</span>
@ -154,7 +153,9 @@
<div class="field-group">
<div class="lbl">법정동</div>
<div class="fld">
<input type="text" name="cpAnswer" data-field="asJsno" id="asJsno" value="" readonly>
<select name="cpMain" id="mmDdcode">
<option value=""></option>
</select>
</div>
</div>
</div>
@ -195,7 +196,7 @@
<div class="field-group full">
<div class="lbl">특기사항</div>
<div class="fld">
<textarea name="cpMain" data-field="mmSgcont" id="mmSgcont" value="" readonly></textarea>
<textarea name="cpMain" data-field="mmSgcont" id="mmSgcont" value="" ></textarea>
</div>
</div>
</div>
@ -205,13 +206,13 @@
<div class="field-group">
<div class="lbl">차량명</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
<div class="field-group">
<div class="lbl">차량색상</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
</div>
@ -221,7 +222,7 @@
<div class="field-group">
<div class="lbl">연료구분</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
<div class="field-group empty"></div>
@ -232,13 +233,13 @@
<div class="field-group">
<div class="lbl">소유주</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
<div class="field-group">
<div class="lbl">등록구분</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
</div>
@ -248,13 +249,13 @@
<div class="field-group">
<div class="lbl">주민번호</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
<div class="field-group">
<div class="lbl">우편번호</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
</div>
@ -264,7 +265,7 @@
<div class="field-group full">
<div class="lbl">주소</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
</div>
@ -274,13 +275,13 @@
<div class="field-group">
<div class="lbl">번지</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
<div class="field-group">
<div class="lbl">차대번호</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
</div>
@ -290,7 +291,7 @@
<div class="field-group">
<div class="lbl">도로코드</div>
<div class="fld">
<input type="text" data-field="" value="" readonly>
<input type="text" data-field="" value="" >
</div>
</div>
<div class="field-group empty"></div>
@ -317,12 +318,12 @@
<div id="btn-area">
<button type="button" class="btn btn-light" name="changeSt" id="non-target" value="81">미부과처리</button>
<button type="button" class="btn btn-light" name="changeSt" id="non-target" value="">계도처리</button>
<button type="button" class="btn btn-light" name="changeSt" id="non-target" value="">회수처리</button>
<button type="button" class="btn btn-light" name="changeSt" id="non-target" value="">자료복사</button>
<button type="button" class="btn btn-light" name="changeSt" id="guide" value="">계도처리</button>
<button type="button" class="btn btn-light" name="changeSt" id="return" value="">회수처리</button>
<button type="button" class="btn btn-light" name="changeSt" id="copy" value="">자료복사</button>
<button type="button" class="btn btn-light" id="delay">처리보류</button>
<button type="button" class="btn btn-light" id="delay">원본보기</button>
<button type="button" class="btn btn-light" id="infoReadReturn">되돌리기</button>
<button type="button" class="btn btn-light" id="init">되돌리기</button>
<button type="button" class="btn btn-light" id="lavyTarget">되돌리기</button>
<button type="button" class="btn btn-light" id="stateChange" hidden>처리상태 변경</button>
</div>
@ -337,9 +338,8 @@
</div>
</div>
<div id="photoEditSection" style="display:none;">
<jsp:include page="/WEB-INF/views/biz/totalInfo/totalInfo_photo_dialog.jsp" />
</div>
<jsp:include page="/WEB-INF/views/biz/dialog/destruction_doc_dialog.jsp" />
</div>
<!-- /Main body -->
@ -348,10 +348,7 @@
<script type="text/javascript">
window.INIT_POP_API = {
search: () => {
console.log("Total Info Search!!!!")
const { cursor, mmCodes } = JSON.parse(localStorage.getItem("TOTAL_INFO_STATE"));
$.ajax({
// PathVariable 형태로 url를 동적으로 쓰는방식이다.
// 해당 방식 이외에 그냥 쿼리스트링으로 넘기는 방법도 있다.
@ -359,10 +356,7 @@
type: "GET",
dataType: 'json',
success: function(response) {
console.log(response.data)
$("#mmIngb").val(response.data.cpMain.mmIngb);
$("#mmDlgb").val(response.data.cpMain.mmDlgb);
$("#mmLawgb").val(response.data.cpMain.mmLawgb);
@ -407,9 +401,6 @@
$("#cursorCnt").text(mmCodes.indexOf(cursor) + 1);
$("#total").text(mmCodes.length);
// total info 초기상태
$("#infoState").val("init").trigger("change");
},
error: function(xhr, status, error) {
$("#result").text("조회 실패");
@ -423,10 +414,31 @@
let fnBiz = {
init: () => {
// fnBiz.search();
fnBiz.setCode();
},
infoSave: () => {
setCode: () => {
$.ajax({
url: "/common/code/find.ajax",
type: "GET",
contentType: 'application/json',
success: function(response) {
console.log(response);
response.cpBdong.forEach((item) => {
$("#mmDdcode").append('<option value="' +item.bdCode+'">' +item.bdDongName+ '</option>')
});
response.cpCancelAnswer.forEach((item) => {
$("#cpCancelAnswer").append('<option value="' +item.caCode+'">' +item.caId+ '</option>')
})
},
error: function(xhr, status, error) {
$("#result").text("조회 실패");
}
});
},
initDataUpdate: () => {
const { cursor, mmCodes } = JSON.parse(localStorage.getItem("TOTAL_INFO_STATE"));
const payload = fnBiz.collectByDataField();
@ -466,32 +478,7 @@
});
},
btnSet: (infoState) => {
switch (infoState) {
case "init":
// $("#btn-area > button").prop("hidden", true);
// $("#infoEdit").prop("hidden", false);
// $("#infoDel").prop("hidden", false);
// $("#delay").prop("hidden", false);
// $("#buillPrint").prop("hidden", false);
// $("#stateChange").prop("hidden", false);
// $("#non-target").prop("hidden", false);
break;
case "edit":
// $("#btn-area > button").prop("hidden", true);
// $("#infoSave").prop("hidden", false);
// $("#infoReadReturn").prop("hidden", false);
break;
}
switch ($("#asState")) {
case "":
$("#destructionDocReReg").prop("hidden", false);
}
},
collectByDataField: () => {
const payload = {};
@ -534,39 +521,7 @@
INIT_POP_API.search();
});
/** 개별총정보 상태변경 트리거 */
$("#infoState").on("change", () => {
fnBiz.btnSet($("#infoState").val());
})
/** 개별총정보 수정모드 진입*/
$("#infoEdit").on("click", () => {
$("input").prop("readonly", false);
$("#infoState").val("edit").trigger("change");
})
/** 개별총정보 읽기모드 진입 */
$("#infoReadReturn").on("click", () => {
$("input").prop("readonly", true);
INIT_POP_API.search();
$("#infoState").val("init").trigger("change");
})
/** 정보수정 */
$("#infoSave").on("click", () => {
fnBiz.infoSave();
$("input").prop("readonly", true);
INIT_POP_API.search();
})
/** 상태값 변경 */
$("button[name='changeSt']").on("click", (e) => {
let flag = e.target.value;
fnBiz.changeState(e, flag);
})
/** 사진 더블클릭 → 원본 다이얼로그 */
$("#photoThumbs").on("dblclick", "img", function () {
@ -576,6 +531,12 @@
$("#photoDialog").dialog("open");
});
$("#non-target").on("click", () => {
$("#destruction_doc_dialog").dialog("open");
})
}
}
@ -585,6 +546,8 @@
$("#tabs").tabs();
fnBiz.init();
INIT_POP_API.search();
fnBiz.eventListener();

@ -115,10 +115,10 @@
init: () => {
fnBiz.searchCode();
fnBiz.setCode();
},
searchCode: () => {
setCode: () => {
$.ajax({
url: "/common/code/find.ajax",
type: "GET",
@ -132,8 +132,6 @@
$(".state-tabs li").first().addClass("on").trigger("click");
},
error: function(xhr, status, error) {
$("#result").text("조회 실패");

@ -40,6 +40,7 @@
<link rel="stylesheet" href="<c:url value='/css/bootstrap-datepicker.min.css' />">
<link rel="stylesheet" href="<c:url value='/css/style_new.css' />">
<link rel="stylesheet" href="<c:url value='/css/cc.css' />">
<link rel="stylesheet" href="<c:url value='/css/cc-dialog.css' />">
<%--================== Main Scripts ======================--%>

@ -43,6 +43,7 @@
<link rel="stylesheet" href="<c:url value='/css/jquery-ui.css' />">
<link rel="stylesheet" href="<c:url value='/css/cc.css' />">
<link rel="stylesheet" href="<c:url value='/css/cc-popup.css' />">
<link rel="stylesheet" href="<c:url value='/css/cc-dialog.css' />">
<%--================== Main Scripts ======================--%>

@ -0,0 +1,47 @@
.ui-dialog .ui-dialog-titlebar {
background: #202342;
color: #fff;
border-bottom: 1px solid #444;
border-radius: 4px;
}
.ui-dialog .ui-dialog-title {
color: #fff;
font-weight: 600;
}
/* 닫기 버튼 기본 버튼 스타일 제거 */
.ui-dialog .ui-dialog-titlebar-close {
background: transparent !important;
border: none !important;
width: 28px;
height: 28px;
right: 6px;
top: 50%;
transform: translateY(-50%);
}
/* 기존 jQuery UI 아이콘 완전히 숨김 */
.ui-dialog .ui-dialog-titlebar-close .ui-icon {
display: none !important;
}
/* 텍스트 X 직접 그리기 */
.ui-dialog .ui-dialog-titlebar-close::before {
content: "✕";
color: #fff;
font-size: 25px;
font-weight: 600;
line-height: 45px;
text-align: center;
display: block;
}
.disdoc-btn-area {
display: flex;
justify-content: flex-end;
}
.disdoc-btn {
margin-top: 10px;
}

@ -0,0 +1,28 @@
package go.kr.project.domain.entity;
import lombok.Getter;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name = "cp_cancel_answer")
@Getter
public class CpCancelAnswer {
@EmbeddedId
private CpCancelAnswerId id;
@Column(name = "CA_ID", length = 50)
private String caId;
@Column(name = "CA_ISANSWER", length = 1)
private String caIsAnswer;
@Column(name = "CA_ANSWERTEXT", length = 50)
private String caAnswerText;
}

@ -0,0 +1,29 @@
package go.kr.project.domain.entity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;
@Embeddable
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CpCancelAnswerId implements Serializable {
@Column(name = "CA_SGGCODE", length = 5, nullable = false)
private String caSggCode;
@Column(name = "CA_CODE", length = 3, nullable = false)
private String caCode;
}

@ -0,0 +1,33 @@
package go.kr.project.domain.entity;
import lombok.Getter;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
@Entity
@Table(name = "cp_cancel_answer")
@Getter
public class CpCancelAnswer {
@EmbeddedId
private CpCancelAnswerId id;
@Column(name = "nrcg_rsnnm", length = 50)
private String caId;
@Column(name = "nrcgans_yn", length = 1)
private String caIsAnswer;
@Column(name = "nrcgans_cn", length = 50)
private String caAnswerText;
}

@ -0,0 +1,27 @@
package go.kr.project.domain.entity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.io.Serializable;
@Embeddable
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CpCancelAnswerId implements Serializable {
@Column(name = "sggcd", length = 5, nullable = false)
private String caSggCode;
@Column(name = "nrcgans_id", length = 3, nullable = false)
private String caCode;
}
Loading…
Cancel
Save