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
7511d4fc
Commit
7511d4fc
authored
Dec 21, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
af8d4eee
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
16 deletions
+85
-16
EquipTypeEnum.java
.../yeejoin/amos/boot/module/jg/api/enums/EquipTypeEnum.java
+31
-0
MaintenceStatusEnum.java
...in/amos/boot/module/jg/api/enums/MaintenceStatusEnum.java
+2
-2
JgMaintenanceContractController.java
...le/jg/biz/controller/JgMaintenanceContractController.java
+24
-0
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+11
-14
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+17
-0
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/enums/EquipTypeEnum.java
0 → 100644
View file @
7511d4fc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
EquipTypeEnum
{
锅炉
(
"锅"
,
"1"
),
压力容器
(
"容"
,
"2"
),
电梯
(
"梯"
,
"3"
),
起重机械
(
"起"
,
"4"
),
场内机动车辆
(
"车"
,
"5"
),
大型游乐设施
(
"游"
,
"6"
),
压力管道
(
"管"
,
"8"
),
客运索道
(
"索"
,
"9"
);
private
final
String
name
;
private
final
String
code
;
public
static
String
getMessage
(
String
code
)
{
for
(
EquipTypeEnum
constants
:
values
())
{
if
(
constants
.
getCode
().
equals
(
code
))
{
return
constants
.
getName
();
}
}
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/MaintenceStatusEnum.java
View file @
7511d4fc
...
...
@@ -10,8 +10,8 @@ import lombok.Getter;
@AllArgsConstructor
public
enum
MaintenceStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"维保单位
受理
已驳回"
,
"使用单位撤回"
),
RECEIVE
(
"维保单位审核确认"
,
"receive"
,
"维保单位待受理"
,
"监管单位
受理已驳回"
,
"维保单位受理
撤回"
),
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"维保单位已驳回"
,
"使用单位撤回"
),
RECEIVE
(
"维保单位审核确认"
,
"receive"
,
"维保单位待受理"
,
"监管单位
已驳回"
,
"维保单位
撤回"
),
PRELIMINARY
(
"监管单位审核"
,
"preliminary"
,
"监管单位待受理"
,
""
,
""
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintenanceContractController.java
View file @
7511d4fc
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -12,6 +13,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgMaintenanceContractSer
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -168,6 +170,28 @@ public class JgMaintenanceContractController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgMaintenanceContractServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
if
(
map
.
containsKey
(
"formData"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"formData"
))){
JgMaintenanceContract
dto
=
new
JgMaintenanceContract
();
Map
<
String
,
Object
>
formData
=
(
Map
<
String
,
Object
>)
map
.
get
(
"formData"
);
BeanUtil
.
copyProperties
(
formData
,
dto
);
JgMaintenanceContract
result
=
new
JgMaintenanceContract
();
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceManagerOneId
()))
{
result
.
setSequenceNbr
(
dto
.
getSequenceNbr
());
//维保人员一
String
[]
maintenanceManagerOneInfo
=
dto
.
getMaintenanceManagerOneId
().
split
(
"_"
);
result
.
setMaintenanceManagerOneId
(
maintenanceManagerOneInfo
[
0
]);
result
.
setMaintenanceManagerOneName
(
maintenanceManagerOneInfo
[
1
]);
result
.
setMaintenanceManagerOnePhone
(
dto
.
getMaintenanceManagerOnePhone
());
//维保人员二
String
[]
maintenanceManagerTwoInfo
=
dto
.
getMaintenanceManagerTwoId
().
split
(
"_"
);
result
.
setMaintenanceManagerTwoId
(
maintenanceManagerTwoInfo
[
0
]);
result
.
setMaintenanceManagerTwoName
(
maintenanceManagerTwoInfo
[
1
]);
result
.
setMaintenanceManagerTwoPhone
(
dto
.
getMaintenanceManagerTwoPhone
());
}
jgMaintenanceContractServiceImpl
.
getBaseMapper
().
updateById
(
result
);
}
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
7511d4fc
...
...
@@ -91,11 +91,11 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
else
if
(
MaintenanceEnum
.
WEIBAO
.
getCode
().
equals
(
phase
))
{
//维保单位用"维保单位统一信用代码"匹配数据
dto
.
setMaintenanceUnitCode
(
company
.
getCompanyCode
()
+
"_"
+
company
.
getCompanyName
()
);
dto
.
setMaintenanceUnitCode
(
company
.
getCompanyCode
());
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
else
if
(
MaintenanceEnum
.
JIANGUAN
.
getCode
().
equals
(
phase
))
{
//监管单位用"接收机构统一使用代码"匹配
dto
.
setReceiveOrgCode
(
company
.
get
Org
Code
());
dto
.
setReceiveOrgCode
(
company
.
get
Company
Code
());
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
BeanUtils
.
copyProperties
(
contractList
,
result
);
...
...
@@ -110,15 +110,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
JgMaintenanceContractVo
vo
=
new
JgMaintenanceContractVo
();
BeanUtils
.
copyProperties
(
dto
,
vo
);
vo
.
setMaintenanceContract
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceContract
())
?
null
:
JSON
.
parseArray
(
dto
.
getMaintenanceContract
()));
vo
.
setMaintenanceManagerOneName
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceManagerOneId
())
?
null
:
dto
.
getMaintenanceManagerOneId
().
split
(
"_"
)[
1
]);
vo
.
setMaintenanceManagerTwoName
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceManagerTwoId
())
?
null
:
dto
.
getMaintenanceManagerTwoId
().
split
(
"_"
)[
1
]);
List
<
Map
<
String
,
Object
>>
list
=
maintenanceContractMapper
.
selectEquipList
(
sequenceNbr
);
// ArrayList<EquipMessageVo> equipMessageVos = new ArrayList<>();
// list.forEach(item ->{
// EquipMessageVo equipMessageVo = new EquipMessageVo();
// BeanUtil.copyProperties(item, equipMessageVo);
// equipMessageVos.add(equipMessageVo);
// });
if
(!
ObjectUtils
.
isEmpty
(
list
)){
vo
.
setEquipmentLists
(
list
);
}
...
...
@@ -366,7 +358,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setUseUnitName
(
company
.
getCompanyName
());
//管理员信息
String
[]
MaintenanceManager
=
dto
.
getMaintenanceManagerId
().
split
(
"_"
);
contract
.
setMaintenanceManagerId
(
dto
.
getMaintenanceManagerId
()
);
contract
.
setMaintenanceManagerId
(
MaintenanceManager
[
0
]
);
contract
.
setMaintenanceManagerName
(
MaintenanceManager
[
1
]);
//接收机构信息
String
[]
splitReceiveOrgCode
=
dto
.
getReceiveOrgCode
().
split
(
"_"
);
...
...
@@ -374,7 +366,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setReceiveOrgName
(
splitReceiveOrgCode
[
1
]);
//维保单位信息
String
[]
splitMaintenanceUnitCode
=
dto
.
getMaintenanceUnitCode
().
split
(
"_"
);
contract
.
setMaintenanceUnitCode
(
dto
.
getMaintenanceUnitCode
()
);
contract
.
setMaintenanceUnitCode
(
splitMaintenanceUnitCode
[
0
]
);
contract
.
setMaintenanceUnitName
(
splitMaintenanceUnitCode
[
1
]);
contract
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
...
...
@@ -402,9 +394,14 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
jgMaintenanceContractEqService
.
saveBatch
(
equipList
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
String
instanceId
=
null
;
// 提交启动流程
String
instanceId
=
startByVariable
();
if
(!
ObjectUtils
.
isEmpty
(
instanceId
)){
if
(
map
.
containsKey
(
"instanceId"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"instanceId"
)))
{
instanceId
=
String
.
valueOf
(
map
.
get
(
"instanceId"
));
}
else
{
instanceId
=
startByVariable
();
}
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 修改数据信息
updateExecuteIds
(
instanceId
,
contract
.
getSequenceNbr
(),
"0"
);
// 默认执行流程
...
...
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/JgUseRegistrationServiceImpl.java
View file @
7511d4fc
...
...
@@ -13,10 +13,12 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.UseStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
...
...
@@ -36,6 +38,8 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -65,6 +69,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
ICreateCodeService
iCreateCodeService
;
@Autowired
RedisUtils
redisUtils
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
return
listPage
;
...
...
@@ -291,4 +297,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
detail
;
}
public
String
getCode
(
String
supervisoryCode
)
{
if
(!
ObjectUtils
.
isEmpty
(
supervisoryCode
)
&&
supervisoryCode
.
length
()
>
5
)
{
String
name
=
EquipTypeEnum
.
getMessage
(
supervisoryCode
.
substring
(
1
,
2
));
String
type
=
supervisoryCode
.
substring
(
2
,
4
);
String
city
=
supervisoryCode
.
substring
(
0
,
1
);
ResponseModel
<
String
>
stringResponseModel
=
tzsServiceFeignClient
.
useRegistrationCode
(
name
+
type
+
"陕"
+
city
);
return
stringResponseModel
.
getResult
();
}
return
null
;
}
}
\ No newline at end of file
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