add:政策课题查询单个记录

This commit is contained in:
wxyclub
2023-10-23 09:09:41 +08:00
parent ec9504cc52
commit 8c5b776778
2 changed files with 28 additions and 39 deletions
@@ -84,7 +84,7 @@ public class SarLawsTopic implements Serializable {
* 协议真实文件名 * 协议真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String agreementRealName; private String agreementName;
/** /**
* 课题组会议列表 * 课题组会议列表
@@ -102,7 +102,7 @@ public class SarLawsTopic implements Serializable {
* 课题组研究方案真实文件名 * 课题组研究方案真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String researchPlanRealName; private String researchPlanName;
/** /**
* 课题组研究成果 * 课题组研究成果
@@ -114,7 +114,7 @@ public class SarLawsTopic implements Serializable {
* 课题组研究成果真实文件名 * 课题组研究成果真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String researchFindingsRealName; private String researchFindingsName;
/** /**
* 课题组其他 * 课题组其他
@@ -126,7 +126,7 @@ public class SarLawsTopic implements Serializable {
* 课题组其他真实文件名 * 课题组其他真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String researchGroupOtherRealName; private String researchGroupOtherName;
/** /**
* 课题组会议资料 * 课题组会议资料
@@ -138,7 +138,7 @@ public class SarLawsTopic implements Serializable {
* 课题组会议资料真实文件名 * 课题组会议资料真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String conferenceMaterialsRealName; private String conferenceMaterialsName;
/** /**
* 课题组联系方式 * 课题组联系方式
@@ -156,7 +156,7 @@ public class SarLawsTopic implements Serializable {
* 内部资料立项报告真实文件名 * 内部资料立项报告真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String insideProjectProposalRepostRealName; private String insideProjectProposalRepostName;
/** /**
* 内部资料研究方案 * 内部资料研究方案
@@ -168,7 +168,7 @@ public class SarLawsTopic implements Serializable {
* 内部资料研究方案真实文件名 * 内部资料研究方案真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String insideResearchPlanRealName; private String insideResearchPlanName;
/** /**
* 内部资料会议资料 * 内部资料会议资料
@@ -180,7 +180,7 @@ public class SarLawsTopic implements Serializable {
* 内部资料会议资料真实文件名 * 内部资料会议资料真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String insideConferenceMaterialsRealName; private String insideConferenceMaterialsName;
/** /**
* 内部会议研究成果 * 内部会议研究成果
@@ -192,7 +192,7 @@ public class SarLawsTopic implements Serializable {
* 内部会议研究成果真实文件名 * 内部会议研究成果真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String insideResearchFindingsRealName; private String insideResearchFindingsName;
/** /**
* 内部会议其他 * 内部会议其他
@@ -204,7 +204,7 @@ public class SarLawsTopic implements Serializable {
* 内部会议其他真实文件名 * 内部会议其他真实文件名
*/ */
@TableField(exist = false) @TableField(exist = false)
private String insideOtherRealName; private String insideOtherName;
/** /**
* 内部联系方式 * 内部联系方式
@@ -58,40 +58,29 @@ public class SarLawsTopicServiceImpl extends ServiceImpl<SarLawsTopicMapper, Sar
AttFileEO fileInfo = attFileEOService.getFileInfo(attId); AttFileEO fileInfo = attFileEOService.getFileInfo(attId);
tempList.add(fileInfo.getOldFileName()); tempList.add(fileInfo.getOldFileName());
} }
Method setMethod = aClass.getMethod("set" + fileField + "RealName", String.class); Method setMethod = aClass.getMethod("set" + fileField + "Name", String.class);
String join = String.join(",", tempList); String join = String.join(",", tempList);
System.out.println(fileField+":"+join); System.out.println(fileField+":"+join);
setMethod.invoke(sarLawsTopic,join); setMethod.invoke(sarLawsTopic,join);
} }
} }
if (StringUtils.isNotBlank(sarLawsTopic.getAgreement())) { // 查询课题组会议
String[] split = sarLawsTopic.getAgreement().split(","); LambdaQueryWrapper<SarLawsTopicMeeting> meetingWrapper = new LambdaQueryWrapper<>();
List<String> tempList = new ArrayList<>(); meetingWrapper.eq(SarLawsTopicMeeting::getLawsTopicId, lawsTopicId);
for (String attId : split) { List<SarLawsTopicMeeting> topicMeetingList = meetingService.list(meetingWrapper);
AttFileEO fileInfo = attFileEOService.getFileInfo(attId); sarLawsTopic.setMeetingList(topicMeetingList);
tempList.add(fileInfo.getOldFileName()); // 查询课题组联系方式
} LambdaQueryWrapper<SarLawsContactInformation> topicGroupWrapper = new LambdaQueryWrapper<>();
sarLawsTopic.setAgreementRealName(StringUtils.join(tempList)); topicGroupWrapper.eq(SarLawsContactInformation::getLawsTopicId, lawsTopicId);
} topicGroupWrapper.eq(SarLawsContactInformation::getGroupType,"lawsTopic");
if (sarLawsTopic != null) { List<SarLawsContactInformation> lawsTopicContactInformation = contactInformationService.list(topicGroupWrapper);
// 查询课题组会议 sarLawsTopic.setTopicContactInformationList(lawsTopicContactInformation);
LambdaQueryWrapper<SarLawsTopicMeeting> meetingWrapper = new LambdaQueryWrapper<>(); // 查询内部联系房方式
meetingWrapper.eq(SarLawsTopicMeeting::getLawsTopicId, lawsTopicId); LambdaQueryWrapper<SarLawsContactInformation> insideWrapper = new LambdaQueryWrapper<>();
List<SarLawsTopicMeeting> topicMeetingList = meetingService.list(meetingWrapper); topicGroupWrapper.eq(SarLawsContactInformation::getLawsTopicId, lawsTopicId);
sarLawsTopic.setMeetingList(topicMeetingList); topicGroupWrapper.eq(SarLawsContactInformation::getGroupType,"lawsTopic");
// 查询课题组联系方式 List<SarLawsContactInformation> insideContactInformation = contactInformationService.list(topicGroupWrapper);
LambdaQueryWrapper<SarLawsContactInformation> topicGroupWrapper = new LambdaQueryWrapper<>(); sarLawsTopic.setInsideContactInformationList(insideContactInformation);
topicGroupWrapper.eq(SarLawsContactInformation::getLawsTopicId, lawsTopicId);
topicGroupWrapper.eq(SarLawsContactInformation::getGroupType,"lawsTopic");
List<SarLawsContactInformation> lawsTopicContactInformation = contactInformationService.list(topicGroupWrapper);
sarLawsTopic.setTopicContactInformationList(lawsTopicContactInformation);
// 查询内部联系房方式
LambdaQueryWrapper<SarLawsContactInformation> insideWrapper = new LambdaQueryWrapper<>();
topicGroupWrapper.eq(SarLawsContactInformation::getLawsTopicId, lawsTopicId);
topicGroupWrapper.eq(SarLawsContactInformation::getGroupType,"lawsTopic");
List<SarLawsContactInformation> insideContactInformation = contactInformationService.list(topicGroupWrapper);
sarLawsTopic.setInsideContactInformationList(insideContactInformation);
}
return sarLawsTopic; return sarLawsTopic;
} }