法律法规管理分页查询修改
parent
bc39ec8b39
commit
e998019421
|
|
@ -14,6 +14,7 @@ import com.gunshi.project.xyt.validate.markers.Update;
|
|||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -49,6 +50,10 @@ public class SzRuleByLawController extends AbstractCommonFileController {
|
|||
|
||||
dto.setId(IdWorker.getId());
|
||||
dto.setCreateTime(new Date());
|
||||
|
||||
if (CollectionUtils.isNotEmpty(dto.getFiles())){
|
||||
dto.setUploadDate(new Date());
|
||||
}
|
||||
boolean result = service.save(dto);
|
||||
|
||||
|
||||
|
|
@ -75,6 +80,11 @@ public class SzRuleByLawController extends AbstractCommonFileController {
|
|||
dto.setCreateBy(null);
|
||||
dto.setCreateName(null);
|
||||
dto.setUpdateTime(new Date());
|
||||
|
||||
if (CollectionUtils.isNotEmpty(dto.getFiles())){
|
||||
dto.setUploadDate(new Date());
|
||||
}
|
||||
|
||||
boolean result = service.updateById(dto);
|
||||
|
||||
if (result) {
|
||||
|
|
@ -109,6 +119,33 @@ public class SzRuleByLawController extends AbstractCommonFileController {
|
|||
query.like(SzRuleByLaw::getFillUnit, page.getFillUnit());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(page.getTimeliness())) {
|
||||
query.like(SzRuleByLaw::getTimeliness, page.getTimeliness());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(page.getStmAd())) {
|
||||
query.ge(SzRuleByLaw::getAnnouncementDate, page.getStmAd());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(page.getEtmAd())) {
|
||||
query.le(SzRuleByLaw::getAnnouncementDate, page.getStmAd());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(page.getStmIm())) {
|
||||
query.ge(SzRuleByLaw::getImplementationDate, page.getStmIm());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(page.getEtmIm())) {
|
||||
query.le(SzRuleByLaw::getImplementationDate, page.getEtmIm());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(page.getStmUd())) {
|
||||
query.ge(SzRuleByLaw::getUploadDate, page.getStmUd());
|
||||
}
|
||||
|
||||
if (Objects.nonNull(page.getEtmUd())) {
|
||||
query.le(SzRuleByLaw::getUploadDate, page.getEtmUd());
|
||||
}
|
||||
|
||||
query.orderByDesc(SzRuleByLaw::getCreateTime);
|
||||
Page<SzRuleByLaw> data = service.page(page.getPageSo().toPage(), query);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
package com.gunshi.project.xyt.entity.so;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.gunshi.core.dateformat.DateFormatString;
|
||||
import com.gunshi.project.xyt.entity.page.GenericPageParams;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Created by XuSan on 2024/9/24.
|
||||
|
|
@ -25,4 +29,56 @@ public class SzRuleByLawPage extends GenericPageParams {
|
|||
@Schema(description="制定机关")
|
||||
private String fillUnit;
|
||||
|
||||
|
||||
/**
|
||||
* 公布日期开始时间
|
||||
*/
|
||||
@Schema(description="公布日期开始时间 格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date stmAd;
|
||||
|
||||
/**
|
||||
* 公布日期结束时间
|
||||
*/
|
||||
@Schema(description="公布日期结束时间 格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date etmAd;
|
||||
|
||||
|
||||
/**
|
||||
* 施行日期开始时间
|
||||
*/
|
||||
@Schema(description="施行日期开始时间 格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date stmIm;
|
||||
|
||||
/**
|
||||
* 施行日期结束时间
|
||||
*/
|
||||
@Schema(description="施行日期结束时间 格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date etmIm;
|
||||
|
||||
|
||||
/**
|
||||
* 上传时间开始时间
|
||||
*/
|
||||
@Schema(description="上传时间开始时间 格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date stmUd;
|
||||
|
||||
/**
|
||||
* 施行日期结束时间
|
||||
*/
|
||||
@Schema(description="施行日期结束时间 格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date etmUd;
|
||||
|
||||
|
||||
/**
|
||||
* 时效性
|
||||
*/
|
||||
@Schema(description="时效性 0:尚未生效,1:有效,2:已修改,3:已废止")
|
||||
private Integer timeliness;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,6 +99,14 @@ public class SzRuleByLaw extends CommUpdate implements Serializable {
|
|||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD, timezone = "GMT+8")
|
||||
private Date implementationDate;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
@Schema(description="上传时间 格式:" + DateFormatString.YYYY_MM_DD_HH_MM_SS)
|
||||
@TableField(value="upload_date")
|
||||
@JsonFormat(pattern = DateFormatString.YYYY_MM_DD_HH_MM_SS, timezone = "GMT+8")
|
||||
private Date uploadDate;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
@Schema(description = "文件集合")
|
||||
|
|
|
|||
Loading…
Reference in New Issue