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
c9d36822
Commit
c9d36822
authored
Jul 17, 2024
by
王果
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
21052 【web端】监管业务>登记管理>单位变更登记,同一个使用登记证,能多次发起单位变更登记,需进行限制(其他业务类型均限制)
parent
2957b512
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
6 deletions
+83
-6
JgChangeRegistrationUnitMapper.java
.../module/jg/api/mapper/JgChangeRegistrationUnitMapper.java
+5
-5
JgChangeRegistrationUnitMapper.xml
.../main/resources/mapper/JgChangeRegistrationUnitMapper.xml
+9
-0
ChangeUnitEquipUsedCheckImpl.java
...ule/jg/biz/service/impl/ChangeUnitEquipUsedCheckImpl.java
+54
-0
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+15
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgChangeRegistrationUnitMapper.java
View file @
c9d36822
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationUnitDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationUnit
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -33,8 +31,8 @@ public interface JgChangeRegistrationUnitMapper extends CustomBaseMapper<JgChang
@Param
(
"sort"
)
SortVo
sortMap
,
@Param
(
"param"
)
JgChangeRegistrationUnitDto
model
,
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"currentUserId"
)
String
currentUserId
);
/**
...
...
@@ -46,4 +44,6 @@ public interface JgChangeRegistrationUnitMapper extends CustomBaseMapper<JgChang
List
<
Map
<
String
,
Object
>>
queryEquipInformation
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
String
queryEquipIdBySeq
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
List
<
CompanyEquipCountDto
>
queryForFlowingEquipList
();
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationUnitMapper.xml
View file @
c9d36822
...
...
@@ -125,4 +125,13 @@
where
unit_change_registration_id = #{sequenceNbr}
</select>
<select
id=
"queryForFlowingEquipList"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto"
>
select a.use_unit_credit_code as companyCode,
group_concat(b.equ_id) as records
from tzs_jg_change_registration_unit a,
tzs_jg_change_registration_unit_eq b
where a.sequence_nbr = b.unit_change_registration_id
and a.status in ('三级待受理', '二级待受理', '一级待受理')
GROUP BY a.use_unit_credit_code
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/ChangeUnitEquipUsedCheckImpl.java
0 → 100644
View file @
c9d36822
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jg.api.dto.CompanyEquipCountDto
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationUnitMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RBucket
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.stereotype.Component
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* @author Administrator
*/
@Component
@Slf4j
public
class
ChangeUnitEquipUsedCheckImpl
extends
BaseEquipUsedCheckService
{
private
RedissonClient
redissonClient
;
private
String
bizType
=
"unitChange"
;
private
JgChangeRegistrationUnitMapper
changeRegistrationUnitMapper
;
public
ChangeUnitEquipUsedCheckImpl
(
RedissonClient
redissonClient
,
JgChangeRegistrationUnitMapper
changeRegistrationUnitMapper
)
{
this
.
redissonClient
=
redissonClient
;
this
.
changeRegistrationUnitMapper
=
changeRegistrationUnitMapper
;
}
@Override
public
RedissonClient
getRedisClient
()
{
return
redissonClient
;
}
@Override
public
String
getApplyBizType
()
{
return
bizType
;
}
@Override
public
void
init
()
{
// 初始化已经完成或者在流程中安装告知的设备数据
List
<
CompanyEquipCountDto
>
companyEquipCountDtos
=
changeRegistrationUnitMapper
.
queryForFlowingEquipList
();
companyEquipCountDtos
.
forEach
(
c
->
{
RBucket
<
Set
<
String
>>
rBucket
=
redissonClient
.
getBucket
(
getFlowingEquipRedisKey
(
c
.
getCompanyCode
(),
bizType
));
rBucket
.
set
(
Arrays
.
stream
(
c
.
getRecords
().
split
(
","
)).
collect
(
Collectors
.
toSet
()));
});
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
View file @
c9d36822
...
...
@@ -21,6 +21,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationUnitService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.biz.context.EquipUsedCheckStrategyContext
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
...
...
@@ -520,6 +521,13 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
}
}
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
CompanyBo
company
)
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
// 流程中或已完成
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
"useRegister"
).
equipRepeatUsedCheck
(
map
.
get
(
"equipId"
).
toString
(),
company
.
getCompanyCode
());
}
}
@Override
// @Transactional(rollbackFor = Exception.class)
@GlobalTransactional
(
rollbackFor
=
Exception
.
class
)
...
...
@@ -545,15 +553,21 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
registrationNoList
.
add
(
objectMap
.
get
(
"useRegistrationCode"
).
toString
());
}
}
// 获取单位变更设备列表
if
(
CollectionUtils
.
isEmpty
(
registrationIdList
))
{
throw
new
BadRequest
(
"使用登记证不能为空"
);
}
List
<
JSONObject
>
deviceList
=
registrationManageService
.
queryEquByCertificateSeqList
(
registrationIdList
);
// 获取单位变更设备列表
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
throw
new
BadRequest
(
"使用登记证下无设备"
);
}
for
(
JSONObject
jsonObject
:
deviceList
)
{
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
.
equipRepeatUsedCheck
(
String
.
valueOf
(
jsonObject
.
get
(
"SEQUENCE_NBR"
)),
reginParams
.
getCompany
().
getCompanyCode
());
}
// 获取单位变更单号
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
DWBG
.
getCode
(),
1
);
List
<
String
>
applyNoList
=
listResponseModel
.
getResult
();
...
...
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