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
b3018b2f
Commit
b3018b2f
authored
Jun 27, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.检验检测报检规则3.0版本
parent
06a0700d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
33 deletions
+55
-33
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+1
-1
InspectionOrgRefreshListener.java
...odule/jyjc/biz/listener/InspectionOrgRefreshListener.java
+10
-1
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+16
-31
RuleCommonServiceImpl.java
...t/module/jyjc/biz/service/impl/RuleCommonServiceImpl.java
+28
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionApplicationController.java
View file @
b3018b2f
...
...
@@ -270,7 +270,7 @@ public class JyjcInspectionApplicationController extends BaseController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/workbench/getInspectionUnitList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询检验检测机构列表
,不包括省院"
,
notes
=
"查询检验检测机构列表,不包括省院
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询检验检测机构列表
所有已注册开通的"
,
notes
=
"查询检验检测机构列表所有已注册开通的
"
)
public
ResponseModel
<
List
<
TzBaseEnterpriseInfoDto
>>
getInspectionUnitListForWorkbench
(
@RequestParam
String
openBizType
)
{
return
ResponseHelper
.
buildResponse
(
jyjcInspectionApplicationServiceImpl
.
getInspectionUnitListForWorkbench
(
openBizType
));
}
...
...
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 @
b3018b2f
...
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.boot.module.jyjc.biz.listener.message.BizMessage;
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.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.rule.Rule
;
...
...
@@ -136,7 +137,7 @@ public class InspectionOrgRefreshListener extends EmqxListener {
inspectionEquipInfo
.
setBizType
(
getCategoryByType
(
JYJCTypeEnum
.
of
(
inspectionEquipInfo
.
getInspectionType
())));
inspectionEquipInfo
.
setUuid
(
sequence
.
nextId
()
+
""
);
inspectionEquipInfo
.
setTechParams
(
this
.
getTechParams
(
registrationInfo
));
inspectionEquipInfo
.
setAreaCode
(
ruleCommonService
.
getArea
(
equipInfoModel
.
getRecord
()
));
this
.
setReginInfo
(
inspectionEquipInfo
,
equipInfoModel
.
getRecord
(
));
JyjcInspectionApplicationNoAcceptLog
jyjcInspectionApplicationNoAcceptLog
=
getLastNoAcceptLog
(
equipInfoModel
);
inspectionEquipInfo
.
setRequestType
(
this
.
buildRequestType
(
equipInfoModel
,
jyjcInspectionApplicationNoAcceptLog
));
inspectionEquipInfo
.
setLastNoAcceptInspectionCode
(
this
.
buildLastNoAcceptInspectionCode
(
jyjcInspectionApplicationNoAcceptLog
));
...
...
@@ -145,6 +146,14 @@ public class InspectionOrgRefreshListener extends EmqxListener {
touchRuleWithApi
(
inspectionEquipInfo
);
}
private
void
setReginInfo
(
InspectionEquipInfo
inspectionEquipInfo
,
String
record
)
{
UseInfo
useInfo
=
ruleCommonService
.
getUseInfo
(
record
);
// 地市
inspectionEquipInfo
.
setAreaCode
(
ruleCommonService
.
getArea
(
useInfo
));
// 区县
inspectionEquipInfo
.
setDistrictOrCountyCode
(
ruleCommonService
.
getCounty
(
useInfo
));
}
private
String
buildLastNoAcceptInspectionCode
(
JyjcInspectionApplicationNoAcceptLog
jyjcInspectionApplicationNoAcceptLog
)
{
if
(
jyjcInspectionApplicationNoAcceptLog
!=
null
)
{
return
jyjcInspectionApplicationNoAcceptLog
.
getInspectionUnitCode
();
...
...
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 @
b3018b2f
...
...
@@ -130,12 +130,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
@Value
(
"classpath:/json/bizTypeInfo.json"
)
private
Resource
bizTypeInfo
;
/**
* 省特检院公司code
*/
@Value
(
"${province.inspection.company.code:126100004352004822}"
)
private
String
provinceInspectionCompanyCode
;
@Autowired
private
JyjcInspectionApplicationEquipMapper
jyjcInspectionApplicationEquipMapper
;
...
...
@@ -213,13 +207,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
dto
.
setCompleteFirstTask
(
true
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
String
[]
inspectionUnit
=
model
.
getInspectionUnitCode
().
split
(
"_"
);
if
(
inspectionUnit
.
length
==
2
)
{
model
.
setInspectionUnitCode
(
inspectionUnit
[
0
]);
model
.
setIsMustAccept
(
Boolean
.
parseBoolean
(
inspectionUnit
[
1
]));
}
else
{
this
.
setInspectionUnitNameAfterSave
(
model
);
}
setNameAndIsMustAccept
(
model
);
dto
.
setNextExecuteUserCompanyCode
(
model
.
getInspectionUnitCode
());
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
String
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
...
...
@@ -244,13 +232,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()));
//6611 对应数据字典 检验流程状态 待受理
commonService
.
saveExecuteFlowData2Redis
(
model
.
getProcessInstanceId
(),
this
.
buildInstanceRuntimeData
(
model
));
}
else
if
(
"1"
.
equals
(
model
.
getOperationType
()))
{
// 工作台暂存、详情保存逻辑
String
[]
inspectionUnit
=
model
.
getInspectionUnitCode
().
split
(
"_"
);
if
(
inspectionUnit
.
length
==
2
)
{
model
.
setInspectionUnitCode
(
inspectionUnit
[
0
]);
model
.
setInspectionUnitName
(
inspectionUnit
[
1
]);
}
else
{
this
.
setInspectionUnitNameAfterSave
(
model
);
}
setNameAndIsMustAccept
(
model
);
model
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
...
...
@@ -359,15 +341,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
model
.
setDockingUnitCode
(
jyjcOpeningApplications
.
get
(
0
).
getDockingUnitCode
());
}
}
String
[]
inspectionUnit
=
model
.
getInspectionUnitCode
().
split
(
"_"
);
if
(
inspectionUnit
.
length
==
2
)
{
model
.
setInspectionUnitCode
(
inspectionUnit
[
0
]);
model
.
setIsMustAccept
(
Boolean
.
parseBoolean
(
inspectionUnit
[
1
]));
}
else
{
this
.
setInspectionUnitNameAfterSave
(
model
);
}
this
.
setInspectionUnitNameAfterSave
(
model
);
this
.
setNameAndIsMustAccept
(
model
);
//更新报检装备监管码
jyjcInspectionApplicationEquipService
.
getBaseMapper
().
deleteByApplicationSeq
(
model
.
getSequenceNbr
());
if
(
model
.
getEquip
().
size
()
>
0
)
{
...
...
@@ -446,6 +420,17 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
return
this
.
buildRedundancyField
(
model
);
}
private
void
setNameAndIsMustAccept
(
JyjcInspectionApplicationModel
model
)
{
String
[]
inspectionUnit
=
model
.
getInspectionUnitCode
().
split
(
"_"
);
if
(
inspectionUnit
.
length
==
2
)
{
model
.
setInspectionUnitCode
(
inspectionUnit
[
0
]);
model
.
setIsMustAccept
(
Boolean
.
parseBoolean
(
inspectionUnit
[
1
]));
this
.
setInspectionUnitNameAfterSave
(
model
);
}
else
{
this
.
setInspectionUnitNameAfterSave
(
model
);
}
}
/**
* 提交时校验是否有在流程中(流程状态待受理)的设备
*
...
...
@@ -1361,7 +1346,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
public
List
<
TzBaseEnterpriseInfoDto
>
getInspectionUnitListForWorkbench
(
String
openBizType
)
{
List
<
TzBaseEnterpriseInfoDto
>
enterpriseInfoDtos
=
commonService
.
getInspectionUnitList
(
openBizType
);
return
enterpriseInfoDtos
.
stream
().
filter
(
e
->
!
provinceInspectionCompanyCode
.
contains
(
e
.
getUseCode
())).
collect
(
Collectors
.
toList
());
return
commonService
.
getInspectionUnitList
(
openBizType
);
}
}
\ No newline at end of file
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 @
b3018b2f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.sun.org.apache.regexp.internal.RE
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.UseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.UseInfoMapper
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -40,4 +41,31 @@ public class RuleCommonServiceImpl {
}
return
equipUseInfo
.
getCity
();
}
public
UseInfo
getUseInfo
(
String
record
)
{
return
useInfoMapper
.
selectOne
(
Wrappers
.<
UseInfo
>
lambdaQuery
().
select
(
UseInfo:
:
getCity
,
UseInfo:
:
getCounty
).
eq
(
UseInfo:
:
getRecord
,
record
));
}
public
String
getArea
(
UseInfo
equipUseInfo
)
{
if
(
equipUseInfo
==
null
)
{
return
""
;
}
// 特殊地区特殊处理,目前有韩城、杨凌,原因行政区划上是有层级的,但是业务办理时,他们与所在地市是同级别的
if
(
StringUtils
.
isEmpty
(
equipUseInfo
.
getCity
())
||
StringUtils
.
isEmpty
(
equipUseInfo
.
getCounty
()))
{
return
""
;
}
if
(
Arrays
.
asList
(
EXCLUSION_CITY_REGIONS
).
contains
(
equipUseInfo
.
getCounty
()))
{
return
equipUseInfo
.
getCounty
();
}
return
equipUseInfo
.
getCity
();
}
public
String
getCounty
(
UseInfo
equipUseInfo
)
{
if
(
equipUseInfo
==
null
)
{
return
""
;
}
return
equipUseInfo
.
getCounty
();
}
}
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