Commit 2ef25806 authored by zhangsen's avatar zhangsen

bug修改

parent 84d8190b
......@@ -458,7 +458,7 @@ public class EquipmentCategoryController extends AbstractBaseController {
equipmentCategorys.forEach(action -> {
String beginName = action.getName();
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 + ")");
if (beginName.equals("消防设施") || beginName.equals("消防系统")) {
......@@ -498,7 +498,7 @@ public class EquipmentCategoryController extends AbstractBaseController {
Map<String, List<EquipmentCategory>> tmpMap = new HashMap<String, List<EquipmentCategory>>();
equipmentCategorys.forEach(action -> {
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 + ")");
if (action.getParentId() == null) {
action.setPatrolNum(count);
......
......@@ -57,9 +57,10 @@ public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
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
......
......@@ -500,9 +500,17 @@
</if>
</select>
<select id="countByCategoryCode" resultType="int">
<select id="countByFireTypeAndCode" resultType="int">
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 is_delete = '0'
AND input_type!='1'
</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'
......
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