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
93fd114c
Commit
93fd114c
authored
Dec 19, 2020
by
Sxy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 百度工商
parent
0737dfa3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
205 additions
and
2 deletions
+205
-2
icp-deliver/app/base/controller/impl/delivery/companyCaseCtl.js
+34
-0
icp-deliver/app/base/controller/impl/delivery/deliverCtl.js
+12
-0
icp-deliver/app/base/db/impl/delivery/deliverDao.js
+40
-0
icp-deliver/app/base/service/impl/delivery/companyCaseSve.js
+84
-0
icp-deliver/app/base/service/impl/delivery/deliverSve.js
+24
-0
icp-deliver/app/base/system.js
+11
-2
No files found.
icp-deliver/app/base/controller/impl/delivery/companyCaseCtl.js
0 → 100644
View file @
93fd114c
var
system
=
require
(
"../../../system"
);
const
CtlBase
=
require
(
"../../ctl.base"
);
class
CompanyCaseCtl
extends
CtlBase
{
constructor
()
{
super
(
"delivery"
,
CtlBase
.
getServiceName
(
CompanyCaseCtl
));
}
// 提交材料
async
submitMaterials
(
pobj
,
qobj
,
req
)
{
try
{
if
(
!
pobj
.
deliver_id
)
{
throw
new
Error
(
"参数错误"
)
}
const
rs
=
await
this
.
service
.
submitMaterials
(
pobj
);
return
system
.
getResult
(
rs
);
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
)
}
}
// 更改状态
async
changeDeliveryStatus
(
pobj
,
qobj
,
req
)
{
try
{
if
(
!
pobj
.
id
)
{
throw
new
Error
(
"参数错误"
)
}
const
rs
=
await
this
.
service
.
changeDeliveryStatus
(
pobj
);
return
system
.
getResult
(
rs
);
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
)
}
}
}
module
.
exports
=
CompanyCaseCtl
;
icp-deliver/app/base/controller/impl/delivery/deliverCtl.js
View file @
93fd114c
...
...
@@ -171,5 +171,17 @@ class DeliverCtl extends CtlBase {
return
system
.
getResult
(
null
,
err
.
message
)
}
}
async
findRelationOrder
(
pobj
)
{
if
(
!
pobj
.
id
)
{
return
system
.
getResult
(
null
,
"deliver_id can not be empty,100290"
);
}
try
{
let
rs
=
await
this
.
service
.
findRelationOrder
(
pobj
);
return
system
.
getResult
(
rs
);
}
catch
(
err
)
{
return
system
.
getResult
(
null
,
err
.
message
)
}
}
}
module
.
exports
=
DeliverCtl
;
icp-deliver/app/base/db/impl/delivery/deliverDao.js
View file @
93fd114c
...
...
@@ -198,6 +198,46 @@ class DeliverDao extends Dao {
break
}
qc
.
where
[
"$and"
]
=
filters
;
}
else
if
(
type
===
"companyManagement"
)
{
let
filters
=
[];
filters
.
push
({
product_code
:
{
$in
:
[
system
.
SERVICECODE
.
COMPANYCASE
,
system
.
SERVICECODE
.
SEALSEVCASE
,
// system.SERVICECODE.TAXCONTROLCASE,
// system.SERVICECODE.TAXCASE,
// system.SERVICECODE.ICCHANGECASE
]
}
})
switch
(
qobj
.
bizpath
)
{
case
"/companyManagement/deliveryAllocated"
:
filters
.
push
({
delivery_man_opcode
:
{
$ne
:
null
}
});
break
case
"/companyManagement/deliveryNoAllocate"
:
delete
qc
.
where
[
'$or'
];
filters
.
push
({
delivery_man_opcode
:
{
$eq
:
null
}
});
break
case
"/companyManagement/wait"
:
filters
.
push
({
delivery_status
:
{
$notIn
:
[
system
.
SERVERSESTATUS
.
SUCCESS
,
system
.
SERVERSESTATUS
.
CLOSED
]
}
});
break
case
"/companyManagement/all"
:
break
}
qc
.
where
[
"$and"
]
=
filters
;
}
else
{
throw
new
Error
(
"页面路径错误"
)
}
...
...
icp-deliver/app/base/service/impl/delivery/companyCaseSve.js
0 → 100644
View file @
93fd114c
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../sve.base"
);
const
settings
=
require
(
"../../../../config/settings"
);
const
moment
=
require
(
"moment"
);
const
System
=
require
(
"../../../system"
);
const
pushQft
=
require
(
"../../../utils/toqifutongClient"
)
const
TOQFT
=
require
(
"../../../utils/toQft"
);
class
CompanycaseService
extends
ServiceBase
{
constructor
()
{
super
(
"delivery"
,
ServiceBase
.
getDaoName
(
CompanycaseService
));
this
.
cacheinfoDao
=
system
.
getObject
(
"db.delivery.cacheinfoDao"
);
this
.
deliveryDao
=
system
.
getObject
(
"db.delivery.deliverDao"
);
this
.
newmaterialDao
=
system
.
getObject
(
"db.delivery.newmaterialDao"
);
this
.
statuslogDao
=
system
.
getObject
(
"db.bizchance.statuslogDao"
);
}
async
submitMaterials
(
pobj
,
qobj
,
req
)
{
const
deliverData
=
await
this
.
deliveryDao
.
findOne
({
id
:
pobj
.
deliver_id
});
if
(
!
deliverData
)
{
throw
new
Error
(
"查不到此交付单"
);
}
return
this
.
db
.
transaction
(
async
(
t
)
=>
{
await
this
.
cacheinfoDao
.
createOrUpdate
(
pobj
,
t
);
await
this
.
newmaterialDao
.
createOrUpdate
(
pobj
,
t
);
// if ([system.SERVERSESTATUS.COLLECTING, system.SERVERSESTATUS.USERCONFIRMATIONREJECT].includes(deliverData.delivery_status)) {
// let status;
// if (deliverData.source_number === "aliCloud") {
// status = system.SERVERSESTATUS.USERCONFIRMATIONWAIT
// } else {
// status = system.SERVERSESTATUS.COLLECTSUCCESS;
// }
// await this.deliveryDao.updateByWhere({
// delivery_status: status
// }, {
// id: pobj.deliver_id
// }, t);
// this.statuslogDao.create({
// flow_type: system.FLOWCODE.DELIVERY,
// flow_id: pobj.deliver_id,
// status_code: status,
// salesman_id: pobj.userid,
// salesman_name: pobj.username
// });
// }
return
"SUCCESS"
});
}
async
changeDeliveryStatus
(
pobj
,
qobj
,
req
)
{
const
deliverData
=
await
this
.
deliveryDao
.
findOne
({
id
:
pobj
.
id
});
if
(
!
deliverData
)
{
throw
new
Error
(
"没有此交付单"
);
}
let
status
;
switch
(
deliverData
.
delivery_status
)
{
// case system.SERVERSESTATUS.THROUGH:
// status = system.SERVERSESTATUS.SUCCESS;
// break
// default:
// throw new Error("此状态手动不能更改");
}
// await this.deliveryDao.updateByWhere({
// delivery_status: status
// }, {
// id: pobj.id
// })
// this.statuslogDao.create({
// flow_type: system.FLOWCODE.DELIVERY,
// flow_id: pobj.id,
// status_code: status,
// salesman_id: pobj.userid,
// salesman_name: pobj.username
// });
return
"SUCCESS"
}
}
module
.
exports
=
CompanycaseService
;
icp-deliver/app/base/service/impl/delivery/deliverSve.js
View file @
93fd114c
...
...
@@ -453,5 +453,29 @@ class DeliverService extends ServiceBase {
});
}
async
findRelationOrder
(
pobj
)
{
const
deliverData
=
await
this
.
dao
.
findOne
({
id
:
pobj
.
id
});
if
(
!
deliverData
)
{
throw
new
Error
(
"没有此交付单"
);
}
if
(
!
deliverData
.
master_source_number
)
{
return
[]
}
let
result
=
[];
const
deliverDatas
=
await
this
.
dao
.
findAll
({
master_source_number
:
deliverData
.
master_source_number
});
if
(
deliverDatas
&&
deliverDatas
.
length
>
0
)
{
result
=
deliverDatas
.
map
(
item
=>
{
return
item
.
delivery_code
;
}).
filter
(
item
=>
{
return
item
!==
deliverData
.
delivery_code
;
});
}
return
result
;
}
}
module
.
exports
=
DeliverService
;
icp-deliver/app/base/system.js
View file @
93fd114c
...
...
@@ -335,7 +335,12 @@ System.SERVICECODE = {
EDIANNUALREPORT
:
"EDIANNUALREPORT"
,
WANGWEN
:
"wangwen"
,
PANNONG
:
"pannong"
,
GUANGBO
:
"guangbo"
GUANGBO
:
"guangbo"
,
COMPANYCASE
:
"companyCase"
,
// 公司注册
SEALSEVCASE
:
"sealSevCase"
,
// 刻章服务
TAXCONTROLCASE
:
"taxControlCase"
,
// 税控申请
TAXCASE
:
"taxCase"
,
// 税务报道
ICCHANGECASE
:
"icChangeCase"
,
// 工商变更
}
// 商机状态
System
.
BUSSTATUS
=
{
...
...
@@ -368,11 +373,15 @@ System.SERVERSESTATUS = {
USERCONFIRMATIONWAIT
:
"userConfirmationWait"
,
//递交文件待确认
USERCONFIRMATIONREJECT
:
"userConfirmationReject"
,
// 递交文件被驳回
USERCONFIRMATIONRESOLVE
:
"userConfirmationResolve"
,
//用户已确认递交文件
ACCOUNTREGISTRATION
:
"accountRegistration"
,
//账户注册
THROUGH
:
"through"
,
//工信部通过
THROUGHFAIL
:
"throughFail"
,
// 工信部未通过
DISPOSEINGFAIL
:
"disposeingFail"
// 工信部未受理
DISPOSEINGFAIL
:
"disposeingFail"
,
// 工信部未受理
AUDITING
:
"auditing"
,
// 工商审核环节
ENGRAVING
:
"engraving"
,
// 刻章环节
SERVICEING
:
"serviceing"
// 服务中
}
// 年报服务单状态
System
.
ANNUALREPORT
=
{
...
...
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