외사방첩관리 > 외사활동 > 담당 사건 목록 인쇄 기능 작업완료.
parent
e0cc1e7413
commit
1a46d190ac
|
|
@ -1,6 +1,7 @@
|
|||
package com.dbnt.faisp.main.counterIntelligence.activityCase;
|
||||
|
||||
import com.dbnt.faisp.main.authMgt.service.AuthMgtService;
|
||||
import com.dbnt.faisp.main.codeMgt.model.CodeMgt;
|
||||
import com.dbnt.faisp.main.codeMgt.service.CodeMgtService;
|
||||
import com.dbnt.faisp.main.counterIntelligence.activityCase.model.*;
|
||||
import com.dbnt.faisp.main.counterIntelligence.activityCase.service.ActivityCaseService;
|
||||
|
|
@ -12,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -172,12 +174,36 @@ public class ActivityCaseController {
|
|||
}
|
||||
|
||||
@GetMapping("/activityCasePrint")
|
||||
public Map<String, Object> activityCasePrint(ActivityCaseInfo info){
|
||||
public Map<String, Object> activityCasePrint(ActivityCaseInfo info, HttpSession session){
|
||||
Map<String, List<CodeMgt>> codeMap = (Map<String, List<CodeMgt>>) session.getAttribute("commonCode");
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
info = activityCaseService.selectActivityCaseInfo(info.getCaseKey());
|
||||
ActivityCase activityCase = activityCaseService.selectActivityCase(info.getReceiptKey());
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("activityCase", activityCase);
|
||||
map.put("activityCaseInfo", info);
|
||||
String reception = "";
|
||||
String reference = "";
|
||||
switch (activityCase.getWrtOrgan()){
|
||||
case "OG001":
|
||||
reception = "해양경찰청장";
|
||||
reference = "외사과장";
|
||||
break;
|
||||
case "OG027":
|
||||
reception = "서해5도특별경비단장";
|
||||
reference = "경비작전과장";
|
||||
break;
|
||||
default:
|
||||
String organNm = Utils.searchCodeValue(activityCase.getWrtOrgan(), codeMap.get("OG")).trim();
|
||||
if(organNm.endsWith("청")){
|
||||
reception = organNm.substring(0, organNm.length()-1)+"지방청장";
|
||||
}else{
|
||||
reception = organNm.substring(0, organNm.length()-1)+"경찰서장";
|
||||
}
|
||||
reference = "정보외사과장";
|
||||
break;
|
||||
}
|
||||
map.put("reception", reception);
|
||||
map.put("reference", reference);
|
||||
map.put("activityCase", activityCaseService.getActivityCasePrintData(activityCase, codeMap));
|
||||
map.put("activityCaseInfo", activityCaseService.getActivityCaseInfoPrintData(info, codeMap));
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.dbnt.faisp.main.counterIntelligence.activityCase.service;
|
|||
|
||||
import com.dbnt.faisp.config.BaseService;
|
||||
import com.dbnt.faisp.config.FileInfo;
|
||||
import com.dbnt.faisp.main.codeMgt.model.CodeMgt;
|
||||
import com.dbnt.faisp.main.counterIntelligence.activityCase.mapper.ActivityCaseMapper;
|
||||
import com.dbnt.faisp.main.counterIntelligence.activityCase.model.*;
|
||||
import com.dbnt.faisp.main.counterIntelligence.activityCase.repository.*;
|
||||
|
|
@ -166,4 +167,25 @@ public class ActivityCaseService extends BaseService {
|
|||
public Integer selectActivityCaseMgtCnt(ActivityCaseBoard activityCase) {
|
||||
return acMapper.selectActivityCaseMgtCnt(activityCase);
|
||||
}
|
||||
|
||||
public ActivityCaseInfo getActivityCaseInfoPrintData(ActivityCaseInfo info, Map<String, List<CodeMgt>> codeMap) {
|
||||
for(ActivityCaseApprv apprv: info.getApprvList()){
|
||||
apprv.setOfcCd(Utils.searchCodeValue(apprv.getOfcCd(), codeMap.get(apprv.getOgCd())));
|
||||
apprv.setOgCd(Utils.searchCodeValue(apprv.getOgCd(), codeMap.get("OG")));
|
||||
apprv.setTitleCd(Utils.searchCodeValue(apprv.getTitleCd(), codeMap.get("JT")));
|
||||
apprv.setApprvType(Utils.searchCodeValue(apprv.getApprvType(), codeMap.get("ACAT")));
|
||||
}
|
||||
return info;
|
||||
}
|
||||
|
||||
public ActivityCase getActivityCasePrintData(ActivityCase activityCase, Map<String, List<CodeMgt>> codeMap) {
|
||||
activityCase.setWrtPart(Utils.searchCodeValue(activityCase.getWrtPart(), codeMap.get(activityCase.getWrtOrgan())));
|
||||
activityCase.setWrtOrgan(Utils.searchCodeValue(activityCase.getWrtOrgan(), codeMap.get("OG")));
|
||||
activityCase.setWrtUserGrd(Utils.searchCodeValue(activityCase.getWrtUserGrd(), codeMap.get("JT")));
|
||||
for(ActivityCaseSuspect suspect: activityCase.getSuspectList()){
|
||||
suspect.setType(Utils.searchCodeValue(suspect.getType(), codeMap.get("ACS")));
|
||||
suspect.setSex(Utils.searchCodeValue(suspect.getSex(), codeMap.get("SEX")));
|
||||
}
|
||||
return activityCase;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ public class AffairService extends BaseService { // 견문보고
|
|||
affair.setReference("경비작전과장");
|
||||
break;
|
||||
default:
|
||||
String organNm = Utils.searchCodeValue(rating.getRatingOrgan(), codeMap.get("OG"));
|
||||
String organNm = Utils.searchCodeValue(rating.getRatingOrgan(), codeMap.get("OG")).trim();
|
||||
if(organNm.endsWith("청")){
|
||||
affair.setReception(organNm.substring(0, organNm.length()-1)+"지방청장");
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -103,8 +103,7 @@ $(document).on('click', '#printInfoBtn', function (){
|
|||
const status = "width=900px,height=800px,scrollbars=yes";
|
||||
const form = $("#printForm")[0];
|
||||
let title = "";
|
||||
|
||||
switch(data.caseType){
|
||||
switch(activityCase.caseType){
|
||||
case "ACT001":
|
||||
title = "청산보고서 인쇄";
|
||||
form.crfName.value = "activityCase1";
|
||||
|
|
@ -115,7 +114,7 @@ $(document).on('click', '#printInfoBtn', function (){
|
|||
break;
|
||||
case "ACT003":
|
||||
title = "결과보고서 인쇄";
|
||||
form.crfName.value = "activityCase3";
|
||||
form.crfName.value = "activityCase2";
|
||||
break;
|
||||
}
|
||||
window.open("", title, status);
|
||||
|
|
@ -368,7 +367,53 @@ function contentCheck(){
|
|||
|
||||
function makeActivityCasePrintData(data){
|
||||
const activityCase = {
|
||||
|
||||
receiptNum: data.activityCase.receiptNum,
|
||||
suspectList: [],
|
||||
caseType: data.activityCaseInfo.caseType,
|
||||
title: data.activityCaseInfo.title,
|
||||
content: data.activityCaseInfo.content,
|
||||
reportDate: data.activityCaseInfo.reportDate,
|
||||
fileList: [],
|
||||
reception: data.reception,
|
||||
reference: data.reference,
|
||||
wrtDt: data.activityCaseInfo.wrtDt.replace('T', ' ').substring(0, 15),
|
||||
wrtOrgan: data.activityCase.wrtOrgan,
|
||||
wrtPart: data.activityCase.wrtPart,
|
||||
wrtUserGrd: data.activityCase.wrtUserGrd,
|
||||
wrtUserNm: data.activityCase.wrtUserNm,
|
||||
apprvList: []
|
||||
}
|
||||
for(const suspect of data.activityCase.suspectList){
|
||||
activityCase.suspectList.push({
|
||||
address: suspect.address,
|
||||
area: suspect.area,
|
||||
birthDate: suspect.birthDate,
|
||||
etc: suspect.etc,
|
||||
job: suspect.job,
|
||||
name: suspect.name,
|
||||
phone: suspect.phone,
|
||||
sex: suspect.sex,
|
||||
type: suspect.type
|
||||
})
|
||||
}
|
||||
for(const apprv of data.activityCaseInfo.apprvList){
|
||||
if((apprv.apprvYn !== null && apprv.apprvYn === "Y")
|
||||
&&(apprv.apprvType !== null && apprv.apprvType !== "ACAT001")){
|
||||
activityCase.apprvPart = apprv.ofcCd;
|
||||
activityCase.apprvGrd = apprv.titleCd;
|
||||
activityCase.apprvNm = apprv.userNm;
|
||||
activityCase.apprvEtc = apprv.instructions;
|
||||
activityCase.apprvDate = apprv.apprvDt.replace("T", " ").substring(0, 15);
|
||||
}
|
||||
activityCase.apprvList.push({
|
||||
apprvType: apprv.apprvType,
|
||||
apprvYn: apprv.apprvYn,
|
||||
apprvPart: apprv.ofcCd,
|
||||
apprvGrd: apprv.titleCd,
|
||||
apprvNm: apprv.userNm,
|
||||
apprvEtc: apprv.instructions,
|
||||
apprvDate: apprv.apprvDt.split("T")[0]
|
||||
})
|
||||
}
|
||||
return activityCase;
|
||||
}
|
||||
Loading…
Reference in New Issue