| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.Material; |
| | | import com.whyc.service.MaterialService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.openxml4j.exceptions.InvalidFormatException; |
| | |
| | | public Response getMaterialVersion(@RequestParam String subModel){ |
| | | return service.getMaterialVersion(subModel); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据物料id查询物料信息",notes = "9.3修改后使用") |
| | | @GetMapping("getMaterialById") |
| | | public Response getMaterialById(@RequestParam int materialId){ |
| | | return service.getMaterialById(materialId); |
| | | } |
| | | |
| | | /**物料id-物料编码-物料型号*/ |
| | | @ApiOperation(value = "追加附件",notes = "materialStr为json字符串,包含id,subCode,subModel") |
| | | @PostMapping("attachment") |
| | | public Response addAttachment(@RequestParam MultipartFile multipartFile,@RequestParam String materialStr) throws IOException { |
| | | Material material = ActionUtil.getGson().fromJson(materialStr, Material.class); |
| | | return service.addAttachment(multipartFile,material); |
| | | } |
| | | } |