From 3f07ab2e03e501ae55d1d1b0d031daf50c8e13e5 Mon Sep 17 00:00:00 2001
From: dongyukun <1208714201@qq.com>
Date: 星期二, 10 十二月 2024 17:27:44 +0800
Subject: [PATCH] common依赖排除父类

---
 iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesDetServiceImpl.java |   76 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 76 insertions(+), 0 deletions(-)

diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesDetServiceImpl.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesDetServiceImpl.java
new file mode 100644
index 0000000..998f755
--- /dev/null
+++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesDetServiceImpl.java
@@ -0,0 +1,76 @@
+package com.iailab.module.pms.coalquality.modules.analysis.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.iailab.framework.common.service.impl.BaseServiceImpl;
+import com.iailab.framework.common.util.object.ConvertUtils;
+import com.iailab.framework.tenant.core.aop.TenantIgnore;
+import com.iailab.module.pms.coalquality.modules.analysis.dao.CoalWashCurvesDetDao;
+import com.iailab.module.pms.coalquality.modules.analysis.dao.ExcelImportDao;
+import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDetDTO;
+import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalWashCurvesDetEntity;
+import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesDetService;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 可选性曲线数据
+ *
+ * @author PanZhibao
+ * @Description
+ * @createTime 2023年01月16日 15:58:00
+ */
+@Service
+public class CoalWashCurvesDetServiceImpl extends BaseServiceImpl<CoalWashCurvesDetDao, CoalWashCurvesDetEntity>
+        implements CoalWashCurvesDetService {
+
+    @Resource
+    private ExcelImportDao excelImportDao;
+
+    @Override
+    @TenantIgnore
+    public List<CoalWashCurvesDetDTO> queryList(Map<String, Object> params) {
+        List<CoalWashCurvesDetEntity> list = baseDao.selectList(getWrapper(params));
+
+        return ConvertUtils.sourceToTarget(list, CoalWashCurvesDetDTO.class);
+    }
+
+    private QueryWrapper<CoalWashCurvesDetEntity> getWrapper(Map<String, Object> params) {
+        String curvesId = (String) params.get("curvesId");
+
+        QueryWrapper<CoalWashCurvesDetEntity> wrapper = new QueryWrapper<>();
+        wrapper.eq(StringUtils.isNotBlank(curvesId), "CURVES_ID", curvesId).orderByAsc("code");
+
+        return wrapper;
+    }
+
+    @Override
+    public Map<String, Object> getDrawParams(String curvesId) {
+        Map<String, Object> result = new HashMap<>();
+
+        Map<String, Object> queryDetParams = new HashMap<>(1);
+        queryDetParams.put("curvesId", curvesId);
+        List<CoalWashCurvesDetDTO> list = this.queryList(queryDetParams);
+
+        double[][] floatSrcData = new double[list.size()][2];
+        for (int i = 0; i < list.size(); i ++) {
+            floatSrcData[i][0] = list.get(i).getFwljcl().doubleValue();
+            floatSrcData[i][1] = list.get(i).getFwljhf().doubleValue();
+        }
+
+        double[][] densityScopeSrcData = new double[list.size()][2];
+        for (int i = 0; i < list.size(); i ++) {
+            densityScopeSrcData[i][0] = list.get(i).getMd().doubleValue();
+            densityScopeSrcData[i][1] = list.get(i).getHl().doubleValue();
+        }
+
+        result.put("floatSrcData", floatSrcData);
+        result.put("densityScopeSrcData", densityScopeSrcData);
+        return result;
+    }
+
+}

--
Gitblit v1.9.3