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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
132 additions
and
103 deletions
+132
-103
FailureAuditController.java
.../module/common/biz/controller/FailureAuditController.java
+22
-25
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+12
-19
FailureMaintainController.java
...dule/common/biz/controller/FailureMaintainController.java
+15
-19
FailureAuditServiceImpl.java
...dule/common/biz/service/impl/FailureAuditServiceImpl.java
+4
-5
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+68
-11
FailureMaintainServiceImpl.java
...e/common/biz/service/impl/FailureMaintainServiceImpl.java
+6
-6
FailureVerifyServiceImpl.java
...ule/common/biz/service/impl/FailureVerifyServiceImpl.java
+5
-18
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
...
@@ -19,7 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -19,7 +19,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.util.List
;
import
java.util.List
;
/**
/**
*
*
*
*
* @author system_generator
* @author system_generator
* @date 2021-08-04
* @date 2021-08-04
...
@@ -29,37 +29,34 @@ import java.util.List;
...
@@ -29,37 +29,34 @@ import java.util.List;
@RequestMapping
(
value
=
"/common/failure-audit"
)
@RequestMapping
(
value
=
"/common/failure-audit"
)
public
class
FailureAuditController
extends
BaseController
{
public
class
FailureAuditController
extends
BaseController
{
@Autowired
@Autowired
FailureAuditServiceImpl
failureAuditServiceImpl
;
FailureAuditServiceImpl
failureAuditServiceImpl
;
/**
/**
* 新增
* 新增
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureAuditDto
model
)
{
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureAuditDto
model
)
throws
Exception
{
try
{
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
}
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
FailureAuditDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
FailureAuditDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
}
...
@@ -74,7 +71,7 @@ public class FailureAuditController extends BaseController {
...
@@ -74,7 +71,7 @@ public class FailureAuditController extends BaseController {
public
ResponseModel
<
List
<
FailureAudit
>>
findByFaultIDFotList
(
@PathVariable
long
faultId
)
{
public
ResponseModel
<
List
<
FailureAudit
>>
findByFaultIDFotList
(
@PathVariable
long
faultId
)
{
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
findByfaultId
(
faultId
));
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
findByfaultId
(
faultId
));
}
}
}
}
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 {
...
@@ -67,13 +67,10 @@ public class FailureDetailsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureDetailsDto
model
)
{
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureDetailsDto
model
)
throws
Exception
{
try
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
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 {
...
@@ -108,12 +105,8 @@ public class FailureDetailsController extends BaseController {
Integer
userId
,
Integer
userId
,
String
startTime
,
String
endTime
)
{
String
startTime
,
String
endTime
)
{
Page
<
FailureDetails
>
page
=
new
Page
<
FailureDetails
>();
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
);
page
.
setSize
(
size
);
ReginParams
userInfo
=
getSelectedOrgInfo
();
ReginParams
userInfo
=
getSelectedOrgInfo
();
IPage
<
FailureDetailsDto
>
failureDetailDTOsIPage
=
new
Page
<>();
IPage
<
FailureDetailsDto
>
failureDetailDTOsIPage
=
new
Page
<>();
...
@@ -209,9 +202,9 @@ public class FailureDetailsController extends BaseController {
...
@@ -209,9 +202,9 @@ public class FailureDetailsController extends BaseController {
Response
feignResponse
=
workflowFeignService
.
thighLineImg
(
processId
);
Response
feignResponse
=
workflowFeignService
.
thighLineImg
(
processId
);
try
{
try
{
Response
.
Body
body
=
feignResponse
.
body
();
Response
.
Body
body
=
feignResponse
.
body
();
// response.setContentType("application/octet-stream");//
// response.setContentType("application/octet-stream");//
// response.setHeader("content-type", "application/octet-stream");
// response.setHeader("content-type", "application/octet-stream");
// response.setContentType("text/xml");//
// response.setContentType("text/xml");//
// response.setHeader("content-type", "text/xml");
// response.setHeader("content-type", "text/xml");
// response.setCharacterEncoding("utf-8");
// response.setCharacterEncoding("utf-8");
// response.setHeader("Content-Disposition", "attachment;fileName=workflow.svg");
// response.setHeader("Content-Disposition", "attachment;fileName=workflow.svg");
...
@@ -222,12 +215,12 @@ public class FailureDetailsController extends BaseController {
...
@@ -222,12 +215,12 @@ public class FailureDetailsController extends BaseController {
// out.write(b, 0, len);
// out.write(b, 0, len);
// }
// }
// out.flush();
// out.flush();
return
new
ResponseEntity
<
String
>(
IOUtils
.
toString
(
body
.
asInputStream
()),
HttpStatus
.
OK
);
return
new
ResponseEntity
<
String
>(
IOUtils
.
toString
(
body
.
asInputStream
()),
HttpStatus
.
OK
);
//.toByteArray(body.asInputStream()), responseHeaders, HttpStatus.OK);
//.toByteArray(body.asInputStream()), responseHeaders, HttpStatus.OK);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"Error exporting diagram"
,
"500"
,
processId
);
throw
new
BaseException
(
"Error exporting diagram"
,
"500"
,
processId
);
}
}
}
}
/**
/**
...
@@ -248,7 +241,7 @@ public class FailureDetailsController extends BaseController {
...
@@ -248,7 +241,7 @@ public class FailureDetailsController extends BaseController {
@RequestParam
(
required
=
false
)
Long
submissionBranchId
,
@RequestParam
(
required
=
false
)
Long
submissionBranchId
,
@RequestParam
(
required
=
false
)
Long
sequenceNbr
)
{
@RequestParam
(
required
=
false
)
Long
sequenceNbr
)
{
Page
<
FailureDetailsDto
>
page
=
new
Page
<>();
Page
<
FailureDetailsDto
>
page
=
new
Page
<>();
if
(
current
.
longValue
()
>
0
)
{
if
(
current
>
0
)
{
page
.
setCurrent
((
current
-
1
)
*
size
);
page
.
setCurrent
((
current
-
1
)
*
size
);
}
else
{
}
else
{
page
.
setCurrent
(
current
);
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
...
@@ -27,7 +27,7 @@ import io.swagger.annotations.Api;
...
@@ -27,7 +27,7 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
/**
/**
*
*
*
*
* @author system_generator
* @author system_generator
* @date 2021-08-04
* @date 2021-08-04
...
@@ -37,25 +37,21 @@ import io.swagger.annotations.ApiOperation;
...
@@ -37,25 +37,21 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping
(
value
=
"/common/failure-maintain"
)
@RequestMapping
(
value
=
"/common/failure-maintain"
)
public
class
FailureMaintainController
extends
BaseController
{
public
class
FailureMaintainController
extends
BaseController
{
@Autowired
@Autowired
FailureMaintainServiceImpl
failureMaintainServiceImpl
;
FailureMaintainServiceImpl
failureMaintainServiceImpl
;
/**
/**
* 新增
* 新增
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
@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
()));
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
}
/**
/**
...
@@ -75,13 +71,13 @@ public class FailureMaintainController extends BaseController {
...
@@ -75,13 +71,13 @@ public class FailureMaintainController extends BaseController {
/**
/**
* 查询历史流程审核信息记录
* 查询历史流程审核信息记录
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备故障报修单详情-报修日志"
,
notes
=
"设备故障报修单详情-报修日志"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备故障报修单详情-报修日志"
,
notes
=
"设备故障报修单详情-报修日志"
)
@GetMapping
(
value
=
"/getProcessHistory/{sequenceNbr}"
)
@GetMapping
(
value
=
"/getProcessHistory/{sequenceNbr}"
)
public
ResponseModel
<
List
<
Object
>>
getProcessHistory
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
List
<
Object
>>
getProcessHistory
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
getProcessHistoryList
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
getProcessHistoryList
(
sequenceNbr
));
}
}
}
}
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
...
@@ -58,7 +58,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
int
condition
=
Integer
.
parseInt
(
model
.
getCondition
());
int
condition
=
Integer
.
parseInt
(
model
.
getCondition
());
model
.
setAuditTime
(
new
Date
());
model
.
setAuditTime
(
new
Date
());
model
.
setAuditDepartmentId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
model
.
setAuditDepartmentId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
model
.
setAuditor
(
userInfo
.
getUserModel
().
get
User
Name
());
model
.
setAuditor
(
userInfo
.
getUserModel
().
get
Real
Name
());
model
.
setAuditDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
model
.
setAuditDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
...
@@ -88,11 +88,10 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -88,11 +88,10 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
FailureAuditDto
failureAuditDto
=
this
.
createWithModel
(
model
);
FailureAuditDto
failureAuditDto
=
this
.
createWithModel
(
model
);
if
(
ObjectUtils
.
isEmpty
(
failureAuditDto
)){
if
(
ObjectUtils
.
isEmpty
(
failureAuditDto
)){
return
false
;
throw
new
Exception
(
"审核失败"
)
;
}
}
return
true
;
return
true
;
}
}
/**
/**
* 修改故障保修单任务状态
* 修改故障保修单任务状态
...
@@ -105,7 +104,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -105,7 +104,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
//当前角色部门id为维修部门的时候 修改状态
//当前角色部门id为维修部门的时候 修改状态
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
failureDetailsDto
.
setSequenceNbr
(
model
.
getFaultId
());
failureDetailsDto
.
setSequenceNbr
(
model
.
getFaultId
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
String
conditionText
;
String
conditionText
;
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureDetailsDto
.
getSequenceNbr
(),
userInfo
);
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureDetailsDto
.
getSequenceNbr
(),
userInfo
);
...
...
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;
...
@@ -9,6 +9,8 @@ import java.util.Map;
import
java.util.Random
;
import
java.util.Random
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
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.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -24,9 +26,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
...
@@ -24,9 +26,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
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.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.enums.FailureStatuEnum
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureDetailsMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureDetailsMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureAuditService
;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureAuditService
;
...
@@ -68,12 +67,19 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -68,12 +67,19 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
@Autowired
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
FailureMaintainServiceImpl
failureMaintainService
;
@Autowired
FailureAuditServiceImpl
ifailureAuditService
;
public
static
String
EMERGENCY_COMMAND
=
"应急指挥科"
;
public
static
String
EMERGENCY_COMMAND
=
"应急指挥科"
;
public
static
String
[]
PROCESS_NAME
=
{
"提交报修单"
,
"审核"
,
"维修"
,
"验收"
,
"维修中"
};
public
static
String
[]
PROCESS_NAME
=
{
"提交报修单"
,
"审核"
,
"维修"
,
"验收"
,
"维修中"
};
public
static
Integer
SELECY_ALL
=
6
;
public
static
Integer
SELECY_ALL
=
6
;
public
static
Integer
SELECY_STATUS
=
7
;
public
static
Integer
SELECY_STATUS
=
7
;
public
static
Integer
SELECY_ISUBMIT
=
8
;
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"
};
/**
/**
* 分页查询接口
* 分页查询接口
...
@@ -89,9 +95,9 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -89,9 +95,9 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
if
(
type
.
equals
(
SELECY_ALL
))
{
if
(
type
.
equals
(
SELECY_ALL
))
{
List
<
FailureDetails
>
list
=
this
.
baseMapper
.
selectAllPage
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
List
<
FailureDetails
>
list
=
this
.
baseMapper
.
selectAllPage
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
iPage
.
setRecords
(
list
);
return
iPage
;
return
iPage
;
}
}
//当传递类型参数为我提交时
//当传递类型参数为我提交时
if
(
type
.
equals
(
SELECY_ISUBMIT
))
{
if
(
type
.
equals
(
SELECY_ISUBMIT
))
{
...
@@ -100,6 +106,59 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -100,6 +106,59 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
iPage
.
setRecords
(
list
);
iPage
.
setRecords
(
list
);
return
iPage
;
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
);
return
this
.
queryForWaitManage
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
userId
);
}
}
...
@@ -108,8 +167,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -108,8 +167,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
* web端列表查询
* web端列表查询
*/
*/
public
IPage
<
FailureDetailsDto
>
queryForPageList
(
Page
<
FailureDetailsDto
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
public
IPage
<
FailureDetailsDto
>
queryForPageList
(
Page
<
FailureDetailsDto
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
String
submissionName
,
Long
submissionBranchId
,
String
startTime
,
String
endTime
,
String
submissionName
,
Long
submissionBranchId
,
Long
sequenceNbr
)
{
Long
sequenceNbr
)
{
return
queryForPage
(
page
,
""
,
false
,
currentStatus
,
startTime
,
endTime
,
submissionName
,
submissionBranchId
,
sequenceNbr
);
return
queryForPage
(
page
,
""
,
false
,
currentStatus
,
startTime
,
endTime
,
submissionName
,
submissionBranchId
,
sequenceNbr
);
...
@@ -233,7 +292,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -233,7 +292,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
// 发起主表流程 并添加至报修日志
// 发起主表流程 并添加至报修日志
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setFailureCode
(
buildOrderNo
());
failureDetailsDto
.
setFailureCode
(
buildOrderNo
());
failureDetailsDto
.
setSubmissionName
(
userInfo
.
getUserModel
().
getRealName
());
failureDetailsDto
.
setBizCode
(
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
())));
failureDetailsDto
.
setBizCode
(
Long
.
valueOf
(
iOrgUsrService
.
getParentId
(
userInfo
.
getUserModel
().
getUserId
())));
model
=
this
.
createWithModel
(
failureDetailsDto
);
model
=
this
.
createWithModel
(
failureDetailsDto
);
...
@@ -267,7 +325,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -267,7 +325,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public
Object
updatetoModel
(
FailureDetailsDto
failureDetailsDto
,
ReginParams
userInfo
)
throws
Exception
{
public
Object
updatetoModel
(
FailureDetailsDto
failureDetailsDto
,
ReginParams
userInfo
)
throws
Exception
{
// 发起主表流程 并添加至报修日志
// 发起主表流程 并添加至报修日志
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
FailureDetailsDto
model
=
this
.
updateWithModel
(
failureDetailsDto
);
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,
...
@@ -84,9 +84,9 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
if
(
conditionStatus
==
MAINTENANCE_ADD
)
{
if
(
conditionStatus
==
MAINTENANCE_ADD
)
{
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
if
(!
result
)
{
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
.
setMaintainTime
(
new
Date
());
failureMaintainDto
.
setDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
failureMaintainDto
.
setDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
failureMaintainDto
.
setBizId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
failureMaintainDto
.
setBizId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
...
@@ -154,10 +154,10 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
...
@@ -154,10 +154,10 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
sourceFileServiceImpl
.
saveSourceFile
(
failureMaintainDto
.
getSequenceNbr
(),
sourceFileServiceImpl
.
saveSourceFile
(
failureMaintainDto
.
getSequenceNbr
(),
failureMaintainDto
.
getAttachment
());
failureMaintainDto
.
getAttachment
());
}
}
if
(
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
))
{
if
(
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
))
{
}
else
{
}
else
{
throw
new
RuntimeException
(
"执行维修完成流程失败"
);
throw
new
RuntimeException
(
"执行维修完成流程失败"
);
}
}
}
}
return
true
;
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/FailureVerifyServiceImpl.java
View file @
71b534bc
...
@@ -34,19 +34,6 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
...
@@ -34,19 +34,6 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
@Autowired
@Autowired
FailureRepairlogServiceImpl
failureRepairlogService
;
FailureRepairlogServiceImpl
failureRepairlogService
;
/**
* 分页查询
*/
public
Page
<
FailureVerifyDto
>
queryForFailureVerifyPage
(
Page
<
FailureVerifyDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
FailureVerifyDto
>
queryForFailureVerifyList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Transactional
@Transactional
public
Object
savemodel
(
FailureVerifyDto
model
,
ReginParams
userInfo
)
throws
Exception
{
public
Object
savemodel
(
FailureVerifyDto
model
,
ReginParams
userInfo
)
throws
Exception
{
...
@@ -54,7 +41,7 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
...
@@ -54,7 +41,7 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
int
condition
=
Integer
.
parseInt
(
model
.
getCondition
());
int
condition
=
Integer
.
parseInt
(
model
.
getCondition
());
model
.
setVerifyTime
(
new
Date
());
model
.
setVerifyTime
(
new
Date
());
model
.
setVerifyDepartmentId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
model
.
setVerifyDepartmentId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
model
.
setAcceptor
(
userInfo
.
getUserModel
().
get
User
Name
());
model
.
setAcceptor
(
userInfo
.
getUserModel
().
get
Real
Name
());
model
.
setVerifyDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
model
.
setVerifyDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
...
@@ -76,10 +63,10 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
...
@@ -76,10 +63,10 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
model
.
setVerifyResult
(
verifyResult
);
model
.
setVerifyResult
(
verifyResult
);
this
.
createWithModel
(
model
);
this
.
createWithModel
(
model
);
if
(!
failureDetailsService
.
excuteTask
(
failureDetailsDto
.
getSequenceNbr
(),
userInfo
,
condition
+
""
))
{
if
(!
failureDetailsService
.
excuteTask
(
failureDetailsDto
.
getSequenceNbr
(),
userInfo
,
condition
+
""
))
{
throw
new
Exception
(
"执行流程失败"
);
throw
new
Exception
(
"执行流程失败"
);
}
}
return
true
;
return
true
;
}
}
...
...
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