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
0adfe355
Commit
0adfe355
authored
Aug 08, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jyjc): 报检开发调整
1.报检规则4.0开发
parent
73cc8215
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
231 additions
and
109 deletions
+231
-109
JyjcInspectionApplicationDto.java
...mos/boot/biz/common/dto/JyjcInspectionApplicationDto.java
+6
-0
JyjcInspectionApplication.java
...oot/module/jyjc/api/entity/JyjcInspectionApplication.java
+21
-0
JYJCTypeEnum.java
...yeejoin/amos/boot/module/jyjc/api/enums/JYJCTypeEnum.java
+2
-1
InspectionEquipInfoModel.java
.../boot/module/jyjc/api/model/InspectionEquipInfoModel.java
+12
-0
JyjcInspectionApplicationModel.java
...module/jyjc/api/model/JyjcInspectionApplicationModel.java
+14
-0
InspectionRuleEnableConfig.java
...ot/module/jyjc/biz/config/InspectionRuleEnableConfig.java
+5
-0
IRuleDataPrepare.java
...oin/amos/boot/module/jyjc/biz/event/IRuleDataPrepare.java
+7
-0
InspectionOrgRefreshEvent.java
...boot/module/jyjc/biz/event/InspectionOrgRefreshEvent.java
+1
-1
DataPreparationAdapterListener.java
...jc/biz/event/listener/DataPreparationAdapterListener.java
+38
-0
DisableRuleDataPrepareHandler.java
...le/jyjc/biz/event/rule/DisableRuleDataPrepareHandler.java
+24
-0
EnableRuleDataPrepareHandler.java
...ule/jyjc/biz/event/rule/EnableRuleDataPrepareHandler.java
+24
-0
RuleDataPrepareHandlerFactory.java
...le/jyjc/biz/event/rule/RuleDataPrepareHandlerFactory.java
+28
-0
DisableRuleDataPreparationService.java
...event/rule/service/DisableRuleDataPreparationService.java
+7
-27
EnableRuleDataPreparationService.java
.../event/rule/service/EnableRuleDataPreparationService.java
+20
-67
InspectionOrgRefreshListener.java
...odule/jyjc/biz/listener/InspectionOrgRefreshListener.java
+4
-3
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+0
-0
RuleCommonServiceImpl.java
...t/module/jyjc/biz/service/impl/RuleCommonServiceImpl.java
+15
-8
application-dev.properties
...le-jyjc-biz/src/main/resources/application-dev.properties
+1
-0
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+2
-2
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/dto/JyjcInspectionApplicationDto.java
View file @
0adfe355
...
@@ -169,6 +169,12 @@ public class JyjcInspectionApplicationDto extends BaseModel {
...
@@ -169,6 +169,12 @@ public class JyjcInspectionApplicationDto extends BaseModel {
@ApiModelProperty
(
value
=
"区域信息"
)
@ApiModelProperty
(
value
=
"区域信息"
)
private
String
cityCode
;
private
String
cityCode
;
@ApiModelProperty
(
value
=
"地市"
)
private
String
city
;
@ApiModelProperty
(
value
=
"区县"
)
private
String
county
;
public
String
getProcessInstanceId
()
{
public
String
getProcessInstanceId
()
{
return
this
.
instanceId
!=
null
?
this
.
instanceId
:
this
.
processInstanceId
;
return
this
.
instanceId
!=
null
?
this
.
instanceId
:
this
.
processInstanceId
;
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/entity/JyjcInspectionApplication.java
View file @
0adfe355
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler
;
import
com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.InspectionPlanModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.InspectionPlanModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -46,12 +47,32 @@ public class JyjcInspectionApplication extends BaseEntity {
...
@@ -46,12 +47,32 @@ public class JyjcInspectionApplication extends BaseEntity {
private
String
equipClassify
;
private
String
equipClassify
;
/**
/**
* 地市
*/
@TableField
(
"city"
)
private
String
city
;
/**
* 区县
*/
@TableField
(
"county"
)
private
String
county
;
/**
* 设备类别code
* 设备类别code
*/
*/
@TableField
(
"equ_category"
)
@TableField
(
"equ_category"
)
private
String
equCategory
;
private
String
equCategory
;
/**
/**
* 设备品种code
*/
@TableField
(
"equ_define"
)
private
String
equDefine
;
/**
* 报检单号
* 报检单号
*/
*/
@TableField
(
"application_no"
)
@TableField
(
"application_no"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/enums/JYJCTypeEnum.java
View file @
0adfe355
...
@@ -25,7 +25,8 @@ public enum JYJCTypeEnum {
...
@@ -25,7 +25,8 @@ public enum JYJCTypeEnum {
SCJY
(
"SCJY"
,
"首次检验"
,
"jy"
,
BizTypeEnum
.
FIRST_INSPECTION
.
getCode
()),
SCJY
(
"SCJY"
,
"首次检验"
,
"jy"
,
BizTypeEnum
.
FIRST_INSPECTION
.
getCode
()),
DQJY
(
"DQJY"
,
"定期检验"
,
"jy"
,
BizTypeEnum
.
FIRST_INSPECTION
.
getCode
()),
DQJY
(
"DQJY"
,
"定期检验"
,
"jy"
,
BizTypeEnum
.
FIRST_INSPECTION
.
getCode
()),
WTJY
(
"WTJY"
,
"委托检验"
,
"jy"
,
BizTypeEnum
.
ENTRUST
.
getCode
()),
WTJY
(
"WTJY"
,
"委托检验"
,
"jy"
,
BizTypeEnum
.
ENTRUST
.
getCode
()),
DTJC
(
"DTJC"
,
"电梯检测"
,
"jc"
,
BizTypeEnum
.
DETECTION
.
getCode
());
DTJC
(
"DTJC"
,
"电梯检测"
,
"jc"
,
BizTypeEnum
.
DETECTION
.
getCode
()),
DQRBI
(
"DQRBI"
,
"基于风险RBI"
,
"jy"
,
BizTypeEnum
.
FIRST_INSPECTION
.
getCode
());
private
final
String
code
;
private
final
String
code
;
private
final
String
name
;
private
final
String
name
;
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/InspectionEquipInfoModel.java
View file @
0adfe355
...
@@ -23,9 +23,21 @@ public class InspectionEquipInfoModel implements Serializable {
...
@@ -23,9 +23,21 @@ public class InspectionEquipInfoModel implements Serializable {
@ApiModelProperty
(
value
=
"申请表主键"
)
@ApiModelProperty
(
value
=
"申请表主键"
)
private
String
appSeq
;
private
String
appSeq
;
@ApiModelProperty
(
value
=
"设备种类"
)
private
String
equList
;
@ApiModelProperty
(
value
=
"设备类别"
)
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equCategory
;
private
String
equCategory
;
@ApiModelProperty
(
value
=
"设备品种"
)
private
String
equDefine
;
@ApiModelProperty
(
value
=
"地市"
)
private
String
city
;
@ApiModelProperty
(
value
=
"区县"
)
private
String
county
;
@ApiModelProperty
(
value
=
"主题,无需上送,由topic解析出来"
)
@ApiModelProperty
(
value
=
"主题,无需上送,由topic解析出来"
)
private
String
componentKey
;
private
String
componentKey
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionApplicationModel.java
View file @
0adfe355
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
model
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
model
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -154,6 +155,12 @@ public class JyjcInspectionApplicationModel extends BaseModel {
...
@@ -154,6 +155,12 @@ public class JyjcInspectionApplicationModel extends BaseModel {
@ApiModelProperty
(
value
=
"设备类别code"
)
@ApiModelProperty
(
value
=
"设备类别code"
)
private
String
equCategory
;
private
String
equCategory
;
/**
* 设备品种code
*/
@TableField
(
"equ_define"
)
private
String
equDefine
;
@ApiModelProperty
(
value
=
"监管码"
)
@ApiModelProperty
(
value
=
"监管码"
)
private
String
supervisoryCode
;
private
String
supervisoryCode
;
...
@@ -170,6 +177,13 @@ public class JyjcInspectionApplicationModel extends BaseModel {
...
@@ -170,6 +177,13 @@ public class JyjcInspectionApplicationModel extends BaseModel {
@ApiModelProperty
(
value
=
"计划下发日期,统计办理时效使用,来源JyjcInspectionApplication.planCreateDate"
)
@ApiModelProperty
(
value
=
"计划下发日期,统计办理时效使用,来源JyjcInspectionApplication.planCreateDate"
)
private
Date
planCreateDate
;
private
Date
planCreateDate
;
@ApiModelProperty
(
value
=
"地市"
)
private
String
city
;
@ApiModelProperty
(
value
=
"区县"
)
private
String
county
;
/**
/**
* 是否必须处理: true-必须处理,false-可不予受理
* 是否必须处理: true-必须处理,false-可不予受理
*/
*/
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/config/InspectionRuleEnableConfig.java
View file @
0adfe355
...
@@ -45,6 +45,11 @@ public class InspectionRuleEnableConfig {
...
@@ -45,6 +45,11 @@ public class InspectionRuleEnableConfig {
*/
*/
private
Boolean
DTJC
;
private
Boolean
DTJC
;
/**
* 委托检验是否启用规则:true-启用,false-不启用
*/
private
Boolean
WTJY
;
public
Object
getValueByFieldName
(
String
fieldName
){
public
Object
getValueByFieldName
(
String
fieldName
){
Field
field
=
null
;
Field
field
=
null
;
try
{
try
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/IRuleDataPrepare.java
0 → 100644
View file @
0adfe355
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
;
public
interface
IRuleDataPrepare
{
Boolean
supportType
();
void
handle
(
InspectionOrgRefreshEvent
event
);
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/InspectionOrgRefreshEvent.java
View file @
0adfe355
...
@@ -10,7 +10,7 @@ import org.springframework.context.ApplicationEvent;
...
@@ -10,7 +10,7 @@ import org.springframework.context.ApplicationEvent;
@Getter
@Getter
public
class
InspectionOrgRefreshEvent
extends
ApplicationEvent
{
public
class
InspectionOrgRefreshEvent
extends
ApplicationEvent
{
private
InspectionEquipInfoModel
inspectionEquipInfoModel
;
private
final
InspectionEquipInfoModel
inspectionEquipInfoModel
;
/**
/**
* Create a new {@code ApplicationEvent}.
* Create a new {@code ApplicationEvent}.
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/listener/DataPreparationAdapterListener.java
0 → 100644
View file @
0adfe355
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
listener
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.InspectionEquipInfoModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.InspectionRuleEnableConfig
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionOrgRefreshEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.rule.RuleDataPrepareHandlerFactory
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.stereotype.Component
;
@Component
@RequiredArgsConstructor
@Slf4j
public
class
DataPreparationAdapterListener
implements
ApplicationListener
<
InspectionOrgRefreshEvent
>
{
private
final
InspectionRuleEnableConfig
inspectionRuleEnableConfig
;
private
final
RuleDataPrepareHandlerFactory
handlerFactory
;
@Override
public
void
onApplicationEvent
(
InspectionOrgRefreshEvent
event
)
{
InspectionEquipInfoModel
equipInfoModel
=
event
.
getInspectionEquipInfoModel
();
Boolean
enable
=
this
.
getEnableState
(
equipInfoModel
.
getInspectionType
());
handlerFactory
.
getRuleDataPrepare
(
enable
).
handle
(
event
);
}
/**
* 按照检验类型判断是否启用, 不配置时默认不启用
*
* @param inspectionType 检验类型枚举 @see JYJCTypeEnum
* @return true-启用规则,false-不启用
*/
private
boolean
getEnableState
(
String
inspectionType
)
{
return
inspectionRuleEnableConfig
.
getValueByFieldName
(
inspectionType
)
!=
null
&&
(
Boolean
)
inspectionRuleEnableConfig
.
getValueByFieldName
(
inspectionType
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/rule/DisableRuleDataPrepareHandler.java
0 → 100644
View file @
0adfe355
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
rule
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.IRuleDataPrepare
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionOrgRefreshEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.rule.service.DisableRuleDataPreparationService
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Component
;
@Component
@RequiredArgsConstructor
public
class
DisableRuleDataPrepareHandler
implements
IRuleDataPrepare
{
private
final
DisableRuleDataPreparationService
preparationService
;
@Override
public
Boolean
supportType
()
{
return
false
;
}
@Override
public
void
handle
(
InspectionOrgRefreshEvent
event
)
{
preparationService
.
onApplicationEvent
(
event
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/rule/EnableRuleDataPrepareHandler.java
0 → 100644
View file @
0adfe355
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
rule
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.IRuleDataPrepare
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionOrgRefreshEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.rule.service.EnableRuleDataPreparationService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
@Component
@Slf4j
@RequiredArgsConstructor
public
class
EnableRuleDataPrepareHandler
implements
IRuleDataPrepare
{
private
final
EnableRuleDataPreparationService
preparationService
;
@Override
public
Boolean
supportType
()
{
return
true
;
}
@Override
public
void
handle
(
InspectionOrgRefreshEvent
event
)
{
preparationService
.
onApplicationEvent
(
event
);
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/rule/RuleDataPrepareHandlerFactory.java
0 → 100644
View file @
0adfe355
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
rule
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.IRuleDataPrepare
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
@Component
@RequiredArgsConstructor
public
class
RuleDataPrepareHandlerFactory
{
private
final
List
<
IRuleDataPrepare
>
ruleDataPrepares
;
private
final
Map
<
Boolean
,
IRuleDataPrepare
>
ruleDataPrepareMap
=
new
ConcurrentHashMap
<>();
public
IRuleDataPrepare
getRuleDataPrepare
(
Boolean
enable
)
{
return
ruleDataPrepareMap
.
computeIfAbsent
(
enable
,
k
->
{
for
(
IRuleDataPrepare
ruleDataPrepare
:
ruleDataPrepares
)
{
if
(
ruleDataPrepare
.
supportType
().
equals
(
enable
))
{
return
ruleDataPrepare
;
}
}
throw
new
BadRequest
(
"not found handler for "
+
enable
);
});
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/
listener/DisableRuleDataPreparationListener
.java
→
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/
rule/service/DisableRuleDataPreparationService
.java
View file @
0adfe355
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
listener
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
rule
.
service
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.JYJCTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.JYJCTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.OpenBizTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.OpenBizTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.InspectionEquipInfoModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.InspectionEquipInfoModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.InspectionRuleEnableConfig
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionOrgRefreshEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionOrgRefreshEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.RuleCommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.RuleCommonServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 不启用规则时,业务处理
* 不启用规则时,业务处理
*
* @author Administrator
* @author Administrator
*/
*/
@Component
@Component
@Slf4j
@Slf4j
public
class
DisableRuleDataPreparationListener
implements
ApplicationListener
<
InspectionOrgRefreshEvent
>
{
@RequiredArgsConstructor
public
class
DisableRuleDataPreparationService
{
private
InspectionRuleEnableConfig
inspectionRuleEnableConfig
;
private
RuleCommonServiceImpl
ruleCommonService
;
private
final
RuleCommonServiceImpl
ruleCommonService
;
private
RedisUtils
redisUtils
;
private
final
RedisUtils
redisUtils
;
public
DisableRuleDataPreparationListener
(
InspectionRuleEnableConfig
inspectionRuleEnableConfig
,
RuleCommonServiceImpl
ruleCommonService
,
RedisUtils
redisUtils
)
{
this
.
inspectionRuleEnableConfig
=
inspectionRuleEnableConfig
;
this
.
ruleCommonService
=
ruleCommonService
;
this
.
redisUtils
=
redisUtils
;
}
@Override
public
void
onApplicationEvent
(
InspectionOrgRefreshEvent
event
)
{
public
void
onApplicationEvent
(
InspectionOrgRefreshEvent
event
)
{
InspectionEquipInfoModel
equipInfoModel
=
event
.
getInspectionEquipInfoModel
();
InspectionEquipInfoModel
equipInfoModel
=
event
.
getInspectionEquipInfoModel
();
String
componentKey
=
equipInfoModel
.
getComponentKey
();
String
componentKey
=
equipInfoModel
.
getComponentKey
();
// 规则不启用时业务处理
if
(!
this
.
getEnableConfig
(
equipInfoModel
.
getInspectionType
()))
{
log
.
warn
(
"检验类型:{},未启用规则,将返回全部数据"
,
equipInfoModel
.
getInspectionType
());
log
.
warn
(
"检验类型:{},未启用规则,将返回全部数据"
,
equipInfoModel
.
getInspectionType
());
this
.
responseForPublisher
(
componentKey
,
this
.
getAllInspectionOrgList
(
equipInfoModel
));
this
.
responseForPublisher
(
componentKey
,
this
.
getAllInspectionOrgList
(
equipInfoModel
));
}
}
}
/**
* 按照检验类型判断是否启用, 不配置时默认不启用
*
* @param inspectionType 检验类型枚举 @see JYJCTypeEnum
* @return true-启用规则,false-不启用
*/
private
boolean
getEnableConfig
(
String
inspectionType
)
{
return
inspectionRuleEnableConfig
.
getValueByFieldName
(
inspectionType
)
==
null
?
false
:
(
Boolean
)
inspectionRuleEnableConfig
.
getValueByFieldName
(
inspectionType
);
}
private
void
responseForPublisher
(
String
componentKey
,
List
<
TzBaseEnterpriseInfoDto
>
allInspectionOrgList
)
{
private
void
responseForPublisher
(
String
componentKey
,
List
<
TzBaseEnterpriseInfoDto
>
allInspectionOrgList
)
{
try
{
try
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/
listener/EnableRuleDataPreparationListener
.java
→
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/event/
rule/service/EnableRuleDataPreparationService
.java
View file @
0adfe355
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
listener
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
event
.
rule
.
service
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
...
@@ -9,21 +8,20 @@ import com.yeejoin.amos.boot.module.jyjc.api.enums.JYJCTypeEnum;
...
@@ -9,21 +8,20 @@ import com.yeejoin.amos.boot.module.jyjc.api.enums.JYJCTypeEnum;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.RequestTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.RequestTypeEnum
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationNoAcceptLogMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.mapper.JyjcInspectionApplicationNoAcceptLogMapper
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.InspectionEquipInfoModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.InspectionEquipInfoModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.InspectionRuleEnableConfig
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionOrgRefreshEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.InspectionOrgRefreshEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.TouchRuleEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.TouchRuleEvent
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.listener.InspectionApplicationPushEventListener
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.event.publisher.EventPublisher
;
import
com.yeejoin.amos.boot.module.jyjc.biz.rule.InspectionEquipInfo
;
import
com.yeejoin.amos.boot.module.jyjc.biz.rule.InspectionEquipInfo
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.RuleCommonServiceImpl
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.RuleCommonServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectContraptionMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.PostConstruct
;
...
@@ -45,23 +43,22 @@ import static com.yeejoin.amos.boot.module.jyjc.api.enums.CategoryEnum.getCatego
...
@@ -45,23 +43,22 @@ import static com.yeejoin.amos.boot.module.jyjc.api.enums.CategoryEnum.getCatego
*/
*/
@Component
@Component
@Slf4j
@Slf4j
public
class
EnableRuleDataPreparationListener
implements
ApplicationListener
<
InspectionOrgRefreshEvent
>
{
@RequiredArgsConstructor
public
class
EnableRuleDataPreparationService
{
private
SnowflakeIdUtil
sequence
;
private
final
SnowflakeIdUtil
sequence
;
private
RegistrationInfoMapper
registrationInfoMapper
;
private
final
RegistrationInfoMapper
registrationInfoMapper
;
private
RuleCommonServiceImpl
ruleCommonService
;
private
final
RuleCommonServiceImpl
ruleCommonService
;
private
InspectionRuleEnableConfig
inspectionRuleEnableConfig
;
private
final
InspectionApplicationPushEventListener
applicationPushEventListener
;
private
InspectionApplicationPushEventListener
applicationPushEventListen
er
;
private
final
JyjcInspectionApplicationNoAcceptLogMapper
inspectionApplicationNoAcceptLogMapp
er
;
private
JyjcInspectionApplicationNoAcceptLogMapper
inspectionApplicationNoAcceptLogMapp
er
;
private
final
EventPublisher
publish
er
;
private
EventPublisher
publisher
;
private
final
List
<
BlockingQueue
<
InspectionEquipInfoModel
>>
hashCodeBlockingQueues
=
new
ArrayList
<>();
private
List
<
BlockingQueue
<
InspectionEquipInfoModel
>>
hashCodeBlockingQueues
=
new
ArrayList
<>();
private
final
IdxBizJgProjectContraptionMapper
jgProjectContraptionMapper
;
private
final
IdxBizJgProjectContraptionMapper
jgProjectContraptionMapper
;
...
@@ -69,23 +66,6 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
...
@@ -69,23 +66,6 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
private
int
threadNumber
;
private
int
threadNumber
;
public
EnableRuleDataPreparationListener
(
SnowflakeIdUtil
sequence
,
RegistrationInfoMapper
registrationInfoMapper
,
RuleCommonServiceImpl
ruleCommonService
,
InspectionRuleEnableConfig
inspectionRuleEnableConfig
,
InspectionApplicationPushEventListener
applicationPushEventListener
,
JyjcInspectionApplicationNoAcceptLogMapper
inspectionApplicationNoAcceptLogMapper
,
EventPublisher
publisher
,
IdxBizJgProjectContraptionMapper
jgProjectContraptionMapper
)
{
this
.
sequence
=
sequence
;
this
.
registrationInfoMapper
=
registrationInfoMapper
;
this
.
ruleCommonService
=
ruleCommonService
;
this
.
inspectionRuleEnableConfig
=
inspectionRuleEnableConfig
;
this
.
applicationPushEventListener
=
applicationPushEventListener
;
this
.
inspectionApplicationNoAcceptLogMapper
=
inspectionApplicationNoAcceptLogMapper
;
this
.
publisher
=
publisher
;
this
.
jgProjectContraptionMapper
=
jgProjectContraptionMapper
;
}
@Override
public
void
onApplicationEvent
(
InspectionOrgRefreshEvent
event
)
{
public
void
onApplicationEvent
(
InspectionOrgRefreshEvent
event
)
{
int
queueIndex
=
Math
.
abs
(
event
.
getInspectionEquipInfoModel
().
getRecord
().
hashCode
())
%
threadNumber
;
int
queueIndex
=
Math
.
abs
(
event
.
getInspectionEquipInfoModel
().
getRecord
().
hashCode
())
%
threadNumber
;
hashCodeBlockingQueues
.
get
(
queueIndex
).
add
(
event
.
getInspectionEquipInfoModel
());
hashCodeBlockingQueues
.
get
(
queueIndex
).
add
(
event
.
getInspectionEquipInfoModel
());
...
@@ -119,10 +99,6 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
...
@@ -119,10 +99,6 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
}
}
private
void
dealData
(
InspectionEquipInfoModel
equipInfoModel
)
{
private
void
dealData
(
InspectionEquipInfoModel
equipInfoModel
)
{
// 判断规则是否启用,不启用时直接丢弃
if
(!
this
.
getEnableConfig
(
equipInfoModel
.
getInspectionType
()))
{
return
;
}
InspectionEquipInfo
inspectionEquipInfo
=
new
InspectionEquipInfo
();
InspectionEquipInfo
inspectionEquipInfo
=
new
InspectionEquipInfo
();
if
(
equipInfoModel
.
getEquCategory
()
!=
null
&&
equipInfoModel
.
getEquCategory
().
startsWith
(
"8"
))
{
if
(
equipInfoModel
.
getEquCategory
()
!=
null
&&
equipInfoModel
.
getEquCategory
().
startsWith
(
"8"
))
{
// 管道逻辑
// 管道逻辑
...
@@ -132,16 +108,10 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
...
@@ -132,16 +108,10 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
log
.
error
(
"未找到装置,报检规则匹配流程结束!"
);
log
.
error
(
"未找到装置,报检规则匹配流程结束!"
);
return
;
return
;
}
}
inspectionEquipInfo
.
setEquCategory
(
projectContraption
.
getEquCategory
());
inspectionEquipInfo
.
setEquCategory
(
equipInfoModel
.
getEquCategory
());
inspectionEquipInfo
.
setEquList
(
projectContraption
.
getEquList
());
inspectionEquipInfo
.
setEquList
(
equipInfoModel
.
getEquList
());
inspectionEquipInfo
.
setEquDefine
(
projectContraption
.
getEquDefine
());
inspectionEquipInfo
.
setEquDefine
(
equipInfoModel
.
getEquDefine
());
inspectionEquipInfo
.
setTechParams
(
new
HashMap
<>());
inspectionEquipInfo
.
setTechParams
(
new
HashMap
<>());
// 地市
UseInfo
useInfo
=
new
UseInfo
();
BeanUtil
.
copyProperties
(
projectContraption
,
useInfo
,
true
);
inspectionEquipInfo
.
setAreaCode
(
ruleCommonService
.
getArea
(
useInfo
));
// 区县
inspectionEquipInfo
.
setDistrictOrCountyCode
(
ruleCommonService
.
getCounty
(
useInfo
));
}
else
{
}
else
{
// 非管道逻辑
// 非管道逻辑
RegistrationInfo
registrationInfo
=
fetchRegistrationInfo
(
equipInfoModel
.
getRecord
());
RegistrationInfo
registrationInfo
=
fetchRegistrationInfo
(
equipInfoModel
.
getRecord
());
...
@@ -149,18 +119,15 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
...
@@ -149,18 +119,15 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
log
.
error
(
"未找到设备,报检规则匹配流程结束!"
);
log
.
error
(
"未找到设备,报检规则匹配流程结束!"
);
return
;
return
;
}
}
inspectionEquipInfo
.
setEquCategory
(
registrationInfo
.
getEquCategory
());
inspectionEquipInfo
.
setEquCategory
(
equipInfoModel
.
getEquCategory
());
inspectionEquipInfo
.
setEquList
(
registrationInfo
.
getEquList
());
inspectionEquipInfo
.
setEquList
(
equipInfoModel
.
getEquList
());
inspectionEquipInfo
.
setEquDefine
(
registrationInfo
.
getEquDefine
());
inspectionEquipInfo
.
setEquDefine
(
equipInfoModel
.
getEquDefine
());
inspectionEquipInfo
.
setTechParams
(
this
.
getTechParams
(
registrationInfo
));
inspectionEquipInfo
.
setTechParams
(
this
.
getTechParams
(
registrationInfo
));
// 是否球罐 0 1 转 boolean
// 是否球罐 0 1 转 boolean
inspectionEquipInfo
.
setIsBallValve
(!
"0"
.
equals
(
registrationInfo
.
getWhetherSphericalTank
()));
inspectionEquipInfo
.
setIsBallValve
(!
"0"
.
equals
(
registrationInfo
.
getWhetherSphericalTank
()));
UseInfo
useInfo
=
ruleCommonService
.
getUseInfo
(
equipInfoModel
.
getRecord
());
// 地市
inspectionEquipInfo
.
setAreaCode
(
ruleCommonService
.
getArea
(
useInfo
));
// 区县
inspectionEquipInfo
.
setDistrictOrCountyCode
(
ruleCommonService
.
getCounty
(
useInfo
));
}
}
inspectionEquipInfo
.
setAreaCode
(
ruleCommonService
.
getArea
(
equipInfoModel
.
getCity
(),
equipInfoModel
.
getCounty
()));
inspectionEquipInfo
.
setDistrictOrCountyCode
(
equipInfoModel
.
getCounty
());
inspectionEquipInfo
.
setComponentKey
(
equipInfoModel
.
getComponentKey
());
inspectionEquipInfo
.
setComponentKey
(
equipInfoModel
.
getComponentKey
());
inspectionEquipInfo
.
setInspectionType
(
equipInfoModel
.
getInspectionType
());
inspectionEquipInfo
.
setInspectionType
(
equipInfoModel
.
getInspectionType
());
inspectionEquipInfo
.
setRecord
(
equipInfoModel
.
getRecord
());
inspectionEquipInfo
.
setRecord
(
equipInfoModel
.
getRecord
());
...
@@ -174,18 +141,6 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
...
@@ -174,18 +141,6 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
publisher
.
publish
(
new
TouchRuleEvent
(
this
,
inspectionEquipInfo
));
publisher
.
publish
(
new
TouchRuleEvent
(
this
,
inspectionEquipInfo
));
}
}
/**
* 按照检验类型判断是否启用, 不配置时默认不启用
*
* @param inspectionType 检验类型枚举 @see JYJCTypeEnum
* @return true-启用规则,false-不启用
*/
private
boolean
getEnableConfig
(
String
inspectionType
)
{
return
inspectionRuleEnableConfig
.
getValueByFieldName
(
inspectionType
)
!=
null
&&
(
Boolean
)
inspectionRuleEnableConfig
.
getValueByFieldName
(
inspectionType
);
}
private
String
buildLastNoAcceptInspectionCode
(
JyjcInspectionApplicationNoAcceptLog
jyjcInspectionApplicationNoAcceptLog
)
{
private
String
buildLastNoAcceptInspectionCode
(
JyjcInspectionApplicationNoAcceptLog
jyjcInspectionApplicationNoAcceptLog
)
{
if
(
jyjcInspectionApplicationNoAcceptLog
!=
null
)
{
if
(
jyjcInspectionApplicationNoAcceptLog
!=
null
)
{
return
jyjcInspectionApplicationNoAcceptLog
.
getInspectionUnitCode
();
return
jyjcInspectionApplicationNoAcceptLog
.
getInspectionUnitCode
();
...
@@ -226,7 +181,5 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
...
@@ -226,7 +181,5 @@ public class EnableRuleDataPreparationListener implements ApplicationListener<In
RegistrationInfo:
:
getEquDefine
,
RegistrationInfo:
:
getEquList
,
RegistrationInfo:
:
getWhetherSphericalTank
)
RegistrationInfo:
:
getEquDefine
,
RegistrationInfo:
:
getEquList
,
RegistrationInfo:
:
getWhetherSphericalTank
)
.
eq
(
RegistrationInfo:
:
getRecord
,
record
));
.
eq
(
RegistrationInfo:
:
getRecord
,
record
));
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/listener/InspectionOrgRefreshListener.java
View file @
0adfe355
...
@@ -32,14 +32,14 @@ public class InspectionOrgRefreshListener extends EmqxListener {
...
@@ -32,14 +32,14 @@ public class InspectionOrgRefreshListener extends EmqxListener {
private
static
final
BlockingQueue
<
BizMessage
>
BLOCKING_QUEUE
=
new
LinkedBlockingQueue
<>();
private
static
final
BlockingQueue
<
BizMessage
>
BLOCKING_QUEUE
=
new
LinkedBlockingQueue
<>();
private
EmqKeeper
emqKeeper
;
private
final
EmqKeeper
emqKeeper
;
@Value
(
"${spring.application.name}"
)
@Value
(
"${spring.application.name}"
)
private
String
applicationName
;
private
String
applicationName
;
private
RedisUtils
redisUtils
;
private
final
RedisUtils
redisUtils
;
private
EventPublisher
publisher
;
private
final
EventPublisher
publisher
;
public
InspectionOrgRefreshListener
(
EmqKeeper
emqKeeper
,
RedisUtils
redisUtils
,
EventPublisher
publisher
)
{
public
InspectionOrgRefreshListener
(
EmqKeeper
emqKeeper
,
RedisUtils
redisUtils
,
EventPublisher
publisher
)
{
this
.
emqKeeper
=
emqKeeper
;
this
.
emqKeeper
=
emqKeeper
;
...
@@ -84,6 +84,7 @@ public class InspectionOrgRefreshListener extends EmqxListener {
...
@@ -84,6 +84,7 @@ public class InspectionOrgRefreshListener extends EmqxListener {
}
}
private
void
processBizMessage
(
BizMessage
bizMessage
)
{
private
void
processBizMessage
(
BizMessage
bizMessage
)
{
log
.
info
(
"收到前端消息:{}"
,
bizMessage
);
byte
[]
payload
=
bizMessage
.
getMessage
().
getPayload
();
byte
[]
payload
=
bizMessage
.
getMessage
().
getPayload
();
InspectionEquipInfoModel
equipInfoModel
=
parseObject
(
new
String
(
payload
,
StandardCharsets
.
UTF_8
),
InspectionEquipInfoModel
.
class
);
InspectionEquipInfoModel
equipInfoModel
=
parseObject
(
new
String
(
payload
,
StandardCharsets
.
UTF_8
),
InspectionEquipInfoModel
.
class
);
String
componentKey
=
bizMessage
.
getTopic
().
split
(
"/"
)[
0
];
String
componentKey
=
bizMessage
.
getTopic
().
split
(
"/"
)[
0
];
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionApplicationServiceImpl.java
View file @
0adfe355
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/RuleCommonServiceImpl.java
View file @
0adfe355
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo;
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
...
@@ -22,11 +23,12 @@ import java.util.List;
...
@@ -22,11 +23,12 @@ import java.util.List;
*/
*/
@Component
@Component
@Slf4j
@Slf4j
@RequiredArgsConstructor
public
class
RuleCommonServiceImpl
{
public
class
RuleCommonServiceImpl
{
private
UseInfoMapper
useInfoMapper
;
private
final
UseInfoMapper
useInfoMapper
;
private
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
private
final
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
;
private
final
EmqKeeper
emqKeeper
;
private
final
EmqKeeper
emqKeeper
;
...
@@ -35,12 +37,6 @@ public class RuleCommonServiceImpl {
...
@@ -35,12 +37,6 @@ public class RuleCommonServiceImpl {
*/
*/
private
static
final
String
[]
EXCLUSION_CITY_REGIONS
=
{
"610403"
,
"610581"
};
private
static
final
String
[]
EXCLUSION_CITY_REGIONS
=
{
"610403"
,
"610581"
};
public
RuleCommonServiceImpl
(
UseInfoMapper
useInfoMapper
,
TzBaseEnterpriseInfoMapper
enterpriseInfoMapper
,
EmqKeeper
emqKeeper
)
{
this
.
useInfoMapper
=
useInfoMapper
;
this
.
enterpriseInfoMapper
=
enterpriseInfoMapper
;
this
.
emqKeeper
=
emqKeeper
;
}
String
getArea
(
String
record
)
{
String
getArea
(
String
record
)
{
UseInfo
equipUseInfo
=
useInfoMapper
.
selectOne
(
Wrappers
.<
UseInfo
>
lambdaQuery
().
select
(
UseInfo:
:
getCity
,
UseInfo:
:
getCounty
).
eq
(
UseInfo:
:
getRecord
,
record
));
UseInfo
equipUseInfo
=
useInfoMapper
.
selectOne
(
Wrappers
.<
UseInfo
>
lambdaQuery
().
select
(
UseInfo:
:
getCity
,
UseInfo:
:
getCounty
).
eq
(
UseInfo:
:
getRecord
,
record
));
...
@@ -76,6 +72,17 @@ public class RuleCommonServiceImpl {
...
@@ -76,6 +72,17 @@ public class RuleCommonServiceImpl {
return
equipUseInfo
.
getCity
();
return
equipUseInfo
.
getCity
();
}
}
public
String
getArea
(
String
city
,
String
county
)
{
// 特殊地区特殊处理,目前有韩城、杨凌,原因行政区划上是有层级的,但是业务办理时,他们与所在地市是同级别的
if
(
StringUtils
.
isEmpty
(
city
)
||
StringUtils
.
isEmpty
(
county
))
{
return
""
;
}
if
(
Arrays
.
asList
(
EXCLUSION_CITY_REGIONS
).
contains
(
county
))
{
return
county
;
}
return
city
;
}
public
String
getCounty
(
UseInfo
equipUseInfo
)
{
public
String
getCounty
(
UseInfo
equipUseInfo
)
{
if
(
equipUseInfo
==
null
)
{
if
(
equipUseInfo
==
null
)
{
return
""
;
return
""
;
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/resources/application-dev.properties
View file @
0adfe355
...
@@ -74,3 +74,4 @@ inspection.rule.enabled.GZJDJY=true
...
@@ -74,3 +74,4 @@ inspection.rule.enabled.GZJDJY=true
inspection.rule.enabled.WXJDJY
=
true
inspection.rule.enabled.WXJDJY
=
true
#电梯检测是否启用规则:true-启用,false-不启用
#电梯检测是否启用规则:true-启用,false-不启用
inspection.rule.enabled.DTJC
=
true
inspection.rule.enabled.DTJC
=
true
inspection.rule.enabled.WTJY
=
true
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
0adfe355
...
@@ -260,7 +260,7 @@
...
@@ -260,7 +260,7 @@
FROM
FROM
tz_base_enterprise_info info
tz_base_enterprise_info info
inner JOIN tz_jyjc_opening_application tjoa ON info.use_code = tjoa.unit_code
inner JOIN tz_jyjc_opening_application tjoa ON info.use_code = tjoa.unit_code
AND tjoa.status = '
6616
'
AND tjoa.status = '
已完成
'
<if
test=
"openBizType != null and openBizType !=''"
>
<if
test=
"openBizType != null and openBizType !=''"
>
and tjoa.open_biz_type = #{openBizType}
and tjoa.open_biz_type = #{openBizType}
</if>
</if>
...
@@ -276,7 +276,7 @@
...
@@ -276,7 +276,7 @@
FROM
FROM
tz_base_enterprise_info info
tz_base_enterprise_info info
INNER JOIN tz_jyjc_opening_application tjoa ON info.use_code = tjoa.unit_code
INNER JOIN tz_jyjc_opening_application tjoa ON info.use_code = tjoa.unit_code
AND tjoa.status = '
6616
'
AND tjoa.status = '
已完成
'
and tjoa.open_biz_type = #{openBizType}
and tjoa.open_biz_type = #{openBizType}
<if
test=
"list !=null and list.size()>0"
>
<if
test=
"list !=null and list.size()>0"
>
AND info.use_code in
AND info.use_code in
...
...
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