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
5d613664
Commit
5d613664
authored
Dec 21, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
2872fef0
97f29568
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
885 additions
and
506 deletions
+885
-506
JgInstallationNoticeDto.java
.../amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
+7
-0
JgMaintainNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgMaintainNoticeDto.java
+13
-0
JgScrapCancelDto.java
...yeejoin/amos/boot/module/jg/api/dto/JgScrapCancelDto.java
+15
-0
JgTransferNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgTransferNoticeDto.java
+5
-0
JgInstallationNotice.java
.../amos/boot/module/jg/api/entity/JgInstallationNotice.java
+8
-0
JgMaintainNotice.java
...join/amos/boot/module/jg/api/entity/JgMaintainNotice.java
+11
-0
JgScrapCancel.java
...yeejoin/amos/boot/module/jg/api/entity/JgScrapCancel.java
+14
-0
JgTransferNotice.java
...join/amos/boot/module/jg/api/entity/JgTransferNotice.java
+3
-0
CancelTypeEnum.java
...yeejoin/amos/boot/module/jg/api/enums/CancelTypeEnum.java
+1
-1
CancelWorkFlowStatusEnum.java
...os/boot/module/jg/api/enums/CancelWorkFlowStatusEnum.java
+22
-7
MaintainTypeEnum.java
...ejoin/amos/boot/module/jg/api/enums/MaintainTypeEnum.java
+0
-37
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+14
-11
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+7
-2
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+14
-9
JgScrapCancelMapper.xml
...-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
+5
-2
JgTransferNoticeMapper.xml
...-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
+6
-2
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+9
-4
JgInstallationByWorkFlowController.java
...jg/biz/controller/JgInstallationByWorkFlowController.java
+2
-0
JgScrapCancelController.java
...oot/module/jg/biz/controller/JgScrapCancelController.java
+100
-104
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+33
-13
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+21
-4
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+191
-132
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+306
-172
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+8
-6
TzsServiceFeignClient.java
...mos/boot/module/jyjc/biz/feign/TzsServiceFeignClient.java
+65
-0
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+5
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
View file @
5d613664
...
...
@@ -236,4 +236,11 @@ public class JgInstallationNoticeDto extends BaseDto {
private
String
instanceStatus
;
@ApiModelProperty
(
value
=
"设备地址"
)
private
String
equAddress
;
@ApiModelProperty
(
value
=
"办理日期"
)
private
Date
handleDate
;
}
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 @
5d613664
...
...
@@ -2,7 +2,9 @@ package com.yeejoin.amos.boot.module.jg.api.dto;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCustomDateSerializer
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -31,6 +33,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"告知日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
noticeDate
;
@ApiModelProperty
(
value
=
"告知状态"
)
...
...
@@ -58,6 +61,8 @@ public class JgMaintainNoticeDto extends BaseDto {
private
String
executeSequence
;
@ApiModelProperty
(
value
=
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
createDate
;
@ApiModelProperty
(
value
=
"创建人id "
)
...
...
@@ -74,6 +79,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"受理完成日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
acceptDate
;
@ApiModelProperty
(
value
=
"施工区域-省"
)
...
...
@@ -93,6 +99,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"计划施工日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
planDate
;
@ApiModelProperty
(
value
=
"接收机构单位代码"
)
...
...
@@ -183,4 +190,10 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"节点执行人"
)
private
String
promoter
;
@ApiModelProperty
(
value
=
"设备类别"
)
private
String
equListCode
;
@ApiModelProperty
(
value
=
"设备类别名称"
)
private
String
equCategory
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgScrapCancelDto.java
View file @
5d613664
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -74,6 +75,9 @@ public class JgScrapCancelDto extends BaseDto {
@ApiModelProperty
(
value
=
"告知设备列表"
)
private
List
<
Map
<
String
,
Object
>>
deviceList
;
@ApiModelProperty
(
value
=
"设备ID"
)
private
String
SEQUENCE_NBR
;
@ApiModelProperty
(
value
=
"终审通过时间"
)
private
Date
auditPassDate
;
...
...
@@ -85,4 +89,15 @@ public class JgScrapCancelDto extends BaseDto {
// 区分监管和企业
private
String
type
;
/**
* 使用单位编码
*/
private
String
useUnitCode
;
/**
* 使用单位名称
*/
private
String
useUnitName
;
}
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 @
5d613664
...
...
@@ -194,4 +194,9 @@ public class JgTransferNoticeDto extends BaseDto {
private
String
status
;
@ApiModelProperty
(
value
=
"完整地址"
)
private
String
equipCateName
;
@ApiModelProperty
(
value
=
"办理日期"
)
private
Date
handleDate
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgInstallationNotice.java
View file @
5d613664
...
...
@@ -378,4 +378,12 @@ public class JgInstallationNotice extends BaseEntity {
@TableField
(
"instance_status"
)
private
String
instanceStatus
;
@TableField
(
"equ_address"
)
private
String
equAddress
;
@TableField
(
"handle_date"
)
private
Date
handleDate
;
}
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 @
5d613664
...
...
@@ -293,4 +293,15 @@ public class JgMaintainNotice extends BaseEntity {
@TableField
(
value
=
"promoter"
)
private
String
promoter
;
/**
* 设备类别
*/
@TableField
(
value
=
"equ_list_code"
)
private
String
equListCode
;
/**
* 设备类别名称
*/
@TableField
(
value
=
"equ_category"
)
private
String
equCategory
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgScrapCancel.java
View file @
5d613664
...
...
@@ -116,4 +116,18 @@ public class JgScrapCancel extends BaseEntity {
@TableField
(
value
=
"promoter"
)
private
String
promoter
;
/**
* 使用单位编码
*/
@TableField
(
"use_unit_code"
)
private
String
useUnitCode
;
/**
* 使用单位名称
*/
@TableField
(
value
=
"use_unit_name"
)
private
String
useUnitName
;
}
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 @
5d613664
...
...
@@ -290,4 +290,7 @@ public class JgTransferNotice extends BaseEntity {
@TableField
(
value
=
"promoter"
)
private
String
promoter
;
@TableField
(
exist
=
false
)
private
String
equipCateName
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/CancelTypeEnum.java
View file @
5d613664
...
...
@@ -26,7 +26,7 @@ public enum CancelTypeEnum {
public
static
String
getNameByType
(
String
code
)
{
String
name
=
null
;
for
(
CancelTypeEnum
enumOne
:
CancelTypeEnum
.
values
())
{
if
(
enumOne
.
getCode
()
==
code
)
{
if
(
enumOne
.
getCode
()
.
equals
(
code
)
)
{
name
=
enumOne
.
getName
();
break
;
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/CancelFlowStatusEnum.java
→
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/Cancel
Work
FlowStatusEnum.java
View file @
5d613664
...
...
@@ -8,12 +8,14 @@ import lombok.Getter;
*/
@Getter
@AllArgsConstructor
public
enum
CancelFlowStatusEnum
{
public
enum
CancelWorkFlowStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"一级单位已驳回"
,
"使用单位撤回"
),
RECEIVE
(
"一级受理"
,
"receive"
,
"一级单位待受理"
,
"二级单位已驳回"
,
"一级单位撤回"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级单位待受理"
,
"三级单位已驳回"
,
"二级单位撤回"
),
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级单位待受理"
,
""
,
""
),
COMPLETE
(
"已完成"
,
"complete"
,
"已完成"
,
""
,
""
);
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
),
RECEIVE
(
"一级受理"
,
"receive"
,
"一级待受理"
),
PRELIMINARY
(
"二级受理"
,
"preliminary"
,
"二级待受理"
),
REEXAMINE
(
"三级受理"
,
"reexamine"
,
"三级待受理"
);
...
...
@@ -23,14 +25,27 @@ public enum CancelFlowStatusEnum {
private
final
String
pass
;
private
final
String
reject
;
private
final
String
rollBack
;
public
static
CancelFlowStatusEnum
getMessage
(
String
name
){
for
(
CancelFlowStatusEnum
constants
:
values
())
{
public
static
Cancel
Work
FlowStatusEnum
getMessage
(
String
name
){
for
(
Cancel
Work
FlowStatusEnum
constants
:
values
())
{
if
(
constants
.
getName
().
equals
(
name
))
{
return
constants
;
}
}
return
null
;
}
public
static
CancelWorkFlowStatusEnum
getMessageByCode
(
String
code
){
for
(
CancelWorkFlowStatusEnum
constants
:
values
())
{
if
(
constants
.
getCode
().
equals
(
code
))
{
return
constants
;
}
}
return
null
;
}
}
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
deleted
100644 → 0
View file @
2872fef0
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/resources/mapper/JgInstallationNoticeMapper.xml
View file @
5d613664
...
...
@@ -11,6 +11,7 @@
isn.use_unit_name AS useUnitName,
isn.receive_org_name AS receiveOrgName,
isn.region_no AS regionNo,
isn.install_start_date AS installStartDate,
isn.address AS address,
isn.notice_status AS noticeStatus,
isn.install_unit_name AS installUnitName,
...
...
@@ -21,6 +22,9 @@
isn.promoter,
isn.next_execute_ids AS nextExecuteIds,
isn.instance_status AS instanceStatus,
isn.equ_address AS equAddress,
isn.handle_date AS handleDate,
isn.equ_list AS equList,
isn.notice_report_url AS noticeReportUrl
FROM
tzs_jg_installation_notice isn
...
...
@@ -30,14 +34,14 @@
<if
test=
"param.applyNo != null and param.applyNo != ''"
>
AND isn.apply_no LIKE CONCAT('%', #{param.applyNo}, '%')
</if>
<if
test=
"param.receiveOrg
Name != null and param.receiveOrgNam
e != ''"
>
AND isn.receive_org_
name LIKE CONCAT('%', #{param.receiveOrgName}, '%')
<if
test=
"param.receiveOrg
CreditCode != null and param.receiveOrgCreditCod
e != ''"
>
AND isn.receive_org_
credit_code = #{param.receiveOrgCreditCode}
</if>
<if
test=
"param.useUnitName != null and param.useUnitName != ''"
>
AND isn.use_unit_
name LIKE CONCAT('%', #{param.useUnitName}, '%')
AND isn.use_unit_
credit_code = #{param.useUnitName}
</if>
<if
test=
"param.installUnitName != null and param.installUnitName != ''"
>
AND isn.install_unit_
name LIKE CONCAT('%', #{param.installUnitName}, '%')
AND isn.install_unit_
credit_code = #{param.installUnitName}
</if>
<if
test=
"param.noticeStatus != null and param.noticeStatus != ''"
>
AND isn.notice_status = #{param.noticeStatus}
...
...
@@ -51,7 +55,7 @@
</if>
</where>
ORDER BY
isn.
rec
_date DESC
isn.
create
_date DESC
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
...
...
@@ -62,6 +66,7 @@
isn.province_name AS provinceName,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.street_name AS streetName,
isn.address AS address,
isn.install_start_date AS installStartDate,
isn.install_license_no AS installLicenseNo,
...
...
@@ -98,12 +103,9 @@
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
ei.legal_person AS safetyManager,
ei.legal_phone AS safetyManagerPhone,
ei.address AS address
FROM
tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
...
...
@@ -112,6 +114,7 @@
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
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code
WHERE
isn.sequence_nbr = #{sequenceNbr}
LIMIT 1
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
5d613664
...
...
@@ -29,6 +29,8 @@
tjmn.city_name AS cityName,
tjmn.county_name AS countyName,
tjmn.promoter,
tjmn.equ_category AS equCategory,
tjmn.equ_list_code AS equListCode,
tjmn.instance_id AS instanceId
FROM
tzs_jg_maintain_notice tjmn
...
...
@@ -55,7 +57,7 @@
</if>
</if>
<if
test=
"type == 'supervision'"
>
AND (tjmn.notice_status in ('6612', '661
3', '6614
') )
AND (tjmn.notice_status in ('6612', '661
4', '6616
') )
AND tjmn.receive_org_code = #{orgCode}
</if>
<if
test=
"type == 'enterprise'"
>
...
...
@@ -63,7 +65,7 @@
</if>
</where>
ORDER BY
tjmn.
notic
e_date DESC
tjmn.
creat
e_date DESC
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
...
...
@@ -90,12 +92,15 @@
tjmn.county_name AS countyName,
tjmn.instance_id AS instanceId,
tjmn.promoter,
tjmn.equ_category AS equCategory,
tjmn.equ_list_code AS equListCode,
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_code AS equRegisterCode,
ri.equ_price AS equPrice,
ri.product_photo AS productPhoto,
di.design_unit_credit_code AS designUnitCreditCode,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
5d613664
...
...
@@ -26,7 +26,8 @@
isn.receive_org_name AS receiveOrgName,
isn.next_execute_ids as nextExecuteIds,
isn.promoter,
isn.notice_report_url
isn.notice_report_url,
isn.accept_date
FROM
tzs_jg_reform_notice isn
<where>
...
...
@@ -49,16 +50,15 @@
</if>
</if>
<if
test=
"type == 'supervision'"
>
AND
isn.notice_status in ('6612', '6613', '6614'
)
AND
(isn.notice_status in ('6612', '6613', '6614', '6616')
)
AND isn.receive_org_code = #{orgCode}
<!-- AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )-->
</if>
<if
test=
"type == 'enterprise'"
>
AND isn.install_unit_credit_code = #{orgCode}
</if>
</where>
ORDER BY
isn.
notice
_date DESC
isn.
rec
_date DESC
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
...
...
@@ -82,10 +82,16 @@
isn.next_execute_ids as nextExecuteIds,
isn.promoter,
isn.notice_status AS noticeStatus,
<!-- isn.install_start_date AS installLicenseExpirationDate,-->
<!-- isn.install_license_no AS installLicenseNo,-->
isn.plan_date AS installStartDate,
isn.construction_manager AS installLeaderName,
isn.construction_manager_phone AS installLeaderPhone,
ri.equ_code AS equRegisterCode,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
fi.FACTORY_NUM AS produceCode,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
...
...
@@ -112,11 +118,9 @@
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
ei.legal_person AS safetyManager,
ei.legal_phone AS safetyManagerPhone,
ei.ADDRESS AS useUnitAddress
FROM
tzs_jg_reform_notice isn
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
...
...
@@ -125,6 +129,7 @@
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
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code
WHERE
isn.sequence_nbr = #{sequenceNbr}
LIMIT 1
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
View file @
5d613664
...
...
@@ -12,7 +12,8 @@
select ur.sequence_nbr as sequenceNbr,
ur.instance_id as instanceId,
ur.audit_status as auditStatus,
ur.rec_date as regDate,
ur.rec_date as recDate,
ur.create_date as createDate,
ur.receive_org_code as receiveOrgCode,
ur.receive_org_name as receiveOrgName,
ur.receive_company_code as receiveCompanyCode,
...
...
@@ -26,12 +27,14 @@
ifnull(ur.next_execute_ids,'') as nextExecuteIds,
audit_pass_date as auditPassDate,
use.USE_UNIT_CREDIT_CODE as useUnitCreditCode,
use.USE_UNIT_NAME as useUnitName,
ur.use_unit_name as useUnitName,
ur.use_unit_code as useUnitCode,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.EQU_DEFINE as equDefine,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.ADDRESS as address,
concat(use.PROVINCE_NAME,'-',use.CITY_NAME,'-',use.COUNTY_NAME) as place,
re.equ_id as equipId
from tzs_jg_scrap_cancel ur
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
View file @
5d613664
...
...
@@ -21,9 +21,13 @@
tjtn.promoter AS promoter,
tjtn.next_execute_ids AS nextExecuteIds,
tjtn.instance_status AS instanceStatus,
tjtn.notice_report_url AS noticeReportUrl
tjtn.notice_report_url AS noticeReportUrl,
ec."name" AS equipCateName
FROM
tzs_jg_transfer_notice tjtn
LEFT JOIN tzs_jg_transfer_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 tz_equipment_category ec ON ec.code = ri.equ_category
<where>
tjtn.is_delete = false
<if
test=
"param != null "
>
...
...
@@ -50,7 +54,7 @@
</if>
</if>
<if
test=
"type == 'supervision'"
>
AND tjtn.
notice_status in ('6612', '6613', '6610')
AND tjtn.
receive_org_code = #{orgCode}
</if>
<if
test=
"type == 'enterprise'"
>
AND tjtn.install_unit_credit_code = #{orgCode}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
5d613664
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -23,7 +21,6 @@ import java.util.Arrays;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -103,7 +100,15 @@ public class CommonController extends BaseController {
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserInfo
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
sequenceNbr
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserInfoSplit"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询安全管理员的基本信息"
,
notes
=
"查询安全管理员的基本信息"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserInfoSplit
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
if
(
sequenceNbr
.
contains
(
"_"
))
{
sequenceNbr
=
sequenceNbr
.
split
(
"_"
)[
0
];
}
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
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/JgInstallationByWorkFlowController.java
View file @
5d613664
...
...
@@ -80,8 +80,10 @@ public class JgInstallationByWorkFlowController {
public
ResponseModel
<
JgInstallationNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
// TODO 受理安装告知流程
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
String
opinion
=
(
String
)
model
.
get
(
"opinion"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
model1
.
get
(
"installationInfo"
);
JgInstallationNoticeDto
jgInstallationNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgInstallationNoticeDto
.
class
);
jgInstallationNoticeDto
.
setProcessAdvice
(
opinion
);
jgInstallationNoticeServiceImpl
.
accept
(
jgInstallationNoticeDto
,
op
);
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/JgScrapCancelController.java
View file @
5d613664
...
...
@@ -4,15 +4,9 @@ import cn.hutool.core.bean.BeanUtil;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgScrapCancelServiceImpl
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -35,104 +29,106 @@ import java.util.*;
@RequestMapping
(
value
=
"/jg-scrap-cancel"
)
public
class
JgScrapCancelController
extends
BaseController
{
@Autowired
JgScrapCancelServiceImpl
jgScrapCancelService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
JgScrapCancelDto
>
model
)
{
jgScrapCancelService
.
save
(
submitType
,
model
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
/**
* 根据sequenceNbr更新
*
* @param model 安装告知
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据sequenceNbr更新安装告知"
,
notes
=
"根据sequenceNbr更新安装告知"
)
public
ResponseModel
<
JgScrapCancelDto
>
updateInfo
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgScrapCancelDto
jgScrapCancelDto
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"jgScrapCancelAdd"
)),
JgScrapCancelDto
.
class
,
true
);
if
(
Objects
.
isNull
(
jgScrapCancelDto
))
{
throw
new
IllegalArgumentException
(
"参数jgScrapCancelAdd不能为空"
);
}
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"jgScrapCancelAdd"
)).
get
(
"cancelCertificateList"
);
jgScrapCancelDto
.
setCancelCertificateList
((
List
<
Map
<
String
,
Object
>>)
o
);
return
ResponseHelper
.
buildResponse
(
jgScrapCancelService
.
updateInfo
(
submitType
,
jgScrapCancelDto
,
op
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
LinkedHashMap
model1
=
(
LinkedHashMap
)
map
.
get
(
"model"
);
LinkedHashMap
jgScrapCancelInfo
=
(
LinkedHashMap
)
model1
.
get
(
"jgScrapCancelAdd"
);
JgScrapCancelDto
jgScrapCancelDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jgScrapCancelInfo
),
JgScrapCancelDto
.
class
);
jgScrapCancelService
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
())),
jgScrapCancelDto
.
getInstanceId
(),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"opinion"
)),
true
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/withdraw"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
withdraw
(
@RequestBody
JSONObject
map
)
{
jgScrapCancelService
.
withdraw
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Object
>
deleteBatch
(
@RequestBody
JSONObject
map
)
{
List
<
Long
>
ids
=
(
List
<
Long
>)
map
.
get
(
"ids"
);
jgScrapCancelService
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteMessage"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Object
>
deleteMessage
(
@RequestParam
(
"id"
)
Long
id
)
{
ArrayList
<
Long
>
ids
=
new
ArrayList
<>();
ids
.
add
(
id
);
jgScrapCancelService
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@PostMapping
(
value
=
"/getList"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getList
(
JgScrapCancelDto
dto
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
return
ResponseHelper
.
buildResponse
(
jgScrapCancelService
.
getList
(
dto
,
page
,
dto
.
getRoleIds
()));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/details"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个详情"
,
notes
=
"根据sequenceNbr查询单个详情"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
selectOne
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgScrapCancelService
.
queryBySequenceNbr
(
sequenceNbr
));
}
@Autowired
JgScrapCancelServiceImpl
jgScrapCancelService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增/新增并提交"
,
notes
=
"新增/新增并提交"
)
public
ResponseModel
<
Object
>
save
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
JSONObject
>
model
)
{
jgScrapCancelService
.
save
(
submitType
,
model
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
/**
* 根据sequenceNbr更新
*
* @param model 安装告知
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateInfo"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
JgScrapCancelDto
>
updateInfo
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgScrapCancelDto
jgScrapCancelDto
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"jgScrapCancelAdd"
)),
JgScrapCancelDto
.
class
,
true
);
if
(
Objects
.
isNull
(
jgScrapCancelDto
))
{
throw
new
IllegalArgumentException
(
"参数jgScrapCancelAdd不能为空"
);
}
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"jgScrapCancelAdd"
)).
get
(
"cancelCertificateList"
);
jgScrapCancelDto
.
setCancelCertificateList
((
List
<
Map
<
String
,
Object
>>)
o
);
return
ResponseHelper
.
buildResponse
(
jgScrapCancelService
.
updateInfo
(
submitType
,
jgScrapCancelDto
,
op
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
LinkedHashMap
model1
=
(
LinkedHashMap
)
map
.
get
(
"model"
);
LinkedHashMap
jgScrapCancelInfo
=
(
LinkedHashMap
)
model1
.
get
(
"jgScrapCancelAdd"
);
jgScrapCancelInfo
.
remove
(
"SEQUENCE_NBR"
);
JgScrapCancelDto
jgScrapCancelDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
jgScrapCancelInfo
),
JgScrapCancelDto
.
class
);
jgScrapCancelService
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
jgScrapCancelDto
.
getSequenceNbr
())),
jgScrapCancelDto
.
getInstanceId
(),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"opinion"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteBatch"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除"
,
notes
=
"批量删除"
)
public
ResponseModel
<
Object
>
deleteBatch
(
@RequestBody
JSONObject
map
)
{
List
<
Long
>
ids
=
(
List
<
Long
>)
map
.
get
(
"ids"
);
jgScrapCancelService
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/deleteMessage"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"单个删除"
,
notes
=
"单个删除"
)
public
ResponseModel
<
Object
>
deleteMessage
(
@RequestParam
(
"id"
)
Long
id
)
{
List
<
Long
>
ids
=
Collections
.
singletonList
(
id
);
jgScrapCancelService
.
deleteBatch
(
ids
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@PostMapping
(
value
=
"/getList"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getList
(
JgScrapCancelDto
dto
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
return
ResponseHelper
.
buildResponse
(
jgScrapCancelService
.
getList
(
dto
,
page
,
dto
.
getRoleIds
()));
}
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/details"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个详情"
,
notes
=
"根据sequenceNbr查询单个详情"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
selectOne
(
@RequestParam
(
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgScrapCancelService
.
queryBySequenceNbr
(
sequenceNbr
));
}
/**
* 撤回
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/withdraw"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"撤回"
,
notes
=
"撤回"
)
public
ResponseModel
<
Object
>
revocation
(
@RequestBody
JSONObject
map
)
{
jgScrapCancelService
.
revocation
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
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 @
5d613664
...
...
@@ -37,6 +37,8 @@ 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.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.stereotype.Service
;
...
...
@@ -319,21 +321,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
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
(
"produceCode"
,
getValue
.
apply
(
"
factoryNum"
));
// TODO: 出厂
编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"
fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"county
Name"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"
installUnitAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"street
Name"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
));
placeholders
.
put
(
"installType"
,
getValue
.
apply
(
"installType"
)
);
// TODO: 施工类别
placeholders
.
put
(
"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
(
"
fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"streetName"
)
+
getValue
.
apply
(
"address"
));
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
(
"useUnitA
ddress"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"
a
ddress"
));
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"applyNo"
),
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
...
...
@@ -458,7 +460,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"
提交流程
"
);
dto
.
setComment
(
""
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
"0"
);
dto
.
setVariable
(
map
);
...
...
@@ -498,6 +500,10 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setEquList
((
String
.
valueOf
(
obj
.
get
(
"EQU_CATEGORY"
))));
StringBuffer
buffer
=
new
StringBuffer
();
buffer
.
append
(
dto
.
getProvinceName
()).
append
(
dto
.
getCityName
()).
append
(
dto
.
getCountyName
()).
append
(
dto
.
getAddress
());
dto
.
setEquAddress
(
buffer
.
toString
());
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
...
...
@@ -630,7 +636,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"提交流程"
);
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getProcessAdvice
()))
{
dto
.
setComment
(
notice
.
getProcessAdvice
());
}
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
dto
.
setVariable
(
map
);
...
...
@@ -664,10 +672,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
@Transactional
public
void
accept
(
JgInstallationNoticeDto
dto
,
String
op
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
String
userId
=
RequestContext
.
getExeUserId
();
JgInstallationNotice
jgInstallationNotice
=
this
.
jgInstallationNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
jgInstallationNotice
.
setProcessAdvice
(
dto
.
getProcessAdvice
());
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
...
...
@@ -706,7 +716,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
map
.
put
(
"cityCode"
,
jgInstallationNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgInstallationNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
jgInstallationNotice
.
getIsXixian
()
==
null
?
"
0"
:
jgInstallationNotice
.
getIsXixian
()
);
map
.
put
(
"isXiXian"
,
jgInstallationNotice
.
getIsXixian
()
==
null
?
"
null"
:
jgInstallationNotice
.
getIsXixian
().
equals
(
"0"
)
?
"null"
:
"1"
);
Map
<
String
,
Object
>
mapCode
;
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
mapCode
=
code
.
getResult
();
...
...
@@ -716,18 +726,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
SupervisoryCodeInfo
supervisoryCodeInfo
=
supervisoryCodeInfoMapper
.
selectOne
(
queryWrapper3
);
supervisoryCodeInfo
.
setStatus
(
"1"
);
supervisoryCodeInfoMapper
.
updateById
(
supervisoryCodeInfo
);
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
this
.
generateInstallationNoticeReport
(
jgInstallationNotice
.
getSequenceNbr
());
jgInstallationNotice
.
setHandleDate
(
new
Date
());
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
// 更新其他业务表
tzsJgOtherInfo
.
setCode96333
(
mapCode
.
get
(
"code96333"
).
toString
());
if
(!
ValidationUtil
.
isEmpty
(
mapCode
.
get
(
"code96333"
)))
{
tzsJgOtherInfo
.
setCode96333
(
mapCode
.
get
(
"code96333"
).
toString
());
map1
.
put
(
"CODE96333"
,
tzsJgOtherInfo
.
getCode96333
()
);
}
tzsJgOtherInfo
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
tzsJgRegistrationInfo
.
setEquCode
(
deviceRegistrationCode
);
jgInstallationNotice
.
setEquRegisterCode
(
deviceRegistrationCode
);
jgInstallationNotice
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"CODE96333"
,
tzsJgOtherInfo
.
getCode96333
()
);
map1
.
put
(
"EQU_CODE"
,
tzsJgRegistrationInfo
.
getEquCode
()
);
map1
.
put
(
"SUPERVISORY_CODE"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
objMap
.
put
(
tzsJgOtherInfo
.
getRecord
(),
map1
);
...
...
@@ -735,6 +748,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
tzsJgRegistrationInfoMapper
.
updateById
(
tzsJgRegistrationInfo
);
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
@Override
public
void
afterCommit
()
{
generateInstallationNoticeReport
(
jgInstallationNotice
.
getSequenceNbr
());
}
});
}
else
{
jgInstallationNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
if
(!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getInstanceStatus
()))
{
...
...
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 @
5d613664
...
...
@@ -94,6 +94,9 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
SupervisoryCodeInfoMapper
supervisoryCodeInfoMapper
;
@Autowired
IDataDictionaryService
dataDictionaryService
;
@Autowired
RedisUtils
redisUtils
;
public
static
byte
[]
file2byte
(
File
file
)
{
...
...
@@ -127,6 +130,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
maintainInfo
.
put
(
"constructionContractList"
,
JSON
.
parseArray
(
notice
.
getConstructionContract
()));
maintainInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
maintainInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
maintainInfo
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
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
());
...
...
@@ -218,8 +222,6 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
@Autowired
IDataDictionaryService
dataDictionaryService
;
/**
* 分页查询
*
...
...
@@ -424,6 +426,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
int
i
=
deviceList
.
indexOf
(
obj
);
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setEquCategory
(
String
.
valueOf
(
obj
.
get
(
"EQU_CATEGORY"
)));
dto
.
setEquListCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST_CODE"
)));
dto
.
setNoticeDate
(
new
Date
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
...
...
@@ -475,6 +479,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
model
.
setCityName
(
cityList
[
1
]);
}
}
String
county
=
model
.
getCounty
();
if
(!
ObjectUtils
.
isEmpty
(
county
))
{
String
[]
countyList
=
county
.
split
(
"_"
);
...
...
@@ -509,6 +514,16 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
String
constructionManager
=
model
.
getConstructionManagerId
();
if
(!
ObjectUtils
.
isEmpty
(
constructionManager
))
{
String
[]
constructionManagerList
=
constructionManager
.
split
(
"_"
);
if
(
constructionManagerList
.
length
>
1
)
{
model
.
setConstructionManagerId
(
constructionManagerList
[
0
]);
model
.
setConstructionManager
(
constructionManagerList
[
1
]);
}
}
String
inspectUnitId
=
model
.
getInspectionUnitCreditCode
();
if
(!
ObjectUtils
.
isEmpty
(
inspectUnitId
))
{
String
[]
inspectUnitIdList
=
inspectUnitId
.
split
(
"_"
);
...
...
@@ -558,7 +573,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
JgMaintainNotice
jgMaintainNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
if
(
ajaxResult
.
getStatus
()
==
200
)
{
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
ROLLBACK
.
getCode
()));
jgMaintainNoticeMapper
.
updateById
(
jgMaintainNotice
);
}
}
...
...
@@ -607,6 +622,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if
(
"0"
.
equals
(
op
))
{
jgMaintainNotice
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
jgMaintainNotice
.
setAcceptDate
(
new
Date
());
this
.
generateMaintainNoticeReport
(
jgMaintainNotice
.
getSequenceNbr
());
// // 更新其他业务表
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
...
...
@@ -617,7 +633,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
}
else
{
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
//驳回
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
jgMaintainNotice
.
setInstanceStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
jgMaintainNoticeMapper
.
updatePromoter
(
jgMaintainNotice
.
getSequenceNbr
());
}
...
...
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 @
5d613664
...
...
@@ -2,6 +2,7 @@ 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.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aspose.words.SaveFormat
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -88,10 +89,10 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Autowired
JgReformNoticeEqMapper
J
gReformNoticeEqMapper
;
JgReformNoticeEqMapper
j
gReformNoticeEqMapper
;
@Autowired
private
JgReformNoticeMapper
J
gReformNoticeMapper
;
private
JgReformNoticeMapper
j
gReformNoticeMapper
;
@Autowired
private
ICreateCodeService
iCreateCodeService
;
// @Autowired
...
...
@@ -130,7 +131,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 改造告知信息
JgReformNotice
notice
=
J
gReformNoticeMapper
.
selectById
(
sequenceNbr
);
JgReformNotice
notice
=
j
gReformNoticeMapper
.
selectById
(
sequenceNbr
);
if
(
Objects
.
isNull
(
notice
))
{
return
null
;
}
...
...
@@ -152,7 +153,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
J
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
j
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
if
(
installationInfo
.
containsKey
(
s
))
{
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
...
...
@@ -161,6 +162,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
}
}
installationInfo
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"reformInfo"
,
installationInfo
);
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
...
...
@@ -177,8 +179,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
String
[]
taskName
=
new
String
[]{
"流程结束"
};
// 字段转换
this
.
convertField
(
noticeDto
);
ArrayList
<
String
>
roleListFirst
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListSecond
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
AjaxResult
ajaxResult
;
// 发起流程
...
...
@@ -190,45 +195,38 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
noticeDto
.
setInstanceId
(
instanceId
);
// 查询下节点任务
getNext
(
roleListFirst
,
instanceId
,
taskName
);
noticeDto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
}
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
()));
JgReformNotice
bean
=
new
JgReformNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
bean
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
JgReformNoticeMapper
.
updateById
(
bean
);
Boolean
rollBack
=
"1"
.
equals
(
op
)
?
true
:
false
;
if
(
rollBack
)
{
JgReformNoticeMapper
.
updatePromoter
(
noticeDto
.
getSequenceNbr
());
}
JgReformNotice
notice
=
new
JgReformNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
notice
);
boolean
submit
=
submit
(
notice
,
op
);
if
(
submit
)
{
// 查询下节点任务
getNext
(
roleListSecond
,
notice
.
getInstanceId
(),
taskName
);
notice
.
setStatus
(
taskName
[
0
]);
if
(!
ObjectUtils
.
isEmpty
(
notice
.
getInstanceStatus
()))
{
notice
.
setInstanceStatus
(
notice
.
getInstanceStatus
()
+
","
+
roleListSecond
);
}
else
{
notice
.
setInstanceStatus
(
String
.
join
(
","
,
roleListSecond
));
}
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
notice
.
setPromoter
(
RequestContext
.
getExeUserId
());
notice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
notice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
jgReformNoticeMapper
.
updateById
(
notice
);
}
}
else
{
JgReformNotice
bean
=
new
JgReformNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
J
gReformNoticeMapper
.
updateById
(
bean
);
j
gReformNoticeMapper
.
updateById
(
bean
);
}
return
noticeDto
;
}
...
...
@@ -246,7 +244,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
public
Page
<
JgReformNoticeDto
>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
Page
<
JgReformNotice
>
noticePage
=
J
gReformNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
Page
<
JgReformNotice
>
noticePage
=
j
gReformNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
// 将Page<JgReformNotice>转化为Page<JgReformNoticeDto>
Page
<
JgReformNoticeDto
>
noticeDtoPage
=
new
Page
<>();
...
...
@@ -307,7 +305,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
JgReformNotice
JgReformNotice
=
this
.
getById
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
J
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
j
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
if
(
Objects
.
isNull
(
JgReformNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"改造告知单不存在"
);
}
...
...
@@ -323,21 +321,21 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
""
);
// TODO: 制造
编号
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"
,
""
);
placeholders
.
put
(
"installType"
,
""
);
// TODO: 施工类别
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
)
);
placeholders
.
put
(
"installType"
,
"
改造
"
);
// TODO: 施工类别
placeholders
.
put
(
"installLicenseNo"
,
""
);
placeholders
.
put
(
"installLicenseExpirationDate"
,
""
);
placeholders
.
put
(
"installLeaderName"
,
""
);
placeholders
.
put
(
"installLeaderPhone"
,
""
);
placeholders
.
put
(
"installUnitAddress"
,
""
);
// TODO: 施工单位地址
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
// 施工负责人
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
// 施工负责人手机
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
)
);
// TODO: 施工单位地址
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnit
ProvinceName"
)
+
getValue
.
apply
(
"useUnitCityName"
)
+
getValue
.
apply
(
"useUnitCountyName"
)
+
getValue
.
apply
(
"useUnit
Address"
));
placeholders
.
put
(
"useUnitLeaderAddress"
,
getValue
.
apply
(
"useUnitAddress"
));
// 生成二维码
String
qrCode
=
ImageUtils
.
generateQRCode
(
getValue
.
apply
(
"applyNo"
),
300
,
300
);
placeholders
.
put
(
"qrCode"
,
qrCode
);
...
...
@@ -405,6 +403,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgReformNoticeDto
>
JgReformNoticeDtoMap
,
ReginParams
reginParams
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
JgReformNoticeDto
model
=
JgReformNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
// 字段转换
convertField
(
model
);
...
...
@@ -421,6 +421,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
return
;
}
ArrayList
<
String
>
roleListFirst
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListSecond
=
new
ArrayList
<>();
// 判断当前是否为提交
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
...
...
@@ -433,7 +435,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setCompleteFirstTask
(
true
);
//
dto.setCompleteFirstTask(true);
list
.
add
(
dto
);
}
actWorkflowBatchDTO
.
setProcess
(
list
);
...
...
@@ -444,14 +446,42 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
for
(
Object
obj
:
returnList
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
instanceIdList
.
add
(
jsonObject
.
getString
(
"id"
));
String
instanceId
=
jsonObject
.
getString
(
"id"
);
instanceIdList
.
add
(
instanceId
);
// 查询下节点任务
if
(
returnList
.
get
(
0
).
equals
(
obj
))
{
getNext
(
roleListFirst
,
instanceId
,
taskName
);
}
// 推动下一个节点
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
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"
,
"0"
);
dto
.
setVariable
(
map
);
// 执行流程
AjaxResult
ajaxResult1
=
null
;
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
getNext
(
roleListSecond
,
instanceId
,
taskName
);
}
else
{
log
.
error
(
"提交失败"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
log
.
error
(
"提交失败:{}"
,
e
);
}
}
// ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
List
<
JgReformNotice
>
list
=
new
ArrayList
<>();
List
<
JgReformNoticeEq
>
equipList
=
new
ArrayList
<>();
deviceList
.
forEach
(
obj
->
{
...
...
@@ -462,6 +492,12 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setStatus
(
taskName
[
0
]);
}
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
...
...
@@ -469,7 +505,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
}
else
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
...
...
@@ -477,7 +512,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
equipList
.
add
(
jgRelationEquip
);
});
J
gReformNoticeMapper
.
insertBatchSomeColumn
(
list
);
j
gReformNoticeMapper
.
insertBatchSomeColumn
(
list
);
List
<
JgReformNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgReformNotice
>
collect
=
list
.
stream
().
filter
(
JgReformNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
JgReformNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
...
...
@@ -485,10 +520,26 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
}).
collect
(
Collectors
.
toList
());
J
gReformNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
j
gReformNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
}
void
getNext
(
ArrayList
<
String
>
roleListFirst
,
String
instanceId
,
String
[]
taskName
)
{
AjaxResult
aj
=
Workflow
.
taskClient
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
aj
.
get
(
"data"
)));
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
))
{
String
nextTaskId
=
taskNoAuth
.
getString
(
"id"
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
taskName
[
0
]
=
taskNoAuth
.
getString
(
"name"
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
if
(((
Map
)
datum
).
containsKey
(
"groupId"
))
{
roleListFirst
.
add
(((
Map
)
datum
).
get
(
"groupId"
).
toString
());
}
}
}
}
private
void
convertField
(
JgReformNoticeDto
model
)
{
// 处理图片
// if (!ValidationUtil.isEmpty(model.getProxyStatementAttachmentList())) {
...
...
@@ -554,7 +605,14 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
String
constructionManagerId
=
model
.
getConstructionManagerId
();
if
(!
ObjectUtils
.
isEmpty
(
constructionManagerId
))
{
String
[]
constructionManagerIdList
=
constructionManagerId
.
split
(
"_"
);
if
(
constructionManagerIdList
.
length
>
1
)
{
model
.
setConstructionManagerId
(
constructionManagerIdList
[
0
]);
model
.
setConstructionManager
(
constructionManagerIdList
[
1
]);
}
}
// String inspectUnitId = model.getInspectUnitId();
// if (!ObjectUtils.isEmpty(inspectUnitId)) {
// String[] inspectUnitIdList = inspectUnitId.split("_");
...
...
@@ -602,20 +660,24 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
public
void
cancel
(
JgReformNoticeDto
noticeDto
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
JgReformNotice
JgReformNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
JgReformNotice
jgReformNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
if
(
ajaxResult
.
getStatus
()
==
200
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
JgReformNotice
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
JgReformNoticeMapper
.
updateById
(
JgReformNotice
);
JgReformNoticeMapper
.
updatePromoter
(
JgReformNotice
.
getSequenceNbr
());
getNext
(
roleList
,
noticeDto
.
getInstanceId
(),
taskName
);
jgReformNotice
.
setStatus
(
taskName
[
0
]);
jgReformNotice
.
setPromoter
(
""
);
jgReformNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
ROLLBACK
.
getCode
()));
jgReformNoticeMapper
.
updateById
(
jgReformNotice
);
}
}
public
void
accept
(
JgReformNoticeDto
dto
,
String
op
)
{
JgReformNotice
JgReformNotice
=
this
.
JgReformNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
String
[]
taskName
=
new
String
[]{
"流程结束"
};
String
userId
=
RequestContext
.
getExeUserId
();
JgReformNotice
jgReformNotice
=
this
.
jgReformNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
...
...
@@ -625,83 +687,81 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
log
.
error
(
"日期转换失败:{}"
,
e
);
}
LambdaQueryWrapper
<
JgReformNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgReformNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
JgReformNoticeEq
jgRelationEquip
=
JgReformNoticeEqMapper
.
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
(
JgReformNotice
.
getCity
()).
append
(
ym
);
// String equCode = stringBuffer.toString();
// 只有安装设备需要
// String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
JgReformNotice
.
getCity
());
map
.
put
(
"countyCode"
,
JgReformNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
JgReformNotice
.
getIsXixian
()
==
null
?
"0"
:
JgReformNotice
.
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
(
JgReformNotice
,
op
);
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
boolean
submit
=
submit
(
jgReformNotice
,
op
);
if
(
submit
)
{
getNext
(
roleList
,
dto
.
getInstanceId
(),
taskName
);
jgReformNotice
.
setStatus
(
taskName
[
0
]);
if
(
"0"
.
equals
(
op
))
{
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
this
.
generateInstallationNoticeReport
(
JgReformNotice
.
getSequenceNbr
());
// 更新其他业务表
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
// tzsJgOtherInfo.setSupervisoryCode(mapCode.get("superviseCode").toString());
// tzsJgRegistrationInfo.setEquCode(deviceRegistrationCode);
// JgReformNotice.setEquRegisterCode(deviceRegistrationCode);
// JgReformNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
if
(
roleList
.
size
()
==
0
)
{
LambdaQueryWrapper
<
JgReformNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgReformNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
JgReformNoticeEq
jgRelationEquip
=
jgReformNoticeEqMapper
.
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
(
jgReformNotice
.
getCity
()).
append
(
ym
);
// String equCode = stringBuffer.toString();
// 只有安装设备需要
// String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
jgReformNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgReformNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
jgReformNotice
.
getIsXixian
()
==
null
?
"0"
:
jgReformNotice
.
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);
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
this
.
generateInstallationNoticeReport
(
jgReformNotice
.
getSequenceNbr
());
// 更新其他业务表
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
// tzsJgOtherInfo.setSupervisoryCode(mapCode.get("superviseCode").toString());
// tzsJgRegistrationInfo.setEquCode(deviceRegistrationCode);
// jgInstallationNotice.setEquRegisterCode(deviceRegistrationCode);
// jgInstallationNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
// Map<String,Map<String,Object>> objMap = new HashMap<>();
// Map<String,Object> map1 =new HashMap<>();
// map1.put("CODE96333",tzsJgOtherInfo.getCode96333() );
// map1.put("EQU_CODE",tzsJgRegistrationInfo.getEquCode() );
// map1.put("SUPERVISORY_CODE",tzsJgOtherInfo.getSupervisoryCode());
// objMap.put(tzsJgOtherInfo.getRecord(),map1);
jgReformNotice
.
setPromoter
(
""
);
// tzsServiceFeignClient.commonUpdateEsDataByIds(objMap);
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
}
else
{
jgReformNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
if
(!
ObjectUtils
.
isEmpty
(
jgReformNotice
.
getInstanceStatus
()))
{
jgReformNotice
.
setInstanceStatus
(
jgReformNotice
.
getInstanceStatus
()
+
","
+
String
.
join
(
","
,
roleList
));
}
else
{
jgReformNotice
.
setInstanceStatus
(
String
.
join
(
","
,
roleList
));
}
jgReformNotice
.
setPromoter
(
userId
);
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
}
}
else
{
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
// JgReformNotice.setStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
}
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
JgReformNotice
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
JgReformNoticeMapper
.
updateById
(
JgReformNotice
);
Boolean
rollBack
=
"1"
.
equals
(
op
)
?
true
:
false
;
if
(
rollBack
)
{
JgReformNoticeMapper
.
updatePromoter
(
JgReformNotice
.
getSequenceNbr
());
jgReformNotice
.
setPromoter
(
""
);
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
}
jgReformNoticeMapper
.
updateById
(
jgReformNotice
);
}
// // 组装监管码
// 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/JgScrapCancelServiceImpl.java
View file @
5d613664
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -13,13 +14,20 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancel
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancelEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CancelFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CancelTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CancelWorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgScrapCancelService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.SuperviseInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgUseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.SuperviseInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.service.ICreateCodeService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
...
...
@@ -37,6 +45,7 @@ import org.springframework.util.StringUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
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.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -48,7 +57,7 @@ import java.util.stream.Collectors;
* @date 2023-12-20
*/
@Service
public
class
JgScrapCancelServiceImpl
extends
BaseService
<
JgScrapCancelDto
,
JgScrapCancel
,
JgScrapCancelMapper
>
implements
IJgScrapCancelService
{
public
class
JgScrapCancelServiceImpl
extends
BaseService
<
JgScrapCancelDto
,
JgScrapCancel
,
JgScrapCancelMapper
>
implements
IJgScrapCancelService
{
@Autowired
...
...
@@ -61,28 +70,34 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
@Autowired
private
ICreateCodeService
iCreateCodeService
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
private
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
@Autowired
IdxBizJgOtherInfoMapper
idxBizJgOtherInfoMapper
;
@Autowired
SuperviseInfoMapper
superviseInfoMapper
;
@Autowired
RedisUtils
redisUtils
;
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgScrapCancelDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgScrapCancelDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
,
orgCode
);
listPage
.
getRecords
().
forEach
(
item
->
{
if
(
item
.
containsKey
(
"auditStatus"
)
&&
Objects
.
nonNull
(
item
.
get
(
"auditStatus"
)))
{
String
noticeStatusDesc
=
FlowStatusEnum
.
getNameByType
(
Long
.
valueOf
(
item
.
get
(
"auditStatus"
).
toString
()));
item
.
put
(
"auditStatusDesc"
,
noticeStatusDesc
);
item
.
put
(
"auditStatusDesc"
,
item
.
get
(
"auditStatus"
).
toString
());
}
if
(
item
.
containsKey
(
"cancelType"
)
&&
Objects
.
nonNull
(
item
.
get
(
"cancelType"
)))
{
item
.
put
(
"cancelTypeDesc"
,
CancelTypeEnum
.
getNameByType
(
item
.
get
(
"cancelType"
).
toString
()));
}
});
return
listPage
;
}
public
Page
<
Map
<
String
,
Object
>>
getEquipList
(
Page
<
Map
<
String
,
Object
>>
page
,
String
factoryNum
,
String
equList
,
String
equCategory
)
{
return
this
.
baseMapper
.
getEquipListPage
(
page
,
factoryNum
,
equList
,
equCategory
);
}
private
void
convertField
(
JgScrapCancelDto
model
)
{
// 处理图片
...
...
@@ -100,21 +115,30 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
}
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
save
(
String
submitType
,
Map
<
String
,
J
gScrapCancelDto
>
jgInstallationNoticeDtoMap
)
{
public
void
save
(
String
submitType
,
Map
<
String
,
J
SONObject
>
jgInstallationNoticeDtoMap
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
[]
taskName
=
new
String
[]{
"流程结束"
};
JgScrapCancelDto
model
=
jgInstallationNoticeDtoMap
.
get
(
"jgScrapCancelAdd"
);
JSONObject
jgScrapCancelAdd
=
jgInstallationNoticeDtoMap
.
get
(
"jgScrapCancelAdd"
);
String
equipId
=
jgScrapCancelAdd
.
get
(
"SEQUENCE_NBR"
).
toString
();
jgScrapCancelAdd
.
remove
(
"SEQUENCE_NBR"
);
JgScrapCancelDto
model
=
JSON
.
parseObject
(
jgScrapCancelAdd
.
toJSONString
(),
JgScrapCancelDto
.
class
);
model
.
setSEQUENCE_NBR
(
equipId
);
// JgScrapCancelDto model = (JgScrapCancelDto) jgInstallationNoticeDtoMap.get("jgScrapCancelAdd");
// 字段转换
convertField
(
model
);
// 获取告知设备
列表
List
<
Map
<
String
,
Object
>>
deviceList
=
model
.
getDeviceList
();
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
// 获取告知设备
信息
// 设备信息转换
if
(
StrUtil
.
isEmpty
(
model
.
getSEQUENCE_NBR
()
))
{
return
;
}
List
<
Map
<
String
,
Object
>>
deviceList
=
new
ArrayList
<>();
HashMap
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"SEQUENCE_NBR"
,
model
.
getSEQUENCE_NBR
());
deviceList
.
add
(
map1
);
// 获取告知单号
List
<
String
>
applyNoList
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
SBZX
.
getCode
(),
deviceList
.
size
());
if
(
CollectionUtils
.
isEmpty
(
applyNoList
))
{
...
...
@@ -130,8 +154,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
// ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
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
();
dto
.
setProcessDefinitionKey
(
"scrapCancel"
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
...
...
@@ -141,13 +164,13 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
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
));
for
(
Object
obj
:
returnList
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
String
instanceId
=
jsonObject
.
getString
(
"id"
);
instanceIdList
.
add
(
instanceId
);
// 查询下节点任务
if
(
returnList
.
get
(
0
).
equals
(
obj
))
{
getNext
(
roleListFirst
,
instanceId
,
taskName
);
if
(
returnList
.
get
(
0
).
equals
(
obj
))
{
getNext
(
roleListFirst
,
instanceId
,
taskName
);
}
// 推动下一个节点
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
...
...
@@ -166,7 +189,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
getNext
(
roleListSecond
,
instanceId
,
taskName
);
getNext
(
roleListSecond
,
instanceId
,
taskName
);
}
else
{
log
.
error
(
"提交失败"
);
}
...
...
@@ -197,10 +220,12 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setAuditStatus
(
String
.
valueOf
(
CancelWorkFlowStatusEnum
.
RECEIVE
.
getPass
()));
}
else
{
dto
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
dto
.
setAuditStatus
(
String
.
valueOf
(
CancelWorkFlowStatusEnum
.
SUBMIT
.
getPass
()));
}
dto
.
setUseUnitCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
});
...
...
@@ -214,115 +239,111 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
}
// public String flowExecute(Long id,String instanceId, String operate, String comment, Boolean update) {
// String role = "";
// String taskName = "流程结束";
// ArrayList<String> roleList = new ArrayList<>();
// try {
// JSONObject task = workFlowFeginService.getTaskNoAuth(instanceId);
// JSONObject taskMessage = JSON.parseObject(JSON.toJSONString(task.get("data")));
// String taskId = taskMessage.getString("id");
// //组装信息
// TaskResultDTO dto = new TaskResultDTO();
// dto.setResultCode("approvalStatus");
// dto.setTaskId(taskId);
// dto.setComment(comment);
// HashMap<String, Object> map = new HashMap<>();
// map.put("approvalStatus", operate);
// dto.setVariable(map);
// //执行流程
// Workflow.taskClient.completeByTask(taskId, dto);
// // 查询下节点任务
// JSONObject taskNoAuth = workFlowFeginService.getTaskNoAuth(instanceId);
// if (!ObjectUtils.isEmpty(taskNoAuth.get("data"))) {
// JSONObject nextTask = JSON.parseObject(JSON.toJSONString(taskNoAuth.get("data")));
// String nextTaskId = nextTask.getString("id");
// taskName = nextTask.getString("name");
// 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) {
// e.printStackTrace();
// }
// role= String.join(",", roleList);
// if (update) {
// Boolean rollBack = "1".equals(operate) ? true : false;
// updateStatus(id,instanceId, taskName, role, rollBack);
// }
// return 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<JgScrapCancel> lambda = new QueryWrapper<JgScrapCancel>().lambda();
// lambda.eq(JgScrapCancel::getSequenceNbr, id);
// JgScrapCancel jgScrapCancel = this.getBaseMapper().selectOne(lambda);
// if ("流程结束".equals(taskName)) {
// jgScrapCancel.setStatus(taskName);
// jgScrapCancel.setAuditStatus(CancelWorkFlowStatusEnum.COMPLETE.getName());
//
//
// LambdaQueryWrapper<JgScrapCancelEq> lambdaEq = new QueryWrapper<JgScrapCancelEq>().lambda();
// lambdaEq.eq(JgScrapCancelEq::getEquipTransferId, id);
// JgScrapCancelEq jgScrapCancelEq = jgScrapCancelEqMapper.selectOne(lambdaEq);
//
// ResponseModel<String> responseModel = tzsServiceFeignClient.useRegistrationCode(idxBizJgOtherInfoMapper.getSupervisoryCodeByEquipmentCode(jgScrapCancelEq.getEquId()));
// String newUseRegistrationCertificateNumber=responseModel.getResult().split("-")[0];
//
// Map<String,Map<String,Object>> resultMap = new HashMap<>();
// Map<String,Object> map1 =new HashMap<>();
// map1.put("USE_ORG_CODE",newUseRegistrationCertificateNumber );
// if (CancelTypeEnum.SCRAPPED.getCode().equals(jgScrapCancel.getCancelType())) {
// IdxBizJgUseInfo idxBizJgUseInfo = new IdxBizJgUseInfo();
// idxBizJgUseInfo.setEquState(String.valueOf(EquimentEnum.BAOFEI.getCode()));
// LambdaQueryWrapper<IdxBizJgUseInfo> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(IdxBizJgUseInfo::getRecord, jgScrapCancelEq.getEquId());
// idxBizJgUseInfoMapper.update(idxBizJgUseInfo, wrapper);
// map1.put("EQU_STATE", String.valueOf(EquimentEnum.BAOFEI.getCode()));
// } else {
// SuperviseInfo superviseInfo = new SuperviseInfo();
// superviseInfo.setOrgBranchCode("");
// superviseInfo.setOrgBranchName("");
// LambdaQueryWrapper<SuperviseInfo> wrapper = new LambdaQueryWrapper<>();
// wrapper.eq(SuperviseInfo::getRecord, jgScrapCancelEq.getEquId());
// superviseInfoMapper.update(superviseInfo, wrapper);
// map1.put("ORG_BRANCH_CODE", "");
// map1.put("ORG_BRANCH_NAME", "");
// }
// resultMap.put(jgScrapCancelEq.getEquId(), map1);
// tzsServiceFeignClient.commonUpdateEsDataByIds(resultMap);
// } else {
// jgScrapCancel.setNextExecuteIds(role);
// jgScrapCancel.setPromoter(reginParams.getUserModel().getUserId());
// if (!ObjectUtils.isEmpty(jgScrapCancel.getInstanceStatus())) {
// jgScrapCancel.setInstanceStatus(jgScrapCancel.getInstanceStatus() + "," + role);
// } else {
// jgScrapCancel.setInstanceStatus(role);
// }
// }
// CancelWorkFlowStatusEnum message = CancelWorkFlowStatusEnum.getMessage(taskName);
// assert message != null;
// if (rollBack){
// jgScrapCancel.setAuditStatus(message.getRollBack());
// this.getBaseMapper().update(jgScrapCancel, lambda);
// this.getBaseMapper().updatePromoter(jgScrapCancel.getSequenceNbr());
// }else {
// jgScrapCancel.setAuditStatus(message.getPass());
// this.getBaseMapper().update(jgScrapCancel, lambda);
// }
// }
public
String
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
,
Boolean
update
)
{
String
role
=
""
;
String
taskName
=
"流程结束"
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
try
{
JSONObject
task
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskMessage
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
task
.
get
(
"data"
)));
String
taskId
=
taskMessage
.
getString
(
"id"
);
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
dto
.
setVariable
(
map
);
//执行流程
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
// 查询下节点任务
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
taskName
=
nextTask
.
getString
(
"name"
);
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
)
{
e
.
printStackTrace
();
}
role
=
String
.
join
(
","
,
roleList
);
if
(
update
)
{
Boolean
rollBack
=
"1"
.
equals
(
operate
)
?
true
:
false
;
updateStatus
(
id
,
instanceId
,
taskName
,
role
,
rollBack
);
}
return
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
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
lambda
.
eq
(
JgScrapCancel:
:
getSequenceNbr
,
id
);
JgScrapCancel
jgScrapCancel
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
if
(
"流程结束"
.
equals
(
taskName
))
{
jgScrapCancel
.
setStatus
(
taskName
);
jgScrapCancel
.
setAuditStatus
(
"已完成"
);
}
else
{
jgScrapCancel
.
setNextExecuteIds
(
role
);
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
ObjectUtils
.
isEmpty
(
jgScrapCancel
.
getInstanceStatus
()))
{
jgScrapCancel
.
setInstanceStatus
(
jgScrapCancel
.
getInstanceStatus
()
+
","
+
role
);
}
else
{
jgScrapCancel
.
setInstanceStatus
(
role
);
}
CancelFlowStatusEnum
message
=
CancelFlowStatusEnum
.
getMessage
(
taskName
);
jgScrapCancel
.
setStatus
(
message
.
getPass
());
}
if
(
rollBack
){
this
.
getBaseMapper
().
update
(
jgScrapCancel
,
lambda
);
this
.
getBaseMapper
().
updatePromoter
(
jgScrapCancel
.
getSequenceNbr
());
}
else
{
this
.
getBaseMapper
().
update
(
jgScrapCancel
,
lambda
);
}
}
public
void
withdraw
(
String
instanceId
)
{
String
taskName
=
""
;
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
LambdaQueryWrapper
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
lambda
.
eq
(
JgScrapCancel:
:
getInstanceId
,
instanceId
);
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
try
{
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
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
)
{
e
.
printStackTrace
();
}
if
(!
ObjectUtils
.
isEmpty
(
taskName
))
{
CancelFlowStatusEnum
message
=
CancelFlowStatusEnum
.
getMessage
(
taskName
);
jgScrapCancel
.
setStatus
(
message
.
getPass
());
}
String
join
=
String
.
join
(
","
,
roleList
);
JgScrapCancel
jgScrapCancel1
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
this
.
updateStatus
(
jgScrapCancel1
.
getSequenceNbr
(),
instanceId
,
taskName
,
join
,
true
);
}
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
jgScrapCancel
.
setIsDelete
(
true
);
...
...
@@ -331,34 +352,6 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
this
.
update
(
jgScrapCancel
,
lambda
);
}
public
Map
<
String
,
Object
>
getDetail
(
String
id
)
{
Map
<
String
,
Object
>
detail
=
this
.
baseMapper
.
getDetail
(
id
);
Map
<
String
,
Object
>
inspectDetail
=
this
.
baseMapper
.
getInspectDetail
(
id
);
Map
<
String
,
Object
>
useDetail
=
this
.
baseMapper
.
getUseDetail
(
id
);
detail
.
putAll
(
inspectDetail
);
detail
.
putAll
(
useDetail
);
detail
.
putAll
(
useDetail
);
detail
.
put
(
"proDuctPhoto"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"proDuctPhoto"
))));
detail
.
put
(
"factoryStandard"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"factoryStandard"
))));
detail
.
put
(
"productQualityYieldProve"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"productQualityYieldProve"
))));
detail
.
put
(
"insUseMaintainExplanin"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"insUseMaintainExplanin"
))));
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
return
detail
;
}
public
JgScrapCancelDto
updateInfo
(
String
submitType
,
JgScrapCancelDto
jgScrapCancelDto
,
String
op
)
{
if
(
Objects
.
isNull
(
jgScrapCancelDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
...
...
@@ -401,7 +394,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
}
jgScrapCancel
.
setPromoter
(
RequestContext
.
getExeUserId
());
jgScrapCancel
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
jgScrapCancel
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
jgScrapCancel
.
setAuditStatus
(
String
.
valueOf
(
CancelWorkFlowStatusEnum
.
RECEIVE
.
getPass
()));
this
.
updateById
(
jgScrapCancel
);
}
}
else
{
...
...
@@ -465,15 +458,155 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto,JgScr
}
Map
<
String
,
Object
>
installationInfo
=
BeanUtil
.
beanToMap
(
notice
);
installationInfo
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
installationInfo
.
put
(
"cancelCertificateList"
,
JSON
.
parseArray
(
installationInfo
.
get
(
"cancelCertificate"
).
toString
()));
LambdaQueryWrapper
<
JgScrapCancelEq
>
lambdaEq
=
new
QueryWrapper
<
JgScrapCancelEq
>().
lambda
();
lambdaEq
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
sequenceNbr
);
JgScrapCancelEq
jgScrapCancelEq
=
jgScrapCancelEqMapper
.
selectOne
(
lambdaEq
);
// 设备信息
Map
<
String
,
Object
>
equipmentInfos
=
this
.
baseMapper
.
queryEquipInformation
(
sequenceNbr
);
BeanUtil
.
copyProperties
(
installationInfo
,
equipmentInfos
);
installationInfo
.
put
(
"SEQUENCE_NBR"
,
jgScrapCancelEq
.
getEquId
()
);
// Map<String, Object> equipmentInfos = this.baseMapper.queryEquipInformation(sequenceNbr
);
return
new
HashMap
<
String
,
Object
>()
{{
this
.
put
(
"jgScrapCancelAdd"
,
equipmentInfos
);
// this.put("equipmentInfo", equipmentInfos);
this
.
put
(
"jgScrapCancelAdd"
,
installationInfo
);
}};
}
public
void
revocation
(
String
instanceId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
taskName
=
""
;
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
LambdaQueryWrapper
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
lambda
.
eq
(
JgScrapCancel:
:
getInstanceId
,
instanceId
);
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
try
{
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
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
)
{
e
.
printStackTrace
();
}
if
(!
ObjectUtils
.
isEmpty
(
taskName
))
{
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
getMessage
(
taskName
).
getRollBack
());
}
String
join
=
String
.
join
(
","
,
roleList
);
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgScrapCancel
.
setNextExecuteIds
(
join
);
this
.
update
(
jgScrapCancel
,
lambda
);
}
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
try
{
JSONObject
task
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskMessage
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
task
.
get
(
"data"
)));
String
taskId
=
taskMessage
.
getString
(
"id"
);
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
dto
.
setVariable
(
map
);
//执行流程
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
// 更新下一步执行人
updateExecuteIds
(
instanceId
,
id
,
operate
);
}
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
role
=
""
;
String
taskName
=
"流程结束"
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
JgScrapCancel
jgScrapCancel
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
try
{
// 查询下节点任务
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
taskName
=
nextTask
.
getString
(
"name"
);
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
)
{
e
.
printStackTrace
();
}
if
(!
"流程结束"
.
equals
(
taskName
))
{
role
=
String
.
join
(
","
,
roleList
);
jgScrapCancel
.
setNextExecuteIds
(
role
);
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgScrapCancel
.
setInstanceId
(
instanceId
);
if
(!
ObjectUtils
.
isEmpty
(
jgScrapCancel
.
getInstanceStatus
()))
{
jgScrapCancel
.
setInstanceStatus
(
jgScrapCancel
.
getInstanceStatus
()
+
","
+
role
);
}
else
{
jgScrapCancel
.
setInstanceStatus
(
role
);
}
if
(
"0"
.
equals
(
operate
))
{
// 通过操作
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
getMessage
(
taskName
).
getPass
());
}
else
{
// 驳回操作
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
getMessage
(
taskName
).
getReject
());
jgScrapCancel
.
setPromoter
(
null
);
}
}
else
{
LambdaQueryWrapper
<
JgScrapCancelEq
>
lambdaEq
=
new
QueryWrapper
<
JgScrapCancelEq
>().
lambda
();
lambdaEq
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
sequenceNbr
);
JgScrapCancelEq
jgScrapCancelEq
=
jgScrapCancelEqMapper
.
selectOne
(
lambdaEq
);
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
useRegistrationCode
(
idxBizJgOtherInfoMapper
.
getSupervisoryCodeByEquipmentCode
(
jgScrapCancelEq
.
getEquId
()));
String
newUseRegistrationCertificateNumber
=
responseModel
.
getResult
().
split
(
"-"
)[
0
];
Map
<
String
,
Map
<
String
,
Object
>>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
map1
.
put
(
"USE_ORG_CODE"
,
newUseRegistrationCertificateNumber
);
if
(
CancelTypeEnum
.
SCRAPPED
.
getCode
().
equals
(
jgScrapCancel
.
getCancelType
()))
{
IdxBizJgUseInfo
idxBizJgUseInfo
=
new
IdxBizJgUseInfo
();
idxBizJgUseInfo
.
setEquState
(
String
.
valueOf
(
EquimentEnum
.
BAOFEI
.
getCode
()));
LambdaQueryWrapper
<
IdxBizJgUseInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgScrapCancelEq
.
getEquId
());
idxBizJgUseInfoMapper
.
update
(
idxBizJgUseInfo
,
wrapper
);
map1
.
put
(
"EQU_STATE"
,
String
.
valueOf
(
EquimentEnum
.
BAOFEI
.
getCode
()));
}
else
{
SuperviseInfo
superviseInfo
=
new
SuperviseInfo
();
superviseInfo
.
setOrgBranchCode
(
""
);
superviseInfo
.
setOrgBranchName
(
""
);
LambdaQueryWrapper
<
SuperviseInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
SuperviseInfo:
:
getRecord
,
jgScrapCancelEq
.
getEquId
());
superviseInfoMapper
.
update
(
superviseInfo
,
wrapper
);
map1
.
put
(
"ORG_BRANCH_CODE"
,
""
);
map1
.
put
(
"ORG_BRANCH_NAME"
,
""
);
}
resultMap
.
put
(
jgScrapCancelEq
.
getEquId
(),
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
COMPLETE
.
getName
());
jgScrapCancel
.
setAuditPassDate
(
new
Date
());
}
this
.
getBaseMapper
().
updateById
(
jgScrapCancel
);
}
}
\ 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/JgTransferNoticeServiceImpl.java
View file @
5d613664
...
...
@@ -296,7 +296,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
// 发起流程
if
(!
StringUtils
.
hasText
(
noticeDto
.
getInstanceId
()))
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"transferNotification"
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
"1"
);
try
{
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
...
...
@@ -343,7 +343,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
public
Page
<
JgTransferNoticeDto
>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
;
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
model
.
setReceiveOrgCode
(
orgCode
);
Page
<
JgTransferNotice
>
noticePage
=
jgTransferNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
// 将Page<JgTransferNotice>转化为Page<JgTransferNoticeDto>
...
...
@@ -463,10 +463,12 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setStatus
(
taskName
[
0
]);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setStatus
(
taskName
[
0
]);
}
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/feign/TzsServiceFeignClient.java
0 → 100644
View file @
5d613664
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
feign
;
import
com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Map
;
@FeignClient
(
name
=
"TZS-YMT"
,
path
=
"/ymt"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
TzsServiceFeignClient
{
/**
* 创建监管码及96333
*
* @param map 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/createSupervisorCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
createCode
(
@RequestBody
Map
<
String
,
Object
>
map
);
/**
* 创建监管码及96333
*
* @param paramMap 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/commonUpdateEsData"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
commonUpdateEsDataByIds
(
@RequestBody
Map
<
String
,
Map
<
String
,
Object
>>
paramMap
);
/**
* 申请单编号生成
* @param type 参考ApplicationFormTypeEnum中的枚举
* @param batchSize batchSize
* @return List
*/
@RequestMapping
(
value
=
"/generate-code/applicationFormCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
applicationFormCode
(
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"batchSize"
)
int
batchSize
);
/**
* 生成设备注册编码
* @param key 16位
* @return 生成设备注册编码(20位)
*/
@RequestMapping
(
value
=
"/generate-code/deviceRegistrationCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
String
>
deviceRegistrationCode
(
@RequestParam
(
"key"
)
String
key
);
/**
* 使用登记证生成
* @param key 起11陕C
* @return 生成使用登记证编号(13位,起11陕C00001(23))
*/
@RequestMapping
(
value
=
"/generate-code/useRegistrationCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
String
>
useRegistrationCode
(
@RequestParam
(
"key"
)
String
key
);
}
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/JyjcOpeningApplicationServiceImpl.java
View file @
5d613664
...
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstD
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.WorkflowFeignClient
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
...
...
@@ -48,6 +49,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
java.util.*
;
...
...
@@ -69,6 +71,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Autowired
private
ICreateCodeService
createCodeService
;
@Autowired
private
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
JyjcOpeningApplicationMapper
jyjcOpeningApplicationMapper
;
@Resource
(
type
=
JyjcBaseMapper
.
class
)
...
...
@@ -141,6 +145,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
ResponseModel
<
Map
<
String
,
Object
>>
result
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
List
<
String
>
codes
=
createCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
model
.
setApplicationSeq
(
codes
.
get
(
0
));
model
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
...
...
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