| | |
| | | import com.whyc.dto.FileDirPath; |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.mapper.SoftwareMapper; |
| | | import com.whyc.pojo.AttachLock; |
| | | import com.whyc.pojo.DocUser; |
| | | import com.whyc.pojo.Software; |
| | | import com.whyc.util.ActionUtil; |
| | |
| | | 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,"软件信息返回"); |
| | | } |
| | |
| | | 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,"锁定/解锁成功"); |
| | | } |
| | | } |