248 lines
6.3 KiB
Java
248 lines
6.3 KiB
Java
|
|
/**
|
||
|
|
* CommonService.java
|
||
|
|
* @author 임새미
|
||
|
|
* @since 2016. 10. 13.
|
||
|
|
*
|
||
|
|
* 수정일 수정자 수정내용
|
||
|
|
* ------------- -------- ---------------------------
|
||
|
|
* 2016. 10. 13. 임새미 최초생성
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
package kcg.faics.arrest.service.impl;
|
||
|
|
|
||
|
|
import java.util.HashMap;
|
||
|
|
import java.util.List;
|
||
|
|
|
||
|
|
import javax.annotation.Resource;
|
||
|
|
|
||
|
|
import kcg.faics.arrest.service.ArrestService;
|
||
|
|
import kcg.faics.arrest.vo.ArrestCountVO;
|
||
|
|
import kcg.faics.arrest.vo.ArrestSearchVO;
|
||
|
|
import kcg.faics.arrest.vo.ArrestVO;
|
||
|
|
import kcg.faics.cmmn.vo.CodeVO;
|
||
|
|
import org.springframework.stereotype.Service;
|
||
|
|
import org.springframework.transaction.annotation.Transactional;
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* ArrestServiceImpl.java
|
||
|
|
* @author 이영호
|
||
|
|
* @since 2016. 3. 17.
|
||
|
|
*
|
||
|
|
* 수정일 수정자 수정내용
|
||
|
|
* ------------- -------- ---------------------------
|
||
|
|
* 2017. 3. 17. 이영호 최초생성
|
||
|
|
*
|
||
|
|
*/
|
||
|
|
@Service("arrestService")
|
||
|
|
public class ArrestServiceImpl implements ArrestService {
|
||
|
|
|
||
|
|
/**
|
||
|
|
* ArrestMapper.
|
||
|
|
*/
|
||
|
|
@Resource(name = "arrestMapper")
|
||
|
|
private ArrestMapper arrestMapper;
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 주소목록을 조회한다.
|
||
|
|
*
|
||
|
|
* @param String area
|
||
|
|
* @param String area
|
||
|
|
* @return List<CodeVO> 특별광역시도 목록
|
||
|
|
* @exception Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
public List<CodeVO> getAddressAreaList(String area) throws Exception {
|
||
|
|
List<CodeVO> codeVOList = arrestMapper.getAddressAreaList(area);
|
||
|
|
return codeVOList;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보를 추가한다.
|
||
|
|
*
|
||
|
|
* @param dataVO 사용자 정보 객체
|
||
|
|
* @param fileMap 업로드 파일정보
|
||
|
|
* @return HashMap/ seq : 게시물 , result : 성공 - 1, 실패 - 0
|
||
|
|
* @exception Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
@Transactional
|
||
|
|
public HashMap<String, Object> insert(final ArrestVO arrestVO) throws Exception {
|
||
|
|
|
||
|
|
HashMap<String, Object> result = new HashMap<String, Object>();
|
||
|
|
|
||
|
|
//
|
||
|
|
if(!arrestVO.getShipProcType().equals("01")){
|
||
|
|
arrestVO.setCommissionCost("");
|
||
|
|
}
|
||
|
|
|
||
|
|
if(arrestVO.getMarginPaymentYn().equals("N")){
|
||
|
|
arrestVO.setMarginPaymentDate("");
|
||
|
|
}
|
||
|
|
|
||
|
|
result = arrestMapper.insertArrest(arrestVO);
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보를 수정한다.
|
||
|
|
*
|
||
|
|
* @param dataVO 사용자 정보 객체
|
||
|
|
* @param fileMap 업로드 파일정보
|
||
|
|
* @return HashMap/ seq : 게시물 , result : 성공 - 1, 실패 - 0
|
||
|
|
* @exception Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
@Transactional
|
||
|
|
public HashMap<String, Object> update(final ArrestVO arrestVO) throws Exception {
|
||
|
|
|
||
|
|
HashMap<String, Object> result = new HashMap<String, Object>();
|
||
|
|
|
||
|
|
if(!arrestVO.getShipProcType().equals("01")){
|
||
|
|
arrestVO.setCommissionCost("");
|
||
|
|
}
|
||
|
|
|
||
|
|
if(arrestVO.getMarginPaymentYn().equals("N")){
|
||
|
|
arrestVO.setMarginPaymentDate("");
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
result = arrestMapper.updateArrest(arrestVO);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보를 삭제한다.
|
||
|
|
*
|
||
|
|
* @param dataVO 사용자 정보 객체
|
||
|
|
* @param fileMap 업로드 파일정보
|
||
|
|
* @return HashMap/ seq : 게시물 , result : 성공 - 1, 실패 - 0
|
||
|
|
* @exception Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
@Transactional
|
||
|
|
public HashMap<String, Object> delete(final ArrestVO arrestVO) throws Exception {
|
||
|
|
|
||
|
|
HashMap<String, Object> result = new HashMap<String, Object>();
|
||
|
|
result = arrestMapper.deleteArrest(arrestVO);
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보 단건 조회
|
||
|
|
*
|
||
|
|
* @param dataVO userid
|
||
|
|
* @return 선택한 사용자 정보 반환
|
||
|
|
* @throws Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
public ArrestVO select(final ArrestVO dataVO) throws Exception {
|
||
|
|
|
||
|
|
ArrestVO result = arrestMapper.getArrest(dataVO);
|
||
|
|
|
||
|
|
return result;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보 목록 전체 조회
|
||
|
|
*
|
||
|
|
* @param dataVO userid
|
||
|
|
* @return 선택한 사용자 정보 반환
|
||
|
|
* @throws Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
public List<ArrestVO> getArrestListAll(final ArrestSearchVO arrestSearchVO) throws Exception {
|
||
|
|
|
||
|
|
return arrestMapper.getArrestListAll(arrestSearchVO);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보 목록 전체 조회
|
||
|
|
*
|
||
|
|
* @param dataVO userid
|
||
|
|
* @return 선택한 사용자 정보 반환
|
||
|
|
* @throws Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
public ArrestCountVO getArrestListAllCount(final ArrestSearchVO arrestSearchVO) throws Exception {
|
||
|
|
|
||
|
|
return arrestMapper.getArrestListAllCount(arrestSearchVO);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보 목록 조회
|
||
|
|
*
|
||
|
|
* @param dataVO arrestSearchVO
|
||
|
|
* @return 선택한 사용자 정보 반환
|
||
|
|
* @throws Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
public List<ArrestVO> getArrestList(final ArrestSearchVO arrestSearchVO) throws Exception {
|
||
|
|
|
||
|
|
return arrestMapper.getArrestList(arrestSearchVO);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보 목록 조회 (엑셀)
|
||
|
|
*
|
||
|
|
* @param dataVO arrestSearchVO
|
||
|
|
* @return 선택한 사용자 정보 반환
|
||
|
|
* @throws Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
public List<ArrestVO> getArrestListExcel(final ArrestSearchVO arrestSearchVO) throws Exception {
|
||
|
|
|
||
|
|
return arrestMapper.getArrestListExcel(arrestSearchVO);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보 집계정보 조회
|
||
|
|
*
|
||
|
|
* @param dataVO userid
|
||
|
|
* @return 선택한 사용자 정보 반환
|
||
|
|
* @throws Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
public ArrestVO getArrestListCount(final ArrestSearchVO arrestSearchVO) throws Exception {
|
||
|
|
|
||
|
|
return arrestMapper.getArrestListCount(arrestSearchVO);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보 집계정보 조회
|
||
|
|
*
|
||
|
|
* @param dataVO arrestSearchVO
|
||
|
|
* @return 선택한 사용자 정보 반환
|
||
|
|
* @throws Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
public ArrestVO getArrestListCountExcel(final ArrestSearchVO arrestSearchVO)
|
||
|
|
throws Exception {
|
||
|
|
|
||
|
|
return arrestMapper.getArrestListCountExcel(arrestSearchVO);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 중국어선 나포정보 목록 조회 (엑셀)
|
||
|
|
*
|
||
|
|
* @param dataVO arrestSearchVO
|
||
|
|
* @return 선택한 사용자 정보 반환
|
||
|
|
* @throws Exception 기본 예외 처리
|
||
|
|
*/
|
||
|
|
@Override
|
||
|
|
public List<HashMap<String, Object>> getArrestListExcelHashMap(final ArrestSearchVO arrestSearchVO) throws Exception {
|
||
|
|
|
||
|
|
return arrestMapper.getArrestListExcelHashMap(arrestSearchVO);
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
}
|