人员删除问题修改
This commit is contained in:
parent
b921b3ce8a
commit
65cc7d4f54
|
@ -913,6 +913,7 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
tenPersonDao.logicDeleteById(personId, cellId);
|
tenPersonDao.logicDeleteById(personId, cellId);
|
||||||
tenRelationMapper.delete(new LambdaQueryWrapper<TenRelation>().eq(TenRelation::getStudentId,personId));
|
tenRelationMapper.delete(new LambdaQueryWrapper<TenRelation>().eq(TenRelation::getStudentId,personId));
|
||||||
Map<String, String> snPersons = tenPersonSyncService.findGroupDevicePerson(personId,cellId);
|
Map<String, String> snPersons = tenPersonSyncService.findGroupDevicePerson(personId,cellId);
|
||||||
|
if(snPersons!=null) {
|
||||||
String sn = snPersons.get("deviceSn");
|
String sn = snPersons.get("deviceSn");
|
||||||
TenDeviceEntity deviceEntity = tenDeviceService.findBySn(sn);
|
TenDeviceEntity deviceEntity = tenDeviceService.findBySn(sn);
|
||||||
if(deviceEntity==null){
|
if(deviceEntity==null){
|
||||||
|
@ -930,7 +931,7 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
syncEntity.setState(Constant.PERSON_SYNC_DELETE);
|
syncEntity.setState(Constant.PERSON_SYNC_DELETE);
|
||||||
tenPersonSyncService.updateById(syncEntity);
|
tenPersonSyncService.updateById(syncEntity);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,9 +175,10 @@
|
||||||
<select id="findGroupDevicePerson" resultType="map">
|
<select id="findGroupDevicePerson" resultType="map">
|
||||||
select device_sn as deviceSn,group_concat(person_id,"_",last_update_time separator ",") as plist
|
select device_sn as deviceSn,group_concat(person_id,"_",last_update_time separator ",") as plist
|
||||||
from ten_person_sync_${cellId} where 1= 1
|
from ten_person_sync_${cellId} where 1= 1
|
||||||
<if test="personIds != null">
|
<if test="personId != null">
|
||||||
and person_id = #{personId}
|
and person_id = #{personId}
|
||||||
</if>
|
</if>
|
||||||
|
group by device_sn
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findDeviceAllDeletePersons" resultType="net.shapelight.modules.ten.entity.TenPersonSyncEntity">
|
<select id="findDeviceAllDeletePersons" resultType="net.shapelight.modules.ten.entity.TenPersonSyncEntity">
|
||||||
|
|
Loading…
Reference in New Issue