28 files modified
1 files added
| | |
| | | <version>1.7.6</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.luhuiguo</groupId> |
| | | <artifactId>aspose-pdf</artifactId> |
| | | <version>23.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.luhuiguo</groupId> |
| | | <artifactId>aspose-words</artifactId> |
| | | <version>23.1</version> |
| | | </dependency> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.luhuiguo</groupId>--> |
| | | <!-- <artifactId>aspose-pdf</artifactId>--> |
| | | <!-- <version>23.1</version>--> |
| | | <!-- </dependency>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.luhuiguo</groupId>--> |
| | | <!-- <artifactId>aspose-words</artifactId>--> |
| | | <!-- <version>23.1</version>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>org.springframework.boot</groupId>--> |
| | |
| | | package org.springblade.common.utils; |
| | | |
| | | import java.io.InputStream; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | |
| | | public class WordToPdfUtils { |
| | | // https://srgdjczzxtpt.com:2080/gminio/jczz/upload/20240710/ade086b8d725a08631b62d812a63f6da.docx |
| | | |
| | |
| | | // 判断文件后缀名是否doc,ppt,xls |
| | | if (fileName.endsWith(".doc") || fileName.endsWith(".docx")) { |
| | | // 获取文件流 |
| | | URL url = new URL(pdfPath); |
| | | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | connection.setRequestProperty("User-Agent", "Mozilla/5.0"); |
| | | // 获取文件名 |
| | | String orFileName = fileName.substring(0, fileName.lastIndexOf(".")); |
| | | InputStream inputStream = connection.getInputStream(); |
| | | long timeMillis = System.currentTimeMillis(); |
| | | // String filePathPdf = "/data/app/jczz/pdf/" + orFileName + "_" + timeMillis + ".pdf"; |
| | | String filePathPdf = "D:\\公司\\" + orFileName + "_" + timeMillis + ".pdf"; |
| | | com.aspose.words.Document doc = new com.aspose.words.Document(inputStream); |
| | | doc.save(filePathPdf, com.aspose.words.SaveFormat.PDF); |
| | | return filePathPdf; |
| | | // URL url = new URL(pdfPath); |
| | | // HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
| | | // connection.setRequestProperty("User-Agent", "Mozilla/5.0"); |
| | | // // 获取文件名 |
| | | // String orFileName = fileName.substring(0, fileName.lastIndexOf(".")); |
| | | // InputStream inputStream = connection.getInputStream(); |
| | | // long timeMillis = System.currentTimeMillis(); |
| | | // // String filePathPdf = "/data/app/jczz/pdf/" + orFileName + "_" + timeMillis + ".pdf"; |
| | | // String filePathPdf = "D:\\公司\\" + orFileName + "_" + timeMillis + ".pdf"; |
| | | // com.aspose.words.Document doc = new com.aspose.words.Document(inputStream); |
| | | // doc.save(filePathPdf, com.aspose.words.SaveFormat.PDF); |
| | | return ""; |
| | | } else { |
| | | throw new Exception("文件格式不正确"); |
| | | } |
| | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * 反炸宣传对象表 控制器 |
| | | * 反诈宣传对象表 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2024-03-15 |
| | |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("blade-backblastPubPerson/backblastPubPerson") |
| | | @Api(value = "反炸宣传对象表", tags = "反炸宣传对象表接口") |
| | | @Api(value = "反诈宣传对象表", tags = "反诈宣传对象表接口") |
| | | public class BackblastPubPersonController { |
| | | |
| | | private final IBackblastPubPersonService backblastPubPersonService; |
| | | private final BladeLogger bladeLogger; |
| | | |
| | | /** |
| | | * 反炸宣传对象表 详情 |
| | | * 反诈宣传对象表 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | |
| | | return R.data(detail); |
| | | } |
| | | /** |
| | | * 反炸宣传对象表 分页 |
| | | * 反诈宣传对象表 分页 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperationSupport(order = 2) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传对象表 自定义分页 |
| | | * 反诈宣传对象表 自定义分页 |
| | | */ |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiLog("反炸宣传对象表 自定义分页") |
| | | @ApiLog("反诈宣传对象表 自定义分页") |
| | | @ApiOperation(value = "分页", notes = "传入backblastPubPerson") |
| | | public R<IPage<BackblastPubPersonVO>> page(BackblastPubPersonVO backblastPubPerson, Query query) { |
| | | bladeLogger.info("反炸宣传对象表 自定义分页", JsonUtil.toJson(backblastPubPerson)); |
| | | bladeLogger.info("反诈宣传对象表 自定义分页", JsonUtil.toJson(backblastPubPerson)); |
| | | IPage<BackblastPubPersonVO> pages = backblastPubPersonService.selectBackblastPubPersonPage(Condition.getPage(query), backblastPubPerson); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传对象表 新增 |
| | | * 反诈宣传对象表 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传对象表 修改 |
| | | * 反诈宣传对象表 修改 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传对象表 新增或修改 |
| | | * 反诈宣传对象表 新增或修改 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传对象表 删除 |
| | | * 反诈宣传对象表 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiLog("反炸宣传对象表 删除") |
| | | @ApiLog("反诈宣传对象表 删除") |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | bladeLogger.info("反炸宣传对象表 删除", JsonUtil.toJson(ids)); |
| | | bladeLogger.info("反诈宣传对象表 删除", JsonUtil.toJson(ids)); |
| | | return R.status(backblastPubPersonService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | /** |
| | | * 反炸宣传对象表 自定义详情 |
| | | * 反诈宣传对象表 自定义详情 |
| | | * @param backblastPubPerson |
| | | * @return |
| | | */ |
| | | @GetMapping("/getDetail") |
| | | @ApiOperationSupport(order = 9) |
| | | @ApiLog("反炸宣传对象表 自定义详情") |
| | | @ApiLog("反诈宣传对象表 自定义详情") |
| | | @ApiOperation(value = "详情", notes = "传入backblastPubPerson") |
| | | public R getDetail(BackblastPubPersonVO backblastPubPerson) { |
| | | bladeLogger.info("反炸宣传对象表 自定义详情", JsonUtil.toJson(backblastPubPerson)); |
| | | bladeLogger.info("反诈宣传对象表 自定义详情", JsonUtil.toJson(backblastPubPerson)); |
| | | BackblastPubPersonVO detail = backblastPubPersonService.getDetail(backblastPubPerson); |
| | | return R.data(detail); |
| | | } |
| | |
| | | /** 是否删除 0:否 1:是 */ |
| | | @ApiModelProperty(value = "是否删除 0:否 1:是", example = "") |
| | | @TableField("is_deleted") |
| | | @TableLogic |
| | | // @TableLogic |
| | | private Integer isDeleted; |
| | | } |
| | |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | | import org.springblade.modules.grid.entity.GridPatrolRecordEntity; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.service.IPoliceAffairsGridService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.checkInRecords.entity.CheckInRecordsEntity; |
| | |
| | | import org.springblade.modules.checkInRecords.wrapper.CheckInRecordsWrapper; |
| | | import org.springblade.modules.checkInRecords.service.ICheckInRecordsService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 打卡记录表 控制器 |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入checkInRecords") |
| | | public R save(@Valid @RequestBody CheckInRecordsEntity checkInRecords) { |
| | | checkInRecords.setCreateUserId(AuthUtil.getUserId()); |
| | | return R.status(checkInRecordsService.save(checkInRecords)); |
| | | return R.status(checkInRecordsService.saveCheckInRecords(checkInRecords)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @TableLogic |
| | | private Integer deletedFlag; |
| | | |
| | | @ApiModelProperty(value = "网格编号") |
| | | @TableField("grid_code") |
| | | private String gridCode; |
| | | /** |
| | | * 警务网格编号 |
| | | */ |
| | | @ApiModelProperty(value = "警务网格编号") |
| | | @TableField("jw_grid_code") |
| | | private String jwGridCode; |
| | | |
| | | } |
| | |
| | | jcir.address, |
| | | jcir.deleted_flag, |
| | | bu.`name`, |
| | | bd.region_code |
| | | bd.region_code, |
| | | br.town_name as townStreetName, |
| | | br.name as neiName |
| | | FROM |
| | | jczz_check_in_records jcir |
| | | LEFT JOIN blade_user bu ON bu.id = jcir.create_user_id |
| | | LEFT JOIN blade_dept bd on bd.id = bu.dept_id |
| | | LEFT JOIN jczz_grid jg on jg.grid_code=jcir.grid_code |
| | | LEFT JOIN blade_region br on br.code = jg.community_code |
| | | <where> |
| | | <if test="checkInRecords.townStreetName!=null and checkInRecords.townStreetName!=''"> |
| | | and br.town_name like concat('%',#{checkInRecords.townStreetName},'%') |
| | | </if> |
| | | |
| | | <if test="checkInRecords.neiName!=null and checkInRecords.neiName!=''"> |
| | | and br.name like concat('%',#{checkInRecords.neiName},'%') |
| | | </if> |
| | | <if test="checkInRecords.id != null ">and jcir.id = #{checkInRecords.id}</if> |
| | | <if test="checkInRecords.createUserId != null ">and jcir.create_user_id = #{checkInRecords.createUserId} |
| | | </if> |
| | |
| | | public List<CheckInRecordsDTO> selectCheckInRecordsList(CheckInRecordsDTO checkInRecordsDTO); |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @param checkInRecords |
| | | * @return |
| | | */ |
| | | boolean saveCheckInRecords(CheckInRecordsEntity checkInRecords); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.checkInRecords.dto.CheckInRecordsDTO; |
| | | import org.springblade.modules.checkInRecords.entity.CheckInRecordsEntity; |
| | | import org.springblade.modules.checkInRecords.vo.CheckInRecordsVO; |
| | | import org.springblade.modules.checkInRecords.mapper.CheckInRecordsMapper; |
| | | import org.springblade.modules.checkInRecords.service.ICheckInRecordsService; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | | import org.springblade.modules.grid.entity.GridPatrolRecordEntity; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.service.IPoliceAffairsGridService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | |
| | | return this.baseMapper.selectCheckInRecordsList(checkInRecordsDTO); |
| | | } |
| | | |
| | | @Override |
| | | public boolean saveCheckInRecords(CheckInRecordsEntity checkInRecords) { |
| | | checkInRecords.setCreateUserId(AuthUtil.getUserId()); |
| | | setGridInfo(checkInRecords); |
| | | return save(checkInRecords); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置警格网格信息 |
| | | * @param checkInRecords |
| | | */ |
| | | public void setGridInfo(CheckInRecordsEntity checkInRecords) { |
| | | // 根据位置设置网格,警格编号 |
| | | IGridService gridService = SpringUtils.getBean(IGridService.class); |
| | | IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class); |
| | | String point = "'POINT(" + checkInRecords.getLng() + " " + checkInRecords.getLat() + ")'"; |
| | | //点坐标解析网格 |
| | | List<GridEntity> gridEntityList = gridService.spatialAnalysis(point); |
| | | if (gridEntityList.size()>0){ |
| | | GridEntity gridEntity = gridEntityList.get(0); |
| | | checkInRecords.setGridCode(gridEntity.getGridCode()); |
| | | } |
| | | //点坐标解析警格 |
| | | List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point); |
| | | if (policeAffairsGridEntityList.size()>0){ |
| | | PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0); |
| | | checkInRecords.setJwGridCode(policeAffairsGridEntity.getJwGridCode()); |
| | | } |
| | | } |
| | | } |
| | |
| | | public class CheckInRecordsVO extends CheckInRecordsEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "用户名称", example = "") |
| | | private String name; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "开始时间", example = "") |
| | | private String startTime; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "结束时间", example = "") |
| | | private String endTime; |
| | | |
| | | private String deptId; |
| | |
| | | @ApiModelProperty(value = "社区编号", example = "") |
| | | private String communityCode; |
| | | |
| | | |
| | | @ApiModelProperty(value = "街道名称", required = true) |
| | | private String townStreetName; |
| | | |
| | | @ApiModelProperty(value = "社区名称", required = true) |
| | | private String neiName; |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.backblast.excel.BackblastPubRecordExcel; |
| | | import org.springblade.modules.grid.excel.GridPatrolRecordExcel; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.grid.entity.GridPatrolRecordEntity; |
| | |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 网格巡查记录表 控制器 |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入gridPatrolRecord") |
| | | public R save(@Valid @RequestBody GridPatrolRecordEntity gridPatrolRecord) { |
| | | gridPatrolRecord.setCreateTime(new Date()); |
| | | gridPatrolRecord.setCreateUser(AuthUtil.getUserId()); |
| | | return R.status(gridPatrolRecordService.save(gridPatrolRecord)); |
| | | return R.status(gridPatrolRecordService.saveGridPatrolRecord(gridPatrolRecord)); |
| | | } |
| | | |
| | | /** |
| | |
| | | return R.status(gridPatrolRecordService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | // 导出网格巡查记录表 |
| | | @GetMapping("/export") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "导出", notes = "传入gridPatrolRecord") |
| | | public void export(GridPatrolRecordVO gridPatrolRecord, HttpServletResponse response) { |
| | | List<GridPatrolRecordExcel> list = gridPatrolRecordService.export(gridPatrolRecord); |
| | | ExcelUtil.export(response, "网格巡查记录" + DateUtil.time(), "网格巡查记录数据表", list, GridPatrolRecordExcel.class); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("location") |
| | | private String location; |
| | | |
| | | @ApiModelProperty(value = "网格编号") |
| | | @TableField("grid_code") |
| | | private String gridCode; |
| | | /** |
| | | * 警务网格编号 |
| | | */ |
| | | @ApiModelProperty(value = "警务网格编号") |
| | | @TableField("jw_grid_code") |
| | | private String jwGridCode; |
| | | |
| | | } |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.grid.excel; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.alibaba.excel.annotation.write.style.ColumnWidth; |
| | | import com.alibaba.excel.annotation.write.style.ContentRowHeight; |
| | | import com.alibaba.excel.annotation.write.style.HeadRowHeight; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 网格巡查记录表 实体类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2023-11-16 |
| | | */ |
| | | @Data |
| | | @ColumnWidth(25) |
| | | @HeadRowHeight(20) |
| | | @ContentRowHeight(18) |
| | | public class GridPatrolRecordExcel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ExcelProperty(value = "巡查人名称") |
| | | private String userName; |
| | | |
| | | @ExcelProperty(value = "街道名称") |
| | | private String townStreetName; |
| | | |
| | | @ExcelProperty(value = "社区名称") |
| | | private String neiName; |
| | | |
| | | @ExcelProperty(value = "名称") |
| | | private String name; |
| | | |
| | | @ExcelProperty(value = "内容") |
| | | private String context; |
| | | |
| | | @ExcelProperty(value = "巡查时间") |
| | | private Date patrolTime; |
| | | |
| | | @ExcelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @ExcelProperty(value = "纬度") |
| | | private String latitude; |
| | | |
| | | @ExcelProperty(value = "经度") |
| | | private String longitude; |
| | | |
| | | @ExcelProperty(value = "地址") |
| | | private String location; |
| | | |
| | | } |
| | |
| | | package org.springblade.modules.grid.mapper; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.backblast.vo.BackblastPubRecordVO; |
| | | import org.springblade.modules.grid.entity.GridPatrolRecordEntity; |
| | | import org.springblade.modules.grid.excel.GridPatrolRecordExcel; |
| | | import org.springblade.modules.grid.vo.GridPatrolRecordVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("isAdministrator") Integer isAdministrator); |
| | | |
| | | |
| | | /** |
| | | * 导出 |
| | | * @param gridPatrolRecord |
| | | * @param isAdministrator |
| | | * @param regionChildCodesList |
| | | * @param gridCodeList |
| | | * @return |
| | | */ |
| | | List<GridPatrolRecordExcel> selectGridPatrolRecordExport(@Param("gridPatrolRecord") GridPatrolRecordVO gridPatrolRecord, |
| | | @Param("isAdministrator") Integer isAdministrator, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("gridCodeList") List<String> gridCodeList); |
| | | } |
| | |
| | | |
| | | <!--自定义分页查询--> |
| | | <select id="selectGridPatrolRecordPage" resultType="org.springblade.modules.grid.vo.GridPatrolRecordVO"> |
| | | select jgpr.* from jczz_grid_patrol_record jgpr |
| | | LEFT JOIN blade_user bu on bu.id = jgpr.create_user and bu.is_deleted = 0 |
| | | LEFT JOIN blade_dept bd on bd.id = bu.dept_id and bd.is_deleted = 0 |
| | | where jgpr.is_deleted = 0 |
| | | <if test="gridPatrolRecord.name!=null and gridPatrolRecord.name!=''"> |
| | | and jgpr.name like concat('%',#{gridPatrolRecord.name},'%') |
| | | </if> |
| | | <if test="gridPatrolRecord.context!=null and gridPatrolRecord.context!=''"> |
| | | and jgpr.context like concat('%',#{gridPatrolRecord.context},'%') |
| | | </if> |
| | | <if test="gridPatrolRecord.createUser!=null"> |
| | | and jgpr.create_user = #{gridPatrolRecord.createUser} |
| | | </if> |
| | | select |
| | | jgpr.*, |
| | | bu.name as userName, |
| | | br.town_name as townStreetName, |
| | | br.name as neiName |
| | | FROM |
| | | jczz_grid_patrol_record jgpr |
| | | LEFT JOIN blade_user bu ON bu.id = jgpr.create_user |
| | | LEFT JOIN blade_dept bd ON bd.id = bu.dept_id |
| | | LEFT JOIN jczz_grid jg on jg.grid_code=jgpr.grid_code |
| | | LEFT JOIN blade_region br on br.code = jg.community_code |
| | | <where> |
| | | <if test="gridPatrolRecord.name!=null and gridPatrolRecord.name!=''"> |
| | | and jgpr.name like concat('%',#{gridPatrolRecord.name},'%') |
| | | </if> |
| | | |
| | | <if test="gridPatrolRecord.userName!=null and gridPatrolRecord.userName!=''"> |
| | | and bu.name like concat('%',#{gridPatrolRecord.userName},'%') |
| | | </if> |
| | | |
| | | <if test="gridPatrolRecord.townStreetName!=null and gridPatrolRecord.townStreetName!=''"> |
| | | and br.town_name like concat('%',#{gridPatrolRecord.townStreetName},'%') |
| | | </if> |
| | | |
| | | <if test="gridPatrolRecord.neiName!=null and gridPatrolRecord.neiName!=''"> |
| | | and br.name like concat('%',#{gridPatrolRecord.neiName},'%') |
| | | </if> |
| | | |
| | | <if test="gridPatrolRecord.context!=null and gridPatrolRecord.context!=''"> |
| | | and jgpr.context like concat('%',#{gridPatrolRecord.context},'%') |
| | | </if> |
| | | <if test="gridPatrolRecord.createUser!=null"> |
| | | and jgpr.create_user = #{gridPatrolRecord.createUser} |
| | | </if> |
| | | and jgpr.is_deleted = 0 |
| | | </where> |
| | | |
| | | order by jgpr.id desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectGridPatrolRecordExport" |
| | | resultType="org.springblade.modules.grid.excel.GridPatrolRecordExcel"> |
| | | select |
| | | jgpr.*, |
| | | bu.name as userName, |
| | | br.town_name as townStreetName, |
| | | br.name as neiName |
| | | FROM |
| | | jczz_grid_patrol_record jgpr |
| | | LEFT JOIN blade_user bu ON bu.id = jgpr.create_user |
| | | LEFT JOIN blade_dept bd ON bd.id = bu.dept_id |
| | | LEFT JOIN jczz_grid jg on jg.grid_code=jgpr.grid_code |
| | | LEFT JOIN blade_region br on br.code = jg.community_code |
| | | <where> |
| | | <if test="gridPatrolRecord.name!=null and gridPatrolRecord.name!=''"> |
| | | and jgpr.name like concat('%',#{gridPatrolRecord.name},'%') |
| | | </if> |
| | | |
| | | <if test="gridPatrolRecord.userName!=null and gridPatrolRecord.userName!=''"> |
| | | and bu.name like concat('%',#{gridPatrolRecord.userName},'%') |
| | | </if> |
| | | |
| | | <if test="gridPatrolRecord.townStreetName!=null and gridPatrolRecord.townStreetName!=''"> |
| | | and br.town_name like concat('%',#{gridPatrolRecord.townStreetName},'%') |
| | | </if> |
| | | |
| | | <if test="gridPatrolRecord.neiName!=null and gridPatrolRecord.neiName!=''"> |
| | | and br.name like concat('%',#{gridPatrolRecord.neiName},'%') |
| | | </if> |
| | | |
| | | <if test="gridPatrolRecord.context!=null and gridPatrolRecord.context!=''"> |
| | | and jgpr.context like concat('%',#{gridPatrolRecord.context},'%') |
| | | </if> |
| | | <if test="gridPatrolRecord.createUser!=null"> |
| | | and jgpr.create_user = #{gridPatrolRecord.createUser} |
| | | </if> |
| | | and jgpr.is_deleted = 0 |
| | | </where> |
| | | |
| | | order by jgpr.id desc |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.modules.grid.entity.GridPatrolRecordEntity; |
| | | import org.springblade.modules.grid.excel.GridPatrolRecordExcel; |
| | | import org.springblade.modules.grid.vo.GridPatrolRecordVO; |
| | | import org.springblade.core.mp.base.BaseService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 网格巡查记录表 服务类 |
| | |
| | | */ |
| | | IPage<GridPatrolRecordVO> selectGridPatrolRecordPage(IPage<GridPatrolRecordVO> page, GridPatrolRecordVO gridPatrolRecord); |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param gridPatrolRecord |
| | | * @return |
| | | */ |
| | | boolean saveGridPatrolRecord(GridPatrolRecordEntity gridPatrolRecord); |
| | | |
| | | /** |
| | | * 导出 |
| | | * @param gridPatrolRecord |
| | | * @return |
| | | */ |
| | | List<GridPatrolRecordExcel> export(GridPatrolRecordVO gridPatrolRecord); |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.grid.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.param.CommonParamSet; |
| | | import org.springblade.common.utils.AuthUtils; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.backblast.vo.BackblastPubRecordVO; |
| | | import org.springblade.modules.grid.entity.GridEntity; |
| | | import org.springblade.modules.grid.entity.GridPatrolRecordEntity; |
| | | import org.springblade.modules.grid.vo.GridPatrolRecordVO; |
| | | import org.springblade.modules.grid.excel.GridPatrolRecordExcel; |
| | | import org.springblade.modules.grid.mapper.GridPatrolRecordMapper; |
| | | import org.springblade.modules.grid.service.IGridPatrolRecordService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.grid.vo.GridPatrolRecordVO; |
| | | import org.springblade.modules.police.entity.PoliceAffairsGridEntity; |
| | | import org.springblade.modules.police.service.IPoliceAffairsGridService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | commonParamSet.getIsAdministrator())); |
| | | } |
| | | |
| | | /** |
| | | * 新增网格巡查记录表 |
| | | * @param gridPatrolRecord |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean saveGridPatrolRecord(GridPatrolRecordEntity gridPatrolRecord) { |
| | | gridPatrolRecord.setCreateTime(new Date()); |
| | | gridPatrolRecord.setCreateUser(AuthUtil.getUserId()); |
| | | // 设置网格信息 |
| | | setGridInfo(gridPatrolRecord); |
| | | // 保存 |
| | | return save(gridPatrolRecord); |
| | | } |
| | | |
| | | /** |
| | | * 设置警格网格信息 |
| | | * @param gridPatrolRecord |
| | | */ |
| | | public void setGridInfo(GridPatrolRecordEntity gridPatrolRecord) { |
| | | // 根据位置设置网格,警格编号 |
| | | IGridService gridService = SpringUtils.getBean(IGridService.class); |
| | | IPoliceAffairsGridService policeAffairsGridService = SpringUtils.getBean(IPoliceAffairsGridService.class); |
| | | String point = "'POINT(" + gridPatrolRecord.getLongitude() + " " + gridPatrolRecord.getLatitude() + ")'"; |
| | | //点坐标解析网格 |
| | | List<GridEntity> gridEntityList = gridService.spatialAnalysis(point); |
| | | if (gridEntityList.size()>0){ |
| | | GridEntity gridEntity = gridEntityList.get(0); |
| | | gridPatrolRecord.setGridCode(gridEntity.getGridCode()); |
| | | } |
| | | //点坐标解析警格 |
| | | List<PoliceAffairsGridEntity> policeAffairsGridEntityList = policeAffairsGridService.spatialAnalysis(point); |
| | | if (policeAffairsGridEntityList.size()>0){ |
| | | PoliceAffairsGridEntity policeAffairsGridEntity = policeAffairsGridEntityList.get(0); |
| | | gridPatrolRecord.setJwGridCode(policeAffairsGridEntity.getJwGridCode()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public List<GridPatrolRecordExcel> export(GridPatrolRecordVO gridPatrolRecord) { |
| | | CommonParamSet commonParamSet = new CommonParamSet<>().invoke(GridPatrolRecordVO.class, gridPatrolRecord); |
| | | if (!Strings.isBlank(gridPatrolRecord.getRoleName())){ |
| | | gridPatrolRecord.setCreateUser(AuthUtil.getUserId()); |
| | | } |
| | | return baseMapper.selectGridPatrolRecordExport(gridPatrolRecord, |
| | | commonParamSet.getIsAdministrator(), |
| | | commonParamSet.getRegionChildCodesList(), |
| | | commonParamSet.getGridCodeList()); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.grid.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springblade.modules.grid.entity.GridPatrolRecordEntity; |
| | | import org.springblade.core.tool.node.INode; |
| | | import lombok.Data; |
| | |
| | | public class GridPatrolRecordVO extends GridPatrolRecordEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 社区编号 |
| | | */ |
| | | @ApiModelProperty(value = "社区编号", required = true) |
| | | private String communityCode; |
| | | |
| | | /** |
| | | * 角色名称 |
| | | */ |
| | | @ApiModelProperty(value = "角色名称", required = true) |
| | | private String roleName; |
| | | |
| | | @ApiModelProperty(value = "巡查人名称", required = true) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "街道名称", required = true) |
| | | private String townStreetName; |
| | | |
| | | @ApiModelProperty(value = "社区名称", required = true) |
| | | private String neiName; |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 组织部标签统计 |
| | | * @param householdLabel |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/getOrgStatisticalLabels") |
| | | @ApiOperation(value = "组织部标签统计", notes = "") |
| | | public R<IPage<HouseholdLabelVO>> orgStatisticalLabels(HouseholdLabelVO householdLabel, Query query) { |
| | | IPage<HouseholdLabelVO> pages = householdLabelService.orgStatisticalLabels(Condition.getPage(query), householdLabel); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 统战标签统计 |
| | | * @param householdLabel |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/getUnitedFrontStatisticalLabels") |
| | | @ApiOperation(value = "统战标签统计", notes = "") |
| | | public R<IPage<HouseholdLabelVO>> unitedFrontStatisticalLabels(HouseholdLabelVO householdLabel, Query query) { |
| | | IPage<HouseholdLabelVO> pages = householdLabelService.unitedFrontStatisticalLabels(Condition.getPage(query), householdLabel); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 关注人员标签统计 |
| | | * @param householdLabel |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @GetMapping("/getFollowStatisticalLabels") |
| | | @ApiOperation(value = "统战标签统计", notes = "") |
| | | public R<IPage<HouseholdLabelVO>> followStatisticalLabels(HouseholdLabelVO householdLabel, Query query) { |
| | | IPage<HouseholdLabelVO> pages = householdLabelService.followStatisticalLabels(Condition.getPage(query), householdLabel); |
| | | return R.data(pages); |
| | | } |
| | | |
| | | /** |
| | | * 社区重点人员标签统计 |
| | | * @param householdLabel |
| | | * @param query |
| | |
| | | |
| | | List<Integer> getUserLabelList(UserHouseLabelDTO userHouseLabelDTO); |
| | | |
| | | List<HouseholdLabelVO> statisticalLabels(IPage page, HouseholdLabelVO householdLabel); |
| | | List<HouseholdLabelVO> statisticalLabels(IPage page, @Param("householdLabel") HouseholdLabelVO householdLabel); |
| | | |
| | | /** |
| | | * 组织部 |
| | | * @param page |
| | | * @param householdLabel |
| | | * @return |
| | | */ |
| | | List<HouseholdLabelVO> orgStatisticalLabels(IPage page, @Param("householdLabel") HouseholdLabelVO householdLabel); |
| | | |
| | | /** |
| | | * 统战人员 |
| | | * @param page |
| | | * @param householdLabel |
| | | * @return |
| | | */ |
| | | List<HouseholdLabelVO> unitedFrontStatisticalLabels(IPage page, @Param("householdLabel") HouseholdLabelVO householdLabel); |
| | | |
| | | List<HouseholdLabelVO> getCommunityStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel); |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<UserHouseLabelEntity> getLabelList(@Param("labelNames") String labelName); |
| | | |
| | | List<HouseholdLabelVO> followStatisticalLabels(IPage page, @Param("householdLabel") HouseholdLabelVO householdLabel); |
| | | } |
| | |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="orgStatisticalLabels" resultType="org.springblade.modules.house.vo.HouseholdLabelVO"> |
| | | |
| | | SELECT |
| | | br.region_level, |
| | | br.`code` regionCode, |
| | | br.NAME regionName, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '24' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number1,( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '25' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number2, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '26' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number3, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '27' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number4, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '28' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number5 |
| | | FROM |
| | | `blade_region` br |
| | | WHERE |
| | | br.region_level = 4 |
| | | AND br.city_code = 361100 |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="unitedFrontStatisticalLabels" resultType="org.springblade.modules.house.vo.HouseholdLabelVO"> |
| | | SELECT |
| | | br.region_level, |
| | | br.`code` regionCode, |
| | | br.NAME regionName, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1041' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number1,( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1042' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number2, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1043' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number3, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1044' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number4, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1045' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number5, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1046' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number6,( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1047' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number7, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1048' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number8, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1049' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number9, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1050' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number10, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1051' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number11, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1052' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number12 |
| | | FROM |
| | | `blade_region` br |
| | | WHERE |
| | | br.region_level = 4 |
| | | AND br.city_code = 361100 |
| | | |
| | | </select> |
| | | |
| | | <select id="followStatisticalLabels" resultType="org.springblade.modules.house.vo.HouseholdLabelVO"> |
| | | SELECT |
| | | br.region_level, |
| | | br.`code` regionCode, |
| | | br.NAME regionName, |
| | | ( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '1033' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number1,( |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_user_house_label juhl |
| | | LEFT JOIN jczz_label jl ON juhl.label_id = jl.id |
| | | WHERE |
| | | juhl.lable_type = 1 |
| | | AND jl.id = '15' |
| | | AND juhl.household_id IS NOT NULL |
| | | AND juhl.house_code IN ( |
| | | SELECT |
| | | jgr.house_code |
| | | FROM |
| | | jczz_grid jg |
| | | LEFT JOIN jczz_grid_range jgr ON jgr.grid_id = jg.id |
| | | LEFT JOIN jczz_community jc on jc.`code` = jg.community_code |
| | | WHERE |
| | | br.`code` = jc.`street_code` |
| | | )) number2 |
| | | FROM |
| | | `blade_region` br |
| | | WHERE |
| | | br.region_level = 4 |
| | | AND br.city_code = 361100 |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | void importUserHouseLabel(List<UserHouseLabelExcel> data, Boolean isCovered); |
| | | |
| | | /** |
| | | * |
| | | * @param page |
| | | * @param householdLabel |
| | | * @return |
| | | */ |
| | | IPage<HouseholdLabelVO> statisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel); |
| | | |
| | | /** |
| | | * 组织部 |
| | | * @param page |
| | | * @param householdLabel |
| | | * @return |
| | | */ |
| | | public IPage<HouseholdLabelVO> orgStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel); |
| | | |
| | | /** |
| | | * 统战 |
| | | * @param page |
| | | * @param householdLabel |
| | | * @return |
| | | */ |
| | | public IPage<HouseholdLabelVO> unitedFrontStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel); |
| | | |
| | | IPage<HouseholdLabelVO> getCommunityStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel); |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<UserHouseLabelEntity> getLabelList(String labelName); |
| | | |
| | | /** |
| | | * 关注 |
| | | * @param page |
| | | * @param householdLabel |
| | | * @return |
| | | */ |
| | | IPage<HouseholdLabelVO> followStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | import org.springblade.modules.house.dto.UserHouseLabelDTO; |
| | | import org.springblade.modules.house.entity.UserHouseLabelEntity; |
| | |
| | | import org.springblade.modules.house.vo.HouseholdLabelVO; |
| | | import org.springblade.modules.label.entity.LabelEntity; |
| | | import org.springblade.modules.label.service.ILabelService; |
| | | import org.springblade.modules.label.service.impl.LabelServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 住户-标签 服务实现类 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<HouseholdLabelVO> orgStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) { |
| | | return page.setRecords(baseMapper.orgStatisticalLabels(page, householdLabel)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<HouseholdLabelVO> unitedFrontStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) { |
| | | return page.setRecords(baseMapper.unitedFrontStatisticalLabels(page, householdLabel)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<HouseholdLabelVO> followStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) { |
| | | return page.setRecords(baseMapper.followStatisticalLabels(page, householdLabel)); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<HouseholdLabelVO> getCommunityStatisticalLabels(IPage<HouseholdLabelVO> page, HouseholdLabelVO householdLabel) { |
| | | return page.setRecords(baseMapper.getCommunityStatisticalLabels(page, householdLabel)); |
| | | } |
| | |
| | | |
| | | private String communityCode; |
| | | |
| | | // 刑释解教人员 |
| | | // 肇事肇祸精神障碍患者 |
| | | // 一般精神障碍患者 |
| | | // 重点对象 |
| | | // 取保候审 |
| | | private Integer number1; |
| | | private Integer number2; |
| | | private Integer number3; |
| | |
| | | private Integer number6; |
| | | private Integer number7; |
| | | private Integer number8; |
| | | private Integer number9; |
| | | private Integer number10; |
| | | private Integer number11; |
| | | private Integer number12; |
| | | |
| | | private List<Integer> ListId; |
| | | |
| | |
| | | and jpc.house_code = #{placeCheck.houseCode} |
| | | </if> |
| | | |
| | | <if test="placeCheck.hiddenDangerNumber!=null and placeCheck.hiddenDangerNumber==0"> |
| | | and jpc.hidden_danger_number = #{placeCheck.hiddenDangerNumber} |
| | | </if> |
| | | |
| | | <if test="placeCheck.hiddenDangerNumber!=null and placeCheck.hiddenDangerNumber==1"> |
| | | and jpc.hidden_danger_number > 0 |
| | | </if> |
| | | |
| | | <if test="placeCheck.streetName!=null and placeCheck.streetName!=''"> |
| | | and br.town_name like concat('%', #{placeCheck.streetName},'%') |
| | | </if> |
| | |
| | | and jp.lng is not null |
| | | and jp.is_deleted = 0 |
| | | HAVING distance <= 1 |
| | | ORDER BY distance limit 30 |
| | | ORDER BY distance limit 60 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | |
| | | /** |
| | | * 民警审核 |
| | | * 九小场所类型隐患数量统计 |
| | | */ |
| | | @PostMapping("/rectificationStatistics") |
| | | @ApiLog("民警审核") |
| | | @ApiLog("九小场所类型隐患数量统计") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "九小场所类型隐患数量统计", notes = "传入taskPlaceRectification") |
| | | public R rectificationStatistics(@Valid @RequestBody TaskPlaceRectificationVO taskPlaceRectification) { |
| | |
| | | String filePath; |
| | | FileInputStream file = null; |
| | | try { |
| | | filePath = WordToPdfUtils.wordToPdf(item.getOriginalName(), item.getImageUrls()); |
| | | file = new FileInputStream(filePath); |
| | | BladeFile bladeFile = ossBuilder.template().putFile(item.getOriginalName(), file); |
| | | item.setPdfPath(bladeFile.getLink()); |
| | | // filePath = WordToPdfUtils.wordToPdf(item.getOriginalName(), item.getImageUrls()); |
| | | // file = new FileInputStream(filePath); |
| | | // BladeFile bladeFile = ossBuilder.template().putFile(item.getOriginalName(), file); |
| | | // item.setPdfPath(bladeFile.getLink()); |
| | | } catch (Exception e) { |
| | | logger.error("生成pdf失败", e); |
| | | // throw new RuntimeException(e); |
| | |
| | | // 生成pdf |
| | | String filePath; |
| | | try { |
| | | filePath = WordToPdfUtils.wordToPdf(taskPlaceRecordEntity.getOriginalName(), taskPlaceRecordEntity.getImageUrls()); |
| | | FileInputStream file = new FileInputStream(filePath); |
| | | BladeFile bladeFile = ossBuilder.template().putFile(taskPlaceRecordEntity.getOriginalName(), file); |
| | | taskPlaceRecordEntity.setPdfPath(bladeFile.getLink()); |
| | | // filePath = WordToPdfUtils.wordToPdf(taskPlaceRecordEntity.getOriginalName(), taskPlaceRecordEntity.getImageUrls()); |
| | | // FileInputStream file = new FileInputStream(filePath); |
| | | // BladeFile bladeFile = ossBuilder.template().putFile(taskPlaceRecordEntity.getOriginalName(), file); |
| | | // taskPlaceRecordEntity.setPdfPath(bladeFile.getLink()); |
| | | } catch (Exception e) { |
| | | logger.error("生成pdf失败", e); |
| | | // throw new RuntimeException(e); |
| | |
| | | - /jmreport/** |
| | | - /public_discuss/publicDiscuss/publicDiscussTotal |
| | | - /public_discuss/publicDiscuss/managementProtocol |
| | | - /public_discuss/publicDiscuss/candidate |
| | | - /blade-place/place/getNearbyPlaceList |
| | | # - /blade-householdLabel/** |
| | | # - /blade-system/** |
| | | # - /blade-doorplateAddress/doorplateAddress/** |