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
4acfb3ae
Commit
4acfb3ae
authored
Jun 11, 2020
by
sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove: 公司主体
parent
ac808f10
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
26 deletions
+20
-26
icp-deliver/app/base/db/impl/common/connection.js
+14
-14
icp-deliver/app/base/db/models/common/company.js
+1
-1
icp-deliver/app/base/db/models/delivery/company.js
+2
-1
icp-deliver/app/base/service/impl/delivery/deliverSve.js
+3
-10
No files found.
icp-deliver/app/base/db/impl/common/connection.js
View file @
4acfb3ae
...
@@ -27,10 +27,10 @@ class DbFactory {
...
@@ -27,10 +27,10 @@ class DbFactory {
console
.
log
(
"init models...."
);
console
.
log
(
"init models...."
);
}
}
async
initRelations
()
{
async
initRelations
()
{
this
.
db
.
models
.
dataauth
.
belongsTo
(
this
.
db
.
models
.
user
,
{
constraints
:
false
,
});
//
this.db.models.dataauth.belongsTo(this.db.models.user, { constraints: false, });
/*建立用户和角色之间的关系*/
/
/ /
*建立用户和角色之间的关系*/
this
.
db
.
models
.
user
.
belongsToMany
(
this
.
db
.
models
.
role
,
{
as
:
"Roles"
,
through
:
'p_userrole'
,
constraints
:
false
,
});
//
this.db.models.user.belongsToMany(this.db.models.role, { as: "Roles", through: 'p_userrole', constraints: false, });
this
.
db
.
models
.
role
.
belongsToMany
(
this
.
db
.
models
.
user
,
{
as
:
"Users"
,
through
:
'p_userrole'
,
constraints
:
false
,
});
//
this.db.models.role.belongsToMany(this.db.models.user, { as: "Users", through: 'p_userrole', constraints: false, });
/*组织机构自引用*/
/*组织机构自引用*/
//this.db.models.org.belongsTo(this.db.models.org,{constraints: false,});
//this.db.models.org.belongsTo(this.db.models.org,{constraints: false,});
//this.db.models.org.hasMany(this.db.models.org,{constraints: false,});
//this.db.models.org.hasMany(this.db.models.org,{constraints: false,});
...
@@ -44,24 +44,24 @@ class DbFactory {
...
@@ -44,24 +44,24 @@ class DbFactory {
// this.db.models.user.belongsTo(this.db.models.org,{constraints: false,});
// this.db.models.user.belongsTo(this.db.models.org,{constraints: false,});
// this.db.models.org.hasMany(this.db.models.user,{constraints: false,});
// this.db.models.org.hasMany(this.db.models.user,{constraints: false,});
this
.
db
.
models
.
user
.
belongsTo
(
this
.
db
.
models
.
app
,
{
constraints
:
false
,
});
//
this.db.models.user.belongsTo(this.db.models.app, { constraints: false, });
this
.
db
.
models
.
role
.
belongsTo
(
this
.
db
.
models
.
app
,
{
constraints
:
false
,
});
//
this.db.models.role.belongsTo(this.db.models.app, { constraints: false, });
this
.
db
.
models
.
auth
.
belongsTo
(
this
.
db
.
models
.
app
,
{
constraints
:
false
,
});
//
this.db.models.auth.belongsTo(this.db.models.app, { constraints: false, });
this
.
db
.
models
.
auth
.
belongsTo
(
this
.
db
.
models
.
company
,
{
constraints
:
false
,
});
//
this.db.models.auth.belongsTo(this.db.models.company, { constraints: false, });
this
.
db
.
models
.
auth
.
belongsTo
(
this
.
db
.
models
.
role
,
{
constraints
:
false
,
});
//
this.db.models.auth.belongsTo(this.db.models.role, { constraints: false, });
this
.
db
.
models
.
app
.
belongsTo
(
this
.
db
.
models
.
user
,
{
as
:
"creator"
,
constraints
:
false
,
});
//
this.db.models.app.belongsTo(this.db.models.user, { as: "creator", constraints: false, });
this
.
db
.
models
.
user
.
belongsTo
(
this
.
db
.
models
.
company
,
{
constraints
:
false
,
});
//
this.db.models.user.belongsTo(this.db.models.company, { constraints: false, });
this
.
db
.
models
.
role
.
belongsTo
(
this
.
db
.
models
.
company
,
{
constraints
:
false
,
});
//
this.db.models.role.belongsTo(this.db.models.company, { constraints: false, });
// this.db.models.org.belongsTo(this.db.models.company,{constraints: false,});
// this.db.models.org.belongsTo(this.db.models.company,{constraints: false,});
this
.
db
.
models
.
route
.
belongsTo
(
this
.
db
.
models
.
app
,
{
constraints
:
false
,
});
//
this.db.models.route.belongsTo(this.db.models.app, { constraints: false, });
this
.
db
.
models
.
plugin
.
belongsTo
(
this
.
db
.
models
.
app
,
{
constraints
:
false
,
});
//
this.db.models.plugin.belongsTo(this.db.models.app, { constraints: false, });
// 商机表 1:1 方案表
// 商机表 1:1 方案表
this
.
db
.
models
.
scheme
.
belongsTo
(
this
.
db
.
models
.
bizopt
,
{
constraints
:
false
,
});
this
.
db
.
models
.
scheme
.
belongsTo
(
this
.
db
.
models
.
bizopt
,
{
constraints
:
false
,
});
...
...
icp-deliver/app/base/db/models/common/company.js
View file @
4acfb3ae
const
system
=
require
(
"../../../system"
);
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
const
appconfig
=
system
.
getSysConfig
();
module
.
exports
=
(
db
,
DataTypes
)
=>
{
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"company"
,
{
return
db
.
define
(
"company"
,
{
name
:
{
name
:
{
...
...
icp-deliver/app/base/db/models/delivery/company.js
View file @
4acfb3ae
...
@@ -5,7 +5,8 @@ const appconfig = system.getSysConfig();
...
@@ -5,7 +5,8 @@ const appconfig = system.getSysConfig();
* 公司主体表
* 公司主体表
*/
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"company"
,
{
//TODO:
return
db
.
define
(
"company1"
,
{
name
:
{
name
:
{
allowNull
:
false
,
allowNull
:
false
,
type
:
DataTypes
.
STRING
type
:
DataTypes
.
STRING
...
...
icp-deliver/app/base/service/impl/delivery/deliverSve.js
View file @
4acfb3ae
...
@@ -6,7 +6,6 @@ class DeliverService extends ServiceBase {
...
@@ -6,7 +6,6 @@ class DeliverService extends ServiceBase {
constructor
()
{
constructor
()
{
super
(
"delivery"
,
ServiceBase
.
getDaoName
(
DeliverService
));
super
(
"delivery"
,
ServiceBase
.
getDaoName
(
DeliverService
));
this
.
cacheinfoDao
=
system
.
getObject
(
"db.delivery.cacheinfoDao"
);
this
.
cacheinfoDao
=
system
.
getObject
(
"db.delivery.cacheinfoDao"
);
this
.
companyDao
=
system
.
getObject
(
"db.delivery.companyDao"
);
this
.
materialDao
=
system
.
getObject
(
"db.delivery.materialDao"
);
this
.
materialDao
=
system
.
getObject
(
"db.delivery.materialDao"
);
this
.
statuslogDao
=
system
.
getObject
(
"db.bizchance.statuslogDao"
);
this
.
statuslogDao
=
system
.
getObject
(
"db.bizchance.statuslogDao"
);
this
.
qualificationDao
=
system
.
getObject
(
"db.delivery.qualificationDao"
);
this
.
qualificationDao
=
system
.
getObject
(
"db.delivery.qualificationDao"
);
...
@@ -34,10 +33,8 @@ class DeliverService extends ServiceBase {
...
@@ -34,10 +33,8 @@ class DeliverService extends ServiceBase {
* 1.此状态下是否可以提交材料
* 1.此状态下是否可以提交材料
* 2.同步暂存数据表
* 2.同步暂存数据表
* 3.存储到材料表
* 3.存储到材料表
* 4.提取 公司主体信息 存储到公司表
* 4.更改 交付单流转状态
* 5.TODO:公司表 与 交付单 表 关联
* 5.推送到腾讯
* 6.更改 交付单流转状态
* 7.推送到腾讯
*/
*/
const
deliverData
=
await
this
.
dao
.
findOne
({
const
deliverData
=
await
this
.
dao
.
findOne
({
id
:
pobj
.
deliver_id
id
:
pobj
.
deliver_id
...
@@ -64,11 +61,7 @@ class DeliverService extends ServiceBase {
...
@@ -64,11 +61,7 @@ class DeliverService extends ServiceBase {
status_code
:
system
.
SERVERSESTATUS
.
SUBMITING
status_code
:
system
.
SERVERSESTATUS
.
SUBMITING
},
t
);
},
t
);
}
}
await
this
.
companyDao
.
createOrUpdate
({
...
pobj
.
cache_info
.
proposerInfo
.
businessLicense
,
lastContactInfo
:
pobj
.
cache_info
.
proposerInfo
.
contactInfo
,
firstBuyTime
:
deliverData
.
created_at
},
t
);
return
"SUCCESS"
return
"SUCCESS"
});
});
}
}
...
...
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