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
e10c5f93
Commit
e10c5f93
authored
Dec 21, 2023
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(改造告知):开通业务
parent
90494db1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
247 additions
and
109 deletions
+247
-109
JgReformNoticeMapper.xml
...jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
+14
-7
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+163
-102
TzsServiceFeignClient.java
...mos/boot/module/jyjc/biz/feign/TzsServiceFeignClient.java
+65
-0
JyjcOpeningApplicationServiceImpl.java
...c/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
+5
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgReformNoticeMapper.xml
View file @
e10c5f93
...
@@ -26,7 +26,8 @@
...
@@ -26,7 +26,8 @@
isn.receive_org_name AS receiveOrgName,
isn.receive_org_name AS receiveOrgName,
isn.next_execute_ids as nextExecuteIds,
isn.next_execute_ids as nextExecuteIds,
isn.promoter,
isn.promoter,
isn.notice_report_url
isn.notice_report_url,
isn.accept_date
FROM
FROM
tzs_jg_reform_notice isn
tzs_jg_reform_notice isn
<where>
<where>
...
@@ -49,16 +50,15 @@
...
@@ -49,16 +50,15 @@
</if>
</if>
</if>
</if>
<if
test=
"type == 'supervision'"
>
<if
test=
"type == 'supervision'"
>
AND
isn.notice_status in ('6612', '6613', '6614'
)
AND
(isn.notice_status in ('6612', '6613', '6614', '6616')
)
AND isn.receive_org_code = #{orgCode}
AND isn.receive_org_code = #{orgCode}
<!-- AND (isn.notice_status in ('6612', '6613', '6614') or isn.status in('6614') )-->
</if>
</if>
<if
test=
"type == 'enterprise'"
>
<if
test=
"type == 'enterprise'"
>
AND isn.install_unit_credit_code = #{orgCode}
AND isn.install_unit_credit_code = #{orgCode}
</if>
</if>
</where>
</where>
ORDER BY
ORDER BY
isn.
notice
_date DESC
isn.
rec
_date DESC
</select>
</select>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
<select
id=
"queryEquipInformation"
resultType=
"java.util.Map"
>
...
@@ -82,10 +82,16 @@
...
@@ -82,10 +82,16 @@
isn.next_execute_ids as nextExecuteIds,
isn.next_execute_ids as nextExecuteIds,
isn.promoter,
isn.promoter,
isn.notice_status AS noticeStatus,
isn.notice_status AS noticeStatus,
<!-- isn.install_start_date AS installLicenseExpirationDate,-->
<!-- isn.install_license_no AS installLicenseNo,-->
isn.plan_date AS installStartDate,
isn.construction_manager AS installLeaderName,
isn.construction_manager_phone AS installLeaderPhone,
ri.equ_code AS equRegisterCode,
ri.equ_code AS equRegisterCode,
ri.equ_list AS equList,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
ri.EQU_DEFINE AS equDefine,
fi.FACTORY_NUM AS produceCode,
ri.product_name AS productName,
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
ri.equ_type AS equType,
...
@@ -112,11 +118,11 @@
...
@@ -112,11 +118,11 @@
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ui.safety_manager AS safetyManager,
ui.phone AS safetyManagerPhone
,
ei.legal_person AS safetyManager
,
ui.PROVINCE_NAME AS useUnitProvinceNam
e,
ei.legal_phone AS safetyManagerPhon
e,
ui.CITY_NAME AS useUnitCityName,
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.COUNTY_NAME AS useUnitCountyName,
u
i.ADDRESS AS useUnitAddress
e
i.ADDRESS AS useUnitAddress
FROM
FROM
tzs_jg_reform_notice isn
tzs_jg_reform_notice isn
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN tzs_jg_reform_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
...
@@ -125,6 +131,7 @@
...
@@ -125,6 +131,7 @@
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equ_id
LEFT JOIN idx_biz_jg_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 idx_biz_jg_use_info ui ON ui.record = re.equ_id
LEFT JOIN tz_base_enterprise_info ei ON ei.use_code = isn.use_unit_credit_code
WHERE
WHERE
isn.sequence_nbr = #{sequenceNbr}
isn.sequence_nbr = #{sequenceNbr}
LIMIT 1
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/service/impl/JgReformNoticeServiceImpl.java
View file @
e10c5f93
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.aspose.words.SaveFormat
;
import
com.aspose.words.SaveFormat
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -88,10 +89,10 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -88,10 +89,10 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
EquipmentCategoryMapper
equipmentCategoryMapper
;
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Autowired
@Autowired
JgReformNoticeEqMapper
J
gReformNoticeEqMapper
;
JgReformNoticeEqMapper
j
gReformNoticeEqMapper
;
@Autowired
@Autowired
private
JgReformNoticeMapper
J
gReformNoticeMapper
;
private
JgReformNoticeMapper
j
gReformNoticeMapper
;
@Autowired
@Autowired
private
ICreateCodeService
iCreateCodeService
;
private
ICreateCodeService
iCreateCodeService
;
// @Autowired
// @Autowired
...
@@ -130,7 +131,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -130,7 +131,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@Override
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
public
Map
<
String
,
Map
<
String
,
Object
>>
queryBySequenceNbr
(
Long
sequenceNbr
)
{
// 改造告知信息
// 改造告知信息
JgReformNotice
notice
=
J
gReformNoticeMapper
.
selectById
(
sequenceNbr
);
JgReformNotice
notice
=
j
gReformNoticeMapper
.
selectById
(
sequenceNbr
);
if
(
Objects
.
isNull
(
notice
))
{
if
(
Objects
.
isNull
(
notice
))
{
return
null
;
return
null
;
}
}
...
@@ -152,7 +153,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -152,7 +153,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"proxyStatementAttachment"
,
"installContractAttachment"
};
"proxyStatementAttachment"
,
"installContractAttachment"
};
// 设备信息
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
J
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
j
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
for
(
String
s
:
fields
)
{
for
(
String
s
:
fields
)
{
if
(
installationInfo
.
containsKey
(
s
))
{
if
(
installationInfo
.
containsKey
(
s
))
{
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
installationInfo
.
put
(
s
,
JSON
.
parseArray
(
installationInfo
.
get
(
s
).
toString
()));
...
@@ -161,6 +162,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -161,6 +162,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
equipmentInfos
.
get
(
0
).
put
(
s
,
JSON
.
parseArray
(
equipmentInfos
.
get
(
0
).
get
(
s
).
toString
()));
}
}
}
}
installationInfo
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
return
new
HashMap
<
String
,
Map
<
String
,
Object
>>()
{{
this
.
put
(
"reformInfo"
,
installationInfo
);
this
.
put
(
"reformInfo"
,
installationInfo
);
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
this
.
put
(
"equipmentInfo"
,
equipmentInfos
.
get
(
0
));
...
@@ -177,8 +179,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -177,8 +179,11 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
if
(
Objects
.
isNull
(
noticeDto
)
||
StringUtils
.
isEmpty
(
submitType
))
{
throw
new
IllegalArgumentException
(
"参数不能为空"
);
throw
new
IllegalArgumentException
(
"参数不能为空"
);
}
}
String
[]
taskName
=
new
String
[]{
"流程结束"
};
// 字段转换
// 字段转换
this
.
convertField
(
noticeDto
);
this
.
convertField
(
noticeDto
);
ArrayList
<
String
>
roleListFirst
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListSecond
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
AjaxResult
ajaxResult
;
AjaxResult
ajaxResult
;
// 发起流程
// 发起流程
...
@@ -190,45 +195,38 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -190,45 +195,38 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
noticeDto
.
setInstanceId
(
instanceId
);
noticeDto
.
setInstanceId
(
instanceId
);
// 查询下节点任务
getNext
(
roleListFirst
,
instanceId
,
taskName
);
noticeDto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
}
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
noticeDto
.
getInstanceId
());
JgReformNotice
notice
=
new
JgReformNotice
();
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
BeanUtils
.
copyProperties
(
noticeDto
,
notice
);
String
taskId
=
dataObject
.
getString
(
"id"
);
// 组装信息
boolean
submit
=
submit
(
notice
,
op
);
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
if
(
submit
)
{
taskResultDTO
.
setTaskId
(
taskId
);
// 查询下节点任务
taskResultDTO
.
setComment
(
"提交流程"
);
getNext
(
roleListSecond
,
notice
.
getInstanceId
(),
taskName
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
notice
.
setStatus
(
taskName
[
0
]);
map
.
put
(
"approvalStatus"
,
op
);
if
(!
ObjectUtils
.
isEmpty
(
notice
.
getInstanceStatus
()))
{
taskResultDTO
.
setVariable
(
map
);
notice
.
setInstanceStatus
(
notice
.
getInstanceStatus
()
+
","
+
roleListSecond
);
// 执行流程
}
else
{
AjaxResult
ajaxResult1
;
notice
.
setInstanceStatus
(
String
.
join
(
","
,
roleListSecond
));
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
noticeDto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
JgReformNotice
bean
=
new
JgReformNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
bean
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
JgReformNoticeMapper
.
updateById
(
bean
);
Boolean
rollBack
=
"1"
.
equals
(
op
)
?
true
:
false
;
if
(
rollBack
)
{
JgReformNoticeMapper
.
updatePromoter
(
noticeDto
.
getSequenceNbr
());
}
}
}
}
catch
(
Exception
e
)
{
notice
.
setPromoter
(
RequestContext
.
getExeUserId
());
log
.
error
(
"提交失败:{}"
,
e
);
notice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
notice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
jgReformNoticeMapper
.
updateById
(
notice
);
}
}
}
else
{
}
else
{
JgReformNotice
bean
=
new
JgReformNotice
();
JgReformNotice
bean
=
new
JgReformNotice
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
J
gReformNoticeMapper
.
updateById
(
bean
);
j
gReformNoticeMapper
.
updateById
(
bean
);
}
}
return
noticeDto
;
return
noticeDto
;
}
}
...
@@ -246,7 +244,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -246,7 +244,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
public
Page
<
JgReformNoticeDto
>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
public
Page
<
JgReformNoticeDto
>
queryForJgReformNoticePage
(
Page
<
JgReformNotice
>
page
,
JgReformNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
Page
<
JgReformNotice
>
noticePage
=
J
gReformNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
Page
<
JgReformNotice
>
noticePage
=
j
gReformNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
// 将Page<JgReformNotice>转化为Page<JgReformNoticeDto>
// 将Page<JgReformNotice>转化为Page<JgReformNoticeDto>
Page
<
JgReformNoticeDto
>
noticeDtoPage
=
new
Page
<>();
Page
<
JgReformNoticeDto
>
noticeDtoPage
=
new
Page
<>();
...
@@ -307,7 +305,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -307,7 +305,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
JgReformNotice
JgReformNotice
=
this
.
getById
(
sequenceNbr
);
JgReformNotice
JgReformNotice
=
this
.
getById
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
J
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
List
<
Map
<
String
,
Object
>>
informationList
=
j
gReformNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
if
(
Objects
.
isNull
(
JgReformNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
if
(
Objects
.
isNull
(
JgReformNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"改造告知单不存在"
);
throw
new
IllegalArgumentException
(
"改造告知单不存在"
);
}
}
...
@@ -323,17 +321,17 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -323,17 +321,17 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"productName"
,
getValue
.
apply
(
"productName"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipType"
,
getValue
.
apply
(
"equType"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"equipCode"
,
getValue
.
apply
(
"equRegisterCode"
));
placeholders
.
put
(
"produceCode"
,
""
);
// TODO: 制造
编号
placeholders
.
put
(
"produceCode"
,
getValue
.
apply
(
"produceCode"
));
// TODO: 制造编号 - 设备出厂
编号
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceUnitName"
,
getValue
.
apply
(
"produceUnitName"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"produceLicenseNum"
,
getValue
.
apply
(
"produceLicenseNum"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"fullAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
));
placeholders
.
put
(
"installStartDate"
,
""
);
placeholders
.
put
(
"installStartDate"
,
getValue
.
apply
(
"installStartDate"
)
);
placeholders
.
put
(
"installType"
,
""
);
// TODO: 施工类别
placeholders
.
put
(
"installType"
,
"
改造
"
);
// TODO: 施工类别
placeholders
.
put
(
"installLicenseNo"
,
""
);
placeholders
.
put
(
"installLicenseNo"
,
""
);
placeholders
.
put
(
"installLicenseExpirationDate"
,
""
);
placeholders
.
put
(
"installLicenseExpirationDate"
,
""
);
placeholders
.
put
(
"installLeaderName"
,
""
);
placeholders
.
put
(
"installLeaderName"
,
getValue
.
apply
(
"installLeaderName"
));
// 施工负责人
placeholders
.
put
(
"installLeaderPhone"
,
""
);
placeholders
.
put
(
"installLeaderPhone"
,
getValue
.
apply
(
"installLeaderPhone"
));
// 施工负责人手机
placeholders
.
put
(
"installUnitAddress"
,
""
);
// TODO: 施工单位地址
placeholders
.
put
(
"installUnitAddress"
,
getValue
.
apply
(
"provinceName"
)
+
getValue
.
apply
(
"cityName"
)
+
getValue
.
apply
(
"countyName"
)
+
getValue
.
apply
(
"address"
)
);
// TODO: 施工单位地址
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitName"
,
getValue
.
apply
(
"useUnitName"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderName"
,
getValue
.
apply
(
"safetyManager"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
placeholders
.
put
(
"useUnitLeaderPhone"
,
getValue
.
apply
(
"safetyManagerPhone"
));
...
@@ -405,6 +403,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -405,6 +403,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@SuppressWarnings
({
"Duplicates"
,
"rawtypes"
})
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgReformNoticeDto
>
JgReformNoticeDtoMap
,
ReginParams
reginParams
)
{
public
void
saveNotice
(
String
submitType
,
Map
<
String
,
JgReformNoticeDto
>
JgReformNoticeDtoMap
,
ReginParams
reginParams
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
JgReformNoticeDto
model
=
JgReformNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
JgReformNoticeDto
model
=
JgReformNoticeDtoMap
.
get
(
TABLE_PAGE_ID
);
// 字段转换
// 字段转换
convertField
(
model
);
convertField
(
model
);
...
@@ -421,6 +421,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -421,6 +421,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
return
;
return
;
}
}
ArrayList
<
String
>
roleListFirst
=
new
ArrayList
<>();
ArrayList
<
String
>
roleListSecond
=
new
ArrayList
<>();
// 判断当前是否为提交
// 判断当前是否为提交
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
...
@@ -433,7 +435,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -433,7 +435,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setCompleteFirstTask
(
true
);
//
dto.setCompleteFirstTask(true);
list
.
add
(
dto
);
list
.
add
(
dto
);
}
}
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
...
@@ -444,14 +446,42 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -444,14 +446,42 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
for
(
Object
obj
:
returnList
for
(
Object
obj
:
returnList
)
{
)
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
instanceIdList
.
add
(
jsonObject
.
getString
(
"id"
));
String
instanceId
=
jsonObject
.
getString
(
"id"
);
instanceIdList
.
add
(
instanceId
);
// 查询下节点任务
if
(
returnList
.
get
(
0
).
equals
(
obj
))
{
getNext
(
roleListFirst
,
instanceId
,
taskName
);
}
// 推动下一个节点
AjaxResult
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
String
taskId
=
dataObject
.
getString
(
"id"
);
// 组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
dto
.
setResultCode
(
"approvalStatus"
);
dto
.
setTaskId
(
taskId
);
dto
.
setComment
(
"提交流程"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
"0"
);
dto
.
setVariable
(
map
);
// 执行流程
AjaxResult
ajaxResult1
=
null
;
try
{
ajaxResult1
=
Workflow
.
taskClient
.
completeByTask
(
taskId
,
dto
);
if
(
ajaxResult1
.
get
(
"code"
).
equals
(
200
))
{
getNext
(
roleListSecond
,
instanceId
,
taskName
);
}
else
{
log
.
error
(
"提交失败"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
"提交失败:{}"
,
e
);
}
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"提交失败:{}"
,
e
);
}
}
// ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
}
List
<
JgReformNotice
>
list
=
new
ArrayList
<>();
List
<
JgReformNotice
>
list
=
new
ArrayList
<>();
List
<
JgReformNoticeEq
>
equipList
=
new
ArrayList
<>();
List
<
JgReformNoticeEq
>
equipList
=
new
ArrayList
<>();
deviceList
.
forEach
(
obj
->
{
deviceList
.
forEach
(
obj
->
{
...
@@ -462,6 +492,12 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -462,6 +492,12 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
String
applyNo
=
applyNoList
.
get
(
i
);
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setNoticeDate
(
new
Date
());
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
String
.
join
(
","
,
roleListSecond
));
dto
.
setInstanceStatus
(
String
.
join
(
","
,
roleListFirst
));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setStatus
(
taskName
[
0
]);
}
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
...
@@ -469,7 +505,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -469,7 +505,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
}
else
{
}
else
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
}
...
@@ -477,7 +512,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -477,7 +512,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
equipList
.
add
(
jgRelationEquip
);
equipList
.
add
(
jgRelationEquip
);
});
});
J
gReformNoticeMapper
.
insertBatchSomeColumn
(
list
);
j
gReformNoticeMapper
.
insertBatchSomeColumn
(
list
);
List
<
JgReformNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgReformNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgReformNotice
>
collect
=
list
.
stream
().
filter
(
JgReformNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
JgReformNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
List
<
JgReformNotice
>
collect
=
list
.
stream
().
filter
(
JgReformNotice
->
jgRelationEquip
.
getEquipTransferId
().
equals
(
JgReformNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
...
@@ -485,10 +520,26 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -485,10 +520,26 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
return
jgRelationEquip
.
setEquipTransferId
(
String
.
valueOf
(
sequenceNbr
));
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
J
gReformNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
j
gReformNoticeEqMapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
}
}
void
getNext
(
ArrayList
<
String
>
roleListFirst
,
String
instanceId
,
String
[]
taskName
)
{
AjaxResult
aj
=
Workflow
.
taskClient
.
getTaskNoAuth
(
instanceId
);
JSONObject
taskNoAuth
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
aj
.
get
(
"data"
)));
if
(!
ObjectUtils
.
isEmpty
(
taskNoAuth
))
{
String
nextTaskId
=
taskNoAuth
.
getString
(
"id"
);
AjaxResult
taskGroupName
=
Workflow
.
taskClient
.
getTaskGroupName
(
nextTaskId
);
taskName
[
0
]
=
taskNoAuth
.
getString
(
"name"
);
JSONArray
data
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
taskGroupName
.
get
(
"data"
)));
for
(
Object
datum
:
data
)
{
if
(((
Map
)
datum
).
containsKey
(
"groupId"
))
{
roleListFirst
.
add
(((
Map
)
datum
).
get
(
"groupId"
).
toString
());
}
}
}
}
private
void
convertField
(
JgReformNoticeDto
model
)
{
private
void
convertField
(
JgReformNoticeDto
model
)
{
// 处理图片
// 处理图片
// if (!ValidationUtil.isEmpty(model.getProxyStatementAttachmentList())) {
// if (!ValidationUtil.isEmpty(model.getProxyStatementAttachmentList())) {
...
@@ -554,7 +605,14 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -554,7 +605,14 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
}
}
String
constructionManagerId
=
model
.
getConstructionManagerId
();
if
(!
ObjectUtils
.
isEmpty
(
constructionManagerId
))
{
String
[]
constructionManagerIdList
=
constructionManagerId
.
split
(
"_"
);
if
(
constructionManagerIdList
.
length
>
1
)
{
model
.
setConstructionManagerId
(
constructionManagerIdList
[
0
]);
model
.
setConstructionManager
(
constructionManagerIdList
[
1
]);
}
}
// String inspectUnitId = model.getInspectUnitId();
// String inspectUnitId = model.getInspectUnitId();
// if (!ObjectUtils.isEmpty(inspectUnitId)) {
// if (!ObjectUtils.isEmpty(inspectUnitId)) {
// String[] inspectUnitIdList = inspectUnitId.split("_");
// String[] inspectUnitIdList = inspectUnitId.split("_");
...
@@ -602,20 +660,24 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -602,20 +660,24 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
}
}
public
void
cancel
(
JgReformNoticeDto
noticeDto
)
{
public
void
cancel
(
JgReformNoticeDto
noticeDto
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
FeignClientResult
ajaxResult
=
Workflow
.
taskV2Client
.
rollBack
(
noticeDto
.
getInstanceId
());
JgReformNotice
JgReformNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
JgReformNotice
jgReformNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
if
(
ajaxResult
.
getStatus
()
==
200
)
{
if
(
ajaxResult
.
getStatus
()
==
200
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
getNext
(
roleList
,
noticeDto
.
getInstanceId
(),
taskName
);
JgReformNotice
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgReformNotice
.
setStatus
(
taskName
[
0
]);
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgReformNotice
.
setPromoter
(
""
);
JgReformNoticeMapper
.
updateById
(
JgReformNotice
);
jgReformNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
JgReformNoticeMapper
.
updatePromoter
(
JgReformNotice
.
getSequenceNbr
());
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
ROLLBACK
.
getCode
()));
jgReformNoticeMapper
.
updateById
(
jgReformNotice
);
}
}
}
}
public
void
accept
(
JgReformNoticeDto
dto
,
String
op
)
{
public
void
accept
(
JgReformNoticeDto
dto
,
String
op
)
{
String
[]
taskName
=
new
String
[]{
"流程结束"
};
JgReformNotice
JgReformNotice
=
this
.
JgReformNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
String
userId
=
RequestContext
.
getExeUserId
();
JgReformNotice
jgReformNotice
=
this
.
jgReformNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
// 组装设备注册代码
// 组装设备注册代码
StringBuffer
stringBuffer
=
new
StringBuffer
();
StringBuffer
stringBuffer
=
new
StringBuffer
();
String
ym
=
null
;
String
ym
=
null
;
...
@@ -625,9 +687,19 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -625,9 +687,19 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
log
.
error
(
"日期转换失败:{}"
,
e
);
log
.
error
(
"日期转换失败:{}"
,
e
);
}
}
ArrayList
<
String
>
roleList
=
new
ArrayList
<>();
boolean
submit
=
submit
(
jgReformNotice
,
op
);
if
(
submit
)
{
getNext
(
roleList
,
dto
.
getInstanceId
(),
taskName
);
jgReformNotice
.
setStatus
(
taskName
[
0
]);
if
(
"0"
.
equals
(
op
))
{
if
(
roleList
.
size
()
==
0
)
{
LambdaQueryWrapper
<
JgReformNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JgReformNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgReformNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
queryWrapper
.
eq
(
JgReformNoticeEq:
:
getEquipTransferId
,
dto
.
getSequenceNbr
());
JgReformNoticeEq
jgRelationEquip
=
J
gReformNoticeEqMapper
.
selectOne
(
queryWrapper
);
JgReformNoticeEq
jgRelationEquip
=
j
gReformNoticeEqMapper
.
selectOne
(
queryWrapper
);
// LambdaQueryWrapper<OtherInfo> queryWrapper1 = new LambdaQueryWrapper<>();
// LambdaQueryWrapper<OtherInfo> queryWrapper1 = new LambdaQueryWrapper<>();
// queryWrapper1.eq(OtherInfo::getRecord, jgRelationEquip.getEquId());
// queryWrapper1.eq(OtherInfo::getRecord, jgRelationEquip.getEquId());
...
@@ -637,16 +709,15 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -637,16 +709,15 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
jgReformNotice
.
getCity
()).
append
(
ym
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
JgReformNotice
.
getCity
()).
append
(
ym
);
// String equCode = stringBuffer.toString();
// String equCode = stringBuffer.toString();
// 只有安装设备需要
// 只有安装设备需要
// String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
// String deviceRegistrationCode = iCreateCodeService.createDeviceRegistrationCode(equCode);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"cityCode"
,
J
gReformNotice
.
getCity
());
map
.
put
(
"cityCode"
,
j
gReformNotice
.
getCity
());
map
.
put
(
"countyCode"
,
J
gReformNotice
.
getCounty
());
map
.
put
(
"countyCode"
,
j
gReformNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"equCategory"
,
tzsJgRegistrationInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
JgReformNotice
.
getIsXixian
()
==
null
?
"0"
:
J
gReformNotice
.
getIsXixian
());
map
.
put
(
"isXiXian"
,
jgReformNotice
.
getIsXixian
()
==
null
?
"0"
:
j
gReformNotice
.
getIsXixian
());
// Map<String, Object> mapCode;
// Map<String, Object> mapCode;
// ResponseModel<Map<String, Object>> code = tzsServiceFeignClient.createCode(map);
// ResponseModel<Map<String, Object>> code = tzsServiceFeignClient.createCode(map);
// mapCode = code.getResult();
// mapCode = code.getResult();
...
@@ -657,51 +728,40 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
...
@@ -657,51 +728,40 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// supervisoryCodeInfo.setStatus("1");
// supervisoryCodeInfo.setStatus("1");
// supervisoryCodeInfoMapper.updateById(supervisoryCodeInfo);
// supervisoryCodeInfoMapper.updateById(supervisoryCodeInfo);
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
boolean
submit
=
submit
(
JgReformNotice
,
op
);
this
.
generateInstallationNoticeReport
(
jgReformNotice
.
getSequenceNbr
());
if
(
submit
)
{
if
(
"0"
.
equals
(
op
))
{
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
this
.
generateInstallationNoticeReport
(
JgReformNotice
.
getSequenceNbr
());
// 更新其他业务表
// 更新其他业务表
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
// tzsJgOtherInfo.setCode96333(mapCode.get("code96333").toString());
// tzsJgOtherInfo.setSupervisoryCode(mapCode.get("superviseCode").toString());
// tzsJgOtherInfo.setSupervisoryCode(mapCode.get("superviseCode").toString());
// tzsJgRegistrationInfo.setEquCode(deviceRegistrationCode);
// tzsJgRegistrationInfo.setEquCode(deviceRegistrationCode);
// JgReformNotice.setEquRegisterCode(deviceRegistrationCode);
// jgInstallationNotice.setEquRegisterCode(deviceRegistrationCode);
// JgReformNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
// jgInstallationNotice.setSupervisoryCode(mapCode.get("superviseCode").toString());
// Map<String,Map<String,Object>> objMap = new HashMap<>();
// Map<String,Object> map1 =new HashMap<>();
// map1.put("CODE96333",tzsJgOtherInfo.getCode96333() );
// map1.put("EQU_CODE",tzsJgRegistrationInfo.getEquCode() );
// map1.put("SUPERVISORY_CODE",tzsJgOtherInfo.getSupervisoryCode());
// objMap.put(tzsJgOtherInfo.getRecord(),map1);
jgReformNotice
.
setPromoter
(
""
);
// tzsServiceFeignClient.commonUpdateEsDataByIds(objMap);
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// tzsJgOtherInfoMapper.updateById(tzsJgOtherInfo);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
// tzsJgRegistrationInfoMapper.updateById(tzsJgRegistrationInfo);
}
else
{
}
else
{
JgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
jgReformNotice
.
setNextExecuteIds
(
String
.
join
(
","
,
roleList
));
// JgReformNotice.setStatus(String.valueOf(FlowStatusEnum.REJECTED.getCode()));
if
(!
ObjectUtils
.
isEmpty
(
jgReformNotice
.
getInstanceStatus
()))
{
}
jgReformNotice
.
setInstanceStatus
(
jgReformNotice
.
getInstanceStatus
()
+
","
+
String
.
join
(
","
,
roleList
));
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
}
else
{
JgReformNotice
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
jgReformNotice
.
setInstanceStatus
(
String
.
join
(
","
,
roleList
));
JgReformNoticeMapper
.
updateById
(
JgReformNotice
);
}
Boolean
rollBack
=
"1"
.
equals
(
op
)
?
true
:
false
;
jgReformNotice
.
setPromoter
(
userId
);
if
(
rollBack
)
{
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
JgReformNoticeMapper
.
updatePromoter
(
JgReformNotice
.
getSequenceNbr
());
}
}
}
else
{
}
jgReformNotice
.
setPromoter
(
""
);
jgReformNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
// // 组装监管码
}
// String division = "";
jgReformNoticeMapper
.
updateById
(
jgReformNotice
);
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
}
// division = "X";
// } else {
// //生成监管码前缀
// Map<String, Object> divisionMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCounty());
// division = ObjectUtils.isEmpty(divisionMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQH.getCode(), dto.getCity()).get("code").toString() : divisionMap.get("code").toString();
// }
//
// // 组装96333码
// String prefix = "";
// if (((XIAN.equals(dto.getCity()) || XIAN_YANG.equals(dto.getCity())) && "1".equals(dto.getIsXixian()))) {
// prefix = EquipmentCategoryEnum.XXCSM.getValue();
// } else {
// Map<String, Object> elevatorMap = equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCounty());
// prefix = ObjectUtils.isEmpty(elevatorMap) ? equipmentCategoryMapper.getAdministrativeDivision(EquipmentCategoryEnum.XZQHDT.getCode(), dto.getCity()).get("code").toString() : elevatorMap.get("code").toString();
// }
}
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/feign/TzsServiceFeignClient.java
0 → 100644
View file @
e10c5f93
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jyjc
.
biz
.
feign
;
import
com.yeejoin.amos.boot.biz.common.feign.FeignConfiguration
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Map
;
@FeignClient
(
name
=
"TZS-YMT"
,
path
=
"/ymt"
,
configuration
=
{
FeignConfiguration
.
class
})
public
interface
TzsServiceFeignClient
{
/**
* 创建监管码及96333
*
* @param map 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/createSupervisorCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
createCode
(
@RequestBody
Map
<
String
,
Object
>
map
);
/**
* 创建监管码及96333
*
* @param paramMap 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/commonUpdateEsData"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
commonUpdateEsDataByIds
(
@RequestBody
Map
<
String
,
Map
<
String
,
Object
>>
paramMap
);
/**
* 申请单编号生成
* @param type 参考ApplicationFormTypeEnum中的枚举
* @param batchSize batchSize
* @return List
*/
@RequestMapping
(
value
=
"/generate-code/applicationFormCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Map
<
String
,
Object
>>
applicationFormCode
(
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
"batchSize"
)
int
batchSize
);
/**
* 生成设备注册编码
* @param key 16位
* @return 生成设备注册编码(20位)
*/
@RequestMapping
(
value
=
"/generate-code/deviceRegistrationCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
String
>
deviceRegistrationCode
(
@RequestParam
(
"key"
)
String
key
);
/**
* 使用登记证生成
* @param key 起11陕C
* @return 生成使用登记证编号(13位,起11陕C00001(23))
*/
@RequestMapping
(
value
=
"/generate-code/useRegistrationCode"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
String
>
useRegistrationCode
(
@RequestParam
(
"key"
)
String
key
);
}
amos-boot-system-tzs/amos-boot-module-jyjc/amos-boot-module-jyjc-biz/src/main/java/com/yeejoin/amos/boot/module/jyjc/biz/service/impl/JyjcOpeningApplicationServiceImpl.java
View file @
e10c5f93
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstD
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstD
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.service.IJyjcOpeningApplicationService
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.config.BaseException
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.WorkflowFeignClient
;
import
com.yeejoin.amos.boot.module.jyjc.biz.feign.WorkflowFeignClient
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseUnitLicenceDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto
;
...
@@ -48,6 +49,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -48,6 +49,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.*
;
import
java.util.*
;
...
@@ -69,6 +71,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -69,6 +71,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Autowired
@Autowired
private
ICreateCodeService
createCodeService
;
private
ICreateCodeService
createCodeService
;
@Autowired
@Autowired
private
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
JyjcOpeningApplicationMapper
jyjcOpeningApplicationMapper
;
JyjcOpeningApplicationMapper
jyjcOpeningApplicationMapper
;
@Resource
(
type
=
JyjcBaseMapper
.
class
)
@Resource
(
type
=
JyjcBaseMapper
.
class
)
...
@@ -141,6 +145,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
...
@@ -141,6 +145,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
CompanyBo
companyBo
=
commonserviceImpl
.
getReginParamsOfCurrentUser
().
getCompany
();
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCode
(
companyBo
.
getCompanyCode
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
model
.
setUnitCodeName
(
companyBo
.
getCompanyName
());
ResponseModel
<
Map
<
String
,
Object
>>
result
=
tzsServiceFeignClient
.
applicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
List
<
String
>
codes
=
createCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
List
<
String
>
codes
=
createCodeService
.
createApplicationFormCode
(
ApplicationFormTypeEnum
.
JY
.
getCode
(),
1
);
model
.
setApplicationSeq
(
codes
.
get
(
0
));
model
.
setApplicationSeq
(
codes
.
get
(
0
));
model
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
model
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment