Commit 82cad570 authored by gu-jinli1118's avatar gu-jinli1118
Browse files

Test

parents
default:
tags:
- test # runner 需配置相同tag
interruptible: true # 任务可被后来pipeline打断
stages:
- upload-mr-analysis
workflow:
rules:
- if: $CI_MERGE_REQUEST_IID
variables:
HUB_LOGIN_NAME: "gujinli" # 登录名
HUB_PASSWORD: "1234qwer" # 密码
HUB_URL: "http://192.168.68.153:9521/" # 平台URLwww.ustchcs.com/p3-v17/hub-backend-test
MERGE_REQUEST_PARAM: "{mergeRequestId:$CI_MERGE_REQUEST_IID,projectId:$CI_PROJECT_ID,jobId:$CI_JOB_ID}"
JAVA_MAIN_SOURCE: "src/main/java" # 检索差异文件脚本变量,表示只检查main文件,不检查test文件
CAFEHUNTER_CLI_SCRIPT: "/root/analysis-tool/bin/scanner" # 套件命令执行文件
CAFEHUNTER_CLI_LICENSE_PATH: "/root/analysis-tool/Hub-ci.txt" # 授权文件
CAFEHUNTER_CLI_CONFIG_PATH: "/root/analysis-tool/config.yml" # 规则配置文件
# 根据项目进行配置
HUB_PROJECT_ID: "6" # 对应平台项目Id
REPOSITORY_FULL_PATH: "/builds/hub-gitlab/gujinli/jsherp-java-test" # 项目绝对路径,供套件分析
REPOSITORY_NAME: "jsherp-java-test" # 项目名称
upload-job:
stage: upload-mr-analysis
# 包含分析工具运行所需环境
# 需要设置 runner config: pull_policy = "if-not-present"
# 使用本地镜像,本地需要有这个镜像
# 需要设置 runner config:mac_address(固定IP 工具授权需要)
image: docker.ustchcs.com/ubuntu-javacli-quality:v3.0
allow_failure: false
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
before_script:
# 授权
- locale-gen zh_CN
- export LANG=zh_CN.UTF-8
- export LC_ALL=zh_CN.UTF-8
- export LANGUAGE=zh_CN.UTF-8
# - $CAFEHUNTER_CLI_SCRIPT version -i
- $CAFEHUNTER_CLI_SCRIPT authorize -n cafehunter $CAFEHUNTER_CLI_LICENSE_PATH
# 将游离分支转换为正常分支 以供套件分析
- cd $REPOSITORY_FULL_PATH
- git fetch
- git branch tmp-$CI_JOB_ID-$CI_JOB_NAME $CI_COMMIT_SHA
- git checkout -b $CI_COMMIT_REF_NAME
- git merge tmp-$CI_JOB_ID-$CI_JOB_NAME
# 获取分析文件
- chmod 777 $REPOSITORY_FULL_PATH/getCommittedMainFilesForCafehunterCli.sh
- export COMMITTED_FILES=$($REPOSITORY_FULL_PATH/getCommittedMainFilesForCafehunterCli.sh)
script:
# 分析
- echo "$CAFEHUNTER_CLI_SCRIPT scan $COMMITTED_FILES -umr $REPOSITORY_NAME $HUB_LOGIN_NAME $HUB_PASSWORD $HUB_URL $HUB_PROJECT_ID $MERGE_REQUEST_PARAM"
- $CAFEHUNTER_CLI_SCRIPT scan $COMMITTED_FILES -umr $REPOSITORY_NAME $HUB_LOGIN_NAME $HUB_PASSWORD $HUB_URL $HUB_PROJECT_ID $MERGE_REQUEST_PARAM
# 删除过程中用到的分支
- "git branch -d tmp-$CI_JOB_ID-$CI_JOB_NAME"
- "git checkout $CI_COMMIT_SHA"
- "git branch -D $CI_COMMIT_REF_NAME"
after_script:
- "git branch -d tmp-$CI_JOB_ID-$CI_JOB_NAME"
- "git checkout $CI_COMMIT_SHA"
- "git branch -D $CI_COMMIT_REF_NAME"
\ No newline at end of file
*.js linguist-language=Java
*.css linguist-language=Java
*.html linguist-language=Java
*.vue linguist-language=Java
## ide
**/.idea
*.iml
## backend
**/target
**/logs
## front
**/*.lock
This diff is collapsed.
# 项目总述
* 很多人说华夏ERP(英文名:jshERP)是目前人气领先的国产ERP系统
* 虽然目前只有进销存+财务+生产的功能,但后面将会推出ERP的全部功能,有兴趣请帮点一下 **Star**
* **官网地址:http://www.huaxiaerp.com 商务或技术交流,请联系QQ:752718920 微信:shenhua861584**
* 推荐使用网络版(100元1年)淘宝链接:https://item.taobao.com/item.htm?id=674169489573
* 平台地址:http://cloud.huaxiaerp.vip 欢迎大家注册租户进行使用
* 欢迎加入华夏ERP交流QQ群(入群帮安装),群3:805736336(满)、群4:146571538
# 定制和插件
* 如有ERP私人定制需求,请将需求整理成文档,发给邮箱: **752718920@qq.com** ,我会及时回复哒
* 如需更多功能,欢迎购买作者小店的插件 https://shop104070207.taobao.com/ 谢谢支持
# 开发初衷
* 华夏ERP立志为中小企业提供开源好用的ERP软件,降低企业的信息化成本
* 个人开发者也可以使用华夏ERP进行二次开发,加快完成开发任务
* 初学JAVA的小伙伴可以下载源代码来进行学习交流
# 技术框架
* 核心框架:SpringBoot 2.0.0
* 持久层框架:Mybatis 1.3.2
* 日志管理:SLF4J 1.7
* 前端框架:Vue 2.6.10
* UI框架: Ant-Design-Vue 1.5.2
* 模板框架: Jeecg-Boot 2.2.0
* 项目管理框架: Maven 3.2.3
# 开发环境
建议开发者使用以下环境,可以避免版本带来的问题
* IDE: IntelliJ IDEA 2019.2+和JetBrains WebStorm 2019.3+
* DB: Mysql 5.7.33
* JDK: JDK 1.8
* Node: Node 16.16.0
* Maven: Maven 3.2.3+
* Redis: 6.2.1
* Nginx: 1.12.2
# 服务器环境
* 数据库:Mysql5.7.33
* JAVA平台:JRE1.8
* Redis库:redis6.2.1
* Nginx代理:nginx1.12.2
* 操作系统:Windows、Linux等
# 配套资料
* 需要用户手册请访问这里 http://www.huaxiaerp.com/thread-9-1-1.html
* 喜欢视频教程可以看这里 https://space.bilibili.com/540003552/channel/series
* 为方便大家搭建运行环境,分享了下载地址 https://pan.baidu.com/s/1jlild9uyGdQ7H2yaMx76zw  提取码:814g
* 不会打包的小伙伴,请下载此打包后的文件 https://share.weiyun.com/NDJNLhry 密码:vd3aig
* 不会部署的小伙伴,请参考部署教程 http://www.huaxiaerp.com/thread-177-1-1.html
* 部署后登录系统的默认租户账号:jsh,默认超管账户:admin,默认密码均为:123456
# 开源说明
* 本系统100%开源,遵守GPL-3.0协议
# 系统美图
* 首页
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235430_ff5f9618_852955.png "首页.png")
* 零售管理
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235442_214b9fc0_852955.png "零售管理.png")
* 采购管理
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235643_c87b3d02_852955.png "采购管理.png")
* 销售管理
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235631_01a92e1f_852955.png "销售管理.png")
* 仓库管理
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235657_99057159_852955.png "仓库管理.png")
* 财务管理
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235708_086379f8_852955.png "财务管理.png")
* 报表查询
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235722_a26af3e8_852955.png "报表查询.png")
* 商品管理
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235905_5ec11112_852955.png "商品管理.png")
* 基本资料
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235919_92d78bc3_852955.png "基本资料.png")
* 系统管理
![输入图片说明](https://images.gitee.com/uploads/images/2022/0520/235815_b139e426_852955.png "系统管理.png")
# 捐赠
开源不易,坚持更难!如果您觉得华夏ERP不错,可以捐赠请作者喝杯咖啡~,在此表示感谢^_^。
点击以下链接,将页面拉到最下方点击“捐赠”即可。
[前往捐赠](https://gitee.com/jishenghua/JSH_ERP)
\ No newline at end of file
*.js linguist-language=Java
*.css linguist-language=Java
*.html linguist-language=Java
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
*.iml
# Package Files #
*.jar
*.war
*.ear
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
.idea
/target
**/*.iml
This diff is collapsed.
This diff is collapsed.
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jsh</groupId>
<artifactId>jshERP-boot</artifactId>
<version>3.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>jshERP-boot</name>
<description>华夏ERP</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>com.gitee.starblues</groupId>
<artifactId>springboot-plugin-framework</artifactId>
<version>2.2.1-RELEASE</version>
</dependency>
<dependency>
<groupId>com.gitee.starblues</groupId>
<artifactId>springboot-plugin-framework-extension-mybatis</artifactId>
<version>2.2.1-RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.83</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.30</version>
</dependency>
<!--http-->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.2</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.12</version>
</dependency>
<!-- 日志 -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
<version>2.15.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>1.7.25</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.0.7.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-redis</artifactId>
<version>1.4.1.RELEASE</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.6</version>
</dependency>
</dependencies>
<build>
<finalName>jshERP</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.0.3.RELEASE</version>
<executions>
<execution>
<id>build-info</id>
<phase>generate-sources</phase>
<goals>
<goal>build-info</goal>
</goals>
</execution>
<execution>
<id>repackage</id>
<phase>package</phase>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<mainClass>com.jsh.erp.ErpApplication</mainClass>
<layout>JAR</layout>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<id>make-zip</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
<outputDirectory>./dist</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.4.0</version>
<configuration>
<configurationFile>${basedir}/src/test/resources/generatorConfig.xml</configurationFile>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<!-- <skip>true</skip> -->
</configuration>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 ">
<id>bin</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${project.basedir}/target</directory>
<includes>
<include>*.jar</include>
</includes>
<outputDirectory>/lib</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/main/resources</directory>
<includes>
<include>*.properties</include>
<include>*.yml</include>
<include>*.yaml</include>
<include>*.xml</include>
</includes>
<outputDirectory>/config</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/main/bin</directory>
<outputDirectory>/bin</outputDirectory>
<includes>
<include>run-manage.sh</include>
</includes>
<lineEnding>unix</lineEnding>
</fileSet>
<fileSet>
<directory>${project.basedir}/src/main/bin/</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>start.bat</include>
<include>restart.sh</include>
<include>start.sh</include>
<include>stop.sh</include>
<include>status.sh</include>
</includes>
</fileSet>
<fileSet>
<directory>docs</directory>
<outputDirectory>/docs</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}</directory>
<includes>
<include>*.md</include>
<include>*.txt</include>
</includes>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
./bin/run-manage.sh restart
\ No newline at end of file
SERVER_NAME=jshERP
readonly APP_HOME=${FILE_PATH:-$(dirname $(cd `dirname $0`; pwd))}
#readonly JAVA_HOME=""
readonly CONFIG_HOME="$APP_HOME/config/"
readonly LIB_HOME="$APP_HOME/lib"
readonly LOGS_HOME="$APP_HOME/logs"
readonly PID_FILE="$LOGS_HOME/application.pid"
readonly APP_MAIN_CLASS="jshERP.jar"
readonly LOG_CONFIG="$CONFIG_HOME/logback-spring.xml"
readonly JAVA_RUN="-Dlogs.home=$LOGS_HOME -Dlogging.config=$LOG_CONFIG -Dspring.config.location=file:$CONFIG_HOME -Dspring.pid.file=$PID_FILE -Dspring.pid.fail-on-write-error=true"
readonly JAVA_OPTS="-server -Xms128m -Xmx320m -XX:PermSize=128M -XX:MaxPermSize=256M $JAVA_RUN"
readonly JAVA="java"
PID=0
if [ ! -x "$LOGS_HOME" ]
then
mkdir $LOGS_HOME
fi
chmod +x -R "$JAVA_HOME/bin/"
functions="/etc/functions.sh"
if test -f $functions ; then
. $functions
else
success()
{
echo " SUCCESS! $@"
}
failure()
{
echo " ERROR! $@"
}
warning()
{
echo "WARNING! $@"
}
fi
function checkpid() {
PID=$(ps -ef | grep $APP_MAIN_CLASS | grep -v 'grep' | awk '{print int($2)}')
if [[ -n "$PID" ]]
then
return 0
else
return 1
fi
}
function start() {
checkpid
if [[ $? -eq 0 ]]
then
warning "[$APP_MAIN_CLASS]: already started! (PID=$PID)"
else
echo -n "[$APP_MAIN_CLASS]: Starting ..."
JAVA_CMD="nohup $JAVA $JAVA_OPTS -jar $LIB_HOME/$APP_MAIN_CLASS > /dev/null 2>&1 &"
# echo "Exec cmmand : $JAVA_CMD"
sh -c "$JAVA_CMD"
sleep 3
checkpid
if [[ $? -eq 0 ]]
then
success "(PID=$PID) "
else
failure " "
fi
fi
}
function stop() {
checkpid
if [[ $? -eq 0 ]];
then
echo -n "[$APP_MAIN_CLASS]: Shutting down ...(PID=$PID) "
kill -9 $PID
if [[ $? -eq 0 ]];
then
echo 0 > $PID_FILE
success " "
else
failure " "
fi
else
warning "[$APP_MAIN_CLASS]: is not running ..."
fi
}
function status() {
checkpid
if [[ $? -eq 0 ]]
then
success "[$APP_MAIN_CLASS]: is running! (PID=$PID)"
return 0
else
failure "[$APP_MAIN_CLASS]: is not running"
return 1
fi
}
function info() {
echo "System Information:"
echo
echo "****************************"
echo `head -n 1 /etc/issue`
echo `uname -a`
echo
echo "JAVA_HOME=$JAVA_HOME"
echo
echo "JAVA Environment Information:"
echo `$JAVA -version`
echo
echo "APP_HOME=$APP_HOME"
echo "APP_MAIN_CLASS=$APP_MAIN_CLASS"
echo
echo "****************************"
}
case "$1" in
'start')
start
;;
'stop')
stop
;;
'restart')
stop
start
;;
'status')
status
;;
'info')
info
;;
*)
echo "Usage: $0 {help|start|stop|restart|status|info}"
;;
esac
exit 0
\ No newline at end of file
@echo off
title jshERP
java -Xms1000m -Xmx2000m -jar .\lib\jshERP.jar
pause over
\ No newline at end of file
./bin/run-manage.sh start
\ No newline at end of file
./bin/run-manage.sh status
\ No newline at end of file
./bin/run-manage.sh stop
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment