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
d80bc65b
Commit
d80bc65b
authored
Feb 20, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.openapi接口开发
1.1.附件上传 1.2.特种设备目录查询(feign调用jyjc) 1.3.检验检测结果回传(feign调用jyjc) 2.jyjc回传数据更新调整为按照设备及单号唯一进行更新
parent
7b9ba3d9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
484 additions
and
268 deletions
+484
-268
ControllerAop.java
.../java/com/yeejoin/amos/api/openapi/aop/ControllerAop.java
+1
-1
FeignAuthRequestInterceptor.java
.../amos/api/openapi/config/FeignAuthRequestInterceptor.java
+7
-0
EquipmentCategoryController.java
...s/api/openapi/controller/EquipmentCategoryController.java
+40
-0
FilesController.java
.../yeejoin/amos/api/openapi/controller/FilesController.java
+68
-78
JyjcController.java
...m/yeejoin/amos/api/openapi/controller/JyjcController.java
+41
-0
FileFolderPathEnum.java
...om/yeejoin/amos/api/openapi/enums/FileFolderPathEnum.java
+7
-2
AttachmentData.java
...com/yeejoin/amos/api/openapi/face/dto/AttachmentData.java
+21
-0
AttachmentModel.java
...om/yeejoin/amos/api/openapi/face/dto/AttachmentModel.java
+31
-0
EquipmentCategoryDto.java
...ejoin/amos/api/openapi/face/dto/EquipmentCategoryDto.java
+43
-0
JyjcInspectionResultDataModel.java
...s/api/openapi/face/dto/JyjcInspectionResultDataModel.java
+79
-0
JyjcServiceFeignClient.java
...eejoin/amos/api/openapi/feign/JyjcServiceFeignClient.java
+27
-0
TzsServiceFeignClient.java
...yeejoin/amos/api/openapi/feign/TzsServiceFeignClient.java
+8
-0
TzsTcmServiceFeignClient.java
...join/amos/api/openapi/feign/TzsTcmServiceFeignClient.java
+0
-10
application-jyjc.properties
...ta-openapi/src/main/resources/application-jyjc.properties
+49
-0
logback-jyjc.xml
...mos-boot-data-openapi/src/main/resources/logback-jyjc.xml
+49
-0
JyjcInspectionApplicationController.java
...c/biz/controller/JyjcInspectionApplicationController.java
+2
-2
JyjcInspectionResultController.java
...e/jyjc/biz/controller/JyjcInspectionResultController.java
+2
-2
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+0
-0
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+9
-5
AbstractJyjcInspectionApplicationHandlerServiceImpl.java
.../AbstractJyjcInspectionApplicationHandlerServiceImpl.java
+0
-36
DetectionInspectionApplicationHandlerServiceImpl.java
...ler/DetectionInspectionApplicationHandlerServiceImpl.java
+0
-32
FirstInspectionApplicationHandlerServiceImpl.java
...handler/FirstInspectionApplicationHandlerServiceImpl.java
+0
-32
JyjcInspectionApplicationHandlerFactory.java
...impl/handler/JyjcInspectionApplicationHandlerFactory.java
+0
-35
SuperviseInspectionApplicationHandlerServiceImpl.java
...ler/SuperviseInspectionApplicationHandlerServiceImpl.java
+0
-33
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/aop/ControllerAop.java
View file @
d80bc65b
...
@@ -41,7 +41,7 @@ public class ControllerAop {
...
@@ -41,7 +41,7 @@ public class ControllerAop {
HttpServletRequest
request
=
attributes
.
getRequest
();
HttpServletRequest
request
=
attributes
.
getRequest
();
logger
.
info
(
"request>>>"
,
request
);
logger
.
info
(
"request>>>"
,
request
);
// 不需要添加请求头的接口
// 不需要添加请求头的接口
String
[]
url
=
new
String
[]{
"/api/user/selectInfo"
,
"/api/user/save/curCompany"
,
"/
openapi/
bizToken/applyToken"
,
"/openapi/bizToken/getAppId"
,
"/lift/upload"
,
"/lift/status"
,
"/lift/run"
,
"/lift/fault"
,
"/lift/video/preview"
,
"/cylinderPage/serviceProvider"
,
"/cylinderPage/getTableInfo"
,
"/cylinderPage/initCylinderNum"
,
"/openapi/appId/setAppId"
};
String
[]
url
=
new
String
[]{
"/api/user/selectInfo"
,
"/api/user/save/curCompany"
,
"/bizToken/applyToken"
,
"/openapi/bizToken/getAppId"
,
"/lift/upload"
,
"/lift/status"
,
"/lift/run"
,
"/lift/fault"
,
"/lift/video/preview"
,
"/cylinderPage/serviceProvider"
,
"/cylinderPage/getTableInfo"
,
"/cylinderPage/initCylinderNum"
,
"/openapi/appId/setAppId"
};
// 获取请求路径
// 获取请求路径
for
(
String
uri
:
url
)
{
for
(
String
uri
:
url
)
{
if
(
request
.
getRequestURI
().
indexOf
(
uri
)
!=
-
1
)
{
if
(
request
.
getRequestURI
().
indexOf
(
uri
)
!=
-
1
)
{
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/config/FeignAuthRequestInterceptor.java
View file @
d80bc65b
...
@@ -5,6 +5,7 @@ import feign.RequestTemplate;
...
@@ -5,6 +5,7 @@ import feign.RequestTemplate;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -35,6 +36,12 @@ public class FeignAuthRequestInterceptor implements RequestInterceptor {
...
@@ -35,6 +36,12 @@ public class FeignAuthRequestInterceptor implements RequestInterceptor {
if
(
product
==
null
)
{
if
(
product
==
null
)
{
product
=
request
.
getParameter
(
"product"
);
product
=
request
.
getParameter
(
"product"
);
}
}
if
(
appKey
==
null
)
{
appKey
=
RequestContext
.
getAppKey
();
}
if
(
product
==
null
)
{
product
=
RequestContext
.
getProduct
();
}
template
.
header
(
"X-Access-Token"
,
authToken
);
template
.
header
(
"X-Access-Token"
,
authToken
);
template
.
header
(
"token"
,
authToken
);
template
.
header
(
"token"
,
authToken
);
template
.
header
(
"appKey"
,
appKey
);
template
.
header
(
"appKey"
,
appKey
);
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/EquipmentCategoryController.java
0 → 100644
View file @
d80bc65b
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
controller
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.api.openapi.feign.TzsServiceFeignClient
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
/**
* 特种设备监管controller
*
* @author Administrator
*/
@RestController
@Api
(
tags
=
"设备定义Api"
)
@RequestMapping
(
value
=
"/equipment-category"
)
public
class
EquipmentCategoryController
{
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
/**
* 设备定义列表数据查询
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备定义列表数据查询"
,
notes
=
"设备定义列表数据查询"
)
public
ResponseModel
<
List
<
EquipmentCategoryDto
>>
page
()
{
return
tzsServiceFeignClient
.
getEquipmentCategoryList
();
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/FilesController.java
View file @
d80bc65b
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
controller
;
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
controller
;
import
java.text.SimpleDateFormat
;
import
com.yeejoin.amos.api.common.restful.utils.ResponseHelper
;
import
java.util.Date
;
import
com.yeejoin.amos.api.common.restful.utils.ResponseModel
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.logging.SimpleFormatter
;
import
com.yeejoin.amos.api.openapi.enums.FileFolderPathEnum
;
import
com.yeejoin.amos.api.openapi.enums.FileFolderPathEnum
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
net.sf.json.JSONObject
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudResource
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
com.yeejoin.amos.api.common.restful.utils.ResponseHelper
;
import
java.text.SimpleDateFormat
;
import
com.yeejoin.amos.api.common.restful.utils.ResponseModel
;
import
java.util.Date
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
java.util.Iterator
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
java.util.Map
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
net.sf.json.JSONObject
;
@RestController
@RestController
@RequestMapping
(
value
=
"/filestorage"
)
@RequestMapping
(
value
=
"/filestorage"
)
@Api
(
tags
=
"filestorage-上传附件数据对接"
)
@Api
(
tags
=
"filestorage-上传附件数据对接"
)
public
class
FilesController
{
public
class
FilesController
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
FilesController
.
class
);
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
FilesController
.
class
);
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"气瓶充装审核数据"
)
@ApiOperation
(
value
=
"气瓶充装审核数据"
)
@PostMapping
(
value
=
"/"
)
@PostMapping
(
value
=
"/"
)
public
ResponseModel
<
String
>
uploadCylinderFiles
(
public
ResponseModel
<
String
>
uploadCylinderFiles
(
@RequestBody
MultipartFile
file
)
throws
Exception
@RequestBody
MultipartFile
file
)
throws
Exception
{
{
logger
.
info
(
file
);
logger
.
info
(
file
);
JSONObject
jsonObj
=
uploadFile
(
file
,
FileFolderPathEnum
.
CYLINDER
.
getPath
());
JSONObject
jsonObj
=
uploadFile
(
file
,
FileFolderPathEnum
.
CYLINDER
.
getPath
());
return
ResponseHelper
.
buildResponse
(
jsonObj
.
toString
());
return
ResponseHelper
.
buildResponse
(
jsonObj
.
toString
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"检验报告数据"
)
@ApiOperation
(
value
=
"检验报告数据"
)
@PostMapping
(
value
=
"/csei"
)
@PostMapping
(
value
=
"/csei"
)
public
ResponseModel
<
String
>
uploadCseiFiles
(
public
ResponseModel
<
String
>
uploadCseiFiles
(
@RequestBody
MultipartFile
file
)
throws
Exception
@RequestBody
MultipartFile
file
)
throws
Exception
{
{
logger
.
info
(
file
);
logger
.
info
(
file
);
JSONObject
jsonObj
=
uploadFile
(
file
,
FileFolderPathEnum
.
JY
.
getPath
());
JSONObject
jsonObj
=
uploadFile
(
file
,
FileFolderPathEnum
.
JY
.
getPath
());
return
ResponseHelper
.
buildResponse
(
jsonObj
.
toString
());
return
ResponseHelper
.
buildResponse
(
jsonObj
.
toString
());
}
}
private
JSONObject
uploadFile
(
MultipartFile
file
,
String
tag
)
{
if
(
ValidationUtil
.
isEmpty
(
file
))
{
throw
new
BadRequest
(
"参数校验失败."
);
}
Date
today
=
new
Date
();
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyyMM"
);
String
path
=
format
.
format
(
today
);
FeignClientResult
<
Map
<
String
,
String
>>
date
=
Systemctl
.
fileStorageClient
.
updateCommonFileFree
(
file
,
"tzs/"
+
tag
+
"/"
+
path
);
JSONObject
jsonObj
=
new
JSONObject
();
if
(
date
!=
null
)
{
Map
<
String
,
String
>
map
=
date
.
getResult
();
Iterator
<
String
>
it
=
map
.
keySet
().
iterator
();
while
(
it
.
hasNext
())
{
String
urlString
=
it
.
next
();
jsonObj
.
put
(
"fileUrl"
,
urlString
);
jsonObj
.
put
(
"fileName"
,
map
.
get
(
urlString
));
}
}
return
jsonObj
;
}
private
JSONObject
uploadFile
(
MultipartFile
file
,
String
tag
)
{
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
if
(
ValidationUtil
.
isEmpty
(
file
)){
@ApiOperation
(
value
=
"上传附件"
)
throw
new
BadRequest
(
"参数校验失败."
);
@PostMapping
(
"/supma"
)
}
public
ResponseModel
<
JSONObject
>
upload
(
@RequestBody
MultipartFile
file
)
{
Date
today
=
new
Date
();
JSONObject
jsonObject
=
uploadFile
(
file
,
FileFolderPathEnum
.
JG
.
getPath
());
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyyMM"
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
String
path
=
format
.
format
(
today
);
}
FeignClientResult
<
Map
<
String
,
String
>>
date
=
Systemctl
.
fileStorageClient
.
updateCommonFileFree
(
file
,
"tzs/"
+
tag
+
"/"
+
path
);
JSONObject
jsonObj
=
new
JSONObject
();
if
(
date
!=
null
)
{
Map
<
String
,
String
>
map
=
date
.
getResult
();
Iterator
<
String
>
it
=
map
.
keySet
().
iterator
();
while
(
it
.
hasNext
())
{
String
urlString
=
it
.
next
();
jsonObj
.
put
(
"fileUrl"
,
urlString
);
jsonObj
.
put
(
"fileName"
,
map
.
get
(
urlString
));
}
}
return
jsonObj
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"上传附件"
)
@ApiOperation
(
value
=
"通用上传附件"
)
@PostMapping
(
"/supma"
)
@PostMapping
(
"/{module}/upload"
)
public
ResponseModel
<
JSONObject
>
upload
(
@RequestBody
MultipartFile
file
){
public
ResponseModel
<
JSONObject
>
upload2
(
@RequestBody
MultipartFile
file
,
@PathVariable
String
module
)
{
JSONObject
jsonObject
=
uploadFile
(
file
,
FileFolderPathEnum
.
JG
.
getPath
());
JSONObject
jsonObject
=
uploadFile
(
file
,
FileFolderPathEnum
.
valueOf
(
module
.
toUpperCase
()).
getPath
());
// FeignClientResult<Map<String, String>> date = Systemctl.fileStorageClient.updateCommonFile(file);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
// JSONObject jsonObj = new JSONObject();
}
// if (date != null) {
// Map<String, String> map = date.getResult();
// Iterator<String> it = map.keySet().iterator();
// String urlString=it.next();
// jsonObj.put("fileUrl", urlString);
// jsonObj.put("fileName", map.get(urlString));
// }
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/JyjcController.java
0 → 100644
View file @
d80bc65b
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
controller
;
import
com.yeejoin.amos.api.openapi.face.dto.JyjcInspectionResultDataModel
;
import
com.yeejoin.amos.api.openapi.feign.JyjcServiceFeignClient
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
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.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
/**
* 特种设备监管controller
*
* @author Administrator
*/
@RestController
@Api
(
tags
=
"检验检测Api"
)
@RequestMapping
(
value
=
"/inspection"
)
public
class
JyjcController
{
@Autowired
JyjcServiceFeignClient
jyjcServiceFeignClient
;
/**
* 设备定义列表数据查询
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/result-submit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"检验检测结果回传"
,
notes
=
"检验检测结果回传"
)
public
ResponseModel
<
List
<
JyjcInspectionResultDataModel
>>
resultSubmit
(
@RequestBody
List
<
JyjcInspectionResultDataModel
>
resultDataModels
)
{
return
jyjcServiceFeignClient
.
saveResultDataBatch
(
resultDataModels
);
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/enums/FileFolderPathEnum.java
View file @
d80bc65b
...
@@ -38,9 +38,14 @@ public enum FileFolderPathEnum {
...
@@ -38,9 +38,14 @@ public enum FileFolderPathEnum {
/**
/**
* 检验报告
* 检验报告
*/
*/
JY
(
"jg"
,
"/csei"
)
JY
(
"jg"
,
"/csei"
),
;
/**
* 检验检测
*/
JYJC
(
"jyjc"
,
"/jyjc"
);
private
String
module
;
private
String
module
;
private
String
path
;
private
String
path
;
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/dto/AttachmentData.java
0 → 100644
View file @
d80bc65b
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
dto
;
import
lombok.Data
;
import
java.util.List
;
/**
* @author Administrator
*/
@Data
public
class
AttachmentData
{
/**
* 附件类型
*/
public
String
attachmentType
;
/**
* 附件列表
*/
public
List
<
AttachmentModel
>
attachmentContent
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/dto/AttachmentModel.java
0 → 100644
View file @
d80bc65b
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
dto
;
import
lombok.Data
;
/**
* @author Administrator
* 附件结构
*/
@Data
public
class
AttachmentModel
{
/**
* 附件名称
*/
String
name
;
/**
* 附件路径
*/
String
url
;
/**
* 前端标识
*/
String
uid
;
/**
* 前端附件状态
*/
String
status
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/dto/EquipmentCategoryDto.java
0 → 100644
View file @
d80bc65b
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 装备分类
*
* @author system_generator
* @date 2021-10-20
*/
@Data
@ApiModel
(
value
=
"EquipmentCategoryDto"
,
description
=
"装备分类"
)
public
class
EquipmentCategoryDto
{
private
static
final
long
serialVersionUID
=
1L
;
private
Long
id
;
private
String
parentId
;
@ApiModelProperty
(
value
=
"装备分类编码"
)
private
String
code
;
@ApiModelProperty
(
value
=
"装备分类名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"描述"
)
private
String
description
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
private
Date
createDate
;
@ApiModelProperty
(
value
=
"行业编码"
)
private
String
industryCode
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/dto/JyjcInspectionResultDataModel.java
0 → 100644
View file @
d80bc65b
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
dto
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* 业务开通申请表
*
* @author system_generator
* @date 2023-12-14
*/
@Data
@ApiModel
(
value
=
"JyjcInspectionResultDataModel"
,
description
=
"检验检测结果数据接收"
)
public
class
JyjcInspectionResultDataModel
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"报检单号"
)
private
String
applicationNo
;
@ApiModelProperty
(
value
=
"监管码"
)
private
String
supervisoryCode
;
@ApiModelProperty
(
value
=
"检验结果状态(已出2、未出1)"
)
private
String
resultStatus
;
@ApiModelProperty
(
value
=
"核准证号/许可证号"
)
private
String
licenseNumber
;
@ApiModelProperty
(
value
=
"检验报告编号"
)
private
String
resultNo
;
@ApiModelProperty
(
value
=
"内部人员代码"
)
private
String
innerPersonCode
;
@ApiModelProperty
(
value
=
"检验结论"
)
private
String
inspectionConclusion
;
@ApiModelProperty
(
value
=
"检验日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
inspectionDate
;
@ApiModelProperty
(
value
=
"下次检验日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
nextInspectionDate
;
@ApiModelProperty
(
value
=
"检验开始日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
inspectionStartDate
;
@ApiModelProperty
(
value
=
"检验结束日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
inspectionEndDate
;
@ApiModelProperty
(
value
=
"检验结果汇总"
)
private
String
inspectionResultSummary
;
@ApiModelProperty
(
value
=
"不符合项"
)
private
JSONArray
nonConformance
;
@ApiModelProperty
(
value
=
"附件"
)
private
List
<
AttachmentData
>
attachments
;
@ApiModelProperty
(
value
=
"检验结果技术参数"
)
private
JSONObject
techParams
;
/**
* 校验检验系统唯一流水号,排查问题,跟踪问题使用
*/
private
String
traceId
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/feign/JyjcServiceFeignClient.java
0 → 100644
View file @
d80bc65b
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
feign
;
import
com.yeejoin.amos.api.openapi.config.FeignConfiguration
;
import
com.yeejoin.amos.api.openapi.face.dto.JyjcInspectionResultDataModel
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
@FeignClient
(
name
=
"TZS-JYJC"
,
path
=
"/jyjc"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
JyjcServiceFeignClient
{
/**
* 报检结果接收
*
* @param resultDataModels 请求体
* @return 是否成功
*/
@RequestMapping
(
value
=
"/jyjc-inspection-result/receive"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
List
<
JyjcInspectionResultDataModel
>>
saveResultDataBatch
(
@RequestBody
List
<
JyjcInspectionResultDataModel
>
resultDataModels
);
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/feign/TzsServiceFeignClient.java
View file @
d80bc65b
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.api.openapi.feign;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.api.openapi.feign;
import
com.yeejoin.amos.api.openapi.config.FeignConfiguration
;
import
com.yeejoin.amos.api.openapi.config.FeignConfiguration
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto
;
import
com.yeejoin.amos.api.openapi.face.model.InspectionDetectionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.InspectionDetectionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel
;
import
com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel
;
...
@@ -95,4 +96,11 @@ public interface TzsServiceFeignClient {
...
@@ -95,4 +96,11 @@ public interface TzsServiceFeignClient {
@RequestMapping
(
value
=
"/equipment-category/deleteByRecord"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/equipment-category/deleteByRecord"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Boolean
>
deleteEquipmentInfo
(
@RequestParam
String
record
);
ResponseModel
<
Boolean
>
deleteEquipmentInfo
(
@RequestParam
String
record
);
/**
* 设备定义列表数据
* @return <List<EquipmentCategoryDto>>
*/
@RequestMapping
(
value
=
"/equipment-category/list"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
EquipmentCategoryDto
>>
getEquipmentCategoryList
();
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/feign/TzsTcmServiceFeignClient.java
View file @
d80bc65b
...
@@ -2,22 +2,12 @@ package com.yeejoin.amos.api.openapi.feign;
...
@@ -2,22 +2,12 @@ package com.yeejoin.amos.api.openapi.feign;
import
com.yeejoin.amos.api.openapi.config.FeignConfiguration
;
import
com.yeejoin.amos.api.openapi.config.FeignConfiguration
;
import
com.yeejoin.amos.api.openapi.config.MultipartSupportConfig
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto
;
import
com.yeejoin.amos.api.openapi.face.model.InspectionDetectionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
import
java.util.Map
;
@FeignClient
(
name
=
"TZS-COMMON"
,
path
=
"/tcm"
,
configuration
=
@FeignClient
(
name
=
"TZS-COMMON"
,
path
=
"/tcm"
,
configuration
=
{
FeignConfiguration
.
class
})
{
FeignConfiguration
.
class
})
public
interface
TzsTcmServiceFeignClient
{
public
interface
TzsTcmServiceFeignClient
{
...
...
amos-boot-data/amos-boot-data-openapi/src/main/resources/application-jyjc.properties
0 → 100644
View file @
d80bc65b
spring.application.name
=
AMOS-API-OPENAPI-JYJC
server.servlet.context-path
=
/openapijyjc
server.port
=
11003
# jdbc_config
spring.datasource.url
=
jdbc:vastbase://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_openapi_cyl&allowMultiQueries=true
spring.datasource.username
=
admin
spring.datasource.password
=
Yeejoin@2023
spring.datasource.driver-class-name
=
cn.com.vastbase.Driver
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle
=
5
spring.datasource.hikari.maximum-pool-size
=
15
spring.datasource.hikari.auto-commit
=
true
spring.datasource.hikari.idle-timeout
=
30000
spring.datasource.hikari.pool-name
=
DatebookHikariCP
spring.datasource.hikari.max-lifetime
=
1800000
spring.datasource.hikari.connection-timeout
=
30000
spring.datasource.hikari.connection-test-query
=
SELECT 1
# REDIS (RedisProperties)
spring.redis.database
=
1
spring.redis.host
=
172.16.10.243
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-wait
=
-1
spring.redis.lettuce.pool.max-idle
=
10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.expire.time
=
300
#注册中心地址
eureka.client.service-url.defaultZone
=
http://172.16.10.243:10001/eureka/
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
eureka.instance.status-page-url
=
http://localhost:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs
=
http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
##emqx
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.10.243:2883
emqx.client-user-name
=
admin
emqx.client-password
=
public
emqx.keepAliveInterval
=
1000
##biz custem properties
biz.lxyd.lift.url
=
http://39.106.181.149:8088/elevatorapi
amos-boot-data/amos-boot-data-openapi/src/main/resources/logback-jyjc.xml
0 → 100644
View file @
d80bc65b
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
>
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property
name=
"LOG_HOME"
value=
"/opt/log/qa"
/>
<!-- 按照每天生成日志文件 -->
<appender
name=
"FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_HOME}/openapicyl.log.%d{yyyy-MM-dd}.log
</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>
7
</MaxHistory>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
20mb
</MaxFileSize>
</triggeringPolicy>
</appender>
<!-- 控制台输出 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!--myibatis log configure-->
<logger
name=
"com.apache.ibatis"
level=
"ERROR"
/>
<logger
name=
"org.mybatis"
level=
"ERROR"
/>
<logger
name=
"java.sql.Connection"
level=
"ERROR"
/>
<logger
name=
"java.sql.Statement"
level=
"ERROR"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"ERROR"
/>
<logger
name=
"com.baomidou.mybatisplus"
level=
"ERROR"
/>
<logger
name=
"org.typroject"
level=
"ERROR"
/>
<logger
name=
"com.yeejoin"
level=
"ERROR"
/>
<logger
name=
"org.springframework"
level=
"INFO"
/>
<!-- 日志输出级别 -->
<root
level=
"DEBUG"
>
<appender-ref
ref=
"STDOUT"
/>
</root>
</configuration>
\ 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/controller/JyjcInspectionApplicationController.java
View file @
d80bc65b
...
@@ -292,8 +292,8 @@ public class JyjcInspectionApplicationController extends BaseController {
...
@@ -292,8 +292,8 @@ public class JyjcInspectionApplicationController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"报检信息
推送测试"
,
notes
=
"报检信息推送测试
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"报检信息
手工推送至kafka"
,
notes
=
"报检信息手工推送至kafka,预留
"
)
@GetMapping
(
value
=
"/
test
-push"
)
@GetMapping
(
value
=
"/
data
-push"
)
public
void
pushTest
(
public
void
pushTest
(
@RequestParam
(
"id"
)
Long
id
)
{
@RequestParam
(
"id"
)
Long
id
)
{
JyjcInspectionApplicationModel
model
=
jyjcInspectionApplicationServiceImpl
.
queryBySeq
(
id
);
JyjcInspectionApplicationModel
model
=
jyjcInspectionApplicationServiceImpl
.
queryBySeq
(
id
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcInspectionResultController.java
View file @
d80bc65b
...
@@ -183,8 +183,8 @@ public class JyjcInspectionResultController extends BaseController {
...
@@ -183,8 +183,8 @@ public class JyjcInspectionResultController extends BaseController {
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"报检结果接收"
,
notes
=
"对外对接使用,支持单条及批量"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"报检结果接收"
,
notes
=
"对外对接使用,支持单条及批量"
)
@PostMapping
(
value
=
"/receive
/data
"
)
@PostMapping
(
value
=
"/receive"
)
public
ResponseModel
<
List
<
JyjcInspectionResultDataModel
>>
receivePushResultData
(
@RequestBody
List
<
JyjcInspectionResultDataModel
>
resultDataModels
){
public
ResponseModel
<
List
<
JyjcInspectionResultDataModel
>>
saveResultDataBatch
(
@RequestBody
List
<
JyjcInspectionResultDataModel
>
resultDataModels
){
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
receivePushResultData
(
resultDataModels
));
return
ResponseHelper
.
buildResponse
(
jyjcInspectionResultServiceImpl
.
receivePushResultData
(
resultDataModels
));
}
}
}
}
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 @
d80bc65b
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/JyjcInspectionResultServiceImpl.java
View file @
d80bc65b
...
@@ -381,11 +381,11 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -381,11 +381,11 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
List
<
JyjcInspectionResultParam
>
resultParams
=
new
ArrayList
<>();
List
<
JyjcInspectionResultParam
>
resultParams
=
new
ArrayList
<>();
resultDataModels
.
forEach
(
r
->
{
resultDataModels
.
forEach
(
r
->
{
// 填充主表数据
// 填充主表数据
this
.
fillResultData
(
r
,
resultListMap
.
get
(
r
.
getApplicationNo
()));
this
.
fillResultData
(
r
,
resultListMap
.
get
(
r
.
getApplicationNo
()
+
":"
+
r
.
getSupervisoryCode
()
));
// 填充附件数据
// 填充附件数据
this
.
fillResultAttachmentData
(
r
,
resultListMap
.
get
(
r
.
getApplicationNo
()),
resultAttachments
);
this
.
fillResultAttachmentData
(
r
,
resultListMap
.
get
(
r
.
getApplicationNo
()
+
":"
+
r
.
getSupervisoryCode
()
),
resultAttachments
);
// 填充技术参数数据
// 填充技术参数数据
this
.
fillResultParamData
(
r
,
resultListMap
.
get
(
r
.
getApplicationNo
()),
resultParams
);
this
.
fillResultParamData
(
r
,
resultListMap
.
get
(
r
.
getApplicationNo
()
+
":"
+
r
.
getSupervisoryCode
()
),
resultParams
);
});
});
// 2.批量保存主表数据
// 2.批量保存主表数据
this
.
updateBatchById
(
resultListMap
.
values
());
this
.
updateBatchById
(
resultListMap
.
values
());
...
@@ -472,8 +472,11 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -472,8 +472,11 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
private
Map
<
String
,
JyjcInspectionResult
>
queryWaitUpdateResultList
(
List
<
JyjcInspectionResultDataModel
>
resultDataModels
)
{
private
Map
<
String
,
JyjcInspectionResult
>
queryWaitUpdateResultList
(
List
<
JyjcInspectionResultDataModel
>
resultDataModels
)
{
List
<
String
>
applicationNos
=
resultDataModels
.
stream
().
map
(
JyjcInspectionResultDataModel:
:
getApplicationNo
).
collect
(
Collectors
.
toList
());
List
<
String
>
applicationNos
=
resultDataModels
.
stream
().
map
(
JyjcInspectionResultDataModel:
:
getApplicationNo
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
JyjcInspectionResult
>
wrapper
=
new
LambdaQueryWrapper
<
JyjcInspectionResult
>().
in
(
JyjcInspectionResult:
:
getApplicationNo
,
applicationNos
);
List
<
String
>
supervisoryCodes
=
resultDataModels
.
stream
().
map
(
JyjcInspectionResultDataModel:
:
getSupervisoryCode
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
JyjcInspectionResult
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
JyjcInspectionResult:
:
getApplicationNo
,
applicationNos
);
wrapper
.
in
(
JyjcInspectionResult:
:
getSupervisoryCode
,
supervisoryCodes
);
List
<
JyjcInspectionResult
>
resultList
=
this
.
list
(
wrapper
);
List
<
JyjcInspectionResult
>
resultList
=
this
.
list
(
wrapper
);
return
resultList
.
stream
().
collect
(
Collectors
.
toMap
(
JyjcInspectionResult:
:
getApplicationNo
,
Function
.
identity
()));
return
resultList
.
stream
().
collect
(
Collectors
.
toMap
(
(
c
)->
c
.
getApplicationNo
()
+
":"
+
c
.
getSupervisoryCode
()
,
Function
.
identity
()));
}
}
}
}
\ 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/handler/AbstractJyjcInspectionApplicationHandlerServiceImpl.java
deleted
100644 → 0
View file @
7b9ba3d9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
.
handler
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionApplicationHandlerService
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcInspectionApplicationPushLogServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Map
;
/**
* <p>
* ProjectName: amos-boot-biz
* PackageName: com.yeejoin.amos.boot.module.jyjc.biz.service.impl.handler
*
* @author yangyang
* @version v1.0
* @date 2023/12/15 16:12
*/
@Component
public
class
AbstractJyjcInspectionApplicationHandlerServiceImpl
implements
IJyjcInspectionApplicationHandlerService
{
@Autowired
private
JyjcInspectionApplicationPushLogServiceImpl
applicationPushLogService
;
@Override
public
String
type
()
{
return
"default"
;
}
@Override
public
boolean
notifyInspectionUnit
(
Map
<
String
,
Object
>
params
)
{
// push日志
applicationPushLogService
.
saveInspectionApplicationPushLog
(
params
);
return
true
;
}
}
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/handler/DetectionInspectionApplicationHandlerServiceImpl.java
deleted
100644 → 0
View file @
7b9ba3d9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
.
handler
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
org.springframework.stereotype.Component
;
import
java.util.Map
;
/**
* 检测
* <p>
* ProjectName: amos-boot-biz
* PackageName: com.yeejoin.amos.boot.module.jyjc.biz.service.impl.handler
*
* @author yangyang
* @version v1.0
* @date 2023/12/15 16:32
*/
@Component
public
class
DetectionInspectionApplicationHandlerServiceImpl
extends
AbstractJyjcInspectionApplicationHandlerServiceImpl
{
@Override
public
String
type
()
{
return
BizTypeEnum
.
DETECTION
.
getCode
();
}
@Override
public
boolean
notifyInspectionUnit
(
Map
<
String
,
Object
>
params
)
{
super
.
notifyInspectionUnit
(
params
);
// todo
return
true
;
}
}
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/handler/FirstInspectionApplicationHandlerServiceImpl.java
deleted
100644 → 0
View file @
7b9ba3d9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
.
handler
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
org.springframework.stereotype.Component
;
import
java.util.Map
;
/**
* 定检
* <p>
* ProjectName: amos-boot-biz
* PackageName: com.yeejoin.amos.boot.module.jyjc.biz.service.impl.handler
*
* @author yangyang
* @version v1.0
* @date 2023/12/15 16:32
*/
@Component
public
class
FirstInspectionApplicationHandlerServiceImpl
extends
AbstractJyjcInspectionApplicationHandlerServiceImpl
{
@Override
public
String
type
()
{
return
BizTypeEnum
.
FIRST_INSPECTION
.
getCode
();
}
@Override
public
boolean
notifyInspectionUnit
(
Map
<
String
,
Object
>
params
)
{
super
.
notifyInspectionUnit
(
params
);
// todo
return
true
;
}
}
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/handler/JyjcInspectionApplicationHandlerFactory.java
deleted
100644 → 0
View file @
7b9ba3d9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
.
handler
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcInspectionApplicationHandlerService
;
import
org.springframework.beans.BeansException
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Objects
;
/**
* @author yangyang
* @version v1.0
* @date 2023/11/8 15:10
*/
@Service
public
class
JyjcInspectionApplicationHandlerFactory
implements
ApplicationContextAware
{
private
static
final
Map
<
String
,
IJyjcInspectionApplicationHandlerService
>
SERVICE_POOL
=
new
HashMap
<>(
12
);
@Override
public
void
setApplicationContext
(
ApplicationContext
applicationContext
)
throws
BeansException
{
applicationContext
.
getBeansOfType
(
IJyjcInspectionApplicationHandlerService
.
class
).
forEach
((
beanName
,
bean
)
->
SERVICE_POOL
.
put
(
bean
.
type
(),
bean
));
}
public
static
IJyjcInspectionApplicationHandlerService
apply
(
String
type
)
{
IJyjcInspectionApplicationHandlerService
objectSceneService
=
SERVICE_POOL
.
get
(
type
);
if
(
Objects
.
isNull
(
objectSceneService
))
{
throw
new
IllegalArgumentException
(
"SERVICE_POOL type: "
+
type
+
" is not found !"
);
}
return
objectSceneService
;
}
}
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/handler/SuperviseInspectionApplicationHandlerServiceImpl.java
deleted
100644 → 0
View file @
7b9ba3d9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
.
handler
;
import
com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum
;
import
org.springframework.stereotype.Component
;
import
java.util.Map
;
/**
* 监督检验
*
* <p>
* ProjectName: amos-boot-biz
* PackageName: com.yeejoin.amos.boot.module.jyjc.biz.service.impl.handler
*
* @author yangyang
* @version v1.0
* @date 2023/12/15 16:32
*/
@Component
public
class
SuperviseInspectionApplicationHandlerServiceImpl
extends
AbstractJyjcInspectionApplicationHandlerServiceImpl
{
@Override
public
String
type
()
{
return
BizTypeEnum
.
SUPERVISE
.
getCode
();
}
@Override
public
boolean
notifyInspectionUnit
(
Map
<
String
,
Object
>
params
)
{
super
.
notifyInspectionUnit
(
params
);
// todo
return
true
;
}
}
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