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
71b534bc
Commit
71b534bc
authored
Sep 17, 2021
by
chenhao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'chenhao' into developer
parents
bdc92b74
20555c9b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
79 additions
and
50 deletions
+79
-50
FailureAuditController.java
.../module/common/biz/controller/FailureAuditController.java
+3
-6
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+5
-12
FailureMaintainController.java
...dule/common/biz/controller/FailureMaintainController.java
+2
-6
FailureAuditServiceImpl.java
...dule/common/biz/service/impl/FailureAuditServiceImpl.java
+3
-4
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+63
-6
FailureMaintainServiceImpl.java
...e/common/biz/service/impl/FailureMaintainServiceImpl.java
+2
-2
FailureVerifyServiceImpl.java
...ule/common/biz/service/impl/FailureVerifyServiceImpl.java
+1
-14
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/controller/FailureAuditController.java
View file @
71b534bc
...
...
@@ -40,13 +40,10 @@ public class FailureAuditController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureAuditDto
model
)
{
try
{
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureAuditDto
model
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FailureDetailsController.java
View file @
71b534bc
...
...
@@ -67,13 +67,10 @@ public class FailureDetailsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureDetailsDto
model
)
{
try
{
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureDetailsDto
model
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
...
...
@@ -108,12 +105,8 @@ public class FailureDetailsController extends BaseController {
Integer
userId
,
String
startTime
,
String
endTime
)
{
Page
<
FailureDetails
>
page
=
new
Page
<
FailureDetails
>();
if
(
current
>
0
)
{
page
.
setCurrent
((
current
-
1
)
*
size
);
}
else
{
page
.
setCurrent
(
current
);
}
page
.
setCurrent
(
current
*
size
);
page
.
setSize
(
size
);
ReginParams
userInfo
=
getSelectedOrgInfo
();
IPage
<
FailureDetailsDto
>
failureDetailDTOsIPage
=
new
Page
<>();
...
...
@@ -248,7 +241,7 @@ public class FailureDetailsController extends BaseController {
@RequestParam
(
required
=
false
)
Long
submissionBranchId
,
@RequestParam
(
required
=
false
)
Long
sequenceNbr
)
{
Page
<
FailureDetailsDto
>
page
=
new
Page
<>();
if
(
current
.
longValue
()
>
0
)
{
if
(
current
>
0
)
{
page
.
setCurrent
((
current
-
1
)
*
size
);
}
else
{
page
.
setCurrent
(
current
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/FailureMaintainController.java
View file @
71b534bc
...
...
@@ -48,14 +48,10 @@ public class FailureMaintainController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureMaintainDto
model
)
{
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureMaintainDto
model
)
throws
Exception
{
try
{
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureAuditServiceImpl.java
View file @
71b534bc
...
...
@@ -58,7 +58,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
int
condition
=
Integer
.
parseInt
(
model
.
getCondition
());
model
.
setAuditTime
(
new
Date
());
model
.
setAuditDepartmentId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
model
.
setAuditor
(
userInfo
.
getUserModel
().
get
User
Name
());
model
.
setAuditor
(
userInfo
.
getUserModel
().
get
Real
Name
());
model
.
setAuditDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
...
...
@@ -88,11 +88,10 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
FailureAuditDto
failureAuditDto
=
this
.
createWithModel
(
model
);
if
(
ObjectUtils
.
isEmpty
(
failureAuditDto
)){
return
false
;
throw
new
Exception
(
"审核失败"
)
;
}
return
true
;
}
}
/**
* 修改故障保修单任务状态
...
...
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 @
71b534bc
...
...
@@ -9,6 +9,8 @@ import java.util.Map;
import
java.util.Random
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.*
;
import
com.yeejoin.amos.boot.module.common.api.enums.AuditResultEnum
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -24,9 +26,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
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.entity.FailureDetails
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureRepairlog
;
import
com.yeejoin.amos.boot.module.common.api.entity.SourceFile
;
import
com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureDetailsMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureAuditService
;
...
...
@@ -68,12 +67,19 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
FailureMaintainServiceImpl
failureMaintainService
;
@Autowired
FailureAuditServiceImpl
ifailureAuditService
;
public
static
String
EMERGENCY_COMMAND
=
"应急指挥科"
;
public
static
String
[]
PROCESS_NAME
=
{
"提交报修单"
,
"审核"
,
"维修"
,
"验收"
,
"维修中"
};
public
static
Integer
SELECY_ALL
=
6
;
public
static
Integer
SELECY_STATUS
=
7
;
public
static
Integer
SELECY_ISUBMIT
=
8
;
public
String
[]
roleName
=
{
"maintenance_department_maintenance_personnel"
,
"emergency_command_staff"
};
public
static
Integer
SELECY_ACCEPT
=
9
;
public
String
[]
roleName
=
{
"maintenance_department_maintenance_personnel"
,
"emergency_command_staff"
,
"emergency_command_leader"
,
"maintenance_department"
};
/**
* 分页查询接口
...
...
@@ -100,6 +106,59 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
iPage
.
setRecords
(
list
);
return
iPage
;
}
//当传递类型参数为我接收时
if
(
type
.
equals
(
SELECY_ACCEPT
))
{
//当角色为维修人员时
if
(
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
0
]))
{
LambdaQueryWrapper
<
FailureMaintain
>
Wrapper
=
new
LambdaQueryWrapper
<>();
Wrapper
.
eq
(
FailureMaintain:
:
getRecUserId
,
userInfo
.
getUserModel
().
getUserId
());
Wrapper
.
orderByDesc
(
FailureMaintain:
:
getMaintainTime
);
List
<
FailureMaintain
>
failureMaintains
=
failureMaintainService
.
getBaseMapper
().
selectList
(
Wrapper
);
List
<
FailureDetails
>
failureDetails
=
new
ArrayList
<
FailureDetails
>();
failureMaintains
.
forEach
(
e
->{
FailureDetails
result
=
getById
(
e
.
getFaultId
());
failureDetails
.
add
(
result
);
});
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
failureDetails
);
return
iPage
;
}
else
if
(
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
2
])
&&
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
3
]))
{
LambdaQueryWrapper
<
FailureAudit
>
Wrapper
=
new
LambdaQueryWrapper
<>();
Wrapper
.
eq
(
FailureAudit:
:
getRecUserId
,
userInfo
.
getUserModel
().
getUserId
());
Wrapper
.
orderByDesc
(
FailureAudit:
:
getAuditTime
);
List
<
FailureAudit
>
failureAudit
=
ifailureAuditService
.
getBaseMapper
().
selectList
(
Wrapper
);
List
<
FailureDetails
>
failureDetails
=
new
ArrayList
<
FailureDetails
>();
failureAudit
.
forEach
(
e
->{
FailureDetails
result
=
getById
(
e
.
getFaultId
());
failureDetails
.
add
(
result
);
});
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
failureDetails
);
return
iPage
;
}
else
{
LambdaQueryWrapper
<
FailureAudit
>
Wrapper
=
new
LambdaQueryWrapper
<>();
Long
parentId
=
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
()));
Wrapper
.
eq
(
FailureAudit:
:
getAuditDepartmentId
,
parentId
);
Wrapper
.
eq
(
FailureAudit:
:
getAuditResult
,
AuditResultEnum
.
REFUSE
.
getCode
());
Wrapper
.
orderByDesc
(
FailureAudit:
:
getAuditTime
);
List
<
FailureAudit
>
failureAudit
=
ifailureAuditService
.
getBaseMapper
().
selectList
(
Wrapper
);
List
<
FailureDetails
>
failureDetails
=
new
ArrayList
<
FailureDetails
>();
failureAudit
.
forEach
(
e
->{
FailureDetails
result
=
getById
(
e
.
getFaultId
());
if
(
result
.
getSubmissionPid
().
equals
(
userInfo
.
getUserModel
().
getUserId
())){
failureDetails
.
add
(
result
);
}
});
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
failureDetails
);
return
iPage
;
}
}
//否则就查询待处理
return
this
.
queryForWaitManage
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
userId
);
}
...
...
@@ -233,7 +292,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
// 发起主表流程 并添加至报修日志
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setFailureCode
(
buildOrderNo
());
failureDetailsDto
.
setSubmissionName
(
userInfo
.
getUserModel
().
getRealName
());
failureDetailsDto
.
setBizCode
(
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
())));
model
=
this
.
createWithModel
(
failureDetailsDto
);
...
...
@@ -267,7 +325,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public
Object
updatetoModel
(
FailureDetailsDto
failureDetailsDto
,
ReginParams
userInfo
)
throws
Exception
{
// 发起主表流程 并添加至报修日志
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
FailureDetailsDto
model
=
this
.
updateWithModel
(
failureDetailsDto
);
...
...
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 @
71b534bc
...
...
@@ -84,9 +84,9 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
if
(
conditionStatus
==
MAINTENANCE_ADD
)
{
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
if
(!
result
)
{
return
false
;
throw
new
RuntimeException
(
"无维修权限"
)
;
}
failureMaintainDto
.
setMaintainMan
(
userInfo
.
getUserModel
().
get
User
Name
());
failureMaintainDto
.
setMaintainMan
(
userInfo
.
getUserModel
().
get
Real
Name
());
failureMaintainDto
.
setMaintainTime
(
new
Date
());
failureMaintainDto
.
setDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
failureMaintainDto
.
setBizId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureVerifyServiceImpl.java
View file @
71b534bc
...
...
@@ -34,19 +34,6 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
@Autowired
FailureRepairlogServiceImpl
failureRepairlogService
;
/**
* 分页查询
*/
public
Page
<
FailureVerifyDto
>
queryForFailureVerifyPage
(
Page
<
FailureVerifyDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
FailureVerifyDto
>
queryForFailureVerifyList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Transactional
public
Object
savemodel
(
FailureVerifyDto
model
,
ReginParams
userInfo
)
throws
Exception
{
...
...
@@ -54,7 +41,7 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
int
condition
=
Integer
.
parseInt
(
model
.
getCondition
());
model
.
setVerifyTime
(
new
Date
());
model
.
setVerifyDepartmentId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
model
.
setAcceptor
(
userInfo
.
getUserModel
().
get
User
Name
());
model
.
setAcceptor
(
userInfo
.
getUserModel
().
get
Real
Name
());
model
.
setVerifyDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
...
...
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