| | |
| | | import org.springblade.mdm.program.service.ProgramAnnotationService; |
| | | import org.springblade.mdm.utils.FileContentUtil; |
| | | import org.springblade.system.pojo.entity.Dict; |
| | | import org.springblade.system.pojo.entity.DictBiz; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | BladeFile bfile = ossTemplate.putFile("replaceok.txt",newins); |
| | | return R.data(bfile.getLink()+","+bfile.getName()); |
| | | } |
| | | |
| | | /* |
| | | @GetMapping("/replace2") |
| | | @ApiOperationSupport(order = 2) |
| | | @Operation(summary = "替换内容2") |
| | |
| | | |
| | | String filename = "CP3-1-1-1.txt"; |
| | | String machineGroup = "FANUC"; |
| | | List<Dict> annoDicts = programAnnotationService.getAnnotionList(); |
| | | List<DictBiz> annoDicts = programAnnotationService.getAnnotionList(); |
| | | BladeFile bfile = null; |
| | | try(InputStream ins = ossTemplate.statFileStream(ossName);){ |
| | | byte[] bytes = IOUtils.toByteArray(ins); |
| | |
| | | //flowProgramFile.setOssName(bfile.getName()); |
| | | } |
| | | } |
| | | /* |
| | | |
| | | InputStream ins = ossTemplate.statFileStream(ossName); |
| | | InputStream newins = FileContentUtil.replaceAtLine(fis,2,"GHTEST"); |
| | | |
| | | BladeFile bfile = ossTemplate.putFile("replaceok.txt",newins); |
| | | |
| | | */ |
| | | |
| | | return R.data(bfile.getLink()+","+bfile.getName()); |
| | | } |
| | | |
| | | */ |
| | | } |