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
4994c46c
Commit
4994c46c
authored
Jul 18, 2024
by
王果
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
21052 设备移交限制设备不能多次出现在执行的流程中
parent
eb3c6567
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
132 additions
and
34 deletions
+132
-34
JgEquipTransferMapper.java
...amos/boot/module/jg/api/mapper/JgEquipTransferMapper.java
+4
-0
JgEquipTransferMapper.xml
...g-api/src/main/resources/mapper/JgEquipTransferMapper.xml
+10
-0
JgEquipTransferController.java
...t/module/jg/biz/controller/JgEquipTransferController.java
+16
-17
ChangeUnitEquipUsedCheckImpl.java
...ule/jg/biz/service/impl/ChangeUnitEquipUsedCheckImpl.java
+1
-1
EquipTransferEquipUsedCheckImpl.java
.../jg/biz/service/impl/EquipTransferEquipUsedCheckImpl.java
+54
-0
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+46
-14
MaintenanceContractEquipUsedCheckImpl.java
...z/service/impl/MaintenanceContractEquipUsedCheckImpl.java
+1
-2
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/JgEquipTransferMapper.java
View file @
4994c46c
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.JgEquipTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgEquipTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -23,4 +25,6 @@ public interface JgEquipTransferMapper extends CustomBaseMapper<JgEquipTransfer>
@MapKey
(
"sequenceNbr"
)
List
<
Map
<
String
,
Object
>>
queryEquipInformation
(
Long
sequenceNbr
);
List
<
CompanyEquipCountDto
>
queryForFlowingEquipList
();
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgEquipTransferMapper.xml
View file @
4994c46c
...
...
@@ -210,4 +210,14 @@
jet.sequence_nbr = #{sequenceNbr}
LIMIT 1
</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_equip_transfer a,
tzs_jg_equip_transfer_eq b
where a.sequence_nbr = b.equip_transfer_id
and a.apply_status = '6612'
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/controller/JgEquipTransferController.java
View file @
4994c46c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.common.BaseException
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEquipTransferServiceImpl
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.*
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgEquipTransferServiceImpl
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEquipTransferDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 设备移交
...
...
@@ -56,7 +55,7 @@ public class JgEquipTransferController extends BaseController {
public
ResponseModel
<
Object
>
updateBySequenceNbr
(
@RequestParam
(
"submitType"
)
String
submitType
,
@RequestBody
JgEquipTransferDto
equipTransferDto
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
updateEquipTransfer
(
submitType
,
equipTransferDto
,
op
));
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
updateEquipTransfer
(
submitType
,
equipTransferDto
,
op
,
getSelectedOrgInfo
()
));
}
/**
...
...
@@ -112,10 +111,10 @@ public class JgEquipTransferController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备移交分页查询"
,
notes
=
"设备移交分页查询"
)
public
ResponseModel
<
Page
<
JgEquipTransferDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestBody
(
required
=
false
)
JgEquipTransferDto
dto
)
{
Page
<
JgEquipTransferDto
>
page
=
new
Page
<>(
current
,
size
);
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
queryForJgEquipTransferPage
(
page
,
sort
,
dto
,
getSelectedOrgInfo
()));
return
ResponseHelper
.
buildResponse
(
jgEquipTransferServiceImpl
.
queryForJgEquipTransferPage
(
page
,
sort
,
dto
,
getSelectedOrgInfo
()));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
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
View file @
4994c46c
...
...
@@ -44,7 +44,7 @@ public class ChangeUnitEquipUsedCheckImpl extends BaseEquipUsedCheckService {
@Override
public
void
init
()
{
// 初始化
已经完成或者在流程中安装告知的
设备数据
// 初始化
在流程中
设备数据
List
<
CompanyEquipCountDto
>
companyEquipCountDtos
=
changeRegistrationUnitMapper
.
queryForFlowingEquipList
();
companyEquipCountDtos
.
forEach
(
c
->
{
RBucket
<
Set
<
String
>>
rBucket
=
redissonClient
.
getBucket
(
getFlowingEquipRedisKey
(
c
.
getCompanyCode
(),
bizType
));
...
...
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/EquipTransferEquipUsedCheckImpl.java
0 → 100644
View file @
4994c46c
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.JgEquipTransferMapper
;
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
EquipTransferEquipUsedCheckImpl
extends
BaseEquipUsedCheckService
{
private
RedissonClient
redissonClient
;
private
String
bizType
=
"equipmentHandover"
;
private
JgEquipTransferMapper
equipTransferMapper
;
public
EquipTransferEquipUsedCheckImpl
(
RedissonClient
redissonClient
,
JgEquipTransferMapper
equipTransferMapper
)
{
this
.
redissonClient
=
redissonClient
;
this
.
equipTransferMapper
=
equipTransferMapper
;
}
@Override
public
RedissonClient
getRedisClient
()
{
return
redissonClient
;
}
@Override
public
String
getApplyBizType
()
{
return
bizType
;
}
@Override
public
void
init
()
{
// 初始化在流程中的设备数据
List
<
CompanyEquipCountDto
>
companyEquipCountDtos
=
equipTransferMapper
.
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/JgEquipTransferServiceImpl.java
View file @
4994c46c
This diff is collapsed.
Click to expand it.
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/MaintenanceContractEquipUsedCheckImpl.java
View file @
4994c46c
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
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.redisson.api.RBucket
;
...
...
@@ -45,7 +44,7 @@ public class MaintenanceContractEquipUsedCheckImpl extends BaseEquipUsedCheckSer
@Override
public
void
init
()
{
// 初始化
已经完成或者在流程中安装告知
的设备数据
// 初始化
在流程中
的设备数据
List
<
CompanyEquipCountDto
>
companyEquipCountDtos
=
maintenanceContractMapper
.
queryForFlowingEquipList
();
companyEquipCountDtos
.
forEach
(
c
->
{
RBucket
<
Set
<
String
>>
rBucket
=
redissonClient
.
getBucket
(
getFlowingEquipRedisKey
(
c
.
getCompanyCode
(),
bizType
));
...
...
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