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
f53e10c7
Commit
f53e10c7
authored
Feb 23, 2024
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
d6088993
3789aa4d
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
129 additions
and
45 deletions
+129
-45
JgChangeRegistrationNameMapper.xml
.../main/resources/mapper/JgChangeRegistrationNameMapper.xml
+1
-1
JgTransferNoticeMapper.xml
...-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
+2
-2
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+14
-0
ICommonService.java
...ejoin/amos/boot/module/jg/biz/service/ICommonService.java
+2
-0
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+55
-0
JgChangeRegistrationNameServiceImpl.java
...biz/service/impl/JgChangeRegistrationNameServiceImpl.java
+6
-4
JgChangeRegistrationReformServiceImpl.java
...z/service/impl/JgChangeRegistrationReformServiceImpl.java
+8
-5
JgChangeRegistrationTransferServiceImpl.java
...service/impl/JgChangeRegistrationTransferServiceImpl.java
+19
-18
JgChangeRegistrationUnitServiceImpl.java
...biz/service/impl/JgChangeRegistrationUnitServiceImpl.java
+7
-5
JgScrapCancelServiceImpl.java
.../module/jg/biz/service/impl/JgScrapCancelServiceImpl.java
+9
-6
JgTransferNoticeServiceImpl.java
...dule/jg/biz/service/impl/JgTransferNoticeServiceImpl.java
+3
-2
JgUseRegistrationServiceImpl.java
...ule/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
+2
-1
installation-notification-report.ftl
.../resources/templates/installation-notification-report.ftl
+1
-1
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgChangeRegistrationNameMapper.xml
View file @
f53e10c7
...
...
@@ -58,7 +58,7 @@
</foreach>
</if>
<if
test=
"dto.type == 'supervision'"
>
AND ur.receive_
org
_code = #{companyCode}
AND ur.receive_
company
_code = #{companyCode}
</if>
<if
test=
"dto.type == 'company'"
>
and ur.use_unit_credit_code = #{dto.useUnitCreditCode}
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgTransferNoticeMapper.xml
View file @
f53e10c7
...
...
@@ -77,14 +77,14 @@
</foreach>
</if>
<if
test=
"type == 'supervision'"
>
AND tjtn.receive_
org
_code = #{orgCode}
AND tjtn.receive_
company
_code = #{orgCode}
AND tjtn.instance_id is not null
</if>
<if
test=
"type == 'company'"
>
AND tjtn.install_unit_credit_code = #{orgCode}
</if>
<if
test=
"type == 'testAdmin'"
>
((AND tjtn.receive_
org
_code = #{orgCode}
((AND tjtn.receive_
company
_code = #{orgCode}
AND tjtn.instance_id is not null)
or
AND tjtn.install_unit_credit_code = #{orgCode})
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/CommonController.java
View file @
f53e10c7
...
...
@@ -291,4 +291,18 @@ public class CommonController extends BaseController {
}
/**
* 校验EQUCODE的唯一性
* @param equCode EQUCODE
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/checkUniquenessOfEQUCODE"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"校验EQUCODE的唯一性"
,
notes
=
"校验EQUCODE的唯一性"
)
public
ResponseModel
<
Object
>
checkUniquenessOfEQUCODE
(
String
equCode
)
{
Boolean
bool
=
commonService
.
checkUniquenessOfEQUCODE
(
equCode
);
return
ResponseHelper
.
buildResponse
(
bool
);
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
View file @
f53e10c7
...
...
@@ -62,4 +62,6 @@ public interface ICommonService {
* @param bizType 业务类型: notice-告知类, register-登记类
*/
List
<
LinkedHashMap
>
getReceiveUnitTree
(
String
bizType
);
Boolean
checkUniquenessOfEQUCODE
(
String
equCode
);
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
f53e10c7
...
...
@@ -17,15 +17,18 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.IDataDictionaryService
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
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.enums.BusinessTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgMaintainNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICommonService
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.FileExporter
;
...
...
@@ -34,9 +37,11 @@ import com.yeejoin.amos.boot.module.jg.biz.utils.JsonUtils;
import
com.yeejoin.amos.boot.module.jg.biz.utils.WordTemplateUtils
;
import
com.yeejoin.amos.boot.module.jg.flc.api.fegin.PrivilegeFeginService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ApplicationFormTypeEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.RegistrationInfoMapper
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
...
...
@@ -59,6 +64,7 @@ import org.springframework.web.multipart.MultipartFile;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
...
...
@@ -163,6 +169,9 @@ public class CommonServiceImpl implements ICommonService {
private
static
final
String
GMBG_PAGE_ID
=
"jgRegistrationInfo"
;
@Autowired
RegistrationInfoMapper
tzsJgRegistrationInfoMapper
;
@Autowired
private
IJgInstallationNoticeService
iJgInstallationNoticeService
;
@Autowired
...
...
@@ -204,6 +213,14 @@ public class CommonServiceImpl implements ICommonService {
@Autowired
ICmWorkflowService
cmWorkflowService
;
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
@Autowired
DataDictionaryServiceImpl
dataDictionaryService
;
public
static
final
String
SPECIAL_REGION_CODE
=
"SpecialRegionCode"
;
public
static
byte
[]
file2byte
(
File
file
)
{
try
{
FileInputStream
in
=
new
FileInputStream
(
file
);
...
...
@@ -322,6 +339,19 @@ public class CommonServiceImpl implements ICommonService {
return
!
ObjectUtils
.
isEmpty
(
result
)
?
result
:
creatReceiveUnitTree
(
bizType
);
}
/**
* 验EQUCODE的唯一性
* @param equCode
* @return
*/
@Override
public
Boolean
checkUniquenessOfEQUCODE
(
String
equCode
)
{
LambdaQueryWrapper
<
RegistrationInfo
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
RegistrationInfo:
:
getEquCode
,
equCode
);
Integer
count
=
tzsJgRegistrationInfoMapper
.
selectCount
(
wrapper
);
return
count
>
0
;
}
@Override
public
List
<
LinkedHashMap
>
getTree
(
ReginParams
reginParams
)
{
...
...
@@ -1288,4 +1318,28 @@ public class CommonServiceImpl implements ICommonService {
List
<
LinkedHashMap
>
list
=
(
List
<
LinkedHashMap
>)
result
.
getResult
();
return
list
;
}
/**
* 生成使用登记编号
*
* @param supervisoryCode 监管码
* @param supervisoryCompanyCode 接收机构单位代码
* @return 使用登记编号
*/
public
String
generateRegistrationCode
(
String
supervisoryCode
,
String
supervisoryCompanyCode
)
{
if
(!
ObjectUtils
.
isEmpty
(
supervisoryCode
)
&&
supervisoryCode
.
length
()
>
5
)
{
String
name
=
EquipTypeEnum
.
getMessage
(
supervisoryCode
.
substring
(
1
,
2
));
String
type
=
supervisoryCode
.
substring
(
2
,
4
);
String
city
=
supervisoryCode
.
substring
(
0
,
1
);
if
(!
ValidationUtil
.
isEmpty
(
supervisoryCompanyCode
))
{
DataDictionary
specialRegionCode
=
dataDictionaryService
.
getByCode
(
supervisoryCompanyCode
,
SPECIAL_REGION_CODE
);
if
(!
ValidationUtil
.
isEmpty
(
specialRegionCode
))
{
city
=
specialRegionCode
.
getName
();
}
}
ResponseModel
<
String
>
stringResponseModel
=
tzsServiceFeignClient
.
useRegistrationCode
(
name
+
type
+
"陕"
+
city
);
return
stringResponseModel
.
getResult
();
}
return
null
;
}
}
\ 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/JgChangeRegistrationNameServiceImpl.java
View file @
f53e10c7
...
...
@@ -299,7 +299,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto
.
setBusinessKey
(
jgChangeRegistrationName
.
getApplyNo
());
dto
.
setCompleteFirstTask
(
true
);
// 启动并执行下一步人单位传接收单位的code
dto
.
setNextExecuteUserCompanyCode
(
jgChangeRegistrationName
.
getReceive
Org
Code
());
dto
.
setNextExecuteUserCompanyCode
(
jgChangeRegistrationName
.
getReceive
Company
Code
());
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
...
...
@@ -422,6 +422,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
if
(
receiveOrgIdList
.
length
>
1
)
{
model
.
setReceiveOrgCode
(
receiveOrgIdList
[
0
]);
model
.
setReceiveCompanyCode
(
receiveOrgIdList
[
0
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
...
...
@@ -523,7 +524,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
private
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationName
jgChangeRegistrationName
)
{
if
(
"0"
.
equals
(
operate
))
{
// 执行通过节点,单位code为接收机构单位信息
return
jgChangeRegistrationName
.
getReceive
Org
Code
();
return
jgChangeRegistrationName
.
getReceive
Company
Code
();
}
if
(
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getPass
())
||
jgChangeRegistrationName
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
UNIT_RENAME_RECEIVE
.
getReject
())
...
...
@@ -532,7 +533,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
return
jgChangeRegistrationName
.
getUseUnitCreditCode
();
}
// 2、3级驳回时,单位code为接收单位code
return
jgChangeRegistrationName
.
getReceive
Org
Code
();
return
jgChangeRegistrationName
.
getReceive
Company
Code
();
}
public
void
updateExecuteIds
(
String
instanceId
,
Long
sequenceNbr
,
String
operate
,
ProcessTaskDTO
processTaskDTO
)
{
...
...
@@ -680,7 +681,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(!
Objects
.
isNull
(
sequenceNbr
))
{
jgChangeRegistrationName
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
jgChangeRegistrationName
.
setReceiveOrgCode
(
jgChangeRegistrationName
.
getReceive
Org
Code
()
+
"_"
+
jgChangeRegistrationName
.
getReceiveOrgName
());
jgChangeRegistrationName
.
setReceiveOrgCode
(
jgChangeRegistrationName
.
getReceive
Company
Code
()
+
"_"
+
jgChangeRegistrationName
.
getReceiveOrgName
());
}
else
{
jgChangeRegistrationName
.
setUseUnitCreditCode
(
reginParams
.
getCompany
().
getCompanyCode
());
jgChangeRegistrationName
.
setNewUseUnitName
(
unitName
);
...
...
@@ -697,6 +698,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
String
[]
receiveOrgIdList
=
dto
.
getReceiveOrgCode
().
split
(
"_"
);
if
(
receiveOrgIdList
.
length
>
1
)
{
dto
.
setReceiveOrgCode
(
receiveOrgIdList
[
0
]);
dto
.
setReceiveCompanyCode
(
receiveOrgIdList
[
0
]);
}
}
return
this
.
baseMapper
.
getListPage
(
page
,
dto
,
roleIds
,
companyCode
,
RequestContext
.
getExeUserId
());
...
...
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 @
f53e10c7
...
...
@@ -157,7 +157,8 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
if
(
map
.
containsKey
(
"receiveCompanyCode"
))
{
String
receiveCompanyCode
=
String
.
valueOf
(
map
.
getString
(
"receiveCompanyCode"
));
jgChangeRegistrationReform
.
setReceiveCompanyCode
(
receiveCompanyCode
);
// jgChangeRegistrationReform.setReceiveCompanyCode(receiveCompanyCode);
jgChangeRegistrationReform
.
setReceiveCompanyCode
(
receiveCompanyCode
.
split
(
"_"
)[
0
]);
jgChangeRegistrationReform
.
setReceiveOrgCode
(
receiveCompanyCode
.
split
(
"_"
)[
0
]);
jgChangeRegistrationReform
.
setReceiveOrgName
(
receiveCompanyCode
.
split
(
"_"
)[
1
]);
...
...
@@ -258,7 +259,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
dto
.
setProcessDefinitionKey
(
"renovationRegistrationReviewNew"
);
dto
.
setBusinessKey
(
"submit"
);
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
dto
.
setNextExecuteUserCompanyCode
(
jgChangeRegistrationReform
.
getReceive
Org
Code
());
dto
.
setNextExecuteUserCompanyCode
(
jgChangeRegistrationReform
.
getReceive
Company
Code
());
List
<
ActWorkflowStartDTO
>
actWorkflowStartDTOList
=
Arrays
.
asList
(
dto
);
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
actWorkflowBatchDTO
.
setProcess
(
actWorkflowStartDTOList
);
...
...
@@ -340,7 +341,8 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
jgChangeRegistrationReform
.
setAuditStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
jgChangeRegistrationReform
.
setStatus
(
FlowStatusEnum
.
TO_BE_FINISHED
.
getName
());
JgChangeRegistrationReformEq
jgChangeRegistrationReformEq
=
jgChangeRegistrationReformEqMapper
.
selectOne
(
new
QueryWrapper
<
JgChangeRegistrationReformEq
>().
eq
(
"equip_transfer_id"
,
jgChangeRegistrationReform
.
getSequenceNbr
()));
String
newUseRegistrationCertificateNumber
=
getCode
(
jgChangeRegistrationReform
.
getSupervisoryCode
());
// String newUseRegistrationCertificateNumber = getCode(jgChangeRegistrationReform.getSupervisoryCode());
String
newUseRegistrationCertificateNumber
=
commonServiceImpl
.
generateRegistrationCode
(
jgChangeRegistrationReform
.
getSupervisoryCode
(),
jgChangeRegistrationReform
.
getReceiveCompanyCode
());
jgChangeRegistrationReform
.
setUseRegistrationCode
(
newUseRegistrationCertificateNumber
);
updateTechparamsByEquIdAndCurrentDoucumentId
(
jgChangeRegistrationReformEq
.
getEquId
(),
jgChangeRegistrationReform
.
getSequenceNbr
().
toString
(),
newUseRegistrationCertificateNumber
,
jgChangeRegistrationReform
.
getApplyNo
());
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
...
...
@@ -921,7 +923,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
private
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationReform
jgChangeRegistrationReform
)
{
if
(
"0"
.
equals
(
operate
))
{
// 执行通过节点,单位code为接收机构单位信息
return
jgChangeRegistrationReform
.
getReceive
Org
Code
();
return
jgChangeRegistrationReform
.
getReceive
Company
Code
();
}
if
(
jgChangeRegistrationReform
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_RECEIVE
.
getPass
())
||
jgChangeRegistrationReform
.
getAuditStatus
().
equals
(
WorkFlowStatusEnum
.
CHANGE_RECEIVE
.
getReject
())
...
...
@@ -930,6 +932,6 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
return
jgChangeRegistrationReform
.
getUseUnitCreditCode
();
}
// 2、3级驳回时,单位code为接收单位code
return
jgChangeRegistrationReform
.
getReceive
Org
Code
();
return
jgChangeRegistrationReform
.
getReceive
Company
Code
();
}
}
\ 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/JgChangeRegistrationTransferServiceImpl.java
View file @
f53e10c7
...
...
@@ -5,26 +5,24 @@ import com.alibaba.fastjson.JSON;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.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
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskMessageDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.TaskModelDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.WorkflowResultDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.*
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransferEq
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory
;
import
com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum
;
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.JgChangeRegistrationNameEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationReformEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationTransferMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgChangeRegistrationUnitEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.*
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferEqService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgRegistrationHistoryService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService
;
...
...
@@ -38,7 +36,10 @@ import com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgRegisterInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgSupervisionInfoMapper
;
import
com.yeejoin.amos.feign.systemctl.model.TaskV2Model
;
import
com.yeejoin.amos.feign.workflow.model.*
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO
;
import
com.yeejoin.amos.feign.workflow.model.TaskResultDTO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.elasticsearch.action.search.SearchRequest
;
import
org.elasticsearch.action.search.SearchResponse
;
...
...
@@ -49,14 +50,12 @@ import org.elasticsearch.index.query.QueryBuilders;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -123,7 +122,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
private
IdxBizJgRegisterInfoMapper
idxBizJgRegisterInfoMapper
;
@Autowired
IdxBizJgSupervisionInfoMapper
idxBizJgSupervisionInfoMapper
;
@Autowired
CommonServiceImpl
commonServiceImpl
;
/**
* 新增移装变更登记
...
...
@@ -336,7 +336,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
oldTransfer
.
setCreateUserName
(
reginParams
.
getUserModel
().
getRealName
());
oldTransfer
.
setCreateUserCompanyName
(
reginParams
.
getCompany
().
getCompanyName
());
//启动流程
WorkflowResultDto
workflowResult
=
this
.
startWorkFlork
(
oldTransfer
.
getReceive
Org
Code
());
WorkflowResultDto
workflowResult
=
this
.
startWorkFlork
(
oldTransfer
.
getReceive
Company
Code
());
this
.
updateExecuteIds
(
instanceId
,
oldTransfer
,
"startWorkfow"
,
workflowResult
);
//删除旧的代办
...
...
@@ -603,7 +603,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
if
(!
ValidationUtil
.
isEmpty
(
registerInfo
))
{
resultDataMap
.
put
(
"equCode"
,
registerInfo
.
getEquCode
());
}
resultDataMap
.
put
(
"receiveOrgCode"
,
transferById
.
getReceive
Org
Code
()
+
"_"
+
transferById
.
getReceiveOrgName
());
resultDataMap
.
put
(
"receiveOrgCode"
,
transferById
.
getReceive
Company
Code
()
+
"_"
+
transferById
.
getReceiveOrgName
());
}
String
transferSafetyManager
=
Optional
.
ofNullable
(
resultDataMap
.
get
(
"transferSafetyManager"
)).
orElse
(
""
).
toString
();
if
(!
transferSafetyManager
.
equals
(
""
)){
...
...
@@ -751,7 +751,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
//reg_person_name 注册登记人员
updateData
.
setRegPersonName
(
reginParams
.
getUserModel
().
getUserName
());
//使用登记证编号
String
useRegistrationCode
=
this
.
getCode
(
supervisoryCode
);
// String useRegistrationCode = this.getCode(supervisoryCode);
String
useRegistrationCode
=
commonServiceImpl
.
generateRegistrationCode
(
supervisoryCode
,
updateData
.
getReceiveCompanyCode
());
if
(!
ValidationUtil
.
isEmpty
(
useRegistrationCode
))
{
updateData
.
setUseRegistrationCode
(
useRegistrationCode
);
}
...
...
@@ -1223,7 +1224,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
public
String
getNextUserOrgCode
(
String
operate
,
JgChangeRegistrationTransfer
contract
)
{
String
code
=
null
;
if
(
"0"
.
equals
(
operate
))
{
code
=
contract
.
getReceive
Org
Code
();
code
=
contract
.
getReceive
Company
Code
();
}
else
{
//驳回
if
(
WorkFlowStatusEnum
.
TRANSFER_RECEIVE
.
getPass
().
equals
(
contract
.
getAuditStatus
())
||
...
...
@@ -1232,7 +1233,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
code
=
contract
.
getUseUnitCreditCode
();
}
}
return
code
==
null
?
contract
.
getReceive
Org
Code
()
:
code
;
return
code
==
null
?
contract
.
getReceive
Company
Code
()
:
code
;
}
private
String
getPageTypeByCurrentNode
(
String
auditStatus
)
{
...
...
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 @
f53e10c7
...
...
@@ -221,7 +221,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
dto
.
setCompleteFirstTask
(
true
);
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
dto
.
setNextExecuteUserCompanyCode
(
noticeDto
.
getReceive
Org
Code
());
dto
.
setNextExecuteUserCompanyCode
(
noticeDto
.
getReceive
Company
Code
());
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
String
instanceId
=
processTasks
.
get
(
0
).
getProcessInstance
().
getId
();
String
nextTaskId
=
processTasks
.
get
(
0
).
getNextTask
().
get
(
0
).
getId
();
...
...
@@ -269,7 +269,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
}
task
.
setVariable
(
map
);
//执行流程
task
.
setNextExecuteUserCompanyCode
(
noticeDto
.
getReceive
Org
Code
());
task
.
setNextExecuteUserCompanyCode
(
noticeDto
.
getReceive
Company
Code
());
ProcessTaskDTO
processTaskDTO
=
cmWorkflowService
.
completeOrReject
(
taskId
,
task
,
op
);
JgChangeRegistrationUnit
bean
=
new
JgChangeRegistrationUnit
();
BeanUtils
.
copyProperties
(
noticeDto
,
bean
);
...
...
@@ -405,8 +405,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
dto
.
setNextExecuteUserCompanyCode
(
model
.
getReceive
Org
Code
());
dto
.
setCompleteFirstTask
(
true
);
dto
.
setNextExecuteUserCompanyCode
(
model
.
getReceive
Company
Code
());
dto
.
setCompleteFirstTask
(
true
);
list
.
add
(
dto
);
}
actWorkflowBatchDTO
.
setProcess
(
list
);
...
...
@@ -635,6 +635,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
String
[]
receiveOrgCodeList
=
receiveOrgCode
.
split
(
"_"
);
if
(
receiveOrgCodeList
.
length
>
1
)
{
model
.
setReceiveOrgCode
(
receiveOrgCodeList
[
0
]);
model
.
setReceiveCompanyCode
(
receiveOrgCodeList
[
0
]);
model
.
setReceiveOrgName
(
receiveOrgCodeList
[
1
]);
}
}
...
...
@@ -803,7 +804,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
useInfo
.
setUseUnitCreditCode
(
jgChangeRegistrationUnit
.
getNewUseUnitCreditCode
());
String
code
=
getCode
(
tzsJgOtherInfo
.
getSupervisoryCode
());
// String code = getCode(tzsJgOtherInfo.getSupervisoryCode());
String
code
=
commonServiceImpl
.
generateRegistrationCode
(
tzsJgOtherInfo
.
getSupervisoryCode
(),
dto
.
getReceiveCompanyCode
());
if
(
ValidationUtil
.
isEmpty
(
code
))
{
log
.
error
(
"生成新的使用登记证编号失败"
);
return
;
...
...
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 @
f53e10c7
...
...
@@ -130,6 +130,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
if
(
receiveOrgIdList
.
length
>
1
)
{
model
.
setReceiveOrgCode
(
receiveOrgIdList
[
0
]);
model
.
setReceiveCompanyCode
(
receiveOrgIdList
[
0
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
...
...
@@ -161,6 +162,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
JgScrapCancelDto
model
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
noticeParams
),
JgScrapCancelDto
.
class
);
model
.
setSEQUENCE_NBR
(
equipId
);
model
.
setReceiveOrgCode
(
receiveOrg
[
0
]);
model
.
setReceiveCompanyCode
(
receiveOrg
[
0
]);
model
.
setReceiveOrgName
(
receiveOrg
[
1
]);
// 字段转换
convertField
(
model
);
...
...
@@ -195,7 +197,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
dto
.
setBusinessKey
(
applyNoList
.
get
(
0
));
dto
.
setCompleteFirstTask
(
Boolean
.
TRUE
);
// 下一节点执行人单位(下节点接收机构code)
dto
.
setNextExecuteUserCompanyCode
(
model
.
getReceive
Org
Code
());
dto
.
setNextExecuteUserCompanyCode
(
model
.
getReceive
Company
Code
());
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
...
...
@@ -349,7 +351,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
dto
.
setProcessDefinitionKey
(
"scrapCancelNew"
);
dto
.
setBusinessKey
(
jgScrapCancelDto
.
getApplyNo
());
dto
.
setCompleteFirstTask
(
true
);
dto
.
setNextExecuteUserCompanyCode
(
jgScrapCancelDto
.
getReceive
Org
Code
());
dto
.
setNextExecuteUserCompanyCode
(
jgScrapCancelDto
.
getReceive
Company
Code
());
list
.
add
(
dto
);
actWorkflowBatchDTO
.
setProcess
(
list
);
processTasks
=
cmWorkflowService
.
startBatch
(
actWorkflowBatchDTO
);
...
...
@@ -503,7 +505,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
dto
.
setTaskId
(
jgScrapCancelDto
.
getNextTaskId
());
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
op
);
dto
.
setNextExecuteUserCompanyCode
(
model
.
getReceive
Org
Code
());
dto
.
setNextExecuteUserCompanyCode
(
model
.
getReceive
Company
Code
());
dto
.
setVariable
(
map
);
return
cmWorkflowService
.
completeOrReject
(
jgScrapCancelDto
.
getNextTaskId
(),
dto
,
op
);
}
...
...
@@ -515,7 +517,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
return
null
;
}
Map
<
String
,
Object
>
installationInfo
=
BeanUtil
.
beanToMap
(
notice
);
installationInfo
.
put
(
"receiveOrgCode"
,
notice
.
getReceive
Org
Code
()
+
"_"
+
notice
.
getReceiveOrgName
());
installationInfo
.
put
(
"receiveOrgCode"
,
notice
.
getReceive
Company
Code
()
+
"_"
+
notice
.
getReceiveOrgName
());
installationInfo
.
put
(
"cancelCertificateList"
,
JSON
.
parseArray
(
String
.
valueOf
(
installationInfo
.
get
(
"cancelCertificate"
))));
LambdaQueryWrapper
<
JgScrapCancelEq
>
lambdaEq
=
new
QueryWrapper
<
JgScrapCancelEq
>().
lambda
();
lambdaEq
.
eq
(
JgScrapCancelEq:
:
getEquipTransferId
,
sequenceNbr
);
...
...
@@ -706,7 +708,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
public
String
getNextUserOrgCode
(
String
operate
,
JgScrapCancel
jgScrapCancel
)
{
String
code
=
null
;
if
(
"0"
.
equals
(
operate
))
{
code
=
jgScrapCancel
.
getReceive
Org
Code
();
code
=
jgScrapCancel
.
getReceive
Company
Code
();
}
else
{
// 驳回
if
(
WorkFlowStatusEnum
.
CANCEL_RECEIVE
.
getPass
().
equals
(
jgScrapCancel
.
getAuditStatus
())
||
...
...
@@ -715,7 +717,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
code
=
jgScrapCancel
.
getUseUnitCode
();
}
}
return
code
==
null
?
jgScrapCancel
.
getReceive
Org
Code
()
:
code
;
return
code
==
null
?
jgScrapCancel
.
getReceive
Company
Code
()
:
code
;
}
}
\ 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/JgTransferNoticeServiceImpl.java
View file @
f53e10c7
...
...
@@ -386,7 +386,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
public
Page
<
JgTransferNoticeDto
>
queryForJgTransferNoticePage
(
Page
<
JgTransferNotice
>
page
,
JgTransferNoticeDto
model
,
String
type
,
ReginParams
reginParams
)
{
String
orgCode
;
orgCode
=
reginParams
.
getCompany
().
getCompanyCode
();
model
.
setReceiveOrgCode
(
orgCode
);
//
model.setReceiveOrgCode(orgCode);
model
.
setTransferToUserIds
(
reginParams
.
getUserModel
().
getUserId
());
Page
<
JgTransferNotice
>
noticePage
=
jgTransferNoticeMapper
.
queryForPage
(
page
,
model
,
type
,
orgCode
);
...
...
@@ -425,7 +425,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
return
new
ArrayList
<>();
}
// 启动工作流并返回信息
List
<
WorkflowResultDto
>
workflowResultList
=
workFlowInfo
(
submitType
,
deviceList
,
model
.
getReceive
Org
Code
());
List
<
WorkflowResultDto
>
workflowResultList
=
workFlowInfo
(
submitType
,
deviceList
,
model
.
getReceive
Company
Code
());
List
<
JgTransferNotice
>
list
=
new
ArrayList
<>();
List
<
JgTransferNoticeEq
>
equipList
=
new
ArrayList
<>();
//业务数据组装等
...
...
@@ -636,6 +636,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
String
[]
receiveOrgIdList
=
receiveOrgId
.
split
(
"_"
);
if
(
receiveOrgIdList
.
length
>
1
)
{
model
.
setReceiveOrgCode
(
receiveOrgIdList
[
0
]);
model
.
setReceiveCompanyCode
(
receiveOrgIdList
[
0
]);
model
.
setReceiveOrgName
(
receiveOrgIdList
[
1
]);
}
}
...
...
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 @
f53e10c7
...
...
@@ -445,7 +445,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgUseRegistration
.
setNextExecuteUserIds
(
""
);
if
(!
ObjectUtils
.
isEmpty
(
jgUseRegistration
.
getSupervisoryCode
()))
{
// 生成使用登记证编号
jgUseRegistration
.
setUseRegistrationCode
(
getCode
(
jgUseRegistration
.
getSupervisoryCode
()));
String
code
=
commonServiceImpl
.
generateRegistrationCode
(
jgUseRegistration
.
getSupervisoryCode
(),
jgUseRegistration
.
getReceiveCompanyCode
());
jgUseRegistration
.
setUseRegistrationCode
(
code
);
jgUseRegistration
.
setAuditPassDate
(
new
Date
());
}
// 更新设备信息
...
...
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/resources/templates/installation-notification-report.ftl
View file @
f53e10c7
...
...
@@ -578,7 +578,7 @@
<w:sz
w:val=
"24"
/>
<w:lang
w:val=
"en-US"
w:eastAsia=
"zh-CN"
/>
</w:rPr>
<w:t>
设备
注册
代码
</w:t>
<w:t>
设备代码
</w:t>
</w:r>
</w:p>
</w:tc>
...
...
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