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
722ccc94
Commit
722ccc94
authored
May 10, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register
parents
55341fd3
fa0f84fe
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
69 deletions
+67
-69
JgMaintenanceContractDto.java
...amos/boot/module/jg/api/dto/JgMaintenanceContractDto.java
+9
-14
JgUseRegistrationDto.java
...oin/amos/boot/module/jg/api/dto/JgUseRegistrationDto.java
+4
-0
JgMaintenanceContractVo.java
...n/amos/boot/module/jg/api/vo/JgMaintenanceContractVo.java
+5
-23
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+21
-16
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+7
-1
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+5
-2
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+2
-0
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+14
-13
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/dto/JgMaintenanceContractDto.java
View file @
722ccc94
...
@@ -138,6 +138,8 @@ public class JgMaintenanceContractDto extends BaseDto {
...
@@ -138,6 +138,8 @@ public class JgMaintenanceContractDto extends BaseDto {
private
String
createUserId
;
private
String
createUserId
;
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
createDate
;
private
Date
createDate
;
@TableField
(
"instance_status"
)
@TableField
(
"instance_status"
)
...
@@ -154,15 +156,10 @@ public class JgMaintenanceContractDto extends BaseDto {
...
@@ -154,15 +156,10 @@ public class JgMaintenanceContractDto extends BaseDto {
private
List
<
String
>
roleIds
;
private
List
<
String
>
roleIds
;
@ApiModelProperty
(
value
=
"设备种类"
)
/**
* 设备种类
*/
private
String
equList
;
private
String
equList
;
/**
* 设备类别
*/
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equCategory
;
private
String
equCategory
;
@ApiModelProperty
(
value
=
"设备品种"
)
@ApiModelProperty
(
value
=
"设备品种"
)
...
@@ -174,17 +171,12 @@ public class JgMaintenanceContractDto extends BaseDto {
...
@@ -174,17 +171,12 @@ public class JgMaintenanceContractDto extends BaseDto {
@ApiModelProperty
(
value
=
"设备代码"
)
@ApiModelProperty
(
value
=
"设备代码"
)
private
String
equCode
;
private
String
equCode
;
/**
@ApiModelProperty
(
value
=
"工作流下一节点任务id"
)
* 工作流下一节点任务id
*/
private
String
nextTaskId
;
private
String
nextTaskId
;
/**
@ApiModelProperty
(
value
=
"下一节点可执行人"
)
* 下一节点可执行人
*/
private
String
nextExecuteUserIds
;
private
String
nextExecuteUserIds
;
@ApiModelProperty
(
value
=
"使用单位统一信用代码-数据隔离使用"
)
@ApiModelProperty
(
value
=
"使用单位统一信用代码-数据隔离使用"
)
private
String
useUnitCodeFilter
;
private
String
useUnitCodeFilter
;
...
@@ -199,4 +191,7 @@ public class JgMaintenanceContractDto extends BaseDto {
...
@@ -199,4 +191,7 @@ public class JgMaintenanceContractDto extends BaseDto {
@ApiModelProperty
(
value
=
"其他附件"
)
@ApiModelProperty
(
value
=
"其他附件"
)
private
String
otherAccessories
;
private
String
otherAccessories
;
@ApiModelProperty
(
value
=
"当前登陆人单位类型"
)
private
String
unitType
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgUseRegistrationDto.java
View file @
722ccc94
...
@@ -108,8 +108,12 @@ public class JgUseRegistrationDto extends BaseDto {
...
@@ -108,8 +108,12 @@ public class JgUseRegistrationDto extends BaseDto {
private
String
dataType
;
private
String
dataType
;
@ApiModelProperty
(
value
=
"使用单位code"
)
private
String
unitCode
;
private
String
unitCode
;
@ApiModelProperty
(
value
=
"使用单位code:用作接收搜索条件"
)
private
String
useUnitCode
;
private
String
isXixian
;
private
String
isXixian
;
private
String
currentUserId
;
private
String
currentUserId
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/vo/JgMaintenanceContractVo.java
View file @
722ccc94
...
@@ -11,20 +11,6 @@ import java.util.Map;
...
@@ -11,20 +11,6 @@ import java.util.Map;
@Data
@Data
public
class
JgMaintenanceContractVo
{
public
class
JgMaintenanceContractVo
{
@TableField
(
"使用单位-提交-是否可操作"
)
private
Boolean
submitIsFlag
;
@TableField
(
"使用单位-撤回-是否可操作"
)
private
Boolean
revocationIsFlag
;
@TableField
(
"维保单位-受理-是否可操作"
)
private
Boolean
handleIsFlag
;
@TableField
(
"维保单位-驳回-是否可操作"
)
private
Boolean
rejectedIsFlag
;
@TableField
(
"使用:0,维保:1,监管:2"
)
private
String
phase
;
@TableField
(
"维保备案编号"
)
@TableField
(
"维保备案编号"
)
private
String
applyNo
;
private
String
applyNo
;
...
@@ -153,7 +139,6 @@ public class JgMaintenanceContractVo {
...
@@ -153,7 +139,6 @@ public class JgMaintenanceContractVo {
@ApiModelProperty
(
"status"
)
@ApiModelProperty
(
"status"
)
private
String
status
;
private
String
status
;
@ApiModelProperty
(
"设备种类"
)
@ApiModelProperty
(
"设备种类"
)
private
String
equList
;
private
String
equList
;
...
@@ -162,18 +147,15 @@ public class JgMaintenanceContractVo {
...
@@ -162,18 +147,15 @@ public class JgMaintenanceContractVo {
private
List
<?
extends
Map
<?,?>>
equipmentLists
;
private
List
<?
extends
Map
<?,?>>
equipmentLists
;
/**
@ApiModelProperty
(
"工作流下一节点任务id"
)
* 工作流下一节点任务id
*/
@ApiModelProperty
(
"next_task_id"
)
private
String
nextTaskId
;
private
String
nextTaskId
;
/**
@ApiModelProperty
(
"安全管理员姓名联系方式"
)
* 安全管理员姓名联系方式
*/
@ApiModelProperty
(
"maintenance_manager_phone"
)
private
String
maintenanceManagerPhone
;
private
String
maintenanceManagerPhone
;
@ApiModelProperty
(
value
=
"其他附件"
)
@ApiModelProperty
(
value
=
"其他附件"
)
private
JSONArray
otherAccessories
;
private
JSONArray
otherAccessories
;
@ApiModelProperty
(
value
=
"当前登陆人单位类型"
)
private
String
unitType
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractMapper.xml
View file @
722ccc94
...
@@ -174,29 +174,34 @@
...
@@ -174,29 +174,34 @@
AND ri."EQU_CODE" like concat('%',#{contractDto.equCode},'%')
AND ri."EQU_CODE" like concat('%',#{contractDto.equCode},'%')
</if>
</if>
-- 数据过滤开始 ----------------------------------------------------
-- 数据过滤开始 ----------------------------------------------------
<choose
>
<!-- <choose>--
>
<when
test=
"contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null and
<!-- <when test="contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null and-->
contractDto.maintenanceUnitCodeFilter != '' and contractDto.maintenanceUnitCodeFilter != null"
>
<!-- contractDto.maintenanceUnitCodeFilter != '' and contractDto.maintenanceUnitCodeFilter != null">--
>
-- 同时有使用单位和维保单位用
<!-- -- 同时有使用单位和维保单位用-->
and (
<!-- and (-->
tjmc.use_unit_code = #{contractDto.useUnitCodeFilter}
<!-- tjmc.use_unit_code = #{contractDto.useUnitCodeFilter}-->
or tjmc.maintenance_unit_code = #{contractDto.maintenanceUnitCodeFilter}
<!-- or tjmc.maintenance_unit_code = #{contractDto.maintenanceUnitCodeFilter}-->
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' )
<!-- or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' )-->
)
<!-- )-->
</when
>
<!-- </when>--
>
<otherwise
>
<!-- <otherwise >--
>
-- 只有使用单位或者维保单位用,或者都没有
-- 只有使用单位或者维保单位用,或者都没有
<if
test=
"contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null"
>
<if
test=
"contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null"
>
and (tjmc.use_unit_code = #{contractDto.useUnitCodeFilter} or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
and (tjmc.use_unit_code = #{contractDto.useUnitCodeFilter}
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
</if>
</if>
<if
test=
"contractDto.maintenanceUnitCodeFilter != '' and contractDto.maintenanceUnitCodeFilter != null"
>
<if
test=
"contractDto.maintenanceUnitCodeFilter != '' and contractDto.maintenanceUnitCodeFilter != null"
>
and (tjmc.maintenance_unit_code = #{contractDto.maintenanceUnitCodeFilter} or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
and (tjmc.maintenance_unit_code = #{contractDto.maintenanceUnitCodeFilter}
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
and (tjmc.status
<![CDATA[<>]]>
'使用单位待提交' and tjmc.status
<![CDATA[<>]]>
'待提交')
</if>
</if>
</otherwise
>
<!-- </otherwise>--
>
</choose
>
<!-- </choose>--
>
-- 监管单位用
-- 监管单位用
<if
test=
"contractDto.receiveOrgCodeFilter != '' and contractDto.receiveOrgCodeFilter != null"
>
<if
test=
"contractDto.receiveOrgCodeFilter != '' and contractDto.receiveOrgCodeFilter != null"
>
and (tjmc.receive_org_code = #{contractDto.receiveOrgCodeFilter} or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
and (tjmc.receive_org_code = #{contractDto.receiveOrgCodeFilter}
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
and (tjmc.status
<![CDATA[<>]]>
'使用单位待提交' and tjmc.status
<![CDATA[<>]]>
'待提交')
</if>
</if>
-- 数据过滤结束 ----------------------------------------------------
-- 数据过滤结束 ----------------------------------------------------
</where>
</where>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
722ccc94
...
@@ -100,13 +100,16 @@
...
@@ -100,13 +100,16 @@
<if
test=
"dto.useRegistrationCode != null and dto.useRegistrationCode != ''"
>
<if
test=
"dto.useRegistrationCode != null and dto.useRegistrationCode != ''"
>
and ur.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
and ur.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
</if>
</if>
<if
test=
"dto.useUnitCode != null and dto.useUnitCode != ''"
>
and ur.use_unit_credit_code = #{dto.useUnitCode}
</if>
<if
test=
"roleIds != null and dto.dataType == 'supervision'"
>
<if
test=
"roleIds != null and dto.dataType == 'supervision'"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
instance_status like concat('%',#{role},'%')
instance_status like concat('%',#{role},'%')
</foreach>
</foreach>
</if>
</if>
<if
test=
"dto.dataType == 'supervision' "
>
<if
test=
"dto.dataType == 'supervision' "
>
and ur.receive_company_code = #{dto.unit
Code}
AND ur.receive_company_code = #{dto.receiveCompany
Code}
AND ur.instance_id
<![CDATA[<>]]>
''
AND ur.instance_id
<![CDATA[<>]]>
''
</if>
</if>
<if
test=
"dto.dataType == 'company' "
>
<if
test=
"dto.dataType == 'company' "
>
...
@@ -163,6 +166,9 @@
...
@@ -163,6 +166,9 @@
<if
test=
"dto.useRegistrationCode != null and dto.useRegistrationCode != ''"
>
<if
test=
"dto.useRegistrationCode != null and dto.useRegistrationCode != ''"
>
and ur.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
and ur.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
</if>
</if>
<if
test=
"dto.useUnitCode != null and dto.useUnitCode != ''"
>
and ur.use_unit_credit_code = #{dto.useUnitCode}
</if>
GROUP BY re.equip_transfer_id
GROUP BY re.equip_transfer_id
</where>
)
</where>
)
order by
order by
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
722ccc94
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
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.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
...
@@ -94,17 +95,19 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -94,17 +95,19 @@ public class JgUseRegistrationController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/getList"
)
@GetMapping
(
value
=
"/getList"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getList
(
JgUseRegistrationDto
dto
,
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getList
(
JgUseRegistrationDto
dto
,
@ApiParam
(
value
=
"排序字段"
,
required
=
false
)
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@ApiParam
(
value
=
"排序字段"
)
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
ReginParams
info
=
getSelectedOrgInfo
();
ReginParams
info
=
getSelectedOrgInfo
();
dto
.
setUnitCode
(
info
.
getCompany
().
getCompanyCode
());
dto
.
setCurrentUserId
(
info
.
getUserModel
().
getUserId
());
dto
.
setCurrentUserId
(
info
.
getUserModel
().
getUserId
());
if
(
info
.
getCompany
().
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
))
{
if
(
info
.
getCompany
().
getLevel
().
equals
(
BaseController
.
COMPANY_TYPE_COMPANY
))
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_COMPANY
);
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_COMPANY
);
dto
.
setUnitCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
info
.
getCompany
().
getCompanyType
())
?
info
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
info
.
getCompany
().
getCompanyCode
());
}
else
{
}
else
{
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_SUPERVISION
);
dto
.
setDataType
(
BaseController
.
COMPANY_TYPE_SUPERVISION
);
dto
.
setReceiveCompanyCode
(
info
.
getCompany
().
getCompanyCode
());
}
}
Page
<
Map
<
String
,
Object
>>
list
=
jgUseRegistrationServiceImpl
.
getList
(
dto
,
sort
,
page
,
dto
.
getRoleIds
());
Page
<
Map
<
String
,
Object
>>
list
=
jgUseRegistrationServiceImpl
.
getList
(
dto
,
sort
,
page
,
dto
.
getRoleIds
());
list
.
getRecords
().
forEach
(
x
->
x
.
put
(
"companyType"
,
info
.
getCompany
().
getCompanyType
()));
list
.
getRecords
().
forEach
(
x
->
x
.
put
(
"companyType"
,
info
.
getCompany
().
getCompanyType
()));
...
...
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 @
722ccc94
...
@@ -124,6 +124,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -124,6 +124,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
}
}
}
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
sortMap
,
dto
,
reginParams
.
getUserModel
().
getUserId
());
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
sortMap
,
dto
,
reginParams
.
getUserModel
().
getUserId
());
List
<
JgMaintenanceContractDto
>
records
=
contractList
.
getRecords
().
stream
().
peek
(
x
->
x
.
setUnitType
(
company
.
getCompanyType
())).
collect
(
Collectors
.
toList
());
contractList
.
setRecords
(
records
);
BeanUtils
.
copyProperties
(
contractList
,
result
);
BeanUtils
.
copyProperties
(
contractList
,
result
);
return
result
;
return
result
;
}
}
...
...
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 @
722ccc94
...
@@ -21,10 +21,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
...
@@ -21,10 +21,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
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.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
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.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationService
;
...
@@ -348,8 +345,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -348,8 +345,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
List
<
Map
<
String
,
Object
>>
handleUseRegistration
(
JSONObject
map
)
{
private
List
<
Map
<
String
,
Object
>>
handleUseRegistration
(
JSONObject
map
)
{
try
{
try
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
// 提交时进行校验设备是否在流程中使用(并发及同时打开多个相同的页面时才会出现此种情况)
// 提交时进行校验设备是否在流程中使用(并发及同时打开多个相同的页面时才会出现此种情况)
checkForRepeatUsedEquip
(
map
,
reginParams
);
checkForRepeatUsedEquip
(
map
,
company
);
// 使用登记信息
// 使用登记信息
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
jgUseRegistration
.
setRegDate
(
new
Date
());
jgUseRegistration
.
setRegDate
(
new
Date
());
...
@@ -358,8 +356,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -358,8 +356,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
IdxBizJgOtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
jgUseRegistration
.
setSupervisoryCode
(
supervisoryCode
);
jgUseRegistration
.
setUseUnitName
(
String
.
valueOf
(
map
.
get
(
"useUnitName"
)));
jgUseRegistration
.
setUseUnitCreditCode
(
String
.
valueOf
(
map
.
get
(
"useUnitCreditCode"
)));
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"otherAccessories"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"otherAccessories"
)))
{
jgUseRegistration
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
jgUseRegistration
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
}
}
...
@@ -378,7 +375,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -378,7 +375,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
map
.
put
(
"safetyManagerName"
,
data
[
1
]);
map
.
put
(
"safetyManagerName"
,
data
[
1
]);
}
}
// 使用单位提交
// 使用单位提交
jgUseRegistration
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgUseRegistration
.
setUseUnitName
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyName
().
split
(
"_"
)[
1
]
:
company
.
getCompanyName
());
jgUseRegistration
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
jgUseRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
jgUseRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
jgUseRegistration
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
jgUseRegistration
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
...
@@ -525,10 +525,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -525,10 +525,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
});
});
}
}
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
ReginParams
reginParams
)
{
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
CompanyBo
company
)
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
// 流程中或已完成
// 流程中或已完成
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
"useRegister"
).
equipRepeatUsedCheck
(
map
.
get
(
"equipId"
).
toString
(),
reginParams
.
getCompany
()
.
getCompanyCode
());
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
"useRegister"
).
equipRepeatUsedCheck
(
map
.
get
(
"equipId"
).
toString
(),
company
.
getCompanyCode
());
}
}
}
}
...
@@ -579,9 +579,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -579,9 +579,10 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useRegistration
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
useRegistration
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
useRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
useRegistration
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
// 使用单位信息
// 使用单位信息
useRegistration
.
setUseUnitName
(
company
.
getCompanyName
());
useRegistration
.
setUseUnitName
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
useRegistration
.
setUseUnitCreditCode
(
company
.
getCompanyCode
());
company
.
getCompanyName
().
split
(
"_"
)[
1
]
:
company
.
getCompanyName
());
List
<
LinkedHashMap
>
tree
=
commonService
.
getCreatTree
();
useRegistration
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
// 接收单位信息
// 接收单位信息
Optional
.
ofNullable
(
useRegistration
.
getReceiveOrgCode
())
Optional
.
ofNullable
(
useRegistration
.
getReceiveOrgCode
())
.
filter
(
code
->
code
.
contains
(
"_"
))
.
filter
(
code
->
code
.
contains
(
"_"
))
...
...
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