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
ff0cdd06
Commit
ff0cdd06
authored
Sep 03, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 分配记录
parent
26192b3c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
113 additions
and
1 deletions
+113
-1
icp-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
+29
-0
icp-deliver/app/base/db/impl/bizchance/communicationrecordDao.js
+8
-0
icp-deliver/app/base/db/impl/common/connection.js
+4
-0
icp-deliver/app/base/db/models/delivery/communication_record.js
+57
-0
icp-deliver/app/base/service/impl/bizchance/bizoptSve.js
+15
-1
No files found.
icp-deliver/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
ff0cdd06
...
...
@@ -51,5 +51,34 @@ class BizOptCtl extends CtlBase {
}
}
// 沟通记录 查询
async
communicationRecordList
(
pobj
)
{
if
(
!
pobj
.
bizId
)
{
return
system
.
getResult
(
null
,
"bizId can not be empty,100290"
);
}
try
{
const
rs
=
await
this
.
service
.
communicationRecordList
(
pobj
);
return
system
.
getResult
(
rs
.
reverse
());
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
);
}
}
// 沟通记录新增
async
createCommunicationRecord
(
pobj
)
{
if
(
!
pobj
.
bizId
)
{
return
system
.
getResult
(
null
,
"bizId can not be empty,100290"
);
}
if
(
!
pobj
.
content
)
{
return
system
.
getResult
(
null
,
"content can not be empty,100290"
);
}
try
{
await
this
.
service
.
createCommunicationRecord
(
pobj
);
return
system
.
getResultSuccess
();
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
);
}
}
}
module
.
exports
=
BizOptCtl
;
icp-deliver/app/base/db/impl/bizchance/communicationrecordDao.js
0 → 100644
View file @
ff0cdd06
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
CommunicationrecordDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
CommunicationrecordDao
));
}
}
module
.
exports
=
CommunicationrecordDao
;
icp-deliver/app/base/db/impl/common/connection.js
View file @
ff0cdd06
...
...
@@ -106,6 +106,10 @@ class DbFactory {
this
.
db
.
models
.
scheme
.
belongsTo
(
this
.
db
.
models
.
bizopt
,
{
constraints
:
false
,
});
this
.
db
.
models
.
bizopt
.
hasOne
(
this
.
db
.
models
.
scheme
,
{
constraints
:
false
,
});
// 沟通记录表
this
.
db
.
models
.
communicationrecord
.
belongsTo
(
this
.
db
.
models
.
bizopt
,
{
constraints
:
false
,
});
this
.
db
.
models
.
bizopt
.
hasOne
(
this
.
db
.
models
.
communicationrecord
,
{
constraints
:
false
,
});
// 交付单表 1:1 临时材料表
this
.
db
.
models
.
cacheinfo
.
belongsTo
(
this
.
db
.
models
.
deliver
,
{
constraints
:
false
,
});
this
.
db
.
models
.
deliver
.
hasOne
(
this
.
db
.
models
.
cacheinfo
,
{
constraints
:
false
,
});
...
...
icp-deliver/app/base/db/models/delivery/communication_record.js
0 → 100644
View file @
ff0cdd06
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
/**
* 沟通记录表
*/
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"communicationrecord"
,
{
content
:
{
allowNull
:
false
,
type
:
DataTypes
.
TEXT
},
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'communication_record'
,
validate
:
{
},
indexes
:
[
// Create a unique index on email
// {
// unique: true,
// fields: ['email']
// },
//
// // Creates a gin index on data with the jsonb_path_ops operator
// {
// fields: ['data'],
// using: 'gin',
// operator: 'jsonb_path_ops'
// },
//
// // By default index name will be [table]_[fields]
// // Creates a multi column partial index
// {
// name: 'public_by_author',
// fields: ['author', 'status'],
// where: {
// status: 'public'
// }
// },
//
// // A BTREE index with a ordered field
// {
// name: 'title_index',
// method: 'BTREE',
// fields: ['author', {attribute: 'title', collate: 'en_US', order: 'DESC', length: 5}]
// }
]
});
}
icp-deliver/app/base/service/impl/bizchance/bizoptSve.js
View file @
ff0cdd06
...
...
@@ -9,6 +9,7 @@ class BizoptService extends ServiceBase {
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
BizoptService
));
this
.
schemeDao
=
system
.
getObject
(
"db.bizchance.schemeDao"
);
this
.
statuslogDao
=
system
.
getObject
(
"db.bizchance.statuslogDao"
);
this
.
communicationrecordDao
=
system
.
getObject
(
"db.bizchance.communicationrecordDao"
);
}
async
findBizAndSheme
(
pobj
)
{
let
data
=
await
this
.
dao
.
findBizAndSheme
(
pobj
.
id
);
...
...
@@ -111,6 +112,19 @@ class BizoptService extends ServiceBase {
}
// 沟通记录 查询
async
communicationRecordList
(
pobj
)
{
const
rs
=
await
this
.
communicationrecordDao
.
findAll
({
bizopt_id
:
pobj
.
bizId
});
return
rs
;
}
// 沟通记录新增
async
createCommunicationRecord
(
pobj
)
{
await
this
.
communicationrecordDao
.
create
({
bizopt_id
:
pobj
.
bizId
,
content
:
pobj
.
content
});
}
}
module
.
exports
=
BizoptService
;
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