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
b5eba7ba
Commit
b5eba7ba
authored
Jan 15, 2025
by
Lambertliu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):管道登记功能开发
parent
7727d145
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
32 deletions
+45
-32
IdxBizJgProjectContraptionController.java
.../biz/controller/IdxBizJgProjectContraptionController.java
+2
-8
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+5
-13
IdxBizJgProjectContraptionServiceImpl.java
...z/service/impl/IdxBizJgProjectContraptionServiceImpl.java
+30
-1
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+4
-7
IdxBizJgProjectContraptionDto.java
...oot/module/ymt/api/dto/IdxBizJgProjectContraptionDto.java
+4
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/IdxBizJgProjectContraptionController.java
View file @
b5eba7ba
...
...
@@ -10,17 +10,13 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionIn
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -46,9 +42,8 @@ public class IdxBizJgProjectContraptionController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增管道工程装置表"
,
notes
=
"新增管道工程装置表"
)
public
ResponseModel
<
IdxBizJgProjectContraptionDto
>
save
(
@RequestBody
IdxBizJgProjectContraptionDto
model
)
{
model
=
idxBizJgProjectContraptionServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
public
ResponseModel
<
Boolean
>
save
(
@RequestBody
IdxBizJgProjectContraptionDto
model
)
{
return
ResponseHelper
.
buildResponse
(
idxBizJgProjectContraptionServiceImpl
.
saveFirstMergeProjectContraption
(
model
));
}
/**
...
...
@@ -226,5 +221,4 @@ public class IdxBizJgProjectContraptionController extends BaseController {
public
ResponseModel
<
List
<
IdxBizJgProjectContraptionDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
idxBizJgProjectContraptionServiceImpl
.
queryForIdxBizJgProjectContraptionList
());
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
b5eba7ba
...
...
@@ -369,28 +369,20 @@ public class JgUseRegistrationController extends BaseController {
/**
* 查询有使用登记证,新增的,没有流程引用的数据
* @param useUnitCreditCode 使用登记证编号
* @param current 当前页
* @param size 每页数
* @return page
* @return List
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/jgProjectContraption
Page
Master"
)
@GetMapping
(
value
=
"/jgProjectContraption
List
Master"
)
@ApiOperation
(
value
=
"查询指定使用单位下的可用总装置,已纳管且使用登记证编号不为空或者首次合并为true"
,
notes
=
"不包括流程中的"
)
public
ResponseModel
<
IPage
<
IdxBizJgProjectContraption
>>
jgProjectContraptionPageMaster
(
@RequestParam
String
useUnitCreditCode
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
IdxBizJgProjectContraption
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
IPage
<
IdxBizJgProjectContraption
>
re
=
jgUseRegistrationServiceImpl
.
jgProjectContraptionPageMaster
(
useUnitCreditCode
,
page
);
return
ResponseHelper
.
buildResponse
(
re
);
public
ResponseModel
<
List
<
IdxBizJgProjectContraption
>>
jgProjectContraptionListMaster
(
@RequestParam
String
useUnitCreditCode
)
{
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
jgProjectContraptionListMaster
(
useUnitCreditCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询工程装置下的所有做过安装告知但是为做使用登记的管道"
,
notes
=
"查询工程装置下的所有做过安装告知但是为做使用登记的管道"
)
@GetMapping
(
value
=
"/getDeviceListByProjectContraptionSeq"
)
public
ResponseModel
<
Object
>
getDeviceListByProjectContraption
(
@RequestParam
(
"record"
)
String
projectContraptionSeq
,
@RequestParam
(
"originProjectContraptionIds"
)
String
[]
originProjectContraptionIds
)
{
@RequestParam
(
required
=
false
)
String
[]
originProjectContraptionIds
)
{
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDeviceListByProjectContraption
(
projectContraptionSeq
,
originProjectContraptionIds
));
}
}
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/IdxBizJgProjectContraptionServiceImpl.java
View file @
b5eba7ba
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -10,6 +11,7 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipSourceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgVehicleInformationMapper
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgProjectContraptionService
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
...
...
@@ -45,7 +47,7 @@ import java.util.stream.IntStream;
import
java.util.stream.Stream
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
/**
* 管道工程装置表服务实现类
*
...
...
@@ -79,6 +81,10 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
private
TzBaseEnterpriseInfoMapper
tzBaseEnterpriseInfoMapper
;
@Autowired
private
CommonServiceImpl
commonService
;
@Autowired
private
JgVehicleInformationMapper
jgVehicleInformationMapper
;
@Autowired
private
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
@Override
public
boolean
saveOrUpdateData
(
IdxBizJgProjectContraption
projectContraption
)
{
...
...
@@ -422,4 +428,26 @@ public class IdxBizJgProjectContraptionServiceImpl extends BaseService<IdxBizJgP
throw
new
RuntimeException
(
"导出异常:"
,
e
);
}
}
public
boolean
saveFirstMergeProjectContraption
(
IdxBizJgProjectContraptionDto
model
)
{
// 单位类型
Map
<
String
,
Object
>
companyInfoMap
=
jgInstallationNoticeService
.
getCompanyType
();
IdxBizJgProjectContraption
projectContraption
=
JSON
.
parseObject
(
toJSONString
(
model
),
IdxBizJgProjectContraption
.
class
);
String
equListName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
(
model
.
getEquListCode
());
String
equCategoryName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
(
model
.
getEquCategoryCode
());
String
equDefineName
=
jgVehicleInformationMapper
.
getEquCategoryNameByCode
(
model
.
getEquDefineCode
());
projectContraption
.
setDataSource
(
"new"
);
projectContraption
.
setIsIntoManagement
(
true
);
projectContraption
.
setProvinceName
(
"陕西省"
);
projectContraption
.
setEquList
(
model
.
getEquListCode
());
projectContraption
.
setEquCategory
(
model
.
getEquCategoryCode
());
projectContraption
.
setEquDefine
(
model
.
getEquDefineCode
());
projectContraption
.
setEquListName
(
equListName
);
projectContraption
.
setEquCategoryName
(
equCategoryName
);
projectContraption
.
setEquDefineName
(
equDefineName
);
projectContraption
.
setPipelineLength
(
0.0
);
projectContraption
.
setUscUnitName
(
companyInfoMap
.
get
(
"companyName"
).
toString
());
projectContraption
.
setUscUnitCreditCode
(
companyInfoMap
.
get
(
"creditCode"
).
toString
());
return
this
.
saveOrUpdateData
(
projectContraption
);
}
}
\ 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/service/impl/JgUseRegistrationServiceImpl.java
View file @
b5eba7ba
...
...
@@ -3853,7 +3853,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
jgProjectContraptionService
.
page
(
page
,
wrapper
);
}
public
IPage
<
IdxBizJgProjectContraption
>
jgProjectContraptionPageMaster
(
String
useUnitCreditCode
,
Page
<
IdxBizJgProjectContraption
>
pag
e
)
{
public
List
<
IdxBizJgProjectContraption
>
jgProjectContraptionListMaster
(
String
useUnitCreditCod
e
)
{
// 兼容个人业务
if
(
useUnitCreditCode
.
contains
(
"_"
)){
useUnitCreditCode
=
useUnitCreditCode
.
split
(
"_"
)[
1
];
...
...
@@ -3866,18 +3866,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
);
Set
<
String
>
proIds
=
flowIngPros
.
stream
()
.
map
(
JgUseRegistration:
:
getProjectContraptionId
)
.
filter
(
id
->
id
!=
null
&&
!
id
.
isEmpty
())
// 过滤 null 和空字符串
.
filter
(
id
->
id
!=
null
&&
!
id
.
isEmpty
())
.
collect
(
toSet
());
// 查询已纳管且使用登记证编号为空或 null,非流程中的装置,或首次合并为 true
LambdaQueryWrapper
<
IdxBizJgProjectContraption
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
IdxBizJgProjectContraption:
:
getUseUnitCreditCode
,
useUnitCreditCode
)
.
eq
(
IdxBizJgProjectContraption:
:
getIsIntoManagement
,
true
)
.
notIn
(!
proIds
.
isEmpty
(),
BaseEntity:
:
getSequenceNbr
,
proIds
)
.
and
(
w
->
w
.
isNull
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
)
.
or
().
eq
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
,
""
)
.
and
(
w
->
w
.
isNotNull
(
IdxBizJgProjectContraption:
:
getUseRegistrationCode
)
.
or
().
eq
(
IdxBizJgProjectContraption:
:
getIsFirstMerge
,
true
));
return
jgProjectContraptionService
.
page
(
page
,
wrapper
);
return
jgProjectContraptionService
.
list
(
wrapper
);
}
public
Map
<
String
,
Object
>
getDeviceListByProjectContraption
(
String
projectContraptionSeq
,
String
[]
originProjectContraptionIds
)
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/dto/IdxBizJgProjectContraptionDto.java
View file @
b5eba7ba
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ymt
.
api
.
dto
;
import
com.alibaba.fastjson.JSONArray
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
...
@@ -62,10 +63,10 @@ public class IdxBizJgProjectContraptionDto extends BaseDto {
private
Double
pipelineLength
;
@ApiModelProperty
(
value
=
"产品照片附件"
)
private
String
productPhoto
;
private
JSONArray
productPhoto
;
@ApiModelProperty
(
value
=
"其他附件"
)
private
String
otherAccessories
;
private
JSONArray
otherAccessories
;
@ApiModelProperty
(
value
=
"属地监管单位代码"
)
private
String
orgCode
;
...
...
@@ -74,7 +75,7 @@ public class IdxBizJgProjectContraptionDto extends BaseDto {
private
String
orgName
;
@ApiModelProperty
(
value
=
"产品质量合格证明"
)
private
String
productQualificationCertificate
;
private
JSONArray
productQualificationCertificate
;
@ApiModelProperty
(
value
=
"使用地点代码_省"
)
private
String
province
;
...
...
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