Commit 614156a1 authored by tangwei's avatar tangwei

修改bug

parent a011495d
......@@ -47,7 +47,7 @@ public interface IEquipmentCategoryService extends IService<EquipmentCategory> {
int checkUsed( List<String> ids);
List<EquipmentCategory> getEquipmentCategoryList(Integer head);
List<EquipmentCategory> getEquipmentCategoryListNew(Integer head,String type);
List<EquipmentCategory> getEquipmentCategoryListNew(Integer head,String carCode,String waterCode);
List<Map<String,Object>> getequipmentListEQNew();
List<EquipmentCategory> getEquipmentCategoryListNotFacilities(Integer head) ;
......
......@@ -151,6 +151,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Value("${redis_equip_type_count}")
private String equipTypeAndCount;
//消防车辆code,前缀
private final String carCode="2";
//消防水源code前缀
private final String waterCode="9360";
@Override
public List<EquipCountBySystemVO> getEquipCountBySystemId(Long systemId) {
return this.baseMapper.getEquipCountBySystemId(systemId);
......@@ -1161,7 +1166,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public Object refreshEquipmentTypeAndCountNew(String bizOrgCode) {
//获取装备分类
List<EquipmentCategory> responseList= this.iEquipmentCategoryService
.getEquipmentCategoryListNew(Integer.valueOf(equipmentCategoryLeftTypeCode),"eq");
.getEquipmentCategoryListNew(Integer.valueOf(equipmentCategoryLeftTypeCode),carCode,waterCode);
if (responseList == null || responseList.size() < 1) {
return null;
}
......
......@@ -318,16 +318,17 @@
ec.create_date,
i.`name` as industryName,
-- industry_code = 2代表消防设备
IF(LEFT(ec.CODE, 1) = #{head} and ec.industry_code = 2, 'car', 'equipment')
AS type
FROM wl_equipment_category ec
left join wl_industry i on ec.industry_code = i.code
<where>
<if test="type != null">
and left(ec.code,1) != '2'
and left(ec.code,4) !='9306'
and ec.industry_code = 2
</if>
IF(LEFT(ec.CODE, 1) = #{head} and ec.industry_code = 2, 'car', 'equipment') AS type
FROM wl_equipment_category ec
left join wl_industry i on ec.industry_code = i.code
<where>
and ec.industry_code = 2
<if test="carCode != null">
and left(ec.code,1) != #{carCode}
</if>
<if test="waterCode != null">
and left(ec.code,4) !=#{waterCode}
</if>
</where>
</select>
......@@ -348,7 +349,6 @@
AND ( `e`.`category_id` = `c`.`id` )
AND ( `s`.`biz_org_code` != '' )
)
</select>
......
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