| | |
| | | import com.whyc.service.MaterialService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.openxml4j.exceptions.InvalidFormatException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | return service.addAttachment(multipartFileList,material); |
| | | } |
| | | |
| | | @ApiModelProperty("物料图纸对比") |
| | | @ApiOperation("物料图纸对比") |
| | | @GetMapping("dwgCompare") |
| | | public Response dwgCompare(@RequestParam int materialId,@RequestParam int materialId2) throws IOException { |
| | | return service.dwgCompare(materialId,materialId2); |
| | | } |
| | | |
| | | /**物料id-物料编码-物料型号*/ |
| | | @ApiOperation(value = "更新图片或者图纸",notes = "materialStr为json字符串,包含id,subCode,subModel") |
| | | @PutMapping("picOrDwg") |
| | | public Response updatePicOrDwg(@RequestParam String materialStr, @RequestPart MultipartFile file) throws IOException { |
| | | Material material = ActionUtil.getGson().fromJson(materialStr, Material.class); |
| | | return service.updatePicOrDwg(file,material); |
| | | } |
| | | } |