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
e33e7266
Commit
e33e7266
authored
Sep 15, 2020
by
DESKTOP-7Q3CA17\86137
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
8b7a07a6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
147 additions
and
5 deletions
+147
-5
bpo-stat/app/base/controller/impl/all/expressageCtl.js
+23
-0
bpo-stat/app/base/db/impl/all/expressageDao.js
+14
-0
bpo-stat/app/base/db/models/all/expressage.js
+53
-0
bpo-stat/app/base/service/impl/all/expressageSve.js
+52
-0
bpo-stat/app/base/service/sve.base.js
+1
-1
bpo-stat/app/config/localsettings.js
+4
-4
No files found.
bpo-stat/app/base/controller/impl/all/expressageCtl.js
0 → 100644
View file @
e33e7266
var
system
=
require
(
"../../../system"
)
const
CtlBase
=
require
(
"../../ctl.base"
);
//工作量
class
ExpressageCtl
extends
CtlBase
{
constructor
()
{
super
(
"all"
,
CtlBase
.
getServiceName
(
ExpressageCtl
));
}
async
allList
(
qobj
){
var
params
=
qobj
||
{};
this
.
doTimeCondition
(
params
,
[
"signBegin"
,
"signEnd"
]);
try
{
var
page
=
await
this
.
service
.
signPage
(
params
);
return
system
.
getResult2
(
page
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getErrResult2
(
"您的网络不稳, 请稍后重试"
);
}
}
}
module
.
exports
=
ExpressageCtl
;
bpo-stat/app/base/db/impl/all/expressageDao.js
0 → 100644
View file @
e33e7266
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
expressageDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
expressageDao
));
}
}
module
.
exports
=
expressageDao
;
bpo-stat/app/base/db/models/all/expressage.js
0 → 100644
View file @
e33e7266
module
.
exports
=
function
(
sequelize
,
DataTypes
)
{
return
sequelize
.
define
(
'expressage'
,
{
company_id
:
DataTypes
.
INTEGER
,
company_name
:
DataTypes
.
STRING
,
sign_body_id
:
DataTypes
.
INTEGER
,
sign_body
:
DataTypes
.
STRING
,
name
:
DataTypes
.
STRING
,
express_name
:
DataTypes
.
STRING
,
express_time
:
DataTypes
.
DATE
,
express_nu
:
DataTypes
.
STRING
,
express_code
:
DataTypes
.
STRING
,
},
{
tableName
:
'expressage'
,
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
false
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
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}]
// }
]
});
};
bpo-stat/app/base/service/impl/all/expressageSve.js
0 → 100644
View file @
e33e7266
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
expressageService
extends
ServiceBase
{
constructor
()
{
super
(
"all"
,
ServiceBase
.
getDaoName
(
expressageService
));
}
async
signPage
(
params
)
{
var
currentPage
=
Number
(
params
.
currentPage
||
0
);
var
pageSize
=
Number
(
params
.
pageSize
||
10
);
var
where
=
{};
if
(
params
.
company_name
)
{
where
.
company_name
=
{
[
this
.
db
.
Op
.
like
]:
"%"
+
params
.
company_name
+
"%"
};
}
if
(
params
.
sign_body_id
){
where
.
sign_body_id
=
params
.
sign_body_id
;
}
if
(
params
.
sign_body
){
where
.
sign_body
=
params
.
sign_body
;
}
if
(
params
.
express_nu
){
where
.
express_nu
=
params
.
express_nu
;
}
if
(
params
.
name
){
where
.
name
=
{
[
this
.
db
.
Op
.
like
]:
"%"
+
params
.
name
+
"%"
};
}
this
.
addWhereTime
(
where
,
'express_time'
,
params
.
signBegin
,
params
.
signEnd
,
true
);
var
orderby
=
[
[
"express_time"
,
'desc'
]
];
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
);
if
(
page
&&
page
.
rows
)
{
for
(
var
row
of
page
.
rows
)
{
let
url
=
"https://www.kuaidi100.com/chaxun?com="
+
row
.
express_code
+
"&nu="
+
row
.
express_nu
;
row
.
url
=
url
;
this
.
handleDate
(
row
,
[
"express_time"
]);
}
}
return
page
;
}
}
module
.
exports
=
expressageService
;
bpo-stat/app/base/service/sve.base.js
View file @
e33e7266
...
...
@@ -227,7 +227,7 @@ class ServiceBase {
}
handleDate
(
row
,
fields
,
pattern
,
addHours
)
{
pattern
=
pattern
||
"YYYY-MM-DD HH:mm"
;
pattern
=
pattern
||
"YYYY-MM-DD HH:mm
:ss
"
;
if
(
!
row
)
{
return
;
}
...
...
bpo-stat/app/config/localsettings.js
View file @
e33e7266
var
settings
=
{
redis
:
{
host
:
"
43.247.184.32
"
,
port
:
8967
,
password
:
"Gongsibao2018"
,
db
:
10
,
host
:
"
39.107.234.14
"
,
port
:
6379
,
//
password: "Gongsibao2018",
//
db: 10,
},
database
:
{
dbname
:
"stat"
,
...
...
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