Commit ff5ba5d9 authored by KeYong's avatar KeYong

修改消防资源点击筛选问题

parent d16ee708
......@@ -519,6 +519,7 @@ public class FireFightingSystemController extends AbstractBaseController {
}
EquipmentCategory equipmentCategory = equipmentCategoryList.get(0);
int inhierarchy = 1;
int flag = 0;
for (int i = 0; i < result.length + 1; i++) {
//进来先判断是否默认就是空,如果为空第一层
if (equipmentCategory.getParentId() == null) {
......@@ -528,16 +529,24 @@ public class FireFightingSystemController extends AbstractBaseController {
} else {
inhierarchy = map.get(i);
}
flag = i;
break;
} else {
//查找到循环几次为空
equipmentCategory = equipmentCategoryService.getById(equipmentCategory.getParentId());
}
}
return fireFightingSystemService.getColaCategoryAmountEquList(inhierarchy, equipTypeAmountPage.getEquipmentClassificationCode(), equipTypeAmountPage);
if (flag == 0) {
String classificationCode = equipTypeAmountPage.getEquipmentClassificationCode().replaceAll("0+$", "");
return fireFightingSystemService.getColaCategoryAmountEquList(inhierarchy, classificationCode, equipTypeAmountPage);
} else {
String classificationCode = equipTypeAmountPage.getEquipmentClassificationCode().replaceAll("0+$", "");
return fireFightingSystemService.getColaCategoryAmountEquList(inhierarchy, classificationCode.length() % 2 == 0 ? classificationCode : classificationCode + "0", equipTypeAmountPage);
}
// return fireFightingSystemService.getColaCategoryAmountEquList(inhierarchy, equipTypeAmountPage.getEquipmentClassificationCode(), equipTypeAmountPage);
//String classificationCode = equipTypeAmountPage.getEquipmentClassificationCode().replaceAll("0+$", "");
//return fireFightingSystemService.getColaCategoryAmountEquList(inhierarchy, classificationCode.length() % 2 == 0 ? classificationCode : classificationCode + "0", equipTypeAmountPage);
// String classificationCode = equipTypeAmountPage.getEquipmentClassificationCode().replaceAll("0+$", "");
// return fireFightingSystemService.getColaCategoryAmountEquList(inhierarchy, classificationCode.length() % 2 == 0 ? classificationCode : classificationCode + "0", equipTypeAmountPage);
} else {
if (null != equipTypeAmountPage.getIsDefect() && 1 == equipTypeAmountPage.getIsDefect()) {
ReginParams reginParams = getSelectedOrgInfo();
......
......@@ -1997,8 +1997,8 @@
LEFT JOIN wl_equipment_category wec ON wle.category_id = wec.id
WHERE 1=1
<if test="codeHead!=null and codeHead!='' and codeHead!=' '">
<!-- and LEFT (wle.CODE, #{hierarchy}) = #{codeHead}-->
and wec.`code` like concat(#{codeHead}, '%')
and LEFT (wle.CODE, #{hierarchy}) = #{codeHead}
<!-- and wec.`code` like concat(#{codeHead}, '%')-->
</if>
<if test="equipTypeAmountPage.industryCode!=null">
and wec.industry_code = #{equipTypeAmountPage.industryCode}
......@@ -2688,7 +2688,7 @@
</select>
<select id="equipAlarmTOP" resultType="java.util.Map">
<!-- SELECT-->
<!-- SELECT-->
<!-- ifnull( `a`.`fightSysName`, NULL ) AS `fightSysName`,-->
<!-- ifnull( `a`.`fightSysCode`, NULL ) AS `fightSysCode`,-->
<!-- ifnull( `a`.`fightSysId`, NULL ) AS `fightSysId`,-->
......
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