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
76031b75
Commit
76031b75
authored
Dec 14, 2022
by
DESKTOP-BQLVS7A\admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改企业注册查询到多条数据bug
parent
d14cb2fd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
UnitLicenceMapper.java
...in/amos/boot/module/ugp/api/mapper/UnitLicenceMapper.java
+2
-0
CompanyServiceImpl.java
.../boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
+22
-6
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/mapper/UnitLicenceMapper.java
View file @
76031b75
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.ugp.api.mapper;
import
com.yeejoin.amos.boot.module.ugp.api.entity.UnitLicence
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.springframework.stereotype.Repository
;
/**
* 单位许可信息表 Mapper 接口
...
...
@@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author duanwei
* @date 2022-11-30
*/
@Repository
public
interface
UnitLicenceMapper
extends
BaseMapper
<
UnitLicence
>
{
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/CompanyServiceImpl.java
View file @
76031b75
...
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule;
import
com.yeejoin.amos.boot.module.ugp.api.entity.UnitLicence
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.CompanyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.SuperviseRuleMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.UnitLicenceMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.ICompanyService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
...
...
@@ -73,6 +74,8 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
@Autowired
CompanyServiceImpl
companyServiceImpl
;
@Autowired
UnitLicenceMapper
unitLicenceMapper
;
/**
* 列表查询 示例
*/
...
...
@@ -298,9 +301,15 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
model
.
setAdminLincensePic
(
JSON
.
toJSONString
(
adminLincensePic
));
model
.
setRecDate
(
new
Date
());
SuperviseRule
superviseRules
=
superviseRuleService
.
getOne
(
new
LambdaQueryWrapper
<
SuperviseRule
>().
likeRight
(
SuperviseRule:
:
getAdminRegionCode
,
model
.
getRegionCodeC
()));
if
(
model
.
getType
().
equals
(
OrgEnum
.
监检机构
.
getKey
())){
if
(
model
.
getRegionCode
().
equals
(
model
.
getRegionCodeD
())){
model
.
setRegionCode
(
model
.
getRegionCodeC
().
concat
(
"#"
).
concat
(
model
.
getRegionCode
()));
if
(
ValidationUtil
.
isEmpty
(
superviseRules
)){
model
.
setRegionCode
(
model
.
getRegionCodeP
().
concat
(
"#"
).
concat
(
model
.
getRegionCode
()));
}
else
{
model
.
setRegionCode
(
model
.
getRegionCodeC
().
concat
(
"#"
).
concat
(
model
.
getRegionCode
()));
}
}
else
if
(
model
.
getRegionCode
().
equals
(
model
.
getRegionCodeC
()))
{
model
.
setRegionCode
(
model
.
getRegionCodeP
().
concat
(
"#"
).
concat
(
model
.
getRegionCode
()));
}
else
{
...
...
@@ -312,13 +321,20 @@ public class CompanyServiceImpl extends BaseService<CompanyDto, Company, Company
//添加许可证号和有效期
LambdaQueryWrapper
<
UnitLicence
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
UnitLicence:
:
getUnitCode
,
model
.
getCreditCode
());
if
(!
ValidationUtil
.
isEmpty
(
unitLicenceService
.
getOne
(
wrapper
))){
List
<
UnitLicence
>
licencesLists
=
unitLicenceService
.
list
(
wrapper
);
for
(
UnitLicence
licencesList
:
licencesLists
){
model
.
setLicenseNumber
(
licencesList
.
getCertNo
());
model
.
setExpirationDate
(
licencesList
.
getExpiryDate
());
List
<
UnitLicence
>
unitLicenceLists
=
unitLicenceMapper
.
selectList
(
wrapper
);
for
(
UnitLicence
unitLicencelist
:
unitLicenceLists
){
int
i
=
1
;
if
(
i
==
1
){
if
(!
ValidationUtil
.
isEmpty
(
unitLicencelist
)){
model
.
setLicenseNumber
(
unitLicencelist
.
getCertNo
());
model
.
setExpirationDate
(
unitLicencelist
.
getExpiryDate
());
}
i
=++
i
;
}
}
//存入数据
model
=
companyServiceImpl
.
createWithModel
(
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