| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | return new Response().set(1,false,"文件名,文件类型,版本,负责人,归档日期,物料编码,规格型号 中至少有一项为空"); |
| | | } |
| | | |
| | | //校验规格书文件名称=说明书中的文件名称+版本号 |
| | | //校验规格书附件名称=说明书中的文件名称+版本号 |
| | | String fileNameUnion = specification.getFileName() + specification.getVersion(); |
| | | String excelName = file2Name.substring(0,file2Name.lastIndexOf(".")); |
| | | if(!(fileNameUnion).equals(excelName)){ |
| | | return new Response().set(1,false,"技术规格书excel的命名与excel内的文件名+版本号称不一致"); |
| | | String attachmentName = file1Name.substring(0,file1Name.lastIndexOf(".")); |
| | | if(!(fileNameUnion).equals(attachmentName)){ |
| | | return new Response().set(1,false,"附件的命名与技术规格书excel内的文件名+版本号称不一致"); |
| | | } |
| | | //校验负责人是否存在 |
| | | boolean checkExists = userService.checkExists(specification.getOwner()); |