diff --git a/fuintAdmin/src/views/staff/tag/list.vue b/fuintAdmin/src/views/staff/tag/list.vue index 46aebdda7..b59684e76 100644 --- a/fuintAdmin/src/views/staff/tag/list.vue +++ b/fuintAdmin/src/views/staff/tag/list.vue @@ -32,13 +32,13 @@ - + @@ -46,12 +46,12 @@ - + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java index aeeaa55ea..3eb99c4ad 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/controller/TagCodeRecordController.java @@ -49,6 +49,9 @@ public class TagCodeRecordController extends BaseController { @Resource private OilTagService oilTagService; + @Resource + private TagCodeService tagCodeService; + @Resource private ILJStaffService mtStaffService; @@ -80,6 +83,7 @@ public class TagCodeRecordController extends BaseController { tagCodeRecord.setId(tagCodeRecordDTO.getId()); tagCodeRecord.setStaffId(tagCodeRecordDTO.getStaffId()); tagCodeRecord.setStaffName(ljStaff.getRealName()); + tagCodeService.selectByTagCodeSn(tagCodeRecordDTO.getTagCodeSn()); return getSuccessResult(this.tagCodeRecordService.updateById(tagCodeRecord)); } // 一键解绑 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/TagCodeService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/TagCodeService.java index 5e5493ce3..76f673351 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/TagCodeService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/TagCodeService.java @@ -20,5 +20,7 @@ public interface TagCodeService extends IService { ResponseEntity add(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception; ResponseEntity exportZip(TagCodeDTO tagCodeDTO, HttpServletRequest request, HttpServletResponse response) throws Exception; + + TagCode selectByTagCodeSn(String tagCodeSn); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeServiceImpl.java index 5d6ecba99..ac3bacba4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeServiceImpl.java @@ -165,80 +165,13 @@ public class TagCodeServiceImpl extends ServiceImpl impl return ResponseEntity.ok() .body(new InputStreamResource(zipInputStream)); -// boolean flag = false; -// if (ObjectUtils.isNotEmpty(tagCodeDTO) && ObjectUtils.isNotEmpty(tagCodeDTO.getTotal())){ -// int total = tagCodeDTO.getTotal(); -// Random random1 = new Random(); -// int i2 = random1.nextInt(1000); -// for (int i = 0; i < total; i++) { -// Random random = new Random(); -// int i1 = random.nextInt(90000000); -// //String url = "https://oil.youkerr.com/"; -// String url = "https://www.tuofeng.cc/oilRefuel?sn=byx"+i1; -// // String finalPath="/temp/qrCode/" + oilTag.getSnCode() + ".jpg"; -// //String finalPath="D:\\office\\document\\photos\\tagCode\\"+"str"+i+".jpg"; -// //String finalPath="/temp/tagCode/" + "byx"+i1 + ".jpg"; -// //String finalPath="/temp/tagCode/"+ DateUtil.formatDate(new Date(), "yyyyMMdd") + "/"+i2 + "byx"+i1 + ".jpg"; -// -// TagCode tagCode = new TagCode(); -// -// tagCode.setCollection(url); -// tagCode.setTagCodeSn("byx"+i1); -// tagCode.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString())); -// -// //在图片上生成二维码 -// String backgroundImage = "static/qrCodeImg/huanyingguanglin.jpg"; -// InputStream backgroundStream = this.getClass().getClassLoader().getResourceAsStream(backgroundImage); -// String urls = ""; -// urls = "/temp/tagCode/"+ DateUtil.formatDate(new Date(), "yyyyMMdd") + "-"+i2; -// File file1 = new File(urls); -// // String finalPath="/temp/tagCode/" + "byx"+i1 + ".jpg"; -// String finalPath=urls+"/" + "byx"+i1 + ".jpg"; -// qrCodeUtils.createLogoCodePictures(null, url, finalPath, null,null,urls); -// -// -// // 判断目录是否存在 -// if (!file1.exists()) { -// file1.mkdirs(); -// } -// -// File file =new File(finalPath); -// FileInputStream fileInputStream =new FileInputStream(file); -// // FileInputStream fileInputStream =new FileInputStream(file1); -// MultipartFile resFile = new MockMultipartFile("file", file.getName(), null, fileInputStream); -//// 返回图片路径 -// String saveFile = backendFileController.saveFile(resFile); -// //return saveFile; -// tagCode.setImageUrl(saveFile); -// flag = save(tagCode); -// } -// -// //导出码牌 -// //String IMAGE_DIRECTORY = "D:\\temp\\tagCode\\"+DateUtil.formatDate(new Date(), "yyyyMMdd")+"-"+i2; -// String IMAGE_DIRECTORY = "/temp/tagCode/"+DateUtil.formatDate(new Date(), "yyyyMMdd")+"-"+i2; -// -// List imageFiles = getImageFiles(IMAGE_DIRECTORY); -// InputStream zipInputStream = createZipInputStream(imageFiles); -// -// response.setHeader("Content-Disposition", "attachment; filename=\"images.zip\""); -// -// return ResponseEntity.ok() -// .body(new InputStreamResource(zipInputStream)); -// }else { -// InputStream inputStream = new InputStream() { -// @Override -// public int read() throws IOException { -// return 0; -// } -// }; -// return ResponseEntity.ok() -// .body(new InputStreamResource(inputStream)); -// } - - - //String IMAGE_DIRECTORY = "D:\\temp\\qrCode\\DateUtil.formatDate(new Date(), \"yyyyMMdd\") +"; - + } + @Override + public TagCode selectByTagCodeSn(String tagCodeSn) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(TagCode::getTagCodeSn, tagCodeSn) + return null; } private List getImageFiles(String directory) { diff --git a/gasStation-uni/pagesHome/MyCard/MyCard.vue b/gasStation-uni/pagesHome/MyCard/MyCard.vue index 6103d909a..af8fea5c5 100644 --- a/gasStation-uni/pagesHome/MyCard/MyCard.vue +++ b/gasStation-uni/pagesHome/MyCard/MyCard.vue @@ -56,9 +56,9 @@ 电子囤油卡 - {{cardsList[cardsIndex].type || '暂无囤油'}}:{{cardsList[cardsIndex].refuelMoney || '0'}}L +