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
4e9b721c
Commit
4e9b721c
authored
Dec 22, 2023
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop_tzs_register' of…
Merge branch 'develop_tzs_register' of
http://36.40.66.175:5000/moa/amos-boot-biz
into develop_tzs_register
parents
c2592fbf
31190318
Show whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
429 additions
and
207 deletions
+429
-207
BizCustomDateSerializer.java
...os/boot/module/jg/api/common/BizCustomDateSerializer.java
+1
-1
JgEquipTransferDto.java
...ejoin/amos/boot/module/jg/api/dto/JgEquipTransferDto.java
+3
-0
JgInstallationNoticeDto.java
.../amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
+5
-0
JgMaintainNoticeDto.java
...join/amos/boot/module/jg/api/dto/JgMaintainNoticeDto.java
+3
-0
JgRegistrationHistoryDto.java
...amos/boot/module/jg/api/dto/JgRegistrationHistoryDto.java
+18
-14
JgScrapCancelDto.java
...yeejoin/amos/boot/module/jg/api/dto/JgScrapCancelDto.java
+6
-0
JgEquipTransfer.java
...ejoin/amos/boot/module/jg/api/entity/JgEquipTransfer.java
+2
-0
JgInstallationNotice.java
.../amos/boot/module/jg/api/entity/JgInstallationNotice.java
+8
-0
JgRegistrationHistory.java
...amos/boot/module/jg/api/entity/JgRegistrationHistory.java
+9
-2
MaintenceStatusEnum.java
...in/amos/boot/module/jg/api/enums/MaintenceStatusEnum.java
+2
-2
WorkFlowStatusEnum.java
...oin/amos/boot/module/jg/api/enums/WorkFlowStatusEnum.java
+44
-6
JgChangeRegistrationReformEqMapper.java
...ule/jg/api/mapper/JgChangeRegistrationReformEqMapper.java
+4
-0
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+1
-1
JgChangeRegistrationReformMapper.xml
...ain/resources/mapper/JgChangeRegistrationReformMapper.xml
+5
-3
JgEquipTransferMapper.xml
...g-api/src/main/resources/mapper/JgEquipTransferMapper.xml
+1
-0
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+0
-0
JgMaintainNoticeMapper.xml
...-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
+6
-37
JgMaintenanceContractMapper.xml
...src/main/resources/mapper/JgMaintenanceContractMapper.xml
+5
-2
JgScrapCancelMapper.xml
...-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
+11
-11
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+9
-5
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+8
-5
JgChangeRegistrationReformController.java
.../biz/controller/JgChangeRegistrationReformController.java
+1
-1
JgEquipTransferByWorkFlowController.java
...g/biz/controller/JgEquipTransferByWorkFlowController.java
+8
-1
JgMaintenanceContractController.java
...le/jg/biz/controller/JgMaintenanceContractController.java
+2
-1
JgScrapCancelController.java
...oot/module/jg/biz/controller/JgScrapCancelController.java
+10
-1
JgUseRegistrationController.java
...module/jg/biz/controller/JgUseRegistrationController.java
+3
-3
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+7
-2
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+32
-16
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+16
-37
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+9
-5
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+28
-11
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+1
-1
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+59
-21
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+9
-7
CommonController.java
...mos/boot/module/jyjc/biz/controller/CommonController.java
+21
-2
JyjcOpeningApplicationController.java
...jyjc/biz/controller/JyjcOpeningApplicationController.java
+24
-0
CommonserviceImpl.java
.../boot/module/jyjc/biz/service/impl/CommonserviceImpl.java
+4
-1
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+23
-2
TzsUserInfoDto.java
.../yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
+3
-0
TzsUserInfo.java
.../yeejoin/amos/boot/module/tcm/api/entity/TzsUserInfo.java
+5
-0
TzBaseEnterpriseInfoController.java
...le/tcm/biz/controller/TzBaseEnterpriseInfoController.java
+1
-1
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+3
-2
RegUnitInfoController.java
.../module/tcm/flc/biz/controller/RegUnitInfoController.java
+1
-1
TzsUserInfoDto.java
.../yeejoin/amos/boot/module/ymt/api/dto/TzsUserInfoDto.java
+2
-1
TzsUserInfo.java
.../yeejoin/amos/boot/module/ymt/api/entity/TzsUserInfo.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/common/BizCustomDateSerializer.java
View file @
4e9b721c
...
...
@@ -30,7 +30,7 @@ import java.util.Objects;
*/
public
class
BizCustomDateSerializer
extends
JsonSerializer
<
Date
>
{
private
List
<
String
>
customFields
=
Arrays
.
asList
(
"acceptDate"
,
"expiryDate"
,
"applicationDate"
);
private
List
<
String
>
customFields
=
Arrays
.
asList
(
"acceptDate"
,
"expiryDate"
,
"applicationDate"
,
"noticeDate"
,
"installStartDate"
,
"handleDate"
);
public
BizCustomDateSerializer
()
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgEquipTransferDto.java
View file @
4e9b721c
...
...
@@ -110,4 +110,7 @@ public class JgEquipTransferDto extends BaseDto {
@ApiModelProperty
(
value
=
"设备地址"
)
private
String
concatenatedAddress
;
@ApiModelProperty
(
value
=
"流程建议"
)
private
String
processAdvice
;
}
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 @
4e9b721c
...
...
@@ -2,8 +2,10 @@ 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.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCustomDateSerializer
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -86,6 +88,7 @@ public class JgInstallationNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"安装开始日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
installStartDate
;
@ApiModelProperty
(
value
=
"安装竣工日期"
)
...
...
@@ -183,6 +186,7 @@ public class JgInstallationNoticeDto extends BaseDto {
private
String
isXixian
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
@ApiModelProperty
(
value
=
"告知日期"
)
private
Date
noticeDate
;
...
...
@@ -240,6 +244,7 @@ public class JgInstallationNoticeDto extends BaseDto {
private
String
equAddress
;
@ApiModelProperty
(
value
=
"办理日期"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
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 @
4e9b721c
...
...
@@ -203,4 +203,7 @@ public class JgMaintainNoticeDto extends BaseDto {
@ApiModelProperty
(
value
=
"状态"
)
private
String
status
;
@ApiModelProperty
(
value
=
"下一执行节点ids"
)
private
String
nextExecuteIds
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/dto/JgRegistrationHistoryDto.java
View file @
4e9b721c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
*
*
* @author system_generator
* @date 2023-12-20
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JgRegistrationHistoryDto"
,
description
=
""
)
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"JgRegistrationHistoryDto"
,
description
=
""
)
public
class
JgRegistrationHistoryDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"创建人ID"
)
@ApiModelProperty
(
value
=
"创建人ID"
)
private
String
createUserId
;
@ApiModelProperty
(
value
=
"创建时间"
)
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
@ApiModelProperty
(
value
=
"使用登记编号"
)
@ApiModelProperty
(
value
=
"使用登记编号"
)
private
String
useRegistrationCode
;
@ApiModelProperty
(
value
=
"登记类别(改造登记、移装登记)"
)
@ApiModelProperty
(
value
=
"登记类别(改造登记、移装登记)"
)
private
String
registrationClass
;
@ApiModelProperty
(
value
=
"变更数据"
)
@ApiModelProperty
(
value
=
"变更数据"
)
private
String
changeData
;
@ApiModelProperty
(
value
=
"设备监管码"
)
@ApiModelProperty
(
value
=
"设备监管码"
)
private
String
supervisoryCode
;
@ApiModelProperty
(
value
=
"设备id"
)
@ApiModelProperty
(
value
=
"设备id"
)
private
String
equId
;
@ApiModelProperty
(
value
=
"数据状态(新数据:new,历史数据:history)"
)
@ApiModelProperty
(
value
=
"数据状态(新数据:new,历史数据:history)"
)
private
String
status
;
@ApiModelProperty
(
value
=
"当前单据Id"
)
@ApiModelProperty
(
value
=
"当前单据Id"
)
private
String
currentDocumentId
;
@ApiModelProperty
(
value
=
"登记类型"
)
@ApiModelProperty
(
value
=
"登记类型"
)
private
String
registrationType
;
@ApiModelProperty
(
value
=
"原有数据"
)
private
String
oldData
;
}
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 @
4e9b721c
...
...
@@ -100,4 +100,10 @@ public class JgScrapCancelDto extends BaseDto {
*/
private
String
useUnitName
;
/**
* 设备ID
*/
private
String
record
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgEquipTransfer.java
View file @
4e9b721c
...
...
@@ -163,4 +163,6 @@ public class JgEquipTransfer extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
concatenatedAddress
;
@TableField
(
exist
=
false
)
private
String
processAdvice
;
}
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 @
4e9b721c
...
...
@@ -2,7 +2,10 @@ package com.yeejoin.amos.boot.module.jg.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jg.api.common.BizCustomDateSerializer
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
...
...
@@ -153,6 +156,8 @@ public class JgInstallationNotice extends BaseEntity {
* 安装开始日期
*/
@TableField
(
"install_start_date"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
installStartDate
;
/**
...
...
@@ -333,6 +338,8 @@ public class JgInstallationNotice extends BaseEntity {
* 告知日期
*/
@TableField
(
"notice_date"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
private
Date
noticeDate
;
/**
...
...
@@ -384,6 +391,7 @@ public class JgInstallationNotice extends BaseEntity {
private
String
equAddress
;
@TableField
(
"handle_date"
)
@JsonSerialize
(
using
=
BizCustomDateSerializer
.
class
)
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/JgRegistrationHistory.java
View file @
4e9b721c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
...
...
@@ -25,13 +26,13 @@ public class JgRegistrationHistory extends BaseEntity {
/**
* 创建人ID
*/
@TableField
(
"create_user_id"
)
@TableField
(
value
=
"create_user_id"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
String
createUserId
;
/**
* 创建时间
*/
@TableField
(
"create_date"
)
@TableField
(
value
=
"create_date"
,
fill
=
FieldFill
.
INSERT_UPDATE
)
private
Date
createDate
;
/**
...
...
@@ -82,4 +83,10 @@ public class JgRegistrationHistory extends BaseEntity {
@TableField
(
"registration_type"
)
private
String
registrationType
;
/**
* 原有数据
*/
@TableField
(
"old_data"
)
private
String
oldData
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/MaintenceStatusEnum.java
View file @
4e9b721c
...
...
@@ -10,8 +10,8 @@ import lombok.Getter;
@AllArgsConstructor
public
enum
MaintenceStatusEnum
{
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"维保单位已驳回"
,
"使用单位撤回"
),
RECEIVE
(
"维保单位审核确认"
,
"receive"
,
"维保单位待受理"
,
"监管单位已驳回"
,
"维保单位撤回"
),
SUBMIT
(
"使用单位提交"
,
"submit"
,
"使用单位待提交"
,
"维保单位已驳回"
,
"使用单位
已
撤回"
),
RECEIVE
(
"维保单位审核确认"
,
"receive"
,
"维保单位待受理"
,
"监管单位已驳回"
,
"维保单位
已
撤回"
),
PRELIMINARY
(
"监管单位审核"
,
"preliminary"
,
"监管单位待受理"
,
""
,
""
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/WorkFlowStatusEnum.java
View file @
4e9b721c
...
...
@@ -3,6 +3,11 @@ package com.yeejoin.amos.boot.module.jg.api.enums;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 使用登记状态西悉尼
*/
...
...
@@ -13,7 +18,7 @@ public enum WorkFlowStatusEnum {
/**
* 使用登记流程
*/
USE_SUBMIT
(
"使用单位提交"
,
"useSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位
提交
已撤回"
),
USE_SUBMIT
(
"使用单位提交"
,
"useSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
),
USE_RECEIVE
(
"一级受理"
,
"useReceive"
,
"一级待受理"
,
"二级受理已驳回"
,
"一级受理已撤回"
),
USE_PRELIMINARY
(
"二级受理"
,
"usePreliminary"
,
"二级待受理"
,
"三级受理已驳回"
,
"二级受理已撤回"
),
USE_REEXAMINE
(
"三级受理"
,
"useReexamine"
,
"三级待受理"
,
""
,
""
),
...
...
@@ -22,15 +27,15 @@ public enum WorkFlowStatusEnum {
/**
* 维保流程
*/
MAIN_SUBMIT
(
"使用单位提交"
,
"mainSubmit"
,
"使用单位待提交"
,
"维保单位已驳回"
,
"使用单位撤回"
),
MAIN_RECEIVE
(
"维保单位审核确认"
,
"mainReceive"
,
"维保单位待受理"
,
"监管单位已驳回"
,
"维保单位撤回"
),
MAIN_SUBMIT
(
"使用单位提交"
,
"mainSubmit"
,
"使用单位待提交"
,
"维保单位已驳回"
,
"使用单位
已
撤回"
),
MAIN_RECEIVE
(
"维保单位审核确认"
,
"mainReceive"
,
"维保单位待受理"
,
"监管单位已驳回"
,
"维保单位
已
撤回"
),
MAIN_PRELIMINARY
(
"监管单位审核"
,
"mainPreliminary"
,
"监管单位待受理"
,
""
,
""
),
/**
* 电梯注销
*/
CANCEL_SUBMIT
(
"使用单位提交"
,
"cancelSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位
提交
已撤回"
),
CANCEL_SUBMIT
(
"使用单位提交"
,
"cancelSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
),
CANCEL_RECEIVE
(
"一级受理"
,
"cancelReceive"
,
"一级待受理"
,
"二级受理已驳回"
,
"一级受理已撤回"
),
CANCEL_PRELIMINARY
(
"二级受理"
,
"cancelPreliminary"
,
"二级待受理"
,
"三级受理已驳回"
,
"二级受理已撤回"
),
CANCEL_REEXAMINE
(
"三级受理"
,
"cancelReexamine"
,
"三级待受理"
,
""
,
""
),
...
...
@@ -38,10 +43,18 @@ public enum WorkFlowStatusEnum {
/**
* 改造登记流程
*/
CHANGE_SUBMIT
(
"使用单位提交"
,
"changeSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位
提交
已撤回"
),
CHANGE_SUBMIT
(
"使用单位提交"
,
"changeSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
),
CHANGE_RECEIVE
(
"一级受理"
,
"changeReceive"
,
"一级待受理"
,
"二级受理已驳回"
,
"一级受理已撤回"
),
CHANGE_PRELIMINARY
(
"二级受理"
,
"changePreliminary"
,
"二级待受理"
,
"三级受理已驳回"
,
"二级受理已撤回"
),
CHANGE_REEXAMINE
(
"三级受理"
,
"changeReexamine"
,
"三级待受理"
,
""
,
""
);
CHANGE_REEXAMINE
(
"三级受理"
,
"changeReexamine"
,
"三级待受理"
,
""
,
""
),
/**
* 移装变更登记流程
*/
TRANSFER_SUBMIT
(
"使用单位提交"
,
"transferSubmit"
,
"使用单位待提交"
,
"一级受理已驳回"
,
"使用单位已撤回"
),
TRANSFER_RECEIVE
(
"一级受理"
,
"transferReceive"
,
"一级待受理"
,
"二级受理已驳回"
,
"一级受理已撤回"
),
TRANSFER_PRELIMINARY
(
"二级受理"
,
"transferPreliminary"
,
"二级待受理"
,
"三级受理已驳回"
,
"二级受理已撤回"
),
TRANSFER_REEXAMINE
(
"三级受理"
,
"transferReexamine"
,
"三级待受理"
,
""
,
""
);
private
final
String
name
;
...
...
@@ -64,4 +77,29 @@ public enum WorkFlowStatusEnum {
}
return
null
;
}
public
static
List
<
Map
<
String
,
String
>>
getInfoList
(
String
code
)
{
List
<
Map
<
String
,
String
>>
resultList
=
new
ArrayList
<>();
for
(
WorkFlowStatusEnum
constants
:
values
())
{
if
(
constants
.
getCode
().
startsWith
(
code
))
{
HashMap
<
String
,
String
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"name"
,
constants
.
getPass
());
hashMap
.
put
(
"value"
,
constants
.
getPass
());
resultList
.
add
(
hashMap
);
HashMap
<
String
,
String
>
hashMap1
=
new
HashMap
<>();
hashMap1
.
put
(
"name"
,
constants
.
getReject
());
hashMap1
.
put
(
"value"
,
constants
.
getReject
());
resultList
.
add
(
hashMap1
);
HashMap
<
String
,
String
>
hashMap2
=
new
HashMap
<>();
hashMap2
.
put
(
"name"
,
constants
.
getRollBack
());
hashMap2
.
put
(
"value"
,
constants
.
getRollBack
());
resultList
.
add
(
hashMap2
);
}
}
HashMap
<
String
,
String
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"name"
,
"已完成"
);
hashMap
.
put
(
"value"
,
"已完成"
);
resultList
.
add
(
hashMap
);
return
resultList
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgChangeRegistrationReformEqMapper.java
View file @
4e9b721c
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationReformEq
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Update
;
/**
...
...
@@ -14,4 +15,7 @@ import org.apache.ibatis.annotations.Update;
public
interface
JgChangeRegistrationReformEqMapper
extends
BaseMapper
<
JgChangeRegistrationReformEq
>
{
@Update
(
"update tzs_jg_change_registration_reform_eq set is_invalid = 1 where equ_id = #{equipId} and equip_transfer_id != #{currentDocumentId} "
)
void
updateEquipIsVaildByEquipIdAndCurrentDocumentId
(
@Param
(
"equipId"
)
String
equipId
,
@Param
(
"currentDocumentId"
)
String
currentDocumentId
);
@Select
(
"select equ_id from tzs_jg_change_registration_reform_eq where equip_transfer_id = #{currentDocumentId} "
)
String
selectEquipId
(
@Param
(
"currentDocumentId"
)
String
currentDocumentId
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
4e9b721c
...
...
@@ -27,7 +27,7 @@
</select>
<select
id=
"getUserInfo"
resultType=
"java.util.Map"
>
SELECT
*
phone
FROM
"tzs_user_info"
WHERE
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationReformMapper.xml
View file @
4e9b721c
...
...
@@ -10,16 +10,18 @@
<select
id=
"getListPage"
resultType=
"java.util.Map"
>
select ur.sequence_nbr as sequenceNbr,
ur.audit_status as auditStatus,
ur.reg_date as regDate,
ur.use_unit_name as useUnitName,
ur.use_registration_code as useRegistrationCode,
ur.status,
ur.receive_org_name as receiveOrgName,
DATE_FORMAT(ur.reg_date,'%Y-%m-%d') as regDate,
DATE_FORMAT(ur.rec_date,'%Y-%m-%d') as recDate,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
concat(use.PROVINCE_NAME,'-',use.CITY_NAME,'-',use.COUNTY_NAME) as place,
ur.instance_id
as instanceId,
ifnull(ur.instance_id, '')
as instanceId,
re.equ_id as equipId,
ur.apply_no as applyNo,
ifnull(ur.next_executor_ids,'') as nextExecutorIds,
...
...
@@ -49,7 +51,7 @@
</foreach>
</if>
<if
test=
"dto.dataType == 'jg' "
>
and ur.receive_
company
_code = #{dto.unitCode}
and ur.receive_
org
_code = #{dto.unitCode}
</if>
<if
test=
"dto.dataType == 'company' "
>
and ur.use_unit_credit_code = #{dto.unitCode}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgEquipTransferMapper.xml
View file @
4e9b721c
...
...
@@ -86,6 +86,7 @@
</if>
<if
test=
"type == 'installUnit'"
>
AND jet.install_unit_credit_code = #{companyCode}
AND jet.instance_id is not null
</if>
</where>
ORDER BY jet.apply_date DESC
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
4e9b721c
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintainNoticeMapper.xml
View file @
4e9b721c
...
...
@@ -2,39 +2,13 @@
<!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.JgMaintainNoticeMapper"
>
<update
id=
"updatePromoter"
>
UPDATE tzs_jg_maintain_notice set promoter = null
UPDATE tzs_jg_maintain_notice
set promoter = null
where sequence_nbr = #{id}
</update>
<select
id=
"queryForPage"
resultType=
"com.yeejoin.amos.boot.module.jg.api.entity.JgMaintainNotice"
>
select
isn.sequence_nbr AS sequenceNbr,
isn.apply_no AS applyNo,
isn.notice_date AS noticeDate,
isn.use_unit_name AS useUnitName,
isn.receive_org_name AS receiveOrgName,
isn.address AS address,
isn.notice_status AS noticeStatus,
isn.install_unit_name AS installUnitName,
isn.province,
isn.city,
isn.county,
isn.factory_use_site_street,
isn.street_name,
isn.street,
isn.maintain_type,
isn.plan_date,
isn.notice_report_url,
isn.province_name AS provinceName,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.promoter,
isn.equ_category AS equCategory,
isn.equ_list_code AS equListCode,
isn.instance_id AS instanceId,
isn.accept_date AS acceptDate
FROM
tzs_jg_maintain_notice isn
select isn.* FROM tzs_jg_maintain_notice isn
<where>
isn.is_delete = 0
<if
test=
"param != null "
>
...
...
@@ -70,8 +44,7 @@
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
select
isn.sequence_nbr AS sequenceNbr,
select isn.sequence_nbr AS sequenceNbr,
isn.apply_no AS applyNo,
isn.notice_date AS noticeDate,
isn.use_unit_name AS useUnitName,
...
...
@@ -92,7 +65,6 @@
isn.county_name AS countyName,
isn.instance_id AS instanceId,
isn.promoter,
isn.equ_category AS equCategory,
isn.equ_list_code AS equListCode,
isn.plan_date AS installStartDate,
isn.construction_manager AS installLeaderName,
...
...
@@ -133,8 +105,7 @@
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ei.ADDRESS AS useUnitAddress
FROM
tzs_jg_maintain_notice isn
FROM tzs_jg_maintain_notice isn
LEFT JOIN tzs_jg_maintain_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
...
...
@@ -142,8 +113,6 @@
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
WHERE isn.sequence_nbr = #{sequenceNbr} LIMIT 1
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgMaintenanceContractMapper.xml
View file @
4e9b721c
...
...
@@ -128,7 +128,9 @@
rec_date,
create_user_id,
create_date,
instance_id
instance_id,
promoter,
next_execute_ids
FROM
amos_tzs_biz.tzs_jg_maintenance_contract
<where>
...
...
@@ -155,11 +157,12 @@
and receive_org_code = #{contractDto.receiveOrgCode}
</if>
<if
test=
"contractDto.roleIds != null"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
<foreach
collection=
'
contractDto.
roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
instance_status like concat('%',#{role},'%')
</foreach>
</if>
</where>
order by apply_no desc
</select>
<select
id=
"queryBySequenceNbr"
resultType=
"com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractDto"
>
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgScrapCancelMapper.xml
View file @
4e9b721c
...
...
@@ -12,8 +12,8 @@
select ur.sequence_nbr as sequenceNbr,
ur.instance_id as instanceId,
ur.audit_status as auditStatus,
ur.rec_date
as recDate,
ur.create_date
as createDate,
DATE_FORMAT(ur.rec_date,'%Y-%m-%d')
as recDate,
DATE_FORMAT(ur.create_date,'%Y-%m-%d')
as createDate,
ur.receive_org_code as receiveOrgCode,
ur.receive_org_name as receiveOrgName,
ur.receive_company_code as receiveCompanyCode,
...
...
@@ -25,7 +25,7 @@
ur.instance_status as instanceStatus,
ur.promoter,
ifnull(ur.next_execute_ids,'') as nextExecuteIds,
audit_pass_date
as auditPassDate,
DATE_FORMAT(ur.audit_pass_date,'%Y-%m-%d')
as auditPassDate,
use.USE_UNIT_CREDIT_CODE as useUnitCreditCode,
ur.use_unit_name as useUnitName,
ur.use_unit_code as useUnitCode,
...
...
@@ -35,7 +35,7 @@
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,
CONCAT(use.PROVINCE_NAME,'', use.CITY_NAME, '', use.COUNTY_NAME, '', use.street_name, use.ADDRESS, '') AS
place,
re.equ_id as equipId
from tzs_jg_scrap_cancel ur
LEFT JOIN tzs_jg_scrap_cancel_eq re on ur.sequence_nbr = re.equip_transfer_id
...
...
@@ -49,13 +49,13 @@
<if
test=
"dto.auditStatus != null and dto.auditStatus != ''"
>
and ur.audit_status = #{dto.auditStatus}
</if>
<!-- <if test="dto.equCode != null and dto.equCode != ''">--
>
<!-- and jri.EQU_CODE like concat('%',#{dto.equCode},'%')-->
<!-- </if>--
>
<!-- <if test="dto.useUnitName != null and dto.useUnitName != ''">--
>
<!-- and use.USE_UNIT_NAME like concat('%',#{dto.useUnitName},'%')-->
<!-- </if>--
>
<!-- -->
<if
test=
"dto.applyNo != null and dto.applyNo != ''"
>
and ur.apply_no like concat('%',#{dto.applyNo},'%')
</if
>
<if
test=
"dto.cancelType != null and dto.cancelType != ''"
>
and ur.cancel_type = #{dto.cancelType}
</if
>
<if
test=
"roleIds != null and dto.type == 'supervision'"
>
<foreach
collection=
'roleIds'
item=
'role'
open=
'and ('
close=
')'
separator=
'or'
>
ur.instance_status like concat('%',#{role},'%')
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
4e9b721c
...
...
@@ -10,7 +10,7 @@
<select
id=
"getListPage"
resultType=
"java.util.Map"
>
select ur.sequence_nbr as sequenceNbr,
ur.audit_status as auditStatus,
ur.reg_date
as regDate,
date_format(reg_date,'%Y-%m-%d')
as regDate,
ur.use_unit_name as useUnitName,
ur.status,
ur.receive_org_name as receiveOrgName,
...
...
@@ -23,7 +23,8 @@
re.equ_id as equipId,
ur.apply_no as applyNo,
ur.next_execute_ids as nextExecuteIds,
ur.promoter
ur.promoter,
ur.supervisory_code as supervisoryCode
from tzs_jg_use_registration ur
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
...
...
@@ -58,7 +59,9 @@
order by ur.rec_date desc
</select>
<select
id=
"getDetail"
resultType=
"java.util.Map"
>
SELECT jri.EQU_CODE as equCode,
SELECT
jri.RECORD as equipId,
jri.EQU_CODE as equCode,
-- (SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
-- (SELECT name from tz_equipment_category where code = jri.EQU_LIST) as equList,
-- (SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as equDefine,
...
...
@@ -87,12 +90,13 @@
</select>
<select
id=
"getInspectDetail"
resultType=
"java.util.Map"
>
SELECT INSPECT_TYPE as inspectType,
INSPECT_STAFF as inspctStaff,
INSPECT_STAFF as insp
e
ctStaff,
INSPECT_CONCLUSION as inspectConclusion,
INSPECT_ORG_NAME as inspectOrgName,
INSPECT_DATE as inspectDate,
NEXT_INSPECT_DATE as nextInspectDate,
INSPECT_REPORT as inspectReport
INSPECT_REPORT as inspectReport,
INSPECT_ORG_CODE as inspectOrgCode
from idx_biz_jg_inspection_detection_info
where RECORD = #{id}
ORDER BY INSPECT_DATE desc LIMIT 1
...
...
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 @
4e9b721c
...
...
@@ -7,7 +7,9 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
javafx.scene.chart.ValueAxis
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
...
...
@@ -85,8 +87,9 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getSecurityAdmin"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查找当前公司下所属的安全管理员"
,
notes
=
"查找当前公司下所属的安全管理员"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getSecurityAdmin
(
@RequestParam
(
value
=
"type"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getSecurityAdmin
(
type
));
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getSecurityAdmin
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"useUnitCode"
,
required
=
false
)
String
useUnitCode
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getSecurityAdmin
(
type
,
useUnitCode
));
}
...
...
@@ -96,8 +99,8 @@ public class CommonController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUser
Info
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询
安全管理员的基本信息"
,
notes
=
"查询安全管理员的基本信息
"
)
@GetMapping
(
value
=
"/getUser
Phone
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询
用户对应联系方式"
,
notes
=
"查询用户对应联系方式
"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserInfo
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
sequenceNbr
));
}
...
...
@@ -143,7 +146,7 @@ public class CommonController extends BaseController {
}
private
Map
<
String
,
Object
>
mapPointTypeToMap
(
FlowStatusEnum
e
)
{
if
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()
==
e
.
getCode
())
{
if
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()
==
e
.
getCode
()
||
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()
==
e
.
getCode
()
)
{
return
null
;
}
Map
<
String
,
Object
>
record
=
new
HashMap
<>();
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationReformController.java
View file @
4e9b721c
...
...
@@ -114,7 +114,7 @@ public class JgChangeRegistrationReformController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取详情"
,
notes
=
"获取详情"
)
@GetMapping
(
value
=
"/getDetail"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetail
(
@RequestParam
(
"currentDocumentId"
)
String
currentDocumentId
,
@RequestParam
(
"equipId"
)
String
equipId
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetail
(
@RequestParam
(
"currentDocumentId"
)
String
currentDocumentId
,
@RequestParam
(
value
=
"equipId"
,
required
=
false
)
String
equipId
)
{
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationReformServiceImpl
.
getDetail
(
currentDocumentId
,
equipId
));
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgEquipTransferByWorkFlowController.java
View file @
4e9b721c
...
...
@@ -39,7 +39,14 @@ public class JgEquipTransferByWorkFlowController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/accept"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备移交受理"
,
notes
=
"设备移交受理"
)
public
ResponseModel
<
JgEquipTransferDto
>
accept
(
@RequestBody
JgEquipTransferDto
jgEquipTransferDto
,
String
op
)
{
public
ResponseModel
<
JgEquipTransferDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
LinkedHashMap
equipTransferInfo
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
String
opinion
=
(
String
)
model
.
get
(
"opinion"
);
if
(
Objects
.
isNull
(
equipTransferInfo
))
{
throw
new
IllegalArgumentException
(
"参数equipTransferInfo不能为空"
);
}
JgEquipTransferDto
jgEquipTransferDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
equipTransferInfo
),
JgEquipTransferDto
.
class
);
jgEquipTransferDto
.
setProcessAdvice
(
opinion
);
jgEquipTransferServiceImpl
.
accept
(
jgEquipTransferDto
,
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/JgMaintenanceContractController.java
View file @
4e9b721c
...
...
@@ -208,12 +208,13 @@ public class JgMaintenanceContractController extends BaseController {
public
ResponseModel
<
Page
<
JgMaintenanceContractVo
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"phase"
)
int
phase
,
Map
<
String
,
Object
>
map
,
JgMaintenanceContractDto
maintenanceContractDto
)
{
Page
<
JgMaintenanceContract
>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
Page
<
JgMaintenanceContractVo
>
contractDtoPage
=
jgMaintenanceContractServiceImpl
.
queryForPage
(
page
,
phase
,
ma
intenanceContractDto
,
reginParams
);
Page
<
JgMaintenanceContractVo
>
contractDtoPage
=
jgMaintenanceContractServiceImpl
.
queryForPage
(
page
,
phase
,
ma
p
,
reginParams
);
return
ResponseHelper
.
buildResponse
(
contractDtoPage
);
}
...
...
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 @
4e9b721c
...
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.biz.service.impl.JgScrapCancelServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -96,7 +97,7 @@ public class JgScrapCancelController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@PostMapping
(
value
=
"/getList"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getList
(
JgScrapCancelDto
dto
,
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getList
(
@RequestBody
JgScrapCancelDto
dto
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
...
...
@@ -131,4 +132,12 @@ public class JgScrapCancelController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表筛选办理状态下拉"
,
notes
=
"列表筛选办理状态下拉"
)
@GetMapping
(
value
=
"/getAuditStatusList"
)
public
ResponseModel
<
List
<
Map
<
String
,
String
>>>
getAuditStatusList
(
@RequestParam
(
value
=
"code"
)
String
code
)
{
return
ResponseHelper
.
buildResponse
(
WorkFlowStatusEnum
.
getInfoList
(
code
));
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgUseRegistrationController.java
View file @
4e9b721c
...
...
@@ -103,10 +103,10 @@ public class JgUseRegistrationController extends BaseController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
列表全部数据查询"
,
notes
=
"列表全部数据查询
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
详情"
,
notes
=
"详情
"
)
@GetMapping
(
value
=
"/getDetail"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetail
(
@RequestParam
(
"
id"
)
String
id
)
{
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDetail
(
id
));
public
ResponseModel
<
Map
<
String
,
Object
>>
getDetail
(
@RequestParam
(
"
record"
)
String
record
,
@RequestParam
(
value
=
"sequenceNbr"
,
required
=
false
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jgUseRegistrationServiceImpl
.
getDetail
(
record
,
sequenceNbr
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
4e9b721c
...
...
@@ -25,7 +25,7 @@ public interface ICommonService {
List
<
Map
<
String
,
Object
>>
getUnitListByType
(
String
type
);
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
typ
e
);
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
type
,
String
useUnitCod
e
);
Map
<
String
,
Object
>
getUserInfo
(
String
sequenceNbr
);
...
...
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 @
4e9b721c
...
...
@@ -171,10 +171,12 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
public
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
type
)
{
public
List
<
Map
<
String
,
Object
>>
getSecurityAdmin
(
String
type
,
String
companyCode
)
{
if
(
ObjectUtils
.
isEmpty
(
companyCode
))
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
String
companyCode
=
company
.
getCompanyCode
();
companyCode
=
company
.
getCompanyCode
();
}
String
postName
=
null
;
if
(
type
.
equals
(
"use"
))
{
postName
=
"安全管理员"
;
...
...
@@ -185,6 +187,9 @@ public class CommonServiceImpl implements ICommonService {
if
(
type
.
equals
(
"agw"
))
{
postName
=
"安改维负责人"
;
}
if
(
type
.
equals
(
"wbry"
))
{
postName
=
"维保人员"
;
}
return
ObjectUtils
.
isEmpty
(
postName
)
?
new
ArrayList
<>()
:
commonMapper
.
getSecurityAdmin
(
companyCode
,
postName
);
}
...
...
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/JgChangeRegistrationReformServiceImpl.java
View file @
4e9b721c
...
...
@@ -40,10 +40,7 @@ import org.springframework.stereotype.Service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* 改造变更登记服务实现类
...
...
@@ -106,20 +103,21 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
UseInfo
useInfo
=
new
UseInfo
();
BeanUtil
.
copyProperties
(
map
,
useInfo
);
String
equipId
=
map
.
get
(
"record"
).
toString
();
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
lambda
.
eq
(
UseInfo:
:
getRecord
,
map
.
get
(
"record"
)
);
lambda
.
eq
(
UseInfo:
:
getRecord
,
equipId
);
// 更新使用信息
useInfoMapper
.
update
(
useInfo
,
lambda
);
InspectionDetectionInfo
inspectionDetectionInfo
=
new
InspectionDetectionInfo
();
BeanUtil
.
copyProperties
(
map
,
inspectionDetectionInfo
);
LambdaQueryWrapper
<
InspectionDetectionInfo
>
inspectionLambda
=
new
QueryWrapper
<
InspectionDetectionInfo
>().
lambda
();
inspectionLambda
.
eq
(
InspectionDetectionInfo:
:
getRecord
,
map
.
get
(
"record"
)
);
inspectionLambda
.
eq
(
InspectionDetectionInfo:
:
getRecord
,
equipId
);
// 更新检验检测信息
inspectionDetectionInfoMapper
.
update
(
inspectionDetectionInfo
,
inspectionLambda
);
// 使用登记信息
JgChangeRegistrationReform
jgChangeRegistrationReform
=
new
JgChangeRegistrationReform
();
LambdaQueryWrapper
<
OtherInfo
>
otherLambda
=
new
QueryWrapper
<
OtherInfo
>().
lambda
();
otherLambda
.
eq
(
OtherInfo:
:
getRecord
,
map
.
get
(
"record"
)
);
otherLambda
.
eq
(
OtherInfo:
:
getRecord
,
equipId
);
OtherInfo
otherInfo
=
otherInfoMapper
.
selectOne
(
otherLambda
);
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgChangeRegistrationReform
.
setSupervisoryCode
(
supervisoryCode
);
...
...
@@ -144,38 +142,47 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setInspectUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
}
if
(
map
.
containsKey
(
"receiveCompanyCode"
))
{
jgChangeRegistrationReform
.
setReceiveCompanyCode
(
String
.
valueOf
(
map
.
getString
(
"receiveCompanyCode"
)));
String
receiveCompanyCode
=
String
.
valueOf
(
map
.
getString
(
"receiveCompanyCode"
));
jgChangeRegistrationReform
.
setReceiveCompanyCode
(
receiveCompanyCode
);
jgChangeRegistrationReform
.
setReceiveOrgCode
(
receiveCompanyCode
.
split
(
"_"
)[
0
]);
jgChangeRegistrationReform
.
setReceiveOrgName
(
receiveCompanyCode
.
split
(
"_"
)[
1
]);
}
else
{
jgChangeRegistrationReform
.
setReceiveCompanyCode
(
"610000"
);
}
JgRegistrationHistory
jgRegistrationHistory
=
new
JgRegistrationHistory
();
//使用登记编号
jgRegistrationHistory
.
setUseRegistrationCode
(
idxBizJgRegisterInfoMapper
.
getUseOrgCodeByEquip
(
map
.
get
(
"record"
).
toString
()
));
jgRegistrationHistory
.
setUseRegistrationCode
(
idxBizJgRegisterInfoMapper
.
getUseOrgCodeByEquip
(
equipId
));
//登记类别
jgRegistrationHistory
.
setRegistrationClass
(
"改造登记"
);
//设备id
jgRegistrationHistory
.
setEquId
(
map
.
get
(
"record"
).
toString
()
);
jgRegistrationHistory
.
setEquId
(
equipId
);
//修改数据
jgRegistrationHistory
.
setChangeData
(
JSONObject
.
toJSONString
(
map
));
//保存历史数据
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevator
=
idxBizJgTechParamsElevatorMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizJgTechParamsElevator
>().
eq
(
"RECORD"
,
equipId
));
jgRegistrationHistory
.
setOldData
(
JSONObject
.
toJSONString
(
idxBizJgTechParamsElevator
));
//设备监管码
jgRegistrationHistory
.
setSupervisoryCode
(
supervisoryCode
);
//数据状态
jgChangeRegistrationReform
.
setUseRegistrationCode
(
jgRegistrationHistory
.
getUseRegistrationCode
());
jgRegistrationHistory
.
setStatus
(
"new"
);
if
(
map
.
containsKey
(
"type"
)
&&
"edit"
.
equals
(
String
.
valueOf
(
map
.
get
(
"type"
))))
{
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
null
);
jgChangeRegistrationReform
.
setSequenceNbr
(
Long
.
valueOf
(
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
jgRegistrationHistory
.
setSequenceNbr
(
jgRegistrationHistoryMapper
.
getSequenceNbrByEquidAndDocumentId
(
map
.
get
(
"record"
).
toString
()
,
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgRegistrationHistory
.
setSequenceNbr
(
jgRegistrationHistoryMapper
.
getSequenceNbrByEquidAndDocumentId
(
equipId
,
String
.
valueOf
(
map
.
get
(
"sequenceNbr"
))));
jgRegistrationHistoryMapper
.
updateById
(
jgRegistrationHistory
);
}
else
{
// 业务管理设备信息保存
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
new
JgChangeRegistrationReformEq
();
jgChangeRegistrationReformEq
.
setEquId
(
map
.
get
(
"record"
).
toString
()
);
jgChangeRegistrationReformEq
.
setEquId
(
equipId
);
List
<
String
>
applicationFormCode
=
iCreateCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
GZBG
.
getCode
(),
1
);
jgChangeRegistrationReform
.
setApplyNo
(
applicationFormCode
.
get
(
0
));
jgChangeRegistrationReform
.
setAuditStatus
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getPass
());
jgChangeRegistrationReform
.
setStatus
(
WorkFlowStatusEnum
.
CHANGE_SUBMIT
.
getPass
());
jgChangeRegistrationReform
.
setRegDate
(
new
Date
());
this
.
save
(
jgChangeRegistrationReform
);
jgChangeRegistrationReformEq
.
setEquipTransferId
(
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
());
jgChangeRegistrationReformEqMapper
.
insert
(
jgChangeRegistrationReformEq
);
...
...
@@ -186,7 +193,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
String
instanceId
=
""
;
if
(
map
.
containsKey
(
"instanceId"
))
{
if
(
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"instanceId"
)
))
{
instanceId
=
map
.
get
(
"instanceId"
).
toString
();
}
else
{
// 启动并执行流程
...
...
@@ -270,7 +277,9 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setAuditStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgChangeRegistrationReform
.
setStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
jgChangeRegistrationReformEqMapper
.
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
eq
(
"equip_transfer_id"
,
jgChangeRegistrationReform
.
getSequenceNbr
()));
updateTechparamsByEquIdAndCurrentDoucumentId
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
(),
jgChangeRegistrationReform
.
getSupervisoryCode
());
String
newUseRegistrationCertificateNumber
=
getCode
(
jgChangeRegistrationReform
.
getSupervisoryCode
());
jgChangeRegistrationReform
.
setUseRegistrationCode
(
newUseRegistrationCertificateNumber
);
updateTechparamsByEquIdAndCurrentDoucumentId
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
(),
newUseRegistrationCertificateNumber
);
}
this
.
getBaseMapper
().
updateById
(
jgChangeRegistrationReform
);
}
...
...
@@ -425,14 +434,21 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
public
Map
<
String
,
Object
>
getDetail
(
String
currentDocumentId
,
String
equipId
)
{
JgChangeRegistrationReform
jgChangeRegistrationReform
=
this
.
getBaseMapper
().
selectById
(
currentDocumentId
);
if
(
ObjectUtils
.
isEmpty
(
equipId
)){
equipId
=
jgChangeRegistrationReformEqMapper
.
selectEquipId
(
currentDocumentId
);
}
Map
<
String
,
Object
>
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jgChangeRegistrationReform
),
Map
.
class
);
Map
<
String
,
Object
>
originalData
=
new
HashMap
<>();
if
((
detail
.
get
(
"status"
).
equals
(
"已完成"
)
||
detail
.
get
(
"status"
).
equals
(
"流程结束"
)))
{
originalData
=
idxBizJgRegisterInfoService
.
getDetailFieldCamelCaseByRecord
(
equipId
);
originalData
.
remove
(
"sequenceNbr"
);
if
(!
ObjectUtils
.
isEmpty
(
detail
.
get
(
"transformationQualityCertificate"
))){
detail
.
put
(
"transformationQualityCertificate"
,
JSONObject
.
parse
(
detail
.
get
(
"transformationQualityCertificate"
).
toString
()));
}
if
(!
ObjectUtils
.
isEmpty
(
detail
.
get
(
"renovationSupervisioninspectionCertificate"
))){
detail
.
put
(
"renovationSupervisioninspectionCertificate"
,
JSONObject
.
parse
(
detail
.
get
(
"renovationSupervisioninspectionCertificate"
).
toString
()));
}
}
else
{
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
QueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
"equ_id"
,
equipId
)
...
...
@@ -464,8 +480,8 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
* @param equipId
* @param currentDocumentId
*/
public
void
updateTechparamsByEquIdAndCurrentDoucumentId
(
String
equipId
,
String
currentDocumentId
,
String
supervisoryCode
)
{
String
newUseRegistrationCertificateNumber
=
getCode
(
supervisoryCode
);
public
void
updateTechparamsByEquIdAndCurrentDoucumentId
(
String
equipId
,
String
currentDocumentId
,
String
newUseRegistrationCertificateNumber
)
{
IdxBizJgTechParamsElevator
idxBizJgTechParamsElevator
=
idxBizJgTechParamsElevatorMapper
.
selectOne
(
new
QueryWrapper
<
IdxBizJgTechParamsElevator
>().
eq
(
"RECORD"
,
equipId
));
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryMapper
.
selectOne
(
new
QueryWrapper
<
JgRegistrationHistory
>()
.
eq
(
"equ_id"
,
equipId
)
...
...
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/JgEquipTransferServiceImpl.java
View file @
4e9b721c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.map.MapBuilder
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -31,7 +30,6 @@ import org.apache.commons.lang3.ObjectUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -52,8 +50,7 @@ import java.util.stream.Collectors;
@Service
public
class
JgEquipTransferServiceImpl
extends
BaseService
<
JgEquipTransferDto
,
JgEquipTransfer
,
JgEquipTransferMapper
>
implements
IJgEquipTransferService
{
@Value
(
"${workflow.process-definition-key.equip-transfer:}"
)
private
String
equipTransferProcessKey
;
private
static
final
String
EQUIP_TRANSFER_PROCESS_KEY
=
"equipmentHandover"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
@Autowired
...
...
@@ -98,7 +95,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
for
(
int
i
=
0
;
i
<
deviceList
.
size
()
;
i
++
)
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
equipTransferProcessKey
);
dto
.
setProcessDefinitionKey
(
EQUIP_TRANSFER_PROCESS_KEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
list
.
add
(
dto
);
}
...
...
@@ -156,10 +153,14 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setApplyDate
(
new
Date
());
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setApplyStatus
(
taskName
[
0
]);
}
jgEquipTransferEq
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgEquipTransferEq
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
...
...
@@ -196,27 +197,6 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
}
}
public
Map
<
String
,
Object
>
getNextWorkflowNode
(
String
instanceId
)
{
String
role
=
""
;
String
taskName
=
"流程结束"
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
AjaxResult
taskNoAuth
=
Workflow
.
taskClient
.
getTaskNoAuth
(
instanceId
);
if
(!
org
.
springframework
.
util
.
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
());
}
}
}
role
=
String
.
join
(
","
,
roleList
);
return
MapBuilder
.<
String
,
Object
>
create
().
put
(
"taskName"
,
taskName
).
put
(
"role"
,
role
).
build
();
}
void
getNext
(
ArrayList
<
String
>
roleListFirst
,
String
instanceId
,
String
[]
taskName
)
{
AjaxResult
aj
=
Workflow
.
taskClient
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
aj
.
get
(
"data"
)));
...
...
@@ -242,7 +222,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
public
String
startFlow
(
String
businessKey
)
throws
Exception
{
// 重新开启工作流
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
equipTransferProcessKey
);
dto
.
setProcessDefinitionKey
(
EQUIP_TRANSFER_PROCESS_KEY
);
dto
.
setBusinessKey
(
StringUtils
.
defaultString
(
businessKey
,
"1"
));
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
...
...
@@ -283,7 +263,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
return
null
;
}
Map
<
String
,
Object
>
equipTransferInfo
=
createEquipTransferInfo
(
equipTransfer
);
Map
<
String
,
Object
>
equipTransferInfo
=
new
HashMap
<>(
);
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
...
...
@@ -295,9 +275,9 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
handleJsonArrayFields
(
equipmentInfos
.
get
(
0
),
fields
);
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
resultMap
.
put
(
"transferInfo"
,
equipmentInfos
.
get
(
0
)
);
equipTransferInfo
.
forEach
((
key
,
value
)
->
resultMap
.
computeIfAbsent
(
key
,
k
->
value
));
resultMap
.
put
All
(
equipTransferInfo
);
resultMap
.
putAll
(
equipmentInfos
.
get
(
0
));
resultMap
.
putAll
(
createEquipTransferInfo
(
equipTransfer
));
return
resultMap
;
}
...
...
@@ -309,8 +289,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
private
Map
<
String
,
Object
>
createEquipTransferInfo
(
JgEquipTransfer
equipTransfer
)
{
Map
<
String
,
Object
>
equipTransferInfo
=
new
HashMap
<>(
BeanUtil
.
beanToMap
(
equipTransfer
));
//equipTransferInfo.put("useUnitCreditCode", equipTransfer.getUseUnitCreditCode() + "_" + equipTransfer.getUseUnitName());
//equipTransferInfo.put("installUnitCreditCode", equipTransfer.getInstallUnitCreditCode() + "_" + equipTransfer.getInstallUnitName());
equipTransferInfo
.
put
(
"installUnitCreditCode"
,
equipTransfer
.
getInstallUnitCreditCode
()
+
"_"
+
equipTransfer
.
getInstallUnitName
());
return
equipTransferInfo
;
}
...
...
@@ -324,6 +303,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
String
[]
taskName
=
new
String
[]{
"流程结束"
};
String
userId
=
RequestContext
.
getExeUserId
();
JgEquipTransfer
jgEquipTransfer
=
this
.
baseMapper
.
selectById
(
jgEquipTransferDto
.
getSequenceNbr
());
jgEquipTransfer
.
setProcessAdvice
(
jgEquipTransferDto
.
getProcessAdvice
());
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
...
...
@@ -343,7 +323,6 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
if
(
roleList
.
isEmpty
())
{
jgEquipTransfer
.
setApplyStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
jgEquipTransfer
.
setPromoter
(
""
);
//TODO
}
else
{
jgEquipTransfer
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
if
(!
ObjectUtils
.
isEmpty
(
jgEquipTransfer
.
getInstanceStatus
()))
{
...
...
@@ -357,8 +336,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
}
else
{
//驳回
jgEquipTransfer
.
setPromoter
(
""
);
jgEquipTransfer
.
setApplyStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgEquipTransfer
.
setInstanceStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
jgEquipTransfer
.
setApplyStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
}
updateById
(
jgEquipTransfer
);
}
...
...
@@ -392,6 +370,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
JgEquipTransfer
equipTransfer
=
this
.
baseMapper
.
selectById
(
equipTransferInfo
.
getSequenceNbr
());
if
(
ajaxResult
.
getStatus
()
==
200
)
{
equipTransfer
.
setApplyStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
equipTransfer
.
setPromoter
(
""
);
this
.
baseMapper
.
updateById
(
equipTransfer
);
}
}
...
...
@@ -411,7 +390,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,J
// 发起流程
if
(!
org
.
springframework
.
util
.
StringUtils
.
hasText
(
equipTransferDto
.
getInstanceId
()))
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
equipTransferProcessKey
);
dto
.
setProcessDefinitionKey
(
EQUIP_TRANSFER_PROCESS_KEY
);
dto
.
setBusinessKey
(
"1"
);
try
{
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
...
...
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 @
4e9b721c
...
...
@@ -142,7 +142,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
// 设备信息
// 设备信息
"equCategory", "equDefine", "equRegisterCode", "produceCountry", "produceLicenseNum",
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgMaintainNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
if
(
maintainInfo
.
containsKey
(
s
))
...
...
@@ -242,7 +242,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
if
(
Objects
.
nonNull
(
notice
.
getMaintainType
()))
{
noticeDto
.
setMaintainTypeDesc
(
dictionaries
.
stream
().
filter
(
d
->
notice
.
getMaintainType
().
equals
(
d
.
getCode
())).
map
(
DataDictionary:
:
getName
).
collect
(
Collectors
.
joining
()));
}
noticeDto
.
setFullAddress
(
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getC
i
tyName
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
noticeDto
.
setFullAddress
(
notice
.
getProvinceName
()
+
notice
.
getCityName
()
+
notice
.
getC
oun
tyName
()
+
notice
.
getStreetName
()
+
notice
.
getAddress
());
return
noticeDto
;
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
noticeDtoPage
.
setRecords
(
records
);
...
...
@@ -432,7 +432,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
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
);
...
...
@@ -464,6 +464,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setEquCategory
(
String
.
valueOf
(
obj
.
get
(
"EQU_CATEGORY"
)));
dto
.
setEquListCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_LIST_CODE"
)));
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
...
...
@@ -480,6 +482,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
else
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
list
.
add
(
dto
);
equipList
.
add
(
jgRelationEquip
);
});
...
...
@@ -602,7 +605,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"提交流程"
);
//
dto.setComment("提交流程");
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
dto
.
setVariable
(
map
);
...
...
@@ -631,7 +634,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
jgInstallationNotice
.
setStatus
(
taskName
[
0
]);
jgInstallationNotice
.
setPromoter
(
""
);
jgInstallationNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
ROLLBACK
.
getCode
()));
updateById
(
jgInstallationNotice
);
}
}
...
...
@@ -667,6 +670,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
map
.
put
(
"cityCode"
,
jgMaintainNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgMaintainNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
jgMaintainNotice
.
setAcceptDate
(
new
Date
());
jgMaintainNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
generateMaintainNoticeReport
(
jgMaintainNotice
.
getSequenceNbr
());
jgMaintainNotice
.
setPromoter
(
""
);
...
...
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 @
4e9b721c
...
...
@@ -27,6 +27,7 @@ import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
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.service.ICreateCodeService
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
...
...
@@ -41,6 +42,7 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.awt.print.Book
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -53,6 +55,7 @@ import java.util.stream.Collectors;
@Service
public
class
JgMaintenanceContractServiceImpl
extends
BaseService
<
JgMaintenanceContractDto
,
JgMaintenanceContract
,
JgMaintenanceContractMapper
>
implements
IJgMaintenanceContractService
{
public
static
final
String
SUBMIT_DATA
=
"0"
;
public
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
static
final
String
WB_PROCESS_DEFINITION_KEY
=
"maintenanceFiling"
;
private
static
final
String
HANDLING_STATUS_DICTIONARY
=
"JGGZZZ"
;
...
...
@@ -79,8 +82,13 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
*/
public
Page
<
JgMaintenanceContractVo
>
queryForPage
(
Page
<
JgMaintenanceContract
>
page
,
int
phase
,
JgMaintenanceContractDto
dto
,
// JgMaintenanceContractDto dto,
Map
<
String
,
Object
>
map
,
ReginParams
reginParams
)
{
// JgMaintenanceContractDto dto = new JgMaintenanceContractDto();
// JgMaintenanceContractDto dto = (JgMaintenanceContractDto)map;
JgMaintenanceContractDto
dto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
map
.
get
(
"jgMaintenanceContractDto"
)),
JgMaintenanceContractDto
.
class
);
Page
<
JgMaintenanceContractDto
>
contractList
=
new
Page
<>();
Page
<
JgMaintenanceContractVo
>
result
=
new
Page
<>();
CompanyBo
company
=
reginParams
.
getCompany
();
...
...
@@ -308,7 +316,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
@Transactional
public
void
revocation
(
String
instanceId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
task
Nam
e
=
""
;
String
task
Cod
e
=
""
;
JgMaintenanceContract
jgMaintenanceContract
=
new
JgMaintenanceContract
();
LambdaQueryWrapper
<
JgMaintenanceContract
>
lambda
=
new
QueryWrapper
<
JgMaintenanceContract
>().
lambda
();
lambda
.
eq
(
JgMaintenanceContract:
:
getInstanceId
,
instanceId
);
...
...
@@ -317,9 +325,13 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
task
Nam
e
=
nextTask
.
getString
(
"name"
);
task
Cod
e
=
nextTask
.
getString
(
"name"
);
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
...
...
@@ -331,9 +343,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
ObjectUtils
.
isEmpty
(
task
Nam
e
))
{
if
(!
ObjectUtils
.
isEmpty
(
task
Cod
e
))
{
jgMaintenanceContract
.
setStatus
(
MaintenceStatusEnum
.
getMessage
(
taskNam
e
).
getRollBack
());
jgMaintenanceContract
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getRollBack
());
}
String
join
=
String
.
join
(
","
,
roleList
);
jgMaintenanceContract
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
...
@@ -374,6 +386,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
// 新增编辑
if
(
"add"
.
equals
(
String
.
valueOf
(
map
.
get
(
"pageType"
))))
{
contract
.
setStatus
(
SUBMIT_DATA
.
equals
(
submit
)
?
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getPass
()
:
WorkFlowStatusEnum
.
MAIN_RECEIVE
.
getPass
());
this
.
save
(
contract
);
}
else
{
this
.
getBaseMapper
().
updateById
(
contract
);
...
...
@@ -414,16 +427,20 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
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
task
Name
=
"流程结束"
;
String
task
Code
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()
;
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
JgMaintenanceContract
jgMaintenanceContract
=
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"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
...
...
@@ -435,7 +452,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
"流程结束"
.
equals
(
taskNam
e
)){
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCod
e
)){
role
=
String
.
join
(
","
,
roleList
);
jgMaintenanceContract
.
setNextExecuteIds
(
role
);
jgMaintenanceContract
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
...
@@ -447,15 +464,15 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
if
(
"0"
.
equals
(
operate
)){
// 通过操作
jgMaintenanceContract
.
setStatus
(
MaintenceStatusEnum
.
getMessage
(
taskNam
e
).
getPass
());
jgMaintenanceContract
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getPass
());
}
else
{
// 驳回操作
jgMaintenanceContract
.
setStatus
(
MaintenceStatusEnum
.
getMessage
(
taskNam
e
).
getReject
());
jgMaintenanceContract
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getReject
());
jgMaintenanceContract
.
setPromoter
(
null
);
}
}
else
{
jgMaintenanceContract
.
setStatus
(
task
Nam
e
);
jgMaintenanceContract
.
setStatus
(
task
Cod
e
);
}
this
.
getBaseMapper
().
updateById
(
jgMaintenanceContract
);
...
...
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 @
4e9b721c
...
...
@@ -452,7 +452,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
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
);
...
...
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 @
4e9b721c
...
...
@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
...
@@ -15,17 +16,21 @@ 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.CancelTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.
Cancel
WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
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.biz.service.IIdxBizJgRegisterInfoService
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo
;
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.EquimentEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
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
;
...
...
@@ -121,8 +126,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
[]
taskName
=
new
String
[]{
"流程结束"
};
JSONObject
jgScrapCancelAdd
=
jgInstallationNoticeDtoMap
.
get
(
"jgScrapCancelAdd"
);
String
equipId
=
jgScrapCancelAdd
.
get
(
"
SEQUENCE_NBR
"
).
toString
();
jgScrapCancelAdd
.
remove
(
"
SEQUENCE_NBR
"
);
String
equipId
=
jgScrapCancelAdd
.
get
(
"
record
"
).
toString
();
jgScrapCancelAdd
.
remove
(
"
record
"
);
JgScrapCancelDto
model
=
JSON
.
parseObject
(
jgScrapCancelAdd
.
toJSONString
(),
JgScrapCancelDto
.
class
);
model
.
setSEQUENCE_NBR
(
equipId
);
...
...
@@ -190,6 +195,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
getNext
(
roleListSecond
,
instanceId
,
taskName
);
roleListFirst
.
addAll
(
roleListSecond
);
}
else
{
log
.
error
(
"提交失败"
);
}
...
...
@@ -215,14 +221,14 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setStatus
(
taskName
[
0
]);
//
dto.setStatus(taskName[0]);
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipTransferId
(
applyNo
);
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setAuditStatus
(
String
.
valueOf
(
CancelWorkFlowStatusEnum
.
RECEIVE
.
getPass
()));
dto
.
setAuditStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
CANCEL_
RECEIVE
.
getPass
()));
}
else
{
dto
.
setAuditStatus
(
String
.
valueOf
(
CancelWorkFlowStatusEnum
.
SUBMIT
.
getPass
()));
dto
.
setAuditStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
CANCEL_
SUBMIT
.
getPass
()));
}
dto
.
setUseUnitCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
...
...
@@ -276,14 +282,19 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
jgScrapCancel
);
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
jgScrapCancel
,
"useUnitName"
,
"useUnitName"
);
boolean
submit
=
submit
(
jgScrapCancel
,
op
);
LambdaUpdateWrapper
<
JgScrapCancelEq
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
jgScrapCancel
.
getSequenceNbr
());
JgScrapCancelEq
jgScrapCancelEq
=
new
JgScrapCancelEq
();
jgScrapCancelEq
.
setEquId
(
jgScrapCancelDto
.
getRecord
());
jgScrapCancelEqMapper
.
update
(
jgScrapCancelEq
,
updateWrapper
);
if
(
submit
)
{
// 查询下节点任务
getNext
(
roleListSecond
,
jgScrapCancel
.
getInstanceId
(),
taskName
);
String
join
=
String
.
join
(
","
,
roleListSecond
);
jgScrapCancel
.
setStatus
(
taskName
[
0
]);
//
jgScrapCancel.setStatus(taskName[0]);
if
(!
ObjectUtils
.
isEmpty
(
jgScrapCancel
.
getInstanceStatus
()))
{
jgScrapCancel
.
setInstanceStatus
(
jgScrapCancel
.
getInstanceStatus
()
+
","
+
join
);
}
else
{
...
...
@@ -291,13 +302,18 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
jgScrapCancel
.
setPromoter
(
RequestContext
.
getExeUserId
());
jgScrapCancel
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
jgScrapCancel
.
setAuditStatus
(
String
.
valueOf
(
CancelWorkFlowStatusEnum
.
RECEIVE
.
getPass
()));
jgScrapCancel
.
setAuditStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
CANCEL_
RECEIVE
.
getPass
()));
this
.
updateById
(
jgScrapCancel
);
}
}
else
{
JgScrapCancel
bean
=
new
JgScrapCancel
();
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
bean
);
this
.
updateById
(
bean
);
LambdaUpdateWrapper
<
JgScrapCancelEq
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
bean
.
getSequenceNbr
());
JgScrapCancelEq
jgScrapCancelEq
=
new
JgScrapCancelEq
();
jgScrapCancelEq
.
setEquId
(
jgScrapCancelDto
.
getRecord
());
jgScrapCancelEqMapper
.
update
(
jgScrapCancelEq
,
updateWrapper
);
}
return
jgScrapCancelDto
;
}
...
...
@@ -346,6 +362,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
}
@Autowired
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
;
@Autowired
IIdxBizJgRegisterInfoService
idxBizJgRegisterInfoService
;
public
Map
<
String
,
Object
>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 安装告知信息
...
...
@@ -360,17 +381,26 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
lambdaEq
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
sequenceNbr
);
JgScrapCancelEq
jgScrapCancelEq
=
jgScrapCancelEqMapper
.
selectOne
(
lambdaEq
);
// 设备信息
installationInfo
.
put
(
"SEQUENCE_NBR"
,
jgScrapCancelEq
.
getEquId
());
installationInfo
.
put
(
"record"
,
jgScrapCancelEq
.
getEquId
());
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgScrapCancelEq
.
getEquId
());
queryWrapper
.
last
(
"limit 1"
);
IdxBizJgRegisterInfo
one
=
idxBizJgRegisterInfoMapper
.
selectOne
(
queryWrapper
);
installationInfo
.
put
(
"equCode"
,
one
.
getEquCode
());
Map
<
String
,
Object
>
detailFieldCamelCaseByRecord
=
idxBizJgRegisterInfoService
.
getDetailFieldCamelCaseByRecord
(
jgScrapCancelEq
.
getEquId
());
// Map<String, Object> equipmentInfos = this.baseMapper.queryEquipInformation(sequenceNbr);
BeanUtil
.
copyProperties
(
installationInfo
,
detailFieldCamelCaseByRecord
);
return
new
HashMap
<
String
,
Object
>()
{{
this
.
put
(
"jgScrapCancelAdd"
,
installationInfo
);
this
.
put
(
"jgScrapCancelAdd"
,
detailFieldCamelCaseByRecord
);
}};
}
public
void
revocation
(
String
instanceId
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
taskName
=
""
;
// String taskName = "";
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
LambdaQueryWrapper
<
JgScrapCancel
>
lambda
=
new
QueryWrapper
<
JgScrapCancel
>().
lambda
();
lambda
.
eq
(
JgScrapCancel:
:
getInstanceId
,
instanceId
);
...
...
@@ -379,9 +409,13 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
workFlowFeginService
.
rollBack
(
instanceId
);
JSONObject
taskNoAuth
=
workFlowFeginService
.
getTaskNoAuth
(
instanceId
);
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
taskName
=
nextTask
.
getString
(
"name"
);
//
taskName = nextTask.getString("name");
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
...
...
@@ -393,8 +427,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
ObjectUtils
.
isEmpty
(
taskNam
e
))
{
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
getMessage
(
taskNam
e
).
getRollBack
());
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCod
e
))
{
jgScrapCancel
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getRollBack
());
}
String
join
=
String
.
join
(
","
,
roleList
);
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
...
@@ -430,7 +464,8 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
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
=
"流程结束"
;
// String taskName = "流程结束";
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
JgScrapCancel
jgScrapCancel
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
try
{
...
...
@@ -439,7 +474,10 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
.
get
(
"data"
)))
{
JSONObject
nextTask
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskNoAuth
.
get
(
"data"
)));
String
nextTaskId
=
nextTask
.
getString
(
"id"
);
taskName
=
nextTask
.
getString
(
"name"
);
FeignClientResult
<
JSONObject
>
nodeInfo
=
workFlowFeginService
.
getNodeInfo
(
nextTaskId
);
JSONObject
result
=
nodeInfo
.
getResult
();
Map
<
String
,
Object
>
taskInfo
=
(
Map
<
String
,
Object
>)
result
.
get
(
"taskInfo"
);
taskCode
=
String
.
valueOf
(
taskInfo
.
get
(
"taskDefinitionKey"
));
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
...
...
@@ -451,7 +489,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
if
(!
"流程结束"
.
equals
(
taskNam
e
))
{
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCod
e
))
{
role
=
String
.
join
(
","
,
roleList
);
jgScrapCancel
.
setNextExecuteIds
(
role
);
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
...
...
@@ -463,10 +501,10 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
if
(
"0"
.
equals
(
operate
))
{
// 通过操作
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
getMessage
(
taskNam
e
).
getPass
());
jgScrapCancel
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getPass
());
}
else
{
// 驳回操作
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
getMessage
(
taskNam
e
).
getReject
());
jgScrapCancel
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCod
e
).
getReject
());
jgScrapCancel
.
setPromoter
(
null
);
}
}
else
{
...
...
@@ -500,7 +538,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
resultMap
.
put
(
jgScrapCancelEq
.
getEquId
(),
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
resultMap
);
jgScrapCancel
.
setAuditStatus
(
CancelWorkFlowStatusEnum
.
COMPLETE
.
getName
());
jgScrapCancel
.
setAuditStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgScrapCancel
.
setAuditPassDate
(
new
Date
());
}
this
.
getBaseMapper
().
updateById
(
jgScrapCancel
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
View file @
4e9b721c
...
...
@@ -42,10 +42,7 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* 服务实现类
...
...
@@ -97,6 +94,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper
<
InspectionDetectionInfo
>
inspectionLambda
=
new
QueryWrapper
<
InspectionDetectionInfo
>().
lambda
();
inspectionLambda
.
eq
(
InspectionDetectionInfo:
:
getRecord
,
map
.
get
(
"equipId"
));
// 更新检验检测信息
inspectionDetectionInfo
.
setInspectReport
(
null
);
inspectionDetectionInfoMapper
.
update
(
inspectionDetectionInfo
,
inspectionLambda
);
// 使用登记信息
JgUseRegistration
jgUseRegistration
=
new
JgUseRegistration
();
...
...
@@ -271,6 +269,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getSupervisoryCode
()))
{
// 生成使用登记证编号
jgUseRegistration
.
setUseRegistrationCode
(
getCode
(
jgUseRegistration
.
getSupervisoryCode
()));
jgUseRegistration
.
setRegDate
(
new
Date
());
}
}
this
.
getBaseMapper
().
updateById
(
jgUseRegistration
);
...
...
@@ -375,18 +374,21 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
this
.
update
(
jgUseRegistration
,
lambda
);
}
public
Map
<
String
,
Object
>
getDetail
(
String
id
)
{
public
Map
<
String
,
Object
>
getDetail
(
String
id
,
Long
sequenceNbr
)
{
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"))));
detail
.
put
(
"inspectReport"
,
JSON
.
parse
(
String
.
valueOf
(
detail
.
get
(
"inspectReport"
))));
if
(!
ObjectUtils
.
isEmpty
(
sequenceNbr
)){
JgUseRegistration
jgUseRegistration
=
this
.
getBaseMapper
().
selectById
(
sequenceNbr
);
detail
.
put
(
"receiveOrgCode"
,
jgUseRegistration
.
getReceiveCompanyCode
());
}
return
detail
;
}
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/CommonController.java
View file @
4e9b721c
...
...
@@ -18,6 +18,7 @@ import java.util.Collections;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author system_generator
...
...
@@ -46,14 +47,32 @@ public class CommonController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getUserPhonesByPersonCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据公司的unitCode获取检测检验人员
列表"
,
notes
=
"根据公司的unitCode获取检测检验人员列表
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据公司的unitCode获取检测检验人员
联系电话"
,
notes
=
"根据公司的unitCode获取检测检验人员联系电话
"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserPhonesByPersonCode
(
@RequestParam
String
unitCode
)
{
List
<
TzsUserInfo
>
userPhones
=
commonserviceImpl
.
getUserPhonesByPersonCode
(
unitCode
);
if
(
CollectionUtils
.
isEmpty
(
userPhones
)){
return
null
;
}
List
<
String
>
phones
=
userPhones
.
stream
().
map
(
TzsUserInfo:
:
getPhone
).
collect
(
Collectors
.
toList
());
String
phone
=
String
.
join
(
","
,
phones
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"phone"
,
phone
);
return
ResponseHelper
.
buildResponse
(
map
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/getInnerPersonCodeByPersonCode"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据公司的unitCode获取检测检验人员内部编号"
,
notes
=
"根据公司的unitCode获取检测检验人员内部编号"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getInnerPersonCodeByPersonCode
(
@RequestParam
String
unitCode
)
{
List
<
TzsUserInfo
>
userPhones
=
commonserviceImpl
.
getUserPhonesByPersonCode
(
unitCode
);
if
(
CollectionUtils
.
isEmpty
(
userPhones
)){
return
null
;
}
List
<
String
>
phones
=
userPhones
.
stream
().
map
(
TzsUserInfo:
:
getInnerPersonCode
).
collect
(
Collectors
.
toList
());
String
innerPersonCode
=
String
.
join
(
","
,
phones
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"
phone"
,
userPhones
.
get
(
0
).
getPhone
()
==
null
?
""
:
userPhones
.
get
(
0
).
getPhone
()
);
map
.
put
(
"
innerPersonCode"
,
innerPersonCode
);
return
ResponseHelper
.
buildResponse
(
map
);
}
...
...
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/controller/JyjcOpeningApplicationController.java
View file @
4e9b721c
...
...
@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jyjc.biz.service.impl.JyjcOpeningApplicationServiceImpl
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -75,6 +76,10 @@ public class JyjcOpeningApplicationController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"保存并提交"
,
notes
=
"保存并提交"
)
public
ResponseModel
<
JyjcOpeningApplicationModel
>
updateBySequenceNbrAndStartFlow
(
@RequestBody
JyjcOpeningApplicationModel
model
,
@RequestParam
(
value
=
"sequenceNbr"
,
required
=
false
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
JyjcOpeningApplicationModel
jyjcOpeningApplicationModel
=
jyjcOpeningApplicationServiceImpl
.
queryDetail
(
sequenceNbr
);
if
(
jyjcOpeningApplicationModel
==
null
||
ValidationUtil
.
isEmpty
(
jyjcOpeningApplicationModel
.
getBaseUnitLicences
())
||
ValidationUtil
.
isEmpty
(
jyjcOpeningApplicationModel
.
getUserInfos
()))
{
throw
new
BadRequest
(
"企业资质信息和检验人员信息为空,无法提交!"
);
}
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
saveOrUpdateModel
(
model
,
true
));
}
...
...
@@ -242,4 +247,23 @@ public class JyjcOpeningApplicationController extends BaseController {
public
ResponseModel
<
List
<
TzBaseEnterpriseInfo
>>
getInspectionUnitList
()
{
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
getInspectionUnitList
());
}
/**
* 作废
*
*
* @param
* @return {@link ResponseModel< List< TzBaseEnterpriseInfo>>}
* @author yangyang
* @throws
* @date 2023/12/22 16:13
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/discard"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"作废"
,
notes
=
"作废"
)
public
ResponseModel
<
Boolean
>
doDiscard
(
@RequestBody
Map
<
String
,
Object
>
params
)
{
String
sequenceNbr
=
(
String
)
params
.
get
(
"sequenceNbr"
);
String
remark
=
(
String
)
params
.
get
(
"remark"
);
return
ResponseHelper
.
buildResponse
(
jyjcOpeningApplicationServiceImpl
.
doDiscard
(
Long
.
parseLong
(
sequenceNbr
),
remark
));
}
}
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/CommonserviceImpl.java
View file @
4e9b721c
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
service
.
impl
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
...
...
@@ -50,8 +51,10 @@ public class CommonserviceImpl {
}
public
List
<
TzsUserInfo
>
getUserPhonesByPersonCode
(
String
personCode
)
{
List
<
String
>
ids
=
StrUtil
.
split
(
personCode
,
","
);
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
userInfoQueryWrapper
.
eq
(
"sequence_nbr"
,
personCode
);
userInfoQueryWrapper
.
in
(
"sequence_nbr"
,
ids
);
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
return
userInfos
;
}
...
...
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 @
4e9b721c
...
...
@@ -209,7 +209,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
/**
* 完成的时候废弃其他
的
* 完成的时候废弃其他
已完成的申请单
*
*
* @param unitCode unitCode
...
...
@@ -225,6 +225,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
}
List
<
Long
>
ids
=
this
.
lambdaQuery
().
select
(
JyjcOpeningApplication:
:
getSequenceNbr
)
.
eq
(
JyjcOpeningApplication:
:
getUnitCode
,
unitCode
)
.
eq
(
JyjcOpeningApplication:
:
getStatus
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())
.
list
().
stream
().
filter
(
o
->
o
.
getSequenceNbr
().
compareTo
(
sequenceNbr
)
!=
0
)
.
map
(
JyjcOpeningApplication:
:
getSequenceNbr
).
collect
(
Collectors
.
toList
());
if
(
ValidationUtil
.
isEmpty
(
ids
))
{
...
...
@@ -235,6 +236,26 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
return
this
.
update
(
updateWrapper
);
}
public
Boolean
doDiscard
(
Long
sequenceNbr
,
String
remark
)
{
if
(
sequenceNbr
==
null
)
{
throw
new
BadRequest
(
"sequenceNbr不能为空!"
);
}
JyjcOpeningApplication
jyjcOpeningApplication
=
jyjcOpeningApplicationMapper
.
selectById
(
sequenceNbr
);
if
(
jyjcOpeningApplication
==
null
)
{
return
false
;
}
if
(!
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()).
equals
(
jyjcOpeningApplication
.
getStatus
()))
{
throw
new
BadRequest
(
"只有已完成的申请单才可以作废!"
);
}
UpdateWrapper
<
JyjcOpeningApplication
>
updateWrapper
=
new
UpdateWrapper
<>();
updateWrapper
.
set
(
"status"
,
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
())
.
set
(
"status_name"
,
FlowStatusEnum
.
TO_BE_DISCARD
.
getName
())
.
set
(
"remark"
,
remark
)
.
eq
(
"SEQUENCE_NBR"
,
sequenceNbr
);
return
this
.
update
(
updateWrapper
);
}
/**
* 分页查询
...
...
@@ -340,7 +361,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 获取检验人员信息
QueryWrapper
userInfoQueryWrapper
=
new
QueryWrapper
<>();
userInfoQueryWrapper
.
eq
(
"unit_code"
,
unitCode
);
userInfoQueryWrapper
.
eq
(
"is_delete"
,
tru
e
);
userInfoQueryWrapper
.
eq
(
"is_delete"
,
fals
e
);
List
<
TzsUserInfo
>
userInfos
=
userInfoMapper
.
selectList
(
userInfoQueryWrapper
);
if
(!
ValidationUtil
.
isEmpty
(
userInfos
))
{
// List<String> codes = userInfos.stream()
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/dto/TzsUserInfoDto.java
View file @
4e9b721c
...
...
@@ -86,4 +86,7 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"任命文件"
)
private
String
appointDoc
;
@ApiModelProperty
(
value
=
"人员内部编码"
)
private
String
innerPersonCode
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/entity/TzsUserInfo.java
View file @
4e9b721c
...
...
@@ -150,4 +150,9 @@ public class TzsUserInfo extends BaseEntity {
*/
@TableField
(
value
=
"equip_type"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
equipType
;
/**
* 内部人员编码
*/
@TableField
(
"inner_person_code"
)
private
String
innerPersonCode
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzBaseEnterpriseInfoController.java
View file @
4e9b721c
...
...
@@ -183,7 +183,7 @@ public class TzBaseEnterpriseInfoController {
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/info"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业端当前登录人所在企业详情"
,
notes
=
"查询企业端当前登录人所在企业详情"
)
public
ResponseModel
<
IPage
<
TzBaseEnterpriseInfoDto
>>
pageInfo
(
PageParam
pageParam
)
{
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
4e9b721c
...
...
@@ -231,12 +231,13 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
String
roles
=
map
.
get
(
"role"
).
toString
();
String
status
=
map
.
get
(
"status"
).
toString
();
String
roleGroupCode
=
map
.
get
(
"roleGroup"
).
toString
();
TzsUserInfo
tzsUserInfo
=
tzsUserInfoMapper
.
selectById
(
sequenceNbr
);
FeignClientResult
<
AgencyUserModel
>
userResult
=
null
;
try
{
AgencyUserModel
agencyUserModel
=
new
AgencyUserModel
();
agencyUserModel
.
setUserName
(
loginName
);
agencyUserModel
.
setRealName
(
loginName
);
agencyUserModel
.
setRealName
(
tzsUserInfo
.
getName
()
);
agencyUserModel
.
setLockStatus
(
status
);
agencyUserModel
.
setPassword
(
pwd
);
agencyUserModel
.
setRePassword
(
pwd
);
...
...
@@ -265,7 +266,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
});
//添加人员管理角色
TzsUserInfo
tzsUserInfo
=
tzsUserInfoMapper
.
selectById
(
sequenceNbr
);
String
post
=
tzsUserInfo
.
getPost
();
if
(
post
.
contains
(
PersonManageRoleEnum
.
code
.
getId
().
toString
())){
String
companyType
=
tzsUserInfoMapper
.
selectCompanyTypeById
(
companySeq
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/controller/RegUnitInfoController.java
View file @
4e9b721c
...
...
@@ -96,7 +96,7 @@ public class RegUnitInfoController extends BaseController {
return
ResponseHelper
.
buildResponse
(
iRegUnitInfoService
.
submit
(
pageId
,
taskId
,
planInstanceId
,
topic
,
tableName
,
kv
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/adminInfo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业管理员信息"
,
notes
=
"查询企业管理员信息"
)
public
ResponseModel
<
RegUnitInfoDto
>
adminInfo
()
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/dto/TzsUserInfoDto.java
View file @
4e9b721c
...
...
@@ -71,5 +71,6 @@ public class TzsUserInfoDto extends BaseDto {
@ApiModelProperty
(
value
=
"年龄"
)
private
Integer
age
;
@ApiModelProperty
(
value
=
"人员内部编码"
)
private
String
innerPersonCode
;
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/entity/TzsUserInfo.java
View file @
4e9b721c
...
...
@@ -117,4 +117,9 @@ public class TzsUserInfo extends BaseEntity {
*/
@TableField
(
"amos_user_id"
)
private
String
amosUserId
;
/**
* 内部人员编码
*/
@TableField
(
"inner_person_code"
)
private
String
innerPersonCode
;
}
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