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
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
245 additions
and
196 deletions
+245
-196
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
+163
-164
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 {
...
@@ -67,16 +67,9 @@ public class JgInstallationNoticeController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新安装告知"
,
notes
=
"根据sequenceNbr更新安装告知"
)
@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
)
{
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
);
JgInstallationNoticeDto
installationInfo
=
BeanUtil
.
mapToBean
(((
LinkedHashMap
)
model
.
get
(
"installationInfo"
)),
JgInstallationNoticeDto
.
class
,
true
);
// installationInfo.setEquList(((LinkedHashMap<?, ?>) model.get("installationInfo")).get("equListDesc").toString());
if
(
Objects
.
isNull
(
installationInfo
))
{
if
(
Objects
.
isNull
(
installationInfo
))
{
throw
new
IllegalArgumentException
(
"参数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
));
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
...
@@ -227,7 +227,10 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
map
.
put
(
"SEQUENCE_NBR"
,
jsonObject
.
get
(
"sequenceNbr"
));
map
.
put
(
"SEQUENCE_NBR"
,
jsonObject
.
get
(
"sequenceNbr"
));
equipList
.
add
(
map
);
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
<>();
List
<
ProcessTaskDTO
>
processTasks
=
new
ArrayList
<>();
// 判断当前是否为提交
// 判断当前是否为提交
...
@@ -443,7 +446,10 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -443,7 +446,10 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
equipList
.
add
(
map
);
equipList
.
add
(
map
);
}
}
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
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
))
{
if
(
"1"
.
equals
(
submitType
))
{
//发起流程
//发起流程
...
@@ -1052,4 +1058,4 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
...
@@ -1052,4 +1058,4 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
return
this
.
baseMapper
.
getListPage
(
page
,
sortMap
,
dto
,
roleIds
,
companyCode
,
RequestContext
.
getExeUserId
());
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;
...
@@ -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.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
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.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.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
...
@@ -161,9 +162,12 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -161,9 +162,12 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
}
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
String
equId
,
ReginParams
reginParams
)
{
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
String
equId
,
ReginParams
reginParams
)
{
CompanyBo
company
=
reginParams
.
getCompany
();
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
BUSINESS_TYPE_KEY
)
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
...
@@ -187,6 +191,8 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
public
List
<
Map
<
String
,
Object
>>
save
(
JSONObject
map
)
{
public
List
<
Map
<
String
,
Object
>>
save
(
JSONObject
map
)
{
try
{
try
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
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
();
UseInfo
useInfo
=
new
UseInfo
();
String
equipId
=
map
.
get
(
"record"
).
toString
();
String
equipId
=
map
.
get
(
"record"
).
toString
();
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
LambdaQueryWrapper
<
UseInfo
>
lambda
=
new
QueryWrapper
<
UseInfo
>().
lambda
();
...
@@ -201,7 +207,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -201,7 +207,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
String
supervisoryCode
=
otherInfo
.
getSupervisoryCode
();
jgChangeRegistrationReform
.
setSupervisoryCode
(
supervisoryCode
);
jgChangeRegistrationReform
.
setSupervisoryCode
(
supervisoryCode
);
jgChangeRegistrationReform
.
setUseUnitName
(
ObjectUtils
.
isEmpty
(
useInfo
.
getUseUnitName
())
?
reginParams
.
getCompany
().
getCompanyName
()
:
useInfo
.
getUseUnitName
());
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"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"otherAccessories"
)))
{
jgChangeRegistrationReform
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
jgChangeRegistrationReform
.
setOtherAccessories
(
JSONObject
.
toJSONString
(
map
.
get
(
"otherAccessories"
)));
}
}
...
@@ -213,11 +219,11 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
...
@@ -213,11 +219,11 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setRenovationSupervisioninspectionCertificate
(
JSONObject
.
toJSONString
(
map
.
get
(
"renovationSupervisioninspectionCertificate"
)));
jgChangeRegistrationReform
.
setRenovationSupervisioninspectionCertificate
(
JSONObject
.
toJSONString
(
map
.
get
(
"renovationSupervisioninspectionCertificate"
)));
}
}
// 使用单位提交
// 使用单位提交
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
()
);
jgChangeRegistrationReform
.
setUseUnitCreditCode
(
companyCode
);
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectUnitCreditCode"
)))
{
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
map
.
get
(
"inspectUnitCreditCode"
).
toString
());
}
else
{
}
else
{
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
()
);
jgChangeRegistrationReform
.
setInspectUnitCreditCode
(
companyCode
);
}
}
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectOrgName"
)))
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"inspectOrgName"
)))
{
jgChangeRegistrationReform
.
setInspectUnitName
(
map
.
get
(
"inspectOrgName"
).
toString
());
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;
...
@@ -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.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
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.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.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
...
@@ -181,7 +182,10 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
...
@@ -181,7 +182,10 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
}
}
if
(
"1"
.
equals
(
submitType
))
{
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
...
@@ -264,7 +268,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
//注册登记日期
//注册登记日期
oldTransfer
.
setRegDate
(
new
Date
());
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
.
setUseUnitName
(
company
.
getCompanyName
());
//录入单位统一信用代码
//录入单位统一信用代码
oldTransfer
.
setInputUnitNo
(
company
.
getCompanyCode
());
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;
...
@@ -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.dto.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
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.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.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
...
@@ -394,8 +395,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -394,8 +395,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
CompanyBo
company
=
reginParams
.
getCompany
();
deviceList
.
forEach
(
jsonObject
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
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
;
return
noticeDto
;
}
}
...
@@ -415,8 +420,10 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -415,8 +420,10 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
JgChangeRegistrationUnitDto
model
,
JgChangeRegistrationUnitDto
model
,
String
type
,
String
type
,
ReginParams
reginParams
)
{
ReginParams
reginParams
)
{
String
orgCode
;
String
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
if
(
CompanyTypeEnum
.
INDIVIDUAL
.
getName
().
equals
(
reginParams
.
getCompany
().
getCompanyType
()))
{
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
().
split
(
"_"
)[
1
];
}
String
companyType
=
reginParams
.
getCompany
().
getCompanyType
();
String
companyType
=
reginParams
.
getCompany
().
getCompanyType
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversion
(
sort
);
SortVo
sortMap
=
commonServiceImpl
.
sortFieldConversion
(
sort
);
...
@@ -603,7 +610,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -603,7 +610,9 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
model
.
setStatus
(
taskName
[
0
]);
model
.
setStatus
(
taskName
[
0
]);
}
}
model
.
setNewUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
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
))
{
if
(!
CollectionUtils
.
isEmpty
(
nextExecutorUserIds
))
{
model
.
setNextExecuteUserIds
(
nextExecutorUserIds
.
get
(
0
));
model
.
setNextExecuteUserIds
(
nextExecutorUserIds
.
get
(
0
));
}
}
...
@@ -702,8 +711,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
...
@@ -702,8 +711,12 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//放在最后面防止前面有异常
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//放在最后面防止前面有异常
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
CompanyBo
company
=
reginParams
.
getCompany
();
deviceList
.
forEach
(
jsonObject
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
PROCESS_DEFINITION_KEY
)
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
);
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;
...
@@ -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.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
...
@@ -14,6 +15,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisableEq;
...
@@ -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.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage
;
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.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.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgEnableDisableService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgEnableDisableService
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
import
com.yeejoin.amos.boot.module.jg.api.vo.SortVo
;
...
@@ -141,7 +143,11 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
...
@@ -141,7 +143,11 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
// 设备列表
// 设备列表
List
<
Map
<
String
,
Object
>>
equipments
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipments"
);
List
<
Map
<
String
,
Object
>>
equipments
=
(
List
<
Map
<
String
,
Object
>>)
map
.
get
(
"equipments"
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submit
))
{
// 校验设备不能再多个流程中
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"
));
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,
...
@@ -154,14 +154,17 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
this
.
saveOrUpdateHisDataBatch
(
jgEquipTransferEqList
);
this
.
saveOrUpdateHisDataBatch
(
jgEquipTransferEqList
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//放在最后面防止前面有异常
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//放在最后面防止前面有异常
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
CompanyBo
company
=
reginParams
.
getCompany
();
jgEquipTransferEqList
.
forEach
(
equipTransferEq
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
EQUIP_TRANSFER_PROCESS_KEY
)
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
;
return
transferList
;
}
}
/**
/**
* 删除
redis校验重复引用设备的数据
* 删除redis校验重复引用设备的数据
*/
*/
private
void
delRepeatUseEquipData
(
Long
id
,
String
status
,
String
companyCode
)
{
private
void
delRepeatUseEquipData
(
Long
id
,
String
status
,
String
companyCode
)
{
List
<
JgEquipTransferEq
>
list
=
equipTransferEqService
.
lambdaQuery
().
eq
(
JgEquipTransferEq:
:
getEquipTransferId
,
id
).
list
();
List
<
JgEquipTransferEq
>
list
=
equipTransferEqService
.
lambdaQuery
().
eq
(
JgEquipTransferEq:
:
getEquipTransferId
,
id
).
list
();
...
@@ -406,8 +409,11 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
...
@@ -406,8 +409,11 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
this
.
saveOrUpdateHisDataBatch
(
jgEquipTransferEqList
);
this
.
saveOrUpdateHisDataBatch
(
jgEquipTransferEqList
);
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//放在最后面防止前面有异常
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
//放在最后面防止前面有异常
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
//如果是提交,用于校验设备是否已经在流程中,如果不在标记设备已经在流程中
CompanyBo
company
=
reginParams
.
getCompany
();
jgEquipTransferEqList
.
forEach
(
equipTransferEq
->
EquipUsedCheckStrategyContext
.
getUsedStrategy
(
EQUIP_TRANSFER_PROCESS_KEY
)
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
;
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
...
@@ -145,12 +145,16 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -145,12 +145,16 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Autowired
@Autowired
AmosRequestContext
amosRequestContext
;
AmosRequestContext
amosRequestContext
;
@Autowired
@Autowired
private
Sequence
sequence
;
@Autowired
CodeUtil
codeUtil
;
CodeUtil
codeUtil
;
@Autowired
@Autowired
CommonServiceImpl
commonServiceImpl
;
CommonServiceImpl
commonServiceImpl
;
@Autowired
@Autowired
JgCertificateChangeRecordServiceImpl
certificateChangeRecordService
;
@Autowired
JgCertificateChangeRecordEqServiceImpl
certificateChangeRecordEqService
;
@Autowired
private
Sequence
sequence
;
@Autowired
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
@Autowired
@Autowired
private
ProduceInfoMapper
produceInfoMapper
;
private
ProduceInfoMapper
produceInfoMapper
;
...
@@ -177,12 +181,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -177,12 +181,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Autowired
@Autowired
private
JgRegistrationHistoryMapper
jgRegistrationHistoryMapper
;
private
JgRegistrationHistoryMapper
jgRegistrationHistoryMapper
;
@Autowired
@Autowired
JgCertificateChangeRecordServiceImpl
certificateChangeRecordService
;
@Autowired
JgCertificateChangeRecordEqServiceImpl
certificateChangeRecordEqService
;
@Autowired
private
IdxBizJgFactoryInfoServiceImpl
idxBizJgFactoryInfoService
;
private
IdxBizJgFactoryInfoServiceImpl
idxBizJgFactoryInfoService
;
@Autowired
@Autowired
...
@@ -190,6 +188,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -190,6 +188,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
@Autowired
@Autowired
private
EquipTechParamPipelineMapper
equipTechParamPipelineMapper
;
private
EquipTechParamPipelineMapper
equipTechParamPipelineMapper
;
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
...
@@ -209,11 +208,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -209,11 +208,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
installationInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
installationInfo
.
put
(
"city"
,
notice
.
getCity
()
+
"_"
+
notice
.
getCityName
());
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
installationInfo
.
put
(
"county"
,
notice
.
getCounty
()
+
"_"
+
notice
.
getCountyName
());
// 处理安装负责人-详情
// 处理安装负责人-详情
if
(!
ObjectUtils
.
isEmpty
(
installationInfo
.
get
(
"installLeaderName"
))){
if
(!
ObjectUtils
.
isEmpty
(
installationInfo
.
get
(
"installLeaderName"
)))
{
installationInfo
.
put
(
"installLeaderName"
,
installationInfo
.
get
(
"installLeaderName"
));
installationInfo
.
put
(
"installLeaderName"
,
installationInfo
.
get
(
"installLeaderName"
));
}
}
// 处理设备类型
// 处理设备类型
if
(!
ObjectUtils
.
isEmpty
(
installationInfo
.
get
(
"equCategoryCode"
))){
if
(!
ObjectUtils
.
isEmpty
(
installationInfo
.
get
(
"equCategoryCode"
)))
{
installationInfo
.
put
(
"EQU_CATEGORY_CODE"
,
installationInfo
.
get
(
"equCategoryCode"
));
installationInfo
.
put
(
"EQU_CATEGORY_CODE"
,
installationInfo
.
get
(
"equCategoryCode"
));
}
}
// 处理设备筛选默认值
// 处理设备筛选默认值
...
@@ -327,7 +326,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -327,7 +326,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
Map
<
String
,
Object
>
setNewEquipData
(
String
companyLevel
,
Map
<
String
,
Object
>
installationInfo
)
{
private
Map
<
String
,
Object
>
setNewEquipData
(
String
companyLevel
,
Map
<
String
,
Object
>
installationInfo
)
{
LambdaQueryWrapper
<
JgInstallationNoticeEq
>
lambda
=
new
QueryWrapper
<
JgInstallationNoticeEq
>().
lambda
();
LambdaQueryWrapper
<
JgInstallationNoticeEq
>
lambda
=
new
QueryWrapper
<
JgInstallationNoticeEq
>().
lambda
();
lambda
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
installationInfo
.
get
(
"sequenceNbr"
));
lambda
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
installationInfo
.
get
(
"sequenceNbr"
));
List
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
jgInstallationNoticeEqMapper
.
selectList
(
lambda
);
List
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
jgInstallationNoticeEqMapper
.
selectList
(
lambda
);
List
<
String
>
ids
=
jgInstallationNoticeEqs
.
stream
().
map
(
item
->
item
.
getEquId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
ids
=
jgInstallationNoticeEqs
.
stream
().
map
(
item
->
item
.
getEquId
()).
collect
(
Collectors
.
toList
());
Iterable
<
ESEquipmentCategoryDto
>
equips
=
esEquipmentCategory
.
findAllById
(
ids
);
Iterable
<
ESEquipmentCategoryDto
>
equips
=
esEquipmentCategory
.
findAllById
(
ids
);
...
@@ -484,7 +483,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -484,7 +483,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
lambda
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
noticeDto
.
getSequenceNbr
());
lambda
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
noticeDto
.
getSequenceNbr
());
jgInstallationNoticeEqMapper
.
delete
(
lambda
);
jgInstallationNoticeEqMapper
.
delete
(
lambda
);
ArrayList
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
new
ArrayList
<>();
ArrayList
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
new
ArrayList
<>();
noticeDto
.
getDeviceList
().
forEach
(
item
->
{
noticeDto
.
getDeviceList
().
forEach
(
item
->
{
JgInstallationNoticeEq
jgInstallationNoticeEq
=
new
JgInstallationNoticeEq
();
JgInstallationNoticeEq
jgInstallationNoticeEq
=
new
JgInstallationNoticeEq
();
jgInstallationNoticeEq
.
setEquId
(
String
.
valueOf
(
item
.
get
(
"SEQUENCE_NBR"
)));
jgInstallationNoticeEq
.
setEquId
(
String
.
valueOf
(
item
.
get
(
"SEQUENCE_NBR"
)));
jgInstallationNoticeEq
.
setEquCategoryCode
(
String
.
valueOf
(
item
.
get
(
"EQU_CATEGORY_CODE"
)));
jgInstallationNoticeEq
.
setEquCategoryCode
(
String
.
valueOf
(
item
.
get
(
"EQU_CATEGORY_CODE"
)));
...
@@ -594,7 +593,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -594,7 +593,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
List
<
JgInstallationNoticeEq
>
equList
=
jgInstallationNoticeEqService
.
lambdaQuery
().
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
jgInstallationNotice
.
getSequenceNbr
()).
list
();
List
<
JgInstallationNoticeEq
>
equList
=
jgInstallationNoticeEqService
.
lambdaQuery
().
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
jgInstallationNotice
.
getSequenceNbr
()).
list
();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
ArrayList
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
ArrayList
<
Map
<
String
,
Object
>>
maps
=
new
ArrayList
<>();
equList
.
forEach
(
equ
->{
equList
.
forEach
(
equ
->
{
List
<
Map
<
String
,
Object
>>
informationList
=
jgInstallationNoticeMapper
.
queryEquipInformation
(
equ
.
getSequenceNbr
());
List
<
Map
<
String
,
Object
>>
informationList
=
jgInstallationNoticeMapper
.
queryEquipInformation
(
equ
.
getSequenceNbr
());
if
(
Objects
.
isNull
(
jgInstallationNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
if
(
Objects
.
isNull
(
jgInstallationNotice
)
||
CollectionUtils
.
isEmpty
(
informationList
))
{
throw
new
IllegalArgumentException
(
"安装告知单不存在"
);
throw
new
IllegalArgumentException
(
"安装告知单不存在"
);
...
@@ -765,7 +764,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -765,7 +764,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
BeanUtils
.
copyProperties
(
obj
,
taskMessageDto
);
BeanUtils
.
copyProperties
(
obj
,
taskMessageDto
);
dto
.
setModel
(
taskMessageDto
);
dto
.
setModel
(
taskMessageDto
);
// 摘要 按原有规则组装
// 摘要 按原有规则组装
dto
.
setTaskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
obj
.
getEquList
(),
obj
.
getApplyNo
()));
dto
.
setTaskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
obj
.
getEquList
(),
obj
.
getApplyNo
()));
// 申请单号
// 申请单号
dto
.
setTaskCode
(
obj
.
getApplyNo
());
dto
.
setTaskCode
(
obj
.
getApplyNo
());
// 业务类型枚举code值
// 业务类型枚举code值
...
@@ -798,7 +797,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -798,7 +797,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskModelDto
.
setStartUserCompanyName
(
item
.
getCreateUserCompanyName
());
// 任务发起人所在单位
taskModelDto
.
setStartUserCompanyName
(
item
.
getCreateUserCompanyName
());
// 任务发起人所在单位
taskModelDto
.
setStartDate
(
item
.
getCreateDate
());
taskModelDto
.
setStartDate
(
item
.
getCreateDate
());
taskModelDto
.
setNextExecuteUser
(
item
.
getNextExecuteIds
());
taskModelDto
.
setNextExecuteUser
(
item
.
getNextExecuteIds
());
taskModelDto
.
setTaskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getApplyNo
()));
taskModelDto
.
setTaskContent
(
String
.
format
(
"来自%s的业务办理,【申请单号:%s】"
,
item
.
getEquList
(),
item
.
getApplyNo
()));
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
TaskMessageDto
taskMessageDto
=
new
TaskMessageDto
();
BeanUtils
.
copyProperties
(
item
,
taskMessageDto
);
BeanUtils
.
copyProperties
(
item
,
taskMessageDto
);
taskModelDto
.
setModel
(
taskMessageDto
);
taskModelDto
.
setModel
(
taskMessageDto
);
...
@@ -813,42 +812,42 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -813,42 +812,42 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgInstallationNoticeDto
model
,
List
<
Map
<
String
,
Object
>>
deviceList
,
List
<
String
>
applyNoList
,
List
<
JgInstallationNotice
>
list
,
List
<
JgInstallationNoticeEq
>
equipList
,
List
<
WorkflowResultDto
>
workflowResultList
)
{
private
void
businessData
(
String
submitType
,
ReginParams
reginParams
,
JgInstallationNoticeDto
model
,
List
<
Map
<
String
,
Object
>>
deviceList
,
List
<
String
>
applyNoList
,
List
<
JgInstallationNotice
>
list
,
List
<
JgInstallationNoticeEq
>
equipList
,
List
<
WorkflowResultDto
>
workflowResultList
)
{
CompanyBo
companyBo
=
commonService
.
getOneCompany
(
model
.
getReceiveOrgCreditCode
());
CompanyBo
companyBo
=
commonService
.
getOneCompany
(
model
.
getReceiveOrgCreditCode
());
JgInstallationNotice
dto
=
new
JgInstallationNotice
();
JgInstallationNotice
dto
=
new
JgInstallationNotice
();
BeanUtils
.
copyProperties
(
model
,
dto
);
BeanUtils
.
copyProperties
(
model
,
dto
);
// int i = deviceList.indexOf(obj);
// int i = deviceList.indexOf(obj);
String
applyNo
=
applyNoList
.
get
(
0
);
String
applyNo
=
applyNoList
.
get
(
0
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setNoticeDate
(
new
Date
());
dto
.
setNoticeDate
(
new
Date
());
// 统计使用
// 统计使用
dto
.
setReceiveCompanyOrgCode
(
companyBo
.
getOrgCode
());
dto
.
setReceiveCompanyOrgCode
(
companyBo
.
getOrgCode
());
dto
.
setEquList
(
String
.
valueOf
(
deviceList
.
get
(
0
).
get
(
"EQU_LIST"
)));
dto
.
setEquList
(
String
.
valueOf
(
deviceList
.
get
(
0
).
get
(
"EQU_LIST"
)));
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
dto
.
setNextExecuteIds
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
());
dto
.
setNextExecuteIds
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
());
dto
.
setNextExecuteUserIds
(
workflowResultList
.
get
(
0
).
getNextExecutorUserIds
());
dto
.
setNextExecuteUserIds
(
workflowResultList
.
get
(
0
).
getNextExecutorUserIds
());
dto
.
setInstanceStatus
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
()
+
","
+
workflowResultList
.
get
(
0
).
getExecutorRoleIds
());
dto
.
setInstanceStatus
(
workflowResultList
.
get
(
0
).
getNextExecutorRoleIds
()
+
","
+
workflowResultList
.
get
(
0
).
getExecutorRoleIds
());
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setPromoter
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setNextTaskId
(
workflowResultList
.
get
(
0
).
getNextTaskId
());
dto
.
setNextTaskId
(
workflowResultList
.
get
(
0
).
getNextTaskId
());
}
else
{
}
else
{
dto
.
setNextExecuteUserIds
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setNextExecuteUserIds
(
reginParams
.
getUserModel
().
getUserId
());
}
}
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
dto
.
setInstallUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
// dto.setEquList((String.valueOf(obj.get("EQU_LIST"))));
// dto.setEquList((String.valueOf(obj.get("EQU_LIST"))));
dto
.
setEntrustingUnitName
(
dto
.
getUseUnitName
());
dto
.
setEntrustingUnitName
(
dto
.
getUseUnitName
());
dto
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
dto
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
// dto.setEquRegisterCode(String.valueOf(obj.get("EQU_CODE")));
// dto.setEquRegisterCode(String.valueOf(obj.get("EQU_CODE")));
// dto.setFactoryNum(String.valueOf(obj.get("FACTORY_NUM")));
// dto.setFactoryNum(String.valueOf(obj.get("FACTORY_NUM")));
if
(!
CollectionUtils
.
isEmpty
(
workflowResultList
))
{
if
(!
CollectionUtils
.
isEmpty
(
workflowResultList
))
{
dto
.
setInstanceId
(
workflowResultList
.
get
(
0
).
getInstanceId
());
dto
.
setInstanceId
(
workflowResultList
.
get
(
0
).
getInstanceId
());
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
}
else
{
}
else
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
}
}
dto
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
dto
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
// dto.setEquAddress(obj.getOrDefault("ADDRESS", "").toString());
// dto.setEquAddress(obj.getOrDefault("ADDRESS", "").toString());
list
.
add
(
dto
);
list
.
add
(
dto
);
deviceList
.
forEach
(
obj
->
{
deviceList
.
forEach
(
obj
->
{
JgInstallationNoticeEq
jgRelationEquip
=
new
JgInstallationNoticeEq
();
JgInstallationNoticeEq
jgRelationEquip
=
new
JgInstallationNoticeEq
();
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
...
@@ -872,12 +871,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -872,12 +871,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
// deviceList.forEach(item -> {
// deviceList.forEach(item -> {
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
// dto.setBusinessKey(item.get("SEQUENCE_NBR").toString());
// dto.setBusinessKey(item.get("SEQUENCE_NBR").toString());
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
dto
.
setNextExecuteUserCompanyCode
(
receiveOrgCreditCode
);
dto
.
setNextExecuteUserCompanyCode
(
receiveOrgCreditCode
);
list
.
add
(
dto
);
list
.
add
(
dto
);
// });
// });
actWorkflowBatchDTO
.
setProcess
(
list
);
actWorkflowBatchDTO
.
setProcess
(
list
);
List
<
ProcessTaskDTO
>
processTaskDTOS
=
iCmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
List
<
ProcessTaskDTO
>
processTaskDTOS
=
iCmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
...
@@ -1106,93 +1105,93 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1106,93 +1105,93 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
taskMap
.
put
(
"model"
,
taskMessageDto
);
taskMap
.
put
(
"model"
,
taskMessageDto
);
TaskV2Model
taskV2Model1
=
commonService
.
updateTaskModel
(
taskMap
);
TaskV2Model
taskV2Model1
=
commonService
.
updateTaskModel
(
taskMap
);
String
finalYm
=
ym
;
String
finalYm
=
ym
;
jgRelationEquips
.
forEach
(
jgRelationEquip
->{
jgRelationEquips
.
forEach
(
jgRelationEquip
->
{
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizJgRegisterInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
queryWrapper2
.
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
String
equCode
=
Optional
.
ofNullable
(
idxBizJgRegisterInfo
.
getEquDefine
())
String
equCode
=
Optional
.
ofNullable
(
idxBizJgRegisterInfo
.
getEquDefine
())
.
orElse
(
idxBizJgRegisterInfo
.
getEquCategory
());
.
orElse
(
idxBizJgRegisterInfo
.
getEquCategory
());
String
registrationCode
=
equCode
+
jgInstallationNotice
.
getReceiveOrgCreditCode
()
+
finalYm
;
String
registrationCode
=
equCode
+
jgInstallationNotice
.
getReceiveOrgCreditCode
()
+
finalYm
;
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
registrationCode
);
ResponseModel
<
String
>
responseModel
=
tzsServiceFeignClient
.
deviceRegistrationCode
(
registrationCode
);
String
deviceRegistrationCode
=
responseModel
.
getResult
();
String
deviceRegistrationCode
=
responseModel
.
getResult
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"code96333"
,
tzsJgOtherInfo
.
getCode96333
());
map
.
put
(
"code96333"
,
tzsJgOtherInfo
.
getCode96333
());
map
.
put
(
"superviseCode"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
map
.
put
(
"superviseCode"
,
tzsJgOtherInfo
.
getSupervisoryCode
());
map
.
put
(
"cityCode"
,
jgInstallationNotice
.
getCity
());
map
.
put
(
"cityCode"
,
jgInstallationNotice
.
getCity
());
map
.
put
(
"countyCode"
,
jgInstallationNotice
.
getCounty
());
map
.
put
(
"countyCode"
,
jgInstallationNotice
.
getCounty
());
map
.
put
(
"equCategory"
,
idxBizJgRegisterInfo
.
getEquCategory
());
map
.
put
(
"equCategory"
,
idxBizJgRegisterInfo
.
getEquCategory
());
map
.
put
(
"isXiXian"
,
jgInstallationNotice
.
getIsXixian
()
==
null
?
"null"
:
jgInstallationNotice
.
getIsXixian
().
equals
(
"0"
)
?
"null"
:
"1"
);
map
.
put
(
"isXiXian"
,
jgInstallationNotice
.
getIsXixian
()
==
null
?
"null"
:
jgInstallationNotice
.
getIsXixian
().
equals
(
"0"
)
?
"null"
:
"1"
);
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
();
supervisoryCodeInfoMapper
.
updateStatusBySuperviseCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
supervisoryCodeInfoMapper
.
updateStatusBySuperviseCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
jgInstallationNotice
.
setHandleDate
(
new
Date
());
jgInstallationNotice
.
setHandleDate
(
new
Date
());
//
jgInstallationNotice.setInformNumber(deviceRegistrationCode);
//
jgInstallationNotice.setInformNumber(deviceRegistrationCode);
jgRelationEquip
.
setInformNumber
(
deviceRegistrationCode
);
jgRelationEquip
.
setInformNumber
(
deviceRegistrationCode
);
jgInstallationNotice
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
jgInstallationNotice
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
jgInstallationNotice
.
setPromoter
(
""
);
jgInstallationNotice
.
setPromoter
(
""
);
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
// 更新其他业务表
// 更新其他业务表
if
(!
ValidationUtil
.
isEmpty
(
mapCode
.
get
(
"code96333"
)))
{
if
(!
ValidationUtil
.
isEmpty
(
mapCode
.
get
(
"code96333"
)))
{
tzsJgOtherInfo
.
setCode96333
(
mapCode
.
get
(
"code96333"
).
toString
());
tzsJgOtherInfo
.
setCode96333
(
mapCode
.
get
(
"code96333"
).
toString
());
map1
.
put
(
"CODE96333"
,
tzsJgOtherInfo
.
getCode96333
());
map1
.
put
(
"CODE96333"
,
tzsJgOtherInfo
.
getCode96333
());
}
}
tzsJgOtherInfo
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
tzsJgOtherInfo
.
setSupervisoryCode
(
mapCode
.
get
(
"superviseCode"
).
toString
());
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
tzsJgOtherInfoMapper
.
updateById
(
tzsJgOtherInfo
);
// 更新设备监管部门信息
// 更新设备监管部门信息
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>
eq
=
new
QueryWrapper
<
IdxBizJgSupervisionInfo
>().
lambda
()
LambdaQueryWrapper
<
IdxBizJgSupervisionInfo
>
eq
=
new
QueryWrapper
<
IdxBizJgSupervisionInfo
>().
lambda
()
.
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
.
eq
(
IdxBizJgSupervisionInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfo
=
idxBizJgSupervisionInfoMapper
.
selectOne
(
eq
);
IdxBizJgSupervisionInfo
idxBizJgSupervisionInfo
=
idxBizJgSupervisionInfoMapper
.
selectOne
(
eq
);
if
(!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getOrgBranchCode
())
&&
!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getOrgBranchName
()))
{
if
(!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getOrgBranchCode
())
&&
!
ObjectUtils
.
isEmpty
(
jgInstallationNotice
.
getOrgBranchName
()))
{
HashMap
<
String
,
Object
>
parentMessage
=
(
HashMap
<
String
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
jgInstallationNotice
.
getOrgBranchCode
()).
getResult
();
HashMap
<
String
,
Object
>
parentMessage
=
(
HashMap
<
String
,
Object
>)
Privilege
.
companyClient
.
queryByOrgcode
(
jgInstallationNotice
.
getOrgBranchCode
()).
getResult
();
// 目前平台返回key为compnay(存在拼写错误)
// 目前平台返回key为compnay(存在拼写错误)
CompanyModel
parentModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
parentMessage
.
get
(
"compnay"
)),
CompanyModel
.
class
);
CompanyModel
parentModel
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
parentMessage
.
get
(
"compnay"
)),
CompanyModel
.
class
);
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
parentModel
.
getOrgCode
());
idxBizJgSupervisionInfo
.
setOrgBranchCode
(
parentModel
.
getOrgCode
());
idxBizJgSupervisionInfo
.
setOrgBranchName
(
parentModel
.
getCompanyName
());
idxBizJgSupervisionInfo
.
setOrgBranchName
(
parentModel
.
getCompanyName
());
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
(
parentModel
.
getCompanyCode
());
idxBizJgSupervisionInfo
.
setCompanyOrgBranchCode
(
parentModel
.
getCompanyCode
());
idxBizJgSupervisionInfoMapper
.
updateById
(
idxBizJgSupervisionInfo
);
idxBizJgSupervisionInfoMapper
.
updateById
(
idxBizJgSupervisionInfo
);
}
}
// 生成设备代码及更新历史表的的设备代码字段
// 生成设备代码及更新历史表的的设备代码字段
this
.
justGenerateEquCode
(
idxBizJgRegisterInfo
,
jgInstallationNotice
.
getReceiveOrgCreditCode
(),
jgInstallationNotice
);
this
.
justGenerateEquCode
(
idxBizJgRegisterInfo
,
jgInstallationNotice
.
getReceiveOrgCreditCode
(),
jgInstallationNotice
);
tzsJgRegistrationInfoMapper
.
updateById
(
idxBizJgRegisterInfo
);
tzsJgRegistrationInfoMapper
.
updateById
(
idxBizJgRegisterInfo
);
// 更新es
// 更新es
updateEquipEs
(
jgInstallationNotice
,
tzsJgOtherInfo
,
idxBizJgRegisterInfo
,
idxBizJgSupervisionInfo
,
map1
,
dto
);
updateEquipEs
(
jgInstallationNotice
,
tzsJgOtherInfo
,
idxBizJgRegisterInfo
,
idxBizJgSupervisionInfo
,
map1
,
dto
);
// 记录施工信息表
// 记录施工信息表
createConstruction2Db
(
jgInstallationNotice
,
jgRelationEquip
);
createConstruction2Db
(
jgInstallationNotice
,
jgRelationEquip
);
// 更新使用信息
// 更新使用信息
updateJgUseInfo
(
jgInstallationNotice
,
jgRelationEquip
);
updateJgUseInfo
(
jgInstallationNotice
,
jgRelationEquip
);
// 生成证记录表主键
// 生成证记录表主键
long
certChangeSeq
=
sequence
.
nextId
();
long
certChangeSeq
=
sequence
.
nextId
();
// 生成jg证书变更记录
// 生成jg证书变更记录
genJgCertificateChangeRecord
(
jgInstallationNotice
,
certChangeSeq
,
registrationCode
,
idxBizJgRegisterInfo
,
taskV2Model1
);
genJgCertificateChangeRecord
(
jgInstallationNotice
,
certChangeSeq
,
registrationCode
,
idxBizJgRegisterInfo
,
taskV2Model1
);
// 查询设备制造信息
// 查询设备制造信息
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>
factoryInfoWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
IdxBizJgFactoryInfo
>
factoryInfoWrapper
=
new
LambdaQueryWrapper
<>();
factoryInfoWrapper
.
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
factoryInfoWrapper
.
eq
(
IdxBizJgFactoryInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
IdxBizJgFactoryInfo
idxBizJgFactoryInfo
=
idxBizJgFactoryInfoService
.
getOne
(
factoryInfoWrapper
);
IdxBizJgFactoryInfo
idxBizJgFactoryInfo
=
idxBizJgFactoryInfoService
.
getOne
(
factoryInfoWrapper
);
// 生成tzs_jg_certificate_change_record_eq记录
// 生成tzs_jg_certificate_change_record_eq记录
JgCertificateChangeRecordEq
changeRecordEq
=
new
JgCertificateChangeRecordEq
();
JgCertificateChangeRecordEq
changeRecordEq
=
new
JgCertificateChangeRecordEq
();
changeRecordEq
.
setChangeRecordId
(
String
.
valueOf
(
certChangeSeq
));
//登记证记录主键
changeRecordEq
.
setChangeRecordId
(
String
.
valueOf
(
certChangeSeq
));
//登记证记录主键
changeRecordEq
.
setEquId
(
jgRelationEquip
.
getEquId
());
//设备主键
changeRecordEq
.
setEquId
(
jgRelationEquip
.
getEquId
());
//设备主键
changeRecordEq
.
setProductCode
(
idxBizJgFactoryInfo
.
getFactoryNum
());
changeRecordEq
.
setProductCode
(
idxBizJgFactoryInfo
.
getFactoryNum
());
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
certificateChangeRecordEqService
.
save
(
changeRecordEq
);
jgResumeInfoService
.
createWithModel
(
JgResumeInfoDto
.
builder
()
jgResumeInfoService
.
createWithModel
(
JgResumeInfoDto
.
builder
()
.
applyNo
(
jgInstallationNotice
.
getApplyNo
())
.
applyNo
(
jgInstallationNotice
.
getApplyNo
())
.
businessType
(
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
())
.
businessType
(
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
())
.
businessId
(
jgInstallationNotice
.
getSequenceNbr
()
+
""
)
.
businessId
(
jgInstallationNotice
.
getSequenceNbr
()
+
""
)
.
equId
(
jgRelationEquip
.
getEquId
())
.
equId
(
jgRelationEquip
.
getEquId
())
.
approvalUnit
(
jgInstallationNotice
.
getReceiveOrgName
())
.
approvalUnit
(
jgInstallationNotice
.
getReceiveOrgName
())
.
approvalUnitCode
(
jgInstallationNotice
.
getReceiveOrgCreditCode
())
.
approvalUnitCode
(
jgInstallationNotice
.
getReceiveOrgCreditCode
())
.
status
(
"正常"
)
.
status
(
"正常"
)
.
routePath
(
taskV2Model1
.
getRoutePath
())
.
routePath
(
taskV2Model1
.
getRoutePath
())
.
build
());
.
build
());
});
});
// 更新关联设备表
// 更新关联设备表
jgInstallationNoticeEqService
.
updateBatchById
(
jgRelationEquips
);
jgInstallationNoticeEqService
.
updateBatchById
(
jgRelationEquips
);
...
@@ -1269,7 +1268,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1269,7 +1268,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
}
}
}
}
public
void
genJgCertificateChangeRecord
(
JgInstallationNotice
jgInstallationNotice
,
Long
sequenceNbr
,
String
registrationCode
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
,
TaskV2Model
taskV2Model1
)
{
public
void
genJgCertificateChangeRecord
(
JgInstallationNotice
jgInstallationNotice
,
Long
sequenceNbr
,
String
registrationCode
,
IdxBizJgRegisterInfo
idxBizJgRegisterInfo
,
TaskV2Model
taskV2Model1
)
{
// 生成一条tzs_jg_certificate_change_record记录
// 生成一条tzs_jg_certificate_change_record记录
JgCertificateChangeRecord
jgCertificateChangeRecord
=
new
JgCertificateChangeRecord
();
JgCertificateChangeRecord
jgCertificateChangeRecord
=
new
JgCertificateChangeRecord
();
jgCertificateChangeRecord
.
setApplyNo
(
jgInstallationNotice
.
getApplyNo
());
jgCertificateChangeRecord
.
setApplyNo
(
jgInstallationNotice
.
getApplyNo
());
...
@@ -1326,7 +1325,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1326,7 +1325,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
map1
.
put
(
"USC_UNIT_CREDIT_CODE"
,
""
);
map1
.
put
(
"USC_UNIT_CREDIT_CODE"
,
""
);
map1
.
put
(
"USC_UNIT_NAME"
,
""
);
map1
.
put
(
"USC_UNIT_NAME"
,
""
);
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s/%s"
,
jgInstallationNotice
.
getProvinceName
(),
jgInstallationNotice
.
getCityName
(),
jgInstallationNotice
.
getCountyName
(),
jgInstallationNotice
.
getStreetName
()));
map1
.
put
(
"USE_PLACE"
,
String
.
format
(
"%s/%s/%s/%s"
,
jgInstallationNotice
.
getProvinceName
(),
jgInstallationNotice
.
getCityName
(),
jgInstallationNotice
.
getCountyName
(),
jgInstallationNotice
.
getStreetName
()));
map1
.
put
(
"ADDRESS"
,
jgInstallationNotice
.
getAddress
());
map1
.
put
(
"ADDRESS"
,
jgInstallationNotice
.
getAddress
());
objMap
.
put
(
tzsJgOtherInfo
.
getRecord
(),
map1
);
objMap
.
put
(
tzsJgOtherInfo
.
getRecord
(),
map1
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
tzsServiceFeignClient
.
commonUpdateEsDataByIds
(
objMap
);
}
}
...
@@ -1334,7 +1333,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1334,7 +1333,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
private
String
buildRecordContent
(
JgInstallationNotice
obj
)
{
private
String
buildRecordContent
(
JgInstallationNotice
obj
)
{
//张三办理了【单位变更】 ,单号【DWBG202407050001】,办理日期2024-07-05
//张三办理了【单位变更】 ,单号【DWBG202407050001】,办理日期2024-07-05
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy年MM月dd日"
);
return
obj
.
getCreateUserName
()
+
"办理了【"
+
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
()+
"】,单号【"
return
obj
.
getCreateUserName
()
+
"办理了【"
+
BusinessTypeEnum
.
JG_INSTALLATION_NOTIFICATION
.
getName
()
+
"】,单号【"
+
obj
.
getApplyNo
()
+
"】,申请日期"
+
simpleDateFormat
.
format
(
obj
.
getCreateDate
());
+
obj
.
getApplyNo
()
+
"】,申请日期"
+
simpleDateFormat
.
format
(
obj
.
getCreateDate
());
}
}
...
@@ -1578,22 +1577,22 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1578,22 +1577,22 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
LambdaQueryWrapper
<
JgInstallationNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JgInstallationNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
installationNotice
.
getSequenceNbr
());
queryWrapper
.
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
installationNotice
.
getSequenceNbr
());
List
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
jgInstallationNoticeEqMapper
.
selectList
(
queryWrapper
);
List
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
jgInstallationNoticeEqMapper
.
selectList
(
queryWrapper
);
jgInstallationNoticeEqs
.
forEach
(
jgRelationEquip
->{
jgInstallationNoticeEqs
.
forEach
(
jgRelationEquip
->
{
// 强制更新字段为 NULL
// 强制更新字段为 NULL
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
IdxBizJgUseInfo
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
// 设置更新条件
updateWrapper
.
eq
(
IdxBizJgUseInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
// 设置更新条件
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitCreditCode
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitCreditCode
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitName
,
null
);
updateWrapper
.
set
(
IdxBizJgUseInfo:
:
getUseUnitName
,
null
);
useInfoService
.
update
(
updateWrapper
);
useInfoService
.
update
(
updateWrapper
);
// 2.2 es的USE_UNIT_CREDIT_CODE赋空
// 2.2 es的USE_UNIT_CREDIT_CODE赋空
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
jgRelationEquip
.
getEquId
());
Optional
<
ESEquipmentCategoryDto
>
optional
=
esEquipmentCategory
.
findById
(
jgRelationEquip
.
getEquId
());
if
(
optional
.
isPresent
())
{
if
(
optional
.
isPresent
())
{
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
ESEquipmentCategoryDto
esEquipmentCategoryDto
=
optional
.
get
();
esEquipmentCategoryDto
.
setUSE_UNIT_CREDIT_CODE
(
null
);
esEquipmentCategoryDto
.
setUSE_UNIT_CREDIT_CODE
(
null
);
esEquipmentCategoryDto
.
setUSE_UNIT_NAME
(
null
);
esEquipmentCategoryDto
.
setUSE_UNIT_NAME
(
null
);
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
esEquipmentCategory
.
save
(
esEquipmentCategoryDto
);
}
}
});
});
}
}
@Transactional
@Transactional
...
@@ -1602,12 +1601,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1602,12 +1601,12 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
List
<
JgInstallationNotice
>
list
=
this
.
lambdaQuery
().
list
();
List
<
JgInstallationNotice
>
list
=
this
.
lambdaQuery
().
list
();
ArrayList
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
new
ArrayList
<>();
ArrayList
<
JgInstallationNoticeEq
>
jgInstallationNoticeEqs
=
new
ArrayList
<>();
ArrayList
<
JgRegistrationHistory
>
jgRegistrationHistories
=
new
ArrayList
<>();
ArrayList
<
JgRegistrationHistory
>
jgRegistrationHistories
=
new
ArrayList
<>();
list
.
forEach
(
item
->{
list
.
forEach
(
item
->
{
// 设备信息
// 设备信息
List
<
JgInstallationNoticeEq
>
equList
=
jgInstallationNoticeEqService
.
lambdaQuery
().
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
item
.
getSequenceNbr
()).
list
();
List
<
JgInstallationNoticeEq
>
equList
=
jgInstallationNoticeEqService
.
lambdaQuery
().
eq
(
JgInstallationNoticeEq:
:
getEquipTransferId
,
item
.
getSequenceNbr
()).
list
();
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
lambdaQuery
().
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
item
.
getSequenceNbr
()).
one
();
JgRegistrationHistory
jgRegistrationHistory
=
jgRegistrationHistoryService
.
lambdaQuery
().
eq
(
JgRegistrationHistory:
:
getCurrentDocumentId
,
item
.
getSequenceNbr
()).
one
();
if
(!
ObjectUtils
.
isEmpty
(
jgRegistrationHistory
)
&&
!
ObjectUtils
.
isEmpty
(
jgRegistrationHistory
.
getChangeData
())){
if
(!
ObjectUtils
.
isEmpty
(
jgRegistrationHistory
)
&&
!
ObjectUtils
.
isEmpty
(
jgRegistrationHistory
.
getChangeData
()))
{
List
<
String
>
ids
=
equList
.
stream
().
map
(
a
->
a
.
getEquId
()
).
collect
(
Collectors
.
toList
());
List
<
String
>
ids
=
equList
.
stream
().
map
(
JgInstallationNoticeEq:
:
getEquId
).
collect
(
Collectors
.
toList
());
Iterable
<
ESEquipmentCategoryDto
>
equips
=
esEquipmentCategory
.
findAllById
(
ids
);
Iterable
<
ESEquipmentCategoryDto
>
equips
=
esEquipmentCategory
.
findAllById
(
ids
);
List
<
Map
<
String
,
Object
>>
equipListMaps
=
getEquipListMaps
(
equips
);
List
<
Map
<
String
,
Object
>>
equipListMaps
=
getEquipListMaps
(
equips
);
JSONObject
object
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
JSONObject
object
=
JSONObject
.
parseObject
(
jgRegistrationHistory
.
getChangeData
());
...
@@ -1615,22 +1614,22 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -1615,22 +1614,22 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
jgRegistrationHistory
.
setChangeData
(
JSONObject
.
toJSONString
(
object
));
jgRegistrationHistory
.
setChangeData
(
JSONObject
.
toJSONString
(
object
));
jgRegistrationHistories
.
add
(
jgRegistrationHistory
);
jgRegistrationHistories
.
add
(
jgRegistrationHistory
);
}
}
equList
.
forEach
(
equ
->
{
equList
.
forEach
(
equ
->
{
if
(!
ObjectUtils
.
isEmpty
(
item
.
getInformNumber
())){
if
(!
ObjectUtils
.
isEmpty
(
item
.
getInformNumber
()))
{
equ
.
setInformNumber
(
item
.
getInformNumber
());
equ
.
setInformNumber
(
item
.
getInformNumber
());
}
}
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoService
.
lambdaQuery
().
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
equ
.
getEquId
()).
one
();
IdxBizJgRegisterInfo
registerInfo
=
idxBizJgRegisterInfoService
.
lambdaQuery
().
eq
(
IdxBizJgRegisterInfo:
:
getRecord
,
equ
.
getEquId
()).
one
();
if
(!
ObjectUtils
.
isEmpty
(
registerInfo
)
&&
!
ObjectUtils
.
isEmpty
(
registerInfo
.
getEquList
())
&&
!
ObjectUtils
.
isEmpty
(
registerInfo
.
getEquCategory
())){
if
(!
ObjectUtils
.
isEmpty
(
registerInfo
)
&&
!
ObjectUtils
.
isEmpty
(
registerInfo
.
getEquList
())
&&
!
ObjectUtils
.
isEmpty
(
registerInfo
.
getEquCategory
()))
{
equ
.
setEquListCode
(
registerInfo
.
getEquList
());
equ
.
setEquListCode
(
registerInfo
.
getEquList
());
equ
.
setEquCategoryCode
(
registerInfo
.
getEquCategory
());
equ
.
setEquCategoryCode
(
registerInfo
.
getEquCategory
());
if
(
ObjectUtils
.
isEmpty
(
item
.
getEquListCode
())
||
ObjectUtils
.
isEmpty
(
item
.
getEquCategoryCode
())){
if
(
ObjectUtils
.
isEmpty
(
item
.
getEquListCode
())
||
ObjectUtils
.
isEmpty
(
item
.
getEquCategoryCode
()))
{
item
.
setEquListCode
(
registerInfo
.
getEquList
());
item
.
setEquListCode
(
registerInfo
.
getEquList
());
item
.
setEquCategoryCode
(
registerInfo
.
getEquCategory
());
item
.
setEquCategoryCode
(
registerInfo
.
getEquCategory
());
if
(
"8300"
.
equals
(
item
.
getEquCategoryCode
())){
if
(
"8300"
.
equals
(
item
.
getEquCategoryCode
()))
{
LambdaQueryWrapper
<
EquipTechParamPipeline
>
lambda
=
new
QueryWrapper
<
EquipTechParamPipeline
>().
lambda
();
LambdaQueryWrapper
<
EquipTechParamPipeline
>
lambda
=
new
QueryWrapper
<
EquipTechParamPipeline
>().
lambda
();
lambda
.
eq
(
EquipTechParamPipeline:
:
getRecord
,
equ
.
getEquId
());
lambda
.
eq
(
EquipTechParamPipeline:
:
getRecord
,
equ
.
getEquId
());
EquipTechParamPipeline
equipTechParamPipeline
=
equipTechParamPipelineMapper
.
selectOne
(
lambda
);
EquipTechParamPipeline
equipTechParamPipeline
=
equipTechParamPipelineMapper
.
selectOne
(
lambda
);
if
(!
ObjectUtils
.
isEmpty
(
equipTechParamPipeline
)
&&
!
ObjectUtils
.
isEmpty
(
equipTechParamPipeline
.
getDeviceName
())){
if
(!
ObjectUtils
.
isEmpty
(
equipTechParamPipeline
)
&&
!
ObjectUtils
.
isEmpty
(
equipTechParamPipeline
.
getDeviceName
()))
{
item
.
setProjectContraption
(
equipTechParamPipeline
.
getDeviceName
());
item
.
setProjectContraption
(
equipTechParamPipeline
.
getDeviceName
());
}
}
}
}
...
...
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;
...
@@ -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.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
...
@@ -133,7 +134,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -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
)
{
public
Page
<
JgScrapCancelDto
>
getList
(
JgScrapCancelDto
dto
,
String
sort
,
Page
<
JgScrapCancelDto
>
page
,
List
<
String
>
roleIds
)
{
ReginParams
reginParams
=
this
.
getSelectedOrgInfo
();
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
());
dto
.
setCreateUserId
(
reginParams
.
getUserModel
().
getUserId
());
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
String
currentUserId
=
reginParams
.
getUserModel
().
getUserId
();
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
SortVo
sortMap
=
commonService
.
sortFieldConversion
(
sort
);
...
@@ -215,8 +220,12 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -215,8 +220,12 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
// 判断当前是否为提交
// 判断当前是否为提交
List
<
WorkflowResultDto
>
workflowResultDtos
=
null
;
List
<
WorkflowResultDto
>
workflowResultDtos
=
null
;
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
CompanyBo
company
=
reginParams
.
getCompany
();
List
<
JgScrapCancelEq
>
JgScrapCancelEqList
=
getCancelEqs
(
noticeParams
);
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
();
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
...
@@ -256,7 +265,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -256,7 +265,9 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
else
{
}
else
{
jgScrapCancel
.
setAuditStatus
(
String
.
valueOf
(
WorkFlowStatusEnum
.
CANCEL_SUBMIT
.
getPass
()));
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
.
setUseUnitName
(
reginParams
.
getCompany
().
getCompanyName
());
jgScrapCancel
.
setCreateUserId
(
RequestContext
.
getExeUserId
());
jgScrapCancel
.
setCreateUserId
(
RequestContext
.
getExeUserId
());
this
.
setUseRegisterInfo
(
jgScrapCancel
,
noticeParams
);
this
.
setUseRegisterInfo
(
jgScrapCancel
,
noticeParams
);
...
@@ -521,8 +532,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
...
@@ -521,8 +532,11 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
List
<
String
>
roleListAll
=
new
ArrayList
<>();
List
<
String
>
roleListAll
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParams
=
JSONObject
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyBo
company
=
reginParams
.
getCompany
();
List
<
JgScrapCancelEq
>
JgScrapCancelEqList
=
getCancelEqs
(
pageData
);
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
()))
{
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
...
@@ -627,7 +627,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
CompanyBo
company
)
{
private
void
checkForRepeatUsedEquip
(
JSONObject
map
,
CompanyBo
company
)
{
if
(!
ObjectUtils
.
isEmpty
(
map
.
get
(
"submit"
)))
{
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
...
@@ -676,7 +677,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
map
.
get
(
"EQU_CATEGORY_CODE"
)))
{
if
(
CylinderTypeEnum
.
CYLINDER
.
getCode
().
equals
(
map
.
get
(
"EQU_CATEGORY_CODE"
)))
{
boolean
hasExistingCertificate
=
this
.
baseMapper
.
selectList
(
boolean
hasExistingCertificate
=
this
.
baseMapper
.
selectList
(
new
LambdaQueryWrapper
<
JgUseRegistration
>()
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:
:
getIsDelete
,
false
)
.
eq
(
JgUseRegistration:
:
getStatus
,
"已完成"
)
.
eq
(
JgUseRegistration:
:
getStatus
,
"已完成"
)
).
stream
().
anyMatch
(
v
->
!
ObjectUtils
.
isEmpty
(
v
.
getUseRegistrationCode
())
&&
v
.
getUseRegistrationCode
().
contains
(
"瓶30"
));
).
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