/**
 * date : 2022. 4. 25.
 * auth : ckr
 * desc : 고객 관리
 */
package kr.co.uplus.ez.api.custMgt;

import java.util.Map;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import kr.co.uplus.ez.api.custMgt.dto.AdminInfoReqDto;
import kr.co.uplus.ez.api.custMgt.dto.AdminInfoResDto;
import kr.co.uplus.ez.api.custMgt.dto.AllMemoListReqDto;
import kr.co.uplus.ez.api.custMgt.dto.AllMemoListResDto;
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListReqDto;
import kr.co.uplus.ez.api.custMgt.dto.CarryOverListResDto;
import kr.co.uplus.ez.api.custMgt.dto.ChrgDetailReqDto;
import kr.co.uplus.ez.api.custMgt.dto.ChrgDetailResDto;
import kr.co.uplus.ez.api.custMgt.dto.ChrgListReqDto;
import kr.co.uplus.ez.api.custMgt.dto.ChrgListResDto;
import kr.co.uplus.ez.api.custMgt.dto.DeleteChrgReqDto;
import kr.co.uplus.ez.api.custMgt.dto.DeleteChrgResDto;
import kr.co.uplus.ez.api.custMgt.dto.DeleteMemoReqDto;
import kr.co.uplus.ez.api.custMgt.dto.DeleteMemoResDto;
import kr.co.uplus.ez.api.custMgt.dto.DeleteUserReqDto;
import kr.co.uplus.ez.api.custMgt.dto.DeleteUserResDto;
import kr.co.uplus.ez.api.custMgt.dto.InsertChrgReqDto;
import kr.co.uplus.ez.api.custMgt.dto.InsertChrgResDto;
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserReqDto;
import kr.co.uplus.ez.api.custMgt.dto.InsertMassUserResDto;
import kr.co.uplus.ez.api.custMgt.dto.InsertTestIdReqDto;
import kr.co.uplus.ez.api.custMgt.dto.InsertTestIdResDto;
import kr.co.uplus.ez.api.custMgt.dto.InsertUserReqDto;
import kr.co.uplus.ez.api.custMgt.dto.InsertUserResDto;
import kr.co.uplus.ez.api.custMgt.dto.MemberAdminDetailReqDto;
import kr.co.uplus.ez.api.custMgt.dto.MemberAdminDetailResDto;
import kr.co.uplus.ez.api.custMgt.dto.MemberDetailReqDto;
import kr.co.uplus.ez.api.custMgt.dto.MemberDetailResDto;
import kr.co.uplus.ez.api.custMgt.dto.MemberListReqDto;
import kr.co.uplus.ez.api.custMgt.dto.MemberListResDto;
import kr.co.uplus.ez.api.custMgt.dto.SubsDetailReqDto;
import kr.co.uplus.ez.api.custMgt.dto.SubsDetailResDto;
import kr.co.uplus.ez.api.custMgt.dto.SubsListExcelReqDto;
import kr.co.uplus.ez.api.custMgt.dto.SubsListExcelResDto;
import kr.co.uplus.ez.api.custMgt.dto.SubsListReqDto;
import kr.co.uplus.ez.api.custMgt.dto.SubsListResDto;
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoReqDto;
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoResDto;
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalReqDto;
import kr.co.uplus.ez.api.custMgt.dto.UpdateAdminInfoTotalResDto;
import kr.co.uplus.ez.api.custMgt.dto.UpdateChrgReqDto;
import kr.co.uplus.ez.api.custMgt.dto.UpdateChrgResDto;
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserReqDto;
import kr.co.uplus.ez.api.custMgt.dto.UpdateUserResDto;
import kr.co.uplus.ez.api.custMgt.dto.UserListReqDto;
import kr.co.uplus.ez.api.custMgt.dto.UserListResDto;
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListExcelReqDto;
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListExcelResDto;
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListReqDto;
import kr.co.uplus.ez.api.custMgt.dto.UserLmtListResDto;
import kr.co.uplus.ez.common.components.ValidComponents;
import kr.co.uplus.ez.common.data.ApiResponseCode;
import kr.co.uplus.ez.common.data.ApiResponseMessage;
import lombok.val;

/**
 * 고객관리 Controller.
 *
 * @author rejoice.
 *
 */
@RestController
@RequestMapping(value = "api/v1/bo/custMgt")
public class CustMgtController {

	private static final Logger logger = LoggerFactory.getLogger(CustMgtController.class);

	@Autowired
	CustMgtService custService;

	@Autowired
	ValidComponents validComponents;

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 청약 고객 정보 목록 조회
	 *
	 * @param subsListReqDto
	 * @return SubsListResDto
	 * @
	 */
	@ApiOperation(value = "subsList", notes = "청약 고객 정보 목록 조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/subsList" , method = {RequestMethod.POST})
	@ResponseBody
	public SubsListResDto subsList(@RequestBody @Valid SubsListReqDto subsListReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new SubsListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.subsList(subsListReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 청약 고객 정보 목록 엑셀 다운로드
	 *
	 * @param subsListExcelReqDto
	 * @return SubsListExcelResDto
	 * @
	 */
	@ApiOperation(value = "subsListExcel", notes = "청약 고객 정보 목록 엑셀 다운로드")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/subsListExcel" , method = {RequestMethod.POST})
	@ResponseBody
	public SubsListExcelResDto subsListExcel(@RequestBody @Valid SubsListExcelReqDto subsListExcelReqDto, BindingResult bindingResult) {

		if(validComponents.validParameter(bindingResult)) {
			return new SubsListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}

		return custService.subsListExcel(subsListExcelReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 청약 정보 상세 조회
	 *
	 * @param subsDetailReqDto
	 * @return SubsDetailResDto
	 * @
	 */
	@ApiOperation(value = "subsDetail", notes = "청약 정보 상세 조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/subsDetail" , method = {RequestMethod.POST})
	@ResponseBody
	public SubsDetailResDto subsDetail(@RequestBody @Valid SubsDetailReqDto subsDetailReqDto, BindingResult bindingResult) {

		if(validComponents.validParameter(bindingResult)) {
			return new SubsDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}

		return custService.subsDetail(subsDetailReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 관리자명 조회
	 * @param adminInfoReqDto
	 * @return AdminInfoResDto
	 * @
	 */
	@RequestMapping(value = "/adminInfo" , method = {RequestMethod.POST})
	@ResponseBody
	public AdminInfoResDto adminInfo(@RequestBody @Valid AdminInfoReqDto adminInfoReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new AdminInfoResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.adminInfo(adminInfoReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 관리자ID, 관리자명 수정
	 * @param adminInfoReqDto
	 * @return AdminInfoResDto
	 * @
	 */
	@ApiOperation(value = "updateAdminInfo", notes = "관리자 정보 수정")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/updateAdminInfo" , method = {RequestMethod.POST})
	@ResponseBody
	public UpdateAdminInfoResDto updateAdminInfo(@RequestBody @Valid UpdateAdminInfoReqDto updateAdminInfoReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new UpdateAdminInfoResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.updateAdminInfo(updateAdminInfoReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 이월금액 목록 조회
	 *
	 * @param carryOverListReqDto
	 * @return CarryOverListResDto
	 * @
	 */
	@ApiOperation(value = "carryOverList", notes = "이월금액 목록 조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/carryOverList" , method = {RequestMethod.POST})
	@ResponseBody
	public CarryOverListResDto carryOverList(@RequestBody @Valid CarryOverListReqDto carryOverListReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new CarryOverListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.carryOverList(carryOverListReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 회원목록조회
	 * @param memberListReqDto
	 * @return MemberListResDto
	 * @
	 */
	@ApiOperation(value = "memberList", notes = "회원목록조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/memberList" , method = {RequestMethod.POST})
	@ResponseBody
	public MemberListResDto memberList(@RequestBody @Valid MemberListReqDto memberListReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new MemberListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.memberList(memberListReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 회원 정보 상세 조회
	 * @param paramMap
	 * @return
	 * @
	 */
	@ApiOperation(value = "memberDetail", notes = "회원 정보 상세 조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/memberDetail" , method = {RequestMethod.POST})
	@ResponseBody
	public MemberDetailResDto memberDetail(@RequestBody @Valid MemberDetailReqDto memberDetailReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new MemberDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.memberDetail(memberDetailReqDto);
	}


	/**
	 * 	관리자 회원 상세 보기.
	 * @param memberDetailListReqDto
	 * @param bindingResult
	 * @return MemberDetailListResDto
	 */
	@ApiOperation(value = "memberAdminDetail", notes = "회원 정보(관리자) 상세 조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/memberAdminDetail" , method = {RequestMethod.POST})
	@ResponseBody
	public MemberAdminDetailResDto memberAdminDetail(@RequestBody @Valid MemberAdminDetailReqDto memberAdminDetailReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new MemberAdminDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.memberAdminDetail(memberAdminDetailReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 테스트ID 등록
	 * @param paramMap
	 * @return
	 * @
	 */
	@ApiOperation(value = "insertTestId", notes = "테스트ID 등록")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/insertTestId" , method = {RequestMethod.POST})
	@ResponseBody
	public InsertTestIdResDto insertTestId(@RequestBody @Valid InsertTestIdReqDto insertTestIdReqDto, BindingResult bindingResult){
		if(validComponents.validParameter(bindingResult)) {
			return new InsertTestIdResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		try {
			return custService.insertTestId(insertTestIdReqDto);
		}catch(Exception e) {
			logger.info(e.toString());
			return new InsertTestIdResDto(ApiResponseCode.CM_DB_QUERY_ERR);
		}
		
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 전체 메모 목록 조회
	 * @param paramMap
	 * @return
	 * @
	 */
	@ApiOperation(value = "allMemoList", notes = "전체 메모 목록 조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/allMemoList" , method = {RequestMethod.POST})
	@ResponseBody
	public AllMemoListResDto allMemoList(@RequestBody @Valid AllMemoListReqDto allMemoListReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new AllMemoListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.allMemoList(allMemoListReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 메모 삭제
	 * @param paramMap
	 * @return
	 * @
	 */
	@ApiOperation(value = "deleteMemo", notes = "메모 삭제")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/deleteMemo" , method = {RequestMethod.POST})
	@ResponseBody
	public DeleteMemoResDto deleteMemo(@RequestBody @Valid DeleteMemoReqDto deleteMemoReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new DeleteMemoResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.deleteMemo(deleteMemoReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 사용자 정보 등록
	 * @param paramMap
	 * @return
	 * @
	 */
	@ApiOperation(value = "insertUser", notes = "사용자 정보 등록")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/insertUser" , method = {RequestMethod.POST})
	@ResponseBody
	public InsertUserResDto insertUser(@RequestBody @Valid InsertUserReqDto insertUserReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new InsertUserResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.insertUser(insertUserReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 사용자 정보 수정
	 * @param paramMap
	 * @return
	 * @
	 */
	@ApiOperation(value = "updateUser", notes = "사용자 정보 수정")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/updateUser" , method = {RequestMethod.POST})
	@ResponseBody
	public UpdateUserResDto updateUser(@RequestBody @Valid UpdateUserReqDto updateUserReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new UpdateUserResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.updateUser(updateUserReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 사용자ID 대량등록
	 * @param paramMap
	 * @return
	 * @
	 */
	@ApiOperation(value = "insertMassUser", notes = "사용자ID 대량등록")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/insertMassUser" , method = {RequestMethod.POST})
	@ResponseBody
	public InsertMassUserResDto insertMassUser(@RequestBody @Valid InsertMassUserReqDto insertMassUserReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new InsertMassUserResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.insertMassUser(insertMassUserReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 사용자 정보 삭제
	 * @param paramMap
	 * @return
	 * @
	 */
	@ApiOperation(value = "/deleteUser", notes = "사용자 정보 수정")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/deleteUser" , method = {RequestMethod.POST})
	@ResponseBody
	public DeleteUserResDto deleteUser(@RequestBody @Valid DeleteUserReqDto deleteUserReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new DeleteUserResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.deleteUser(deleteUserReqDto);
	}

	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 관리자 정보 수정
	 * @param paramMap
	 * @return
	 * @
	 */
	@RequestMapping(value = "/updateMember" , method = {RequestMethod.POST})
	@ResponseBody
	public ApiResponseMessage updateMember(@RequestBody Map<String, Object> paramMap) {
		return custService.updateMember(paramMap);
	}
	
	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 관리자 정보(종합) 수정
	 * @param UpdateAdminInfoTotalReqDto
	 * @return UpdateAdminInfoTotalResDto
	 * @
	 */
	@ApiOperation(value = "updateAdminInfoTotal", notes = "관리자 정보(종합) 수정")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/updateAdminInfoTotal" , method = {RequestMethod.POST})
	@ResponseBody
	public UpdateAdminInfoTotalResDto updateAdminInfoTotal(@RequestBody @Valid UpdateAdminInfoTotalReqDto updateAdminInfoTotalReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new UpdateAdminInfoTotalResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.updateAdminInfoTotal(updateAdminInfoTotalReqDto);
	}
	
	
	/**
	 * date : 2022. 8. 31.
	 * auth : ckr
	 * desc : 사용자 ID 중복 체크
	 * @param paramMap
	 * @return
	 * @
	 */
	@RequestMapping(value = "/duplicateCheckUserId" , method = {RequestMethod.POST})
	@ResponseBody
	public InsertUserResDto duplicateCheckUserId(@RequestBody @Valid InsertUserReqDto insertUserReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new InsertUserResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.duplicateCheckUserId(insertUserReqDto);
	}
	
	/**
	 * date : 2023. 3. 15.
	 * auth : won
	 * desc : 충전관리 목록 조회
	 * @param ChrgListReqDto
	 * @return ChrgListResDto
	 * @
	 */
	@ApiOperation(value="chrgList", notes = "충전관리 목록 조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value="/chrgList", method = {RequestMethod.POST})
	@ResponseBody
	public ChrgListResDto chrgList(@RequestBody @Valid ChrgListReqDto chrgListReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new ChrgListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.chrgList(chrgListReqDto);
	}
	
	/**
	 * date : 2023. 3. 15.
	 * auth : won
	 * desc : 충전관리 상세 조회
	 * @param ChrgDetailReqDto
	 * @return ChrgDetailResDto
	 * @
	 */
	@ApiOperation(value="chrgDetail", notes = "충전관리 목록 조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value="/chrgDetail", method = {RequestMethod.POST})
	@ResponseBody
	public ChrgDetailResDto chrgDetail(@RequestBody @Valid ChrgDetailReqDto chrgDetailReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new ChrgDetailResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.chrgDetail(chrgDetailReqDto);
	}
	
	/**
	 * date : 2022. 4. 25.
	 * auth : ckr
	 * desc : 유저ID 목록 조회
	 * @param adminListReqDto
	 */
	@ApiOperation(value = "/userList", notes = "관리자ID 목록 조회")
	@ApiResponses({ @ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS") })
	@RequestMapping(value = "userList", method = { RequestMethod.POST })
	@ResponseBody
	public UserListResDto userList(@RequestBody @Valid UserListReqDto userListReqDto, BindingResult bindingResult) {

		if (validComponents.validParameter(bindingResult)) {
			return new UserListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}

		return custService.userList(userListReqDto);
	}
	
	/**
	 * date : 2023. 3. 15.
	 * auth : won
	 * desc : 충전관리 등록
	 * @param paramMap
	 * @return 
	 * @
	 */
	@ApiOperation(value="insertChrg", notes = "충전관리 등록")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value="/insertChrg", method= {RequestMethod.POST})
	@ResponseBody
	public InsertChrgResDto insertChrg (@RequestBody @Valid InsertChrgReqDto insertChrgReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new InsertChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.InsertChrg(insertChrgReqDto);
	}
	
	
	/**
	 * date : 2023. 3. 15.
	 * auth : won
	 * desc : 충전관리 수정
	 * @param paramMap
	 * @return 
	 */
	@ApiOperation(value="updateChrg", notes = "충전관리 수정")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value="/updateChrg", method= {RequestMethod.POST})
	@ResponseBody
	public UpdateChrgResDto updateChrg(@RequestBody @Valid UpdateChrgReqDto updateChrgReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new UpdateChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.UpdateChrg(updateChrgReqDto);
	}
	
	/**
	 * date : 2023. 3. 15.
	 * auth : won
	 * desc : 충전관리 삭제
	 * @param paramMap
	 * @return 
	 */
	@ApiOperation(value="deleteChrg", notes = "충전관리 수정")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value="/deleteChrg", method= {RequestMethod.POST})
	@ResponseBody
	public DeleteChrgResDto deleteChrg(@RequestBody @Valid DeleteChrgReqDto deleteChrgReqDto, BindingResult bindingResult) {
		
		logger.debug("deleteChrgReqDto={}",deleteChrgReqDto.getList());
		logger.debug("deleteChrgReqDto={}",deleteChrgReqDto.getList().get(0));
		
		if(validComponents.validParameter(bindingResult)) {
			return new DeleteChrgResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.DeleteChrg(deleteChrgReqDto);
	}
	
	
	/*2023-03-07 add request 부분
	 * 
	 * date : 2023. 1. 1.
	 * auth : won
	 * desc : 요금제 구매 내역 목록 조회
	 * @param UserLmtListReqDto 
	 * @return UserLmtListRestDto
	 * @
	 
	@ApiOperation(value = "BLNCList", notes = "요금제 구매 내역 목록 조회")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/BLNCList" , method = {RequestMethod.POST})
	@ResponseBody
	public UserLmtListResDto BLNCList(@RequestBody @Valid UserLmtListReqDto userLmtListReqDto, BindingResult bindingResult) {
		if(validComponents.validParameter(bindingResult)) {
			return new UserLmtListResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}
		return custService.BLNCList(userLmtListReqDto);
	}
	
	
	 * date : 2023. 1. 1.
	 * auth : won
	 * desc : 요금제 구매 내역 정보 목록 엑셀 다운로드
	 *
	 * @param userLmtListExcelReqDto
	 * @return UserLmtListExcelResDto
	 * @
	 
	@ApiOperation(value = "BLNCListExcel", notes = "청약 고객 정보 목록 엑셀 다운로드")
	@ApiResponses({
		@ApiResponse(code = HttpServletResponse.SC_OK, message = "SUCESS")
	})
	@RequestMapping(value = "/BLNCListExcel" , method = {RequestMethod.POST})
	@ResponseBody
	public UserLmtListExcelResDto BLNCListExcel(@RequestBody @Valid UserLmtListExcelReqDto userLmtListExcelReqDto, BindingResult bindingResult) {

		if(validComponents.validParameter(bindingResult)) {
			return new UserLmtListExcelResDto(ApiResponseCode.CM_PARAMETER_ERROR);
		}

		return custService.userLmtListExcel(userLmtListExcelReqDto);
	}
	*/
}
