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
aa2a43fa
Commit
aa2a43fa
authored
Jul 24, 2024
by
王果
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):告知单打印功能开发
parent
6ffd464c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
62 deletions
+135
-62
JgTransferNotice.java
...join/amos/boot/module/jg/api/entity/JgTransferNotice.java
+10
-10
JgTransferNoticeEq.java
...in/amos/boot/module/jg/api/entity/JgTransferNoticeEq.java
+27
-0
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+29
-18
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+69
-34
installation-notification-report.ftl
.../resources/templates/installation-notification-report.ftl
+0
-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/entity/JgTransferNotice.java
View file @
aa2a43fa
...
@@ -292,9 +292,6 @@ public class JgTransferNotice extends BaseEntity {
...
@@ -292,9 +292,6 @@ public class JgTransferNotice extends BaseEntity {
@TableField
(
value
=
"promoter"
)
@TableField
(
value
=
"promoter"
)
private
String
promoter
;
private
String
promoter
;
@TableField
(
exist
=
false
)
private
String
equipCateName
;
@TableField
(
value
=
"handle_date"
)
@TableField
(
value
=
"handle_date"
)
private
Date
handleDate
;
private
Date
handleDate
;
...
@@ -310,7 +307,10 @@ public class JgTransferNotice extends BaseEntity {
...
@@ -310,7 +307,10 @@ public class JgTransferNotice extends BaseEntity {
private
String
supervisoryCode
;
private
String
supervisoryCode
;
@TableField
(
exist
=
false
)
@TableField
(
value
=
"equ_category"
)
private
String
equCategory
;
@TableField
(
value
=
"equ_list"
)
private
String
equList
;
private
String
equList
;
@TableField
(
value
=
"equ_list_code"
)
@TableField
(
value
=
"equ_list_code"
)
...
@@ -327,12 +327,12 @@ public class JgTransferNotice extends BaseEntity {
...
@@ -327,12 +327,12 @@ public class JgTransferNotice extends BaseEntity {
@TableField
(
value
=
"transfer_to_user_ids"
)
@TableField
(
value
=
"transfer_to_user_ids"
)
private
String
transferToUserIds
;
private
String
transferToUserIds
;
//
/**
//
/**
* 告知书编号
//
* 告知书编号
*/
//
*/
@TableField
(
value
=
"inform_number"
)
//
@TableField(value = "inform_number")
private
String
informNumber
;
//
private String informNumber;
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgTransferNoticeEq.java
View file @
aa2a43fa
...
@@ -34,4 +34,31 @@ public class JgTransferNoticeEq extends BaseEntity {
...
@@ -34,4 +34,31 @@ public class JgTransferNoticeEq extends BaseEntity {
@TableField
(
"equ_id"
)
@TableField
(
"equ_id"
)
private
String
equId
;
private
String
equId
;
/**
* 设备类别
*/
@TableField
(
value
=
"equ_category"
)
private
String
equCategory
;
/**
* 设备种类
*/
@TableField
(
value
=
"equ_list"
)
private
String
equList
;
/**
* 设备种类编码
*/
@TableField
(
value
=
"equ_list_code"
)
private
String
equListCode
;
/**
* 告知书编号
*/
@TableField
(
value
=
"inform_number"
)
private
String
informNumber
;
}
}
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 @
aa2a43fa
...
@@ -136,8 +136,8 @@ public class CommonController extends BaseController {
...
@@ -136,8 +136,8 @@ public class CommonController extends BaseController {
@GetMapping
(
value
=
"/getUnitList"
)
@GetMapping
(
value
=
"/getUnitList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过单位类型获取单位列表"
,
notes
=
"通过单位类型获取单位列表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过单位类型获取单位列表"
,
notes
=
"通过单位类型获取单位列表"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUnitList
(
@RequestParam
(
value
=
"type"
)
String
type
,
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUnitList
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"business"
,
required
=
false
)
String
business
)
{
@RequestParam
(
value
=
"business"
,
required
=
false
)
String
business
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUnitListByType
(
type
,
business
));
return
ResponseHelper
.
buildResponse
(
commonService
.
getUnitListByType
(
type
,
business
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -174,6 +174,7 @@ public class CommonController extends BaseController {
...
@@ -174,6 +174,7 @@ public class CommonController extends BaseController {
/**
/**
* 设备分类
* 设备分类
*
* @param type 1,设备种类 2,设备类别 3,设备品种
* @param type 1,设备种类 2,设备类别 3,设备品种
* @return
* @return
*/
*/
...
@@ -185,8 +186,6 @@ public class CommonController extends BaseController {
...
@@ -185,8 +186,6 @@ public class CommonController extends BaseController {
}
}
/**
/**
* 查询安全管理员的基本信息
* 查询安全管理员的基本信息
*
*
...
@@ -298,7 +297,6 @@ public class CommonController extends BaseController {
...
@@ -298,7 +297,6 @@ public class CommonController extends BaseController {
/**
/**
* 历史平台登记业务发起公共接口
* 历史平台登记业务发起公共接口
*
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveOrUpdateHistory"
)
@PostMapping
(
value
=
"/saveOrUpdateHistory"
)
...
@@ -445,6 +443,21 @@ public class CommonController extends BaseController {
...
@@ -445,6 +443,21 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
collect
);
return
ResponseHelper
.
buildResponse
(
collect
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/equ-category/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"告知业务-按照设备类型、设备种类查询设备类别"
,
notes
=
"按照业务类型、设备种类查询设备类别"
)
public
ResponseModel
<
List
<
DictionarieValueModel
>>
equCategoryByCodeList
(
@RequestParam
(
value
=
"type"
)
String
bizType
,
@RequestParam
(
value
=
"businessScenarios"
)
String
businessScenarios
,
@RequestParam
(
value
=
"code"
)
String
code
)
{
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_{categoryCode},如BF_YZ_1000==》移装注销-锅炉
String
dictCode
=
String
.
format
(
"%s_%s"
,
bizType
,
code
);
List
<
DictionarieValueModel
>
result
=
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
).
getResult
();
//使用登记bizType(DJ_SY) + 压力容器categoryCode(2000) + 按照场景选择businessScenarios(1) => 只展示固定式压力容器(2100)
// boolean isFlag = "DJ_SY".equals(bizType) && "2000".equals(code) && "1".equals(businessScenarios);
// List<DictionarieValueModel> collect = result.stream()
// .filter(x -> !isFlag || x.getDictDataKey().equals("2100")).collect(Collectors.toList());
return
ResponseHelper
.
buildResponse
(
result
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/workbench/permission"
)
@GetMapping
(
value
=
"/workbench/permission"
)
...
@@ -471,7 +484,6 @@ public class CommonController extends BaseController {
...
@@ -471,7 +484,6 @@ public class CommonController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/use-flag-test"
)
@GetMapping
(
value
=
"/use-flag-test"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"使用标志生成测试"
,
notes
=
"使用标志生成测试"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"使用标志生成测试"
,
notes
=
"使用标志生成测试"
)
...
@@ -481,7 +493,7 @@ public class CommonController extends BaseController {
...
@@ -481,7 +493,7 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
"succese"
);
return
ResponseHelper
.
buildResponse
(
"succese"
);
}
}
private
UseFlagParamDto
buildUseFlagParam
(){
private
UseFlagParamDto
buildUseFlagParam
()
{
UseFlagParamDto
useFlagParamDto
=
new
UseFlagParamDto
();
UseFlagParamDto
useFlagParamDto
=
new
UseFlagParamDto
();
useFlagParamDto
.
setEquList
(
"设备种类名称"
);
useFlagParamDto
.
setEquList
(
"设备种类名称"
);
useFlagParamDto
.
setEquListCode
(
"3000"
);
useFlagParamDto
.
setEquListCode
(
"3000"
);
...
@@ -511,7 +523,7 @@ public class CommonController extends BaseController {
...
@@ -511,7 +523,7 @@ 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
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/refreshTheDetailsDataOfCompletedUsageRegistration"
)
@GetMapping
(
value
=
"/refreshTheDetailsDataOfCompletedUsageRegistration"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"刷新历史数据脚本:since之前完成使用登记的单子,向历史表中刷入设备的维保信息和安装信息"
,
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"刷新历史数据脚本:since之前完成使用登记的单子,向历史表中刷入设备的维保信息和安装信息"
,
notes
=
"刷新历史数据脚本:since之前完成使用登记的单子,向历史表中刷入设备的维保信息和安装信息"
)
notes
=
"刷新历史数据脚本:since之前完成使用登记的单子,向历史表中刷入设备的维保信息和安装信息"
)
...
@@ -519,21 +531,21 @@ public class CommonController extends BaseController {
...
@@ -519,21 +531,21 @@ public class CommonController extends BaseController {
// 查询时间在since之前的已经完成的使用登记单子的seqIds
// 查询时间在since之前的已经完成的使用登记单子的seqIds
List
<
String
>
seqLists
=
commonService
.
refreshTheDetailsDataOfCompletedUsageRegistration
(
since
);
List
<
String
>
seqLists
=
commonService
.
refreshTheDetailsDataOfCompletedUsageRegistration
(
since
);
// 遍历查询历史表,补充changeData中维保信息和安装信息的数据
// 遍历查询历史表,补充changeData中维保信息和安装信息的数据
seqLists
.
forEach
(
sequenceNbr
->{
seqLists
.
forEach
(
sequenceNbr
->
{
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
);
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
sequenceNbr
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambda
);
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectOne
(
lambda
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
String
equipId
=
String
.
valueOf
(
jsonObject
.
get
(
"equipId"
));
String
equipId
=
String
.
valueOf
(
jsonObject
.
get
(
"equipId"
));
if
(!
ObjectUtils
.
isEmpty
(
equipId
)){
if
(!
ObjectUtils
.
isEmpty
(
equipId
))
{
// 维保信息
// 维保信息
Map
<
String
,
Object
>
maintenanceDetail
=
jgUseRegistrationMapper
.
getMaintenanceDetail
(
equipId
);
Map
<
String
,
Object
>
maintenanceDetail
=
jgUseRegistrationMapper
.
getMaintenanceDetail
(
equipId
);
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
)){
if
(!
ObjectUtils
.
isEmpty
(
maintenanceDetail
))
{
jsonObject
.
putAll
(
maintenanceDetail
);
jsonObject
.
putAll
(
maintenanceDetail
);
}
}
// 安装信息
// 安装信息
Map
<
String
,
Object
>
installDetail
=
jgUseRegistrationMapper
.
getiInstallDetail
(
equipId
);
Map
<
String
,
Object
>
installDetail
=
jgUseRegistrationMapper
.
getiInstallDetail
(
equipId
);
if
(!
ObjectUtils
.
isEmpty
(
installDetail
)){
if
(!
ObjectUtils
.
isEmpty
(
installDetail
))
{
jsonObject
.
putAll
(
installDetail
);
jsonObject
.
putAll
(
installDetail
);
}
}
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
jsonObject
));
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
jsonObject
));
...
@@ -544,7 +556,6 @@ public class CommonController extends BaseController {
...
@@ -544,7 +556,6 @@ public class CommonController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/test-code"
)
@PutMapping
(
value
=
"/test-code"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"code生成测试"
,
notes
=
"code生成测试"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"code生成测试"
,
notes
=
"code生成测试"
)
...
@@ -570,7 +581,7 @@ public class CommonController extends BaseController {
...
@@ -570,7 +581,7 @@ public class CommonController extends BaseController {
@ApiParam
(
"设备品种"
)
@RequestParam
(
required
=
false
)
String
equDefine
,
@ApiParam
(
"设备品种"
)
@RequestParam
(
required
=
false
)
String
equDefine
,
@ApiParam
(
"接收机构行政区划"
)
@RequestParam
String
receiveCompanyCode
,
@ApiParam
(
"接收机构行政区划"
)
@RequestParam
String
receiveCompanyCode
,
@ApiParam
(
"制造日期"
)
@RequestParam
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
produceDate
,
@ApiParam
(
"制造日期"
)
@RequestParam
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
Date
produceDate
,
@ApiParam
(
"重置的序列号"
)
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
Long
intNumber
){
@ApiParam
(
"重置的序列号"
)
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
Long
intNumber
)
{
CodeGenerateDto
codeGenerateDto
=
new
CodeGenerateDto
();
CodeGenerateDto
codeGenerateDto
=
new
CodeGenerateDto
();
codeGenerateDto
.
setEquList
(
equList
);
codeGenerateDto
.
setEquList
(
equList
);
codeGenerateDto
.
setEquCategory
(
equCategory
);
codeGenerateDto
.
setEquCategory
(
equCategory
);
...
@@ -584,15 +595,15 @@ public class CommonController extends BaseController {
...
@@ -584,15 +595,15 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/unitType/selected"
)
@PutMapping
(
value
=
"/unitType/selected"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新缓存中信息"
,
notes
=
"更新缓存中信息"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新缓存中信息"
,
notes
=
"更新缓存中信息"
)
public
ResponseModel
<
String
>
updateUnitTypeCache
(
@ApiParam
(
"单位类型"
)
@RequestParam
String
unitType
,
@ApiParam
(
"选择角色"
)
@RequestParam
String
selectedRoleSeqs
){
public
ResponseModel
<
String
>
updateUnitTypeCache
(
@ApiParam
(
"单位类型"
)
@RequestParam
String
unitType
,
@ApiParam
(
"选择角色"
)
@RequestParam
String
selectedRoleSeqs
)
{
commonService
.
updateUnitTypeCache
(
getSelectedOrgInfo
(),
unitType
,
selectedRoleSeqs
);
commonService
.
updateUnitTypeCache
(
getSelectedOrgInfo
(),
unitType
,
selectedRoleSeqs
);
return
ResponseHelper
.
buildResponse
(
"success"
);
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/historicalDataProcessingOfPressurePipeline"
)
@GetMapping
(
value
=
"/historicalDataProcessingOfPressurePipeline"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"更新压力管道按照单位办理的使用登记历史单子中,管道长度从mm变成m"
,
notes
=
"更新压力管道按照单位办理的使用登记历史单子中,管道长度从mm变成m"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"更新压力管道按照单位办理的使用登记历史单子中,管道长度从mm变成m"
,
notes
=
"更新压力管道按照单位办理的使用登记历史单子中,管道长度从mm变成m"
)
public
ResponseModel
<
String
>
historicalDataProcessingOfPressurePipeline
(){
public
ResponseModel
<
String
>
historicalDataProcessingOfPressurePipeline
()
{
commonService
.
historicalDataProcessingOfPressurePipeline
();
commonService
.
historicalDataProcessingOfPressurePipeline
();
return
ResponseHelper
.
buildResponse
(
"success"
);
return
ResponseHelper
.
buildResponse
(
"success"
);
}
}
...
@@ -602,6 +613,6 @@ public class CommonController extends BaseController {
...
@@ -602,6 +613,6 @@ public class CommonController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取单位下的使用登记证编号"
,
notes
=
"按照类型查询车载气瓶相关的字典值"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取单位下的使用登记证编号"
,
notes
=
"按照类型查询车载气瓶相关的字典值"
)
public
ResponseModel
<
JgUseRegistrationManage
>
getLatestJgUseRegistrationManage
(
@RequestParam
(
value
=
"equDefineCode"
)
String
equDefineCode
)
{
public
ResponseModel
<
JgUseRegistrationManage
>
getLatestJgUseRegistrationManage
(
@RequestParam
(
value
=
"equDefineCode"
)
String
equDefineCode
)
{
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
CompanyBo
company
=
getSelectedOrgInfo
().
getCompany
();
return
ResponseHelper
.
buildResponse
(
commonService
.
getLatestJgUseRegistrationManage
(
company
.
getCompanyCode
(),
equDefineCode
));
return
ResponseHelper
.
buildResponse
(
commonService
.
getLatestJgUseRegistrationManage
(
company
.
getCompanyCode
(),
equDefineCode
));
}
}
}
}
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/JgTransferNoticeServiceImpl.java
View file @
aa2a43fa
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.util.StringUtil
;
import
com.github.pagehelper.util.StringUtil
;
...
@@ -134,6 +135,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -134,6 +135,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
transferNotice
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
transferNotice
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
transferNotice
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
transferNotice
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
transferNotice
.
put
(
"EQU_LIST_CODE"
,
notice
.
getEquListCode
());
transferNotice
.
put
(
"EQU_LIST_CODE"
,
notice
.
getEquListCode
());
transferNotice
.
put
(
"EQU_CATEGORY"
,
notice
.
getEquCategory
());
transferNotice
.
put
(
"QUERY_TYPE"
,
"GZ_YZ"
);
transferNotice
.
put
(
"IS_INTO_MANAGEMENT"
,
true
);
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getFactoryUseSiteStreet
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getFactoryUseSiteStreet
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
transferNotice
.
put
(
"factoryUseSiteStreet"
,
notice
.
getFactoryUseSiteStreet
()
+
"_"
+
notice
.
getStreetName
());
transferNotice
.
put
(
"factoryUseSiteStreet"
,
notice
.
getFactoryUseSiteStreet
()
+
"_"
+
notice
.
getStreetName
());
}
}
...
@@ -430,7 +434,6 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -430,7 +434,6 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
deviceList
.
forEach
(
obj
->
{
deviceList
.
forEach
(
obj
->
{
JgTransferNoticeEq
jgRelationEquip
=
new
JgTransferNoticeEq
();
JgTransferNoticeEq
jgRelationEquip
=
new
JgTransferNoticeEq
();
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
noticeDto
.
getApplyNo
());
jgRelationEquip
.
setEquipTransferId
(
noticeDto
.
getSequenceNbr
().
toString
());
jgRelationEquip
.
setEquipTransferId
(
noticeDto
.
getSequenceNbr
().
toString
());
equipList
.
add
(
jgRelationEquip
);
equipList
.
add
(
jgRelationEquip
);
});
});
...
@@ -559,7 +562,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -559,7 +562,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
/**
/**
* 组装业务数据
* 组装业务数据
*/
*/
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgTransferNoticeDto
model
,
List
<
Map
<
String
,
Object
>>
deviceList
,
ResponseModel
<
List
<
String
>>
responseModel
,
List
<
WorkflowResultDto
>
workflowResultList
,
List
<
JgTransferNotice
>
list
,
List
<
JgTransferNoticeEq
>
equipList
)
{
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgTransferNoticeDto
model
,
List
<
Map
<
String
,
Object
>>
deviceList
,
ResponseModel
<
List
<
String
>>
responseModel
,
List
<
WorkflowResultDto
>
workflowResultList
,
List
<
JgTransferNotice
>
list
,
List
<
JgTransferNoticeEq
>
equipList
)
{
CompanyBo
companyBo
=
commonService
.
getOneCompany
(
model
.
getReceiveCompanyCode
());
CompanyBo
companyBo
=
commonService
.
getOneCompany
(
model
.
getReceiveCompanyCode
());
JgTransferNotice
dto
=
new
JgTransferNotice
();
JgTransferNotice
dto
=
new
JgTransferNotice
();
BeanUtils
.
copyProperties
(
model
,
dto
);
BeanUtils
.
copyProperties
(
model
,
dto
);
...
@@ -580,10 +586,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -580,10 +586,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
else
{
}
else
{
dto
.
setNextExecuteUserIds
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setNextExecuteUserIds
(
reginParams
.
getUserModel
().
getUserId
());
}
}
dto
.
setEquipCateName
(
deviceList
.
get
(
0
).
getOrDefault
(
"EQU_CATEGORY"
,
""
).
toString
());
dto
.
setEquCategory
(
deviceList
.
get
(
0
).
getOrDefault
(
"EQU_CATEGORY"
,
""
).
toString
());
//设备类别
dto
.
setEquList
(
String
.
valueOf
(
deviceList
.
get
(
0
).
get
(
"EQU_LIST"
)));
dto
.
setEquList
(
String
.
valueOf
(
deviceList
.
get
(
0
).
get
(
"EQU_LIST"
)));
//设备种类
dto
.
setSupervisoryCode
(
String
.
valueOf
(
deviceList
.
get
(
0
).
get
(
"SUPERVISORY_CODE"
)));
dto
.
setEquListCode
(
String
.
valueOf
(
deviceList
.
get
(
0
).
get
(
"EQU_LIST_CODE"
)));
//设备种类编码
dto
.
setEquListCode
(
String
.
valueOf
(
deviceList
.
get
(
0
).
get
(
"EQU_LIST_CODE"
)));
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
if
(!
CollectionUtils
.
isEmpty
(
workflowResultList
))
{
if
(!
CollectionUtils
.
isEmpty
(
workflowResultList
))
{
...
@@ -596,12 +601,14 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -596,12 +601,14 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
// dto.setEquAddress(obj.getOrDefault("ADDRESS", "").toString());
// dto.setEquAddress(obj.getOrDefault("ADDRESS", "").toString());
list
.
add
(
dto
);
list
.
add
(
dto
);
jgTransferNoticeMapper
.
insert
BatchSomeColumn
(
list
);
jgTransferNoticeMapper
.
insert
(
list
.
get
(
0
)
);
deviceList
.
forEach
(
obj
->
{
deviceList
.
forEach
(
obj
->
{
JgTransferNoticeEq
jgRelationEquip
=
new
JgTransferNoticeEq
();
JgTransferNoticeEq
jgRelationEquip
=
new
JgTransferNoticeEq
();
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
jgRelationEquip
.
setEquipTransferId
(
dto
.
getSequenceNbr
().
toString
());
jgRelationEquip
.
setEquipTransferId
(
dto
.
getSequenceNbr
().
toString
());
jgRelationEquip
.
setEquCategory
(
obj
.
getOrDefault
(
"EQU_CATEGORY"
,
""
).
toString
());
//设备类别
jgRelationEquip
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST"
)));
//设备种类
jgRelationEquip
.
setEquListCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST_CODE"
)));
//设备种类编码
equipList
.
add
(
jgRelationEquip
);
equipList
.
add
(
jgRelationEquip
);
});
});
jgTransferNoticeEqMapper
.
insertBatchSomeColumn
(
equipList
);
jgTransferNoticeEqMapper
.
insertBatchSomeColumn
(
equipList
);
...
@@ -823,13 +830,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -823,13 +830,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
// 检查实际状态是否不等于期望状态
// 检查实际状态是否不等于期望状态
commonService
.
checkExpectedStatus
(
jgTransferNotice
.
getNoticeStatus
());
commonService
.
checkExpectedStatus
(
jgTransferNotice
.
getNoticeStatus
());
// 组装设备注册代码
String
ym
=
null
;
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
}
catch
(
ParseException
e
)
{
log
.
error
(
"日期转换失败:{}"
,
e
);
}
// 执行工作流并返回组装好的工作流信息
// 执行工作流并返回组装好的工作流信息
WorkflowResultDto
workflowResultDto
=
getWorkflowResultDto
(
op
,
opinion
,
jgTransferNotice
);
WorkflowResultDto
workflowResultDto
=
getWorkflowResultDto
(
op
,
opinion
,
jgTransferNotice
);
...
@@ -840,32 +841,30 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -840,32 +841,30 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
if
(
StringUtils
.
isEmpty
(
workflowResultDto
.
getNextExecutorRoleIds
()))
{
if
(
StringUtils
.
isEmpty
(
workflowResultDto
.
getNextExecutorRoleIds
()))
{
LambdaQueryWrapper
<
JgTransferNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JgTransferNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
queryWrapper
.
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
JgTransferNoticeEq
jgTransferNoticeEq
=
jgTransferNoticeEqMapper
.
selectOne
(
queryWrapper
);
List
<
JgTransferNoticeEq
>
jgTransferNoticeEqs
=
jgTransferNoticeEqMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgTransferNoticeEq
>().
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
jgTransferNotice
.
getSequenceNbr
().
toString
()));
// 历史设备数据记录
// 历史设备数据记录
this
.
saveHisDataBeforeUpdate
(
jgTransferNotice
,
jgTransferNoticeEq
.
getEquId
());
this
.
saveHisDataBeforeUpdate
(
jgTransferNotice
,
jgTransferNoticeEqs
);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
this
.
updateEq
(
jgTransferNotice
);
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgTransferNoticeEq
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
String
equCode
=
Optional
.
ofNullable
(
tzsJgRegistrationInfo
.
getEquDefine
()).
orElse
(
tzsJgRegistrationInfo
.
getEquCategory
());
String
registrationCode
=
equCode
+
jgTransferNotice
.
getReceiveCompanyCode
()
+
ym
;
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
registrationCode
);
String
deviceRegistrationCode
=
responseModel
.
getResult
();
jgTransferNotice
.
setInformNumber
(
deviceRegistrationCode
);
jgTransferNotice
.
setPromoter
(
""
);
jgTransferNotice
.
setPromoter
(
""
);
jgTransferNotice
.
setHandleDate
(
new
Date
());
jgTransferNotice
.
setHandleDate
(
new
Date
());
jgTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
jgTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s"
,
jgTransferNotice
.
getProvinceName
(),
jgTransferNotice
.
getCityName
(),
jgTransferNotice
.
getCounty
()));
for
(
JgTransferNoticeEq
eq
:
jgTransferNoticeEqs
)
{
map1
.
put
(
"ADDRESS"
,
String
.
format
(
"%s/%s"
,
jgTransferNotice
.
getStreetName
(),
jgTransferNotice
.
getAddress
()));
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
objMap
.
put
(
jgTransferNoticeEq
.
getEquId
(),
map1
);
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s"
,
jgTransferNotice
.
getProvinceName
(),
jgTransferNotice
.
getCityName
(),
jgTransferNotice
.
getCounty
()));
map1
.
put
(
"ADDRESS"
,
String
.
format
(
"%s/%s"
,
jgTransferNotice
.
getStreetName
(),
jgTransferNotice
.
getAddress
()));
objMap
.
put
(
eq
.
getEquId
(),
map1
);
}
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
// 修改使用信息
// 修改使用信息
List
<
String
>
equIds
=
jgTransferNoticeEqs
.
stream
().
map
(
JgTransferNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toList
());
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
lambda
=
new
LambdaUpdateWrapper
<>();
lambda
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgTransferNoticeEq
.
getEquId
()
);
lambda
.
in
(
IdxBizJgUseInfo:
:
getRecord
,
equIds
);
IdxBizJgUseInfo
idxBizJgUseInfo
=
new
IdxBizJgUseInfo
();
IdxBizJgUseInfo
idxBizJgUseInfo
=
new
IdxBizJgUseInfo
();
idxBizJgUseInfo
.
setProvince
(
jgTransferNotice
.
getProvince
());
idxBizJgUseInfo
.
setProvince
(
jgTransferNotice
.
getProvince
());
idxBizJgUseInfo
.
setProvinceName
(
jgTransferNotice
.
getProvinceName
());
idxBizJgUseInfo
.
setProvinceName
(
jgTransferNotice
.
getProvinceName
());
...
@@ -889,7 +888,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -889,7 +888,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgTransferNotice
,
taskMessageDto
);
BeanUtils
.
copyProperties
(
jgTransferNotice
,
taskMessageDto
);
taskMap
.
put
(
"model"
,
taskMessageDto
);
taskMap
.
put
(
"model"
,
taskMessageDto
);
taskV2Model
=
commonService
.
updateTaskModel
(
taskMap
);
commonService
.
updateTaskModel
(
taskMap
);
jgTransferNotice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
jgTransferNotice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
jgTransferNotice
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
jgTransferNotice
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
...
@@ -970,17 +969,53 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -970,17 +969,53 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
}
@Autowired
@Autowired
JgTransferNoticeEqServiceImpl
jgTransferNoticeEqService
;
private
void
updateEq
(
JgTransferNotice
jgTransferNotice
)
{
// 组装设备注册代码
String
ym
=
null
;
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
}
catch
(
ParseException
e
)
{
log
.
error
(
"日期转换失败:{}"
,
e
);
}
List
<
JgTransferNoticeEq
>
eqList
=
jgTransferNoticeEqService
.
lambdaQuery
().
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
jgTransferNotice
.
getSequenceNbr
().
toString
()).
list
();
for
(
JgTransferNoticeEq
eq
:
eqList
)
{
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
new
LambdaQueryWrapper
<
RegistrationInfo
>().
eq
(
RegistrationInfo:
:
getRecord
,
eq
.
getEquId
()));
String
equCode
=
Optional
.
ofNullable
(
tzsJgRegistrationInfo
.
getEquDefine
()).
orElse
(
tzsJgRegistrationInfo
.
getEquCategory
());
String
registrationCode
=
equCode
+
jgTransferNotice
.
getReceiveCompanyCode
()
+
ym
;
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
registrationCode
);
String
deviceRegistrationCode
=
responseModel
.
getResult
();
eq
.
setInformNumber
(
deviceRegistrationCode
);
}
jgTransferNoticeEqService
.
updateBatchById
(
eqList
);
}
@Autowired
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
JgRegistrationHistoryServiceImpl
jgRegistrationHistoryService
;
private
void
saveHisDataBeforeUpdate
(
JgTransferNotice
jgTransferNotice
,
String
equId
)
{
private
void
saveHisDataBeforeUpdate
(
JgTransferNotice
jgTransferNotice
,
List
<
JgTransferNoticeEq
>
jgTransferNoticeEqs
)
{
String
seq
=
jgTransferNotice
.
getSequenceNbr
().
toString
();
String
seq
=
jgTransferNotice
.
getSequenceNbr
().
toString
();
JSONObject
json
=
(
JSONObject
)
JSONObject
.
toJSON
(
jgTransferNotice
);
JSONObject
json
=
(
JSONObject
)
JSONObject
.
toJSON
(
jgTransferNotice
);
List
<
JgTransferNoticeEq
>
jgTransferNoticeEqs
=
jgTransferNoticeEqMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgTransferNoticeEq
>().
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
seq
));
List
<
String
>
ids
=
jgTransferNoticeEqs
.
stream
().
map
(
JgTransferNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toList
());
List
<
String
>
ids
=
jgTransferNoticeEqs
.
stream
().
map
(
JgTransferNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toList
());
Iterable
<
ESEquipmentCategoryDto
>
allById
=
esEquipmentCategory
.
findAllById
(
ids
);
Iterable
<
ESEquipmentCategoryDto
>
allById
=
esEquipmentCategory
.
findAllById
(
ids
);
List
<
Map
<
String
,
Object
>>
equipListMaps
=
getEquipListMaps
(
allById
);
List
<
Map
<
String
,
Object
>>
equipListMaps
=
getEquipListMaps
(
allById
);
json
.
put
(
"deviceList"
,
equipListMaps
);
json
.
put
(
"deviceList"
,
equipListMaps
);
commonService
.
saveOrUpdateHistory
(
BusinessTypeEnum
.
JG_ADVICE_REMOVAL
.
getName
(),
json
,
equId
,
jgTransferNotice
.
getSequenceNbr
().
toString
());
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
LambdaQueryWrapper
<
JgRegistrationHistory
>
lambda
=
new
QueryWrapper
<
JgRegistrationHistory
>().
lambda
();
lambda
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
seq
);
Integer
integer
=
jgRegistrationHistoryService
.
getBaseMapper
().
selectCount
(
lambda
);
if
(
integer
>
0
)
{
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
json
));
jgRegistrationHistoryService
.
update
(
jgRegistrationHistory
,
lambda
);
}
else
{
jgRegistrationHistory
.
setChangeData
(
JSON
.
toJSONString
(
json
));
jgRegistrationHistory
.
setStatus
(
"new"
);
jgRegistrationHistory
.
setRegistrationClass
(
BusinessTypeEnum
.
JG_ADVICE_REMOVAL
.
getName
());
jgRegistrationHistory
.
setCurrentDocumentId
(
seq
);
jgRegistrationHistoryService
.
save
(
jgRegistrationHistory
);
}
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/installation-notification-report.ftl
View file @
aa2a43fa
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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