Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yuyixcx
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
yuyixcx
Commits
badb1640
Commit
badb1640
authored
Apr 22, 2025
by
chenjinjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
2311befa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
7 deletions
+34
-7
serverConfig.xml
serverConfig.xml
+2
-1
enterpriseInfo.ts
src/biz/enterpriseInfo.ts
+7
-6
system.ts
src/tools/system.ts
+25
-0
No files found.
serverConfig.xml
View file @
badb1640
<config>
<port>
9099
</port>
<sign>
xxx90909082fsdahfjosadjfpoiwausjorip2hjklrhn1ioud0u124rx0qwejfokasjfolksaujfoas
</sign>
<dbServer>
http://1
27.0.0.1
:9096
</dbServer>
<dbServer>
http://1
92.168.0.105
:9096
</dbServer>
</config>
\ No newline at end of file
src/biz/enterpriseInfo.ts
View file @
badb1640
...
...
@@ -12,7 +12,7 @@ import { checkChange, extractData } from "../util/piecemeal";
import
{
changeEnumValue
,
eccEnumValue
}
from
"../util/verificationEnum"
;
import
{
eccFormParam
}
from
"../util/verificationParam"
;
import
{
ERRORENUM
}
from
"../config/enum/errorEnum"
;
import
{
getMySqlMs
,
getToken
,
randomId
}
from
"../tools/system"
;
import
{
get
DeclarationTime
,
getLastDeclarationTime
,
get
MySqlMs
,
getToken
,
randomId
}
from
"../tools/system"
;
import
moment
=
require
(
"moment"
);
import
{
sendVerificationCode
}
from
"./mail"
;
...
...
@@ -225,7 +225,8 @@ export async function homePage(eId:string) {
let
thisYear
=
new
Date
().
getFullYear
();
let
jysjFile
=
[
"BI"
,
"TXP"
,
"RD"
,
"mId"
,
"annual"
,
"quarter"
];
let
thisYearjJysjInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
state
:
1
,
annual
:
getMySqlMs
(
`
${
thisYear
}
-01-01 00:00:00`
)},
jysjFile
);
let
thisQuarter
=
getDeclarationTime
();
let
thisYearjJysjInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
annual
:
thisQuarter
.
declarationYear
,
quarter
:
thisQuarter
.
declarationQuarter
},
jysjFile
);
if
(
thisYearjJysjInfo
&&
thisYearjJysjInfo
.
mId
)
{
dataInfo
.
manage
.
thisYear
.
BI
=
!
isNaN
(
thisYearjJysjInfo
.
BI
)
?
thisYearjJysjInfo
.
BI
:
"未填报"
;
...
...
@@ -233,16 +234,16 @@ export async function homePage(eId:string) {
dataInfo
.
manage
.
thisYear
.
RD
=
!
isNaN
(
thisYearjJysjInfo
.
RD
)
?
thisYearjJysjInfo
.
RD
:
"未填报"
;
}
let
lastYearjJysjInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
state
:
1
,
annual
:
getMySqlMs
(
`
${
thisYear
-
1
}
-01-01 00:00:00`
)},
jysjFile
);
let
laseQuarter
=
getLastDeclarationTime
();
let
lastYearjJysjInfo
=
await
selectData
(
OPERATIONALDATATYPE
.
查询单个
,
TABLENAME
.
企业经营信息
,
{
eId
,
annual
:
laseQuarter
.
declarationYear
,
quarter
:
laseQuarter
.
declarationQuarter
},
jysjFile
);
// let lastYearjJysjInfo = await selectData(OPERATIONALDATATYPE.查询单个, TABLENAME.企业经营信息, { eId, state:1, annual:getMySqlMs(`${thisYear-1}-01-01 00:00:00`)}, jysjFile);
if
(
lastYearjJysjInfo
&&
lastYearjJysjInfo
.
mId
)
{
dataInfo
.
manage
.
lastYear
.
BI
=
!
isNaN
(
lastYearjJysjInfo
.
BI
)
?
lastYearjJysjInfo
.
BI
:
"未填报"
;
dataInfo
.
manage
.
lastYear
.
TXP
=
!
isNaN
(
lastYearjJysjInfo
.
TXP
)
?
lastYearjJysjInfo
.
TXP
:
"未填报"
;
dataInfo
.
manage
.
lastYear
.
RD
=
!
isNaN
(
lastYearjJysjInfo
.
RD
)
?
lastYearjJysjInfo
.
RD
:
"未填报"
;
}
return
{
dataInfo
}
return
{
dataInfo
}
}
...
...
src/tools/system.ts
View file @
badb1640
...
...
@@ -73,3 +73,28 @@ export function getMySqlMs(time?) {
time
=
new
Date
(
time
).
valueOf
()
||
new
Date
().
valueOf
();
return
moment
(
time
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
/**
* 获取上季度
*/
export
function
getLastDeclarationTime
()
{
let
thisYear
=
new
Date
().
getFullYear
();
let
thisQuarter
=
moment
().
quarter
();
//当月填报季度
if
(
(
thisQuarter
-
1
)
<
1
)
{
thisYear
=
moment
().
subtract
(
1
,
'years'
).
year
();
thisQuarter
=
4
;
}
else
thisQuarter
=
thisQuarter
-
1
;
return
{
declarationYear
:
getMySqlMs
(
`
${
thisYear
}
-01-01 00:00:00`
),
declarationQuarter
:
thisQuarter
};
}
/**
* 获取本季度
*/
export
function
getDeclarationTime
()
{
let
thisYear
=
new
Date
().
getFullYear
();
let
thisQuarter
=
moment
().
quarter
();
//当月填报季度
return
{
declarationYear
:
getMySqlMs
(
`
${
thisYear
}
-01-01 00:00:00`
),
declarationQuarter
:
thisQuarter
};
}
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