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
6365f8e7
Commit
6365f8e7
authored
Jan 15, 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
d4e48a65
25029b75
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
119 additions
and
54 deletions
+119
-54
JgMaintenanceContractDto.java
...amos/boot/module/jg/api/dto/JgMaintenanceContractDto.java
+11
-1
JgChangeRegistrationTransferMapper.xml
...n/resources/mapper/JgChangeRegistrationTransferMapper.xml
+6
-3
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+31
-8
JgMaintenanceContractController.java
...le/jg/biz/controller/JgMaintenanceContractController.java
+1
-2
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+4
-0
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+11
-4
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+2
-13
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+53
-23
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 @
6365f8e7
...
...
@@ -138,7 +138,7 @@ public class JgMaintenanceContractDto extends BaseDto {
private
List
<
String
>
roleIds
;
/**
*工作流下一节点任务id
*
工作流下一节点任务id
*/
@TableField
(
value
=
"next_task_id"
)
private
String
nextTaskId
;
...
...
@@ -147,4 +147,14 @@ public class JgMaintenanceContractDto extends BaseDto {
* 下一节点可执行人
*/
private
String
nextExecuteUserIds
;
@ApiModelProperty
(
value
=
"使用单位统一信用代码-数据隔离使用"
)
private
String
useUnitCodeFilter
;
@ApiModelProperty
(
value
=
"维保单位统一信用代码-数据隔离使用"
)
private
String
maintenanceUnitCodeFilter
;
@ApiModelProperty
(
value
=
"接收机构统一信用代码-数据隔离使用"
)
private
String
receiveOrgCodeFilter
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationTransferMapper.xml
View file @
6365f8e7
...
...
@@ -44,10 +44,13 @@
<if
test=
"dto.equCode != null and dto.equCode != ''"
>
and jri.EQU_CODE like concat('%',#{dto.equCode},'%')
</if>
<if
test=
"dto.useUnit
Name != null and dto.useUnitNam
e != ''"
>
and crt.use_unit_
name like concat('%',#{dto.useUnitName},'%')
<if
test=
"dto.useUnit
CreditCode != null and dto.useUnitCreditCod
e != ''"
>
and crt.use_unit_
credit_code = #{dto.useUnitCreditCode}
</if>
<if
test=
"roleIds != null and dto.dataType == 'jg'"
>
<if
test=
"dto.receiveOrgCode != null and dto.receiveOrgCode != ''"
>
and crt.receive_company_code = #{dto.receiveOrgCode}
</if>
<if
test=
"roleIds != null and type == 'supervision'"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
crt.execute_sequence like concat('%',#{role},'%')
</foreach>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractMapper.xml
View file @
6365f8e7
...
...
@@ -133,6 +133,14 @@
<if
test=
"contractDto.useUnitName != '' and contractDto.useUnitName != null"
>
and use_unit_name like concat('%',#{contractDto.useUnitName},'%')
</if>
<if
test=
"contractDto.roleIds != null"
>
<foreach
collection=
'contractDto.roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
instance_status like concat('%',#{role},'%')
</foreach>
</if>
<if
test=
"contractDto.status != '' and contractDto.status != null"
>
and status = #{contractDto.status}
</if>
<if
test=
"contractDto.useUnitCode != '' and contractDto.useUnitCode != null"
>
and use_unit_code = #{contractDto.useUnitCode}
</if>
...
...
@@ -142,14 +150,29 @@
<if
test=
"contractDto.receiveOrgCode != '' and contractDto.receiveOrgCode != null"
>
and receive_org_code = #{contractDto.receiveOrgCode}
</if>
<if
test=
"contractDto.roleIds != null"
>
<foreach
collection=
'contractDto.roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
instance_status like concat('%',#{role},'%')
</foreach>
</if>
<if
test=
"contractDto.status != '' and contractDto.status != null"
>
and status = #{contractDto.status}
</if>
-- 数据过滤开始 ----------------------------------------------------
<choose>
<when
test=
"contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null and
contractDto.maintenanceUnitCodeFilter != '' and contractDto.maintenanceUnitCodeFilter != null"
>
-- 同时有使用单位和维保单位用
and (use_unit_code = #{contractDto.useUnitCodeFilter}
or maintenance_unit_code = #{contractDto.maintenanceUnitCodeFilter})
</when>
<otherwise
>
-- 只有使用单位或者维保单位用,或者都没有
<if
test=
"contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null"
>
and use_unit_code = #{contractDto.useUnitCodeFilter}
</if>
<if
test=
"contractDto.maintenanceUnitCodeFilter != '' and contractDto.maintenanceUnitCodeFilter != null"
>
and maintenance_unit_code = #{contractDto.maintenanceUnitCodeFilter}
</if>
</otherwise>
</choose>
-- 监管单位用
<if
test=
"contractDto.receiveOrgCodeFilter != '' and contractDto.receiveOrgCodeFilter != null"
>
and receive_org_code = #{contractDto.receiveOrgCodeFilter}
</if>
-- 数据过滤结束 ----------------------------------------------------
</where>
order by apply_no desc
</select>
...
...
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 @
6365f8e7
...
...
@@ -170,13 +170,12 @@ public class JgMaintenanceContractController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"维保合同备案分页查询"
,
notes
=
"分页查询维保合同备案"
)
public
ResponseModel
<
Page
<
JgMaintenanceContractVo
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"phase"
)
int
phase
,
Map
<
String
,
Object
>
map
)
{
Page
<
JgMaintenanceContract
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
Page
<
JgMaintenanceContractVo
>
contractDtoPage
=
jgMaintenanceContractServiceImpl
.
queryForPage
(
page
,
phase
,
map
,
reginParams
);
Page
<
JgMaintenanceContractVo
>
contractDtoPage
=
jgMaintenanceContractServiceImpl
.
queryForPage
(
page
,
map
,
reginParams
);
return
ResponseHelper
.
buildResponse
(
contractDtoPage
);
}
...
...
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/CommonServiceImpl.java
View file @
6365f8e7
...
...
@@ -118,6 +118,8 @@ public class CommonServiceImpl implements ICommonService {
private
static
final
String
basic
=
"basic"
;
// 业务通用发起——告知单详情
private
static
final
String
notice
=
"notice"
;
// 业务通用发起——技术参数-改造变更登记使用
private
static
final
String
techInfo
=
"techInfo"
;
// 业务通用发起——安装告知表单key
private
static
final
String
AZGZ_FORM_ID
=
"1734141426742095873"
;
// 业务通用发起——移装变更表单key
...
...
@@ -529,6 +531,7 @@ public class CommonServiceImpl implements ICommonService {
public
void
invokeBusinessProcess
(
String
submitType
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
Map
<
String
,
Object
>
basicObj
=
(
Map
<
String
,
Object
>)
map
.
get
(
basic
);
Map
<
String
,
Object
>
noticeObj
=
(
Map
<
String
,
Object
>)
map
.
get
(
notice
);
Map
<
String
,
Object
>
techInfoObj
=
(
Map
<
String
,
Object
>)
map
.
get
(
techInfo
);
Map
<
String
,
Object
>
provideMap
=
new
HashMap
<>();
String
type
=
(
String
)
basicObj
.
get
(
"type"
);
...
...
@@ -573,6 +576,7 @@ public class CommonServiceImpl implements ICommonService {
noticeObj
.
put
(
"submit"
,
"true"
);
}
noticeObj
.
put
(
"receiveCompanyCode"
,
!
ObjectUtils
.
isEmpty
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
?
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
:
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode1"
)));
noticeObj
.
put
(
"techInfo"
,
techInfoObj
);
JSONObject
jsonObject
=
new
JSONObject
(
noticeObj
);
jgChangeRegistrationReformServiceImpl
.
save
(
jsonObject
);
}
else
if
(
type
.
equals
(
ApplicationFormTypeEnum
.
YZBG
.
getBusinessCode
()))
{
...
...
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/JgChangeRegistrationReformServiceImpl.java
View file @
6365f8e7
...
...
@@ -89,6 +89,9 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
@Autowired
private
JgChangeRegistrationNameEqMapper
jgChangeRegistrationNameEqMapper
;
@Autowired
private
CommonMapper
commonMapper
;
/**
* 分页查询
*/
...
...
@@ -205,7 +208,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
jgChangeRegistrationReform
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
jgChangeRegistrationReform
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
ProcessTaskDTO
processTaskDTO
=
startByVariable
();
ProcessTaskDTO
processTaskDTO
=
startByVariable
(
jgChangeRegistrationReform
);
updateExecuteIds
(
instanceId
,
jgChangeRegistrationReform
,
"startWorkfow"
,
processTaskDTO
);
List
<
TaskModelDto
>
taskModelDtoList
=
Arrays
.
asList
(
getTaskModelDtoList
(
jgChangeRegistrationReform
,
processTaskDTO
));
commonServiceImpl
.
buildTaskModel
(
taskModelDtoList
);
...
...
@@ -220,7 +223,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
}
public
ProcessTaskDTO
startByVariable
()
{
public
ProcessTaskDTO
startByVariable
(
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
//启动流程
try
{
...
...
@@ -228,6 +231,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
dto
.
setProcessDefinitionKey
(
"renovationRegistrationReviewNew"
);
dto
.
setBusinessKey
(
"submit"
);
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
dto
.
setNextExecuteUserCompanyCode
(
commonMapper
.
getOrgCodeByCompanyCode
(
jgChangeRegistrationReform
.
getReceiveOrgCode
()));
List
<
ActWorkflowStartDTO
>
actWorkflowStartDTOList
=
Arrays
.
asList
(
dto
);
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
actWorkflowBatchDTO
.
setProcess
(
actWorkflowStartDTOList
);
...
...
@@ -342,6 +346,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
map
.
put
(
"approvalStatus"
,
"提交"
);
}
dto
.
setVariable
(
map
);
dto
.
setNextExecuteUserCompanyCode
(
commonMapper
.
getOrgCodeByCompanyCode
(
jgChangeRegistrationReform
.
getReceiveOrgCode
()));
//执行流程
processTaskDTO
=
iCmWorkflowService
.
complete
(
taskId
,
dto
);
}
catch
(
Exception
e
)
{
...
...
@@ -407,7 +412,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
Map
<
String
,
Object
>
originalData
=
new
HashMap
<>();
if
((
detail
.
get
(
"status"
).
equals
(
"已完成"
)
||
detail
.
get
(
"status"
).
equals
(
"流程结束"
)))
{
originalData
=
idxBizJgRegisterInfoService
.
getDetail
FieldCamelCase
ByRecord
(
equipId
);
originalData
=
idxBizJgRegisterInfoService
.
getDetailByRecord
(
equipId
);
originalData
.
remove
(
"sequenceNbr"
);
if
(!
ObjectUtils
.
isEmpty
(
detail
.
get
(
"transformationQualityCertificate"
)))
{
detail
.
put
(
"transformationQualityCertificate"
,
JSONObject
.
parse
(
detail
.
get
(
"transformationQualityCertificate"
).
toString
()));
...
...
@@ -464,7 +469,9 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
//当前数据
String
newData
=
jgRegistrationHistory
.
getChangeData
();
//将历史数据更新到技术参数表中
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevatorNew
=
JSONObject
.
parseObject
(
newData
,
IdxBizJgTechParamsElevator
.
class
);
JSONObject
allData
=
JSONObject
.
parseObject
(
newData
);
Map
<
String
,
Object
>
techInfo
=
(
Map
<
String
,
Object
>)
allData
.
get
(
"techInfo"
);
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevatorNew
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
techInfo
),
IdxBizJgTechParamsElevator
.
class
);
BeanUtil
.
copyProperties
(
idxBizJgTechParamsElevatorNew
,
idxBizJgTechParamsElevator
,
"sequenceNbr"
,
"record"
);
idxBizJgTechParamsElevatorMapper
.
updateById
(
idxBizJgTechParamsElevator
);
//将历史数据回填到历史记录表中
...
...
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/JgEnableDisableServiceImpl.java
View file @
6365f8e7
...
...
@@ -319,13 +319,6 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
TaskV2Model
taskV2Model
=
new
TaskV2Model
();
if
(
"0"
.
equals
(
operate
))
{
if
(
StringUtils
.
isEmpty
(
workflowResultDto
.
getNextExecutorRoleIds
()))
{
LambdaQueryWrapper
<
JgEnableDisableEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
id
);
JgEnableDisableEq
jgEnableDisableEq
=
jgEnableDisableEqMapper
.
selectOne
(
queryWrapper
);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgEnableDisableEq
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
jgEnableDisable
.
setPromoter
(
""
);
jgEnableDisable
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()));
// 上个代办改为已办
...
...
@@ -336,7 +329,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
taskMap
.
put
(
"flowStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
taskMap
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
taskMap
.
put
(
"model"
,
jgEnableDisable
);
taskV2Model
=
commonService
.
updateTaskModel
(
taskMap
);
commonService
.
updateTaskModel
(
taskMap
);
}
else
{
jgEnableDisable
.
setNextExecutorIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
if
(!
ObjectUtils
.
isEmpty
(
jgEnableDisable
.
getExecuteSequence
()))
{
...
...
@@ -414,11 +407,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
workDto
.
setResultCode
(
"approvalStatus"
);
workDto
.
setTaskId
(
jgEnableDisable
.
getNextTaskId
());
HashMap
<
String
,
Object
>
commMap
=
new
HashMap
<>();
if
(
jgEnableDisable
.
getAuditStatus
().
equals
(
"已驳回"
)
||
jgEnableDisable
.
getAuditStatus
().
equals
(
"已撤回"
))
{
commMap
.
put
(
"approvalStatus"
,
"提交"
);
}
else
{
commMap
.
put
(
"approvalStatus"
,
op
);
}
commMap
.
put
(
"approvalStatus"
,
op
);
workDto
.
setVariable
(
commMap
);
workDto
.
setComment
(
opinion
);
processTaskDTO
=
iCmWorkflowService
.
complete
(
jgEnableDisable
.
getNextTaskId
(),
workDto
);
...
...
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 @
6365f8e7
...
...
@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto
;
...
...
@@ -16,10 +15,11 @@ import com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.MaintenanceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintenanceContractService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.JgMaintenanceContractVo
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
...
...
@@ -78,10 +78,16 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
@Autowired
CommonServiceImpl
commonService
;
@Autowired
IJgInstallationNoticeService
jrmInstallationNoticeService
;
@Autowired
private
CommonMapper
commonMapper
;
/**
* 分页查询
*/
public
Page
<
JgMaintenanceContractVo
>
queryForPage
(
Page
<
JgMaintenanceContract
>
page
,
int
phase
,
public
Page
<
JgMaintenanceContractVo
>
queryForPage
(
Page
<
JgMaintenanceContract
>
page
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
JgMaintenanceContractDto
dto
=
new
JgMaintenanceContractDto
();
if
(
map
.
containsKey
(
"jgMaintenanceContractDto"
))
{
...
...
@@ -90,20 +96,44 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
Page
<
JgMaintenanceContractDto
>
contractList
=
new
Page
<>();
Page
<
JgMaintenanceContractVo
>
result
=
new
Page
<>();
CompanyBo
company
=
reginParams
.
getCompany
();
if
(
MaintenanceEnum
.
SHIYONG
.
getCode
().
equals
(
phase
))
{
//使用单位用"使用单位统一信用代码"匹配数据
dto
.
setUseUnitCode
(
company
.
getCompanyCode
())
;
dto
.
setRoleIds
(
null
);
co
ntractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
else
if
(
MaintenanceEnum
.
WEIBAO
.
getCode
().
equals
(
phase
))
{
//维保单位用"维保单位统一信用代码"匹配数据
dto
.
setMaintenanceUnitCode
(
company
.
getCompanyCode
()
);
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
else
if
(
MaintenanceEnum
.
JIANGUAN
.
getCode
().
equals
(
phase
))
{
Map
<
String
,
Object
>
companyTypeMap
=
jrmInstallationNoticeService
.
getCompanyType
();
String
companyLevel
=
""
;
String
companyType
=
""
;
if
(
companyTypeMap
.
containsKey
(
"companyLevel"
))
{
co
mpanyLevel
=
companyTypeMap
.
get
(
"companyLevel"
).
toString
(
);
}
if
(
companyTypeMap
.
containsKey
(
"companyType"
))
{
companyType
=
companyTypeMap
.
get
(
"companyType"
).
toString
(
);
}
if
(
"supervision"
.
equals
(
companyLevel
))
{
//监管单位用"接收机构统一使用代码"匹配
dto
.
setReceiveOrgCode
(
company
.
getCompanyCode
());
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
dto
.
setReceiveOrgCodeFilter
(
company
.
getCompanyCode
());
}
else
if
(
"company"
.
equals
(
companyLevel
))
{
if
(
companyType
.
contains
(
"use"
))
{
//使用单位用"使用单位统一信用代码"匹配数据
dto
.
setUseUnitCodeFilter
(
company
.
getCompanyCode
());
dto
.
setRoleIds
(
null
);
}
if
(
companyType
.
contains
(
"construction"
))
{
//维保单位用"维保单位统一信用代码"匹配数据
dto
.
setMaintenanceUnitCodeFilter
(
company
.
getCompanyCode
());
}
}
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
// if (MaintenanceEnum.SHIYONG.getCode().equals(phase)) {
// //使用单位用"使用单位统一信用代码"匹配数据
// dto.setUseUnitCode(company.getCompanyCode());
// dto.setRoleIds(null);
// contractList = maintenanceContractMapper.getContractList(page, dto);
// } else if (MaintenanceEnum.WEIBAO.getCode().equals(phase)) {
// //维保单位用"维保单位统一信用代码"匹配数据
// dto.setMaintenanceUnitCode(company.getCompanyCode());
// contractList = maintenanceContractMapper.getContractList(page, dto);
// } else if (MaintenanceEnum.JIANGUAN.getCode().equals(phase)) {
// //监管单位用"接收机构统一使用代码"匹配
// dto.setReceiveOrgCode(company.getCompanyCode());
// contractList = maintenanceContractMapper.getContractList(page, dto);
// }
BeanUtils
.
copyProperties
(
contractList
,
result
);
return
result
;
}
...
...
@@ -135,8 +165,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
try
{
JgMaintenanceContract
jgMaintenanceC
ontract
=
this
.
getBaseMapper
().
selectById
(
id
);
String
taskId
=
jgMaintenanceC
ontract
.
getNextTaskId
();
JgMaintenanceContract
c
ontract
=
this
.
getBaseMapper
().
selectById
(
id
);
String
taskId
=
c
ontract
.
getNextTaskId
();
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
...
...
@@ -144,7 +174,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
dto
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
if
(
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getReject
().
equals
(
jgMaintenanceContract
.
getStatus
())
||
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getRollBack
().
equals
(
jgMaintenanceContract
.
getStatus
()))
{
if
(
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getReject
().
equals
(
contract
.
getStatus
())
||
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getRollBack
().
equals
(
contract
.
getStatus
()))
{
map
.
put
(
"approvalStatus"
,
"提交"
);
}
dto
.
setVariable
(
map
);
...
...
@@ -154,7 +185,6 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
...
...
@@ -352,7 +382,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
}
else
{
// 有InstanceId,执行一步
ProcessTaskDTO
processTaskDTO
=
this
.
submit
(
"0"
,
contract
.
getNextTaskId
()
);
ProcessTaskDTO
processTaskDTO
=
this
.
submit
(
"0"
,
contract
);
String
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
String
taskName
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getName
();
this
.
buildRoleList
(
Collections
.
singletonList
(
processTaskDTO
),
roleListNext
,
roleListAll
);
...
...
@@ -376,16 +406,16 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
return
true
;
}
public
ProcessTaskDTO
submit
(
String
op
,
String
taskId
)
{
public
ProcessTaskDTO
submit
(
String
op
,
JgMaintenanceContract
contract
)
{
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setTaskId
(
contract
.
getNextTaskId
()
);
dto
.
setComment
(
"提交流程"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
dto
.
setVariable
(
map
);
return
workflowService
.
complete
(
taskId
,
dto
);
return
workflowService
.
complete
(
contract
.
getNextTaskId
()
,
dto
);
}
private
void
buildRoleList
(
List
<
ProcessTaskDTO
>
processTasks
,
List
<
String
>
roleListNext
,
List
<
String
>
roleListAll
)
{
...
...
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