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
9f850099
Commit
9f850099
authored
Oct 12, 2022
by
zhangyingbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善企业审核接口,优化动态表单新增接口
parent
1a36238c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
Company.java
.../com/yeejoin/amos/boot/module/ugp/api/entity/Company.java
+12
-0
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+17
-7
OrgServiceImpl.java
...amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
+2
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/Company.java
View file @
9f850099
...
...
@@ -100,4 +100,16 @@ public class Company extends BaseEntity {
@TableField
(
"org_code"
)
private
String
orgCode
;
/**
* 企业管理员
*/
@TableField
(
"admin"
)
private
String
admin
;
/**
* 企业管理员电话
*/
@TableField
(
"admin_phone"
)
private
String
adminPhone
;
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
9f850099
...
...
@@ -15,6 +15,8 @@ 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
com.yeejoin.amos.feign.privilege.util.DesUtil
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
...
...
@@ -22,9 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
com.yeejoin.amos.boot.module.ugp.biz.service.impl.CompanyServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
...
@@ -57,6 +57,9 @@ public class CompanyController extends BaseController {
@Autowired
OrgServiceImpl
orgServiceImpl
;
@Value
(
"${amos.secret.key}"
)
String
secretKey
;
/**
* 新增企业信息表
*
...
...
@@ -204,13 +207,20 @@ public class CompanyController extends BaseController {
final
CompanyModel
companyModelFeignClient
=
Privilege
.
companyClient
.
create
(
companyModel
).
getResult
();
//创建平台用户
agencyUserModel
.
setRealName
(
company
.
getContact
());
String
admin
=
company
.
getAdmin
();
String
adminPhone
=
company
.
getAdminPhone
();
agencyUserModel
.
setRealName
(
admin
);
agencyUserModel
.
setMobile
(
company
.
getContactPhone
());
agencyUserModel
.
setAgencyCode
(
"ugp"
);
agencyUserModel
.
setLockStatus
(
"UNLOCK"
);
// Privilege.agencyUserClient.create(agencyUserModel);
//动态表单存储
agencyUserModel
.
setMobile
(
adminPhone
);
agencyUserModel
.
setCreateTime
(
new
Date
());
agencyUserModel
.
setUserName
(
admin
);
agencyUserModel
.
setPassword
(
DesUtil
.
encode
(
adminPhone
,
secretKey
));
agencyUserModel
.
setRePassword
(
DesUtil
.
encode
(
adminPhone
,
secretKey
));
Privilege
.
agencyUserClient
.
create
(
agencyUserModel
);
//企业动态表单存储
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
company
));
jsonObject
.
put
(
"amosOrgId"
,
companyModelFeignClient
.
getSequenceNbr
());
jsonObject
.
put
(
"amosOrgCode"
,
companyModelFeignClient
.
getOrgCode
());
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/OrgServiceImpl.java
View file @
9f850099
...
...
@@ -62,9 +62,11 @@ public class OrgServiceImpl {
//将column表的基本字段信息给instance表
DynamicFormInstance
dynamicFormInstance
=
new
DynamicFormInstance
();
BeanUtils
.
copyProperties
(
dynamicFormColumn
,
dynamicFormInstance
);
dynamicFormInstance
.
setFormColumnId
(
dynamicFormColumn
.
getSequenceNbr
());
//通过字段名去拿到表单传来的值
dynamicFormInstance
.
setFieldValue
(
jsonObject
.
getString
(
dynamicFormInstance
.
getFieldCode
()));
dynamicFormInstance
.
setInstanceId
(
orgUsr
.
getSequenceNbr
());
dynamicFormInstance
.
setSequenceNbr
(
null
);
dynamicFormInstanceList
.
add
(
dynamicFormInstance
);
}
alertFormValueServiceImpl
.
saveBatch
(
dynamicFormInstanceList
);
...
...
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