Commit cde5f4c0 authored by KeYong's avatar KeYong

修改系统大屏列表查询

parent 06af89e0
......@@ -269,7 +269,8 @@ public class FaultCaseController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "装备定义列表不分页", notes = "装备定义列表不分页")
@GetMapping(value = "/equip/list")
public ResponseModel<List<EquiplistSpecificBySystemVO>> getEquipList() {
return CommonResponseUtil.success(iEquipmentService.getAll());
public ResponseModel<List<EquiplistSpecificBySystemVO>> getEquipList(@RequestParam(value = "systemId") String systemId,
@RequestParam(value = "systemCode") String systemCode) {
return CommonResponseUtil.success(iEquipmentService.getAllByCode(systemId, systemCode));
}
}
......@@ -126,4 +126,6 @@ public interface IEquipmentService extends IService<Equipment> {
* @return
*/
EquipmentVo getEquipBySpecific(Long equipmentSpecificId);
List<Equipment> getAllByCode(String id, String code);
}
......@@ -466,6 +466,14 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
return this.list();
}
@Override
public List<Equipment> getAllByCode(String id, String code) {
QueryWrapper<Equipment> queryWrapper = new QueryWrapper<Equipment>();
queryWrapper.likeLeft("code", code);
queryWrapper.ne("id", Long.valueOf(id));
return equipmentMapper.selectList(queryWrapper);
}
@Override
public EquipmentVo getEquipBySpecific(Long equipmentSpecificId)
{
......
......@@ -4,18 +4,20 @@
<select id="listPage" resultType="com.yeejoin.equipmanage.common.entity.FaultCase">
SELECT
*
wfc.*,
wec.remark AS typeCode
FROM
wl_fault_case
wl_fault_case wfc
LEFT JOIN wl_equipment_category wec ON wec.id = wfc.system_id
<where>
<if test="dto.systemId != null and dto.systemId != ''">
FIND_IN_SET(#{dto.systemId}, system_id)
FIND_IN_SET(#{dto.systemId}, wfc.system_id)
</if>
<if test="dto.faultLevel != null and dto.faultLevel != ''">
AND fault_level = #{dto.faultLevel}
AND wfc.fault_level = #{dto.faultLevel}
</if>
<if test="dto.faultType != null and dto.faultType != ''">
AND fault_type = #{dto.faultType}
AND wfc.fault_type = #{dto.faultType}
</if>
<if test="dto.searchName != null and dto.searchName != ''">
AND (equip_name LIKE concat('%', #{dto.searchName},'%') OR system_name LIKE concat('%', #{dto.searchName},'%') OR fault_describe LIKE concat('%', #{dto.searchName},'%'))
......
......@@ -736,7 +736,7 @@
wlesal.id,
wlesal.equipment_specific_id AS equipmentSpecificId,
IFNULL(wlesal.equipment_specific_code,'') AS fireEquipmentCode,
(SELECT name from wl_equipment_specific where id = wlesal.equipment_specific_id) AS fireEquipmentName,
wlesal.equipment_specific_name AS fireEquipmentName,
wlesal.equipment_index_id AS fireEquipmentIndexId,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment