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
ef1ca7ae
Commit
ef1ca7ae
authored
Jan 15, 2024
by
王果
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
维保备案列表合并接口修改
parent
e6ee03af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
34 deletions
+58
-34
JgMaintenanceContractDto.java
...amos/boot/module/jg/api/dto/JgMaintenanceContractDto.java
+11
-1
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+32
-22
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+15
-11
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 @
ef1ca7ae
...
...
@@ -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/JgMaintenanceContractMapper.xml
View file @
ef1ca7ae
...
...
@@ -133,28 +133,6 @@
<if
test=
"contractDto.useUnitName != '' and contractDto.useUnitName != null"
>
and use_unit_name like concat('%',#{contractDto.useUnitName},'%')
</if>
<choose>
<when
test=
"contractDto.useUnitCode != '' and contractDto.useUnitCode != null and
contractDto.maintenanceUnitCode != '' and contractDto.maintenanceUnitCode != null"
>
-- 同时有使用单位和维保单位用
and (use_unit_code = #{contractDto.useUnitCode}
or maintenance_unit_code = #{contractDto.maintenanceUnitCode})
</when>
<otherwise
>
-- 只有使用单位或者维保单位用,或者都没有
<if
test=
"contractDto.useUnitCode != '' and contractDto.useUnitCode != null"
>
and use_unit_code = #{contractDto.useUnitCode}
</if>
<if
test=
"contractDto.maintenanceUnitCode != '' and contractDto.maintenanceUnitCode != null"
>
and maintenance_unit_code = #{contractDto.maintenanceUnitCode}
</if>
</otherwise>
</choose>
-- 监管单位用
<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},'%')
...
...
@@ -163,6 +141,38 @@
<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>
<if
test=
"contractDto.maintenanceUnitCode != '' and contractDto.maintenanceUnitCode != null"
>
and maintenance_unit_code = #{contractDto.maintenanceUnitCode}
</if>
<if
test=
"contractDto.receiveOrgCode != '' and contractDto.receiveOrgCode != null"
>
and receive_org_code = #{contractDto.receiveOrgCode}
</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/service/impl/JgMaintenanceContractServiceImpl.java
View file @
ef1ca7ae
...
...
@@ -16,6 +16,7 @@ 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.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
;
...
...
@@ -80,6 +81,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
@Autowired
IJgInstallationNoticeService
jrmInstallationNoticeService
;
@Autowired
private
CommonMapper
commonMapper
;
/**
* 分页查询
*/
...
...
@@ -103,16 +107,16 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
if
(
"supervision"
.
equals
(
companyLevel
))
{
//监管单位用"接收机构统一使用代码"匹配
dto
.
setReceiveOrgCode
(
company
.
getCompanyCode
());
dto
.
setReceiveOrgCode
Filter
(
company
.
getCompanyCode
());
}
else
if
(
"company"
.
equals
(
companyLevel
))
{
if
(
companyType
.
contains
(
"use"
))
{
//使用单位用"使用单位统一信用代码"匹配数据
dto
.
setUseUnitCode
(
company
.
getCompanyCode
());
dto
.
setUseUnitCode
Filter
(
company
.
getCompanyCode
());
dto
.
setRoleIds
(
null
);
}
if
(
companyType
.
contains
(
"construction"
))
{
//维保单位用"维保单位统一信用代码"匹配数据
dto
.
setMaintenanceUnitCode
(
company
.
getCompanyCode
());
dto
.
setMaintenanceUnitCode
Filter
(
company
.
getCompanyCode
());
}
}
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
...
...
@@ -161,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"
);
...
...
@@ -170,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
);
...
...
@@ -180,7 +185,6 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
/**
...
...
@@ -378,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
);
...
...
@@ -402,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