bug: 政策课题,政策资料,内外部会议的查询时间改为区间查询。政策资料可见人和可查看人配置修改
This commit is contained in:
+3
-1
@@ -86,7 +86,9 @@ public class InsideOutsideMeetingVO extends BasePage {
|
||||
|
||||
private String sortMode = "asc";
|
||||
|
||||
private String meetingTimeOperator = "=";
|
||||
// 会议时间查询字段
|
||||
private Date meetingTimeBegin;
|
||||
private Date meetingTimeEnd;
|
||||
|
||||
// 导出使用字段
|
||||
// 被前端选中的记录的ids
|
||||
|
||||
+6
@@ -242,4 +242,10 @@ public class SarLawsInformation extends BasePage implements Serializable {
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// 上传时间查询字段
|
||||
@TableField(exist = false)
|
||||
private Date uploadTimeBegin;
|
||||
@TableField(exist = false)
|
||||
private Date uploadTimeEnd;
|
||||
}
|
||||
+26
-8
@@ -106,16 +106,20 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
|
||||
@Override
|
||||
public List<SarLawsInformation> queryByPage(SarLawsInformation page) {
|
||||
// 设置排序字段
|
||||
if (StringUtils.isNotBlank(page.getSortField())) {
|
||||
if("name".equals(page.getSortField()) || "uploadTime".equals(page.getSortField())) {
|
||||
String sortField = StringUtils.join(StringUtils.splitByCharacterTypeCamelCase(page.getSortField()),"_").toUpperCase();
|
||||
page.setSortField(sortField);
|
||||
} else {
|
||||
page.setSortField("ID");
|
||||
page.setSortMode("asc");
|
||||
}
|
||||
if (StringUtils.isBlank(page.getSortField())) {
|
||||
page.setSortField("ID");
|
||||
page.setSortMode("asc");
|
||||
}
|
||||
Integer rowCount = this.baseMapper.queryByPageCount(page);
|
||||
page.getPager().setRowCount(rowCount);
|
||||
List<SarLawsInformation> sarLawsInformationList = this.baseMapper.queryByPage(page);
|
||||
// 对一级类别或二级类别做排序
|
||||
// TODO 对类别做排序
|
||||
// if (page.getSortField().contains("_"))
|
||||
for (SarLawsInformation sarLawsInformation : sarLawsInformationList) {
|
||||
// 将字典编号变更为字典值
|
||||
convertCodeToName(sarLawsInformation);
|
||||
@@ -143,8 +147,22 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
|
||||
sarLawsInformation.setValidFlag(0);
|
||||
String userId = LoginUserUtil.getUserId();
|
||||
TsUser tsUser = userService.getById(userId);
|
||||
sarLawsInformation.setViewableBy(tsUser.getUname() + "(" + userId + ")");
|
||||
sarLawsInformation.setDownloadableBy(tsUser.getUname() + "(" + userId + ")");
|
||||
String userInfo = tsUser.getUname() + "(" + userId + ")";
|
||||
// 设置可见人和下载人
|
||||
if (StringUtils.isBlank(sarLawsInformation.getViewableBy())) {
|
||||
sarLawsInformation.setViewableBy(userInfo);
|
||||
} else {
|
||||
if (!sarLawsInformation.getViewableBy().contains(userInfo)) {
|
||||
sarLawsInformation.setViewableBy(sarLawsInformation.getViewableBy() + "," + userInfo);
|
||||
}
|
||||
}
|
||||
if (StringUtils.isBlank(sarLawsInformation.getDownloadableBy())) {
|
||||
sarLawsInformation.setDownloadableBy(userInfo);
|
||||
} else {
|
||||
if (!sarLawsInformation.getDownloadableBy().contains(userInfo)) {
|
||||
sarLawsInformation.setDownloadableBy(sarLawsInformation.getDownloadableBy() + "," + userInfo);
|
||||
}
|
||||
}
|
||||
// 若体系类别不存在,则默认属于根节点
|
||||
if (StringUtils.isBlank(sarLawsInformation.getTreeNodeId())) {
|
||||
LambdaQueryWrapper<SarLawsInformationCenterTree> wrapper = new LambdaQueryWrapper<>();
|
||||
@@ -428,7 +446,7 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
|
||||
// 不需要比较的字段
|
||||
String[] ignoreFields = {"id","firstTypeName","secondTypeName","thirdTypeName","fourthTypeName","uploadTime",
|
||||
"informationFileList","createAndApproveBy","treeNodeId","treeNodeName","validFlag","createTime",
|
||||
"modifyTime","sortField","sortMode","collectId","serialVersionUID"};
|
||||
"modifyTime","sortField","sortMode","collectId","serialVersionUID","uploadTimeBegin","uploadTimeEnd"};
|
||||
List<String> ignoreFieldList = Arrays.asList(ignoreFields);
|
||||
// 获取SarLawsInformation类的所有字段
|
||||
Field[] fields = SarLawsInformation.class.getDeclaredFields();
|
||||
@@ -466,7 +484,7 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
|
||||
}
|
||||
// 获取资料类型名称
|
||||
String fieldName = field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1);
|
||||
Method method = SarLawsInformation.class.getMethod("get" + fieldName + "Name");
|
||||
Method method = SarLawsInformation.class.getMethod("get" + fieldName + "List");
|
||||
List<?> oldFileList = (List)method.invoke(oldInfo);
|
||||
List<String> oldFileNameList = new ArrayList<>();
|
||||
if (oldFileList != null && oldFileList.size() > 0) {
|
||||
|
||||
@@ -238,8 +238,9 @@ public class SarLawsTopicVO extends BasePage {
|
||||
|
||||
private String sortMode = "asc";
|
||||
|
||||
private String startTimeOperator = "=";
|
||||
private String closeTimeOperator = "=";
|
||||
// 排序字段
|
||||
private Date startTimeBegin;
|
||||
private Date startTimeEnd;
|
||||
|
||||
// 导出使用的属性
|
||||
// 导出文件名
|
||||
|
||||
+2
-2
@@ -50,8 +50,8 @@
|
||||
<if test="meetingOrganizer != null and meetingOrganizer != ''" >
|
||||
and MEETING_ORGANIZER like concat('%',#{meetingOrganizer},'%')
|
||||
</if>
|
||||
<if test="meetingTime != null and meetingTime !=''">
|
||||
and MEETING_TIME ${meetingTimeOperator} #{meetingTime}
|
||||
<if test="meetingTimeBegin != null and meetingTimeEnd != null">
|
||||
and MEETING_TIME between #{meetingTimeBegin} and #{meetingTimeEnd}
|
||||
</if>
|
||||
<if test="meetingAddress != null and meetingAddress != ''" >
|
||||
and MEETING_ADDRESS like concat('%',#{meetingAddress},'%')
|
||||
|
||||
+11
-5
@@ -35,9 +35,15 @@
|
||||
THIRD_TYPE,
|
||||
FOURTH_TYPE,
|
||||
`NAME`,
|
||||
DEPARTMENT,AUTHOR,UPLOAD_TIME,
|
||||
`DESCRIPTION`,INFORMATION_FILE,VIEWABLE_BY,
|
||||
DOWNLOADABLE_BY,VALID_FLAG,CREATE_TIME,
|
||||
DEPARTMENT,
|
||||
AUTHOR,
|
||||
UPLOAD_TIME,
|
||||
`DESCRIPTION`,
|
||||
INFORMATION_FILE,
|
||||
VIEWABLE_BY,
|
||||
DOWNLOADABLE_BY,
|
||||
VALID_FLAG,
|
||||
CREATE_TIME,
|
||||
MODIFY_TIME
|
||||
</sql>
|
||||
<sql id="Base_Where_Clause">
|
||||
@@ -50,8 +56,8 @@
|
||||
<if test="name != null and name != ''">
|
||||
and `NAME` like concat('%',#{name},'%')
|
||||
</if>
|
||||
<if test="uploadTime != null">
|
||||
and UPLOAD_TIME = #{uploadTime}
|
||||
<if test="uploadTimeBegin != null and uploadTimeEnd != null">
|
||||
and UPLOAD_TIME between #{uploadTimeBegin} and ${uploadTimeEnd}
|
||||
</if>
|
||||
<if test="treeNodeId != null and treeNodeId != ''">
|
||||
and TREE_NODE_ID = #{treeNodeId}
|
||||
|
||||
@@ -114,11 +114,8 @@
|
||||
<if test="participatingUnit != null and participatingUnit != ''" >
|
||||
and PARTICIPATING_UNIT like concat('%',#{participatingUnit},'%')
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
and START_TIME ${startTimeOperator} #{startTime}
|
||||
</if>
|
||||
<if test="closeTime != null">
|
||||
and CLOSE_TIME ${startTimeOperator} #{closeTime}
|
||||
<if test="startTimeBegin != null and startTimeEnd != null">
|
||||
and START_TIME between #{startTimeBegin} and ${startTimeEnd}
|
||||
</if>
|
||||
<if test="topicStatus != null and topicStatus != ''" >
|
||||
and TOPIC_STATUS = #{topicStatus}
|
||||
|
||||
Reference in New Issue
Block a user