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
d46829d0
Commit
d46829d0
authored
Nov 12, 2021
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消防巡查隐患优化-指定隐患治理人
parent
c4158d0d
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
89 additions
and
30 deletions
+89
-30
LatentDangerController.java
...os/patrol/business/controller/LatentDangerController.java
+19
-23
FeignBasicAuthRequestInterceptor.java
...trol/business/feign/FeignBasicAuthRequestInterceptor.java
+5
-1
FeignConfiguration.java
...eejoin/amos/patrol/business/feign/FeignConfiguration.java
+4
-3
JcsFeignClient.java
...om/yeejoin/amos/patrol/business/feign/JcsFeignClient.java
+23
-0
LatentDangerExcuteParam.java
...n/amos/patrol/business/param/LatentDangerExcuteParam.java
+4
-0
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+30
-2
application.properties
...t-system-patrol/src/main/resources/application.properties
+3
-0
pom.xml
pom.xml
+1
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/LatentDangerController.java
View file @
d46829d0
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
controller
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
controller
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.ObjectUtils
;
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
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.RoleBo
;
import
com.yeejoin.amos.boot.biz.common.bo.RoleBo
;
...
@@ -38,10 +17,28 @@ import com.yeejoin.amos.patrol.business.util.FileHelper;
...
@@ -38,10 +17,28 @@ import com.yeejoin.amos.patrol.business.util.FileHelper;
import
com.yeejoin.amos.patrol.business.vo.DangerTimeAxisVo
;
import
com.yeejoin.amos.patrol.business.vo.DangerTimeAxisVo
;
import
com.yeejoin.amos.patrol.common.enums.DictTypeEnum
;
import
com.yeejoin.amos.patrol.common.enums.DictTypeEnum
;
import
com.yeejoin.amos.patrol.core.common.response.DangerListResponse
;
import
com.yeejoin.amos.patrol.core.common.response.DangerListResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.util.ObjectUtils
;
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
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Date
;
import
java.util.List
;
@RestController
@RestController
@RequestMapping
(
value
=
"/api/latent/danger"
)
@RequestMapping
(
value
=
"/api/latent/danger"
)
...
@@ -139,7 +136,6 @@ public class LatentDangerController extends AbstractBaseController {
...
@@ -139,7 +136,6 @@ public class LatentDangerController extends AbstractBaseController {
}
}
return
iLatentDangerService
.
detail
(
id
,
user
.
getUserId
(),
isFinish
);
return
iLatentDangerService
.
detail
(
id
,
user
.
getUserId
(),
isFinish
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"隐患详情异常"
,
e
.
getMessage
());
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
return
CommonResponseUtil
.
failure
(
"系统繁忙,请稍后再试"
);
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/feign/FeignBasicAuthRequestInterceptor.java
View file @
d46829d0
...
@@ -23,7 +23,11 @@ public class FeignBasicAuthRequestInterceptor implements RequestInterceptor {
...
@@ -23,7 +23,11 @@ public class FeignBasicAuthRequestInterceptor implements RequestInterceptor {
HttpServletRequest
request
=
attributes
.
getRequest
();
HttpServletRequest
request
=
attributes
.
getRequest
();
//设置header
//设置header
String
token
=
request
.
getHeader
(
"X-Access-Token"
);
String
token
=
request
.
getHeader
(
"token"
);
if
(
null
==
token
)
{
token
=
request
.
getHeader
(
"X-Access-Token"
);
}
String
product
=
request
.
getHeader
(
"product"
);
String
product
=
request
.
getHeader
(
"product"
);
String
appKey
=
request
.
getHeader
(
"appKey"
);
String
appKey
=
request
.
getHeader
(
"appKey"
);
template
.
header
(
"token"
,
token
);
template
.
header
(
"token"
,
token
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/feign/FeignConfiguration.java
View file @
d46829d0
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
feign
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
feign
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
import
org.springframework.beans.factory.ObjectFactory
;
import
org.springframework.beans.factory.ObjectFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
import
org.springframework.boot.autoconfigure.http.HttpMessageConverters
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
feign.codec.Encoder
;
import
feign.form.spring.SpringFormEncoder
;
public
class
FeignConfiguration
{
public
class
FeignConfiguration
{
@Autowired
@Autowired
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
private
ObjectFactory
<
HttpMessageConverters
>
messageConverters
;
@Bean
@Bean
public
Encoder
feignFormEncoder
()
{
public
Encoder
feignFormEncoder
()
{
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
return
new
SpringFormEncoder
(
new
SpringEncoder
(
messageConverters
));
}
}
@Bean
@Bean
public
FeignBasicAuthRequestInterceptor
basicAuthRequestInterceptor
()
{
public
FeignBasicAuthRequestInterceptor
basicAuthRequestInterceptor
()
{
return
new
FeignBasicAuthRequestInterceptor
();
return
new
FeignBasicAuthRequestInterceptor
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/feign/JcsFeignClient.java
0 → 100644
View file @
d46829d0
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
feign
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
// 机场服务
@FeignClient
(
name
=
"${jcs.fegin.name}"
,
path
=
"jcs"
,
configuration
=
FeignConfiguration
.
class
)
public
interface
JcsFeignClient
{
/**
* 根据机场人员id获取amos平台人员id
*
* @param orgUserId 机场单位人员id
* @return AgencyUserModel 平台人员信息
**/
@RequestMapping
(
value
=
"/org-usr/amos/{orgUserId}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
AgencyUserModel
>
getAmosIdByUserId
(
@PathVariable
String
orgUserId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/param/LatentDangerExcuteParam.java
View file @
d46829d0
...
@@ -49,5 +49,9 @@ public class LatentDangerExcuteParam {
...
@@ -49,5 +49,9 @@ public class LatentDangerExcuteParam {
private
Integer
dangerLevel
;
private
Integer
dangerLevel
;
/**
* 治理人员id
*/
public
String
governUserId
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
d46829d0
...
@@ -9,6 +9,7 @@ import com.google.common.collect.Maps;
...
@@ -9,6 +9,7 @@ import com.google.common.collect.Maps;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.bo.RoleBo
;
import
com.yeejoin.amos.boot.biz.common.bo.RoleBo
;
import
com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
import
com.yeejoin.amos.patrol.business.constants.XJConstant
;
...
@@ -35,6 +36,7 @@ import com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerNotice
...
@@ -35,6 +36,7 @@ import com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerNotice
import
com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerPatrolBo
;
import
com.yeejoin.amos.patrol.business.entity.mybatis.extend.LatentDangerPatrolBo
;
import
com.yeejoin.amos.patrol.business.feign.Business
;
import
com.yeejoin.amos.patrol.business.feign.Business
;
import
com.yeejoin.amos.patrol.business.feign.EquipFeign
;
import
com.yeejoin.amos.patrol.business.feign.EquipFeign
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.patrol.business.param.LatentDangerExcuteParam
;
import
com.yeejoin.amos.patrol.business.param.LatentDangerExcuteParam
;
import
com.yeejoin.amos.patrol.business.param.LatentDangerListParam
;
import
com.yeejoin.amos.patrol.business.param.LatentDangerListParam
;
import
com.yeejoin.amos.patrol.business.param.LatentDangerNormalParam
;
import
com.yeejoin.amos.patrol.business.param.LatentDangerNormalParam
;
...
@@ -169,6 +171,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -169,6 +171,12 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
@Autowired
@Autowired
EquipFeign
equipFeign
;
EquipFeign
equipFeign
;
@Autowired
JcsFeignClient
jcsFeignClient
;
@Autowired
private
WorkflowExcuteServiceImpl
workflowExecuteService
;
private
static
final
String
permissionType
=
"SUBMENU"
;
private
static
final
String
permissionType
=
"SUBMENU"
;
private
static
final
String
acctivePermissionType
=
"activitiItem"
;
private
static
final
String
acctivePermissionType
=
"activitiItem"
;
...
@@ -731,12 +739,16 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -731,12 +739,16 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
@Override
@Override
public
CommonResponse
detail
(
String
id
,
String
userId
,
boolean
isFinish
)
{
public
CommonResponse
detail
(
String
id
,
String
userId
,
boolean
isFinish
)
{
JSONObject
jsonObject
;
JSONObject
jsonObject
;
if
(
isFinish
)
{
if
(
isFinish
)
{
jsonObject
=
remoteWorkFlowService
.
queryFinishTaskDetail
(
id
);
jsonObject
=
remoteWorkFlowService
.
queryFinishTaskDetail
(
id
);
}
else
{
}
else
{
jsonObject
=
remoteWorkFlowService
.
queryTaskDetail
(
id
);
jsonObject
=
remoteWorkFlowService
.
queryTaskDetail
(
id
);
}
}
if
(
ValidationUtil
.
isEmpty
(
jsonObject
))
{
return
null
;
}
JSONObject
task
=
jsonObject
.
getJSONObject
(
"data"
);
JSONObject
task
=
jsonObject
.
getJSONObject
(
"data"
);
LatentDangerBo
latentDangerBo
=
latentDangerMapper
.
getbyBusinessKey
(
task
.
getString
(
"businessKey"
));
LatentDangerBo
latentDangerBo
=
latentDangerMapper
.
getbyBusinessKey
(
task
.
getString
(
"businessKey"
));
...
@@ -1184,6 +1196,18 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -1184,6 +1196,18 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
String
departmentName
,
String
departmentName
,
DangerExecuteSubmitDto
executeSubmitDto
,
DangerExecuteSubmitDto
executeSubmitDto
,
RoleBo
role
)
{
RoleBo
role
)
{
String
governUserId
=
null
;
if
(
executeTypeEnum
.
equals
(
LatentDangerExcuteTypeEnum
.
隐患评审通过
))
{
// 消防巡查需求:评审通过后指定治理人
// 1.获取治理人员对应的amos平台人员
AgencyUserModel
userModel
=
jcsFeignClient
.
getAmosIdByUserId
(
param
.
getGovernUserId
()).
getResult
();
governUserId
=
userModel
.
getUserName
();
if
(
ValidationUtil
.
isEmpty
(
userModel
))
{
executeSubmitDto
.
setIsOk
(
false
);
executeSubmitDto
.
setMsg
(
"治理人员指定失败"
);
return
executeSubmitDto
;
}
}
JSONObject
executeJson
=
remoteWorkFlowService
.
execute
(
param
.
getTaskId
(),
executeTypeEnum
.
getRequestBody
());
JSONObject
executeJson
=
remoteWorkFlowService
.
execute
(
param
.
getTaskId
(),
executeTypeEnum
.
getRequestBody
());
if
(
executeJson
==
null
)
{
if
(
executeJson
==
null
)
{
executeSubmitDto
.
setIsOk
(
false
);
executeSubmitDto
.
setIsOk
(
false
);
...
@@ -1225,6 +1249,10 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
...
@@ -1225,6 +1249,10 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
if
(
executeTypeEnum
.
equals
(
LatentDangerExcuteTypeEnum
.
隐患评审通过
))
{
if
(
executeTypeEnum
.
equals
(
LatentDangerExcuteTypeEnum
.
隐患评审通过
))
{
latentDangerBo
.
setReformLimitDate
(
DateUtil
.
str2Date
(
param
.
getReformLimitDate
(),
DateUtil
.
DATETIME_DEFAULT_FORMAT
));
latentDangerBo
.
setReformLimitDate
(
DateUtil
.
str2Date
(
param
.
getReformLimitDate
(),
DateUtil
.
DATETIME_DEFAULT_FORMAT
));
latentDangerBo
.
setDangerLevel
(
param
.
getDangerLevel
().
toString
());
latentDangerBo
.
setDangerLevel
(
param
.
getDangerLevel
().
toString
());
// 消防巡查需求:评审通过后制定治理人
// 2.指定治理执行人
workflowExecuteService
.
setTaskAssign
(
latentDangerBo
.
getInstanceId
(),
governUserId
);
}
}
}
}
if
(
executeTypeEnum
.
equals
(
LatentDangerExcuteTypeEnum
.
隐患延期治理车间部门审核通过
))
{
if
(
executeTypeEnum
.
equals
(
LatentDangerExcuteTypeEnum
.
隐患延期治理车间部门审核通过
))
{
...
...
amos-boot-system-patrol/src/main/resources/application.properties
View file @
d46829d0
...
@@ -54,3 +54,5 @@ redis.cache.failure.time=10800
...
@@ -54,3 +54,5 @@ redis.cache.failure.time=10800
rule.definition.load
=
false
rule.definition.load
=
false
rule.definition.model-package
=
com.yeejoin.amos.patrol.business.entity.mybatis
rule.definition.model-package
=
com.yeejoin.amos.patrol.business.entity.mybatis
rule.definition.default-agency
=
STATE_GRID
rule.definition.default-agency
=
STATE_GRID
jcs.fegin.name
=
JCS-tb
\ No newline at end of file
pom.xml
View file @
d46829d0
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<springcloud.version>
Hoxton.SR8
</springcloud.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<maven-jar-plugin.version>
3.1.1
</maven-jar-plugin.version>
<tyboot-version>
1.1.20
</tyboot-version>
<tyboot-version>
1.1.20
</tyboot-version>
<amos.version>
1.6.
3
-SNAPSHOT
</amos.version>
<amos.version>
1.6.
5
-SNAPSHOT
</amos.version>
<itext.version>
7.1.1
</itext.version>
<itext.version>
7.1.1
</itext.version>
</properties>
</properties>
...
...
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