| | |
| | | @GetMapping("/query") |
| | | @ApiOperation(value = "查询list") |
| | | @LogSave(operationType = "文书管理", contain = "查询文书") |
| | | public CommonResult search(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | @RequestParam(required = false) Integer writType) { |
| | | return CommonResult.success(iWritService.selectWritPage(new Page<>(current, size),writType)); |
| | | public CommonResult search(@RequestParam Integer pageSize, |
| | | @RequestParam Integer currentPage, |
| | | @RequestParam(required = false) String keyword) { |
| | | return CommonResult.success(iWritService.selectWritPage(new Page<>(currentPage, pageSize), keyword)); |
| | | } |
| | | |
| | | @GetMapping("/query_one") |
| | |
| | | return CommonResult.success(iWritService.updateById(writ)); |
| | | } |
| | | |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation(value = "批量") |
| | | @LogSave(operationType = "文书管理", contain = "删除文书") |
| | | public CommonResult delete(@PathVariable Long id) { |
| | | Writ writ = iWritService.getById(id); |
| | | writ.setValue(""); |
| | | return CommonResult.success(iWritService.updateById(writ)); |
| | | } |
| | | |
| | | @PutMapping("/deletion_batch") |
| | | @ApiOperation(value = "批量删除") |
| | | @LogSave(operationType = "文书管理", contain = "删除文书") |
| | |
| | | @GetMapping("/query") |
| | | @ApiOperation(value = "查询") |
| | | @LogSave(operationType = "文书模板管理", contain = "查询文书模板") |
| | | public CommonResult search(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | public CommonResult search(@RequestParam Integer pageSize, |
| | | @RequestParam Integer currentPage, |
| | | @RequestParam(required = false) String name) { |
| | | return CommonResult.success(iWritTemplateService.page(new Page<>(current, size), new LambdaQueryWrapper<WritTemplate>() |
| | | return CommonResult.success(iWritTemplateService.page(new Page<>(currentPage, pageSize), new LambdaQueryWrapper<WritTemplate>() |
| | | .like(StringUtils.isNotBlank(name), WritTemplate::getName, name))); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | */ |
| | | @TableField("send_time") |
| | | @ApiModelProperty(value = "文书发放时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private LocalDateTime sendTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @TableField("limit_time") |
| | | @ApiModelProperty(value = "文书限定时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private LocalDateTime limitTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @TableField("rectify_time") |
| | | @ApiModelProperty(value = "实际整改时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private LocalDateTime rectifyTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | private String code; |
| | | |
| | | |
| | | /** |
| | | * 前端对应组件名称 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField("create_time") |
| | | private String createTime; |
| | | |
| | | } |
| | |
| | | import com.ycl.entity.caseHandler.Writ; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.vo.writ.WritVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface WritMapper extends BaseMapper<Writ> { |
| | | |
| | | Page<WritVO> selectWritPage(Page<Writ> writPage, Integer writType); |
| | | Page<WritVO> selectWritPage(Page<Writ> writPage, @Param("keyword") String keyword); |
| | | } |
| | |
| | | public interface IWritService extends IService<Writ> { |
| | | |
| | | |
| | | Page<WritVO> selectWritPage(Page<Writ> writPage, Integer writType); |
| | | Page<WritVO> selectWritPage(Page<Writ> writPage, String keyword); |
| | | } |
| | |
| | | WritMapper writMapper; |
| | | |
| | | @Override |
| | | public Page<WritVO> selectWritPage(Page<Writ> writPage, Integer writType) { |
| | | return writMapper.selectWritPage(writPage,writType); |
| | | public Page<WritVO> selectWritPage(Page<Writ> writPage, String keyword) { |
| | | return writMapper.selectWritPage(writPage, keyword); |
| | | } |
| | | } |
| | |
| | | package com.ycl.vo.writ; |
| | | |
| | | import com.ycl.entity.caseHandler.Writ; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | @Data |
| | | @ApiModel(value = "WritVO") |
| | | public class WritVO { |
| | | /** |
| | | * 案件id(同ums_base_case表id) |
| | | */ |
| | | @ApiModelProperty(value = "案件id") |
| | | private Long baseCaseId; |
| | | public class WritVO extends Writ { |
| | | |
| | | /** |
| | | * 违建id |
| | | */ |
| | | @ApiModelProperty(value = "违建id") |
| | | private Long illegalBuildingId; |
| | | private String writTypeName; |
| | | |
| | | /** |
| | | * 文书种类 |
| | | */ |
| | | @ApiModelProperty(value = "文书种类") |
| | | private String writType; |
| | | private String categoryName; |
| | | |
| | | /** |
| | | * 文书编号 |
| | | */ |
| | | @ApiModelProperty(value = "文书编号") |
| | | private String writTemplateName; |
| | | private String eventCode; |
| | | |
| | | /** |
| | | * 违法类型 |
| | | */ |
| | | @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; |
| | | private String templateCode; |
| | | |
| | | } |
| | |
| | | <result column="create_time" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="VoMap" type="com.ycl.vo.writ.WritVO" extends="BaseResultMap"> |
| | | <result column="writ_type_name" property="writTypeName" jdbcType="VARCHAR"/> |
| | | <result column="category_name" property="categoryName" jdbcType="VARCHAR"/> |
| | | <result column="event_code" property="eventCode" jdbcType="VARCHAR"/> |
| | | <result column="template_code" property="templateCode" jdbcType="VARCHAR"/> |
| | | |
| | | </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 |
| | | </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 |
| | | <select id="selectWritPage" resultMap="VoMap"> |
| | | SELECT w.*, wt.`name` as writ_type_name,bc.`code` event_code,dd.`name` category_name,wt.code template_code |
| | | FROM ums_writ w |
| | | LEFT JOIN ums_writ_template wt on w.writ_type = wt.id |
| | | LEFT JOIN ums_illegal_building ib on w.illegal_building_id = ib.base_case_id |
| | | LEFT JOIN ums_data_dictionary dd on ib.category_id = dd.id |
| | | LEFT JOIN ums_base_case bc on ib.base_case_id = bc.id |
| | | <where> |
| | | <if test="writType != null"> |
| | | t1.writ_type=#{writType} |
| | | <if test="keyword != null"> |
| | | w.writ_code like CONCAT('%',#{keyword},'%') |
| | | or bc.`code` like CONCAT('%',#{keyword},'%') |
| | | or wt.name like CONCAT('%',#{keyword},'%') |
| | | </if> |
| | | </where> |
| | | order by w.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |