package com.prolog.cs.biz.inbound.controller.rcv;

import com.prolog.cs.biz.inbound.dto.rcv.RcvHeadersProfilesDTO;
import com.prolog.cs.biz.inbound.service.rcv.RcvHeadersProfilesService;
import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.utils.AssertUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName: RcvHeadersProfilesController
 * @Description: 收货入库拓展信息
 * @author Xiong
 * @date 2021年4月19日 下午12:11:17
 */
@Api(tags = "收货(入库)拓展")
@RestController
@RequestMapping("/rcvHeadersProfiles/v1.0")
public class RcvHeadersProfilesController {

	@Resource
	private RcvHeadersProfilesService rcvHeadersProfilesService;

	/**
	 * @Description: 详情查询
	 * @param pkId
	 * @return RcvHeadersProfilesDTO
	 */
	@ApiOperation("详情(主键id)")
	@GetMapping("/findByPkId")
	public RestMessage<RcvHeadersProfilesDTO> findByPkId(String pkId) {
		AssertUtils.isNotBlank(pkId, "收货的主键id不可为空!");
		return RestMessage.newInstance(true, "findByPkIdSuccess", rcvHeadersProfilesService.findByPkId(pkId));
	}
}
