|
@@ -70,9 +70,14 @@ public class XxpCardInfoServiceImpl implements IXxpCardInfoService
|
|
|
public int insertXxpCardInfo(XxpCardInfo xxpCardInfo) {
|
|
public int insertXxpCardInfo(XxpCardInfo xxpCardInfo) {
|
|
|
//一实验室只能存在一个电子信息牌
|
|
//一实验室只能存在一个电子信息牌
|
|
|
XxpCardInfo info = new XxpCardInfo();
|
|
XxpCardInfo info = new XxpCardInfo();
|
|
|
- info.setSubjectId(xxpCardInfo.getSubjectId());
|
|
|
|
|
|
|
+ info.setCardNum(xxpCardInfo.getCardNum());
|
|
|
List<XxpCardInfo> list = xxpCardInfoMapper.selectXxpCardInfoList(info);
|
|
List<XxpCardInfo> list = xxpCardInfoMapper.selectXxpCardInfoList(info);
|
|
|
if(list.size()>0){
|
|
if(list.size()>0){
|
|
|
|
|
+ throw new ServiceException("设备编号已存在!");
|
|
|
|
|
+ }
|
|
|
|
|
+ info.setSubjectId(xxpCardInfo.getSubjectId());
|
|
|
|
|
+ list = xxpCardInfoMapper.selectXxpCardInfoList(info);
|
|
|
|
|
+ if(list.size()>0){
|
|
|
throw new ServiceException("该实验室已配置信息牌!");
|
|
throw new ServiceException("该实验室已配置信息牌!");
|
|
|
}
|
|
}
|
|
|
SysUser sysUser = tokenService.getLoginUser().getSysUser();
|
|
SysUser sysUser = tokenService.getLoginUser().getSysUser();
|