Commit 2ef25806 authored by zhangsen's avatar zhangsen

bug修改

parent 84d8190b
...@@ -458,7 +458,7 @@ public class EquipmentCategoryController extends AbstractBaseController { ...@@ -458,7 +458,7 @@ public class EquipmentCategoryController extends AbstractBaseController {
equipmentCategorys.forEach(action -> { equipmentCategorys.forEach(action -> {
String beginName = action.getName(); String beginName = action.getName();
String subCode = action.getCode().replaceAll("0+$", ""); String subCode = action.getCode().replaceAll("0+$", "");
int count = StringUtils.isNotEmpty(bizOrgCode)? equipmentCategoryMapper.countByCategoryCode(subCode, bizOrgCode) : 0; int count = StringUtils.isNotEmpty(bizOrgCode)? equipmentCategoryMapper.countByFireTypeAndCode(subCode, bizOrgCode) : 0;
action.setName(action.getName() + "(" + count + ")"); action.setName(action.getName() + "(" + count + ")");
if (beginName.equals("消防设施") || beginName.equals("消防系统")) { if (beginName.equals("消防设施") || beginName.equals("消防系统")) {
...@@ -498,7 +498,7 @@ public class EquipmentCategoryController extends AbstractBaseController { ...@@ -498,7 +498,7 @@ public class EquipmentCategoryController extends AbstractBaseController {
Map<String, List<EquipmentCategory>> tmpMap = new HashMap<String, List<EquipmentCategory>>(); Map<String, List<EquipmentCategory>> tmpMap = new HashMap<String, List<EquipmentCategory>>();
equipmentCategorys.forEach(action -> { equipmentCategorys.forEach(action -> {
String subCode = action.getCode().replaceAll("0+$", ""); String subCode = action.getCode().replaceAll("0+$", "");
int count = StringUtils.isNotEmpty(bizOrgCode)? equipmentCategoryMapper.countByCategoryCode(subCode, bizOrgCode) : 0; int count = StringUtils.isNotEmpty(bizOrgCode)? equipmentCategoryMapper.countByEquipTypeAndCode(subCode, bizOrgCode) : 0;
action.setName(action.getName() + "(" + count + ")"); action.setName(action.getName() + "(" + count + ")");
if (action.getParentId() == null) { if (action.getParentId() == null) {
action.setPatrolNum(count); action.setPatrolNum(count);
......
...@@ -57,9 +57,10 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> { ...@@ -57,9 +57,10 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
List<EquipmentCategory> getEquipmentCategoryListByFacilities(Integer head); List<EquipmentCategory> getEquipmentCategoryListByFacilities(Integer head);
int countByCategoryCode(@Param("code") String code, @Param("bizOrgCode") String bizOrgCode); int countByFireTypeAndCode(@Param("code") String code, @Param("bizOrgCode") String bizOrgCode);
int countByEquipTypeAndCode(@Param("code") String code, @Param("bizOrgCode") String bizOrgCode);
/** /**
* 重点部位数量 * 重点部位数量
* @return * @return
......
...@@ -500,14 +500,22 @@ ...@@ -500,14 +500,22 @@
</if> </if>
</select> </select>
<select id="countByCategoryCode" resultType="int"> <select id="countByFireTypeAndCode" resultType="int">
select count(*) from p_input_item select count(*) from p_input_item
where (equipment_type like concat(#{code}, '%') or facilities_type like concat(#{code}, '%')) where facilities_type like concat(#{code}, '%')
AND biz_org_code like concat(#{bizOrgCode}, '%') AND biz_org_code like concat(#{bizOrgCode}, '%')
AND is_delete = '0' AND is_delete = '0'
AND input_type!='1' AND input_type!='1'
</select> </select>
<select id="countByEquipTypeAndCode" resultType="int">
select count(*) from p_input_item
where equipment_type like concat(#{code}, '%')
AND biz_org_code like concat(#{bizOrgCode}, '%')
AND is_delete = '0'
AND input_type!='1'
</select>
<select id="countByKeyPartsType" resultType="int"> <select id="countByKeyPartsType" resultType="int">
select count(*) from p_input_item select count(*) from p_input_item
where key_parts_type is not null where key_parts_type is not null
......
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