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
ca423e6f
Commit
ca423e6f
authored
Mar 12, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(JG):四个告知添加状态校验
parent
87e02122
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
56 deletions
+66
-56
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+13
-0
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+5
-5
JgMaintainNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
+6
-5
JgReformNoticeServiceImpl.java
...module/jg/biz/service/impl/JgReformNoticeServiceImpl.java
+5
-4
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+37
-42
use-registration-model.pdf
...z/src/main/resources/templates/use-registration-model.pdf
+0
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
ca423e6f
...
...
@@ -1437,4 +1437,16 @@ public class CommonServiceImpl implements ICommonService {
}
return
null
;
}
/**
* 检查实际状态是否不等于期望状态
* @param latestStatus 业务最新状态
*/
public
void
checkExpectedStatus
(
String
latestStatus
){
String
expectedStatus
=
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
// 检查实际状态是否不等于期望状态
if
(!
expectedStatus
.
equals
(
latestStatus
))
{
throw
new
BadRequest
(
"当前业务状态已更新,请返回工作台后重新打开!"
);
}
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
View file @
ca423e6f
...
...
@@ -780,11 +780,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Transactional
public
void
cancel
(
JgInstallationNoticeDto
noticeDto
)
{
JgInstallationNotice
jgInstallationNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
String
expectedStatus
=
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
// 检查实际状态是否不等于期望状态
if
(!
expectedStatus
.
equals
(
jgInstallationNotice
.
getNoticeStatus
()))
{
throw
new
BadRequest
(
"当前业务状态不是待处理状态,请重新打开页面后操作!"
);
}
commonService
.
checkExpectedStatus
(
jgInstallationNotice
.
getNoticeStatus
());
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
rollBack
(
jgInstallationNotice
.
getInstanceId
());
// 提取节点等信息
...
...
@@ -810,9 +807,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
public
void
accept
(
JgInstallationNoticeDto
dto
,
String
op
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
JgInstallationNotice
jgInstallationNotice
=
this
.
getById
(
dto
.
getSequenceNbr
());
// 检查实际状态是否不等于期望状态
commonService
.
checkExpectedStatus
(
jgInstallationNotice
.
getNoticeStatus
());
jgInstallationNotice
.
setProcessAdvice
(
dto
.
getProcessAdvice
());
// 组装设备注册代码
StringBu
ffer
stringBuffer
=
new
StringBuff
er
();
StringBu
ilder
stringBuffer
=
new
StringBuild
er
();
String
ym
=
null
;
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgMaintainNoticeServiceImpl.java
View file @
ca423e6f
...
...
@@ -676,11 +676,8 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
public
void
cancel
(
JgMaintainNoticeDto
noticeDto
)
{
JgMaintainNotice
jgMaintainNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
String
expectedStatus
=
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
// 检查实际状态是否不等于期望状态
if
(!
expectedStatus
.
equals
(
jgMaintainNotice
.
getNoticeStatus
()))
{
throw
new
BadRequest
(
"当前业务状态不是待处理状态,请重新打开页面后操作!"
);
}
commonService
.
checkExpectedStatus
(
jgMaintainNotice
.
getNoticeStatus
());
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
rollBack
(
jgMaintainNotice
.
getInstanceId
());
// 提取节点等信息
WorkflowResultDto
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
...
...
@@ -704,8 +701,12 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
@Transactional
public
void
accept
(
JgMaintainNoticeDto
dto
,
String
op
,
String
opinion
)
{
JgMaintainNotice
jgMaintainNotice
=
this
.
jgMaintainNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
// 检查实际状态是否不等于期望状态
commonService
.
checkExpectedStatus
(
jgMaintainNotice
.
getNoticeStatus
());
// 组装设备注册代码
StringBu
ffer
stringBuffer
=
new
StringBuff
er
();
StringBu
ilder
stringBuffer
=
new
StringBuild
er
();
String
ym
=
null
;
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
...
...
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 @
ca423e6f
...
...
@@ -639,11 +639,8 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
JgReformNotice
notice
=
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
if
(
notice
!=
null
)
{
String
expectedStatus
=
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
// 检查实际状态是否不等于期望状态
if
(!
expectedStatus
.
equals
(
notice
.
getNoticeStatus
()))
{
throw
new
BadRequest
(
"当前业务状态不是待处理状态,请重新打开页面后操作!"
);
}
commonService
.
checkExpectedStatus
(
notice
.
getNoticeStatus
());
// 回滚工作流
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
rollBack
(
noticeDto
.
getInstanceId
());
WorkflowResultDto
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
...
...
@@ -672,6 +669,10 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
public
void
accept
(
JgReformNoticeDto
dto
,
String
op
)
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
JgReformNotice
jgReformNotice
=
baseMapper
.
selectById
(
dto
.
getSequenceNbr
());
// 检查实际状态是否不等于期望状态
commonService
.
checkExpectedStatus
(
jgReformNotice
.
getNoticeStatus
());
jgReformNotice
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
// 组装设备注册代码
StringBuilder
stringBuffer
=
new
StringBuilder
();
...
...
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/JgTransferNoticeServiceImpl.java
View file @
ca423e6f
...
...
@@ -45,7 +45,6 @@ import org.springframework.util.StringUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
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
java.text.ParseException
;
import
java.util.*
;
...
...
@@ -69,15 +68,9 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Autowired
JgTransferNoticeEqMapper
jgTransferNoticeEqMapper
;
@Autowired
private
JgTransferNoticeMapper
jgTransferNoticeMapper
;
@Autowired
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
@Autowired
IdxBizJgRegisterInfoServiceImpl
idxBizJgRegisterInfoService
;
@Autowired
private
CommonServiceImpl
commonService
;
@Autowired
OtherInfoMapper
tzsJgOtherInfoMapper
;
@Autowired
...
...
@@ -86,19 +79,18 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
SupervisoryCodeInfoMapper
supervisoryCodeInfoMapper
;
@Autowired
RedisUtils
redisUtils
;
@Autowired
JgUseRegistrationMapper
jgUseRegistrationMapper
;
@Autowired
ICmWorkflowService
iCmWorkflowService
;
@Autowired
IdxBizJgUseInfoMapper
idxBizJgUseInfoMapper
;
@Autowired
JgInstallationNoticeServiceImpl
jgInstallationNoticeService
;
@Autowired
private
JgTransferNoticeMapper
jgTransferNoticeMapper
;
@Autowired
private
CommonServiceImpl
commonService
;
/**
* 根据sequenceNbr查询
...
...
@@ -126,7 +118,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
transferNotice
.
put
(
"constructionManagerId"
,
notice
.
getConstructionManagerId
()
+
"_"
+
notice
.
getConstructionManager
());
}
String
[]
fields
=
{
"productPhoto"
,
"designDoc"
,
"designStandard"
,
"factoryStandard"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"otherAccessories"
,
"productQualityYieldProve"
,
"insUseMaintainExplain"
,
"inspectReport"
,
"otherAccessories"
,
"proxyStatementAttachment"
,
"installContractAttachment"
,
"powerOfAttorney"
,
"constructionContract"
};
// 设备信息
List
<
Map
<
String
,
Object
>>
equipmentInfos
=
jgTransferNoticeMapper
.
queryEquipInformation
(
sequenceNbr
);
...
...
@@ -613,30 +605,29 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
@Transactional
public
void
cancel
(
JgTransferNoticeDto
noticeDto
)
{
JgTransferNotice
jgInstallationNotice
=
this
.
baseMapper
.
selectById
(
noticeDto
.
getSequenceNbr
());
String
expectedStatus
=
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
());
// 检查实际状态是否不等于期望状态
if
(!
expectedStatus
.
equals
(
jgInstallationNotice
.
getNoticeStatus
()))
{
throw
new
BadRequest
(
"当前业务状态不是待处理状态,请重新打开页面后操作!"
);
if
(
jgInstallationNotice
!=
null
)
{
//检查实际状态是否不是待受理状态
commonService
.
checkExpectedStatus
(
jgInstallationNotice
.
getNoticeStatus
());
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
rollBack
(
jgInstallationNotice
.
getInstanceId
());
// 提取节点等信息
WorkflowResultDto
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
jgInstallationNotice
.
setPromoter
(
""
);
jgInstallationNotice
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
jgInstallationNotice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
ROLLBACK
.
getCode
()));
jgInstallationNotice
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
jgTransferNoticeMapper
.
updateById
(
jgInstallationNotice
);
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgInstallationNotice
,
taskMessageDto
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskMessageDto
));
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_ADVICE_REMOVAL
.
getCode
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgInstallationNotice
.
getNextExecuteIds
());
jsonObject
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
ROLLBACK
.
getName
());
jsonObject
.
put
(
"flowStatus"
,
FlowStatusEnum
.
ROLLBACK
.
getCode
());
jsonObject
.
put
(
"nextTaskId"
,
jgInstallationNotice
.
getNextTaskId
());
commonService
.
rollbackTask
(
jgInstallationNotice
.
getInstanceId
(),
jsonObject
);
}
ProcessTaskDTO
processTaskDTO
=
iCmWorkflowService
.
rollBack
(
jgInstallationNotice
.
getInstanceId
());
// 提取节点等信息
WorkflowResultDto
workflowResultDto
=
commonService
.
buildWorkFlowInfo
(
Collections
.
singletonList
(
processTaskDTO
)).
get
(
0
);
jgInstallationNotice
.
setPromoter
(
""
);
jgInstallationNotice
.
setNextExecuteIds
(
workflowResultDto
.
getNextExecutorRoleIds
());
jgInstallationNotice
.
setNextExecuteUserIds
(
workflowResultDto
.
getNextExecutorUserIds
());
jgInstallationNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
ROLLBACK
.
getCode
()));
jgInstallationNotice
.
setNextTaskId
(
workflowResultDto
.
getNextTaskId
());
jgTransferNoticeMapper
.
updateById
(
jgInstallationNotice
);
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
jgInstallationNotice
,
taskMessageDto
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
taskMessageDto
));
jsonObject
.
put
(
"taskType"
,
BusinessTypeEnum
.
JG_ADVICE_REMOVAL
.
getCode
());
jsonObject
.
put
(
"nextExecuteUser"
,
jgInstallationNotice
.
getNextExecuteIds
());
jsonObject
.
put
(
"flowStatusLabel"
,
FlowStatusEnum
.
ROLLBACK
.
getName
());
jsonObject
.
put
(
"flowStatus"
,
FlowStatusEnum
.
ROLLBACK
.
getCode
());
jsonObject
.
put
(
"nextTaskId"
,
jgInstallationNotice
.
getNextTaskId
());
commonService
.
rollbackTask
(
jgInstallationNotice
.
getInstanceId
(),
jsonObject
);
}
@Transactional
...
...
@@ -644,8 +635,12 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
JgTransferNotice
jgTransferNotice
=
this
.
jgTransferNoticeMapper
.
selectById
(
dto
.
getSequenceNbr
());
// 检查实际状态是否不等于期望状态
commonService
.
checkExpectedStatus
(
jgTransferNotice
.
getNoticeStatus
());
// 组装设备注册代码
StringBu
ffer
stringBuffer
=
new
StringBuff
er
();
StringBu
ilder
stringBuffer
=
new
StringBuild
er
();
String
ym
=
null
;
try
{
ym
=
DateUtils
.
dateFormat
(
new
Date
(),
DateUtils
.
DATE_PATTERN_MM
);
...
...
@@ -668,7 +663,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
jgTransferNotice
.
getReceiveCompanyCode
()).
append
(
ym
);
String
equCode
=
stringBuffer
.
toString
();
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
equCode
);
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
equCode
);
String
deviceRegistrationCode
=
responseModel
.
getResult
();
jgTransferNotice
.
setInformNumber
(
deviceRegistrationCode
);
...
...
@@ -678,10 +673,10 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
jgTransferNotice
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getCode
()));
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s"
,
jgTransferNotice
.
getProvinceName
(),
jgTransferNotice
.
getCityName
(),
jgTransferNotice
.
getCounty
()));
map1
.
put
(
"ADDRESS"
,
String
.
format
(
"%s/%s"
,
jgTransferNotice
.
getStreetName
(),
jgTransferNotice
.
getAddress
()));
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Map
<
String
,
Object
>>
objMap
=
new
HashMap
<>();
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s"
,
jgTransferNotice
.
getProvinceName
(),
jgTransferNotice
.
getCityName
(),
jgTransferNotice
.
getCounty
()));
map1
.
put
(
"ADDRESS"
,
String
.
format
(
"%s/%s"
,
jgTransferNotice
.
getStreetName
(),
jgTransferNotice
.
getAddress
()));
objMap
.
put
(
jgTransferNoticeEq
.
getEquId
(),
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/use-registration-model.pdf
View file @
ca423e6f
No preview for this file type
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