ww664853070 2 years ago
parent
commit
c5ee55bf23
  1. 24
      README.md
  2. 41
      doc/srcipt/schema/reserve_item_report.sql
  3. 9
      web/config.js

24
README.md

@ -1,17 +1,17 @@
# ReportCenter # DataCenter 项企-报表中心
项企-报表中心
## api 启动环境变量 ## api 启动环境变量
### 数据库
```
RC_DB
```
### Redis ### Redis
``` ```
IOTA_REDIS_SERVER_HOST IOTA_REDIS_SERVER_HOST
IOTA_REDIS_SERVER_PORT IOTA_REDIS_SERVER_PORT
IOTA_REDIS_SERVER_PWD IOTA_REDIS_SERVER_PWD
``` ```
### 企业管理 ### 企业管理
``` ```
@ -36,6 +36,20 @@ CLICKHOUST_USER
CLICKHOUST_PASSWORD CLICKHOUST_PASSWORD
CLICKHOUST_PEP_EMIS //clickhouse 的 emis 库名 CLICKHOUST_PEP_EMIS //clickhouse 的 emis 库名
``` ```
## web 启动环境变量
### 企业管理
```
API_URL //api
API_DC_URL //外网可访问的api地址
```
### 七牛
```
ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE
ANXINCLOUD_QINIU_BUCKET_RESOURCE
ANXINCLOUD_QINIU_ACCESSKEY
ANXINCLOUD_QINIU_SECRETKEY
```
### 后端服务 ### 后端服务
``` ```
ANXINCLOUD_PM_SERVICES //郑兴写的后端服务地址 ANXINCLOUD_PM_SERVICES //郑兴写的后端服务地址

41
doc/srcipt/schema/reserve_item_report.sql

@ -0,0 +1,41 @@
/*
Navicat Premium Data Transfer
Source Server : 36
Source Server Type : PostgreSQL
Source Server Version : 90606
Source Host : 10.8.30.36:5432
Source Catalog : data_center
Source Schema : public
Target Server Type : PostgreSQL
Target Server Version : 90606
File Encoding : 65001
Date: 24/11/2022 09:46:27
*/
-- ----------------------------
-- Table structure for reserve_item_report
-- ----------------------------
DROP TABLE IF EXISTS "public"."reserve_item_report";
CREATE TABLE "public"."reserve_item_report" (
"id" int4 NOT NULL DEFAULT nextval('reserve_item_report_id_seq'::regclass),
"year" int4 NOT NULL,
"month" int4 NOT NULL,
"path" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"type" varchar(255) COLLATE "pg_catalog"."default" NOT NULL,
"name" varchar(255) COLLATE "pg_catalog"."default"
)
;
COMMENT ON COLUMN "public"."reserve_item_report"."path" IS '七牛云路径地址';
COMMENT ON COLUMN "public"."reserve_item_report"."type" IS '1.储备项目储备周期分析
2.
3.';
COMMENT ON COLUMN "public"."reserve_item_report"."name" IS '文件名';
-- ----------------------------
-- Primary Key structure for table reserve_item_report
-- ----------------------------
ALTER TABLE "public"."reserve_item_report" ADD CONSTRAINT "reserve_item_report_pkey" PRIMARY KEY ("id");

9
web/config.js

@ -20,13 +20,10 @@ args.option('qnbkt', 'qiniuBucket');
args.option('qndmn', 'qiniuDomain'); args.option('qndmn', 'qiniuDomain');
args.option('pmrs', 'pmReportService'); args.option('pmrs', 'pmReportService');
//基本动作-周报后端服务
args.option('wkys', 'weeklyServices');
const flags = args.parse(process.argv); const flags = args.parse(process.argv);
const API_URL = process.env.API_URL || flags.apiUrl; const API_URL = process.env.API_URL || flags.apiUrl;
const API_HR_URL = process.env.API_HR_URL || flags.apiHrUrl; const API_DC_URL = process.env.API_DC_URL || flags.apiHrUrl;
// 七牛 // 七牛
const ANXINCLOUD_QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak; const ANXINCLOUD_QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak;
@ -39,7 +36,7 @@ const ANXINCLOUD_PM_SERVICES = process.env.ANXINCLOUD_PM_SERVICES || flags.pmrs;
if ( if (
!API_URL !API_URL
|| !API_HR_URL || !API_DC_URL
|| !ANXINCLOUD_QINIU_AK || !ANXINCLOUD_QINIU_SK || !ANXINCLOUD_QINIU_BUCKET_RESOURCE || !ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE || !ANXINCLOUD_QINIU_AK || !ANXINCLOUD_QINIU_SK || !ANXINCLOUD_QINIU_BUCKET_RESOURCE || !ANXINCLOUD_QINIU_DOMAIN_QNDMN_RESOURCE
) { ) {
console.log('缺少启动参数,异常退出'); console.log('缺少启动参数,异常退出');
@ -71,7 +68,7 @@ const product = {
}, { }, {
entry: require('./routes').entry, entry: require('./routes').entry,
opts: { opts: {
apiUrl: API_HR_URL, apiUrl: API_DC_URL,
staticRoot: './client', staticRoot: './client',
qiniu: { qiniu: {
fetchUrl: '/_file-server', fetchUrl: '/_file-server',

Loading…
Cancel
Save