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
8e436939
Commit
8e436939
authored
Oct 15, 2024
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
674337ab
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
260 additions
and
1 deletions
+260
-1
homePage.ts
src/biz/member/homePage.ts
+147
-0
errorEnum.ts
src/config/errorEnum.ts
+2
-1
model.ts
src/data/models/model.ts
+1
-0
router.ts
src/routers/member/router.ts
+110
-0
No files found.
src/biz/member/homePage.ts
View file @
8e436939
...
@@ -312,6 +312,153 @@ export async function getSheng ({userId}) {
...
@@ -312,6 +312,153 @@ export async function getSheng ({userId}) {
}
}
/**
* 变更申请,判断注册资料是否完整,不完整返回false(需要补充用户信息)
* @param param0
* @returns
*/
export
async
function
memberlevelUpdate
({
memberLevelChange
,
userId
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
if
(
oldInfo
.
memberLever
==
memberLevelChange
)
throw
new
BizError
(
ERRORENUM
.
当前变更申请未发生变化
);
/**添加至变更职位 */
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
{
memberLevelChange
});
return
successResult
();
}
/**
* 是否需要补充用户信息
* @param userId
*/
export
async
function
isNeedSupplement
(
userId
)
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
let
grRequiredConf
=
{
"基本信息"
:
[
"name"
,
"sex"
,
"documentId"
,
"documentType"
,
"birth"
,
"nation"
,
"sheng"
,
"shi"
,
"qu"
,
"addres"
,
"education"
,
"photoUrl"
],
"专业信息"
:
[
"duties"
,
"workTitle"
,
"studyResume"
,
"workResume"
,
"profAchievement"
,
"otherEMP"
,
"otherPROF"
,
"profCategory"
],
"其他附件"
:
[
"cardUrlJust"
,
"cardUrlBack"
,
"academicCERTUrl"
,
"professionalCERTUrl"
,
"auxiliaryMaterial"
]
};
let
dwRequiredConf
=
{
"基本信息"
:
[
"unitName"
,
"uscc"
,
"legalPerson"
,
"legalPersonPhone"
,
"legalPersonMail"
,
"unitMail"
,
"contactPerson"
,
"contactPersonDuties"
,
"contactPersonPhone"
,
"uusinessLicenseUrl"
,
"sheng"
,
"shi"
,
"qu"
,
"addres"
],
"单位信息"
:
[
"unitMemberType"
,
"yuanXiaoBanXueLeiXing"
,
"yuanXiaoZhuGuanBuMen"
,
"yuanXiaoFuZeRen"
,
"yuanXiaoFuZeRenZhiWu"
,
"yuanXiaoFuZeRenDianHua"
,
"yuanXiaoBanGongFuZeRen"
,
"yuanXiaoBanGongFuZeRenDianHua"
,
"ZhuYaoFuZeRenYouXiang"
,
"yuanXiaoKeYanFuZeRen"
,
"yuanXiaoKeYanFuZeRenDianHua"
,
"jiaoXueFuZeRenXinMing"
,
"yuanXiaoXueShengZongRenShu"
,
"yuanXiaoJiaoZhiGongZongRenShu"
,
"jiaoXueFuZeRenDianHua"
,
"kaishezhuanYe"
,
"danWeiJianJie"
]
};
let
dwshzycj
=
{
"单位所获主要成绩及科研成果"
:
[
"startTime"
,
"endTime"
,
"describe"
]
};
let
dwshzycjInfo
=
await
findOnce
(
TABLEENUM
.
单位所获得科研成果表
,
{
userId
});
let
infoComplete
=
{};
if
(
oldInfo
.
memberType
==
MEMBERTYPE
.
个人会员
)
{
for
(
let
key
in
grRequiredConf
)
{
for
(
let
i
=
0
;
i
<
grRequiredConf
[
key
].
length
;
i
++
)
{
if
(
!
oldInfo
[
grRequiredConf
[
key
][
i
]])
infoComplete
[
key
]
=
false
;
}
}
}
else
{
for
(
let
key
in
dwRequiredConf
)
{
for
(
let
i
=
0
;
i
<
dwRequiredConf
[
key
].
length
;
i
++
)
{
if
(
!
oldInfo
[
dwRequiredConf
[
key
][
i
]])
infoComplete
[
key
]
=
false
;
}
}
for
(
let
i
=
0
;
i
<
dwshzycj
.
单位所获主要成绩及科研成果
.
length
;
i
++
)
{
if
(
!
dwshzycjInfo
[
dwshzycj
.
单位所获主要成绩及科研成果
[
i
]])
infoComplete
[
"单位所获主要成绩及科研成果"
]
=
false
;
}
}
return
infoComplete
;
}
/**
* 个人会员用户注册信息补充
* @param userId 登录的用户id
* @param form 修改信息表单
* @returns
*/
export
async
function
infoSupplement
({
form
,
userId
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
form
);
return
successResult
();
}
/**
* 单位会员用户注册信息补充
* @param userId 登录的用户id
* @param form 修改信息表单
* @returns
*/
export
async
function
unitInfoSupplement
({
form
,
keyanForm
,
userId
})
{
const
keyanFormItemConfig
=
{
startTime
:
'Number'
,
endTime
:
'Number'
,
describe
:
'String'
};
keyanForm
.
forEach
(
item
=>
{
eccFormParam
(
"单位会员修改"
,
keyanFormItemConfig
,
item
);
});
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
/**校验枚举 */
const
EccFuncName
=
'单位会员修改'
;
eccEnumValue
(
EccFuncName
,
'单位信息类型'
,
UNITMEMBERTYPE
,
form
.
unitMemberType
);
/**确保邮箱的唯一性 */
let
distinctMailInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
mail
:
form
.
unitMail
},
[
"userId"
]);
if
(
distinctMailInfo
&&
distinctMailInfo
.
userId
&&
distinctMailInfo
.
userId
!=
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
邮箱重复
,
oldInfo
.
loginId
,
oldInfo
.
mail
);
form
.
mail
=
form
.
unitMail
;
/**修改会员用户信息 */
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
form
);
/**删除对应userId科研成果 */
let
oldKeYanList
=
await
find
(
TABLEENUM
.
单位所获得科研成果表
,
{
userId
});
if
(
oldKeYanList
&&
oldKeYanList
.
length
)
{
await
deleteManyData
(
TABLEENUM
.
单位所获得科研成果表
,
{
userId
});
}
/**添加新的科研信息 */
let
addList
=
[];
for
(
let
i
=
0
;
i
<
keyanForm
.
length
;
i
++
)
{
let
{
startTime
,
endTime
,
describe
}
=
keyanForm
[
i
];
addList
.
push
({
id
:
generateSystemId
(
TABLEENUM
.
单位所获得科研成果表
,
userId
),
userId
,
startTime
,
endTime
,
describe
});
}
await
addManyData
(
TABLEENUM
.
单位所获得科研成果表
,
addList
);
return
successResult
();
}
src/config/errorEnum.ts
View file @
8e436939
...
@@ -60,7 +60,8 @@ export enum ERRORENUM {
...
@@ -60,7 +60,8 @@ export enum ERRORENUM {
线下活动的活动时间必填
,
线下活动的活动时间必填
,
用户没有在此活动对象内
,
用户没有在此活动对象内
,
黑名单用户不允许登录
,
黑名单用户不允许登录
,
该订单未被退回
该订单未被退回
,
当前变更申请未发生变化
}
}
export
enum
ERRORCODEENUM
{
export
enum
ERRORCODEENUM
{
...
...
src/data/models/model.ts
View file @
8e436939
...
@@ -445,6 +445,7 @@ const ModelArray = [
...
@@ -445,6 +445,7 @@ const ModelArray = [
/**注册第二步保存未提交 */
/**注册第二步保存未提交 */
saveUnsubmitted
:{
type
:
'Number'
,
default
:
STATE
.
否
},
//是否提交注册完成 0:否, 1:是 STATE
saveUnsubmitted
:{
type
:
'Number'
,
default
:
STATE
.
否
},
//是否提交注册完成 0:否, 1:是 STATE
firstStep
:
'Number'
,
//第一步完成时间
firstStep
:
'Number'
,
//第一步完成时间
memberLevelChange
:
'Number'
,
//会员等级、职务 枚举 MEMBERLEVEL 【变更申请职位】
}
}
},
},
{
{
...
...
src/routers/member/router.ts
View file @
8e436939
...
@@ -954,8 +954,118 @@ export const Config = {
...
@@ -954,8 +954,118 @@ export const Config = {
param
:[
param
:[
],
],
bindBiz
:
homePageBiz
.
getCertificate
bindBiz
:
homePageBiz
.
getCertificate
},
{
apiName
:
"变更职位"
,
subUrl
:
'/homepage/memberlevelupdate'
,
param
:[
{
key
:
"memberLevelChange"
,
type
:
"Number"
,
desc
:
"变更职位"
}
],
bindBiz
:
homePageBiz
.
memberlevelUpdate
},
{
apiName
:
"是否需要补充用户信息"
,
subUrl
:
'/homepage/getcertificate'
,
param
:[
],
bindBiz
:
homePageBiz
.
isNeedSupplement
},
{
apiName
:
"个人会员用户注册信息补充"
,
subUrl
:
'/homepage/getcertificate'
,
param
:[
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
/**基本信息 */
name
:{
type
:
'String'
,
desc
:
'真实姓名'
},
sex
:{
type
:
'Number'
,
desc
:
'性别'
},
nation
:{
type
:
'Number'
,
desc
:
'民族'
},
birth
:{
type
:
'Number'
,
desc
:
'出身年月'
},
documentType
:{
type
:
'Number'
,
desc
:
'证件类型'
},
documentId
:{
type
:
'String'
,
desc
:
'证件号码'
},
sheng
:{
type
:
'String'
,
desc
:
'省'
},
shi
:{
type
:
'String'
,
desc
:
'市'
},
qu
:{
type
:
'String'
,
desc
:
'区'
},
phone
:{
type
:
'String'
,
desc
:
'手机号码'
},
mail
:{
type
:
'String'
,
desc
:
'电子邮箱'
},
addres
:{
type
:
'String'
,
desc
:
'通信地址'
},
photoUrl
:{
type
:
'String'
,
desc
:
'蓝底证件照'
},
education
:{
type
:
'Number'
,
desc
:
'学历'
},
/**专业信息 */
unitName
:{
type
:
'String'
,
desc
:
'工作单位'
},
duties
:{
type
:
'String'
,
desc
:
'职务'
},
workTitle
:{
type
:
'String'
,
desc
:
'职称'
},
profCategory
:{
type
:
'[Number]'
,
desc
:
'专业类别'
},
studyResume
:{
type
:
'String'
,
desc
:
'学习简历'
},
workResume
:{
type
:
'String'
,
desc
:
'工作简历'
},
profAchievement
:{
type
:
'String'
,
desc
:
'教研成果'
},
otherEMP
:{
type
:
'String'
,
desc
:
'其他组织任职情况'
},
otherPROF
:{
type
:
'String'
,
desc
:
'其他情况'
},
/**其他附件 */
cardUrlJust
:{
type
:
'String'
,
desc
:
'个人身份证扫描件正面'
},
cardUrlBack
:{
type
:
'String'
,
desc
:
'个人身份证扫描件反面'
},
academicCERTUrl
:{
type
:
'String'
,
desc
:
'个人学历证明扫描件'
},
professionalCERTUrl
:{
type
:
'String'
,
desc
:
'个人工作证明扫描件'
},
auxiliaryMaterial
:{
type
:
'[String]'
,
desc
:
'论文发表或成绩材料'
},
}
}
],
bindBiz
:
homePageBiz
.
infoSupplement
},
{
apiName
:
"单位会员用户注册信息补充"
,
subUrl
:
'/homepage/getcertificate'
,
param
:[
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
/**基本信息 */
unitName
:{
type
:
'String'
,
desc
:
'单位名称'
},
addres
:{
type
:
'String'
,
desc
:
'通信地址'
},
legalPerson
:{
type
:
'String'
,
desc
:
'法人代表'
},
legalPersonPhone
:{
type
:
'String'
,
desc
:
'法人联系电话'
},
legalPersonMail
:{
type
:
'String'
,
desc
:
'法人邮箱'
},
unitMail
:{
type
:
'String'
,
desc
:
'单位电子邮箱'
},
contactPerson
:{
type
:
'String'
,
desc
:
'日常联系人'
},
contactPersonDuties
:{
type
:
'String'
,
desc
:
'日常联系人职务'
},
contactPersonPhone
:{
type
:
'String'
,
desc
:
'日常联系人电话'
},
sheng
:{
type
:
'String'
,
desc
:
'省'
},
shi
:{
type
:
'String'
,
desc
:
'市'
},
qu
:{
type
:
'String'
,
desc
:
'区'
},
uusinessLicenseUrl
:{
type
:
'String'
,
desc
:
'营业执照'
},
/**单位信息 */
unitMemberType
:{
type
:
'Number'
,
desc
:
'单位类型'
},
yuanXiaoBanXueLeiXing
:{
type
:
'Number'
,
desc
:
'办学类型'
},
yuanXiaoZhuGuanBuMen
:{
type
:
'String'
,
desc
:
'主管部门'
},
yuanXiaoFuZeRen
:{
type
:
'String'
,
desc
:
'主要负责人姓名'
},
yuanXiaoFuZeRenZhiWu
:{
type
:
'String'
,
desc
:
'主要负责人职位'
},
yuanXiaoFuZeRenDianHua
:{
type
:
'String'
,
desc
:
'主要负责人电话'
},
ZhuYaoFuZeRenYouXiang
:{
type
:
'String'
,
desc
:
'主要负责人邮箱'
},
yuanXiaoBanGongFuZeRen
:{
type
:
'String'
,
desc
:
'办公负责人姓名'
},
yuanXiaoBanGongFuZeRenDianHua
:{
type
:
'String'
,
desc
:
'办公负责人电话'
},
yuanXiaoKeYanFuZeRen
:{
type
:
'String'
,
desc
:
'科研负责人姓名'
},
yuanXiaoKeYanFuZeRenDianHua
:{
type
:
'String'
,
desc
:
'科研负责人电话'
},
jiaoXueFuZeRenXinMing
:{
type
:
'String'
,
desc
:
'教学负责人姓名'
},
jiaoXueFuZeRenDianHua
:{
type
:
'String'
,
desc
:
'教学负责人电话'
},
kaishezhuanYe
:{
type
:
'String'
,
desc
:
'开设专业'
,
notMustHave
:
true
},
danWeiJianJie
:{
type
:
'String'
,
desc
:
'单位简介'
,
notMustHave
:
true
}
},
desc
:
"表单"
},
{
key
:
"keyanForm"
,
type
:
"[Object]"
,
sub
:
{
startTime
:{
type
:
'Number'
,
desc
:
'开始时间'
},
endTime
:{
type
:
'Number'
,
desc
:
'结束时间'
},
describe
:{
type
:
'String'
,
desc
:
'科研描述'
},
},
desc
:
"单位所获得科研成果表单"
}
}
],
],
bindBiz
:
homePageBiz
.
unitInfoSupplement
},
],
"oss授权"
:[
"oss授权"
:[
{
{
apiName
:
"获取oss授权必要参数"
,
apiName
:
"获取oss授权必要参数"
,
...
...
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