@ -256,7 +256,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
* @return BizNimsRequest . DsuseMgtReceipt 생 성 된 폐 기 관 리 정 보
* < / pre >
* /
public BizNimsRequest . DsuseMgtReceipt saveDsuseMgtReceipt ( final BizNimsRequest . DsuseMgtReceipt reqDto , final List < BizNimsDto . DsuseMgtDtl > dtls , final List < MultipartFile > files ) {
public BizNimsRequest . DsuseMgtReceipt Req saveDsuseMgtReceipt ( final BizNimsRequest . DsuseMgtReceipt Req reqDto , final List < BizNimsDto . DsuseMgtDtl > dtls , final List < MultipartFile > files ) {
ApiUtil . validate ( reqDto , null , validator ) ;
if ( reqDto . getRndDtlRptCnt ( ) ! = dtls . size ( ) ) throw ApiCustomException . create ( "폐기물 보고수 오류[폐기물 갯수 확인]" ) ;
ApiUtil . validate ( dtls , null , validator ) ;
@ -289,7 +289,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
* @return BizNimsRequest . DsuseMgtRslt 생 성 된 폐 기 관 리 정 보
* < / pre >
* /
public BizNimsRequest . DsuseMgtRslt saveDsuseMgtRslt ( final BizNimsRequest . DsuseMgtRslt reqDto , final List < MultipartFile > files ) {
public BizNimsRequest . DsuseMgtRslt Req saveDsuseMgtRslt ( final BizNimsRequest . DsuseMgtRslt Req reqDto , final List < MultipartFile > files ) {
ApiUtil . validate ( reqDto , null , validator ) ;
reqDto . setRgtr ( reqDto . getUserId ( ) ) ;
@ -317,7 +317,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
* < / pre >
* /
@Override
public List < BizNimsResponse . DsuseMgtRes > getDsuseMgts ( final BizNimsRequest . DsuseMgtInq reqDto , final boolean isForDoc ) {
public List < BizNimsResponse . DsuseMgtRes > getDsuseMgts ( final BizNimsRequest . DsuseMgtInq Req reqDto , final boolean isForDoc ) {
List < BizNimsResponse . DsuseMgtRes > resList = bizNimsMapper . selectDsuseMgts ( reqDto ) ;
String apiKey = null ;
if ( isForDoc ) apiKey = getApiInfInfo ( reqDto . getUserId ( ) ) . get ( "apiKey" ) ;
@ -367,13 +367,13 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
* < / pre >
* /
@Override
public List < NimsApiDto . DsuseRptInfo > getDsuseMgtMapping ( BizNimsRequest . DsuseRptMappingInq reqDto ) {
public List < NimsApiDto . DsuseRptInfo > getDsuseMgtMapping ( BizNimsRequest . DsuseRptMappingInq Req reqDto ) {
ApiUtil . validate ( reqDto , null , validator ) ;
Map < String , String > apiInfInfo = getApiInfInfo ( reqDto . getUserId ( ) ) ;
// 0. GET 폐기관리 데이타 정보
List < BizNimsResponse . DsuseMgtRes > dsuseMgtDtos = getDsuseMgts (
BizNimsRequest . DsuseMgtInq . builder ( )
BizNimsRequest . DsuseMgtInq Req . builder ( )
. dscdmngIds ( List . of ( reqDto . getDscdmngId ( ) ) )
. deptCd ( apiInfInfo . get ( "deptCd" ) )
. prgrsSttsCd ( null )
@ -420,7 +420,7 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
for ( NimsApiDto . DsuseRptInfo dto : rtnList ) {
// 7. FIXME : 폐기 관리 데이타와 매핑
// FIXME: API 적용 필요 - 취소 데이타인 경우 확인 필요
// FIXME: 아래 부분과 비교 - 적용 필요 한지 확인후 적용 여부 결정
// if(RPT_TY_CD.CANCEL.getCode().equals(dto.getRptTyCd())){
// updateDsuseMgtMappingData(dto, reqDto.getUserId());
// continue;
@ -429,10 +429,13 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
BizNimsResponse . DsuseMgtRes dsuseMgtRes = dto . mappingNewDsuseRptInfo ( dsuseMgtDto ) ;
if ( ObjectUtils . isNotEmpty ( dsuseMgtRes ) ) {
dsuseMgtRes . setRgtr ( reqDto . getUserId ( ) ) ;
if ( bizNimsMapper . updateMappingDsuseMgt ( dsuseMgtDto ) ! = 1 ) {
throw ApiCustomException . create ( "폐기 관리 데이타 매핑 오류[폐기 관리 데이타 매핑 실패]" ) ;
}
///////////////////////////////////////////////////////////////
// FIXME: 매핑보고 조회후 일치하는 매핑관리 데이타의 매핑정보 갱신 -> 화면에서 처리하도록 comment 처리
// dsuseMgtRes.setRgtr(reqDto.getUserId());
// if (bizNimsMapper.updateForceMappingDsuseMgt(dsuseMgtDto) != 1) {
// throw ApiCustomException.create("폐기 관리 데이타 매핑 오류[폐기 관리 데이타 매핑 실패]");
// }
//////////////////////////////////////////////////////////////
dto . setDscdmngId ( dsuseMgtRes . getDscdmngId ( ) ) ;
}
}
@ -442,6 +445,15 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
return rtnList ;
}
public void modifyMappingDsuseMgt ( final BizNimsRequest . DsuseMgtMappingReq reqDto ) {
ApiUtil . validate ( reqDto , null , validator ) ;
reqDto . setRgtr ( reqDto . getUserId ( ) ) ;
if ( bizNimsMapper . updateMappingDsuseMgt ( reqDto ) ! = 1 ) {
throw ApiCustomException . create ( "폐기 관리 데이타 매핑 오류[폐기 관리 데이타 매핑 실패]" ) ;
}
}
@Override
public void modifyPrgsSttsOfDsuseMgt ( BizNimsDto . DsuseMgt reqDto ) {
ApiUtil . validate ( reqDto , null , validator ) ;
@ -781,20 +793,24 @@ public class BizNimsServiceBean extends AbstractServiceBean implements BizNimsSe
// 조건 : 사용자보고식별번호 = 참조사용자보고식별번호
// => usr_rpt_id_no -> refUsrRptIdNo update
// => 취소인 경우 use_yn = 'N' update
BizNimsRe sponse. DsuseMgtRes dsuseMgtRes = BizNimsResponse . DsuseMgtRes . builder ( )
BizNimsRe quest. DsuseMgtMappingReq reqDto = BizNimsRequest . DsuseMgtMappingReq . builder ( )
. dscdmngId ( dto . getDscdmngId ( ) )
. usrRptIdNo ( dto . getUsrRptIdNo ( ) )
. orgUsrRptIdNo ( dto . getOrgUsrRptIdNo ( ) )
. rptTyCd ( dto . getRptTyCd ( ) )
. stts ( dto . getStatus ( ) )
. rgtr ( userId )
. build ( ) ;
if ( ! RPT_TY_CD . CANCEL . getCode ( ) . equals ( dto . getRptTyCd ( ) ) ) {
dsuseMgtRes . setUsrRptIdNo ( dto . getUsrRptIdNo ( ) ) ;
dsuseMgtRes . setRefUsrRptIdNo ( dto . getRefUsrRptIdNo ( ) ) ;
dsuseMgtRes . setOrgUsrRptIdNo ( dto . getOrgUsrRptIdNo ( ) ) ;
dsuseMgtRes . setRptTyCd ( dto . getRptTyCd ( ) ) ;
dsuseMgtRes . setStts ( dto . getStatus ( ) ) ;
//dsuseMgtRes.setPrgrsSttsCd(dto.getP());
}
if ( bizNimsMapper . updateMappingDsuseMgt ( dsuseMgtRes ) = = 0 ) {
// if (!RPT_TY_CD.CANCEL.getCode().equals(dto.getRptTyCd())) {
// dsuseMgtRes.setUsrRptIdNo(dto.getUsrRptIdNo());
// dsuseMgtRes.setRefUsrRptIdNo(dto.getRefUsrRptIdNo());
// dsuseMgtRes.setOrgUsrRptIdNo(dto.getOrgUsrRptIdNo());
// dsuseMgtRes.setRptTyCd(dto.getRptTyCd());
// dsuseMgtRes.setStts(dto.getStatus());
// //dsuseMgtRes.setPrgrsSttsCd(dto.getP());
// }
if ( bizNimsMapper . updateMappingDsuseMgt ( reqDto ) = = 0 ) {
throw ApiCustomException . create (
"폐기보고정보 변경 적용 실패\n[폐기관리테이블에 사용자보고식별번호 = 참조사용자보고식별번호에 해당하는 데이타 미존재]" ) ;
}