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
794f3e75
Commit
794f3e75
authored
Apr 26, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
63a037be
5839c6c3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
37 deletions
+48
-37
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
IIdxBizJgConstructionInfoService.java
...dule/jg/biz/service/IIdxBizJgConstructionInfoService.java
+2
-1
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+35
-25
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 @
794f3e75
...
...
@@ -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 @
794f3e75
...
...
@@ -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 @
794f3e75
...
...
@@ -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 @
794f3e75
...
...
@@ -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 @
794f3e75
...
...
@@ -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/IIdxBizJgConstructionInfoService.java
View file @
794f3e75
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jg
.
biz
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo
;
/**
...
...
@@ -8,7 +9,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
* @author system_generator
* @date 2023-08-17
*/
public
interface
IIdxBizJgConstructionInfoService
{
public
interface
IIdxBizJgConstructionInfoService
extends
IService
<
IdxBizJgConstructionInfo
>
{
boolean
saveOrUpdateData
(
IdxBizJgConstructionInfo
constructionInfo
);
...
...
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 @
794f3e75
...
...
@@ -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
;
...
...
@@ -985,22 +986,9 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
tzsJgRegistrationInfoMapper
.
updateById
(
idxBizJgRegisterInfo
);
// 更新es
updateEquipEs
(
jgInstallationNotice
,
tzsJgOtherInfo
,
idxBizJgRegisterInfo
,
idxBizJgSupervisionInfo
,
map1
);
// 更新施工信息表
IdxBizJgConstructionInfo
idxBizJgConstructionInfo
=
constructionInfoService
.
queryNewestDetailByRecord
(
jgRelationEquip
.
getEquId
());
if
(!
ObjectUtils
.
isEmpty
(
idxBizJgConstructionInfo
))
{
idxBizJgConstructionInfo
.
setUscUnitCreditCode
(
jgInstallationNotice
.
getInstallUnitCreditCode
());
idxBizJgConstructionInfo
.
setUscUnitName
(
jgInstallationNotice
.
getInstallUnitName
());
idxBizJgConstructionInfo
.
setUscDate
(
jgInstallationNotice
.
getInstallStartDate
());
// 获取施工类型id
LambdaQueryWrapper
<
DataDictionary
>
lambda
=
new
LambdaQueryWrapper
<>();
lambda
.
eq
(
DataDictionary:
:
getType
,
CONSTRUCTION_TYPE
);
lambda
.
eq
(
DataDictionary:
:
getName
,
CONSTRUCTION_TYPE_NAME
);
List
<
DataDictionary
>
dataDictionaries
=
dataDictionaryMapper
.
selectList
(
lambda
);
if
(!
CollectionUtils
.
isEmpty
(
dataDictionaries
))
{
idxBizJgConstructionInfo
.
setConstructionType
(
String
.
valueOf
(
dataDictionaries
.
get
(
0
).
getSequenceNbr
()));
}
constructionInfoService
.
saveOrUpdateData
(
idxBizJgConstructionInfo
);
}
// 记录施工信息表
createConstruction2Db
(
jgInstallationNotice
,
jgRelationEquip
);
// 更新使用信息
updateJgUseInfo
(
jgInstallationNotice
,
jgRelationEquip
);
...
...
@@ -1015,7 +1003,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgInstallationNotice
,
taskMessageDto
);
taskMap
.
put
(
"model"
,
taskMessageDto
);
taskV2Model
=
commonService
.
updateTaskModel
(
taskMap
);
commonService
.
updateTaskModel
(
taskMap
);
}
else
{
jgInstallationNotice
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
jgInstallationNotice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
...
...
@@ -1088,6 +1076,26 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
private
void
createConstruction2Db
(
JgInstallationNotice
jgInstallationNotice
,
JgInstallationNoticeEq
jgRelationEquip
)
{
IdxBizJgConstructionInfo
idxBizJgConstructionInfo
=
new
IdxBizJgConstructionInfo
();
idxBizJgConstructionInfo
.
setUscUnitCreditCode
(
jgInstallationNotice
.
getInstallUnitCreditCode
());
idxBizJgConstructionInfo
.
setUscUnitName
(
jgInstallationNotice
.
getInstallUnitName
());
idxBizJgConstructionInfo
.
setUscDate
(
jgInstallationNotice
.
getInstallStartDate
());
idxBizJgConstructionInfo
.
setRecord
(
jgRelationEquip
.
getEquId
());
idxBizJgConstructionInfo
.
setRecDate
(
new
Date
());
idxBizJgConstructionInfo
.
setRecUserId
(
RequestContext
.
getExeUserId
());
idxBizJgConstructionInfo
.
setNoticeId
(
jgInstallationNotice
.
getSequenceNbr
()
+
""
);
// 获取施工类型id
LambdaQueryWrapper
<
DataDictionary
>
lambda
=
new
LambdaQueryWrapper
<>();
lambda
.
eq
(
DataDictionary:
:
getType
,
CONSTRUCTION_TYPE
);
lambda
.
eq
(
DataDictionary:
:
getName
,
CONSTRUCTION_TYPE_NAME
);
List
<
DataDictionary
>
dataDictionaries
=
dataDictionaryMapper
.
selectList
(
lambda
);
if
(!
CollectionUtils
.
isEmpty
(
dataDictionaries
))
{
idxBizJgConstructionInfo
.
setConstructionType
(
String
.
valueOf
(
dataDictionaries
.
get
(
0
).
getSequenceNbr
()));
}
constructionInfoService
.
save
(
idxBizJgConstructionInfo
);
}
private
void
updateEquipEs
(
JgInstallationNotice
jgInstallationNotice
,
OtherInfo
tzsJgOtherInfo
,
IdxBizJgRegisterInfo
tzsJgRegistrationInfo
,
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfo
,
Map
<
String
,
Object
>
map1
)
{
...
...
@@ -1249,7 +1257,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 +1268,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 +1291,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 +1319,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