Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server
11个文件已修改
8个文件已添加
28个文件已删除
| | |
| | | <version>1.5.22</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ycl</groupId> |
| | | <artifactId>ycl-common</artifactId> |
| | | <version>1.0.0</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | import com.baomidou.mybatisplus.generator.config.po.TableInfo; |
| | | import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; |
| | | import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; |
| | | import com.ycl.base.BaseController; |
| | | import com.ycl.controller.BaseController; |
| | | |
| | | |
| | | import java.util.ArrayList; |
New file |
| | |
| | | package com.ycl.controller.trend; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.dto.trend.TrendAnalysisParam; |
| | | import com.ycl.service.trend.TrendAnalysisService; |
| | | import com.ycl.vo.TrendVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Api(tags = "趋势分析") |
| | | @RestController |
| | | @RequestMapping("/trendAnalysis") |
| | | public class TrendAnalysisController { |
| | | @Autowired |
| | | TrendAnalysisService trendAnalysisService; |
| | | |
| | | @ApiOperation("数据查询") |
| | | @PostMapping("/info") |
| | | public CommonResult<List<TrendVo>> list(@RequestBody TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) { |
| | | return CommonResult.success(trendAnalysisService.list(trendAnalysisParam,pageSize,pageNum)); |
| | | } |
| | | |
| | | @ApiOperation("点位数据查询") |
| | | @PostMapping("/pointInfo") |
| | | public CommonResult<List<TrendVo>> queryPointInfo(@RequestBody String id) { |
| | | JSONObject jsonObject = JSON.parseObject(id); |
| | | return CommonResult.success(trendAnalysisService.queryPointInfo(jsonObject.getString("id"))); |
| | | } |
| | | |
| | | @ApiOperation("首次报警点位数据查询") |
| | | @PostMapping("/firstInfo") |
| | | public CommonResult<List<TrendVo>> queryListByCount(@RequestBody TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) { |
| | | return CommonResult.success(trendAnalysisService.queryListByCount(trendAnalysisParam,pageSize,pageNum)); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.base.BaseController; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.entity.caseHandler.Writ; |
| | | import com.ycl.service.caseHandler.IWritService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/writ") |
| | | @Api(value = "文书管理") |
| | | @Api(tags = "文书管理") |
| | | public class WritController extends BaseController { |
| | | |
| | | @Autowired |
| | |
| | | public CommonResult search(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | @RequestParam(required = false) Integer writType) { |
| | | return CommonResult.success(iWritService.page(new Page<>(size, current), new LambdaQueryWrapper<Writ>() |
| | | .eq(writType != null, Writ::getWritType, writType))); |
| | | return CommonResult.success(iWritService.selectWritPage(new Page<>(current, size),writType)); |
| | | } |
| | | |
| | | @GetMapping("/query_one") |
| | |
| | | public CommonResult search(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | @RequestParam(required = false) String name) { |
| | | return CommonResult.success(iWritTemplateService.page(new Page<>(size, current), new LambdaQueryWrapper<WritTemplate>() |
| | | return CommonResult.success(iWritTemplateService.page(new Page<>(current, size), new LambdaQueryWrapper<WritTemplate>() |
| | | .like(StringUtils.isNotBlank(name), WritTemplate::getName, name))); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.dto.trend; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | public class TrendAnalysisParam { |
| | | |
| | | @ApiModelProperty(value = "违规类型") |
| | | private String type; |
| | | |
| | | @ApiModelProperty(value = "开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private String endTime; |
| | | |
| | | } |
| | |
| | | package com.ycl.mapper.caseHandler; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.entity.caseHandler.Writ; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.vo.writ.WritVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface WritMapper extends BaseMapper<Writ> { |
| | | |
| | | Page<WritVO> selectWritPage(Page<Writ> writPage, Integer writType); |
| | | } |
New file |
| | |
| | | package com.ycl.mapper.trend; |
| | | |
| | | import com.ycl.dto.trend.TrendAnalysisParam; |
| | | import com.ycl.vo.TrendVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface TrendAnalysisMapper { |
| | | List<TrendVo> selectTrendInfo(@Param("tap") TrendAnalysisParam trendAnalysisParam); |
| | | |
| | | List<TrendVo> selectTrendPointInfo(String id); |
| | | } |
| | |
| | | package com.ycl.service.caseHandler; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.entity.caseHandler.Writ; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.vo.writ.WritVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface IWritService extends IService<Writ> { |
| | | |
| | | |
| | | Page<WritVO> selectWritPage(Page<Writ> writPage, Integer writType); |
| | | } |
| | |
| | | package com.ycl.service.caseHandler.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.entity.caseHandler.Writ; |
| | | import com.ycl.mapper.caseHandler.WritMapper; |
| | | import com.ycl.service.caseHandler.IWritService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.vo.writ.WritVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class WritServiceImpl extends ServiceImpl<WritMapper, Writ> implements IWritService { |
| | | |
| | | @Resource |
| | | WritMapper writMapper; |
| | | |
| | | @Override |
| | | public Page<WritVO> selectWritPage(Page<Writ> writPage, Integer writType) { |
| | | return writMapper.selectWritPage(writPage,writType); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ycl.service.trend; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.dto.trend.TrendAnalysisParam; |
| | | import com.ycl.entity.store.StoreScoreRule; |
| | | import com.ycl.vo.TrendVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface TrendAnalysisService { |
| | | List<TrendVo> list(TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum); |
| | | |
| | | List<TrendVo> queryPointInfo(String id); |
| | | |
| | | List<TrendVo> queryListByCount(TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum); |
| | | } |
New file |
| | |
| | | package com.ycl.service.trend.impl; |
| | | |
| | | |
| | | import com.ycl.dto.trend.TrendAnalysisParam; |
| | | import com.ycl.mapper.trend.TrendAnalysisMapper; |
| | | import com.ycl.service.trend.TrendAnalysisService; |
| | | import com.ycl.vo.TrendVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.amqp.RabbitProperties; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class TrendAnalysisServiceImpl implements TrendAnalysisService { |
| | | |
| | | |
| | | @Autowired |
| | | TrendAnalysisMapper trendAnalysisMapper; |
| | | |
| | | @Override |
| | | public List<TrendVo> list(TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) { |
| | | return trendAnalysisMapper.selectTrendInfo(trendAnalysisParam); |
| | | } |
| | | |
| | | @Override |
| | | public List<TrendVo> queryPointInfo(String id) { |
| | | return trendAnalysisMapper.selectTrendPointInfo(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<TrendVo> queryListByCount(TrendAnalysisParam trendAnalysisParam, Integer pageSize, Integer pageNum) { |
| | | return trendAnalysisMapper.selectTrendInfo(trendAnalysisParam).stream().filter(item->"1".equals(item.getCount())).collect(Collectors.toList()); |
| | | } |
| | | } |
| | |
| | | package com.ycl.service.writ.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.entity.writ.WritTemplate; |
| | | import com.ycl.mapper.writ.WritTemplateMapper; |
New file |
| | |
| | | package com.ycl.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel(value = "趋势分析") |
| | | public class TrendVo { |
| | | |
| | | @ApiModelProperty(value = "点位id") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "报警数量") |
| | | private String count; |
| | | |
| | | @ApiModelProperty(value = "报警日期") |
| | | private String dateTime; |
| | | |
| | | @ApiModelProperty(value = "报警地址") |
| | | private String address; |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.vo.writ; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel(value = "WritVO") |
| | | public class WritVO { |
| | | /** |
| | | * 案件id(同ums_base_case表id) |
| | | */ |
| | | @ApiModelProperty(value = "案件id") |
| | | private Long baseCaseId; |
| | | |
| | | /** |
| | | * 违建id |
| | | */ |
| | | @ApiModelProperty(value = "违建id") |
| | | private Long illegalBuildingId; |
| | | |
| | | /** |
| | | * 文书种类 |
| | | */ |
| | | @ApiModelProperty(value = "文书种类") |
| | | private String writType; |
| | | |
| | | /** |
| | | * 文书编号 |
| | | */ |
| | | @ApiModelProperty(value = "文书编号") |
| | | private String writTemplateName; |
| | | |
| | | /** |
| | | * 违法类型 |
| | | */ |
| | | @ApiModelProperty(value = "违法类型") |
| | | private Integer illegalType; |
| | | |
| | | /** |
| | | * 文书发放时间 |
| | | */ |
| | | @ApiModelProperty(value = "文书发放时间") |
| | | private LocalDateTime sendTime; |
| | | |
| | | /** |
| | | * 文书限定时间 |
| | | */ |
| | | @ApiModelProperty(value = "文书限定时间") |
| | | private LocalDateTime limitTime; |
| | | |
| | | /** |
| | | * 文书发放内容 |
| | | */ |
| | | @ApiModelProperty(value = "文书发放内容") |
| | | private String sendContent; |
| | | |
| | | /** |
| | | * 实际整改时间 |
| | | */ |
| | | @ApiModelProperty(value = "实际整改时间") |
| | | private LocalDateTime rectifyTime; |
| | | |
| | | /** |
| | | * 整改情况 |
| | | */ |
| | | @ApiModelProperty(value = "整改情况") |
| | | private String rectifySituation; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 文书照片上传 |
| | | */ |
| | | @ApiModelProperty(value = "文书照片上传") |
| | | private String writPic; |
| | | |
| | | /** |
| | | * 整改前照片 |
| | | */ |
| | | @ApiModelProperty(value = "整改前照片") |
| | | private String originalPic; |
| | | |
| | | /** |
| | | * 整改后照片 |
| | | */ |
| | | @ApiModelProperty(value = "整改后照片") |
| | | private String rectifiedPic; |
| | | |
| | | /** |
| | | * 其他照片 |
| | | */ |
| | | @ApiModelProperty(value = "其他照片") |
| | | private String otherPic; |
| | | |
| | | /** |
| | | * 创建人 |
| | | */ |
| | | @ApiModelProperty(value = "创建人") |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * 文书模板值 |
| | | */ |
| | | @ApiModelProperty(value = "文书模板值") |
| | | private String value; |
| | | |
| | | } |
| | |
| | | left join ums_data_dictionary t2 on t1.category = t2.id |
| | | left join ums_sccg_region t3 on t1.community_id=t3.id |
| | | <where> |
| | | <if test="category != null"> |
| | | <if test="categories != null"> |
| | | category = #{categories} |
| | | </if>> |
| | | <if test="community_id != null"> |
| | | </if> |
| | | <if test="communityId != null"> |
| | | and community_id = #{communityId} |
| | | </if> |
| | | <if test="code != null and code !=''"> |
| | |
| | | <if test="site != null and site!=''"> |
| | | and site like contact('%',#{site},'%') |
| | | </if> |
| | | <if test="startTime !='' and endTime !=''"> |
| | | <if test="startTime !='' and endTime !='' and startTime!=null and endTime !=null"> |
| | | and create_time between #{startTime} and #{endTime} |
| | | </if> |
| | | </where> |
| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.entity.caseHandler.Writ"> |
| | | <id column="base_case_id" property="baseCaseId" /> |
| | | <result column="illegal_building_id" property="illegalBuildingId" /> |
| | | <result column="writ_type" property="writType" /> |
| | | <result column="writ_code" property="writCode" /> |
| | | <result column="illegal_type" property="illegalType" /> |
| | | <result column="send_time" property="sendTime" /> |
| | | <result column="limit_time" property="limitTime" /> |
| | | <result column="send_content" property="sendContent" /> |
| | | <result column="rectify_time" property="rectifyTime" /> |
| | | <result column="rectify_situation" property="rectifySituation" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="writ_pic" property="writPic" /> |
| | | <result column="original_pic" property="originalPic" /> |
| | | <result column="rectified_pic" property="rectifiedPic" /> |
| | | <result column="other_pic" property="otherPic" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <id column="base_case_id" property="baseCaseId"/> |
| | | <result column="illegal_building_id" property="illegalBuildingId"/> |
| | | <result column="writ_type" property="writType"/> |
| | | <result column="writ_code" property="writCode"/> |
| | | <result column="illegal_type" property="illegalType"/> |
| | | <result column="send_time" property="sendTime"/> |
| | | <result column="limit_time" property="limitTime"/> |
| | | <result column="send_content" property="sendContent"/> |
| | | <result column="rectify_time" property="rectifyTime"/> |
| | | <result column="rectify_situation" property="rectifySituation"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="writ_pic" property="writPic"/> |
| | | <result column="original_pic" property="originalPic"/> |
| | | <result column="rectified_pic" property="rectifiedPic"/> |
| | | <result column="other_pic" property="otherPic"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_time" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | base_case_id, illegal_building_id, writ_type, writ_code, illegal_type, send_time, limit_time, send_content, rectify_time, rectify_situation, remark, writ_pic, original_pic, rectified_pic, othen_pic, create_user, create_time |
| | | base_case_id |
| | | , illegal_building_id, writ_type, writ_code, illegal_type, send_time, limit_time, send_content, rectify_time, rectify_situation, remark, writ_pic, original_pic, rectified_pic, othen_pic, create_user, create_time |
| | | </sql> |
| | | <select id="selectWritPage" resultType="com.ycl.vo.writ.WritVO"> |
| | | SELECT t1.*, t2.`name` as writTemplateName |
| | | FROM ums_writ t1 |
| | | LEFT JOIN ums_writ_template t2 on t1.writ_type = t2.id |
| | | <where> |
| | | <if test="writType != null"> |
| | | t1.writ_type=#{writType} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.mapper.trend.TrendAnalysisMapper"> |
| | | |
| | | <select id="selectTrendInfo" resultType="com.ycl.vo.TrendVo" parameterType="com.ycl.dto.trend.TrendAnalysisParam"> |
| | | select vp.id,vp.name,count(0) as count from |
| | | ums_warn_alarm_record war |
| | | left join |
| | | ums_violations v |
| | | on v.id=war.case_number_id |
| | | left join |
| | | ums_video_point vp |
| | | on v.video_point_id=vp.id |
| | | <where> |
| | | <if test="tap.startTime!=null and tap.startTime!=''and tap.endTime!=null and tap.endTime!=''" > |
| | | war.alarm_time between #{tap.startTime} and #{tap.endTime} |
| | | </if> |
| | | <if test="tap.type!=null and tap.type!=''" > |
| | | war.violation_type=#{tap.type} |
| | | </if> |
| | | </where> |
| | | group by vp.id,vp.name |
| | | order by count DESC |
| | | </select> |
| | | |
| | | <select id="selectTrendPointInfo" resultType="com.ycl.vo.TrendVo" parameterType="string"> |
| | | SELECT vp.address, DATE_FORMAT(war.alarm_time,"%Y-%m-%d") as dateTime,count(0) as count |
| | | from ums_warn_alarm_record war |
| | | left join ums_violations v |
| | | on v.id=war.case_number_id |
| | | left join ums_video_point vp |
| | | on v.video_point_id=vp.id |
| | | where vp.id=#{id} |
| | | GROUP BY vp.address,DATE_FORMAT(war.alarm_time,"%Y-%m-%d") |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.mapper.writ.WritTemplateMapper"> |
| | | <mapper namespace="com.ycl.mapper.WritTemplateMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.entity.writ.WritTemplate"> |