package com.brilliance.isc.common.doctre.controller;

import com.brilliance.isc.common.doctre.service.DoctreService;
import com.brilliance.isc.common.doctre.vo.DoctreRequestVo;
import com.brilliance.isc.common.doctre.vo.DoctreResponseVo;
import com.brilliance.isc.vo.ResponseSet;
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;

/**
 * 附件組件
 */
@RestController
@RequestMapping("/doctre")
public class DoctreController {

    @Autowired
    private DoctreService doctreService;

    /**
     * 附件试算入口
     *
     */
    @PostMapping("/assertDoctre")
    public ResponseSet<DoctreResponseVo> assertDoctre(@RequestBody DoctreRequestVo doctreRequestVo) {
        DoctreResponseVo doctreResponseVo = doctreService.assertDftcre(doctreRequestVo);
        return new ResponseSet<>(doctreResponseVo);
    }
}
