package com.prolog.rdc.tms.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
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.model.vo.CustomerSignVO;
import com.prolog.rdc.tms.service.ShipbillCommonService;

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


/**
 * @author yaohai
 * @version v1.0.0
 * @since 2023/09/15 09:09
 **/
@RestController
@Api(tags = "运单公共接口")
@RequestMapping("/shipbillCommon")
public class ShipbillCommonController {

    @Autowired
    private ShipbillCommonService shipbillCommonService;

    @UserLog("运单签收同步")
    @ApiOperation(value = "运单签收同步", notes = "运单签收同步")
    @PostMapping("/customerSign")
    public RestMessage<Object> customerSign (@RequestBody CustomerSignVO customerSignVO) {
        try {
        	shipbillCommonService.customerSign(customerSignVO);
			return RestMessage.newInstance(true, "成功", null);
		} catch (Exception e) {
			e.printStackTrace();
			return RestMessage.newInstance(false, e.getMessage(), null);
		}

    }
}
