From 044cf386d50ff618c0a631db21cc9823eb93f6bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Sat, 30 Mar 2024 16:53:20 +0800 Subject: [PATCH] bug --- .../tag/controller/TagCodeRecordController.java | 5 ++++- .../tag/service/impl/TagCodeRecordServiceImpl.java | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) 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 7fdcdd697..47e7c38e3 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 @@ -113,8 +113,11 @@ public class TagCodeRecordController extends BaseController { if (ObjectUtils.isNotEmpty(tagCodeRecord1) && ObjectUtils.isNotEmpty(tagCodeRecord1.getStaffId())){ LJStaff ljStaff = mtStaffService.selectStaffById(Integer.parseInt(tagCodeRecord1.getStaffId())); - ljStaff.setStaffCode(""); + String staffCode = ljStaff.getStaffCode(); + String[] split = staffCode.split("&sn"); + ljStaff.setStaffCode(split[0]); mtStaffService.updateById(ljStaff); + tagCodeRecord1.setStaffId(""); tagCodeRecord1.setStaffName(""); this.tagCodeRecordService.updateById(tagCodeRecord1); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeRecordServiceImpl.java index 18f967763..82225ee70 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/tag/service/impl/TagCodeRecordServiceImpl.java @@ -142,6 +142,16 @@ public class TagCodeRecordServiceImpl extends ServiceImpl queryWrapper2 = new LambdaQueryWrapper<>(); + queryWrapper2.eq(TagCode::getId,oilTag1.getTagCodeId()); + TagCode tagCode = tagCodeService.getOne(queryWrapper2); + String collection = tagCode.getCollection(); + String collectionsss = ""; + String[] sns = collection.split("sn"); + collectionsss = sns[0] + "staffId="+ljStaff.getId()+"&sn="+tagCodeSn; + tagCode.setCollection(collectionsss); + tagCodeService.updateById(tagCode); + tagCodeRecord.setStaffId(tagCodeRecordDTO.getStaffId()); tagCodeRecord.setStaffName(ljStaff.getRealName()); //更新码牌记录表