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
d26ea419
Commit
d26ea419
authored
Dec 30, 2019
by
孙亚楠
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'laowubao' of gitlab.gongsibao.com:jiangyong/zhichan into laowubao
parents
f97a5113
a61d2deb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
206 additions
and
18 deletions
+206
-18
laowubao/app/base/api/impl/operator/laoActionApi.js
+53
-18
laowubao/app/base/db/impl/operator/transactioninfoDao.js
+22
-0
laowubao/app/base/db/models/operator/transactioninfo.js
+64
-0
laowubao/app/base/service/impl/operator/taxinfoSve.js
+32
-0
laowubao/app/base/service/impl/operator/transactioninfoSve.js
+35
-0
No files found.
laowubao/app/base/api/impl/operator/laoActionApi.js
View file @
d26ea419
...
...
@@ -22,6 +22,7 @@ class LaoActionApi extends APIBase {
this
.
testPhones
=
[
'13691046554'
,
'13333333333'
];
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
this
.
taxinfoSve
=
system
.
getObject
(
"service.operator.taxinfoSve"
);
this
.
transactioninfoSve
=
system
.
getObject
(
"service.operator.transactioninfoSve"
);
this
.
msSve
=
system
.
getObject
(
"service.common.msSve"
);
...
...
@@ -788,6 +789,38 @@ class LaoActionApi extends APIBase {
}
}
async
FindTransactionByIdno
(
obj
)
{
//根据身份证获取报酬信息
var
parm
=
obj
;
if
(
obj
.
page_size
)
{
parm
.
page_size
=
Number
(
obj
.
page_size
);
}
else
{
parm
.
page_size
=
10
;
}
if
(
obj
.
current_page
)
{
parm
.
current_page
=
Number
(
obj
.
current_page
);
}
else
{
parm
.
current_page
=
1
;
}
if
(
obj
.
id_no
)
{
parm
.
id_no
=
obj
.
id_no
;
}
return
await
this
.
transactioninfoSve
.
findListByIdno
(
parm
);
}
async
taxinfoListByIdnoAndYear
(
obj
){
var
parm
=
obj
;
if
(
obj
.
id_no
)
{
parm
.
id_no
=
obj
.
id_no
;
}
if
(
obj
.
tax_year
){
parm
.
tax_year
=
obj
.
tax_year
}
return
await
this
.
taxinfoSve
.
taxinfoListByIdnoAndYear
(
parm
);
}
async
FindRecruitByWhere
(
obj
)
{
//根据条件获取招聘信息
var
parm
=
obj
;
if
(
obj
.
page_size
)
{
...
...
@@ -1331,20 +1364,22 @@ class LaoActionApi extends APIBase {
module
.
exports
=
LaoActionApi
;
// var tesk = new LaoActionApi();
// var parm = {
// id:12,
// apply_stauts:"邀请面试"
// //ossUrl:"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1576396810278.xlsx"
// //labour_user_id:2,
// //apply_stauts:"已申请"
// //cur_status:"已过期"
// //memo_text:"sssssssss"
// //user_name:"高",
// //com_name:"京东"
// };
// tesk.UpdateUserLabourStatusInfo(parm).then(function(result){
// console.log(result);
// }).catch(function(e){
// console.log(e);
// });
\ No newline at end of file
var
tesk
=
new
LaoActionApi
();
var
parm
=
{
id_no
:
"140321199307270014"
,
tax_year
:
"2019"
//apply_stauts:"邀请面试"
//ossUrl:"https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_wxapplet_1576396810278.xlsx"
//labour_user_id:2,
//apply_stauts:"已申请"
//cur_status:"已过期"
//memo_text:"sssssssss"
//user_name:"高",
//com_name:"京东"
};
tesk
.
taxinfoListByIdnoAndYear
(
parm
).
then
(
function
(
result
){
console
.
log
(
result
);
console
.
log
(
result
.
data
.
rows
[
0
]);
}).
catch
(
function
(
e
){
console
.
log
(
e
);
});
\ No newline at end of file
laowubao/app/base/db/impl/operator/transactioninfoDao.js
0 → 100644
View file @
d26ea419
const
system
=
require
(
"../../../system"
);
const
Dao
=
require
(
"../../dao.base"
);
class
TransactioninfoDao
extends
Dao
{
constructor
(){
super
(
Dao
.
getModelName
(
TransactioninfoDao
));
}
async
findListByIdno
(
obj
){
//获取岗位名称招聘信息,返回符合条件的列表
var
id_no
=
obj
.
id_no
;
var
pageSize
=
obj
.
page_size
;
var
currentPage
=
obj
.
current_page
;
try
{
var
sql
=
"SELECT * FROM transaction_info WHERE id_no =:name order by transaction_time desc limit :one,:two"
;
var
list
=
await
this
.
customQuery
(
sql
,
{
name
:
id_no
,
one
:(
currentPage
-
1
)
*
pageSize
,
two
:
pageSize
})
||
[];
return
system
.
getResult
(
list
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
null
,
"操作失败"
);
}
}
}
module
.
exports
=
TransactioninfoDao
;
laowubao/app/base/db/models/operator/transactioninfo.js
0 → 100644
View file @
d26ea419
const
system
=
require
(
"../../../system"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
uiconfig
=
system
.
getUiConfig2
(
settings
.
appKey
);
module
.
exports
=
(
db
,
DataTypes
)
=>
{
return
db
.
define
(
"transactioninfo"
,
{
company_name
:
DataTypes
.
STRING
(
255
),
usc_code
:
DataTypes
.
STRING
(
255
),
id_name
:
DataTypes
.
STRING
(
20
),
id_no
:
DataTypes
.
STRING
(
50
),
bank_no
:
DataTypes
.
STRING
(
50
),
amt
:
DataTypes
.
STRING
(
20
),
actual_amount
:
DataTypes
.
STRING
(
20
),
deduct_amt
:
DataTypes
.
STRING
(
20
),
service_fee
:
DataTypes
.
STRING
(
20
),
value_added_fee
:
DataTypes
.
STRING
(
20
),
transaction_time
:
DataTypes
.
DATE
,
sign_body
:
DataTypes
.
STRING
(
50
),
income_tax
:
DataTypes
.
STRING
(
20
),
channel_rsp_no
:
DataTypes
.
STRING
(
30
),
order_item_id
:
DataTypes
.
STRING
(
32
),
},{
paranoid
:
true
,
//假的删除
underscored
:
true
,
version
:
false
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
tableName
:
'transaction_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}]
// }
]
});
}
laowubao/app/base/service/impl/operator/taxinfoSve.js
View file @
d26ea419
...
...
@@ -105,6 +105,37 @@ class TaxinfoService extends ServiceBase {
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
/**
* 根据身份证和年份查询明细
* @param {}} params
*/
async
taxinfoListByIdnoAndYear
(
params
)
{
if
(
!
params
.
id_no
&&
!
params
.
tax_year
){
return
system
.
getResult
(
null
,
"参数错误!"
);
}
var
where
=
{};
where
.
id_no
=
params
.
id_no
;
var
beginTime
=
`
${
params
.
tax_year
}
-01-01 00:00:00`
;
var
endTime
=
`
${
params
.
tax_year
}
-12-31 23:59:59`
;
where
.
tax_time
=
{
[
this
.
db
.
Op
.
between
]:
[
beginTime
,
endTime
]
};
try
{
var
sqlwhere
=
{
where
:
where
,
order
:
[[
"tax_time"
,
'desc'
]],
raw
:
true
};
var
list
=
await
this
.
dao
.
model
.
findAndCountAll
(
sqlwhere
)
||
[];
return
system
.
getResult
(
list
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
null
,
"操作失败"
);
}
}
}
module
.
exports
=
TaxinfoService
;
\ No newline at end of file
laowubao/app/base/service/impl/operator/transactioninfoSve.js
0 → 100644
View file @
d26ea419
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
class
TransactioninfoService
extends
ServiceBase
{
constructor
()
{
super
(
"operator"
,
ServiceBase
.
getDaoName
(
TransactioninfoService
));
}
async
findListByIdno
(
obj
){
//根据身份证获取费用信息,返回符合条件的列表
if
(
!
obj
.
id_no
){
return
system
.
getResult
(
null
,
"参数错误!"
);
}
var
where
=
{};
where
.
id_no
=
obj
.
id_no
;
var
pageSize
=
obj
.
page_size
||
10
;
var
currentPage
=
obj
.
current_page
||
1
;
try
{
var
sqlwhere
=
{
where
:
where
,
order
:
[[
"transaction_time"
,
'desc'
]],
limit
:
pageSize
,
offset
:
(
currentPage
-
1
)
*
pageSize
,
raw
:
true
};
var
list
=
await
this
.
dao
.
model
.
findAndCountAll
(
sqlwhere
)
||
[];
return
system
.
getResult
(
list
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
null
,
"操作失败"
);
}
}
}
module
.
exports
=
TransactioninfoService
;
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