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
c8ba0810
Commit
c8ba0810
authored
Jan 12, 2024
by
LiuLin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
52aaa3fd
1736333c
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
642 additions
and
157 deletions
+642
-157
BaseController.java
...ejoin/amos/boot/biz/common/controller/BaseController.java
+5
-0
JgInstallationNoticeDto.java
.../amos/boot/module/jg/api/dto/JgInstallationNoticeDto.java
+2
-0
JgEnableDisable.java
...ejoin/amos/boot/module/jg/api/entity/JgEnableDisable.java
+11
-0
JgInstallationNotice.java
.../amos/boot/module/jg/api/entity/JgInstallationNotice.java
+8
-0
BusinessTypeEnum.java
...ejoin/amos/boot/module/jg/api/enums/BusinessTypeEnum.java
+2
-2
CompanyTypeEnum.java
...eejoin/amos/boot/module/jg/api/enums/CompanyTypeEnum.java
+111
-0
JgChangeRegistrationNameMapper.java
.../module/jg/api/mapper/JgChangeRegistrationNameMapper.java
+1
-1
JgMaintenanceContractMapper.java
...oot/module/jg/api/mapper/JgMaintenanceContractMapper.java
+0
-1
IJgInstallationNoticeService.java
...t/module/jg/api/service/IJgInstallationNoticeService.java
+7
-1
JgChangeRegistrationNameMapper.xml
.../main/resources/mapper/JgChangeRegistrationNameMapper.xml
+3
-3
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+16
-4
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+1
-12
JgChangeRegistrationNameController.java
...jg/biz/controller/JgChangeRegistrationNameController.java
+10
-1
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+1
-1
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+27
-24
IdxBizJgRegisterInfoServiceImpl.java
.../jg/biz/service/impl/IdxBizJgRegisterInfoServiceImpl.java
+91
-18
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+5
-5
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+5
-1
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+111
-27
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+167
-39
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+33
-4
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+1
-0
JgMaintenanceContractServiceImpl.java
...jg/biz/service/impl/JgMaintenanceContractServiceImpl.java
+7
-3
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+11
-4
urlInfo.json
...s-boot-module-jg-biz/src/main/resources/json/urlInfo.json
+6
-6
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/controller/BaseController.java
View file @
c8ba0810
...
...
@@ -28,6 +28,11 @@ public class BaseController {
@Autowired
protected
HttpServletRequest
request
;
public
static
final
String
COMPANY_TYPE_COMPANY
=
"company"
;
public
static
final
String
COMPANY_TYPE_SUPERVISION
=
"supervision"
;
/**
* 获取token
**/
...
...
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 @
c8ba0810
...
...
@@ -258,4 +258,6 @@ public class JgInstallationNoticeDto extends BaseDto {
*/
private
String
createUserName
;
private
String
factoryNum
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/entity/JgEnableDisable.java
View file @
c8ba0810
...
...
@@ -136,4 +136,15 @@ public class JgEnableDisable extends BaseEntity {
*/
@TableField
(
value
=
"next_task_id"
)
private
String
nextTaskId
;
@TableField
(
value
=
"create_user_company_name"
)
private
String
createUserCompanyName
;
@TableField
(
exist
=
false
)
private
String
equList
;
@TableField
(
exist
=
false
)
private
String
supervisoryCode
;
}
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 @
c8ba0810
...
...
@@ -414,5 +414,13 @@ public class JgInstallationNotice extends BaseEntity {
@TableField
(
"\"create_user_name\""
)
private
String
createUserName
;
/**
* 设备出场编号
*/
// @TableField("\"factory_num\"")
@TableField
(
exist
=
false
)
private
String
factoryNum
;
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/BusinessTypeEnum.java
View file @
c8ba0810
...
...
@@ -32,8 +32,8 @@ public enum BusinessTypeEnum {
JG_RENOVATION_REGISTRATION
(
"111"
,
"改造变更登记"
),
JG_EQUIPMENT_ST
OP
(
"112-1"
,
"设备启用"
),
JG_EQUIPMENT_ST
ART
(
"112-2"
,
"设备停用"
),
JG_EQUIPMENT_ST
ART
(
"112-1"
,
"设备启用"
),
JG_EQUIPMENT_ST
OP
(
"112-2"
,
"设备停用"
),
JG_EQUIPMENT_MOVE
(
"113-1"
,
"移装报废"
),
JG_EQUIPMENT_CANCEL
(
"113-2"
,
"注销报废"
),
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/enums/CompanyTypeEnum.java
0 → 100644
View file @
c8ba0810
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
api
.
enums
;
import
lombok.Getter
;
import
org.apache.commons.compress.utils.Lists
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
/**
* 业务类型枚举
*
* @author Administrator
*/
@Getter
public
enum
CompanyTypeEnum
{
/**
* 单位类型枚举
*/
SUPERVISION
(
"supervision"
,
"supervision"
,
"监管机构"
),
USE
(
"company"
,
"use"
,
"使用单位"
),
DESIGN
(
"company"
,
"design"
,
"设计单位"
),
MANUFACTURE
(
"company"
,
"manufacture"
,
"制造单位"
),
FILLING
(
"company"
,
"filling"
,
"充装单位"
),
INDIVIDUAL
(
"company"
,
"individual"
,
"个人"
),
CONSTRUCTION
(
"company"
,
"construction"
,
"安装改造维修单位"
),
INSPECTION
(
"company"
,
"inspection"
,
"检验检测机构"
);
private
final
String
level
;
private
final
String
code
;
private
final
String
name
;
CompanyTypeEnum
(
String
level
,
String
code
,
String
name
)
{
this
.
level
=
level
;
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
String
getNameByType
(
String
code
)
{
String
name
=
null
;
for
(
CompanyTypeEnum
enumOne
:
CompanyTypeEnum
.
values
())
{
if
(
enumOne
.
getCode
().
equals
(
code
))
{
name
=
enumOne
.
getName
();
break
;
}
}
return
name
;
}
public
static
String
decideCompanyLevel
(
String
str
)
{
List
<
CompanyTypeEnum
>
typeList
=
getCompanyTypeEnums
(
str
);
if
(
typeList
==
null
)
return
null
;
String
result
;
Set
<
String
>
set
=
new
HashSet
<>();
for
(
CompanyTypeEnum
one
:
typeList
)
{
set
.
add
(
one
.
getLevel
());
}
result
=
String
.
join
(
","
,
set
);
return
result
;
}
private
static
List
<
CompanyTypeEnum
>
getCompanyTypeEnums
(
String
str
)
{
if
(
ValidationUtil
.
isEmpty
(
str
))
{
return
null
;
}
String
companyType
=
null
;
List
<
CompanyTypeEnum
>
typeList
=
Lists
.
newArrayList
();
for
(
CompanyTypeEnum
enumOne
:
CompanyTypeEnum
.
values
())
{
if
(
str
.
contains
(
enumOne
.
getName
()))
{
typeList
.
add
(
enumOne
);
}
}
if
(
ValidationUtil
.
isEmpty
(
typeList
))
{
return
null
;
}
return
typeList
;
}
public
static
String
decideCompanyCode
(
String
str
)
{
List
<
CompanyTypeEnum
>
typeList
=
getCompanyTypeEnums
(
str
);
if
(
typeList
==
null
)
return
null
;
String
result
;
Set
<
String
>
set
=
new
HashSet
<>();
for
(
CompanyTypeEnum
one
:
typeList
)
{
set
.
add
(
one
.
getCode
());
}
result
=
String
.
join
(
","
,
set
);
return
result
;
}
public
static
String
decideCompanyType
(
String
str
)
{
List
<
CompanyTypeEnum
>
typeList
=
getCompanyTypeEnums
(
str
);
if
(
typeList
==
null
)
return
null
;
String
result
;
Set
<
String
>
set
=
new
HashSet
<>();
for
(
CompanyTypeEnum
one
:
typeList
)
{
set
.
add
(
one
.
getName
());
}
result
=
String
.
join
(
","
,
set
);
return
result
;
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgChangeRegistrationNameMapper.java
View file @
c8ba0810
...
...
@@ -24,5 +24,5 @@ public interface JgChangeRegistrationNameMapper extends BaseMapper<JgChangeRegis
void
deleteHistoryInfoById
(
@Param
(
"code"
)
String
code
);
Page
<
Map
<
String
,
Object
>>
getListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"dto"
)
JgChangeRegistrationNameDto
dto
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"
orgCode"
)
String
org
Code
);
Page
<
Map
<
String
,
Object
>>
getListPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
Object
>>
page
,
@Param
(
"dto"
)
JgChangeRegistrationNameDto
dto
,
@Param
(
"roleIds"
)
List
<
String
>
roleIds
,
@Param
(
"
companyCode"
)
String
company
Code
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgMaintenanceContractMapper.java
View file @
c8ba0810
...
...
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgMaintenanceContractDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.vo.EquipMessageVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/service/IJgInstallationNoticeService.java
View file @
c8ba0810
...
...
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
netscape.javascript.JSObject
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Map
;
...
...
@@ -69,4 +68,11 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @return pdf文件路径
*/
void
generateInstallationNoticeReport
(
Long
sequenceNbr
,
HttpServletResponse
response
);
/**
* 获取登录人所在企业类型
*
* @return
*/
Map
<
String
,
Object
>
getCompanyType
();
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationNameMapper.xml
View file @
c8ba0810
...
...
@@ -56,10 +56,10 @@
</foreach>
</if>
<if
test=
"dto.type == 'supervision'"
>
AND ur.receive_org_code = #{
org
Code}
AND ur.receive_org_code = #{
company
Code}
</if>
<if
test=
"dto.type == '
enterprise'
"
>
and ur.use_unit_credit_code = #{
org
Code}
<if
test=
"dto.type == '
company'
"
>
and ur.use_unit_credit_code = #{
dto.useUnitCredit
Code}
</if>
</where>
order by ur.rec_date desc
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
c8ba0810
...
...
@@ -51,9 +51,15 @@
AND isn.receive_org_credit_code = #{orgCode}
AND isn.instance_id is not null
</if>
<if
test=
"type == '
enterprise
'"
>
<if
test=
"type == '
company
'"
>
AND isn.install_unit_credit_code = #{orgCode}
</if>
<if
test=
"type == 'testAdmin'"
>
((AND isn.receive_org_credit_code = #{orgCode}
AND isn.instance_id is not null)
or
AND isn.install_unit_credit_code = #{orgCode})
</if>
</where>
ORDER BY
isn.create_date DESC
...
...
@@ -75,10 +81,13 @@
isn.install_leader_name AS installLeaderName,
isn.install_leader_phone AS installLeaderPhone,
isn.use_unit_name AS useUnitName,
tec2.name AS equCategory,
tec1.name AS equList,
tec.name AS equDefine,
isn.equ_register_code AS equRegisterCode,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
...
...
@@ -118,6 +127,9 @@
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
LEFT JOIN amos_tzs_biz.tz_equipment_category tec ON ri."EQU_CATEGORY"::text = tec.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec1 ON ri."EQU_LIST"::text = tec1.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec2 ON ri."EQU_DEFINE"::text = tec2.code::text
WHERE
isn.sequence_nbr = #{sequenceNbr}
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 @
c8ba0810
...
...
@@ -3,27 +3,20 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
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.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -199,8 +192,4 @@ public class CommonController extends BaseController {
return
ResponseHelper
.
buildResponse
(
""
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgChangeRegistrationNameController.java
View file @
c8ba0810
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -40,6 +41,7 @@ public class JgChangeRegistrationNameController extends BaseController {
@Autowired
JgChangeRegistrationNameServiceImpl
jgChangeRegistrationNameService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增/新增并提交"
,
notes
=
"新增/新增并提交"
)
...
...
@@ -109,7 +111,14 @@ public class JgChangeRegistrationNameController extends BaseController {
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
Map
<
String
,
Object
>>
page
=
new
Page
<>(
current
,
size
);
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationNameService
.
getList
(
dto
,
page
,
dto
.
getRoleIds
()));
ReginParams
reginParams
=
getSelectedOrgInfo
();
if
(
reginParams
.
getCompany
().
getLevel
().
equals
(
COMPANY_TYPE_COMPANY
)){
dto
.
setType
(
COMPANY_TYPE_COMPANY
);
dto
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
}
else
{
dto
.
setType
(
COMPANY_TYPE_SUPERVISION
);
}
return
ResponseHelper
.
buildResponse
(
jgChangeRegistrationNameService
.
getList
(
dto
,
page
,
dto
.
getRoleIds
(),
reginParams
.
getCompany
().
getCompanyCode
()));
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgInstallationNoticeController.java
View file @
c8ba0810
...
...
@@ -12,7 +12,6 @@ import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
netscape.javascript.JSObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -135,6 +134,7 @@ public class JgInstallationNoticeController extends BaseController {
)
{
Page
<
JgInstallationNotice
>
page
=
new
Page
<>(
current
,
size
);
ReginParams
reginParams
=
getSelectedOrgInfo
();
type
=
(
String
)
iJgInstallationNoticeService
.
getCompanyType
().
get
(
"companyType"
);
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
queryForJgInstallationNoticePage
(
page
,
model
,
type
,
reginParams
));
}
...
...
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 @
c8ba0810
...
...
@@ -29,7 +29,6 @@ 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.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
...
...
@@ -45,11 +44,9 @@ import org.springframework.util.CollectionUtils;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
javax.servlet.http.HttpServletResponse
;
import
java.awt.print.Book
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.UnsupportedEncodingException
;
...
...
@@ -577,7 +574,7 @@ public class CommonServiceImpl implements ICommonService {
JSONObject
jsonObject
=
new
JSONObject
(
provideMap
);
jgChangeRegistrationUnitServiceImpl
.
saveNotice
(
submitType
,
jsonObject
,
reginParams
);
}
else
if
(
type
.
equals
(
ApplicationFormTypeEnum
.
WBBA
.
getBusinessCode
()))
{
noticeObj
.
put
(
"pageType"
,
"add"
);
noticeObj
.
put
(
"pageType"
,
"add"
);
noticeObj
.
put
(
"receiveOrgCode"
,
!
ObjectUtils
.
isEmpty
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
?
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
:
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode1"
)));
JSONObject
jsonObject
=
new
JSONObject
(
noticeObj
);
jgMaintenanceContractServiceImpl
.
saveOrSubmit
(
submitType
,
jsonObject
,
reginParams
);
...
...
@@ -587,8 +584,8 @@ public class CommonServiceImpl implements ICommonService {
JSONObject
jsonObject
=
(
JSONObject
)
JSONObject
.
toJSON
(
jgEquipTransferDto
);
jsonObject
.
put
(
"businessCode"
,
type
);
jgEquipTransferServiceImpl
.
saveTransfer
(
submitType
,
jsonObject
,
reginParams
);
}
else
if
(
type
.
contains
(
ApplicationFormTypeEnum
.
YZBF
.
getBusinessCode
())
||
type
.
contains
(
ApplicationFormTypeEnum
.
ZXBF
.
getBusinessCode
()))
{
}
else
if
(
type
.
contains
(
ApplicationFormTypeEnum
.
YZBF
.
getBusinessCode
())
||
type
.
contains
(
ApplicationFormTypeEnum
.
ZXBF
.
getBusinessCode
()))
{
noticeObj
.
put
(
"cancelType"
,
type
.
equals
(
"BF_ZX"
)
?
"1"
:
"2"
);
noticeObj
.
put
(
"receiveOrgCreditCode"
,
!
ObjectUtils
.
isEmpty
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
?
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
:
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode1"
)));
provideMap
.
put
(
SBZX_PAGE_ID
,
noticeObj
);
JSONObject
jsonObject
=
new
JSONObject
(
provideMap
);
...
...
@@ -601,7 +598,7 @@ public class CommonServiceImpl implements ICommonService {
jgChangeRegistrationNameService
.
save2
(
submitType
,
jsonObject
);
}
else
if
(
type
.
equals
(
ApplicationFormTypeEnum
.
SBQY
.
getBusinessCode
())
||
type
.
equals
(
ApplicationFormTypeEnum
.
SBTY
.
getBusinessCode
()))
{
noticeObj
.
put
(
"submit"
,
submitType
);
noticeObj
.
put
(
"pageType"
,
"add"
);
noticeObj
.
put
(
"pageType"
,
"add"
);
noticeObj
.
put
(
"receiveOrgCode"
,
!
ObjectUtils
.
isEmpty
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
?
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode"
))
:
String
.
valueOf
(
basicObj
.
get
(
"receiveOrgCreditCode1"
)));
JSONObject
jsonObject
=
new
JSONObject
(
noticeObj
);
jgEnableDisableServiceImpl
.
saveOrUpdate
(
jsonObject
,
reginParams
);
...
...
@@ -634,10 +631,11 @@ public class CommonServiceImpl implements ICommonService {
}
List
<
Map
>
urlList
=
JsonUtils
.
getResourceList
(
urlInfo
);
for
(
Map
map
:
urlList
)
{
if
(
map
.
get
(
"type"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
obj
.
getTaskType
().
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
!
obj
.
getFlowStatus
().
equals
(
"16723"
)
&&
map
.
get
(
"pageType"
).
equals
(
"edit"
))
{
if
(
map
.
get
(
"type"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
obj
.
getTaskType
().
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
!
obj
.
getFlowStatus
().
toString
().
equals
(
"16723"
)
&&
map
.
get
(
"pageType"
).
equals
(
"edit"
))
{
model
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
getNextExecuteUser
())
+
urlParams
+
"&nextExecuteUserIds="
+
model
.
getExecuteUserIds
());
break
;
}
else
if
(
map
.
get
(
"type"
).
equals
(
obj
.
getTaskType
())
&&
map
.
get
(
"pageType"
).
equals
(
"look"
))
{
}
else
if
(
map
.
get
(
"type"
).
equals
(
obj
.
getTaskType
())
&&
map
.
get
(
"pageType"
).
equals
(
"look"
))
{
model
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
getNextExecuteUser
())
+
urlParams
+
"&nextExecuteUserIds="
+
model
.
getExecuteUserIds
());
break
;
}
...
...
@@ -665,7 +663,6 @@ public class CommonServiceImpl implements ICommonService {
* flowStatusLabel 任务状态枚举code
* 流程实例id instanceId
* flowCode 任务id
**/
public
TaskV2Model
updateTaskModel
(
Map
<
String
,
Object
>
params
)
{
String
exeUserId
=
RequestContext
.
getExeUserId
();
...
...
@@ -691,9 +688,9 @@ public class CommonServiceImpl implements ICommonService {
// String url = roleIds[0]+"roleIds="+"55555"+"&userId"+ userIds[1];
// String tarUrl = url.replaceFirst("&executeUserIds=", "");
// tarUrl+"&executeUserIds="
// model.setRoutePath( roleIds[0]+"roleIds="+"55555"+"&userId"+userIds[1]);
// model.setRoutePath( roleIds[0]+"roleIds="+"55555"+"&userId"+userIds[1]);
//当流程完成时将所有待办状态统一修改为已完成
if
(
collect
.
get
(
0
).
getFlowStatusLabel
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())){
if
(
collect
.
get
(
0
).
getFlowStatusLabel
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()))
{
String
urlParams
=
""
;
...
...
@@ -717,8 +714,8 @@ public class CommonServiceImpl implements ICommonService {
taskV2Model
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
}
Systemctl
.
taskV2Client
.
batchUpdate
(
collect
);
}
else
{
collect
.
get
(
0
).
setRoutePath
(
collect
.
get
(
0
).
getRoutePath
().
replace
(
"roleIds="
,
"roleIds=55555&fq="
));
}
else
{
collect
.
get
(
0
).
setRoutePath
(
collect
.
get
(
0
).
getRoutePath
().
replace
(
"roleIds="
,
"roleIds=55555&fq="
));
Systemctl
.
taskV2Client
.
update
(
collect
.
get
(
0
),
collect
.
get
(
0
).
getSequenceNbr
());
}
...
...
@@ -740,7 +737,6 @@ public class CommonServiceImpl implements ICommonService {
* flowStatusLabel 任务状态枚举code
* 流程实例id instanceId
* flowCode 任务id
**/
public
TaskV2Model
updateTaskModelNew
(
Map
<
String
,
Object
>
params
)
{
String
exeUserId
=
RequestContext
.
getExeUserId
();
...
...
@@ -750,8 +746,8 @@ public class CommonServiceImpl implements ICommonService {
// .findFirst()
// .orElse(null);
List
<
TaskV2Model
>
collect
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
if
(
null
==
collect
||
collect
.
size
()
==
0
)
{
TaskV2Model
model
=
new
TaskV2Model
();
if
(
null
==
collect
||
collect
.
size
()
==
0
)
{
TaskV2Model
model
=
new
TaskV2Model
();
model
.
setFlowStatus
(
Integer
.
valueOf
(
params
.
get
(
"flowStatus"
).
toString
()));
model
.
setFlowStatusLabel
(
params
.
get
(
"flowStatusLabel"
).
toString
());
model
.
setTaskStatus
(
Integer
.
valueOf
(
params
.
get
(
"taskStatus"
).
toString
()));
...
...
@@ -765,7 +761,7 @@ public class CommonServiceImpl implements ICommonService {
collect
.
get
(
0
).
setEndUserId
(
exeUserId
);
collect
.
get
(
0
).
setEndDate
(
new
Date
());
//当流程完成时将所有待办状态统一修改为已完成
if
(
collect
.
get
(
0
).
getFlowStatusLabel
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
())){
if
(
collect
.
get
(
0
).
getFlowStatusLabel
().
equals
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
()))
{
String
urlParams
=
""
;
try
{
urlParams
=
"&"
+
toQueryParams
(
params
.
get
(
"model"
));
...
...
@@ -787,8 +783,8 @@ public class CommonServiceImpl implements ICommonService {
taskV2Model
.
setFlowStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
}
Systemctl
.
taskV2Client
.
batchUpdate
(
collect
);
}
else
{
collect
.
get
(
0
).
setRoutePath
(
collect
.
get
(
0
).
getRoutePath
().
replace
(
"roleIds="
,
"roleIds=55555&fq="
));
}
else
{
collect
.
get
(
0
).
setRoutePath
(
collect
.
get
(
0
).
getRoutePath
().
replace
(
"roleIds="
,
"roleIds=55555&fq="
));
Systemctl
.
taskV2Client
.
update
(
collect
.
get
(
0
),
collect
.
get
(
0
).
getSequenceNbr
());
}
collect
.
get
(
0
).
setEndUserId
(
null
);
...
...
@@ -803,7 +799,8 @@ public class CommonServiceImpl implements ICommonService {
/**
* 待办 撤回
* @param id 工作流实例id
*
* @param id 工作流实例id
* @param obj 自己的实体:taskType为BusinessTypeEnum code;nextExecuteUser
*/
public
void
rollbackTask
(
String
id
,
JSONObject
obj
)
{
...
...
@@ -811,13 +808,19 @@ public class CommonServiceImpl implements ICommonService {
List
<
TaskV2Model
>
list
=
result
.
stream
().
sorted
((
r1
,
r2
)
->
r2
.
getSequenceNbr
().
compareTo
(
r1
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
TaskV2Model
model
=
list
.
get
(
0
);
Systemctl
.
taskV2Client
.
delete
(
String
.
valueOf
(
model
.
getSequenceNbr
()));
if
(
list
.
size
()
>
1
)
{
if
(
list
.
size
()
>
1
)
{
TaskV2Model
lastTaskModel
=
list
.
get
(
1
);
lastTaskModel
.
setEndUserId
(
null
);
lastTaskModel
.
setEndDate
(
null
);
lastTaskModel
.
setTaskStatus
(
0
);
lastTaskModel
.
setTaskStatusLabel
(
"待处理"
);
lastTaskModel
.
setFlowCode
(
obj
.
get
(
"nextTaskId"
).
toString
());
if
(
obj
.
get
(
"flowStatus"
)
!=
null
)
{
lastTaskModel
.
setFlowStatus
(
Integer
.
valueOf
(
obj
.
get
(
"flowStatus"
).
toString
()));
}
if
(
obj
.
get
(
"flowStatusLabel"
)
!=
null
)
{
lastTaskModel
.
setFlowStatusLabel
(
obj
.
get
(
"flowStatusLabel"
).
toString
());
}
String
urlParams
=
""
;
try
{
urlParams
=
"&"
+
toQueryParams
(
obj
);
...
...
@@ -826,10 +829,10 @@ public class CommonServiceImpl implements ICommonService {
}
List
<
Map
>
urlList
=
JsonUtils
.
getResourceList
(
urlInfo
);
for
(
Map
map
:
urlList
)
{
if
(
map
.
get
(
"type"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
obj
.
getString
(
"taskType"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
map
.
get
(
"pageType"
).
equals
(
"edit"
))
{
if
(
map
.
get
(
"type"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
obj
.
getString
(
"taskType"
).
equals
(
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
())
&&
map
.
get
(
"pageType"
).
equals
(
"edit"
))
{
model
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
getString
(
"nextExecuteUser"
))
+
urlParams
+
"&nextExecuteUserIds="
+
model
.
getExecuteUserIds
());
break
;
}
else
if
(
map
.
get
(
"type"
).
equals
(
obj
.
get
(
"taskType"
))
&&
map
.
get
(
"pageType"
).
equals
(
"look"
))
{
}
else
if
(
map
.
get
(
"type"
).
equals
(
obj
.
get
(
"taskType"
))
&&
map
.
get
(
"pageType"
).
equals
(
"look"
))
{
model
.
setRoutePath
(
map
.
get
(
"url"
).
toString
().
replace
(
"{roleIds}"
,
obj
.
get
(
"nextExecuteUser"
).
toString
())
+
urlParams
);
break
;
}
...
...
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/IdxBizJgRegisterInfoServiceImpl.java
View file @
c8ba0810
...
...
@@ -48,6 +48,7 @@ import java.io.IOException;
import
java.lang.reflect.Field
;
import
java.sql.Timestamp
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
com
.
alibaba
.
fastjson
.
JSON
.
toJSONString
;
...
...
@@ -326,7 +327,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
if
(!
registerInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
registerInfoMap
);
Map
<
String
,
Object
>
filterMap
=
registerInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
return
objMap
;
...
...
@@ -409,7 +414,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
useInfoMap
.
put
(
"USEINFO_SEQ"
,
useInfo
.
getSequenceNbr
());
}
if
(!
useInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
useInfoMap
);
Map
<
String
,
Object
>
filterMap
=
useInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
//设计制造
...
...
@@ -427,7 +436,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
designInfoMap
.
put
(
"DESIGNINFO_SEQ"
,
designInfo
.
getSequenceNbr
());
}
if
(!
designInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
designInfoMap
);
Map
<
String
,
Object
>
filterMap
=
designInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
//制造信息
...
...
@@ -458,7 +471,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
factoryInfoMap
.
put
(
"FACTORYINFO_SEQ"
,
factoryInfo
.
getSequenceNbr
());
}
if
(!
factoryInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
factoryInfoMap
);
Map
<
String
,
Object
>
filterMap
=
factoryInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
//施工信息 【一对多,暂时只取最新一条数据】
...
...
@@ -473,7 +490,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
constructionInfoMap
.
put
(
"CONSTRUCTIONINFO_SEQ"
,
constructionInfo
.
getSequenceNbr
());
}
if
(!
constructionInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
constructionInfoMap
);
Map
<
String
,
Object
>
filterMap
=
constructionInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
//注册登记
...
...
@@ -508,7 +529,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
}
if
(!
registerInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
registerInfoMap
);
Map
<
String
,
Object
>
filterMap
=
registerInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
//维保备案【一对多,暂时只取最新一条数据】
...
...
@@ -523,7 +548,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
maintenanceRecordInfoMap
.
put
(
"MAINTENANCERECORDINFO_SEQ"
,
maintenanceRecordInfo
.
getSequenceNbr
());
}
if
(!
maintenanceRecordInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
maintenanceRecordInfoMap
);
Map
<
String
,
Object
>
filterMap
=
maintenanceRecordInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
//监督管理
...
...
@@ -538,7 +567,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
supervisionInfoMap
.
put
(
"SUPERVISIONINFO_SEQ"
,
supervisionInfo
.
getSequenceNbr
());
}
if
(!
supervisionInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
supervisionInfoMap
);
Map
<
String
,
Object
>
filterMap
=
supervisionInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
//其他信息
...
...
@@ -553,7 +586,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
otherInfoMap
.
put
(
"OTHERINFO_SEQ"
,
otherInfo
.
getSequenceNbr
());
}
if
(!
otherInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
otherInfoMap
);
Map
<
String
,
Object
>
filterMap
=
otherInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
//检验检测【一对多,暂时只取最新一条数据】
...
...
@@ -570,7 +607,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
inspectionDetectionInfoMap
.
put
(
"INSPECTIONDETECTIONINFO_SEQ"
,
inspectionDetectionInfo
.
getSequenceNbr
());
}
if
(!
inspectionDetectionInfoMap
.
isEmpty
())
{
objMap
.
putAll
(
inspectionDetectionInfoMap
);
Map
<
String
,
Object
>
filterMap
=
inspectionDetectionInfoMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
...
...
@@ -602,7 +643,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
elevatorMap
.
put
(
"ELEVATOR_SEQ"
,
elevator
.
getSequenceNbr
());
}
if
(!
elevatorMap
.
isEmpty
())
{
objMap
.
putAll
(
elevatorMap
);
Map
<
String
,
Object
>
filterMap
=
elevatorMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
}
else
if
(
EquipmentClassifityEnum
.
CC
.
getCode
().
equals
(
equipCode
))
{
...
...
@@ -618,7 +663,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
vehicleMap
.
put
(
"VEHICLE_SEQ"
,
vehicle
.
getSequenceNbr
());
}
if
(!
vehicleMap
.
isEmpty
())
{
objMap
.
putAll
(
vehicleMap
);
Map
<
String
,
Object
>
filterMap
=
vehicleMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
// 主要零部件
...
...
@@ -638,7 +687,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
ropewayMap
.
put
(
"ROPEWAY_SEQ"
,
ropeway
.
getSequenceNbr
());
}
if
(!
ropewayMap
.
isEmpty
())
{
objMap
.
putAll
(
ropewayMap
);
Map
<
String
,
Object
>
filterMap
=
ropewayMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
// 主要零部件
...
...
@@ -657,7 +710,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
ridesMap
.
put
(
"RIDES_SEQ"
,
rides
.
getSequenceNbr
());
}
if
(!
ridesMap
.
isEmpty
())
{
objMap
.
putAll
(
ridesMap
);
Map
<
String
,
Object
>
filterMap
=
ridesMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
...
...
@@ -674,7 +731,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boilerMap
.
put
(
"BOILER_SEQ"
,
boiler
.
getSequenceNbr
());
}
if
(!
boilerMap
.
isEmpty
())
{
objMap
.
putAll
(
boilerMap
);
Map
<
String
,
Object
>
filterMap
=
boilerMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
// 安全附件
...
...
@@ -693,7 +754,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
vesselMap
.
put
(
"VESSEL_SEQ"
,
vessel
.
getSequenceNbr
());
}
if
(!
vesselMap
.
isEmpty
())
{
objMap
.
putAll
(
vesselMap
);
Map
<
String
,
Object
>
filterMap
=
vesselMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
// 主要零部件和安全附件
...
...
@@ -714,7 +779,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
pipelineMap
.
put
(
"PIPELINE_SEQ"
,
pipeline
.
getSequenceNbr
());
}
if
(!
pipelineMap
.
isEmpty
())
{
objMap
.
putAll
(
pipelineMap
);
Map
<
String
,
Object
>
filterMap
=
pipelineMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
// 主要零部件
...
...
@@ -733,7 +802,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
liftingMap
.
put
(
"LIFTING_SEQ"
,
lifting
.
getSequenceNbr
());
}
if
(!
liftingMap
.
isEmpty
())
{
objMap
.
putAll
(
liftingMap
);
Map
<
String
,
Object
>
filterMap
=
liftingMap
.
entrySet
()
.
stream
()
.
filter
(
e
->
e
.
getValue
()
!=
null
&&
e
.
getValue
()
!=
""
)
.
collect
(
Collectors
.
toMap
(
Map
.
Entry
::
getKey
,
Map
.
Entry
::
getValue
));
objMap
.
putAll
(
filterMap
);
}
}
...
...
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/JgChangeRegistrationNameServiceImpl.java
View file @
c8ba0810
...
...
@@ -411,6 +411,8 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
jsonObject
.
put
(
"nextTaskId"
,
jgChangeRegistrationName
.
getNextTaskId
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgChangeRegistrationName
.
getNextExecutorIds
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
jgChangeRegistrationName
.
getAuditStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
jgChangeRegistrationName
.
getAuditStatus
());
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
}
...
...
@@ -598,16 +600,13 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
return
map
;
}
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgChangeRegistrationNameDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
)
{
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
public
Page
<
Map
<
String
,
Object
>>
getList
(
JgChangeRegistrationNameDto
dto
,
Page
<
Map
<
String
,
Object
>>
page
,
List
<
String
>
roleIds
,
String
companyCode
)
{
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
dto
.
getReceiveOrgCode
()))
{
String
[]
receiveOrgIdList
=
dto
.
getReceiveOrgCode
().
split
(
"_"
);
if
(
receiveOrgIdList
.
length
>
1
)
{
dto
.
setReceiveOrgCode
(
receiveOrgIdList
[
0
]);
}
}
Page
<
Map
<
String
,
Object
>>
listPage
=
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
,
orgCode
);
return
listPage
;
return
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
,
companyCode
);
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgChangeRegistrationReformServiceImpl.java
View file @
c8ba0810
...
...
@@ -275,7 +275,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
// 驳回操作
jgChangeRegistrationReform
.
setAuditStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getReject
());
jgChangeRegistrationReform
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getReject
());
jgChangeRegistrationReform
.
setPromoter
(
null
);
jgChangeRegistrationReform
.
setPromoter
(
""
);
}
if
(
updateTodoAndCreate
)
{
// 上个代办改为已办
...
...
@@ -367,13 +367,17 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getRollBack
());
}
jgChangeRegistrationReform
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgChangeRegistrationReform
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
jgChangeRegistrationReform
.
setNextExecutorIds
(
role
);
this
.
update
(
jgChangeRegistrationReform
,
lambda
);
// commonServiceImpl.deleteTaskModel(instanceId);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
jgChangeRegistrationReform
));
jsonObject
.
put
(
"flowStatus"
,
commonServiceImpl
.
getDictionaryCodeByName
(
jgChangeRegistrationReform
.
getAuditStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
jgChangeRegistrationReform
.
getAuditStatus
());
jsonObject
.
put
(
"nextTaskId"
,
jgChangeRegistrationReform
.
getNextTaskId
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgChangeRegistrationReform
.
getNextExecutorIds
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_RENOVATION_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"model"
,
jgChangeRegistrationReform
);
commonServiceImpl
.
rollbackTask
(
instanceId
,
jsonObject
);
}
...
...
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/JgChangeRegistrationUnitServiceImpl.java
View file @
c8ba0810
...
...
@@ -256,7 +256,49 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
notice
.
setStatus
(
WorkFlowStatusEnum
.
UNITCHANGE_RECEIVE
.
getPass
());
JgChangeRegistrationUnitMapper
.
updateById
(
notice
);
createTaskModel
(
notice
,
taskname
,
"1"
,
nextUserIds
);
}
}
else
{
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
String
taskId
=
noticeDto
.
getNextTaskId
();
//组装信息
TaskResultDTO
task
=
new
TaskResultDTO
();
task
.
setResultCode
(
"approvalStatus"
);
task
.
setTaskId
(
taskId
);
task
.
setComment
(
""
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
if
(!
ObjectUtils
.
isEmpty
(
noticeDto
.
getInstanceStatus
())
&&
(
noticeDto
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
())
||
noticeDto
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getRollBack
())))
{
map
.
put
(
"approvalStatus"
,
"提交"
);
}
task
.
setVariable
(
map
);
//执行流程
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
complete
(
taskId
,
task
);
JgChangeRegistrationUnit
bean
=
new
JgChangeRegistrationUnit
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
String
taskCode
=
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
();
String
taskName1
=
""
;
String
nextTaskId
=
""
;
this
.
buildRoleList
(
Collections
.
singletonList
(
processTaskDTO
),
roleList
,
roleListAll
);
List
<
WorkflowResultDto
>
workflowResultDtos
=
commonServiceImpl
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
));
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
if
(
processTaskDTO
!=
null
&&
processTaskDTO
.
getNextTask
()
!=
null
&&
processTaskDTO
.
getNextTask
().
size
()
>
0
){
taskCode
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getKey
();
taskName1
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getName
();
nextTaskId
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getId
();
}
bean
.
setNextExecutorIds
(
String
.
join
(
","
,
roleList
));
if
(!
ObjectUtils
.
isEmpty
(
bean
.
getInstanceStatus
()))
{
bean
.
setInstanceStatus
(
bean
.
getInstanceStatus
()
+
","
+
String
.
join
(
","
,
roleList
));
}
else
{
bean
.
setInstanceStatus
(
String
.
join
(
","
,
roleList
));
}
bean
.
setNextTaskId
(
nextTaskId
);
bean
.
setPromoter
(
RequestContext
.
getExeUserId
());
bean
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getPass
());
executeOneStep
(
bean
,
taskName1
,
nextUserIds
,
op
);
JgChangeRegistrationUnitMapper
.
updateById
(
bean
);
}
}
else
{
JgChangeRegistrationUnit
bean
=
new
JgChangeRegistrationUnit
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
...
...
@@ -352,6 +394,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
List
<
String
>
taskIds
=
new
ArrayList
<>();
List
<
WorkflowResultDto
>
workflowResultDtos
=
new
ArrayList
<>();
String
nextExecutorRoleIds
=
""
;
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
// ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
...
...
@@ -368,7 +411,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
actWorkflowBatchDTO
.
setProcess
(
list
);
List
<
ProcessTaskDTO
>
processTaskDTOS
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
workflowResultDtos
=
commonServiceImpl
.
buildWorkFlowInfo
(
processTaskDTOS
);
nextExecutorRoleIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorRoleIds
();
for
(
WorkflowResultDto
processTaskDTO
:
workflowResultDtos
)
{
instanceIdList
.
add
(
processTaskDTO
.
getInstanceId
());
taskIds
.
add
(
processTaskDTO
.
getNextTaskId
());
...
...
@@ -430,6 +473,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
List
<
JgChangeRegistrationUnit
>
list
=
new
ArrayList
<>();
List
<
JgChangeRegistrationUnitEq
>
equipList
=
new
ArrayList
<>();
String
finalNextExecutorRoleIds
=
nextExecutorRoleIds
;
deviceList
.
forEach
(
obj
->
{
JgChangeRegistrationUnitEq
jgRelationEquip
=
new
JgChangeRegistrationUnitEq
();
JgChangeRegistrationUnit
dto
=
new
JgChangeRegistrationUnit
();
...
...
@@ -439,7 +483,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
dto
.
setApplyNo
(
applyNo
);
dto
.
setApplyDate
(
new
Date
());
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecutorIds
(
String
.
join
(
","
,
roleListSecond
)
);
dto
.
setNextExecutorIds
(
finalNextExecutorRoleIds
);
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setStatus
(
taskName
[
0
]);
...
...
@@ -643,16 +687,18 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
// 待调整
taskCode
=
processTaskDTO
.
getNextTask
().
get
(
0
).
getKey
();
JgChangeRegistrationUnit
JgChangeRegistrationUnit
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
JgChangeRegistrationUnit
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
task
Name
[
0
]
).
getRollBack
());
JgChangeRegistrationUnit
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
task
Code
).
getRollBack
());
JgChangeRegistrationUnit
.
setPromoter
(
""
);
JgChangeRegistrationUnit
.
setNextTaskId
(
nextTaskId
);
JgChangeRegistrationUnit
.
setNextExecutorIds
(
String
.
join
(
","
,
roleListNext
));
JgChangeRegistrationUnitMapper
.
updateById
(
JgChangeRegistrationUnit
);
// 删除待办
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
JgChangeRegistrationUnit
));
jsonObject
.
put
(
"nextTaskId"
,
JgChangeRegistrationUnit
.
getNextTaskId
());
jsonObject
.
put
(
"nextExecuteUser"
,
JgChangeRegistrationUnit
.
getNextExecutorIds
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_NAME_CHANGE_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
JgChangeRegistrationUnit
.
getStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
JgChangeRegistrationUnit
.
getStatus
());
commonServiceImpl
.
rollbackTask
(
noticeDto
.
getInstanceId
(),
jsonObject
);
}
...
...
@@ -678,8 +724,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
if
(!
ObjectUtils
.
isEmpty
(
jgChangeRegistrationUnit
.
getInstanceStatus
())
&&
(
jgChangeRegistrationUnit
.
get
Audit
Status
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
())
||
jgChangeRegistrationUnit
.
get
Audit
Status
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getRollBack
())))
{
(
jgChangeRegistrationUnit
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getReject
())
||
jgChangeRegistrationUnit
.
getStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_SUBMIT
.
getRollBack
())))
{
map
.
put
(
"approvalStatus"
,
"提交"
);
}
task
.
setVariable
(
map
);
...
...
@@ -755,18 +801,25 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
jgChangeRegistrationUnit
.
setInstanceStatus
(
String
.
join
(
","
,
roleList
));
}
jgChangeRegistrationUnit
.
setPromoter
(
userId
);
jgChangeRegistrationUnit
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskName
[
0
]).
getPass
());
jgChangeRegistrationUnit
.
setNextTaskId
(
nextTaskId
);
jgChangeRegistrationUnit
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getPass
());
executeOneStep
(
jgChangeRegistrationUnit
,
taskName1
,
nextUserIds
,
op
);
}
}
else
{
jgChangeRegistrationUnit
.
setPromoter
(
""
);
jgChangeRegistrationUnit
.
setNextExecutorIds
(
String
.
join
(
","
,
roleList
));
jgChangeRegistrationUnit
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskName
[
0
]).
getReject
());
jgChangeRegistrationUnit
.
setNextTaskId
(
nextTaskId
);
jgChangeRegistrationUnit
.
setStatus
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
).
getReject
());
executeOneStep
(
jgChangeRegistrationUnit
,
taskName1
,
nextUserIds
,
op
);
}
JgChangeRegistrationUnitMapper
.
updateById
(
jgChangeRegistrationUnit
);
// }
}
private
Integer
getTaskCodeByName
(
String
auditStatus
)
{
return
commonServiceImpl
.
getDictionaryCodeByName
(
auditStatus
);
}
/**
* 修改各类告知列表,置为废弃
*
...
...
@@ -925,42 +978,73 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
});
}
// private void executeOneStep(JgChangeRegistrationUnit jgChangeRegistrationName, String taskName, String nextUserIds, String operate) {
// // 先更新之前的待办
// TaskV2Model taskV2Model = updateTaskModel(jgChangeRegistrationName, operate);
// TaskModelDto taskModelDto = new TaskModelDto();
// taskModelDto.setTaskDesc("");
// taskModelDto.setTaskContent(this.buildTaskContent(jgChangeRegistrationName));
// taskV2Model.setTaskName(taskName);
// taskModelDto.setTaskDesc("");
// taskModelDto.setTaskCode(jgChangeRegistrationName.getApplyNo());
// taskV2Model.setExecuteUserIds(nextUserIds);
// taskV2Model.setRelationId(jgChangeRegistrationName.getInstanceId());
// taskV2Model.setTaskStatus(this.getTaskStatusByName(jgChangeRegistrationName.getAuditStatus()));
// taskV2Model.setTaskStatusLabel(jgChangeRegistrationName.getAuditStatus());
// taskV2Model.setTaskType(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getCode());
// taskModelDto.setStartUser(jgChangeRegistrationName.getCreateUserName());
// taskV2Model.setTaskTypeLabel(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getName());
// taskModelDto.setStartDate(jgChangeRegistrationName.getCreateDate());
// taskModelDto.setStartUserId(jgChangeRegistrationName.getCreateUserId());
// taskModelDto.setStartUserCompanyName(jgChangeRegistrationName.getUseUnitName());
// taskModelDto.setExecuteUserIds(nextUserIds);
// TaskModelDto modelDto = new TaskModelDto();
// BeanUtil.copyProperties(taskV2Model,modelDto);
// modelDto.setNextExecuteUser(jgChangeRegistrationName.getNextExecutorIds());
// modelDto.setModel(jgChangeRegistrationName);
// // 再插入新代办、数据待定
// commonServiceImpl.buildTaskModel(Collections.singletonList(modelDto));
// }
private
void
executeOneStep
(
JgChangeRegistrationUnit
jgChangeRegistrationName
,
String
taskName
,
String
nextUserIds
,
String
operate
)
{
// 先更新之前的待办
TaskV2Model
taskV2Model
=
updateTaskModel
(
jgChangeRegistrationName
,
operate
);
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setTaskDesc
(
""
);
taskModelDto
.
setTaskContent
(
this
.
buildTaskContent
(
jgChangeRegistrationName
));
taskV2Model
.
setTaskDesc
(
""
);
taskV2Model
.
setTaskName
(
taskName
);
task
ModelDto
.
setTaskDesc
(
""
);
task
ModelDto
.
setTaskCode
(
jgChangeRegistrationName
.
getApplyNo
());
task
V2Model
.
setTaskDesc
(
""
);
task
V2Model
.
setTaskCode
(
jgChangeRegistrationName
.
getApplyNo
());
taskV2Model
.
setExecuteUserIds
(
nextUserIds
);
taskV2Model
.
setRelationId
(
jgChangeRegistrationName
.
getInstanceId
());
taskV2Model
.
setTaskStatus
(
this
.
getTaskStatusByName
(
jgChangeRegistrationName
.
getAuditStatus
()));
taskV2Model
.
setTaskStatusLabel
(
jgChangeRegistrationName
.
getAuditStatus
());
taskV2Model
.
setTaskType
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getCode
());
taskModelDto
.
setStartUser
(
jgChangeRegistrationName
.
getCreateUserName
());
taskV2Model
.
setTaskTypeLabel
(
BusinessTypeEnum
.
JG_COMPANY_CHANGE_REGISTRATION
.
getName
());
taskModelDto
.
setStartDate
(
jgChangeRegistrationName
.
getCreateDate
());
taskModelDto
.
setStartUserId
(
jgChangeRegistrationName
.
getCreateUserId
());
taskModelDto
.
setStartUserCompanyName
(
jgChangeRegistrationName
.
getUseUnitName
());
taskModelDto
.
setExecuteUserIds
(
nextUserIds
);
FlowStatusEnum
flowStatusEnum
=
this
.
getTaskStatus
(
operate
);
taskV2Model
.
setTaskStatus
(
this
.
getTaskStatusByName
(
jgChangeRegistrationName
.
getStatus
()));
taskV2Model
.
setTaskStatusLabel
(
jgChangeRegistrationName
.
getStatus
());
taskV2Model
.
setFlowStatus
(
this
.
getTaskStatusByName
(
jgChangeRegistrationName
.
getStatus
()));
taskV2Model
.
setFlowStatusLabel
(
jgChangeRegistrationName
.
getStatus
());
// taskV2Model.setTaskType(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getCode());
// taskV2Model.setStartUser(jgChangeRegistrationName.getCreateUserName());
// taskV2Model.setTaskTypeLabel(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getName());
// taskV2Model.setStartDate(jgChangeRegistrationName.getCreateDate());
// taskV2Model.setStartUserId(jgChangeRegistrationName.getCreateUserId());
// taskV2Model.setStartUserCompanyName(jgChangeRegistrationName.getUseUnitName());
taskV2Model
.
setExecuteUserIds
(
nextUserIds
);
TaskModelDto
modelDto
=
new
TaskModelDto
();
BeanUtil
.
copyProperties
(
taskV2Model
,
modelDto
);
BeanUtil
.
copyProperties
(
taskV2Model
,
modelDto
);
modelDto
.
setNextExecuteUser
(
jgChangeRegistrationName
.
getNextExecutorIds
());
modelDto
.
setModel
(
jgChangeRegistrationName
);
// 再插入新代办、数据待定
commonServiceImpl
.
buildTaskModel
(
Collections
.
singletonList
(
modelDto
));
}
private
TaskV2Model
updateTaskModel
(
JgChangeRegistrationUnit
jgChangeRegistrationName
,
String
operate
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
FlowStatusEnum
flowStatusEnum
=
this
.
getTaskStatus
(
operate
);
params
.
put
(
"relationId"
,
jgChangeRegistrationName
.
getInstanceId
());
params
.
put
(
"taskStatus"
,
flowStatusEnum
.
getCode
());
params
.
put
(
"taskStatusLabel"
,
flowStatusEnum
.
getName
());
params
.
put
(
"flowStatus"
,
this
.
getTaskStatusByName
(
jgChangeRegistrationName
.
getAuditStatus
()));
params
.
put
(
"flowStatusLabel"
,
jgChangeRegistrationName
.
getAuditStatus
());
params
.
put
(
"flowStatus"
,
this
.
getTaskStatusByName
(
jgChangeRegistrationName
.
getStatus
()));
params
.
put
(
"flowStatusLabel"
,
jgChangeRegistrationName
.
getStatus
());
params
.
put
(
"model"
,
jgChangeRegistrationName
);
return
commonServiceImpl
.
updateTaskModel
(
params
);
}
...
...
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/JgEnableDisableServiceImpl.java
View file @
c8ba0810
...
...
@@ -9,24 +9,28 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.jg.api.
entity.JgEnableDisable
;
import
com.yeejoin.amos.boot.module.jg.api.
entity.JgEnableDisableEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.
JgMaintenanceContract
;
import
com.yeejoin.amos.boot.module.jg.api.en
tity.JgUseRegistration
;
import
com.yeejoin.amos.boot.module.jg.api.
dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jg.api.
dto.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.
*
;
import
com.yeejoin.amos.boot.module.jg.api.en
ums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgEnableDisableService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
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.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
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -55,33 +59,54 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
JgEnableDisableEqServiceImpl
jgEnableDisableEqService
;
@Autowired
JgEnableDisableEqMapper
jgEnableDisableEqMapper
;
@Autowired
JgMaintainNoticeMapper
jgMaintainNoticeMapper
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
private
final
String
WORK_FLOW
_KEY
=
"deactivateEnable"
;
private
final
String
PROCESS_DEFINITION
_KEY
=
"deactivateEnable"
;
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
public
void
saveOrUpdate
(
JSONObject
map
,
ReginParams
reginParams
)
{
@Autowired
private
CommonServiceImpl
commonService
;
@Autowired
ICmWorkflowService
iCmWorkflowService
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveOrUpdate
(
JSONObject
map
,
ReginParams
reginParams
)
{
JgEnableDisable
jgEnableDisable
=
new
JgEnableDisable
();
jgEnableDisable
.
setApplyDate
(
new
Date
());
String
submit
=
String
.
valueOf
(
map
.
get
(
"submit"
));
String
pageType
=
String
.
valueOf
(
map
.
get
(
"pageType"
));
if
(
map
.
containsKey
(
"receiveOrgCode"
))
{
// 接收机构
String
[]
splitMaintenanceUnitCode
=
String
.
valueOf
(
map
.
getString
(
"receiveOrgCode"
)).
split
(
"_"
);
jgEnableDisable
.
setReceiveOrgCode
(
splitMaintenanceUnitCode
[
0
]);
jgEnableDisable
.
setReceiveOrgName
(
splitMaintenanceUnitCode
[
1
]);
String
record
=
String
.
valueOf
(
map
.
get
(
"record"
));
List
<
WorkflowResultDto
>
workflowResultList
=
new
ArrayList
<>();
String
instanceId
=
""
;
if
(
map
.
containsKey
(
"instanceId"
))
{
instanceId
=
map
.
get
(
"instanceId"
).
toString
();
}
else
{
// 启动工作流并返回信息
workflowResultList
=
workFlowInfo
(
submit
,
record
);
}
jgEnableDisable
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgEnableDisable
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
// 获取申请编号
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
getCode
.
get
(
String
.
valueOf
(
map
.
get
(
"businessCode"
))),
1
);
//业务数据组装等
if
(!
ObjectUtils
.
isEmpty
(
listResponseModel
))
{
jgEnableDisable
.
setApplyNo
(
listResponseModel
.
getResult
().
get
(
0
));
}
String
businessCode
=
String
.
valueOf
(
map
.
get
(
"businessCode"
));
businessData
(
submit
,
reginParams
,
jgEnableDisable
,
map
,
workflowResultList
);
// 仅保存
if
(
"add"
.
equals
(
pageType
))
{
// 获取申请编号
ResponseModel
<
List
<
String
>>
listResponseModel
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
getCode
.
get
(
String
.
valueOf
(
map
.
get
(
"businessCode"
))),
1
);
if
(!
ObjectUtils
.
isEmpty
(
listResponseModel
))
{
jgEnableDisable
.
setApplyNo
(
listResponseModel
.
getResult
().
get
(
0
));
}
jgEnableDisable
.
setAuditStatus
(
WorkFlowStatusEnum
.
ENABLE_SUBMIT
.
getPass
());
this
.
save
(
jgEnableDisable
);
}
else
{
// 编辑
...
...
@@ -93,27 +118,88 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
// 关联设备表
JgEnableDisableEq
jgEnableDisableEq
=
new
JgEnableDisableEq
();
jgEnableDisableEq
.
setEquId
(
String
.
valueOf
(
map
.
get
(
"record"
))
);
jgEnableDisableEq
.
setEquId
(
record
);
jgEnableDisableEq
.
setEnableDisableApplyId
(
jgEnableDisable
.
getSequenceNbr
().
toString
());
jgEnableDisableEqService
.
save
(
jgEnableDisableEq
);
// 提交启动流程
if
(
"1"
.
equals
(
submit
))
{
String
instanceId
=
""
;
if
(
map
.
containsKey
(
"instanceId"
))
{
instanceId
=
map
.
get
(
"instanceId"
).
toString
();
}
else
{
instanceId
=
startByVariable
();
}
if
(!
ObjectUtils
.
isEmpty
(
instanceId
))
{
// 更新数据状态
updateExecuteIds
(
instanceId
,
jgEnableDisable
.
getSequenceNbr
(),
"0"
);
// 执行流程
flowExecute
(
jgEnableDisable
.
getSequenceNbr
(),
instanceId
,
"0"
,
""
);
}
// 如果为保存并提交,则创建代办
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
buildTask
(
Arrays
.
asList
(
jgEnableDisable
),
businessCode
,
workflowResultList
);
}
}
/**
* 组装业务数据
*/
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgEnableDisable
jgEnableDisable
,
JSONObject
map
,
List
<
WorkflowResultDto
>
workflowResultList
)
{
// 接收机构
String
[]
splitMaintenanceUnitCode
=
String
.
valueOf
(
map
.
getString
(
"receiveOrgCode"
)).
split
(
"_"
);
jgEnableDisable
.
setReceiveOrgCode
(
splitMaintenanceUnitCode
[
0
]);
jgEnableDisable
.
setReceiveOrgName
(
splitMaintenanceUnitCode
[
1
]);
jgEnableDisable
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgEnableDisable
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
jgEnableDisable
.
setRemark
(
String
.
valueOf
(
map
.
get
(
"remark"
)));
jgEnableDisable
.
setApplyType
(
map
.
getString
(
"applyType"
));
jgEnableDisable
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
jgEnableDisable
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgEnableDisable
.
setInstanceId
(
workflowResultList
.
get
(
0
).
getInstanceId
());
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
jgEnableDisable
.
setNextExecutorIds
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
());
jgEnableDisable
.
setExecuteSequence
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
()
+
","
+
workflowResultList
.
get
(
0
).
getExecutorRoleIds
());
jgEnableDisable
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgEnableDisable
.
setNextTaskId
(
workflowResultList
.
get
(
0
).
getNextTaskId
());
}
jgEnableDisable
.
setEquList
(
map
.
get
(
"equListDesc"
).
toString
());
jgEnableDisable
.
setSupervisoryCode
(
map
.
get
(
"supervisoryCode"
).
toString
());
if
(!
CollectionUtils
.
isEmpty
(
workflowResultList
))
{
jgEnableDisable
.
setInstanceId
(
workflowResultList
.
get
(
0
).
getInstanceId
());
jgEnableDisable
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
}
else
{
jgEnableDisable
.
setAuditStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
jgEnableDisable
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
jgEnableDisable
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
}
/**
* 插入代办
*/
private
void
buildTask
(
List
<
JgEnableDisable
>
list
,
String
businessCode
,
List
<
WorkflowResultDto
>
workflowResultList
)
{
String
taskType
=
businessCode
.
equals
(
ApplicationFormTypeEnum
.
SBQY
.
getBusinessCode
())?
BusinessTypeEnum
.
JG_EQUIPMENT_START
.
getCode
():
BusinessTypeEnum
.
JG_EQUIPMENT_STOP
.
getCode
();
String
taskTypeLabel
=
businessCode
.
equals
(
ApplicationFormTypeEnum
.
SBQY
.
getBusinessCode
())?
BusinessTypeEnum
.
JG_EQUIPMENT_START
.
getName
():
BusinessTypeEnum
.
JG_EQUIPMENT_STOP
.
getName
();
List
<
TaskModelDto
>
taskModelDtoList
=
new
ArrayList
<>();
WorkflowResultDto
workflowResultDto
=
workflowResultList
.
get
(
0
);
list
.
forEach
(
item
->
{
TaskModelDto
taskModelDto
=
new
TaskModelDto
();
taskModelDto
.
setFlowCreateDate
(
item
.
getCreateDate
());
taskModelDto
.
setTaskName
(
workflowResultDto
.
getNextTaskName
());
// 工作流API返回
taskModelDto
.
setTaskCode
(
item
.
getApplyNo
());
taskModelDto
.
setTaskType
(
taskType
);
taskModelDto
.
setTaskTypeLabel
(
taskTypeLabel
);
taskModelDto
.
setRelationId
(
item
.
getInstanceId
());
taskModelDto
.
setExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
// 工作流API返回
taskModelDto
.
setTaskStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setFlowStatus
(
commonService
.
getDictionaryCodeByName
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
()));
// 流程状态枚举
taskModelDto
.
setFlowStatusLabel
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getName
());
taskModelDto
.
setFlowCode
(
item
.
getNextTaskId
());
taskModelDto
.
setStartUserId
(
item
.
getCreateUserId
());
taskModelDto
.
setStartUser
(
item
.
getCreateUserName
());
taskModelDto
.
setStartUserCompanyName
(
item
.
getCreateUserCompanyName
());
// 任务发起人所在单位
taskModelDto
.
setStartDate
(
item
.
getCreateDate
());
taskModelDto
.
setModel
(
item
);
taskModelDto
.
setNextExecuteUser
(
item
.
getExecuteSequence
());
taskModelDto
.
setTaskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getSupervisoryCode
(),
item
.
getApplyNo
()));
taskModelDtoList
.
add
(
taskModelDto
);
});
commonService
.
buildTaskModel
(
taskModelDtoList
);
}
public
Page
<
Map
<
String
,
Object
>>
pageList
(
Page
<
Map
<
String
,
Object
>>
page
,
JgEnableDisableDto
dto
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
dto
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
...
...
@@ -126,7 +212,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
//启动流程
try
{
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
WORK_FLOW
_KEY
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION
_KEY
);
dto
.
setBusinessKey
(
"submit"
);
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
instanceId
=
((
Map
<?,
?>)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
...
...
@@ -136,6 +222,35 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
return
instanceId
;
}
/**
* 工作流启动并执行
* @param submitType 是否提交
* @param record 设备record
* @return 工作流返回相关数据
*/
private
List
<
WorkflowResultDto
>
workFlowInfo
(
String
submitType
,
String
record
)
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
record
);
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
List
<
ProcessTaskDTO
>
processTaskDTOS
=
iCmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
// 组装工作流返回的数据
return
commonService
.
buildWorkFlowInfo
(
processTaskDTOS
);
}
return
new
ArrayList
<>();
}
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
try
{
JgEnableDisable
jgEnableDisable
=
this
.
baseMapper
.
selectById
(
id
);
...
...
@@ -266,7 +381,20 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
public
Map
<
String
,
Object
>
getDetail
(
Long
sequenceNbr
)
{
return
this
.
baseMapper
.
getDetail
(
sequenceNbr
);
Map
<
String
,
Object
>
resultMap
=
this
.
baseMapper
.
getDetail
(
sequenceNbr
);
JgEnableDisableEq
jgEnableDisableEq
=
jgEnableDisableEqMapper
.
selectOne
(
new
LambdaQueryWrapper
<
JgEnableDisableEq
>().
eq
(
JgEnableDisableEq:
:
getEnableDisableApplyId
,
sequenceNbr
));
Map
<
String
,
Object
>
map
=
jgMaintainNoticeMapper
.
getEquipInfoByRecord
(
jgEnableDisableEq
.
getEquId
());
map
.
put
(
"equListDesc"
,
map
.
get
(
"equList"
));
map
.
put
(
"equCategoryDesc"
,
map
.
get
(
"equCategory"
));
map
.
put
(
"equDefineDesc"
,
map
.
get
(
"equDefine"
));
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
for
(
String
s
:
fields
)
{
if
(
map
.
containsKey
(
s
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
s
)))
map
.
put
(
s
,
JSON
.
parseArray
(
map
.
get
(
s
).
toString
()));
}
resultMap
.
putAll
(
map
);
return
resultMap
;
}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
c8ba0810
...
...
@@ -20,6 +20,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNoticeEq;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
...
...
@@ -38,6 +39,7 @@ import com.yeejoin.amos.component.feign.utils.FeignUtil;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
...
...
@@ -195,7 +197,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
Map
<
String
,
Object
>
map
=
equipmentInfos
.
get
(
0
);
BeanUtil
.
copyProperties
(
installationInfo
,
map
,
"equList"
,
"supervisoryCode"
);
BeanUtil
.
copyProperties
(
installationInfo
,
map
,
"equList"
,
"supervisoryCode"
,
"factoryNum"
);
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"installationInfo"
,
map
);
}};
...
...
@@ -208,7 +210,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
*/
@SuppressWarnings
({
"rawtypes"
,
"Duplicates"
})
public
JgInstallationNoticeDto
updateInstallationNotice
(
String
submitType
,
JgInstallationNoticeDto
noticeDto
,
String
op
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
...
...
@@ -524,7 +525,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskModelDto
.
setStartDate
(
item
.
getCreateDate
());
taskModelDto
.
setModel
(
item
);
taskModelDto
.
setNextExecuteUser
(
item
.
getNextExecuteIds
());
taskModelDto
.
setTaskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getEquRegisterCode
(),
item
.
getApplyNo
()));
taskModelDto
.
setTaskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
StringUtils
.
isEmpty
(
item
.
getFactoryNum
())
?
""
:
item
.
getFactoryNum
(),
item
.
getApplyNo
()));
taskModelDtoList
.
add
(
taskModelDto
);
});
commonService
.
buildTaskModel
(
taskModelDtoList
);
...
...
@@ -551,6 +552,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
dto
.
setEntrustingUnitName
(
dto
.
getUseUnitName
());
dto
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setEquRegisterCode
(
String
.
valueOf
(
obj
.
get
(
"EQU_CODE"
)));
dto
.
setFactoryNum
(
String
.
valueOf
(
obj
.
get
(
"FACTORY_NUM"
)));
StringBuffer
buffer
=
new
StringBuffer
();
buffer
.
append
(
dto
.
getProvinceName
()).
append
(
dto
.
getCityName
()).
append
(
dto
.
getCountyName
()).
append
(
dto
.
getAddress
());
dto
.
setEquAddress
(
buffer
.
toString
());
...
...
@@ -886,6 +888,32 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Override
public
Map
<
String
,
Object
>
getCompanyType
()
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
result
.
put
(
"companyType"
,
""
);
List
<
CompanyModel
>
companyModels
=
FeignUtil
.
remoteCall
(()
->
Privilege
.
companyClient
.
queryListByChild
(
RequestContext
.
getExeUserId
()));
if
(
companyModels
.
isEmpty
())
{
return
result
;
}
CompanyModel
currentCompany
=
companyModels
.
get
(
0
);
result
.
put
(
"creditCode"
,
currentCompany
.
getCompanyCode
());
String
companyLevel
=
CompanyTypeEnum
.
decideCompanyLevel
(
currentCompany
.
getCompanyType
());
String
companyType
=
CompanyTypeEnum
.
decideCompanyCode
(
currentCompany
.
getCompanyType
());
String
companyTypeName
=
CompanyTypeEnum
.
decideCompanyType
(
currentCompany
.
getCompanyType
());
if
(!
ValidationUtil
.
isEmpty
(
companyLevel
))
{
result
.
put
(
"companyLevel"
,
companyLevel
);
if
(
companyLevel
.
contains
(
","
))
{
result
.
put
(
"companyLevel"
,
"testAdmin"
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
companyType
))
{
result
.
put
(
"companyType"
,
companyType
);
}
if
(!
ValidationUtil
.
isEmpty
(
companyTypeName
))
{
result
.
put
(
"companyTypeName"
,
companyTypeName
);
}
return
result
;
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
View file @
c8ba0810
...
...
@@ -706,6 +706,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
taskMap
.
put
(
"relationId"
,
jgMaintainNotice
.
getInstanceId
());
taskMap
.
put
(
"flowStatus"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
());
taskMap
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
taskMap
.
put
(
"model"
,
jgMaintainNotice
);
commonService
.
updateTaskModel
(
taskMap
);
}
else
{
jgMaintainNotice
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
...
...
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 @
c8ba0810
...
...
@@ -240,6 +240,8 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
jsonObject
.
put
(
"nextTaskId"
,
contract
.
getNextTaskId
());
jsonObject
.
put
(
"nextExecuteUser"
,
contract
.
getNextExecuteIds
());
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_MAINTENANCE_RECORD
.
getCode
());
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
contract
.
getStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
contract
.
getStatus
());
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
}
...
...
@@ -285,9 +287,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
JgMaintenanceContract
contract
=
new
JgMaintenanceContract
();
boolean
hasId
=
StringUtils
.
isEmpty
(
contractDto
.
getSequenceNbr
());
//没有id说明是新增
BeanUtils
.
copyProperties
(
contractDto
,
contract
);
contract
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
contract
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
if
(
hasId
)
{
contract
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
contract
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
contract
.
setStatus
(
SUBMIT_DATA
.
equals
(
submit
)
?
WorkFlowStatusEnum
.
MAIN_SUBMIT
.
getPass
()
:
WorkFlowStatusEnum
.
MAIN_RECEIVE
.
getPass
());
this
.
save
(
contract
);
}
else
{
...
...
@@ -338,6 +340,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setInstanceId
(
instanceId
);
contract
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListNext
));
contract
.
setNextTaskId
(
nextTaskId
);
contract
.
setStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
MAIN_RECEIVE
.
getPass
()));
contract
.
setNextExecuteUserIds
(
nextUserIds
);
// 创建待办
JgMaintenanceContract
bean
=
new
JgMaintenanceContract
();
...
...
@@ -437,7 +440,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract
.
setNextExecuteUserIds
(
""
);
contract
.
setApplyDate
(
new
Date
());
contract
.
setStatus
(
taskCode
);
updateTaskModel
(
contract
,
operate
);
updateTaskModel
(
contract
,
"0"
);
}
this
.
getBaseMapper
().
updateById
(
contract
);
}
...
...
@@ -450,6 +453,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
params
.
put
(
"taskStatusLabel"
,
flowStatusEnum
.
getName
());
params
.
put
(
"flowStatus"
,
this
.
getTaskStatusByName
(
contract
.
getStatus
()));
params
.
put
(
"flowStatusLabel"
,
contract
.
getStatus
());
params
.
put
(
"model"
,
contract
);
return
commonService
.
updateTaskModelNew
(
params
);
}
...
...
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 @
c8ba0810
...
...
@@ -311,7 +311,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
private
String
buildTaskContent
(
String
supervisoryCode
,
String
cancelType
,
String
applyNo
)
{
// 来自电梯【X3100-123456】【移装注销】的业务办理【申请单号:ABCD0000001】
String
type
=
"1"
.
equals
(
cancelType
)
?
"报废注销"
:
"移装注销"
;
return
String
.
format
(
template
,
supervisoryCode
,
type
,
applyNo
);
return
String
.
format
(
template
,
Objects
.
isNull
(
supervisoryCode
)
?
"无"
:
supervisoryCode
,
type
,
applyNo
);
}
public
void
deleteBatch
(
List
<
Long
>
ids
)
{
...
...
@@ -386,7 +386,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
jgScrapCancelDto
.
setNextTaskId
(
nextTaskId
);
// 更新下一步可执行人
jgScrapCancelDto
.
setNextExecuteUserIds
(
nextUserIds
);
executeOneStep
(
jgScrapCancelDto
,
taskName
,
nextUserIds
,
op
);
JgScrapCancel
jgScrapCancel
=
new
JgScrapCancel
();
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
jgScrapCancel
);
createTaskModel
(
jgScrapCancel
,
taskName
,
"1"
,
nextUserIds
);
}
JgScrapCancel
cancel
=
new
JgScrapCancel
();
BeanUtils
.
copyProperties
(
jgScrapCancelDto
,
cancel
);
...
...
@@ -443,7 +445,6 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
BeanUtil
.
copyProperties
(
taskV2Model
,
modelDto
);
modelDto
.
setNextExecuteUser
(
jgScrapCancelDto
.
getNextExecuteIds
());
modelDto
.
setModel
(
jgScrapCancelDto
);
// 再插入新代办、数据待定
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
modelDto
));
}
...
...
@@ -528,7 +529,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
String
nextUserIds
=
workflowResultDtos
.
get
(
0
).
getNextExecutorUserIds
();
jgScrapCancel
.
setNextExecuteUserIds
(
nextUserIds
);
jgScrapCancel
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgScrapCancel
.
setNextExecuteIds
(
Objects
.
isNull
(
workflowResultDto
)
?
null
:
workflowResultDto
.
getNextExecutorRoleIds
());
jgScrapCancel
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
this
.
update
(
jgScrapCancel
,
lambda
);
// 删除待办
...
...
@@ -536,9 +537,15 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
jsonObject
.
put
(
"nextTaskId"
,
jgScrapCancel
.
getNextTaskId
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgScrapCancel
.
getNextExecuteIds
());
jsonObject
.
put
(
"taskType"
,
businessTypeJudgment
(
jgScrapCancel
.
getCancelType
()).
getCode
());
jsonObject
.
put
(
"flowStatus"
,
this
.
getTaskCodeByName
(
jgScrapCancel
.
getAuditStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
jgScrapCancel
.
getAuditStatus
());
commonService
.
rollbackTask
(
instanceId
,
jsonObject
);
}
private
Integer
getTaskCodeByName
(
String
auditStatus
)
{
return
commonService
.
getDictionaryCodeByName
(
auditStatus
);
}
@Transactional
public
void
flowExecute
(
Long
id
,
String
instanceId
,
String
operate
,
String
comment
)
{
try
{
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/json/urlInfo.json
View file @
c8ba0810
...
...
@@ -55,15 +55,15 @@
},
{
"type"
:
"106"
,
"pageType"
:
"
look
"
,
"pageType"
:
"
edit
"
,
"name"
:
"维保备案"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1735612073380966402&roleIds={roleIds}&userId={userId}&pageType=
look
"
"url"
:
"/mixuap?appId=1742358052905971713&id=1735612073380966402&roleIds={roleIds}&userId={userId}&pageType=
edit
"
},
{
"type"
:
"106"
,
"pageType"
:
"
edit
"
,
"pageType"
:
"
look
"
,
"name"
:
"维保备案"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=1735612073380966402&roleIds={roleIds}&userId={userId}&pageType=
edit
"
"url"
:
"/mixuap?appId=1742358052905971713&id=1735612073380966402&roleIds={roleIds}&userId={userId}&pageType=
look
"
},
{
"type"
:
"107"
,
...
...
@@ -93,13 +93,13 @@
"type"
:
"109"
,
"pageType"
:
"look"
,
"name"
:
"单位变更登记"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=173
9250036920840194
&roleIds={roleIds}&userId={userId}&pageType=look"
"url"
:
"/mixuap?appId=1742358052905971713&id=173
8095060211232770
&roleIds={roleIds}&userId={userId}&pageType=look"
},
{
"type"
:
"109"
,
"pageType"
:
"edit"
,
"name"
:
"单位变更登记"
,
"url"
:
"/mixuap?appId=1742358052905971713&id=173
9250036920840194
&roleIds={roleIds}&userId={userId}&pageType=edit"
"url"
:
"/mixuap?appId=1742358052905971713&id=173
8095060211232770
&roleIds={roleIds}&userId={userId}&pageType=edit"
},
{
"type"
:
"110"
,
...
...
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