|
@@ -88,7 +88,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
report.setCreatePersonId(reportDto.getCreatePersonId());
|
|
|
}
|
|
|
//负责人
|
|
|
- if(reportDto.getPersonId()!=null){
|
|
|
+ if (reportDto.getPersonId() != null) {
|
|
|
report.setPersonId(reportDto.getPersonId());
|
|
|
}
|
|
|
//类型
|
|
@@ -96,10 +96,9 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
//装载状态
|
|
|
if (reportDto.getType().equals(4) || reportDto.getType().equals(5)) {
|
|
|
report.setStatus(2);
|
|
|
- } else if(reportDto.getStatus()==null||reportDto.getStatus()!=3) {
|
|
|
+ } else if (reportDto.getStatus() == null || reportDto.getStatus() != 3) {
|
|
|
report.setStatus(1);
|
|
|
- }
|
|
|
- else {
|
|
|
+ } else {
|
|
|
report.setStatus(reportDto.getStatus());
|
|
|
}
|
|
|
// 装载客户
|
|
@@ -145,14 +144,14 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
assoReportFileService.addAsso(report.getId(), fileIds);
|
|
|
}
|
|
|
//当报告是已完成时
|
|
|
- if (reportDto.getTrack()!=null&&reportDto.getTrack()) {
|
|
|
+ if (reportDto.getTrack() != null && reportDto.getTrack()) {
|
|
|
//复制父报告自定义栏位
|
|
|
LambdaQueryWrapper<ReportField> fieldWrapper = new LambdaQueryWrapper<>();
|
|
|
fieldWrapper.eq(ReportField::getReportId, reportDto.getAssociateReportId());
|
|
|
List<ReportField> fields = reportFieldService.list(fieldWrapper);
|
|
|
|
|
|
- String re = JSONObject.toJSON(fields).toString();
|
|
|
- List<ReportField> oldFields = JSONArray.parseArray(re,ReportField.class);
|
|
|
+ String re = JSONObject.toJSON(fields).toString();
|
|
|
+ List<ReportField> oldFields = JSONArray.parseArray(re, ReportField.class);
|
|
|
if (fields.size() != 0) {
|
|
|
for (ReportField reportField : fields) {
|
|
|
reportField.setId(null);
|
|
@@ -163,13 +162,13 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
//复制
|
|
|
if (reportDto.getCopyIds() != null) {
|
|
|
//复制对比文件
|
|
|
- List<Integer> c1s =new ArrayList<>(Arrays.asList(0,2,4,6));
|
|
|
- if ( !Collections.disjoint (reportDto.getCopyIds(),c1s)) {
|
|
|
+ List<Integer> c1s = new ArrayList<>(Arrays.asList(0, 2, 4, 6));
|
|
|
+ if (!Collections.disjoint(reportDto.getCopyIds(), c1s)) {
|
|
|
copyService.CopyComparePatents(reportDto.getAssociateReportId(), report.getId());
|
|
|
}
|
|
|
- List<Integer> c2s =new ArrayList<>(Arrays.asList(1,3,5,7));
|
|
|
+ List<Integer> c2s = new ArrayList<>(Arrays.asList(1, 3, 5, 7));
|
|
|
//复制标引信息
|
|
|
- if ( !Collections.disjoint (reportDto.getCopyIds(),c2s)) {
|
|
|
+ if (!Collections.disjoint(reportDto.getCopyIds(), c2s)) {
|
|
|
copyService.CopyPatentLabels(oldFields, fields);
|
|
|
}
|
|
|
}
|
|
@@ -199,6 +198,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
//新增事件和报告关联
|
|
|
assoEventReportService.addNew(eventIds, reportId);
|
|
|
}
|
|
|
+
|
|
|
//新增后续事项
|
|
|
List<FollowUpDTO> followUps = reportDto.getFollowUps();
|
|
|
if (followUps != null && followUps.size() > 0) {
|
|
@@ -229,8 +229,8 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
queryWrapper.in(Report::getType, reportVO.getTypes());
|
|
|
}
|
|
|
//根据状态查询报告
|
|
|
- if(reportVO.getStatuses()!=null&&reportVO.getStatuses().size()>0){
|
|
|
- queryWrapper.in(Report::getStatus,reportVO.getStatuses());
|
|
|
+ if (reportVO.getStatuses() != null && reportVO.getStatuses().size() > 0) {
|
|
|
+ queryWrapper.in(Report::getStatus, reportVO.getStatuses());
|
|
|
}
|
|
|
if (reportVO.getCronIds() != null && reportVO.getCronIds().size() > 0) {
|
|
|
StringBuilder strs = new StringBuilder();
|
|
@@ -252,7 +252,7 @@ public class ReportService extends ServiceImpl<ReportMapper, Report> {
|
|
|
if (reportVO.getSize() != null && reportVO.getCurrent() != null) {
|
|
|
SecurityUtils.startDataScope("/pcs/report/query");
|
|
|
List<Report> reports = this.page(new Page<>(reportVO.getCurrent(), reportVO.getSize()), queryWrapper).getRecords();
|
|
|
- if(reports.size()>0){
|
|
|
+ if (reports.size() > 0) {
|
|
|
reports = this.reportData(reports);
|
|
|
}
|
|
|
|