This commit is contained in:
齐天大圣 2024-03-29 13:42:53 +08:00
parent 74ffebbfce
commit 339e280c4d
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,8 @@ public class OilTag extends Model<OilTag> {
private String companyName;
//码牌SN号
private String snCode;
//终端号
private String terminalNumber;
//是否已绑定油站 0未绑定 1已绑定
private String status;
//是否已绑定员工 0未绑定 1已绑定

View File

@ -20,6 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.*;
import java.util.Random;
/**
* 码牌配置表(OilTag)表服务实现类
@ -36,6 +37,10 @@ public class OilTagServiceImpl extends ServiceImpl<OilTagMapper, OilTag> impleme
@Override
public boolean add(OilTag oilTag) throws Exception {
Random random = new Random();
int number = random.nextInt(900000);
oilTag.setTerminalNumber(number+"");
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
oilTag.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString()));
LambdaQueryWrapper<TagCode> queryWrapper = new LambdaQueryWrapper<>();