@@ -123,8 +123,12 @@ public class AssetServiceImpl extends BaseServiceImpl<AssetMapper, AssetEntity>
throw new ServiceException("状态错误,请重新选择");
}
asset.setStatus(optional.get().getCode());
+ try {
+ this.save(asset);
+ } catch (Exception e) {
+ throw new ServiceException("序号为[" + excel1.getXh() + "]的数据错误");
+ }
- this.save(asset);
@@ -105,7 +105,11 @@ public class CgKylwServiceImpl extends BaseServiceImpl<CgKylwMapper, CgKylwEntit
if(isDuplicate(kylwDTO)){
throw new ServiceException("论文名称已存在");
- this.save(kylwDTO);
+ this.save(kylwDTO);
+ throw new ServiceException("序号为[" + excel.getXh() + "]的数据错误");
@@ -79,7 +79,11 @@ public class CgQtServiceImpl extends BaseServiceImpl<CgQtMapper, CgQtEntity> imp
if(isDuplicate(qtDTO)){
throw new ServiceException("成果编号/成果名称已存在");
- this.save(qtDTO);
+ this.save(qtDTO);
@@ -72,7 +72,13 @@ public class CgRjzzqServiceImpl extends BaseServiceImpl<CgRjzzqMapper, CgRjzzqEn
entity.setXmId(xmId);
- this.save(entity);
+ this.save(entity);
+
@@ -83,7 +83,12 @@ public class CgZlServiceImpl extends BaseServiceImpl<CgZlMapper, CgZlEntity> imp
zlDTO.setXmId(xmId);
- this.save(zlDTO);
+ this.save(zlDTO);
@@ -235,7 +235,12 @@ public class TechnicianServiceImpl extends BaseServiceImpl<TechnicianMapper, Tec
unicode = generateUnicode();
technician.setUnicode(unicode);
- this.save(technician);
+ this.save(technician);