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
898065e9
Commit
898065e9
authored
Mar 22, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):历史数据处理=》刷新线上已经办理过的使用登记单子,向其历史表中添加维保和安装信息
parent
1f7be4a8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
8 deletions
+64
-8
CommonMapper.java
.../yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
+3
-0
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+7
-0
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+43
-8
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+6
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+5
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java
View file @
898065e9
...
@@ -50,5 +50,8 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
...
@@ -50,5 +50,8 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
*/
*/
Integer
countEquipInUseTimesForDel
(
String
record
);
Integer
countEquipInUseTimesForDel
(
String
record
);
List
<
String
>
refreshTheDetailsDataOfCompletedUsageRegistration
(
String
since
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
898065e9
...
@@ -313,4 +313,11 @@
...
@@ -313,4 +313,11 @@
)
)
</select>
</select>
<select
id=
"refreshTheDetailsDataOfCompletedUsageRegistration"
resultType=
"java.lang.String"
>
SELECT sequence_nbr
FROM "amos_tzs_biz"."tzs_jg_use_registration"
WHERE "status" = '已完成'
AND "audit_pass_date"
<![CDATA[<=]]>
#{since}
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
898065e9
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.UseFlagParamDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.UseFlagParamDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IPdfService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.IPdfService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgRegistrationHistoryServiceImpl
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.amos.feign.systemctl.model.RegionModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -44,6 +49,12 @@ public class CommonController extends BaseController {
...
@@ -44,6 +49,12 @@ public class CommonController extends BaseController {
@Autowired
@Autowired
IPdfService
pdfService
;
IPdfService
pdfService
;
@Autowired
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
@Autowired
JgUseRegistrationMapper
jgUseRegistrationMapper
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getChildren"
)
@GetMapping
(
value
=
"/getChildren"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过设备种类code获取设备类别"
,
notes
=
"通过设备种类code获取设备类别"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过设备种类code获取设备类别"
,
notes
=
"通过设备种类code获取设备类别"
)
...
@@ -417,12 +428,36 @@ public class CommonController extends BaseController {
...
@@ -417,12 +428,36 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
Systemctl
.
dictionarieClient
.
dictValues
(
ype
).
getResult
());
return
ResponseHelper
.
buildResponse
(
Systemctl
.
dictionarieClient
.
dictValues
(
ype
).
getResult
());
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/getRegionCity"
)
@GetMapping
(
value
=
"/refreshTheDetailsDataOfCompletedUsageRegistration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"车用气瓶中获取陕西市级城市"
,
notes
=
"车用气瓶中获取陕西市级城市"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"刷新历史数据脚本:since之前完成使用登记的单子,向历史表中刷入设备的维保信息和安装信息"
,
public
ResponseModel
<
Object
>
getRegionCity
()
{
notes
=
"刷新历史数据脚本:since之前完成使用登记的单子,向历史表中刷入设备的维保信息和安装信息"
)
FeignClientResult
<
List
<
RegionModel
>>
listFeignClientResult
=
Systemctl
.
regionClient
.
queryByLevel
(
"2"
);
public
ResponseModel
<
Object
>
refreshTheDetailsDataOfCompletedUsageRegistration
(
@RequestParam
(
value
=
"since"
)
String
since
)
{
return
ResponseHelper
.
buildResponse
(
listFeignClientResult
.
getResult
());
// 查询时间在since之前的已经完成的使用登记单子的seqIds
List
<
String
>
seqLists
=
commonService
.
refreshTheDetailsDataOfCompletedUsageRegistration
(
since
);
// 遍历查询历史表,补充changeData中维保信息和安装信息的数据
seqLists
.
forEach
(
sequenceNbr
->{
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambda
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
String
equipId
=
String
.
valueOf
(
jsonObject
.
get
(
"equipId"
));
if
(!
ObjectUtils
.
isEmpty
(
equipId
)){
// 维保信息
Map
<
String
,
Object
>
maintenanceDetail
=
jgUseRegistrationMapper
.
getMaintenanceDetail
(
equipId
);
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
)){
jsonObject
.
putAll
(
maintenanceDetail
);
}
// 安装信息
Map
<
String
,
Object
>
installDetail
=
jgUseRegistrationMapper
.
getiInstallDetail
(
equipId
);
if
(!
ObjectUtils
.
isEmpty
(
installDetail
)){
jsonObject
.
putAll
(
installDetail
);
}
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
jsonObject
));
}
jgRegistrationHistoryService
.
updateById
(
jgRegistrationHistory
);
});
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
898065e9
...
@@ -152,4 +152,10 @@ public interface ICommonService {
...
@@ -152,4 +152,10 @@ public interface ICommonService {
* @param response 文件信息
* @param response 文件信息
*/
*/
void
fightUseFlagGenerate
(
UseFlagParamDto
useFlagParamDto
,
HttpServletResponse
response
);
void
fightUseFlagGenerate
(
UseFlagParamDto
useFlagParamDto
,
HttpServletResponse
response
);
/**
* 查询since之前已经完成的使用登记单子
*/
List
<
String
>
refreshTheDetailsDataOfCompletedUsageRegistration
(
String
since
);
}
}
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/CommonServiceImpl.java
View file @
898065e9
...
@@ -1667,6 +1667,11 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -1667,6 +1667,11 @@ public class CommonServiceImpl implements ICommonService {
this
.
fillParamValueToPdf
(
paramMap
,
response
,
selectPdfTemplate
(
useFlagParamDto
.
getEquListCode
()),
printFileName
);
this
.
fillParamValueToPdf
(
paramMap
,
response
,
selectPdfTemplate
(
useFlagParamDto
.
getEquListCode
()),
printFileName
);
}
}
@Override
public
List
<
String
>
refreshTheDetailsDataOfCompletedUsageRegistration
(
String
since
)
{
return
commonMapper
.
refreshTheDetailsDataOfCompletedUsageRegistration
(
since
);
}
/**
/**
* 根据设备列表代码选择对应的 PDF 模板
* 根据设备列表代码选择对应的 PDF 模板
* @param equListCode 设备代码
* @param equListCode 设备代码
...
...
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