| | |
| | | .set("local_reason","软件版本升级") |
| | | .eq("board_number",boardNumber) |
| | | .eq("type",type) |
| | | .ne("lock_flag",-1) |
| | | .in("apply_material_code",materialCodeList); |
| | | mapper.update(null,update); |
| | | } |
| | |
| | | software2.setFileUrl(softwareDB.getFileUrl()); |
| | | software2.setExcelUrl(softwareHttpUrl + File.separator + originalFilename); |
| | | software2.setCreateTime(new Date()); |
| | | software2.setLockFlag(-1); |
| | | }); |
| | | mapper.insertBatchSomeColumn(softwareList); |
| | | |
| | |
| | | if(lockFlag ==0){ |
| | | //只有李桂华才能解锁 待测试锁定的软件 |
| | | QueryWrapper<Software> query = Wrappers.query(); |
| | | query.eq("file_url",fileUrl).last(" limit 1"); |
| | | Software softwareInDB = mapper.selectOne(query); |
| | | query.eq("file_url",fileUrl); |
| | | List<Software> softwareListInDB = mapper.selectList(query); |
| | | Software softwareInDB = softwareListInDB.get(0); |
| | | if(softwareInDB.getLockFlag() == -1){ |
| | | if(!userName.equals("李桂华")){ |
| | | return new Response().set(1,false,"无权限解锁 待测试的软件"); |
| | | } |
| | | //if(!userName.equals("李桂华")){ |
| | | // return new Response().set(1,false,"无权限解锁 待测试的软件"); |
| | | //}else{ |
| | | //锁定原来的所有版本:根据版号和软件类型,排除待测试版本 |
| | | List<String> materialCodeList = softwareListInDB.stream().map(Software::getApplyMaterialCode).collect(Collectors.toList()); |
| | | lockByBoardNumberAndTypeAndMaterialCode(softwareInDB.getBoardNumber(),softwareInDB.getType(),materialCodeList); |
| | | |
| | | //} |
| | | } |
| | | } |
| | | UpdateWrapper uwrapper=new UpdateWrapper(); |