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
44926b8f
Commit
44926b8f
authored
Apr 16, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(jg):安装告知添加属地监管部门
parent
8f519367
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
123 deletions
+145
-123
JgUseRegistrationMapper.java
...os/boot/module/jg/api/mapper/JgUseRegistrationMapper.java
+2
-0
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+12
-0
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+111
-113
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+20
-10
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/mapper/JgUseRegistrationMapper.java
View file @
44926b8f
...
...
@@ -22,6 +22,8 @@ public interface JgUseRegistrationMapper extends BaseMapper<JgUseRegistration> {
Map
<
String
,
Object
>
getDetail
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
getSupervisionInfoDetail
(
@Param
(
"id"
)
String
id
);
Map
<
String
,
Object
>
getInspectDetail
(
@Param
(
"id"
)
String
id
,
@Param
(
"permissionInspectTypes"
)
List
<
String
>
permissionInspectTypes
);
Map
<
String
,
Object
>
getUseDetail
(
@Param
(
"id"
)
String
id
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
44926b8f
...
...
@@ -136,6 +136,18 @@
LEFT JOIN idx_biz_jg_construction_info jci on jri.RECORD = jci.RECORD
where jri.RECORD = #{id}
</select>
<select
id=
"getSupervisionInfoDetail"
resultType=
"java.util.Map"
>
SELECT
ibjsi.ORG_BRANCH_CODE as orgBranchCode,
ibjsi.ORG_BRANCH_NAME as orgBranchName,
ibjsi.KEY_MONITORING_EQU as keyMonitoringEqu,
ibjsi.DENSELY_POPULATED_AREAS as denselyPopulatedAreas,
ibjsi.IMPORTANT_PLACES as importantPlaces,
ibjsi.COMPANY_ORG_BRANCH_CODE as companyOrgBranchCode
from idx_biz_jg_supervision_info ibjsi
where ibjsi.RECORD = #{id}
</select>
<select
id=
"getInspectDetail"
resultType=
"java.util.Map"
>
SELECT INSPECT_TYPE as inspectType,
INSPECT_STAFF as inspectStaff,
...
...
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 @
44926b8f
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSON;
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.github.pagehelper.util.StringUtil
;
...
...
@@ -38,6 +39,8 @@ import com.yeejoin.amos.boot.module.ymt.api.enums.EquCodeTypeEnum;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.*
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
...
...
@@ -79,7 +82,7 @@ import static com.alibaba.fastjson.JSON.parseArray;
*/
@Service
@Slf4j
public
class
JgInstallationNoticeServiceImpl
extends
BaseService
<
JgInstallationNoticeDto
,
JgInstallationNotice
,
JgInstallationNoticeMapper
>
implements
IJgInstallationNoticeService
{
public
class
JgInstallationNoticeServiceImpl
extends
BaseService
<
JgInstallationNoticeDto
,
JgInstallationNotice
,
JgInstallationNoticeMapper
>
implements
IJgInstallationNoticeService
{
private
static
final
String
SUBMIT_TYPE_FLOW
=
"1"
;
private
static
final
String
PROCESS_DEFINITION_KEY
=
"installationNotificationNew"
;
...
...
@@ -88,30 +91,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
static
final
String
CONSTRUCTION_TYPE_NAME
=
"安装"
;
//西安行政区划code
//
西安行政区划code
private
static
final
String
XIAN
=
"610100"
;
//咸阳行政区划code
//
咸阳行政区划code
private
static
final
String
XIAN_YANG
=
"610400"
;
@Value
(
"classpath:/json/urlInfo.json"
)
public
Resource
bizTypeInfo
;
@Autowired
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Autowired
JgInstallationNoticeEqMapper
jgInstallationNoticeEqMapper
;
@Autowired
JgUseRegistrationMapper
jgUseRegistrationMapper
;
@Autowired
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
@Autowired
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
@Autowired
private
ProduceInfoMapper
produceInfoMapper
;
@Autowired
IdxBizJgRegisterInfoMapper
tzsJgRegistrationInfoMapper
;
@Autowired
...
...
@@ -119,51 +113,40 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
;
@Autowired
SupervisoryCodeInfoMapper
supervisoryCodeInfoMapper
;
@Autowired
SuperviseInfoMapper
superviseInfoMapper
;
@Autowired
IIdxBizJgConstructionInfoService
constructionInfoService
;
@Autowired
IIdxBizJgUseInfoService
useInfoService
;
@Autowired
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
@Value
(
value
=
"${tzs.domain:http://sxtzsb.sxsei.com}"
)
String
TZSDOMAIN
;
@Autowired
AmosRequestContext
amosRequestContext
;
@Autowired
CodeUtil
codeUtil
;
@Autowired
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
@Autowired
private
ProduceInfoMapper
produceInfoMapper
;
@Autowired
private
DataDictionaryMapper
dataDictionaryMapper
;
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
private
TzBaseUnitLicenceMapper
baseUnitLicenceMapper
;
@Value
(
"classpath:/json/urlInfo.json"
)
public
Resource
bizTypeInfo
;
@Value
(
value
=
"${tzs.domain:http://sxtzsb.sxsei.com}"
)
String
TZSDOMAIN
;
@Autowired
AmosRequestContext
amosRequestContext
;
@Autowired
private
ICmWorkflowService
iCmWorkflowService
;
@Autowired
private
CommonServiceImpl
commonService
;
@Autowired
private
RedissonClient
redissonClient
;
@Autowired
CodeUtil
codeUtil
;
/**
* 根据sequenceNbr查询
*
...
...
@@ -185,35 +168,35 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo
.
put
(
"useUnitCreditCode"
,
notice
.
getUseUnitCreditCode
()
+
"_"
+
notice
.
getUseUnitName
());
installationInfo
.
put
(
"receiveOrgCreditCode"
,
notice
.
getReceiveOrgCreditCode
()
+
"_"
+
notice
.
getReceiveOrgName
());
installationInfo
.
put
(
"installLeaderId"
,
notice
.
getInstallLeaderId
()
+
"_"
+
notice
.
getInstallLeaderName
());
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getInspectUnitId
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getInspectUnitName
()))
{
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getInspectUnitId
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getInspectUnitName
()))
{
installationInfo
.
put
(
"inspectUnitId"
,
notice
.
getInspectUnitId
()
+
"_"
+
notice
.
getInspectUnitName
());
}
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getFactoryUseSiteStreet
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getFactoryUseSiteStreet
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getStreetName
()))
{
installationInfo
.
put
(
"factoryUseSiteStreet"
,
notice
.
getFactoryUseSiteStreet
()
+
"_"
+
notice
.
getStreetName
());
}
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getOrgBranchCode
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getOrgBranchName
()))
{
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getOrgBranchCode
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getOrgBranchName
()))
{
installationInfo
.
put
(
"orgBranchCode"
,
notice
.
getOrgBranchCode
()
+
"_"
+
notice
.
getOrgBranchName
());
}
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getPropertyUnitCreditCode
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getPropertyUnitName
()))
{
if
(!
ValidationUtil
.
isEmpty
(
notice
.
getPropertyUnitCreditCode
())
&&
!
ValidationUtil
.
isEmpty
(
notice
.
getPropertyUnitName
()))
{
installationInfo
.
put
(
"propertyUnitName"
,
notice
.
getPropertyUnitCreditCode
()
+
"_"
+
notice
.
getPropertyUnitName
());
}
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
,
"otherAccessories"
};
"proxyStatementAttachment"
,
"installContractAttachment"
,
"otherAccessories"
};
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgInstallationNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
if
(
installationInfo
.
containsKey
(
s
))
{
for
(
String
s
:
fields
)
{
if
(
installationInfo
.
containsKey
(
s
))
{
installationInfo
.
put
(
s
,
ObjectUtils
.
isEmpty
(
installationInfo
.
get
(
s
))
?
new
JSONArray
()
:
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
}
}
if
(
Integer
.
parseInt
(
notice
.
getNoticeStatus
())
==
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())
{
if
(
Integer
.
parseInt
(
notice
.
getNoticeStatus
())
==
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
())
{
// 完成时显示历史数据
JSONObject
hisData
=
commonService
.
queryHistoryData
(
notice
.
getSequenceNbr
());
// 兼容老数据
if
(
hisData
==
null
)
{
if
(
hisData
==
null
)
{
Map
<
String
,
Object
>
detail
=
setNewEquipData
(
companyLevel
,
installationInfo
,
equipmentInfos
);
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"installationInfo"
,
detail
);
...
...
@@ -281,7 +264,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
noticeDto
.
getSequenceNbr
().
toString
());
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
//下一节点执行人单位(下节点接收机构code)
//
下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
notice
.
getReceiveOrgCreditCode
());
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
...
...
@@ -307,7 +290,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
WorkflowResultDto
workflowResultDto
=
new
WorkflowResultDto
();
// 只调用执行API,返回下个节点信息,用于填充业务字段
//组装信息
//
组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
notice
.
getNextTaskId
());
...
...
@@ -318,7 +301,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
commMap
.
put
(
"approvalStatus"
,
op
);
}
dto
.
setVariable
(
commMap
);
//下一节点执行人单位(下节点接收机构code)
//
下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
notice
.
getReceiveOrgCreditCode
());
processTaskDTO
=
iCmWorkflowService
.
completeOrReject
(
notice
.
getNextTaskId
(),
dto
,
op
);
// 提取节点等信息
...
...
@@ -362,7 +345,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
commonService
.
buildTaskModel
(
Collections
.
singletonList
(
taskModelDto
));
}
}
commonService
.
saveExecuteFlowData2Redis
(
notice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
notice
));
commonService
.
saveExecuteFlowData2Redis
(
notice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
notice
));
}
else
{
JgInstallationNotice
bean
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
...
...
@@ -372,7 +355,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
/**
* 分页查询
*
...
...
@@ -384,14 +366,14 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Override
public
Page
<
Map
<
String
,
Object
>>
queryForJgInstallationNoticePage
(
Page
<
JgInstallationNotice
>
page
,
JgInstallationNoticeDto
model
,
String
type
,
String
type
,
String
sort
,
ReginParams
reginParams
)
{
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
model
.
setTransferToUserIds
(
reginParams
.
getUserModel
().
getUserId
());
Page
<
Map
<
String
,
Object
>>
noticePage
=
jgInstallationNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
sortMap
,
orgCode
);
Page
<
Map
<
String
,
Object
>>
noticePage
=
jgInstallationNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
sortMap
,
orgCode
);
List
<
Map
<
String
,
Object
>>
mappedRecords
=
noticePage
.
getRecords
().
stream
().
peek
(
notice
->
{
Optional
<
Long
>
noticeStatusOpt
=
Optional
.
ofNullable
((
String
)
notice
.
get
(
"noticeStatus"
)).
map
(
Long:
:
valueOf
);
noticeStatusOpt
.
ifPresent
(
status
->
{
...
...
@@ -444,7 +426,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
Objects
.
isNull
(
jgInstallationNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"安装告知单不存在"
);
}
Map
<
String
,
Object
>
placeholders
=
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
().
substring
(
0
,
2
));
Map
<
String
,
Object
>
placeholders
=
fullFillTemplateObj
(
informationList
,
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
().
substring
(
0
,
2
));
String
tempFileName
=
"安装告知单_"
+
System
.
currentTimeMillis
()
+
"_temp"
;
// String url = WordTemplateUtils.templateToPdf(tempFileName, "installation-notification-report.ftl", placeholders);
...
...
@@ -487,7 +469,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"factoryNum"
));
//出厂编号
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"factoryNum"
));
//
出厂编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"installUnitAddress"
));
// 施工单位地址
...
...
@@ -518,7 +500,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
JgInstallationNoticeDto
model
=
JSON
.
parseObject
(
jgInstallationNoticeDtoMap
.
get
(
TABLE_PAGE_ID
).
toString
(),
JgInstallationNoticeDto
.
class
);
// 字段转换
convertField
(
model
);
this
.
convertField
(
model
);
// 获取告知设备列表
List
<
Map
<
String
,
Object
>>
deviceList
=
model
.
getDeviceList
();
...
...
@@ -542,7 +524,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
List
<
JgInstallationNotice
>
list
=
new
ArrayList
<>();
List
<
JgInstallationNoticeEq
>
equipList
=
new
ArrayList
<>();
//业务数据组装等
//
业务数据组装等
businessData
(
submitType
,
reginParams
,
model
,
deviceList
,
applyNoList
,
list
,
equipList
,
workflowResultList
);
jgInstallationNoticeMapper
.
insertBatchSomeColumn
(
list
);
...
...
@@ -564,28 +546,29 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
private
void
updateRedisBatch
(
List
<
JgInstallationNotice
>
jgInstallationNotices
)
{
jgInstallationNotices
.
stream
().
filter
(
n
->
StringUtil
.
isNotEmpty
(
n
.
getInstanceId
())).
forEach
(
jgInstallationNotice
->
{
jgInstallationNotices
.
stream
().
filter
(
n
->
StringUtil
.
isNotEmpty
(
n
.
getInstanceId
())).
forEach
(
jgInstallationNotice
->
{
commonService
.
saveExecuteFlowData2Redis
(
jgInstallationNotice
.
getInstanceId
(),
this
.
buildInstanceRuntimeData
(
jgInstallationNotice
));
});
}
/**
* 暂存任务生成待办
*
* @param list 业务信息
*/
private
void
buildTaskDraft
(
List
<
JgInstallationNotice
>
list
)
{
List
<
TaskModelDto
>
modelDtos
=
new
ArrayList
<>();
list
.
forEach
(
obj
->
{
TaskModelDto
dto
=
new
TaskModelDto
();
//行数据
//
行数据
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
obj
,
taskMessageDto
);
dto
.
setModel
(
taskMessageDto
);
//摘要 按原有规则组装
//
摘要 按原有规则组装
dto
.
setTaskContent
(
String
.
format
(
"来自%s【%s】的业务办理,【申请单号:%s】"
,
obj
.
getEquList
(),
StringUtils
.
isEmpty
(
obj
.
getFactoryNum
())
?
""
:
obj
.
getFactoryNum
(),
obj
.
getApplyNo
()));
//申请单号
//
申请单号
dto
.
setTaskCode
(
obj
.
getApplyNo
());
//业务类型枚举code值
//
业务类型枚举code值
dto
.
setTaskType
(
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getCode
());
////业务主键
dto
.
setRelationId
(
obj
.
getSequenceNbr
()
+
""
);
...
...
@@ -622,13 +605,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskModelDtoList
.
add
(
taskModelDto
);
if
(
isDeleteDraft
)
{
// 删除暂存时生成的待办
commonService
.
deleteTaskModel
(
item
.
getSequenceNbr
()
+
""
);
commonService
.
deleteTaskModel
(
item
.
getSequenceNbr
()
+
""
);
}
});
commonService
.
buildTaskModel
(
taskModelDtoList
);
}
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgInstallationNoticeDto
model
,
List
<
Map
<
String
,
Object
>>
deviceList
,
List
<
String
>
applyNoList
,
List
<
JgInstallationNotice
>
list
,
List
<
JgInstallationNoticeEq
>
equipList
,
List
<
WorkflowResultDto
>
workflowResultList
)
{
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgInstallationNoticeDto
model
,
List
<
Map
<
String
,
Object
>>
deviceList
,
List
<
String
>
applyNoList
,
List
<
JgInstallationNotice
>
list
,
List
<
JgInstallationNoticeEq
>
equipList
,
List
<
WorkflowResultDto
>
workflowResultList
)
{
deviceList
.
forEach
(
obj
->
{
JgInstallationNoticeEq
jgRelationEquip
=
new
JgInstallationNoticeEq
();
JgInstallationNotice
dto
=
new
JgInstallationNotice
();
...
...
@@ -637,7 +620,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
workflowResultList
.
get
(
i
).
getNextExecutorRoleIds
());
dto
.
setNextExecuteUserIds
(
workflowResultList
.
get
(
i
).
getNextExecutorUserIds
());
dto
.
setInstanceStatus
(
workflowResultList
.
get
(
i
).
getNextExecutorRoleIds
()
+
","
+
workflowResultList
.
get
(
i
).
getExecutorRoleIds
());
...
...
@@ -671,6 +654,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
/**
* 工作流启动并执行
*
* @param submitType 是否提交
* @param deviceList 设备信息
* @return 工作流返回相关数据
...
...
@@ -698,13 +682,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
void
convertField
(
JgInstallationNoticeDto
model
)
{
// 处理图片
if
(!
ValidationUtil
.
isEmpty
(
model
.
getProxyStatementAttachmentList
()))
{
if
(!
ValidationUtil
.
isEmpty
(
model
.
getProxyStatementAttachmentList
()))
{
model
.
setProxyStatementAttachment
(
JSON
.
toJSONString
(
model
.
getProxyStatementAttachmentList
()));
}
if
(!
ValidationUtil
.
isEmpty
(
model
.
getInstallContractAttachmentList
()))
{
if
(!
ValidationUtil
.
isEmpty
(
model
.
getInstallContractAttachmentList
()))
{
model
.
setInstallContractAttachment
(
JSON
.
toJSONString
(
model
.
getInstallContractAttachmentList
()));
}
if
(!
ValidationUtil
.
isEmpty
(
model
.
getOtherAccessoriesList
()))
{
if
(!
ValidationUtil
.
isEmpty
(
model
.
getOtherAccessoriesList
()))
{
model
.
setOtherAccessories
(
JSON
.
toJSONString
(
model
.
getOtherAccessoriesList
()));
}
...
...
@@ -800,9 +784,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
model
.
setInstallLeaderName
(
leaderList
[
1
]);
}
}
// StringBuffer buffer = new StringBuffer();
// buffer.append(model.getProvinceName()).append(model.getCityName()).append(model.getCountyName()).append(model.getStreetName()).append(model.getAddress());
// model.setEquAddress(buffer.toString());
}
...
...
@@ -815,7 +796,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
try
{
boolean
isLocked
=
lock
.
tryLock
(
0
,
180
,
TimeUnit
.
SECONDS
);
// 解决并发问题:多个人同时操作一个流程(并发执行通过、驳回、撤回)
if
(!
isLocked
)
{
if
(!
isLocked
)
{
throw
new
BadRequest
(
"当前流程已经被执行!请重新打开页面查看并执行!"
);
}
// 流程执行时,状态及权限校验
...
...
@@ -840,17 +821,17 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
jsonObject
.
put
(
"nextTaskId"
,
jgInstallationNotice
.
getNextTaskId
());
commonService
.
rollbackTask
(
jgInstallationNotice
.
getInstanceId
(),
jsonObject
);
commonService
.
saveExecuteFlowData2Redis
(
instanceId
,
this
.
buildInstanceRuntimeData
(
jgInstallationNotice
));
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
lock
.
isHeldByCurrentThread
())
{
if
(
lock
.
isHeldByCurrentThread
())
{
lock
.
unlock
();
}
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
accept
(
JgInstallationNoticeDto
dto
,
String
op
)
{
public
void
accept
(
JgInstallationNoticeDto
dto
,
String
op
)
{
String
instanceId
=
dto
.
getInstanceId
();
String
nextTaskId
=
dto
.
getNextTaskId
();
String
lockKey
=
CommonServiceImpl
.
buildJgExecuteLockKey
(
instanceId
);
...
...
@@ -858,7 +839,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
try
{
boolean
isLocked
=
lock
.
tryLock
(
0
,
180
,
TimeUnit
.
SECONDS
);
// 解决并发问题:多个人同时操作一个流程(并发执行通过、驳回、撤回)
if
(!
isLocked
)
{
if
(!
isLocked
)
{
throw
new
BadRequest
(
"当前流程已经被执行!请重新打开页面查看并执行!"
);
}
// 流程执行时,状态及权限校验
...
...
@@ -881,26 +862,26 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
"0"
.
equals
(
op
))
{
if
(
StringUtils
.
isEmpty
(
workflowResultDto
.
getNextExecutorRoleIds
()))
{
LambdaQueryWrapper
<
JgInstallationNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
queryWrapper
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
JgInstallationNoticeEq
jgRelationEquip
=
jgInstallationNoticeEqMapper
.
selectOne
(
queryWrapper
);
this
.
saveHisDataBeforeUpdate
(
jgInstallationNotice
,
jgRelationEquip
.
getEquId
());
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
IdxBizJgRegisterInfo
tzsJgRegistration
Info
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
String
equCode
=
Optional
.
ofNullable
(
tzsJgRegistration
Info
.
getEquDefine
())
.
orElse
(
tzsJgRegistration
Info
.
getEquCategory
());
queryWrapper2
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
IdxBizJgRegisterInfo
idxBizJgRegister
Info
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
String
equCode
=
Optional
.
ofNullable
(
idxBizJgRegister
Info
.
getEquDefine
())
.
orElse
(
idxBizJgRegister
Info
.
getEquCategory
());
String
registrationCode
=
equCode
+
jgInstallationNotice
.
getReceiveOrgCreditCode
()
+
ym
;
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
registrationCode
);
String
deviceRegistrationCode
=
responseModel
.
getResult
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"code96333"
,
tzsJgOtherInfo
.
getCode96333
());
map
.
put
(
"superviseCode"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
map
.
put
(
"cityCode"
,
jgInstallationNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgInstallationNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistration
Info
.
getEquCategory
());
map
.
put
(
"code96333"
,
tzsJgOtherInfo
.
getCode96333
());
map
.
put
(
"superviseCode"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
map
.
put
(
"cityCode"
,
jgInstallationNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgInstallationNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
idxBizJgRegister
Info
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
jgInstallationNotice
.
getIsXixian
()
==
null
?
"null"
:
jgInstallationNotice
.
getIsXixian
().
equals
(
"0"
)
?
"null"
:
"1"
);
Map
<
String
,
Object
>
mapCode
;
ResponseModel
<
Map
<
String
,
Object
>>
code
=
tzsServiceFeignClient
.
createCode
(
map
);
...
...
@@ -908,22 +889,36 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
supervisoryCodeInfoMapper
.
updateStatusBySuperviseCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
jgInstallationNotice
.
setHandleDate
(
new
Date
());
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
jgInstallationNotice
.
setInformNumber
(
deviceRegistrationCode
);
jgInstallationNotice
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
jgInstallationNotice
.
setPromoter
(
""
);
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
// 更新其他业务表
if
(!
ValidationUtil
.
isEmpty
(
mapCode
.
get
(
"code96333"
)))
{
if
(!
ValidationUtil
.
isEmpty
(
mapCode
.
get
(
"code96333"
)))
{
tzsJgOtherInfo
.
setCode96333
(
mapCode
.
get
(
"code96333"
).
toString
());
map1
.
put
(
"CODE96333"
,
tzsJgOtherInfo
.
getCode96333
()
);
map1
.
put
(
"CODE96333"
,
tzsJgOtherInfo
.
getCode96333
()
);
}
tzsJgOtherInfo
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
jgInstallationNotice
.
setInformNumber
(
deviceRegistrationCode
);
jgInstallationNotice
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
jgInstallationNotice
.
setPromoter
(
""
);
// 更新设备监管部门信息
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>
eq
=
new
QueryWrapper
<
IdxBizJgSupervisionInfo
>().
lambda
()
.
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfo
=
idxBizJgSupervisionInfoMapper
.
selectOne
(
eq
);
if
(!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getOrgBranchCode
())
&&
!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getOrgBranchName
()))
{
CompanyModel
result
=
Privilege
.
companyClient
.
queryByCompanyName
(
jgInstallationNotice
.
getOrgBranchName
()).
getResult
();
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
result
.
getOrgCode
());
idxBizJgSupervisionInfo
.
setOrgBranchName
(
result
.
getCompanyName
());
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
(
result
.
getCompanyCode
());
idxBizJgSupervisionInfoMapper
.
updateById
(
idxBizJgSupervisionInfo
);
}
// 生成设备代码及更新历史表的的设备代码字段
this
.
justGenerateEquCode
(
tzsJgRegistrationInfo
,
jgInstallationNotice
.
getReceiveOrgCreditCode
(),
jgInstallationNotice
);
tzsJgRegistrationInfoMapper
.
updateById
(
tzsJgRegistration
Info
);
this
.
justGenerateEquCode
(
idxBizJgRegisterInfo
,
jgInstallationNotice
.
getReceiveOrgCreditCode
(),
jgInstallationNotice
);
tzsJgRegistrationInfoMapper
.
updateById
(
idxBizJgRegister
Info
);
// 更新es
updateEquipEs
(
jgInstallationNotice
,
tzsJgOtherInfo
,
tzsJgRegistrat
ionInfo
,
map1
);
updateEquipEs
(
jgInstallationNotice
,
tzsJgOtherInfo
,
idxBizJgRegisterInfo
,
idxBizJgSupervis
ionInfo
,
map1
);
// 更新施工信息表
IdxBizJgConstructionInfo
idxBizJgConstructionInfo
=
constructionInfoService
.
queryNewestDetailByRecord
(
jgRelationEquip
.
getEquId
());
if
(!
ObjectUtils
.
isEmpty
(
idxBizJgConstructionInfo
))
{
...
...
@@ -1020,22 +1015,26 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
finally
{
if
(
lock
.
isHeldByCurrentThread
())
{
if
(
lock
.
isHeldByCurrentThread
())
{
lock
.
unlock
();
}
}
}
private
void
updateEquipEs
(
JgInstallationNotice
jgInstallationNotice
,
OtherInfo
tzsJgOtherInfo
,
IdxBizJgRegisterInfo
tzsJgRegistrationInfo
,
Map
<
String
,
Object
>
map1
)
{
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
map1
.
put
(
"EQU_CODE"
,
tzsJgRegistrationInfo
.
getEquCode
()
);
map1
.
put
(
"SUPERVISORY_CODE"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
map1
.
put
(
"USE_UNIT_CREDIT_CODE"
,
jgInstallationNotice
.
getUseUnitCreditCode
());
map1
.
put
(
"USE_UNIT_NAME"
,
jgInstallationNotice
.
getUseUnitName
());
map1
.
put
(
"USC_UNIT_CREDIT_CODE"
,
jgInstallationNotice
.
getInstallUnitCreditCode
());
map1
.
put
(
"USC_UNIT_NAME"
,
jgInstallationNotice
.
getInstallUnitName
());
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s"
,
jgInstallationNotice
.
getProvinceName
(),
jgInstallationNotice
.
getCityName
(),
jgInstallationNotice
.
getCounty
()));
map1
.
put
(
"ADDRESS"
,
String
.
format
(
"%s/%s"
,
jgInstallationNotice
.
getStreetName
(),
jgInstallationNotice
.
getAddress
()));
private
void
updateEquipEs
(
JgInstallationNotice
jgInstallationNotice
,
OtherInfo
tzsJgOtherInfo
,
IdxBizJgRegisterInfo
tzsJgRegistrationInfo
,
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfo
,
Map
<
String
,
Object
>
map1
)
{
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
map1
.
put
(
"EQU_CODE"
,
tzsJgRegistrationInfo
.
getEquCode
());
map1
.
put
(
"ORG_BRANCH_CODE"
,
idxBizJgSupervisionInfo
.
getOrgBranchCode
());
map1
.
put
(
"ORG_BRANCH_NAME"
,
idxBizJgSupervisionInfo
.
getOrgBranchName
());
map1
.
put
(
"SUPERVISORY_CODE"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
map1
.
put
(
"USE_UNIT_CREDIT_CODE"
,
jgInstallationNotice
.
getUseUnitCreditCode
());
map1
.
put
(
"USE_UNIT_NAME"
,
jgInstallationNotice
.
getUseUnitName
());
map1
.
put
(
"USC_UNIT_CREDIT_CODE"
,
jgInstallationNotice
.
getInstallUnitCreditCode
());
map1
.
put
(
"USC_UNIT_NAME"
,
jgInstallationNotice
.
getInstallUnitName
());
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s"
,
jgInstallationNotice
.
getProvinceName
(),
jgInstallationNotice
.
getCityName
(),
jgInstallationNotice
.
getCounty
()));
map1
.
put
(
"ADDRESS"
,
String
.
format
(
"%s/%s"
,
jgInstallationNotice
.
getStreetName
(),
jgInstallationNotice
.
getAddress
()));
objMap
.
put
(
tzsJgOtherInfo
.
getRecord
(),
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
}
...
...
@@ -1044,8 +1043,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
/**
* 系统类型的code 自动生成设备代码
*
* @param registerInfo
注册信息
* @param receiveCompanyCode
接收机构行政区划代码
* @param registerInfo 注册信息
* @param receiveCompanyCode 接收机构行政区划代码
*/
private
void
justGenerateEquCode
(
IdxBizJgRegisterInfo
registerInfo
,
String
receiveCompanyCode
,
JgInstallationNotice
jgInstallationNotice
)
{
if
(
EquCodeTypeEnum
.
SYSTEM_GENERATED
.
getCode
().
equals
(
registerInfo
.
getEquCodeType
()))
{
...
...
@@ -1110,7 +1109,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
/**
* 执行工作流并返回组装好的工作流信息
* @param op 是否通过
*
* @param op 是否通过
* @param jgTransferNotice 业务信息 opinion 备注信息
* @return 返回组装好的工作流信息
*/
...
...
@@ -1118,7 +1118,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
ProcessTaskDTO
processTaskDTO
=
new
ProcessTaskDTO
();
WorkflowResultDto
workflowResultDto
=
new
WorkflowResultDto
();
// 只调用执行API,返回下个节点信息,用于填充业务字段
//组装信息
//
组装信息
TaskResultDTO
workDto
=
new
TaskResultDTO
();
workDto
.
setResultCode
(
"approvalStatus"
);
workDto
.
setTaskId
(
jgTransferNotice
.
getNextTaskId
());
...
...
@@ -1139,8 +1139,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
@Override
public
Map
<
String
,
Object
>
getCompanyType
()
{
Map
<
String
,
Object
>
result
=
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/service/impl/JgUseRegistrationServiceImpl.java
View file @
44926b8f
...
...
@@ -61,6 +61,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDate
;
import
java.time.ZoneId
;
...
...
@@ -568,7 +569,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
map
.
put
(
"safetyManagerName"
,
data
[
1
]);
});
//其他附件
//
其他附件
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"otherAccessories"
)))
{
useRegistration
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
}
...
...
@@ -621,7 +622,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 保存关联设备信息
jgUseRegistrationEqService
.
saveBatch
(
equipList
);
//启动流程
//
启动流程
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
// 删除暂存代办
commonServiceImpl
.
deleteTaskModel
(
String
.
valueOf
(
useRegistration
.
getSequenceNbr
()));
...
...
@@ -688,7 +689,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setInstanceId
(
workflowResultDto
.
getInstanceId
());
}
//非完成,进行审核
//
非完成,进行审核
if
(!
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
().
equals
(
taskCode
))
{
jgUseRegistration
.
setNextExecuteIds
(
role
);
jgUseRegistration
.
setInstanceStatus
(
...
...
@@ -696,7 +697,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
.
map
(
status
->
String
.
join
(
","
,
status
,
role
))
.
orElse
(
role
)
);
//通过或者驳回
//
通过或者驳回
jgUseRegistration
.
setStatus
(
"0"
.
equals
(
operate
)
?
Objects
.
requireNonNull
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
)).
getPass
()
:
Objects
.
requireNonNull
(
WorkFlowStatusEnum
.
getMessage
(
taskCode
)).
getReject
());
...
...
@@ -719,7 +720,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
BeanUtils
.
copyProperties
(
taskV2Model
,
taskModelDto
);
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtil
.
copyProperties
(
jgUseRegistration
,
taskMessageDto
);
//taskMessageDto.setEquipId(jgUseRegistrationEq.getEquId());
//
taskMessageDto.setEquipId(jgUseRegistrationEq.getEquId());
taskModelDto
.
setModel
(
taskMessageDto
);
taskModelDto
.
setTaskName
(
workflowResultDto
.
getNextTaskName
());
taskModelDto
.
setExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
...
...
@@ -740,7 +741,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setStatus
(
taskCode
);
jgUseRegistration
.
setNextExecuteUserIds
(
""
);
//查询历史暂存表
//
查询历史暂存表
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
getOne
(
Wrappers
.<
JgRegistrationHistory
>
lambdaQuery
()
.
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
String
.
valueOf
(
sequenceNbr
)));
...
...
@@ -1061,7 +1062,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List
<
WorkflowResultDto
>
resultDto
=
commonServiceImpl
.
buildWorkFlowInfo
(
processTaskDTOS
);
if
(!
ObjectUtils
.
isEmpty
(
resultDto
)
&&
!
ObjectUtils
.
isEmpty
(
resultDto
.
get
(
0
)))
{
WorkflowResultDto
workflowResultDto
=
resultDto
.
get
(
0
);
//按单位办理
//
按单位办理
if
(
"unit"
.
equals
(
manageType
))
{
this
.
updateUseRegUnitData
(
jgUseRegistration
.
getSequenceNbr
(),
operate
,
workflowResultDto
,
false
);
}
else
{
...
...
@@ -1121,7 +1122,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_USAGE_REGISTRATION
.
getCode
());
jsonObject
.
put
(
"flowStatus"
,
commonServiceImpl
.
getDictionaryCodeByName
(
jgUseRegistration
.
getStatus
()));
jsonObject
.
put
(
"flowStatusLabel"
,
jgUseRegistration
.
getStatus
());
//非单位办理
//
非单位办理
if
(!
"unit"
.
equals
(
manageType
))
{
LambdaQueryWrapper
<
JgUseRegistrationEq
>
lambda1
=
new
QueryWrapper
<
JgUseRegistrationEq
>().
lambda
();
lambda1
.
eq
(
JgUseRegistrationEq:
:
getEquipTransferId
,
String
.
valueOf
(
data
.
getSequenceNbr
()));
...
...
@@ -1190,6 +1191,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
}
// 基本信息 + 制造信息
Map
<
String
,
Object
>
detail
=
this
.
baseMapper
.
getDetail
(
record
);
// 监督管理信息
Map
<
String
,
Object
>
supervisionInfo
=
this
.
baseMapper
.
getSupervisionInfoDetail
(
record
);
// 检验信息
Map
<
String
,
Object
>
inspectDetail
=
this
.
getInspectDetail
(
record
);
// 使用信息
...
...
@@ -1215,6 +1218,13 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(!
ObjectUtils
.
isEmpty
(
installDetail
))
{
detail
.
putAll
(
installDetail
);
}
if
(!
ObjectUtils
.
isEmpty
(
supervisionInfo
)
&&
!
StringUtils
.
isEmpty
(
supervisionInfo
.
get
(
"orgBranchCode"
)))
{
String
orgBranchCode
=
(
String
)
supervisionInfo
.
get
(
"orgBranchCode"
);
String
orgBranchName
=
(
String
)
supervisionInfo
.
get
(
"orgBranchName"
);
supervisionInfo
.
put
(
"orgBranchCode"
,
orgBranchCode
+
"_"
+
orgBranchName
);
supervisionInfo
.
put
(
"hasOrgBranchCode"
,
true
);
detail
.
putAll
(
supervisionInfo
);
}
detail
.
remove
(
"safetyManager"
);
// 附件解析
commonServiceImpl
.
convertStringToJsonobject
(
detail
,
jsonFields
);
...
...
@@ -1442,8 +1452,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
useFlagParamDto
.
setEquipCode
(
registerInfo
.
getEquCode
());
useFlagParamDto
.
setEquipCategory
(
exportParamsMap
.
get
(
"equCategory"
).
toString
());
useFlagParamDto
.
setEquipDefine
(
Optional
.
ofNullable
(
exportParamsMap
.
get
(
"equDefine"
))
.
orElse
(
exportParamsMap
.
get
(
"equCategory"
).
toString
())
.
toString
());
.
orElse
(
exportParamsMap
.
get
(
"equCategory"
).
toString
())
.
toString
());
useFlagParamDto
.
setUseUnitName
(
exportParamsMap
.
get
(
"useUnitName"
).
toString
());
useFlagParamDto
.
setUseInnerCode
(
exportParamsMap
.
get
(
"useInnerCode"
).
toString
());
useFlagParamDto
.
setReceiveOrgName
(
useRegistration
.
getReceiveOrgName
());
...
...
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