Browse Source

灵山项目:大屏安全生产企业--存在隐患交互接口

master
luyan 2 years ago
parent
commit
fa1bda4845
  1. 11
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlaceOrgDao.java
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlaceOrgService.java
  4. 5
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java
  5. 51
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml

11
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java

@ -132,5 +132,16 @@ public class IcPlaceOrgController {
return new Result<IcPlaceOrgStatistics>().ok(placeOrgService.countPlaceOrgByDangerType(orgId, orgType));
}
/**
* @description 灵山大屏存在隐患获取企业信息
* @throws
* @author yan Lu
* @date 2023/5/30 17:21
*/
@GetMapping("getPlaceOrgByDanger")
public Result<List<PlaceOrgDetailResultDTO>> getPlaceOrgByDanger(@RequestParam("orgId") String orgId,
@RequestParam("orgType") String orgType){
return new Result().ok(placeOrgService.getPlaceOrgByDanger(orgId, orgType));
}
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcPlaceOrgDao.java

@ -46,4 +46,6 @@ public interface IcPlaceOrgDao extends BaseDao<IcPlaceOrgEntity> {
List<PlaceOrgByTypeResultDTO> getPlaceOrgByType(@Param("orgId")String orgId,@Param("orgType")String orgType);
IcPlaceOrgStatistics countPlaceOrgByDangerType(@Param("orgId")String orgId,@Param("orgType")String orgType);
List<PlaceOrgDetailResultDTO> getPlaceOrgByDanger(@Param("orgId")String orgId,@Param("orgType")String orgType);
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcPlaceOrgService.java

@ -70,4 +70,6 @@ public interface IcPlaceOrgService extends BaseService<IcPlaceOrgEntity> {
List<PlaceOrgByTypeResultDTO> getPlaceOrgByType(String orgId, String orgType, String dictType);
IcPlaceOrgStatistics countPlaceOrgByDangerType(String orgId, String orgType);
List<PlaceOrgDetailResultDTO> getPlaceOrgByDanger(String orgId, String orgType);
}

5
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java

@ -215,4 +215,9 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl<IcPlaceOrgDao, IcPlac
return baseDao.countPlaceOrgByDangerType(orgId, orgType);
}
@Override
public List<PlaceOrgDetailResultDTO> getPlaceOrgByDanger(String orgId, String orgType) {
return baseDao.getPlaceOrgByDanger(orgId, orgType);
}
}

51
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml

@ -119,4 +119,55 @@
) rr
</select>
<select id="getPlaceOrgByDanger" resultType="com.epmet.dto.result.PlaceOrgDetailResultDTO">
SELECT
p.id placeOrgId,
p.grid_id gridId,
b.grid_name gridName,
p.nine_place_val ninePlaceVal,
p.place_org_name placeOrgName,
p.address address,
p.scale scale,
p.person_in_charge personInCharge,
p.mobile mobile,
p.AGENCY_ID agencyId,
p.SECURITY_FLAG securityFlag,
p.SECURITY_PRINCIPAL_NAME securityPrincipalName,
p.SECURITY_PRINCIPAL_MOBILE securityPrincipalMobile,
p.BQ_LD bqLd,
p.BQ_GB bqGb,
p.LONGITUDE longitude,
p.LATITUDE latitude,
p.COMPANY_PROFILE companyProfile
FROM ic_place_org p
LEFT JOIN customer_grid b ON p.GRID_ID = b.ID
<where>
p.DEL_FLAG = 0
AND p.id IN (
SELECT r.PLACE_ORG_ID FROM ic_place_patrol_record r
<where>
r.FINAL_RESULT = 1 and r.DEL_FLAG = 0
<if test="null != orgType and orgType !=''">
<if test="null != orgId and orgId != '' and orgType == 'agancy'">
AND r.agency_id = #{orgId}
</if>
<if test="null != orgId and orgId != '' and orgType == 'grid'">
AND r.grid_id = #{orgId}
</if>
</if>
</where>
)
<if test="null != orgType and orgType !=''">
<if test="null != orgId and orgId != '' and orgType == 'agancy'">
AND p.agency_id = #{orgId}
</if>
<if test="null != orgId and orgId != '' and orgType == 'grid'">
AND p.grid_id = #{orgId}
</if>
</if>
</where>
</select>
</mapper>

Loading…
Cancel
Save