|
@@ -89,7 +89,7 @@ public class LampServiceImpl implements LampService {
|
|
|
lamp.setLedLuxValue(0);
|
|
|
}
|
|
|
if (Integer.parseInt(lamp.getNetworkStatus()) == 0){
|
|
|
- lamp.setLighteness("0");
|
|
|
+ lamp.setLighteness(0);
|
|
|
}
|
|
|
if (lamp.getPolicyName() == null || lamp.getPolicyType() != 1){
|
|
|
lamp.setPolicyName("暂无");
|
|
@@ -233,16 +233,15 @@ public class LampServiceImpl implements LampService {
|
|
|
lampDao.add(lampInfoDTO);
|
|
|
}
|
|
|
}else {
|
|
|
- if (oldLamp.getProtocolType() == 5){
|
|
|
+ if (oldLamp.getControlType() == 5){
|
|
|
lampInfoDTO1 = new LampInfoDTO();
|
|
|
lampInfoDTO1.setSn(lampInfoDTO.getSn());
|
|
|
lampInfoDTO1.setId(lampInfoDTO.getId());
|
|
|
Integer lampId = this.checkData(lampInfoDTO1);
|
|
|
System.out.println(lampId);
|
|
|
- return toolUtils.response("0007",lampInfoDTO.getVersion());
|
|
|
-// if (lampId > 0){
|
|
|
-// lampDao.deleteById(lampId);
|
|
|
-// }
|
|
|
+ if (lampId > 0){
|
|
|
+ lampDao.deleteById(lampId);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return toolUtils.response("0000",lampInfoDTO.getVersion());
|
|
@@ -266,4 +265,10 @@ public class LampServiceImpl implements LampService {
|
|
|
public LampInfoDTO getDetailsByAddress(String address, Integer version) {
|
|
|
return lampDao.getDetailsByAddress(address,version);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<LampInfoDTO> groupSelectLamp(LampListResponseVO lampListResponseVO) {
|
|
|
+ List<LampInfoDTO> lampInfoDTOS = lampDao.groupSelectLamp(lampListResponseVO);
|
|
|
+ return lampInfoDTOS;
|
|
|
+ }
|
|
|
}
|