Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
7c5eec49
Commit
7c5eec49
authored
Oct 11, 2022
by
dqq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业审核
parent
d27ab565
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
2 deletions
+46
-2
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+46
-2
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
7c5eec49
...
@@ -2,8 +2,16 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
...
@@ -2,8 +2,16 @@ package com.yeejoin.amos.boot.module.ugp.biz.controller;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Company
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -41,6 +49,8 @@ public class CompanyController extends BaseController {
...
@@ -41,6 +49,8 @@ public class CompanyController extends BaseController {
CompanyServiceImpl
companyServiceImpl
;
CompanyServiceImpl
companyServiceImpl
;
@Autowired
(
required
=
false
)
@Autowired
(
required
=
false
)
CompanyMapper
companyMapper
;
CompanyMapper
companyMapper
;
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
/**
/**
* 新增企业信息表
* 新增企业信息表
...
@@ -157,11 +167,45 @@ public class CompanyController extends BaseController {
...
@@ -157,11 +167,45 @@ public class CompanyController extends BaseController {
// company= companyMapper.selectOne(lambdaQueryWrapper);
// company= companyMapper.selectOne(lambdaQueryWrapper);
return
ResponseHelper
.
buildResponse
(
companyMapper
.
selectById
(
companyList
));
return
ResponseHelper
.
buildResponse
(
companyMapper
.
selectById
(
companyList
));
}
}
/**
* 企业审核
* 根据sequenceNbr更新,审核通过后的企业调用平台接口创建单位及管理员,并存业务的cb_org_usr表
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"check/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新,并创建单位及管理员"
,
notes
=
"根据sequenceNbr更新,并创建单位及管理员"
)
public
ResponseModel
<
CompanyDto
>
companyCheck
(
@RequestBody
CompanyDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
throws
Exception
{
model
.
setSequenceNbr
(
sequenceNbr
);
if
(
model
.
getApproved
().
equals
(
"已审核"
)){
final
CompanyModel
companyModel
=
new
CompanyModel
();
final
AgencyUserModel
agencyUserModel
=
new
AgencyUserModel
();
companyModel
.
setCompanyName
(
model
.
getName
());
companyModel
.
setCompanyCode
(
model
.
getCreditCode
());
companyModel
.
setAddress
(
model
.
getAddress
());
companyModel
.
setParentId
(
model
.
getSequenceNbr
());
companyModel
.
setLevel
(
"headquarter"
);
companyModel
.
setAgencyCode
(
"ugp"
);
final
FeignClientResult
<
CompanyModel
>
companyModelFeignClientResult
=
Privilege
.
companyClient
.
create
(
companyModel
);
agencyUserModel
.
setRealName
(
model
.
getContact
());
agencyUserModel
.
setMobile
(
model
.
getContactPhone
());
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
final
OrgUsrDto
orgUsrDto
=
new
OrgUsrDto
();
orgUsrDto
.
setBizOrgName
(
model
.
getName
());
orgUsrDto
.
setAmosOrgId
(
companyModelFeignClientResult
.
getResult
().
getSequenceNbr
().
toString
());
orgUsrDto
.
setAmosOrgCode
(
companyModelFeignClientResult
.
getResult
().
getOrgCode
());
orgUsrDto
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
iOrgUsrService
.
saveOrgUsr
(
orgUsrDto
);
}
return
ResponseHelper
.
buildResponse
(
companyServiceImpl
.
updateWithModel
(
model
));
}
}
}
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