Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wenHuaBu_adminServer
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
wenHuaBu_adminServer
Commits
b074cfe7
Commit
b074cfe7
authored
Dec 16, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
db75bb32
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
470 additions
and
22 deletions
+470
-22
apply.ts
src/biz/member/apply.ts
+244
-3
examine.ts
src/biz/member/examine.ts
+10
-4
homePage.ts
src/biz/member/homePage.ts
+67
-2
user.ts
src/biz/member/user.ts
+2
-1
register.ts
src/biz/register.ts
+2
-2
enum.ts
src/config/enum.ts
+9
-0
errorEnum.ts
src/config/errorEnum.ts
+3
-1
serverConfig.ts
src/config/serverConfig.ts
+22
-0
model.ts
src/data/models/model.ts
+23
-3
router.ts
src/routers/apply/router.ts
+54
-0
router.ts
src/routers/member/router.ts
+21
-1
router.ts
src/routers/router.ts
+3
-3
system.ts
src/tools/system.ts
+10
-2
No files found.
src/biz/member/apply.ts
View file @
b074cfe7
...
@@ -3,14 +3,14 @@
...
@@ -3,14 +3,14 @@
*/
*/
import
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
{
CERTIFICATETYPE
,
CHANGEAPPLYTYPE
,
CLIENTMSGLABLE
,
INDIVIDUALMEMBERTYPE
,
MEMBERLEVEL
,
MEMBERSTATE
,
MEMBERTYPE
,
STATE
,
UNITMEMBERTYPE
}
from
"../../config/enum"
;
import
{
CERTIFICATETYPE
,
CHANGEAPPLYTYPE
,
CLIENTMSGLABLE
,
INDIVIDUALMEMBERTYPE
,
INFOCHANGEAPPLYTYPE
,
MEMBERLEVEL
,
MEMBERSTATE
,
MEMBERTYPE
,
STATE
,
UNITMEMBERTYPE
}
from
"../../config/enum"
;
import
{
TABLEENUM
}
from
"../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../data/models/model"
;
import
{
find
,
findCount
,
findOnce
,
findToSortToPage
}
from
"../../data/select"
;
import
{
find
,
findCount
,
findOnce
,
find
OnceToSort
,
findToPage
,
find
ToSortToPage
}
from
"../../data/select"
;
import
{
extractData
}
from
"../../util/piecemeal"
;
import
{
extractData
}
from
"../../util/piecemeal"
;
import
{
changeEnumValue
}
from
"../../util/verificationEnum"
;
import
{
changeEnumValue
}
from
"../../util/verificationEnum"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
getMenberNum
,
successResult
}
from
"../../tools/system"
;
import
{
ge
nerateSystemId
,
ge
tMenberNum
,
successResult
}
from
"../../tools/system"
;
import
{
updateOneData
}
from
"../../data/update"
;
import
{
updateOneData
}
from
"../../data/update"
;
import
{
setEnumInterface
}
from
"../public"
;
import
{
setEnumInterface
}
from
"../public"
;
import
{
addOneData
}
from
"../../data/add"
;
import
{
addOneData
}
from
"../../data/add"
;
...
@@ -346,7 +346,248 @@ export async function outPutApply() {
...
@@ -346,7 +346,248 @@ export async function outPutApply() {
}
}
//==========================资料变更
/**
* 列表 success
* @param userId
* @returns
*/
export
async
function
infomationChangeList
({
name
,
changeState
,
pageNumber
})
{
let
selectParam
:
any
=
{
memberType
:
MEMBERTYPE
.
单位会员
,
infoChangeId
:{
"$ne"
:
null
}};
if
(
name
)
{
selectParam
.
unitName
=
{
"$regex"
:
name
}
}
if
(
changeState
)
{
selectParam
.
infoChangeOptionType
=
changeState
;
}
let
dbList
=
await
findToPage
(
TABLEENUM
.
用户表
,
selectParam
,
[
"userId"
,
"unitName"
,
"infoChangeId"
],
pageNumber
);
let
dataCount
=
await
findCount
(
TABLEENUM
.
用户表
,
selectParam
);
let
dataList
=
[];
for
(
let
i
=
0
;
i
<
dbList
.
length
;
i
++
)
{
let
info
=
dbList
[
i
];
let
itemFileList
=
[
"unitName"
,
"uscc"
,
"legalPerson"
,
"unitMemberType"
,
"uusinessLicenseUrl"
,
"applicationForm"
,
"desc"
,
"rejectRemarks"
,
"infoChangeOptionType"
,
"infoChangeId"
];
let
logInfo
=
await
findOnceToSort
(
TABLEENUM
.
资料变更审批历史表
,
{
infoChangeId
:
info
.
infoChangeId
},
{
createTimeMs
:
-
1
},
itemFileList
);
let
item
=
{
infoChangeOptionType
:
changeEnumValue
(
INFOCHANGEAPPLYTYPE
,
logInfo
.
infoChangeOptionType
),
infoChangeId
:
info
.
infoChangeId
,
unitName
:
logInfo
.
unitName
,
uscc
:
logInfo
.
uscc
,
legalPerson
:
logInfo
.
legalPerson
,
unitMemberType
:
changeEnumValue
(
UNITMEMBERTYPE
,
logInfo
.
unitMemberType
),
uusinessLicenseUrl
:
logInfo
.
uusinessLicenseUrl
,
applicationForm
:
logInfo
.
applicationForm
,
desc
:
logInfo
.
desc
,
};
dataList
.
push
(
item
);
}
return
{
dataList
,
dataCount
};
}
export
async
function
infomationChangePass
({
infoChangeId
})
{
let
selectParam
:
any
=
{
infoChangeId
};
let
fileList
=
[
"userId"
,
"unitName"
,
"uscc"
,
"legalPerson"
,
"unitMemberType"
,
"uusinessLicenseUrl"
,
"applicationForm"
,
"desc"
,
"rejectRemarks"
,
"infoChangeOptionType"
,
"infoChangeId"
];
let
onceData
=
await
findOnceToSort
(
TABLEENUM
.
资料变更审批历史表
,
selectParam
,
{
createTimeMs
:
-
1
},
fileList
);
if
(
!
onceData
||
!
onceData
.
infoChangeId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
onceData
.
userId
},
[
"infoChangeId"
,
"infoChangeOptionType"
]);
if
(
userInfo
.
infoChangeOptionType
==
INFOCHANGEAPPLYTYPE
.
通过
)
{
throw
new
BizError
(
ERRORENUM
.
不可重复提交
);
}
//添加日志
let
applyInfo
:
any
=
{
infoChangeId
,
applyId
:
generateSystemId
(
TABLEENUM
.
理事变更审批历史表
,
onceData
.
userId
),
userId
:
onceData
.
userId
,
unitName
:
onceData
.
unitName
,
infoChangeOptionType
:
INFOCHANGEAPPLYTYPE
.
通过
,
uscc
:
onceData
.
uscc
,
legalPerson
:
onceData
.
legalPerson
,
unitMemberType
:
onceData
.
unitMemberType
,
uusinessLicenseUrl
:
onceData
.
uusinessLicenseUrl
,
applicationForm
:
onceData
.
applicationForm
,
desc
:
onceData
.
desc
,
createTimeMs
:
new
Date
().
valueOf
()
};
await
addOneData
(
TABLEENUM
.
理事变更审批历史表
,
applyInfo
);
let
updateInfo
=
{
infoChangeOptionType
:
INFOCHANGEAPPLYTYPE
.
通过
,
unitName
:
onceData
.
unitName
,
uscc
:
onceData
.
uscc
,
legalPerson
:
onceData
.
legalPerson
,
unitMemberType
:
onceData
.
unitMemberType
,
uusinessLicenseUrl
:
onceData
.
uusinessLicenseUrl
,
applicationForm
:
onceData
.
applicationForm
};
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
onceData
.
userId
},
updateInfo
);
return
successResult
();
}
export
async
function
infomationChangeOut
({
infoChangeId
,
rejectRemarks
})
{
let
selectParam
:
any
=
{
infoChangeId
};
let
fileList
=
[
"userId"
,
"unitName"
,
"uscc"
,
"legalPerson"
,
"unitMemberType"
,
"uusinessLicenseUrl"
,
"applicationForm"
,
"desc"
,
"rejectRemarks"
,
"infoChangeOptionType"
,
"infoChangeId"
];
let
onceData
=
await
findOnceToSort
(
TABLEENUM
.
资料变更审批历史表
,
selectParam
,
{
createTimeMs
:
-
1
},
fileList
);
if
(
!
onceData
||
!
onceData
.
infoChangeId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
onceData
.
userId
},
[
"infoChangeId"
,
"infoChangeOptionType"
]);
if
(
userInfo
.
infoChangeOptionType
==
INFOCHANGEAPPLYTYPE
.
驳回修改
)
{
throw
new
BizError
(
ERRORENUM
.
不可重复提交
);
}
//添加日志
let
applyInfo
:
any
=
{
infoChangeId
,
applyId
:
generateSystemId
(
TABLEENUM
.
理事变更审批历史表
,
onceData
.
userId
),
userId
:
onceData
.
userId
,
unitName
:
onceData
.
unitName
,
infoChangeOptionType
:
INFOCHANGEAPPLYTYPE
.
驳回修改
,
uscc
:
onceData
.
uscc
,
legalPerson
:
onceData
.
legalPerson
,
unitMemberType
:
onceData
.
unitMemberType
,
uusinessLicenseUrl
:
onceData
.
uusinessLicenseUrl
,
applicationForm
:
onceData
.
applicationForm
,
desc
:
onceData
.
desc
,
rejectRemarks
:
rejectRemarks
,
createTimeMs
:
new
Date
().
valueOf
()
};
await
addOneData
(
TABLEENUM
.
理事变更审批历史表
,
applyInfo
);
let
updateInfo
=
{
infoChangeOptionType
:
INFOCHANGEAPPLYTYPE
.
驳回修改
,
};
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
onceData
.
userId
},
updateInfo
);
return
successResult
();
}
export
async
function
infomationChangeLog
({
infoChangeId
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
infoChangeId
},
[
"userId"
]);
if
(
!
userInfo
||
!
userInfo
.
userId
)
{
throw
new
BizError
(
ERRORENUM
.
不存在审批历史
);
}
let
selectParam
:
any
=
{
userId
:
userInfo
.
userId
};
let
fileList
=
[
"unitName"
,
"uscc"
,
"legalPerson"
,
"unitMemberType"
,
"uusinessLicenseUrl"
,
"applicationForm"
,
"desc"
,
"rejectRemarks"
,
"infoChangeOptionType"
,
"infoChangeId"
];
let
dbList
=
await
find
(
TABLEENUM
.
资料变更审批历史表
,
selectParam
,
fileList
);
let
dataList
=
[];
for
(
let
i
=
0
;
i
<
dbList
.
length
;
i
++
)
{
let
info
=
dbList
[
i
];
let
itemFileList
=
[
"unitName"
,
"uscc"
,
"legalPerson"
,
"unitMemberType"
,
"uusinessLicenseUrl"
,
"applicationForm"
,
"desc"
,
"rejectRemarks"
,
"infoChangeOptionType"
,
"infoChangeId"
];
let
logInfo
=
await
findOnceToSort
(
TABLEENUM
.
资料变更审批历史表
,
{
infoChangeId
:
info
.
infoChangeId
},
{
createTimeMs
:
-
1
},
itemFileList
);
let
item
=
{
infoChangeOptionType
:
changeEnumValue
(
INFOCHANGEAPPLYTYPE
,
logInfo
.
infoChangeOptionType
),
infoChangeId
:
info
.
infoChangeId
,
unitName
:
logInfo
.
unitName
,
uscc
:
logInfo
.
uscc
,
legalPerson
:
logInfo
.
legalPerson
,
unitMemberType
:
changeEnumValue
(
UNITMEMBERTYPE
,
logInfo
.
unitMemberType
),
uusinessLicenseUrl
:
logInfo
.
uusinessLicenseUrl
,
applicationForm
:
logInfo
.
applicationForm
,
desc
:
logInfo
.
desc
,
time
:
moment
(
logInfo
.
createTimeMs
).
format
(
"YYYY-MM-DD"
),
};
dataList
.
push
(
item
);
}
return
{
dataList
};
}
export
async
function
infomationChangeManyPass
({
infoChangeIdList
})
{
for
(
let
i
=
0
;
i
<
infoChangeIdList
.
length
;
i
++
)
{
let
infoChangeId
=
infoChangeIdList
[
i
];
let
selectParam
:
any
=
{
infoChangeId
};
let
fileList
=
[
"userId"
,
"unitName"
,
"uscc"
,
"legalPerson"
,
"unitMemberType"
,
"uusinessLicenseUrl"
,
"applicationForm"
,
"desc"
,
"rejectRemarks"
,
"infoChangeOptionType"
,
"infoChangeId"
];
let
onceData
=
await
findOnceToSort
(
TABLEENUM
.
资料变更审批历史表
,
selectParam
,
{
createTimeMs
:
-
1
},
fileList
);
if
(
!
onceData
||
!
onceData
.
infoChangeId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
onceData
.
userId
},
[
"infoChangeId"
,
"infoChangeOptionType"
]);
if
(
userInfo
.
infoChangeOptionType
==
INFOCHANGEAPPLYTYPE
.
通过
)
{
throw
new
BizError
(
ERRORENUM
.
不可重复提交
);
}
//添加日志
let
applyInfo
:
any
=
{
infoChangeId
,
applyId
:
generateSystemId
(
TABLEENUM
.
理事变更审批历史表
,
onceData
.
userId
),
userId
:
onceData
.
userId
,
unitName
:
onceData
.
unitName
,
infoChangeOptionType
:
INFOCHANGEAPPLYTYPE
.
通过
,
uscc
:
onceData
.
uscc
,
legalPerson
:
onceData
.
legalPerson
,
unitMemberType
:
onceData
.
unitMemberType
,
uusinessLicenseUrl
:
onceData
.
uusinessLicenseUrl
,
applicationForm
:
onceData
.
applicationForm
,
desc
:
onceData
.
desc
,
createTimeMs
:
new
Date
().
valueOf
()
};
await
addOneData
(
TABLEENUM
.
理事变更审批历史表
,
applyInfo
);
let
updateInfo
=
{
infoChangeOptionType
:
INFOCHANGEAPPLYTYPE
.
通过
,
unitName
:
onceData
.
unitName
,
uscc
:
onceData
.
uscc
,
legalPerson
:
onceData
.
legalPerson
,
unitMemberType
:
onceData
.
unitMemberType
,
uusinessLicenseUrl
:
onceData
.
uusinessLicenseUrl
,
applicationForm
:
onceData
.
applicationForm
};
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
onceData
.
userId
},
updateInfo
);
}
return
successResult
();
}
/**
* 列表 success
* @param userId
* @returns
*/
export
async
function
outPutInfomationChangeList
({
name
,
changeState
})
{
let
selectParam
:
any
=
{
state
:
1
,
infoChangeId
:{
"$ne"
:
""
}};
if
(
name
)
{
selectParam
.
unitName
=
{
"$regex"
:
name
}
}
if
(
changeState
)
{
selectParam
.
infoChangeOptionType
=
changeState
;
}
let
dbList
=
await
find
(
TABLEENUM
.
用户表
,
selectParam
,
[
"userId"
,
"unitName"
,
"infoChangeId"
]);
let
dataList
=
[[
"状态"
,
"单位会员名称"
,
"统一信用代码"
,
"法人代表"
,
"单位会员类型"
,
"营业执照"
,
"盖章申请表"
,
"描述"
]];
for
(
let
i
=
0
;
i
<
dbList
.
length
;
i
++
)
{
let
info
=
dbList
[
i
];
let
itemFileList
=
[
"unitName"
,
"uscc"
,
"legalPerson"
,
"unitMemberType"
,
"uusinessLicenseUrl"
,
"applicationForm"
,
"desc"
,
"rejectRemarks"
,
"infoChangeOptionType"
,
"infoChangeId"
];
let
logInfo
=
await
findOnceToSort
(
TABLEENUM
.
用户表
,
{
infoChangeId
:
info
.
infoChangeId
},
{
createTimeMs
:
-
1
},
itemFileList
);
let
subList
=
[
logInfo
.
infoChangeOptionType
,
logInfo
.
unitName
,
logInfo
.
uscc
,
logInfo
.
legalPerson
,
logInfo
.
unitMemberType
,
logInfo
.
uusinessLicenseUrl
,
logInfo
.
applicationForm
,
logInfo
.
desc
,
]
dataList
.
push
(
subList
);
}
return
{
dataList
};
}
src/biz/member/examine.ts
View file @
b074cfe7
...
@@ -9,13 +9,14 @@ import { addManyData } from "../../data/add";
...
@@ -9,13 +9,14 @@ import { addManyData } from "../../data/add";
import
{
TABLEENUM
}
from
"../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../data/models/model"
;
import
{
find
,
findCount
,
findOnce
,
findToSortToPage
}
from
"../../data/select"
;
import
{
find
,
findCount
,
findOnce
,
findToSortToPage
}
from
"../../data/select"
;
import
{
updateOneData
}
from
"../../data/update"
;
import
{
updateOneData
}
from
"../../data/update"
;
import
{
generateSystemId
,
getMenberNum
,
successResult
}
from
"../../tools/system"
;
import
{
generateSystemId
,
getMenberNum
,
getSessionByEdition
,
successResult
}
from
"../../tools/system"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
extractData
}
from
"../../util/piecemeal"
;
import
{
extractData
}
from
"../../util/piecemeal"
;
import
{
changeEnumValue
}
from
"../../util/verificationEnum"
;
import
{
changeEnumValue
}
from
"../../util/verificationEnum"
;
import
{
createOrder
}
from
"./order"
;
import
{
createOrder
}
from
"./order"
;
import
{
getCityNameByCode
}
from
"../../config/cityConfig"
;
import
{
getCityNameByCode
}
from
"../../config/cityConfig"
;
import
{
sendPassNotice
}
from
"../sms"
;
import
{
sendPassNotice
}
from
"../sms"
;
import
{
SessionTimeMsConfig
}
from
"../../config/serverConfig"
;
/**
/**
* 待审核列表 success
* 待审核列表 success
...
@@ -46,10 +47,15 @@ export async function pendingReviewList({name, memberType, documentId, phone, ma
...
@@ -46,10 +47,15 @@ export async function pendingReviewList({name, memberType, documentId, phone, ma
}
}
if
(
examineState
)
{
if
(
examineState
)
{
if
(
examineState
==
1
)
{
if
(
examineState
==
1
)
{
selectParam
.
userRegisterState
=
{
"$or"
:[
USERREGISTERSTATE
.
待审核
,
USERREGISTERSTATE
.
重新提交
]}
if
(
!
selectParam
[
"$and"
])
selectParam
[
"$and"
]
=
[];
selectParam
[
"$and"
].
push
({
"$or"
:[
{
userRegisterState
:
USERREGISTERSTATE
.
重新提交
},
{
userRegisterState
:
USERREGISTERSTATE
.
待审核
}
]});
}
else
{
}
else
{
selectParam
.
userRegisterState
=
USERREGISTERSTATE
.
驳回修改
selectParam
.
userRegisterState
=
USERREGISTERSTATE
.
驳回修改
}
}
}
}
let
memberTypeLen
=
Object
.
keys
(
MEMBERTYPEECCENUM
).
filter
(
key
=>
isNaN
(
Number
(
key
))).
length
;
let
memberTypeLen
=
Object
.
keys
(
MEMBERTYPEECCENUM
).
filter
(
key
=>
isNaN
(
Number
(
key
))).
length
;
...
@@ -155,7 +161,7 @@ export async function adopt({id, session}) {
...
@@ -155,7 +161,7 @@ export async function adopt({id, session}) {
let
updateInfo
:
any
=
{
let
updateInfo
:
any
=
{
auditTime
:
NowMs
,
auditTime
:
NowMs
,
joinTime
:
NowMs
,
joinTime
:
getSessionByEdition
(
Math
.
floor
(
session
/
100
),
Math
.
floor
(
session
%
100
))
,
userRegisterState
:
USERREGISTERSTATE
.
通过
,
userRegisterState
:
USERREGISTERSTATE
.
通过
,
session
:
session
,
session
:
session
,
paymentStatus
:
PAYMENTSTATUS
.
未支付
,
paymentStatus
:
PAYMENTSTATUS
.
未支付
,
...
@@ -230,7 +236,7 @@ export async function batchAdopt({idList, session}) {
...
@@ -230,7 +236,7 @@ export async function batchAdopt({idList, session}) {
let
updateInfo
:
any
=
{
let
updateInfo
:
any
=
{
auditTime
:
NowMs
,
auditTime
:
NowMs
,
joinTime
:
NowMs
,
joinTime
:
getSessionByEdition
(
Math
.
floor
(
session
/
100
),
Math
.
floor
(
session
%
100
))
,
userRegisterState
:
USERREGISTERSTATE
.
通过
,
userRegisterState
:
USERREGISTERSTATE
.
通过
,
session
:
session
,
session
:
session
,
paymentStatus
:
PAYMENTSTATUS
.
未支付
,
paymentStatus
:
PAYMENTSTATUS
.
未支付
,
...
...
src/biz/member/homePage.ts
View file @
b074cfe7
...
@@ -4,12 +4,12 @@
...
@@ -4,12 +4,12 @@
*/
*/
import
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
{
CHANGEAPPLYTYPE
,
CLIENTMSGLABLE
,
CODPARTICIPANT
,
DOCUMENTTYPE
,
INDIVIDUALMEMBER
TYPE
,
MEMBERLEVEL
,
MEMBERLEVELCHANGE
,
MEMBERSTATE
,
MEMBERTYPE
,
NATION
,
PAYMENTSTATUS
,
PROFCATEGORY
,
SEX
,
STATE
,
UNITMEMBERTYPE
,
USERREGISTERSTATE
}
from
"../../config/enum"
;
import
{
BANXUELEIXING
,
CHANGEAPPLYTYPE
,
CLIENTMSGLABLE
,
CODPARTICIPANT
,
DOCUMENTTYPE
,
INDIVIDUALMEMBERTYPE
,
INFOCHANGEAPPLY
TYPE
,
MEMBERLEVEL
,
MEMBERLEVELCHANGE
,
MEMBERSTATE
,
MEMBERTYPE
,
NATION
,
PAYMENTSTATUS
,
PROFCATEGORY
,
SEX
,
STATE
,
UNITMEMBERTYPE
,
USERREGISTERSTATE
}
from
"../../config/enum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
addManyData
,
addOneData
}
from
"../../data/add"
;
import
{
addManyData
,
addOneData
}
from
"../../data/add"
;
import
{
deleteManyData
}
from
"../../data/delete"
;
import
{
deleteManyData
}
from
"../../data/delete"
;
import
{
TABLEENUM
}
from
"../../data/models/model"
;
import
{
TABLEENUM
}
from
"../../data/models/model"
;
import
{
find
,
findOnce
}
from
"../../data/select"
;
import
{
find
,
findOnce
,
findOnceToSort
}
from
"../../data/select"
;
import
{
updateOneData
}
from
"../../data/update"
;
import
{
updateOneData
}
from
"../../data/update"
;
import
{
generateSystemId
,
getEdition
,
successErrorResult
,
successResult
}
from
"../../tools/system"
;
import
{
generateSystemId
,
getEdition
,
successErrorResult
,
successResult
}
from
"../../tools/system"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
BizError
}
from
"../../util/bizError"
;
...
@@ -606,8 +606,73 @@ export async function applyReason({applyStr, userId}) {
...
@@ -606,8 +606,73 @@ export async function applyReason({applyStr, userId}) {
export
async
function
infomationChangeUpdate
({
userId
,
unitName
,
uscc
,
legalPerson
,
unitMemberType
,
uusinessLicenseUrl
,
applicationForm
,
desc
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
},
[
"memberType"
]);
if
(
userInfo
.
memberType
!=
MEMBERTYPE
.
单位会员
)
throw
new
BizError
(
ERRORENUM
.
非单位会员不可操作
);
//添加日志
/**添加审批历史 */
let
applyInfo
:
any
=
{
applyId
:
generateSystemId
(
TABLEENUM
.
理事变更审批历史表
,
userId
),
infoChangeId
:
generateSystemId
(
TABLEENUM
.
理事变更审批历史表
,
userId
),
userId
,
unitName
,
uscc
,
legalPerson
,
unitMemberType
,
uusinessLicenseUrl
,
applicationForm
,
desc
,
infoChangeOptionType
:
INFOCHANGEAPPLYTYPE
.
待审批
,
createTimeMs
:
new
Date
().
valueOf
()
};
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
{
infoChangeId
:
applyInfo
.
infoChangeId
,
infoChangeOptionType
:
INFOCHANGEAPPLYTYPE
.
待审批
});
await
addOneData
(
TABLEENUM
.
资料变更审批历史表
,
applyInfo
);
return
successResult
();
}
export
async
function
infomationChangeInfo
({
userId
})
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
let
dataInfo
:
any
=
{};
//这里的条件有点乱,因为加班到很晚了
if
(
!
userInfo
.
infoChangeId
||
(
userInfo
.
infoChangeId
&&
userInfo
.
infoChangeOptionType
==
INFOCHANGEAPPLYTYPE
.
通过
))
{
let
userInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
userInfo
.
memberType
!=
MEMBERTYPE
.
单位会员
)
throw
new
BizError
(
ERRORENUM
.
非单位会员不可操作
);
dataInfo
=
{
unitName
:
userInfo
.
unitName
||
""
,
//单位会员名称
uscc
:
userInfo
.
uscc
||
""
,
//统一信用代码
legalPerson
:
userInfo
.
legalPerson
||
""
,
//法人代表
unitMemberType
:
userInfo
.
unitMemberType
||
""
,
//单位会员类型
uusinessLicenseUrl
:
userInfo
.
uusinessLicenseUrl
||
""
,
//营业执照
applicationForm
:
userInfo
.
applicationForm
||
""
,
//盖章申请表
desc
:
""
,
};
}
else
{
let
infomationChangeHistoryInfo
=
await
findOnceToSort
(
TABLEENUM
.
资料变更审批历史表
,
{
userId
},
{
createTimeMs
:
-
1
});
dataInfo
=
{
unitName
:
infomationChangeHistoryInfo
.
unitName
,
//单位会员名称
uscc
:
infomationChangeHistoryInfo
.
uscc
,
//统一信用代码
legalPerson
:
infomationChangeHistoryInfo
.
legalPerson
,
//法人代表
unitMemberType
:
infomationChangeHistoryInfo
.
unitMemberType
,
//单位会员类型
uusinessLicenseUrl
:
infomationChangeHistoryInfo
.
uusinessLicenseUrl
,
//营业执照
applicationForm
:
infomationChangeHistoryInfo
.
applicationForm
,
//盖章申请表
desc
:
infomationChangeHistoryInfo
.
desc
};
}
const
UnitConfig
=
[
"unitMemberType"
,
"yuanXiaoBanXueLeiXing"
,
"yuanXiaoZhuGuanBuMen"
,
"yuanXiaoFuZeRen"
,
"yuanXiaoFuZeRenZhiWu"
,
"yuanXiaoBanGongFuZeRenZhiWu"
,
"yuanXiaoFuZeRenDianHua"
,
"yuanXiaoBanGongFuZeRen"
,
"yuanXiaoBanGongFuZeRenDianHua"
,
"ZhuYaoFuZeRenYouXiang"
,
"yuanXiaoKeYanFuZeRen"
,
"yuanXiaoKeYanFuZeRenDianHua"
,
"jiaoXueFuZeRenXinMing"
,
"yuanXiaoXueShengZongRenShu"
,
"yuanXiaoJiaoZhiGongZongRenShu"
,
"jiaoXueFuZeRenDianHua"
,
"kaishezhuanYe"
,
"danWeiJianJie"
];
let
unitInfo
:
any
=
extractData
(
userInfo
,
UnitConfig
);
if
(
unitInfo
.
unitMemberType
)
unitInfo
.
unitMemberType
=
changeEnumValue
(
UNITMEMBERTYPE
,
unitInfo
.
unitMemberType
);
if
(
unitInfo
.
yuanXiaoBanXueLeiXing
)
unitInfo
.
yuanXiaoBanXueLeiXing
=
changeEnumValue
(
BANXUELEIXING
,
unitInfo
.
yuanXiaoBanXueLeiXing
);
dataInfo
.
unitInfo
=
unitInfo
;
return
{
dataInfo
};
}
...
...
src/biz/member/user.ts
View file @
b074cfe7
...
@@ -32,7 +32,8 @@ export async function login({loginId, pwd}) {
...
@@ -32,7 +32,8 @@ export async function login({loginId, pwd}) {
return
{
return
{
isInput
:
userInfo
.
isInput
,
isInput
:
userInfo
.
isInput
,
phone
:
userInfo
.
phone
,
phone
:
userInfo
.
phone
,
userId
:
userInfo
.
userId
userId
:
userInfo
.
userId
,
isUniversities
:
UNITMEMBERTYPE
.
院校
==
userInfo
.
unitMemberType
}
}
}
}
...
...
src/biz/register.ts
View file @
b074cfe7
...
@@ -363,8 +363,8 @@ export async function unitMemberEcho2({id}) {
...
@@ -363,8 +363,8 @@ export async function unitMemberEcho2({id}) {
let
unitInfo
:
any
=
extractData
(
oldInfo
,
UnitConfig
);
let
unitInfo
:
any
=
extractData
(
oldInfo
,
UnitConfig
);
delete
basicInfo
.
userId
;
delete
basicInfo
.
userId
;
/**处理枚举值 */
/**处理枚举值 */
//
unitInfo.unitMemberType = changeEnumValue(UNITMEMBERTYPE, unitInfo.unitMemberType);
if
(
unitInfo
.
unitMemberType
)
unitInfo
.
unitMemberType
=
changeEnumValue
(
UNITMEMBERTYPE
,
unitInfo
.
unitMemberType
);
//
unitInfo.yuanXiaoBanXueLeiXing = changeEnumValue(BANXUELEIXING, unitInfo.yuanXiaoBanXueLeiXing);
if
(
unitInfo
.
yuanXiaoBanXueLeiXing
)
unitInfo
.
yuanXiaoBanXueLeiXing
=
changeEnumValue
(
BANXUELEIXING
,
unitInfo
.
yuanXiaoBanXueLeiXing
);
let
oldKeYanList
=
await
find
(
TABLEENUM
.
单位所获得科研成果表
,
{
userId
:
id
});
let
oldKeYanList
=
await
find
(
TABLEENUM
.
单位所获得科研成果表
,
{
userId
:
id
});
let
scientificResearch
=
[];
let
scientificResearch
=
[];
...
...
src/config/enum.ts
View file @
b074cfe7
...
@@ -804,6 +804,15 @@ export enum REGISTERSTART {
...
@@ -804,6 +804,15 @@ export enum REGISTERSTART {
开放注册
开放注册
}
}
/**
* 资料变更审批
*/
export
enum
INFOCHANGEAPPLYTYPE
{
通过
=
1
,
待审批
,
驳回修改
,
}
...
...
src/config/errorEnum.ts
View file @
b074cfe7
...
@@ -73,7 +73,9 @@ export enum ERRORENUM {
...
@@ -73,7 +73,9 @@ export enum ERRORENUM {
请先提供发票信息
,
请先提供发票信息
,
与预览手机号码不一致
,
与预览手机号码不一致
,
账号不存在
,
账号不存在
,
密码修改错误
密码修改错误
,
非单位会员不可操作
,
不存在审批历史
}
}
export
enum
ERRORCODEENUM
{
export
enum
ERRORCODEENUM
{
...
...
src/config/serverConfig.ts
View file @
b074cfe7
...
@@ -6,6 +6,28 @@ import { ServerConfig } from "../config/systemClass";
...
@@ -6,6 +6,28 @@ import { ServerConfig } from "../config/systemClass";
const
os
=
require
(
'os'
);
const
os
=
require
(
'os'
);
export
let
systemConfig
=
new
ServerConfig
;
export
let
systemConfig
=
new
ServerConfig
;
export
const
SessionTimeMsConfig
=
{
"五_一"
:{
activTime
:
'2013-3-30 08:00:00'
,
timeMs
:
new
Date
(
'2013-3-30 08:00:00'
).
valueOf
()},
"五_二"
:{
activTime
:
'2014-4-24 08:00:00'
,
timeMs
:
new
Date
(
'2014-4-24 08:00:00'
).
valueOf
()},
"五_三"
:{
activTime
:
'2015-4-10 08:00:00'
,
timeMs
:
new
Date
(
'2015-4-10 08:00:00'
).
valueOf
()},
"五_四"
:{
activTime
:
'2015-11-4 08:00:00'
,
timeMs
:
new
Date
(
'2015-11-4 08:00:00'
).
valueOf
()},
"五_五"
:{
activTime
:
'2016-4-22 08:00:00'
,
timeMs
:
new
Date
(
'2016-4-22 08:00:00'
).
valueOf
()},
"五_六"
:{
activTime
:
'2016-12-15 08:00:00'
,
timeMs
:
new
Date
(
'2016-12-15 08:00:00'
).
valueOf
()},
"五_七"
:{
activTime
:
'2017-4-6 08:00:00'
,
timeMs
:
new
Date
(
'2017-4-6 08:00:00'
).
valueOf
()},
"六_一"
:{
activTime
:
'2017-6-24 08:00:00'
,
timeMs
:
new
Date
(
'2017-6-24 08:00:00'
).
valueOf
()},
"六_二"
:{
activTime
:
'2017-11-28 08:00:00'
,
timeMs
:
new
Date
(
'2017-11-28 08:00:00'
).
valueOf
()},
"六_三"
:{
activTime
:
'2018-3-26 08:00:00'
,
timeMs
:
new
Date
(
'2018-3-26 08:00:00'
).
valueOf
()},
"六_四"
:{
activTime
:
'2018-12-8 08:00:00'
,
timeMs
:
new
Date
(
'2018-12-8 08:00:00'
).
valueOf
()},
"六_五"
:{
activTime
:
'2019-3-28 08:00:00'
,
timeMs
:
new
Date
(
'2019-3-28 08:00:00'
).
valueOf
()},
"六_六"
:{
activTime
:
'2019-10-25 08:00:00'
,
timeMs
:
new
Date
(
'2019-10-25 08:00:00'
).
valueOf
()},
"六_七"
:{
activTime
:
'2020-12-19 08:00:00'
,
timeMs
:
new
Date
(
'2020-12-19 08:00:00'
).
valueOf
()},
"六_八"
:{
activTime
:
'2021-4-23 08:00:00'
,
timeMs
:
new
Date
(
'2021-4-23 08:00:00'
).
valueOf
()},
"六_九"
:{
activTime
:
'2021-12-3 08:00:00'
,
timeMs
:
new
Date
(
'2021-12-3 08:00:00'
).
valueOf
()},
"六_十"
:{
activTime
:
'2022-12-27 08:00:00'
,
timeMs
:
new
Date
(
'2022-12-27 08:00:00'
).
valueOf
()},
"七_一"
:{
activTime
:
'2023-6-10 08:00:00'
,
timeMs
:
new
Date
(
'2023-6-10 08:00:00'
).
valueOf
()},
"七_二"
:{
activTime
:
'2023-11-13 08:00:00'
,
timeMs
:
new
Date
(
'2023-11-13 08:00:00'
).
valueOf
()},
"七_三"
:{
activTime
:
'2024-5-11 08:00:00'
,
timeMs
:
new
Date
(
'2024-5-11 08:00:00'
).
valueOf
()}
}
const
ConfigName
=
"serverConfig.xml"
;
const
ConfigName
=
"serverConfig.xml"
;
export
async
function
initConfig
()
{
export
async
function
initConfig
()
{
...
...
src/data/models/model.ts
View file @
b074cfe7
...
@@ -95,11 +95,10 @@ enum TABLEENUM {
...
@@ -95,11 +95,10 @@ enum TABLEENUM {
活动通知表
=
"activityNotice"
,
活动通知表
=
"activityNotice"
,
活动报名表
=
"activityEnroll"
,
活动报名表
=
"activityEnroll"
,
理事变更审批历史表
=
"applyHistoryList"
,
理事变更审批历史表
=
"applyHistoryList"
,
系统表
=
"systemConfig"
系统表
=
"systemConfig"
,
资料变更审批历史表
=
"infomationChangeHistory"
,
}
}
const
ModelArray
=
[
const
ModelArray
=
[
{
{
tableName
:
TABLEENUM
.
学会概括
,
tableName
:
TABLEENUM
.
学会概括
,
...
@@ -456,6 +455,8 @@ const ModelArray = [
...
@@ -456,6 +455,8 @@ const ModelArray = [
applyReviewTime
:
'Number'
,
//变更理事审核时间
applyReviewTime
:
'Number'
,
//变更理事审核时间
rejectRemarks
:
'String'
,
//变更理事驳回理由
rejectRemarks
:
'String'
,
//变更理事驳回理由
applyId
:{
type
:
'String'
,
index
:
true
},
applyId
:{
type
:
'String'
,
index
:
true
},
infoChangeId
:{
type
:
"String"
,
index
:
true
},
//资料更新关联id
infoChangeOptionType
:{
type
:
"Number"
}
//INFOCHANGEAPPLYTYPE
}
}
},
},
{
{
...
@@ -633,6 +634,25 @@ const ModelArray = [
...
@@ -633,6 +634,25 @@ const ModelArray = [
}
}
},
},
{
{
tableName
:
TABLEENUM
.
资料变更审批历史表
,
source
:
TABLESOURCEENUM
.
mongo
,
schema
:{
infoChangeId
:{
type
:
'String'
,
index
:
true
},
applyId
:{
type
:
'String'
,
index
:
true
},
userId
:{
type
:
'String'
,
index
:
true
},
//用户id 外键
infoChangeOptionType
:
"Number"
,
//操作类型 INFOCHANGEAPPLYTYPE
unitName
:
"String"
,
//单位会员名称
uscc
:
"String"
,
//统一信用代码
legalPerson
:
"String"
,
//法人代表
unitMemberType
:
"Number"
,
//单位会员类型
uusinessLicenseUrl
:
"String"
,
//营业执照
applicationForm
:
"String"
,
//盖章申请表
desc
:
"String"
,
//描述
rejectRemarks
:
'String'
,
//变更驳回理由
createTimeMs
:
'Number'
,
//日志时间
}
},
{
tableName
:
TABLEENUM
.
系统表
,
tableName
:
TABLEENUM
.
系统表
,
source
:
TABLESOURCEENUM
.
mongo
,
source
:
TABLESOURCEENUM
.
mongo
,
schema
:{
schema
:{
...
...
src/routers/apply/router.ts
View file @
b074cfe7
...
@@ -63,6 +63,60 @@ export const Config = {
...
@@ -63,6 +63,60 @@ export const Config = {
],
],
bindBiz
:
applyBiz
.
applyHistoryList
bindBiz
:
applyBiz
.
applyHistoryList
},
},
//=========================资料变更
{
apiName
:
"资料变更列表"
,
subUrl
:
'/applydb/infomationchange/list'
,
param
:[
{
key
:
"name"
,
type
:
"String"
,
desc
:
"关键字搜索"
,
isNull
:
true
},
{
key
:
"changeState"
,
type
:
"Number"
,
desc
:
"筛选状态 0是全部 1是通过 2是待审批 3是驳回修改"
,
isNull
:
true
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"分页"
},
],
bindBiz
:
applyBiz
.
infomationChangeList
},
{
apiName
:
"资料变更通过"
,
subUrl
:
'/applydb/infomationchange/pass'
,
param
:[
{
key
:
"infoChangeId"
,
type
:
"String"
,
desc
:
"标识"
},
],
bindBiz
:
applyBiz
.
infomationChangePass
},
{
apiName
:
"资料变更批量通过"
,
subUrl
:
'/applydb/infomationchange/manypass'
,
param
:[
{
key
:
"infoChangeIdList"
,
type
:
"[String]"
,
desc
:
"标识"
},
],
bindBiz
:
applyBiz
.
infomationChangeManyPass
},
{
apiName
:
"资料变更导出"
,
subUrl
:
'/applydb/infomationchange/outputlist'
,
param
:[
{
key
:
"name"
,
type
:
"String"
,
desc
:
"关键字搜索"
,
isNull
:
true
},
{
key
:
"changeState"
,
type
:
"Number"
,
desc
:
"筛选状态 0是全部 1是通过 2是待审批 3是驳回修改"
,
isNull
:
true
},
{
key
:
"exportColumns"
,
type
:
"[Object]"
,
desc
:
"导出字段"
}
],
bindBiz
:
applyBiz
.
outPutInfomationChangeList
},
{
apiName
:
"资料变更审批历史"
,
subUrl
:
'/applydb/infomationchange/log'
,
param
:[
{
key
:
"infoChangeId"
,
type
:
"String"
,
desc
:
"标识"
},
],
bindBiz
:
applyBiz
.
infomationChangeLog
},
{
apiName
:
"资料变更审批驳回"
,
subUrl
:
'/applydb/infomationchange/out'
,
param
:[
{
key
:
"infoChangeId"
,
type
:
"String"
,
desc
:
"标识"
},
{
key
:
"rejectRemarks"
,
type
:
"String"
,
desc
:
"驳回理由"
},
],
bindBiz
:
applyBiz
.
infomationChangeOut
}
]
]
}
}
...
...
src/routers/member/router.ts
View file @
b074cfe7
...
@@ -1000,7 +1000,7 @@ export const Config = {
...
@@ -1000,7 +1000,7 @@ export const Config = {
bindBiz
:
homePageBiz
.
getCertificateType
bindBiz
:
homePageBiz
.
getCertificateType
},
},
{
{
apiName
:
"
变更职位
"
,
apiName
:
"
能否申请变更理事
"
,
subUrl
:
'/homepage/getapply'
,
subUrl
:
'/homepage/getapply'
,
param
:[
param
:[
],
],
...
@@ -1015,6 +1015,26 @@ export const Config = {
...
@@ -1015,6 +1015,26 @@ export const Config = {
bindBiz
:
homePageBiz
.
memberlevelUpdate
bindBiz
:
homePageBiz
.
memberlevelUpdate
},
},
{
{
apiName
:
"资料变更"
,
subUrl
:
'/homepage/infomationchange/update'
,
param
:[
{
key
:
"unitName"
,
type
:
"String"
,
desc
:
"单位会员名称"
},
{
key
:
"uscc"
,
type
:
"String"
,
desc
:
"统一信用代码"
},
{
key
:
"legalPerson"
,
type
:
"String"
,
desc
:
"法人代表"
},
{
key
:
"unitMemberType"
,
type
:
"Number"
,
desc
:
"单位会员类型"
},
{
key
:
"uusinessLicenseUrl"
,
type
:
"String"
,
desc
:
"营业执照"
},
{
key
:
"applicationForm"
,
type
:
"String"
,
desc
:
"盖章申请表"
},
{
key
:
"desc"
,
type
:
"String"
,
desc
:
"描述位"
}
],
bindBiz
:
homePageBiz
.
infomationChangeUpdate
},
{
apiName
:
"资料变更回显"
,
subUrl
:
'/homepage/infomationchange/info'
,
param
:[],
bindBiz
:
homePageBiz
.
infomationChangeInfo
},
{
apiName
:
"是否需要补充用户信息"
,
apiName
:
"是否需要补充用户信息"
,
subUrl
:
'/homepage/isneedsupplement'
,
subUrl
:
'/homepage/isneedsupplement'
,
param
:[
param
:[
...
...
src/routers/router.ts
View file @
b074cfe7
...
@@ -31,16 +31,16 @@ export async function setRouter(httpServer){
...
@@ -31,16 +31,16 @@ export async function setRouter(httpServer){
await
getDoc
();
await
getDoc
();
// await initDoc(portalRouter.FirstName, portalRouter.Config, portalRouter.FirstRouter);//网站编辑
// await initDoc(portalRouter.FirstName, portalRouter.Config, portalRouter.FirstRouter);//网站编辑
// await initDoc(publicRouter.FirstName, publicRouter.Config, publicRouter.FirstRouter);//公用组件
// await initDoc(publicRouter.FirstName, publicRouter.Config, publicRouter.FirstRouter);//公用组件
//
await initDoc(memberRouter.FirstName, memberRouter.Config, memberRouter.FirstRouter);//用户路由
await
initDoc
(
memberRouter
.
FirstName
,
memberRouter
.
Config
,
memberRouter
.
FirstRouter
);
//用户路由
// await initDoc(officalWebsiteRouter.FirstName, officalWebsiteRouter.Config, officalWebsiteRouter.FirstRouter);//官网路由
// await initDoc(officalWebsiteRouter.FirstName, officalWebsiteRouter.Config, officalWebsiteRouter.FirstRouter);//官网路由
await
initDoc
(
orderRouter
.
FirstName
,
orderRouter
.
Config
,
orderRouter
.
FirstRouter
);
//会费相关
//
await initDoc(orderRouter.FirstName, orderRouter.Config, orderRouter.FirstRouter);//会费相关
// await initDoc(costRouter.FirstName, costRouter.Config, costRouter.FirstRouter);//支付
// await initDoc(costRouter.FirstName, costRouter.Config, costRouter.FirstRouter);//支付
// await initDoc(outPutRouter.FirstName, outPutRouter.Config, outPutRouter.FirstRouter);//导出路由
// await initDoc(outPutRouter.FirstName, outPutRouter.Config, outPutRouter.FirstRouter);//导出路由
// await initDoc(labelRouter.FirstName, labelRouter.Config, labelRouter.FirstRouter);//标签路由
// await initDoc(labelRouter.FirstName, labelRouter.Config, labelRouter.FirstRouter);//标签路由
// await initDoc("2.0", labelRouter.Config, labelRouter.FirstRouter);//标签路由
// await initDoc("2.0", labelRouter.Config, labelRouter.FirstRouter);//标签路由
// await initDoc("2.0", blacklistRouter.Config, blacklistRouter.FirstRouter);//黑名单路由
// await initDoc("2.0", blacklistRouter.Config, blacklistRouter.FirstRouter);//黑名单路由
// await initDoc("2.0", msgActivityRouter.Config, msgActivityRouter.FirstRouter);//消息活动通知路由
// await initDoc("2.0", msgActivityRouter.Config, msgActivityRouter.FirstRouter);//消息活动通知路由
//
await initDoc(applyRouter.FirstName, applyRouter.Config, applyRouter.FirstRouter);//变更审批路由
await
initDoc
(
applyRouter
.
FirstName
,
applyRouter
.
Config
,
applyRouter
.
FirstRouter
);
//变更审批路由
}
}
analysisRouter
(
httpServer
,
portalRouter
.
Config
,
portalRouter
.
FirstRouter
,
true
);
//网站编辑
analysisRouter
(
httpServer
,
portalRouter
.
Config
,
portalRouter
.
FirstRouter
,
true
);
//网站编辑
analysisRouter
(
httpServer
,
publicRouter
.
Config
,
publicRouter
.
FirstRouter
,
false
);
//公用组件
analysisRouter
(
httpServer
,
publicRouter
.
Config
,
publicRouter
.
FirstRouter
,
false
);
//公用组件
...
...
src/tools/system.ts
View file @
b074cfe7
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
import
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
{
wenZhangQueue
}
from
"../biz/task"
;
import
{
wenZhangQueue
}
from
"../biz/task"
;
import
{
MEMBERTYPE
}
from
"../config/enum"
;
import
{
MEMBERTYPE
}
from
"../config/enum"
;
import
{
SessionTimeMsConfig
}
from
"../config/serverConfig"
;
const
md5
=
require
(
"md5"
);
const
md5
=
require
(
"md5"
);
/**
/**
...
@@ -105,8 +106,15 @@ export function generateWXOrderId(memberType, userId) {
...
@@ -105,8 +106,15 @@ export function generateWXOrderId(memberType, userId) {
/**
/**
* 倒推 届次
* 倒推 届次
*/
*/
export
function
getSessionByEdition
(
jie
,
ci
)
{
export
function
getSessionByEdition
(
year
,
month
)
{
//起始年份和月份 第一届第一次
const
startYear
=
1993
;
const
Num
=
((
year
-
startYear
)
+
1
)
/
5
;
let
jie
=
Math
.
ceil
(
Num
);
let
ci
=
Math
.
ceil
(((
Num
*
100
)
-
((
jie
-
1
)
*
100
))
/
10
);
if
(
month
<=
6
)
ci
=
ci
-
1
;
return
SessionTimeMsConfig
[
`
${
jie
}
_
${
ci
}
`
];
}
}
...
...
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