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
5ac8a75f
Commit
5ac8a75f
authored
Apr 26, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.安装告知数据作废功能
parent
22fe4a13
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
19 deletions
+22
-19
IJgInstallationNoticeService.java
...t/module/jg/api/service/IJgInstallationNoticeService.java
+1
-1
CommonMapper.xml
...-module-jg-api/src/main/resources/mapper/CommonMapper.xml
+3
-2
JgInstallationNoticeMapper.xml
.../src/main/resources/mapper/JgInstallationNoticeMapper.xml
+1
-1
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+1
-1
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+5
-6
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+11
-8
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/service/IJgInstallationNoticeService.java
View file @
5ac8a75f
...
...
@@ -83,5 +83,5 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param cancelReason 作废原因
* @return JgInstallationNoticeDto
*/
JgInstallationNotice
Dto
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
);
JgInstallationNotice
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/CommonMapper.xml
View file @
5ac8a75f
...
...
@@ -115,7 +115,7 @@
where
a.sequence_nbr = b.equip_transfer_id
and b.equ_id = #{record}
and (a.status
<![CDATA[ <> ]]>
'使用单位待提交' and a.status
<![CDATA[ <> ]]>
'一级受理已驳回' and a.status
<![CDATA[ <> ]]>
'使用单位已撤回')
and (a.status
<![CDATA[ <> ]]>
'使用单位待提交' and a.status
<![CDATA[ <> ]]>
'一级受理已驳回' and a.status
<![CDATA[ <> ]]>
'使用单位已撤回'
and a.status
<![CDATA[ <> ]]>
'已作废'
)
UNION
select
count(1) as inUseNumber
...
...
@@ -175,7 +175,7 @@
where
a.sequence_nbr = b.equip_transfer_id
and b.equ_id = #{record}
and (a.notice_status
<![CDATA[ <> ]]>
'6614' and a.notice_status
<![CDATA[ <> ]]>
'6615' and a.notice_status
<![CDATA[ <> ]]>
'6610' )
and (a.notice_status
<![CDATA[ <> ]]>
'6614' and a.notice_status
<![CDATA[ <> ]]>
'6615' and a.notice_status
<![CDATA[ <> ]]>
'6610'
and a.notice_status
<![CDATA[ <> ]]>
'6617'
)
UNION
select
count(1) as inUseNumber
...
...
@@ -661,6 +661,7 @@
n.sequence_nbr = ne.equip_transfer_id
and n.status != '使用单位待提交'
and n.status != '使用单位已撤回'
and n.status != '已作废'
and (n.manage_type is null or n.manage_type = '' or n.manage_type = 'set')
<if
test=
"param.beginDate != null"
>
and date_ge(CAST(n.reg_date as date), #{param.beginDate})
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgInstallationNoticeMapper.xml
View file @
5ac8a75f
...
...
@@ -192,7 +192,7 @@
tzs_jg_installation_notice_eq b
where
a.sequence_nbr = b.equip_transfer_id
and (a.notice_status
<![CDATA[ <> ]]>
'6614' and a.notice_status
<![CDATA[ <> ]]>
'6615' and a.notice_status
<![CDATA[ <> ]]>
'6610')
and (a.notice_status
<![CDATA[ <> ]]>
'6614' and a.notice_status
<![CDATA[ <> ]]>
'6615' and a.notice_status
<![CDATA[ <> ]]>
'6610'
and a.notice_status
<![CDATA[ <> ]]>
'6617'
)
GROUP BY a.install_unit_credit_code
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
5ac8a75f
...
...
@@ -571,6 +571,6 @@
tzs_jg_use_registration_eq b
where
a.sequence_nbr = b.equip_transfer_id
and (a.status
<![CDATA[ <> ]]>
'使用单位待提交' and a.status
<![CDATA[ <> ]]>
'一级受理已驳回' and a.status
<![CDATA[ <> ]]>
'使用单位已撤回')
and (a.status
<![CDATA[ <> ]]>
'使用单位待提交' and a.status
<![CDATA[ <> ]]>
'一级受理已驳回' and a.status
<![CDATA[ <> ]]>
'使用单位已撤回'
and a.status
<![CDATA[ <> ]]>
'已作废'
)
</select>
</mapper>
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 @
5ac8a75f
...
...
@@ -79,7 +79,7 @@ public class JgInstallationNoticeController extends BaseController {
installationInfo
.
setProxyStatementAttachmentList
((
List
<
Map
<
String
,
Object
>>)
o
);
installationInfo
.
setInstallContractAttachmentList
((
List
<
Map
<
String
,
Object
>>)
o1
);
installationInfo
.
setOtherAccessoriesList
((
List
<
Map
<
String
,
Object
>>)
o2
);
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
updateInstallationNotice
(
submitType
,
installationInfo
,
op
));
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
updateInstallationNotice
(
submitType
,
installationInfo
,
op
));
}
/**
...
...
@@ -144,8 +144,8 @@ public class JgInstallationNoticeController extends BaseController {
@RequestParam
(
value
=
"size"
,
defaultValue
=
"20"
)
int
size
,
@ApiParam
(
value
=
"类型:enterprise-企业端、supervision-监管端"
,
required
=
true
)
@RequestParam
(
value
=
"type"
,
defaultValue
=
"enterprise"
)
String
type
,
@ApiParam
(
value
=
"排序字段"
,
required
=
false
)
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@ApiParam
(
value
=
"排序字段"
,
required
=
false
)
@RequestParam
(
value
=
"sort"
,
required
=
false
)
String
sort
,
@RequestBody
(
required
=
false
)
JgInstallationNoticeDto
model
)
{
Page
<
JgInstallationNotice
>
page
=
new
Page
<>(
current
,
size
);
...
...
@@ -167,11 +167,10 @@ public class JgInstallationNoticeController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"安装告知单个作废"
,
notes
=
"安装告知单个作废"
)
@PutMapping
(
value
=
"/cancel/application"
)
public
ResponseModel
<
JgInstallationNotice
Dto
>
cancelApplication
(
@RequestBody
JgInstallationNoticeDto
jgInstallationNoticeDto
)
{
JgInstallationNotice
Dto
result
=
iJgInstallationNoticeService
.
cancelApplication
(
jgInstallationNoticeDto
.
getSequenceNbr
(),
jgInstallationNoticeDto
.
getCancelReason
());
public
ResponseModel
<
JgInstallationNotice
>
cancelApplication
(
@RequestBody
JgInstallationNoticeDto
jgInstallationNoticeDto
)
{
JgInstallationNotice
result
=
iJgInstallationNoticeService
.
cancelApplication
(
jgInstallationNoticeDto
.
getSequenceNbr
(),
jgInstallationNoticeDto
.
getCancelReason
());
return
ResponseHelper
.
buildResponse
(
result
);
}
}
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 @
5ac8a75f
...
...
@@ -7,6 +7,7 @@ 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.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.pagehelper.util.StringUtil
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
...
...
@@ -1249,7 +1250,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
JgInstallationNotice
Dto
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
)
{
public
JgInstallationNotice
cancelApplication
(
Long
sequenceNbr
,
String
cancelReason
)
{
// 1.更新为已作废
JgInstallationNotice
installationNotice
=
this
.
getById
(
sequenceNbr
);
String
oldNoticeStatus
=
installationNotice
.
getNoticeStatus
();
...
...
@@ -1260,7 +1261,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
this
.
updateById
(
installationNotice
);
// 2.更新关联的业务
this
.
processElseDataByStatus
(
Objects
.
requireNonNull
(
FlowStatusEnum
.
getEumByCode
(
Integer
.
parseInt
(
oldNoticeStatus
))),
installationNotice
);
return
null
;
return
installationNotice
;
}
private
void
processElseDataByStatus
(
FlowStatusEnum
oldNoticeStatus
,
JgInstallationNotice
installationNotice
)
{
...
...
@@ -1283,8 +1284,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 流程中(驳回、撤回等)
// 1.待办任务更新为已完成
this
.
finishedTask
(
installationNotice
.
getInstanceId
());
// 2.终止流程
iCmWorkflowService
.
stopProcess
(
installationNotice
.
getInstanceId
());
// 2.终止流程
-工作流报错暂时注释掉
//
iCmWorkflowService.stopProcess(installationNotice.getInstanceId());
// 3.写入历史表
this
.
saveHisDataBeforeUpdate
(
installationNotice
);
// 4.清空redis(缓存的流程中及已完成安装告知的设备)
...
...
@@ -1311,10 +1312,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
LambdaQueryWrapper
<
JgInstallationNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
installationNotice
.
getSequenceNbr
());
JgInstallationNoticeEq
jgRelationEquip
=
jgInstallationNoticeEqMapper
.
selectOne
(
queryWrapper
);
IdxBizJgUseInfo
idxBizJgUseInfo
=
useInfoService
.
getOne
(
new
LambdaQueryWrapper
<
IdxBizJgUseInfo
>().
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
()));
idxBizJgUseInfo
.
setUseUnitCreditCode
(
null
);
idxBizJgUseInfo
.
setUseUnitName
(
null
);
useInfoService
.
updateById
(
idxBizJgUseInfo
);
// 强制更新字段为 NULL
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
// 设置更新条件
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitCreditCode
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitName
,
null
);
useInfoService
.
update
(
updateWrapper
);
// 2.2 es的USE_UNIT_CREDIT_CODE赋空
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
jgRelationEquip
.
getEquId
());
if
(
optional
.
isPresent
()){
...
...
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