Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
d1cc94d3
Commit
d1cc94d3
authored
Sep 16, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新批次信息'
parent
0a972d97
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
104 additions
and
64 deletions
+104
-64
center-manage/app/config/localsettings.js
+0
-32
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
+15
-0
ic-deliver/app/base/db/impl/bizchance/bizbatchDao.js
+8
-0
ic-deliver/app/base/db/models/delivery/business_batch.js
+51
-0
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
+30
-0
icp-deliver/app/config/localsettings.js
+0
-32
No files found.
center-manage/app/config/localsettings.js
deleted
100644 → 0
View file @
0a972d97
var
settings
=
{
redis
:
{
host
:
"192.168.4.119"
,
port
:
6379
,
password
:
"Gongsibao2018"
,
db
:
9
,
},
database
:
{
dbname
:
"gsbcenter_manage"
,
user
:
"write"
,
password
:
"write"
,
config
:
{
host
:
'43.247.184.35'
,
port
:
8899
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
max
:
5
,
min
:
0
,
acquire
:
90000000
,
idle
:
1000000
},
debug
:
false
,
dialectOptions
:
{
requestTimeout
:
999999
,
// instanceName:'DEV'
}
//设置MSSQL超时时间
}
},
kongurl
:
'http://192.168.4.119:8001/'
,
};
module
.
exports
=
settings
;
ic-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
d1cc94d3
...
@@ -286,6 +286,21 @@ class BizOptCtl extends CtlBase {
...
@@ -286,6 +286,21 @@ class BizOptCtl extends CtlBase {
}
}
}
}
/**
* 更新商机批次信息
* @param {*} pobj
* @param {*} qobj
* @param {*} req
*/
async
batchChanceUpdate
(
pobj
,
qobj
,
req
)
{
try
{
const
rs
=
await
this
.
service
.
batchChanceUpdate
(
pobj
);
return
system
.
getResult
(
rs
);
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
)
}
}
timeFormat
(
date
)
{
timeFormat
(
date
)
{
let
localTime
=
moment
.
utc
(
date
).
toDate
();
let
localTime
=
moment
.
utc
(
date
).
toDate
();
localTime
=
moment
(
localTime
).
format
(
"YYYY-MM-DD"
);
localTime
=
moment
(
localTime
).
format
(
"YYYY-MM-DD"
);
...
...
ic-deliver/app/base/db/impl/bizchance/bizbatchDao.js
0 → 100644
View file @
d1cc94d3
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
BizbatchDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
BizbatchDao
));
}
}
module
.
exports
=
BizbatchDao
;
ic-deliver/app/base/db/models/delivery/business_batch.js
0 → 100644
View file @
d1cc94d3
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 商机批次表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"bizbatch"
,
{
batchNumber
:
{
// 需求批次
allowNull
:
false
,
type
:
DataTypes
.
STRING
},
batchInfo
:
{
// 批次详情
allowNull
:
false
,
type
:
DataTypes
.
JSON
},
processingStatus
:
{
// 处理状态 processing(处理中) success(成功)
allowNull
:
false
,
type
:
DataTypes
.
STRING
,
},
paymentLink
:
{
// 支付链接
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
createrId
:
{
//创建人id
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
createrName
:
{
// 创建人名称
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
createrOpcode
:
{
// 创建人 组织结构路径
allowNull
:
true
,
type
:
DataTypes
.
STRING
}
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'bussiness_bath'
,
validate
:
{
},
indexes
:
[]
});
}
\ No newline at end of file
ic-deliver/app/base/service/impl/bizchance/bizoptSve.js
View file @
d1cc94d3
...
@@ -5,6 +5,8 @@ const appconfig = system.getSysConfig();
...
@@ -5,6 +5,8 @@ const appconfig = system.getSysConfig();
class
BizOptService
extends
ServiceBase
{
class
BizOptService
extends
ServiceBase
{
constructor
()
{
constructor
()
{
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
BizOptService
));
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
BizOptService
));
this
.
bizbatchDao
=
system
.
getObject
(
"db.bizchance.bizbatchDao"
);
}
}
async
statBizChanceCountBySp
(
bizStatus
,
betweenTime
)
{
async
statBizChanceCountBySp
(
bizStatus
,
betweenTime
)
{
let
params
=
{}
let
params
=
{}
...
@@ -109,6 +111,33 @@ class BizOptService extends ServiceBase {
...
@@ -109,6 +111,33 @@ class BizOptService extends ServiceBase {
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
});
});
}
}
/*更新商机批次信息*/
async
batchChanceUpdate
(
qobj
)
{
let
data
=
await
this
.
bizbatchDao
.
findOne
({
batchNumber
:
qobj
.
batchNumber
});
if
(
!
data
)
{
throw
new
Error
(
"查不到商机批次信息"
)
}
if
(
data
.
processingStatus
===
"success"
)
{
return
"已处理成功,重复请求"
}
let
demandObj
=
{};
for
(
let
val
of
qobj
.
demands
)
{
demandObj
[
val
.
uniqueCode
]
=
val
.
demandCode
;
}
await
this
.
bizbatchDao
.
updateByWhere
({
processingStatus
:
"success"
,
paymentLink
:
qobj
.
paymentLink
,
batchInfo
:
data
.
batchInfo
.
map
(
item
=>
{
item
.
demandCode
=
demandObj
[
item
.
uniqueCode
]
||
''
return
item
})
},
{
id
:
data
.
id
})
return
"SUCESS"
}
}
}
module
.
exports
=
BizOptService
;
module
.
exports
=
BizOptService
;
\ No newline at end of file
icp-deliver/app/config/localsettings.js
deleted
100644 → 0
View file @
0a972d97
var
settings
=
{
redis
:
{
host
:
"192.168.4.119"
,
port
:
6379
,
password
:
"Gongsibao2018"
,
db
:
9
,
},
database
:
{
dbname
:
"ent_deliver"
,
user
:
"write"
,
password
:
"write"
,
config
:
{
host
:
'43.247.184.35'
,
port
:
8899
,
dialect
:
'mysql'
,
operatorsAliases
:
false
,
pool
:
{
max
:
5
,
min
:
0
,
acquire
:
90000000
,
idle
:
1000000
},
debug
:
false
,
dialectOptions
:
{
requestTimeout
:
999999
,
// instanceName:'DEV'
}
//设置MSSQL超时时间
}
},
kongurl
:
'http://192.168.4.119:8001/'
,
};
module
.
exports
=
settings
;
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