|
|
|
@ -1,9 +1,11 @@
|
|
|
|
|
package com.hnac.hzims.operational.station.service.impl; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
|
import com.hnac.hzims.operational.station.entity.UserDeptConfigEntity; |
|
|
|
|
import com.hnac.hzims.operational.station.entity.VideoRecordEntity; |
|
|
|
|
import com.hnac.hzims.operational.station.mapper.UserDeptConfigMapper; |
|
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
|
import com.hnac.hzims.operational.station.service.UserDeptConfigService; |
|
|
|
@ -65,7 +67,16 @@ public class UserDeptConfigServiceImpl extends ServiceImpl<UserDeptConfigMapper,
|
|
|
|
|
entity.setStationName(null); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return super.saveOrUpdate(entity); |
|
|
|
|
// 检查记录是否保存
|
|
|
|
|
UserDeptConfigEntity userDeptConfig = this.getOne(Wrappers.<UserDeptConfigEntity>lambdaQuery() |
|
|
|
|
.eq(UserDeptConfigEntity::getStationId,entity.getStationId()) |
|
|
|
|
.eq(UserDeptConfigEntity::getCreateUser,entity.getCreateUser()) |
|
|
|
|
); |
|
|
|
|
if(ObjectUtils.isEmpty(userDeptConfig)){ |
|
|
|
|
return this.save(entity); |
|
|
|
|
} |
|
|
|
|
entity.setId(userDeptConfig.getId()); |
|
|
|
|
return this.updateById(entity); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|