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
7295faea
Commit
7295faea
authored
Dec 20, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
37a32ecc
0c3cf18b
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
553 additions
and
211 deletions
+553
-211
JgMaintenanceContractDto.java
...amos/boot/module/jg/api/dto/JgMaintenanceContractDto.java
+23
-3
JgReformNoticeDto.java
...eejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
+2
-0
JgMaintenanceContract.java
...amos/boot/module/jg/api/entity/JgMaintenanceContract.java
+28
-6
MaintenanceEnum.java
...eejoin/amos/boot/module/jg/api/enums/MaintenanceEnum.java
+2
-1
JgMaintenanceContractEqMapper.java
...t/module/jg/api/mapper/JgMaintenanceContractEqMapper.java
+5
-0
JgMaintenanceContractMapper.java
...oot/module/jg/api/mapper/JgMaintenanceContractMapper.java
+2
-0
JgMaintenanceContractVo.java
...n/amos/boot/module/jg/api/vo/JgMaintenanceContractVo.java
+38
-3
JgMaintenanceContractEqMapper.xml
...c/main/resources/mapper/JgMaintenanceContractEqMapper.xml
+8
-0
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+18
-9
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+21
-2
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+2
-2
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+5
-2
JgMaintenanceContractController.java
...le/jg/biz/controller/JgMaintenanceContractController.java
+36
-40
JgMaintenanceContractEqController.java
.../jg/biz/controller/JgMaintenanceContractEqController.java
+1
-1
JgReformByWorkFlowController.java
...odule/jg/biz/controller/JgReformByWorkFlowController.java
+2
-2
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+2
-2
JgMaintenanceContractEqServiceImpl.java
.../biz/service/impl/JgMaintenanceContractEqServiceImpl.java
+1
-1
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+310
-104
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+17
-26
DocumentEnum.java
...yeejoin/amos/boot/module/jyjc/api/enums/DocumentEnum.java
+17
-2
JyjcInspectionApplicationModel.java
...module/jyjc/api/model/JyjcInspectionApplicationModel.java
+3
-0
JyjcInspectionResultModel.java
...boot/module/jyjc/api/model/JyjcInspectionResultModel.java
+0
-2
JyjcInspectionApplicationMapper.xml
...main/resources/mapper/JyjcInspectionApplicationMapper.xml
+2
-1
BizCustomDateSerializer.java
.../boot/module/jyjc/biz/config/BizCustomDateSerializer.java
+1
-1
JyjcInspectionApplicationServiceImpl.java
...iz/service/impl/JyjcInspectionApplicationServiceImpl.java
+3
-1
JyjcInspectionResultServiceImpl.java
...yjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
+4
-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/JgMaintenanceContractDto.java
View file @
7295faea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -7,6 +8,7 @@ import lombok.Data;
...
@@ -7,6 +8,7 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @author system_generator
* @author system_generator
...
@@ -60,6 +62,13 @@ public class JgMaintenanceContractDto extends BaseDto {
...
@@ -60,6 +62,13 @@ public class JgMaintenanceContractDto extends BaseDto {
@ApiModelProperty
(
value
=
"维保合同结束日期"
)
@ApiModelProperty
(
value
=
"维保合同结束日期"
)
private
Date
informEnd
;
private
Date
informEnd
;
@ApiModelProperty
(
value
=
"管理员id"
)
private
String
maintenanceManagerId
;
@ApiModelProperty
(
value
=
"管理员姓名"
)
private
String
maintenanceManagerName
;
@ApiModelProperty
(
value
=
"维保负责人一id"
)
@ApiModelProperty
(
value
=
"维保负责人一id"
)
private
String
maintenanceManagerOneId
;
private
String
maintenanceManagerOneId
;
...
@@ -73,9 +82,6 @@ public class JgMaintenanceContractDto extends BaseDto {
...
@@ -73,9 +82,6 @@ public class JgMaintenanceContractDto extends BaseDto {
@ApiModelProperty
(
value
=
"24小时维保电话"
)
@ApiModelProperty
(
value
=
"24小时维保电话"
)
private
String
maintenance24Tel
;
private
String
maintenance24Tel
;
@ApiModelProperty
(
value
=
"办理流程"
)
private
String
applyFlow
;
@ApiModelProperty
(
value
=
"备注"
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
private
String
remark
;
...
@@ -101,4 +107,18 @@ public class JgMaintenanceContractDto extends BaseDto {
...
@@ -101,4 +107,18 @@ public class JgMaintenanceContractDto extends BaseDto {
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
private
Date
createDate
;
@TableField
(
"instance_status"
)
private
String
instanceStatus
;
@TableField
(
"next_execute_ids"
)
private
String
nextExecuteIds
;
@TableField
(
"promoter"
)
private
String
promoter
;
@TableField
(
"status"
)
private
String
status
;
private
List
<
String
>
roleIds
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgReformNoticeDto.java
View file @
7295faea
...
@@ -179,4 +179,6 @@ public class JgReformNoticeDto extends BaseDto {
...
@@ -179,4 +179,6 @@ public class JgReformNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)"
)
@ApiModelProperty
(
value
=
"设备使用地点-街道(镇)"
)
private
String
streetName
;
private
String
streetName
;
private
String
receiveOrgCreditCode
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgMaintenanceContract.java
View file @
7295faea
...
@@ -101,6 +101,19 @@ public class JgMaintenanceContract extends BaseEntity {
...
@@ -101,6 +101,19 @@ public class JgMaintenanceContract extends BaseEntity {
private
Date
informEnd
;
private
Date
informEnd
;
/**
/**
* 管理员id
*/
@TableField
(
"maintenance_manager_id"
)
private
String
maintenanceManagerId
;
/**
* 管理员id
*/
@TableField
(
"maintenance_manager_name"
)
private
String
maintenanceManagerName
;
/**
* 维保负责人一id
* 维保负责人一id
*/
*/
@TableField
(
"maintenance_manager_one_id"
)
@TableField
(
"maintenance_manager_one_id"
)
...
@@ -126,12 +139,6 @@ public class JgMaintenanceContract extends BaseEntity {
...
@@ -126,12 +139,6 @@ public class JgMaintenanceContract extends BaseEntity {
private
String
maintenance24Tel
;
private
String
maintenance24Tel
;
/**
/**
* 办理流程
*/
@TableField
(
"apply_flow"
)
private
String
applyFlow
;
/**
* 备注
* 备注
*/
*/
@TableField
(
"remark"
)
@TableField
(
"remark"
)
...
@@ -180,4 +187,19 @@ public class JgMaintenanceContract extends BaseEntity {
...
@@ -180,4 +187,19 @@ public class JgMaintenanceContract extends BaseEntity {
@TableField
(
"create_date"
)
@TableField
(
"create_date"
)
private
Date
createDate
;
private
Date
createDate
;
@TableField
(
"instance_status"
)
private
String
instanceStatus
;
@TableField
(
"next_execute_ids"
)
private
String
nextExecuteIds
;
@TableField
(
"promoter"
)
private
String
promoter
;
/**
* 状态
*/
@TableField
(
"status"
)
private
String
status
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/MaintenanceEnum.java
View file @
7295faea
...
@@ -8,7 +8,8 @@ import io.swagger.models.auth.In;
...
@@ -8,7 +8,8 @@ import io.swagger.models.auth.In;
public
enum
MaintenanceEnum
{
public
enum
MaintenanceEnum
{
SHIYONG
(
0
,
"使用单位"
),
SHIYONG
(
0
,
"使用单位"
),
WEIBAO
(
1
,
"维保单位"
),
WEIBAO
(
1
,
"维保单位"
),
JIANGUAN
(
2
,
"监管单位"
);
JIANGUAN
(
2
,
"监管单位"
),
OVER
(
3
,
"维保结束"
);
private
Integer
code
;
private
Integer
code
;
private
String
msg
;
private
String
msg
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgMaintenanceContractEqMapper.java
View file @
7295faea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
/**
* Mapper 接口
* Mapper 接口
...
@@ -10,4 +13,6 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq;
...
@@ -10,4 +13,6 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq;
*/
*/
public
interface
JgMaintenanceContractEqMapper
extends
CustomBaseMapper
<
JgMaintenanceContractEq
>
{
public
interface
JgMaintenanceContractEqMapper
extends
CustomBaseMapper
<
JgMaintenanceContractEq
>
{
Boolean
deleteForBatch
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgMaintenanceContractMapper.java
View file @
7295faea
...
@@ -24,4 +24,6 @@ public interface JgMaintenanceContractMapper extends BaseMapper<JgMaintenanceCon
...
@@ -24,4 +24,6 @@ public interface JgMaintenanceContractMapper extends BaseMapper<JgMaintenanceCon
Boolean
deleteForBatch
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
Boolean
deleteForBatch
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
void
updatePromoter
(
@Param
(
"id"
)
Long
id
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/vo/JgMaintenanceContractVo.java
View file @
7295faea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
vo
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
vo
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -20,6 +22,9 @@ public class JgMaintenanceContractVo {
...
@@ -20,6 +22,9 @@ public class JgMaintenanceContractVo {
@TableField
(
"维保单位-驳回-是否可操作"
)
@TableField
(
"维保单位-驳回-是否可操作"
)
private
Boolean
rejectedIsFlag
;
private
Boolean
rejectedIsFlag
;
@TableField
(
"使用:0,维保:1,监管:2"
)
private
String
phase
;
@TableField
(
"维保备案编号"
)
@TableField
(
"维保备案编号"
)
private
String
applyNo
;
private
String
applyNo
;
...
@@ -83,9 +88,6 @@ public class JgMaintenanceContractVo {
...
@@ -83,9 +88,6 @@ public class JgMaintenanceContractVo {
@TableField
(
"24小时维保电话"
)
@TableField
(
"24小时维保电话"
)
private
String
maintenance24Tel
;
private
String
maintenance24Tel
;
@TableField
(
"办理流程"
)
private
String
applyFlow
;
@TableField
(
"备注"
)
@TableField
(
"备注"
)
private
String
remark
;
private
String
remark
;
...
@@ -110,4 +112,37 @@ public class JgMaintenanceContractVo {
...
@@ -110,4 +112,37 @@ public class JgMaintenanceContractVo {
@TableField
(
"创建时间"
)
@TableField
(
"创建时间"
)
private
Date
createDate
;
private
Date
createDate
;
@TableField
(
"管理员id"
)
private
String
maintenanceManagerId
;
@ApiModelProperty
(
value
=
"管理员姓名"
)
private
String
maintenanceManagerName
;
@ApiModelProperty
(
value
=
"主键ID"
)
protected
Long
sequenceNbr
;
@ApiModelProperty
(
value
=
"更新时间"
)
protected
Date
recDate
;
@ApiModelProperty
(
value
=
"更新人id"
)
protected
String
recUserId
;
@ApiModelProperty
(
value
=
"更新人"
)
protected
String
recUserName
;
@ApiModelProperty
(
value
=
"是否删除"
)
private
Boolean
isDelete
=
false
;
@ApiModelProperty
(
"instance_status"
)
private
String
instanceStatus
;
@ApiModelProperty
(
"next_execute_ids"
)
private
String
nextExecuteIds
;
@ApiModelProperty
(
"promoter"
)
private
String
promoter
;
@ApiModelProperty
(
"status"
)
private
String
status
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractEqMapper.xml
View file @
7295faea
...
@@ -2,4 +2,12 @@
...
@@ -2,4 +2,12 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper"
>
<delete
id=
"deleteForBatch"
>
UPDATE amos_tzs_biz.tzs_jg_maintenance_contract_eq tjmce
set tjmce.is_delete = 1
WHERE tjmce.sequence_nbr in
<foreach
collection=
"ids"
separator=
","
item=
"id"
open=
"("
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractMapper.xml
View file @
7295faea
...
@@ -40,6 +40,9 @@
...
@@ -40,6 +40,9 @@
<if
test=
"dto.informEnd != null"
>
<if
test=
"dto.informEnd != null"
>
inform_end = #{dto.informEnd},
inform_end = #{dto.informEnd},
</if>
</if>
<if
test=
"dto.maintenanceManagerId != null"
>
maintenance_manager_id = #{dto.maintenanceManagerId},
</if>
<if
test=
"dto.maintenanceManagerOneId != null"
>
<if
test=
"dto.maintenanceManagerOneId != null"
>
maintenance_manager_one_id = #{dto.maintenanceManagerOneId},
maintenance_manager_one_id = #{dto.maintenanceManagerOneId},
</if>
</if>
...
@@ -52,9 +55,6 @@
...
@@ -52,9 +55,6 @@
<if
test=
"dto.maintenance24Tel != null"
>
<if
test=
"dto.maintenance24Tel != null"
>
maintenance_24_tel = #{dto.maintenance24Tel},
maintenance_24_tel = #{dto.maintenance24Tel},
</if>
</if>
<if
test=
"dto.applyFlow != null"
>
apply_flow = #{dto.applyFlow},
</if>
<if
test=
"dto.remark != null"
>
<if
test=
"dto.remark != null"
>
remark = #{dto.remark},
remark = #{dto.remark},
</if>
</if>
...
@@ -79,12 +79,19 @@
...
@@ -79,12 +79,19 @@
<if
test=
"dto.instanceId != null"
>
<if
test=
"dto.instanceId != null"
>
instance_id = #{dto.instanceId},
instance_id = #{dto.instanceId},
</if>
</if>
<if
test=
"dto.promoter != null"
>
promoter = #{dto.promoter}
</if>
</set>
</set>
WHERE sequence_nbr = #{dto.sequenceNbr}
WHERE sequence_nbr = #{dto.sequenceNbr}
</update>
</update>
<update
id=
"updatePromoter"
>
UPDATE amos_tzs_biz.tzs_jg_maintenance_contract set promoter = null
where sequence_nbr = #{id}
</update>
<delete
id=
"deleteForBatch"
>
<delete
id=
"deleteForBatch"
>
delete from amos_tzs_biz.tzs_jg_maintenance_contract tjmc
UPDATE amos_tzs_biz.tzs_jg_maintenance_contract tjmc
set tjmc.is_delete = 1
WHERE tjmc.sequence_nbr in
WHERE tjmc.sequence_nbr in
<foreach
collection=
"ids"
separator=
","
item=
"id"
open=
"("
close=
")"
>
<foreach
collection=
"ids"
separator=
","
item=
"id"
open=
"("
close=
")"
>
#{id}
#{id}
...
@@ -110,7 +117,6 @@
...
@@ -110,7 +117,6 @@
maintenance_manager_two_id,
maintenance_manager_two_id,
emergency_call,
emergency_call,
maintenance_24_tel,
maintenance_24_tel,
apply_flow,
remark,
remark,
is_delete,
is_delete,
input_unit_no,
input_unit_no,
...
@@ -126,6 +132,7 @@
...
@@ -126,6 +132,7 @@
FROM
FROM
amos_tzs_biz.tzs_jg_maintenance_contract
amos_tzs_biz.tzs_jg_maintenance_contract
<where>
<where>
is_delete = 0
<if
test=
"contractDto.applyNo != '' and contractDto.applyNo != null"
>
<if
test=
"contractDto.applyNo != '' and contractDto.applyNo != null"
>
and apply_no like concat('%',#{contractDto.applyNo},'%')
and apply_no like concat('%',#{contractDto.applyNo},'%')
</if>
</if>
...
@@ -138,9 +145,6 @@
...
@@ -138,9 +145,6 @@
<if
test=
"contractDto.applyStatus != '' and contractDto.applyStatus != null"
>
<if
test=
"contractDto.applyStatus != '' and contractDto.applyStatus != null"
>
and apply_status like concat('%',#{contractDto.applyStatus},'%')
and apply_status like concat('%',#{contractDto.applyStatus},'%')
</if>
</if>
<if
test=
"contractDto.applyFlow != '' and contractDto.applyFlow != null"
>
and apply_flow like concat('%',#{contractDto.applyFlow},'%')
</if>
<if
test=
"contractDto.useUnitCode != '' and contractDto.useUnitCode != null"
>
<if
test=
"contractDto.useUnitCode != '' and contractDto.useUnitCode != null"
>
and use_unit_code = #{contractDto.useUnitCode}
and use_unit_code = #{contractDto.useUnitCode}
</if>
</if>
...
@@ -150,6 +154,11 @@
...
@@ -150,6 +154,11 @@
<if
test=
"contractDto.receiveOrgCode != '' and contractDto.receiveOrgCode != null"
>
<if
test=
"contractDto.receiveOrgCode != '' and contractDto.receiveOrgCode != null"
>
and receive_org_code = #{contractDto.receiveOrgCode}
and receive_org_code = #{contractDto.receiveOrgCode}
</if>
</if>
<if
test=
"contractDto.roleIds != null"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
instance_status like concat('%',#{role},'%')
</foreach>
</if>
</where>
</where>
</select>
</select>
<select
id=
"queryBySequenceNbr"
<select
id=
"queryBySequenceNbr"
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
7295faea
...
@@ -13,9 +13,17 @@
...
@@ -13,9 +13,17 @@
isn.notice_status AS noticeStatus,
isn.notice_status AS noticeStatus,
isn.install_unit_name AS installUnitName,
isn.install_unit_name AS installUnitName,
isn.province_name AS provinceName,
isn.province_name AS provinceName,
isn.province,
isn.city,
isn.county,
isn.city_name AS cityName,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.county_name AS countyName,
isn.instance_id AS instanceId
isn.street_name AS streetName,
isn.street,
isn.instance_id AS instanceId,
isn.plan_date AS planDate,
isn.receive_company_code AS receiveCompanyCode,
isn.receive_org_name AS receiveOrgName
FROM
FROM
tzs_jg_reform_notice isn
tzs_jg_reform_notice isn
<where>
<where>
...
@@ -38,7 +46,9 @@
...
@@ -38,7 +46,9 @@
</if>
</if>
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )
AND isn.notice_status in ('6612', '6613', '6614')
AND isn.receive_org_credit_code = #{orgCode}
<!-- AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )-->
</if>
</if>
<if
test=
"orgCode != null and orgCode != ''"
>
<if
test=
"orgCode != null and orgCode != ''"
>
AND isn.install_unit_credit_code = #{orgCode}
AND isn.install_unit_credit_code = #{orgCode}
...
@@ -56,8 +66,17 @@
...
@@ -56,8 +66,17 @@
isn.province_name AS provinceName,
isn.province_name AS provinceName,
isn.city_name AS cityName,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.county_name AS countyName,
isn.province,
isn.city,
isn.county,
isn.street_name AS streetName,
isn.street,
isn.address AS address,
isn.address AS address,
isn.use_unit_name AS useUnitName,
isn.use_unit_name AS useUnitName,
isn.receive_company_code AS receiveCompanyCode,
isn.receive_org_name AS receiveOrgName,
isn.receive_org_code AS receiveOrgCode,
ri.equ_code AS equRegisterCode,
ri.equ_list AS equList,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.EQU_DEFINE AS equDefine,
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
7295faea
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
ur.instance_id as instanceId,
ur.instance_id as instanceId,
re.equ_id as equipId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.apply_no as applyNo,
ur.next_execute_ids
as nextExecuteIds,
ifnull(ur.next_execute_ids,'')
as nextExecuteIds,
ur.promoter
ur.promoter
from tzs_jg_use_registration ur
from tzs_jg_use_registration ur
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<if
test=
"dto.useUnitName != null and dto.useUnitName != ''"
>
<if
test=
"dto.useUnitName != null and dto.useUnitName != ''"
>
and ur.use_unit_name like concat('%',#{dto.useUnitName},'%')
and ur.use_unit_name like concat('%',#{dto.useUnitName},'%')
</if>
</if>
<if
test=
"roleIds != null"
>
<if
test=
"roleIds != null
and dto.dataType == 'jg'
"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
instance_status like concat('%',#{role},'%')
instance_status like concat('%',#{role},'%')
</foreach>
</foreach>
...
...
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 @
7295faea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
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.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -117,7 +119,8 @@ public class CommonController extends BaseController {
...
@@ -117,7 +119,8 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getEnterpriseEmployee"
)
@GetMapping
(
value
=
"/getEnterpriseEmployee"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业的下面的人员"
,
notes
=
"查询企业的下面的人员"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业的下面的人员"
,
notes
=
"查询企业的下面的人员"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getEnterpriseEmployee
(
@RequestParam
(
value
=
"unitCode"
)
String
unitCode
)
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getEnterpriseEmployee
(
@RequestParam
String
unitCode
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getEnterpriseEmployee
(
unitCode
));
String
companyCode
=
unitCode
.
split
(
"_"
)[
0
];
return
ResponseHelper
.
buildResponse
(
commonService
.
getEnterpriseEmployee
(
companyCode
));
}
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintenanceContractController.java
View file @
7295faea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
...
@@ -16,8 +18,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
...
@@ -16,8 +18,7 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
import
java.util.*
;
import
java.util.Map
;
/**
/**
* 维保合同备案
* 维保合同备案
...
@@ -55,9 +56,11 @@ public class JgMaintenanceContractController extends BaseController {
...
@@ -55,9 +56,11 @@ public class JgMaintenanceContractController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/updateMaintenanceAndEquipment"
)
@PostMapping
(
value
=
"/updateMaintenanceAndEquipment"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新维保合同和设备对应关系"
,
notes
=
"更新维保合同和设备对应关系"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新维保合同和设备对应关系"
,
notes
=
"更新维保合同和设备对应关系"
)
public
ResponseModel
<
Object
>
updateMaintenanceAndEquipment
(
@RequestBody
JgMaintenanceContractDto
model
,
public
ResponseModel
<
Object
>
updateMaintenanceAndEquipment
(
@RequestBody
Map
<
String
,
Object
>
model
,
List
<
Integer
>
equipmentLists
)
{
@RequestParam
(
value
=
"submit"
,
required
=
false
,
defaultValue
=
"0"
)
String
submit
)
{
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
updateMaintenanceAndEquipment
(
model
,
equipmentLists
));
JgMaintenanceContractDto
dto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
model
),
JgMaintenanceContractDto
.
class
);
List
<
Map
<
String
,
Object
>>
list
=
(
List
<
Map
<
String
,
Object
>>)
model
.
get
(
"equipmentLists"
);
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
updateMaintenanceAndEquipment
(
submit
,
dto
,
list
));
}
}
/**
/**
...
@@ -68,43 +71,40 @@ public class JgMaintenanceContractController extends BaseController {
...
@@ -68,43 +71,40 @@ public class JgMaintenanceContractController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/submit"
)
@PostMapping
(
value
=
"/submit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"维保合同提交"
,
notes
=
"维保合同提交"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"维保合同提交"
,
notes
=
"维保合同提交"
)
public
ResponseModel
<
Object
>
submit
(
@RequestBody
JgMaintenanceContractDto
model
)
{
public
ResponseModel
<
Object
>
submit
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
submit
(
model
));
JgMaintenanceContractDto
dto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
model
),
JgMaintenanceContractDto
.
class
);
String
comment
=
String
.
valueOf
(
model
.
get
(
"comment"
));
String
operate
=
String
.
valueOf
(
model
.
get
(
"operate"
));
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
submit
(
dto
,
comment
,
operate
));
}
}
/**
/**
* 撤回
* 审批
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/revocation"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"维保合同撤回"
,
notes
=
"维保合同撤回"
)
public
ResponseModel
<
Object
>
revocation
(
@RequestBody
JgMaintenanceContractDto
model
)
{
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
revocation
(
model
));
}
/**
* 维保合同驳回
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/rejected"
)
@PostMapping
(
value
=
"/approval"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"维保合同驳回"
,
notes
=
"维保合同驳回"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"审批"
,
notes
=
"审批"
)
public
ResponseModel
<
Object
>
rejected
(
@RequestBody
JgMaintenanceContractDto
model
)
{
public
ResponseModel
<
Object
>
approval
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
rejected
(
model
));
JgMaintenanceContractDto
dto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
model
.
get
(
"formData"
)),
JgMaintenanceContractDto
.
class
);
String
comment
=
String
.
valueOf
(
model
.
get
(
"comment"
));
String
operate
=
String
.
valueOf
(
model
.
get
(
"operate"
));
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
approval
(
dto
,
comment
,
operate
));
}
}
/**
/**
*
维保合同受理
*
撤回
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/accepted"
)
@PostMapping
(
value
=
"/revocation"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"维保合同受理"
,
notes
=
"维保合同受理"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"维保合同撤回"
,
notes
=
"维保合同撤回"
)
public
ResponseModel
<
Object
>
accepted
(
@RequestBody
JgMaintenanceContractDto
model
)
{
public
ResponseModel
<
Object
>
revocation
(
@RequestBody
JSONObject
map
)
{
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
accepted
(
model
));
jgMaintenanceContractServiceImpl
.
revocation
(
String
.
valueOf
(
map
.
get
(
"instanceId"
)));
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
/**
/**
...
@@ -163,6 +163,14 @@ public class JgMaintenanceContractController extends BaseController {
...
@@ -163,6 +163,14 @@ public class JgMaintenanceContractController extends BaseController {
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
queryBySequenceNbr
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
queryBySequenceNbr
(
sequenceNbr
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/flowExecute"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"执行流程"
,
notes
=
"执行流程"
)
public
ResponseModel
<
Object
>
flowExecute
(
@RequestBody
JSONObject
map
)
{
jgMaintenanceContractServiceImpl
.
flowExecute
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))),
String
.
valueOf
(
map
.
get
(
"instanceId"
)),
String
.
valueOf
(
map
.
get
(
"operate"
)),
String
.
valueOf
(
map
.
get
(
"comment"
)),
true
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
...
@@ -185,16 +193,4 @@ public class JgMaintenanceContractController extends BaseController {
...
@@ -185,16 +193,4 @@ public class JgMaintenanceContractController extends BaseController {
return
ResponseHelper
.
buildResponse
(
contractDtoPage
);
return
ResponseHelper
.
buildResponse
(
contractDtoPage
);
}
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询维保合同备案"
,
notes
=
"列表全部数据查询维保合同备案"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
JgMaintenanceContractDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
jgMaintenanceContractServiceImpl
.
queryForJgMaintenanceContractList
());
}
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgMaintenanceContractEqController.java
View file @
7295faea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractEqDto
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -13,7 +14,6 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -13,7 +14,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractEqDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgReformByWorkFlowController.java
View file @
7295faea
...
@@ -58,7 +58,7 @@ public class JgReformByWorkFlowController {
...
@@ -58,7 +58,7 @@ public class JgReformByWorkFlowController {
@PostMapping
(
value
=
"/cancel"
)
@PostMapping
(
value
=
"/cancel"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知撤销"
,
notes
=
"改造告知撤销"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"改造告知撤销"
,
notes
=
"改造告知撤销"
)
public
ResponseModel
<
JgReformNoticeDto
>
cancel
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
public
ResponseModel
<
JgReformNoticeDto
>
cancel
(
@RequestBody
Map
<
String
,
Object
>
model
)
{
JgReformNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"reform
NoticeAdd
"
)),
JgReformNoticeDto
.
class
,
true
);
JgReformNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"reform
Info
"
)),
JgReformNoticeDto
.
class
,
true
);
if
(
Objects
.
isNull
(
installationInfo
))
{
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数reformInfo不能为空"
);
throw
new
IllegalArgumentException
(
"参数reformInfo不能为空"
);
}
}
...
@@ -77,7 +77,7 @@ public class JgReformByWorkFlowController {
...
@@ -77,7 +77,7 @@ public class JgReformByWorkFlowController {
public
ResponseModel
<
JgReformNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
public
ResponseModel
<
JgReformNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
// TODO 受理改造告知流程
// TODO 受理改造告知流程
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
model1
.
get
(
"reform
NoticeAdd
"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
model1
.
get
(
"reform
Info
"
);
JgReformNoticeDto
JgReformNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgReformNoticeDto
.
class
);
JgReformNoticeDto
JgReformNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgReformNoticeDto
.
class
);
jgReformNoticeService
.
accept
(
JgReformNoticeDto
,
op
);
jgReformNoticeService
.
accept
(
JgReformNoticeDto
,
op
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
7295faea
...
@@ -163,7 +163,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -163,7 +163,7 @@ public class CommonServiceImpl implements ICommonService {
if
(
type
.
equals
(
"use"
))
{
if
(
type
.
equals
(
"use"
))
{
type
=
"使用单位"
;
type
=
"使用单位"
;
}
else
if
(
type
.
equals
(
"maintenance"
))
{
}
else
if
(
type
.
equals
(
"maintenance"
))
{
type
=
"
维保
单位"
;
type
=
"
安装改造维修
单位"
;
}
else
if
(
type
.
equals
(
"inspection"
))
{
}
else
if
(
type
.
equals
(
"inspection"
))
{
type
=
"检验检测机构"
;
type
=
"检验检测机构"
;
}
}
...
@@ -190,7 +190,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -190,7 +190,7 @@ public class CommonServiceImpl implements ICommonService {
@Override
@Override
public
Map
<
String
,
Object
>
getUserInfo
(
String
sequenceNbr
)
{
public
Map
<
String
,
Object
>
getUserInfo
(
String
sequenceNbr
)
{
return
commonMapper
.
getUserInfo
(
sequenceNbr
);
return
commonMapper
.
getUserInfo
(
sequenceNbr
.
split
(
"_"
)[
0
]
);
}
}
@Override
@Override
...
...
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/JgMaintenanceContractEqServiceImpl.java
View file @
7295faea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractEqDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintenanceContractEqService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintenanceContractEqService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractEqDto
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
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/JgMaintenanceContractServiceImpl.java
View file @
7295faea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.MaintenanceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.MaintenanceEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.UseStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintenanceContractMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintenanceContractService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintenanceContractService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.JgMaintenanceContractVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.JgMaintenanceContractVo
;
...
@@ -30,6 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -30,6 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.*
;
import
java.util.*
;
...
@@ -57,43 +65,36 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -57,43 +65,36 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
@Autowired
@Autowired
private
JgMaintenanceContractMapper
maintenanceContractMapper
;
private
JgMaintenanceContractMapper
maintenanceContractMapper
;
@Autowired
@Autowired
private
JgMaintenanceContractEqMapper
maintenanceContractEqMapper
;
@Autowired
private
JgMaintenanceContractEqServiceImpl
jgMaintenanceContractEqService
;
private
JgMaintenanceContractEqServiceImpl
jgMaintenanceContractEqService
;
@Autowired
@Autowired
private
DataDictionaryServiceImpl
iDataDictionaryService
;
private
DataDictionaryServiceImpl
iDataDictionaryService
;
@Autowired
/**
RedisUtils
redisUtils
;
* 监管-根据字典type,code获取字典值
*/
private
DataDictionary
getDict
(
String
dictType
,
String
dictCode
)
{
HashMap
<
String
,
String
>
dictMap
=
new
HashMap
<>();
LambdaQueryWrapper
<
DataDictionary
>
queryWrapper
=
new
LambdaQueryWrapper
<
DataDictionary
>()
.
eq
(
DataDictionary:
:
getType
,
dictType
)
.
eq
(
DataDictionary:
:
getCode
,
dictCode
);
return
iDataDictionaryService
.
getOne
(
queryWrapper
);
}
/**
/**
* 分页查询
* 分页查询
*/
*/
public
Page
<
JgMaintenanceContractVo
>
queryForPage
(
Page
<
JgMaintenanceContract
>
page
,
public
Page
<
JgMaintenanceContractVo
>
queryForPage
(
Page
<
JgMaintenanceContract
>
page
,
int
phase
,
JgMaintenanceContractDto
dto
,
ReginParams
reginParams
)
{
int
phase
,
JgMaintenanceContractDto
dto
,
ReginParams
reginParams
)
{
Page
<
JgMaintenanceContractDto
>
contractList
=
new
Page
<>();
Page
<
JgMaintenanceContractDto
>
contractList
=
new
Page
<>();
Page
<
JgMaintenanceContractVo
>
result
=
new
Page
<>();
Page
<
JgMaintenanceContractVo
>
result
=
new
Page
<>();
CompanyBo
company
=
reginParams
.
getCompany
();
CompanyBo
company
=
reginParams
.
getCompany
();
if
(
MaintenanceEnum
.
SHIYONG
.
getCode
().
equals
(
phase
))
{
if
(
MaintenanceEnum
.
SHIYONG
.
getCode
().
equals
(
phase
))
{
//使用单位用"使用单位统一信用代码"匹配数据
//使用单位用"使用单位统一信用代码"匹配数据
dto
.
setUseUnitCode
(
company
.
getCompanyCode
());
dto
.
setUseUnitCode
(
company
.
getCompanyCode
());
dto
.
set
ApplyFlow
(
MaintenanceEnum
.
SHIYONG
.
getMsg
()
);
dto
.
set
RoleIds
(
null
);
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
else
if
(
MaintenanceEnum
.
WEIBAO
.
getCode
().
equals
(
phase
))
{
}
else
if
(
MaintenanceEnum
.
WEIBAO
.
getCode
().
equals
(
phase
))
{
//维保单位用"维保单位统一信用代码"匹配数据
//维保单位用"维保单位统一信用代码"匹配数据
dto
.
setMaintenanceUnitCode
(
company
.
getCompanyCode
());
dto
.
setMaintenanceUnitCode
(
company
.
getCompanyCode
()+
"_"
+
company
.
getCompanyName
());
dto
.
setApplyFlow
(
MaintenanceEnum
.
WEIBAO
.
getMsg
());
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
else
if
(
MaintenanceEnum
.
JIANGUAN
.
getCode
().
equals
(
phase
))
{
}
else
if
(
MaintenanceEnum
.
JIANGUAN
.
getCode
().
equals
(
phase
))
{
//监管单位用"接收机构统一使用代码"匹配
//监管单位用"接收机构统一使用代码"匹配
dto
.
setReceiveOrgCode
(
company
.
getOrgCode
());
dto
.
setReceiveOrgCode
(
company
.
getOrgCode
());
dto
.
setApplyFlow
(
MaintenanceEnum
.
JIANGUAN
.
getMsg
());
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
contractList
=
maintenanceContractMapper
.
getContractList
(
page
,
dto
);
}
}
BeanUtils
.
copyProperties
(
contractList
,
result
);
BeanUtils
.
copyProperties
(
contractList
,
result
);
...
@@ -108,6 +109,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -108,6 +109,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
JgMaintenanceContractVo
vo
=
new
JgMaintenanceContractVo
();
JgMaintenanceContractVo
vo
=
new
JgMaintenanceContractVo
();
BeanUtils
.
copyProperties
(
dto
,
vo
);
BeanUtils
.
copyProperties
(
dto
,
vo
);
vo
.
setMaintenanceContract
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceContract
())
?
null
:
JSON
.
parseArray
(
dto
.
getMaintenanceContract
()));
vo
.
setMaintenanceContract
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceContract
())
?
null
:
JSON
.
parseArray
(
dto
.
getMaintenanceContract
()));
vo
.
setMaintenanceManagerOneName
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceManagerOneId
())
?
null
:
dto
.
getMaintenanceManagerOneId
().
split
(
"_"
)[
1
]);
vo
.
setMaintenanceManagerTwoName
(
ObjectUtils
.
isEmpty
(
dto
.
getMaintenanceManagerTwoId
())
?
null
:
dto
.
getMaintenanceManagerTwoId
().
split
(
"_"
)[
1
]);
return
vo
;
return
vo
;
}
}
...
@@ -121,28 +124,124 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -121,28 +124,124 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
return
maintenanceContractMapper
.
updateBySequenceNbr
(
dto
);
return
maintenanceContractMapper
.
updateBySequenceNbr
(
dto
);
}
}
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
,
taskName
,
role
,
rollBack
);
}
return
role
;
}
public
void
updateStatus
(
Long
id
,
String
taskName
,
String
role
,
Boolean
rollBack
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
LambdaQueryWrapper
<
JgMaintenanceContract
>
lambda
=
new
QueryWrapper
<
JgMaintenanceContract
>().
lambda
();
lambda
.
eq
(
JgMaintenanceContract:
:
getSequenceNbr
,
id
);
JgMaintenanceContract
jgMaintenanceContract
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
if
(
"流程结束"
.
equals
(
taskName
))
{
jgMaintenanceContract
.
setStatus
(
taskName
);
jgMaintenanceContract
.
setApplyStatus
(
"已完成"
);
}
else
{
jgMaintenanceContract
.
setNextExecuteIds
(
role
);
jgMaintenanceContract
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
if
(!
ObjectUtils
.
isEmpty
(
jgMaintenanceContract
.
getInstanceStatus
()))
{
jgMaintenanceContract
.
setInstanceStatus
(
jgMaintenanceContract
.
getInstanceStatus
()
+
","
+
role
);
}
else
{
jgMaintenanceContract
.
setInstanceStatus
(
role
);
}
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
jgMaintenanceContract
.
setStatus
(
message
.
getPass
());
}
if
(
rollBack
){
this
.
getBaseMapper
().
update
(
jgMaintenanceContract
,
lambda
);
this
.
getBaseMapper
().
updatePromoter
(
jgMaintenanceContract
.
getSequenceNbr
());
}
else
{
this
.
getBaseMapper
().
update
(
jgMaintenanceContract
,
lambda
);
}
}
/**
/**
* 批量删除
* 批量删除
*/
*/
@Transactional
public
Boolean
deleteForBatch
(
Long
[]
ids
)
{
public
Boolean
deleteForBatch
(
Long
[]
ids
)
{
return
maintenanceContractMapper
.
deleteForBatch
(
Arrays
.
asList
(
ids
));
List
<
Long
>
list
=
Arrays
.
asList
(
ids
);
list
.
forEach
(
x
->{
QueryWrapper
<
JgMaintenanceContract
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"sequence_nbr"
,
x
);
JgMaintenanceContract
jgMaintenanceContract
=
maintenanceContractMapper
.
selectOne
(
wrapper
);
LambdaQueryWrapper
<
JgMaintenanceContractEq
>
queryWrapper
=
new
LambdaQueryWrapper
<
JgMaintenanceContractEq
>()
.
eq
(
JgMaintenanceContractEq:
:
getEquipTransferId
,
jgMaintenanceContract
.
getApplyNo
())
.
eq
(
JgMaintenanceContractEq:
:
getIsDelete
,
false
);
List
<
Long
>
listSeq
=
jgMaintenanceContractEqService
.
list
(
queryWrapper
).
stream
()
.
map
(
JgMaintenanceContractEq:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
maintenanceContractEqMapper
.
deleteForBatch
(
listSeq
);
});
maintenanceContractMapper
.
deleteForBatch
(
list
);
return
true
;
}
public
String
startByVariable
()
{
String
instanceId
=
""
;
//启动流程
try
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
"maintenanceContract"
);
dto
.
setBusinessKey
(
"submit"
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
instanceId
=
((
Map
<?,
?>)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
instanceId
;
}
}
/**
/**
* 维保合同提交
* 维保合同提交
*/
*/
@Transactional
@Transactional
public
Boolean
submit
(
JgMaintenanceContractDto
dto
)
{
public
Boolean
submit
(
JgMaintenanceContractDto
dto
,
String
comment
,
String
operate
)
{
String
instanceId
=
""
;
String
instanceId
=
""
;
//启动流程
try
{
try
{
AjaxResult
ajaxResult
;
ActWorkflowStartDTO
flowDto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
flowDto
=
new
ActWorkflowStartDTO
();
flowDto
.
setProcessDefinitionKey
(
WB_PROCESS_DEFINITION_KEY
);
flowDto
.
setProcessDefinitionKey
(
WB_PROCESS_DEFINITION_KEY
);
flowDto
.
setBusinessKey
(
"1"
);
flowDto
.
setBusinessKey
(
"1"
);
HashMap
<
String
,
Object
>
dtoMap
=
new
HashMap
<>();
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
flowDto
);
dtoMap
.
put
(
"condition"
,
"ces"
);
flowDto
.
setVariables
(
dtoMap
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
flowDto
);
instanceId
=
((
Map
<?,
?>)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
instanceId
=
((
Map
<?,
?>)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
// 执行一步
// 执行一步
...
@@ -152,65 +251,110 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -152,65 +251,110 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
taskResultDTO
.
setTaskId
(
taskId
);
taskResultDTO
.
setTaskId
(
taskId
);
taskResultDTO
.
setComment
(
"提交流程"
);
taskResultDTO
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
"1"
);
map
.
put
(
"approvalStatus"
,
operate
);
taskResultDTO
.
setVariable
(
map
);
taskResultDTO
.
setVariable
(
map
);
//执行流程
//执行流程
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
String
[]
split
=
dto
.
getApplyFlow
().
split
(
"-"
);
String
lastFlowName
=
split
[
split
.
length
-
1
];
String
applyFlow
=
dto
.
getApplyFlow
()
+
"-"
+
MaintenanceEnum
.
getMsgByCode
(
Objects
.
requireNonNull
(
MaintenanceEnum
.
getEnumByMsg
(
lastFlowName
)).
getCode
()
+
1
);
dto
.
setApplyFlow
(
applyFlow
);
dto
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
dto
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
dto
.
setInstanceId
(
instanceId
);
dto
.
setInstanceId
(
instanceId
);
dto
.
setReceiveOrgCode
(
null
);
return
this
.
updateBySequenceNbr
(
dto
);
return
this
.
updateBySequenceNbr
(
dto
);
}
}
/**
* 维保合同撤回
*/
@Transactional
@Transactional
public
Boolean
revocation
(
JgMaintenanceContractDto
dto
)
{
public
Boolean
approval
(
JgMaintenanceContractDto
dto
,
String
comment
,
String
operate
)
{
String
[]
split
=
dto
.
getApplyFlow
().
split
(
"-"
);
String
instanceId
=
dto
.
getInstanceId
();
String
lastFlowName
=
split
[
split
.
length
-
1
];
try
{
String
applyFlow
=
dto
.
getApplyFlow
()
+
"-"
+
AjaxResult
ajaxResult
;
MaintenanceEnum
.
getMsgByCode
(
Objects
.
requireNonNull
(
MaintenanceEnum
.
getEnumByMsg
(
lastFlowName
)).
getCode
()
-
1
);
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
dto
.
setApplyFlow
(
applyFlow
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
dto
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
String
taskId
=
dataObject
.
getString
(
"id"
);
workFlowFeginService
.
rollBack
(
dto
.
getInstanceId
());
//组装信息
return
this
.
updateBySequenceNbr
(
dto
);
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
}
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
taskResultDTO
.
setTaskId
(
taskId
);
taskResultDTO
.
setComment
(
comment
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
operate
);
taskResultDTO
.
setVariable
(
map
);
//执行流程
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
/**
// if("tongguo"){
* 维保合同驳回
// if("weibao"){
*/
// dto.setApplyStatus(FlowStatusEnum.TO_BE_PROCESSED.getName());
@Transactional
// }else {
public
Boolean
rejected
(
JgMaintenanceContractDto
dto
)
{
// dto.setApplyStatus(FlowStatusEnum.TO_BE_PROCESSED.getName());
String
[]
split
=
dto
.
getApplyFlow
().
split
(
"-"
);
// }
String
lastFlowName
=
split
[
split
.
length
-
1
];
// }else {
String
applyFlow
=
dto
.
getApplyFlow
()
+
"-"
+
MaintenanceEnum
.
getMsgByCode
(
Objects
.
requireNonNull
(
MaintenanceEnum
.
getEnumByMsg
(
lastFlowName
)).
getCode
()
-
1
);
// if("weibao"){
dto
.
setApplyFlow
(
applyFlow
);
// dto.setApplyStatus(FlowStatusEnum.TO_BE_PROCESSED.getName());
dto
.
setApplyStatus
(
FlowStatusEnum
.
REJECTED
.
getName
());
// }else {
// dto.setApplyStatus(FlowStatusEnum.TO_BE_PROCESSED.getName());
// }
// }
if
(
"1"
.
equals
(
operate
)){
}
//审批通过
if
(
"0"
.
equals
(
operate
)){
}
dto
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
dto
.
setInstanceId
(
instanceId
);
dto
.
setReceiveOrgCode
(
null
);
return
this
.
updateBySequenceNbr
(
dto
);
return
this
.
updateBySequenceNbr
(
dto
);
}
}
/**
/**
* 维保合同
受理
* 维保合同
撤回
*/
*/
@Transactional
@Transactional
public
Boolean
accepted
(
JgMaintenanceContractDto
dto
)
{
public
void
revocation
(
String
instanceId
)
{
String
[]
split
=
dto
.
getApplyFlow
().
split
(
"-"
);
String
taskName
=
""
;
String
lastFlowName
=
split
[
split
.
length
-
1
];
JgMaintenanceContract
jgMaintenanceContract
=
new
JgMaintenanceContract
();
String
applyFlow
=
dto
.
getApplyFlow
()
+
"-"
+
MaintenanceEnum
.
getMsgByCode
(
Objects
.
requireNonNull
(
MaintenanceEnum
.
getEnumByMsg
(
lastFlowName
)).
getCode
()
+
1
);
LambdaQueryWrapper
<
JgMaintenanceContract
>
lambda
=
new
QueryWrapper
<
JgMaintenanceContract
>().
lambda
();
dto
.
setApplyFlow
(
applyFlow
);
lambda
.
eq
(
JgMaintenanceContract:
:
getInstanceId
,
instanceId
);
dto
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
return
this
.
updateBySequenceNbr
(
dto
);
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
))
{
UseStatusEnum
message
=
UseStatusEnum
.
getMessage
(
taskName
);
jgMaintenanceContract
.
setStatus
(
message
.
getPass
());
}
String
join
=
String
.
join
(
","
,
roleList
);
JgMaintenanceContract
jgMaintenanceContract1
=
this
.
getBaseMapper
().
selectOne
(
lambda
);
this
.
updateStatus
(
jgMaintenanceContract1
.
getSequenceNbr
(),
taskName
,
join
,
true
);
}
}
/**
/**
...
@@ -218,24 +362,49 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -218,24 +362,49 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
*/
*/
@Transactional
@Transactional
public
Boolean
saveOrSubmit
(
String
submit
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
public
Boolean
saveOrSubmit
(
String
submit
,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
// 判断当前是否为提交
String
instanceId
=
null
;
String
instanceId
=
null
;
JgMaintenanceContractDto
dto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgMaintenanceContractDto
.
class
);
List
<
Map
<
String
,
Object
>>
equipmentLists
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipmentLists"
);
CompanyBo
company
=
reginParams
.
getCompany
();
JgMaintenanceContract
contract
=
new
JgMaintenanceContract
();
BeanUtils
.
copyProperties
(
dto
,
contract
);
//获取维保备案编号
String
wbApplyNo
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
WBBA
.
getCode
(),
1
).
get
(
0
);
contract
.
setApplyNo
(
wbApplyNo
);
contract
.
setInstanceId
(
instanceId
);
contract
.
setUseUnitCode
(
company
.
getCompanyCode
());
contract
.
setUseUnitName
(
company
.
getCompanyName
());
//管理员信息
String
[]
MaintenanceManager
=
dto
.
getMaintenanceManagerId
().
split
(
"_"
);
contract
.
setMaintenanceManagerId
(
dto
.
getMaintenanceManagerId
());
contract
.
setMaintenanceManagerName
(
MaintenanceManager
[
1
]);
//接收机构信息
String
[]
splitReceiveOrgCode
=
dto
.
getReceiveOrgCode
().
split
(
"_"
);
contract
.
setReceiveOrgCode
(
splitReceiveOrgCode
[
0
]);
contract
.
setReceiveOrgName
(
splitReceiveOrgCode
[
1
]);
//维保单位信息
String
[]
splitMaintenanceUnitCode
=
dto
.
getMaintenanceUnitCode
().
split
(
"_"
);
contract
.
setMaintenanceUnitCode
(
dto
.
getMaintenanceUnitCode
());
contract
.
setMaintenanceUnitName
(
splitMaintenanceUnitCode
[
1
]);
contract
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
contract
.
setEquNum
(
equipmentLists
.
size
());
contract
.
setInstanceId
(
instanceId
);
// 判断当前是否为提交
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
// 发起流程
// 发起流程
try
{
try
{
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
ActWorkflowStartDTO
flowDto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
flowDto
=
new
ActWorkflowStartDTO
();
flowDto
.
setProcessDefinitionKey
(
WB_PROCESS_DEFINITION_KEY
);
flowDto
.
setProcessDefinitionKey
(
WB_PROCESS_DEFINITION_KEY
);
flowDto
.
setBusinessKey
(
"1"
);
HashMap
<
String
,
Object
>
dtoMap
=
new
HashMap
<>();
dtoMap
.
put
(
"condition"
,
"ces"
);
flowDto
.
setVariables
(
dtoMap
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
flowDto
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
flowDto
);
instanceId
=
((
Map
<?,
?>)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
instanceId
=
((
Map
<?,
?>)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
// 查询下节点任务
extracted
(
instanceId
,
roleList
,
contract
);
// 执行一步
// 执行一步
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
String
taskId
=
dataObject
.
getString
(
"id"
);
//组装信息
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
taskResultDTO
.
setTaskId
(
taskId
);
taskResultDTO
.
setTaskId
(
taskId
);
...
@@ -245,71 +414,109 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
...
@@ -245,71 +414,109 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
taskResultDTO
.
setVariable
(
hashMap
);
taskResultDTO
.
setVariable
(
hashMap
);
//执行流程
//执行流程
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
extracted
(
instanceId
,
roleList
,
contract
);
contract
.
setInstanceId
(
instanceId
);
contract
.
setApplyStatus
(
FlowStatusEnum
.
SUBMITTED
.
getName
());
contract
.
setStatus
(
FlowStatusEnum
.
SUBMITTED
.
getName
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"维保使用单位提交流程启动失败:{}"
,
e
);
log
.
error
(
"维保使用单位提交流程启动失败:{}"
,
e
);
}
}
}
}
JgMaintenanceContractDto
dto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
),
JgMaintenanceContractDto
.
class
);
Object
o
=
map
.
get
(
"equipmentLists"
);
List
<
Object
>
equipmentLists
=
Collections
.
singletonList
(
o
);
CompanyBo
company
=
reginParams
.
getCompany
();
JgMaintenanceContract
contract
=
new
JgMaintenanceContract
();
BeanUtils
.
copyProperties
(
dto
,
contract
);
//获取维保备案编号
String
wbApplyNo
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
WBBA
.
getCode
(),
1
).
get
(
0
);
contract
.
setApplyNo
(
wbApplyNo
);
contract
.
setInstanceId
(
instanceId
);
contract
.
setUseUnitCode
(
company
.
getCompanyCode
());
contract
.
setUseUnitName
(
company
.
getCompanyName
());
contract
.
setApplyFlow
(
MaintenanceEnum
.
SHIYONG
.
getMsg
());
contract
.
setApplyStatus
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getName
());
contract
.
setEquNum
(
equipmentLists
.
size
());
contract
.
setInstanceId
(
instanceId
);
this
.
save
(
contract
);
this
.
save
(
contract
);
//关联设备
List
<
JgMaintenanceContractEq
>
equipList
=
new
ArrayList
<>();
List
<
JgMaintenanceContractEq
>
equipList
=
new
ArrayList
<>();
equipmentLists
.
forEach
(
x
->
{
equipmentLists
.
forEach
(
x
->
{
JgMaintenanceContractEq
equip
=
new
JgMaintenanceContractEq
();
JgMaintenanceContractEq
equip
=
new
JgMaintenanceContractEq
();
equip
.
setEquId
(
String
.
valueOf
(
x
));
equip
.
setEquId
(
String
.
valueOf
(
x
.
get
(
"SEQUENCE_NBR"
)
));
equip
.
setEquipTransferId
(
wbApplyNo
);
equipList
.
add
(
equip
);
equipList
.
add
(
equip
);
});
});
return
jgMaintenanceContractEqService
.
saveBatch
(
equipList
);
return
jgMaintenanceContractEqService
.
saveBatch
(
equipList
);
}
}
private
void
extracted
(
String
instanceId
,
ArrayList
<
String
>
roleList
,
JgMaintenanceContract
contract
)
{
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"
);
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
());
}
}
}
contract
.
setInstanceStatus
(
String
.
join
(
","
,
roleList
));
}
/**
/**
* 更新维保合同和设备对应关系
* 更新维保合同和设备对应关系
*/
*/
@Transactional
@Transactional
public
Boolean
updateMaintenanceAndEquipment
(
JgMaintenanceContractDto
dto
,
List
<
Integer
>
EquipmentLists
)
{
public
Boolean
updateMaintenanceAndEquipment
(
String
submit
,
JgMaintenanceContractDto
dto
,
List
<
Map
<
String
,
Object
>>
list
)
{
String
instanceId
=
null
;
//更新维保合同表
//更新维保合同表
this
.
updateBySequenceNbr
(
dto
);
String
[]
MaintenanceManager
=
dto
.
getMaintenanceManagerId
().
split
(
"_"
);
dto
.
setMaintenanceManagerId
(
dto
.
getMaintenanceManagerId
());
dto
.
setMaintenanceManagerName
(
MaintenanceManager
[
1
]);
String
[]
splitReceiveOrgCode
=
dto
.
getReceiveOrgCode
().
split
(
"_"
);
dto
.
setReceiveOrgCode
(
splitReceiveOrgCode
[
0
]);
dto
.
setReceiveOrgName
(
splitReceiveOrgCode
[
1
]);
List
<
Integer
>
collect
=
EquipmentLists
.
stream
().
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
());
String
[]
splitMaintenanceUnitCode
=
dto
.
getMaintenanceUnitCode
().
split
(
"_"
);
if
(!
collect
.
isEmpty
())
{
dto
.
setMaintenanceUnitCode
(
dto
.
getMaintenanceUnitCode
());
dto
.
setMaintenanceUnitName
(
splitMaintenanceUnitCode
[
1
]);
// 判断当前是否为提交
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
// 发起流程
try
{
ActWorkflowStartDTO
flowDto
=
new
ActWorkflowStartDTO
();
flowDto
.
setProcessDefinitionKey
(
WB_PROCESS_DEFINITION_KEY
);
flowDto
.
setBusinessKey
(
"1"
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
flowDto
);
instanceId
=
((
Map
<?,
?>)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
// 执行一步
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
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"approvalStatus"
,
"0"
);
taskResultDTO
.
setVariable
(
hashMap
);
//执行流程
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
// dto.setApplyFlow(MaintenanceEnum.SHIYONG.getMsg()+","+MaintenanceEnum.WEIBAO.getMsg());
dto
.
setInstanceId
(
instanceId
);
}
catch
(
Exception
e
)
{
log
.
error
(
"维保使用单位提交流程启动失败:{}"
,
e
);
}
}
this
.
updateBySequenceNbr
(
dto
);
//更新对应设备表
if
(!
list
.
isEmpty
())
{
//先删除原先设备对应关系
//先删除原先设备对应关系
LambdaQueryWrapper
<
JgMaintenanceContractEq
>
queryWrapper
=
new
LambdaQueryWrapper
<
JgMaintenanceContractEq
>()
LambdaQueryWrapper
<
JgMaintenanceContractEq
>
queryWrapper
=
new
LambdaQueryWrapper
<
JgMaintenanceContractEq
>()
.
eq
(
JgMaintenanceContractEq:
:
getEquId
,
list
.
get
(
0
).
get
(
"SEQUENCE_NBR"
))
.
eq
(
JgMaintenanceContractEq:
:
getIsDelete
,
false
);
.
eq
(
JgMaintenanceContractEq:
:
getIsDelete
,
false
);
List
<
Long
>
list
=
jgMaintenanceContractEqService
.
list
(
queryWrapper
).
stream
().
map
(
JgMaintenanceContractEq:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
List
<
Long
>
listSeq
=
jgMaintenanceContractEqService
.
list
(
queryWrapper
).
stream
()
jgMaintenanceContractEqService
.
deleteBatchSeq
(
list
);
.
map
(
JgMaintenanceContractEq:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
jgMaintenanceContractEqService
.
deleteBatchSeq
(
listSeq
);
//重新生成关系表
//重新生成关系表
List
<
JgMaintenanceContractEq
>
equipList
=
new
ArrayList
<>();
List
<
JgMaintenanceContractEq
>
equipList
=
new
ArrayList
<>();
collec
t
.
forEach
(
x
->
{
lis
t
.
forEach
(
x
->
{
JgMaintenanceContractEq
equip
=
new
JgMaintenanceContractEq
();
JgMaintenanceContractEq
equip
=
new
JgMaintenanceContractEq
();
// equip.setBusinessId(dto.getApplyNo());
equip
.
setEquId
(
String
.
valueOf
(
x
.
get
(
"SEQUENCE_NBR"
)));
// equip.setEquipId(String.valueOf(x));
equip
.
setEquipTransferId
(
dto
.
getApplyNo
());
// equip.setBusinessType(BusinessTypeEnum.MAINTENANCE_RECORD.getName());
equipList
.
add
(
equip
);
equipList
.
add
(
equip
);
});
});
return
jgMaintenanceContractEqService
.
saveBatch
(
equipList
);
return
jgMaintenanceContractEqService
.
saveBatch
(
equipList
);
}
}
return
true
;
return
true
;
}
}
/**
* 列表查询 示例
*/
public
List
<
JgMaintenanceContractDto
>
queryForJgMaintenanceContractList
()
{
return
this
.
queryForList
(
""
,
false
);
}
}
}
\ 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/JgReformNoticeServiceImpl.java
View file @
7295faea
...
@@ -76,7 +76,7 @@ import java.util.stream.Collectors;
...
@@ -76,7 +76,7 @@ import java.util.stream.Collectors;
public
class
JgReformNoticeServiceImpl
extends
BaseService
<
JgReformNoticeDto
,
JgReformNotice
,
JgReformNoticeMapper
>
implements
IJgReformNoticeService
{
public
class
JgReformNoticeServiceImpl
extends
BaseService
<
JgReformNoticeDto
,
JgReformNotice
,
JgReformNoticeMapper
>
implements
IJgReformNoticeService
{
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"renovationNotice"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"renovationNotice
New
"
;
private
static
final
String
TABLE_PAGE_ID
=
"reformNoticeAdd"
;
private
static
final
String
TABLE_PAGE_ID
=
"reformNoticeAdd"
;
...
@@ -136,26 +136,24 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -136,26 +136,24 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
return
null
;
return
null
;
}
}
Map
<
String
,
Object
>
installationInfo
=
BeanUtil
.
beanToMap
(
notice
);
Map
<
String
,
Object
>
installationInfo
=
BeanUtil
.
beanToMap
(
notice
);
installationInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
installationInfo
.
put
(
"province"
,
notice
.
getProvince
()
+
"_"
+
notice
.
getProvinceName
());
installationInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
installationInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
installationInfo
.
put
(
"fullAddress"
,
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getCityName
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
installationInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
installationInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
installationInfo
.
put
(
"receiveOrgCreditCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
// installationInfo.put("receiveOrgCreditCode", notice.getReceiveOrgCode() + "_" + notice.getReceiveOrgName());
installationInfo
.
put
(
"receiveOrgCode"
,
notice
.
getReceiveOrgCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
// if (!ValidationUtil.isEmpty(notice.getInspectUnitId()) && ValidationUtil.isEmpty(notice.getInspectUnitName())) {
// if (!ValidationUtil.isEmpty(notice.getInspectUnitId()) && ValidationUtil.isEmpty(notice.getInspectUnitName())) {
// installationInfo.put("inspectUnitId", notice.getInspectUnitId() + "_" + notice.getInspectUnitName());
// installationInfo.put("inspectUnitId", notice.getInspectUnitId() + "_" + notice.getInspectUnitName());
// }
// }
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getFactoryUseSite
Street
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
if
(!
ValidationUtil
.
isEmpty
(
notice
.
get
Street
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
installationInfo
.
put
(
"
factoryUseSiteStreet"
,
notice
.
getFactoryUseSite
Street
()
+
"_"
+
notice
.
getStreetName
());
installationInfo
.
put
(
"
street"
,
notice
.
get
Street
()
+
"_"
+
notice
.
getStreetName
());
}
}
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
"proxyStatementAttachment"
,
"installContractAttachment"
};
// 设备信息
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
JgReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
JgReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
for
(
String
s
:
fields
)
{
if
(
installationInfo
.
containsKey
(
s
))
{
if
(
installationInfo
.
containsKey
(
s
))
{
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
...
@@ -164,9 +162,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -164,9 +162,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
}
}
}
}
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
TABLE_PAGE_ID
,
installationInfo
);
this
.
put
(
"reformInfo"
,
installationInfo
);
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
}};
}};
}
}
...
@@ -181,10 +178,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -181,10 +178,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
}
// 字段转换
// 字段转换
this
.
convertField
(
noticeDto
);
this
.
convertField
(
noticeDto
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
AjaxResult
ajaxResult
;
AjaxResult
ajaxResult
;
// 发起流程
// 发起流程
...
@@ -245,13 +240,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -245,13 +240,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@Override
@Override
public
Page
<
JgReformNoticeDto
>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
public
Page
<
JgReformNoticeDto
>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
;
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
if
(
type
.
equals
(
"enterprise"
))
{
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
}
else
{
orgCode
=
reginParams
.
getCompany
().
getOrgCode
();
}
Page
<
JgReformNotice
>
noticePage
=
JgReformNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
Page
<
JgReformNotice
>
noticePage
=
JgReformNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
// 将Page<JgReformNotice>转化为Page<JgReformNoticeDto>
// 将Page<JgReformNotice>转化为Page<JgReformNoticeDto>
...
@@ -533,12 +522,12 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -533,12 +522,12 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
}
}
String
factoryUseSiteStreet
=
model
.
getFactoryUseSite
Street
();
String
street
=
model
.
get
Street
();
if
(!
ObjectUtils
.
isEmpty
(
factoryUseSiteS
treet
))
{
if
(!
ObjectUtils
.
isEmpty
(
s
treet
))
{
String
[]
factoryUseSiteStreetList
=
factoryUseSiteS
treet
.
split
(
"_"
);
String
[]
streetList
=
s
treet
.
split
(
"_"
);
if
(
factoryUseSiteS
treetList
.
length
>
1
)
{
if
(
s
treetList
.
length
>
1
)
{
model
.
set
FactoryUseSiteStreet
(
factoryUseSiteS
treetList
[
0
]);
model
.
set
Street
(
s
treetList
[
0
]);
model
.
setStreetName
(
factoryUseSiteS
treetList
[
1
]);
model
.
setStreetName
(
s
treetList
[
1
]);
}
}
}
}
...
@@ -551,7 +540,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -551,7 +540,9 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
model
.
setUseUnitName
(
useUnitList
[
1
]);
model
.
setUseUnitName
(
useUnitList
[
1
]);
}
}
}
}
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isEmpty
(
model
.
getReceiveOrgCode
()))
{
model
.
setReceiveOrgCode
(
model
.
getReceiveOrgCreditCode
());
}
String
receiveOrgId
=
model
.
getReceiveOrgCode
();
String
receiveOrgId
=
model
.
getReceiveOrgCode
();
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgId
))
{
if
(!
ObjectUtils
.
isEmpty
(
receiveOrgId
))
{
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/enums/DocumentEnum.java
View file @
7295faea
...
@@ -13,7 +13,7 @@ public enum DocumentEnum {
...
@@ -13,7 +13,7 @@ public enum DocumentEnum {
GZS
(
"gzs"
,
"告知书"
),
GZS
(
"gzs"
,
"告知书"
),
CPZL
(
"cpzl"
,
"产品质量证明书"
),
CPZL
(
"cpzl"
,
"产品质量证明书"
),
SGZX
(
"sgzx"
,
"施工自行检查报告"
),
SGZX
(
"sgzx
bg
"
,
"施工自行检查报告"
),
SGHT
(
"sght"
,
"施工合同或证明"
),
SGHT
(
"sght"
,
"施工合同或证明"
),
SGFA
(
"sgfa"
,
"施工方案/施工设计文件"
),
SGFA
(
"sgfa"
,
"施工方案/施工设计文件"
),
SGDWXK
(
"sgdwxk"
,
"施工单位许可证书"
),
SGDWXK
(
"sgdwxk"
,
"施工单位许可证书"
),
...
@@ -26,7 +26,22 @@ public enum DocumentEnum {
...
@@ -26,7 +26,22 @@ public enum DocumentEnum {
SGSJ
(
"sgsj"
,
"施工设计文件"
),
SGSJ
(
"sgsj"
,
"施工设计文件"
),
SGFB
(
"sgfb"
,
"施工分包方目录"
),
SGFB
(
"sgfb"
,
"施工分包方目录"
),
FBSPJ
(
"fbspj"
,
"分包方评价资料"
),
FBSPJ
(
"fbspj"
,
"分包方评价资料"
),
QT
(
"qt"
,
"其他附件"
);
QT
(
"qtfj"
,
"其他附件"
),
CPZLHGZ
(
"cpzlhg"
,
"产品质量合格证"
),
CPSJ
(
"cpsj"
,
"产品设计文件"
),
ZZXK
(
"zzxk"
,
"制造许可证"
),
ZJSY
(
"zjsy"
,
"安全保护装置的型式试验证书"
),
DDHL
(
"ddhl"
,
"电动葫芦的型式试验证书"
),
SYWH
(
"sywh"
,
"使用维护说明书"
),
CLXS
(
"clxs"
,
"车辆行驶线路图"
),
SYDJ
(
"sydj"
,
"使用登记证"
),
SYCJY
(
"sycjy"
,
"上一次检验报告"
),
FBHG
(
"fbhg"
,
"防爆合格证"
),
NDZXJC
(
"ndzxjc"
,
"年度自行检查报告"
),
AGGLRY
(
"aqglry"
,
"安全管理人员证"
),
ZYRYZ
(
"zyry"
,
"作业人员证"
),
WBHT
(
"wbht"
,
"维保合同"
),
AZJY
(
"azjy"
,
"安装监检报告"
);
private
String
code
;
private
String
code
;
private
String
name
;
private
String
name
;
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionApplicationModel.java
View file @
7295faea
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
model
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
api
.
model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.typroject.tyboot.core.rdbms.model.BaseModel
;
import
org.typroject.tyboot.core.rdbms.model.BaseModel
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -37,6 +39,7 @@ public class JyjcInspectionApplicationModel extends BaseModel {
...
@@ -37,6 +39,7 @@ public class JyjcInspectionApplicationModel extends BaseModel {
private
String
applicationNo
;
private
String
applicationNo
;
@ApiModelProperty
(
value
=
"申请日期"
)
@ApiModelProperty
(
value
=
"申请日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
applicationDate
;
private
Date
applicationDate
;
@ApiModelProperty
(
value
=
"检验检测类别"
)
@ApiModelProperty
(
value
=
"检验检测类别"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/java/com/yeejoin/amos/boot/module/jyjc/api/model/JyjcInspectionResultModel.java
View file @
7295faea
...
@@ -97,8 +97,6 @@ public class JyjcInspectionResultModel extends BaseModel {
...
@@ -97,8 +97,6 @@ public class JyjcInspectionResultModel extends BaseModel {
private
String
inspectionTypeName
;
private
String
inspectionTypeName
;
@ApiModelProperty
(
value
=
"报检日期"
)
@ApiModelProperty
(
value
=
"报检日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
Date
applicationDate
;
private
Date
applicationDate
;
@ApiModelProperty
(
"检验结果方式"
)
@ApiModelProperty
(
"检验结果方式"
)
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-api/src/main/resources/mapper/JyjcInspectionApplicationMapper.xml
View file @
7295faea
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
tzjia.application_date,
tzjia.application_date,
tzjia.accept_date,
tzjia.accept_date,
tzjia.inspection_charge_phone,
tzjia.inspection_charge_phone,
t
zjia.inspection_charge_p
erson,
t
bei2.use_contact as inspectionChargeP
erson,
tbei1.use_unit AS applicationUnitName,
tbei1.use_unit AS applicationUnitName,
tbei.use_unit AS inspectionUnitName,
tbei.use_unit AS inspectionUnitName,
tzjia.status,
tzjia.status,
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
tz_jyjc_inspection_application AS tzjia
tz_jyjc_inspection_application AS tzjia
LEFT JOIN tz_base_enterprise_info tbei ON tbei.use_code = tzjia.application_unit_code
LEFT JOIN tz_base_enterprise_info tbei ON tbei.use_code = tzjia.application_unit_code
LEFT JOIN tz_base_enterprise_info tbei1 ON tbei1.use_code = tzjia.inspection_unit_code
LEFT JOIN tz_base_enterprise_info tbei1 ON tbei1.use_code = tzjia.inspection_unit_code
LEFT JOIN tz_base_enterprise_info tbei2 ON tbei2.sequence_nbr = tzjia.inspection_charge_person
LEFT JOIN cb_data_dictionary cdd ON cdd.code = tzjia.equip_classify
LEFT JOIN cb_data_dictionary cdd ON cdd.code = tzjia.equip_classify
LEFT JOIN cb_data_dictionary cdd1 ON cdd1.code = tzjia.inspection_classify
LEFT JOIN cb_data_dictionary cdd1 ON cdd1.code = tzjia.inspection_classify
LEFT JOIN cb_data_dictionary cdd2 ON cdd2.code = tzjia.status and cdd2.type = 'JYLCZT'
LEFT JOIN cb_data_dictionary cdd2 ON cdd2.code = tzjia.status and cdd2.type = 'JYLCZT'
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/config/BizCustomDateSerializer.java
View file @
7295faea
...
@@ -29,7 +29,7 @@ import java.util.Objects;
...
@@ -29,7 +29,7 @@ import java.util.Objects;
*/
*/
public
class
BizCustomDateSerializer
extends
StdSerializer
<
Date
>
{
public
class
BizCustomDateSerializer
extends
StdSerializer
<
Date
>
{
private
List
<
String
>
customFields
=
Arrays
.
asList
(
"acceptDate"
,
"expiryDate"
);
private
List
<
String
>
customFields
=
Arrays
.
asList
(
"acceptDate"
,
"expiryDate"
,
"applicationDate"
);
public
BizCustomDateSerializer
()
public
BizCustomDateSerializer
()
{
{
...
...
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/JyjcInspectionApplicationServiceImpl.java
View file @
7295faea
...
@@ -124,7 +124,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
...
@@ -124,7 +124,9 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
model
.
setResultType
(
jyjcOpeningApplication
.
getResultType
());
model
.
setResultType
(
jyjcOpeningApplication
.
getResultType
());
}
}
model
.
setApplicationNo
(
UUID
.
randomUUID
().
toString
());
List
<
String
>
codes
=
createCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
model
.
setApplicationNo
(
codes
.
get
(
0
));
model
.
setApplicationDate
(
new
Date
());
model
.
setApplicationDate
(
new
Date
());
// region 获取下一个流程节点的数据
// region 获取下一个流程节点的数据
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
model
.
getProcessInstanceId
());
Map
<
String
,
Object
>
nextNodeInfo
=
workflowHelper
.
getNextWorkflowNode
(
model
.
getProcessInstanceId
());
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcInspectionResultServiceImpl.java
View file @
7295faea
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jyjc.api.common.StringUtil
;
import
com.yeejoin.amos.boot.module.jyjc.api.common.StringUtil
;
...
@@ -54,6 +55,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -54,6 +55,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
private
static
final
String
JYJC_SUBMIT_FILE_PREFIX
=
"JYJC_"
;
private
static
final
String
JYJC_SUBMIT_FILE_PREFIX
=
"JYJC_"
;
private
static
final
String
JYJC_SUBMIT_KEY
=
"inspectResult"
;
private
static
final
String
JYJC_SUBMIT_KEY
=
"inspectResult"
;
private
static
final
String
JYJC_RESULT_STATUS
=
"2"
;
@Autowired
@Autowired
private
IJyjcInspectionResultAttachmentService
iJyjcInspectionResultAttachmentService
;
private
IJyjcInspectionResultAttachmentService
iJyjcInspectionResultAttachmentService
;
...
@@ -125,6 +127,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -125,6 +127,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
Object
inspectors
=
jsonArray
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
","
));
Object
inspectors
=
jsonArray
.
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
joining
(
","
));
model
.
setInspector
(
String
.
valueOf
(
inspectors
));
model
.
setInspector
(
String
.
valueOf
(
inspectors
));
}
}
model
.
setResultStatus
(
JYJC_RESULT_STATUS
);
// 更新结果主表
// 更新结果主表
updateWithModel
(
model
);
updateWithModel
(
model
);
...
@@ -206,6 +209,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
...
@@ -206,6 +209,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
info
.
setSequenceCode
(
model
.
getEquipUnicode
());
info
.
setSequenceCode
(
model
.
getEquipUnicode
());
info
.
setInspectOrgCode
(
model
.
getUseUnitCreditCode
());
info
.
setInspectOrgCode
(
model
.
getUseUnitCreditCode
());
info
.
setInspectReportNo
(
model
.
getResultNo
());
info
.
setInspectReportNo
(
model
.
getResultNo
());
info
.
setRecDate
(
new
Date
());
}
}
/**
/**
...
...
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