Browse Source

灵山项目:修改企业巡查安全隐患存在与否的错误

master
luyan 2 years ago
parent
commit
064379d3d2
  1. 15
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcPlaceOrgController.java
  2. 6
      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. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java
  5. 15
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcPlaceOrgDao.xml

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

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

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

@ -43,9 +43,9 @@ public interface IcPlaceOrgDao extends BaseDao<IcPlaceOrgEntity> {
**/ **/
List<PlaceOrgDetailResultDTO> getList(GetListPlaceOrgFormDTO formDTO); List<PlaceOrgDetailResultDTO> getList(GetListPlaceOrgFormDTO formDTO);
List<PlaceOrgByTypeResultDTO> getPlaceOrgByType(@Param("orgId")String orgId,@Param("orgType")String orgType); List<PlaceOrgByTypeResultDTO> getPlaceOrgByType(@Param("orgId") String orgId, @Param("orgType") String orgType);
IcPlaceOrgStatistics countPlaceOrgByDangerType(@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); List<PlaceOrgDetailResultDTO> getPlaceOrgByDanger(@Param("orgId") String orgId, @Param("orgType") String orgType, @Param("danger") Integer danger);
} }

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

@ -71,5 +71,5 @@ public interface IcPlaceOrgService extends BaseService<IcPlaceOrgEntity> {
IcPlaceOrgStatistics countPlaceOrgByDangerType(String orgId, String orgType); IcPlaceOrgStatistics countPlaceOrgByDangerType(String orgId, String orgType);
List<PlaceOrgDetailResultDTO> getPlaceOrgByDanger(String orgId, String orgType); List<PlaceOrgDetailResultDTO> getPlaceOrgByDanger(String orgId, String orgType, Integer danger);
} }

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

@ -216,8 +216,8 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl<IcPlaceOrgDao, IcPlac
} }
@Override @Override
public List<PlaceOrgDetailResultDTO> getPlaceOrgByDanger(String orgId, String orgType) { public List<PlaceOrgDetailResultDTO> getPlaceOrgByDanger(String orgId, String orgType, Integer danger) {
return baseDao.getPlaceOrgByDanger(orgId, orgType); return baseDao.getPlaceOrgByDanger(orgId, orgType, danger);
} }
} }

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

@ -164,9 +164,15 @@
AND p.id IN ( AND p.id IN (
SELECT r.PLACE_ORG_ID FROM ic_place_patrol_record r SELECT r.PLACE_ORG_ID FROM ic_place_patrol_record r
<where> <where>
r.FINAL_RESULT = 1 and r.DEL_FLAG = 0 r.DEL_FLAG = 0
<if test="null != danger and danger == 0">
AND r.FINAL_RESULT = 0
</if>
<if test="null != danger and danger == 1">
AND r.FIRST_RESULT = 1
</if>
<if test="null != orgType and orgType !=''"> <if test="null != orgType and orgType !=''">
<if test="null != orgId and orgId != '' and orgType == 'agancy'"> <if test="null != orgId and orgId != '' and orgType == 'agency'">
AND r.agency_id = #{orgId} AND r.agency_id = #{orgId}
</if> </if>
<if test="null != orgId and orgId != '' and orgType == 'grid'"> <if test="null != orgId and orgId != '' and orgType == 'grid'">
@ -174,9 +180,10 @@
</if> </if>
</if> </if>
</where> </where>
GROUP BY r.PLACE_ORG_ID
) )
<if test="null != orgType and orgType !=''"> <if test="null != orgType and orgType !=''">
<if test="null != orgId and orgId != '' and orgType == 'agancy'"> <if test="null != orgId and orgId != '' and orgType == 'agency'">
AND p.agency_id = #{orgId} AND p.agency_id = #{orgId}
</if> </if>
<if test="null != orgId and orgId != '' and orgType == 'grid'"> <if test="null != orgId and orgId != '' and orgType == 'grid'">
@ -184,7 +191,7 @@
</if> </if>
</if> </if>
</where> </where>
GROUP BY p.id
</select> </select>

Loading…
Cancel
Save