Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjxcxServer
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
zjxcxServer
Commits
2f55f399
Commit
2f55f399
authored
May 29, 2023
by
lixinming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
c3a04dba
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
10 deletions
+68
-10
provide.ts
src/biz/admin/provide.ts
+16
-0
enterprise.ts
src/biz/mobileFuHuaQi/enterprise/enterprise.ts
+4
-1
fuHuaQiBusiness.ts
src/biz/mobileFuHuaQi/fuHuaQi/fuHuaQiBusiness.ts
+13
-3
monthTask.ts
src/biz/mobileFuHuaQi/fuHuaQi/task/monthTask.ts
+17
-3
enterprise.ts
src/data/enterprise/enterprise.ts
+6
-0
provide.ts
src/routers/provide.ts
+9
-0
verificationParam.ts
src/util/verificationParam.ts
+3
-3
No files found.
src/biz/admin/provide.ts
View file @
2f55f399
...
@@ -459,4 +459,19 @@ export async function replaceInitEnberpriseData() {
...
@@ -459,4 +459,19 @@ export async function replaceInitEnberpriseData() {
}
}
console
.
log
(
"完成"
);
console
.
log
(
"完成"
);
}
export
async
function
initEnterprisePwd
()
{
let
result
=
await
enterpriseData
.
findEnterpriseList
({
pwd
:
null
});
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
let
dataItem
=
result
[
i
];
let
pwd
=
sysTools
.
getPwdMd5
(
dataItem
.
uscc
,
sysTools
.
md5PwdStr
(
dataItem
.
uscc
.
slice
(
dataItem
.
uscc
.
length
-
6
)));
await
enterpriseData
.
updateEnterprisePwd
(
dataItem
.
uscc
,
pwd
);
}
console
.
log
(
"补全企业密码成功"
,
result
.
length
);
return
{}
}
}
\ No newline at end of file
src/biz/mobileFuHuaQi/enterprise/enterprise.ts
View file @
2f55f399
...
@@ -101,6 +101,8 @@ export async function moveInEnterprise(uscc:string, param) {
...
@@ -101,6 +101,8 @@ export async function moveInEnterprise(uscc:string, param) {
let
dataBaseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
param
.
uscc
);
let
dataBaseInfo
=
await
enterpriseData
.
findEnterpriseByUscc
(
param
.
uscc
);
if
(
dataBaseInfo
&&
dataBaseInfo
.
uscc
&&
dataBaseInfo
.
state
!=
configEnum
.
FUHUASTATE
.
迁出
)
throw
new
BizError
(
ERRORENUM
.
该企业已存在
,
`
${
param
.
uscc
}
已经在库中存在`
);
if
(
dataBaseInfo
&&
dataBaseInfo
.
uscc
&&
dataBaseInfo
.
state
!=
configEnum
.
FUHUASTATE
.
迁出
)
throw
new
BizError
(
ERRORENUM
.
该企业已存在
,
`
${
param
.
uscc
}
已经在库中存在`
);
const
TaskId
=
taskTool
.
getTaskId
(
uscc
);
if
(
dataBaseInfo
&&
dataBaseInfo
.
state
&&
dataBaseInfo
.
state
==
configEnum
.
FUHUASTATE
.
迁出
)
{
if
(
dataBaseInfo
&&
dataBaseInfo
.
state
&&
dataBaseInfo
.
state
==
configEnum
.
FUHUASTATE
.
迁出
)
{
dataBaseInfo
.
fuHuaQiUscc
=
uscc
;
dataBaseInfo
.
fuHuaQiUscc
=
uscc
;
dataBaseInfo
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
dataBaseInfo
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
...
@@ -110,6 +112,7 @@ export async function moveInEnterprise(uscc:string, param) {
...
@@ -110,6 +112,7 @@ export async function moveInEnterprise(uscc:string, param) {
dataBaseInfo
.
moveOutType
=
0
;
dataBaseInfo
.
moveOutType
=
0
;
dataBaseInfo
.
moveOutTrace
=
0
;
dataBaseInfo
.
moveOutTrace
=
0
;
dataBaseInfo
.
moveOutCause
=
[];
dataBaseInfo
.
moveOutCause
=
[];
dataBaseInfo
.
taskId
=
TaskId
;
dataBaseInfo
.
moveOutTime
=
0
;
dataBaseInfo
.
moveOutTime
=
0
;
for
(
let
key
in
eccFormParamConfig
.
MoveInEnterpriseParamConfig
)
{
for
(
let
key
in
eccFormParamConfig
.
MoveInEnterpriseParamConfig
)
{
dataBaseInfo
[
key
]
=
param
[
key
];
dataBaseInfo
[
key
]
=
param
[
key
];
...
@@ -119,7 +122,7 @@ export async function moveInEnterprise(uscc:string, param) {
...
@@ -119,7 +122,7 @@ export async function moveInEnterprise(uscc:string, param) {
/**添加新注册企业标识 */
/**添加新注册企业标识 */
param
.
draftId
=
sysTools
.
getDraftId
(
uscc
);
//草稿箱id
param
.
draftId
=
sysTools
.
getDraftId
(
uscc
);
//草稿箱id
param
.
isCreate
=
false
;
//标识此次操作是否是迁入企业并不是新注册企业
param
.
isCreate
=
false
;
//标识此次操作是否是迁入企业并不是新注册企业
const
TaskId
=
taskTool
.
getTaskId
(
uscc
);
param
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
//默认就是实体孵化
param
.
state
=
configEnum
.
FUHUASTATE
.
实体孵化
;
//默认就是实体孵化
await
enterpriseData
.
createEnterprise
(
uscc
,
TaskId
,
param
);
await
enterpriseData
.
createEnterprise
(
uscc
,
TaskId
,
param
);
...
...
src/biz/mobileFuHuaQi/fuHuaQi/fuHuaQiBusiness.ts
View file @
2f55f399
...
@@ -100,12 +100,22 @@ export async function updateBusiness(uscc:string, param) {
...
@@ -100,12 +100,22 @@ export async function updateBusiness(uscc:string, param) {
}
}
/**
* 我的数据中展示填报的经营数据
* @param uscc
* @param year
* @param quarter
* @returns
*/
export
async
function
showBusinessData
(
uscc
:
string
,
year
:
number
,
quarter
:
number
)
{
export
async
function
showBusinessData
(
uscc
:
string
,
year
:
number
,
quarter
:
number
)
{
let
taskId
=
taskTool
.
getQuarterTaskIdByYearAndQuarter
(
uscc
,
year
,
quarter
);
let
taskId
=
taskTool
.
getQuarterTaskIdByYearAndQuarter
(
uscc
,
year
,
quarter
);
let
businessInfo
=
await
findBusinessByTaskId
(
taskId
);
let
businessInfo
=
await
findBusinessByTaskId
(
taskId
);
if
(
!
businessInfo
)
throw
new
BizError
(
ERRORENUM
.
系统错误请联系管理员
,
`孵化器->我的数据->点击了之后 没找到经营数据的数据 taskId=
${
taskId
}
`
);
if
(
!
businessInfo
)
{
businessInfo
=
{
TR
:
0
,
ROR
:
0
,
RR
:
0
,
FS
:
0
,
MIS
:
0
,
NP
:
0
,
TP
:
0
}
}
let
businessData
=
extractData
(
FuHuaQiBusinessDataInfoConfig
,
businessInfo
,
false
);
let
businessData
=
extractData
(
FuHuaQiBusinessDataInfoConfig
,
businessInfo
,
false
);
return
{
businessData
};
return
{
businessData
};
...
...
src/biz/mobileFuHuaQi/fuHuaQi/task/monthTask.ts
View file @
2f55f399
...
@@ -15,14 +15,14 @@
...
@@ -15,14 +15,14 @@
import
moment
=
require
(
"moment"
);
import
moment
=
require
(
"moment"
);
import
{
QUARTERTASKTYPEENUM
,
SCOREWAYS
,
TASKTYPEENUM
}
from
"../../../../config/enum"
;
import
{
QUARTERTASKTYPEENUM
,
SCOREWAYS
,
TASKTYPEENUM
}
from
"../../../../config/enum"
;
import
{
ERRORENUM
}
from
"../../../../config/errorEnum"
;
import
{
ERRORENUM
}
from
"../../../../config/errorEnum"
;
import
{
findEnterprise
Coun
t
,
findEnterpriseListByTaskId
,
updateEnterpriseDraftLock
}
from
"../../../../data/enterprise/enterprise"
;
import
{
findEnterprise
ByUscc
,
findEnterpriseCount
,
findEnterpriseLis
t
,
findEnterpriseListByTaskId
,
updateEnterpriseDraftLock
}
from
"../../../../data/enterprise/enterprise"
;
import
{
findFinancingCount
,
findFinancingListByTaskId
,
updateFinancingDraftLock
}
from
"../../../../data/fuHuaQi/monthTask/financing"
;
import
{
findFinancingCount
,
findFinancingListByTaskId
,
updateFinancingDraftLock
}
from
"../../../../data/fuHuaQi/monthTask/financing"
;
import
{
findAllNotDisabledFuHuaQi
}
from
"../../../../data/fuHuaQi/fuhuaqi"
;
import
{
findAllNotDisabledFuHuaQi
}
from
"../../../../data/fuHuaQi/fuhuaqi"
;
import
*
as
monthTableData
from
"../../../../data/fuHuaQi/monthTask/monthTable"
;
import
*
as
monthTableData
from
"../../../../data/fuHuaQi/monthTask/monthTable"
;
import
*
as
taskData
from
"../../../../data/fuHuaQi/monthTask/task"
;
import
*
as
taskData
from
"../../../../data/fuHuaQi/monthTask/task"
;
import
{
BizError
}
from
"../../../../util/bizError"
;
import
{
BizError
}
from
"../../../../util/bizError"
;
import
{
logHandle
}
from
"../../../../util/log"
;
import
{
logHandle
}
from
"../../../../util/log"
;
import
{
get
ThisMonthMs
}
from
"../../../../tools/system"
;
import
{
get
PwdMd5
,
getThisMonthMs
,
md5PwdStr
}
from
"../../../../tools/system"
;
import
*
as
taskTool
from
"../../../../tools/taskTool"
;
import
*
as
taskTool
from
"../../../../tools/taskTool"
;
import
*
as
scoreBiz
from
"../score"
;
import
*
as
scoreBiz
from
"../score"
;
...
@@ -299,7 +299,7 @@ export async function provideMonthTask() {
...
@@ -299,7 +299,7 @@ export async function provideMonthTask() {
/**
/**
* 回收任务
分数
* 回收任务
计算分数 给账号加上密码
*/
*/
export
async
function
retrieveMonthTask
()
{
export
async
function
retrieveMonthTask
()
{
/**获取上个月 时间key */
/**获取上个月 时间key */
...
@@ -318,4 +318,17 @@ export async function retrieveMonthTask() {
...
@@ -318,4 +318,17 @@ export async function retrieveMonthTask() {
}
}
logHandle
(
`
${
TimeKey
}
任务回收成功=> 分数更新成功(
${
notSubmitList
.
length
}
)条`
);
logHandle
(
`
${
TimeKey
}
任务回收成功=> 分数更新成功(
${
notSubmitList
.
length
}
)条`
);
/**初始化企业密码 */
let
notPwdEnterpriseList
=
await
findEnterpriseList
({
pwd
:
null
});
for
(
let
i
=
0
;
i
<
notPwdEnterpriseList
.
length
;
i
++
)
{
let
dataItem
=
notPwdEnterpriseList
[
i
];
let
info
=
await
findEnterpriseByUscc
(
dataItem
.
uscc
);
info
.
pwd
=
getPwdMd5
(
info
.
uscc
,
md5PwdStr
(
dataItem
.
uscc
.
slice
(
dataItem
.
uscc
.
length
-
6
)));
await
info
.
save
();
}
logHandle
(
`
${
TimeKey
}
成功初始化了(
${
notPwdEnterpriseList
.
length
}
)个企业密码`
);
}
}
\ No newline at end of file
src/data/enterprise/enterprise.ts
View file @
2f55f399
...
@@ -166,6 +166,10 @@ export async function updateEnterpriseDraftLock(taskId:string) {
...
@@ -166,6 +166,10 @@ export async function updateEnterpriseDraftLock(taskId:string) {
}
}
export
async
function
updateEnterprisePwd
(
uscc
:
string
,
pwd
:
string
)
{
return
await
enterpriseModel
.
updateMany
({
uscc
},
{
$set
:{
pwd
}});
}
/**
/**
* 创建新的企业数据
* 创建新的企业数据
* @param fuHuaQiUscc 企业所属孵化器的统一信用代码
* @param fuHuaQiUscc 企业所属孵化器的统一信用代码
...
@@ -297,6 +301,8 @@ export async function updateEnterpriseState(state:number) {
...
@@ -297,6 +301,8 @@ export async function updateEnterpriseState(state:number) {
return
await
enterpriseModel
.
updateMany
({},
{
$set
:{
state
}});
return
await
enterpriseModel
.
updateMany
({},
{
$set
:{
state
}});
}
}
/**
/**
* 补录企业
* 补录企业
* @param fuHuaQiUscc
* @param fuHuaQiUscc
...
...
src/routers/provide.ts
View file @
2f55f399
...
@@ -22,6 +22,9 @@ export function setRouter(httpServer) {
...
@@ -22,6 +22,9 @@ export function setRouter(httpServer) {
/**补录数据 已完成 */
/**补录数据 已完成 */
httpServer
.
post
(
'/admin/provide/basedata/inputdata'
,
checkInterior
,
asyncHandler
(
inputData
));
httpServer
.
post
(
'/admin/provide/basedata/inputdata'
,
checkInterior
,
asyncHandler
(
inputData
));
httpServer
.
post
(
'/admin/provide/basedata/inputenterprise202304data'
,
checkInterior
,
asyncHandler
(
inputEnterprise202304Data
));
httpServer
.
post
(
'/admin/provide/basedata/inputenterprise202304data'
,
checkInterior
,
asyncHandler
(
inputEnterprise202304Data
));
/**3.2 */
httpServer
.
post
(
'/admin/provide/enterprise/initpwd'
,
checkInterior
,
asyncHandler
(
updateEnterprisePwd
)
);
}
}
...
@@ -98,4 +101,9 @@ async function updateAddress(req, res) {
...
@@ -98,4 +101,9 @@ async function updateAddress(req, res) {
async
function
enterpriseInfo
(
req
,
res
)
{
async
function
enterpriseInfo
(
req
,
res
)
{
await
provideBiz
.
updateEnterpriseDataInfo
();
await
provideBiz
.
updateEnterpriseDataInfo
();
res
.
success
({
isUsccess
:
true
});
res
.
success
({
isUsccess
:
true
});
}
async
function
updateEnterprisePwd
(
req
,
res
)
{
await
provideBiz
.
initEnterprisePwd
();
res
.
success
({
isUsccess
:
true
});
}
}
\ No newline at end of file
src/util/verificationParam.ts
View file @
2f55f399
...
@@ -19,7 +19,7 @@ import { BizError } from "./bizError";
...
@@ -19,7 +19,7 @@ import { BizError } from "./bizError";
export
function
eccFormParam
(
name
:
string
,
keyTypeConf
:
object
,
param
:
object
)
{
export
function
eccFormParam
(
name
:
string
,
keyTypeConf
:
object
,
param
:
object
)
{
/**校验多余字段 */
/**校验多余字段 */
for
(
let
key
in
param
)
{
for
(
let
key
in
param
)
{
if
(
!
keyTypeConf
[
key
])
throw
new
BizError
(
ERRORENUM
.
参数错误
,
`多余
${
key
}
字段`
);
if
(
!
keyTypeConf
[
key
])
throw
new
BizError
(
ERRORENUM
.
参数错误
,
name
,
`多余
${
key
}
字段`
);
}
}
/**校验已填参数 */
/**校验已填参数 */
...
@@ -33,7 +33,7 @@ export function eccFormParam(name:string, keyTypeConf:object, param:object) {
...
@@ -33,7 +33,7 @@ export function eccFormParam(name:string, keyTypeConf:object, param:object) {
let
valueType
=
typeof
value
;
let
valueType
=
typeof
value
;
if
(
value
==
null
||
value
==
undefined
)
{
if
(
value
==
null
||
value
==
undefined
)
{
if
(
!
notMustHave
)
throw
new
BizError
(
ERRORENUM
.
参数错误
,
`缺失
${
key
}
字段`
);
if
(
!
notMustHave
)
throw
new
BizError
(
ERRORENUM
.
参数错误
,
name
,
`缺失
${
key
}
字段`
);
}
else
{
}
else
{
switch
(
type
)
{
switch
(
type
)
{
case
'Number'
:
case
'Number'
:
...
@@ -92,7 +92,7 @@ export function eccFormParam(name:string, keyTypeConf:object, param:object) {
...
@@ -92,7 +92,7 @@ export function eccFormParam(name:string, keyTypeConf:object, param:object) {
if
(
nullIndex
!=
-
1
)
{
//出现过空 第一次出现后的位置 都不能有值
if
(
nullIndex
!=
-
1
)
{
//出现过空 第一次出现后的位置 都不能有值
if
(
param
[
key
])
{
if
(
param
[
key
])
{
//做一个特化
//做一个特化
throw
new
BizError
(
ERRORENUM
.
地址数据不完整
,
`
${
key
}
下标
${
nullIndex
}
为空 `
);
throw
new
BizError
(
ERRORENUM
.
地址数据不完整
,
name
,
`
${
key
}
下标
${
nullIndex
}
为空 `
);
}
}
}
}
if
(
nullIndex
==
-
1
&&
!
param
[
key
][
i
])
{
if
(
nullIndex
==
-
1
&&
!
param
[
key
][
i
])
{
...
...
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