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
2bd47366
Commit
2bd47366
authored
Aug 18, 2020
by
wangxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完税管理列表
parent
e35d4438
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
147 additions
and
0 deletions
+147
-0
bpo-stat/app/base/controller/impl/all/taxcompanyinfoCtl.js
+29
-0
bpo-stat/app/base/db/impl/all/taxcompanyinfoDao.js
+10
-0
bpo-stat/app/base/db/models/all/taxcompanyinfo.js
+63
-0
bpo-stat/app/base/service/impl/all/taxcompanyinfoSve.js
+45
-0
No files found.
bpo-stat/app/base/controller/impl/all/taxcompanyinfoCtl.js
0 → 100644
View file @
2bd47366
var
system
=
require
(
"../../../system"
)
const
CtlBase
=
require
(
"../../ctl.base"
);
//完税
class
TaxCompanyInfoCtl
extends
CtlBase
{
constructor
()
{
super
(
"all"
,
CtlBase
.
getServiceName
(
TaxCompanyInfoCtl
));
}
async
allList
(
qobj
){
var
params
=
qobj
||
{};
if
(
params
.
month
)
{
let
date
=
this
.
getMonthDays
(
params
.
month
);
params
.
signBegin
=
date
[
0
];
params
.
signEnd
=
date
[
date
.
length
-
1
];
}
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
=
TaxCompanyInfoCtl
;
\ No newline at end of file
bpo-stat/app/base/db/impl/all/taxcompanyinfoDao.js
0 → 100644
View file @
2bd47366
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
TaxCompanyInfoDao
extends
Dao
{
constructor
()
{
super
(
Dao
.
getModelName
(
TaxCompanyInfoDao
));
}
}
module
.
exports
=
TaxCompanyInfoDao
;
bpo-stat/app/base/db/models/all/taxcompanyinfo.js
0 → 100644
View file @
2bd47366
/* jshint indent: 2 */
module
.
exports
=
function
(
sequelize
,
DataTypes
)
{
return
sequelize
.
define
(
'taxcompanyinfo'
,
{
company_name
:
DataTypes
.
STRING
,
usc_code
:
DataTypes
.
STRING
,
tax_month
:
DataTypes
.
DATE
,
actual_amount
:
DataTypes
.
STRING
,
income_tax
:
DataTypes
.
STRING
,
added_value_tax
:
DataTypes
.
STRING
,
tax_time
:
DataTypes
.
DATE
,
people_number
:
DataTypes
.
STRING
,
sign_body_id
:
DataTypes
.
INTEGER
,
sign_body
:
DataTypes
.
STRING
,
tax_url
:
DataTypes
.
STRING
,
redundance_1
:
DataTypes
.
STRING
,
redundance_2
:
DataTypes
.
STRING
,
redundance_3
:
DataTypes
.
STRING
,
redundance_4
:
DataTypes
.
STRING
,
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
false
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'tax_company_info'
,
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/taxcompanyinfoSve.js
0 → 100644
View file @
2bd47366
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
TaxCompanyInfoService
extends
ServiceBase
{
constructor
()
{
super
(
"all"
,
ServiceBase
.
getDaoName
(
TaxCompanyInfoService
));
}
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
;
}
let
id_no
=
this
.
trim
(
params
.
id_no
);
if
(
id_no
){
where
.
id_no
=
id_no
;
}
this
.
addWhereTime
(
where
,
'tax_time'
,
params
.
signBegin
,
params
.
signEnd
,
true
);
var
orderby
=
[
[
"id"
,
'desc'
]
];
var
page
=
await
this
.
getPageList
(
currentPage
,
pageSize
,
where
,
orderby
);
if
(
page
&&
page
.
rows
)
{
for
(
var
row
of
page
.
rows
)
{
this
.
handleDate
(
row
,
[
"tax_time"
],
"YYYY-MM-DD"
,
-
8
);
}
}
return
page
;
}
}
module
.
exports
=
TaxCompanyInfoService
;
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