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
3b442286
Commit
3b442286
authored
Dec 18, 2023
by
liufan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
060747df
af234dc4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
73 deletions
+41
-73
JgInstallationNoticeEqMapper.java
...ot/module/jg/api/mapper/JgInstallationNoticeEqMapper.java
+1
-1
JgInstallationByWorkFlowController.java
...jg/biz/controller/JgInstallationByWorkFlowController.java
+1
-2
JgInstallationNoticeServiceImpl.java
.../jg/biz/service/impl/JgInstallationNoticeServiceImpl.java
+39
-70
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/JgInstallationNoticeEqMapper.java
View file @
3b442286
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...
@@ -9,6 +9,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author system_generator
* @author system_generator
* @date 2023-12-18
* @date 2023-12-18
*/
*/
public
interface
JgInstallationNoticeEqMapper
extends
BaseMapper
<
JgInstallationNoticeEq
>
{
public
interface
JgInstallationNoticeEqMapper
extends
Custom
BaseMapper
<
JgInstallationNoticeEq
>
{
}
}
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/JgInstallationByWorkFlowController.java
View file @
3b442286
...
@@ -79,8 +79,7 @@ public class JgInstallationByWorkFlowController {
...
@@ -79,8 +79,7 @@ public class JgInstallationByWorkFlowController {
public
ResponseModel
<
JgInstallationNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
public
ResponseModel
<
JgInstallationNoticeDto
>
accept
(
@RequestBody
Map
<
String
,
Object
>
model
,
String
op
)
{
// TODO 受理安装告知流程
// TODO 受理安装告知流程
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
model1
=
(
LinkedHashMap
)
model
.
get
(
"model"
);
LinkedHashMap
form
=
(
LinkedHashMap
)
model1
.
get
(
"form"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
model1
.
get
(
"installationInfo"
);
LinkedHashMap
installationInfo
=
(
LinkedHashMap
)
form
.
get
(
"installationInfo"
);
JgInstallationNoticeDto
jgInstallationNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgInstallationNoticeDto
.
class
);
JgInstallationNoticeDto
jgInstallationNoticeDto
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
installationInfo
),
JgInstallationNoticeDto
.
class
);
jgInstallationNoticeServiceImpl
.
accept
(
jgInstallationNoticeDto
,
op
);
jgInstallationNoticeServiceImpl
.
accept
(
jgInstallationNoticeDto
,
op
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
...
...
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 @
3b442286
...
@@ -10,13 +10,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -10,13 +10,12 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.ByteArrayMultipartFile
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeDto
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice
;
import
com.yeejoin.amos.boot.module.jg.api.entity.Jg
RelationEquip
;
import
com.yeejoin.amos.boot.module.jg.api.entity.Jg
InstallationNoticeEq
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper
;
import
com.yeejoin.amos.boot.module.jg.api.mapper.JgRelationEquipMapper
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.JsonUtils
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.OtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.RegistrationInfo
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
import
com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils
;
...
@@ -28,6 +27,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
...
@@ -28,6 +27,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.Workflow
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.feign.workflow.model.AjaxResult
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsJgOtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.TzsJgOtherInfo
;
...
@@ -82,7 +82,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -82,7 +82,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
EquipmentCategoryMapper
equipmentCategoryMapper
;
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Autowired
@Autowired
Jg
RelationEquipMapper
jgRelationEquip
Mapper
;
Jg
InstallationNoticeEqMapper
jgInstallationNoticeEq
Mapper
;
@Autowired
@Autowired
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
private
JgInstallationNoticeMapper
jgInstallationNoticeMapper
;
...
@@ -209,16 +209,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -209,16 +209,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
log
.
error
(
"提交失败:{}"
,
e
);
log
.
error
(
"提交失败:{}"
,
e
);
}
}
// 生成告知单
JgInstallationNotice
jgInstallationNotice
=
this
.
getById
(
noticeDto
.
getSequenceNbr
());
if
(
String
.
valueOf
(
FlowStatusEnum
.
SUBMITTED
.
getCode
()).
equals
(
jgInstallationNotice
.
getNoticeStatus
()))
{
String
reportUrl
=
this
.
generateInstallationNoticeReport
(
jgInstallationNotice
.
getSequenceNbr
());
if
(
StringUtils
.
hasText
(
reportUrl
))
{
jgInstallationNotice
.
setNoticeReportUrl
(
reportUrl
);
jgInstallationNoticeMapper
.
updateById
(
jgInstallationNotice
);
}
}
return
noticeDto
;
return
noticeDto
;
}
}
...
@@ -413,66 +403,44 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -413,66 +403,44 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
List
<
String
>
instanceIdList
=
new
ArrayList
<>();
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
if
(
SUBMIT_TYPE_FLOW
.
equals
(
submitType
))
{
// 发起流程
// 发起流程
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
// ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
// String[] strIds = new String[deviceList.size()];
ActWorkflowBatchDTO
actWorkflowBatchDTO
=
new
ActWorkflowBatchDTO
();
// String[] strKeys = new String[deviceList.size()];
List
<
ActWorkflowStartDTO
>
list
=
new
ArrayList
<>();
//
for
(
int
i
=
0
;
i
<
deviceList
.
size
()
;
i
++
// for (int i = 0; i<deviceList.size() ; i++
)
{
// ) {
ActWorkflowStartDTO
dto
=
new
ActWorkflowStartDTO
();
// strIds[i] = PROCESS_DEFINITION_KEY;
// strKeys[i] = String.valueOf(i);
// }
// dto.setProcessDefinitionIds(String.join(",", strIds));
// dto.setProcessDefinitionKeys(String.join(",", strKeys));
// dto.setCompleteFirstTask(true);
//
// try {
// FeignClientResult result = Workflow.taskV2Client.startByVariable(dto);
// } catch (Exception e) {
// e.printStackTrace();
// }
for
(
int
i
=
0
;
i
<
deviceList
.
size
();
i
++)
{
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setProcessDefinitionKey
(
PROCESS_DEFINITION_KEY
);
dto
.
setBusinessKey
(
"1"
);
dto
.
setBusinessKey
(
String
.
valueOf
(
i
));
AjaxResult
ajaxResult
=
null
;
dto
.
setCompleteFirstTask
(
true
);
try
{
list
.
add
(
dto
);
ajaxResult
=
Workflow
.
taskClient
.
startByVariable
(
dto
);
}
String
instanceId
=
((
Map
)
ajaxResult
.
get
(
"data"
)).
get
(
"id"
).
toString
();
actWorkflowBatchDTO
.
setProcess
(
list
);
instanceIdList
.
add
(
instanceId
);
ajaxResult
=
Workflow
.
taskClient
.
getTask
(
instanceId
);
try
{
// 执行一步
FeignClientResult
result
=
Workflow
.
taskV2Client
.
startByVariableBatch
(
actWorkflowBatchDTO
);
JSONObject
dataObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
ajaxResult
.
get
(
"data"
)));
List
<
Object
>
returnList
=
(
List
<
Object
>)
result
.
getResult
();
String
taskId
=
dataObject
.
getString
(
"id"
);
for
(
Object
obj
:
returnList
//组装信息
)
{
TaskResultDTO
taskResultDTO
=
new
TaskResultDTO
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
taskResultDTO
.
setResultCode
(
"approvalStatus"
);
instanceIdList
.
add
(
jsonObject
.
getString
(
"id"
));
taskResultDTO
.
setTaskId
(
taskId
);
taskResultDTO
.
setComment
(
"提交流程"
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"approvalStatus"
,
"0"
);
taskResultDTO
.
setVariable
(
map
);
//执行流程
Workflow
.
taskClient
.
completeByTask
(
taskId
,
taskResultDTO
);
}
catch
(
Exception
e
)
{
log
.
error
(
"流程启动失败:{}"
,
e
);
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
}
List
<
JgInstallationNotice
>
list
=
new
ArrayList
<>();
List
<
JgInstallationNotice
>
list
=
new
ArrayList
<>();
List
<
Jg
RelationEquip
>
equipList
=
new
ArrayList
<>();
List
<
Jg
InstallationNoticeEq
>
equipList
=
new
ArrayList
<>();
deviceList
.
forEach
(
obj
->
{
deviceList
.
forEach
(
obj
->
{
Jg
RelationEquip
jgRelationEquip
=
new
JgRelationEquip
();
Jg
InstallationNoticeEq
jgRelationEquip
=
new
JgInstallationNoticeEq
();
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
(
i
);
String
applyNo
=
applyNoList
.
get
(
i
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setApplyNo
(
applyNo
);
dto
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
dto
.
setEquList
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquipId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setEquId
(
String
.
valueOf
(
obj
.
get
(
"SEQUENCE_NBR"
)));
jgRelationEquip
.
setApplyNo
(
applyNo
);
jgRelationEquip
.
setBusinessType
(
ApplicationFormTypeEnum
.
AZGZ
.
getCode
());
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
instanceIdList
))
{
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setInstanceId
(
instanceIdList
.
get
(
i
));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_PROCESSED
.
getCode
()));
...
@@ -485,13 +453,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -485,13 +453,13 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
jgInstallationNoticeMapper
.
insertBatchSomeColumn
(
list
);
jgInstallationNoticeMapper
.
insertBatchSomeColumn
(
list
);
List
<
Jg
RelationEquip
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
Jg
InstallationNoticeEq
>
jgRelationEquipList
=
equipList
.
stream
().
map
(
jgRelationEquip
->
{
List
<
JgInstallationNotice
>
collect
=
list
.
stream
().
filter
(
jgInstallationNotice
->
jgRelationEquip
.
get
ApplyNo
().
equals
(
jgInstallationNotice
.
getApplyNo
())).
collect
(
Collectors
.
toList
());
List
<
JgInstallationNotice
>
collect
=
list
.
stream
().
filter
(
jgInstallationNotice
->
jgRelationEquip
.
get
EquipTransferId
().
equals
(
jgInstallationNotice
.
getSequenceNbr
())).
collect
(
Collectors
.
toList
());
Long
sequenceNbr
=
collect
.
get
(
0
).
getSequenceNbr
();
Long
sequenceNbr
=
collect
.
get
(
0
).
getSequenceNbr
();
return
jgRelationEquip
.
set
Business
Id
(
String
.
valueOf
(
sequenceNbr
));
return
jgRelationEquip
.
set
EquipTransfer
Id
(
String
.
valueOf
(
sequenceNbr
));
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
jg
RelationEquip
Mapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
jg
InstallationNoticeEq
Mapper
.
insertBatchSomeColumn
(
jgRelationEquipList
);
}
}
...
@@ -615,16 +583,16 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -615,16 +583,16 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
log
.
error
(
"日期转换失败:{}"
,
e
);
log
.
error
(
"日期转换失败:{}"
,
e
);
}
}
LambdaQueryWrapper
<
Jg
RelationEquip
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
Jg
InstallationNoticeEq
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
Jg
RelationEquip:
:
getBusiness
Id
,
dto
.
getSequenceNbr
());
queryWrapper
.
eq
(
Jg
InstallationNoticeEq:
:
getEquipTransfer
Id
,
dto
.
getSequenceNbr
());
Jg
RelationEquip
jgRelationEquip
=
jgRelationEquip
Mapper
.
selectOne
(
queryWrapper
);
Jg
InstallationNoticeEq
jgRelationEquip
=
jgInstallationNoticeEq
Mapper
.
selectOne
(
queryWrapper
);
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
OtherInfo
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEqu
ip
Id
());
queryWrapper1
.
eq
(
OtherInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
OtherInfo
tzsJgOtherInfo
=
tzsJgOtherInfoMapper
.
selectOne
(
queryWrapper1
);
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
RegistrationInfo
>
queryWrapper2
=
new
LambdaQueryWrapper
<>();
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEqu
ip
Id
());
queryWrapper2
.
eq
(
RegistrationInfo:
:
getRecord
,
jgRelationEquip
.
getEquId
());
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
RegistrationInfo
tzsJgRegistrationInfo
=
tzsJgRegistrationInfoMapper
.
selectOne
(
queryWrapper2
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
dto
.
getCity
()).
append
(
ym
);
stringBuffer
.
append
(
tzsJgRegistrationInfo
.
getEquCategory
()).
append
(
dto
.
getCity
()).
append
(
ym
);
...
@@ -644,6 +612,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
...
@@ -644,6 +612,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
if
(
submit
)
{
if
(
submit
)
{
if
(
"0"
.
equals
(
op
))
{
if
(
"0"
.
equals
(
op
))
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
HAVE_PROCESSED
.
getCode
()));
this
.
generateInstallationNoticeReport
(
dto
.
getSequenceNbr
());
}
else
{
}
else
{
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
dto
.
setNoticeStatus
(
String
.
valueOf
(
FlowStatusEnum
.
TO_BE_SUBMITTED
.
getCode
()));
dto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
dto
.
setStatus
(
String
.
valueOf
(
FlowStatusEnum
.
REJECTED
.
getCode
()));
...
...
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