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
5a2430e3
Commit
5a2430e3
authored
Mar 06, 2024
by
lixinming
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://123.207.147.179:8888/node_server/wenHuaBu_adminServer
parents
e8c82b1d
281ce506
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
123 additions
and
15 deletions
+123
-15
member.ts
src/biz/member/member.ts
+46
-14
model.ts
src/data/models/model.ts
+1
-1
router.ts
src/routers/member/router.ts
+76
-0
No files found.
src/biz/member/member.ts
View file @
5a2430e3
...
...
@@ -2,11 +2,12 @@
* 会员逻辑
*/
import
{
MEMBERSTATE
,
MEMBERLEVEL
}
from
"../../config/enum"
;
import
{
MEMBERSTATE
,
MEMBERLEVEL
,
DOCUMENTTYPE
,
NATION
,
PROFCATEGORY
}
from
"../../config/enum"
;
import
{
ERRORENUM
}
from
"../../config/errorEnum"
;
import
{
TABLEENUM
}
from
"../../data/models/model"
;
import
{
find
,
findOnce
}
from
"../../data/select"
;
import
{
generateSystemId
}
from
"../../tools/system"
;
import
{
updateOneData
}
from
"../../data/update"
;
import
{
generateSystemId
,
successResult
}
from
"../../tools/system"
;
import
{
BizError
}
from
"../../util/bizError"
;
import
{
extractData
}
from
"../../util/piecemeal"
;
import
{
changeEnumValue
}
from
"../../util/verificationEnum"
;
...
...
@@ -44,9 +45,10 @@ export async function unitMemberList({unitName, joinTime, unitMemberType, workDu
/**
* 单位会员详情
* @param param0
* @returns {顶部数据, 基本信息, 单位信息, 单位所获得科研成果}
*/
const
BasicConfig
=
[
"userId"
,
"unitName"
,
"addres"
,
"officialWebsite"
,
"uscc"
,
"legalPerson"
,
"legalPersonPhone"
,
"gongZhongHao"
,
const
Unit
BasicConfig
=
[
"userId"
,
"unitName"
,
"addres"
,
"officialWebsite"
,
"uscc"
,
"legalPerson"
,
"legalPersonPhone"
,
"gongZhongHao"
,
"unitPhone"
,
"contactPerson"
,
"contactPersonDuties"
,
"sheng"
,
"shi"
,
"qu"
,
"uusinessLicenseUrl"
,
"personInChargeDesc"
];
const
UnitConfig
=
[
"unitInfoType"
,
"yuanXiaoBanXueLeiXing"
,
"yuanXiaoZhuGuanBuMen"
,
"yuanXiaoFuZeRen"
,
"yuanXiaoFuZeRenZhiWu"
,
"yuanXiaoFuZeRenDianHua"
,
"yuanXiaoBanGongFuZeRen"
,
"yuanXiaoBanGongFuZeRenZhiWu"
,
"yuanXiaoBanGongFuZeRenDianHua"
,
"yuanXiaoKeYanFuZeRen"
,
...
...
@@ -56,27 +58,33 @@ const UnitConfig = ["unitInfoType", "yuanXiaoBanXueLeiXing", "yuanXiaoZhuGuanBuM
export
async
function
unitMemberDetails
({
userId
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
basicInfo
=
extractData
(
oldInfo
,
BasicConfig
);
let
topInfo
:
any
=
extractData
(
oldInfo
,
[
"session"
,
"memberLevel"
]);
changeEnumValue
(
MEMBERLEVEL
,
topInfo
.
memberLevel
);
let
basicInfo
=
extractData
(
oldInfo
,
UnitBasicConfig
);
let
unitInfo
=
extractData
(
oldInfo
,
UnitConfig
);
let
oldKeYanInfo
=
await
findOnce
(
TABLEENUM
.
单位所获得科研成果表
,
{
userId
});
let
scientificResearch
=
extractData
(
oldKeYanInfo
,
[
"startTime"
,
"endTime"
,
"describe"
]);
return
{
basicInfo
,
unitInfo
,
scientificResearch
};
return
{
topInfo
,
basicInfo
,
unitInfo
,
scientificResearch
};
}
/**
* 单位会员 修改
* @param userId
* @param form
* @returns
*/
export
async
function
unitMemberUpdate
(
secureArgs
:
any
)
{
let
{
userId
,
form
,
keyanForm
}
=
secureArgs
;
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
await
updateOneData
(
TABLEENUM
.
用户表
,
{
userId
},
form
);
return
successResult
();
}
...
...
@@ -126,9 +134,33 @@ export async function individualMemberList({name, documentId, phone, memberLevel
}
/**
* 个人会员详情
* @param param0
* @returns {顶部数据, 基本信息, 专业信息, 其他附件}
*/
const
IndividualBasicConfig
=
[
"name"
,
"sex"
,
"nation"
,
"birth"
,
"documentType"
,
"documentId"
,
"sheng"
,
"shi"
,
"qu"
,
"addres"
,
"photoUrl"
];
const
SpecialityConfig
=
[
"unitName"
,
"workDuties"
,
"workTitle"
,
"profCategory"
,
"studyResume"
,
"workResume"
,
"profAchievement"
,
"otherEMP"
,
"otherPROF"
];
export
async
function
individualMemberDetails
({
userId
})
{
let
oldInfo
=
await
findOnce
(
TABLEENUM
.
用户表
,
{
userId
});
if
(
!
oldInfo
||
!
oldInfo
.
userId
)
throw
new
BizError
(
ERRORENUM
.
目标数据不存在
);
let
topInfo
:
any
=
extractData
(
oldInfo
,
[
"session"
,
"memberLevel"
]);
changeEnumValue
(
MEMBERLEVEL
,
topInfo
.
memberLevel
);
let
basicInfo
:
any
=
extractData
(
oldInfo
,
IndividualBasicConfig
);
changeEnumValue
(
DOCUMENTTYPE
,
basicInfo
.
documentType
);
changeEnumValue
(
NATION
,
basicInfo
.
nation
);
let
specialityInfo
:
any
=
extractData
(
oldInfo
,
SpecialityConfig
);
changeEnumValue
(
PROFCATEGORY
,
basicInfo
.
profCategory
);
let
otherAttachment
:
any
=
extractData
(
oldInfo
,
[
"cardUrl"
,
"academicCERTUrl"
,
"professionalCERTUrl"
,
"auxiliaryMaterial"
]);
return
{
topInfo
,
basicInfo
,
specialityInfo
,
otherAttachment
};
}
...
...
src/data/models/model.ts
View file @
5a2430e3
...
...
@@ -400,7 +400,7 @@ const ModelArray = [
academicCERTUrl
:
'String'
,
//学历证明图片地址
professionalCERTUrl
:
'String'
,
//工作证明图片地址
auxiliaryMaterial
:{
type
:
'[String]'
,
default
:[]},
//其他辅助材料
profCategory
:
'Number'
,
//专业类别
profCategory
:
'Number'
,
//专业类别
枚举
studyResume
:
'String'
,
//学习简历
workResume
:
'String'
,
//工作简历
profAchievement
:
'String'
,
//专业成果
...
...
src/routers/member/router.ts
View file @
5a2430e3
...
...
@@ -142,5 +142,80 @@ export const Config = {
],
bindBiz
:
memberBiz
.
individualMemberList
},
{
apiName
:
"单位会员详情"
,
subUrl
:
'/memberdb/unitmemberdetails'
,
param
:[
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
}
],
binBiz
:
memberBiz
.
unitMemberDetails
},
{
apiName
:
"个人会员详情"
,
subUrl
:
'/memberdb/individualmemberdetails'
,
param
:[
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
}
],
binBiz
:
memberBiz
.
individualMemberDetails
},
{
apiName
:
"单位会员修改"
,
subUrl
:
'/memberdb/unitmemberupdate'
,
param
:[
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
/**基本信息 */
unitName
:{
type
:
'String'
,
desc
:
'单位名称'
},
addres
:{
type
:
'String'
,
desc
:
''
},
officialWebsite
:{
type
:
'String'
,
desc
:
''
},
uscc
:{
type
:
'String'
,
desc
:
''
},
legalPerson
:{
type
:
'String'
,
desc
:
''
},
legalPersonPhone
:{
type
:
'String'
,
desc
:
''
},
gongZhongHao
:{
type
:
'String'
,
desc
:
''
},
unitPhone
:{
type
:
'String'
,
desc
:
''
},
contactPerson
:{
type
:
'String'
,
desc
:
''
},
contactPersonDuties
:{
type
:
'String'
,
desc
:
''
},
sheng
:{
type
:
'String'
,
desc
:
''
},
shi
:{
type
:
'String'
,
desc
:
''
},
qu
:{
type
:
'String'
,
desc
:
''
},
uusinessLicenseUrl
:{
type
:
'String'
,
desc
:
''
},
personInChargeDesc
:{
type
:
'String'
,
desc
:
''
},
/**单位信息 */
unitInfoType
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoBanXueLeiXing
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoZhuGuanBuMen
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoFuZeRen
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoFuZeRenZhiWu
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoFuZeRenDianHua
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoBanGongFuZeRen
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoBanGongFuZeRenZhiWu
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoBanGongFuZeRenDianHua
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoKeYanFuZeRen
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoKeYanFuZeRenZhiWu
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoKeYanFuZeRenDianHua
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoXueShengZongRenShu
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoJiaoZhiGongZongRenShu
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoJianZhuMianJi
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoGaoJiZhiCheng
:{
type
:
'String'
,
desc
:
''
},
yuanXiaoKaiSheZhuanYe
:{
type
:
'String'
,
desc
:
''
},
},
desc
:
"表单"
},
{
key
:
"form"
,
type
:
"Object"
,
sub
:
{
startTime
:{
type
:
'String'
,
desc
:
''
},
endTime
:{
type
:
'String'
,
desc
:
''
},
describe
:{
type
:
'String'
,
desc
:
''
},
},
desc
:
"表单"
},
{
key
:
"userId"
,
type
:
"String"
,
desc
:
"用户id"
}
],
binBiz
:
memberBiz
.
unitMemberUpdate
},
]
}
\ 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