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
a1911118
Commit
a1911118
authored
Aug 18, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改往前端顯示的參數類型值
parent
48569807
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
26 deletions
+40
-26
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+31
-24
FailureMaintainServiceImpl.java
...e/common/biz/service/impl/FailureMaintainServiceImpl.java
+9
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
a1911118
...
@@ -136,7 +136,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -136,7 +136,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
return
baseMapper
.
selectPage
(
failureDetailsPage
,
wrapper
);
return
baseMapper
.
selectPage
(
failureDetailsPage
,
wrapper
);
}
}
/**
/**
* 列表查询 示例
* 列表查询 示例
*/
*/
...
@@ -182,7 +181,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -182,7 +181,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
}
}
/**
/**
* 查询任务状态数量
* 查询任务状态数量
*/
*/
...
@@ -203,7 +201,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -203,7 +201,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
int
inMaintenance
=
0
;
int
inMaintenance
=
0
;
List
<
FailureStatusCountDto
>
list
=
new
ArrayList
<>();
List
<
FailureStatusCountDto
>
list
=
new
ArrayList
<>();
//
String[] statusName = new String[]{"待审核", "待提交", "待维修", "待验收", "已拒绝", "已完结"};
//
String[] statusName = new String[]{"待审核", "待提交", "待维修", "待验收", "已拒绝", "已完结"};
List
<
String
>
statusName
=
new
ArrayList
<>();
List
<
String
>
statusName
=
new
ArrayList
<>();
Collections
.
addAll
(
statusName
,
FailureStatuEnum
.
WAITING_AUDIT
.
getName
(),
Collections
.
addAll
(
statusName
,
FailureStatuEnum
.
WAITING_AUDIT
.
getName
(),
FailureStatuEnum
.
WAITING_SUBMIT
.
getName
(),
FailureStatuEnum
.
WAITING_MAINTAIN
.
getName
(),
FailureStatuEnum
.
WAITING_SUBMIT
.
getName
(),
FailureStatuEnum
.
WAITING_MAINTAIN
.
getName
(),
...
@@ -291,8 +289,9 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -291,8 +289,9 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
Long
departmentId
=
userInfo
.
getDepartment
().
getSequenceNbr
();
Long
departmentId
=
userInfo
.
getDepartment
().
getSequenceNbr
();
Date
processTime
=
model
.
getSubmissionTime
();
Date
processTime
=
model
.
getSubmissionTime
();
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorCid
);
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
}
catch
(
Exception
e
){
processResult
,
processAuditorCid
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
logger
.
info
(
"添加流程日志到数据库失败"
);
logger
.
info
(
"添加流程日志到数据库失败"
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
...
@@ -310,7 +309,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -310,7 +309,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
excuteTask
(
instance
.
getString
(
"id"
),
userInfo
,
null
);
excuteTask
(
instance
.
getString
(
"id"
),
userInfo
,
null
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
false
;
return
false
;
}
}
...
@@ -321,8 +319,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -321,8 +319,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
* 添加报修日志
* 添加报修日志
*/
*/
@Transactional
@Transactional
public
Boolean
repairlog
(
Long
faultId
,
String
processAuditor
,
Integer
processAuditorId
,
Long
departmentId
,
Date
processTime
,
public
Boolean
repairlog
(
Long
faultId
,
String
processAuditor
,
Integer
processAuditorId
,
Long
departmentId
,
String
processDepartment
,
String
processResult
,
String
processAuditorCid
)
{
Date
processTime
,
String
processDepartment
,
String
processResult
,
String
processAuditorCid
)
{
FailureRepairlogDto
failureRepairlogDto
=
new
FailureRepairlogDto
();
FailureRepairlogDto
failureRepairlogDto
=
new
FailureRepairlogDto
();
failureRepairlogDto
.
setFaultId
(
faultId
);
failureRepairlogDto
.
setFaultId
(
faultId
);
failureRepairlogDto
.
setProcessAuditor
(
processAuditor
);
failureRepairlogDto
.
setProcessAuditor
(
processAuditor
);
...
@@ -333,7 +331,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -333,7 +331,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessAuditorCid
(
processAuditorCid
);
failureRepairlogDto
.
setProcessAuditorCid
(
processAuditorCid
);
FailureRepairlogDto
repairlogModel
=
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
FailureRepairlogDto
repairlogModel
=
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
if
(
ObjectUtils
.
isNotEmpty
(
repairlogModel
)){
if
(
ObjectUtils
.
isNotEmpty
(
repairlogModel
))
{
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -351,11 +349,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -351,11 +349,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
}
else
{
}
else
{
workflowFeignService
.
pickupAndCompleteTask
(
map
.
get
(
"taskId"
).
toString
(),
conditionMap
);
workflowFeignService
.
pickupAndCompleteTask
(
map
.
get
(
"taskId"
).
toString
(),
conditionMap
);
}
}
// 判断下一个节点是不是维修中,如果是则添加当前任务的执行人
String
nextTaskId
=
checkIsInMaintenance
(
sequenceNbr
);
if
(
nextTaskId
!=
null
)
{
workflowFeignService
.
pickuptask
(
nextTaskId
);
}
}
}
return
true
;
return
true
;
}
}
...
@@ -427,8 +420,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -427,8 +420,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
JSONObject
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
JSONObject
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
String
name
=
detail
.
getString
(
"name"
);
String
name
=
detail
.
getString
(
"name"
);
if
(
name
.
startsWith
(
PROCESS_NAME
[
4
]))
{
if
(
name
.
startsWith
(
PROCESS_NAME
[
4
]))
{
String
id
=
detail
.
getString
(
"id"
);
String
id
=
detail
.
getString
(
"id"
);
return
id
;
return
id
;
}
}
}
}
}
}
...
@@ -616,7 +609,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -616,7 +609,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
}
}
public
Object
getCurrentTask
(
Long
sequenceNbr
)
{
public
Object
getCurrentTask
(
Long
sequenceNbr
)
{
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<
Map
<
String
,
String
>>();
List
<
Map
<
String
,
String
>>
list
=
new
ArrayList
<
Map
<
String
,
String
>>();
JSONArray
taskDetailArray
=
null
;
JSONArray
taskDetailArray
=
null
;
FailureDetails
details
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
FailureDetails
details
=
this
.
baseMapper
.
selectById
(
sequenceNbr
);
String
procressId
=
details
.
getProcessId
();
String
procressId
=
details
.
getProcessId
();
...
@@ -625,17 +618,31 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -625,17 +618,31 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
taskDetailArray
=
teskObject
.
getJSONArray
(
"data"
);
taskDetailArray
=
teskObject
.
getJSONArray
(
"data"
);
for
(
Object
obj
:
taskDetailArray
)
{
for
(
Object
obj
:
taskDetailArray
)
{
JSONObject
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
JSONObject
detail
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
obj
));
String
name
=
detail
.
getString
(
"name"
);
String
name
=
detail
.
getString
(
"name"
);
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"name"
,
name
);
map
.
put
(
"name"
,
name
);
if
(
name
.
startsWith
(
PROCESS_NAME
[
4
]))
{
if
(
name
.
startsWith
(
PROCESS_NAME
[
4
]))
{
String
id
=
detail
.
getString
(
"id"
);
String
id
=
detail
.
getString
(
"id"
);
JSONObject
assignObject
=
workflowFeignService
.
getTaskAssign
(
id
);
JSONObject
assignObject
=
workflowFeignService
.
getTaskAssign
(
id
);
JSONObject
resultObject
=
assignObject
.
getJSONObject
(
"data"
);
JSONObject
resultObject
=
assignObject
.
getJSONObject
(
"data"
);
if
(
resultObject
!=
null
)
{
if
(
resultObject
!=
null
)
{
map
.
put
(
"name"
,
"维修部门维修人员 维修"
);
map
.
put
(
"name"
,
"维修部门维修人员 维修"
);
map
.
put
(
"assignee"
,
resultObject
.
getString
(
"assignee"
));
if
(
detail
.
containsKey
(
"informerList"
))
{
}
JSONArray
informerList
=
detail
.
getJSONArray
(
"informerList"
);
if
(
informerList
!=
null
&&
informerList
.
size
()
>
0
)
{
for
(
Object
informerDetail
:
informerList
)
{
JSONObject
informerDetailJson
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
informerDetail
));
if
(
informerDetailJson
.
getString
(
"userName"
)
.
equals
(
resultObject
.
getString
(
"assignee"
)))
{
map
.
put
(
"assignee"
,
informerDetailJson
.
getString
(
"realName"
));
break
;
}
}
}
}
}
}
}
list
.
add
(
map
);
list
.
add
(
map
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureMaintainServiceImpl.java
View file @
a1911118
...
@@ -27,7 +27,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
...
@@ -27,7 +27,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.workflow.feign.WorkflowFeignService
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureMaintainDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureMaintainDto
;
...
@@ -75,6 +75,8 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
...
@@ -75,6 +75,8 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
FailureRepairlogServiceImpl
failureRepairlogService
;
FailureRepairlogServiceImpl
failureRepairlogService
;
@Autowired
WorkflowFeignService
workflowFeignService
;
private
static
String
RECORE_TYPE
=
"维修记录"
;
private
static
String
RECORE_TYPE
=
"维修记录"
;
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FailureMaintainServiceImpl
.
class
);
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FailureMaintainServiceImpl
.
class
);
...
@@ -174,13 +176,18 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
...
@@ -174,13 +176,18 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
failureMaintainDto
.
getAttachment
());
failureMaintainDto
.
getAttachment
());
}
}
if
(
failureDetailsService
.
checkIsInMaintenance
(
failureDetailsDto
.
getSequenceNbr
())
==
null
)
{
String
nextTaskId
=
failureDetailsService
.
checkIsInMaintenance
(
failureDetailsDto
.
getSequenceNbr
());
if
(
nextTaskId
==
null
)
{
try
{
try
{
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
);
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
false
;
return
false
;
}
}
}
else
{
// 判断下一个节点是不是维修中,如果是则添加当前任务的执行人
workflowFeignService
.
pickuptask
(
nextTaskId
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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