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
d7690ded
Commit
d7690ded
authored
Aug 18, 2020
by
王勇飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bizopt fix api
parent
fab0d54a
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
202 additions
and
81 deletions
+202
-81
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
+1
-0
tx-fi-tax/app/base/controller/impl/bizchance/fitaxcompanyCtl.js
+30
-5
tx-fi-tax/app/base/controller/impl/bizchance/fitaxschemeCtl.js
+1
-0
tx-fi-tax/app/base/controller/impl/bizchance/operationrecordCtl.js
+57
-0
tx-fi-tax/app/base/db/impl/bizchance/fitaxcompanyDao.js
+25
-4
tx-fi-tax/app/base/db/impl/bizchance/fitaxschemeDao.js
+20
-5
tx-fi-tax/app/base/db/impl/bizchance/operationrecordDao.js
+22
-5
tx-fi-tax/app/base/db/models/delivery/fi_tax_company.js
+1
-1
tx-fi-tax/app/base/db/models/delivery/fi_tax_operation_record.js
+1
-1
tx-fi-tax/app/base/db/models/delivery/fi_tax_scheme.js
+5
-1
tx-fi-tax/app/base/service/impl/bizchance/fitaxcompanySve.js
+11
-29
tx-fi-tax/app/base/service/impl/bizchance/fitaxschemeSve.js
+5
-30
tx-fi-tax/app/base/service/impl/bizchance/operationrecordSve.js
+23
-0
No files found.
tx-fi-tax/app/base/controller/impl/bizchance/bizoptCtl.js
View file @
d7690ded
...
...
@@ -97,6 +97,7 @@ class BizOptCtl extends CtlBase {
let
params
=
{
demand_code
:
""
,
//需求编号
close_reason
:
""
,
//关闭原因
remarks
:
""
//备注
}
//根据需求编号去更新该条需求的状态为已关闭
try
{
...
...
tx-fi-tax/app/base/controller/impl/bizchance/fitaxcompanyCtl.js
View file @
d7690ded
...
...
@@ -6,20 +6,45 @@ class FitaxcompanyCtl extends CtlBase {
constructor
()
{
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
FitaxcompanyCtl
));
}
/**
* 新建企业信息
* 根据需求编号查询企业信息
* @param {*} mobj
*/
async
findOne
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
try
{
if
(
!
pobj
.
demand_code
)
{
return
system
.
getResultError
(
"fitaxschemeCtl/findOne 缺少需求编号!"
);
}
let
res
=
await
this
.
service
.
findInfo
(
pobj
);
return
system
.
getResult
(
res
);
}
catch
(
error
)
{
console
.
log
(
"fitaxschemeCtl/findOne "
+
error
);
return
system
.
getResultError
(
"fitaxschemeCtl/findOne 查询企业失败!"
);
}
}
/**
* 新建&更新企业信息
* @param {*} mobj
*/
async
insertInfo
(
mobj
,
qobj
,
req
)
{
async
insert
OrUpdate
Info
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
try
{
if
(
!
pobj
.
demand_code
)
{
return
system
.
getResultError
(
"fitaxschemeCtl/insertInfo 缺少需求编号!"
);
}
let
res
=
await
this
.
service
.
insertInfo
(
pobj
);
return
system
.
getResult
(
"新建方案成功!"
);
let
findRes
=
await
this
.
service
.
findInfo
(
pobj
);
if
(
!
findRes
)
{
let
insertRes
=
await
this
.
service
.
insertInfo
(
pobj
);
return
system
.
getResult
(
"添加企业成功!"
);
}
let
updateRes
=
await
this
.
service
.
updateInfo
(
pobj
);
return
system
.
getResult
(
"修改企业信息成功!"
);
}
catch
(
error
)
{
return
system
.
getResultError
(
"fitaxschemeCtl/insertInfo 新建方案出错!"
);
console
.
log
(
"fitaxschemeCtl/insertOrUpdateInfo "
+
error
);
return
system
.
getResultError
(
"fitaxschemeCtl/insertOrUpdateInfo 添加&修改企业信息失败!"
);
}
}
}
...
...
tx-fi-tax/app/base/controller/impl/bizchance/fitaxschemeCtl.js
View file @
d7690ded
...
...
@@ -19,6 +19,7 @@ class FitaxschemeCtl extends CtlBase {
let
res
=
await
this
.
service
.
insertInfo
(
pobj
);
return
system
.
getResult
(
"新建方案成功!"
);
}
catch
(
error
)
{
console
.
log
(
"fitaxschemeCtl/insertInfo "
+
error
);
return
system
.
getResultError
(
"fitaxschemeCtl/insertInfo 新建方案出错!"
);
}
}
...
...
tx-fi-tax/app/base/controller/impl/bizchance/operationrecordCtl.js
0 → 100644
View file @
d7690ded
var
system
=
require
(
"../../../system"
);
var
settings
=
require
(
"../../../../config/settings"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
const
appconfig
=
system
.
getSysConfig
();
class
OperationrecordCtl
extends
CtlBase
{
constructor
()
{
super
(
"bizchance"
,
CtlBase
.
getServiceName
(
OperationrecordCtl
));
}
/**
* 查询记录信息
* @param {*} mobj
*/
async
findOne
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
let
params
=
{
demand_code
:
""
,
//需求编号
close_reason
:
""
,
//关闭原因
remarks
:
""
//备注
}
try
{
if
(
!
pobj
.
demand_code
)
{
return
system
.
getResultError
(
"fitaxschemeCtl/findOne 缺少需求编号!"
);
}
let
res
=
await
this
.
service
.
findInfo
(
pobj
);
return
system
.
getResult
(
res
);
}
catch
(
error
)
{
console
.
log
(
"fitaxschemeCtl/findOne "
+
error
);
return
system
.
getResultError
(
"fitaxschemeCtl/findOne 查询企业失败!"
);
}
}
/**
* 新建记录信息
* @param {*} mobj
*/
async
insertInfo
(
mobj
,
qobj
,
req
)
{
let
pobj
=
mobj
.
d
;
let
params
=
{
demand_code
:
""
,
//需求编号
close_reason
:
""
,
//关闭原因
remarks
:
""
//备注
}
try
{
if
(
!
pobj
.
demand_code
)
{
return
system
.
getResultError
(
"fitaxschemeCtl/insertInfo 缺少需求编号!"
);
}
let
insertRes
=
await
this
.
service
.
insertInfo
(
pobj
);
return
system
.
getResult
(
"添加企业成功!"
);
}
catch
(
error
)
{
console
.
log
(
"operationrecordCtl/insertInfo "
+
error
);
return
system
.
getResultError
(
"operationrecordCtl/insertInfo 添加&修改企业信息失败!"
);
}
}
}
module
.
exports
=
OperationrecordCtl
;
tx-fi-tax/app/base/db/impl/bizchance/fitaxcompanyDao.js
View file @
d7690ded
...
...
@@ -6,16 +6,38 @@ class FitaxcompanyDao extends Dao {
}
/**
*增删改查
*查询
*@param {*} qobj
*/
async
findInfo
(
qobj
)
{
let
obj
=
{
"demand_code"
:
qobj
.
demand_code
// 需求编码
}
return
await
this
.
findOne
(
obj
);
}
/**
*修改
*@param {*} qobj
* @param {*} t
*/
async
updateInfo
(
qobj
,
t
)
{
let
obj
=
this
.
buildObj
(
qobj
);
let
whereObj
=
{
"demand_code"
:
obj
.
demand_code
};
return
await
this
.
updateByWhere
(
obj
,
whereObj
,
t
);
}
/**
* 插入
状态
信息
* 插入信息
* @param {*} qobj
* @param {*} t
*/
async
insertInfo
(
qobj
,
t
)
{
let
obj
=
this
.
buildObj
(
qobj
);
return
await
this
.
create
(
obj
,
t
);
}
buildObj
(
qobj
)
{
let
obj
=
{
"demand_code"
:
qobj
.
demand_code
,
// 需求编码
}
...
...
@@ -40,8 +62,7 @@ class FitaxcompanyDao extends Dao {
if
(
qobj
.
address
)
{
// 企业地址
obj
.
address
=
qobj
.
address
;
}
return
await
this
.
create
(
obj
,
t
)
;
return
obj
;
}
}
module
.
exports
=
FitaxcompanyDao
;
tx-fi-tax/app/base/db/impl/bizchance/fitaxschemeDao.js
View file @
d7690ded
...
...
@@ -5,22 +5,37 @@ class FitaxschemeDao extends Dao {
super
(
Dao
.
getModelName
(
FitaxschemeDao
));
}
/**
*增删改查
*/
/**
*查询
*@param {*} qobj
*/
async
findInfo
(
qobj
)
{
let
obj
=
{
"demand_code"
:
qobj
.
demand_code
,
// 需求编码
}
return
await
this
.
findOne
(
obj
);
}
/**
* 插入
状态
信息
* 插入
方案
信息
* @param {*} qobj
* @param {*} t
*/
async
insertInfo
(
qobj
,
t
)
{
let
obj
=
this
.
buildObj
(
qobj
);
return
await
this
.
create
(
obj
,
t
);
}
buildObj
(
qobj
)
{
let
obj
=
{
"demand_code"
:
qobj
.
demand_code
,
// 需求编码
}
if
(
qobj
.
solution_bizid
)
{
// 方案编号
obj
.
solution_bizid
=
qobj
.
solution_bizid
;
}
if
(
qobj
.
service_type
)
{
// 服务类型
obj
.
service_type
=
qobj
.
service_type
;
}
if
(
qobj
.
company_type
)
{
// 公司类型
obj
.
company_type
=
qobj
.
company_type
;
}
...
...
@@ -42,7 +57,7 @@ class FitaxschemeDao extends Dao {
if
(
qobj
.
remarks
)
{
// 备注
obj
.
remarks
=
qobj
.
remarks
;
}
return
await
this
.
create
(
obj
,
t
)
;
return
obj
;
}
}
module
.
exports
=
FitaxschemeDao
;
tx-fi-tax/app/base/db/impl/bizchance/operationrecordDao.js
View file @
d7690ded
...
...
@@ -5,17 +5,34 @@ class OperationrecordDao extends Dao {
super
(
Dao
.
getModelName
(
OperationrecordDao
));
}
/**
*增删改查
*/
/**
*查询
*@param {*} qobj
*/
async
findAllInfo
(
qobj
)
{
qobj
.
raw
=
true
;
return
await
this
.
model
.
findAll
(
qobj
);
}
/**
* 插入状态信息
* @param {*} qobj
* @param {*} t
*/
async
insertInfo
(
qobj
,
t
){
async
insertInfo
(
qobj
,
t
)
{
let
obj
=
{
"demand_code"
:
qobj
.
demand_code
,
// 需求编码
}
if
(
qobj
.
operator
)
{
// 操作人
obj
.
operator
=
qobj
.
operator
;
}
if
(
qobj
.
operation_type
)
{
// 操作类型
obj
.
operation_type
=
qobj
.
operation_type
;
}
if
(
qobj
.
operation_details
)
{
// 操作详细记录json
obj
.
operation_details
=
qobj
.
operation_details
;
}
return
await
this
.
create
(
obj
,
t
);
}
}
module
.
exports
=
OperationrecordDao
;
tx-fi-tax/app/base/db/models/delivery/fi_tax_company.js
View file @
d7690ded
...
...
@@ -41,7 +41,7 @@ module.exports = (db, DataTypes) => {
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
tru
e
,
version
:
fals
e
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
...
...
tx-fi-tax/app/base/db/models/delivery/fi_tax_operation_record.js
View file @
d7690ded
...
...
@@ -25,7 +25,7 @@ module.exports = (db, DataTypes) => {
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
tru
e
,
version
:
fals
e
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
...
...
tx-fi-tax/app/base/db/models/delivery/fi_tax_scheme.js
View file @
d7690ded
...
...
@@ -14,6 +14,10 @@ module.exports = (db, DataTypes) => {
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
service_type
:
{
// 服务类型
allowNull
:
true
,
type
:
DataTypes
.
STRING
},
company_type
:
{
// 公司类型
allowNull
:
true
,
type
:
DataTypes
.
STRING
...
...
@@ -45,7 +49,7 @@ module.exports = (db, DataTypes) => {
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
tru
e
,
version
:
fals
e
,
freezeTableName
:
true
,
//freezeTableName: true,
// define the table's name
...
...
tx-fi-tax/app/base/service/impl/bizchance/fitaxcompanySve.js
View file @
d7690ded
...
...
@@ -7,42 +7,23 @@ class FitaxcompanyService extends ServiceBase {
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
FitaxcompanyService
));
}
async
findById
(
qobj
){
//根据id获取方案信息
var
oid
=
qobj
.
id
;
return
await
this
.
dao
.
findById
(
oid
);
}
async
findInfoByDemandCode
(
qobj
){
//根据方案编号获取方案详情
return
await
this
.
dao
.
findInfoByDemandCode
(
qobj
);
}
async
updateStatusByDemandCode
(
qobj
){
//根据商机编号号更新方案状态及原因
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateStatusByDemandCode
(
qobj
,
t
);
});
}
async
updateInfoByDemandCode
(
qobj
){
//根据商机编号更新方案详情
async
insertInfo
(
qobj
)
{
//插入企业信息
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateInfoByDemandCode
(
qobj
,
t
);
});
}
async
updateSchemeNumberByDemandCode
(
qobj
){
//根据商机编号更新方案编号
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateSchemeNumberByDemandCode
(
qobj
,
t
);
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
});
}
async
insertInfo
(
qobj
){
//插入方案
信息
async
updateInfo
(
qobj
)
{
//修改企业
信息
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
})
;
return
await
self
.
dao
.
updateInfo
(
qobj
,
t
);
})
}
async
findInfo
(
qobj
)
{
//查询企业信息
let
res
=
await
this
.
dao
.
findInfo
(
qobj
);
return
res
;
}
}
module
.
exports
=
FitaxcompanyService
;
\ No newline at end of file
tx-fi-tax/app/base/service/impl/bizchance/fitaxschemeSve.js
View file @
d7690ded
...
...
@@ -7,36 +7,6 @@ class FitaxschemeService extends ServiceBase {
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
FitaxschemeService
));
}
async
findById
(
qobj
){
//根据id获取方案信息
var
oid
=
qobj
.
id
;
return
await
this
.
dao
.
findById
(
oid
);
}
async
findInfoByDemandCode
(
qobj
){
//根据方案编号获取方案详情
return
await
this
.
dao
.
findInfoByDemandCode
(
qobj
);
}
async
updateStatusByDemandCode
(
qobj
){
//根据商机编号号更新方案状态及原因
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateStatusByDemandCode
(
qobj
,
t
);
});
}
async
updateInfoByDemandCode
(
qobj
){
//根据商机编号更新方案详情
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateInfoByDemandCode
(
qobj
,
t
);
});
}
async
updateSchemeNumberByDemandCode
(
qobj
){
//根据商机编号更新方案编号
var
self
=
this
;
return
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
updateSchemeNumberByDemandCode
(
qobj
,
t
);
});
}
async
insertInfo
(
qobj
){
//插入方案信息
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
...
...
@@ -44,5 +14,9 @@ class FitaxschemeService extends ServiceBase {
});
}
async
findInfo
(
qobj
)
{
//查询方案信息
var
self
=
this
;
return
await
self
.
dao
.
findInfo
(
qobj
);
}
}
module
.
exports
=
FitaxschemeService
;
\ No newline at end of file
tx-fi-tax/app/base/service/impl/bizchance/operationrecordSve.js
0 → 100644
View file @
d7690ded
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
appconfig
=
system
.
getSysConfig
();
class
OperationrecordService
extends
ServiceBase
{
constructor
()
{
super
(
"bizchance"
,
ServiceBase
.
getDaoName
(
OperationrecordService
));
}
async
insertInfo
(
qobj
)
{
//插入需求分配记录信息
var
self
=
this
;
return
await
self
.
db
.
transaction
(
async
function
(
t
)
{
return
await
self
.
dao
.
insertInfo
(
qobj
,
t
);
});
}
async
findAllInfo
(
qobj
)
{
//查询记录信息
let
res
=
await
this
.
dao
.
findAllInfo
(
qobj
);
return
res
;
}
}
module
.
exports
=
OperationrecordService
;
\ No newline at end of file
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