From 7ee99bde8ece66d31f4297e1ae0cb6792065c481 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期三, 06 八月 2025 11:07:50 +0800
Subject: [PATCH] 1、生成灌溉模型计算模块; 2、生成灌溉模型计算需要的数据库表与实体(作物、作物计算参数)。

---
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/config/WebListenerConfiguration.java |   29 ++
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application-self.yml                               |   18 +
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdParamMapper.java                          |   22 +
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/config/WebFilterConfiguration.java   |   45 +++
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java                          |   22 +
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml                                         |  137 +++++++++
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application.yml                                    |    3 
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/log4j2.yml                                         |   80 +++++
 pipIrr-platform/pipIrr-web/pom.xml                                                                                |    3 
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdParam.java                               |   70 +++++
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/modelCalculate/ModelListener.java    |   85 ++++++
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdCrops.java                               |  114 ++++++++
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application(233服务器).yml                            |    3 
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/modelCalculate/CalculateJob.java     |   33 ++
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdParamMapper.xml                                         |  102 +++++++
 pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml                                           |   17 
 pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application(121服务器).yml                            |    3 
 17 files changed, 781 insertions(+), 5 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java
new file mode 100644
index 0000000..3d75fd7
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdCropsMapper.java
@@ -0,0 +1,22 @@
+package com.dy.pipIrrGlobal.daoMd;
+
+import com.dy.pipIrrGlobal.pojoMd.MdCrops;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/8/6 10:51
+ * @Description
+ */
+public interface MdCropsMapper {
+    int deleteByPrimaryKey(Long id);
+
+    int insert(MdCrops record);
+
+    int insertSelective(MdCrops record);
+
+    MdCrops selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(MdCrops record);
+
+    int updateByPrimaryKey(MdCrops record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdParamMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdParamMapper.java
new file mode 100644
index 0000000..0c7f4a7
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoMd/MdParamMapper.java
@@ -0,0 +1,22 @@
+package com.dy.pipIrrGlobal.daoMd;
+
+import com.dy.pipIrrGlobal.pojoMd.MdParam;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/8/6 10:51
+ * @Description
+ */
+public interface MdParamMapper {
+    int deleteByPrimaryKey(Long id);
+
+    int insert(MdParam record);
+
+    int insertSelective(MdParam record);
+
+    MdParam selectByPrimaryKey(Long id);
+
+    int updateByPrimaryKeySelective(MdParam record);
+
+    int updateByPrimaryKey(MdParam record);
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdCrops.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdCrops.java
new file mode 100644
index 0000000..ed2f16c
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdCrops.java
@@ -0,0 +1,114 @@
+package com.dy.pipIrrGlobal.pojoMd;
+
+import java.util.Date;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/8/6 10:51
+ * @Description
+ */
+public class MdCrops {
+    /**
+    * 涓婚敭
+    */
+    private Long id;
+
+    /**
+    * 浣滅墿鍚嶇О
+    */
+    private String name;
+
+    /**
+    * 璁$畻寮�濮嬫棩鏈燂紙涓�骞寸敓浣滅墿鏄妞嶆椂闂存垨鍑鸿娊鏃堕棿锛夛紝濡傛灉涓虹┖鍊煎垯涓洪暱涔呰绠楋紝鏍煎紡yyyy-mm-dd
+    */
+    private Date startDt;
+
+    /**
+    * 璁$畻鎴鏃ユ湡锛堜竴骞寸敓浣滅墿鏄仠姝㈢亴婧夋椂闂达級锛屽鏋滀负绌哄�煎垯涓洪暱涔呰绠楋紝鏍煎紡yyyy-mm-dd
+    */
+    private Date endDt;
+
+    /**
+    * 鏄惁鍋滄璁$畻锛�1鏄紝0鍚�
+    */
+    private Byte stopped;
+
+    /**
+    * 澶囨敞
+    */
+    private String remarks;
+
+    /**
+    * 鏁版嵁璁板綍鍒涘缓鏃ユ湡锛屾牸寮弝yyy-mm-dd hh:mm:ss
+    */
+    private Date createDt;
+
+    /**
+    * 鏄惁鍒犻櫎锛�1鏄紝0鍚�
+    */
+    private Byte deleted;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Date getStartDt() {
+        return startDt;
+    }
+
+    public void setStartDt(Date startDt) {
+        this.startDt = startDt;
+    }
+
+    public Date getEndDt() {
+        return endDt;
+    }
+
+    public void setEndDt(Date endDt) {
+        this.endDt = endDt;
+    }
+
+    public Byte getStopped() {
+        return stopped;
+    }
+
+    public void setStopped(Byte stopped) {
+        this.stopped = stopped;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public Date getCreateDt() {
+        return createDt;
+    }
+
+    public void setCreateDt(Date createDt) {
+        this.createDt = createDt;
+    }
+
+    public Byte getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(Byte deleted) {
+        this.deleted = deleted;
+    }
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdParam.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdParam.java
new file mode 100644
index 0000000..b557d54
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoMd/MdParam.java
@@ -0,0 +1,70 @@
+package com.dy.pipIrrGlobal.pojoMd;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/8/6 10:51
+ * @Description
+ */
+public class MdParam {
+    /**
+    * 涓婚敭
+    */
+    private Long id;
+
+    private Long cropsId;
+
+    /**
+    * 鍙傛暟鍚嶇О
+    */
+    private String name;
+
+    /**
+    * 鍙傛暟鍊�
+    */
+    private Double value;
+
+    /**
+    * 鍙傛暟鍚箟
+    */
+    private String sense;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCropsId() {
+        return cropsId;
+    }
+
+    public void setCropsId(Long cropsId) {
+        this.cropsId = cropsId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Double getValue() {
+        return value;
+    }
+
+    public void setValue(Double value) {
+        this.value = value;
+    }
+
+    public String getSense() {
+        return sense;
+    }
+
+    public void setSense(String sense) {
+        this.sense = sense;
+    }
+}
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml b/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
index f1ca69d..d0ca35d 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/application-global.yml
@@ -118,10 +118,6 @@
         webPort: 8083
         actutorPort: 9083
         idSuffix: 5
-    demo:
-        webPort: 8000
-        actutorPort: 9000
-        idSuffix: 99
     sell:
         webPort: 8084
         actutorPort: 9084
@@ -150,11 +146,19 @@
         webPort: 8090
         actutorPort: 9090
         idSuffix: 12
+    model:
+        webPort: 8091
+        actutorPort: 9091
+        idSuffix: 13
     # 2023-10-24鏂板锛岀敤浜庢墽琛屼复鏃朵换鍔★紝渚嬪鍒犻櫎鏁版嵁搴撲腑涓婁簺鍑洪敊鐨勬暟鎹�
     temp:
         webPort: 8099
         actutorPort: 9099
         idSuffix: 98
+    demo:
+        webPort: 8000
+        actutorPort: 9000
+        idSuffix: 99
 
     # 鍒嗗竷寮弚eb鏂囦欢绯荤粺
     file:
@@ -394,6 +398,11 @@
     startHour: 0 #寮�濮嬪皬鏃讹紝蹇呴』鏄�0鐐规垨涔嬪悗锛屽彇鍊艰寖鍥存槸0~5锛屽惁StatisticsListener涓嚜鍔ㄨ缃垚0
     startMinute: 5 #寮�濮嬪垎閽� 5
 
+#妯″瀷璁$畻閰嶇疆锛屾ā鍨嬭绠楀畾鏃朵换鍔′細姣忓ぉ瀹氭椂杩涜
+model-calculate:
+    startHour: 0 #寮�濮嬪皬鏃讹紝蹇呴』鏄�0鐐规垨涔嬪悗锛屽彇鍊艰寖鍥存槸0~5锛屽惁ModelListener涓嚜鍔ㄨ缃垚0
+    startMinute: 10 #寮�濮嬪垎閽� 10
+
 #閽夐拤娑堟伅鎺ㄩ��
 dingtalk:
     ym:
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml
new file mode 100644
index 0000000..20d6f6d
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdCropsMapper.xml
@@ -0,0 +1,137 @@
+<?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.dy.pipIrrGlobal.daoMd.MdCropsMapper">
+  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoMd.MdCrops">
+    <!--@mbg.generated-->
+    <!--@Table md_crops-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="start_dt" jdbcType="DATE" property="startDt" />
+    <result column="end_dt" jdbcType="DATE" property="endDt" />
+    <result column="stopped" jdbcType="TINYINT" property="stopped" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="create_dt" jdbcType="TIMESTAMP" property="createDt" />
+    <result column="deleted" jdbcType="TINYINT" property="deleted" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, `name`, start_dt, end_dt, stopped, remarks, create_dt, deleted
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    <!--@mbg.generated-->
+    select 
+    <include refid="Base_Column_List" />
+    from md_crops
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    <!--@mbg.generated-->
+    delete from md_crops
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops">
+    <!--@mbg.generated-->
+    insert into md_crops (id, `name`, start_dt, 
+      end_dt, stopped, remarks, 
+      create_dt, deleted)
+    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{startDt,jdbcType=DATE}, 
+      #{endDt,jdbcType=DATE}, #{stopped,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}, 
+      #{createDt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops">
+    <!--@mbg.generated-->
+    insert into md_crops
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="name != null">
+        `name`,
+      </if>
+      <if test="startDt != null">
+        start_dt,
+      </if>
+      <if test="endDt != null">
+        end_dt,
+      </if>
+      <if test="stopped != null">
+        stopped,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="createDt != null">
+        create_dt,
+      </if>
+      <if test="deleted != null">
+        deleted,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="startDt != null">
+        #{startDt,jdbcType=DATE},
+      </if>
+      <if test="endDt != null">
+        #{endDt,jdbcType=DATE},
+      </if>
+      <if test="stopped != null">
+        #{stopped,jdbcType=TINYINT},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="createDt != null">
+        #{createDt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=TINYINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops">
+    <!--@mbg.generated-->
+    update md_crops
+    <set>
+      <if test="name != null">
+        `name` = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="startDt != null">
+        start_dt = #{startDt,jdbcType=DATE},
+      </if>
+      <if test="endDt != null">
+        end_dt = #{endDt,jdbcType=DATE},
+      </if>
+      <if test="stopped != null">
+        stopped = #{stopped,jdbcType=TINYINT},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="createDt != null">
+        create_dt = #{createDt,jdbcType=TIMESTAMP},
+      </if>
+      <if test="deleted != null">
+        deleted = #{deleted,jdbcType=TINYINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoMd.MdCrops">
+    <!--@mbg.generated-->
+    update md_crops
+    set `name` = #{name,jdbcType=VARCHAR},
+      start_dt = #{startDt,jdbcType=DATE},
+      end_dt = #{endDt,jdbcType=DATE},
+      stopped = #{stopped,jdbcType=TINYINT},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      create_dt = #{createDt,jdbcType=TIMESTAMP},
+      deleted = #{deleted,jdbcType=TINYINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdParamMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdParamMapper.xml
new file mode 100644
index 0000000..10b32b0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/MdParamMapper.xml
@@ -0,0 +1,102 @@
+<?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.dy.pipIrrGlobal.daoMd.MdParamMapper">
+  <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoMd.MdParam">
+    <!--@mbg.generated-->
+    <!--@Table md_param-->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="crops_id" jdbcType="BIGINT" property="cropsId" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="value" jdbcType="FLOAT" property="value" />
+    <result column="sense" jdbcType="VARCHAR" property="sense" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    <!--@mbg.generated-->
+    id, crops_id, `name`, `value`, sense
+  </sql>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    <!--@mbg.generated-->
+    select 
+    <include refid="Base_Column_List" />
+    from md_param
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    <!--@mbg.generated-->
+    delete from md_param
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoMd.MdParam">
+    <!--@mbg.generated-->
+    insert into md_param (id, crops_id, `name`, 
+      `value`, sense)
+    values (#{id,jdbcType=BIGINT}, #{cropsId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, 
+      #{value,jdbcType=FLOAT}, #{sense,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoMd.MdParam">
+    <!--@mbg.generated-->
+    insert into md_param
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="cropsId != null">
+        crops_id,
+      </if>
+      <if test="name != null">
+        `name`,
+      </if>
+      <if test="value != null">
+        `value`,
+      </if>
+      <if test="sense != null">
+        sense,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="cropsId != null">
+        #{cropsId,jdbcType=BIGINT},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="value != null">
+        #{value,jdbcType=FLOAT},
+      </if>
+      <if test="sense != null">
+        #{sense,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoMd.MdParam">
+    <!--@mbg.generated-->
+    update md_param
+    <set>
+      <if test="cropsId != null">
+        crops_id = #{cropsId,jdbcType=BIGINT},
+      </if>
+      <if test="name != null">
+        `name` = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="value != null">
+        `value` = #{value,jdbcType=FLOAT},
+      </if>
+      <if test="sense != null">
+        sense = #{sense,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoMd.MdParam">
+    <!--@mbg.generated-->
+    update md_param
+    set crops_id = #{cropsId,jdbcType=BIGINT},
+      `name` = #{name,jdbcType=VARCHAR},
+      `value` = #{value,jdbcType=FLOAT},
+      sense = #{sense,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>
\ No newline at end of file
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/config/WebFilterConfiguration.java b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/config/WebFilterConfiguration.java
new file mode 100644
index 0000000..35ee0db
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/config/WebFilterConfiguration.java
@@ -0,0 +1,45 @@
+package com.dy.pipIrrModel.config;
+
+import com.dy.common.webFilter.DevOfDataSourceNameSetFilter;
+import com.dy.common.webFilter.UserTokenFilter;
+import jakarta.servlet.Filter;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class WebFilterConfiguration {
+
+    @Value("${pipIrr.global.dev}")
+    public String isDevStage ;//鏄惁涓哄紑鍙戦樁娈�
+    @Value("${pipIrr.global.dsName}")
+    public String dsName ;//寮�鍙戦樁娈电殑鏁版嵁婧愬悕绉�
+
+    /**
+     * DevOfDataSourceNameSetFilter涓嶶serTokenFilter鍙兘涓�涓閰嶇疆涓婏紝
+     * 鎵�浠ヤ粬浠殑order閮芥槸1
+     */
+    private static final int order_UserTokenFilter = 1 ;//涓庝笅闈�
+    private static final int order_DevOfDataSourceNameSetFilter = 1 ;
+
+
+    @Bean
+    public FilterRegistrationBean<? extends Filter> RegFilter() {
+        FilterRegistrationBean<Filter> filterRegistrationBean = new FilterRegistrationBean<>();
+        if(this.isDevStage != null && !this.isDevStage.trim().equals("") && this.isDevStage.trim().equalsIgnoreCase("true")){
+            filterRegistrationBean.setFilter(new DevOfDataSourceNameSetFilter());
+            filterRegistrationBean.addUrlPatterns("/*");//閰嶇疆杩囨护瑙勫垯
+            filterRegistrationBean.addInitParameter("dataSourceName",dsName);//璁剧疆init鍙傛暟
+            filterRegistrationBean.setName("DevOfDataSourceNameSetFilter");//璁剧疆杩囨护鍣ㄥ悕绉�
+            filterRegistrationBean.setOrder(order_DevOfDataSourceNameSetFilter);//鎵ц娆″簭
+        }else{
+            filterRegistrationBean.setFilter(new UserTokenFilter());
+            filterRegistrationBean.addUrlPatterns("/*");//閰嶇疆杩囨护瑙勫垯
+            filterRegistrationBean.setName("UserTokenFilter");//璁剧疆杩囨护鍣ㄥ悕绉�
+            filterRegistrationBean.setOrder(order_UserTokenFilter);//鎵ц娆″簭
+        }
+        return filterRegistrationBean;
+    }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/config/WebListenerConfiguration.java b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/config/WebListenerConfiguration.java
new file mode 100644
index 0000000..32479c7
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/config/WebListenerConfiguration.java
@@ -0,0 +1,29 @@
+package com.dy.pipIrrModel.config;
+
+import com.dy.common.webListener.GenerateIdSetSuffixListener;
+import jakarta.servlet.ServletContextListener;
+import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class WebListenerConfiguration {
+
+    /**
+     * 鍚姩椤哄簭
+     */
+    private static final int order_idSetSuffix = 1 ;
+
+    /**
+     * 鍐呴儴鎻愪緵listener锛岃listener鍦ㄧ郴缁熷惎鍔ㄦ椂锛屾牴鎹厤缃� 璁剧疆ID浜х敓鍣ㄧ殑鍚庣紑
+     * @return 娉ㄥ唽Bean
+     */
+    @Bean
+    public ServletListenerRegistrationBean<? extends ServletContextListener> regSsoListener() {
+        ServletListenerRegistrationBean<GenerateIdSetSuffixListener> listenerRegistrationBean = new ServletListenerRegistrationBean<>();
+        listenerRegistrationBean.setListener(new GenerateIdSetSuffixListener());
+        listenerRegistrationBean.setOrder(order_idSetSuffix);
+        return listenerRegistrationBean;
+    }
+
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/modelCalculate/CalculateJob.java b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/modelCalculate/CalculateJob.java
new file mode 100644
index 0000000..1545162
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/modelCalculate/CalculateJob.java
@@ -0,0 +1,33 @@
+package com.dy.pipIrrModel.modelCalculate;
+
+import com.dy.common.multiDataSource.DataSourceContext;
+import com.dy.common.schedulerTask.TaskJob;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.quartz.JobDataMap;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/8/6 9:32
+ * @Description
+ */
+public class CalculateJob extends TaskJob {
+
+    private static Logger log = LogManager.getLogger(CalculateJob.class.getName()) ;
+
+    private String orgTag ;
+
+    @Override
+    public void execute(JobExecutionContext ctx) throws JobExecutionException {
+        JobDataMap jobDataMap = ctx.getJobDetail().getJobDataMap() ;
+        if(jobDataMap != null){
+            orgTag = (String)jobDataMap.get(ModelListener.orgKey) ;
+        }
+        if(orgTag == null){
+            return ;
+        }
+        DataSourceContext.set(orgTag);//璁剧疆鏁版嵁婧�
+    }
+}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/modelCalculate/ModelListener.java b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/modelCalculate/ModelListener.java
new file mode 100644
index 0000000..24f4bec
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/java/com/dy/pipIrrModel/modelCalculate/ModelListener.java
@@ -0,0 +1,85 @@
+package com.dy.pipIrrModel.modelCalculate;
+
+import com.dy.common.schedulerTask.SchedulerTaskSupport;
+import com.dy.pipIrrGlobal.util.Org;
+import com.dy.pipIrrGlobal.util.OrgListenerSupport;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.context.event.ApplicationReadyEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.lang.NonNull;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * @Author: liurunyu
+ * @Date: 2025/8/6 9:32
+ * @Description
+ * 浣滅墿钂歌吘鑷姩璁$畻
+ */
+@Slf4j
+@Component
+public class ModelListener extends OrgListenerSupport implements ApplicationListener<ApplicationReadyEvent> {
+
+    protected static final String orgKey = "tag" ;
+    private static final String JobName = "modelCalculateJob" ;
+    private static final String JobGroupName = "modelCalculateGroup" ;
+    private static final Integer ThreadPoolMaxCount = 1 ;//绾跨▼姹犵嚎绋嬫渶澶т釜鏁�
+    private static final Integer ThreadPoolPriority = 5 ;//绾跨▼浼樺厛绾�
+
+    /**
+     * 璁$畻寮�濮嬪皬鏃讹紝蹇呴』0鐐规垨涔嬪悗锛岃autoCalculateJob涓绠楋紝鎵�鐢ㄦ暟鎹槸鏄ㄥぉ鐨�
+     */
+    @Value("${model-calculate.startHour: 0}")
+    protected Integer startHour;//璁$畻寮�濮嬫椂鍒�--灏忔椂
+
+    @Value("${model-calculate.startMinute: 10}")
+    protected Integer startMinute;//璁$畻寮�濮嬫椂鍒�--鍒嗛挓
+
+    @Autowired
+    protected ResourceLoader resourceLoader ;
+
+    /**
+     * SpringBoot瀹瑰櫒宸茬粡鍑嗗濂戒簡锛屾墽琛屼笅闈㈡柟娉�
+     * @param event 浜嬩欢
+     */
+    @Override
+    public void onApplicationEvent(@NonNull ApplicationReadyEvent event) {
+        try {
+            //绛�1绉掞紝绛夊緟com.alibaba.druid.pool.DruidDataSource鍒濆鍖栧畬鎴�
+            Thread.sleep(1000L);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }finally {
+            try{
+                super.init(resourceLoader);
+                this.start(event);
+            }catch (Exception e){
+                log.error("娉ㄥ唽妯″瀷璁$畻瀹氭椂浠诲姟鍑洪敊", e);
+            }
+
+        }
+    }
+    /**
+     * 鍒濆鍖�
+     */
+    private void start(ApplicationReadyEvent event) throws Exception{
+        if(startHour < 0 || startHour > 5){
+            startHour = 0 ;
+        }
+        List<Org.OrgVo> orgList = Org.OrgList ;
+        if(orgList != null && orgList.size() >0){
+            SchedulerTaskSupport.setThreadPoolPro(ThreadPoolMaxCount * orgList.size(), ThreadPoolPriority);
+            for(Org.OrgVo vo : orgList){
+                HashMap<String , Object> jobDataMap	= new HashMap<String , Object>() ;
+                jobDataMap.put(orgKey, vo.tag) ;
+                SchedulerTaskSupport.addDailyJob(JobName + vo.tag, JobGroupName, CalculateJob.class, jobDataMap, startHour, startMinute ) ;
+                //SchedulerTaskSupport.addSecondlyJob(JobName + vo.tag, JobGroupName, TestJob.class, jobDataMap, 10, 10000, 0 ) ;
+            }
+        }
+    }
+}
diff --git "a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application\050121\346\234\215\345\212\241\345\231\250\051.yml" "b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application\050121\346\234\215\345\212\241\345\231\250\051.yml"
new file mode 100644
index 0000000..20fc4d0
--- /dev/null
+++ "b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application\050121\346\234\215\345\212\241\345\231\250\051.yml"
@@ -0,0 +1,3 @@
+spring:
+    profiles:
+        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, database-jyg, self
diff --git "a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application\050233\346\234\215\345\212\241\345\231\250\051.yml" "b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application\050233\346\234\215\345\212\241\345\231\250\051.yml"
new file mode 100644
index 0000000..a24b0b5
--- /dev/null
+++ "b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application\050233\346\234\215\345\212\241\345\231\250\051.yml"
@@ -0,0 +1,3 @@
+spring:
+    profiles:
+        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application-self.yml b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application-self.yml
new file mode 100644
index 0000000..4427df6
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application-self.yml
@@ -0,0 +1,18 @@
+spring:
+    devtools:
+        livereload:
+            enabled: false
+        restart:
+            enabled: false #绂佺敤鐑儴缃�
+#actutor鐨剋eb绔彛
+management:
+    server:
+        port: ${pipIrr.model.actutorPort}
+#web鏈嶅姟绔彛锛宼omcat榛樿鏄�8080
+server:
+    port: ${pipIrr.model.webPort}
+    servlet:
+        context-path: /model #web璁块棶涓婁笅鏂囪矾寰�
+        context-parameters:
+            #GenerateIdSetSuffixListener涓簲鐢紝鍙栧�艰寖鍥存槸0-99
+            idSuffix: ${pipIrr.model.idSuffix}
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application.yml b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application.yml
new file mode 100644
index 0000000..a24b0b5
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/application.yml
@@ -0,0 +1,3 @@
+spring:
+    profiles:
+        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/log4j2.yml b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/log4j2.yml
new file mode 100644
index 0000000..c67cbd0
--- /dev/null
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-model/src/main/resources/log4j2.yml
@@ -0,0 +1,80 @@
+Configuration:
+    #status锛岃繖涓敤浜庤缃甽og4j2鑷韩鍐呴儴鐨勪俊鎭緭鍑猴紝鍙互涓嶈缃紝褰撹缃垚trace鏃讹紝浣犱細鐪嬪埌log4j2鍐呴儴鍚勭璇︾粏杈撳嚭锛涘彲浠ヨ缃垚Off(鍏抽棴)鎴朎rror(鍙緭鍑洪敊璇俊鎭�)
+    status: Error
+
+    Properties: # 瀹氫箟鍏ㄥ眬鍙橀噺
+        Property:
+            #鏃ュ織鏂囦欢瀛樺偍鐨勭洰褰�
+            - name: log.path
+              value: ./logs
+            #鏃ュ織鏂囦欢瀛樺偍鍚嶇О
+            - name: project.name
+              value: pipIrrModel
+
+    #瀹氫箟杈撳嚭鍣紝鍙互杈撳嚭鍒版帶鍒跺彴鍜屾枃浠�.
+    Appenders:
+        #杈撳嚭鍒版帶鍒跺彴
+        Console:
+            #Appender鍛藉悕
+            name: CONSOLE
+            target: SYSTEM_OUT
+            ThresholdFilter:
+                level: debug #杈撳嚭鏃ュ織绾у埆锛岃緭鍑烘棩蹇楁椂锛岄鍏堢敱Loggers.Root.level鎴朙oggers.Logger.level鍒ゆ柇鏄惁杈撳嚭锛岀劧鍚庡啀鐢辨湰level鍒ゆ柇鏄惁杈撳嚭
+                onMatch: ACCEPT #onMatch=ACCEPT 澶т簬绛変簬 "level" 閰嶇疆鐨勭瓑绾у湴鏃ュ織杈撳嚭
+                onMismatch: DENY #onMismatch=DENY 灏忎簬 "level" 閰嶇疆鐨勭瓑绾у湴鏃ュ織涓嶈緭鍑�
+            #鏃ュ織鍐呭鏍峰紡
+            PatternLayout:
+                #%n-鎹㈣
+                #%m-鏃ュ織鍐呭锛岃緭鍑轰唬鐮佷腑鎸囧畾鐨勬棩蹇椾俊鎭�
+                #%p-杈撳嚭浼樺厛绾э紝鍗矰EBUG,INFO,WARN,ERROR,FATAL
+                #%r-绋嬪簭鍚姩鍒扮幇鍦ㄧ殑姣鏁�
+                #%%- 杈撳嚭涓�涓�"%" 瀛楃
+                #%t-褰撳墠绾跨▼鍚�
+                #%d-鏃ユ湡鍜屾椂闂�, 甯哥敤鐨勬牸寮忔湁%d{DATE},%d{ABSOLUTE},%d{HH:mm:ss,SSS},%d{ddMMyyyyHH:mm:ss,SSS}
+                #%l-鍚�%F%L%C%M
+                #%F-java婧愭枃浠跺悕
+                #%L-java婧愮爜琛屾暟
+                #%C-java绫诲悕,%C{1}杈撳嚭鏈�鍚庝竴涓厓绱�
+                #%M-java鏂规硶鍚�
+                pattern: "%d{yyyy-MM-dd HH:mm:ss,SSS}:%4p %t (%C.%M:%L) - %m%n"
+        # 杈撳嚭鍒版枃浠讹紝瓒呰繃10MB褰掓。
+        RollingFile:
+          - name: ROLLING_FILE
+            ignoreExceptions: false
+            fileName: ${log.path}/${project.name}.log
+            filePattern: "${log.path}/${project.name}-%d{yyyy-MM-dd}-%i.log.gz"
+            ThresholdFilter:
+              level: error #杈撳嚭鏃ュ織绾у埆锛岃緭鍑烘棩蹇楁椂锛岄鍏堢敱Loggers.Root.level鎴朙oggers.Logger.level鍒ゆ柇鏄惁杈撳嚭锛岀劧鍚庡啀鐢辨湰level鍒ゆ柇鏄惁杈撳嚭
+              onMatch: ACCEPT #onMatch=ACCEPT 澶т簬绛変簬 "level" 閰嶇疆鐨勭瓑绾у湴鏃ュ織杈撳嚭
+              onMismatch: DENY #onMismatch=DENY 灏忎簬 "level" 閰嶇疆鐨勭瓑绾у湴鏃ュ織涓嶈緭鍑�
+            #鏃ュ織鍐呭鏍峰紡
+            PatternLayout:
+              pattern: "%d{yyyy-MM-dd HH:mm:ss,SSS}:%4p %t (%C.%M:%L) - %m%n"
+            Policies:
+              # 姣忓ぉ鏃ュ織鏂囦欢鎸夊ぇ灏忓垎瀛愭枃浠�
+              SizeBasedTriggeringPolicy:
+                size: "1 MB"
+            DefaultRolloverStrategy:
+              max: 10  #涓�澶╁唴鏃ュ織鏂囦欢鏈�澶т釜鏁�
+              Delete:
+                basePath: "${log.path}"
+                maxDepth: 2 #鍒犻櫎鏃ュ織鏂囦欢鐨勬渶澶ф繁搴�
+                IfFileName:
+                  glob: "${project.name}-%d{yyyy-MM-dd}-%i.log.gz"
+                IfLastModified:
+                  age: "30d" #鏃ュ織鏂囦欢淇濈暀鐨勬渶澶уぉ鏁�
+    Loggers:
+        Root:
+            level: info #鏃ュ織杈撳嚭绾у埆锛屽叡鏈�8涓骇鍒紝鎸夌収浠庝綆鍒伴珮涓猴細all < trace < debug < info < warn < error < fatal < off
+            AppenderRef: #Root鐨勫瓙鑺傜偣锛岀敤鏉ユ寚瀹氳鏃ュ織杈撳嚭鍒板摢涓狝ppender.
+                - ref: CONSOLE #杈撳嚭鏃ュ織鏃讹紝棣栧厛鐢辨湰level鍒ゆ柇鏄惁杈撳嚭锛岀劧鍚庡啀鐢变笂闈㈢殑Appenders.Console.ThresholdFilter.level鍒ゆ柇鏄惁杈撳嚭
+                - ref: ROLLING_FILE  #杈撳嚭鏃ュ織鏃讹紝棣栧厛鐢辨湰level鍒ゆ柇鏄惁杈撳嚭锛岀劧鍚庡啀鐢变笂闈㈢殑Appenders.RollingFile.ThresholdFilter.level鍒ゆ柇鏄惁杈撳嚭
+        # 涓哄寘閰嶇疆鐗规畩鐨凩og绾у埆锛屾柟渚胯皟璇曪紝
+        # 涓嶅彈Loggers.Root.level闄愬埗
+        Logger:
+          - name: org.apache.dubbo
+            additivity: false #鍘婚櫎閲嶅鐨刲og
+            level: error #杈撳嚭鏃ュ織绾у埆
+            AppenderRef:
+              - ref: CONSOLE #杈撳嚭鏃ュ織鏃讹紝棣栧厛鐢辨湰.level鍒ゆ柇鏄惁杈撳嚭锛岀劧鍚庡啀鐢变笂闈㈢殑Appenders.Console.ThresholdFilter.level鍒ゆ柇鏄惁杈撳嚭
+              - ref: ROLLING_FILE #杈撳嚭鏃ュ織鏃讹紝棣栧厛鐢辨湰level鍒ゆ柇鏄惁杈撳嚭锛岀劧鍚庡啀鐢变笂闈㈢殑Appenders.RollingFile.ThresholdFilter.level鍒ゆ柇鏄惁杈撳嚭
diff --git a/pipIrr-platform/pipIrr-web/pom.xml b/pipIrr-platform/pipIrr-web/pom.xml
index f5a1345..12acacb 100644
--- a/pipIrr-platform/pipIrr-web/pom.xml
+++ b/pipIrr-platform/pipIrr-web/pom.xml
@@ -31,8 +31,9 @@
         <module>pipIrr-web-app</module>
         <module>pipIrr-web-operation</module>
         <module>pipIrr-web-file</module>
-        <module>pipIrr-web-temp</module>
         <module>pipIrr-web-terminal</module>
+        <module>pipIrr-web-model</module>
+        <module>pipIrr-web-temp</module>
     </modules>
 
     <dependencies>

--
Gitblit v1.8.0