fix: PDM 496接口BUG修复
This commit is contained in:
+21
-7
@@ -31,11 +31,11 @@ import com.jero.modules.docking.bindPart.service.ILawsBindPartService;
|
||||
import com.jero.modules.laws.documenttool.entity.LawsDocumentSplit;
|
||||
import com.jero.modules.laws.documenttool.mapper.LawsDocumentSplitMapper;
|
||||
import com.jero.modules.laws.enterprise.entity.vo.LawsTreeNodeModel;
|
||||
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
||||
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
||||
import com.jero.modules.laws.standard.entity.LawsOverseasStandard;
|
||||
import com.jero.modules.laws.standard.entity.PartName;
|
||||
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||
import com.jero.modules.laws.standard.service.ILawsTreeNodeService;
|
||||
import com.jero.modules.laws.standard.service.PartNameService;
|
||||
import com.jero.modules.laws.standard.service.*;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.split.entity.SarFileSplitInfoEO;
|
||||
@@ -110,6 +110,12 @@ public class SrmsApiServiceImpl implements SrmsApiService {
|
||||
@Resource
|
||||
private ILawsEnterpriseStandardService esService;
|
||||
|
||||
@Resource
|
||||
private ILawsDomesticStandardService gbService;
|
||||
|
||||
@Resource
|
||||
private ILawsOverseasStandardService fbService;
|
||||
|
||||
@Value("${srms.font_url_pdf}")
|
||||
private String fontUrlPdf;
|
||||
@Value("${srms.back_url_pdf}")
|
||||
@@ -921,13 +927,21 @@ public class SrmsApiServiceImpl implements SrmsApiService {
|
||||
if (!CollectionUtils.isEmpty(lawsBindPartList)) {
|
||||
// 设置标准名称
|
||||
Set<String> standardIdSet = lawsBindPartList.stream().map(LawsBindPart::getStandardId).collect(Collectors.toSet());
|
||||
List<LawsEnterpriseStandard> lawsStandardList = esService.listByIds(standardIdSet);
|
||||
for (LawsEnterpriseStandard es : lawsStandardList) {
|
||||
List<StandardVO> lawsStandardList = new ArrayList<>();
|
||||
List<LawsEnterpriseStandard> esStandardList = esService.listByIds(standardIdSet);
|
||||
List<LawsDomesticStandard> gbStandardList = gbService.listByIds(standardIdSet);
|
||||
List<LawsOverseasStandard> fbStandardList = fbService.listByIds(standardIdSet);
|
||||
// 将三种标准集合转换为通用VO
|
||||
lawsStandardList.addAll(esStandardList.stream().map(e -> new StandardVO(e.getStandardNumber(), e.getStandardName())).collect(Collectors.toList()));
|
||||
lawsStandardList.addAll(gbStandardList.stream().map(e -> new StandardVO(e.getStandardNumber(), e.getStandardName())).collect(Collectors.toList()));
|
||||
lawsStandardList.addAll(fbStandardList.stream().map(e -> new StandardVO(e.getStandardNumber(), e.getStandardName())).collect(Collectors.toList()));
|
||||
|
||||
for (StandardVO standard : lawsStandardList) {
|
||||
JSONObject rows = new JSONObject();
|
||||
rows.put("PartNum", lawsBindPartList.get(0).getPartName());
|
||||
rows.put("PartName", lawsBindPartList.get(0).getPartName());
|
||||
rows.put("StandardNumber", es.getStandardNumber());
|
||||
rows.put("StandardName", es.getStandardName());
|
||||
rows.put("StandardNumber", standard.getStandardNumber());
|
||||
rows.put("StandardName", standard.getStandardName());
|
||||
rows.put("Remark1", "");
|
||||
rows.put("Remark2", "");
|
||||
rows.put("Remark3", "");
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.jero.modules.docking.srms.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -10,6 +12,8 @@ import java.io.Serializable;
|
||||
* @date 2024/1/19 14:58
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StandardVO implements Serializable {
|
||||
|
||||
/**
|
||||
@@ -37,5 +41,8 @@ public class StandardVO implements Serializable {
|
||||
*/
|
||||
private String hasSplit;
|
||||
|
||||
|
||||
public StandardVO(String standardNumber, String standardName) {
|
||||
this.standardNumber = standardNumber;
|
||||
this.standardName = standardName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user