Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
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
zjxcxServer
Commits
d2970f38
Commit
d2970f38
authored
Apr 06, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.1 代码规整
parent
6674ffbd
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
115 additions
and
72 deletions
+115
-72
enterprise.ts
src/biz/admin/enterprise/enterprise.ts
+5
-3
financing.ts
src/biz/admin/enterprise/financing.ts
+7
-8
fuHuaQi.ts
src/biz/admin/fuHuaQi/fuHuaQi.ts
+10
-9
month.ts
src/biz/admin/fuHuaQi/month.ts
+5
-5
task.ts
src/biz/admin/fuHuaQi/task.ts
+4
-5
provide.ts
src/biz/admin/provide.ts
+5
-3
enterprise.ts
src/biz/mobileFuHuaQi/enterprise/enterprise.ts
+3
-2
financing.ts
src/biz/mobileFuHuaQi/enterprise/financing.ts
+2
-2
base.ts
src/biz/mobileFuHuaQi/fuHuaQi/base.ts
+2
-2
score.ts
src/biz/mobileFuHuaQi/fuHuaQi/score.ts
+4
-3
task.ts
src/biz/mobileFuHuaQi/fuHuaQi/task.ts
+1
-1
user.ts
src/biz/mobileFuHuaQi/fuHuaQi/user.ts
+5
-5
user.ts
src/biz/mobileFuHuaQi/guanWeiHui/user.ts
+1
-1
sms.ts
src/biz/sms.ts
+1
-0
systemTask.ts
src/biz/systemTask.ts
+1
-1
enterprise.ts
src/data/enterprise/enterprise.ts
+6
-2
grade.ts
src/data/fuHuaQi/grade.ts
+1
-1
monthTable.ts
src/data/fuHuaQi/monthTable.ts
+4
-1
score.ts
src/data/fuHuaQi/score.ts
+9
-2
smsPointOut.ts
src/data/fuHuaQi/smsPointOut.ts
+15
-2
task.ts
src/data/fuHuaQi/task.ts
+24
-14
No files found.
src/biz/admin/enterprise/enterprise.ts
View file @
d2970f38
/**
* 管理后台 企业信息相关接口
* 作者:lxm
*/
import
{
extractData
}
from
"../../../util/piecemeal"
;
import
*
as
enterpriseData
from
"../../../data/enterprise/enterprise"
;
import
*
as
splitResultConfig
from
"../../../config/splitResultConfig"
;
...
...
@@ -9,7 +14,6 @@ import moment = require("moment");
/**
* 获取在孵企业信息列表
* 管理后台端
* @param createType 新注册/迁入 1:全选 2:新注册 3:迁入 以前是时间 2/23日修改为类型
* @param fuHuaQiUscc 所属孵化器
* @param industry 行业领域
...
...
@@ -80,7 +84,6 @@ export async function enterpriseList(createType:number, fuHuaQiUscc:string, indu
/**
* 导出在孵企业信息列表
* 管理后台端
* @param createType 新注册时间/迁入时间
* @param fuHuaQiUscc 所属孵化器
* @param industry 行业领域 数组
...
...
@@ -159,7 +162,6 @@ export async function outPutEnterpriseData(createType:number, fuHuaQiUscc:string
/**
* 在孵企业页面的所属孵化器 下拉框
* 管理后台端
* 只返回有入孵企业的孵化器
* @returns result result类型为数组对象 对象内容为{name, uscc}
*/
...
...
src/biz/admin/enterprise/financing.ts
View file @
d2970f38
import
*
as
eccFormParamConfig
from
"../../../config/eccFormParamConfig"
;
/**
* 管理后台 企业融资相关接口
* 作者:lxm
*/
import
{
ERRORENUM
}
from
"../../../config/errorEnum"
;
import
*
as
financingData
from
"../../../data/enterprise/financing"
;
import
*
as
splitResultConfig
from
"../../../config/splitResultConfig"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
*
as
sysTools
from
"../../../tools/system"
;
import
*
as
enterpriseData
from
"../../../data/enterprise/enterprise"
;
import
*
as
fuhuaqiData
from
"../../../data/fuHuaQi/fuhuaqi"
;
import
moment
=
require
(
"moment"
);
import
*
as
configEnum
from
"../../../config/enum"
;
import
{
eccFormParam
}
from
"../../../util/verificationParam"
;
import
{
changeEnumValue
,
eccEnumValue
}
from
"../../../util/verificationEnum"
;
import
{
checkChange
,
extractData
}
from
"../../../util/piecemeal"
;
import
{
changeEnumValue
}
from
"../../../util/verificationEnum"
;
import
{
extractData
}
from
"../../../util/piecemeal"
;
/**
* 融资企业信息列表
* 管理后台端
* @param monthData 数据月份 目前数据库没有该字段
* @param fuHuaQiName 所属孵化器 这里前端传的是孵化器的统一信用代码
* @param industry 行业领域
...
...
@@ -67,7 +67,6 @@ export async function financingList(monthData:string, fuHuaQiName:string, indust
/**
* 导出融资企业信息列表
* 管理后台端
* @param monthData 数据月份 目前数据库没有该字段
* @param fuHuaQiName 所属孵化器
* @param industry 行业领域
...
...
src/biz/admin/fuHuaQi/fuHuaQi.ts
View file @
d2970f38
/**
* 管理后台 孵化器信息相关接口
* 作者:lxm
*/
import
*
as
eccFormParamConfig
from
"../../../config/eccFormParamConfig"
;
import
{
findEnterpriseCountByFuHuaQiUscc
,
groupFindEnterpriseCount
}
from
"../../../data/enterprise/enterprise"
;
import
*
as
fuhuaqiData
from
"../../../data/fuHuaQi/fuhuaqi"
;
...
...
@@ -20,7 +25,6 @@ import { sendInitPointOut } from "../../sms";
/**
* 获取孵化器基本信息列表
* 管理后台端
* @param lv 孵化器等级
* @param institutionalNature 机构性质
* @param industry 领域
...
...
@@ -248,8 +252,7 @@ export async function outPutFuHuaQiBaseData(lv:number, institutionalNature:numbe
/**
* 修改账号状态
* 管理后台端 禁用/启用
* 修改账号状态 禁用/启用
* @param uscc 孵化器统一信用代码
* @param userStatem 是否禁用 true=启用 false=禁用
* @returns
...
...
@@ -267,7 +270,6 @@ export async function updateState(uscc:string, userState:boolean) {
/**
* 添加孵化器账号
* 管理后台端
* @param param 表单信息
* @returns
*/
...
...
@@ -326,7 +328,6 @@ export async function addUser(param) {
/**
* 孵化器账号信息列表
* 管理后台使用
* @param operationName 运营机构名称
* @param page 页数
* @returns
...
...
@@ -353,9 +354,9 @@ export async function fuHuaQiUserList(operationName:string, page:number) {
/**
* 查询孵化器评分排名
* @param time
* @param name
* @param pange
* @param time
月份时间戳
* @param name
孵化器机构名称 带模糊查询
* @param pange
查询页面
*/
export
async
function
fuHuaQiScore
(
time
:
number
,
name
:
string
,
page
:
number
)
{
let
nameMap
=
await
fuhuaqiData
.
findAllFuHuaQiOperationNameMap
();
...
...
@@ -408,7 +409,7 @@ export async function fuHuaQiScore(time:number, name:string, page:number) {
/**
* 导出孵化器评分排名
* @param time
* @param time
月份时间戳
*/
export
async
function
outPutFuHuaQiScore
(
time
:
number
)
{
let
nameMap
=
await
fuhuaqiData
.
findAllFuHuaQiOperationNameMap
();
...
...
src/biz/admin/fuHuaQi/month.ts
View file @
d2970f38
/**
* 管理后台 月度任务相关
* 作者:lxm
*/
import
{
ERRORENUM
}
from
"../../../config/errorEnum"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
*
as
monthData
from
"../../../data/fuHuaQi/monthTable"
;
import
{
extractData
}
from
"../../../util/piecemeal"
;
import
*
as
sysTools
from
"../../../tools/system"
;
import
{
findAllFuHuaQiOperationNameMap
}
from
"../../../data/fuHuaQi/fuhuaqi"
;
import
*
as
splitResultConfig
from
"../../../config/splitResultConfig"
;
import
{
OUTPUTTYPE
}
from
"../../../config/enum"
;
/**
* 月度出租率数据列表
* 管理后台端
* @param state 填报状态
* @param year 数据年份
* @param month 数据月份
...
...
@@ -47,7 +48,6 @@ export async function monthTableList(state:number, year:number, month:number, pa
/**
* 导出月度出租率数据列表
* 管理后台端
* @param state 填报状态
* @param year 数据年份
* @param month 数据月份
...
...
src/biz/admin/fuHuaQi/task.ts
View file @
d2970f38
...
...
@@ -2,14 +2,13 @@
* 管理后台 任务中心相关逻辑
*/
import
{
OUTPUTTYPE
,
TASKTYPEENUM
,
UPDATESTATE
}
from
"../../../config/enum"
;
import
{
OUTPUTTYPE
,
TASKTYPEENUM
}
from
"../../../config/enum"
;
import
*
as
taskData
from
"../../../data/fuHuaQi/task"
;
import
*
as
fuhuaqiData
from
"../../../data/fuHuaQi/fuhuaqi"
;
import
{
BizError
}
from
"../../../util/bizError"
;
import
{
ERRORENUM
}
from
"../../../config/errorEnum"
;
/**
* 融资企业填报任务 列表
* @param upState 填报状态
...
...
@@ -43,7 +42,7 @@ export async function financingTaskList(state:number, time:number, page:number)
reslutList
.
push
(
item
);
});
let
count
=
await
taskData
.
findTaskCountByParam
And
(
selectParam
);
let
count
=
await
taskData
.
findTaskCountByParam
Count
(
selectParam
);
let
pageCount
=
Math
.
ceil
(
count
/
10
);
return
{
count
,
dataList
:
reslutList
,
pageCount
};
...
...
@@ -93,6 +92,7 @@ export async function outPutFinancingTaskList(state:number, time:number, type:nu
return
{
dataList
,
name
};
}
/**
* 新增企业任务 列表
* @param upState 填报状态
...
...
@@ -125,14 +125,13 @@ export async function addEnterpriseTaskList(state:number, time:number, page:numb
reslutList
.
push
(
item
);
});
let
count
=
await
taskData
.
findTaskCountByParam
And
(
selectParam
);
let
count
=
await
taskData
.
findTaskCountByParam
Count
(
selectParam
);
let
pageCount
=
Math
.
ceil
(
count
/
10
);
return
{
count
,
dataList
:
reslutList
,
pageCount
};
}
/**
* 导出新增企业任务 列表
* @param upState 填报状态
...
...
src/biz/admin/provide.ts
View file @
d2970f38
/**内部开放接口 */
/**
* 内部开放接口
* 用于版本更新的数据维护
*/
import
*
as
monthTableData
from
"../../data/fuHuaQi/monthTable"
;
import
*
as
taskData
from
"../../data/fuHuaQi/task"
;
...
...
@@ -14,7 +17,6 @@ import { initFuHuaQiScore } from "../../data/fuHuaQi/score";
import
{
updateScore
}
from
"../mobileFuHuaQi/fuHuaQi/score"
;
/**
* 发放1月数据
*/
...
...
@@ -142,7 +144,7 @@ export async function replenishTaskData() {
/**
* 2.1
* 2.1
同步地址
*/
export
async
function
updateAdd
()
{
/**查找所有孵化器 */
...
...
src/biz/mobileFuHuaQi/enterprise/enterprise.ts
View file @
d2970f38
/**
* 企业相关逻辑
* 作者:
李欣鸣
*
小程序端 孵化器入口
企业相关逻辑
* 作者:
lxm
* 包括新注册企业,迁入企业
*
*/
import
*
as
eccFormParamConfig
from
"../../../config/eccFormParamConfig"
;
import
{
ERRORENUM
}
from
"../../../config/errorEnum"
;
import
{
BizError
}
from
"../../../util/bizError"
;
...
...
src/biz/mobileFuHuaQi/enterprise/financing.ts
View file @
d2970f38
/**
* 企业融资相关逻辑
* 作者:
李欣鸣
*
小程序端 孵化器入口
企业融资相关逻辑
* 作者:
lxm
* 包括新融资信息的增删改查
*
*/
...
...
src/biz/mobileFuHuaQi/fuHuaQi/base.ts
View file @
d2970f38
/**
* 孵化器基础数据相关逻辑
* 作者:
李欣鸣
*
小程序端 孵化器入口
孵化器基础数据相关逻辑
* 作者:
lxm
* 孵化器相关逻辑 包括孵化器的增删改查
*
*/
...
...
src/biz/mobileFuHuaQi/fuHuaQi/score.ts
View file @
d2970f38
/**
* 分数
* 小程序端 孵化器入口 孵化器分数相关逻辑
* 作者:lxm
*
*/
import
moment
=
require
(
"moment"
);
...
...
@@ -9,12 +11,11 @@ import { findEnterpriseList } from "../../../data/enterprise/enterprise";
import
{
findAllFuHuaQiOperationNameMap
,
findFuHuaQiByUSCC
}
from
"../../../data/fuHuaQi/fuhuaqi"
;
import
*
as
scoreData
from
"../../../data/fuHuaQi/score"
;
import
*
as
scoreLogData
from
"../../../data/fuHuaQi/scoreLog"
;
import
{
changeEnumValue
}
from
"../../../util/verificationEnum"
;
/**
* 获取 孵化器 分数
* @param uscc
* @param uscc
孵化器统一信用代码
*/
export
async
function
getFuHuaQiScore
(
uscc
:
string
)
{
/**计算总分是否和展示分一样 */
...
...
src/biz/mobileFuHuaQi/fuHuaQi/task.ts
View file @
d2970f38
/**
* 孵化器任务相关逻辑
* 作者:
李欣鸣
* 作者:
lxm
* 任务相关逻辑 包括任务的增删改查 管理后台的任务列表逻辑
* 需求说明 1.任务一个月只下一次 不填次月失效
* 2.任务提交之后不可以修改
...
...
src/biz/mobileFuHuaQi/fuHuaQi/user.ts
View file @
d2970f38
...
...
@@ -288,11 +288,11 @@ export async function changePwdSendCode(uscc:string, phone:string) {
/**
* 重置密码
* @param phone
* @param uscc
* @param code
* @param pwd
* @param confirmPwd
* @param phone
负责人电话号码 如果和库里的对不上 就要报错
* @param uscc
孵化器统一信用代码
* @param code
验证码
* @param pwd
密码
* @param confirmPwd
确认密码
*/
export
async
function
resettingPwd
(
phone
:
string
,
uscc
:
string
,
code
:
string
,
pwd
:
string
,
confirmPwd
:
string
)
{
if
(
!
sysTools
.
eccUscc
(
uscc
))
throw
new
BizError
(
ERRORENUM
.
统一社会信用代码不合法
,
'重置密码时'
);
...
...
src/biz/mobileFuHuaQi/guanWeiHui/user.ts
View file @
d2970f38
/**
* 管理后台用户逻辑层
* 作者:
李欣鸣
* 作者:
lxm
* 主要包括有 孵化器账号的登录
* 预留好 重置密码 退出登录 接口
*/
...
...
src/biz/sms.ts
View file @
d2970f38
/**
* 短信主要逻辑
* 作者:lxm
*/
const
tencentcloud
=
require
(
"tencentcloud-sdk-nodejs"
);
...
...
src/biz/systemTask.ts
View file @
d2970f38
/**
* 系统任务逻辑
* 作者:
李欣鸣
* 作者:
lxm
* 目前下发任务有
* 1: 每月1日0时0分,下发孵化器任务
* 2:每月倒数第7天,发送短信提示
...
...
src/data/enterprise/enterprise.ts
View file @
d2970f38
...
...
@@ -247,13 +247,17 @@ export async function updateEnterpriseState(state:number) {
return
await
enterpriseModel
.
updateMany
({},
{
$set
:{
state
}});
}
/**
* 补录企业
* @param fuHuaQiUscc
* @param param
*/
export
async
function
replenishData
(
fuHuaQiUscc
:
string
,
param
)
{
let
addInfo
=
Object
.
assign
({
fuHuaQiUscc
,
createTime
:
new
Date
().
valueOf
()},
param
);
await
enterpriseModel
.
create
(
addInfo
);
}
/**数据维护调用 */
export
async
function
findStats
()
{
return
await
enterpriseModel
.
find
({
enterpriseIsInPut
:
false
});
}
src/data/fuHuaQi/grade.ts
View file @
d2970f38
/**
* 评分表
* 用于存储评分规则
*
*
目前没有用
*/
import
{
Schema
}
from
'mongoose'
;
...
...
src/data/fuHuaQi/monthTable.ts
View file @
d2970f38
...
...
@@ -108,12 +108,15 @@ export async function findMonthTableListCount(selectParam:object) {
}
/**
* 创建月度任务
* @param tableList 任务列表
*/
export
async
function
createMonthTableToList
(
tableList
:
object
)
{
await
monthTableModel
.
insertMany
(
tableList
);
}
/**
* 获取所有月度任务数据
* @param selectParam 查询参数
...
...
src/data/fuHuaQi/score.ts
View file @
d2970f38
...
...
@@ -43,13 +43,18 @@ export async function save(throwError=false) {
});
}
/**
* 查询孵化器分数信息
* @param uscc 孵化器统一信用代码
* @returns
*/
export
async
function
findFuHuaQiScoreInfo
(
uscc
:
string
)
{
return
await
fuHuaQiScoreModel
.
selectOnceData
({
uscc
});
}
/**
* 创建分数信息
*
初始化
创建分数信息
* @param uscc 孵化器统一信用代码
*/
export
async
function
createFuHuaQiScore
(
uscc
:
string
,
lastScore
:
number
)
{
...
...
@@ -57,11 +62,12 @@ export async function createFuHuaQiScore(uscc:string, lastScore:number) {
}
/**数据维护 用于初始化老的数据 */
export
async
function
initFuHuaQiScore
(
array
)
{
return
await
fuHuaQiScoreModel
.
insertMany
(
array
);
}
/**通过条件查询孵化器得分信息 */
export
async
function
findScoreDataByParam
(
param
)
{
return
await
fuHuaQiScoreModel
.
find
(
param
);
}
\ No newline at end of file
src/data/fuHuaQi/smsPointOut.ts
View file @
d2970f38
/**
* 短信提示
*
* 短信提示
表
*
记录每个月的提示情况
*/
import
{
Schema
}
from
'mongoose'
;
...
...
@@ -20,12 +20,25 @@ export function initModel(){
smsPointOutModel
=
baseDB
.
model
(
'smspointout'
,
smsPointOutSchema
);
}
/**
* 创建短信提示记录
* @param month 提示月份
* @param year 提示年份
* @param type 提示类型
* @returns
*/
export
async
function
createSmsPointOutData
(
month
:
number
,
year
:
number
,
type
:
number
)
{
return
await
smsPointOutModel
.
create
({
month
,
year
,
type
,
sendMs
:
new
Date
().
valueOf
()
});
}
/**
* 根据年和月查询提示记录
* @param month 月份
* @param year 年份
* @returns
*/
export
async
function
findSmsPointOutData
(
month
:
number
,
year
:
number
)
{
return
await
smsPointOutModel
.
findOne
({
month
,
year
});
}
src/data/fuHuaQi/task.ts
View file @
d2970f38
...
...
@@ -70,7 +70,11 @@ export async function findEnterpriseByTaskIdAndType(taskId:string, type:number)
return
await
fuHuaQiTaskModel
.
selectOnceData
({
taskId
,
type
});
}
/**
* 根据任务标识查询任务列表
* @param key 任务标识
* @returns
*/
export
async
function
findTaskCountByKey
(
key
:
number
)
{
return
await
fuHuaQiTaskModel
.
find
({
key
}).
count
();
}
...
...
@@ -84,16 +88,11 @@ export async function createTaskToList(taskList:object) {
await
fuHuaQiTaskModel
.
insertMany
(
taskList
);
}
export
async
function
findTaskListByType
(
param
)
{
let
taskList
=
await
fuHuaQiTaskModel
.
find
(
param
);
let
map
=
{};
taskList
.
forEach
(
info
=>
{
map
[
info
.
taskId
]
=
info
.
isSubmit
});
return
map
;
}
/**
* 更具条件查询任务列表
* @param param
* @returns
*/
export
async
function
findTaskListByParam
(
param
)
{
let
taskList
=
await
fuHuaQiTaskModel
.
find
(
param
);
return
taskList
;
...
...
@@ -108,16 +107,26 @@ export async function updateTaskYearData(year:number) {
return
await
fuHuaQiTaskModel
.
updateMany
({},
{
$set
:{
year
}});
}
/**
* 根据条件分页查询任务列表
* @param selectParam 查询条件
* @param skipCount 分页标识
* @returns
*/
export
async
function
findTaskListByParamAndPage
(
selectParam
,
skipCount
:
number
)
{
return
await
fuHuaQiTaskModel
.
find
(
selectParam
).
skip
(
skipCount
).
limit
(
10
);
}
export
async
function
findTaskCountByParamAnd
(
selectParam
)
{
/**
* 根据条件查询 任务数
* @param selectParam 查询条件
* @returns
*/
export
async
function
findTaskCountByParamCount
(
selectParam
)
{
return
await
fuHuaQiTaskModel
.
find
(
selectParam
).
count
();
}
/**数据维护 */
export
async
function
updateSubmitCount
(
taskId
:
string
,
type
:
number
,
count
:
number
)
{
await
fuHuaQiTaskModel
.
updateOne
({
type
,
taskId
},
{
$set
:{
submitCount
:
count
}});
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment