Commit 859f7408 authored by chenzhao's avatar chenzhao

修改代码

parent 65799d09
...@@ -250,6 +250,7 @@ public class WaterResourceController extends BaseController { ...@@ -250,6 +250,7 @@ public class WaterResourceController extends BaseController {
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(model, waterResourceHydrantDto); BeanUtils.copyProperties(model, waterResourceHydrantDto);
waterResourceHydrantDto.setSequenceNbr(waterResourceHydrant.getSequenceNbr()); waterResourceHydrantDto.setSequenceNbr(waterResourceHydrant.getSequenceNbr());
waterResourceHydrantDto.setResourceId(sequenceNbr);
waterResourceHydrantService.updateWithModel(waterResourceHydrantDto); waterResourceHydrantService.updateWithModel(waterResourceHydrantDto);
break; break;
case "crane": case "crane":
...@@ -259,6 +260,7 @@ public class WaterResourceController extends BaseController { ...@@ -259,6 +260,7 @@ public class WaterResourceController extends BaseController {
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(model, waterResourceCraneDto); BeanUtils.copyProperties(model, waterResourceCraneDto);
waterResourceCraneDto.setSequenceNbr(waterResourceCrane.getSequenceNbr()); waterResourceCraneDto.setSequenceNbr(waterResourceCrane.getSequenceNbr());
waterResourceCraneDto.setResourceId(sequenceNbr);
waterResourceCraneService.updateWithModel(waterResourceCraneDto); waterResourceCraneService.updateWithModel(waterResourceCraneDto);
break; break;
case "natural": case "natural":
...@@ -269,6 +271,7 @@ public class WaterResourceController extends BaseController { ...@@ -269,6 +271,7 @@ public class WaterResourceController extends BaseController {
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(model, waterResourceNaturalDto); BeanUtils.copyProperties(model, waterResourceNaturalDto);
waterResourceNaturalDto.setSequenceNbr(waterResourceNatural.getSequenceNbr()); waterResourceNaturalDto.setSequenceNbr(waterResourceNatural.getSequenceNbr());
waterResourceNaturalDto.setResourceId(sequenceNbr);
waterResourceNaturalService.updateWithModel(waterResourceNaturalDto); waterResourceNaturalService.updateWithModel(waterResourceNaturalDto);
break; break;
case "pool": case "pool":
...@@ -278,6 +281,7 @@ public class WaterResourceController extends BaseController { ...@@ -278,6 +281,7 @@ public class WaterResourceController extends BaseController {
sequenceNbr)); sequenceNbr));
BeanUtils.copyProperties(model, waterResourcePoolDto); BeanUtils.copyProperties(model, waterResourcePoolDto);
waterResourcePoolDto.setSequenceNbr(waterResourcePool.getSequenceNbr()); waterResourcePoolDto.setSequenceNbr(waterResourcePool.getSequenceNbr());
waterResourcePoolDto.setResourceId(sequenceNbr);
waterResourcePoolService.updateWithModel(waterResourcePoolDto); waterResourcePoolService.updateWithModel(waterResourcePoolDto);
break; break;
} }
...@@ -457,7 +461,6 @@ public class WaterResourceController extends BaseController { ...@@ -457,7 +461,6 @@ public class WaterResourceController extends BaseController {
} }
} }
/*bug 2913 更换保存方式 存储到公共附件表 chenzhao 2021-10-18 start*/ /*bug 2913 更换保存方式 存储到公共附件表 chenzhao 2021-10-18 start*/
Page<WaterResourceDto> waterResourceDtoPage = waterResourceServiceImpl.queryForWaterResourcePage(page, name, resourceType, Page<WaterResourceDto> waterResourceDtoPage = waterResourceServiceImpl.queryForWaterResourcePage(page, name, resourceType,
belongBuildingId, belongFightingSystemId, sequenceNbr, classifyId, bizOrgCode, equipCateGoryCode,ids,companyId); belongBuildingId, belongFightingSystemId, sequenceNbr, classifyId, bizOrgCode, equipCateGoryCode,ids,companyId);
......
...@@ -87,7 +87,9 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> { ...@@ -87,7 +87,9 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<String> getEquipmentIotCodeLists(); List<String> getEquipmentIotCodeLists();
List<HashMap<String, Object>> getEquipBySourceId(@Param("sourceIds") List<Long> sourceIds, @Param("categoryId") List<Long> categoryId, @Param("equipCode") String equipCode, @Param("equipName") String equipName,@Param("companyId") String companyId); List<HashMap<String, Object>> getEquipBySourceId(@Param("sourceIds") List<Long> sourceIds, @Param("categoryId") List<Long> categoryId, @Param("equipCode") String equipCode, @Param("equipName") String equipName,@Param("companyId") String companyId,@Param("current") Long current,@Param("size") Long size);
int getEquipBySourceIdCount(@Param("sourceIds") List<Long> sourceIds, @Param("categoryId") List<Long> categoryId, @Param("equipCode") String equipCode, @Param("equipName") String equipName,@Param("companyId") String companyId);
List getMenuChildren(@Param("id") Long id); List getMenuChildren(@Param("id") Long id);
......
...@@ -673,8 +673,9 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe ...@@ -673,8 +673,9 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
categoryIdList = categorieChildren.stream().map(category -> category.getId()).collect(Collectors.toList()); categoryIdList = categorieChildren.stream().map(category -> category.getId()).collect(Collectors.toList());
categoryIdList.add(categoryRoot); categoryIdList.add(categoryRoot);
} }
List<HashMap<String,Object>> equipmentList = equipmentSpecificMapper.getEquipBySourceId(idsList, categoryIdList,equipCode == null ?equipCode:equipCode.replace(" ", ""), equipName == null ? equipName: equipName .replace(" ", ""),companyId); List<HashMap<String,Object>> equipmentList = equipmentSpecificMapper.getEquipBySourceId(idsList, categoryIdList,equipCode == null ?equipCode:equipCode.replace(" ", ""), equipName == null ? equipName: equipName .replace(" ", ""),companyId,page.getCurrent(),page.getSize());
page.setTotal(equipmentList.size()); int total = equipmentSpecificMapper.getEquipBySourceIdCount(idsList, categoryIdList,equipCode == null ?equipCode:equipCode.replace(" ", ""), equipName == null ? equipName: equipName .replace(" ", ""),companyId);
page.setTotal(total);
page.setRecords(equipmentList); page.setRecords(equipmentList);
return page; return page;
} }
......
...@@ -405,6 +405,53 @@ ...@@ -405,6 +405,53 @@
<if test="equipName != '' and equipName != null"> <if test="equipName != '' and equipName != null">
and spec.name like CONCAT("%", #{equipName},'%') and spec.name like CONCAT("%", #{equipName},'%')
</if> </if>
<if test="current != null and size != null">
Limit #{current},#{size}
</if>
</select>
<select id="getEquipBySourceIdCount" resultType="int">
SELECT
count(spec.id)
FROM
wl_equipment_specific spec
LEFT JOIN wl_equipment_detail equipment_detail ON equipment_detail.id = spec.equipment_detail_id
LEFT JOIN (
SELECT
DISTINCT equipment_specific_id
, warehouse_structure_id
FROM
wl_stock_detail
) AS detail ON detail.equipment_specific_id = spec.id
LEFT JOIN wl_warehouse_structure structure ON spec.warehouse_structure_id = structure.id
LEFT JOIN (
SELECT
s.id,
s.name AS prevName
FROM
wl_warehouse_structure s
) AS area ON area.id = structure.parent_id
LEFT JOIN wl_equipment we ON we.id = equipment_detail.equipment_id
LEFT JOIN wl_equipment_category category ON category.id = we.category_id
WHERE 1=1
<if test="sourceIds != null">and structure.id IN
<foreach collection="sourceIds" item="sourceIds" index="index" open="(" close=")" separator=",">
#{sourceIds}
</foreach>
</if>
<if test="categoryId != null and categoryId.size() > 0">
and category.id in
<foreach collection="categoryId" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="companyId != null and companyId != ''">
and spec.agency_id = #{companyId}
</if>
<if test="equipCode != '' and equipCode != null">and spec.code like concat("%", #{equipCode}, "%")</if>
<if test="equipName != '' and equipName != null">
and spec.name like CONCAT("%", #{equipName},'%')
</if>
</select> </select>
<select id="findAllParents" resultMap="menuTree"> <select id="findAllParents" resultMap="menuTree">
......
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