标题检索变更

This commit is contained in:
梁琦涛
2023-12-04 20:02:14 +08:00
parent f9bcb2b6d5
commit e7695e480d
2 changed files with 14 additions and 9 deletions
@@ -1031,8 +1031,8 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
case "7": obj.setStandardStateOrder("3");break; case "7": obj.setStandardStateOrder("3");break;
default: obj.setStandardTypeOrder("");break; default: obj.setStandardTypeOrder("");break;
} }
obj.setImplementationDate(lawsDomesticStandard.getImplementationDate()); obj.setImplementationDate(getImplementationDate(lawsDomesticStandard.getImplementationDate()));
obj.setCreateTime(lawsDomesticStandard.getCreateTime()); obj.setCreateTime(getImplementationDate(lawsDomesticStandard.getCreateTime()));
obj.setReleaseDate(lawsDomesticStandard.getReleaseDate()); obj.setReleaseDate(lawsDomesticStandard.getReleaseDate());
obj.setStandardClass(lawsDomesticStandard.getStandardClass()); obj.setStandardClass(lawsDomesticStandard.getStandardClass());
obj.setDynamicType(lawsDomesticStandard.getDynamicType()); obj.setDynamicType(lawsDomesticStandard.getDynamicType());
@@ -1121,8 +1121,8 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
case "7": obj.setStandardStateOrder("3");break; case "7": obj.setStandardStateOrder("3");break;
default: obj.setStandardTypeOrder("");break; default: obj.setStandardTypeOrder("");break;
} }
obj.setImplementationDate(lawsOverseasStandard.getImplementationDate()); obj.setImplementationDate(getImplementationDate(lawsOverseasStandard.getImplementationDate()));
obj.setCreateTime(lawsOverseasStandard.getCreateTime()); obj.setCreateTime(getImplementationDate(lawsOverseasStandard.getCreateTime()));
obj.setReleaseDate(lawsOverseasStandard.getReleaseDate()); obj.setReleaseDate(lawsOverseasStandard.getReleaseDate());
obj.setStandardClass(lawsOverseasStandard.getStandardClass()); obj.setStandardClass(lawsOverseasStandard.getStandardClass());
@@ -1209,8 +1209,8 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
case "7": obj.setStandardStateOrder("3");break; case "7": obj.setStandardStateOrder("3");break;
default: obj.setStandardTypeOrder("");break; default: obj.setStandardTypeOrder("");break;
} }
obj.setImplementationDate(lawsEnterpriseStandard.getImplementationDate()); obj.setImplementationDate(getImplementationDate(lawsEnterpriseStandard.getImplementationDate()));
obj.setCreateTime(lawsEnterpriseStandard.getCreateTime()); obj.setCreateTime(getImplementationDate(lawsEnterpriseStandard.getCreateTime()));
obj.setReleaseDate(lawsEnterpriseStandard.getReleaseDate()); obj.setReleaseDate(lawsEnterpriseStandard.getReleaseDate());
obj.setStandardState(lawsEnterpriseStandard.getStandardState()); obj.setStandardState(lawsEnterpriseStandard.getStandardState());
obj.setStandardCode(lawsEnterpriseStandard.getStandardCode()); obj.setStandardCode(lawsEnterpriseStandard.getStandardCode());
@@ -1227,6 +1227,11 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
} }
} }
@NotNull
private String getImplementationDate(Date implementationDate) {
return Objects.isNull(implementationDate) ? "" : new SimpleDateFormat(YYYY_MM_DD).format(implementationDate);
}
@NotNull @NotNull
private List<OSSFile> getOssFilesLawsEnterpriseStandard(LawsEnterpriseStandard lawsEnterpriseStandard) { private List<OSSFile> getOssFilesLawsEnterpriseStandard(LawsEnterpriseStandard lawsEnterpriseStandard) {
// 从过程稿件从上到下顺序检索;如果文档里有发布稿,只检索发布稿 // 从过程稿件从上到下顺序检索;如果文档里有发布稿,只检索发布稿
@@ -1280,7 +1285,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
obj.setResourceType(resourceType); obj.setResourceType(resourceType);
obj.setStandardTypeOrder("9"); obj.setStandardTypeOrder("9");
obj.setReleaseDate(lawsNewsFeed.getReleaseTime()); obj.setReleaseDate(lawsNewsFeed.getReleaseTime());
obj.setCreateTime(lawsNewsFeed.getCreateTime()); obj.setCreateTime(getImplementationDate(lawsNewsFeed.getCreateTime()));
updateESLawsNewsFeed(opType, lawsNewsFeed, obj); updateESLawsNewsFeed(opType, lawsNewsFeed, obj);
}catch (Exception e){ }catch (Exception e){
log.error(SYNC_ES_ERR,e.getMessage()); log.error(SYNC_ES_ERR,e.getMessage());
@@ -97,9 +97,9 @@ public class LawsHomeNormalSearchVO implements Serializable {
/** /**
* 实施时间 * 实施时间
*/ */
private Date implementationDate; private String implementationDate;
/** /**
* 实施时间 * 实施时间
*/ */
private Date createTime; private String createTime;
} }