From 2480af577b5c930fdfbe1cd3f94e611bccb6b5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Thu, 13 Feb 2025 21:57:56 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20RestTemplateTest?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/test/java/pmml/RestTemplateTest.java | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ddp/ddp-runner-api/src/test/java/pmml/RestTemplateTest.java diff --git a/ddp/ddp-runner-api/src/test/java/pmml/RestTemplateTest.java b/ddp/ddp-runner-api/src/test/java/pmml/RestTemplateTest.java new file mode 100644 index 0000000..f46fdd2 --- /dev/null +++ b/ddp/ddp-runner-api/src/test/java/pmml/RestTemplateTest.java @@ -0,0 +1,46 @@ +package pmml; + + +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; +import org.springframework.web.client.RestTemplate; + +public class RestTemplateTest { + + public static void main(String[] args)throws Exception{ + + RestTemplate rt = new RestTemplate(); + + MultiValueMap map= new LinkedMultiValueMap<>(); + map.add("name", "tiger"); + + // 设置请求头 + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED); + + // 创建HTTP实体 + HttpEntity> request = new HttpEntity<>(map, headers); + + // 发送POST请求 + String url = "http://47.99.93.74:8090/mockapi/hello2"; + String response = rt.postForObject(url, request, String.class); + + System.out.println(response); + + + ResponseEntity responseEntity = rt.postForEntity(url, request, String.class); + System.out.println(responseEntity.getBody()); + + + + + + + + + } +} From 2d4ddc28572238ad81e0dfcf8bd3dc3edddde8d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Thu, 13 Feb 2025 22:47:20 +0800 Subject: [PATCH 02/11] =?UTF-8?q?http=20=E6=8E=A5=E5=8F=A3=20=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=20=E4=BC=98=E5=8C=96=20=EF=BC=8Cpost=20application/x-?= =?UTF-8?q?www-form-urlencoded=20=20=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/InterfaceServiceImpl.java | 55 +++++++++++++++---- .../datax/runner/impl/CommonServiceImpl.java | 3 + .../common/utils/util/runner/JevalUtil.java | 4 ++ 3 files changed, 50 insertions(+), 12 deletions(-) diff --git a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/datainterface/impl/InterfaceServiceImpl.java b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/datainterface/impl/InterfaceServiceImpl.java index 84876ff..6dd0477 100644 --- a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/datainterface/impl/InterfaceServiceImpl.java +++ b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/datainterface/impl/InterfaceServiceImpl.java @@ -32,6 +32,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.http.*; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.LinkedMultiValueMap; +import org.springframework.util.MultiValueMap; import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.ListenableFutureCallback; import org.springframework.web.client.AsyncRestTemplate; @@ -244,20 +246,49 @@ public class InterfaceServiceImpl extends ServiceImpl httpEntity = new HttpEntity(body, httpHeaders); - // 发送请求 - if(callType == 2){ - responseEntity = restTemplate.postForEntity(url, httpEntity, String.class); - } else { - listenableFuture = asyncRestTemplate.postForEntity(url, httpEntity, String.class); + + final String requestHeaders = interfaceInfo.getRequestHeaders(); + + if(requestHeaders!=null && requestHeaders.contains(MediaType.APPLICATION_JSON_VALUE)) { + + HttpHeaders httpHeaders = new HttpHeaders(); + // 设置请求头 + httpHeaders.setAll(JSONObject.parseObject(requestHeaders, Map.class)); + // 封装请求体 + JSONObject body = JSONObject.parseObject(requestBody); + // 封装参数和头信息 + HttpEntity httpEntity = new HttpEntity(body, httpHeaders); + // 发送请求 + if (callType == 2) { + responseEntity = restTemplate.postForEntity(url, httpEntity, String.class); + } else { + listenableFuture = asyncRestTemplate.postForEntity(url, httpEntity, String.class); + } + }else{ + + HttpHeaders httpHeaders = new HttpHeaders(); + // 设置请求头 + httpHeaders.setAll(JSONObject.parseObject(interfaceInfo.getRequestHeaders(), Map.class)); + // 封装请求体 + + JSONObject body = JSONObject.parseObject(requestBody); + MultiValueMap bodyMap = new LinkedMultiValueMap<>(); + bodyMap.setAll(body); + + // 封装参数和头信息 + HttpEntity> httpEntity = new HttpEntity(bodyMap, httpHeaders); + // 发送请求 + if (callType == 2) { + // 这里调用还是报错 ,已修复 + // post http://47.99.93.74:8090/mockapi/hello2?name={name} 会报错 + // java.lang.IllegalArgumentException: Not enough variable values available to expand 'name' + responseEntity = restTemplate.postForEntity(url, httpEntity, String.class); + } else { + listenableFuture = asyncRestTemplate.postForEntity(url, httpEntity, String.class); + } } + } else if(HttpMethod.GET.name().equals(interfaceInfo.getMethod())){ // 封装uri地址路径变量 Map uriVariables = new HashMap<>(); diff --git a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/runner/impl/CommonServiceImpl.java b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/runner/impl/CommonServiceImpl.java index fb1ac6d..9531212 100644 --- a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/runner/impl/CommonServiceImpl.java +++ b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/runner/impl/CommonServiceImpl.java @@ -182,6 +182,9 @@ public class CommonServiceImpl implements CommonService { map.put(key,value); } + + + // 决策选项 测试时 ,这个方法 没被调用 @Override public Map getFields(List fields, Map inputParam) { logger.info("start getEngineField, fields:{},inputParam:{}", JSONObject.toJSONString(fields), JSONObject.toJSONString(inputParam)); diff --git a/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/util/runner/JevalUtil.java b/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/util/runner/JevalUtil.java index 525548f..79457fa 100644 --- a/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/util/runner/JevalUtil.java +++ b/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/util/runner/JevalUtil.java @@ -162,6 +162,10 @@ public class JevalUtil { Object v = variablesMap.get(key); if(v!=null) { String variableValue = CommonConst.SYMBOL_SINGLE_QUOTA+v.toString()+CommonConst.SYMBOL_SINGLE_QUOTA; + variablesMap.put(key, variableValue); + }else{ + String variableValue = CommonConst.SYMBOL_SINGLE_QUOTA+CommonConst.SYMBOL_SINGLE_QUOTA; + variablesMap.put(key, variableValue); } } From 5b41070529be08f658fb573c53d1f188324c8f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Fri, 14 Feb 2025 15:08:43 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E8=A1=8D=E7=94=9F=E6=8C=87=E6=A0=87?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8F=8Abugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/datax/runner/impl/CommonServiceImpl.java | 12 ++++++++++-- .../runner/business/impl/RiskEngineBusinessImpl.java | 11 ++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/runner/impl/CommonServiceImpl.java b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/runner/impl/CommonServiceImpl.java index 9531212..2f09dbf 100644 --- a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/runner/impl/CommonServiceImpl.java +++ b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/datax/runner/impl/CommonServiceImpl.java @@ -75,14 +75,22 @@ public class CommonServiceImpl implements CommonService { } SessionData sessionData = RunnerSessionManager.getSession(); Long organId = sessionData.getOrganId(); + List fieldList = fieldService.findFieldByIdsbyorganId(organId, ids); + List list = new ArrayList<>(); + ids = new ArrayList<>(); + for (int i = 0; i < fieldList.size(); i++) { if (fieldList.get(i).getIsDerivative() == 1) { ids.addAll(StringUtil.toLongList(fieldList.get(i).getOrigFieldId())); - } else - list.add(fieldList.get(i)); + } + + // 20250214 bugfix , 这个不能放在 else分支里 !!! + // 否则后面取不到值 !!!!!! + list.add(fieldList.get(i)); + } if (ids.size() > 0) { List lists = fieldService.findFieldByIdsbyorganId(organId, ids); diff --git a/ddp/ddp-enginex/risk-engine/src/main/java/com/fibo/ddp/enginex/riskengine/runner/business/impl/RiskEngineBusinessImpl.java b/ddp/ddp-enginex/risk-engine/src/main/java/com/fibo/ddp/enginex/riskengine/runner/business/impl/RiskEngineBusinessImpl.java index ee89727..80f0966 100644 --- a/ddp/ddp-enginex/risk-engine/src/main/java/com/fibo/ddp/enginex/riskengine/runner/business/impl/RiskEngineBusinessImpl.java +++ b/ddp/ddp-enginex/risk-engine/src/main/java/com/fibo/ddp/enginex/riskengine/runner/business/impl/RiskEngineBusinessImpl.java @@ -98,7 +98,7 @@ public class RiskEngineBusinessImpl implements RiskEngineBusiness { logger.info("请求参数,paramJson: {}", JSONObject.toJSONString(paramJson)); JSONObject jsonObject = new JSONObject(); JSONArray resultJson = new JSONArray(); - Map> featureMaps = new ConcurrentHashMap<>(); + // Map> featureMaps = new ConcurrentHashMap<>(); Long organId = Long.valueOf(paramJson.get("organId").toString()); Long engineId = Long.valueOf(paramJson.get("engineId").toString()); //获取引擎信息 @@ -124,13 +124,18 @@ public class RiskEngineBusinessImpl implements RiskEngineBusiness { //返回输出结果 Map outMap = new ConcurrentHashMap<>(); // 记录执行前全量指标 - featureMaps.put("before", inputParam); + // featureMaps.put("before", inputParam); + logger.info("recursionEngineNode_before_inputParam="+inputParam); + //节点执行方法 recursionEngineNode(inputParam, engineNodeMap.get(engineNode.getNextNodes()), engineNodeMap, outMap); + + logger.info("recursionEngineNode_after_inputParam="+inputParam); + jsonObject.put("status", "0x0000"); jsonObject.put("msg", "执行成功"); //记录执行后的全量指标 - featureMaps.put("after", inputParam); + // featureMaps.put("after", inputParam); paramJson.put("versionId", engineNode.getVersionId()); // featureRecordService.recordAllFeature(featureMaps, engine, paramJson); From e87eab5460218ba0c353ff091e18f2d2947347dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Fri, 14 Feb 2025 16:54:01 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fibo/ddp/common/service/cache/LocalCacheService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/cache/LocalCacheService.java b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/cache/LocalCacheService.java index 3b90764..9e05dcd 100644 --- a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/cache/LocalCacheService.java +++ b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/cache/LocalCacheService.java @@ -60,7 +60,7 @@ public class LocalCacheService { @Resource PMMLExecutor pmmlExecutor; - private static final String VERSION = "2025-02-12 16:30"; + private static final String VERSION = "2025-02-14 17:00"; private final String startTime = LocalDateTime.now().toString(); From 9d034fb303ce58851259e27f5e60ddd5212c1770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Fri, 14 Feb 2025 17:07:53 +0800 Subject: [PATCH 05/11] =?UTF-8?q?CommUtil=20=E6=94=BE=E5=88=B0=20util?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=20=EF=BC=8C=E5=A2=9E=E5=8A=A0=20status=20htt?= =?UTF-8?q?p=20=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/cache/LocalCacheService.java | 5 +-- .../fibo/ddp/common/utils/util}/CommUtil.java | 8 +++- .../web/controller/InfoController.java | 41 +++++++++++++++++++ 3 files changed, 50 insertions(+), 4 deletions(-) rename ddp/ddp-common/{ddp-service/src/main/java/com/fibo/ddp/common/service/common => ddp-utils/src/main/java/com/fibo/ddp/common/utils/util}/CommUtil.java (58%) create mode 100644 ddp/ddp-manager-web/src/main/java/com/fibo/ddp/manager/web/controller/InfoController.java diff --git a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/cache/LocalCacheService.java b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/cache/LocalCacheService.java index 9e05dcd..9b542e4 100644 --- a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/cache/LocalCacheService.java +++ b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/cache/LocalCacheService.java @@ -6,8 +6,8 @@ import com.fibo.ddp.common.dao.strategyx.aimodel.MachineLearningModelsMapper; import com.fibo.ddp.common.model.datax.datamanage.Field; import com.fibo.ddp.common.model.strategyx.aimodel.MachineLearningModels; import com.fibo.ddp.common.model.strategyx.aimodel.ModelDTO; -import com.fibo.ddp.common.service.common.CommUtil; import com.fibo.ddp.common.service.strategyx.aimodel.PMMLExecutor.PMMLExecutor; +import com.fibo.ddp.common.utils.util.CommUtil; import org.jpmml.evaluator.Evaluator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -60,7 +60,6 @@ public class LocalCacheService { @Resource PMMLExecutor pmmlExecutor; - private static final String VERSION = "2025-02-14 17:00"; private final String startTime = LocalDateTime.now().toString(); @@ -90,7 +89,7 @@ public class LocalCacheService { public Map getInfo(){ Map info = new HashMap<>(); - info.put("VERSION",VERSION); + info.put("VERSION",CommUtil.getVersion()); info.put("startTime",startTime); info.put("runCount",runCount.longValue()); diff --git a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/common/CommUtil.java b/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/util/CommUtil.java similarity index 58% rename from ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/common/CommUtil.java rename to ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/util/CommUtil.java index 7048226..67915c8 100644 --- a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/common/CommUtil.java +++ b/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/util/CommUtil.java @@ -1,8 +1,14 @@ -package com.fibo.ddp.common.service.common; +package com.fibo.ddp.common.utils.util; public class CommUtil { + private static final String VERSION = "2025-02-14 17:00"; + + + public static String getVersion(){ + return VERSION; + } public static void doSleep(long time){ if(time<=0){ return; diff --git a/ddp/ddp-manager-web/src/main/java/com/fibo/ddp/manager/web/controller/InfoController.java b/ddp/ddp-manager-web/src/main/java/com/fibo/ddp/manager/web/controller/InfoController.java new file mode 100644 index 0000000..2e3beab --- /dev/null +++ b/ddp/ddp-manager-web/src/main/java/com/fibo/ddp/manager/web/controller/InfoController.java @@ -0,0 +1,41 @@ +package com.fibo.ddp.manager.web.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.fibo.ddp.common.model.common.ResponseEntityBuilder; +import com.fibo.ddp.common.model.common.ResponseEntityDto; +import com.fibo.ddp.common.model.common.message.template.entity.AppTemplate; +import com.fibo.ddp.common.model.common.message.template.vo.AppTemplateReqVo; +import com.fibo.ddp.common.service.common.SessionManager; +import com.fibo.ddp.common.service.common.message.template.AppTemplateService; +import com.fibo.ddp.common.utils.util.CommUtil; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +@RestController +@RequestMapping("info") +public class InfoController { + + @Autowired + private AppTemplateService appTemplateService; + + @RequestMapping("status") + public Object status(HttpServletRequest request){ + Map map = new HashMap(); + map.put("version", CommUtil.getVersion()); + map.put("now", LocalDateTime.now().toString()); + + return map; + } + + + +} From 034b9c6ed57918d85d53996e5c917d456e678bab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Fri, 14 Feb 2025 17:38:37 +0800 Subject: [PATCH 06/11] =?UTF-8?q?/Riskmanage/info/status=20=20=E5=85=8Dtok?= =?UTF-8?q?en=20=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fibo/ddp/common/utils/constant/ServiceFilterConstant.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/constant/ServiceFilterConstant.java b/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/constant/ServiceFilterConstant.java index 39c8d07..83d84d5 100644 --- a/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/constant/ServiceFilterConstant.java +++ b/ddp/ddp-common/ddp-utils/src/main/java/com/fibo/ddp/common/utils/constant/ServiceFilterConstant.java @@ -13,6 +13,7 @@ public class ServiceFilterConstant { uriSet.add("/Riskmanage/v2/datamanage/datamanage/downTemplate");// 指标模板下载 uriSet.add("/Riskmanage/v2/datamanage/listmanage/downTemplate");// 名单库模板下载 uriSet.add("/Riskmanage/v3/analyse/decision"); + uriSet.add("/Riskmanage/info/status"); } public static boolean isSessionFilter(String uri) { From 54da4065db33e9f56ddf49a85189476083110d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Mon, 17 Feb 2025 13:56:27 +0800 Subject: [PATCH 07/11] add bugs --- bugs/note.txt | 5 +++++ ddp/ddp-runner-api/src/main/resources/logging-config.xml | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 bugs/note.txt diff --git a/bugs/note.txt b/bugs/note.txt new file mode 100644 index 0000000..59c98dd --- /dev/null +++ b/bugs/note.txt @@ -0,0 +1,5 @@ + +数据源指标编辑 , 这些变量值 没有绑定到界面上,接口返回是ok的 ,前端需要改一下 +引擎列表 点名称 一直加载中 +决策复制版本 ,报错 + diff --git a/ddp/ddp-runner-api/src/main/resources/logging-config.xml b/ddp/ddp-runner-api/src/main/resources/logging-config.xml index 7b474b5..e301261 100644 --- a/ddp/ddp-runner-api/src/main/resources/logging-config.xml +++ b/ddp/ddp-runner-api/src/main/resources/logging-config.xml @@ -77,7 +77,7 @@ - + @@ -86,7 +86,7 @@ - + From 25f51b12939c7b3b4b6ed134428e262a99b693ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Mon, 17 Feb 2025 14:00:11 +0800 Subject: [PATCH 08/11] =?UTF-8?q?bug=E5=88=97=E8=A1=A8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bugs/note.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bugs/note.txt b/bugs/note.txt index 59c98dd..e2593ad 100644 --- a/bugs/note.txt +++ b/bugs/note.txt @@ -1,5 +1,11 @@ +BUG: 数据源指标编辑 , 这些变量值 没有绑定到界面上,接口返回是ok的 ,前端需要改一下 引擎列表 点名称 一直加载中 决策复制版本 ,报错 + + +优化点: +数据中心 / 接口源 / 接口新建 修改 查看 请求地址 输入框加长 + From 97059278e1c8f1abbdcc0063d1ecaac999e071bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Mon, 17 Feb 2025 14:43:45 +0800 Subject: [PATCH 09/11] bugs update --- bugs/note.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/bugs/note.txt b/bugs/note.txt index e2593ad..c1d46f3 100644 --- a/bugs/note.txt +++ b/bugs/note.txt @@ -1,5 +1,6 @@ BUG: +基础指标模版下载报错 数据源指标编辑 , 这些变量值 没有绑定到界面上,接口返回是ok的 ,前端需要改一下 引擎列表 点名称 一直加载中 决策复制版本 ,报错 From 74103d466381a2ebd4071a2dfdacfa49c8455dbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Mon, 17 Feb 2025 17:10:10 +0800 Subject: [PATCH 10/11] =?UTF-8?q?bugs=20update=20,t=5Fmachine=5Flearning?= =?UTF-8?q?=5Fmodels=20=20model=5Ffield=20=20=E5=AD=97=E6=AE=B5=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E5=8A=A0=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bugs/note.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bugs/note.txt b/bugs/note.txt index c1d46f3..fc19d22 100644 --- a/bugs/note.txt +++ b/bugs/note.txt @@ -7,6 +7,11 @@ BUG: +t_machine_learning_models model_field (模型解析字段) 字段长度太小 +ALTER TABLE t_machine_learning_models MODIFY COLUMN model_field varchar(4096) NOT NULL DEFAULT '' COMMENT '模型解析字段'; + + + 优化点: 数据中心 / 接口源 / 接口新建 修改 查看 请求地址 输入框加长 From c35000738c2a3d52f78e9d0429ebb1bd21bc8b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E5=88=9A?= <53732908@qq.com> Date: Mon, 17 Feb 2025 18:00:09 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=8F=96=E5=80=BC?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9=20=EF=BC=8C=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=8E=9F=E6=9D=A5=E7=9A=84=E5=8F=96=E5=80=BC=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aimodel/PMMLExecutor/impl/PMMLExecutorRFImpl.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/aimodel/PMMLExecutor/impl/PMMLExecutorRFImpl.java b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/aimodel/PMMLExecutor/impl/PMMLExecutorRFImpl.java index 29335b6..437564d 100644 --- a/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/aimodel/PMMLExecutor/impl/PMMLExecutorRFImpl.java +++ b/ddp/ddp-common/ddp-service/src/main/java/com/fibo/ddp/common/service/strategyx/aimodel/PMMLExecutor/impl/PMMLExecutorRFImpl.java @@ -76,6 +76,9 @@ public class PMMLExecutorRFImpl implements PMMLExecutor { } Map results = evaluator.evaluate(arguments); + + System.out.println("pmml_predict_results: " + results); + List targetFields = evaluator.getTargetFields(); TargetField targetField = targetFields.get(0); @@ -92,10 +95,10 @@ public class PMMLExecutorRFImpl implements PMMLExecutor { value_1 = tmpnum.doubleValue(); } - // TODO 不知道啥含义 先注释掉 返回结果 - // if (targetFieldValue instanceof ProbabilityDistribution) { - // value_1 = ((ProbabilityDistribution) targetFieldValue).getValue("1"); - // } + // TODO 模型取值逻辑待确认 + if (targetFieldValue instanceof ProbabilityDistribution) { + value_1 = ((ProbabilityDistribution) targetFieldValue).getValue("1"); + }