Bladeren bron

新增 碳源投加 预测模拟数据配置获取结果接口

王苗苗 1 week geleden
bovenliggende
commit
5ef52af37e

+ 13 - 0
slibra-admin/src/main/java/com/slibra/web/controller/business/FrontController.java

@@ -698,6 +698,19 @@ public class FrontController extends BaseController {
 
 
 
+    /**
+     * 配置预测参数,获取碳源投加计算得到的相关参数
+     * @return
+     */
+    @PostMapping("/configPredict")
+    public AjaxResult configPredict(@RequestBody List<TJlPredict> tJlPredicts)
+    {
+        log.info("进入了 配置预测参数,获取碳源投加计算得到的相关参数 接口");
+        return AjaxResult.success(frontService.configPredict(tJlPredicts));
+    }
+
+
+
     //--------------------上面是碳排放智能体相关的方法--------------------end
 
     //--------------------下面是测试的方法--------------------

+ 1 - 1
slibra-framework/src/main/java/com/slibra/framework/config/SecurityConfig.java

@@ -124,7 +124,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
                 .antMatchers("/login", "/register", "/captchaImage","/sendSmsCode/*","/smsLogin","/test/**", "/demo/**").permitAll()
                 .antMatchers("/websocket/**").permitAll()//websocket的
 //                .antMatchers("/front/**","/grpc/**").permitAll()//临时测试的
-                .antMatchers("/qiniuyun/**", "/out/**", "/business/daily", "/front/bigModel/warning/pageList").permitAll()//文件上传相关 外部接口等
+                .antMatchers("/qiniuyun/**", "/out/**", "/business/daily", "/front/bigModel/warning/pageList", "/front/configPredict").permitAll()//文件上传相关 外部接口等
                 // 静态资源,可匿名访问
                 .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
                 .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()

+ 2 - 1
slibra-quartz/src/main/java/com/slibra/quartz/task/AsyncTask.java

@@ -6454,7 +6454,8 @@ public class AsyncTask {
         chatReq.setShowVal(showVal);//前端展示的数据和提问的数据不一致
         chatReq.setQuestion(BusinessEnum.WarningSymbolEnum.YBGZ_DD_SINGLE.getMsg());//本地问题
 //        chatReq.setAnswer(SINGLE_BREAKPOINT_ANSWER_PREFIX + category + SINGLE_BREAKPOINT_ANSWER_SUFFIX);
-        chatReq.setAnswer(ROBOT_SJYC_ANSWER_REPLACE.replaceAll("@@@0", category).replaceAll("@@@1", xxx));
+        //todo 改成真实值
+        chatReq.setAnswer(ROBOT_SJYC_ANSWER_REPLACE.replaceAll("@@@0", category).replaceAll("@@@1", "xxx"));
         chatReq.setWarningId(String.valueOf(warningRecord.getId()));
         chatReq.setCounts(1);//问答次数
 

+ 164 - 0
slibra-system/src/main/java/com/slibra/business/domain/AutoFeedback.java

@@ -0,0 +1,164 @@
+package com.slibra.business.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.slibra.common.annotation.Excel;
+import com.slibra.common.core.domain.BaseEntity;
+
+/**
+ * 【请填写功能名称】对象 auto_feedback
+ * 
+ * @author slibra
+ * @date 2025-04-22
+ */
+public class AutoFeedback extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 当前请求时间 */
+    @Excel(name = "当前请求时间")
+    private String reqTime;
+
+    /** 反馈控制状态 */
+    @Excel(name = "反馈控制状态")
+    private String feedbackType;
+
+    /** 硝酸盐后反馈设置目标 */
+    @Excel(name = "硝酸盐后反馈设置目标")
+    private Long basePara;
+
+    /** 反馈默认基础控制系数 */
+    @Excel(name = "反馈默认基础控制系数")
+    private Long controlCoef;
+
+    /** 当前所属大区间 */
+    @Excel(name = "当前所属大区间")
+    private Long cate;
+
+    /** 当前所属小区间 */
+    @Excel(name = "当前所属小区间")
+    private Long subcate;
+
+    /** 当前反馈系数 */
+    @Excel(name = "当前反馈系数")
+    private Long coef;
+
+    /** 基础调参配置信息 */
+    @Excel(name = "基础调参配置信息")
+    private String cf;
+
+    /** 记录变化过程信息 */
+    @Excel(name = "记录变化过程信息")
+    private String ext;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setReqTime(String reqTime) 
+    {
+        this.reqTime = reqTime;
+    }
+
+    public String getReqTime() 
+    {
+        return reqTime;
+    }
+    public void setFeedbackType(String feedbackType) 
+    {
+        this.feedbackType = feedbackType;
+    }
+
+    public String getFeedbackType() 
+    {
+        return feedbackType;
+    }
+    public void setBasePara(Long basePara) 
+    {
+        this.basePara = basePara;
+    }
+
+    public Long getBasePara() 
+    {
+        return basePara;
+    }
+    public void setControlCoef(Long controlCoef) 
+    {
+        this.controlCoef = controlCoef;
+    }
+
+    public Long getControlCoef() 
+    {
+        return controlCoef;
+    }
+    public void setCate(Long cate) 
+    {
+        this.cate = cate;
+    }
+
+    public Long getCate() 
+    {
+        return cate;
+    }
+    public void setSubcate(Long subcate) 
+    {
+        this.subcate = subcate;
+    }
+
+    public Long getSubcate() 
+    {
+        return subcate;
+    }
+    public void setCoef(Long coef) 
+    {
+        this.coef = coef;
+    }
+
+    public Long getCoef() 
+    {
+        return coef;
+    }
+    public void setCf(String cf) 
+    {
+        this.cf = cf;
+    }
+
+    public String getCf() 
+    {
+        return cf;
+    }
+    public void setExt(String ext) 
+    {
+        this.ext = ext;
+    }
+
+    public String getExt() 
+    {
+        return ext;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("reqTime", getReqTime())
+            .append("updateTime", getUpdateTime())
+            .append("feedbackType", getFeedbackType())
+            .append("basePara", getBasePara())
+            .append("controlCoef", getControlCoef())
+            .append("cate", getCate())
+            .append("subcate", getSubcate())
+            .append("coef", getCoef())
+            .append("cf", getCf())
+            .append("ext", getExt())
+            .toString();
+    }
+}

+ 210 - 0
slibra-system/src/main/java/com/slibra/business/domain/TJlPredict.java

@@ -0,0 +1,210 @@
+package com.slibra.business.domain;
+
+import java.math.BigDecimal;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.slibra.common.annotation.Excel;
+import com.slibra.common.core.domain.BaseEntity;
+
+/**
+ * 机理预测配置对象 t_jl_predict
+ * 
+ * @author slibra
+ * @date 2025-04-22
+ */
+public class TJlPredict extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 化验时间 精确到小时 */
+    @Excel(name = "化验时间 精确到小时")
+    private String testHour;
+
+    /** #1好氧池硝酸盐 */
+    @Excel(name = "#1好氧池硝酸盐")
+    private BigDecimal no3Hlj1Jqr;
+
+    /** #2好氧池硝酸盐 */
+    @Excel(name = "#2好氧池硝酸盐")
+    private BigDecimal no3Hlj2Jqr;
+
+    /** #1缺氧硝酸盐 */
+    @Excel(name = "#1缺氧硝酸盐")
+    private BigDecimal no3Qyc1Jqr;
+
+    /** #2缺氧硝酸盐 */
+    @Excel(name = "#2缺氧硝酸盐")
+    private BigDecimal no3Qyc2Jqr;
+
+    /** 二沉池正磷酸盐 */
+    @Excel(name = "二沉池正磷酸盐")
+    private BigDecimal tpRccJqr;
+
+    /** #1好氧池正磷酸盐 */
+    @Excel(name = "#1好氧池正磷酸盐")
+    private BigDecimal tpHl1Jqr;
+
+    /** #2好氧池正磷酸盐 */
+    @Excel(name = "#2好氧池正磷酸盐")
+    private BigDecimal tpHl2Jqr;
+
+    /** #1缺氧氨氮 */
+    @Excel(name = "#1缺氧氨氮")
+    private BigDecimal nh31Jqr;
+
+    /** #2缺氧氨氮 */
+    @Excel(name = "#2缺氧氨氮")
+    private BigDecimal nh32Jqr;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private Long delFlag;
+
+    /** 乐观锁 */
+    @Excel(name = "乐观锁")
+    private Long revision;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setTestHour(String testHour) 
+    {
+        this.testHour = testHour;
+    }
+
+    public String getTestHour() 
+    {
+        return testHour;
+    }
+    public void setNo3Hlj1Jqr(BigDecimal no3Hlj1Jqr) 
+    {
+        this.no3Hlj1Jqr = no3Hlj1Jqr;
+    }
+
+    public BigDecimal getNo3Hlj1Jqr() 
+    {
+        return no3Hlj1Jqr;
+    }
+    public void setNo3Hlj2Jqr(BigDecimal no3Hlj2Jqr) 
+    {
+        this.no3Hlj2Jqr = no3Hlj2Jqr;
+    }
+
+    public BigDecimal getNo3Hlj2Jqr() 
+    {
+        return no3Hlj2Jqr;
+    }
+    public void setNo3Qyc1Jqr(BigDecimal no3Qyc1Jqr) 
+    {
+        this.no3Qyc1Jqr = no3Qyc1Jqr;
+    }
+
+    public BigDecimal getNo3Qyc1Jqr() 
+    {
+        return no3Qyc1Jqr;
+    }
+    public void setNo3Qyc2Jqr(BigDecimal no3Qyc2Jqr) 
+    {
+        this.no3Qyc2Jqr = no3Qyc2Jqr;
+    }
+
+    public BigDecimal getNo3Qyc2Jqr() 
+    {
+        return no3Qyc2Jqr;
+    }
+    public void setTpRccJqr(BigDecimal tpRccJqr) 
+    {
+        this.tpRccJqr = tpRccJqr;
+    }
+
+    public BigDecimal getTpRccJqr() 
+    {
+        return tpRccJqr;
+    }
+    public void setTpHl1Jqr(BigDecimal tpHl1Jqr) 
+    {
+        this.tpHl1Jqr = tpHl1Jqr;
+    }
+
+    public BigDecimal getTpHl1Jqr() 
+    {
+        return tpHl1Jqr;
+    }
+    public void setTpHl2Jqr(BigDecimal tpHl2Jqr) 
+    {
+        this.tpHl2Jqr = tpHl2Jqr;
+    }
+
+    public BigDecimal getTpHl2Jqr() 
+    {
+        return tpHl2Jqr;
+    }
+    public void setNh31Jqr(BigDecimal nh31Jqr) 
+    {
+        this.nh31Jqr = nh31Jqr;
+    }
+
+    public BigDecimal getNh31Jqr() 
+    {
+        return nh31Jqr;
+    }
+    public void setNh32Jqr(BigDecimal nh32Jqr) 
+    {
+        this.nh32Jqr = nh32Jqr;
+    }
+
+    public BigDecimal getNh32Jqr() 
+    {
+        return nh32Jqr;
+    }
+    public void setDelFlag(Long delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public Long getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setRevision(Long revision) 
+    {
+        this.revision = revision;
+    }
+
+    public Long getRevision() 
+    {
+        return revision;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("testHour", getTestHour())
+            .append("no3Hlj1Jqr", getNo3Hlj1Jqr())
+            .append("no3Hlj2Jqr", getNo3Hlj2Jqr())
+            .append("no3Qyc1Jqr", getNo3Qyc1Jqr())
+            .append("no3Qyc2Jqr", getNo3Qyc2Jqr())
+            .append("tpRccJqr", getTpRccJqr())
+            .append("tpHl1Jqr", getTpHl1Jqr())
+            .append("tpHl2Jqr", getTpHl2Jqr())
+            .append("nh31Jqr", getNh31Jqr())
+            .append("nh32Jqr", getNh32Jqr())
+            .append("delFlag", getDelFlag())
+            .append("revision", getRevision())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 164 - 0
slibra-system/src/main/java/com/slibra/business/domain/XsyFeedback.java

@@ -0,0 +1,164 @@
+package com.slibra.business.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.slibra.common.annotation.Excel;
+import com.slibra.common.core.domain.BaseEntity;
+
+/**
+ * 【请填写功能名称】对象 xsy_feedback
+ * 
+ * @author slibra
+ * @date 2025-04-22
+ */
+public class XsyFeedback extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 当前时间 */
+    @Excel(name = "当前时间")
+    private String reqTime;
+
+    /** 后反馈设定目标最新更新时间 */
+    @Excel(name = "后反馈设定目标最新更新时间")
+    private String startTime;
+
+    /** 硝酸盐后反馈控制目标 */
+    @Excel(name = "硝酸盐后反馈控制目标")
+    private Long feedbackXsy;
+
+    /** 缺氧区出水硝酸盐+缺氧区出水氨氮-好氧区出水硝酸盐 */
+    @Excel(name = "缺氧区出水硝酸盐+缺氧区出水氨氮-好氧区出水硝酸盐")
+    private Long hyNh3;
+
+    /** 后反馈设定告警信息,好氧区出水氨氮<10 触发 */
+    @Excel(name = "后反馈设定告警信息,好氧区出水氨氮<10 触发")
+    private String warnings;
+
+    /** 历史数据 */
+    @Excel(name = "历史数据")
+    private String history;
+
+    /** 硝酸盐后反馈控制目标变化监控次数 */
+    @Excel(name = "硝酸盐后反馈控制目标变化监控次数")
+    private Long times;
+
+    /** 监控状态:与最新的硝酸盐后反馈控制目标比较标记 */
+    @Excel(name = "监控状态:与最新的硝酸盐后反馈控制目标比较标记")
+    private Long flag;
+
+    /** 记录变化过程信息 */
+    @Excel(name = "记录变化过程信息")
+    private String ext;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setReqTime(String reqTime) 
+    {
+        this.reqTime = reqTime;
+    }
+
+    public String getReqTime() 
+    {
+        return reqTime;
+    }
+    public void setStartTime(String startTime) 
+    {
+        this.startTime = startTime;
+    }
+
+    public String getStartTime() 
+    {
+        return startTime;
+    }
+    public void setFeedbackXsy(Long feedbackXsy) 
+    {
+        this.feedbackXsy = feedbackXsy;
+    }
+
+    public Long getFeedbackXsy() 
+    {
+        return feedbackXsy;
+    }
+    public void setHyNh3(Long hyNh3) 
+    {
+        this.hyNh3 = hyNh3;
+    }
+
+    public Long getHyNh3() 
+    {
+        return hyNh3;
+    }
+    public void setWarnings(String warnings) 
+    {
+        this.warnings = warnings;
+    }
+
+    public String getWarnings() 
+    {
+        return warnings;
+    }
+    public void setHistory(String history) 
+    {
+        this.history = history;
+    }
+
+    public String getHistory() 
+    {
+        return history;
+    }
+    public void setTimes(Long times) 
+    {
+        this.times = times;
+    }
+
+    public Long getTimes() 
+    {
+        return times;
+    }
+    public void setFlag(Long flag) 
+    {
+        this.flag = flag;
+    }
+
+    public Long getFlag() 
+    {
+        return flag;
+    }
+    public void setExt(String ext) 
+    {
+        this.ext = ext;
+    }
+
+    public String getExt() 
+    {
+        return ext;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("reqTime", getReqTime())
+            .append("updateTime", getUpdateTime())
+            .append("startTime", getStartTime())
+            .append("feedbackXsy", getFeedbackXsy())
+            .append("hyNh3", getHyNh3())
+            .append("warnings", getWarnings())
+            .append("history", getHistory())
+            .append("times", getTimes())
+            .append("flag", getFlag())
+            .append("ext", getExt())
+            .toString();
+    }
+}

+ 63 - 0
slibra-system/src/main/java/com/slibra/business/mapper/AutoFeedbackMapper.java

@@ -0,0 +1,63 @@
+package com.slibra.business.mapper;
+
+import java.util.List;
+import com.slibra.business.domain.AutoFeedback;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ * 
+ * @author slibra
+ * @date 2025-04-22
+ */
+public interface AutoFeedbackMapper 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public AutoFeedback selectAutoFeedbackById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param autoFeedback 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<AutoFeedback> selectAutoFeedbackList(AutoFeedback autoFeedback);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param autoFeedback 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertAutoFeedback(AutoFeedback autoFeedback);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param autoFeedback 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateAutoFeedback(AutoFeedback autoFeedback);
+
+    /**
+     * 删除【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteAutoFeedbackById(Long id);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteAutoFeedbackByIds(Long[] ids);
+
+    public int deleteAll();
+}

+ 63 - 0
slibra-system/src/main/java/com/slibra/business/mapper/TJlPredictMapper.java

@@ -0,0 +1,63 @@
+package com.slibra.business.mapper;
+
+import java.util.List;
+import com.slibra.business.domain.TJlPredict;
+
+/**
+ * 机理预测配置Mapper接口
+ * 
+ * @author slibra
+ * @date 2025-04-22
+ */
+public interface TJlPredictMapper 
+{
+    /**
+     * 查询机理预测配置
+     * 
+     * @param id 机理预测配置主键
+     * @return 机理预测配置
+     */
+    public TJlPredict selectTJlPredictById(Long id);
+
+    /**
+     * 查询机理预测配置列表
+     * 
+     * @param tJlPredict 机理预测配置
+     * @return 机理预测配置集合
+     */
+    public List<TJlPredict> selectTJlPredictList(TJlPredict tJlPredict);
+
+    /**
+     * 新增机理预测配置
+     * 
+     * @param tJlPredict 机理预测配置
+     * @return 结果
+     */
+    public int insertTJlPredict(TJlPredict tJlPredict);
+
+    /**
+     * 修改机理预测配置
+     * 
+     * @param tJlPredict 机理预测配置
+     * @return 结果
+     */
+    public int updateTJlPredict(TJlPredict tJlPredict);
+
+    /**
+     * 删除机理预测配置
+     * 
+     * @param id 机理预测配置主键
+     * @return 结果
+     */
+    public int deleteTJlPredictById(Long id);
+
+    /**
+     * 批量删除机理预测配置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteTJlPredictByIds(Long[] ids);
+
+    public int deleteAll();
+}

+ 63 - 0
slibra-system/src/main/java/com/slibra/business/mapper/XsyFeedbackMapper.java

@@ -0,0 +1,63 @@
+package com.slibra.business.mapper;
+
+import java.util.List;
+import com.slibra.business.domain.XsyFeedback;
+
+/**
+ * 【请填写功能名称】Mapper接口
+ * 
+ * @author slibra
+ * @date 2025-04-22
+ */
+public interface XsyFeedbackMapper 
+{
+    /**
+     * 查询【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public XsyFeedback selectXsyFeedbackById(Long id);
+
+    /**
+     * 查询【请填写功能名称】列表
+     * 
+     * @param xsyFeedback 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<XsyFeedback> selectXsyFeedbackList(XsyFeedback xsyFeedback);
+
+    /**
+     * 新增【请填写功能名称】
+     * 
+     * @param xsyFeedback 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertXsyFeedback(XsyFeedback xsyFeedback);
+
+    /**
+     * 修改【请填写功能名称】
+     * 
+     * @param xsyFeedback 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateXsyFeedback(XsyFeedback xsyFeedback);
+
+    /**
+     * 删除【请填写功能名称】
+     * 
+     * @param id 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteXsyFeedbackById(Long id);
+
+    /**
+     * 批量删除【请填写功能名称】
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteXsyFeedbackByIds(Long[] ids);
+
+    public int deleteAll();
+}

+ 4 - 3
slibra-system/src/main/java/com/slibra/business/service/IFrontService.java

@@ -1,15 +1,14 @@
 package com.slibra.business.service;
 
 import com.alibaba.fastjson2.JSONObject;
-import com.slibra.business.domain.TXinyiChatRecord;
-import com.slibra.business.domain.TXinyiRecommendQa;
-import com.slibra.business.domain.TXinyiWarningRecord;
+import com.slibra.business.domain.*;
 import com.slibra.business.req.ChatReq;
 import com.slibra.business.req.WorkOrderReq;
 import com.slibra.business.res.*;
 
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 /**
  * 信义日报数据Service接口
@@ -51,4 +50,6 @@ public interface IFrontService
     SmartAdd smartAddDataInfo();
 
     Map<String, List<ChartBasic>> smartAddCharList(int type, String timeBegin, String timeEnd);
+
+    List<AutoFeedback> configPredict(List<TJlPredict> tJlPredicts);
 }

+ 34 - 0
slibra-system/src/main/java/com/slibra/business/service/impl/FrontServiceImpl.java

@@ -21,6 +21,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.connection.stream.RecordId;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
 
 import java.math.BigDecimal;
@@ -29,6 +30,7 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 
 import static com.slibra.common.constant.MyConstants.*;
 import static com.slibra.common.enums.BusinessEnum.BigModelBizEnum.DECISION_REPORT;
@@ -66,6 +68,15 @@ public class FrontServiceImpl implements IFrontService {
     @Autowired
     private TXinyiForecastComparisonMapper xinyiForecastComparisonMapper;
 
+    @Autowired
+    private AutoFeedbackMapper autoFeedbackMapper;
+
+    @Autowired
+    private TJlPredictMapper jlPredictMapper;
+
+    @Autowired
+    private XsyFeedbackMapper xsyFeedbackMapper;
+
     @Override
     public XinyiIndustrySimple countInfo() {
         //查询基本的工业库数据
@@ -495,6 +506,29 @@ public class FrontServiceImpl implements IFrontService {
         return result;
     }
 
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public List<AutoFeedback> configPredict(List<TJlPredict> tJlPredicts) {
+        if(CollectionUtils.isEmpty(tJlPredicts))
+            throw new ServiceException("必须输入至少一条数据");
+        //先清除2个表
+        autoFeedbackMapper.deleteAll();
+        jlPredictMapper.deleteAll();
+        xsyFeedbackMapper.deleteAll();
+        //再保存数据
+        for (TJlPredict tJlPredict : tJlPredicts) {
+            jlPredictMapper.insertTJlPredict(tJlPredict);
+        }
+        //休眠2分钟
+        try {
+            TimeUnit.MINUTES.sleep(2);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+        //查询新结果 并返回
+        return autoFeedbackMapper.selectAutoFeedbackList(null);
+    }
+
     private void buildIndustryData(TXinyiIndustry industry, WorkOrderRes workOrderRes, WorkOrderReq workOrderReq) {
         if(workOrderReq.getJsSlq())
             workOrderRes.setJsSlq(DecimalUtils.getAbsAndScale(industry.getJsSlq(), 2));

+ 110 - 0
slibra-system/src/main/resources/mapper/business/AutoFeedbackMapper.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.slibra.business.mapper.AutoFeedbackMapper">
+    
+    <resultMap type="AutoFeedback" id="AutoFeedbackResult">
+        <result property="id"    column="id"    />
+        <result property="reqTime"    column="req_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="feedbackType"    column="feedback_type"    />
+        <result property="basePara"    column="base_para"    />
+        <result property="controlCoef"    column="control_coef"    />
+        <result property="cate"    column="cate"    />
+        <result property="subcate"    column="subcate"    />
+        <result property="coef"    column="coef"    />
+        <result property="cf"    column="cf"    />
+        <result property="ext"    column="ext"    />
+    </resultMap>
+
+    <sql id="selectAutoFeedbackVo">
+        select id, req_time, update_time, feedback_type, base_para, control_coef, cate, subcate, coef, cf, ext from auto_feedback
+    </sql>
+
+    <select id="selectAutoFeedbackList" parameterType="AutoFeedback" resultMap="AutoFeedbackResult">
+        <include refid="selectAutoFeedbackVo"/>
+        <where>
+            1 = 1
+            <if test="reqTime != null  and reqTime != ''"> and req_time = #{reqTime}</if>
+            <if test="feedbackType != null  and feedbackType != ''"> and feedback_type = #{feedbackType}</if>
+            <if test="basePara != null "> and base_para = #{basePara}</if>
+            <if test="controlCoef != null "> and control_coef = #{controlCoef}</if>
+            <if test="cate != null "> and cate = #{cate}</if>
+            <if test="subcate != null "> and subcate = #{subcate}</if>
+            <if test="coef != null "> and coef = #{coef}</if>
+            <if test="cf != null  and cf != ''"> and cf = #{cf}</if>
+            <if test="ext != null  and ext != ''"> and ext = #{ext}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
+    
+    <select id="selectAutoFeedbackById" parameterType="Long" resultMap="AutoFeedbackResult">
+        <include refid="selectAutoFeedbackVo"/>
+        where id = #{id} and del_flag = 0
+    </select>
+        
+    <insert id="insertAutoFeedback" parameterType="AutoFeedback" useGeneratedKeys="true" keyProperty="id">
+        insert into auto_feedback
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="reqTime != null">req_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="feedbackType != null">feedback_type,</if>
+            <if test="basePara != null">base_para,</if>
+            <if test="controlCoef != null">control_coef,</if>
+            <if test="cate != null">cate,</if>
+            <if test="subcate != null">subcate,</if>
+            <if test="coef != null">coef,</if>
+            <if test="cf != null">cf,</if>
+            <if test="ext != null">ext,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="reqTime != null">#{reqTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="feedbackType != null">#{feedbackType},</if>
+            <if test="basePara != null">#{basePara},</if>
+            <if test="controlCoef != null">#{controlCoef},</if>
+            <if test="cate != null">#{cate},</if>
+            <if test="subcate != null">#{subcate},</if>
+            <if test="coef != null">#{coef},</if>
+            <if test="cf != null">#{cf},</if>
+            <if test="ext != null">#{ext},</if>
+         </trim>
+    </insert>
+
+    <update id="updateAutoFeedback" parameterType="AutoFeedback">
+        update auto_feedback
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="reqTime != null">req_time = #{reqTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="feedbackType != null">feedback_type = #{feedbackType},</if>
+            <if test="basePara != null">base_para = #{basePara},</if>
+            <if test="controlCoef != null">control_coef = #{controlCoef},</if>
+            <if test="cate != null">cate = #{cate},</if>
+            <if test="subcate != null">subcate = #{subcate},</if>
+            <if test="coef != null">coef = #{coef},</if>
+            <if test="cf != null">cf = #{cf},</if>
+            <if test="ext != null">ext = #{ext},</if>
+        </trim>
+        ,revision = revision + 1
+        where id = #{id}
+    </update>
+
+    
+
+    <delete id="deleteAutoFeedbackById" parameterType="Long">
+       delete from auto_feedback where id = #{id}
+    </delete>
+
+    <delete id="deleteAutoFeedbackByIds" parameterType="String">
+        update auto_feedback set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <delete id="deleteAll" >
+        <!--truncate table auto_feedback -->
+        delete from auto_feedback
+    </delete>
+</mapper>

+ 140 - 0
slibra-system/src/main/resources/mapper/business/TJlPredictMapper.xml

@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.slibra.business.mapper.TJlPredictMapper">
+    
+    <resultMap type="TJlPredict" id="TJlPredictResult">
+        <result property="id"    column="id"    />
+        <result property="testHour"    column="TEST_HOUR"    />
+        <result property="no3Hlj1Jqr"    column="NO3_HLJ1_JQR"    />
+        <result property="no3Hlj2Jqr"    column="NO3_HLJ2_JQR"    />
+        <result property="no3Qyc1Jqr"    column="NO3_QYC_1_JQR"    />
+        <result property="no3Qyc2Jqr"    column="NO3_QYC_2_JQR"    />
+        <result property="tpRccJqr"    column="TP_RCC_JQR"    />
+        <result property="tpHl1Jqr"    column="TP_HL1_JQR"    />
+        <result property="tpHl2Jqr"    column="TP_HL2_JQR"    />
+        <result property="nh31Jqr"    column="NH3_1_JQR"    />
+        <result property="nh32Jqr"    column="NH3_2_JQR"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="revision"    column="revision"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectTJlPredictVo">
+        select id, TEST_HOUR, NO3_HLJ1_JQR, NO3_HLJ2_JQR, NO3_QYC_1_JQR, NO3_QYC_2_JQR, TP_RCC_JQR, TP_HL1_JQR, TP_HL2_JQR, NH3_1_JQR, NH3_2_JQR, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_jl_predict
+    </sql>
+
+    <select id="selectTJlPredictList" parameterType="TJlPredict" resultMap="TJlPredictResult">
+        <include refid="selectTJlPredictVo"/>
+        <where>
+            1 = 1
+            <if test="testHour != null  and testHour != ''"> and TEST_HOUR = #{testHour}</if>
+            <if test="no3Hlj1Jqr != null "> and NO3_HLJ1_JQR = #{no3Hlj1Jqr}</if>
+            <if test="no3Hlj2Jqr != null "> and NO3_HLJ2_JQR = #{no3Hlj2Jqr}</if>
+            <if test="no3Qyc1Jqr != null "> and NO3_QYC_1_JQR = #{no3Qyc1Jqr}</if>
+            <if test="no3Qyc2Jqr != null "> and NO3_QYC_2_JQR = #{no3Qyc2Jqr}</if>
+            <if test="tpRccJqr != null "> and TP_RCC_JQR = #{tpRccJqr}</if>
+            <if test="tpHl1Jqr != null "> and TP_HL1_JQR = #{tpHl1Jqr}</if>
+            <if test="tpHl2Jqr != null "> and TP_HL2_JQR = #{tpHl2Jqr}</if>
+            <if test="nh31Jqr != null "> and NH3_1_JQR = #{nh31Jqr}</if>
+            <if test="nh32Jqr != null "> and NH3_2_JQR = #{nh32Jqr}</if>
+            <if test="revision != null "> and revision = #{revision}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
+    
+    <select id="selectTJlPredictById" parameterType="Long" resultMap="TJlPredictResult">
+        <include refid="selectTJlPredictVo"/>
+        where id = #{id} and del_flag = 0
+    </select>
+        
+    <insert id="insertTJlPredict" parameterType="TJlPredict" useGeneratedKeys="true" keyProperty="id">
+        insert into t_jl_predict
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="testHour != null">TEST_HOUR,</if>
+            <if test="no3Hlj1Jqr != null">NO3_HLJ1_JQR,</if>
+            <if test="no3Hlj2Jqr != null">NO3_HLJ2_JQR,</if>
+            <if test="no3Qyc1Jqr != null">NO3_QYC_1_JQR,</if>
+            <if test="no3Qyc2Jqr != null">NO3_QYC_2_JQR,</if>
+            <if test="tpRccJqr != null">TP_RCC_JQR,</if>
+            <if test="tpHl1Jqr != null">TP_HL1_JQR,</if>
+            <if test="tpHl2Jqr != null">TP_HL2_JQR,</if>
+            <if test="nh31Jqr != null">NH3_1_JQR,</if>
+            <if test="nh32Jqr != null">NH3_2_JQR,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="revision != null">revision,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="testHour != null">#{testHour},</if>
+            <if test="no3Hlj1Jqr != null">#{no3Hlj1Jqr},</if>
+            <if test="no3Hlj2Jqr != null">#{no3Hlj2Jqr},</if>
+            <if test="no3Qyc1Jqr != null">#{no3Qyc1Jqr},</if>
+            <if test="no3Qyc2Jqr != null">#{no3Qyc2Jqr},</if>
+            <if test="tpRccJqr != null">#{tpRccJqr},</if>
+            <if test="tpHl1Jqr != null">#{tpHl1Jqr},</if>
+            <if test="tpHl2Jqr != null">#{tpHl2Jqr},</if>
+            <if test="nh31Jqr != null">#{nh31Jqr},</if>
+            <if test="nh32Jqr != null">#{nh32Jqr},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="revision != null">#{revision},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTJlPredict" parameterType="TJlPredict">
+        update t_jl_predict
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="testHour != null">TEST_HOUR = #{testHour},</if>
+            <if test="no3Hlj1Jqr != null">NO3_HLJ1_JQR = #{no3Hlj1Jqr},</if>
+            <if test="no3Hlj2Jqr != null">NO3_HLJ2_JQR = #{no3Hlj2Jqr},</if>
+            <if test="no3Qyc1Jqr != null">NO3_QYC_1_JQR = #{no3Qyc1Jqr},</if>
+            <if test="no3Qyc2Jqr != null">NO3_QYC_2_JQR = #{no3Qyc2Jqr},</if>
+            <if test="tpRccJqr != null">TP_RCC_JQR = #{tpRccJqr},</if>
+            <if test="tpHl1Jqr != null">TP_HL1_JQR = #{tpHl1Jqr},</if>
+            <if test="tpHl2Jqr != null">TP_HL2_JQR = #{tpHl2Jqr},</if>
+            <if test="nh31Jqr != null">NH3_1_JQR = #{nh31Jqr},</if>
+            <if test="nh32Jqr != null">NH3_2_JQR = #{nh32Jqr},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="revision != null">revision = #{revision},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        ,revision = revision + 1
+        where id = #{id}
+    </update>
+
+    
+
+    <delete id="deleteTJlPredictById" parameterType="Long">
+        update t_jl_predict set del_flag = 2,revision = revision + 1 where del_flag = 0 and id = #{id}
+    </delete>
+
+    <delete id="deleteTJlPredictByIds" parameterType="String">
+        update t_jl_predict set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <delete id="deleteAll" >
+        <!-- truncate table  t_jl_predict -->
+        delete from t_jl_predict
+    </delete>
+</mapper>

+ 110 - 0
slibra-system/src/main/resources/mapper/business/XsyFeedbackMapper.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.slibra.business.mapper.XsyFeedbackMapper">
+    
+    <resultMap type="XsyFeedback" id="XsyFeedbackResult">
+        <result property="id"    column="id"    />
+        <result property="reqTime"    column="req_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="startTime"    column="start_time"    />
+        <result property="feedbackXsy"    column="feedback_xsy"    />
+        <result property="hyNh3"    column="hy_nh3"    />
+        <result property="warnings"    column="warnings"    />
+        <result property="history"    column="history"    />
+        <result property="times"    column="times"    />
+        <result property="flag"    column="flag"    />
+        <result property="ext"    column="ext"    />
+    </resultMap>
+
+    <sql id="selectXsyFeedbackVo">
+        select id, req_time, update_time, start_time, feedback_xsy, hy_nh3, warnings, history, times, flag, ext from xsy_feedback
+    </sql>
+
+    <select id="selectXsyFeedbackList" parameterType="XsyFeedback" resultMap="XsyFeedbackResult">
+        <include refid="selectXsyFeedbackVo"/>
+        <where>
+            1 = 1
+            <if test="reqTime != null  and reqTime != ''"> and req_time = #{reqTime}</if>
+            <if test="startTime != null  and startTime != ''"> and start_time = #{startTime}</if>
+            <if test="feedbackXsy != null "> and feedback_xsy = #{feedbackXsy}</if>
+            <if test="hyNh3 != null "> and hy_nh3 = #{hyNh3}</if>
+            <if test="warnings != null  and warnings != ''"> and warnings = #{warnings}</if>
+            <if test="history != null  and history != ''"> and history = #{history}</if>
+            <if test="times != null "> and times = #{times}</if>
+            <if test="flag != null "> and flag = #{flag}</if>
+            <if test="ext != null  and ext != ''"> and ext = #{ext}</if>
+        </where>
+        and del_flag = 0 order by id desc
+    </select>
+    
+    <select id="selectXsyFeedbackById" parameterType="Long" resultMap="XsyFeedbackResult">
+        <include refid="selectXsyFeedbackVo"/>
+        where id = #{id} and del_flag = 0
+    </select>
+        
+    <insert id="insertXsyFeedback" parameterType="XsyFeedback" useGeneratedKeys="true" keyProperty="id">
+        insert into xsy_feedback
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="reqTime != null">req_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="feedbackXsy != null">feedback_xsy,</if>
+            <if test="hyNh3 != null">hy_nh3,</if>
+            <if test="warnings != null">warnings,</if>
+            <if test="history != null">history,</if>
+            <if test="times != null">times,</if>
+            <if test="flag != null">flag,</if>
+            <if test="ext != null">ext,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="reqTime != null">#{reqTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="feedbackXsy != null">#{feedbackXsy},</if>
+            <if test="hyNh3 != null">#{hyNh3},</if>
+            <if test="warnings != null">#{warnings},</if>
+            <if test="history != null">#{history},</if>
+            <if test="times != null">#{times},</if>
+            <if test="flag != null">#{flag},</if>
+            <if test="ext != null">#{ext},</if>
+         </trim>
+    </insert>
+
+    <update id="updateXsyFeedback" parameterType="XsyFeedback">
+        update xsy_feedback
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="reqTime != null">req_time = #{reqTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="feedbackXsy != null">feedback_xsy = #{feedbackXsy},</if>
+            <if test="hyNh3 != null">hy_nh3 = #{hyNh3},</if>
+            <if test="warnings != null">warnings = #{warnings},</if>
+            <if test="history != null">history = #{history},</if>
+            <if test="times != null">times = #{times},</if>
+            <if test="flag != null">flag = #{flag},</if>
+            <if test="ext != null">ext = #{ext},</if>
+        </trim>
+        ,revision = revision + 1
+        where id = #{id}
+    </update>
+
+    
+
+    <delete id="deleteXsyFeedbackById" parameterType="Long">
+        delete from xsy_feedback whereid = #{id}
+    </delete>
+
+    <delete id="deleteXsyFeedbackByIds" parameterType="String">
+        update xsy_feedback set del_flag = 2,revision = revision + 1 where del_flag = 0 and id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <delete id="deleteAll" >
+        <!-- truncate table xsy_feedback -->
+        delete from xsy_feedback
+     </delete>
+ </mapper>