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
c44d450c
Commit
c44d450c
authored
Aug 06, 2024
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):个人气瓶登记单监管业务登记管理不显示单子,工作台撤回后在提交报错设备设备正在流程中
parent
20a25685
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
82 additions
and
32 deletions
+82
-32
JgInstallationNoticeController.java
...ule/jg/biz/controller/JgInstallationNoticeController.java
+0
-7
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+9
-4
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+10
-4
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+7
-2
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+18
-5
JgEnableDisableServiceImpl.java
...odule/jg/biz/service/impl/JgEnableDisableServiceImpl.java
+7
-1
JgEquipTransferServiceImpl.java
...odule/jg/biz/service/impl/JgEquipTransferServiceImpl.java
+9
-3
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+0
-0
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+18
-4
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+4
-2
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/controller/JgInstallationNoticeController.java
View file @
c44d450c
...
...
@@ -67,16 +67,9 @@ public class JgInstallationNoticeController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新安装告知"
,
notes
=
"根据sequenceNbr更新安装告知"
)
public
ResponseModel
<
JgInstallationNoticeDto
>
updateBySequenceNbrJgInstallationNotice
(
@RequestParam
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
model
,
@RequestParam
(
value
=
"op"
,
required
=
false
)
String
op
)
{
JgInstallationNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"installationInfo"
)),
JgInstallationNoticeDto
.
class
,
true
);
// installationInfo.setEquList(((LinkedHashMap<?, ?>) model.get("installationInfo")).get("equListDesc").toString());
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数installationInfo不能为空"
);
}
Object
o
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"installationInfo"
)).
get
(
"proxyStatementAttachment"
);
Object
o1
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"installationInfo"
)).
get
(
"installContractAttachment"
);
Object
o2
=
((
LinkedHashMap
<?,
?>)
model
.
get
(
"installationInfo"
)).
get
(
"otherAccessories"
);
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
));
}
...
...
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/JgChangeRegistrationNameServiceImpl.java
View file @
c44d450c
...
...
@@ -227,7 +227,10 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
map
.
put
(
"SEQUENCE_NBR"
,
jsonObject
.
get
(
"sequenceNbr"
));
equipList
.
add
(
map
);
}
this
.
repeatUsedEquipCheck
(
equipList
,
reginParams
.
getCompany
().
getCompanyCode
());
this
.
repeatUsedEquipCheck
(
equipList
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
())
?
reginParams
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
reginParams
.
getCompany
().
getCompanyCode
());
}
List
<
ProcessTaskDTO
>
processTasks
=
new
ArrayList
<>();
// 判断当前是否为提交
...
...
@@ -443,7 +446,10 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
equipList
.
add
(
map
);
}
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
this
.
repeatUsedEquipCheck
(
equipList
,
reginParams
.
getCompany
().
getCompanyCode
());
this
.
repeatUsedEquipCheck
(
equipList
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
())
?
reginParams
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
reginParams
.
getCompany
().
getCompanyCode
());
}
if
(
"1"
.
equals
(
submitType
))
{
//发起流程
...
...
@@ -1052,4 +1058,4 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
,
companyCode
,
RequestContext
.
getExeUserId
());
}
}
\ 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/JgChangeRegistrationReformServiceImpl.java
View file @
c44d450c
...
...
@@ -12,6 +12,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
...
...
@@ -161,9 +162,12 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
String
equId
,
ReginParams
reginParams
)
{
CompanyBo
company
=
reginParams
.
getCompany
();
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
BUSINESS_TYPE_KEY
)
.
equipRepeatUsedCheck
(
equId
,
reginParams
.
getCompany
().
getCompanyCode
());
.
equipRepeatUsedCheck
(
equId
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
}
}
...
...
@@ -187,6 +191,8 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
public
List
<
Map
<
String
,
Object
>>
save
(
JSONObject
map
)
{
try
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
String
companyCode
=
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
())
?
reginParams
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
reginParams
.
getCompany
().
getCompanyCode
();
UseInfo
useInfo
=
new
UseInfo
();
String
equipId
=
map
.
get
(
"record"
).
toString
();
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
...
...
@@ -201,7 +207,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgChangeRegistrationReform
.
setSupervisoryCode
(
supervisoryCode
);
jgChangeRegistrationReform
.
setUseUnitName
(
ObjectUtils
.
isEmpty
(
useInfo
.
getUseUnitName
())
?
reginParams
.
getCompany
().
getCompanyName
()
:
useInfo
.
getUseUnitName
());
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
ObjectUtils
.
isEmpty
(
useInfo
.
getUseUnitCreditCode
())
?
reginParams
.
getCompany
().
getCompanyCode
()
:
useInfo
.
getUseUnitCreditCode
());
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
ObjectUtils
.
isEmpty
(
useInfo
.
getUseUnitCreditCode
())
?
companyCode
:
useInfo
.
getUseUnitCreditCode
());
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"otherAccessories"
)))
{
jgChangeRegistrationReform
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
}
...
...
@@ -213,11 +219,11 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setRenovationSupervisioninspectionCertificate
(
JSONObject
.
toJSONString
(
map
.
get
(
"renovationSupervisioninspectionCertificate"
)));
}
// 使用单位提交
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
()
);
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
companyCode
);
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
}
else
{
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
()
);
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
companyCode
);
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectOrgName"
)))
{
jgChangeRegistrationReform
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
...
...
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/JgChangeRegistrationTransferServiceImpl.java
View file @
c44d450c
...
...
@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jg.api.common.StringUtil;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
...
...
@@ -181,7 +182,10 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
}
if
(
"1"
.
equals
(
submitType
))
{
this
.
repeatUsedEquipCheck
(
registrationIdList
,
reginParams
.
getCompany
().
getCompanyCode
());
this
.
repeatUsedEquipCheck
(
registrationIdList
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
())
?
reginParams
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
reginParams
.
getCompany
().
getCompanyCode
());
}
//查询证下的设备
...
...
@@ -264,7 +268,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
//注册登记日期
oldTransfer
.
setRegDate
(
new
Date
());
//使用机构
oldTransfer
.
setUseUnitCreditCode
(
company
.
getCompanyCode
());
oldTransfer
.
setUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
oldTransfer
.
setUseUnitName
(
company
.
getCompanyName
());
//录入单位统一信用代码
oldTransfer
.
setInputUnitNo
(
company
.
getCompanyCode
());
...
...
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/JgChangeRegistrationUnitServiceImpl.java
View file @
c44d450c
...
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.jg.api.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
...
...
@@ -394,8 +395,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
CompanyBo
company
=
reginParams
.
getCompany
();
deviceList
.
forEach
(
jsonObject
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
.
equipRepeatUsedCheck
(
String
.
valueOf
(
jsonObject
.
get
(
"SEQUENCE_NBR"
)),
reginParams
.
getCompany
().
getCompanyCode
()));
.
equipRepeatUsedCheck
(
String
.
valueOf
(
jsonObject
.
get
(
"SEQUENCE_NBR"
)),
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
()));
}
return
noticeDto
;
}
...
...
@@ -415,8 +420,10 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
JgChangeRegistrationUnitDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
;
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
if
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
()))
{
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
];
}
String
companyType
=
reginParams
.
getCompany
().
getCompanyType
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversion
(
sort
);
...
...
@@ -603,7 +610,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
model
.
setStatus
(
taskName
[
0
]);
}
model
.
setNewUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
model
.
setNewUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
model
.
setNewUseUnitCreditCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
())
?
reginParams
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
reginParams
.
getCompany
().
getCompanyCode
());
if
(!
CollectionUtils
.
isEmpty
(
nextExecutorUserIds
))
{
model
.
setNextExecuteUserIds
(
nextExecutorUserIds
.
get
(
0
));
}
...
...
@@ -702,8 +711,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//放在最后面防止前面有异常
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
CompanyBo
company
=
reginParams
.
getCompany
();
deviceList
.
forEach
(
jsonObject
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
.
equipRepeatUsedCheck
(
String
.
valueOf
(
jsonObject
.
get
(
"SEQUENCE_NBR"
)),
reginParams
.
getCompany
().
getCompanyCode
()));
.
equipRepeatUsedCheck
(
String
.
valueOf
(
jsonObject
.
get
(
"SEQUENCE_NBR"
)),
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
()));
}
return
Collections
.
singletonList
(
model
);
}
...
...
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/JgEnableDisableServiceImpl.java
View file @
c44d450c
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
...
...
@@ -14,6 +15,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisableEq;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgEnableDisableService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
...
...
@@ -141,7 +143,11 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
// 设备列表
List
<
Map
<
String
,
Object
>>
equipments
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipments"
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
// 校验设备不能再多个流程中
this
.
repeatUsedEquipCheck
(
equipments
,
reginParams
.
getCompany
().
getCompanyCode
());
CompanyBo
company
=
reginParams
.
getCompany
();
this
.
repeatUsedEquipCheck
(
equipments
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
}
String
businessCode
=
ObjectUtils
.
isEmpty
(
map
.
get
(
"applyType"
))
?
String
.
valueOf
(
map
.
get
(
"businessCode"
))
:
String
.
valueOf
(
map
.
get
(
"applyType"
));
// 接收机构
...
...
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/JgEquipTransferServiceImpl.java
View file @
c44d450c
...
...
@@ -154,14 +154,17 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
this
.
saveOrUpdateHisDataBatch
(
jgEquipTransferEqList
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//放在最后面防止前面有异常
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
CompanyBo
company
=
reginParams
.
getCompany
();
jgEquipTransferEqList
.
forEach
(
equipTransferEq
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
EQUIP_TRANSFER_PROCESS_KEY
)
.
equipRepeatUsedCheck
(
equipTransferEq
.
getEquId
(),
reginParams
.
getCompany
().
getCompanyCode
()));
.
equipRepeatUsedCheck
(
equipTransferEq
.
getEquId
(),
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
()));
}
return
transferList
;
}
/**
* 删除
redis校验重复引用设备的数据
* 删除redis校验重复引用设备的数据
*/
private
void
delRepeatUseEquipData
(
Long
id
,
String
status
,
String
companyCode
)
{
List
<
JgEquipTransferEq
>
list
=
equipTransferEqService
.
lambdaQuery
().
eq
(
JgEquipTransferEq:
:
getEquipTransferId
,
id
).
list
();
...
...
@@ -406,8 +409,11 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
this
.
saveOrUpdateHisDataBatch
(
jgEquipTransferEqList
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//放在最后面防止前面有异常
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
CompanyBo
company
=
reginParams
.
getCompany
();
jgEquipTransferEqList
.
forEach
(
equipTransferEq
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
EQUIP_TRANSFER_PROCESS_KEY
)
.
equipRepeatUsedCheck
(
equipTransferEq
.
getEquId
(),
reginParams
.
getCompany
().
getCompanyCode
()));
.
equipRepeatUsedCheck
(
equipTransferEq
.
getEquId
(),
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
()));
}
return
equipTransferDto
;
}
...
...
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 @
c44d450c
This diff is collapsed.
Click to expand it.
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/JgScrapCancelServiceImpl.java
View file @
c44d450c
...
...
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
...
...
@@ -133,7 +134,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
public
Page
<
JgScrapCancelDto
>
getList
(
JgScrapCancelDto
dto
,
String
sort
,
Page
<
JgScrapCancelDto
>
page
,
List
<
String
>
roleIds
)
{
ReginParams
reginParams
=
this
.
getSelectedOrgInfo
();
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
CompanyBo
company
=
reginParams
.
getCompany
();
String
orgCode
=
company
.
getCompanyCode
();
if
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
()))
{
orgCode
=
company
.
getCompanyCode
().
split
(
"_"
)[
1
];
}
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
...
...
@@ -215,8 +220,12 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
// 判断当前是否为提交
List
<
WorkflowResultDto
>
workflowResultDtos
=
null
;
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
CompanyBo
company
=
reginParams
.
getCompany
();
List
<
JgScrapCancelEq
>
JgScrapCancelEqList
=
getCancelEqs
(
noticeParams
);
this
.
repeatUsedEquipCheck
(
JgScrapCancelEqList
,
reginParams
.
getCompany
().
getCompanyCode
());
this
.
repeatUsedEquipCheck
(
JgScrapCancelEqList
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
// 发起流程
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
...
...
@@ -256,7 +265,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
else
{
jgScrapCancel
.
setAuditStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getPass
()));
}
jgScrapCancel
.
setUseUnitCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgScrapCancel
.
setUseUnitCode
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
())
?
reginParams
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
]
:
reginParams
.
getCompany
().
getCompanyCode
());
jgScrapCancel
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
jgScrapCancel
.
setCreateUserId
(
RequestContext
.
getExeUserId
());
this
.
setUseRegisterInfo
(
jgScrapCancel
,
noticeParams
);
...
...
@@ -521,8 +532,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
List
<
String
>
roleListAll
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
List
<
JgScrapCancelEq
>
JgScrapCancelEqList
=
getCancelEqs
(
pageData
);
this
.
repeatUsedEquipCheck
(
JgScrapCancelEqList
,
reginParams
.
getCompany
().
getCompanyCode
());
this
.
repeatUsedEquipCheck
(
JgScrapCancelEqList
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
// 更新并提交
// 发起流程
if
(!
StringUtils
.
hasText
(
jgScrapCancelDto
.
getInstanceId
()))
{
...
...
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 @
c44d450c
...
...
@@ -627,7 +627,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
CompanyBo
company
)
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
// 流程中或已完成
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
DEFINITION_KEY
).
equipRepeatUsedCheck
(
map
.
get
(
"equipId"
).
toString
(),
company
.
getCompanyCode
());
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
DEFINITION_KEY
).
equipRepeatUsedCheck
(
map
.
get
(
"equipId"
).
toString
(),
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
());
}
}
...
...
@@ -676,7 +677,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
map
.
get
(
"EQU_CATEGORY_CODE"
)))
{
boolean
hasExistingCertificate
=
this
.
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgUseRegistration
>()
.
eq
(
JgUseRegistration:
:
getUseUnitCreditCode
,
company
.
getCompanyCode
())
.
eq
(
JgUseRegistration:
:
getUseUnitCreditCode
,
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
company
.
getCompanyType
())
?
company
.
getCompanyCode
().
split
(
"_"
)[
1
]
:
company
.
getCompanyCode
())
.
eq
(
JgUseRegistration:
:
getIsDelete
,
false
)
.
eq
(
JgUseRegistration:
:
getStatus
,
"已完成"
)
).
stream
().
anyMatch
(
v
->
!
ObjectUtils
.
isEmpty
(
v
.
getUseRegistrationCode
())
&&
v
.
getUseRegistrationCode
().
contains
(
"瓶30"
));
...
...
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