| | |
| | | @ApiModelProperty("隐患or安全记录(1.隐患 2.安全记录)") |
| | | private Integer dangerOrRecord; |
| | | |
| | | @ApiModelProperty("社区名字") |
| | | private String communityName; |
| | | |
| | | /** |
| | | * 巡查类型 |
| | | */ |
| | |
| | | @ApiOperation(value = "分页查询巡查记录", response = ComSwPatrolRecordVO.class) |
| | | @PostMapping("/pagePatrolRecord") |
| | | public R pagePatrolRecord(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | if(comSwPatrolRecordPageDTO.getCommunityId()==null){ |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | } |
| | | return communityService.pagePatrolRecord(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页查询安全工作记录", response = ComSwSafetyWorkRecordVO.class) |
| | | @PostMapping("/pageSafetyWorkRecord") |
| | | public R pageSafetyWorkRecord(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | if(comSwPatrolRecordPageDTO.getCommunityId()==null){ |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | } |
| | | return communityService.pageSafetyWorkRecord(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "分页查询隐患报告", response = ComSwDangerReportVO.class) |
| | | @PostMapping("/pageDangerReport") |
| | | public R pageDangerReport(@RequestBody ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | if(comSwPatrolRecordPageDTO.getCommunityId()==null){ |
| | | Long communityId = this.getCommunityId(); |
| | | comSwPatrolRecordPageDTO.setCommunityId(communityId); |
| | | } |
| | | return communityService.pageDangerReport(comSwPatrolRecordPageDTO); |
| | | } |
| | | |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComSwDangerReportEditDTO; |
| | | import com.panzhihua.service_community.dao.ComActDAO; |
| | | import com.panzhihua.service_community.model.dos.ComSwSafetyWorkRecordDO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | |
| | | @Override |
| | | public R pageDangerReport(ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | |
| | | comSwDangerReportVO.setCreateName(comSwPatrolRecordDAO.getCreateName(comSwDangerReportVO.getCreateBy())); |
| | | } |
| | | |
| | | // 所属社区名称 |
| | | comSwDangerReportVO.setCommunityName(comActDAO.selectById(comSwDangerReportVO.getCommunityId()).getName()); |
| | | |
| | | // 查询指派人名称 |
| | | if (StringUtils.isNotEmpty(comSwDangerReportVO.getAssignPerson())) { |
| | | StringBuilder sb = new StringBuilder(); |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.ComSwPatrolRecordEditDTO; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.dao.ComSwDangerReportDAO; |
| | | import com.panzhihua.service_community.dao.ComSwPatrolRecordDAO; |
| | | import com.panzhihua.service_community.dao.ComSwPatrolRecordReportDAO; |
| | | import com.panzhihua.service_community.dao.ComSwSafetyWorkRecordDAO; |
| | | import com.panzhihua.service_community.model.dos.ComSwDangerReportDO; |
| | | import com.panzhihua.service_community.model.dos.ComSwPatrolRecordDO; |
| | | import com.panzhihua.service_community.model.dos.ComSwPatrolRecordReportDO; |
| | |
| | | |
| | | @Resource |
| | | private ComSwPatrolRecordReportDAO comSwPatrolRecordReportDAO; |
| | | |
| | | @Resource |
| | | private ComActDAO comActDAO; |
| | | |
| | | @Override |
| | | public R pagePatrolRecord(ComSwPatrolRecordPageDTO comSwPatrolRecordPageDTO) { |
| | |
| | | if (comSwPatrolRecordVO.getCreateBy() != null) { |
| | | comSwPatrolRecordVO.setCreateName(comSwPatrolRecordDAO.getCreateName(comSwPatrolRecordVO.getCreateBy())); |
| | | } |
| | | // 所属社区名称 |
| | | comSwPatrolRecordVO.setCommunityName(comActDAO.selectById(comSwPatrolRecordVO.getCommunityId()).getName()); |
| | | |
| | | ComSwPatrolRecordReportDO recordReportDO = |
| | | comSwPatrolRecordReportDAO.selectOne(new QueryWrapper<ComSwPatrolRecordReportDO>().lambda() |
| | |
| | | csdr.street_suggestion AS streetSuggestion, |
| | | csdr.undertake_record AS undertakeRecord, |
| | | csdr.leader_suggestion AS leaderSuggestion, |
| | | csdr.assign_person AS assignPerson |
| | | csdr.assign_person AS assignPerson, |
| | | t.name as communityName |
| | | FROM |
| | | com_sw_danger_report as csdr |
| | | left join com_sw_patrol_record_report as csprr on csprr.report_id = csdr.id |
| | | left join com_sw_patrol_record as cspr on csprr.patrol_record_id = cspr.id |
| | | left join com_act t on csdr.community_id =t.community_id |
| | | <where> |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != ""'> |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'> |
| | | AND cspr.community_id = #{comSwPatrolRecordDTO.communityId} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.communityId == 0'> |
| | | AND t.street_id in (12,14,15,16,17,19) |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.patrolPerson != null and comSwPatrolRecordDTO.patrolPerson != ""'> |
| | | AND cspr.person_name LIKE concat('%',#{comSwPatrolRecordDTO.patrolPerson},'%') |
| | | </if> |
| | |
| | | cspr.succession_time AS successionTime, |
| | | cspr.create_at AS createAt, |
| | | cspr.create_by AS createBy, |
| | | csprr.report_id AS reportId |
| | | csprr.report_id AS reportId, |
| | | t.name as communityName |
| | | FROM |
| | | com_sw_patrol_record as cspr |
| | | left join com_sw_patrol_record_report as csprr on csprr.patrol_record_id = cspr.id |
| | | left join com_act t on cspr.community_id = t.community_id |
| | | <where> |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != ""'> |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'> |
| | | AND cspr.community_id = #{comSwPatrolRecordDTO.communityId} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.communityId == 0'> |
| | | AND t.street_id in (12,14,15,16,17,19) |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.patrolPerson != null and comSwPatrolRecordDTO.patrolPerson != ""'> |
| | | AND cspr.person_name LIKE concat('%',#{comSwPatrolRecordDTO.patrolPerson},'%') |
| | | </if> |
| | |
| | | cspr.record_photo AS recordPhoto, |
| | | csswr.remark, |
| | | cspr.create_at AS createAt, |
| | | cspr.create_by AS createBy |
| | | cspr.create_by AS createBy, |
| | | t.name as communityName |
| | | FROM |
| | | com_sw_safety_work_record as csswr |
| | | left join com_sw_patrol_record_report as csprr on csprr.report_id = csswr.id |
| | | left join com_sw_patrol_record as cspr on csprr.patrol_record_id = cspr.id |
| | | left join com_act t on cspr.community_id = t.community_id |
| | | <where> |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != ""'> |
| | | <if test='comSwPatrolRecordDTO.communityId != null and comSwPatrolRecordDTO.communityId != 0'> |
| | | AND cspr.community_id = #{comSwPatrolRecordDTO.communityId} |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.communityId == 0'> |
| | | AND t.street_id in (12,14,15,16,17,19) |
| | | </if> |
| | | <if test='comSwPatrolRecordDTO.patrolPerson != null and comSwPatrolRecordDTO.patrolPerson != ""'> |
| | | AND cspr.person_name LIKE concat('%',#{comSwPatrolRecordDTO.patrolPerson},'%') |
| | | </if> |