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
8af31d47
Commit
8af31d47
authored
Aug 11, 2025
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jyjc): 报检开发调整
1.报检规则4.0开发
parent
25bbfa70
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
63 deletions
+21
-63
InspectionEquipInfoModel.java
.../boot/module/jyjc/api/model/InspectionEquipInfoModel.java
+3
-0
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+18
-63
No files found.
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 @
8af31d47
...
@@ -40,4 +40,7 @@ public class InspectionEquipInfoModel implements Serializable {
...
@@ -40,4 +40,7 @@ public class InspectionEquipInfoModel implements Serializable {
@ApiModelProperty
(
value
=
"主题,无需上送,由topic解析出来"
)
@ApiModelProperty
(
value
=
"主题,无需上送,由topic解析出来"
)
private
String
componentKey
;
private
String
componentKey
;
@ApiModelProperty
(
value
=
"申请报检单位信用代码"
)
private
String
unitCode
;
}
}
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 @
8af31d47
...
@@ -77,6 +77,7 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -77,6 +77,7 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
@@ -105,8 +106,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -105,8 +106,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
private
static
final
String
EQU_CODE
=
"EQU_CODE"
;
private
static
final
String
EQU_CODE
=
"EQU_CODE"
;
private
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
private
static
final
String
SEQUENCE_NBR
=
"SEQUENCE_NBR"
;
private
static
final
String
SUMMIT_TYPE
=
"0"
;
private
static
final
String
SUMMIT_TYPE
=
"0"
;
private
static
final
String
FIRST_INSPECT
=
"firstInspect"
;
private
static
final
String
SUPERVISE
=
"supervise"
;
@Autowired
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
@Autowired
...
@@ -158,17 +157,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -158,17 +157,10 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
private
RedisUtils
redisUtils
;
private
RedisUtils
redisUtils
;
@Autowired
@Autowired
private
ESEquipmentCategory
esEquipmentCategory
;
private
ESEquipmentCategory
esEquipmentCategory
;
@Autowired
@Autowired
private
IdxBizJgProjectContraptionMapper
idxBizJgProjectContraptionMapper
;
private
IdxBizJgProjectContraptionMapper
idxBizJgProjectContraptionMapper
;
@Autowired
private
IdxBizJgProjectConstructionMapper
idxBizJgProjectConstructionMapper
;
@Autowired
@Autowired
private
JyjcInspectionResultParamServiceImpl
jyjcInspectionResultParamServiceImpl
;
private
JyjcInspectionResultParamServiceImpl
jyjcInspectionResultParamServiceImpl
;
@Resource
@Resource
private
SnowflakeIdUtil
sequence
;
private
SnowflakeIdUtil
sequence
;
...
@@ -250,18 +242,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -250,18 +242,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
setNameAndIsMustAccept
(
model
);
setNameAndIsMustAccept
(
model
);
}
}
this
.
setResultTypeAndDockInfo
(
model
);
LambdaQueryWrapper
<
JyjcOpeningApplication
>
wa
=
new
LambdaQueryWrapper
<
JyjcOpeningApplication
>().
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
model
.
getInspectionUnitCode
()).
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
List
<
JyjcOpeningApplication
>
jyjcOpeningApplications
=
jyjcOpeningApplicationService
.
getBaseMapper
().
selectList
(
wa
);
if
(
CollectionUtils
.
isNotEmpty
(
jyjcOpeningApplications
))
{
//检验检测结果方式
if
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
()
!=
null
)
{
model
.
setResultType
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
());
// 报检时冗余检验检测机构厂商编号,推送厂商报检信息时需要
model
.
setDockingUnitCode
(
jyjcOpeningApplications
.
get
(
0
).
getDockingUnitCode
());
}
}
model
.
setApplicationDate
(
new
Date
());
model
.
setApplicationDate
(
new
Date
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setApplicationUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
model
.
setApplicationUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
...
@@ -339,16 +320,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -339,16 +320,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
}
else
{
}
else
{
// 保存并提交
// 保存并提交
LambdaQueryWrapper
<
JyjcOpeningApplication
>
wa
=
new
LambdaQueryWrapper
<
JyjcOpeningApplication
>().
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
model
.
getInspectionUnitCode
()).
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
this
.
setResultTypeAndDockInfo
(
model
);
List
<
JyjcOpeningApplication
>
jyjcOpeningApplications
=
jyjcOpeningApplicationService
.
getBaseMapper
().
selectList
(
wa
);
if
(
CollectionUtils
.
isNotEmpty
(
jyjcOpeningApplications
))
{
//检验检测结果方式
if
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
()
!=
null
)
{
model
.
setResultType
(
jyjcOpeningApplications
.
get
(
0
).
getResultType
());
// 报检时冗余检验检测机构厂商编号,推送厂商报检信息时需要
model
.
setDockingUnitCode
(
jyjcOpeningApplications
.
get
(
0
).
getDockingUnitCode
());
}
}
this
.
setNameAndIsMustAccept
(
model
);
this
.
setNameAndIsMustAccept
(
model
);
jyjcInspectionApplicationEquipService
.
getBaseMapper
().
deleteByApplicationSeq
(
model
.
getSequenceNbr
());
jyjcInspectionApplicationEquipService
.
getBaseMapper
().
deleteByApplicationSeq
(
model
.
getSequenceNbr
());
if
(!
model
.
getEquip
().
isEmpty
())
{
if
(!
model
.
getEquip
().
isEmpty
())
{
...
@@ -515,7 +487,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -515,7 +487,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
jyjcInspectionApplicationPushLogService
.
getBaseMapper
().
deleteByApplicationSeq
(
seq
);
jyjcInspectionApplicationPushLogService
.
getBaseMapper
().
deleteByApplicationSeq
(
seq
);
}
}
return
true
;
return
true
;
}
}
public
Page
<
JyjcInspectionApplicationEquipModel
>
listByCategory
(
Page
<
JyjcInspectionApplicationEquipModel
>
page
,
String
equipClassify
)
{
public
Page
<
JyjcInspectionApplicationEquipModel
>
listByCategory
(
Page
<
JyjcInspectionApplicationEquipModel
>
page
,
String
equipClassify
)
{
...
@@ -778,7 +749,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -778,7 +749,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
resultModel
.
setSequenceNbr
(
resultSeq
);
resultModel
.
setSequenceNbr
(
resultSeq
);
resultModel
.
setIsExistNc
(
false
);
resultModel
.
setIsExistNc
(
false
);
resultModel
.
setManageType
(
"batch"
);
resultModel
.
setManageType
(
"batch"
);
this
.
setResultTypeByBizTypeV2
(
resultModel
,
model
.
getBiz
Type
());
resultModel
.
setResultType
(
model
.
getResult
Type
());
resultModels
.
add
(
resultModel
);
resultModels
.
add
(
resultModel
);
// TODO 以管道汇总样式表暂存json,在结果录入后,将数据更新技术参数,考虑老数据
// TODO 以管道汇总样式表暂存json,在结果录入后,将数据更新技术参数,考虑老数据
Map
<
String
,
Object
>
paramDetail
=
getDeviceListByProjectContraption3
(
model
);
Map
<
String
,
Object
>
paramDetail
=
getDeviceListByProjectContraption3
(
model
);
...
@@ -812,7 +783,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -812,7 +783,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
resultModel
.
setEquCategory
(
applicationEquipModels
.
get
(
i
).
getEquCategory
());
resultModel
.
setEquCategory
(
applicationEquipModels
.
get
(
i
).
getEquCategory
());
resultModel
.
setEquList
(
applicationEquipModels
.
get
(
i
).
getEquList
());
resultModel
.
setEquList
(
applicationEquipModels
.
get
(
i
).
getEquList
());
resultModel
.
setIsExistNc
(
false
);
resultModel
.
setIsExistNc
(
false
);
this
.
setResultTypeByBizTypeV2
(
resultModel
,
model
.
getBiz
Type
());
resultModel
.
setResultType
(
model
.
getResult
Type
());
Long
resultSeq
=
sequence
.
nextId
();
Long
resultSeq
=
sequence
.
nextId
();
resultModel
.
setSequenceNbr
(
resultSeq
);
resultModel
.
setSequenceNbr
(
resultSeq
);
resultModels
.
add
(
resultModel
);
resultModels
.
add
(
resultModel
);
...
@@ -841,8 +812,20 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -841,8 +812,20 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
}
}
private
void
setResultTypeByBizTypeV2
(
JyjcInspectionResult
resultModel
,
String
bizType
)
{
private
void
setResultTypeAndDockInfo
(
JyjcInspectionApplicationModel
applicationModel
)
{
LambdaQueryWrapper
<
JyjcOpeningApplication
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
applicationModel
.
getInspectionUnitCode
());
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
queryWrapper
.
select
(
JyjcOpeningApplication:
:
getResultType
,
BaseEntity:
:
getSequenceNbr
);
queryWrapper
.
orderByDesc
(
JyjcOpeningApplication:
:
getAcceptDate
);
queryWrapper
.
last
(
"limit 1"
);
List
<
JyjcOpeningApplication
>
applicationList
=
jyjcOpeningApplicationService
.
list
(
queryWrapper
);
if
(!
applicationList
.
isEmpty
())
{
applicationModel
.
setResultType
(
applicationList
.
get
(
0
).
getResultType
());
applicationModel
.
setDockingUnitCode
(
applicationList
.
get
(
0
).
getDockingUnitCode
());
}
}
}
public
void
createHisAfterReceive
(
JyjcInspectionApplicationModel
model
)
{
public
void
createHisAfterReceive
(
JyjcInspectionApplicationModel
model
)
{
if
(
model
.
getEquipClassify
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
if
(
model
.
getEquipClassify
().
equals
(
EquipmentClassifityEnum
.
YLGD
.
getCode
()))
{
...
@@ -865,34 +848,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -865,34 +848,6 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
}
}
}
}
private
void
setResultTypeByBizType
(
JyjcInspectionResult
resultModel
,
String
bizType
)
{
// 由于一个检验检测单位可以申请开通检验、检测两个申请,即确定一个 开通申请的维度为:单位编码 + 开通业务类型
// 但是表里面放的使用单位的公司编码,导致无法匹配到正确的开通申请,故按照单位编码+ 开通类型 + 状态查询开通申请
BizTypeEnum
bizTypeEnum
=
BizTypeEnum
.
getInstance
(
bizType
);
String
openBizType
=
""
;
assert
bizTypeEnum
!=
null
;
switch
(
bizTypeEnum
)
{
case
SUPERVISE:
case
FIRST_INSPECTION:
openBizType
=
OpenBizTypeEnum
.
JY
.
getCode
();
break
;
case
DETECTION:
openBizType
=
OpenBizTypeEnum
.
JC
.
getCode
();
break
;
default
:
break
;
}
LambdaQueryWrapper
<
JyjcOpeningApplication
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
resultModel
.
getInspectionUnitCode
());
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getOpenBizType
,
openBizType
);
queryWrapper
.
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
queryWrapper
.
select
(
JyjcOpeningApplication:
:
getResultType
);
List
<
JyjcOpeningApplication
>
applicationList
=
jyjcOpeningApplicationService
.
list
(
queryWrapper
);
if
(!
applicationList
.
isEmpty
())
{
resultModel
.
setResultType
(
applicationList
.
get
(
0
).
getResultType
());
}
}
private
void
pushInspectionApplication
(
JyjcInspectionApplicationModel
inspectionApplicationModel
)
{
private
void
pushInspectionApplication
(
JyjcInspectionApplicationModel
inspectionApplicationModel
)
{
// 将检验检测申请信息推送至对应的检验机构
// 将检验检测申请信息推送至对应的检验机构
if
(
inspectionApplicationModel
.
getResultType
().
equals
(
ResultTypeEnum
.
INTEGRATED
.
getCode
()))
{
if
(
inspectionApplicationModel
.
getResultType
().
equals
(
ResultTypeEnum
.
INTEGRATED
.
getCode
()))
{
...
...
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