| | |
| | | common.setBasedVersion(sheet.getRow(5).getCell(4).getStringCellValue()); |
| | | |
| | | common.setOwner(sheet.getRow(6).getCell(2).getStringCellValue()); |
| | | common.setFilingDate(sheet.getRow(6).getCell(4).getStringCellValue()); |
| | | Cell cellFilingDate = sheet.getRow(6).getCell(4); |
| | | if(cellFilingDate.getCellType() == Cell.CELL_TYPE_NUMERIC){ |
| | | Date dateCellValue = cellFilingDate.getDateCellValue(); |
| | | common.setFilingDate(DateUtil.YYYY_MM_DD.format(dateCellValue)); |
| | | System.out.println(dateCellValue); |
| | | }else { |
| | | cellFilingDate.setCellType(Cell.CELL_TYPE_STRING); |
| | | common.setFilingDate(cellFilingDate.getStringCellValue()); |
| | | } |
| | | //最后一行,取发布说明 |
| | | common.setReleaseNotes(sheet.getRow(lastRowNum).getCell(2).getStringCellValue()); |
| | | |
| | |
| | | |
| | | } |
| | | //查询软件列表的信息 |
| | | public Response getAllSoftware(String fileName,String applyMaterialCode,String applyModel,String owner, int pageCurr, int pageSize) { |
| | | public Response getAllSoftware(String fileName,String applyMaterialCode,String applyModel,String owner, String boardNumber,int pageCurr, int pageSize) { |
| | | PageHelper.startPage(pageCurr,pageSize); |
| | | List list=mapper.getFileUrl(fileName,applyMaterialCode,applyModel,owner); |
| | | List list=mapper.getFileUrl(fileName,applyMaterialCode,applyModel,owner,boardNumber); |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"软件信息返回"); |
| | | } |
| | |
| | | logService.recordOperationLog(docUser.getId(),docUser.getName(), UserOperation.TYPE_DOWNLOAD.getType(),new Date(),terminalIp,opreationMsg,operationDetail); |
| | | } |
| | | |
| | | public Response upload(MultipartFile file1, MultipartFile file2, List<Software> softwareList) throws IOException { |
| | | public Response upload(MultipartFile file1, MultipartFile file2, String fontUpdateTime, List<Software> softwareList) throws IOException { |
| | | String file1Name = file1.getOriginalFilename(); |
| | | String file2Name = file2.getOriginalFilename(); |
| | | Software software = softwareList.get(0); |
| | |
| | | file2.transferTo(new File(softwareDir+File.separator+file2Name)); |
| | | //设置路径 |
| | | for (Software software1:softwareList){ |
| | | software1.setFontUpdateTime(fontUpdateTime); |
| | | software1.setFileUrl(softwareHttpUrl+File.separator+file1Name); |
| | | software1.setExcelUrl(softwareHttpUrl+File.separator+file2Name); |
| | | software1.setCreateTime(date); |
| | |
| | | return new Response().set(1,true,"更新完成"); |
| | | } |
| | | } |
| | | //根据软件id修改软件锁定状态 |
| | | public Response updateSoftwareLock(String fileUrl,int lockFlag,String localReason) { |
| | | UpdateWrapper uwrapper=new UpdateWrapper(); |
| | | uwrapper.set("lock_flag",lockFlag); |
| | | uwrapper.set("local_reason",localReason); |
| | | uwrapper.eq("file_url",fileUrl); |
| | | int flag=mapper.update(null,uwrapper); |
| | | return new Response().set(1,flag>0,"锁定/解锁成功"); |
| | | } |
| | | } |