add:政策课题修改
This commit is contained in:
+3
-3
@@ -31,11 +31,11 @@ public class SarLawsTopicController extends BaseController<SarLawsTopicVO> {
|
|||||||
|
|
||||||
@ApiOperation(value = "根据政策课题ID查询会议信息")
|
@ApiOperation(value = "根据政策课题ID查询会议信息")
|
||||||
@GetMapping("/getLawsTopicInfo")
|
@GetMapping("/getLawsTopicInfo")
|
||||||
public ResponseMessage<SarLawsTopic> getLawsTopicInfo(String lawsTopicId){
|
public ResponseMessage<SarLawsTopic> getLawsTopicInfo(String id) throws Exception{
|
||||||
if (StringUtils.isBlank(lawsTopicId)) {
|
if (StringUtils.isBlank(id)) {
|
||||||
return Result.error("会议ID为空!");
|
return Result.error("会议ID为空!");
|
||||||
}
|
}
|
||||||
SarLawsTopic sarLawsTopic = lawsTopicService.getLawsTopicInfo(lawsTopicId);
|
SarLawsTopic sarLawsTopic = lawsTopicService.getLawsTopicInfo(id);
|
||||||
return Result.success(sarLawsTopic);
|
return Result.success(sarLawsTopic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,12 @@ public class SarLawsTopic implements Serializable {
|
|||||||
@TableField(value = "AGREEMENT")
|
@TableField(value = "AGREEMENT")
|
||||||
private String agreement;
|
private String agreement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 协议真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String agreementRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课题组会议列表
|
* 课题组会议列表
|
||||||
*/
|
*/
|
||||||
@@ -92,24 +98,48 @@ public class SarLawsTopic implements Serializable {
|
|||||||
@TableField(value = "RESEARCH_PLAN")
|
@TableField(value = "RESEARCH_PLAN")
|
||||||
private String researchPlan;
|
private String researchPlan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课题组研究方案真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String researchPlanRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课题组研究成果
|
* 课题组研究成果
|
||||||
*/
|
*/
|
||||||
@TableField(value = "RESEARCH_FINDINGS")
|
@TableField(value = "RESEARCH_FINDINGS")
|
||||||
private String researchFindings;
|
private String researchFindings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课题组研究成果真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String researchFindingsRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课题组其他
|
* 课题组其他
|
||||||
*/
|
*/
|
||||||
@TableField(value = "RESEARCH_GROUP_OTHER")
|
@TableField(value = "RESEARCH_GROUP_OTHER")
|
||||||
private String researchGroupOther;
|
private String researchGroupOther;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课题组其他真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String researchGroupOtherRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课题组会议资料
|
* 课题组会议资料
|
||||||
*/
|
*/
|
||||||
@TableField(value = "CONFERENCE_MATERIALS")
|
@TableField(value = "CONFERENCE_MATERIALS")
|
||||||
private String conferenceMaterials;
|
private String conferenceMaterials;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 课题组会议资料真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String conferenceMaterialsRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课题组联系方式
|
* 课题组联系方式
|
||||||
*/
|
*/
|
||||||
@@ -122,30 +152,60 @@ public class SarLawsTopic implements Serializable {
|
|||||||
@TableField(value = "INSIDE_PROJECT_PROPOSAL_REPORT")
|
@TableField(value = "INSIDE_PROJECT_PROPOSAL_REPORT")
|
||||||
private String insideProjectProposalRepost;
|
private String insideProjectProposalRepost;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内部资料立项报告真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String insideProjectProposalRepostRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 内部资料研究方案
|
* 内部资料研究方案
|
||||||
*/
|
*/
|
||||||
@TableField(value = "INSIDE_RESEARCH_PLAN")
|
@TableField(value = "INSIDE_RESEARCH_PLAN")
|
||||||
private String insideResearchPlan;
|
private String insideResearchPlan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内部资料研究方案真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String insideResearchPlanRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 内部资料会议资料
|
* 内部资料会议资料
|
||||||
*/
|
*/
|
||||||
@TableField(value = "INSIDE_CONFERENCE_MATERIALS")
|
@TableField(value = "INSIDE_CONFERENCE_MATERIALS")
|
||||||
private String insideConferenceMaterials;
|
private String insideConferenceMaterials;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内部资料会议资料真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String insideConferenceMaterialsRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 内部会议研究成果
|
* 内部会议研究成果
|
||||||
*/
|
*/
|
||||||
@TableField(value = "INSIDE_RESEARCH_FINDINGS")
|
@TableField(value = "INSIDE_RESEARCH_FINDINGS")
|
||||||
private String insideResearchFindings;
|
private String insideResearchFindings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内部会议研究成果真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String insideResearchFindingsRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 内部会议其他
|
* 内部会议其他
|
||||||
*/
|
*/
|
||||||
@TableField(value = "INSIDE_OTHER")
|
@TableField(value = "INSIDE_OTHER")
|
||||||
private String insideOther;
|
private String insideOther;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内部会议其他真实文件名
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String insideOtherRealName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 内部联系方式
|
* 内部联系方式
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface SarLawsTopicService extends IService<SarLawsTopic> {
|
public interface SarLawsTopicService extends IService<SarLawsTopic> {
|
||||||
|
|
||||||
SarLawsTopic getLawsTopicInfo(String lawsTopicId);
|
SarLawsTopic getLawsTopicInfo(String lawsTopicId) throws Exception;
|
||||||
|
|
||||||
Integer addLawsTopicInfo(SarLawsTopic lawsTopic);
|
Integer addLawsTopicInfo(SarLawsTopic lawsTopic);
|
||||||
|
|
||||||
|
|||||||
+36
-1
@@ -1,5 +1,7 @@
|
|||||||
package com.adc.da.slrs.sarLawsTopic.service.impl;
|
package com.adc.da.slrs.sarLawsTopic.service.impl;
|
||||||
|
|
||||||
|
import com.adc.da.att.entity.AttFileEO;
|
||||||
|
import com.adc.da.att.service.impl.AttFileEOServiceImpl;
|
||||||
import com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation;
|
import com.adc.da.slrs.sarLawsTopic.entity.SarLawsContactInformation;
|
||||||
import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicMeeting;
|
import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicMeeting;
|
||||||
import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicVO;
|
import com.adc.da.slrs.sarLawsTopic.entity.SarLawsTopicVO;
|
||||||
@@ -16,6 +18,8 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -31,13 +35,44 @@ public class SarLawsTopicServiceImpl extends ServiceImpl<SarLawsTopicMapper, Sar
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SarLawsTopicMeetingService meetingService;
|
private SarLawsTopicMeetingService meetingService;
|
||||||
|
@Resource
|
||||||
|
private AttFileEOServiceImpl attFileEOService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private SarLawsContactInformationService contactInformationService;
|
private SarLawsContactInformationService contactInformationService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SarLawsTopic getLawsTopicInfo(String lawsTopicId) {
|
public SarLawsTopic getLawsTopicInfo(String lawsTopicId) throws Exception {
|
||||||
|
String[] fileFieldArray = {"agreement","researchPlan","researchFindings","researchGroupOther","conferenceMaterials",
|
||||||
|
"insideProjectProposalRepost","insideResearchPlan","insideConferenceMaterials","insideResearchFindings","insideOther"};
|
||||||
SarLawsTopic sarLawsTopic = this.baseMapper.selectById(lawsTopicId);
|
SarLawsTopic sarLawsTopic = this.baseMapper.selectById(lawsTopicId);
|
||||||
|
Class<? extends SarLawsTopic> aClass = sarLawsTopic.getClass();
|
||||||
|
for (String fileField : fileFieldArray) {
|
||||||
|
fileField = fileField.substring(0,1).toUpperCase() + fileField.substring(1);
|
||||||
|
Method getMethod = aClass.getMethod("get" + fileField);
|
||||||
|
String attIds = (String) getMethod.invoke(sarLawsTopic, null);
|
||||||
|
if (StringUtils.isNotBlank(attIds)) {
|
||||||
|
String[] split = attIds.split(",");
|
||||||
|
List<String> tempList = new ArrayList<>();
|
||||||
|
for (String attId : split) {
|
||||||
|
AttFileEO fileInfo = attFileEOService.getFileInfo(attId);
|
||||||
|
tempList.add(fileInfo.getOldFileName());
|
||||||
|
}
|
||||||
|
Method setMethod = aClass.getMethod("set" + fileField + "RealName", String.class);
|
||||||
|
String join = String.join(",", tempList);
|
||||||
|
System.out.println(fileField+":"+join);
|
||||||
|
setMethod.invoke(sarLawsTopic,join);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(sarLawsTopic.getAgreement())) {
|
||||||
|
String[] split = sarLawsTopic.getAgreement().split(",");
|
||||||
|
List<String> tempList = new ArrayList<>();
|
||||||
|
for (String attId : split) {
|
||||||
|
AttFileEO fileInfo = attFileEOService.getFileInfo(attId);
|
||||||
|
tempList.add(fileInfo.getOldFileName());
|
||||||
|
}
|
||||||
|
sarLawsTopic.setAgreementRealName(StringUtils.join(tempList));
|
||||||
|
}
|
||||||
if (sarLawsTopic != null) {
|
if (sarLawsTopic != null) {
|
||||||
// 查询课题组会议
|
// 查询课题组会议
|
||||||
LambdaQueryWrapper<SarLawsTopicMeeting> meetingWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SarLawsTopicMeeting> meetingWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|||||||
Reference in New Issue
Block a user