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
22eaaef0
Commit
22eaaef0
authored
Apr 25, 2022
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交隐患导入
parent
d13f0a47
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
59 additions
and
11 deletions
+59
-11
LatentDangerController.java
...entdanger/business/controller/LatentDangerController.java
+8
-1
LatentDangerMapper.java
.../latentdanger/business/dao/mapper/LatentDangerMapper.java
+2
-0
LatentDangerServiceImpl.java
...danger/business/service/impl/LatentDangerServiceImpl.java
+12
-0
ILatentDangerService.java
...ntdanger/business/service/intfc/ILatentDangerService.java
+2
-0
DangerFeignClient.java
...in/amos/supervision/business/feign/DangerFeignClient.java
+17
-9
PlanAuditServiceImpl.java
...pervision/business/service/impl/PlanAuditServiceImpl.java
+6
-1
LatentDangerMapper.xml
...anger/src/main/resources/db/mapper/LatentDangerMapper.xml
+12
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/controller/LatentDangerController.java
View file @
22eaaef0
...
...
@@ -32,6 +32,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -401,5 +402,11 @@ public class LatentDangerController extends BaseController {
String
loginOrgCode
=
getOrgCode
(
reginParams
);
return
ResponseHelper
.
buildResponse
(
iLatentDangerService
.
currentLandgerCount
(
null
,
loginOrgCode
));
}
@ApiOperation
(
value
=
"修改隐患状态"
,
notes
=
"修改隐患状态"
)
@GetMapping
(
value
=
"/web/updateStatusByUserIdAndPlandIdLike/{userId}/{plandId}"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
updateStatusByUserIdAndPlandIdLike
(
@PathVariable
String
userId
,
@PathVariable
String
plandId
)
{
iLatentDangerService
.
updateStatusByUserIdAndPlandIdLike
(
userId
,
plandId
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/dao/mapper/LatentDangerMapper.java
View file @
22eaaef0
...
...
@@ -88,4 +88,6 @@ public interface LatentDangerMapper extends BaseMapper<LatentDanger> {
Integer
selectUnFinishedCountByParam
(
@Param
(
"bizType"
)
String
bizType
,
@Param
(
"dangerState"
)
List
<
String
>
dangerState
,
String
orgCode
);
List
<
LatentDanger
>
updateStatusByUserIdAndPlandIdLike
(
String
userId
,
String
planId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/impl/LatentDangerServiceImpl.java
View file @
22eaaef0
...
...
@@ -2596,4 +2596,15 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
resultMap
.
put
(
"count"
,
count
);
return
resultMap
;
}
public
void
updateStatusByUserIdAndPlandIdLike
(
String
userId
,
String
plandId
){
String
plandId1
=
"planId\""
+
":"
+
"\""
+
plandId
;
List
<
LatentDanger
>
list
=
latentDangerMapper
.
updateStatusByUserIdAndPlandIdLike
(
userId
,
plandId1
);
list
.
stream
().
forEach
(
i
->{
i
.
setDangerState
(
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getCode
());
i
.
setDangerStateName
(
LatentDangerState
.
SupervisionDangerStateEnum
.
提交隐患
.
getName
());
});
this
.
saveOrUpdateBatch
(
list
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-latentdanger-biz/src/main/java/com/yeejoin/amos/latentdanger/business/service/intfc/ILatentDangerService.java
View file @
22eaaef0
...
...
@@ -194,4 +194,6 @@ public interface ILatentDangerService {
Map
<
String
,
Integer
>
getUnFinishedDangerCountMap
(
String
loginOrgCode
);
public
Map
<
String
,
Integer
>
currentLandgerCount
(
String
companyId
,
String
loginOrgCode
);
void
updateStatusByUserIdAndPlandIdLike
(
String
userId
,
String
planId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/feign/DangerFeignClient.java
View file @
22eaaef0
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
feign
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.amos.supervision.core.common.dto.CheckReportDangerDto
;
import
com.yeejoin.amos.supervision.core.common.dto.DangerDto
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author DELL
...
...
@@ -95,4 +99,8 @@ public interface DangerFeignClient {
FeignClientResult
<
Map
<
String
,
List
<
CheckReportDangerDto
>>>
getReviewInfoList
(
@RequestParam
String
orgCode
,
@RequestParam
String
t1
,
@RequestParam
String
t2
);
@GetMapping
(
value
=
"/web/updateStatusByUserIdAndPlandIdLike/{userId}/{plandId}"
)
public
ResponseModel
<
Object
>
updateStatusByUserIdAndPlandIdLike
(
@PathVariable
String
userId
,
@PathVariable
String
plandId
)
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanAuditServiceImpl.java
View file @
22eaaef0
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanAuditDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanAuditLogDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanDao
;
import
com.yeejoin.amos.supervision.business.feign.DangerFeignClient
;
import
com.yeejoin.amos.supervision.business.feign.JCSFeignClient
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanAuditService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanTaskService
;
...
...
@@ -55,6 +56,8 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
JCSFeignClient
jcsFeignClient
;
@Autowired
IPlanTaskService
planTaskService
;
@Autowired
DangerFeignClient
latentDangerFeignClient
;
@Override
@Transactional
public
Boolean
auditWorkFlow
(
PlanAuditLog
planAuditLog
,
Integer
status
,
String
condition
,
ReginParams
reginParams
)
throws
Exception
{
...
...
@@ -86,10 +89,12 @@ public class PlanAuditServiceImpl implements IPlanAuditService {
planAuditLog
.
setFlowJson
(
condition
);
planAuditLog
.
setRoleName
(
roleName
);
planAuditLogDao
.
save
(
planAuditLog
);
if
(
"导入外部监查隐患"
.
equals
(
planAuditLog
.
getFlowTaskName
()))
{
if
(
"导入外部监查隐患"
.
equals
(
planAuditLog
.
getFlowTaskName
())
&&
plan
.
getCheckLevel
().
equals
(
"3"
))
{
latentDangerFeignClient
.
updateStatusByUserIdAndPlandIdLike
(
userId
,
planAuditLog
.
getPlanId
().
toString
());
planTaskService
.
taskExecutionImportPlan
(
planAuditLog
.
getPlanId
());
}
planService
.
getUserIdsByWorkflow
(
plan
,
instanceId
,
status
,
planAuditLog
.
getExcuteState
());
return
Boolean
.
TRUE
;
}
}
...
...
amos-boot-system-latentdanger/src/main/resources/db/mapper/LatentDangerMapper.xml
View file @
22eaaef0
...
...
@@ -1080,4 +1080,15 @@
</foreach>
</if>
</select>
<select
id=
"updateStatusByUserIdAndPlandIdLike"
resultType=
"com.yeejoin.amos.latentdanger.dao.entity.LatentDanger"
>
SELECT
*
FROM
p_latent_danger
WHERE
(
discoverer_user_id = #{userId}
AND biz_info LIKE concat('%',#{planId},'%')
)
</select>
</mapper>
\ 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