liurunyu
3 天以前 fcc1cf275578bd3aa08ef50c6a611fb206b7aac9
1、实现参数设置模块pipIrr-param-set;
2、相关模块配置文件适应性调整。
32个文件已修改
22个文件已添加
1764 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-global/src/main/resources/application-common-mw.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-common-web.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/config.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/.gitattributes 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/.gitignore 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/.mvn/wrapper/maven-wrapper.properties 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/mvnw 259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/mvnw.cmd 149 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/pom.xml 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/PipIrrParamSetApplication.java 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/Server.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/ServerProperties.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/console/Command.java 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/console/CommandConsole.java 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/paramSet/ParamKey.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/paramSet/ParamSet.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/paramSet/ParamSetMw.java 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/paramSet/ParamSetWeb.java 223 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/util/FileUtil.java 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/resources/application-params.yml 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/resources/application-self.yml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/resources/application.yml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/resources/log4j2.xml 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/test/java/com/dy/pipIrrParamSet/PipIrrParamSetApplicationTests.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-param-set/说明.txt 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-file/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-file/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/resources/application(121服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/resources/application(233服务器).yml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-global/src/main/resources/application-common-mw.yml
@@ -26,4 +26,4 @@
  #   gz: pipIrr_gz
  #   lz: pipIrr_lz
  #   jc: pipIrr_jc
  spring_datasource_url_dbname: pipIrr_ym
  spring_datasource_url_dbname: pipIrr_ym #数据库名称
pipIrr-platform/pipIrr-global/src/main/resources/application-common-web.yml
@@ -8,4 +8,4 @@
  #      å­—段money意为剩余金额,当为true时统一设置值为10000
  # 233服务器:false
  # 121服务器:true
  virtual_card_set_default: false
  virtual_card_set_default: false
pipIrr-platform/pipIrr-global/src/main/resources/init-config.xml
@@ -255,4 +255,4 @@
            </taskType>
        </org4>
    </orgs>
</config>
</config>
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/resources/config.properties
@@ -26,6 +26,6 @@
#   é‡‘川: 60105
tcp.port=60000
#RTU上行数据最小间隔,大于这个间隔认为设备离线了,测控一体阀是3,表阀一体机是6
#RTU上行数据最小间隔,大于这个间隔认为设备离线了,测控一体阀是3,表阀一体机是6,默认采用时间最长的6
base.upData.min.interval=6
pipIrr-platform/pipIrr-mw/pipIrr-param-set/.gitattributes
New file
@@ -0,0 +1,2 @@
/mvnw text eol=lf
*.cmd text eol=crlf
pipIrr-platform/pipIrr-mw/pipIrr-param-set/.gitignore
New file
@@ -0,0 +1,33 @@
HELP.md
target/
.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
pipIrr-platform/pipIrr-mw/pipIrr-param-set/.mvn/wrapper/maven-wrapper.properties
New file
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
pipIrr-platform/pipIrr-mw/pipIrr-param-set/mvnw
New file
@@ -0,0 +1,259 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Apache Maven Wrapper startup batch script, version 3.3.2
#
# Optional ENV vars
# -----------------
#   JAVA_HOME - location of a JDK home dir, required when download maven via java source
#   MVNW_REPOURL - repo url base for downloading maven distribution
#   MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
#   MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
# ----------------------------------------------------------------------------
set -euf
[ "${MVNW_VERBOSE-}" != debug ] || set -x
# OS specific support.
native_path() { printf %s\\n "$1"; }
case "$(uname)" in
CYGWIN* | MINGW*)
  [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
  native_path() { cygpath --path --windows "$1"; }
  ;;
esac
# set JAVACMD and JAVACCMD
set_java_home() {
  # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
  if [ -n "${JAVA_HOME-}" ]; then
    if [ -x "$JAVA_HOME/jre/sh/java" ]; then
      # IBM's JDK on AIX uses strange locations for the executables
      JAVACMD="$JAVA_HOME/jre/sh/java"
      JAVACCMD="$JAVA_HOME/jre/sh/javac"
    else
      JAVACMD="$JAVA_HOME/bin/java"
      JAVACCMD="$JAVA_HOME/bin/javac"
      if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
        echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
        echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
        return 1
      fi
    fi
  else
    JAVACMD="$(
      'set' +e
      'unset' -f command 2>/dev/null
      'command' -v java
    )" || :
    JAVACCMD="$(
      'set' +e
      'unset' -f command 2>/dev/null
      'command' -v javac
    )" || :
    if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
      echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
      return 1
    fi
  fi
}
# hash string like Java String::hashCode
hash_string() {
  str="${1:-}" h=0
  while [ -n "$str" ]; do
    char="${str%"${str#?}"}"
    h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
    str="${str#?}"
  done
  printf %x\\n $h
}
verbose() { :; }
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
die() {
  printf %s\\n "$1" >&2
  exit 1
}
trim() {
  # MWRAPPER-139:
  #   Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
  #   Needed for removing poorly interpreted newline sequences when running in more
  #   exotic environments such as mingw bash on Windows.
  printf "%s" "${1}" | tr -d '[:space:]'
}
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
while IFS="=" read -r key value; do
  case "${key-}" in
  distributionUrl) distributionUrl=$(trim "${value-}") ;;
  distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
  esac
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
case "${distributionUrl##*/}" in
maven-mvnd-*bin.*)
  MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
  case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
  *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
  :Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
  :Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
  :Linux*x86_64*) distributionPlatform=linux-amd64 ;;
  *)
    echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
    distributionPlatform=linux-amd64
    ;;
  esac
  distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
  ;;
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
esac
# apply MVNW_REPOURL and calculate MAVEN_HOME
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
distributionUrlName="${distributionUrl##*/}"
distributionUrlNameMain="${distributionUrlName%.*}"
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
exec_maven() {
  unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
  exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
}
if [ -d "$MAVEN_HOME" ]; then
  verbose "found existing MAVEN_HOME at $MAVEN_HOME"
  exec_maven "$@"
fi
case "${distributionUrl-}" in
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
esac
# prepare tmp dir
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
  clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
  trap clean HUP INT TERM EXIT
else
  die "cannot create temp dir"
fi
mkdir -p -- "${MAVEN_HOME%/*}"
# Download and Install Apache Maven
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
verbose "Downloading from: $distributionUrl"
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
# select .zip or .tar.gz
if ! command -v unzip >/dev/null; then
  distributionUrl="${distributionUrl%.zip}.tar.gz"
  distributionUrlName="${distributionUrl##*/}"
fi
# verbose opt
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
# normalize http auth
case "${MVNW_PASSWORD:+has-password}" in
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
esac
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
  verbose "Found wget ... using wget"
  wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
  verbose "Found curl ... using curl"
  curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
elif set_java_home; then
  verbose "Falling back to use Java to download"
  javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
  targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
  cat >"$javaSource" <<-END
    public class Downloader extends java.net.Authenticator
    {
      protected java.net.PasswordAuthentication getPasswordAuthentication()
      {
        return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
      }
      public static void main( String[] args ) throws Exception
      {
        setDefault( new Downloader() );
        java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
      }
    }
    END
  # For Cygwin/MinGW, switch paths to Windows format before running javac and java
  verbose " - Compiling Downloader.java ..."
  "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
  verbose " - Running Downloader.java ..."
  "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
fi
# If specified, validate the SHA-256 sum of the Maven distribution zip file
if [ -n "${distributionSha256Sum-}" ]; then
  distributionSha256Result=false
  if [ "$MVN_CMD" = mvnd.sh ]; then
    echo "Checksum validation is not supported for maven-mvnd." >&2
    echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
    exit 1
  elif command -v sha256sum >/dev/null; then
    if echo "$distributionSha256Sum  $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
      distributionSha256Result=true
    fi
  elif command -v shasum >/dev/null; then
    if echo "$distributionSha256Sum  $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
      distributionSha256Result=true
    fi
  else
    echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
    echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
    exit 1
  fi
  if [ $distributionSha256Result = false ]; then
    echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
    echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
    exit 1
  fi
fi
# unzip and move
if command -v unzip >/dev/null; then
  unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
else
  tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
fi
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
clean || :
exec_maven "$@"
pipIrr-platform/pipIrr-mw/pipIrr-param-set/mvnw.cmd
New file
@@ -0,0 +1,149 @@
<# : batch portion
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements.  See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership.  The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License.  You may obtain a copy of the License at
@REM
@REM    http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied.  See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Apache Maven Wrapper startup batch script, version 3.3.2
@REM
@REM Optional ENV vars
@REM   MVNW_REPOURL - repo url base for downloading maven distribution
@REM   MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
@REM   MVNW_VERBOSE - true: enable verbose log; others: silence the output
@REM ----------------------------------------------------------------------------
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
@SET __MVNW_CMD__=
@SET __MVNW_ERROR__=
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
@SET PSModulePath=
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
  IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
)
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
@SET __MVNW_PSMODULEP_SAVE=
@SET __MVNW_ARG0_NAME__=
@SET MVNW_USERNAME=
@SET MVNW_PASSWORD=
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
@echo Cannot start maven from wrapper >&2 && exit /b 1
@GOTO :EOF
: end batch / begin powershell #>
$ErrorActionPreference = "Stop"
if ($env:MVNW_VERBOSE -eq "true") {
  $VerbosePreference = "Continue"
}
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
if (!$distributionUrl) {
  Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
}
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
  "maven-mvnd-*" {
    $USE_MVND = $true
    $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
    $MVN_CMD = "mvnd.cmd"
    break
  }
  default {
    $USE_MVND = $false
    $MVN_CMD = $script -replace '^mvnw','mvn'
    break
  }
}
# apply MVNW_REPOURL and calculate MAVEN_HOME
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
if ($env:MVNW_REPOURL) {
  $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" }
  $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')"
}
$distributionUrlName = $distributionUrl -replace '^.*/',''
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
if ($env:MAVEN_USER_HOME) {
  $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
}
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
  Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
  Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
  exit $?
}
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
  Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
}
# prepare tmp dir
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
trap {
  if ($TMP_DOWNLOAD_DIR.Exists) {
    try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
    catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
  }
}
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
# Download and Install Apache Maven
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
Write-Verbose "Downloading from: $distributionUrl"
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
$webclient = New-Object System.Net.WebClient
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
  $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
}
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
# If specified, validate the SHA-256 sum of the Maven distribution zip file
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
if ($distributionSha256Sum) {
  if ($USE_MVND) {
    Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
  }
  Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
  if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
    Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
  }
}
# unzip and move
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null
try {
  Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
} catch {
  if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
    Write-Error "fail to move MAVEN_HOME"
  }
} finally {
  try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
  catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
}
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
pipIrr-platform/pipIrr-mw/pipIrr-param-set/pom.xml
New file
@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>pipIrr-mw</artifactId>
        <groupId>com.dy</groupId>
        <version>1.0.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <packaging>jar</packaging>
    <artifactId>pipIrr-param-set</artifactId>
    <version>1.0.0</version>
    <name>pipIrr-param-set</name>
    <description>模块参数设置器</description>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-json</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- åŠ¨æ€åŠ è½½æ–°ç¼–è¯‘çš„ç±» -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>2.0.7</version>
        </dependency>
        <!-- æµ‹è¯• -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!-- ç”Ÿæˆä¸åŒ…含依赖jar的可执行jar包
            <plugin>
                !- spring boot提供的maven打包插件 -
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        !-
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                        -
                        <configuration>
                            !- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar  -
                            <classifier>execute</classifier>
                            !- ä¸æŒ‡å®šç”Ÿæˆè·¯å¾„的话, é»˜è®¤ä¿å­˜åœ¨ ${build.directory} ä¸‹ -
                            <outputDirectory>${project.build.directory}/execute</outputDirectory>
                            <finalName>${artifactId}-${version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrBase.PipIrrBaseApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            -->
            <!-- æ‹·è´ä¾èµ–çš„jar包到lib目录-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <configuration>
                            <!-- ä¸åŠ çš„è¯æœ€ç»ˆåŒ…åä¸º: ${artifactId}-${version}.jar, åŠ äº†çš„è¯æœ€ç»ˆåŒ…å: ${artifactId}-${version}-${classifier}.jar
                            <classifier>execute</classifier>
                            -->
                            <!-- ${project.build.directory}是maven变量,内置的,表示target目录,如果不写,将在根目录下创建/lib -->
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <!-- excludeTransitive:是否不包含间接依赖包,比如我们依赖A,但是A又依赖了B,我们是否也要把B打进去 é»˜è®¤ä¸æ‰“-->
                            <excludeTransitive>false</excludeTransitive>
                            <!-- å¤åˆ¶çš„jar文件去掉版本信息 -->
                            <stripVersion>false</stripVersion>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <layout>ZIP</layout>
                            <mainClass>com.dy.pipIrrParamSet.PipIrrParamSetApplication</mainClass>
                            <includes>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-common</artifactId>
                                </include>
                                <include>
                                    <groupId>com.dy</groupId>
                                    <artifactId>pipIrr-global</artifactId>
                                </include>
                            </includes>
                            <excludes>
                                <exclude>
                                    <groupId>org.projectlombok</groupId>
                                    <artifactId>lombok</artifactId>
                                </exclude>
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- è®¾ç½®java编译版本,运行环境版本 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!-- source: æºä»£ç ç¼–译版本;target: ç›®æ ‡å¹³å°ç¼–译版本;encoding: å­—符集编码。 -->
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- è§£å†³èµ„源文件的编码问题 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <encoding>${encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <!-- maven里执行测试用例的插件 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <!-- ä¸‹é¢è§£å†³ï¼šå½“进行Maven Lifecycle package时报错:Could not find artifact org.apache.mina:mina-core:bundle:2.2.1 in maven (https://repo1.maven.org/maven2/)-->
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>
    </build>
</project>
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/PipIrrParamSetApplication.java
New file
@@ -0,0 +1,103 @@
package com.dy.pipIrrParamSet;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;
/**
 * @Author: liurunyu
 * @Date: 2025/5/28 15:36
 * @Description
 */
@Slf4j
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) //禁止启动数据库连接池
@ComponentScan(basePackages = {"com.dy.common", "com.dy.pipIrrGlobal", "com.dy.pipIrrParamSet"},
        excludeFilters = {
                @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {
                        com.dy.common.apiDoc.SpringApiConfig.class, //一种排除类的方式
                        com.dy.pipIrrGlobal.config.DingTalk.class
                }),
                @ComponentScan.Filter(type = FilterType.REGEX, pattern = {
                        //二种排除类的方式,写正则表达式,需要对目标类的完全限定名完全匹配,否则不生效
                        "com.dy.common.aop..*",
                        "com.dy.common.apiDoc..*",
                        "com.dy.common.multiDataSource..*",
                        "com.dy.common.singleDataSource..*",
                        "com.dy.common.mybatis..*",
                        "com.dy.common.webFilter..*",
                        "com.dy.common.webListener..*",
                        "com.dy.pipIrrGlobal.config..*",
                        "com.dy.pipIrrGlobal.webCtrls..*"
                })
        }
)
public class PipIrrParamSetApplication implements CommandLineRunner {
    /**
     * å‚æ•°: è½¯ä»¶ç©ºé—´æ ¹ç›®å½•,例如:E:\javaWorkspaces\pipIrr\pipIrr-platform\
     * @param args
     */
    public static void main(String[] args) {
        parseArg(args) ;
        new SpringApplicationBuilder(PipIrrParamSetApplication.class)
                .web(WebApplicationType.NONE)//不启动web服务
                .run(args);
    }
    private static void parseArg(String[] args){
        if(args != null
                && args.length > 0
                && args[0] != null
                && !args[0].trim().equals("")){
            ServerProperties.WorkspaceRoot = args[0] ;
            if(!ServerProperties.WorkspaceRoot.endsWith("\\") && !ServerProperties.WorkspaceRoot.endsWith("/")){
                ServerProperties.WorkspaceRoot += "\\" ;
            }
            log.info("参数【软件空间根目录】:" + ServerProperties.WorkspaceRoot);
        }
    }
    /**
     * Spring容器启动完成后,执行下面方法
     * @param args å‚æ•°
     * @throws Exception å¼‚常
     */
    @Override
    public void run(String... args) throws Exception {
        try{
            //等待一下
            Thread.sleep(500L);
        }catch (Exception e){
            e.printStackTrace();
        }
        finally {
            this.startMwSv() ;
        }
    }
    private void startMwSv(){
        if(sv != null){
            try {
                sv.startServer();
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    }
    private Server sv ;
    @Autowired
    public void setSv(Server sv){
        this.sv = sv ;
    }
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/Server.java
New file
@@ -0,0 +1,35 @@
package com.dy.pipIrrParamSet;
import com.dy.pipIrrParamSet.console.CommandConsole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.io.Console;
/**
 * @Author: liurunyu
 * @Date: 2025/5/28 15:36
 * @Description
 */
@Component
public class Server {
    private CommandConsole mwConsole ;
    @Autowired
    public void setBean(CommandConsole console){
        this.mwConsole = console;
    }
    public void startServer() throws Exception{
        Console console = System.console();
        if (console == null) {
            throw new Exception("严重错误,未能得到控制台对象!");
        }
        mwConsole.init(console);
        boolean exit = mwConsole.execute() ;
        if(exit){
            System.exit(-1);
        }
    }
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/ServerProperties.java
New file
@@ -0,0 +1,12 @@
package com.dy.pipIrrParamSet;
/**
 * @Author: liurunyu
 * @Date: 2025/5/28 15:36
 * @Description
 */
public class ServerProperties {
    public static String WorkspaceRoot ;//软件空间根目录
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/console/Command.java
New file
@@ -0,0 +1,118 @@
package com.dy.pipIrrParamSet.console;
import com.dy.pipIrrParamSet.ServerProperties;
import com.dy.pipIrrParamSet.paramSet.ParamSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.io.PrintWriter;
/**
 * @Author: liurunyu
 * @Date: 2025/5/28 15:36
 * @Description
 */
@Component
@Scope("prototype")
public class Command {
    private static String[] commands ;
    static{
        commands = new String[]{
                "config æŸ¥çœ‹é…ç½®ä¿¡æ¯",
                "mw 121 [tag] å‘½ä»¤å«ä¹‰ï¼šé€šä¿¡ä¸­é—´ä»¶åœ¨äº‘服务器(121.199.41.121)上的[tag](元谋ym,沙盘sp测试test,梅江mj,民勤mq,延庆yq,黑龙江hlj,甘州gz,凉州lz,金川jc)系统配置",
                "mw 233 [tag] å‘½ä»¤å«ä¹‰ï¼šé€šä¿¡ä¸­é—´ä»¶åœ¨äº‘服务器(8.130.130.233)上的[tag](元谋ym,沙盘sp测试test,梅江mj,民勤mq,延庆yq,黑龙江hlj,甘州gz,凉州lz,金川jc)系统配置",
                "web 121 å‘½ä»¤å«ä¹‰ï¼šweb模块在云服务器(121.199.41.121)上的配置",
                "web 233 å‘½ä»¤å«ä¹‰ï¼šweb模块在云服务器(8.130.130.233)上的配置",
                "exit é€€å‡º",
        };
    }
    private PrintWriter prtWrt ;
    private String[] nowCom ;
    private ParamSet paramSet ;
    @Autowired
    public void setBean(ParamSet paramSet){
        this.paramSet = paramSet;
    }
    public boolean dealCommand(String comLine, PrintWriter prtWrt) throws Exception{
        this.prtWrt = prtWrt ;
        boolean exit = false ;
        comLine = comLine.trim() ;
        if (comLine.equals("help")) {
            outHelp();
        }else if (comLine.equals("config")) {
            outConfig();
        }else if(comLine.equals("exit")){
            exit = true ;
        }else if(isParamSetCom(comLine)){
            paramSet.dealCom(nowCom, this);
        }else {
            outNoIdentify();
        }
        return exit ;
    }
    public boolean isParamSetCom(String command){
        nowCom = null ;
        String[] inputs = command.split(" ");
        int count = 0 ;
        for (String in : inputs){
            if(!in.equals("")){
                count++ ;
            }
        }
        if(count > 0){
            nowCom = new String[count] ;
        }
        int index = 0 ;
        for (String in : inputs){
            if(!in.equals("")){
                nowCom[index++] = in ;
            }
        }
        return nowCom == null? false : (nowCom.length > 0 ? true : false) ;
    }
    public void out(String str){
        prtWrt.println(str==null?"":str);
        prtWrt.println("");
    }
    public void out1(String str){
        prtWrt.println(str==null?"":str);
    }
    private void outHelp(){
        prtWrt.println("命令");
        for(String s : commands){
            prtWrt.println("  " + s);
        }
        prtWrt.println("");
    }
    public void outConfig(){
        prtWrt.println("预先设置");
        prtWrt.println("  è½¯ä»¶ç©ºé—´æ ¹ç›®å½•:" + ServerProperties.WorkspaceRoot);
        prtWrt.println("");
    }
    public void outNoIdentify(){
        prtWrt.println("命令不可识别!");
        prtWrt.println("");
    }
    public void outNoParams(){
        prtWrt.println("请输入命令参数!");
        prtWrt.println("");
    }
    public static void main(String[] args) {
        String com = "   02 123       345          789";
        com = com.trim() ;
        String[] coms = com.split(" ");
        for(String s : coms){
            System.out.println(s);
        }
    }
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/console/CommandConsole.java
New file
@@ -0,0 +1,102 @@
package com.dy.pipIrrParamSet.console;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.io.Console;
import java.io.PrintWriter;
/**
 * @Author: liurunyu
 * @Date: 2025/5/28 15:36
 * @Description
 */
@Slf4j
@Component
@Scope("prototype")
public class CommandConsole {
    private Console console ;
    private PrintWriter prtWrt ;
    private static final String myPassword = "123456" ;
    private static final String commandPrefix1 = ">>" ;
    private static final String commandPrefix2 = "$: " ;
    private static String commandPrefix = commandPrefix1 + commandPrefix2 ;
    private Command command ;
    @Autowired
    public void setBean(Command command){
        this.command = command;
    }
    /**
     * åˆå§‹ï¼Œæ£€æŸ¥å¹¶è¾“出一些信息
     * @throws Exception
     */
    public void init(Console console) throws Exception{
        this.console = console ;
        if(this.console == null){
            throw new Exception("严重错误,java控制台对象为空!");
        }
        prtWrt = console.writer() ;
        prtWrt.println("----------------------------------------");
        prtWrt.println("--                                    --");
        prtWrt.println("--    æ¬¢è¿Žä½¿ç”¨å‚数配置器              --");
        prtWrt.println("--                                    --");
        prtWrt.println("----------------------------------------");
    }
    /**
     * æ‰§è¡ŒæŽ§åˆ¶å°æŽ§åˆ¶
     * @return
     */
    public boolean execute(){
        boolean exit = false ;
        try {
            this.login() ;
            exit = this.doConsole();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return exit ;
    }
    private boolean login(){
        while (true) {
            //String username = console.readLine(">>Username: ");
            char[] password = console.readPassword(">>Password: ");
            String passwordStr = String.valueOf(password) ;
            if (passwordStr.equals("help")) {
                console.printf("密码是%1$s\n", myPassword);
                // ä½¿ç”¨åŽåº”立即将数组清空,以减少其在内存中占用的时间,增强安全性
                password = null;
            } else if(passwordStr.equals(myPassword)){
                return true;
            }
        }
    }
    private boolean doConsole(){
        boolean exit = false ;
        while (!exit) {
            String inputLine = console.readLine(commandPrefix);
            try {
                exit = command.dealCommand(inputLine, prtWrt) ;
            }catch (Exception e){
                e.printStackTrace();
            }
        }
        return true;
    }
    public void changeCommandPrefix(String prefix){
        commandPrefix = commandPrefix1 + prefix ;
    }
    public void recoverCommandPrefix(){
        commandPrefix = commandPrefix1 + commandPrefix2 ;
    }
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/paramSet/ParamKey.java
New file
@@ -0,0 +1,36 @@
package com.dy.pipIrrParamSet.paramSet;
/**
 * @Author: liurunyu
 * @Date: 2025/5/29 9:57
 * @Description
 */
public class ParamKey {
    public static final String AbstractPathOfMGlobal= "pipIrr-global\\" ;
    public static final String AbstractPathOfMw = "pipIrr-mw\\pipIrr-mw-rtu\\" ;
    public static final String AbstractPathOfWeb = "pipIrr-web\\" ;
    public static final String AbstractPathOfResources = "src\\main\\resources\\" ;
    public static final String FileOfConfigProperties = "config.properties" ;
    public static final String FileOfApplicationCommonMwYml = "application-common-mw.yml" ;
    public static final String FileOfApplicationCommonWebYml_MainName = "application-common-web" ;
    public static final String FileOfApplicationCommonWebYml_ExeName = "yml" ;
    public static final String FileOfInitConfigXml_MainName = "init-config" ;
    public static final String FileOfInitConfigXml_ExeName = "xml" ;
    public static final String FileOfApplication_MainName = "application" ;
    public static final String FileOfApplication_ExeName = "yml" ;
    public static final String FileOfModelNamePre = "(" ;
    public static final String FileOfModelNameTail = "服务器)" ;
    public static final String OrgTag = "orgTag" ;
    public static final String TcpPort = "tcpPort" ;
    public static final String UpDataMinInterval = "upDataMinInterval" ;
    public static final String WebPort = "webPort" ;
    public static final String ActutorPort = "actutorPort" ;
    public static final String DbName = "dbName" ;
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/paramSet/ParamSet.java
New file
@@ -0,0 +1,55 @@
package com.dy.pipIrrParamSet.paramSet;
import com.dy.pipIrrParamSet.console.Command;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
/**
 * @Author: liurunyu
 * @Date: 2025/5/28 16:29
 * @Description
 */
@Slf4j
@Component
@Scope("prototype")
public class ParamSet {
    private Environment env ;
    private ParamSetMw paramSetMw ;
    private ParamSetWeb paramSetWeb ;
    @Autowired
    public void setBean(Environment env){
        this.env = env ;
    }
    @Autowired
    public void setBean(ParamSetMw paramSetMw){
        this.paramSetMw = paramSetMw ;
    }
    @Autowired
    public void setBean(ParamSetWeb paramSetWeb){
        this.paramSetWeb = paramSetWeb ;
    }
    public void dealCom(String[] comIn, Command command){
        if (comIn.length < 2) {
            command.outNoIdentify();
        }
        switch (comIn[0]) {
            case "mw" : {
                if (comIn.length != 3) {
                    command.outNoIdentify();
                }else{
                    this.paramSetMw.set(env, comIn, command);
                }
                break;
            }
            case "web" : {
                this.paramSetWeb.set(comIn, command);
                break;
            }
            default: command.outNoIdentify(); break;
        }
    }
 }
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/paramSet/ParamSetMw.java
New file
@@ -0,0 +1,170 @@
package com.dy.pipIrrParamSet.paramSet;
import com.dy.pipIrrParamSet.ServerProperties;
import com.dy.pipIrrParamSet.console.Command;
import com.dy.pipIrrParamSet.util.FileUtil;
import org.springframework.context.annotation.Scope;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @Author: liurunyu
 * @Date: 2025/5/29 13:43
 * @Description
 */
@Component
@Scope("prototype")
public class ParamSetMw {
    protected void set(Environment env, String[] comIn, Command command){
        String paramNamePre = "mw.sv" + comIn[1] + "." + comIn[2] + "." ;
        this.set(env, comIn, command, paramNamePre) ;
    }
    private void set(Environment env, String[] comIn, Command command, String paramNamePre){
        Map<String, String> paramMap = null ;
        try{
            paramMap = this.getConfigs(env, paramNamePre);
        }catch (Exception e){
            command.out(e.getMessage());
            paramMap = null ;
        }
        if(paramMap != null){
            boolean flag = this.setApplicationCommonMwYml(comIn, command, paramMap);
            if(flag){
                flag = this.setConfigProperties(comIn, command, paramMap);
            }
            if(flag){
                command.out("参数设置完成");
            }
        }
    }
    private boolean setApplicationCommonMwYml(String[] comIn, Command command, Map<String, String> paramMap){
        String filePath = ServerProperties.WorkspaceRoot
                + ParamKey.AbstractPathOfMGlobal
                + ParamKey.AbstractPathOfResources
                + ParamKey.FileOfApplicationCommonMwYml ;
        Path applicationCommonMwYmlPath = FileUtil.getFilePath(filePath) ;
        if(applicationCommonMwYmlPath == null){
            command.out("未找到配置文件" + filePath);
            return false ;
        }
        List<String> oldLines ;
        try{
            oldLines = FileUtil.readFile(applicationCommonMwYmlPath);
        }catch (Exception e){
            command.out("读取文件" + filePath + "发生异常:" + e.getMessage());
            return false ;
        }
        if(oldLines == null || oldLines.size() == 0){
            command.out("文件" + filePath + "是空文件");
            return false ;
        }else{
            List<String> newLines = new ArrayList<>();
            String newLine = null ;
            for(String line : oldLines){
                newLine = line ;
                if(newLine != null && newLine.trim().startsWith("pipIrr_mw_webPort")){
                    newLine = "  pipIrr_mw_webPort: " + paramMap.get(ParamKey.WebPort) + " #通信中间件中应用,不能在web模块系统中应用" ;
                }else if(newLine != null && newLine.trim().startsWith("pipIrr_mw_actutorPort")){
                    newLine = "  pipIrr_mw_actutorPort: " + paramMap.get(ParamKey.ActutorPort) + " #通信中间件中应用,不能在web模块系统中应用" ;
                }else if(newLine != null && newLine.trim().startsWith("spring_datasource_url_dbname")){
                    newLine = "  spring_datasource_url_dbname: " + paramMap.get(ParamKey.DbName) + " #数据库名称" ;
                }
                newLines.add(newLine);
            }
            if(newLines.size() > 0){
                try {
                    FileUtil.writeFile(applicationCommonMwYmlPath, newLines);
                }catch (Exception e){
                    command.out("写入文件" + filePath + "发生异常:" + e.getMessage());
                    return false ;
                }
            }
        }
        return true ;
    }
    private boolean setConfigProperties(String[] comIn, Command command, Map<String, String> paramMap){
        String filePath = ServerProperties.WorkspaceRoot
                + ParamKey.AbstractPathOfMw
                + ParamKey.AbstractPathOfResources
                + ParamKey.FileOfConfigProperties ;
        Path configPropertiesPath = FileUtil.getFilePath(filePath) ;
        if(configPropertiesPath == null){
            command.out("未找到配置文件" + filePath);
            return false ;
        }
        List<String> oldLines = null ;
        try{
            oldLines = FileUtil.readFile(configPropertiesPath);
        }catch (Exception e){
            command.out("读取文件" + filePath + "发生异常:" + e.getMessage());
            return false ;
        }
        if(oldLines == null || oldLines.size() == 0){
            command.out("文件" + filePath + "是空文件");
            return false ;
        }else{
            List<String> newLines = new ArrayList<>();
            String newLine = null ;
            for(String line : oldLines){
                newLine = line ;
                if(newLine != null && newLine.trim().startsWith("base.orgTag=")){
                    newLine = "base.orgTag=" + comIn[2] ;
                }else if(newLine != null && newLine.trim().startsWith("tcp.port=")){
                    newLine = "tcp.port=" + paramMap.get(ParamKey.TcpPort);
                }else if(newLine != null && newLine.trim().startsWith("base.upData.min.interval=")){
                    newLine = "base.upData.min.interval=" + paramMap.get(ParamKey.UpDataMinInterval);
                }
                newLines.add(newLine);
            }
            if(newLines.size() > 0){
                try {
                    FileUtil.writeFile(configPropertiesPath, newLines);
                }catch (Exception e){
                    command.out("写入文件" + filePath + "发生异常:" + e.getMessage());
                    return false ;
                }
            }
        }
        return true ;
    }
    private Map<String, String> getConfigs(Environment env, String paramNamePre) throws Exception{
        Map<String, String> map = new HashMap<>() ;
        String key = ParamKey.OrgTag;
        this.getConfig(env, map, paramNamePre + key, key);
        key = ParamKey.TcpPort;
        this.getConfig(env, map, paramNamePre + key, key);
        key = ParamKey.UpDataMinInterval;
        this.getConfig(env, map, paramNamePre + key, key);
        key = ParamKey.WebPort;
        this.getConfig(env, map, paramNamePre + key, key);
        key = ParamKey.ActutorPort;
        this.getConfig(env, map, paramNamePre + key, key);
        key = ParamKey.DbName;
        this.getConfig(env, map, paramNamePre + key, key);
        return map ;
    }
    private void getConfig(Environment env, Map<String, String> map, String paramName, String key) throws Exception{
        String paramValue = env.getProperty(paramName);
        if(paramValue == null){
            throw new Exception("参数设置器未配置" + paramName);
        }else{
            map.put(key, paramValue) ;
        }
    }
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/paramSet/ParamSetWeb.java
New file
@@ -0,0 +1,223 @@
package com.dy.pipIrrParamSet.paramSet;
import com.dy.pipIrrParamSet.ServerProperties;
import com.dy.pipIrrParamSet.console.Command;
import com.dy.pipIrrParamSet.util.FileUtil;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.io.File;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
/**
 * @Author: liurunyu
 * @Date: 2025/5/29 13:44
 * @Description
 */
@Component
@Scope("prototype")
public class ParamSetWeb {
    protected void set(String[] comIn, Command command){
        boolean flag = setApplicationCommonWebYml(comIn, command) ;
        if(flag){
            flag = setInitConfig(comIn, command) ;
            if(flag){
                List<File> webModules = this.getWebModules(comIn, command);
                if(webModules == null || webModules.size() == 0){
                    command.out("未得到任何web模块");
                }else{
                    /*
                    command.out1("发现web模块:");
                    for(File webModule : webModules){
                        command.out1("  " + webModule.getName());
                        command.out1("  " + webModule.getPath());
                    }
                    command.out1("");
                    */
                    Boolean banner = null ;
                    int countCancel = 0 ;
                    int countSuccess = 0 ;
                    int countFailure = 0 ;
                    for(File webModule : webModules){
                        banner = setWebModuleApplicationYml(comIn, command, webModule.getPath() + "\\") ;
                        if(banner == null){
                            countCancel ++ ;
                        }else if(banner.booleanValue()){
                            countSuccess ++ ;
                        }else if(!banner.booleanValue()){
                            countFailure ++ ;
                        }
                    }
                    command.out("参数设置完成,其中" + countSuccess + "个模块成功," + countFailure + "个模块失败," + countCancel + "个模块忽略");
                }
            }
        }
    }
    private boolean setApplicationCommonWebYml(String[] comIn, Command command){
        String filePath = ServerProperties.WorkspaceRoot
                + ParamKey.AbstractPathOfMGlobal
                + ParamKey.AbstractPathOfResources
                + ParamKey.FileOfApplicationCommonWebYml_MainName
                + "."
                + ParamKey.FileOfApplicationCommonWebYml_ExeName ;
        String modelFilePath = ServerProperties.WorkspaceRoot
                + ParamKey.AbstractPathOfMGlobal
                + ParamKey.AbstractPathOfResources
                + ParamKey.FileOfApplicationCommonWebYml_MainName
                + ParamKey.FileOfModelNamePre
                + comIn[1]
                + ParamKey.FileOfModelNameTail
                + "."
                + ParamKey.FileOfApplicationCommonWebYml_ExeName ;
        Path appFilePath = FileUtil.getFilePath(filePath) ;
        if(appFilePath == null){
            command.out("未找到配置文件" + filePath);
            return false ;
        }
        Path appModelFilePath = FileUtil.getFilePath(modelFilePath) ;
        if(appModelFilePath == null){
            command.out("未找到配置文件" + modelFilePath);
            return false ;
        }
        List<String> modelLines;
        try{
            modelLines = FileUtil.readFile(appModelFilePath);
        }catch (Exception e){
            command.out("读取文件" + modelFilePath + "发生异常:" + e.getMessage());
            return false ;
        }
        if(modelLines == null || modelLines.size() == 0){
            command.out("文件" + modelFilePath + "是空文件");
            return false ;
        }else{
            try {
                FileUtil.writeFile(appFilePath, modelLines);
            }catch (Exception e){
                command.out("写入文件" + filePath + "发生异常:" + e.getMessage());
                return false ;
            }
        }
        return true ;
    }
    private boolean setInitConfig(String[] comIn, Command command){
        String filePath = ServerProperties.WorkspaceRoot
                + ParamKey.AbstractPathOfMGlobal
                + ParamKey.AbstractPathOfResources
                + ParamKey.FileOfInitConfigXml_MainName
                + "."
                + ParamKey.FileOfInitConfigXml_ExeName ;
        String modelFilePath = ServerProperties.WorkspaceRoot
                + ParamKey.AbstractPathOfMGlobal
                + ParamKey.AbstractPathOfResources
                + ParamKey.FileOfInitConfigXml_MainName
                + ParamKey.FileOfModelNamePre
                + comIn[1]
                + ParamKey.FileOfModelNameTail
                + "."
                + ParamKey.FileOfInitConfigXml_ExeName ;
        Path appFilePath = FileUtil.getFilePath(filePath) ;
        if(appFilePath == null){
            command.out("未找到配置文件" + filePath);
            return false ;
        }
        Path appModelFilePath = FileUtil.getFilePath(modelFilePath) ;
        if(appModelFilePath == null){
            command.out("未找到配置文件" + modelFilePath);
            return false ;
        }
        List<String> modelLines;
        try{
            modelLines = FileUtil.readFile(appModelFilePath);
        }catch (Exception e){
            command.out("读取文件" + modelFilePath + "发生异常:" + e.getMessage());
            return false ;
        }
        if(modelLines == null || modelLines.size() == 0){
            command.out("文件" + modelFilePath + "是空文件");
            return false ;
        }else{
            try {
                FileUtil.writeFile(appFilePath, modelLines);
            }catch (Exception e){
                command.out("写入文件" + filePath + "发生异常:" + e.getMessage());
                return false ;
            }
        }
        return true ;
    }
    private Boolean setWebModuleApplicationYml(String[] comIn, Command command, String absolutePath){
        String modelFilePath = absolutePath
                + ParamKey.AbstractPathOfResources
                + ParamKey.FileOfApplication_MainName
                + ParamKey.FileOfModelNamePre
                + comIn[1]
                + ParamKey.FileOfModelNameTail
                + "."
                + ParamKey.FileOfApplication_ExeName ;
        File f = new File(modelFilePath) ;
        if(!f.exists()){
            return null ;
        }
        Path appModelFilePath = FileUtil.getFilePath(modelFilePath) ;
        if(appModelFilePath == null){
            return false ;
        }
        String filePath = absolutePath
                + ParamKey.AbstractPathOfResources
                + ParamKey.FileOfApplication_MainName
                + "."
                + ParamKey.FileOfApplication_ExeName ;
        Path appFilePath = FileUtil.getFilePath(filePath) ;
        if(appFilePath == null){
            command.out("未找到配置文件" + filePath);
            return false ;
        }
        List<String> modelLines;
        try{
            modelLines = FileUtil.readFile(appModelFilePath);
        }catch (Exception e){
            command.out("读取文件" + modelFilePath + "发生异常");
            return false ;
        }
        if(modelLines == null || modelLines.size() == 0){
            command.out("文件" + modelFilePath + "是空文件");
            return false ;
        }else{
            try {
                FileUtil.writeFile(appFilePath, modelLines);
            }catch (Exception e){
                command.out("写入文件" + filePath + "发生异常:" + e.getMessage());
                return false ;
            }
        }
        return true ;
    }
    private List<File> getWebModules(String[] comIn, Command command){
        List<File> webModules = new ArrayList<>();
        String dirPath = ServerProperties.WorkspaceRoot
                + ParamKey.AbstractPathOfWeb ;
        File dir = new File(dirPath) ;
        if(dir.exists() && dir.isDirectory()){
            File[] subFiles = dir.listFiles() ;
            if(subFiles != null && subFiles.length > 0){
                for(File subFile : subFiles){
                    if(subFile.isDirectory()){
                        webModules.add(subFile);
                    }
                }
            }
        }
        return webModules ;
    }
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/java/com/dy/pipIrrParamSet/util/FileUtil.java
New file
@@ -0,0 +1,106 @@
package com.dy.pipIrrParamSet.util;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
/**
 * @Author: liurunyu
 * @Date: 2025/5/28 17:54
 * @Description
 */
public class FileUtil {
    /**
     * @param absolutePath ç»å¯¹è·¯å¾„
     * @param abstractPath ç›¸å¯¹è·¯å¾„
     * @param fileName æ–‡ä»¶å
     * @return
     */
    public static Path getFilePath(String absolutePath, String abstractPath, String fileName){
        boolean flag ;
        do {
            flag = false ;
            if (absolutePath.endsWith("/")) {
                absolutePath = absolutePath.substring(0, absolutePath.length() - 1);
                flag = true ;
            } else if (absolutePath.endsWith("\\")) {
                absolutePath = absolutePath.substring(0, absolutePath.length() - 1);
                flag = true ;
            }
        }while (flag) ;
        do {
            flag = false ;
            if (abstractPath.startsWith("/")) {
                abstractPath = abstractPath.substring(1);
                flag = true ;
            } else if (abstractPath.startsWith("\\")) {
                abstractPath = abstractPath.substring(1);
                flag = true ;
            }
        }while (flag) ;
        abstractPath = "\\" + abstractPath ;
        do {
            flag = false ;
            if (abstractPath.endsWith("/")) {
                abstractPath = abstractPath.substring(0, abstractPath.length() - 1);
                flag = true ;
            } else if (abstractPath.endsWith("\\")) {
                abstractPath = abstractPath.substring(0, abstractPath.length() - 1);
                flag = true ;
            }
        }while (flag) ;
        abstractPath = abstractPath + "\\" ;
        do {
            flag = false ;
            if (fileName.startsWith("/")) {
                fileName = fileName.substring(1);
                flag = true ;
            } else if (fileName.startsWith("\\")) {
                fileName = fileName.substring(1);
                flag = true ;
            }
        }while (flag) ;
        String filePath = absolutePath + abstractPath + fileName ;
        return Paths.get(filePath) ;
    }
    /**
     * @param filePath æ–‡ä»¶è·¯å¾„
     * @return
     */
    public static Path getFilePath(String filePath){
        return Paths.get(filePath) ;
    }
    /**
     * è¯»æ–‡ä»¶æ‰€æœ‰è¡Œ
     * @param filePath
     * @return
     * @throws IOException
     */
    public static List<String> readFile(Path filePath) throws IOException {
        // è¯»å–所有行
        return Files.readAllLines(filePath);
    }
    public static void writeFile(Path filePath, List<String> lines) throws IOException {
        Files.write(filePath, lines);
    }
    public static void main(String[] args) throws Exception{
        Path path = FileUtil.getFilePath("E:\\javaWorkspaces\\pipIrr\\pipIrr-platform\\pipIrr-global", "\\src\\main\\resources", "test.xml") ;
        List<String> lines = readFile(path) ;
        for(String line : lines){
            System.out.println(line);
        }
        writeFile(path, lines);
    }
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/resources/application-params.yml
New file
@@ -0,0 +1,78 @@
mw:
    sv233:
        ym:
            orgTag: ym
            tcpPort: 60000
            upDataMinInterval: 6
            webPort: 8070
            actutorPort: 9070
            dbName: pipIrr_ym
        sp:
            orgTag: sp
            tcpPort: 62000
            upDataMinInterval: 6
            webPort: 8073
            actutorPort: 9073
            dbName: pipIrr_sp
        test:
            orgTag: test
            tcpPort: 65000
            upDataMinInterval: 6
            webPort: 8072
            actutorPort: 9072
            dbName: pipIrr_test
        mj:
            orgTag: mj
            tcpPort: 61000
            upDataMinInterval: 6
            webPort: 8071
            actutorPort: 9071
            dbName: pipIrr_mj
    sv121:
        mq:
            orgTag: mq
            tcpPort: 60100
            upDataMinInterval: 6
            webPort: 8100
            actutorPort: 9100
            dbName: pipIrr_mq
        yq:
            orgTag: yq
            tcpPort: 60101
            upDataMinInterval: 6
            webPort: 8101
            actutorPort: 9101
            dbName: pipIrr_yq
        hlj:
            orgTag: hlj
            tcpPort: 60102
            upDataMinInterval: 6
            webPort: 8102
            actutorPort: 9102
            dbName: pipIrr_hlj
        gz:
            orgTag: gz
            tcpPort: 60103
            upDataMinInterval: 6
            webPort: 8103
            actutorPort: 9103
            dbName: pipIrr_gz
        lz:
            orgTag: lz
            tcpPort: 60104
            upDataMinInterval: 6
            webPort: 8104
            actutorPort: 9104
            dbName: pipIrr_lz
        jc:
            orgTag: jc
            tcpPort: 60105
            upDataMinInterval: 6
            webPort: 8105
            actutorPort: 9105
            dbName: pipIrr_jc
web:
    sv233:
        ymlFileName: application(233服务器).yml
    sv121:
        ymlFileName: application(121服务器).yml
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/resources/application-self.yml
New file
@@ -0,0 +1,11 @@
logging:
    charset:
        console: UTF-8
    config:
        classpath: log4j2.yml
spring:
    devtools:
        livereload:
            enabled: false
    main:
        banner-mode: off #Spring Boot启动时禁输出Banner
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/resources/application.yml
New file
@@ -0,0 +1,3 @@
spring:
    profiles:
        include: self, params
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/main/resources/log4j2.xml
New file
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="OFF">
  <Appenders>
    <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout charset="UTF-8" pattern="%d %-5p [%t] (%F:%L) - %m%n%throwable"/>
    </Console>
    <RollingFile name="File" fileName="logs/pipIrrParamSet.log" filePattern="logs/pipIrrParamSet-%d{yyyyMMdd}-%i.log">
      <PatternLayout charset="UTF-8" pattern="%d %-5p [%t] (%class.%method:%L) - %m%n%throwable"/>
      <Policies>
        <TimeBasedTriggeringPolicy interval="7" />
        <SizeBasedTriggeringPolicy size="10MB"/>
      </Policies>
      <DefaultRolloverStrategy max="50" />
    </RollingFile>
  </Appenders>
  <Loggers>
    <!-- Root与各个Logger同时起作用 -->
    <Root level="error">
      <AppenderRef ref="Console"/>
      <AppenderRef ref="File"/>
    </Root>
  </Loggers>
</Configuration>
pipIrr-platform/pipIrr-mw/pipIrr-param-set/src/test/java/com/dy/pipIrrParamSet/PipIrrParamSetApplicationTests.java
New file
@@ -0,0 +1,13 @@
package com.dy.pipIrrParamSet;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class PipIrrParamSetApplicationTests {
    @Test
    void contextLoads() {
    }
}
pipIrr-platform/pipIrr-mw/pipIrr-param-set/˵Ã÷.txt
New file
@@ -0,0 +1,3 @@
各模块参数设置器:
管灌系统发布时,针对不同服务器(121、233)和不同的机构(地区)有不同的配置,
不同地区不同服务器系统发布一遍,要多次修改配置,比较烦麻,所以编制了该参数设置器。
pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-app/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-file/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-file/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-gis/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-operation/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-sso/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-statistics/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-temp/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-terminal/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/resources/application(121·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #121服务器:common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
        include: common-web, global, database, database-mq, database-yq, database-hlj, database-gz, database-lz, database-jc, self
pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/resources/application(233·þÎñÆ÷).yml
@@ -1,4 +1,3 @@
spring:
    profiles:
        #233服务器:common-web, global, database, database-ym, database-sp, database-test,database-mj, self
        include: common-web, global, database, database-ym, database-sp, database-test,database-mj, self