| | |
| | | List<Monitor> listMonitorByKeyword1(String keyword, int bindingState1, int bindingState2); |
| | | |
| | | |
| | | List<MonitorBo> listMonitorByIds(List<String> list, String keyword, int bindingState, int equipmentState, Long userid); |
| | | List<MonitorBo> listMonitorByIds(List<String> list, int bindingState, int equipmentState); |
| | | |
| | | List<String> listMonitorDeviceSerial(Long userid); |
| | | List<String> listMonitorDeviceSerial(Long userid, String keyword); |
| | | } |
| | | |
| | | |
| | |
| | | #{deviceCode} |
| | | </foreach> |
| | | </if> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.device_serial LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.note LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t3.pole_code LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | </if> |
| | | <if test="bindingState != 2"> |
| | | AND t1.binding_state = #{bindingState} |
| | | </if> |
| | | <if test="equipmentState != 2"> |
| | | AND t1.equipment_state = #{equipmentState} |
| | | </if> |
| | | <if test="userid != null"> |
| | | AND (t3.user_id = #{userid} OR t3.client_id = #{userid}) |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | <if test="userid != null"> |
| | | AND (t3.user_id = #{userid} OR t3.client_id = #{userid}) |
| | | </if> |
| | | <if test="keyword != null and keyword != ''"> |
| | | AND ( t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.device_serial LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t1.note LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR t3.pole_code LIKE CONCAT(CONCAT('%', #{keyword}), '%')) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | public List<MonitorBo> listMonitorByKeyword(BaseConditionVO baseConditionVO, MonitorParam monitorParam) { |
| | | List<String> list; |
| | | if (SecurityUtils.getClientId() == null) { |
| | | list = monitorMapper.listMonitorDeviceSerial(null); |
| | | list = monitorMapper.listMonitorDeviceSerial(null, monitorParam.getKeyword()); |
| | | } else { |
| | | list = monitorMapper.listMonitorDeviceSerial(SecurityUtils.getUserId()); |
| | | list = monitorMapper.listMonitorDeviceSerial(SecurityUtils.getUserId(), monitorParam.getKeyword()); |
| | | } |
| | | |
| | | //没有数据时候直接返回空数组 |
| | | if (list.size() == 0 || list == null) { |
| | | List<MonitorBo> nullList = new ArrayList<>(); |
| | | return nullList; |
| | | } |
| | | |
| | | MonitorParam monitorParam1; |
| | |
| | | getYSYMonitorInfoAndaddMonitorToTable(monitorParam1); |
| | | } |
| | | |
| | | |
| | | Long clientId = SecurityUtils.getClientId(); |
| | | if (baseConditionVO != null) { |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | } |
| | |
| | | monitorParam.setEquipmentState(2); |
| | | } |
| | | |
| | | monitorList = monitorMapper.listMonitorByIds(list, monitorParam.getKeyword(), monitorParam.getBindingState(), monitorParam.getEquipmentState(), clientId); |
| | | monitorList = monitorMapper.listMonitorByIds(list, monitorParam.getBindingState(), monitorParam.getEquipmentState()); |
| | | |
| | | return monitorList; |
| | | } |