package com.prolog.rdc.tms.controller.fleetManagement;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.log.aop.annotation.UserLog;
import com.prolog.rdc.tms.service.fleetManagement.PaperService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 
 *
 * 车队管理-证件资料控制层
 *
 * @className :PaperController
 * @author :fanzw
 * @creationTime :2022/04/01
 * @description :
 *
 * @modifier :fanzw
 * @modifyTime :2022/04/01
 * @reviseRemarks:
 *
 * @version :1.0.0
 *
 */
@Api(tags = "车队管理-证件资料控制层")
@RestController
@RequestMapping("/paper")
public class PaperController {

	@Autowired
	private PaperService paperService;

	@UserLog("获取证件ID")
	@ApiOperation(value = "获取证件ID", notes = "获取证件ID")
	@PostMapping("/getPaperId")
	public RestMessage<String> getPaperIdData() {
		try {
			String paperId = paperService.getPaperIdData();
			return RestMessage.newInstance(true, "证件ID获取成功", paperId);
		} catch (Exception e) {
			e.printStackTrace();
			return RestMessage.newInstance(false, e.getMessage(), null);
		}
	}

}
