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