代码提交

This commit is contained in:
huangzj
2023-10-31 10:58:30 +08:00
parent 410c198de3
commit bb5c1ddfaf
2 changed files with 11 additions and 11 deletions

View File

@@ -302,7 +302,7 @@ public class CsDeviceUserPOServiceImpl extends ServiceImpl<CsDeviceUserPOMapper,
CsEquipmentDeliveryPO temp = csEquipmentDeliveryMapper.selectById(eid); CsEquipmentDeliveryPO temp = csEquipmentDeliveryMapper.selectById(eid);
mqttUserService.deleteUser(temp.getNdid()); mqttUserService.deleteUser(temp.getNdid());
List<CsLedger> list1 = iCsLedgerService.lambdaQuery().eq(CsLedger::getPid, eid).list(); List<CsLedger> list1 = iCsLedgerService.lambdaQuery().eq(CsLedger::getPid, eid).list();
if(!com.alibaba.nacos.client.naming.utils.CollectionUtils.isEmpty(list1)){ if(!CollectionUtils.isEmpty(list1)){
List<String> collect = list1.stream().map(CsLedger::getId).collect(Collectors.toList()); List<String> collect = list1.stream().map(CsLedger::getId).collect(Collectors.toList());
LambdaQueryWrapper<CsLinePO> csLinePOLambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<CsLinePO> csLinePOLambdaQueryWrapper = new LambdaQueryWrapper<>();
csLinePOLambdaQueryWrapper.in(CsLinePO::getLineId,collect); csLinePOLambdaQueryWrapper.in(CsLinePO::getLineId,collect);

View File

@@ -125,10 +125,10 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
@Override @Override
// @Transactional(rollbackFor = {Exception.class}, propagation = Propagation.REQUIRED) // @Transactional(rollbackFor = {Exception.class}, propagation = Propagation.REQUIRED)
public Boolean AuditEquipmentDelivery(String id) { public Boolean AuditEquipmentDelivery(String id) {
UpdateWrapper<CsEquipmentDeliveryPO> wrapper = new UpdateWrapper(); //物理删除
QueryWrapper<CsEquipmentDeliveryPO> wrapper = new QueryWrapper();
wrapper.eq ("id", id); wrapper.eq ("id", id);
wrapper.set ("run_status", "0"); boolean update = this.remove (wrapper);
boolean update = this.update (wrapper);
//删除deviceuser表里的设备游客数据设备,删除监测点相关数据 //删除deviceuser表里的设备游客数据设备,删除监测点相关数据
List<CsLedger> list = csLedgerService.lambdaQuery().eq(CsLedger::getPid, id).list(); List<CsLedger> list = csLedgerService.lambdaQuery().eq(CsLedger::getPid, id).list();
if(!CollectionUtils.isEmpty(list)){ if(!CollectionUtils.isEmpty(list)){
@@ -153,9 +153,9 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
QueryWrapper<CsTouristDataPO> queryWrap = new QueryWrapper<>(); QueryWrapper<CsTouristDataPO> queryWrap = new QueryWrapper<>();
queryWrap.eq("device_id",id); queryWrap.eq("device_id",id);
csTouristDataPOService.getBaseMapper().delete(queryWrap); csTouristDataPOService.getBaseMapper().delete(queryWrap);
/*后续徐那边做处理*/
CsEquipmentDeliveryPO csEquipmentDeliveryPO = this.getBaseMapper().selectById(id); // CsEquipmentDeliveryPO csEquipmentDeliveryPO = this.getBaseMapper().selectById(id);
mqttUserService.deleteUser(csEquipmentDeliveryPO.getNdid()); // mqttUserService.deleteUser(csEquipmentDeliveryPO.getNdid());
csDevModelRelationService.lambdaUpdate().eq(CsDevModelRelationPO::getDevId,id).set(CsDevModelRelationPO::getStatus,0).update(); csDevModelRelationService.lambdaUpdate().eq(CsDevModelRelationPO::getDevId,id).set(CsDevModelRelationPO::getStatus,0).update();
@@ -496,8 +496,8 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
public void testCompletion(String deviceId,Integer type,String remark) { public void testCompletion(String deviceId,Integer type,String remark) {
CsEquipmentDeliveryPO one = this.lambdaQuery().eq(CsEquipmentDeliveryPO::getId, deviceId).one(); CsEquipmentDeliveryPO one = this.lambdaQuery().eq(CsEquipmentDeliveryPO::getId, deviceId).one();
this.lambdaUpdate().eq(CsEquipmentDeliveryPO::getId,deviceId). this.lambdaUpdate().eq(CsEquipmentDeliveryPO::getId,deviceId).
set(CsEquipmentDeliveryPO::getStatus,1). // set(CsEquipmentDeliveryPO::getStatus,1).
set(CsEquipmentDeliveryPO::getRunStatus,1). // set(CsEquipmentDeliveryPO::getRunStatus,2).
set(CsEquipmentDeliveryPO::getProcess,type+1).update(); set(CsEquipmentDeliveryPO::getProcess,type+1).update();
this.delete(deviceId); this.delete(deviceId);
List<CsEquipmentProcessPO> list = csEquipmentProcessPOService.lambdaQuery().eq(CsEquipmentProcessPO::getDevId, one.getNdid()). List<CsEquipmentProcessPO> list = csEquipmentProcessPOService.lambdaQuery().eq(CsEquipmentProcessPO::getDevId, one.getNdid()).
@@ -516,8 +516,8 @@ public class CsEquipmentDeliveryServiceImpl extends ServiceImpl<CsEquipmentDeliv
CsEquipmentDeliveryPO one = this.lambdaQuery().eq(CsEquipmentDeliveryPO::getId, deviceId).one(); CsEquipmentDeliveryPO one = this.lambdaQuery().eq(CsEquipmentDeliveryPO::getId, deviceId).one();
this.lambdaUpdate().eq(CsEquipmentDeliveryPO::getId,deviceId). this.lambdaUpdate().eq(CsEquipmentDeliveryPO::getId,deviceId).
set(CsEquipmentDeliveryPO::getStatus,1). // set(CsEquipmentDeliveryPO::getStatus,1).
set(CsEquipmentDeliveryPO::getRunStatus,1). // set(CsEquipmentDeliveryPO::getRunStatus,1).
set(CsEquipmentDeliveryPO::getProcess,type).update(); set(CsEquipmentDeliveryPO::getProcess,type).update();
this.delete(deviceId); this.delete(deviceId);
List<CsEquipmentProcessPO> list = csEquipmentProcessPOService.lambdaQuery().eq(CsEquipmentProcessPO::getDevId, one.getNdid()). List<CsEquipmentProcessPO> list = csEquipmentProcessPOService.lambdaQuery().eq(CsEquipmentProcessPO::getDevId, one.getNdid()).