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
0d6186af
Commit
0d6186af
authored
Nov 07, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):证管理表刷入【登记机关名称】
parent
3d6b1010
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
JgUseRegistrationManageController.java
.../jg/biz/controller/JgUseRegistrationManageController.java
+29
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationManageController.java
View file @
0d6186af
...
...
@@ -9,9 +9,13 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationManageServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.JsonUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -21,6 +25,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.PostConstruct
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Arrays
;
...
...
@@ -37,9 +42,19 @@ import java.util.stream.Collectors;
@RequestMapping
(
value
=
"/jg-use-registration-manage"
)
public
class
JgUseRegistrationManageController
extends
BaseController
{
@Value
(
"classpath:/json/companyCodeRegName.json"
)
private
Resource
regNameJson
;
private
Map
<
String
,
String
>
companyCodeRegNameMap
;
@Autowired
JgUseRegistrationManageServiceImpl
jgUseRegistrationManageServiceImpl
;
@PostConstruct
public
void
init
()
{
companyCodeRegNameMap
=
JsonUtils
.
getResourceJson
(
regNameJson
);
}
/**
* 将已经通过使用登记审批的证信息录入到 jg-use-registration-manage 表中
*/
...
...
@@ -323,4 +338,18 @@ public class JgUseRegistrationManageController extends BaseController {
return
ResponseHelper
.
buildResponse
(
"Redis初始化完成!"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/brushData"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"刷入字段【登记机关名称】"
,
notes
=
"刷入字段【登记机关名称】"
)
public
ResponseModel
<
Object
>
brushData
()
{
List
<
JgUseRegistrationManage
>
manages
=
jgUseRegistrationManageServiceImpl
.
getBaseMapper
().
selectList
(
null
);
manages
.
forEach
(
item
->
{
String
receiveOrgName
=
companyCodeRegNameMap
.
getOrDefault
(
item
.
getReceiveCompanyCode
(),
item
.
getReceiveOrgName
());
item
.
setRegUnitName
(
receiveOrgName
);
});
jgUseRegistrationManageServiceImpl
.
saveOrUpdateBatch
(
manages
);
return
ResponseHelper
.
buildResponse
(
"刷入字段【登记机关名称】成功!"
);
}
}
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