This commit is contained in:
齐天大圣 2024-03-30 16:53:20 +08:00
parent d024f8b8d7
commit 044cf386d5
2 changed files with 14 additions and 1 deletions

View File

@ -113,8 +113,11 @@ public class TagCodeRecordController extends BaseController {
if (ObjectUtils.isNotEmpty(tagCodeRecord1) && ObjectUtils.isNotEmpty(tagCodeRecord1.getStaffId())){ if (ObjectUtils.isNotEmpty(tagCodeRecord1) && ObjectUtils.isNotEmpty(tagCodeRecord1.getStaffId())){
LJStaff ljStaff = mtStaffService.selectStaffById(Integer.parseInt(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); mtStaffService.updateById(ljStaff);
tagCodeRecord1.setStaffId(""); tagCodeRecord1.setStaffId("");
tagCodeRecord1.setStaffName(""); tagCodeRecord1.setStaffName("");
this.tagCodeRecordService.updateById(tagCodeRecord1); this.tagCodeRecordService.updateById(tagCodeRecord1);

View File

@ -142,6 +142,16 @@ public class TagCodeRecordServiceImpl extends ServiceImpl<TagCodeRecordMapper, T
ljStaff.setStaffCode(staffCode); ljStaff.setStaffCode(staffCode);
mtStaffService.updateStaff(ljStaff); mtStaffService.updateStaff(ljStaff);
LambdaQueryWrapper<TagCode> 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.setStaffId(tagCodeRecordDTO.getStaffId());
tagCodeRecord.setStaffName(ljStaff.getRealName()); tagCodeRecord.setStaffName(ljStaff.getRealName());
//更新码牌记录表 //更新码牌记录表