sri 요청사항 반영.
parent
e6b03b4f50
commit
8b56220152
|
|
@ -37,9 +37,12 @@ public class SriController {
|
||||||
String accessAuth = authMgtService.selectAccessConfigList
|
String accessAuth = authMgtService.selectAccessConfigList
|
||||||
(loginUser.getUserSeq(), "/sri/sriBoard").get(0).getAccessAuth();
|
(loginUser.getUserSeq(), "/sri/sriBoard").get(0).getAccessAuth();
|
||||||
mav.addObject("accessAuth", accessAuth);
|
mav.addObject("accessAuth", accessAuth);
|
||||||
|
mav.addObject("userOrgan", loginUser.getOgCd());
|
||||||
|
|
||||||
if(sri.getActiveTab().equals("send")){
|
if(sri.getActiveTab().equals("send")){
|
||||||
sri.setWrtUserSeq(loginUser.getUserSeq());
|
sri.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
|
}else if(sri.getActiveTab().equals("resend")){
|
||||||
|
sri.setWrtUserSeq(loginUser.getUserSeq());
|
||||||
}else if(sri.getActiveTab().equals("receive")){
|
}else if(sri.getActiveTab().equals("receive")){
|
||||||
sri.setStatus("DST007");
|
sri.setStatus("DST007");
|
||||||
sri.setReceiveUserSeq(loginUser.getUserSeq());
|
sri.setReceiveUserSeq(loginUser.getUserSeq());
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@ public class Sri extends BaseModel {
|
||||||
@Column(name = "status")
|
@Column(name = "status")
|
||||||
private String status;
|
private String status;
|
||||||
@Column(name = "fa_sri_edate")
|
@Column(name = "fa_sri_edate")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||||
private LocalDate faSriEdate;
|
private LocalDateTime faSriEdate;
|
||||||
@Column(name = "wrt_organ")
|
@Column(name = "wrt_organ")
|
||||||
private String wrtOrgan;
|
private String wrtOrgan;
|
||||||
@Column(name = "wrt_part")
|
@Column(name = "wrt_part")
|
||||||
|
|
@ -72,6 +72,7 @@ public class Sri extends BaseModel {
|
||||||
private List<MultipartFile> multipartFileList;
|
private List<MultipartFile> multipartFileList;
|
||||||
@Transient
|
@Transient
|
||||||
private Sri refSri;
|
private Sri refSri;
|
||||||
|
@Transient
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,26 @@
|
||||||
<mapper namespace="com.dbnt.faisp.main.fpiMgt.sri.mapper.SriMapper">
|
<mapper namespace="com.dbnt.faisp.main.fpiMgt.sri.mapper.SriMapper">
|
||||||
<sql id="selectSriWhere">
|
<sql id="selectSriWhere">
|
||||||
<where>
|
<where>
|
||||||
<if test='wrtUserSeq != null and wrtUserSeq != ""'>
|
<if test='activeTab == "send"'>
|
||||||
and a.wrt_user_seq = #{wrtUserSeq}
|
and a.wrt_user_seq = #{wrtUserSeq}
|
||||||
|
and a.ref_key is null
|
||||||
</if>
|
</if>
|
||||||
<if test='receiveUserSeq != null and receiveUserSeq != ""'>
|
<if test='activeTab == "resend"'>
|
||||||
|
and a.wrt_user_seq = #{wrtUserSeq}
|
||||||
|
and a.ref_key is not null
|
||||||
|
</if>
|
||||||
|
<if test='activeTab == "receive"'>
|
||||||
|
and a.status = #{status}
|
||||||
and a.fa_sri_key in (select fa_sri_key
|
and a.fa_sri_key in (select fa_sri_key
|
||||||
from fa_sri_read_user
|
from fa_sri_read_user
|
||||||
where user_seq = #{receiveUserSeq})
|
where user_seq = #{receiveUserSeq})
|
||||||
</if>
|
</if>
|
||||||
|
<if test='activeTab == "all"'>
|
||||||
|
and a.wrt_organ in
|
||||||
|
<foreach collection="downOrganCdList" item="organCd" separator="," open="(" close=")">
|
||||||
|
#{organCd}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test='wrtUserNm != null and wrtUserNm != ""'>
|
<if test='wrtUserNm != null and wrtUserNm != ""'>
|
||||||
and a.wrt_user_nm like '%'||#{wrtUserNm}||'%'
|
and a.wrt_user_nm like '%'||#{wrtUserNm}||'%'
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -29,15 +41,6 @@
|
||||||
<if test='endDate != null and endDate != ""'>
|
<if test='endDate != null and endDate != ""'>
|
||||||
and a.wrt_dt <= #{endDate}::date+1
|
and a.wrt_dt <= #{endDate}::date+1
|
||||||
</if>
|
</if>
|
||||||
<if test='status != null and status != ""'>
|
|
||||||
and a.status = #{status}
|
|
||||||
</if>
|
|
||||||
<if test="downOrganCdList != null">
|
|
||||||
and a.wrt_organ in
|
|
||||||
<foreach collection="downOrganCdList" item="organCd" separator="," open="(" close=")">
|
|
||||||
#{organCd}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectSriList" resultType="Sri" parameterType="Sri">
|
<select id="selectSriList" resultType="Sri" parameterType="Sri">
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,15 @@ $(document).on('click', '#searchModalBtn', function (){
|
||||||
$(document).on('change', '#rowCnt', function (){
|
$(document).on('change', '#rowCnt', function (){
|
||||||
searchFormSubmit(1)
|
searchFormSubmit(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$(document).on('change', '.timeInputer', function (){
|
||||||
|
var timeFormat = /^([01][0-9]|2[0-3]):([0-5][0-9])$/; // 시간형식 체크 정규화 hh:mm
|
||||||
|
if(!timeFormat.test(this.value)){
|
||||||
|
alert("시간 입력 형식에 맞지 않습니다.(00:00~23:59)")
|
||||||
|
this.value = '';
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
function searchFormSubmit(pageIndex){
|
function searchFormSubmit(pageIndex){
|
||||||
$("#pageIndex").val(pageIndex);
|
$("#pageIndex").val(pageIndex);
|
||||||
$("#searchBtn").click();
|
$("#searchBtn").click();
|
||||||
|
|
|
||||||
|
|
@ -130,13 +130,6 @@ $(document).on('click', '.violationRemoveBtn', function (){
|
||||||
parentDiv.remove();
|
parentDiv.remove();
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('change', '.timeInputer', function (){
|
|
||||||
var timeFormat = /^([01][0-9]|2[0-3]):([0-5][0-9])$/; // 시간형식 체크 정규화 hh:mm
|
|
||||||
if(!timeFormat.test(this.value)){
|
|
||||||
alert("시간 입력 형식에 맞지 않습니다.(00:00~23:59)")
|
|
||||||
this.value = '';
|
|
||||||
}
|
|
||||||
})
|
|
||||||
$(document).on('click', '.versionInfoTr', function (){
|
$(document).on('click', '.versionInfoTr', function (){
|
||||||
$(".versionInfoChkbox").prop("checked", false);
|
$(".versionInfoChkbox").prop("checked", false);
|
||||||
$(this).find(".versionInfoChkbox")[0].checked = true
|
$(this).find(".versionInfoChkbox")[0].checked = true
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,8 @@ function getSriEditModal(faSriKey){
|
||||||
$("#faSriEdate").datepicker({
|
$("#faSriEdate").datepicker({
|
||||||
format: "yyyy-mm-dd",
|
format: "yyyy-mm-dd",
|
||||||
language: "ko",
|
language: "ko",
|
||||||
autoclose: true
|
autoclose: true,
|
||||||
|
startDate: "now"
|
||||||
});
|
});
|
||||||
setEditor('editor', '500');
|
setEditor('editor', '500');
|
||||||
setUploadDiv();
|
setUploadDiv();
|
||||||
|
|
@ -41,6 +42,10 @@ function getSriEditModal(faSriKey){
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$(document).on('change', '.faSriEdate', function (){
|
||||||
|
$("#faSriEdateTime").val($("#faSriEdate").val()+" "+$("#faSriETime").val());
|
||||||
|
})
|
||||||
|
|
||||||
$(document).on('click', '#addReadUserBtn', function (){
|
$(document).on('click', '#addReadUserBtn', function (){
|
||||||
searchModalSubmit(1);
|
searchModalSubmit(1);
|
||||||
$("#userModal").modal('show');
|
$("#userModal").modal('show');
|
||||||
|
|
@ -67,26 +72,14 @@ $(document).on('click', '#getMenuBtn', function (){
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#saveSriBtn', function (){
|
$(document).on('click', '.saveBtn', function (){
|
||||||
saveSri('DST007')
|
if(confirm(this.textContent+"하시겠습니까?")){
|
||||||
|
const activeTab = $(".tabLink.active")[0].id.replace('Tab', '');
|
||||||
|
saveSri($(this).attr("data-state"), this.textContent, activeTab);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function saveSri(faSriState){
|
function saveSri(faSriState, btnText, activeTab){
|
||||||
if(faSriState === 'DST001'){
|
|
||||||
if(confirm("임시저장하시겠습니까?")){
|
|
||||||
save(faSriState);
|
|
||||||
}
|
|
||||||
|
|
||||||
}else{
|
|
||||||
if(contentCheck()){
|
|
||||||
if(confirm("하달하시겠습니까?")){
|
|
||||||
save(faSriState);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function save(faSriState){
|
|
||||||
$("#status").val(faSriState);
|
$("#status").val(faSriState);
|
||||||
contentFade("in");
|
contentFade("in");
|
||||||
const formData = new FormData($("#sriEditForm")[0]);
|
const formData = new FormData($("#sriEditForm")[0]);
|
||||||
|
|
@ -112,21 +105,11 @@ function save(faSriState){
|
||||||
processData: false,
|
processData: false,
|
||||||
contentType: false,
|
contentType: false,
|
||||||
success : function(result) {
|
success : function(result) {
|
||||||
if(faSriState == 'DST001'){
|
alert(btnText+"되었습니다.")
|
||||||
alert("임시저장되었습니다.");
|
location.href="/sri/sriBoard?activeTab="+activeTab+"&refDocKey="+result;
|
||||||
}else{
|
|
||||||
alert("하달되었습니다.");
|
|
||||||
}
|
|
||||||
contentFade("out");
|
|
||||||
$("#sriEditModal").modal('hide');
|
|
||||||
getSriViewModal(result);
|
|
||||||
},
|
},
|
||||||
error : function(xhr, status) {
|
error : function(xhr, status) {
|
||||||
if(faSriState == 'DST001'){
|
alert(btnText+"에 실패하였습니다.")
|
||||||
alert("임시저장에 실패하였습니다.")
|
|
||||||
}else{
|
|
||||||
alert("하달에 실패하였습니다.")
|
|
||||||
}
|
|
||||||
contentFade("out");
|
contentFade("out");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -154,15 +137,8 @@ function getSriViewModal(faSriKey){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$(document).on('click', '.tabLink', function (){
|
||||||
$(document).on('click', '#sendTab', function (){
|
location.href = "/sri/sriBoard?activeTab="+this.id.replace('Tab', '');
|
||||||
location.href = "/sri/sriBoard?activeTab=send";
|
|
||||||
})
|
|
||||||
$(document).on('click', '#receiveTab', function (){
|
|
||||||
location.href = "/sri/sriBoard?activeTab=receive";
|
|
||||||
})
|
|
||||||
$(document).on('click', '#allTab', function (){
|
|
||||||
location.href = "/sri/sriBoard?activeTab=all";
|
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#editFaSriBtn', function (){
|
$(document).on('click', '#editFaSriBtn', function (){
|
||||||
|
|
@ -183,10 +159,6 @@ $(document).on('click', '#reSendBtn', function (){
|
||||||
getSriEditModal(faSri);
|
getSriEditModal(faSri);
|
||||||
})
|
})
|
||||||
|
|
||||||
$(document).on('click', '#saveTempBtn', function (){
|
|
||||||
saveSri('DST001')
|
|
||||||
})
|
|
||||||
|
|
||||||
$(document).on('click', '#sriDeleteBtn', function (){
|
$(document).on('click', '#sriDeleteBtn', function (){
|
||||||
if($('input:checkbox[name=sriChk]:checked').length < 1){
|
if($('input:checkbox[name=sriChk]:checked').length < 1){
|
||||||
alert("게시물을 선택해주세요");
|
alert("게시물을 선택해주세요");
|
||||||
|
|
|
||||||
|
|
@ -23,14 +23,17 @@
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
<ul class="nav nav-tabs" id="userTab" role="tablist">
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link" th:classappend="${searchParams.activeTab eq 'send'?' active':''}" id="sendTab" data-bs-toggle="tab" type="button" role="tab">하달</button>
|
<button class="nav-link tabLink" th:classappend="${searchParams.activeTab eq 'send'?' active':''}" id="sendTab" data-bs-toggle="tab" type="button" role="tab">하달</button>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link" th:classappend="${searchParams.activeTab eq 'receive'?' active':''}" id="receiveTab" data-bs-toggle="tab" type="button" role="tab">수신</button>
|
<button class="nav-link tabLink" th:classappend="${searchParams.activeTab eq 'resend'?' active':''}" id="resendTab" data-bs-toggle="tab" type="button" role="tab">응신</button>
|
||||||
</li>
|
</li>
|
||||||
<th:block th:if="${accessAuth eq 'ACC003'}">
|
|
||||||
<li class="nav-item" role="presentation">
|
<li class="nav-item" role="presentation">
|
||||||
<button class="nav-link" th:classappend="${searchParams.activeTab eq 'all'?' active':''}" id="allTab" data-bs-toggle="tab" type="button" role="tab">전체(관리자)</button>
|
<button class="nav-link tabLink" th:classappend="${searchParams.activeTab eq 'receive'?' active':''}" id="receiveTab" data-bs-toggle="tab" type="button" role="tab">수신</button>
|
||||||
|
</li>
|
||||||
|
<th:block th:if="${accessAuth eq 'ACC003' and userOrgan eq 'OG001'}">
|
||||||
|
<li class="nav-item" role="presentation" >
|
||||||
|
<button class="nav-link tabLink" th:classappend="${searchParams.activeTab eq 'all'?' active':''}" id="allTab" data-bs-toggle="tab" type="button" role="tab">전체(관리자)</button>
|
||||||
</li>
|
</li>
|
||||||
</th:block>
|
</th:block>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -111,7 +114,7 @@
|
||||||
<th:text th:if="${commonCode.itemCd eq sri.faSriType}" th:text="${commonCode.itemValue}"></th:text>
|
<th:text th:if="${commonCode.itemCd eq sri.faSriType}" th:text="${commonCode.itemValue}"></th:text>
|
||||||
</th:block>
|
</th:block>
|
||||||
</td>
|
</td>
|
||||||
<td th:text="${sri.faSriEdate}"></td>
|
<td th:text="${#temporals.format(sri.faSriEdate, 'yyyy-MM-dd HH:mm')}"></td>
|
||||||
<td th:if="${sri.status ne 'receive'}">
|
<td th:if="${sri.status ne 'receive'}">
|
||||||
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
|
<th:block th:each="commonCode:${session.commonCode.get('DST')}">
|
||||||
<th:text th:if="${commonCode.itemCd eq sri.status}" th:text="${commonCode.itemValue}"></th:text>
|
<th:text th:if="${commonCode.itemCd eq sri.status}" th:text="${commonCode.itemValue}"></th:text>
|
||||||
|
|
@ -155,7 +158,7 @@
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<input type="button" class="btn btn-success" value="등록" id="addSriBtn" th:unless="${accessAuth eq 'ACC001'}">
|
<input type="button" class="btn btn-success" value="등록" id="addSriBtn" th:unless="${accessAuth eq 'ACC001' and searchParams.activeTab eq 'send'}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,12 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<label for="faSriEdate" class="col-sm-2 col-form-label col-form-label-sm text-center">제출기한</label>
|
<label for="faSriEdate" class="col-sm-2 col-form-label col-form-label-sm text-center">제출기한</label>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4" th:with="faSriEdate=${#temporals.format(sri.faSriEdate, 'yyyy-MM-dd HH:mm')}">
|
||||||
<input type="text" class="form-control form-control-sm" id="faSriEdate" name="faSriEdate" th:value="${sri.faSriEdate}" readonly>
|
<input type="hidden" id="faSriEdateTime" name="faSriEdate" th:value="${faSriEdate}">
|
||||||
|
<div class="input-group">
|
||||||
|
<input type="text" class="form-control form-control-sm faSriEdate" id="faSriEdate" th:value="${#strings.substringBefore(faSriEdate, ' ')}" readonly>
|
||||||
|
<input type="text" class="form-control form-control-sm faSriEdate timeInputer" id="faSriETime" th:value="${#strings.substringAfter(faSriEdate, ' ')}" placeholder="00:00~24:00">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
@ -127,6 +131,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer bg-light">
|
<div class="modal-footer bg-light">
|
||||||
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
|
<!-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">닫기</button>-->
|
||||||
<button type="button" class="btn btn-warning" id="saveTempBtn">임시저장</button>
|
<button type="button" class="btn btn-warning saveBtn" data-state="DST001">임시저장</button>
|
||||||
<button type="button" class="btn btn-primary" id="saveSriBtn">하달</button>
|
<button type="button" class="btn btn-primary saveBtn" data-state="DST007" th:text="${sri.refKey eq null?'하달':'응신'}"></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -36,8 +36,8 @@
|
||||||
</th:block>
|
</th:block>
|
||||||
</label>
|
</label>
|
||||||
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">제출기한</label>
|
<label class="col-sm-1 col-form-label col-form-label-sm text-center fw-bold">제출기한</label>
|
||||||
<label class="col-sm-1 col-form-label col-form-label-sm text-start" th:text="${faSri.faSriEdate}"></label>
|
<label class="col-sm-2 col-form-label col-form-label-sm text-start" th:text="${#temporals.format(faSri.faSriEdate, 'yyyy-MM-dd HH:mm')}"></label>
|
||||||
<div class="col-sm-5"></div>
|
<div class="col-sm-4"></div>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:if="${faSri.refKey ne null}">
|
<th:block th:if="${faSri.refKey ne null}">
|
||||||
<div class="col-sm-9"></div>
|
<div class="col-sm-9"></div>
|
||||||
|
|
@ -137,12 +137,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<th:block th:if="${userSeq eq faSri.wrtUserSeq}">
|
<th:block th:if="${userSeq eq faSri.wrtUserSeq}">
|
||||||
<button type="button" class="btn btn-warning" id="editFaSriBtn" th:data-fasrikey="${faSri.faSriKey}">수정</button>
|
<button type="button" class="btn btn-warning" id="editFaSriBtn" th:if="${faSri.refSri eq null or faSri.refSri.faSriEdate >= #temporals.createNow()}" th:data-fasrikey="${faSri.faSriKey}">수정</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
<th:block th:each="readUser:${faSri.readUserList}">
|
<th:block th:each="readUser:${faSri.readUserList}">
|
||||||
<th:block th:if="${userSeq eq readUser.userSeq}">
|
<th:block th:if="${userSeq eq readUser.userSeq}">
|
||||||
<th:block th:unless="${faSri.faSriEdate eq null}">
|
<th:block th:unless="${faSri.faSriEdate eq null}">
|
||||||
<button type="button" class="btn btn-success" id="reSendBtn" th:if="${faSri.faSriEdate} >= ${#temporals.createToday()}" th:data-fasrikey="${faSri.faSriKey}">응신</button>
|
<button type="button" class="btn btn-success" id="reSendBtn" th:if="${faSri.faSriEdate >= #temporals.createNow()}" th:data-fasrikey="${faSri.faSriKey}">응신</button>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue