| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.Material; |
| | | import com.whyc.service.MaterialService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.openxml4j.exceptions.InvalidFormatException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = "物料管理") |
| | |
| | | return service.getMaterialLimit(subCode,subName,subModel,pageCurr,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "test") |
| | | @PostMapping("test") |
| | | public List test(@RequestBody List<String> codeList){ |
| | | return service.getListByCodeList(codeList); |
| | | @PostMapping |
| | | @ApiOperation(value = "新增",notes = "解析返回的绝对路径,需要回传到字段fileUrl") |
| | | public Response add(@RequestBody List<Material> materialList){ |
| | | return service.add(materialList); |
| | | } |
| | | |
| | | @PostMapping("zipParse") |
| | | @ApiOperation("zip解析") |
| | | public Response zipParse(MultipartFile file) throws IOException, InvalidFormatException { |
| | | return service.zipParse(file); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据物料id查询返回附件文件夹下所有的文件列表",notes = "9.3修改后使用") |
| | | @GetMapping("getAttachByMaterialId") |
| | | public Response getAttachByMaterialId(@RequestParam int materialId){ |
| | | return service.getAttachByMaterialId(materialId); |
| | | } |
| | | } |