|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
package com.glxp.api.service.collect;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
|
|
import com.glxp.api.dao.basic.BasicProductsDao;
|
|
|
|
|
import com.glxp.api.entity.basic.BasicProductsEntity;
|
|
|
|
@ -50,6 +52,11 @@ public class RelCodeDetailService extends ServiceImpl<RelCodeDetailMapper, RelCo
|
|
|
|
|
if(cur == null){
|
|
|
|
|
throw new JsonException("产品信息不存在");
|
|
|
|
|
}
|
|
|
|
|
//是否已存在数据库中
|
|
|
|
|
List<RelCodeDetail> list = this.baseMapper.selectList(new LambdaQueryWrapper<RelCodeDetail>().eq(RelCodeDetail::getCurCode, curCode));
|
|
|
|
|
if (CollUtil.isNotEmpty(list)){
|
|
|
|
|
throw new JsonException("当前条码关联关系已被维护!");
|
|
|
|
|
}
|
|
|
|
|
if(StrUtil.isNotBlank(parentCode)){
|
|
|
|
|
if (parentCode.endsWith("\u001D")) {
|
|
|
|
|
parentCode = parentCode.replace("\u001D", "");
|
|
|
|
|