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
b376e6ed
Commit
b376e6ed
authored
Dec 19, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register
parents
f3dc75ff
a08c16ec
Show whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
1343 additions
and
256 deletions
+1343
-256
JgMaintainNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgMaintainNoticeDto.java
+26
-0
JgReformNoticeDto.java
...eejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
+14
-5
JgTransferNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgTransferNoticeDto.java
+40
-0
JgMaintainNotice.java
...join/amos/boot/module/jg/api/entity/JgMaintainNotice.java
+29
-0
JgReformNotice.java
...eejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
+16
-2
JgTransferNotice.java
...join/amos/boot/module/jg/api/entity/JgTransferNotice.java
+24
-0
JgUseRegistration.java
...oin/amos/boot/module/jg/api/entity/JgUseRegistration.java
+5
-0
MaintainTypeEnum.java
...ejoin/amos/boot/module/jg/api/enums/MaintainTypeEnum.java
+37
-0
UseStatusEnum.java
.../yeejoin/amos/boot/module/jg/api/enums/UseStatusEnum.java
+3
-3
JgTransferNoticeEqMapper.java
...s/boot/module/jg/api/mapper/JgTransferNoticeEqMapper.java
+1
-2
JgTransferNoticeMapper.java
...mos/boot/module/jg/api/mapper/JgTransferNoticeMapper.java
+12
-2
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+1
-0
IJgTransferNoticeEqService.java
...oot/module/jg/api/service/IJgTransferNoticeEqService.java
+4
-1
IJgTransferNoticeService.java
.../boot/module/jg/api/service/IJgTransferNoticeService.java
+20
-1
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+2
-1
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+35
-17
JgTransferNoticeMapper.xml
...-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
+118
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+6
-1
JgMaintainByWorkFlowController.java
...ule/jg/biz/controller/JgMaintainByWorkFlowController.java
+13
-13
JgMaintainNoticeController.java
.../module/jg/biz/controller/JgMaintainNoticeController.java
+5
-5
JgReformByWorkFlowController.java
...odule/jg/biz/controller/JgReformByWorkFlowController.java
+17
-16
JgReformNoticeController.java
...ot/module/jg/biz/controller/JgReformNoticeController.java
+1
-1
JgReformNoticeEqController.java
.../module/jg/biz/controller/JgReformNoticeEqController.java
+27
-23
JgTransferNoticeController.java
.../module/jg/biz/controller/JgTransferNoticeController.java
+80
-40
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+1
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+0
-4
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+71
-71
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+36
-19
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+625
-6
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+39
-10
JyjcInspectionResultModel.java
...boot/module/jyjc/api/model/JyjcInspectionResultModel.java
+17
-0
JyjcInspectionResultMapper.xml
.../src/main/resources/mapper/JyjcInspectionResultMapper.xml
+9
-5
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+2
-7
EquipmentCategoryController.java
...odule/ymt/biz/controller/EquipmentCategoryController.java
+7
-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/dto/JgMaintainNoticeDto.java
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -29,11 +30,15 @@ public class JgMaintainNoticeDto extends BaseDto {
...
@@ -29,11 +30,15 @@ public class JgMaintainNoticeDto extends BaseDto {
private
String
applyNo
;
private
String
applyNo
;
@ApiModelProperty
(
value
=
"告知日期"
)
@ApiModelProperty
(
value
=
"告知日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
noticeDate
;
private
Date
noticeDate
;
@ApiModelProperty
(
value
=
"告知状态"
)
@ApiModelProperty
(
value
=
"告知状态"
)
private
String
noticeStatus
;
private
String
noticeStatus
;
@ApiModelProperty
(
value
=
"告知状态名称"
)
private
String
noticeStatusDesc
;
@ApiModelProperty
(
value
=
"施工单位统一信用代码"
)
@ApiModelProperty
(
value
=
"施工单位统一信用代码"
)
private
String
installUnitCreditCode
;
private
String
installUnitCreditCode
;
...
@@ -68,6 +73,7 @@ public class JgMaintainNoticeDto extends BaseDto {
...
@@ -68,6 +73,7 @@ public class JgMaintainNoticeDto extends BaseDto {
private
String
instanceStatus
;
private
String
instanceStatus
;
@ApiModelProperty
(
value
=
"受理完成日期"
)
@ApiModelProperty
(
value
=
"受理完成日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
acceptDate
;
private
Date
acceptDate
;
@ApiModelProperty
(
value
=
"施工区域-省"
)
@ApiModelProperty
(
value
=
"施工区域-省"
)
...
@@ -86,6 +92,7 @@ public class JgMaintainNoticeDto extends BaseDto {
...
@@ -86,6 +92,7 @@ public class JgMaintainNoticeDto extends BaseDto {
private
String
address
;
private
String
address
;
@ApiModelProperty
(
value
=
"计划施工日期"
)
@ApiModelProperty
(
value
=
"计划施工日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
planDate
;
private
Date
planDate
;
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
...
@@ -148,4 +155,23 @@ public class JgMaintainNoticeDto extends BaseDto {
...
@@ -148,4 +155,23 @@ public class JgMaintainNoticeDto extends BaseDto {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
private
List
<
Map
<
String
,
Object
>>
deviceList
;
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)"
)
private
String
factoryUseSiteStreet
;
@ApiModelProperty
(
value
=
"完整地址"
)
private
String
fullAddress
;
;
@ApiModelProperty
(
value
=
"区名字"
)
private
String
countyName
;
@ApiModelProperty
(
value
=
"市名字"
)
private
String
cityName
;
@ApiModelProperty
(
value
=
"省名字"
)
private
String
provinceName
;
@ApiModelProperty
(
value
=
"街道名字"
)
private
String
streetName
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
View file @
b376e6ed
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
...
@@ -91,6 +93,7 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -91,6 +93,7 @@ public class JgReformNoticeDto extends BaseDto {
private
String
address
;
private
String
address
;
@ApiModelProperty
(
value
=
"计划施工日期"
)
@ApiModelProperty
(
value
=
"计划施工日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
planDate
;
private
Date
planDate
;
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
...
@@ -121,10 +124,12 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -121,10 +124,12 @@ public class JgReformNoticeDto extends BaseDto {
private
String
entrustingUnitName
;
private
String
entrustingUnitName
;
@ApiModelProperty
(
value
=
"委托书附件"
)
@ApiModelProperty
(
value
=
"委托书附件"
)
private
JSONObject
powerOfAttorney
;
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
JSONObject
>
powerOfAttorney
;
@ApiModelProperty
(
value
=
"施工合同附件"
)
@ApiModelProperty
(
value
=
"施工合同附件"
)
private
JSONObject
constructionContract
;
@TableField
(
typeHandler
=
FastjsonTypeHandler
.
class
)
private
List
<
JSONObject
>
constructionContract
;
@ApiModelProperty
(
value
=
"施工合同是否本单位与甲方直接签署"
)
@ApiModelProperty
(
value
=
"施工合同是否本单位与甲方直接签署"
)
private
String
isSignedWithA
;
private
String
isSignedWithA
;
...
@@ -167,7 +172,11 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -167,7 +172,11 @@ public class JgReformNoticeDto extends BaseDto {
+
(
StringUtils
.
isEmpty
(
this
.
countyName
)
?
""
:
this
.
countyName
)
+
(
StringUtils
.
isEmpty
(
this
.
countyName
)
?
""
:
this
.
countyName
)
+
(
StringUtils
.
isEmpty
(
this
.
address
)
?
""
:
this
.
address
);
+
(
StringUtils
.
isEmpty
(
this
.
address
)
?
""
:
this
.
address
);
}
}
//
// @ApiModelProperty (value = "设备注册代码")
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)"
)
// private String equRegisterCode;
private
String
factoryUseSiteStreet
;
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)"
)
private
String
streetName
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgTransferNoticeDto.java
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.util.StringUtils
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 移装造告知
* 移装造告知
...
@@ -84,6 +88,7 @@ public class JgTransferNoticeDto extends BaseDto {
...
@@ -84,6 +88,7 @@ public class JgTransferNoticeDto extends BaseDto {
private
String
address
;
private
String
address
;
@ApiModelProperty
(
value
=
"计划施工日期"
)
@ApiModelProperty
(
value
=
"计划施工日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
planDate
;
private
Date
planDate
;
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
...
@@ -140,4 +145,39 @@ public class JgTransferNoticeDto extends BaseDto {
...
@@ -140,4 +145,39 @@ public class JgTransferNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"是否西咸"
)
@ApiModelProperty
(
value
=
"是否西咸"
)
private
String
isXixian
;
private
String
isXixian
;
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)"
)
private
String
factoryUseSiteStreet
;
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)-名称"
)
private
String
streetName
;
@ApiModelProperty
(
value
=
"委托书附件"
)
private
List
<
Map
<
String
,
Object
>>
powerOfAttorneyList
;
@ApiModelProperty
(
value
=
"施工合同附件"
)
private
List
<
Map
<
String
,
Object
>>
constructionContractList
;
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"告知设备列表"
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
@ApiModelProperty
(
value
=
"区名字"
)
private
String
countyName
;
@ApiModelProperty
(
value
=
"市名字"
)
private
String
cityName
;
@ApiModelProperty
(
value
=
"省名字"
)
private
String
provinceName
;
@ApiModelProperty
(
value
=
"完整地址"
)
private
String
fullAddress
;
public
String
getFullAddress
()
{
return
(
StringUtils
.
isEmpty
(
this
.
provinceName
)
?
""
:
this
.
provinceName
)
+
(
StringUtils
.
isEmpty
(
this
.
cityName
)
?
""
:
this
.
cityName
)
+
(
StringUtils
.
isEmpty
(
this
.
countyName
)
?
""
:
this
.
countyName
)
+
(
StringUtils
.
isEmpty
(
this
.
address
)
?
""
:
this
.
address
);
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgMaintainNotice.java
View file @
b376e6ed
...
@@ -120,24 +120,47 @@ public class JgMaintainNotice extends BaseEntity {
...
@@ -120,24 +120,47 @@ public class JgMaintainNotice extends BaseEntity {
private
String
province
;
private
String
province
;
/**
/**
* 施工区域-省
*/
@TableField
(
"province_name"
)
private
String
provinceName
;
/**
* 施工区域-市
* 施工区域-市
*/
*/
@TableField
(
"city"
)
@TableField
(
"city"
)
private
String
city
;
private
String
city
;
/**
/**
* 施工区域-市
*/
@TableField
(
"city_name"
)
private
String
cityName
;
/**
* 施工区域-区/县
* 施工区域-区/县
*/
*/
@TableField
(
"county"
)
@TableField
(
"county"
)
private
String
county
;
private
String
county
;
/**
/**
* 施工区域-区/县
*/
@TableField
(
"county_name"
)
private
String
countyName
;
/**
* 施工区域-街道(镇)
* 施工区域-街道(镇)
*/
*/
@TableField
(
"street"
)
@TableField
(
"street"
)
private
String
street
;
private
String
street
;
/**
/**
* 施工区域-街道(镇)
*/
@TableField
(
value
=
"street_name"
)
private
String
streetName
;
/**
* 施工设备详细地址
* 施工设备详细地址
*/
*/
@TableField
(
"address"
)
@TableField
(
"address"
)
...
@@ -251,4 +274,10 @@ public class JgMaintainNotice extends BaseEntity {
...
@@ -251,4 +274,10 @@ public class JgMaintainNotice extends BaseEntity {
@TableField
(
"receive_org_code"
)
@TableField
(
"receive_org_code"
)
private
String
receiveOrgCode
;
private
String
receiveOrgCode
;
/**
* 施工区域-街道(镇)
*/
@TableField
(
value
=
"factory_use_site_street"
)
private
String
factoryUseSiteStreet
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgReformNotice.java
View file @
b376e6ed
...
@@ -10,6 +10,7 @@ import lombok.Data;
...
@@ -10,6 +10,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 改造告知
* 改造告知
...
@@ -209,13 +210,13 @@ public class JgReformNotice extends BaseEntity {
...
@@ -209,13 +210,13 @@ public class JgReformNotice extends BaseEntity {
* 委托书附件
* 委托书附件
*/
*/
@TableField
(
value
=
"power_of_attorney"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
@TableField
(
value
=
"power_of_attorney"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
JSONObject
powerOfAttorney
;
private
List
<
JSONObject
>
powerOfAttorney
;
/**
/**
* 施工合同附件
* 施工合同附件
*/
*/
@TableField
(
value
=
"construction_contract"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
@TableField
(
value
=
"construction_contract"
,
typeHandler
=
FastjsonTypeHandler
.
class
)
private
JSONObject
constructionContract
;
private
List
<
JSONObject
>
constructionContract
;
/**
/**
* 施工合同是否本单位与甲方直接签署
* 施工合同是否本单位与甲方直接签署
...
@@ -262,4 +263,17 @@ public class JgReformNotice extends BaseEntity {
...
@@ -262,4 +263,17 @@ public class JgReformNotice extends BaseEntity {
@TableField
(
"is_xixian"
)
@TableField
(
"is_xixian"
)
private
String
isXixian
;
private
String
isXixian
;
/**
* * 设备使用地点-街道(镇)
* */
@TableField
(
value
=
"\"factory_use_site_street\""
)
private
String
factoryUseSiteStreet
;
/**
* * 设备使用地点-街道(镇)-名称
* */
@TableField
(
value
=
"\"street_name\""
)
private
String
streetName
;
}
}
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 @
b376e6ed
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.entity;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
...
@@ -255,4 +256,27 @@ public class JgTransferNotice extends BaseEntity {
...
@@ -255,4 +256,27 @@ public class JgTransferNotice extends BaseEntity {
*/
*/
@TableField
(
"is_xixian"
)
@TableField
(
"is_xixian"
)
private
String
isXixian
;
private
String
isXixian
;
/**
* * 设备使用地点-街道(镇)
* */
@TableField
(
value
=
"\"factory_use_site_street\""
)
private
String
factoryUseSiteStreet
;
/**
* * 设备使用地点-街道(镇)-名称
* */
@TableField
(
value
=
"\"street_name\""
)
private
String
streetName
;
@TableField
(
"county_name"
)
private
String
countyName
;
@TableField
(
"city_name"
)
private
String
cityName
;
@TableField
(
"province_name"
)
private
String
provinceName
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgUseRegistration.java
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
entity
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
@@ -169,5 +170,9 @@ public class JgUseRegistration extends BaseEntity {
...
@@ -169,5 +170,9 @@ public class JgUseRegistration extends BaseEntity {
private
String
nextExecuteIds
;
private
String
nextExecuteIds
;
@TableField
(
value
=
"promoter"
)
private
String
promoter
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/MaintainTypeEnum.java
0 → 100644
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
/**
* 办理状态枚举
*/
public
enum
MaintainTypeEnum
{
GENERAL
(
1
,
"一般维修"
),
PRIORITY
(
2
,
"重点维修"
);
private
final
int
code
;
private
final
String
name
;
MaintainTypeEnum
(
int
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
String
getNameByType
(
Long
code
)
{
String
name
=
null
;
for
(
MaintainTypeEnum
enumOne
:
MaintainTypeEnum
.
values
())
{
if
(
enumOne
.
getCode
()
==
code
)
{
name
=
enumOne
.
getName
();
break
;
}
}
return
name
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/UseStatusEnum.java
View file @
b376e6ed
...
@@ -14,9 +14,9 @@ import java.util.Map;
...
@@ -14,9 +14,9 @@ import java.util.Map;
public
enum
UseStatusEnum
{
public
enum
UseStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
),
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
),
RECEIVE
(
"一级受理"
,
"receive"
,
"一级
受理
待受理"
),
RECEIVE
(
"一级受理"
,
"receive"
,
"一级待受理"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级
受理
待受理"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级待受理"
),
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级
受理
待受理"
);
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级待受理"
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgTransferNoticeEqMapper.java
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
/**
* 移装告知设备关系表 Mapper 接口
* 移装告知设备关系表 Mapper 接口
...
@@ -9,6 +8,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -9,6 +8,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @author system_generator
* @date 2023-12-19
* @date 2023-12-19
*/
*/
public
interface
JgTransferNoticeEqMapper
extends
BaseMapper
<
JgTransferNoticeEq
>
{
public
interface
JgTransferNoticeEqMapper
extends
Custom
BaseMapper
<
JgTransferNoticeEq
>
{
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgTransferNoticeMapper.java
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 移装造告知 Mapper 接口
* 移装造告知 Mapper 接口
...
@@ -9,6 +15,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -9,6 +15,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @author system_generator
* @date 2023-12-19
* @date 2023-12-19
*/
*/
public
interface
JgTransferNoticeMapper
extends
BaseMapper
<
JgTransferNotice
>
{
public
interface
JgTransferNoticeMapper
extends
CustomBaseMapper
<
JgTransferNotice
>
{
Page
<
JgTransferNotice
>
queryForPage
(
Page
<
JgTransferNotice
>
page
,
@Param
(
"param"
)
JgTransferNoticeDto
model
,
@Param
(
"type"
)
String
type
,
@Param
(
"orgCode"
)
String
orgCode
);
@MapKey
(
"sequenceNbr"
)
List
<
Map
<
String
,
Object
>>
queryEquipInformation
(
@Param
(
"sequenceNbr"
)
long
sequenceNbr
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
View file @
b376e6ed
...
@@ -27,4 +27,5 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
...
@@ -27,4 +27,5 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Page
<
Map
<
String
,
Object
>>
getEquipListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"factoryNum"
)
String
factoryNum
,
@Param
(
"equList"
)
String
equList
,
@Param
(
"equCategory"
)
String
equCategory
);
Page
<
Map
<
String
,
Object
>>
getEquipListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"factoryNum"
)
String
factoryNum
,
@Param
(
"equList"
)
String
equList
,
@Param
(
"equCategory"
)
String
equCategory
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgTransferNoticeEqService.java
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq
;
/**
/**
* 移装告知设备关系表接口类
* 移装告知设备关系表接口类
*
*
* @author system_generator
* @author system_generator
* @date 2023-12-19
* @date 2023-12-19
*/
*/
public
interface
IJgTransferNoticeEqService
{
public
interface
IJgTransferNoticeEqService
extends
IService
<
JgTransferNoticeEq
>
{
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgTransferNoticeService.java
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
java.util.Map
;
/**
/**
* 移装造告知接口类
* 移装造告知接口类
*
*
* @author system_generator
* @author system_generator
* @date 2023-12-19
* @date 2023-12-19
*/
*/
public
interface
IJgTransferNoticeService
{
public
interface
IJgTransferNoticeService
extends
IService
<
JgTransferNotice
>
{
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
);
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
);
Page
<
JgTransferNoticeDto
>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
);
Boolean
deleteForBatch
(
Long
[]
sequenceNbrs
);
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgTransferNoticeDto
>
model
,
ReginParams
reginParams
);
String
generateTransferNoticeReport
(
Long
sequenceNbr
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
b376e6ed
...
@@ -42,8 +42,9 @@
...
@@ -42,8 +42,9 @@
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )
AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )
AND isn.receive_org_credit_code = #{orgCode}
</if>
</if>
<if
test=
"
orgCode != null and orgCode != '
'"
>
<if
test=
"
type == 'enterprise
'"
>
AND isn.install_unit_credit_code = #{orgCode}
AND isn.install_unit_credit_code = #{orgCode}
</if>
</if>
</where>
</where>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
b376e6ed
...
@@ -6,23 +6,28 @@
...
@@ -6,23 +6,28 @@
select
select
tjmn.sequence_nbr AS sequenceNbr,
tjmn.sequence_nbr AS sequenceNbr,
tjmn.apply_no AS applyNo,
tjmn.apply_no AS applyNo,
tjmn.supervisory_code AS supervisoryCode,
tjmn.notice_date AS noticeDate,
tjmn.notice_date AS noticeDate,
tjmn.use_unit_name AS useUnitName,
tjmn.use_unit_name AS useUnitName,
tjmn.receive_org_name AS receiveOrgName,
tjmn.receive_org_name AS receiveOrgName,
tjmn.region_no AS regionNo,
tjmn.address AS address,
tjmn.address AS address,
tjmn.notice_status AS noticeStatus,
tjmn.notice_status AS noticeStatus,
tjmn.install_unit_name AS installUnitName,
tjmn.install_unit_name AS installUnitName,
tjmn.province,
tjmn.city,
tjmn.county,
tjmn.factory_use_site_street,
tjmn.street_name,
tjmn.street,
tjmn.maintain_type,
tjmn.plan_date,
tjmn.province_name AS provinceName,
tjmn.province_name AS provinceName,
tjmn.city_name AS cityName,
tjmn.city_name AS cityName,
tjmn.county_name AS countyName,
tjmn.county_name AS countyName,
tjmn.instance_id AS instanceId,
tjmn.instance_id AS instanceId
tjmn.notice_report_url AS noticeReportUrl
FROM
FROM
tzs_jg_maintain_notice tjmn
tzs_jg_maintain_notice tjmn
<where>
<where>
tjmn.is_delete =
false
tjmn.is_delete =
0
<if
test=
"param != null "
>
<if
test=
"param != null "
>
<if
test=
"param.applyNo != null and param.applyNo != ''"
>
<if
test=
"param.applyNo != null and param.applyNo != ''"
>
AND tjmn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
AND tjmn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
...
@@ -40,12 +45,13 @@
...
@@ -40,12 +45,13 @@
AND tjmn.notice_status = #{param.noticeStatus}
AND tjmn.notice_status = #{param.noticeStatus}
</if>
</if>
</if>
</if>
<if
test=
"type == 'supervision'"
>
<!-- <if test="type == 'supervision'">-->
AND (tjmn.notice_status in ('6612', '6613', '6614') or tjmn.status in('6614') )
<!-- AND (tjmn.notice_status in ('6612', '6613', '6614') or tjmn.status in('6614') )-->
</if>
<!-- AND tjmn.receive_org_credit_code = #{orgCode}-->
<if
test=
"orgCode != null and orgCode != ''"
>
<!-- </if>-->
AND tjmn.install_unit_credit_code = #{orgCode}
<!-- <if test="type == 'enterprise'">-->
</if>
<!-- AND tjmn.install_unit_credit_code = #{orgCode}-->
<!-- </if>-->
</where>
</where>
ORDER BY
ORDER BY
tjmn.notice_date DESC
tjmn.notice_date DESC
...
@@ -54,13 +60,25 @@
...
@@ -54,13 +60,25 @@
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
select
select
tjmn.sequence_nbr AS sequenceNbr,
tjmn.sequence_nbr AS sequenceNbr,
tjmn.install_unit_name AS installUnitName,
tjmn.apply_no AS applyNo,
tjmn.apply_no AS applyNo,
tjmn.province,
tjmn.notice_date AS noticeDate,
tjmn.city AS cityName,
tjmn.county AS countyName,
tjmn.address AS address,
tjmn.use_unit_name AS useUnitName,
tjmn.use_unit_name AS useUnitName,
tjmn.receive_org_name AS receiveOrgName,
tjmn.address AS address,
tjmn.notice_status AS noticeStatus,
tjmn.install_unit_name AS installUnitName,
tjmn.province,
tjmn.city,
tjmn.county,
tjmn.factory_use_site_street,
tjmn.street_name,
tjmn.street,
tjmn.maintain_type,
tjmn.plan_date,
tjmn.province_name AS provinceName,
tjmn.city_name AS cityName,
tjmn.county_name AS countyName,
tjmn.instance_id AS instanceId,
ri.equ_list AS equList,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.EQU_DEFINE AS equDefine,
...
@@ -97,7 +115,7 @@
...
@@ -97,7 +115,7 @@
ui.ADDRESS AS useUnitAddress
ui.ADDRESS AS useUnitAddress
FROM
FROM
tzs_jg_maintain_notice tjmn
tzs_jg_maintain_notice tjmn
LEFT JOIN tzs_jg_
installatio
n_notice_eq re ON re.equip_transfer_id = tjmn.sequence_nbr
LEFT JOIN tzs_jg_
maintai
n_notice_eq re ON re.equip_transfer_id = tjmn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
View file @
b376e6ed
...
@@ -2,4 +2,122 @@
...
@@ -2,4 +2,122 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper"
>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice"
>
select
tjtn.sequence_nbr AS sequenceNbr,
tjtn.apply_no AS applyNo,
tjtn.notice_date AS noticeDate,
tjtn.use_unit_name AS useUnitName,
tjtn.receive_org_name AS receiveOrgName,
tjtn.address AS address,
tjtn.notice_status AS noticeStatus,
tjtn.install_unit_name AS installUnitName,
tjtn.province AS provinceName,
tjtn.city AS cityName,
tjtn.county AS countyName,
tjtn.instance_id AS instanceId,
tjtn.transfer_type AS transferType,
tjtn.plan_date AS planDate
FROM
tzs_jg_transfer_notice tjtn
<where>
tjtn.is_delete = false
<if
test=
"param != null "
>
<if
test=
"param.applyNo != null and param.applyNo != ''"
>
AND tjtn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
</if>
<if
test=
"param.receiveOrgName != null and param.receiveOrgName != ''"
>
AND tjtn.receive_org_name LIKE CONCAT('%', #{param.receiveOrgName}, '%')
</if>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
AND tjtn.use_unit_name LIKE CONCAT('%', #{param.useUnitName}, '%')
</if>
<if
test=
"param.installUnitName != null and param.installUnitName != ''"
>
AND tjtn.install_unit_name LIKE CONCAT('%', #{param.installUnitName}, '%')
</if>
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
AND tjtn.notice_status = #{param.noticeStatus}
</if>
</if>
<if
test=
"type == 'supervision'"
>
AND (tjtn.notice_status in ('6612', '6613', '6614') or tjtn.status in('6614') )
</if>
<if
test=
"orgCode != null and orgCode != ''"
>
AND tjtn.install_unit_credit_code = #{orgCode}
</if>
</where>
ORDER BY
tjtn.notice_date DESC
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
select
tjtn.sequence_nbr AS sequenceNbr,
tjtn.install_unit_name AS installUnitName,
tjtn.apply_no AS applyNo,
tjtn.province,
tjtn.city AS cityName,
tjtn.county AS countyName,
tjtn.address AS address,
tjtn.use_unit_name AS useUnitName,
tjtn.install_unit_credit_code AS installUnitCreditCode,
tjtn.install_unit_name AS installUnitName,
tjtn.equip_num AS equipName,
tjtn.rec_date AS recDate,
tjtn.create_date AS createDate,
tjtn.create_user_name AS createUserName,
tjtn.accept_date AS acceptDate,
tjtn.receive_company_code AS receiveCompanyCode,
tjtn.construction_contract AS constructionContract,
tjtn.transfer_type AS transferType,
tjtn.factory_use_site_street AS factoryUseSiteStreet,
tjtn.province AS provinceName,
tjtn.city AS cityName,
tjtn.county AS countyName,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
ri.equ_price AS equPrice,
ri.product_photo AS productPhoto,
di.design_unit_credit_code AS designUnitCreditCode,
di.design_unit_name AS designUnitName,
di.design_license_num AS designLicenseNum,
di.design_use_date AS designUseDate,
di.design_date AS designDate,
di.drawing_do AS drawingDo,
di.appraisal_unit AS appraisalUnit,
di.appraisal_date AS appraisalDate,
di.design_doc AS designDoc,
di.design_standard AS designStandard,
fi.produce_unit_credit_code AS produceUnitCreditCode,
fi.produce_unit_name AS produceUnitName,
fi.produce_license_num AS produceLicenseNum,
fi.factory_num AS factoryNum,
fi.produce_date AS produceDate,
fi.imported AS imported,
fi.produce_country AS produceCountry,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ui.phone AS safetyManagerPhone,
ui.PROVINCE_NAME AS useUnitProvinceName,
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.ADDRESS AS useUnitAddress
FROM
tzs_jg_transfer_notice tjtn
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = tjtn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equ_id
WHERE
tjtn.sequence_nbr = #{sequenceNbr}
LIMIT 1
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
b376e6ed
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationMapper"
>
<update
id=
"updatePromoter"
>
UPDATE tzs_jg_use_registration set promoter = null
where sequence_nbr = #{id}
</update>
<select
id=
"getListPage"
resultType=
"java.util.Map"
>
<select
id=
"getListPage"
resultType=
"java.util.Map"
>
...
@@ -18,7 +22,8 @@
...
@@ -18,7 +22,8 @@
ur.instance_id as instanceId,
ur.instance_id as instanceId,
re.equ_id as equipId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.apply_no as applyNo,
ur.next_execute_ids as nextExecuteIds
ur.next_execute_ids as nextExecuteIds,
ur.promoter
from tzs_jg_use_registration ur
from tzs_jg_use_registration ur
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintainByWorkFlowController.java
View file @
b376e6ed
...
@@ -34,19 +34,19 @@ public class JgMaintainByWorkFlowController {
...
@@ -34,19 +34,19 @@ public class JgMaintainByWorkFlowController {
@Autowired
@Autowired
JgMaintainNoticeServiceImpl
jgMaintainNoticeServiceImpl
;
JgMaintainNoticeServiceImpl
jgMaintainNoticeServiceImpl
;
/**
//
/**
* 提交
//
* 提交
*
//
*
* @return
//
* @return
*/
//
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
//
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping
(
value
=
"/submit"
)
//
@PostMapping(value = "/submit")
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"维修告知提交"
,
notes
=
"维修告知提交"
)
//
@ApiOperation(httpMethod = "POST", value = "维修告知提交", notes = "维修告知提交")
public
ResponseModel
<
JgMaintainNoticeDto
>
submit
(
@RequestBody
JgMaintainNoticeDto
model
,
String
op
)
{
//
public ResponseModel<JgMaintainNoticeDto> submit(@RequestBody JgMaintainNoticeDto model, String op) {
// TODO 发起维修告知流程
//
// TODO 发起维修告知流程
// jgMaintainNoticeServiceImpl.submit(model, op);
//
// jgMaintainNoticeServiceImpl.submit(model, op);
return
ResponseHelper
.
buildResponse
(
model
);
//
return ResponseHelper.buildResponse(model);
}
//
}
/**
/**
* 撤销
* 撤销
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintainNoticeController.java
View file @
b376e6ed
...
@@ -37,6 +37,7 @@ public class JgMaintainNoticeController extends BaseController {
...
@@ -37,6 +37,7 @@ public class JgMaintainNoticeController extends BaseController {
@Autowired
@Autowired
private
IJgMaintainNoticeService
iJgMaintainNoticeService
;
private
IJgMaintainNoticeService
iJgMaintainNoticeService
;
private
static
final
String
TABLE_PAGE_ID
=
"1734141426742095873"
;
/**
/**
* 新增
* 新增
*
*
...
@@ -61,12 +62,12 @@ public class JgMaintainNoticeController extends BaseController {
...
@@ -61,12 +62,12 @@ public class JgMaintainNoticeController extends BaseController {
@PutMapping
(
value
=
"/update"
)
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新维修告知"
,
notes
=
"根据sequenceNbr更新维修告知"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新维修告知"
,
notes
=
"根据sequenceNbr更新维修告知"
)
public
ResponseModel
<
JgMaintainNoticeDto
>
updateBySequenceNbrJgMaintainNotice
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
public
ResponseModel
<
JgMaintainNoticeDto
>
updateBySequenceNbrJgMaintainNotice
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgMaintainNoticeDto
maintainInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"maintainInfo"
)),
JgMaintainNoticeDto
.
class
,
true
);
JgMaintainNoticeDto
maintainInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
TABLE_PAGE_ID
)),
JgMaintainNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
maintainInfo
))
{
if
(
Objects
.
isNull
(
maintainInfo
))
{
throw
new
IllegalArgumentException
(
"参数maintainInfo不能为空"
);
throw
new
IllegalArgumentException
(
"参数maintainInfo不能为空"
);
}
}
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"maintainInfo"
)).
get
(
"proxyStatementAttachmen
t"
);
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
TABLE_PAGE_ID
)).
get
(
"constructionContractLis
t"
);
Object
o1
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"maintainInfo"
)).
get
(
"installContractAttachmen
t"
);
Object
o1
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
TABLE_PAGE_ID
)).
get
(
"powerOfAttorneyLis
t"
);
maintainInfo
.
setConstructionContractList
((
List
<
Map
<
String
,
Object
>>)
o
);
maintainInfo
.
setConstructionContractList
((
List
<
Map
<
String
,
Object
>>)
o
);
maintainInfo
.
setPowerOfAttorneyList
((
List
<
Map
<
String
,
Object
>>)
o1
);
maintainInfo
.
setPowerOfAttorneyList
((
List
<
Map
<
String
,
Object
>>)
o1
);
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
updateMaintainNotice
(
submitType
,
maintainInfo
,
op
));
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
updateMaintainNotice
(
submitType
,
maintainInfo
,
op
));
...
@@ -113,7 +114,6 @@ public class JgMaintainNoticeController extends BaseController {
...
@@ -113,7 +114,6 @@ public class JgMaintainNoticeController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
queryBySequenceNbr
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
iJgMaintainNoticeService
.
queryBySequenceNbr
(
sequenceNbr
));
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
...
@@ -123,7 +123,7 @@ public class JgMaintainNoticeController extends BaseController {
...
@@ -123,7 +123,7 @@ public class JgMaintainNoticeController extends BaseController {
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/page"
)
@PostMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"
GE
T"
,
value
=
"维修告知分页查询"
,
notes
=
"维修告知分页查询"
)
@ApiOperation
(
httpMethod
=
"
POS
T"
,
value
=
"维修告知分页查询"
,
notes
=
"维修告知分页查询"
)
public
ResponseModel
<
Page
<
JgMaintainNoticeDto
>>
queryForPage
(
public
ResponseModel
<
Page
<
JgMaintainNoticeDto
>>
queryForPage
(
@ApiParam
(
value
=
"当前页码"
,
required
=
true
)
@RequestParam
(
value
=
"current"
,
defaultValue
=
"1"
)
int
current
,
@ApiParam
(
value
=
"当前页码"
,
required
=
true
)
@RequestParam
(
value
=
"current"
,
defaultValue
=
"1"
)
int
current
,
@ApiParam
(
value
=
"每页大小"
,
required
=
true
)
@RequestParam
(
value
=
"size"
,
defaultValue
=
"20"
)
int
size
,
@ApiParam
(
value
=
"每页大小"
,
required
=
true
)
@RequestParam
(
value
=
"size"
,
defaultValue
=
"20"
)
int
size
,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgReformByWorkFlowController.java
View file @
b376e6ed
...
@@ -27,8 +27,8 @@ import java.util.Objects;
...
@@ -27,8 +27,8 @@ import java.util.Objects;
* @date 2023-12-12
* @date 2023-12-12
*/
*/
@RestController
@RestController
@Api
(
tags
=
"改造告知工作流相关Api"
)
@Api
(
tags
=
"改造告知工作流相关Api"
)
@RequestMapping
(
value
=
"/jg-reform-workflow"
)
@RequestMapping
(
value
=
"/jg-reform-workflow"
)
public
class
JgReformByWorkFlowController
{
public
class
JgReformByWorkFlowController
{
@Autowired
@Autowired
...
@@ -39,9 +39,10 @@ public class JgReformByWorkFlowController {
...
@@ -39,9 +39,10 @@ public class JgReformByWorkFlowController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@Deprecated
@PostMapping
(
value
=
"/submit"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知提交"
,
notes
=
"改造告知提交"
)
@PostMapping
(
value
=
"/submit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知提交"
,
notes
=
"改造告知提交"
)
public
ResponseModel
<
JgReformNoticeDto
>
submit
(
@RequestBody
JgReformNoticeDto
model
,
String
op
)
{
public
ResponseModel
<
JgReformNoticeDto
>
submit
(
@RequestBody
JgReformNoticeDto
model
,
String
op
)
{
// TODO 发起改造告知流程
// TODO 发起改造告知流程
// jgReformNoticeService.submit(model, op);
// jgReformNoticeService.submit(model, op);
...
@@ -53,13 +54,13 @@ public class JgReformByWorkFlowController {
...
@@ -53,13 +54,13 @@ public class JgReformByWorkFlowController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/cancel"
)
@PostMapping
(
value
=
"/cancel"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知撤销"
,
notes
=
"改造告知撤销"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知撤销"
,
notes
=
"改造告知撤销"
)
public
ResponseModel
<
JgReformNoticeDto
>
cancel
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
public
ResponseModel
<
JgReformNoticeDto
>
cancel
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
JgReformNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"
installationInfo
"
)),
JgReformNoticeDto
.
class
,
true
);
JgReformNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"
reformNoticeAdd
"
)),
JgReformNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
installationInfo
))
{
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数
installation
Info不能为空"
);
throw
new
IllegalArgumentException
(
"参数
reform
Info不能为空"
);
}
}
jgReformNoticeService
.
cancel
(
installationInfo
);
jgReformNoticeService
.
cancel
(
installationInfo
);
return
ResponseHelper
.
buildResponse
(
installationInfo
);
return
ResponseHelper
.
buildResponse
(
installationInfo
);
...
@@ -70,15 +71,15 @@ public class JgReformByWorkFlowController {
...
@@ -70,15 +71,15 @@ public class JgReformByWorkFlowController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/accept"
)
@PostMapping
(
value
=
"/accept"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知受理"
,
notes
=
"改造告知受理"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知受理"
,
notes
=
"改造告知受理"
)
public
ResponseModel
<
JgReformNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
public
ResponseModel
<
JgReformNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
// TODO 受理改造告知流程
// TODO 受理改造告知流程
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
model1
.
get
(
"installationInfo
"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
model1
.
get
(
"reformNoticeAdd
"
);
JgReformNoticeDto
JgReformNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgReformNoticeDto
.
class
);
JgReformNoticeDto
JgReformNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgReformNoticeDto
.
class
);
jgReformNoticeService
.
accept
(
JgReformNoticeDto
,
op
);
jgReformNoticeService
.
accept
(
JgReformNoticeDto
,
op
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgReformNoticeController.java
View file @
b376e6ed
...
@@ -67,7 +67,7 @@ public class JgReformNoticeController extends BaseController {
...
@@ -67,7 +67,7 @@ public class JgReformNoticeController extends BaseController {
@PutMapping
(
value
=
"/update"
)
@PutMapping
(
value
=
"/update"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新改造告知"
,
notes
=
"根据sequenceNbr更新改造告知"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新改造告知"
,
notes
=
"根据sequenceNbr更新改造告知"
)
public
ResponseModel
<
JgReformNoticeDto
>
updateBySequenceNbrJgReformNotice
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
public
ResponseModel
<
JgReformNoticeDto
>
updateBySequenceNbrJgReformNotice
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgReformNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"
installation
Info"
)),
JgReformNoticeDto
.
class
,
true
);
JgReformNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"
reform
Info"
)),
JgReformNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
installationInfo
))
{
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数installationInfo不能为空"
);
throw
new
IllegalArgumentException
(
"参数installationInfo不能为空"
);
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgReformNoticeEqController.java
View file @
b376e6ed
...
@@ -5,12 +5,16 @@ import io.swagger.annotations.ApiOperation;
...
@@ -5,12 +5,16 @@ import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgReformNoticeEqServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgReformNoticeEqServiceImpl
;
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
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeEqDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgReformNoticeEqDto
;
...
@@ -24,8 +28,8 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -24,8 +28,8 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
* @date 2023-12-19
* @date 2023-12-19
*/
*/
@RestController
@RestController
@Api
(
tags
=
"改造告知设备关系表Api"
)
@Api
(
tags
=
"改造告知设备关系表Api"
)
@RequestMapping
(
value
=
"/jg-reform-notice-eq"
)
@RequestMapping
(
value
=
"/jg-reform-notice-eq"
)
public
class
JgReformNoticeEqController
extends
BaseController
{
public
class
JgReformNoticeEqController
extends
BaseController
{
@Autowired
@Autowired
...
@@ -36,9 +40,9 @@ public class JgReformNoticeEqController extends BaseController {
...
@@ -36,9 +40,9 @@ public class JgReformNoticeEqController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增改造告知设备关系表"
,
notes
=
"新增改造告知设备关系表"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增改造告知设备关系表"
,
notes
=
"新增改造告知设备关系表"
)
public
ResponseModel
<
JgReformNoticeEqDto
>
save
(
@RequestBody
JgReformNoticeEqDto
model
)
{
public
ResponseModel
<
JgReformNoticeEqDto
>
save
(
@RequestBody
JgReformNoticeEqDto
model
)
{
model
=
jgReformNoticeEqServiceImpl
.
createWithModel
(
model
);
model
=
jgReformNoticeEqServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
...
@@ -50,10 +54,10 @@ public class JgReformNoticeEqController extends BaseController {
...
@@ -50,10 +54,10 @@ public class JgReformNoticeEqController extends BaseController {
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新改造告知设备关系表"
,
notes
=
"根据sequenceNbr更新改造告知设备关系表"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新改造告知设备关系表"
,
notes
=
"根据sequenceNbr更新改造告知设备关系表"
)
public
ResponseModel
<
JgReformNoticeEqDto
>
updateBySequenceNbrJgReformNoticeEq
(
@RequestBody
JgReformNoticeEqDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
JgReformNoticeEqDto
>
updateBySequenceNbrJgReformNoticeEq
(
@RequestBody
JgReformNoticeEqDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jgReformNoticeEqServiceImpl
.
updateWithModel
(
model
));
return
ResponseHelper
.
buildResponse
(
jgReformNoticeEqServiceImpl
.
updateWithModel
(
model
));
}
}
...
@@ -64,10 +68,10 @@ public class JgReformNoticeEqController extends BaseController {
...
@@ -64,10 +68,10 @@ public class JgReformNoticeEqController extends BaseController {
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除改造告知设备关系表"
,
notes
=
"根据sequenceNbr删除改造告知设备关系表"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除改造告知设备关系表"
,
notes
=
"根据sequenceNbr删除改造告知设备关系表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgReformNoticeEqServiceImpl
.
removeById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgReformNoticeEqServiceImpl
.
removeById
(
sequenceNbr
));
}
}
...
@@ -77,9 +81,9 @@ public class JgReformNoticeEqController extends BaseController {
...
@@ -77,9 +81,9 @@ public class JgReformNoticeEqController extends BaseController {
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个改造告知设备关系表"
,
notes
=
"根据sequenceNbr查询单个改造告知设备关系表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个改造告知设备关系表"
,
notes
=
"根据sequenceNbr查询单个改造告知设备关系表"
)
public
ResponseModel
<
JgReformNoticeEqDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
JgReformNoticeEqDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgReformNoticeEqServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgReformNoticeEqServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
}
...
@@ -91,10 +95,10 @@ public class JgReformNoticeEqController extends BaseController {
...
@@ -91,10 +95,10 @@ public class JgReformNoticeEqController extends BaseController {
* @param current 每页大小
* @param current 每页大小
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"改造告知设备关系表分页查询"
,
notes
=
"改造告知设备关系表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"改造告知设备关系表分页查询"
,
notes
=
"改造告知设备关系表分页查询"
)
public
ResponseModel
<
Page
<
JgReformNoticeEqDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
JgReformNoticeEqDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
(
value
=
"size"
)
int
size
)
{
Page
<
JgReformNoticeEqDto
>
page
=
new
Page
<
JgReformNoticeEqDto
>();
Page
<
JgReformNoticeEqDto
>
page
=
new
Page
<
JgReformNoticeEqDto
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
...
@@ -107,9 +111,9 @@ public class JgReformNoticeEqController extends BaseController {
...
@@ -107,9 +111,9 @@ public class JgReformNoticeEqController extends BaseController {
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"改造告知设备关系表列表全部数据查询"
,
notes
=
"改造告知设备关系表列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"改造告知设备关系表列表全部数据查询"
,
notes
=
"改造告知设备关系表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
JgReformNoticeEqDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
JgReformNoticeEqDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
jgReformNoticeEqServiceImpl
.
queryForJgReformNoticeEqList
());
return
ResponseHelper
.
buildResponse
(
jgReformNoticeEqServiceImpl
.
queryForJgReformNoticeEqList
());
}
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgTransferNoticeController.java
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
cn.hutool.core.bean.BeanUtil
;
import
io.swagger.annotations.ApiOperation
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgTransferNoticeServiceImpl
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
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.HttpServletRequest
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
/**
/**
* 移装造告知
* 移装造告知
...
@@ -29,7 +36,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -29,7 +36,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
public
class
JgTransferNoticeController
extends
BaseController
{
public
class
JgTransferNoticeController
extends
BaseController
{
@Autowired
@Autowired
JgTransferNoticeServiceImpl
jgTransferNoticeServiceImpl
;
private
IJgTransferNoticeService
jgTransferNoticeService
;
/**
/**
* 新增移装造告知
* 新增移装造告知
...
@@ -39,23 +46,35 @@ public class JgTransferNoticeController extends BaseController {
...
@@ -39,23 +46,35 @@ public class JgTransferNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增移装造告知"
,
notes
=
"新增移装造告知"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增移装造告知"
,
notes
=
"新增移装造告知"
)
public
ResponseModel
<
JgTransferNoticeDto
>
save
(
@RequestBody
JgTransferNoticeDto
model
)
{
public
ResponseModel
<
String
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
JgTransferNoticeDto
>
model
)
{
model
=
jgTransferNoticeServiceImpl
.
createWithModel
(
model
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
ResponseHelper
.
buildResponse
(
model
);
jgTransferNoticeService
.
saveNotice
(
submitType
,
model
,
reginParams
);
return
ResponseHelper
.
buildResponse
(
""
);
}
}
/**
/**
* 根据sequenceNbr更新
* 根据sequenceNbr更新
*
*
* @param
sequenceNbr 主键
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}
"
)
@PutMapping
(
value
=
"/update
"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新移装造告知"
,
notes
=
"根据sequenceNbr更新移装造告知"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新移装造告知"
,
notes
=
"根据sequenceNbr更新移装造告知"
)
public
ResponseModel
<
JgTransferNoticeDto
>
updateBySequenceNbrJgTransferNotice
(
@RequestBody
JgTransferNoticeDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
JgTransferNoticeDto
>
updateBySequenceNbrJgTransferNotice
(
model
.
setSequenceNbr
(
sequenceNbr
);
@RequestParam
String
submitType
,
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeServiceImpl
.
updateWithModel
(
model
));
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgTransferNoticeDto
transferNoticeInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"transferInfo"
)),
JgTransferNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
transferNoticeInfo
))
{
throw
new
IllegalArgumentException
(
"参数transferInfo不能为空"
);
}
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"transferInfo"
)).
get
(
"proxyStatementAttachment"
);
Object
o1
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"transferInfo"
)).
get
(
"installContractAttachment"
);
transferNoticeInfo
.
setConstructionContractList
((
List
<
Map
<
String
,
Object
>>)
o
);
transferNoticeInfo
.
setPowerOfAttorneyList
((
List
<
Map
<
String
,
Object
>>)
o1
);
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
updateTransferNotice
(
submitType
,
transferNoticeInfo
,
op
));
}
}
/**
/**
...
@@ -65,25 +84,43 @@ public class JgTransferNoticeController extends BaseController {
...
@@ -65,25 +84,43 @@ public class JgTransferNoticeController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/
{sequenceNbr}
"
)
@DeleteMapping
(
value
=
"/
delete
"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除移装造告知"
,
notes
=
"根据sequenceNbr删除移装造告知"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除移装造告知"
,
notes
=
"根据sequenceNbr删除移装造告知"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@
PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@
RequestParam
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
Impl
.
removeById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
removeById
(
sequenceNbr
));
}
}
/**
/**
* 根据sequenceNbr批量删除
*
* @param sequenceNbrs 主键
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/batchDelete"
)
@ApiOperation
(
value
=
"根据sequenceNbr删除维保合同备案"
,
notes
=
"根据sequenceNbr删除维保合同备案"
)
public
ResponseModel
<
Boolean
>
deleteForBatch
(
@RequestParam
(
"sequenceNbrs"
)
Long
[]
sequenceNbrs
)
{
try
{
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
deleteForBatch
(
sequenceNbrs
));
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
failure
(
e
.
getMessage
());
}
}
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}
"
)
@GetMapping
(
value
=
"/details
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个移装造告知"
,
notes
=
"根据sequenceNbr查询单个移装造告知"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个移装造告知"
,
notes
=
"根据sequenceNbr查询单个移装造告知"
)
public
ResponseModel
<
JgTransferNoticeDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
Map
<
String
,
Map
<
String
,
Object
>>>
selectOne
(
@RequestParam
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
queryBySequenceNbr
(
sequenceNbr
));
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
...
@@ -92,14 +129,17 @@ public class JgTransferNoticeController extends BaseController {
...
@@ -92,14 +129,17 @@ public class JgTransferNoticeController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@PostMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"移装造告知分页查询"
,
notes
=
"移装造告知分页查询"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"移装造告知分页查询"
,
notes
=
"移装造告知分页查询"
)
public
ResponseModel
<
Page
<
JgTransferNoticeDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
JgTransferNoticeDto
>>
queryForPage
(
(
value
=
"size"
)
int
size
)
{
@ApiParam
(
value
=
"当前页码"
,
required
=
true
)
@RequestParam
(
value
=
"current"
,
defaultValue
=
"1"
)
int
current
,
Page
<
JgTransferNoticeDto
>
page
=
new
Page
<
JgTransferNoticeDto
>();
@ApiParam
(
value
=
"每页大小"
,
required
=
true
)
@RequestParam
(
value
=
"size"
,
defaultValue
=
"20"
)
int
size
,
page
.
setCurrent
(
current
);
@ApiParam
(
value
=
"类型:enterprise-企业端、supervision-监管端"
,
required
=
true
)
@RequestParam
(
value
=
"type"
,
defaultValue
=
"enterprise"
)
String
type
,
page
.
setSize
(
size
);
@RequestBody
(
required
=
false
)
JgTransferNoticeDto
model
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeServiceImpl
.
queryForJgTransferNoticePage
(
page
));
)
{
Page
<
JgTransferNotice
>
page
=
new
Page
<>(
current
,
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
queryForJgTransferNoticePage
(
page
,
model
,
type
,
reginParams
));
}
}
/**
/**
...
@@ -108,9 +148,9 @@ public class JgTransferNoticeController extends BaseController {
...
@@ -108,9 +148,9 @@ public class JgTransferNoticeController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"移装造告知列表全部数据查询"
,
notes
=
"移装造告知列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"移装造告知列表全部数据查询"
,
notes
=
"移装造告知列表全部数据查询"
)
@GetMapping
(
value
=
"/lis
t"
)
@GetMapping
(
value
=
"/generate-repor
t"
)
public
ResponseModel
<
List
<
JgTransferNoticeDto
>>
selectForList
(
)
{
public
ResponseModel
<
String
>
selectForList
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeServiceImpl
.
queryForJgTransferNoticeList
(
));
return
ResponseHelper
.
buildResponse
(
jgTransferNoticeService
.
generateTransferNoticeReport
(
sequenceNbr
));
}
}
}
}
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 @
b376e6ed
...
@@ -54,7 +54,7 @@ public class JgUseRegistrationController extends BaseController {
...
@@ -54,7 +54,7 @@ public class JgUseRegistrationController extends BaseController {
@PostMapping
(
value
=
"/flowExecute"
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgUseRegistrationServiceImpl
.
flowExecute
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
jgUseRegistrationServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
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/JgInstallationNoticeServiceImpl.java
View file @
b376e6ed
...
@@ -240,11 +240,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -240,11 +240,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
public
Page
<
JgInstallationNoticeDto
>
queryForJgInstallationNoticePage
(
Page
<
JgInstallationNotice
>
page
,
JgInstallationNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
public
Page
<
JgInstallationNoticeDto
>
queryForJgInstallationNoticePage
(
Page
<
JgInstallationNotice
>
page
,
JgInstallationNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
;
String
orgCode
;
if
(
type
.
equals
(
"enterprise"
))
{
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
}
else
{
orgCode
=
reginParams
.
getCompany
().
getOrgCode
();
orgCode
=
reginParams
.
getCompany
().
getOrgCode
();
}
Page
<
JgInstallationNotice
>
noticePage
=
jgInstallationNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
Page
<
JgInstallationNotice
>
noticePage
=
jgInstallationNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
...
...
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/JgMaintainNoticeServiceImpl.java
View file @
b376e6ed
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto;
...
@@ -13,6 +13,7 @@ import com.yeejoin.amos.boot.module.jg.api.dto.JgMaintainNoticeDto;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.MaintainTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService
;
...
@@ -50,8 +51,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -50,8 +51,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.function.Function
;
...
@@ -115,23 +114,25 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -115,23 +114,25 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
return
null
;
return
null
;
}
}
Map
<
String
,
Object
>
maintainInfo
=
BeanUtil
.
beanToMap
(
notice
);
Map
<
String
,
Object
>
maintainInfo
=
BeanUtil
.
beanToMap
(
notice
);
maintainInfo
.
put
(
"powerOfAttorneyList"
,
JSON
.
parseArray
(
notice
.
getPowerOfAttorney
()));
maintainInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvince
());
maintainInfo
.
put
(
"constructionContractList"
,
JSON
.
parseArray
(
notice
.
getConstructionContract
()));
maintainInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCity
());
maintainInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
maintainInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCounty
());
maintainInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
maintainInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
maintainInfo
.
put
(
"fullAddress"
,
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getCityName
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
maintainInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
maintainInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
maintainInfo
.
put
(
"receiveOrgC
reditC
ode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
maintainInfo
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getInspectionUnitCreditCode
())
&&
ValidationUtil
.
isEmpty
(
notice
.
getInspectionUnitName
()))
{
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getInspectionUnitCreditCode
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getInspectionUnitName
()))
{
maintainInfo
.
put
(
"inspectUnitId"
,
notice
.
getInspectionUnitCreditCode
()
+
"_"
+
notice
.
getInspectionUnitName
());
maintainInfo
.
put
(
"inspectUnitId"
,
notice
.
getInspectionUnitCreditCode
()
+
"_"
+
notice
.
getInspectionUnitName
());
}
}
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getStreet
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
maintainInfo
.
put
(
"street"
,
notice
.
getStreet
()
+
"_"
+
notice
.
getStreetName
());
}
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
"proxyStatementAttachment"
,
"installContractAttachment"
};
// 设备信息
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgMaintainNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgMaintainNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
for
(
String
s
:
fields
)
{
if
(
maintainInfo
.
containsKey
(
s
))
{
if
(
maintainInfo
.
containsKey
(
s
))
{
maintainInfo
.
put
(
s
,
JSON
.
parseArray
(
maintainInfo
.
get
(
s
).
toString
()));
maintainInfo
.
put
(
s
,
JSON
.
parseArray
(
maintainInfo
.
get
(
s
).
toString
()));
...
@@ -141,7 +142,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -141,7 +142,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
}
}
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"maintainInfo"
,
maintainInfo
);
this
.
put
(
TABLE_PAGE_ID
,
maintainInfo
);
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
}};
}};
}
}
...
@@ -156,16 +157,14 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -156,16 +157,14 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
}
// 字段转换
// 字段转换
this
.
convertField
(
noticeDto
);
this
.
convertField
(
noticeDto
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
AjaxResult
ajaxResult
;
AjaxResult
ajaxResult
;
// 发起流程
// 发起流程
if
(!
StringUtils
.
hasText
(
noticeDto
.
getInstanceId
()))
{
if
(!
StringUtils
.
hasText
(
noticeDto
.
getInstanceId
()))
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"maintainNoti
fication
"
);
dto
.
setProcessDefinitionKey
(
"maintainNoti
ce
"
);
dto
.
setBusinessKey
(
"1"
);
dto
.
setBusinessKey
(
"1"
);
try
{
try
{
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
...
@@ -175,7 +174,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -175,7 +174,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
log
.
error
(
"提交失败:{}"
,
e
);
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
}
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
String
taskId
=
dataObject
.
getString
(
"id"
);
...
@@ -219,17 +217,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -219,17 +217,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
*/
*/
@Override
@Override
public
Page
<
JgMaintainNoticeDto
>
queryForJgMaintainNoticePage
(
Page
<
JgMaintainNotice
>
page
,
JgMaintainNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
public
Page
<
JgMaintainNoticeDto
>
queryForJgMaintainNoticePage
(
Page
<
JgMaintainNotice
>
page
,
JgMaintainNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
;
String
orgCode
;
if
(
type
.
equals
(
"enterprise"
))
{
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
}
else
{
orgCode
=
reginParams
.
getCompany
().
getOrgCode
();
orgCode
=
reginParams
.
getCompany
().
getOrgCode
();
}
Page
<
JgMaintainNotice
>
noticePage
=
jgMaintainNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
Page
<
JgMaintainNotice
>
noticePage
=
jgMaintainNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
// 将Page<JgMaintainNotice>转化为Page<JgMaintainNoticeDto>
Page
<
JgMaintainNoticeDto
>
noticeDtoPage
=
new
Page
<>();
Page
<
JgMaintainNoticeDto
>
noticeDtoPage
=
new
Page
<>();
BeanUtils
.
copyProperties
(
noticePage
,
noticeDtoPage
,
"records"
);
BeanUtils
.
copyProperties
(
noticePage
,
noticeDtoPage
,
"records"
);
List
<
JgMaintainNoticeDto
>
records
=
noticePage
.
getRecords
().
stream
().
map
(
notice
->
{
List
<
JgMaintainNoticeDto
>
records
=
noticePage
.
getRecords
().
stream
().
map
(
notice
->
{
...
@@ -237,12 +227,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -237,12 +227,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
BeanUtils
.
copyProperties
(
notice
,
noticeDto
);
BeanUtils
.
copyProperties
(
notice
,
noticeDto
);
if
(
Objects
.
nonNull
(
notice
.
getNoticeStatus
()))
{
if
(
Objects
.
nonNull
(
notice
.
getNoticeStatus
()))
{
String
noticeStatusDesc
=
FlowStatusEnum
.
getNameByType
(
Long
.
valueOf
(
notice
.
getNoticeStatus
()));
String
noticeStatusDesc
=
FlowStatusEnum
.
getNameByType
(
Long
.
valueOf
(
notice
.
getNoticeStatus
()));
noticeDto
.
setNoticeStatus
(
noticeStatusDesc
);
noticeDto
.
setNoticeStatusDesc
(
noticeStatusDesc
);
}
if
(
Objects
.
nonNull
(
notice
.
getMaintainType
()))
{
String
maintainType
=
MaintainTypeEnum
.
getNameByType
(
Long
.
valueOf
(
notice
.
getMaintainType
()));
noticeDto
.
setMaintainType
(
maintainType
);
}
}
noticeDto
.
setFullAddress
(
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getCityName
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
return
noticeDto
;
return
noticeDto
;
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
noticeDtoPage
.
setRecords
(
records
);
noticeDtoPage
.
setRecords
(
records
);
return
noticeDtoPage
;
return
noticeDtoPage
;
}
}
...
@@ -324,28 +318,29 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -324,28 +318,29 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
placeholders
.
put
(
"qrCode"
,
qrCode
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
// word转pdf
// word转pdf
File
pdfFile
;
//
File pdfFile;
try
{
//
try {
pdfFile
=
this
.
wordToPdf
(
"maintai
n-notification-report.ftl"
,
placeholders
);
// pdfFile = this.wordToPdf("installatio
n-notification-report.ftl", placeholders);
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
throw
new
RuntimeException
(
e
);
//
throw new RuntimeException(e);
}
//
}
//
// 上传pdf至文件服务器
//
// 上传pdf至文件服务器
String
url
=
this
.
uploadFile
(
pdfFile
);
//
String url = this.uploadFile(pdfFile);
//
// 删除临时文件
//
// 删除临时文件
try
{
//
try {
Files
.
deleteIfExists
(
pdfFile
.
toPath
());
//
Files.deleteIfExists(pdfFile.toPath());
}
catch
(
IOException
e
)
{
//
} catch (IOException e) {
log
.
error
(
"删除临时文件失败:{}"
,
e
);
//
log.error("删除临时文件失败:{}", e);
}
//
}
// 更新到数据库
// 更新到数据库
// jgMaintainNotice.setNoticeReportUrl(url);
// jgMaintainNotice.setNoticeReportUrl(url);
// this.updateById(jgMaintainNotice);
// this.updateById(jgMaintainNotice);
return
url
;
// return url;
return
""
;
}
}
/**
/**
...
@@ -370,7 +365,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -370,7 +365,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
*/
*/
private
String
uploadFile
(
File
file
)
{
private
String
uploadFile
(
File
file
)
{
Assert
.
notNull
(
file
,
"文件不能为空"
);
Assert
.
notNull
(
file
,
"文件不能为空"
);
MultipartFile
multipartFile
=
new
ByteArrayMultipartFile
(
"file"
,
"file.pdf"
,
"application/pdf"
,
file2byte
(
file
));
MultipartFile
multipartFile
=
new
ByteArrayMultipartFile
(
"file"
,
"file.pdf"
,
"application/pdf"
,
file2byte
(
file
));
FeignClientResult
<
Map
<
String
,
String
>>
result
=
Systemctl
.
fileStorageClient
.
updateCommonFile
(
multipartFile
);
FeignClientResult
<
Map
<
String
,
String
>>
result
=
Systemctl
.
fileStorageClient
.
updateCommonFile
(
multipartFile
);
String
urlString
=
""
;
String
urlString
=
""
;
...
@@ -397,11 +391,10 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -397,11 +391,10 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
// 获取告知单号
// 获取告知单号
List
<
String
>
applyNoList
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
AZ
GZ
.
getCode
(),
deviceList
.
size
());
List
<
String
>
applyNoList
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
WX
GZ
.
getCode
(),
deviceList
.
size
());
if
(
CollectionUtils
.
isEmpty
(
applyNoList
))
{
if
(
CollectionUtils
.
isEmpty
(
applyNoList
))
{
return
;
return
;
}
}
// 判断当前是否为提交
// 判断当前是否为提交
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
...
@@ -409,8 +402,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -409,8 +402,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
// ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
// ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
)
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
...
@@ -422,8 +414,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -422,8 +414,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
try
{
try
{
FeignClientResult
result
=
Workflow
.
taskV2Client
.
startByVariableBatch
(
actWorkflowBatchDTO
);
FeignClientResult
result
=
Workflow
.
taskV2Client
.
startByVariableBatch
(
actWorkflowBatchDTO
);
List
<
Object
>
returnList
=
(
List
<
Object
>)
result
.
getResult
();
List
<
Object
>
returnList
=
(
List
<
Object
>)
result
.
getResult
();
for
(
Object
obj
:
returnList
for
(
Object
obj
:
returnList
)
{
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
instanceIdList
.
add
(
jsonObject
.
getString
(
"id"
));
instanceIdList
.
add
(
jsonObject
.
getString
(
"id"
));
}
}
...
@@ -456,21 +447,19 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -456,21 +447,19 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
list
.
add
(
dto
);
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
equipList
.
add
(
jgRelationEquip
);
});
});
jgMaintainNoticeMapper
.
insertBatchSomeColumn
(
list
);
jgMaintainNoticeMapper
.
insertBatchSomeColumn
(
list
);
List
<
JgMaintainNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgMaintainNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgMaintainNotice
>
collect
=
list
.
stream
().
filter
(
jgMaintainNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
jgMaintainNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
List
<
JgMaintainNotice
>
collect
=
list
.
stream
().
filter
(
jgMaintainNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
jgMaintainNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
Long
sequenceNbr
=
collect
.
get
(
0
).
getSequenceNbr
();
Long
sequenceNbr
=
collect
.
get
(
0
).
getSequenceNbr
();
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
jgMaintainNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
jgMaintainNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
}
}
private
void
convertField
(
JgMaintainNoticeDto
model
)
{
private
void
convertField
(
JgMaintainNoticeDto
model
)
{
// 处理图片
if
(
null
==
model
)
return
;
// 处理附件
if
(!
ValidationUtil
.
isEmpty
(
model
.
getPowerOfAttorneyList
()))
{
if
(!
ValidationUtil
.
isEmpty
(
model
.
getPowerOfAttorneyList
()))
{
model
.
setPowerOfAttorney
(
JSON
.
toJSONString
(
model
.
getPowerOfAttorneyList
()));
model
.
setPowerOfAttorney
(
JSON
.
toJSONString
(
model
.
getPowerOfAttorneyList
()));
}
}
...
@@ -478,13 +467,14 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -478,13 +467,14 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
model
.
setConstructionContract
(
JSON
.
toJSONString
(
model
.
getConstructionContractList
()));
model
.
setConstructionContract
(
JSON
.
toJSONString
(
model
.
getConstructionContractList
()));
}
}
// 分割省市区字段
// 分割省市区字段
String
province
=
model
.
getProvince
();
String
province
=
model
.
getProvince
();
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
String
[]
provinceList
=
province
.
split
(
"_"
);
String
[]
provinceList
=
province
.
split
(
"_"
);
if
(
provinceList
.
length
>
1
)
{
if
(
provinceList
.
length
>
1
)
{
model
.
setProvince
(
provinceList
[
0
]);
model
.
setProvince
(
provinceList
[
0
]);
model
.
setProvince
(
provinceList
[
1
]);
model
.
setProvince
Name
(
provinceList
[
1
]);
}
}
}
}
...
@@ -493,7 +483,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -493,7 +483,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
String
[]
cityList
=
city
.
split
(
"_"
);
String
[]
cityList
=
city
.
split
(
"_"
);
if
(
cityList
.
length
>
1
)
{
if
(
cityList
.
length
>
1
)
{
model
.
setCity
(
cityList
[
0
]);
model
.
setCity
(
cityList
[
0
]);
model
.
setCity
(
cityList
[
1
]);
model
.
setCity
Name
(
cityList
[
1
]);
}
}
}
}
...
@@ -502,7 +492,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -502,7 +492,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
String
[]
countyList
=
county
.
split
(
"_"
);
String
[]
countyList
=
county
.
split
(
"_"
);
if
(
countyList
.
length
>
1
)
{
if
(
countyList
.
length
>
1
)
{
model
.
setCounty
(
countyList
[
0
]);
model
.
setCounty
(
countyList
[
0
]);
model
.
setCounty
(
countyList
[
1
]);
model
.
setCountyName
(
countyList
[
1
]);
}
}
String
street
=
model
.
getStreet
();
if
(!
ObjectUtils
.
isEmpty
(
street
))
{
String
[]
streetList
=
street
.
split
(
"_"
);
if
(
streetList
.
length
>
1
)
{
model
.
setStreet
(
streetList
[
0
]);
model
.
setStreetName
(
streetList
[
1
]);
}
}
}
}
...
@@ -580,6 +579,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -580,6 +579,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
}
}
@Transactional
public
void
accept
(
JgMaintainNoticeDto
dto
,
String
op
)
{
public
void
accept
(
JgMaintainNoticeDto
dto
,
String
op
)
{
JgMaintainNotice
jgMaintainNotice
=
this
.
jgMaintainNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
JgMaintainNotice
jgMaintainNotice
=
this
.
jgMaintainNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
...
@@ -598,7 +598,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -598,7 +598,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
//
OtherInfo tzsJgOtherInfo = tzsJgOtherInfoMapper.selectOne(queryWrapper1);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
...
@@ -606,8 +606,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -606,8 +606,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
jgMaintainNotice
.
getCity
()).
append
(
ym
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
jgMaintainNotice
.
getCity
()).
append
(
ym
);
String
equCode
=
stringBuffer
.
toString
();
//
String equCode = stringBuffer.toString();
String
deviceRegistrationCode
=
iCreateCodeService
.
createDeviceRegistrationCode
(
equCode
);
//
String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
jgMaintainNotice
.
getCity
());
map
.
put
(
"cityCode"
,
jgMaintainNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgMaintainNotice
.
getCounty
());
map
.
put
(
"countyCode"
,
jgMaintainNotice
.
getCounty
());
...
@@ -624,10 +624,10 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -624,10 +624,10 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
supervisoryCodeInfoMapper
.
updateById
(
supervisoryCodeInfo
);
supervisoryCodeInfoMapper
.
updateById
(
supervisoryCodeInfo
);
//
boolean submit = submit(jgMaintainNotice, op);
boolean
submit
=
submit
(
jgMaintainNotice
,
op
);
// if
(submit) {
if
(
submit
)
{
// if
("0".equals(op)) {
if
(
"0"
.
equals
(
op
))
{
//
jgMaintainNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.HAVE_PROCESSED.getCode()));
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()));
// this.generateMaintainNoticeReport(jgMaintainNotice.getSequenceNbr());
// this.generateMaintainNoticeReport(jgMaintainNotice.getSequenceNbr());
// // 更新其他业务表
// // 更新其他业务表
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
...
@@ -637,12 +637,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
...
@@ -637,12 +637,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
// jgMaintainNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
// jgMaintainNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
//
} else {
}
else
{
//
jgMaintainNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_SUBMITTED.getCode()));
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
//
jgMaintainNotice.setInstanceStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
jgMaintainNotice
.
setInstanceStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
//
}
}
//
jgMaintainNoticeMapper.updateById(jgMaintainNotice);
jgMaintainNoticeMapper
.
updateById
(
jgMaintainNotice
);
//
}
}
// // 组装监管码
// // 组装监管码
// String division = "";
// String division = "";
...
...
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/JgReformNoticeServiceImpl.java
View file @
b376e6ed
...
@@ -77,7 +77,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -77,7 +77,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"renovationNotice"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"renovationNotice"
;
private
static
final
String
TABLE_PAGE_ID
=
"
1736649208330481666
"
;
private
static
final
String
TABLE_PAGE_ID
=
"
reformNoticeAdd
"
;
// 西安行政区划code
// 西安行政区划code
...
@@ -145,6 +145,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -145,6 +145,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// if (!ValidationUtil.isEmpty(notice.getInspectUnitId()) && ValidationUtil.isEmpty(notice.getInspectUnitName())) {
// if (!ValidationUtil.isEmpty(notice.getInspectUnitId()) && ValidationUtil.isEmpty(notice.getInspectUnitName())) {
// installationInfo.put("inspectUnitId", notice.getInspectUnitId() + "_" + notice.getInspectUnitName());
// installationInfo.put("inspectUnitId", notice.getInspectUnitId() + "_" + notice.getInspectUnitName());
// }
// }
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getFactoryUseSiteStreet
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
installationInfo
.
put
(
"factoryUseSiteStreet"
,
notice
.
getFactoryUseSiteStreet
()
+
"_"
+
notice
.
getStreetName
());
}
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
...
@@ -163,7 +166,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -163,7 +166,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"installationInfo"
,
installationInfo
);
this
.
put
(
TABLE_PAGE_ID
,
installationInfo
);
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
}};
}};
}
}
...
@@ -191,6 +194,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -191,6 +194,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
dto
.
setBusinessKey
(
"1"
);
dto
.
setBusinessKey
(
"1"
);
try
{
try
{
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
noticeDto
.
setInstanceId
(
instanceId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
log
.
error
(
"提交失败:{}"
,
e
);
}
}
...
@@ -497,7 +502,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -497,7 +502,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// if (!ValidationUtil.isEmpty(model.getInstallContractAttachmentList())) {
// if (!ValidationUtil.isEmpty(model.getInstallContractAttachmentList())) {
// model.setInstallContractAttachment(JSON.toJSONString(model.getInstallContractAttachmentList()));
// model.setInstallContractAttachment(JSON.toJSONString(model.getInstallContractAttachmentList()));
// }
// }
if
(
model
==
null
)
{
return
;
}
// 分割省市区字段
// 分割省市区字段
String
province
=
model
.
getProvince
();
String
province
=
model
.
getProvince
();
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
...
@@ -526,6 +533,15 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -526,6 +533,15 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
}
}
String
factoryUseSiteStreet
=
model
.
getFactoryUseSiteStreet
();
if
(!
ObjectUtils
.
isEmpty
(
factoryUseSiteStreet
))
{
String
[]
factoryUseSiteStreetList
=
factoryUseSiteStreet
.
split
(
"_"
);
if
(
factoryUseSiteStreetList
.
length
>
1
)
{
model
.
setFactoryUseSiteStreet
(
factoryUseSiteStreetList
[
0
]);
model
.
setStreetName
(
factoryUseSiteStreetList
[
1
]);
}
}
// 分割单位
// 分割单位
String
useUnitId
=
model
.
getUseUnitCreditCode
();
String
useUnitId
=
model
.
getUseUnitCreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
useUnitId
))
{
if
(!
ObjectUtils
.
isEmpty
(
useUnitId
))
{
...
@@ -627,36 +643,37 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -627,36 +643,37 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
JgReformNotice
.
getCity
()).
append
(
ym
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
JgReformNotice
.
getCity
()).
append
(
ym
);
String
equCode
=
stringBuffer
.
toString
();
String
equCode
=
stringBuffer
.
toString
();
String
deviceRegistrationCode
=
iCreateCodeService
.
createDeviceRegistrationCode
(
equCode
);
// 只有安装设备需要
// String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
JgReformNotice
.
getCity
());
map
.
put
(
"cityCode"
,
JgReformNotice
.
getCity
());
map
.
put
(
"countyCode"
,
JgReformNotice
.
getCounty
());
map
.
put
(
"countyCode"
,
JgReformNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
JgReformNotice
.
getIsXixian
()
==
null
?
"0"
:
JgReformNotice
.
getIsXixian
());
map
.
put
(
"isXiXian"
,
JgReformNotice
.
getIsXixian
()
==
null
?
"0"
:
JgReformNotice
.
getIsXixian
());
Map
<
String
,
Object
>
mapCode
;
//
Map<String, Object> mapCode;
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
//
ResponseModel<Map<String, Object>> code = tzsServiceFeignClient.createCode(map);
mapCode
=
code
.
getResult
();
//
mapCode = code.getResult();
//
LambdaQueryWrapper
<
SupervisoryCodeInfo
>
queryWrapper3
=
new
LambdaQueryWrapper
<>();
//
LambdaQueryWrapper<SupervisoryCodeInfo> queryWrapper3 = new LambdaQueryWrapper<>();
queryWrapper3
.
eq
(
SupervisoryCodeInfo:
:
getSupervisoryCode
,
mapCode
.
get
(
"superviseCode"
).
toString
());
//
queryWrapper3.eq(SupervisoryCodeInfo::getSupervisoryCode, mapCode.get("superviseCode").toString());
SupervisoryCodeInfo
supervisoryCodeInfo
=
supervisoryCodeInfoMapper
.
selectOne
(
queryWrapper3
);
//
SupervisoryCodeInfo supervisoryCodeInfo = supervisoryCodeInfoMapper.selectOne(queryWrapper3);
supervisoryCodeInfo
.
setStatus
(
"1"
);
//
supervisoryCodeInfo.setStatus("1");
supervisoryCodeInfoMapper
.
updateById
(
supervisoryCodeInfo
);
//
supervisoryCodeInfoMapper.updateById(supervisoryCodeInfo);
boolean
submit
=
submit
(
JgReformNotice
,
op
);
boolean
submit
=
submit
(
JgReformNotice
,
op
);
if
(
submit
)
{
if
(
submit
)
{
if
(
"0"
.
equals
(
op
))
{
if
(
"0"
.
equals
(
op
))
{
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()));
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()));
this
.
generateInstallationNoticeReport
(
JgReformNotice
.
getSequenceNbr
());
//
this.generateInstallationNoticeReport(JgReformNotice.getSequenceNbr());
// 更新其他业务表
// 更新其他业务表
tzsJgOtherInfo
.
setCode96333
(
mapCode
.
get
(
"code96333"
).
toString
());
//
tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
tzsJgOtherInfo
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
//
tzsJgOtherInfo.setSupervisoryCode(mapCode.get("superviseCode").toString());
tzsJgRegistrationInfo
.
setEquCode
(
deviceRegistrationCode
);
//
tzsJgRegistrationInfo.setEquCode(deviceRegistrationCode);
// JgReformNotice.setEquRegisterCode(deviceRegistrationCode);
// JgReformNotice.setEquRegisterCode(deviceRegistrationCode);
// JgReformNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
// JgReformNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
//
tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
tzsJgRegistrationInfoMapper
.
updateById
(
tzsJgRegistrationInfo
);
//
tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
}
else
{
}
else
{
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
// JgReformNotice.setStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
// JgReformNotice.setStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
...
...
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 @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aspose.words.SaveFormat
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgTransferNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.SupervisoryCodeInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.OtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.SupervisoryCodeInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
org.springframework.util.Assert
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
/**
* 移装造告知服务实现类
* 移装造告知服务实现类
...
@@ -17,11 +65,299 @@ import java.util.List;
...
@@ -17,11 +65,299 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
JgTransferNoticeServiceImpl
extends
BaseService
<
JgTransferNoticeDto
,
JgTransferNotice
,
JgTransferNoticeMapper
>
implements
IJgTransferNoticeService
{
public
class
JgTransferNoticeServiceImpl
extends
BaseService
<
JgTransferNoticeDto
,
JgTransferNotice
,
JgTransferNoticeMapper
>
implements
IJgTransferNoticeService
{
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"transferNotice"
;
private
static
final
String
TABLE_PAGE_ID
=
"transferNoticeAdd"
;
@Autowired
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Autowired
JgTransferNoticeEqMapper
jgTransferNoticeEqMapper
;
@Autowired
private
JgTransferNoticeMapper
jgTransferNoticeMapper
;
@Autowired
private
ICreateCodeService
iCreateCodeService
;
@Autowired
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
@Autowired
OtherInfoMapper
tzsJgOtherInfoMapper
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
SupervisoryCodeInfoMapper
supervisoryCodeInfoMapper
;
public
static
byte
[]
file2byte
(
File
file
)
{
try
{
FileInputStream
in
=
new
FileInputStream
(
file
);
//当文件没有结束时,每次读取一个字节显示
byte
[]
data
=
new
byte
[
in
.
available
()];
in
.
read
(
data
);
in
.
close
();
return
data
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
null
;
}
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return 移装告知
*/
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 移装告知信息
JgTransferNotice
notice
=
jgTransferNoticeMapper
.
selectById
(
sequenceNbr
);
if
(
Objects
.
isNull
(
notice
))
{
return
null
;
}
Map
<
String
,
Object
>
transferNotice
=
BeanUtil
.
beanToMap
(
notice
);
transferNotice
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
transferNotice
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
transferNotice
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
transferNotice
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getFactoryUseSiteStreet
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
transferNotice
.
put
(
"factoryUseSiteStreet"
,
notice
.
getFactoryUseSiteStreet
()
+
"_"
+
notice
.
getStreetName
());
}
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
,
"powerOfAttorneyList"
,
"constructionContractList"
,
"deviceList"
};
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgTransferNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
if
(
transferNotice
.
containsKey
(
s
))
{
transferNotice
.
put
(
s
,
JSON
.
parseArray
(
transferNotice
.
get
(
s
).
toString
()));
}
if
(
equipmentInfos
.
get
(
0
).
containsKey
(
s
))
{
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
}
}
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"transferNoticeInfo"
,
transferNotice
);
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
}};
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Boolean
deleteForBatch
(
Long
[]
sequenceNbrs
)
{
if
(
Objects
.
isNull
(
sequenceNbrs
)
||
sequenceNbrs
.
length
==
0
)
{
return
false
;
}
Collection
<
JgTransferNotice
>
jgTransferNotices
=
this
.
listByIds
(
Arrays
.
asList
(
sequenceNbrs
));
jgTransferNotices
.
forEach
(
notice
->
{
if
(
StringUtils
.
hasText
(
notice
.
getInspectionUnitCreditCode
()))
{
throw
new
IllegalStateException
(
"所选数据已存在流程,不能删除!"
);
}
notice
.
setIsDelete
(
true
);
});
return
this
.
updateBatchById
(
jgTransferNotices
);
}
/**
* 打印移装告知单
*
* @param sequenceNbr 主键
* @return pdf文件路径
*/
@Override
public
String
generateTransferNoticeReport
(
Long
sequenceNbr
)
{
if
(
Objects
.
isNull
(
sequenceNbr
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
JgTransferNotice
jgMaintainNotice
=
this
.
getById
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
jgTransferNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
if
(
Objects
.
isNull
(
jgMaintainNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"移装告知单不存在"
);
}
Map
<
String
,
Object
>
maintain
=
informationList
.
get
(
0
);
Function
<
String
,
String
>
getValue
=
key
->
maintain
.
getOrDefault
(
key
,
""
).
toString
();
// 组装模板变量
Map
<
String
,
Object
>
placeholders
=
new
HashMap
<>();
placeholders
.
put
(
"sequenceNbr"
,
getValue
.
apply
(
"sequenceNbr"
));
placeholders
.
put
(
"installUnitName"
,
getValue
.
apply
(
"installUnitName"
));
placeholders
.
put
(
"applyNo"
,
getValue
.
apply
(
"applyNo"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
// placeholders.put("equipCode", getValue.apply("equRegisterCode"));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"produceCode"
));
// TODO: 制造编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
));
// placeholders.put("installStartDate", getValue.apply("installStartDate"));
// placeholders.put("installType", getValue.apply("installType")); // TODO: 施工类别
// placeholders.put("installLicenseNo", getValue.apply("installLicenseNo"));
// placeholders.put("installLicenseExpirationDate", getValue.apply("installLicenseExpirationDate"));
// placeholders.put("installLeaderName", getValue.apply("installLeaderName"));
// placeholders.put("installLeaderPhone", getValue.apply("installLeaderPhone"));
// placeholders.put("installUnitAddress", getValue.apply("installUnitAddress")); // TODO: 施工单位地址
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitProvinceName"
)
+
getValue
.
apply
(
"useUnitCityName"
)
+
getValue
.
apply
(
"useUnitCountyName"
)
+
getValue
.
apply
(
"useUnitAddress"
));
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"applyNo"
),
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
// word转pdf
File
pdfFile
;
try
{
pdfFile
=
this
.
wordToPdf
(
"maintain-notification-report.ftl"
,
placeholders
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
// 上传pdf至文件服务器
String
url
=
this
.
uploadFile
(
pdfFile
);
// 删除临时文件
try
{
Files
.
deleteIfExists
(
pdfFile
.
toPath
());
}
catch
(
IOException
e
)
{
log
.
error
(
"删除临时文件失败:{}"
,
e
);
}
// 更新到数据库
// jgMaintainNotice.setNoticeReportUrl(url);
// this.updateById(jgMaintainNotice);
return
url
;
}
/**
* word 转 pdf
*
* @param wordPath word文件路径
*/
private
File
wordToPdf
(
String
wordPath
,
Map
<
String
,
Object
>
placeholders
)
throws
Exception
{
Assert
.
hasText
(
wordPath
,
"word文件路径不能为空"
);
String
tempFileName
=
"移装告知单_"
+
System
.
currentTimeMillis
()
+
"_temp.pdf"
;
WordTemplateUtils
instance
=
WordTemplateUtils
.
getInstance
();
return
instance
.
fillAndConvertDocFile
(
wordPath
,
tempFileName
,
placeholders
,
SaveFormat
.
PDF
);
}
/**
* 上传文件至文件服务器
*
* @param file 文件
*/
private
String
uploadFile
(
File
file
)
{
Assert
.
notNull
(
file
,
"文件不能为空"
);
MultipartFile
multipartFile
=
new
ByteArrayMultipartFile
(
"file"
,
"file.pdf"
,
"application/pdf"
,
file2byte
(
file
));
FeignClientResult
<
Map
<
String
,
String
>>
result
=
Systemctl
.
fileStorageClient
.
updateCommonFile
(
multipartFile
);
String
urlString
=
""
;
if
(
result
!=
null
)
{
for
(
String
s
:
result
.
getResult
().
keySet
())
{
urlString
=
s
;
}
}
return
urlString
;
}
/**
* 更新移装告知
*
* @param noticeDto 移装告知
*/
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
public
JgTransferNoticeDto
updateTransferNotice
(
String
submitType
,
JgTransferNoticeDto
noticeDto
,
String
op
)
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
// 字段转换
this
.
convertField
(
noticeDto
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
AjaxResult
ajaxResult
;
// 发起流程
if
(!
StringUtils
.
hasText
(
noticeDto
.
getInstanceId
()))
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"maintainNotification"
);
dto
.
setBusinessKey
(
"1"
);
try
{
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
noticeDto
.
setInstanceId
(
instanceId
);
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
//组装信息
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
taskResultDTO
.
setTaskId
(
taskId
);
taskResultDTO
.
setComment
(
"提交流程"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
taskResultDTO
.
setVariable
(
map
);
//执行流程
AjaxResult
ajaxResult1
;
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
noticeDto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
JgTransferNotice
bean
=
new
JgTransferNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgTransferNoticeMapper
.
updateById
(
bean
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
else
{
JgTransferNotice
bean
=
new
JgTransferNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
jgTransferNoticeMapper
.
updateById
(
bean
);
}
return
noticeDto
;
}
/**
/**
* 分页查询
* 分页查询
*/
*/
public
Page
<
JgTransferNoticeDto
>
queryForJgTransferNoticePage
(
Page
<
JgTransferNoticeDto
>
page
)
{
public
Page
<
JgTransferNoticeDto
>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
String
orgCode
;
if
(
type
.
equals
(
"enterprise"
))
{
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
}
else
{
orgCode
=
reginParams
.
getCompany
().
getOrgCode
();
}
Page
<
JgTransferNotice
>
noticePage
=
jgTransferNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
// 将Page<JgTransferNotice>转化为Page<JgTransferNoticeDto>
Page
<
JgTransferNoticeDto
>
noticeDtoPage
=
new
Page
<>();
BeanUtils
.
copyProperties
(
noticePage
,
noticeDtoPage
,
"records"
);
List
<
JgTransferNoticeDto
>
records
=
noticePage
.
getRecords
().
stream
().
map
(
notice
->
{
JgTransferNoticeDto
noticeDto
=
new
JgTransferNoticeDto
();
BeanUtils
.
copyProperties
(
notice
,
noticeDto
);
if
(
Objects
.
nonNull
(
notice
.
getNoticeStatus
()))
{
String
noticeStatusDesc
=
FlowStatusEnum
.
getNameByType
(
Long
.
valueOf
(
notice
.
getNoticeStatus
()));
noticeDto
.
setNoticeStatus
(
noticeStatusDesc
);
}
return
noticeDto
;
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
noticeDtoPage
.
setRecords
(
records
);
return
noticeDtoPage
;
}
}
/**
/**
...
@@ -30,4 +366,286 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
...
@@ -30,4 +366,286 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
public
List
<
JgTransferNoticeDto
>
queryForJgTransferNoticeList
()
{
public
List
<
JgTransferNoticeDto
>
queryForJgTransferNoticeList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
}
@Override
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgTransferNoticeDto
>
jgTransferNoticeDtoMap
,
ReginParams
reginParams
)
{
JgTransferNoticeDto
model
=
jgTransferNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
// 字段转换
convertField
(
model
);
// 获取告知设备列表
List
<
Map
<
String
,
Object
>>
deviceList
=
model
.
getDeviceList
();
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
return
;
}
// 获取告知单号
List
<
String
>
applyNoList
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
AZGZ
.
getCode
(),
deviceList
.
size
());
if
(
CollectionUtils
.
isEmpty
(
applyNoList
))
{
return
;
}
// 判断当前是否为提交
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
// ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++
)
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setCompleteFirstTask
(
true
);
list
.
add
(
dto
);
}
actWorkflowBatchDTO
.
setProcess
(
list
);
try
{
FeignClientResult
result
=
Workflow
.
taskV2Client
.
startByVariableBatch
(
actWorkflowBatchDTO
);
List
<
Object
>
returnList
=
(
List
<
Object
>)
result
.
getResult
();
for
(
Object
obj
:
returnList
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
instanceIdList
.
add
(
jsonObject
.
getString
(
"id"
));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
List
<
JgTransferNotice
>
list
=
new
ArrayList
<>();
List
<
JgTransferNoticeEq
>
equipList
=
new
ArrayList
<>();
deviceList
.
forEach
(
obj
->
{
JgTransferNoticeEq
jgRelationEquip
=
new
JgTransferNoticeEq
();
JgTransferNotice
dto
=
new
JgTransferNotice
();
BeanUtils
.
copyProperties
(
model
,
dto
);
int
i
=
deviceList
.
indexOf
(
obj
);
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
}
else
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
});
jgTransferNoticeMapper
.
insertBatchSomeColumn
(
list
);
List
<
JgTransferNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgTransferNotice
>
collect
=
list
.
stream
().
filter
(
JgTransferNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
JgTransferNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
Long
sequenceNbr
=
collect
.
get
(
0
).
getSequenceNbr
();
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
}).
collect
(
Collectors
.
toList
());
jgTransferNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
}
private
void
convertField
(
JgTransferNoticeDto
model
)
{
// 处理图片
if
(!
ValidationUtil
.
isEmpty
(
model
.
getPowerOfAttorneyList
()))
{
model
.
setPowerOfAttorney
(
JSON
.
toJSONString
(
model
.
getPowerOfAttorneyList
()));
}
if
(!
ValidationUtil
.
isEmpty
(
model
.
getConstructionContractList
()))
{
model
.
setConstructionContract
(
JSON
.
toJSONString
(
model
.
getConstructionContractList
()));
}
// 分割省市区字段
String
province
=
model
.
getProvince
();
if
(!
ObjectUtils
.
isEmpty
(
province
))
{
String
[]
provinceList
=
province
.
split
(
"_"
);
if
(
provinceList
.
length
>
1
)
{
model
.
setProvince
(
provinceList
[
0
]);
model
.
setProvince
(
provinceList
[
1
]);
}
}
String
city
=
model
.
getCity
();
if
(!
ObjectUtils
.
isEmpty
(
city
))
{
String
[]
cityList
=
city
.
split
(
"_"
);
if
(
cityList
.
length
>
1
)
{
model
.
setCity
(
cityList
[
0
]);
model
.
setCity
(
cityList
[
1
]);
}
}
String
county
=
model
.
getCounty
();
if
(!
ObjectUtils
.
isEmpty
(
county
))
{
String
[]
countyList
=
county
.
split
(
"_"
);
if
(
countyList
.
length
>
1
)
{
model
.
setCounty
(
countyList
[
0
]);
model
.
setCounty
(
countyList
[
1
]);
}
}
// 分割单位
String
useUnitId
=
model
.
getUseUnitCreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
useUnitId
))
{
String
[]
useUnitList
=
useUnitId
.
split
(
"_"
);
if
(
useUnitList
.
length
>
1
)
{
model
.
setUseUnitCreditCode
(
useUnitList
[
0
]);
model
.
setUseUnitName
(
useUnitList
[
1
]);
}
}
String
receiveOrgId
=
model
.
getReceiveOrgCode
();
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgId
))
{
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
if
(
receiveOrgIdList
.
length
>
1
)
{
model
.
setReceiveOrgCode
(
receiveOrgIdList
[
0
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
String
inspectUnitId
=
model
.
getInspectionUnitCreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
inspectUnitId
))
{
String
[]
inspectUnitIdList
=
inspectUnitId
.
split
(
"_"
);
if
(
inspectUnitIdList
.
length
>
1
)
{
model
.
setInspectionUnitCreditCode
(
inspectUnitIdList
[
0
]);
model
.
setInspectionUnitName
(
inspectUnitIdList
[
1
]);
}
}
String
factoryUseSiteStreet
=
model
.
getFactoryUseSiteStreet
();
if
(!
ObjectUtils
.
isEmpty
(
factoryUseSiteStreet
))
{
String
[]
factoryUseSiteStreetList
=
factoryUseSiteStreet
.
split
(
"_"
);
if
(
factoryUseSiteStreetList
.
length
>
1
)
{
model
.
setFactoryUseSiteStreet
(
factoryUseSiteStreetList
[
0
]);
model
.
setStreetName
(
factoryUseSiteStreetList
[
1
]);
}
}
}
private
String
convertImageUrl
(
List
<
Map
<
String
,
String
>>
urlList
)
{
String
urls
=
""
;
if
(!
CollectionUtils
.
isEmpty
(
urlList
))
{
urls
=
urlList
.
stream
().
map
(
map
->
map
.
get
(
"url"
)).
collect
(
Collectors
.
joining
(
","
));
}
return
urls
;
}
public
boolean
submit
(
JgTransferNotice
notice
,
String
op
)
{
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
notice
.
getInstanceId
());
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"提交流程"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
dto
.
setVariable
(
map
);
//执行流程
AjaxResult
ajaxResult1
=
null
;
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
return
true
;
}
else
{
return
false
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
return
false
;
}
}
public
void
cancel
(
JgTransferNoticeDto
noticeDto
)
{
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
JgTransferNotice
JgTransferNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
if
(
ajaxResult
.
getStatus
()
==
200
)
{
JgTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgTransferNoticeMapper
.
updateById
(
JgTransferNotice
);
}
}
public
void
accept
(
JgTransferNoticeDto
dto
,
String
op
)
{
JgTransferNotice
JgTransferNotice
=
this
.
jgTransferNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
}
catch
(
ParseException
e
)
{
log
.
error
(
"日期转换失败:{}"
,
e
);
}
LambdaQueryWrapper
<
JgTransferNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgTransferNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
JgTransferNoticeEq
jgRelationEquip
=
jgTransferNoticeEqMapper
.
selectOne
(
queryWrapper
);
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
JgTransferNotice
.
getCity
()).
append
(
ym
);
String
equCode
=
stringBuffer
.
toString
();
String
deviceRegistrationCode
=
iCreateCodeService
.
createDeviceRegistrationCode
(
equCode
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
JgTransferNotice
.
getCity
());
map
.
put
(
"countyCode"
,
JgTransferNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
// map.put("isXiXian", JgTransferNotice.getIsXixian() == null ? "0" : JgTransferNotice.getIsXixian());
Map
<
String
,
Object
>
mapCode
;
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
mapCode
=
code
.
getResult
();
LambdaQueryWrapper
<
SupervisoryCodeInfo
>
queryWrapper3
=
new
LambdaQueryWrapper
<>();
queryWrapper3
.
eq
(
SupervisoryCodeInfo:
:
getSupervisoryCode
,
mapCode
.
get
(
"superviseCode"
).
toString
());
SupervisoryCodeInfo
supervisoryCodeInfo
=
supervisoryCodeInfoMapper
.
selectOne
(
queryWrapper3
);
supervisoryCodeInfo
.
setStatus
(
"1"
);
supervisoryCodeInfoMapper
.
updateById
(
supervisoryCodeInfo
);
// boolean submit = submit(JgTransferNotice, op);
// if(submit) {
if
(
"0"
.
equals
(
op
))
{
JgTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()));
// this.generateMaintainNoticeReport(JgTransferNotice.getSequenceNbr());
}
else
{
JgTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
JgTransferNotice
.
setInstanceStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
}
jgTransferNoticeMapper
.
updateById
(
JgTransferNotice
);
// }
// // 组装监管码
// String division = "";
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
// division = "X";
// } else {
// //生成监管码前缀
// Map<String, Object> divisionMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCounty());
// division = ObjectUtils.isEmpty(divisionMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCity()).get("code").toString() : divisionMap.get("code").toString();
// }
//
// // 组装96333码
// String prefix = "";
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
// prefix = EquipmentCategoryEnum.XXCSM.getValue();
// } else {
// Map<String, Object> elevatorMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCounty());
// prefix = ObjectUtils.isEmpty(elevatorMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCity()).get("code").toString() : elevatorMap.get("code").toString();
// }
}
}
}
\ 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 @
b376e6ed
...
@@ -7,6 +7,9 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -7,6 +7,9 @@ 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.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq
;
...
@@ -29,7 +32,9 @@ import com.yeejoin.amos.feign.workflow.model.AjaxResult;
...
@@ -29,7 +32,9 @@ import com.yeejoin.amos.feign.workflow.model.AjaxResult;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -58,7 +63,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -58,7 +63,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
WorkFlowFeignService
workFlowFeginService
;
WorkFlowFeignService
workFlowFeginService
;
@Autowired
@Autowired
private
ICreateCodeService
iCreateCodeService
;
private
ICreateCodeService
iCreateCodeService
;
@Autowired
RedisUtils
redisUtils
;
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgUseRegistrationDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
);
return
listPage
;
return
listPage
;
...
@@ -69,6 +75,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -69,6 +75,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
@Transactional
public
void
save
(
JSONObject
map
)
{
public
void
save
(
JSONObject
map
)
{
UseInfo
useInfo
=
new
UseInfo
();
UseInfo
useInfo
=
new
UseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
BeanUtil
.
copyProperties
(
map
,
useInfo
);
...
@@ -96,6 +103,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -96,6 +103,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
jgUseRegistration
.
setUseUnitCreditCode
(
null
);
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgUseRegistration
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
}
else
{
}
else
{
...
@@ -120,12 +128,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -120,12 +128,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
else
{
}
else
{
// 启动并执行流程
// 启动并执行流程
instanceId
=
startByVariable
();
instanceId
=
startByVariable
();
jgUseRegistration
.
setInstanceStatus
(
"1460532889249755137"
);
jgUseRegistration
.
setUseUnitCreditCode
(
"91610131628001738N"
);
jgUseRegistration
.
setReceiveCompanyCode
(
"610000"
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 执行流程
// 执行流程
String
status
=
flowExecute
(
instanceId
,
"0"
,
""
,
false
);
String
status
=
flowExecute
(
jgUseRegistration
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
,
true
);
jgUseRegistration
.
setInstanceStatus
(
status
);
jgUseRegistration
.
setAuditStatus
(
"已提交"
);
jgUseRegistration
.
setAuditStatus
(
"已提交"
);
jgUseRegistration
.
setStatus
(
UseStatusEnum
.
RECEIVE
.
getPass
());
jgUseRegistration
.
setStatus
(
UseStatusEnum
.
RECEIVE
.
getPass
());
}
}
...
@@ -150,7 +160,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -150,7 +160,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return
instanceId
;
return
instanceId
;
}
}
public
String
flowExecute
(
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
public
String
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
String
role
=
""
;
String
role
=
""
;
String
taskName
=
"流程结束"
;
String
taskName
=
"流程结束"
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
...
@@ -187,20 +197,23 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -187,20 +197,23 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
}
role
=
String
.
join
(
","
,
roleList
);
role
=
String
.
join
(
","
,
roleList
);
if
(
update
)
{
if
(
update
)
{
updateStatus
(
instanceId
,
taskName
,
role
);
Boolean
rollBack
=
"1"
.
equals
(
operate
)
?
true
:
false
;
updateStatus
(
id
,
instanceId
,
taskName
,
role
,
rollBack
);
}
}
return
role
;
return
role
;
}
}
public
void
updateStatus
(
String
instanceId
,
String
taskName
,
String
role
)
{
public
void
updateStatus
(
Long
id
,
String
instanceId
,
String
taskName
,
String
role
,
Boolean
rollBack
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
eq
(
JgUseRegistration:
:
get
InstanceId
,
instanceI
d
);
lambda
.
eq
(
JgUseRegistration:
:
get
SequenceNbr
,
i
d
);
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
if
(
"流程结束"
.
equals
(
taskName
))
{
if
(
"流程结束"
.
equals
(
taskName
))
{
jgUseRegistration
.
setStatus
(
taskName
);
jgUseRegistration
.
setStatus
(
taskName
);
jgUseRegistration
.
setAuditStatus
(
"已完成"
);
jgUseRegistration
.
setAuditStatus
(
"已完成"
);
}
else
{
}
else
{
jgUseRegistration
.
setNextExecuteIds
(
role
);
jgUseRegistration
.
setNextExecuteIds
(
role
);
jgUseRegistration
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getInstanceStatus
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getInstanceStatus
()))
{
jgUseRegistration
.
setInstanceStatus
(
jgUseRegistration
.
getInstanceStatus
()
+
","
+
role
);
jgUseRegistration
.
setInstanceStatus
(
jgUseRegistration
.
getInstanceStatus
()
+
","
+
role
);
}
else
{
}
else
{
...
@@ -209,21 +222,35 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -209,21 +222,35 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
jgUseRegistration
.
setStatus
(
message
.
getPass
());
jgUseRegistration
.
setStatus
(
message
.
getPass
());
}
}
if
(
rollBack
){
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
this
.
getBaseMapper
().
updatePromoter
(
jgUseRegistration
.
getSequenceNbr
());
}
else
{
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
}
}
}
public
void
withdraw
(
String
instanceId
)
{
public
void
withdraw
(
String
instanceId
)
{
String
taskName
=
""
;
String
taskName
=
""
;
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
LambdaQueryWrapper
<
JgUseRegistration
>
lambda
=
new
QueryWrapper
<
JgUseRegistration
>().
lambda
();
lambda
.
eq
(
JgUseRegistration:
:
getInstanceId
,
instanceId
);
lambda
.
eq
(
JgUseRegistration:
:
getInstanceId
,
instanceId
);
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
try
{
try
{
workFlowFeginService
.
rollBack
(
instanceId
);
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
taskName
=
nextTask
.
getString
(
"name"
);
taskName
=
nextTask
.
getString
(
"name"
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
if
(((
Map
)
datum
).
containsKey
(
"groupId"
))
{
roleList
.
add
(((
Map
)
datum
).
get
(
"groupId"
).
toString
());
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -232,7 +259,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
...
@@ -232,7 +259,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setStatus
(
message
.
getPass
());
jgUseRegistration
.
setStatus
(
message
.
getPass
());
}
}
this
.
getBaseMapper
().
update
(
jgUseRegistration
,
lambda
);
String
join
=
String
.
join
(
","
,
roleList
);
JgUseRegistration
jgUseRegistration1
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
this
.
updateStatus
(
jgUseRegistration1
.
getSequenceNbr
(),
instanceId
,
taskName
,
join
,
true
);
}
}
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionResultModel.java
View file @
b376e6ed
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
model
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
model
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -95,6 +97,8 @@ public class JyjcInspectionResultModel extends BaseModel {
...
@@ -95,6 +97,8 @@ public class JyjcInspectionResultModel extends BaseModel {
private
String
inspectionTypeName
;
private
String
inspectionTypeName
;
@ApiModelProperty
(
value
=
"报检日期"
)
@ApiModelProperty
(
value
=
"报检日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
Date
applicationDate
;
private
Date
applicationDate
;
@ApiModelProperty
(
"检验结果方式"
)
@ApiModelProperty
(
"检验结果方式"
)
...
@@ -134,4 +138,17 @@ public class JyjcInspectionResultModel extends BaseModel {
...
@@ -134,4 +138,17 @@ public class JyjcInspectionResultModel extends BaseModel {
@ApiModelProperty
(
value
=
"设备品种"
)
@ApiModelProperty
(
value
=
"设备品种"
)
private
String
equDefine
;
private
String
equDefine
;
@ApiModelProperty
(
value
=
"设备类别名称"
)
private
String
equListName
;
@ApiModelProperty
(
value
=
"设备使用地址"
)
private
String
equUseAddress
;
@ApiModelProperty
(
value
=
"检验检测单"
)
private
String
inspectionUnitName
;
@ApiModelProperty
(
value
=
"报检单位"
)
private
String
applicationUnitName
;
}
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionResultMapper.xml
View file @
b376e6ed
...
@@ -9,15 +9,18 @@
...
@@ -9,15 +9,18 @@
res.inspection_conclusion, res.inspection_date, res.next_inspection_date, res.inspection_start_date,
res.inspection_conclusion, res.inspection_date, res.next_inspection_date, res.inspection_start_date,
res.inspection_end_date, res.inspection_result_summary, res.non_conformance, res.rectification, res.remark,
res.inspection_end_date, res.inspection_result_summary, res.non_conformance, res.rectification, res.remark,
res.rec_user_id, res.rec_date, res.biz_type,res.equ_category, res.inspection_type, res.inspection_type_name,
res.rec_user_id, res.rec_date, res.biz_type,res.equ_category, res.inspection_type, res.inspection_type_name,
res.application_date,use_unit_name, use_unit_credit_code, province_name, city_name, county_name, street_name,
res.application_date,use_unit_name, use_unit_credit_code, province_name, city_name, county_name, street_name,
equ_code, use_inner_code, ibjri.equ_list,
address, equ_code, use_inner_code, ibjri.equ_list, tec1.name equ_list_name, ibjri.equ_category, tec.name
tec1.name equ_list_name, ibjri.equ_category
equ_category_name, use_org_cod
e
, use_org_code, res.equ_define, ibjui.ADDRESS equUseAddress, bei.use_unit inspectionUnitName, bei1.use_unit applicationUnitName, cdb.name inspectionTypeNam
e
from tz_jyjc_inspection_result res
from tz_jyjc_inspection_result res
left join idx_biz_jg_other_info ibjoi on res.equip_unicode = ibjoi.supervisory_code
--
left join idx_biz_jg_other_info ibjoi on res.equip_unicode = ibjoi.supervisory_code
left join idx_biz_jg_use_info ibjui on ibjui.record =
ibjoi.record
left join idx_biz_jg_use_info ibjui on ibjui.record =
res.equip_unicode
left join idx_biz_jg_register_info ibjri on ibjui.record = ibjri.record
left join idx_biz_jg_register_info ibjri on ibjui.record = ibjri.record
left join tz_equipment_category tec on ibjri.equ_category = tec.code
left join tz_equipment_category tec on ibjri.equ_category = tec.code
left join tz_equipment_category tec1 on ibjri.equ_list = tec1.code
left join tz_equipment_category tec1 on ibjri.equ_list = tec1.code
left join tz_base_enterprise_info bei on res.inspection_unit_code = bei.use_code
left join tz_base_enterprise_info bei1 on res.application_unit_code = bei1.use_code
left join cb_data_dictionary cdb on res.inspection_type = cdb.code
<where>
<where>
<if
test=
"jyjcInspectionResultModel.applicationNo != '' and jyjcInspectionResultModel.applicationNo != null"
>
<if
test=
"jyjcInspectionResultModel.applicationNo != '' and jyjcInspectionResultModel.applicationNo != null"
>
and res.application_no like concat('%',#{jyjcInspectionResultModel.applicationNo},'%')
and res.application_no like concat('%',#{jyjcInspectionResultModel.applicationNo},'%')
...
@@ -53,5 +56,6 @@
...
@@ -53,5 +56,6 @@
AND TO_DAYS(res.application_date) = TO_DAYS(#{jyjcInspectionResultModel.applicationDate})
AND TO_DAYS(res.application_date) = TO_DAYS(#{jyjcInspectionResultModel.applicationDate})
</if>
</if>
</where>
</where>
ORDER BY application_date DESC
</select>
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
View file @
b376e6ed
...
@@ -168,6 +168,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -168,6 +168,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
if
(!
CollectionUtils
.
isEmpty
(
collect
))
{
resultParam
.
setSequenceNbr
(
collect
.
get
(
0
).
getSequenceNbr
());
resultParam
.
setSequenceNbr
(
collect
.
get
(
0
).
getSequenceNbr
());
}
}
resultParam
.
setParamType
(
k
);
resultParam
.
setResultSeq
(
model
.
getSequenceNbr
());
resultParam
.
setResultSeq
(
model
.
getSequenceNbr
());
resultParam
.
setParamJson
(
JSON
.
toJSONString
(
tableModel
.
get
(
k
)));
resultParam
.
setParamJson
(
JSON
.
toJSONString
(
tableModel
.
get
(
k
)));
paramList
.
add
(
resultParam
);
paramList
.
add
(
resultParam
);
...
@@ -183,12 +184,6 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -183,12 +184,6 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
wrapper
.
lambda
().
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
model
.
getResultNo
());
wrapper
.
lambda
().
eq
(
InspectionDetectionInfo:
:
getInspectReportNo
,
model
.
getResultNo
());
List
<
InspectionDetectionInfo
>
list
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
List
<
InspectionDetectionInfo
>
list
=
inspectionDetectionInfoMapper
.
selectList
(
wrapper
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
if
(
CollectionUtils
.
isEmpty
(
list
))
{
QueryWrapper
<
CategoryOtherInfo
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
CategoryOtherInfo:
:
getSupervisoryCode
,
model
.
getEquipUnicode
());
List
<
CategoryOtherInfo
>
otherInfos
=
categoryOtherInfoMapper
.
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
otherInfos
))
{
info
.
setRecord
(
otherInfos
.
get
(
0
).
getRecord
());
}
extracted
(
model
,
info
);
extracted
(
model
,
info
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
info
.
setSequenceNbr
(
sequence
.
nextId
()
+
""
);
inspectionDetectionInfoMapper
.
insert
(
info
);
inspectionDetectionInfoMapper
.
insert
(
info
);
...
@@ -203,7 +198,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -203,7 +198,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
private
void
extracted
(
JyjcInspectionResultModel
model
,
InspectionDetectionInfo
info
)
{
private
void
extracted
(
JyjcInspectionResultModel
model
,
InspectionDetectionInfo
info
)
{
info
.
setInspectType
(
model
.
getInspectionType
());
info
.
setInspectType
(
model
.
getInspectionType
());
info
.
setInspectOrgName
(
model
.
getInspectionUnitCode
());
info
.
setInspectOrgName
(
model
.
getInspectionUnitCode
());
// info.setInspectReport(JSON.toJSONString(model.getResultAttachmentModelList()
));
info
.
setRecord
(
model
.
getEquipUnicode
(
));
info
.
setInspectDate
(
model
.
getInspectionDate
());
info
.
setInspectDate
(
model
.
getInspectionDate
());
info
.
setInspectConclusion
(
model
.
getInspectionConclusion
());
info
.
setInspectConclusion
(
model
.
getInspectionConclusion
());
info
.
setProblemRemark
(
model
.
getNonConformance
());
info
.
setProblemRemark
(
model
.
getNonConformance
());
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/controller/EquipmentCategoryController.java
View file @
b376e6ed
...
@@ -592,4 +592,11 @@ public class EquipmentCategoryController extends BaseController {
...
@@ -592,4 +592,11 @@ public class EquipmentCategoryController extends BaseController {
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestParam
(
"record"
)
String
record
)
{
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestParam
(
"record"
)
String
record
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
deleteByRecord
(
record
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
deleteByRecord
(
record
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/commonUpdateEsData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新ES中的数据(公共方法)"
,
notes
=
"更新ES中的数据(公共方法)"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
commonUpdateEsDataByIds
(
@RequestBody
Map
<
String
,
Map
<
String
,
Object
>>
paramMap
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
commonUpdateEsDataByIds
(
paramMap
));
}
}
}
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