자산,점검보고서 조회시 그룹 조회조건 및 등록 요건 변경
This commit is contained in:
parent
2ab33dbb9b
commit
cc730f6e6b
@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
|
|
||||||
import com.urpsys.baseapi.common.util.CommonUtil;
|
import com.urpsys.baseapi.common.util.CommonUtil;
|
||||||
import com.urpsys.baseapi.common.util.ResultData;
|
import com.urpsys.baseapi.common.util.ResultData;
|
||||||
|
import com.urpsys.baseapi.domain.TokenInfo;
|
||||||
import com.urpsys.itmsapi.rem.service.CodeAssetCateService;
|
import com.urpsys.itmsapi.rem.service.CodeAssetCateService;
|
||||||
import com.urpsys.itmsapi.rem.service.ResourceManagerService;
|
import com.urpsys.itmsapi.rem.service.ResourceManagerService;
|
||||||
|
|
||||||
@ -64,6 +64,18 @@ public class ResourceManagerController
|
|||||||
|
|
||||||
LinkedHashMap<String, Object> resBody = new LinkedHashMap<String, Object>();
|
LinkedHashMap<String, Object> resBody = new LinkedHashMap<String, Object>();
|
||||||
|
|
||||||
|
// 토큰정보 획득
|
||||||
|
TokenInfo tokenInfo = CommonUtil.getAccessTokenInfo(request);
|
||||||
|
|
||||||
|
String strGrpId = tokenInfo.getStrGRP_ID();
|
||||||
|
String strRole = tokenInfo.getAuthorities();
|
||||||
|
|
||||||
|
// 본사그룹 혹은 관리자 가 아닌경우 해당그룹자산만 조회 가능
|
||||||
|
if(strGrpId != "GROUP_00000000000000" && strRole != "ROLE_ADMIN")
|
||||||
|
{
|
||||||
|
requestMap.put("strGrpId", strGrpId);
|
||||||
|
}
|
||||||
|
|
||||||
// 자산조회
|
// 자산조회
|
||||||
List<LinkedHashMap<String, Object>> resultList = resourceManagerService.searchAsset(requestMap);
|
List<LinkedHashMap<String, Object>> resultList = resourceManagerService.searchAsset(requestMap);
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import com.urpsys.baseapi.common.util.CommonUtil;
|
import com.urpsys.baseapi.common.util.CommonUtil;
|
||||||
import com.urpsys.baseapi.common.util.ResultData;
|
import com.urpsys.baseapi.common.util.ResultData;
|
||||||
import com.urpsys.baseapi.domain.TokenInfo;
|
import com.urpsys.baseapi.domain.TokenInfo;
|
||||||
|
import com.urpsys.itmsapi.rem.service.ResourceManagerService;
|
||||||
import com.urpsys.itmsapi.srm.service.ReportCheckService;
|
import com.urpsys.itmsapi.srm.service.ReportCheckService;
|
||||||
import com.urpsys.itmsapi.srm.service.SvcDeskService;
|
import com.urpsys.itmsapi.srm.service.SvcDeskService;
|
||||||
|
|
||||||
@ -48,6 +49,9 @@ public class ReportCheckController
|
|||||||
@Autowired
|
@Autowired
|
||||||
SvcDeskService svcDeskService; // 서비스 인스던트 관리 서비스
|
SvcDeskService svcDeskService; // 서비스 인스던트 관리 서비스
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
ResourceManagerService resourceManagerService; // 2025.08.20 나혀제 자산관리 서비스 추가
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 점검보고서 목록 조회
|
* 점검보고서 목록 조회
|
||||||
* @author urp 인프라본부 나혁제
|
* @author urp 인프라본부 나혁제
|
||||||
@ -70,6 +74,15 @@ public class ReportCheckController
|
|||||||
// 토큰정보 획득
|
// 토큰정보 획득
|
||||||
TokenInfo tokenInfo = CommonUtil.getAccessTokenInfo(request);
|
TokenInfo tokenInfo = CommonUtil.getAccessTokenInfo(request);
|
||||||
|
|
||||||
|
String strGrpId = tokenInfo.getStrGRP_ID();
|
||||||
|
String strRole = tokenInfo.getAuthorities();
|
||||||
|
|
||||||
|
// 본사그룹 혹은 관리자 가 아닌경우 해당그룹자산만 조회 가능
|
||||||
|
if(strGrpId != "GROUP_00000000000000" && strRole != "ROLE_ADMIN")
|
||||||
|
{
|
||||||
|
requestMap.put("strGrpId", strGrpId);
|
||||||
|
}
|
||||||
|
|
||||||
log.info("tokenInfo [{}]", tokenInfo.toString() );
|
log.info("tokenInfo [{}]", tokenInfo.toString() );
|
||||||
log.info("tokenInfo [{}]", tokenInfo.getAuthorities() );
|
log.info("tokenInfo [{}]", tokenInfo.getAuthorities() );
|
||||||
|
|
||||||
@ -484,6 +497,8 @@ public class ReportCheckController
|
|||||||
|
|
||||||
// 서비스데스크 인스던트 정보 조회
|
// 서비스데스크 인스던트 정보 조회
|
||||||
int inIncidentSeq = CommonUtil.zeroConvert(requestMap.get("inIncidentSeq"));
|
int inIncidentSeq = CommonUtil.zeroConvert(requestMap.get("inIncidentSeq"));
|
||||||
|
// 2025.08.20 나혁제 추가 연결자산 정보
|
||||||
|
int inAssetSeq = CommonUtil.zeroConvert(requestMap.get("inAssetSeq"));
|
||||||
|
|
||||||
LinkedHashMap<String, Object> resultIncident = new LinkedHashMap<String, Object>();
|
LinkedHashMap<String, Object> resultIncident = new LinkedHashMap<String, Object>();
|
||||||
|
|
||||||
@ -495,6 +510,15 @@ public class ReportCheckController
|
|||||||
|
|
||||||
int inServiceCode = CommonUtil.zeroConvert(resultIncident.get("inServiceCode"));
|
int inServiceCode = CommonUtil.zeroConvert(resultIncident.get("inServiceCode"));
|
||||||
|
|
||||||
|
// 2025.08.20 나혁제 연결자산정보
|
||||||
|
LinkedHashMap<String, Object> resultAsset = new LinkedHashMap<String, Object>();
|
||||||
|
|
||||||
|
// 인스던트 정보 조회
|
||||||
|
if(inAssetSeq>0)
|
||||||
|
{
|
||||||
|
resultAsset = resourceManagerService.getAssetInfo(inAssetSeq);
|
||||||
|
}
|
||||||
|
|
||||||
// 서비스정보 조회
|
// 서비스정보 조회
|
||||||
List<LinkedHashMap<String, Object>> resultService = reportCheckService.getServiceCombo(inServiceCode);
|
List<LinkedHashMap<String, Object>> resultService = reportCheckService.getServiceCombo(inServiceCode);
|
||||||
|
|
||||||
@ -508,7 +532,7 @@ public class ReportCheckController
|
|||||||
resBody.put("resultService" , resultService );
|
resBody.put("resultService" , resultService );
|
||||||
resBody.put("resultTask" , resultTask );
|
resBody.put("resultTask" , resultTask );
|
||||||
resBody.put("resultForm" , resultForm );
|
resBody.put("resultForm" , resultForm );
|
||||||
|
resBody.put("resultAsset" , resultAsset ); // 2025.08.20 나혁제 자산정보 추가
|
||||||
|
|
||||||
log.info("<<<<<<<<<<<<<<<<<<<<<<<<< /srm/getInitReportCheck.do >>>>>>>>>>>>>>>>>>>>>>>>>");
|
log.info("<<<<<<<<<<<<<<<<<<<<<<<<< /srm/getInitReportCheck.do >>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||||
|
|
||||||
|
|||||||
@ -115,6 +115,9 @@
|
|||||||
|
|
||||||
<if test="sdateEos != null and sdateEos!=''"><![CDATA[ AND (A.DT_EOS) >= ("sdateEos")]]></if>
|
<if test="sdateEos != null and sdateEos!=''"><![CDATA[ AND (A.DT_EOS) >= ("sdateEos")]]></if>
|
||||||
<if test="edateEos != null and edateEos!=''"><![CDATA[ AND (A.DT_EOS) <= ("edateEos")]]></if>
|
<if test="edateEos != null and edateEos!=''"><![CDATA[ AND (A.DT_EOS) <= ("edateEos")]]></if>
|
||||||
|
|
||||||
|
<!-- 2025.08.19 나혁제 추가 필터 -->
|
||||||
|
<if test="strGrpId != null and strGrpId != ''">AND A.VC_GRP_ID = #{strGrpId}</if>
|
||||||
|
|
||||||
<if test='searchAll != null and searchAll != "" '>
|
<if test='searchAll != null and searchAll != "" '>
|
||||||
AND (
|
AND (
|
||||||
@ -198,6 +201,7 @@
|
|||||||
AND A.IN_CATE1=D.IN_CATE1
|
AND A.IN_CATE1=D.IN_CATE1
|
||||||
AND A.IN_CATE2=D.IN_CATE2
|
AND A.IN_CATE2=D.IN_CATE2
|
||||||
AND A.IN_CATE3=D.IN_CATE3
|
AND A.IN_CATE3=D.IN_CATE3
|
||||||
|
|
||||||
<include refid="searchFilter"/>
|
<include refid="searchFilter"/>
|
||||||
<if test="sortField != null and sortField !=''">
|
<if test="sortField != null and sortField !=''">
|
||||||
<if test="sortField == 'VC_ASSET_ID'"> ORDER BY A.VC_ASSET_ID</if>
|
<if test="sortField == 'VC_ASSET_ID'"> ORDER BY A.VC_ASSET_ID</if>
|
||||||
|
|||||||
@ -66,6 +66,7 @@
|
|||||||
<result property="inCount" column="IN_COUNT"/>
|
<result property="inCount" column="IN_COUNT"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<!-- 2025.08.19 나혁제 VC_MODEL ~ VC_DTL_MEM 추가 -->
|
||||||
<resultMap type="java.util.LinkedHashMap" id="reportAsset">
|
<resultMap type="java.util.LinkedHashMap" id="reportAsset">
|
||||||
<result property="inAssetSeq" column="IN_ASSET_SEQ"/>
|
<result property="inAssetSeq" column="IN_ASSET_SEQ"/>
|
||||||
<result property="vcAssetName" column="VC_ASSET_NAME"/>
|
<result property="vcAssetName" column="VC_ASSET_NAME"/>
|
||||||
@ -73,6 +74,16 @@
|
|||||||
<result property="vcCate2" column="VC_CATE2"/>
|
<result property="vcCate2" column="VC_CATE2"/>
|
||||||
<result property="vcCate3" column="VC_CATE3"/>
|
<result property="vcCate3" column="VC_CATE3"/>
|
||||||
<result property="txComment" column="TX_COMMENT"/>
|
<result property="txComment" column="TX_COMMENT"/>
|
||||||
|
|
||||||
|
<result property="vcModel" column="VC_MODEL"/>
|
||||||
|
<result property="vcHost" column="VC_HOST"/>
|
||||||
|
<result property="vcIp" column="VC_IP"/>
|
||||||
|
<result property="vcVersion" column="VC_VERSION"/>
|
||||||
|
<result property="vcAssetSerial" column="VC_ASSET_SERIAL"/>
|
||||||
|
<result property="vcDtlCpu" column="VC_DTL_CPU"/>
|
||||||
|
<result property="vcDtlDisk" column="VC_DTL_DISK"/>
|
||||||
|
<result property="vcDtlMem" column="VC_DTL_MEM"/>
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
@ -129,6 +140,17 @@
|
|||||||
<if test="taskCode != null and taskCode!=0"> AND A.IN_TASK = ${taskCode}</if>
|
<if test="taskCode != null and taskCode!=0"> AND A.IN_TASK = ${taskCode}</if>
|
||||||
<if test="sdate != null and sdate!=''"><![CDATA[ AND UNIX_TIMESTAMP(A.DT_LAST_UPDATE) >= UNIX_TIMESTAMP("${sdate}")]]></if>
|
<if test="sdate != null and sdate!=''"><![CDATA[ AND UNIX_TIMESTAMP(A.DT_LAST_UPDATE) >= UNIX_TIMESTAMP("${sdate}")]]></if>
|
||||||
<if test="edate != null and edate!=''"><![CDATA[ AND UNIX_TIMESTAMP(A.DT_LAST_UPDATE) <= UNIX_TIMESTAMP("${edate}")]]></if>
|
<if test="edate != null and edate!=''"><![CDATA[ AND UNIX_TIMESTAMP(A.DT_LAST_UPDATE) <= UNIX_TIMESTAMP("${edate}")]]></if>
|
||||||
|
<!-- 2025.08.19 나혁제 추가 필터 -->
|
||||||
|
<if test="strGrpId != null and strGrpId != ''">
|
||||||
|
AND A.IN_REPORT_SEQ IN ( SELECT B.IN_REPORT_SEQ
|
||||||
|
FROM CM_ASSET A
|
||||||
|
, CM_REPORT_ASSET B
|
||||||
|
WHERE A.VC_GRP_ID =#{strGrpId}
|
||||||
|
AND A.IN_ASSET_SEQ = B.IN_ASSET_SEQ
|
||||||
|
GROUP BY B.IN_REPORT_SEQ
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 2025.02.17 나혁제 이부분은 일단 삭제처리
|
<!-- 2025.02.17 나혁제 이부분은 일단 삭제처리
|
||||||
@ -469,11 +491,19 @@
|
|||||||
AND B.IN_TARGET_SEQ=#{value}
|
AND B.IN_TARGET_SEQ=#{value}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 2025.08.19 나혁제 VC_MODEL ~ VC_DTL_MEM 추가 -->
|
||||||
<select id="getReportAssets" parameterType="int" resultMap="reportAsset" >
|
<select id="getReportAssets" parameterType="int" resultMap="reportAsset" >
|
||||||
/* ReportCheckDao.getReportAssets */
|
/* ReportCheckDao.getReportAssets */
|
||||||
SELECT A.IN_ASSET_SEQ
|
SELECT A.IN_ASSET_SEQ
|
||||||
, B.VC_ASSET_NAME
|
, B.VC_ASSET_NAME
|
||||||
, B.
|
, B.VC_MODEL
|
||||||
|
, B.VC_HOST
|
||||||
|
, B.VC_IP
|
||||||
|
, B.VC_VERSION
|
||||||
|
, B.VC_ASSET_SERIAL
|
||||||
|
, B.VC_DTL_CPU
|
||||||
|
, B.VC_DTL_DISK
|
||||||
|
, B.VC_DTL_MEM
|
||||||
, A.TX_COMMENT
|
, A.TX_COMMENT
|
||||||
, C1.VC_CATE1
|
, C1.VC_CATE1
|
||||||
, C2.VC_CATE2
|
, C2.VC_CATE2
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user