package com.artfess.data.controller; import com.artfess.base.annotation.ApiGroup; import com.artfess.base.constants.ApiGroupConsts; import com.artfess.base.controller.BaseController; import com.artfess.base.enums.ResponseErrorEnums; import com.artfess.base.exception.RequiredException; import com.artfess.base.model.CommonResult; import com.artfess.base.query.PageList; import com.artfess.base.query.QueryFilter; import com.artfess.base.util.DictionaryUtils; import com.artfess.base.valid.AddGroup; import com.artfess.data.manager.BizTrainEquipmentDetailManager; import com.artfess.data.model.BizExamIndexData; import com.artfess.data.model.BizTrainEquipmentDetail; import com.artfess.poi.util.ExcelUtils; import com.artfess.poi.util.FileDownloadUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.extern.slf4j.Slf4j; import org.springframework.core.io.ClassPathResource; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; 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.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.List; /** * 训练器材使用明细 前端控制器 * * @company 阿特菲斯信息技术有限公司 * @author min.wu * @since 2024-11-14 */ @Slf4j @RestController @Api(tags = "训练数据-训练器材使用明细") @RequestMapping("/biz/trainEquipment/detail/") @ApiGroup(group = {ApiGroupConsts.GROUP_BIZ}) public class BizTrainEquipmentDetailController extends BaseController { @Override @PostMapping("/") @ApiOperation("添加实体的接口") public CommonResult create(@ApiParam(name="model", value="实体信息") @RequestBody @Validated({AddGroup.class}) BizTrainEquipmentDetail t) { boolean result = baseService.saveInfo(t); if(!result) { return new CommonResult<>(ResponseErrorEnums.FAIL_OPTION, null); } return new CommonResult<>(); } }