Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyiAdminServer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
yuyiAdminServer
Commits
b3f19756
Commit
b3f19756
authored
Mar 12, 2025
by
zhangzhencai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
19338dd5
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
996 additions
and
147 deletions
+996
-147
默认图片.png
img/政策速递/默认图片.png
+0
-0
serverConfig.xml
serverConfig.xml
+4
-1
admin.ts
src/biz/admin.ts
+475
-99
fuhua.ts
src/biz/fuhua.ts
+4
-1
ruFu.ts
src/biz/ruFu.ts
+10
-4
zaiFu.ts
src/biz/zaiFu.ts
+303
-13
zhengCe.ts
src/biz/zhengCe.ts
+27
-5
enterprise.ts
src/config/eccParam/enterprise.ts
+6
-4
enum.ts
src/config/enum/enum.ts
+50
-1
outputEnum.ts
src/config/enum/outputEnum.ts
+14
-2
serverConfig.ts
src/config/serverConfig.ts
+6
-3
systemClass.ts
src/config/systemClass.ts
+3
-0
http_server.ts
src/net/http_server.ts
+1
-0
admin.ts
src/routers/admin.ts
+84
-14
public.ts
src/routers/public.ts
+8
-0
system.ts
src/tools/system.ts
+1
-0
No files found.
img/政策速递/默认图片.png
0 → 100644
View file @
b3f19756
12.5 KB
serverConfig.xml
View file @
b3f19756
<config>
<port>
9098
</port>
<sign>
xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas
</sign>
<dbServer>
http://192.168.0.105:40012
</dbServer>
<dbServer>
http://127.0.0.1:9096
</dbServer>
<imgUrl>
http://127.0.0.1:9098
</imgUrl>
<imgFileUrl>
http://192.168.0.189:9097
</imgFileUrl>
</config>
\ No newline at end of file
src/biz/admin.ts
View file @
b3f19756
...
...
@@ -18,6 +18,8 @@ import moment = require("moment");
import
{
changeAdd
,
extractData
}
from
"../util/piecemeal"
;
import
{
EnterpriseApplyForConfig
}
from
"../config/splitResult/enterprise"
;
import
{
changeEnumValue
}
from
"../util/verificationEnum"
;
import
{
on
}
from
"process"
;
import
{
systemConfig
}
from
"../config/serverConfig"
;
export
async
function
allEnterpriseNameList
()
{
let
listList
=
await
selectData
(
OPERATIONALDATATYPE
.
查询多个
,
TABLENAME
.
企业基础信息表
,
{
state
:
1
},
[
"enterpriseName"
,
"eId"
]);
...
...
@@ -34,8 +36,6 @@ export async function allEnterpriseNameList() {
}
//企业申请上传资料
export
async
function
enterpriseApplyFor
(
eId
:
string
)
{
let
filesList
=
[
"eId"
,
"uscc"
,
"enterpriseName"
,
"logonAddress"
,
"logonTime"
];
...
...
@@ -73,9 +73,10 @@ export async function updateEnterpriseApplyFor(eId:string, param) {
if
(
!
resInfo
||
!
resInfo
.
eId
)
{
throw
new
BizError
(
ERRORENUM
.
数据不存在
);
}
if
(
resInfo
.
state
==
1
)
{
throw
new
BizError
(
ERRORENUM
.
已审核请前往小程序登录
)
}
// 去掉审核状态的检查和更新逻辑
// if (resInfo.state == 1) {
// throw new BizError(ERRORENUM.已审核请前往小程序登录)
// }
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
租赁信息
,
param
,
{
eId
});
...
...
@@ -84,7 +85,8 @@ export async function updateEnterpriseApplyFor(eId:string, param) {
export
async
function
enterpriseExamineList
(
year
:
number
,
enterpriseName
:
string
,
page
:
number
)
{
let
selectParam
:
any
=
{
isSubmit
:
enumConfig
.
STATE
.
是
};
// let selectParam:any = {isSubmit:enumConfig.STATE.是};
let
selectParam
:
any
=
{};
if
(
year
)
selectParam
=
{
annual
:
getMySqlMs
(
year
)};
let
filesList
=
[
"mId"
,
"annual"
,
"BI"
,
"TXP"
,
"RD"
,
"state"
];
...
...
@@ -119,7 +121,6 @@ export async function enterpriseExamineList(year:number, enterpriseName:string,
}
export
async
function
enterpriseExamineInfo
(
mId
:
string
)
{
let
filesList
=
[
"mId"
,
"annual"
,
"BI"
,
"TXP"
,
"RD"
];
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
mId
},
filesList
);
...
...
@@ -155,51 +156,61 @@ export async function enterpriseExamineUpdate( mId, param) {
return
{
dataInfo
};
}
export
async
function
enterpriseExaminePass
(
mId
)
{
let
filesList
=
[
"eId"
,
"annual"
,
"BI"
,
"TXP"
,
"RD"
];
let
resInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
mId
},
filesList
);
if
(
!
resInfo
||
!
resInfo
.
eId
)
{
throw
new
BizError
(
ERRORENUM
.
数据不存在
);
}
//企业审核通过
// export async function enterpriseExaminePass(mId) {
// let filesList = [ "eId", "annual", "BI", "TXP", "RD"];
// let resInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业经营信息, {mId}, filesList);
// if (!resInfo || !resInfo.eId) {
// throw new BizError(ERRORENUM.数据不存在);
// }
let
dataInfo
=
{
state
:
enumConfig
.
STATE
.
是
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业经营信息
,
dataInfo
,
{
mId
});
return
{
dataInfo
};
}
// let dataInfo = {
// state:enumConfig.STATE.是
// }
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业经营信息, dataInfo, {mId});
// return {dataInfo};
// }
// --------------------------------------经营数据
export
async
function
enterpriseManageList
(
enterpriseName
:
string
,
year
:
number
,
page
:
number
)
{
let
selectParam
:
any
=
{
state
:
1
};
// let selectParam:any = {state:1};
let
selectParam
:
any
=
{};
// if (year) {
// selectParam.annual = getMySqlMs(year);
// }
if
(
year
)
{
selectParam
.
annual
=
getMySqlMs
(
year
)
;
selectParam
.
annual
=
`
${
moment
(
year
).
format
(
"YYYY"
)}
-01-01 00:00:00`
;
}
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
企业基础信息表
]
=
{
column
:
[
"enterpriseName"
,
"uscc"
],
where
:{}
};
manyTableInfo
[
TABLENAME
.
企业基础信息表
]
=
{
column
:
[
"enterpriseName"
,
"uscc"
,
"eId"
],
where
:{}
};
if
(
enterpriseName
)
{
manyTableInfo
[
TABLENAME
.
企业基础信息表
].
where
[
"enterpriseName"
]
=
{
"%like%"
:
enterpriseName
}
}
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表分页
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"mId"
,
"BI"
,
"TXP"
,
"RD"
,
"annual"
,
"
state
"
],
manyTableInfo
,
page
);
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表分页
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"mId"
,
"BI"
,
"TXP"
,
"RD"
,
"annual"
,
"
quarter
"
],
manyTableInfo
,
page
);
let
dataCountList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"eId"
],
manyTableInfo
);
let
dataCount
=
dataCountList
.
length
;
let
dataList
=
[];
resInfo
.
forEach
(
info
=>
{
let
{
BI
,
mId
,
TXP
,
RD
,
state
,
annual
,
enterprise
}
=
info
;
let
{
BI
,
mId
,
TXP
,
RD
,
annual
,
quarter
,
enterprise
}
=
info
;
let
quarterStr
=
"第一季度"
;
if
(
quarter
)
quarterStr
=
changeEnumValue
(
enumConfig
.
QUARTER
,
quarter
);
let
dataInfo
=
{
eId
:
enterprise
.
eId
,
//企业id
enterpriseName
:
enterprise
.
enterpriseName
,
//企业名称
uscc
:
enterprise
.
uscc
,
//统一信用代码
BI
,
//营收(万元)
TXP
:
TXP
,
//纳税(万元)
RD
:
RD
,
//研发投入(万元)
annual
:
moment
(
annual
).
format
(
"YYYY"
),
//年度
state
:
state
?
"已审核"
:
"未审核"
,
annual
:
`
${
moment
(
annual
).
format
(
"YYYY"
)}
-
${
quarterStr
}
`
,
//年度
// quarter:changeEnumValue(enumConfig.QUARTER, quarter),//新增季度
// state:state ? "已审核" : "未审核",
mId
:
mId
};
dataList
.
push
(
dataInfo
);
...
...
@@ -209,28 +220,29 @@ export async function enterpriseManageList(enterpriseName:string, year:number, p
}
export
async
function
outPutEnterpriseManageList
(
enterpriseName
:
string
,
year
:
number
,
state
:
number
,
type
:
number
,
files
)
{
export
async
function
outPutEnterpriseManageList
(
enterpriseName
:
string
,
year
:
number
,
type
:
number
,
files
)
{
let
selectParam
:
any
=
{};
if
(
type
==
1
)
{
// if (year) {
// selectParam.annual = getMySqlMs(year);
//
if
(
year
)
{
selectParam
.
annual
=
getMySqlMs
(
year
);
}
if
(
state
)
{
if
(
state
==
1
)
selectParam
.
state
=
1
;
else
selectParam
.
state
=
0
;
selectParam
.
annual
=
`
${
moment
(
year
).
format
(
"YYYY"
)}
-01-01 00:00:00`
;
}
// if (state) {
// if (state == 1) selectParam.state = 1;
// else selectParam.state = 0;
// }
}
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
企业基础信息表
]
=
{
column
:
[
"enterpriseName"
,
"uscc"
],
where
:{}
};
manyTableInfo
[
TABLENAME
.
企业基础信息表
]
=
{
column
:
[
"enterpriseName"
,
"uscc"
,
"eId"
],
where
:{}
};
if
(
enterpriseName
&&
type
==
1
)
{
manyTableInfo
[
TABLENAME
.
企业经营信息
].
where
[
"enterpriseName"
]
=
{
"%like%"
:
enterpriseName
}
}
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"mId"
,
"BI"
,
"TXP"
,
"RD"
,
"annual"
],
manyTableInfo
);
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业经营信息
,
selectParam
,
[
"mId"
,
"BI"
,
"TXP"
,
"RD"
,
"annual"
,
"quarter"
],
manyTableInfo
);
let
dataList
=
[];
let
titleList
=
[]
...
...
@@ -242,17 +254,21 @@ export async function outPutEnterpriseManageList(enterpriseName:string, year:num
dataList
.
push
(
titleList
);
resInfo
.
forEach
(
info
=>
{
let
{
BI
,
mId
,
TXP
,
RD
,
state
,
annual
,
enterprise
}
=
info
;
let
{
BI
,
mId
,
TXP
,
RD
,
annual
,
quarter
,
enterprise
}
=
info
;
let
quarterStr
=
"第一季度"
;
if
(
quarter
)
quarterStr
=
changeEnumValue
(
enumConfig
.
QUARTER
,
quarter
);
let
subList
=
[];
let
stateStr
=
state
?
"已审核"
:
"未审核"
;
//
let stateStr = state ? "已审核" : "未审核";
valueList
.
forEach
(
subInfo
=>
{
if
(
subInfo
==
"enterpriseName"
)
subList
.
push
(
enterprise
.
enterpriseName
);
if
(
subInfo
==
"uscc"
)
subList
.
push
(
enterprise
.
uscc
);
if
(
subInfo
==
"BI"
)
subList
.
push
(
BI
);
if
(
subInfo
==
"TXP"
)
subList
.
push
(
TXP
);
if
(
subInfo
==
"RD"
)
subList
.
push
(
RD
);
if
(
subInfo
==
"annual"
)
subList
.
push
(
moment
(
annual
).
format
(
"YYYY"
));
if
(
subInfo
==
"state"
)
subList
.
push
(
stateStr
);
if
(
subInfo
==
"annual"
)
subList
.
push
(
`
${
moment
(
annual
).
format
(
"YYYY"
)}
-
${
quarterStr
}
`
);
// if (subInfo == "annual") subList.push(moment(annual).format("YYYY"));
// if (subInfo == "state") subList.push(stateStr);
});
dataList
.
push
(
subList
);
});
...
...
@@ -260,39 +276,50 @@ export async function outPutEnterpriseManageList(enterpriseName:string, year:num
return
{
dataList
};
}
//企业审核通过
// export async function enterpriseManagePass(mId:string) {
// let info = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业经营信息, {mId}, ["mId"]);
// if (!info || !info.mId) throw new BizError(ERRORENUM.当前数据不存在);
export
async
function
enterpriseManagePass
(
mId
:
string
)
{
let
info
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
mId
},
[
"mId"
]);
if
(
!
info
||
!
info
.
mId
)
throw
new
BizError
(
ERRORENUM
.
当前数据不存在
);
// await operationalData(OPERATIONALDATATYPE.修改, TABLENAME.企业经营信息, {state:1}, {mId} );
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业经营信息
,
{
state
:
1
},
{
mId
}
);
return
{
isSuccess
:
true
};
}
// return {isSuccess:true};
// }
//====融资
export
async
function
enterpriseFinancingList
(
enterpriseName
:
string
,
page
:
number
)
{
let
selectParam
:
any
=
{
state
:
enumConfig
.
STATE
.
是
};
//===融资
export
async
function
enterpriseFinancingList
(
enterpriseName
:
string
,
year
:
number
,
page
:
number
)
{
// let selectParam:any = {state:enumConfig.STATE.是};
let
selectParam
:
any
=
{};
if
(
enterpriseName
)
{
selectParam
.
enterpriseName
=
{
"%like%"
:
enterpriseName
}
}
let
manyTableInfo
:
any
=
{};
manyTableInfo
[
TABLENAME
.
企业融资
]
=
{
column
:[
"rId"
,
"financingAmount"
,
"financingRounds"
,
"investmentDate"
,
"investmentInstitutionsName"
],
where
:{}
};
manyTableInfo
[
TABLENAME
.
企业融资
]
=
{
column
:[
"rId"
,
"financingAmount"
,
"financingRounds"
,
"investmentDate"
,
"investmentInstitutionsName"
],
where
:{}
};
let
filesList
=
[
"enterpriseName"
,
"uscc"
,
"eId"
];
if
(
year
)
{
let
selectStartTime
=
getMySqlMs
(
year
);
let
selectEndTime
=
getMySqlMs
(
moment
(
year
).
endOf
(
'year'
).
valueOf
());
//todo 框架问题不能同时查询一个字段
manyTableInfo
[
TABLENAME
.
企业融资
].
where
.
investmentDate
=
{
"%gt%"
:
selectStartTime
};
}
let
resInfo
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表分页
,
TABLENAME
.
企业基础信息表
,
selectParam
,
filesList
,
manyTableInfo
,
page
);
let
dataCountList
=
await
selectManyTableData
(
OPERATIONALDATATYPE
.
多表联查
,
TABLENAME
.
企业基础信息表
,
selectParam
,
filesList
,
manyTableInfo
);
let
dataCount
=
dataCountList
.
length
;
let
dataList
=
[];
resInfo
.
forEach
(
info
=>
{
let
{
eId
,
enterpriseName
,
uscc
,
enterprise_financings
}
=
info
;
let
dataInfo
=
{
eId
,
eId
,
//企业id
enterpriseName
,
//企业名称
uscc
,
//统一信用代码
financingAmount
:
enterprise_financings
[
0
].
financingAmount
,
//融资金额(万元)
...
...
@@ -313,12 +340,13 @@ export async function enterpriseFinancingList(enterpriseName:string, page:number
* @returns
*/
export
async
function
enterpriseFinancingAllYear
(
eId
:
string
)
{
let
filesList
=
[
"rId"
,
"financingAmount"
,
"financingRounds"
,
"investmentDate"
,
"investmentInstitutionsName"
];
let
filesList