Browse Source

6666666666

zhoulisky 5 months ago
parent
commit
5b23534d36

+ 1 - 8
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgJsbzServiceImpl.java

@@ -20,7 +20,6 @@ import org.sky.scientific.excel.listener.CgJsbzImportListener;
 import org.sky.scientific.mapper.CgJsbzMapper;
 import org.sky.scientific.mapper.CgJsbzMapper;
 import org.sky.scientific.mapper.XmMapper;
 import org.sky.scientific.mapper.XmMapper;
 import org.sky.scientific.pojo.entity.CgJsbzEntity;
 import org.sky.scientific.pojo.entity.CgJsbzEntity;
-import org.sky.scientific.pojo.entity.XmEntity;
 import org.sky.scientific.service.ICgJsbzService;
 import org.sky.scientific.service.ICgJsbzService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -79,7 +78,7 @@ public class CgJsbzServiceImpl extends BaseServiceImpl<CgJsbzMapper, CgJsbzEntit
 			if (isDuplicate(jsbzDTO)) {
 			if (isDuplicate(jsbzDTO)) {
 				throw new ServiceException("标准号/标准名称已存在");
 				throw new ServiceException("标准号/标准名称已存在");
 			}
 			}
- 			this.saveOrUpdate(jsbzDTO);
+			this.saveOrUpdate(jsbzDTO);
 		}
 		}
 	}
 	}
 
 
@@ -96,12 +95,6 @@ public class CgJsbzServiceImpl extends BaseServiceImpl<CgJsbzMapper, CgJsbzEntit
 		if (isDuplicate(cgJsbz)) {
 		if (isDuplicate(cgJsbz)) {
 			throw new ServiceException("标准号/标准名称已存在");
 			throw new ServiceException("标准号/标准名称已存在");
 		}
 		}
-		CgJsbzEntity dbJsbz = this.getById(cgJsbz.getId());
-		if (!Objects.equals(dbJsbz.getXmbh(), cgJsbz.getXmbh())) {
-			XmEntity dbXm = xmMapper.selectOne(Wrappers.<XmEntity>lambdaQuery().eq(XmEntity::getXmbh, cgJsbz.getXmbh()));
-			cgJsbz.setXmId(dbXm != null ? dbXm.getId() : null);
-			cgJsbz.setXmmc(dbXm != null ? dbXm.getXmmc() : null);
-		}
 		return updateById(cgJsbz);
 		return updateById(cgJsbz);
 	}
 	}
 
 

+ 0 - 7
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgKylwServiceImpl.java

@@ -20,7 +20,6 @@ import org.sky.scientific.excel.listener.CgKylwImportListener;
 import org.sky.scientific.mapper.CgKylwMapper;
 import org.sky.scientific.mapper.CgKylwMapper;
 import org.sky.scientific.mapper.XmMapper;
 import org.sky.scientific.mapper.XmMapper;
 import org.sky.scientific.pojo.entity.CgKylwEntity;
 import org.sky.scientific.pojo.entity.CgKylwEntity;
-import org.sky.scientific.pojo.entity.XmEntity;
 import org.sky.scientific.service.ICgKylwService;
 import org.sky.scientific.service.ICgKylwService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
@@ -123,12 +122,6 @@ public class CgKylwServiceImpl extends BaseServiceImpl<CgKylwMapper, CgKylwEntit
 		if(isDuplicate(cgKylw)){
 		if(isDuplicate(cgKylw)){
 			throw new ServiceException("论文名称已存在");
 			throw new ServiceException("论文名称已存在");
 		}
 		}
-		CgKylwEntity dbKylw = this.getById(cgKylw.getId());
-		if (!Objects.equals(dbKylw.getXmbh(), cgKylw.getXmbh())) {
-			XmEntity dbXm = xmMapper.selectOne(Wrappers.<XmEntity>lambdaQuery().eq(XmEntity::getXmbh, cgKylw.getXmbh()));
-			cgKylw.setXmId(dbXm != null ? dbXm.getId() : null);
-			cgKylw.setXmmc(dbXm != null ? dbXm.getXmmc() : null);
-		}
 		return updateById(cgKylw);
 		return updateById(cgKylw);
 	}
 	}
 
 

+ 0 - 7
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgQtServiceImpl.java

@@ -22,7 +22,6 @@ import org.sky.scientific.mapper.CgQtMapper;
 import org.sky.scientific.mapper.XmMapper;
 import org.sky.scientific.mapper.XmMapper;
 import org.sky.scientific.pojo.dto.CgQtDTO;
 import org.sky.scientific.pojo.dto.CgQtDTO;
 import org.sky.scientific.pojo.entity.CgQtEntity;
 import org.sky.scientific.pojo.entity.CgQtEntity;
-import org.sky.scientific.pojo.entity.XmEntity;
 import org.sky.scientific.pojo.vo.XmCGSummary;
 import org.sky.scientific.pojo.vo.XmCGSummary;
 import org.sky.scientific.service.ICgQtService;
 import org.sky.scientific.service.ICgQtService;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -97,12 +96,6 @@ public class CgQtServiceImpl extends BaseServiceImpl<CgQtMapper, CgQtEntity> imp
 		if(isDuplicate(cgQt)){
 		if(isDuplicate(cgQt)){
 			throw new ServiceException("成果编号/成果名称已存在");
 			throw new ServiceException("成果编号/成果名称已存在");
 		}
 		}
-		CgQtEntity dbQt = this.getById(cgQt.getId());
-		if (!Objects.equals(dbQt.getXmbh(), cgQt.getXmbh())) {
-			XmEntity dbXm = xmMapper.selectOne(Wrappers.<XmEntity>lambdaQuery().eq(XmEntity::getXmbh, cgQt.getXmbh()));
-			cgQt.setXmId(dbXm != null ? dbXm.getId() : null);
-			cgQt.setXmmc(dbXm != null ? dbXm.getXmmc() : null);
-		}
 		return updateById(cgQt);
 		return updateById(cgQt);
 	}
 	}
 
 

+ 1 - 0
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/CgZlServiceImpl.java

@@ -101,6 +101,7 @@ public class CgZlServiceImpl extends BaseServiceImpl<CgZlMapper, CgZlEntity> imp
 		if (isDuplicate(cgZl)) {
 		if (isDuplicate(cgZl)) {
 			throw new ServiceException("专利号/专利名称已存在");
 			throw new ServiceException("专利号/专利名称已存在");
 		}
 		}
+
 		return super.save(cgZl);
 		return super.save(cgZl);
 	}
 	}