Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyiAdminServer
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
yuyiAdminServer
Commits
a8ff5ccb
Commit
a8ff5ccb
authored
May 17, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7847d545
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
13 deletions
+50
-13
fuhua.ts
src/biz/fuhua.ts
+22
-5
ruFu.ts
src/biz/ruFu.ts
+1
-0
userRuFu.ts
src/biz/userRuFu.ts
+1
-1
system.ts
src/tools/system.ts
+26
-7
No files found.
src/biz/fuhua.ts
View file @
a8ff5ccb
...
...
@@ -285,13 +285,12 @@ export async function getOperateData(year) {
//将 industry 字符串转换为数组
zaifuResList
.
forEach
(
info
=>
{
if
(
info
.
industry
)
{
if
(
typeof
info
.
industry
===
'string'
)
{
try
{
info
.
industry
=
JSON
.
parse
(
info
.
industry
);
}
catch
(
e
)
{
console
.
error
(
"Failed to parse industry:"
,
e
);
info
.
industry
=
[];
// 如果解析失败,设置为默认空数组
}
}
else
{
info
.
industry
=
[];
}
});
...
...
@@ -302,6 +301,7 @@ export async function getOperateData(year) {
const
EnumValue
=
parseInt
(
INDUSTRY
[
key
]);
industryData
=
{
key
:
anyKey
,
value
:
0
};
zaifuResList
.
forEach
(
info
=>
{
if
(
info
.
industry
==
EnumValue
)
{
industryData
.
value
+=
1
;
}
...
...
@@ -555,7 +555,24 @@ export async function getWorthDate() {
jiuyeList
.
forEach
(
info
=>
{
let
year
=
moment
(
info
.
annual
).
format
(
"YYYY"
);
if
(
!
jiuyeInfo
[
year
])
jiuyeInfo
[
year
]
=
0
;
jiuyeInfo
[
year
]
+=
1
;
if
(
info
.
zhuanKe
)
{
jiuyeInfo
[
year
]
+=
parseInt
(
info
.
zhuanKe
);
}
if
(
info
.
benKe
)
{
jiuyeInfo
[
year
]
+=
parseInt
(
info
.
benKe
);
}
if
(
info
.
shuoshi
)
{
jiuyeInfo
[
year
]
+=
parseInt
(
info
.
shuoshi
);
}
if
(
info
.
boShi
)
{
jiuyeInfo
[
year
]
+=
parseInt
(
info
.
boShi
);
}
if
(
info
.
boshiyishang
)
{
jiuyeInfo
[
year
]
+=
parseInt
(
info
.
boshiyishang
);
}
if
(
info
.
qiTa
)
{
jiuyeInfo
[
year
]
+=
parseInt
(
info
.
qiTa
);
}
})
for
(
let
key
in
jiuyeInfo
)
{
worthData
.
jiuye
.
push
({
key
,
value
:
jiuyeInfo
[
key
].
toString
()});
...
...
src/biz/ruFu.ts
View file @
a8ff5ccb
...
...
@@ -124,6 +124,7 @@ export async function settleInEnterpriseList(page:number, enterpriseName:string)
uscc
:
info
.
uscc
,
//统一信用代码
logonTime
:
moment
(
info
.
logonTime
).
format
(
"YYYY-MM-DD"
),
//注册时间
leaseTime
:
`
${
moment
(
info
.
enterprise_leases
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
info
.
enterprise_leases
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
,
fuHuaTime
:
`
${
moment
(
info
.
enterprise_fuhuas
[
0
].
startTime
).
format
(
"YYYY-MM-DD"
)}
至
${
moment
(
info
.
enterprise_fuhuas
[
0
].
endTime
).
format
(
"YYYY-MM-DD"
)}
`
,
// leaseTimeStart:info.enterprise_leases[0].startTime || 0,
// leaseTimeEnd:info.enterprise_leases[0].endTime || 0,
leaseStartTime
:
info
.
enterprise_leases
[
0
].
startTime
||
0
,
...
...
src/biz/userRuFu.ts
View file @
a8ff5ccb
...
...
@@ -308,7 +308,7 @@ export async function updateRuFu(eId:string, param) {
throw
new
BizError
(
ERRORENUM
.
已审核请前往小程序登录
)
}
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业基础信息表
,
{
state
:
CHANGESTATE
.
未审核
},
{});
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
企业基础信息表
,
{
state
:
CHANGESTATE
.
未审核
},
{
eId
});
await
operationalData
(
OPERATIONALDATATYPE
.
修改
,
TABLENAME
.
租赁信息
,
param
,
{
eId
});
return
{
isSuccess
:
true
};
...
...
src/tools/system.ts
View file @
a8ff5ccb
...
...
@@ -86,12 +86,31 @@ export function randomCode() {
* @returns
*/
export
function
getPinyinInitials
(
name
)
{
const
result
=
pinyin
(
name
,
{
style
:
pinyin
.
STYLE_FIRST_LETTER
,
// 只获取首字母
heteronym
:
false
// 不启用多音字模式
});
// 将二维数组转换为一维字符串,如 "阿里巴巴" -> "albb"
return
result
.
map
(
item
=>
item
[
0
].
charAt
(
0
)).
join
(
''
).
toUpperCase
();
// const result = pinyin(name, {
// style: pinyin.STYLE_FIRST_LETTER, // 只获取首字母
// heteronym: false // 不启用多音字模式
// });
// // 将二维数组转换为一维字符串,如 "阿里巴巴" -> "albb"
// return result.map(item => item[0].charAt(0)).join('').toUpperCase();
let
keepNumber
=
true
;
//是否保留数字
let
keepSymbol
=
true
;
//是否保留符号
return
name
.
split
(
''
)
.
map
(
char
=>
{
if
(
/
[\u
4e00-
\u
9fa5
]
/
.
test
(
char
))
{
return
pinyin
(
char
,
{
style
:
pinyin
.
STYLE_FIRST_LETTER
})[
0
][
0
].
toUpperCase
();
}
else
if
(
/
[
a-zA-Z
]
/
.
test
(
char
))
{
return
char
.
toUpperCase
();
}
else
if
(
/
\d
/
.
test
(
char
)
&&
keepNumber
)
{
// 保留数字
return
char
;
}
else
if
(
keepSymbol
)
{
// 保留符号
return
char
;
}
else
{
return
''
;
}
})
.
join
(
''
);
}
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