1. 민원,단속 화면 수정(그리드의 특정 열을 기준 정렬하는 기능 추가)

2. 민원 복사 등록시 복사자료가 원본자료 밑에 표시되도록 수정
3. 민원 복사 등록시 모자이크 정보도 복사되도록 수정함.
main
이범준 10 months ago
parent 22b90a6ca7
commit 8f7b53a6c9

@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import cokr.xit.base.file.FileInfo;
import cokr.xit.base.file.service.FileQuery;
import cokr.xit.base.file.service.bean.FileBean;
import cokr.xit.fims.cmmn.CmmnUtil;
import cokr.xit.fims.cmmn.service.bean.CrdnPayerHstryBean;
import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean;
import cokr.xit.fims.crdn.Crdn;
@ -91,10 +92,24 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService
List<DataObject> dataObjectList = new ArrayList<DataObject>();
switch (ifEmpty(query.getGridType(), () -> "")) {
case "tagInformationUndefinedData":
dataObjectList = crdnListMapper.selectTagInformationUndefinedDataList(query.setOrderBy("CRDN_ID"));
if (query.getOrderBy() == null) {
if (query.getBy() == null) {
query.setOrderBy("CRDN_ID");
} else {
query.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(query.getBy()));
}
}
dataObjectList = crdnListMapper.selectTagInformationUndefinedDataList(query);
break;
case "photo":
dataObjectList = crdnListMapper.selectPhotoInspectionDataList(query.setOrderBy("VHRNO, CRDN_PLC, CRDN_ID"));
if (query.getOrderBy() == null) {
if (query.getBy() == null) {
query.setOrderBy("VHRNO, CRDN_PLC, CRDN_ID");
} else {
query.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(query.getBy()));
}
}
dataObjectList = crdnListMapper.selectPhotoInspectionDataList(query);
break;
case "sameVehicleMain":
if(ifEmpty(query.getSchOnlySamePlace(),() -> "").equals("on")) {
@ -112,7 +127,14 @@ public class CrdnServiceBean extends AbstractServiceBean implements CrdnService
dataObjectList = crdnListMapper.selectTodayCrackdownList(query);
break;
default:
dataObjectList = crdnListMapper.selectCrackdownList(query.setOrderBy("CRDN_ID"));
if (query.getOrderBy() == null) {
if (query.getBy() == null) {
query.setOrderBy("CRDN_ID");
} else {
query.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(query.getBy()));
}
}
dataObjectList = crdnListMapper.selectCrackdownList(query);
break;
}

@ -107,13 +107,36 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
List<DataObject> dataObjectList = new ArrayList<DataObject>();
switch (ifEmpty(query.getGridType(), () -> "")) {
case "receiptData":
dataObjectList = crdnCvlcptMapper.selectCivilComplaintReceiptDataList(query.setOrderBy("CVLCPT_RCPT_YMD, CRDN_ID"));
String appendCopyToOriginal = "CVLCPT_RCPT_YMD, CVLCPT_RCPT_NO, CVLCPT_LIST_NO, CVLCPT_LINK_ID, CRDN_REG_SE_CD, CRDN_ID";
if(query.getOrderBy() == null) {
if (ifEmpty(query.getBy(), "").equals("")) {
query.setOrderBy(appendCopyToOriginal);
} else {
query.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(query.getBy()+","+appendCopyToOriginal));
}
}
dataObjectList = crdnCvlcptMapper.selectCivilComplaintReceiptDataList(query);
break;
case "answerTargetData":
dataObjectList = crdnCvlcptMapper.selectCivilComplaintAnswerTargetDataList(query.setOrderBy("CRDN_ID"));
if (query.getOrderBy() == null) {
if (query.getBy() == null) {
query.setOrderBy("CRDN_ID");
} else {
query.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(query.getBy()));
}
}
dataObjectList = crdnCvlcptMapper.selectCivilComplaintAnswerTargetDataList(query);
break;
default:
dataObjectList = crdnCvlcptMapper.selectCivilComplaintList(query.setOrderBy("CRDN_ID"));
if (query.getOrderBy() == null) {
if (query.getBy() == null) {
query.setOrderBy("CRDN_ID");
} else {
query.setOrderBy(CmmnUtil.convertCamelCaseToSnakeCase(query.getBy()));
}
}
dataObjectList = crdnCvlcptMapper.selectCivilComplaintList(query);
break;
}

@ -33,6 +33,7 @@ import cokr.xit.fims.cvlc.dao.CrdnCvlcptMapper;
import cokr.xit.fims.cvlc.dao.WarningWordsMapper;
import cokr.xit.fims.excl.LevyExcl;
import cokr.xit.fims.excl.dao.LevyExclMapper;
import cokr.xit.fims.sprt.service.bean.MediaBean;
import cokr.xit.foundation.AbstractComponent;
import cokr.xit.foundation.UserInfo;
import cokr.xit.foundation.data.DataObject;
@ -58,6 +59,9 @@ public class CrdnCvlcptSubBean extends AbstractComponent {
@Resource(name = "fileBean")
private FileBean fileBean;
@Resource(name = "mediaBean")
private MediaBean mediaBean;
@Resource(name = "codeMapper")
private CodeMapper codeMapper;
@ -297,13 +301,23 @@ public class CrdnCvlcptSubBean extends AbstractComponent {
relation.setInfoType(Crdn.INF_TYPE);
relation.setInfoKey(newCrdnId);
fileInfoList = new FileInfoFactory().createFileInfos(relation, files);
ArrayList<String> oldFileIdList = new ArrayList<>();
for (int iLoop = 0; iLoop < fileInfoList.size(); iLoop++) {
oldFileIdList.add(orgnlCrdnFileList.get(iLoop).string("FILE_ID"));
fileInfoList.get(iLoop).setName(orgnlCrdnFileList.get(iLoop).string("FILE_NM"));
}
int effected = fileBean.create(fileInfoList);
if(effected == 0) {
throw new RuntimeException("단속민원 복사 등록 중 파일복사에 실패하였습니다.");
}
try {
for (int iLoop = 0; iLoop < fileInfoList.size(); iLoop++) {
mediaBean.copyMosaicInfo(oldFileIdList.get(iLoop), fileInfoList.get(iLoop).getId());
}
} catch (Exception e) {
throw new RuntimeException("단속민원 복사 등록 중 사진 모자이크 정보 복사에 실패하였습니다.");
}
}
return true;

@ -19,4 +19,7 @@ public interface MediaMapper {
int reorder(Map<String, Object> params);
int copyMosaicInfo(Map<String, Object> param);
}

@ -148,4 +148,17 @@ public class MediaBean extends AbstractComponent {
params.put("srtOrd", i);
return mediaMapper.reorder(params);
}
public void copyMosaicInfo(String oldFileId, String newFileId) {
DataObject param = new DataObject().set("currentUser", currentUser());
param.put("oldFileId", oldFileId);
param.put("newFileId", newFileId);
List<DataObject> mosaicInfos = this.getMosaicList(oldFileId);
for(DataObject mosaicInfo : mosaicInfos) {
param.set("oldMoscId", mosaicInfo.string("MOSC_ID"));
mediaMapper.copyMosaicInfo(param);
}
}
}

@ -220,6 +220,7 @@ AND (SELECT VLTN_ARTCL FROM TB_VLTN WHERE VLTN_ID = C.VLTN_ID) LIKE CONCAT('%',
/* 민원접수자료 목록 조회(crdnCvlcptMapper.selectCivilComplaintReceiptDataList) */
<include refid="utility.paging-prefix"/>
SELECT C.CRDN_ID <!-- 단속 ID -->
, CC.CVLCPT_LINK_ID
, C.SGG_CD <!-- 시군구 코드 -->
, C.TASK_SE_CD <!-- 업무 구분 코드 -->
, C.CRDN_REG_SE_CD <!-- 단속 등록 구분 코드 -->

@ -22,4 +22,43 @@ UPDATE TB_FILE
WHERE FILE_ID = #{fileId}
</update>
<insert id="copyMosaicInfo" parameterType="map">
/* 모자이크 정보 복사(mediaMapper.copyMosaicInfo) */
<selectKey resultType="string" keyProperty="newMoscId" keyColumn="NEW_ID" order="BEFORE">
SELECT
LPAD(CAST(IFNULL(MAX(MOSC_ID) + 1, 1) AS INT), 10, '0')
AS NEW_ID
FROM TB_FILE_MOSC
</selectKey>
INSERT
INTO TB_FILE_MOSC (
MOSC_ID
, FILE_ID
, X_AXS
, Y_AXS
, MOSC_LT
, MOSC_HG
, DEL_YN <!-- 삭제 여부 -->
, REG_DT <!-- 등록 일시 -->
, RGTR <!-- 등록자 -->
, MDFCN_DT <!-- 수정 일시 -->
, MDFR <!-- 수정자 -->
)
SELECT #{newMoscId}
, #{newFileId}
, X_AXS
, Y_AXS
, MOSC_LT
, MOSC_HG
, 'N' <!-- 삭제 여부 -->
, <include refid="utility.now" /> <!-- 등록 일시 -->
, #{currentUser.id} <!-- 등록자 -->
, <include refid="utility.now" /> <!-- 수정 일시 -->
, #{currentUser.id} <!-- 수정자 -->
FROM TB_FILE_MOSC
WHERE FILE_ID = #{oldFileId}
AND MOSC_ID = #{oldMoscId}
AND DEL_YN = 'N'
</insert>
</mapper>
Loading…
Cancel
Save