|
|
@@ -17,6 +17,7 @@ import com.hdkj.lt.modle.vo.recon.ReconSaveResultVO;
|
|
|
import com.hdkj.lt.si.config.EstimationAlgorithmProp;
|
|
|
import com.hdkj.lt.si.dao.*;
|
|
|
import com.hdkj.lt.si.service.recon.ReconResultService;
|
|
|
+import com.hdkj.lt.utils.security.StrConvertUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.codec.Charsets;
|
|
|
@@ -131,9 +132,10 @@ public class ReconResultServiceImpl implements ReconResultService {
|
|
|
Map<String, Integer> counts = new LinkedHashMap<>();
|
|
|
//获取方案列表
|
|
|
List<ReconfigurationSchemeDTO> schemes = extractSchemes(dto);
|
|
|
+ int i = 1;
|
|
|
for (ReconfigurationSchemeDTO scheme : schemes) {
|
|
|
// 1. 主表
|
|
|
- FhzgReconResult main = buildMain(dto,scheme);
|
|
|
+ FhzgReconResult main = buildMain(dto,scheme,i++);
|
|
|
main.setEventId(eventId);
|
|
|
main.setRawResult(rawResultJson);
|
|
|
resultMapper.insert(main);
|
|
|
@@ -247,7 +249,7 @@ public class ReconResultServiceImpl implements ReconResultService {
|
|
|
return dto.getReconfigurationSchemes().getList();
|
|
|
}
|
|
|
|
|
|
- private FhzgReconResult buildMain(RawResultDTO dto, ReconfigurationSchemeDTO scheme) {
|
|
|
+ private FhzgReconResult buildMain(RawResultDTO dto, ReconfigurationSchemeDTO scheme,int i) {
|
|
|
FhzgReconResult m = new FhzgReconResult();
|
|
|
// 共享标量(每个方案主记录重复)
|
|
|
m.setId(IdWorker.getId());
|
|
|
@@ -263,7 +265,7 @@ public class ReconResultServiceImpl implements ReconResultService {
|
|
|
// [FHZG-RECON-MULTI] 方案标识 + objective
|
|
|
m.setRank(scheme.getRank());
|
|
|
m.setSchemeId(scheme.getSchemeId());
|
|
|
- m.setSchemeName(scheme.getSchemeName());
|
|
|
+ m.setSchemeName(String.format("方案%s", StrConvertUtils.toChineseStr(i)));
|
|
|
m.setObjective(toJson(scheme.getObjective()));
|
|
|
|
|
|
// finalCheck 折叠(per-scheme)
|