| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = "物料管理") |
| | |
| | | return service.getAttachByMaterialId(materialId); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "根据物料型号('-','_'之前的部分)查询物料的历史版本",notes = "9.3修改后使用") |
| | | @GetMapping("getMaterialVersion") |
| | | public Response getMaterialVersion(@RequestParam String subModel){ |
| | |
| | | /**物料id-物料编码-物料型号*/ |
| | | @ApiOperation(value = "追加附件",notes = "materialStr为json字符串,包含id,subCode,subModel") |
| | | @PostMapping("attachment") |
| | | public Response addAttachment(@RequestParam MultipartFile multipartFile,@RequestParam String materialStr) throws IOException { |
| | | public Response addAttachment(@RequestParam String materialStr, @RequestParam MultipartFile... file) throws IOException { |
| | | Material material = ActionUtil.getGson().fromJson(materialStr, Material.class); |
| | | return service.addAttachment(multipartFile,material); |
| | | List<MultipartFile> multipartFileList = Arrays.asList(file); |
| | | return service.addAttachment(multipartFileList,material); |
| | | } |
| | | } |