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
31d447f5
Commit
31d447f5
authored
Mar 22, 2024
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7a8a839d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
34 deletions
+58
-34
register.ts
src/biz/register.ts
+26
-25
router.ts
src/routers/member/router.ts
+29
-6
router.ts
src/routers/order/router.ts
+3
-3
No files found.
src/biz/register.ts
View file @
31d447f5
...
...
@@ -64,10 +64,10 @@ export async function memberRegister1({form}) {
* @param userId
* @returns
*/
export
async
function
memberRegister2
({
form
,
userI
d
})
{
export
async
function
memberRegister2
({
form
,
i
d
})
{
/**校验用户是否存在 */
let
selectUserFiles
=
[
"userId"
,
"registerFlow"
,
"userRegisterState"
];
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
,
memberType
:
MEMBERTYPE
.
个人会员
,
isAdmin
:
STATE
.
否
},
selectUserFiles
);
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
,
memberType
:
MEMBERTYPE
.
个人会员
,
isAdmin
:
STATE
.
否
},
selectUserFiles
);
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
oldInfo
.
registerFlow
!=
REGISTERFLOW
.
完成第一步
)
throw
new
BizError
(
ERRORENUM
.
重复提交
);
let
operationBehavior
=
0
;
...
...
@@ -93,18 +93,18 @@ export async function memberRegister2({form, userId}) {
//更新注册流程
form
.
registerFlow
=
REGISTERFLOW
.
完成第二步
;
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
form
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
form
);
/**提交审批历史信息 */
let
addApprovalHistory
=
{
userId
,
userId
:
id
,
operationTime
:
new
Date
().
valueOf
(),
operationBehavior
:
operationBehavior
,
remarks
:
`个人会员
${
remarks
}
`
};
await
addOneData
(
TABLEENUM
.
审批历史表
,
addApprovalHistory
);
return
{
userId
};
return
{
userId
:
id
};
}
...
...
@@ -162,9 +162,9 @@ export async function memberRegister2({form, userId}) {
* @param userId
* @returns
*/
export
async
function
unitMemberRegister2
({
form
,
keyanForm
,
userI
d
})
{
export
async
function
unitMemberRegister2
({
form
,
keyanForm
,
i
d
})
{
let
selectUserFiles
=
[
"userId"
,
"registerFlow"
,
"userRegisterState"
];
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
,
memberType
:
MEMBERTYPE
.
单位会员
,
isAdmin
:
STATE
.
否
},
selectUserFiles
);
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
,
memberType
:
MEMBERTYPE
.
单位会员
,
isAdmin
:
STATE
.
否
},
selectUserFiles
);
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
oldInfo
.
registerFlow
!=
REGISTERFLOW
.
完成第一步
)
throw
new
BizError
(
ERRORENUM
.
重复提交
);
if
(
oldInfo
.
userRegisterState
!=
USERREGISTERSTATE
.
待审核
&&
oldInfo
.
userRegisterState
!=
USERREGISTERSTATE
.
驳回修改
)
{
...
...
@@ -178,13 +178,13 @@ export async function unitMemberRegister2({form, keyanForm, userId}) {
eccEnumValue
(
EccFuncName
,
'单位会员类型'
,
UNITMEMBERTYPE
,
form
.
unitMemberType
);
form
.
registerFlow
=
REGISTERFLOW
.
完成第二步
;
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
form
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
form
);
/**注册提交单位科研成果信息 */
let
addList
=
[];
for
(
let
i
=
0
;
i
<
keyanForm
.
length
;
i
++
)
{
keyanForm
[
i
].
id
=
sysTools
.
generateSystemId
(
TABLEENUM
.
单位所获得科研成果表
,
userI
d
);
keyanForm
[
i
].
userId
=
userI
d
;
keyanForm
[
i
].
id
=
sysTools
.
generateSystemId
(
TABLEENUM
.
单位所获得科研成果表
,
i
d
);
keyanForm
[
i
].
userId
=
i
d
;
addList
.
push
(
keyanForm
[
i
]);
}
await
addOneData
(
TABLEENUM
.
单位所获得科研成果表
,
addList
);
...
...
@@ -198,9 +198,9 @@ export async function unitMemberRegister2({form, keyanForm, userId}) {
* @param application 入会申请表地址
* @param userId
*/
export
async
function
unitMemberRegister3
({
application
,
userI
d
})
{
export
async
function
unitMemberRegister3
({
application
,
i
d
})
{
let
selectUserFiles
=
[
"userId"
,
"registerFlow"
,
"userRegisterState"
,
"application"
];
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
,
memberType
:
MEMBERTYPE
.
单位会员
,
isAdmin
:
STATE
.
否
},
selectUserFiles
);
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
,
memberType
:
MEMBERTYPE
.
单位会员
,
isAdmin
:
STATE
.
否
},
selectUserFiles
);
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
oldInfo
.
registerFlow
!=
REGISTERFLOW
.
完成第二步
)
throw
new
BizError
(
ERRORENUM
.
重复提交
);
...
...
@@ -217,12 +217,12 @@ export async function unitMemberRegister3({application, userId}) {
remarks
=
"重新提交"
;
}
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
{
userRegisterState
,
application
,
registerFlow
:
REGISTERFLOW
.
完成第三步
});
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
{
userRegisterState
,
application
,
registerFlow
:
REGISTERFLOW
.
完成第三步
});
/**提交审批历史信息 */
let
addApprovalHistory
=
{
id
:
sysTools
.
generateSystemId
(
TABLEENUM
.
审批历史表
,
userI
d
),
userId
,
id
:
sysTools
.
generateSystemId
(
TABLEENUM
.
审批历史表
,
i
d
),
userId
:
id
,
operationTime
:
new
Date
().
valueOf
(),
operationBehavior
:
operationBehavior
,
remarks
:
`单位会员
${
remarks
}
`
...
...
@@ -289,8 +289,8 @@ const UnitConfig = ["unitMemberType", "yuanXiaoBanXueLeiXing", "yuanXiaoZhuGuanB
"yuanXiaoFuZeRenDianHua"
,
"yuanXiaoBanGongFuZeRen"
,
"yuanXiaoBanGongFuZeRenDianHua"
,
"ZhuYaoFuZeRenYouXiang"
,
"yuanXiaoKeYanFuZeRen"
,
"yuanXiaoKeYanFuZeRenDianHua"
,
"jiaoXueFuZeRenXinMing"
,
"yuanXiaoXueShengZongRenShu"
,
"yuanXiaoJiaoZhiGongZongRenShu"
,
"jiaoXueFuZeRenDianHua"
];
export
async
function
unitMemberEcho2
({
userI
d
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
export
async
function
unitMemberEcho2
({
i
d
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
basicInfo
:
any
=
extractData
(
oldInfo
,
UnitBasicConfig
);
let
unitInfo
:
any
=
extractData
(
oldInfo
,
UnitConfig
);
...
...
@@ -298,7 +298,7 @@ export async function unitMemberEcho2({userId}) {
unitInfo
.
unitMemberType
=
changeEnumValue
(
UNITMEMBERTYPE
,
unitInfo
.
unitMemberType
);
unitInfo
.
yuanXiaoBanXueLeiXing
=
changeEnumValue
(
BANXUELEIXING
,
unitInfo
.
yuanXiaoBanXueLeiXing
);
let
oldKeYanInfo
=
await
find
(
TABLEENUM
.
单位所获得科研成果表
,
{
userId
});
let
oldKeYanInfo
=
await
find
(
TABLEENUM
.
单位所获得科研成果表
,
{
userId
:
id
});
let
scientificResearch
=
extractData
(
oldKeYanInfo
,
[
"id"
,
"startTime"
,
"endTime"
,
"describe"
]);
return
{
basicInfo
,
unitInfo
,
scientificResearch
};
...
...
@@ -310,12 +310,13 @@ export async function unitMemberEcho2({userId}) {
* @param userId
* @returns
*/
export
async
function
unitMemberEcho3
({
userId
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
},
[
"applicationForm"
]);
if
(
!
oldInfo
||
!
oldInfo
.
applicationForm
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
oldInfo
.
defaultApplicationForm
=
"http://192.168.0.105:40012/单位会员情况统计表.docx"
;
export
async
function
unitMemberEcho3
({
id
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
},
[
"userId"
,
"applicationForm"
]);
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
dataInfo
:
any
=
extractData
(
oldInfo
,
[
"applicationForm"
]);
dataInfo
.
defaultApplicationForm
=
"http://192.168.0.105:40012/单位会员情况统计表.docx"
;
return
{
dataInfo
:
oldInfo
};
return
{
dataInfo
};
}
...
...
@@ -328,8 +329,8 @@ export async function unitMemberEcho3({userId}) {
const
IndividualBasicConfig
=
[
"name"
,
"sex"
,
"documentType"
,
"documentId"
,
"birth"
,
"nation"
,
"sheng"
,
"shi"
,
"qu"
,
"addres"
,
"education"
,
"photoUrl"
];
const
SpecialityConfig
=
[
"unitName"
,
"duties"
,
"workTitle"
,
"profCategory"
,
"studyResume"
,
"workResume"
,
"profAchievement"
,
"otherEMP"
,
"otherPROF"
];
export
async
function
individualMemberDetails
({
userI
d
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
export
async
function
individualMemberDetails
({
i
d
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
:
id
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
basicInfo
:
any
=
extractData
(
oldInfo
,
IndividualBasicConfig
);
...
...
src/routers/member/router.ts
View file @
31d447f5
...
...
@@ -64,6 +64,9 @@ export const Config = {
professionalCERTUrl
:{
type
:
'String'
,
desc
:
'个人工作证明扫描件'
},
auxiliaryMaterial
:{
type
:
'[String]'
,
desc
:
'论文发表等证明工作成果或成绩的材料'
},
}
},
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员id"
}
],
bindBiz
:
registerBiz
.
memberRegister2
...
...
@@ -129,6 +132,9 @@ export const Config = {
},
{
key
:
"keyanForm"
,
type
:
"[Object]"
,
desc
:
"单位所获得科研成果表单"
},
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员id"
}
],
bindBiz
:
registerBiz
.
unitMemberRegister2
...
...
@@ -140,6 +146,9 @@ export const Config = {
param
:[
{
key
:
"application"
,
type
:
"String"
,
desc
:
"入会申请表"
},
{
key
:
"id"
,
type
:
"String"
,
desc
:
"会员id"
}
],
bindBiz
:
registerBiz
.
unitMemberRegister3
...
...
@@ -159,30 +168,44 @@ export const Config = {
apiName
:
"获取当前会员注册流程"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/registerflowtype'
,
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"用户id"
}],
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"用户id"
}
],
bindBiz
:
registerBiz
.
registerFlowType
},
{
apiName
:
"单位会员【流程二】回显"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/unitmemberecho2'
,
param
:[],
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"用户id"
}
],
bindBiz
:
registerBiz
.
unitMemberEcho2
},
{
apiName
:
"单位会员【流程三】回显"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/unitmemberecho3'
,
param
:[],
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"用户id"
}
],
bindBiz
:
registerBiz
.
unitMemberEcho3
},
{
apiName
:
"个人会员【流程二】回显"
,
notMiddleware
:
true
,
subUrl
:
'/memberdb/individualmemberdetails'
,
param
:[],
param
:[
{
key
:
"id"
,
type
:
"String"
,
desc
:
"用户id"
}
],
bindBiz
:
registerBiz
.
individualMemberDetails
}
],
...
...
src/routers/order/router.ts
View file @
31d447f5
...
...
@@ -95,9 +95,9 @@ export const Config = {
apiName
:
"发票管理-已开发票"
,
subUrl
:
'/order/invoice/examine/invoicedlist'
,
param
:[
{
key
:
"unitName"
,
type
:
"String"
,
desc
:
"单位名称"
},
{
key
:
"paymentType"
,
type
:
"Number"
,
desc
:
"
会员类型"
},
{
key
:
"isPay"
,
type
:
"Number"
,
desc
:
"是否支付"
},
{
key
:
"unitName"
,
type
:
"String"
,
desc
:
"单位名称"
,
isNull
:
true
},
{
key
:
"paymentType"
,
type
:
"Number"
,
desc
:
"
付款方式"
,
isNull
:
true
},
{
key
:
"isPay"
,
type
:
"Number"
,
desc
:
"是否支付"
,
isNull
:
true
},
{
key
:
"pageNumber"
,
type
:
"Number"
,
desc
:
"当前页"
},
],
bindBiz
:
orderBiz
.
invoicedList
...
...
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