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
0fafb10e
Commit
0fafb10e
authored
Jan 07, 2025
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_bugfix' into develop_tzs_bugfix
parents
b8e7f3b4
141bc55b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
216 additions
and
37 deletions
+216
-37
application-dev.properties
...a-accessapi/src/main/resources/application-dev.properties
+14
-9
DataDockController.java
...mos/boot/module/jg/biz/controller/DataDockController.java
+22
-12
DataHandlerController.java
.../boot/module/jg/biz/controller/DataHandlerController.java
+8
-0
DataDockServiceImpl.java
.../boot/module/jg/biz/service/impl/DataDockServiceImpl.java
+126
-12
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+26
-4
IdxBizJgProjectContraptionMapper.java
...dule/ymt/api/mapper/IdxBizJgProjectContraptionMapper.java
+3
-0
IdxBizJgProjectContraptionMapper.xml
...ain/resources/mapper/IdxBizJgProjectContraptionMapper.xml
+17
-0
No files found.
amos-boot-data/amos-boot-data-accessapi/src/main/resources/application-dev.properties
View file @
0fafb10e
...
@@ -3,8 +3,7 @@ server.servlet.context-path=/accessapi
...
@@ -3,8 +3,7 @@ server.servlet.context-path=/accessapi
server.port
=
11005
server.port
=
11005
# jdbc_config
# jdbc_config
spring.datasource.driver-class-name
=
org.postgresql.Driver
spring.datasource.driver-class-name
=
org.postgresql.Driver
spring.datasource.url
=
jdbc:postgresql://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=amos_data_accessapi&allowMultiQueries=true
spring.datasource.url
=
jdbc:postgresql://172.16.10.243:5432/tzs_amos_tzs_biz_init?currentSchema=amos_data_accessapi&allowMultiQueries=true
#spring.datasource.url=jdbc:vastbase://36.46.151.113:5432/tzs_amos_tzs_biz_init?currentSchema=amos_tzs_biz
spring.datasource.username
=
admin
spring.datasource.username
=
admin
spring.datasource.password
=
Yeejoin@2023
spring.datasource.password
=
Yeejoin@2023
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
spring.datasource.type
=
com.zaxxer.hikari.HikariDataSource
...
@@ -19,7 +18,7 @@ spring.datasource.hikari.connection-test-query=SELECT 1
...
@@ -19,7 +18,7 @@ spring.datasource.hikari.connection-test-query=SELECT 1
# REDIS (RedisProperties)
# REDIS (RedisProperties)
spring.redis.database
=
1
spring.redis.database
=
1
spring.redis.host
=
172.16.10.2
30
spring.redis.host
=
172.16.10.2
43
spring.redis.port
=
6379
spring.redis.port
=
6379
spring.redis.password
=
yeejoin@2020
spring.redis.password
=
yeejoin@2020
spring.redis.lettuce.pool.max-active
=
200
spring.redis.lettuce.pool.max-active
=
200
...
@@ -28,21 +27,21 @@ spring.redis.lettuce.pool.max-idle=10
...
@@ -28,21 +27,21 @@ spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle
=
0
spring.redis.lettuce.pool.min-idle
=
0
#注册中心地址
#注册中心地址
eureka.client.service-url.defaultZone
=
http://172.16.10.2
30
:10001/eureka/
eureka.client.service-url.defaultZone
=
http://172.16.10.2
43
:10001/eureka/
eureka.instance.prefer-ip-address
=
true
eureka.instance.prefer-ip-address
=
true
management.endpoint.health.show-details
=
always
management.endpoint.health.show-details
=
always
management.endpoints.web.exposure.include
=
*
management.endpoints.web.exposure.include
=
*
eureka.instance.health-check-url
=
http://
localhost
:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.health-check-url
=
http://
172.16.3.89
:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path
=
${server.servlet.context-path}/actuator
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.status-page-url
=
http://
172.16.3.89
:${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
eureka.instance.metadata-map.management.api-docs
=
http://
172.16.3.89
:${server.port}${server.servlet.context-path}/swagger-ui.html
eureka.instance.ip-address
=
localhost
eureka.instance.ip-address
=
172.16.3.89
eureka.instance.instance-id
=
${eureka.instance.ip-address}:${server.port}
eureka.instance.instance-id
=
${eureka.instance.ip-address}:${server.port}
##emqx
##emqx
emqx.clean-session
=
true
emqx.clean-session
=
true
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.client-id
=
${spring.application.name}-${random.int[1024,65536]}
emqx.broker
=
tcp://172.16.10.2
30
:2883
emqx.broker
=
tcp://172.16.10.2
43
:2883
emqx.client-user-name
=
super
emqx.client-user-name
=
super
emqx.client-password
=
123456
emqx.client-password
=
123456
...
@@ -68,3 +67,8 @@ spring.redis.cluster.failed-attempts=3
...
@@ -68,3 +67,8 @@ spring.redis.cluster.failed-attempts=3
spring.redis.cluster.slave-connection-pool-size
=
64
spring.redis.cluster.slave-connection-pool-size
=
64
spring.redis.cluster.master-connection-pool-size
=
64
spring.redis.cluster.master-connection-pool-size
=
64
spring.redis.cluster.retry-interval
=
1500
spring.redis.cluster.retry-interval
=
1500
amos.system.user.user-name
=
robot_admin
amos.system.user.password
=
a1234567
amos.system.user.app-key
=
AMOS_STUDIO
amos.system.user.product
=
AMOS_STUDIO_WEB
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DataDockController.java
View file @
0fafb10e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.DataDockServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.DataDockServiceImpl
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.io.FilenameUtils
;
import
org.apache.commons.io.FilenameUtils
;
...
@@ -8,6 +9,7 @@ import org.springframework.validation.annotation.Validated;
...
@@ -8,6 +9,7 @@ import org.springframework.validation.annotation.Validated;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
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.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -52,9 +54,7 @@ public class DataDockController {
...
@@ -52,9 +54,7 @@ public class DataDockController {
String
contentType
=
file
.
getContentType
();
String
contentType
=
file
.
getContentType
();
String
fileExtension
=
FilenameUtils
.
getExtension
(
file
.
getOriginalFilename
());
String
fileExtension
=
FilenameUtils
.
getExtension
(
file
.
getOriginalFilename
());
// 校验 Excel 文件的 MIME type 和扩展名
// 校验 Excel 文件的 MIME type 和扩展名
if
(!(
"application/vnd.ms-excel"
.
equals
(
contentType
)
||
if
(!(
"application/vnd.ms-excel"
.
equals
(
contentType
)
||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
.
equals
(
contentType
))
||
!(
"xls"
.
equalsIgnoreCase
(
fileExtension
)
||
"xlsx"
.
equalsIgnoreCase
(
fileExtension
)))
{
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
.
equals
(
contentType
))
||
!(
"xls"
.
equalsIgnoreCase
(
fileExtension
)
||
"xlsx"
.
equalsIgnoreCase
(
fileExtension
)))
{
return
ResponseHelper
.
buildResponse
(
"文件类型必须是 Excel 文件"
);
return
ResponseHelper
.
buildResponse
(
"文件类型必须是 Excel 文件"
);
}
}
return
ResponseHelper
.
buildResponse
(
dataDockService
.
dataCheckAndImportEquipmentData
(
remark
,
file
));
return
ResponseHelper
.
buildResponse
(
dataDockService
.
dataCheckAndImportEquipmentData
(
remark
,
file
));
...
@@ -68,14 +68,24 @@ public class DataDockController {
...
@@ -68,14 +68,24 @@ public class DataDockController {
// return ResponseHelper.buildResponse("ok");
// return ResponseHelper.buildResponse("ok");
// }
// }
// @TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
// @GetMapping(value = "/yanChang/ORG_BRANCH_CODE")
@GetMapping
(
value
=
"/yanChang/ORG_BRANCH_CODE"
)
// @ApiOperation(httpMethod = "get", value = "延炼-延长-刷入属地监管部门", notes = "延炼-延长-刷入属地监管部门")
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"延炼-延长-刷入属地监管部门"
,
notes
=
"延炼-延长-刷入属地监管部门"
)
// public Object writeOrgBranchCode2YanChang(@NotNull @RequestParam String remark) {
public
Object
writeOrgBranchCode2YanChang
(
@RequestParam
String
remark
)
{
// if (ValidationUtil.isEmpty(remark)) {
if
(
ValidationUtil
.
isEmpty
(
remark
))
{
// throw new BadRequest("remark必填!");
throw
new
BadRequest
(
"remark必填!"
);
// }
}
// return ResponseHelper.buildResponse("更新成功,共" + dataDockService.writeOrgBranchCode2YanChang(remark) + "条数据");
return
ResponseHelper
.
buildResponse
(
"更新成功,共"
+
dataDockService
.
writeOrgBranchCode2YanChang
(
remark
)
+
"条数据"
);
// }
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/yanChang/USE_PLACE"
)
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"延炼-延长-刷入所属区域"
,
notes
=
"延炼-延长-刷入所属区域"
)
public
Object
writeUsePlace2YanChang
(
@RequestParam
String
remark
)
{
if
(
ValidationUtil
.
isEmpty
(
remark
))
{
throw
new
BadRequest
(
"remark必填!"
);
}
return
ResponseHelper
.
buildResponse
(
"更新成功,共"
+
dataDockService
.
writeUsePlace2YanChang
(
remark
)
+
"条数据"
);
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DataHandlerController.java
View file @
0fafb10e
...
@@ -86,4 +86,12 @@ public class DataHandlerController extends BaseController {
...
@@ -86,4 +86,12 @@ public class DataHandlerController extends BaseController {
return
ResponseHelper
.
buildResponse
(
true
);
return
ResponseHelper
.
buildResponse
(
true
);
}
}
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"由于前期设备纳管状态不对,导致的1220上线时 创建的装置纳管状态不对,刷库"
,
notes
=
"历史数据处理"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/v2/projectContraption/info"
)
public
ResponseModel
<
Boolean
>
projectContraptionInfoUpdateV2
(){
dataHandlerService
.
projectContraptionInfoUpdateV2
();
return
ResponseHelper
.
buildResponse
(
true
);
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DataDockServiceImpl.java
View file @
0fafb10e
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
View file @
0fafb10e
...
@@ -12,6 +12,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
...
@@ -12,6 +12,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto
;
...
@@ -21,10 +22,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper;
...
@@ -21,10 +22,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionInfoService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgInspectionDetectionInfoService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectConstructionMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgProjectInspectionMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.TzBaseEnterpriseInfoMapper
;
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.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -116,6 +114,8 @@ public class DataHandlerServiceImpl {
...
@@ -116,6 +114,8 @@ public class DataHandlerServiceImpl {
@Resource
@Resource
IIdxBizJgInspectionDetectionInfoService
iIdxBizJgInspectionDetectionInfoService
;
IIdxBizJgInspectionDetectionInfoService
iIdxBizJgInspectionDetectionInfoService
;
@Autowired
private
IdxBizJgProjectContraptionMapper
idxBizJgProjectContraptionMapper
;
/**
/**
...
@@ -829,4 +829,26 @@ public class DataHandlerServiceImpl {
...
@@ -829,4 +829,26 @@ public class DataHandlerServiceImpl {
.
isNull
(
JgUseRegistration:
:
getProjectContraptionId
)
.
isNull
(
JgUseRegistration:
:
getProjectContraptionId
)
.
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getProjectContraption
,
JgUseRegistration:
:
getUseRegistrationCode
,
JgUseRegistration:
:
getStatus
,
JgUseRegistration:
:
getAuditPassDate
));
.
select
(
BaseEntity:
:
getSequenceNbr
,
JgUseRegistration:
:
getProjectContraption
,
JgUseRegistration:
:
getUseRegistrationCode
,
JgUseRegistration:
:
getStatus
,
JgUseRegistration:
:
getAuditPassDate
));
}
}
/**
* 处理管道-安装告知审批完成但是装置是否纳管状态不正确的数据
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
projectContraptionInfoUpdateV2
()
{
List
<
IdxBizJgProjectContraption
>
projectConstructions
=
idxBizJgProjectContraptionMapper
.
selectErrorManagementProject
();
log
.
info
(
"处理前:安装告知审批完成但是装置是否纳管状态不正确的数据量:{}"
,
projectConstructions
.
size
());
projectConstructions
.
parallelStream
().
forEach
(
p
->{
LambdaUpdateWrapper
<
IdxBizJgProjectContraption
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
p
.
getSequenceNbr
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitName
,
p
.
getUscUnitName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUscUnitCreditCode
,
p
.
getUscUnitCreditCode
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUseUnitName
,
p
.
getUseUnitName
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
p
.
getUseUnitCreditCode
());
updateWrapper
.
set
(
BaseEntity:
:
getRecDate
,
p
.
getRecDate
());
updateWrapper
.
set
(
IdxBizJgProjectContraption:
:
getIsIntoManagement
,
true
);
projectContraptionService
.
update
(
null
,
updateWrapper
);
});
List
<
IdxBizJgProjectContraption
>
projectConstructionsAfter
=
idxBizJgProjectContraptionMapper
.
selectErrorManagementProject
();
log
.
info
(
"处理后:安装告知审批完成但是装置是否纳管状态不正确的数据量:{}"
,
projectConstructionsAfter
.
size
());
}
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/IdxBizJgProjectContraptionMapper.java
View file @
0fafb10e
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectConstruction
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -33,4 +34,6 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
...
@@ -33,4 +34,6 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
* @return 被引用次数 > 0 则设备不可删除
* @return 被引用次数 > 0 则设备不可删除
*/
*/
Integer
countContraptionInUseTimesForDelete
(
@Param
(
"projectContraptionId"
)
Long
projectContraptionId
);
Integer
countContraptionInUseTimesForDelete
(
@Param
(
"projectContraptionId"
)
Long
projectContraptionId
);
List
<
IdxBizJgProjectContraption
>
selectErrorManagementProject
();
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/IdxBizJgProjectContraptionMapper.xml
View file @
0fafb10e
...
@@ -123,4 +123,21 @@
...
@@ -123,4 +123,21 @@
AND (a.notice_status
<![CDATA[ <> ]]>
'6617')
AND (a.notice_status
<![CDATA[ <> ]]>
'6617')
)
)
</select>
</select>
<select
id=
"selectErrorManagementProject"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption"
>
select
p.sequence_nbr,
n.install_unit_name as usc_unit_name,
n.install_unit_credit_code as usc_unit_credit_code,
n.use_unit_credit_code,
n.use_unit_name
from
tzs_jg_installation_notice n,
idx_biz_jg_project_contraption p
where
n.project_contraption_id = p.sequence_nbr
and n.notice_status='6616'
and p.is_into_management = false
and n.is_delete = false
</select>
</mapper>
</mapper>
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