|
|
@ -66,23 +66,21 @@ public class BasicBusTypeChangeServiceImpl extends ServiceImpl<BasicBusTypeChang
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean verifyExists(BasicBusTypeChangeEntity basicBusTypeChangeEntity) {
|
|
|
|
public boolean verifyExists(BasicBusTypeChangeEntity basicBusTypeChangeEntity) {
|
|
|
|
|
|
|
|
QueryWrapper<BasicBusTypeChangeEntity> wrapper = new QueryWrapper<>();
|
|
|
|
|
|
|
|
wrapper.eq("originAction", basicBusTypeChangeEntity.getOriginAction())
|
|
|
|
|
|
|
|
.eq("targetAction", basicBusTypeChangeEntity.getTargetAction())
|
|
|
|
|
|
|
|
.eq("originName", basicBusTypeChangeEntity.getOriginName()).ne("id", basicBusTypeChangeEntity.getId());
|
|
|
|
|
|
|
|
return basicBusTypeChangeDao.exists(wrapper);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public boolean insertVerifyExists(BasicBusTypeChangeEntity basicBusTypeChangeEntity) {
|
|
|
|
QueryWrapper<BasicBusTypeChangeEntity> wrapper = new QueryWrapper<>();
|
|
|
|
QueryWrapper<BasicBusTypeChangeEntity> wrapper = new QueryWrapper<>();
|
|
|
|
wrapper.eq("originAction", basicBusTypeChangeEntity.getOriginAction())
|
|
|
|
wrapper.eq("originAction", basicBusTypeChangeEntity.getOriginAction())
|
|
|
|
.eq("targetAction", basicBusTypeChangeEntity.getTargetAction())
|
|
|
|
.eq("targetAction", basicBusTypeChangeEntity.getTargetAction())
|
|
|
|
.eq("originName", basicBusTypeChangeEntity.getOriginName());
|
|
|
|
.eq("originName", basicBusTypeChangeEntity.getOriginName());
|
|
|
|
List<BasicBusTypeChangeEntity> list = basicBusTypeChangeDao.selectList(wrapper);
|
|
|
|
return basicBusTypeChangeDao.exists(wrapper);
|
|
|
|
if (CollUtil.isNotEmpty(list)) {
|
|
|
|
|
|
|
|
if (null != basicBusTypeChangeEntity.getId()) {
|
|
|
|
|
|
|
|
for (BasicBusTypeChangeEntity busTypeChangeEntity : list) {
|
|
|
|
|
|
|
|
if (busTypeChangeEntity.getId() != basicBusTypeChangeEntity.getId()) {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void setUpdateInfo(BasicBusTypeChangeEntity basicBusTypeChangeEntity) {
|
|
|
|
private void setUpdateInfo(BasicBusTypeChangeEntity basicBusTypeChangeEntity) {
|
|
|
|