Commit d2fc740c authored by 高建强's avatar 高建强

Merge remote-tracking branch 'origin/develop_ccs' into develop_ccs

parents 37adfa43 0ff3f829
...@@ -47,7 +47,7 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> { ...@@ -47,7 +47,7 @@ public interface WaterResourceMapper extends BaseMapper<WaterResource> {
*/ */
Page<WaterResourceDto> getWaterResourcePageByParams(Page<WaterResourceDto> page, String name, String resourceType, Page<WaterResourceDto> getWaterResourcePageByParams(Page<WaterResourceDto> page, String name, String resourceType,
ArrayList<Long> belongBuildingId, Long belongFightingSystemId, ArrayList<Long> belongBuildingId, Long belongFightingSystemId,
Long sequenceNbr, String equipId,String bizOrgCode); Long sequenceNbr, String equipId,String bizOrgCode, String equipCateGoryCode);
Map<String, Object> getWaterTypeByBizOrgCode(String bizOrgCode); List<Map<String, Object>> getWaterTypeByBizOrgCode(String bizOrgCode);
} }
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
select * from cb_water_resource where is_delete = 1 select * from cb_water_resource where is_delete = 1
<if test="sequenceNbr != null and sequenceNbr != ''">and sequence_nbr = #{sequenceNbr}</if> <if test="sequenceNbr != null and sequenceNbr != ''">and sequence_nbr = #{sequenceNbr}</if>
<if test="resourceType != null and resourceType != ''">and resource_type = #{resourceType}</if> <if test="resourceType != null and resourceType != ''">and resource_type = #{resourceType}</if>
<if test="equipCateGoryCode != null and equipCateGoryCode != ''">and equip_category_code = #{equipCateGoryCode}</if>
<if test="equipId != null and equipId != ''">and equip_id = #{equipId}</if> <if test="equipId != null and equipId != ''">and equip_id = #{equipId}</if>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="belongFightingSystemId != null"> <if test="belongFightingSystemId != null">
...@@ -152,15 +153,15 @@ ...@@ -152,15 +153,15 @@
</select> </select>
<select id="getWaterTypeByBizOrgCode" resultType="map"> <select id="getWaterTypeByBizOrgCode" resultType="map">
SELECT SELECT
equip_category_code, equip_category_code type,
COUNT(sequence_nbr) as num COUNT(sequence_nbr) as num
FROM FROM
cb_water_resource cb_water_resource
WHERE WHERE
is_delete = 0 is_delete = 1
<if test="bizOrgCode != null and bizOrgCode != ''">AND biz_org_code like concat( #{bizOrgCode}, '%')</if> <if test="bizOrgCode != null and bizOrgCode != ''">AND biz_org_code like concat( #{bizOrgCode}, '%')</if>
GROUP BY GROUP BY
equip_category_code equip_category_code
......
...@@ -465,14 +465,15 @@ public class WaterResourceController extends BaseController { ...@@ -465,14 +465,15 @@ public class WaterResourceController extends BaseController {
Long belongFightingSystemId, Long sequenceNbr, Long belongFightingSystemId, Long sequenceNbr,
String resourceType, String resourceType,
String classifyId, String classifyId,
String bizOrgCode) { String bizOrgCode,
String equipCateGoryCode) {
Page<WaterResourceDto> page = new Page<>(); Page<WaterResourceDto> page = new Page<>();
page.setCurrent(pageNum); page.setCurrent(pageNum);
page.setSize(pageSize); page.setSize(pageSize);
/*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); belongBuildingId, belongFightingSystemId, sequenceNbr, classifyId,bizOrgCode, equipCateGoryCode);
List<WaterResourceDto> records = waterResourceDtoPage.getRecords(); List<WaterResourceDto> records = waterResourceDtoPage.getRecords();
records.forEach(i->{ records.forEach(i->{
Map<String, List<AttachmentDto>> attachments = sourceFileService.getAttachments(i.getSequenceNbr()); Map<String, List<AttachmentDto>> attachments = sourceFileService.getAttachments(i.getSequenceNbr());
......
...@@ -177,6 +177,14 @@ public class WarehouseStructureController extends AbstractBaseController { ...@@ -177,6 +177,14 @@ public class WarehouseStructureController extends AbstractBaseController {
return iWarehouseStructureService.tree(id); return iWarehouseStructureService.tree(id);
} }
@RequestMapping(value = "/gettree/{id}", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "树查询", notes = "树查询")
public List<WarehouseStructure> gettree(@PathVariable Long id,String bizOrgCode) {
return iWarehouseStructureService.gettree(id,bizOrgCode);
}
/** /**
* 批量删除 * 批量删除
* *
......
...@@ -17,7 +17,7 @@ public interface IWarehouseStructureService extends IService<WarehouseStructure> ...@@ -17,7 +17,7 @@ public interface IWarehouseStructureService extends IService<WarehouseStructure>
WarehouseStructure saveOne(WarehouseStructure warehouseStructure); WarehouseStructure saveOne(WarehouseStructure warehouseStructure);
List<WarehouseStructure> tree(Long warehouseId); List<WarehouseStructure> tree(Long warehouseId);
List<WarehouseStructure> gettree(Long warehouseId,String bizOrgCode);
WarehouseStructure updateOneById(WarehouseStructure warehouseStructure); WarehouseStructure updateOneById(WarehouseStructure warehouseStructure);
boolean removeOneById(Long id) throws Exception; boolean removeOneById(Long id) throws Exception;
......
...@@ -6,6 +6,7 @@ import java.util.HashMap; ...@@ -6,6 +6,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.yeejoin.equipmanage.common.entity.FormInstance;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -63,6 +64,18 @@ public class WarehouseStructureServiceImpl extends ServiceImpl<WarehouseStructur ...@@ -63,6 +64,18 @@ public class WarehouseStructureServiceImpl extends ServiceImpl<WarehouseStructur
return list; return list;
} }
@Override
public List<WarehouseStructure> gettree(Long warehouseId,String bizOrgCode) {
QueryWrapper<WarehouseStructure> one = new QueryWrapper<>();
one.eq("warehouse_id",warehouseId);
one.likeRight("biz_org_code",bizOrgCode);
List<WarehouseStructure> list = warehouseStructureMapper.selectList(one);
list = buildByRecursive(list,warehouseId);
return list;
}
/** /**
* 生成code * 生成code
* *
......
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