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
af2c955a
Commit
af2c955a
authored
Jun 21, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):bug修改
parent
cea3abdc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
65 deletions
+10
-65
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+0
-2
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+0
-10
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+10
-53
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
af2c955a
...
...
@@ -404,8 +404,6 @@
WHERE
ri."EQU_CATEGORY" = '8300'
and ui."DATA_SOURCE" like 'jg%'
and NOT(ui."EQU_STATE" is not null )
and NOT(ri."USE_ORG_CODE" is not null )
-- 保证使用单位选择设备时(record为null) 能选择到本单位的设备 并且 监管单位在查看时(record 不为null)可以匹配到所有的设备
<if
test=
"jsonObject.useUnitCreditCode != null and jsonObject.useUnitCreditCode != '' and jsonObject.record == null"
>
and ui."USE_UNIT_CREDIT_CODE" = #{jsonObject.useUnitCreditCode}
...
...
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 @
af2c955a
...
...
@@ -247,14 +247,4 @@ public class JgUseRegistrationController extends BaseController {
jgUseRegistrationServiceImpl
.
correctWrongData
(
applayNoList
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/useDate/handle"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"使用登记单子中投用年月的数据处理"
,
notes
=
"使用登记单子中投用年月的数据处理"
)
public
ResponseModel
<
Object
>
yunWeiRegistrationWrongData
()
{
// 关联 任务 : 26599 压力管道技术参数除起始位置、备注外均为必填,压力管道信息汇总表要求的字段在其余模块的都要求必填,压力管道信息汇总表也需要展示
// http://113.142.68.105:5080/zentao/task-view-26599.html
jgUseRegistrationServiceImpl
.
useDateHandler
();
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
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 @
af2c955a
...
...
@@ -1303,7 +1303,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 删除暂存的待办
ids
.
forEach
(
id
->
{
JgUseRegistration
useRegistration
=
this
.
baseMapper
.
selectById
(
id
);
commonServiceImpl
.
deleteTaskModel
(
String
.
valueOf
(
id
),
useRegistration
.
getInstanceId
());
commonServiceImpl
.
deleteTaskModel
(
String
.
valueOf
(
id
),
useRegistration
.
getInstanceId
());
});
this
.
update
(
jgUseRegistration
,
lambda
);
}
...
...
@@ -1576,7 +1576,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
commonService
.
generateCertificateReport
(
exportParamsMap
,
response
);
}
else
if
(
"1"
.
equals
(
printType
))
{
// 套打
//commonService.generatePdfPrint(exportParamsMap, response);
//
commonService.generatePdfPrint(exportParamsMap, response);
commonService
.
generateCertificateReportDoc
(
exportParamsMap
,
response
);
}
else
if
(
"2"
.
equals
(
printType
))
{
// 使用标志普通打印
...
...
@@ -1613,7 +1613,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
AgencyUserModel
result
=
new
AgencyUserModel
();
JgUseRegistration
jgUseRegistration
=
jgUseRegistrationMapper
.
selectOne
(
new
QueryWrapper
<
JgUseRegistration
>().
lambda
()
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
sequenceNbr
));
jsonObject
.
put
(
"fullAddress"
,
jgUseRegistration
.
getUseAddress
());
jsonObject
.
put
(
"fullAddress"
,
jgUseRegistration
.
getUseAddress
());
if
(!
ValidationUtil
.
isEmpty
(
jgUseRegistration
.
getCreateUserId
()))
{
result
=
Privilege
.
agencyUserClient
.
queryByUserId
(
jgUseRegistration
.
getCreateUserId
()).
getResult
();
}
...
...
@@ -1648,6 +1648,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
* 将 年月日 日期转为 年月 格式返回
*
* @param originalDateStr
* @return
*/
...
...
@@ -1718,7 +1719,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 使用单位地址
exportParamsMap
.
put
(
"fullAddress"
,
jsonObject
.
get
(
"fullAddress"
));
// 工程(装置)名称 取第一个设备的技术参数”工程装置名称“
JSONObject
eqJSON
=(
JSONObject
)
equipmentLists
.
get
(
0
);
JSONObject
eqJSON
=
(
JSONObject
)
equipmentLists
.
get
(
0
);
String
eqId
=
!
ValidationUtil
.
isEmpty
(
eqJSON
)
?
String
.
valueOf
(
eqJSON
.
get
(
"record"
))
:
""
;
EquipTechParamPipeline
equipTechParamPipeline
=
equipTechParamPipelineMapper
.
queryTechParamInUse
(
eqId
);
String
deviceName
=
Optional
.
ofNullable
(
equipTechParamPipeline
)
...
...
@@ -1742,7 +1743,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 数据截取
List
<
Object
>
equData
=
equipmentLists
.
subList
(
start
,
end
);
// 设备数据填充
this
.
pressurePipeEquData
(
exportParamsMap
,
equData
,
current
,
size
);
this
.
pressurePipeEquData
(
exportParamsMap
,
equData
,
current
,
size
);
return
commonService
.
generateSummaryOfCylinderInfo
(
exportParamsMap
,
wordPath
,
filePrefix
);
})).
collect
(
Collectors
.
toList
());
CompletableFuture
.
allOf
(
futures
.
toArray
(
new
CompletableFuture
[
page
])).
join
();
...
...
@@ -1778,17 +1779,17 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
/**
* 压力管道设备数据填充
*/
public
void
pressurePipeEquData
(
Map
<
String
,
Object
>
exportParamsMap
,
List
<
Object
>
equData
,
int
current
,
int
size
)
{
public
void
pressurePipeEquData
(
Map
<
String
,
Object
>
exportParamsMap
,
List
<
Object
>
equData
,
int
current
,
int
size
)
{
String
[]
fieldNames
=
{
"productName"
,
"pipelineNumber"
,
"deviceLevel"
,
"designUnitName"
,
"uscUnitName"
,
"uscDate"
,
"useDate"
,
"nominalDiameter"
,
"wallThickness"
,
"pipeLength"
,
"pressure"
,
"temperature"
,
"uscDate"
,
"useDate"
,
"nominalDiameter"
,
"wallThickness"
,
"pipeLength"
,
"pressure"
,
"temperature"
,
"medium"
,
"inspectConclusion"
,
"inspectOrgName"
,
"nextInspectDate"
,
"inspectConclusion"
,
"remarks"
};
// 填充有效数据
for
(
int
curr
=
0
;
curr
<
equData
.
size
();
curr
++)
{
JSONObject
obj
=
(
JSONObject
)
equData
.
get
(
curr
);
int
serialNum
=
curr
+
1
;
for
(
String
fieldName
:
fieldNames
)
{
exportParamsMap
.
put
(
"num"
+
serialNum
,
(
current
-
1
)
*
size
+
(
curr
+
1
));
exportParamsMap
.
put
(
"num"
+
serialNum
,
(
current
-
1
)
*
size
+
(
curr
+
1
));
exportParamsMap
.
put
(
fieldName
+
serialNum
,
ValidationUtil
.
isEmpty
(
obj
.
get
(
fieldName
))
?
""
:
obj
.
get
(
fieldName
));
}
}
...
...
@@ -1797,7 +1798,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
for
(
int
curr
=
equData
.
size
();
curr
<
size
;
curr
++)
{
int
serialNum
=
curr
+
1
;
for
(
String
fieldName
:
fieldNames
)
{
exportParamsMap
.
put
(
"num"
+
serialNum
,
""
);
exportParamsMap
.
put
(
"num"
+
serialNum
,
""
);
exportParamsMap
.
put
(
fieldName
+
serialNum
,
""
);
// 使用空字符串填充空白项
}
}
...
...
@@ -2060,47 +2061,4 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
});
}
public
void
useDateHandler
()
{
List
<
JgUseRegistrationEq
>
jgUseRegistrationEqs
=
jgRelationEquipMapper
.
selectList
(
new
QueryWrapper
<>());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
DateTimeFormatter
inputFormatter
=
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd HH:mm:ss"
);
jgUseRegistrationEqs
.
forEach
(
eq
->
{
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
eq
(
JgUseRegistration:
:
getSequenceNbr
,
eq
.
getEquipTransferId
());
JgUseRegistration
jgUseRegistration
=
jgUseRegistrationMapper
.
selectOne
(
lambda
);
boolean
isFinish
=
"已完成"
.
equals
(
jgUseRegistration
.
getStatus
());
// isFinish ? 修改使用信息表中的use_date字段值为审核通过时间 : 修改使用信息表中的use_date字段值为单子发起时间
IdxBizJgUseInfo
idxBizJgUseInfo
=
useInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>()
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
eq
.
getEquId
()));
idxBizJgUseInfo
.
setUseDate
(
isFinish
?
(
ValidationUtil
.
isEmpty
(
jgUseRegistration
.
getAuditPassDate
())
?
""
:
sdf
.
format
(
jgUseRegistration
.
getAuditPassDate
()))
:
(
ValidationUtil
.
isEmpty
(
jgUseRegistration
.
getRecDate
())
?
""
:
sdf
.
format
(
jgUseRegistration
.
getRecDate
())));
// isFinish ? 修增加历史表表中的useDate字段值为审核通过时间 : 修增加历史表表中的useDate字段值为单子发起时间
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
()
.
selectOne
(
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
()
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
jgUseRegistration
.
getSequenceNbr
()));
JSONObject
json
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
json
.
put
(
"useDate"
,
isFinish
?
(
ValidationUtil
.
isEmpty
(
jgUseRegistration
.
getAuditPassDate
())
?
""
:
sdf
.
format
(
jgUseRegistration
.
getAuditPassDate
()))
:
(
ValidationUtil
.
isEmpty
(
jgUseRegistration
.
getRecDate
())
?
""
:
sdf
.
format
(
jgUseRegistration
.
getRecDate
())));
// 填充安装单位和安装年月
if
(
"8300"
.
equals
(
json
.
get
(
"EQU_CATEGORY_CODE"
))
&&
"unit"
.
equals
(
json
.
get
(
"manageType"
))){
// 填充历史
JSONArray
jsonArray
=
(
JSONArray
)
json
.
get
(
"equipmentLists"
);
for
(
Object
obj
:
jsonArray
)
{
List
<
ConstructionInfo
>
constructionInfos
=
constructionInfoMapper
.
selectList
(
new
LambdaQueryWrapper
<
ConstructionInfo
>()
.
eq
(
ConstructionInfo:
:
getRecord
,
eq
.
getEquId
())
.
orderByDesc
(
ConstructionInfo:
:
getUscDate
));
ConstructionInfo
result
=
CollectionUtils
.
isEmpty
(
constructionInfos
)
?
new
ConstructionInfo
()
:
constructionInfos
.
get
(
0
);
JSONObject
jsonObject
=
(
JSONObject
)
obj
;
jsonObject
.
put
(
"uscUnitName"
,
result
.
getUscUnitName
());
jsonObject
.
put
(
"uscDate"
,
ValidationUtil
.
isEmpty
(
result
.
getUscDate
())
?
""
:
YearMonth
.
from
(
LocalDateTime
.
parse
(
result
.
getUscDate
(),
inputFormatter
)).
toString
());
}
}
jgRegistrationHistory
.
setChangeData
(
JSONObject
.
toJSONString
(
json
));
jgRegistrationHistoryService
.
getBaseMapper
().
updateById
(
jgRegistrationHistory
);
});
}
}
\ No newline at end of file
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