diff --git a/2024/南网仓储/cc_20240727.sql b/2024/南网仓储/cc_20240727.sql new file mode 100644 index 0000000..9e55640 --- /dev/null +++ b/2024/南网仓储/cc_20240727.sql @@ -0,0 +1,34 @@ +--任务:南网施工装备一体化数据推送开发 + +create table data_receive_info +( + id int auto_increment comment '主键ID' + primary key, + receive_status int default 0 null comment '接收状态(0:未完成 1 已完成)', + push_num int null comment '推送数量', + receive_date datetime null comment '推送日期' +) + comment '推送接收表'; + + +create table data_receive_detail +( + id int auto_increment comment '主键ID' + primary key, + receive_id int null comment '推送ID', + type_id int null comment '机具类型id', + ma_id int null comment '机具编码ID', + rent_time datetime null comment '租赁日期', + rent_price varchar(10) null comment '租赁价格', + unit_id int null comment '所属单位', + supplier varchar(255) null comment '生产厂家', + out_factory_time datetime null comment '出厂日期', + is_new int null comment '是否新装备(0 是 1否)', + check_code varchar(255) null comment '检验证编号', + check_unit varchar(255) null comment '检验单位', + check_date datetime null comment '检验日期', + next_check_date datetime null comment '下次检验日期', + ma_user_name varchar(10) null comment '机手姓名', + status int default 0 null comment '状态(0 未接收 1已接收)' +) + comment '推送接收明细表'; \ No newline at end of file diff --git a/2024/南网租赁平台/user_20240712.sql b/2024/南网租赁平台/zl_20240712.sql similarity index 99% rename from 2024/南网租赁平台/user_20240712.sql rename to 2024/南网租赁平台/zl_20240712.sql index 6e548a0..195fd36 100644 --- a/2024/南网租赁平台/user_20240712.sql +++ b/2024/南网租赁平台/zl_20240712.sql @@ -5,7 +5,3 @@ INSERT INTO service_user.resource (id, platform_id, type, name, pid, system_defa INSERT INTO service_user.role_resource (id, platform_id, role_id, resource_id, created, updated, yn) VALUES (18404075, 20, 586, 167792, '2024-07-11 09:38:09', null, 1); INSERT INTO service_user.role_resource (id, platform_id, role_id, resource_id, created, updated, yn) VALUES (18404195, 20, 744, 167792, '2024-07-11 09:38:20', null, 1); - - - - diff --git a/2024/南网租赁平台/zl_20240727.sql b/2024/南网租赁平台/zl_20240727.sql new file mode 100644 index 0000000..d1e693f --- /dev/null +++ b/2024/南网租赁平台/zl_20240727.sql @@ -0,0 +1,17 @@ +--任务:南网施工装备一体化数据推送开发 + +CREATE TABLE `warehouse_push_equipment` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '装备id', + `ma_id` int(11) DEFAULT NULL COMMENT '仓储装备id', + `item_name` varchar(255) DEFAULT NULL COMMENT '物品种类', + `device_type` varchar(255) DEFAULT NULL COMMENT '设备类型', + `specification_type` varchar(255) DEFAULT NULL COMMENT '规格型号', + `ma_code` varchar(255) DEFAULT NULL COMMENT '设备编码', + `storage_status` int(11) DEFAULT NULL COMMENT '仓储状态 1:在库,2:在用', + `rental_status` int(11) DEFAULT NULL COMMENT '租赁状态 1:信息未完善,2:信息已完善,3:待上架,4:待租,5:租赁中', + `status` int(10) unsigned DEFAULT '0' COMMENT '是否启用 0:不启用,1:启用', + PRIMARY KEY (`id`), + KEY `id_index` (`id`) USING BTREE COMMENT '主键' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='仓储推送装备维护表'; + + diff --git a/other_scripts/南网租赁平台/logstash/Dockerfile b/other_scripts/南网租赁平台/logstash/Dockerfile new file mode 100644 index 0000000..00f4f6d --- /dev/null +++ b/other_scripts/南网租赁平台/logstash/Dockerfile @@ -0,0 +1,53 @@ +FROM ubuntu:16.04 + +# 维护者信息 +MAINTAINER Elastic Docker Team + +RUN echo '#!/bin/sh' > /usr/sbin/policy-rc.d && echo 'exit 101' >> /usr/sbin/policy-rc.d && chmod +x /usr/sbin/policy-rc.d && dpkg-divert --local --rename --add /sbin/initctl && cp -a /usr/sbin/policy-rc.d /sbin/initctl && sed -i 's/^exit.*/exit 0/' /sbin/initctl && echo 'force-unsafe-io' > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup && echo 'DPkg::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' > /etc/apt/apt.conf.d/docker-clean && echo 'APT::Update::Post-Invoke { "rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true"; };' >> /etc/apt/apt.conf.d/docker-clean && echo 'Dir::Cache::pkgcache ""; Dir::Cache::srcpkgcache "";' >> /etc/apt/apt.conf.d/docker-clean && echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/docker-no-languages && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/docker-gzip-indexes && echo 'Apt::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/docker-autoremove-suggests +RUN rm -rf /var/lib/apt/lists/ +# 安装依赖 +RUN apt-get update && apt-get clean + +FROM commons-container-registry.tencentcloudcr.com/defeng/adoptopenjdk/openjdk:8 + +# 添加用户和组 +RUN addgroup --gid 1000 logstash && adduser --disabled-password --gecos=logstash --uid=1000 --gid=1000 --home /usr/share/logstash --no-create-home logstash + +# 下载并解压 Logstash +#RUN curl -Lso - https://artifacts.elastic.co/downloads/logstash/logstash-5.3.3.tar.gz | tar zxf - -C /usr/share && mv /usr/share/logstash-5.3.3 /usr/share/logstash && chown --recursive logstash:logstash /usr/share/logstash/ && ln -s /usr/share/logstash /opt/logstash + +COPY logstash-5.3.3/ /usr/share/logstash-5.3.3 + +RUN mv /usr/share/logstash-5.3.3 /usr/share/logstash && chown --recursive logstash:logstash /usr/share/logstash/ && ln -s /usr/share/logstash /opt/logstash + +# 设置环境变量 +ENV PATH=/usr/share/logstash/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +# 复制配置文件 +COPY config/ /usr/share/logstash/config/ +COPY pipeline/logstash.conf /usr/share/logstash/pipeline/ + +# 设置权限 +RUN chown --recursive logstash:logstash /usr/share/logstash/config/ /usr/share/logstash/pipeline/ + +# 生成本地化文件 +RUN locale-gen en_US.UTF-8 + +# 设置语言环境 +ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 + +# 复制可执行文件 +COPY bin/docker-entrypoint /usr/local/bin/ +COPY bin/env2yaml /usr/local/bin/ + +RUN chmod +x /usr/local/bin/docker-entrypoint +RUN chmod +x /usr/local/bin/env2yaml +RUN chown --recursive logstash:logstash /usr/local/bin/docker-entrypoint +USER logstash +# 暴露端口 +EXPOSE 5044/tcp 9600/tcp + +# 设置入口点 +ENTRYPOINT ["/usr/local/bin/docker-entrypoint"] + +# 启动命令 +CMD ["-f","/usr/share/logstash/pipeline"] diff --git a/other_scripts/南网租赁平台/nginx/Dockerfile b/other_scripts/南网租赁平台/nginx/Dockerfile new file mode 100644 index 0000000..41cbed9 --- /dev/null +++ b/other_scripts/南网租赁平台/nginx/Dockerfile @@ -0,0 +1,17 @@ +FROM centos:7 +RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime +WORKDIR /usr/local/src +ENV NG_VERSION=nginx-1.21.0 +RUN yum -y install epel-release wget +RUN wget http://nginx.org/download/$NG_VERSION.tar.gz && tar xzvf $NG_VERSION.tar.gz +RUN yum install -y gcc gcc-c++ glibc make autoconf openssl openssl-devel && yum install -y pcre-devel libxslt-devel gd-devel GeoIP GeoIP-devel GeoIP-data +RUN yum -y update bash bind-license binutils bzip2 cpio curl cyrus-sasl-lib dbus dbus-libs e2fsprogs elfutils-default-yama-scope elfutils-libelf elfutils-libs expat file-libs freetype gd glib2 glibc glibc-common gzip kpartx krb5 krb5-libs libcom_err libcurl libjpeg-turbo libpng libssh2 libtasn1 libX11 libX11-common libxml2 libxml2-python libXpm libxslt musl nspr nss nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util openldap openssl openssl-libs perl perl-libs perl-macros perl-Pod-Escapes procps-ng python python-libs rpm rpm-build-libs rpm-libs rpm-python shared-mime-info sqlite systemd systemd-libs vim-minimal xz xz-libs zlib zstd-jni +#RUN yum -y update nss nss-tools nss-sysinit bind-license python openldap openssl-libs rpm expat glibc glib2 krb5-libs gzip libcurl cyrus-sasl-lib binutils bash systemd-libs libssh2 zlib kernel-headers +RUN yum clean all +RUN useradd -M -s /sbin/nologin nginx +WORKDIR /usr/local/src/$NG_VERSION +RUN ./configure --user=nginx --group=nginx --prefix=/usr/local/nginx --with-file-aio --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module && make && make install +ENV PATH /usr/local/nginx/sbin:$PATH +ENV PATH /bin:/usr/bin:$PATH +ENTRYPOINT ["nginx"] +CMD ["-g","daemon off;"] diff --git a/other_scripts/南网租赁平台/seata/Dockerfile b/other_scripts/南网租赁平台/seata/Dockerfile new file mode 100644 index 0000000..41f4700 --- /dev/null +++ b/other_scripts/南网租赁平台/seata/Dockerfile @@ -0,0 +1,26 @@ +# https://hub.docker.com/orgs/seataio +# mvn clean install -DskipTests=true -P release-seata +FROM centos:7 + + +# set label +LABEL maintainer="Seata " + +WORKDIR /$BASE_DIR + +# ADD FORM distribution +ADD bin/ /seata-server/bin +ADD lib/ /seata-server/lib +ADD conf/ /seata-server/conf +ADD target/ /seata-server/target +ADD LICENSE /seata-server/LICENSE +RUN chmod 755 /seata-server/bin/seata-server.sh + + +# set extra environment +ENV LOADER_PATH="/seata-server/lib" +ENV TZ="Asia/Shanghai" +ENV EXTRA_JVM_ARGUMENTS="-Djava.security.egd=file:/dev/./urandom -server -Xss512k -XX:+UnlockExperimentalVMOptions -XX:+UseContainerSupport XX:SurvivorRatio=10 -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:MaxDirectMemorySize=1024m -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=75 -Xloggc:/var/log/seata_gc.log -verbose:gc -Dio.netty.leakDetectionLevel=advanced" + +CMD ["sh","-c","/seata-server/bin/seata-server.sh && tail -f /dev/null"] +#CMD ["sh","/seata-server/bin/seata-server.sh"] diff --git a/other_scripts/南网租赁平台/tomcat/Dockerfile b/other_scripts/南网租赁平台/tomcat/Dockerfile new file mode 100644 index 0000000..81cbeed --- /dev/null +++ b/other_scripts/南网租赁平台/tomcat/Dockerfile @@ -0,0 +1,23 @@ +FROM centos:7 + +RUN yum install -y curl wget vim telnet lsof && yum clean all +RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime + +RUN mkdir -p /usr/java/jdk1.8.0_333/ && mkdir -p /export/servers/tomcat/ + + +RUN yum -y update bash bind-license binutils bzip2 cpio curl cyrus-sasl-lib dbus dbus-libs e2fsprogs elfutils-default-yama-scope elfutils-libelf elfutils-libs expat file-libs freetype gd glib2 glibc glibc-common gzip kpartx krb5 krb5-libs libcom_err libcurl libjpeg-turbo libpng libssh2 libtasn1 libX11 libX11-common libxml2 libxml2-python libXpm libxslt musl nspr nss nss-softokn nss-softokn-freebl nss-sysinit nss-tools nss-util openldap openssl openssl-libs perl perl-libs perl-macros perl-Pod-Escapes procps-ng python python-libs rpm rpm-build-libs rpm-libs rpm-python shared-mime-info sqlite systemd systemd-libs vim-minimal xz xz-libs zlib zstd-jni + +RUN yum install -y fontconfig mkfontscale +COPY simsun.* /usr/share/fonts/ +RUN mkfontscale && mkfontdir && fc-cache -fv && fc-list + +ADD jdk1.8.0_333 /usr/java/jdk1.8.0_333 +ADD apache-tomcat-8.5.99 /export/servers/tomcat + +ENV JAVA_HOME /usr/java/jdk1.8.0_333 +ENV JAVA_BIN /usr/java/jdk1.8.0_333/bin +ENV JRE_HOME /usr/java/jdk1.8.0_333/jre +ENV PATH $PATH:/usr/java/jdk1.8.0_333/bin:/usr/java/jdk1.8.0_333/jre/bin +ENV CLASSPATH /usr/java/jdk1.8.0_333/jre/bin:/usr/java/jdk1.8.0_333/lib:/usr/java/jdk1.8.0_333/jre/lib/charsets.jar +RUN /bin/bash