| | |
| | | import com.sandu.ximon.admin.param.LightPoleHeelingListParam; |
| | | import com.sandu.ximon.dao.domain.Light; |
| | | import com.sandu.ximon.dao.domain.LightPoleHeeling; |
| | | import com.sandu.ximon.dao.domain.LightPoleHeelingEquipment; |
| | | import com.sandu.ximon.dao.domain.PoleBinding; |
| | | import com.sandu.ximon.dao.mapper.LightPoleHeelingMapper; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | @AllArgsConstructor |
| | | public class LightPoleHeelingService extends BaseServiceImpl<LightPoleHeelingMapper, LightPoleHeeling> { |
| | | private LightPoleHeelingMapper lightPoleHeelingMapper; |
| | | private LightPoleHeelingEquipmentService lightPoleHeelingEquipmentService; |
| | | |
| | | /** |
| | | * 模糊查询 |
| | |
| | | } else { |
| | | lightPoleHeeling.setWarningLevel(0);//正常 |
| | | } |
| | | /** |
| | | * 将灯杆倾斜硬件添加到硬件表 |
| | | */ |
| | | LightPoleHeelingEquipment one = lightPoleHeelingEquipmentService.getOne(Wrappers.lambdaQuery(LightPoleHeelingEquipment.class).eq(LightPoleHeelingEquipment::getMac, deviceName)); |
| | | if (one == null) { |
| | | LightPoleHeelingEquipment equipment = new LightPoleHeelingEquipment(); |
| | | equipment.setMac(deviceName); |
| | | lightPoleHeelingEquipmentService.save(equipment); |
| | | } |
| | | |
| | | return save(lightPoleHeeling); |
| | | } |