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
ab82a95b
Commit
ab82a95b
authored
Aug 19, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
a433417f
f1f3e0d1
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1456 additions
and
537 deletions
+1456
-537
FailureVerifyDto.java
...oin/amos/boot/module/common/api/dto/FailureVerifyDto.java
+49
-0
FailureVerify.java
...oin/amos/boot/module/common/api/entity/FailureVerify.java
+67
-0
SupervisionFeign.java
...n/amos/boot/module/common/api/feign/SupervisionFeign.java
+20
-0
FailureVerifyMapper.java
...os/boot/module/common/api/mapper/FailureVerifyMapper.java
+14
-0
IFailureVerifyService.java
...boot/module/common/api/service/IFailureVerifyService.java
+12
-0
FailureVerifyMapper.xml
...mon-api/src/main/resources/mapper/FailureVerifyMapper.xml
+5
-0
DictTypeEnum.java
...m/yeejoin/amos/supervision/common/enums/DictTypeEnum.java
+5
-1
InputItem.java
...va/com/yeejoin/amos/supervision/dao/entity/InputItem.java
+84
-0
Point.java
...n/java/com/yeejoin/amos/supervision/dao/entity/Point.java
+28
-0
FailureAuditController.java
.../module/common/biz/controller/FailureAuditController.java
+8
-3
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+9
-3
FailureMaintainController.java
...dule/common/biz/controller/FailureMaintainController.java
+40
-44
FailureVerifyController.java
...module/common/biz/controller/FailureVerifyController.java
+135
-0
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+4
-0
FailureAuditServiceImpl.java
...dule/common/biz/service/impl/FailureAuditServiceImpl.java
+45
-42
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+48
-42
FailureMaintainServiceImpl.java
...e/common/biz/service/impl/FailureMaintainServiceImpl.java
+237
-349
FailureVerifyServiceImpl.java
...ule/common/biz/service/impl/FailureVerifyServiceImpl.java
+186
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+8
-2
InputItemController.java
.../supervision/business/controller/InputItemController.java
+14
-0
PointController.java
...amos/supervision/business/controller/PointController.java
+32
-12
InputItemMapper.java
...amos/supervision/business/dao/mapper/InputItemMapper.java
+2
-0
IPointDao.java
...n/amos/supervision/business/dao/repository/IPointDao.java
+8
-0
FormValue.java
.../com/yeejoin/amos/supervision/business/dto/FormValue.java
+45
-0
OrgPersonFormDto.java
...ejoin/amos/supervision/business/dto/OrgPersonFormDto.java
+63
-0
OrgUsrFormDto.java
.../yeejoin/amos/supervision/business/dto/OrgUsrFormDto.java
+86
-0
InputItemServiceImpl.java
...pervision/business/service/impl/InputItemServiceImpl.java
+43
-0
PointServiceImpl.java
...s/supervision/business/service/impl/PointServiceImpl.java
+53
-34
IInputItemService.java
...supervision/business/service/intfc/IInputItemService.java
+4
-0
IPointService.java
...mos/supervision/business/service/intfc/IPointService.java
+9
-1
mt-1.0.0.xml
...-supervision/src/main/resources/db/changelog/mt-1.0.0.xml
+73
-0
dbTemplate_input_item.xml
...on/src/main/resources/db/mapper/dbTemplate_input_item.xml
+20
-4
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FailureVerifyDto.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 故障报修验收记录
*
* @author system_generator
* @date 2021-08-18
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@ApiModel
(
value
=
"FailureVerifyDto"
,
description
=
"故障报修验收记录"
)
public
class
FailureVerifyDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"验收人"
)
private
String
acceptor
;
@ApiModelProperty
(
value
=
"验收部门"
)
private
String
verifyDepartment
;
@ApiModelProperty
(
value
=
"验收部门的id"
)
private
Long
verifyDepartmentId
;
@ApiModelProperty
(
value
=
"审核结果 0:同意 1:拒绝 "
)
private
Integer
verifyResult
;
@ApiModelProperty
(
value
=
"验收时间"
)
private
Date
verifyTime
;
@ApiModelProperty
(
value
=
"验收意见"
)
private
String
verifyOpinion
;
@ApiModelProperty
(
value
=
"设备故障报修单id"
)
private
Long
faultId
;
@ApiModelProperty
(
value
=
"审核结果条件判断,0同意,1拒绝"
)
private
String
condition
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/FailureVerify.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.util.Date
;
/**
* 故障报修验收记录
*
* @author system_generator
* @date 2021-08-18
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"cb_failure_verify"
)
public
class
FailureVerify
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 验收人
*/
@TableField
(
"acceptor"
)
private
String
acceptor
;
/**
* 验收部门
*/
@TableField
(
"verify_department"
)
private
String
verifyDepartment
;
/**
* 验收部门的id
*/
@TableField
(
"verify_department_id"
)
private
Long
verifyDepartmentId
;
/**
* 审核结果 0:同意 1:拒绝
*/
@TableField
(
"verify_result"
)
private
Integer
verifyResult
;
/**
* 验收时间
*/
@TableField
(
"verify_time"
)
private
Date
verifyTime
;
/**
* 验收意见
*/
@TableField
(
"verify_opinion"
)
private
String
verifyOpinion
;
/**
* 设备故障报修单id
*/
@TableField
(
"fault_id"
)
private
Long
faultId
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/SupervisionFeign.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
feign
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
// 消防监督调用
@FeignClient
(
name
=
"${supervision.feign.name}"
,
path
=
"supervision"
,
configuration
=
{
MultipartSupportConfig
.
class
})
public
interface
SupervisionFeign
{
@RequestMapping
(
value
=
"/api/point/teamInput"
,
method
=
RequestMethod
.
POST
,
consumes
=
"application/json"
)
ResponseModel
asyncOwner
(
@RequestBody
OrgUsrFormDto
orgUsrFormDto
);
@RequestMapping
(
value
=
"/api/point/delete"
,
method
=
RequestMethod
.
POST
,
consumes
=
"application/json"
)
ResponseModel
deleteOwner
(
@RequestBody
Long
id
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/FailureVerifyMapper.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureVerify
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* 故障报修验收记录 Mapper 接口
*
* @author system_generator
* @date 2021-08-18
*/
public
interface
FailureVerifyMapper
extends
BaseMapper
<
FailureVerify
>
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IFailureVerifyService.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
service
;
/**
* 故障报修验收记录接口类
*
* @author system_generator
* @date 2021-08-18
*/
public
interface
IFailureVerifyService
{
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FailureVerifyMapper.xml
0 → 100644
View file @
ab82a95b
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.common.api.mapper.FailureVerifyMapper"
>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/common/enums/DictTypeEnum.java
View file @
ab82a95b
...
@@ -17,7 +17,11 @@ public enum DictTypeEnum {
...
@@ -17,7 +17,11 @@ public enum DictTypeEnum {
EQUIPTYPE
(
"设备类型"
,
"EQUIP_TYPE"
),
EQUIPTYPE
(
"设备类型"
,
"EQUIP_TYPE"
),
DANGERLEVEL
(
"隐患等级"
,
"DANGER_LEVEL"
),
DANGERLEVEL
(
"隐患等级"
,
"DANGER_LEVEL"
),
OUTERPOINTTYPE
(
"导入外部安全检查表分类"
,
"OUTER_POINT_TYPE"
),
OUTERPOINTTYPE
(
"导入外部安全检查表分类"
,
"OUTER_POINT_TYPE"
),
MAINTENANCE_CLASSIFY
(
"维保项分类"
,
"MAINTENANCE_CLASSIFY"
);
MAINTENANCE_CLASSIFY
(
"维保项分类"
,
"MAINTENANCE_CLASSIFY"
),
CHECK_ITEM_CLASSIFY
(
"消防监督检查项分类"
,
"CHECK_ITEM_CLASSIFY"
),
CHECK_ITEM_TYPE
(
"消防监督检查类别"
,
"CHECK_ITEM_TYPE"
),
CHECK_ITEM_LEVEL
(
"消防监督检查项等级"
,
"CHECK_ITEM_LEVEL"
),
CHECK_ITEM_CONTENT
(
"消防监督检查类型"
,
"CHECK_ITEM_CONTENT"
);
/**
/**
* 名称,描述
* 名称,描述
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/dao/entity/InputItem.java
View file @
ab82a95b
...
@@ -182,6 +182,90 @@ public class InputItem extends BasicEntity {
...
@@ -182,6 +182,90 @@ public class InputItem extends BasicEntity {
@Column
(
name
=
"test_requirement"
)
@Column
(
name
=
"test_requirement"
)
private
String
testRequirement
;
private
String
testRequirement
;
/**
* 检查类型
*/
@Column
(
name
=
"check_type"
)
private
String
checkType
;
/**
* 父类检查项id
*/
@Column
(
name
=
"item_parent"
)
private
String
itemParent
;
/**
* 检查项分类
*/
@Column
(
name
=
"item_classify"
)
private
String
itemClassify
;
/**
* 适用检查类别
*/
@Column
(
name
=
"item_type_classify"
)
private
String
itemTypeClassify
;
/**
* 检查项等级
*/
@Column
(
name
=
"item_level"
)
private
String
itemLevel
;
/**
* 检查项启用
*/
@Column
(
name
=
"item_start"
)
private
String
itemStart
;
public
String
getItemStart
()
{
return
itemStart
;
}
public
void
setItemStart
(
String
itemStart
)
{
this
.
itemStart
=
itemStart
;
}
public
String
getItemParent
()
{
return
itemParent
;
}
public
void
setItemParent
(
String
itemParent
)
{
this
.
itemParent
=
itemParent
;
}
public
String
getItemClassify
()
{
return
itemClassify
;
}
public
void
setItemClassify
(
String
itemClassify
)
{
this
.
itemClassify
=
itemClassify
;
}
public
String
getItemTypeClassify
()
{
return
itemTypeClassify
;
}
public
void
setItemTypeClassify
(
String
itemTypeClassify
)
{
this
.
itemTypeClassify
=
itemTypeClassify
;
}
public
String
getItemLevel
()
{
return
itemLevel
;
}
public
void
setItemLevel
(
String
itemLevel
)
{
this
.
itemLevel
=
itemLevel
;
}
public
String
getCheckType
()
{
return
checkType
;
}
public
void
setCheckType
(
String
checkType
)
{
this
.
checkType
=
checkType
;
}
public
void
setMaintenanceContent
(
String
maintenanceContent
)
{
public
void
setMaintenanceContent
(
String
maintenanceContent
)
{
this
.
maintenanceContent
=
maintenanceContent
;
this
.
maintenanceContent
=
maintenanceContent
;
}
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/dao/entity/Point.java
View file @
ab82a95b
...
@@ -268,6 +268,34 @@ public class Point extends BasicEntity {
...
@@ -268,6 +268,34 @@ public class Point extends BasicEntity {
private
String
riskSourceId
;
private
String
riskSourceId
;
/**
/**
* 所在建筑名称
*/
@Column
(
name
=
"building_name"
)
private
String
buildingName
;
public
String
getBuildingName
()
{
return
buildingName
;
}
public
void
setBuildingName
(
String
buildingName
)
{
this
.
buildingName
=
buildingName
;
}
public
String
getBuildingId
()
{
return
buildingId
;
}
public
void
setBuildingId
(
String
buildingId
)
{
this
.
buildingId
=
buildingId
;
}
/**
* 所在建筑Id
*/
@Column
(
name
=
"building_id"
)
private
String
buildingId
;
/**
* ue4位置
* ue4位置
*/
*/
...
...
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 @
ab82a95b
...
@@ -40,8 +40,13 @@ public class FailureAuditController extends BaseController {
...
@@ -40,8 +40,13 @@ public class FailureAuditController 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
FailureAuditDto
model
)
throws
Exception
{
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureAuditDto
model
)
{
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
try
{
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
}
...
@@ -97,7 +102,7 @@ public class FailureAuditController extends BaseController {
...
@@ -97,7 +102,7 @@ public class FailureAuditController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"审核列表记录查询"
,
notes
=
"审核列表记录查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"审核列表记录查询"
,
notes
=
"审核列表记录查询"
)
@GetMapping
(
value
=
"/list/{faultId}"
)
@GetMapping
(
value
=
"/list/{faultId}"
)
public
ResponseModel
<
List
<
FailureAudit
>>
findByFaultIDFotList
(
@
RequestParam
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 @
ab82a95b
...
@@ -5,6 +5,7 @@ import java.util.List;
...
@@ -5,6 +5,7 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
...
@@ -62,8 +63,13 @@ public class FailureDetailsController extends BaseController {
...
@@ -62,8 +63,13 @@ 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
)
throws
Exception
{
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureDetailsDto
model
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
try
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
}
...
@@ -123,7 +129,7 @@ public class FailureDetailsController extends BaseController {
...
@@ -123,7 +129,7 @@ public class FailureDetailsController extends BaseController {
Page
<
FailureDetails
>
page
=
new
Page
<
FailureDetails
>();
Page
<
FailureDetails
>
page
=
new
Page
<
FailureDetails
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
final
AgencyUserModel
userInfo
=
getUser
Info
();
ReginParams
userInfo
=
getSelectedOrg
Info
();
IPage
<
FailureDetailsDto
>
failureDetailDTOsIPage
=
new
Page
<>();
IPage
<
FailureDetailsDto
>
failureDetailDTOsIPage
=
new
Page
<>();
IPage
<
FailureDetails
>
failureDetailsIPage
=
failureDetailsServiceImpl
.
queryForFailureDetailsPage
(
page
,
userInfo
,
type
);
IPage
<
FailureDetails
>
failureDetailsIPage
=
failureDetailsServiceImpl
.
queryForFailureDetailsPage
(
page
,
userInfo
,
type
);
BeanUtils
.
copyProperties
(
failureDetailsIPage
,
FailureDetailsDto
.
class
);
BeanUtils
.
copyProperties
(
failureDetailsIPage
,
FailureDetailsDto
.
class
);
...
...
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 @
ab82a95b
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureAudit
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -46,70 +48,60 @@ public class FailureMaintainController extends BaseController {
...
@@ -46,70 +48,60 @@ public class FailureMaintainController 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
FailureMaintainDto
model
)
{
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureMaintainDto
model
)
{
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
try
{
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
}
/**
/**
* 根据sequenceNbr更新
* 根据sequenceNbr更新
* 根据传递的Status状态确认验收状态
* 根据传递的Status状态确认验收状态
*
*
*
@param sequenceNbr 主键
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/
{sequenceNbr}
"
)
@PutMapping
(
value
=
"/
verify
"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"验收操作"
,
notes
=
"根据sequenceNbr更新"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"验收操作"
,
notes
=
"根据sequenceNbr更新"
)
public
Object
updateBySequenceNbrFailureMaintain
(
@RequestBody
FailureMaintainDto
model
,
Integer
status
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
Object
updateBySequenceNbrFailureMaintain
(
@RequestBody
FailureMaintainDto
model
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
try
{
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
updateModel
(
model
,
status
,
getSelectedOrgInfo
()));
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
updateModel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
}
/**
/*
*/
/**
* 根据sequenceNbr更新
* 根据sequenceNbr更新
* 根据传递的Status状态确认验收状态
* 根据传递的Status状态确认验收状态
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*//*
@TycloudOperation(ApiLevel = UserType.AGENCY)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/update/{sequenceNbr}")
@PutMapping(value = "/update/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "维修完成", notes = "根据sequenceNbr更新")
@ApiOperation(httpMethod = "PUT", value = "维修完成", notes = "根据sequenceNbr更新")
public
Object
updateByFailureMaintain
(
@RequestBody
FailureMaintainDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public Object updateByFailureMaintain(@RequestBody FailureMaintainDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr)
{
model.setSequenceNbr(sequenceNbr);
model.setSequenceNbr(sequenceNbr);
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
updateStatus
(
model
,
getSelectedOrgInfo
()));
try {
return ResponseHelper.buildResponse(failureMaintainServiceImpl.updateStatus(model,getSelectedOrgInfo()));
} catch (Exception e) {
return ResponseHelper.buildResponse(false);
}
}
}
/*
*/
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*//*
@TycloudOperation(ApiLevel = UserType.AGENCY)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr){
return ResponseHelper.buildResponse(failureMaintainServiceImpl.removeById(sequenceNbr));
}
*/
*/
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
FailureMaintainDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
/**
...
@@ -130,18 +122,22 @@ public class FailureMaintainController extends BaseController {
...
@@ -130,18 +122,22 @@ public class FailureMaintainController extends BaseController {
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
queryForFailureMaintainPage
(
page
));
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
queryForFailureMaintainPage
(
page
));
}
}
/**
/**
*
列表全部数据
查询
*
维修列表记录
查询
*
*根据关联主表faultId查询
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
列表全部数据查询"
,
notes
=
"列表全部数据
查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"
维修列表记录查询"
,
notes
=
"维修列表记录
查询"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list
/{faultId}
"
)
public
ResponseModel
<
List
<
FailureMaintain
Dto
>>
selectForList
(
)
{
public
ResponseModel
<
List
<
FailureMaintain
>>
findByFaultIDFotList
(
@PathVariable
long
faultId
)
{
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
queryForFailureMaintainList
(
));
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
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/FailureVerifyController.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureAudit
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureVerify
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FailureVerifyServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureVerifyDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
/**
* 故障报修验收记录
*
* @author system_generator
* @date 2021-08-18
*/
@RestController
@Api
(
tags
=
"故障报修验收记录Api"
)
@RequestMapping
(
value
=
"/common/failure-verify"
)
public
class
FailureVerifyController
extends
BaseController
{
@Autowired
FailureVerifyServiceImpl
failureVerifyServiceImpl
;
/**
* 新增故障报修验收记录
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
Object
>
save
(
@RequestBody
FailureVerifyDto
model
)
{
try
{
return
ResponseHelper
.
buildResponse
(
failureVerifyServiceImpl
.
savemodel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
/**
* 根据sequenceNbr更新
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新故障报修验收记录"
,
notes
=
"根据sequenceNbr更新故障报修验收记录"
)
public
ResponseModel
<
FailureVerifyDto
>
updateBySequenceNbrFailureVerify
(
@RequestBody
FailureVerifyDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
failureVerifyServiceImpl
.
updateWithModel
(
model
));
}
/*
*/
/**
* 根据sequenceNbr查询
*
* @param sequenceNbr 主键
* @return
*//*
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个故障报修验收记录", notes = "根据sequenceNbr查询单个故障报修验收记录")
public ResponseModel<FailureVerifyDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(failureVerifyServiceImpl.queryBySeq(sequenceNbr));
}
*/
/* *//**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*//*
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "故障报修验收记录分页查询", notes = "故障报修验收记录分页查询")
public ResponseModel<Page<FailureVerifyDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam
(value = "size") int size) {
Page<FailureVerifyDto> page = new Page<FailureVerifyDto>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(failureVerifyServiceImpl.queryForFailureVerifyPage(page));
}*/
/*
*/
/**
* 列表全部数据查询
*
* @return
*//*
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "故障报修验收记录列表全部数据查询", notes = "故障报修验收记录列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<FailureVerifyDto>> selectForList() {
return ResponseHelper.buildResponse(failureVerifyServiceImpl.queryForFailureVerifyList());
}
*/
/**
* 审核列表记录查询
*根据关联主表faultId查询
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"审核列表记录查询"
,
notes
=
"审核列表记录查询"
)
@GetMapping
(
value
=
"/list/{faultId}"
)
public
ResponseModel
<
List
<
FailureVerify
>>
findByFaultIDFotList
(
@PathVariable
long
faultId
)
{
return
ResponseHelper
.
buildResponse
(
failureVerifyServiceImpl
.
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/OrgPersonController.java
View file @
ab82a95b
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
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.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.feign.SupervisionFeign
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -34,6 +35,8 @@ import java.util.Map;
...
@@ -34,6 +35,8 @@ import java.util.Map;
public
class
OrgPersonController
{
public
class
OrgPersonController
{
@Autowired
@Autowired
OrgUsrServiceImpl
iOrgUsrService
;
OrgUsrServiceImpl
iOrgUsrService
;
@Autowired
SupervisionFeign
supervisionFeign
;
/**
/**
...
@@ -63,6 +66,7 @@ public class OrgPersonController {
...
@@ -63,6 +66,7 @@ public class OrgPersonController {
// 删除时,只作逻辑删除
// 删除时,只作逻辑删除
iOrgUsrService
.
update
(
new
UpdateWrapper
<
OrgUsr
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
iOrgUsrService
.
update
(
new
UpdateWrapper
<
OrgUsr
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
CommonConstant
.
IS_DELETE_01
));
CommonConstant
.
IS_DELETE_01
));
supervisionFeign
.
deleteOwner
(
id
);
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
...
...
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 @
ab82a95b
...
@@ -64,7 +64,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -64,7 +64,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
* 发起审核
* 发起审核
*/
*/
@Transactional
@Transactional
public
Object
savemodel
(
FailureAuditDto
model
,
ReginParams
userInfo
)
{
public
Object
savemodel
(
FailureAuditDto
model
,
ReginParams
userInfo
)
throws
Exception
{
int
condition
=
Integer
.
parseInt
(
model
.
getCondition
());
int
condition
=
Integer
.
parseInt
(
model
.
getCondition
());
model
.
setAuditTime
(
new
Date
());
model
.
setAuditTime
(
new
Date
());
...
@@ -73,83 +73,86 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -73,83 +73,86 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
model
.
setAuditDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
model
.
setAuditDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
try
{
//根据审核的结果进行业务操作
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
userInfo
.
getDepartment
().
getSequenceNbr
().
equals
(
failureDetailsDto
.
getBizCode
()))
{
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_AUDIT
,
userInfo
,
condition
);
}
else
if
(
condition
==
(
AuditResultEnum
.
REFUSE
.
getCode
()))
{
updateStatus
(
model
,
FailureStatuEnum
.
REFUSE
,
userInfo
,
condition
);
}
else
if
(
condition
==
(
AuditResultEnum
.
SEND_BACK
.
getCode
()))
{
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_SUBMIT
,
userInfo
,
condition
);
}
else
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
()
)
{
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_MAINTAIN
,
userInfo
,
condition
);
}
FailureAuditDto
withModel
=
this
.
createWithModel
(
model
);
int
auditResult
=
0
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
//根据审核的结果进行业务操作
e
.
printStackTrace
();
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
userInfo
.
getDepartment
().
getSequenceNbr
().
equals
(
failureDetailsDto
.
getBizCode
()))
{
logger
.
info
(
"添加故障审核信息到数据库失败"
);
auditResult
=
AuditResultEnum
.
AGREE
.
getCode
();
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
Boolean
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_AUDIT
,
userInfo
,
condition
);
return
false
;
}
else
if
(
condition
==
(
AuditResultEnum
.
REFUSE
.
getCode
()))
{
auditResult
=
AuditResultEnum
.
REFUSE
.
getCode
();
Boolean
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
REFUSE
,
userInfo
,
condition
);
}
else
if
(
condition
==
(
AuditResultEnum
.
SEND_BACK
.
getCode
()))
{
auditResult
=
AuditResultEnum
.
SEND_BACK
.
getCode
();
Boolean
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_SUBMIT
,
userInfo
,
condition
);
}
else
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
())
{
auditResult
=
AuditResultEnum
.
AGREE
.
getCode
();
Boolean
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_MAINTAIN
,
userInfo
,
condition
);
}
if
(
ObjectUtils
.
isEmpty
(
auditResult
))
{
throw
new
Exception
(
"添加报修日志失败"
);
}
}
model
.
setAuditResult
(
auditResult
);
FailureAuditDto
failureAuditDto
=
this
.
createWithModel
(
model
);
if
(
ObjectUtils
.
isEmpty
(
failureAuditDto
)){
return
false
;
}
return
true
;
return
true
;
}
}
/**
/**
* 修改故障保修单任务状态
* 修改故障保修单任务状态
*/
*/
@Transactional
@Transactional
public
Boolean
updateStatus
(
FailureAuditDto
model
,
FailureStatuEnum
status
,
ReginParams
userInfo
,
int
condition
)
throws
Exception
{
public
Boolean
updateStatus
(
FailureAuditDto
model
,
FailureStatuEnum
status
,
ReginParams
userInfo
,
int
condition
)
throws
Exception
{
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
//当前角色部门id为应急指挥科的时候 并且同意时 不修改主表状态 依然为待审核
//当前角色部门id为应急指挥科的时候 并且同意时 不修改主表状态 依然为待审核
//当前角色部门id为维修部门的时候 修改状态
//当前角色部门id为维修部门的时候 修改状态
/*Map<String, Object> stringObjectMap = failureDetailsService.checkExcuteTaskAuthMap(failureDetailsDto.getSequenceNbr(), userInfo);
String name = stringObjectMap.get("name").toString();
if (name.contains(EMERGENCY_COMMAND)) {
failureDetailsDto.setCurrentStatus(failureDetailsDto.getCurrentStatus());
}*/
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
failureDetailsDto
.
setSequenceNbr
(
model
.
getFaultId
());
failureDetailsDto
.
setSequenceNbr
(
model
.
getFaultId
());
FailureDetailsDto
failureDetailsDtos
=
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
FailureDetailsDto
failureDetailsDtos
=
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
System
.
out
.
println
(
failureDetailsDtos
);
String
conditionText
;
String
conditionText
;
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureDetailsDto
.
getSequenceNbr
(),
userInfo
);
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureDetailsDto
.
getSequenceNbr
(),
userInfo
);
if
(
result
){
if
(
result
)
{
//添加报修日志
//添加报修日志
Long
faultId
=
model
.
getFaultId
();
Long
faultId
=
model
.
getFaultId
();
Date
processTime
=
model
.
getAuditTime
();
Date
processTime
=
model
.
getAuditTime
();
String
processDepartment
=
model
.
getAuditDepartment
();
String
processDepartment
=
model
.
getAuditDepartment
();
String
processAuditor
=
model
.
getAuditor
();
String
processAuditor
=
model
.
getAuditor
();
Integer
processAuditorId
=
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
())
;
Integer
processAuditorId
=
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
())
;
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
Long
auditDepartmentId
=
(
userInfo
.
getDepartment
().
getSequenceNbr
());
Long
auditDepartmentId
=
(
userInfo
.
getDepartment
().
getSequenceNbr
());
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
()
)
{
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
())
{
conditionText
=
AuditResultEnum
.
AGREE
.
getName
();
conditionText
=
AuditResultEnum
.
AGREE
.
getName
();
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditorCid
);
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditorCid
);
}
else
if
(
condition
==
AuditResultEnum
.
SEND_BACK
.
getCode
())
{
}
else
if
(
condition
==
AuditResultEnum
.
SEND_BACK
.
getCode
())
{
conditionText
=
AuditResultEnum
.
SEND_BACK
.
getName
();
conditionText
=
AuditResultEnum
.
SEND_BACK
.
getName
();
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditorCid
);
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditorCid
);
}
else
if
(
condition
==
AuditResultEnum
.
REFUSE
.
getCode
()){
}
else
if
(
condition
==
AuditResultEnum
.
REFUSE
.
getCode
())
{
conditionText
=
AuditResultEnum
.
REFUSE
.
getName
();
conditionText
=
AuditResultEnum
.
REFUSE
.
getName
();
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditorCid
);
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditorCid
);
}
if
(
failureDetailsService
.
excuteTask
(
failureDetailsDto
.
getProcessId
(),
userInfo
,
condition
+
""
)){
return
true
;
}
else
{
throw
new
Exception
(
"执行流程失败"
);
}
}
failureDetailsService
.
excuteTask
(
failureDetailsDto
.
getProcessId
(),
userInfo
,
condition
+
""
);
return
true
;
}
}
return
false
;
return
false
;
}
}
/**
/**
* 添加报修日志
* 添加报修日志
*/
*/
@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
,
Date
processTime
,
String
processDepartment
,
String
processResult
,
String
processAuditorCid
)
{
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
);
...
@@ -160,7 +163,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -160,7 +163,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessAuditorCid
(
processAuditorCid
);
failureRepairlogDto
.
setProcessAuditorCid
(
processAuditorCid
);
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureRepairlogDto
)){
if
(
ObjectUtils
.
isNotEmpty
(
failureRepairlogDto
))
{
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -172,7 +175,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
...
@@ -172,7 +175,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
public
List
<
FailureAudit
>
findByfaultId
(
Long
faultId
)
{
public
List
<
FailureAudit
>
findByfaultId
(
Long
faultId
)
{
Page
<
FailureAudit
>
page
=
new
Page
<>();
Page
<
FailureAudit
>
page
=
new
Page
<>();
QueryWrapper
<
FailureAudit
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
FailureAudit
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"fault_id"
,
faultId
).
orderByDesc
(
"
submission
_time"
);
queryWrapper
.
eq
(
"fault_id"
,
faultId
).
orderByDesc
(
"
audit
_time"
);
return
baseMapper
.
selectList
(
queryWrapper
);
return
baseMapper
.
selectList
(
queryWrapper
);
}
}
...
...
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 @
ab82a95b
...
@@ -85,25 +85,30 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -85,25 +85,30 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
* 分页查询
* 分页查询
*/
*/
public
IPage
<
FailureDetails
>
queryAllPage
(
long
size
,
long
current
)
{
public
IPage
<
FailureDetails
>
queryAllPage
(
long
size
,
long
current
)
{
QueryWrapper
<
FailureDetails
>
wrapper
=
new
QueryWrapper
<>();
/*
QueryWrapper<FailureDetails> wrapper = new QueryWrapper<>();
wrapper.orderByDesc("submission_time");
wrapper.orderByDesc("submission_time");
IPage<FailureDetails> page = new Page<>(current, size);
IPage<FailureDetails> page = new Page<>(current, size);
return
baseMapper
.
selectPage
(
page
,
wrapper
);
return baseMapper.selectPage(page, wrapper);*/
Page
pages
=
new
Page
<>(
current
,
size
);
LambdaQueryWrapper
<
FailureDetails
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
lambdaQueryWrapper
.
orderByDesc
(
FailureDetails:
:
getSubmissionTime
);
IPage
iPage
=
page
(
pages
,
lambdaQueryWrapper
);
Page
<
FailureDetails
>
page
=
new
Page
();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setRecords
(
iPage
.
getRecords
());
return
page
;
}
}
public
IPage
<
FailureDetails
>
queryForFailureDetailsPage
(
Page
<
FailureDetails
>
page
,
AgencyUserModel
userInfo
,
public
IPage
<
FailureDetails
>
queryForFailureDetailsPage
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
,
Integer
type
)
{
Integer
type
)
{
if
(
type
.
equals
(
SELECY_ALL
))
{
if
(
type
.
equals
(
SELECY_ALL
))
{
return
this
.
queryAllPage
(
page
.
getSize
(),
page
.
getCurrent
());
return
this
.
queryAllPage
(
page
.
getSize
(),
page
.
getCurrent
());
}
}
if
(
type
.
equals
(
SELECY_ISUBMIT
))
{
if
(
type
.
equals
(
SELECY_ISUBMIT
))
{
return
queryForPage
(
page
,
userInfo
.
getUserModel
().
getUserId
());
return
queryForPage
(
page
,
userInfo
.
getUserId
());
}
}
return
this
.
queryForWaitManage
(
page
,
userInfo
.
getUserId
());
return
this
.
queryForWaitManage
(
page
,
userInfo
.
getUser
Model
().
getUser
Id
());
}
}
/**
/**
...
@@ -113,11 +118,17 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -113,11 +118,17 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
if
(
submissionPid
==
null
)
{
if
(
submissionPid
==
null
)
{
return
null
;
return
null
;
}
}
QueryWrapper
<
FailureDetails
>
wrapper
=
new
QueryWrapper
<>();
/*
QueryWrapper<FailureDetails> wrapper = new QueryWrapper<>();
wrapper.eq("submission_pid", submissionPid);
wrapper.eq("submission_pid", submissionPid);
wrapper.orderByDesc("submission_time");
wrapper.orderByDesc("submission_time");
IPage<FailureDetails> failureDetailsPage = new Page<>(page.getCurrent(), page.getSize());
IPage<FailureDetails> failureDetailsPage = new Page<>(page.getCurrent(), page.getSize());
return
baseMapper
.
selectPage
(
failureDetailsPage
,
wrapper
);
return baseMapper.selectPage(failureDetailsPage, wrapper);*/
Page
pages
=
new
Page
<>(
page
.
getCurrent
(),
page
.
getSize
());
LambdaQueryWrapper
<
FailureDetails
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
lambdaQueryWrapper
.
eq
(
FailureDetails:
:
getSubmissionPid
,
submissionPid
);
lambdaQueryWrapper
.
orderByDesc
(
FailureDetails:
:
getSubmissionTime
);
return
page
(
pages
,
lambdaQueryWrapper
);
}
}
/**
/**
...
@@ -127,15 +138,19 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -127,15 +138,19 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
if
(
submissionPid
==
null
)
{
if
(
submissionPid
==
null
)
{
return
null
;
return
null
;
}
}
QueryWrapper
<
FailureDetails
>
wrapper
=
new
QueryWrapper
<>();
LambdaQueryWrapper
<
FailureDetails
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
lambdaQueryWrapper
.
notIn
(
FailureDetails:
:
getCurrentStatus
,
FailureStatuEnum
.
REFUSE
.
getCode
(),
FailureStatuEnum
.
FINISH
.
getCode
()
).
orderByDesc
(
FailureDetails:
:
getSubmissionTime
);
/*QueryWrapper<FailureDetails> wrapper = new QueryWrapper<>();
wrapper.eq("submission_pid", submissionPid);
wrapper.eq("submission_pid", submissionPid);
wrapper.notIn("current_status", FailureStatuEnum.REFUSE.getCode(), FailureStatuEnum.FINISH.getCode(),
wrapper.notIn("current_status", FailureStatuEnum.REFUSE.getCode(), FailureStatuEnum.FINISH.getCode(),
FailureStatuEnum.WAITING_AUDIT.getCode());
FailureStatuEnum.WAITING_AUDIT.getCode());
wrapper
.
orderByDesc
(
"submission_time"
);
wrapper.orderByDesc("submission_time");
*/
IPage
<
FailureDetails
>
failureDetailsPage
=
new
Page
<>(
page
.
getCurrent
(),
page
.
getSize
());
IPage
<
FailureDetails
>
failureDetailsPage
=
new
Page
<>(
page
.
getCurrent
(),
page
.
getSize
());
return
baseMapper
.
selectPage
(
failureDetailsPage
,
w
rapper
);
return
baseMapper
.
selectPage
(
failureDetailsPage
,
lambdaQueryW
rapper
);
}
}
/**
/**
* 列表查询 示例
* 列表查询 示例
*/
*/
...
@@ -181,6 +196,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -181,6 +196,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
}
}
/**
/**
* 查询任务状态数量
* 查询任务状态数量
*/
*/
...
@@ -201,7 +217,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -201,7 +217,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
(),
...
@@ -249,7 +265,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -249,7 +265,8 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
*
*
* @throws Exception
* @throws Exception
*/
*/
public
Object
savemodel
(
FailureDetailsDto
failureDetailsDto
,
ReginParams
userInfo
)
{
@Transactional
public
Object
savemodel
(
FailureDetailsDto
failureDetailsDto
,
ReginParams
userInfo
)
throws
Exception
{
String
businessKey
=
buildOrderNo
();
String
businessKey
=
buildOrderNo
();
JSONObject
body
=
new
JSONObject
();
JSONObject
body
=
new
JSONObject
();
body
.
put
(
"businessKey"
,
businessKey
);
body
.
put
(
"businessKey"
,
businessKey
);
...
@@ -267,7 +284,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -267,7 +284,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
// 拿到流程processId
// 拿到流程processId
failureDetailsDto
.
setProcessId
(
instance
.
getString
(
"id"
));
failureDetailsDto
.
setProcessId
(
instance
.
getString
(
"id"
));
FailureDetailsDto
model
=
null
;
FailureDetailsDto
model
=
null
;
try
{
// 发起主表流程 并添加至报修日志
// 发起主表流程 并添加至报修日志
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setSubmissionTime
(
new
Date
());
failureDetailsDto
.
setFailureCode
(
buildOrderNo
());
failureDetailsDto
.
setFailureCode
(
buildOrderNo
());
...
@@ -280,7 +297,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -280,7 +297,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
failureDetailsDto
.
getAttachment
());
failureDetailsDto
.
getAttachment
());
}
}
// 添加至报修日志
// 添加至报修日志
try
{
Long
faultId
=
model
.
getSequenceNbr
();
Long
faultId
=
model
.
getSequenceNbr
();
String
processAuditor
=
model
.
getRecUserName
();
String
processAuditor
=
model
.
getRecUserName
();
Integer
processAuditorId
=
model
.
getSubmissionPid
();
Integer
processAuditorId
=
model
.
getSubmissionPid
();
...
@@ -289,30 +306,14 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -289,30 +306,14 @@ 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
,
repairlog
(
faultId
,
processAuditor
,
processAuditorId
,
departmentId
,
processTime
,
processDepartment
,
processResult
,
processAuditorCid
);
processResult
,
processAuditorCid
);
}
catch
(
Exception
e
)
{
if
(
excuteTask
(
instance
.
getString
(
"id"
),
userInfo
,
null
)){
e
.
printStackTrace
();
return
true
;
logger
.
info
(
"添加流程日志到数据库失败"
);
}
else
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
throw
new
Exception
(
"执行流程失败"
);
return
false
;
}
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
info
(
"添加故障维修信息到数据库失败"
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
false
;
// return CommonResponseUtil.failure("添加失败");
}
try
{
if
(
ObjectUtils
.
isNotEmpty
(
model
))
{
excuteTask
(
instance
.
getString
(
"id"
),
userInfo
,
null
);
}
}
catch
(
Exception
e
)
{
return
false
;
}
return
true
;
}
}
/**
/**
...
@@ -349,6 +350,11 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -349,6 +350,11 @@ 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
;
}
}
...
@@ -358,7 +364,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
...
@@ -358,7 +364,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
*
*
* @param sequenceNbr
* @param sequenceNbr
* @param userInfo
* @param userInfo
* @param condition
* @return
* @return
*/
*/
public
boolean
excuteTaskOnlyOperation
(
Long
sequenceNbr
,
ReginParams
userInfo
)
{
public
boolean
excuteTaskOnlyOperation
(
Long
sequenceNbr
,
ReginParams
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/FailureMaintainServiceImpl.java
View file @
ab82a95b
...
@@ -4,8 +4,10 @@ import java.util.Date;
...
@@ -4,8 +4,10 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureAuditDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureAudit
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -45,15 +47,10 @@ import com.yeejoin.amos.boot.module.common.api.mapper.FailureMaintainMapper;
...
@@ -45,15 +47,10 @@ import com.yeejoin.amos.boot.module.common.api.mapper.FailureMaintainMapper;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureMaintainService
;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureMaintainService
;
/**
/**
*
* 服务实现类
* 服务实现类
*
*
*
*
* @author system_generator
* @author system_generator
*
* @date 2021-08-04
* @date 2021-08-04
*
*/
*/
@Service
@Service
...
@@ -61,349 +58,240 @@ import com.yeejoin.amos.boot.module.common.api.service.IFailureMaintainService;
...
@@ -61,349 +58,240 @@ import com.yeejoin.amos.boot.module.common.api.service.IFailureMaintainService;
@Transactional
@Transactional
public
class
FailureMaintainServiceImpl
extends
BaseService
<
FailureMaintainDto
,
FailureMaintain
,
FailureMaintainMapper
>
public
class
FailureMaintainServiceImpl
extends
BaseService
<
FailureMaintainDto
,
FailureMaintain
,
FailureMaintainMapper
>
implements
IFailureMaintainService
{
implements
IFailureMaintainService
{
@Autowired
@Autowired
SourceFileServiceImpl
sourceFileServiceImpl
;
SourceFileServiceImpl
sourceFileServiceImpl
;
@Autowired
@Autowired
FailureDetailsServiceImpl
failureDetailsService
;
FailureDetailsServiceImpl
failureDetailsService
;
@Autowired
@Autowired
FailureRepairlogServiceImpl
failureRepairlogService
;
FailureRepairlogServiceImpl
failureRepairlogService
;
@Autowired
@Autowired
WorkflowFeignService
workflowFeignService
;
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
);
private
static
String
[]
MAINTENANCE_STATUS
=
{
"维修完成"
,
"维修中"
};
private
static
String
[]
MAINTENANCE_STATUS
=
{
"维修完成"
,
"维修中"
};
private
static
int
MAINTENANCE_COMPLETE
=
0
;
private
static
int
MAINTENANCE_COMPLETE
=
0
;
private
static
int
MAINTENANCE_ADD
=
1
;
private
static
int
MAINTENANCE_ADD
=
1
;
private
static
String
[]
PROCESS_RESULT
=
{
"验证通过"
,
"验证未通过"
};
private
static
String
[]
PROCESS_RESULT
=
{
"验证通过"
,
"验证未通过"
};
/**
/**
*
* 分页查询
* 分页查询
*/
*
*/
public
Page
<
FailureMaintainDto
>
queryForFailureMaintainPage
(
Page
<
FailureMaintainDto
>
page
)
{
public
Page
<
FailureMaintainDto
>
queryForFailureMaintainPage
(
Page
<
FailureMaintainDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
return
this
.
queryForPage
(
page
,
null
,
false
);
}
}
/**
* 列表查询 示例
/**
*/
*
* 列表查询 示例
public
List
<
FailureMaintainDto
>
queryForFailureMaintainList
()
{
*
*/
return
this
.
queryForList
(
""
,
false
);
public
List
<
FailureMaintainDto
>
queryForFailureMaintainList
()
{
}
return
this
.
queryForList
(
""
,
false
);
/**
* 添加维修记录
}
*/
/**
public
Object
savemodel
(
FailureMaintainDto
failureMaintainDto
,
ReginParams
userInfo
)
throws
Exception
{
*
* 添加维修记录
String
condition
=
failureMaintainDto
.
getCondition
();
*
int
conditionStatus
=
Integer
.
parseInt
(
condition
);
*/
if
(
conditionStatus
==
MAINTENANCE_ADD
)
{
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
public
Object
savemodel
(
FailureMaintainDto
failureMaintainDto
,
ReginParams
userInfo
)
{
if
(!
result
)
{
return
false
;
String
condition
=
failureMaintainDto
.
getCondition
();
}
failureMaintainDto
.
setMaintainMan
(
userInfo
.
getUserModel
().
getUserName
());
int
conditionStatus
=
Integer
.
parseInt
(
condition
);
failureMaintainDto
.
setMaintainTime
(
new
Date
());
failureMaintainDto
.
setDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
if
(
conditionStatus
==
MAINTENANCE_ADD
)
{
failureMaintainDto
.
setBizId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
failureMaintainDto
.
setRecoreType
(
RECORE_TYPE
);
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
this
.
createWithModel
(
failureMaintainDto
);
// 添加完成后修改保修单状态为维修中
if
(!
result
)
{
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
failureMaintainDto
.
getFaultId
());
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
IN_MAINTENANCE
.
getCode
());
return
false
;
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
// 添加报修日志
}
String
processResult
=
MAINTENANCE_STATUS
[
1
];
// 维修中
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
try
{
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
repairlog
(
failureMaintainDto
.
getFaultId
(),
failureMaintainDto
.
getMaintainMan
(),
processAuditorId
,
failureMaintainDto
.
setMaintainMan
(
userInfo
.
getUserModel
().
getUserName
());
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditorCid
);
failureMaintainDto
.
setMaintainTime
(
new
Date
());
if
(
ObjectUtils
.
isNotEmpty
(
failureMaintainDto
.
getAttachment
()))
{
sourceFileServiceImpl
.
saveSourceFile
(
failureMaintainDto
.
getSequenceNbr
(),
failureMaintainDto
.
setDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
failureMaintainDto
.
getAttachment
());
}
failureMaintainDto
.
setBizId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
String
nextTaskId
=
failureDetailsService
.
checkIsInMaintenance
(
failureDetailsDto
.
getSequenceNbr
());
if
(
nextTaskId
==
null
)
{
failureMaintainDto
.
setRecoreType
(
RECORE_TYPE
);
if
(
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
))
{
}
else
{
this
.
createWithModel
(
failureMaintainDto
);
throw
new
RuntimeException
(
"执行维修中流程失败"
);
}
// 添加完成后修改保修单状态为维修中
}
else
{
// 判断下一个节点是不是维修中,如果是则添加当前任务的执行人
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
failureMaintainDto
.
getFaultId
());
workflowFeignService
.
pickuptask
(
nextTaskId
);
}
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
IN_MAINTENANCE
.
getCode
());
return
true
;
}
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
return
this
.
updateStatus
(
failureMaintainDto
,
userInfo
);
}
// 添加报修日志
/**
* 更新状态维修完成
String
processResult
=
MAINTENANCE_STATUS
[
1
];
// 维修中
*/
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
public
Boolean
updateStatus
(
FailureMaintainDto
failureMaintainDto
,
ReginParams
userInfo
)
throws
Exception
{
String
condition
=
failureMaintainDto
.
getCondition
();
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
int
conditionStatus
=
Integer
.
parseInt
(
condition
);
if
(
conditionStatus
==
MAINTENANCE_COMPLETE
)
{
repairlog
(
failureMaintainDto
.
getFaultId
(),
failureMaintainDto
.
getMaintainMan
(),
processAuditorId
,
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
if
(!
result
)
{
return
false
;
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditorCid
);
}
failureMaintainDto
.
setMaintainMan
(
userInfo
.
getUserModel
().
getUserName
());
if
(
ObjectUtils
.
isNotEmpty
(
failureMaintainDto
.
getAttachment
()))
{
failureMaintainDto
.
setMaintainTime
(
new
Date
());
failureMaintainDto
.
setDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
sourceFileServiceImpl
.
saveSourceFile
(
failureMaintainDto
.
getSequenceNbr
(),
failureMaintainDto
.
setBizId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
failureMaintainDto
.
getAttachment
());
failureMaintainDto
.
setRecoreType
(
RECORE_TYPE
);
this
.
createWithModel
(
failureMaintainDto
);
}
// 添加完成后修改保修单状态为维修完成
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
failureMaintainDto
.
getFaultId
());
String
nextTaskId
=
failureDetailsService
.
checkIsInMaintenance
(
failureDetailsDto
.
getSequenceNbr
());
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
WAITING_ACCEPTANCE
.
getCode
());
if
(
nextTaskId
==
null
)
{
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
try
{
// 添加报修日志
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
);
String
processResult
=
MAINTENANCE_STATUS
[
0
];
// 维修完成
}
catch
(
Exception
e
)
{
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
return
false
;
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
}
repairlog
(
failureMaintainDto
.
getFaultId
(),
failureMaintainDto
.
getMaintainMan
(),
processAuditorId
,
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
}
else
{
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditorCid
);
// 判断下一个节点是不是维修中,如果是则添加当前任务的执行人
if
(
ObjectUtils
.
isNotEmpty
(
failureMaintainDto
.
getAttachment
()))
{
workflowFeignService
.
pickuptask
(
nextTaskId
);
sourceFileServiceImpl
.
saveSourceFile
(
failureMaintainDto
.
getSequenceNbr
(),
}
failureMaintainDto
.
getAttachment
());
}
}
catch
(
Exception
e
)
{
if
(
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
))
{
logger
.
info
(
"添加故障维修信息到数据库失败"
);
}
else
{
throw
new
RuntimeException
(
"执行维修完成流程失败"
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
}
}
return
false
;
return
true
;
}
}
/**
return
true
;
* 根据审核结果更新维修表
*/
}
public
Boolean
updateModel
(
FailureMaintainDto
failureMaintainDto
,
ReginParams
userInfo
)
throws
Exception
{
return
this
.
updateStatus
(
failureMaintainDto
,
userInfo
);
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
failureMaintainDto
.
getFaultId
());
}
if
(
result
)
{
/**
this
.
updateWithModel
(
failureMaintainDto
);
*
// 根据status修改状态
* 更新状态维修完成
String
processResult
=
new
String
();
*
String
condition
=
failureMaintainDto
.
getCondition
();
*/
int
conditionStatus
=
Integer
.
parseInt
(
condition
);
public
Boolean
updateStatus
(
FailureMaintainDto
failureMaintainDto
,
ReginParams
userInfo
)
{
if
(
conditionStatus
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
userInfo
.
getDepartment
().
getSequenceNbr
()
==
failureDetailsDto
.
getBizCode
())
{
// 同意状态为已完结
try
{
processResult
=
PROCESS_RESULT
[
0
];
}
else
if
(
conditionStatus
==
AuditResultEnum
.
AGREE
.
getCode
())
{
// 同意状态为已完结
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
failureMaintainDto
.
getFaultId
());
failureDetailsDto
.
setCurrentStatus
(
failureDetailsDto
.
getCurrentStatus
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
WAITING_ACCEPTANCE
.
getCode
());
processResult
=
PROCESS_RESULT
[
0
];
}
else
if
(
conditionStatus
==
AuditResultEnum
.
REFUSE
.
getCode
()){
// 不同意状态为已拒绝
this
.
updateWithModel
(
failureMaintainDto
);
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
REFUSE
.
getCode
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
// 添加报修日志
processResult
=
PROCESS_RESULT
[
1
];
}
String
processResult
=
MAINTENANCE_STATUS
[
0
];
// 维修完成
// 添加报修日志
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
Boolean
repairlog
=
repairlog
(
failureMaintainDto
.
getFaultId
(),
failureMaintainDto
.
getMaintainMan
(),
processAuditorId
,
repairlog
(
failureMaintainDto
.
getFaultId
(),
failureMaintainDto
.
getMaintainMan
(),
processAuditorId
,
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditorCid
);
if
(
ObjectUtils
.
isEmpty
(
repairlog
)){
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditorCid
);
throw
new
RuntimeException
(
"验收添加报修日志出错"
);
}
if
(
ObjectUtils
.
isNotEmpty
(
failureMaintainDto
.
getAttachment
()))
{
if
(
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
)){
sourceFileServiceImpl
.
saveSourceFile
(
failureMaintainDto
.
getSequenceNbr
(),
return
true
;
failureMaintainDto
.
getAttachment
());
}
else
{
throw
new
RuntimeException
(
"验收执行流程失败"
);
}
}
try
{
}
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
return
false
;
failureMaintainDto
.
getCondition
());
}
catch
(
Exception
e
)
{
}
return
false
;
}
/**
* 根据FaultId查询
}
catch
(
Exception
e
)
{
*/
public
List
<
FailureMaintain
>
findByfaultId
(
Long
faultId
)
{
logger
.
info
(
"更新故障验收信息到数据库失败"
);
LambdaQueryWrapper
<
FailureMaintain
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
lambdaQueryWrapper
.
eq
(
FailureMaintain:
:
getFaultId
,
faultId
).
orderByDesc
(
FailureMaintain:
:
getMaintainTime
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
baseMapper
.
selectList
(
lambdaQueryWrapper
);
}
return
false
;
/**
}
* 查询当前故障报修单的流程的审批历史节点
*
return
true
;
* @param sequenceNbr
* @return
}
*/
/**
public
List
<
Object
>
getProcessHistoryList
(
Long
sequenceNbr
)
{
*
* 根据审核结果更新维修表
// TODO Auto-generated method stub
*
*/
return
null
;
public
Boolean
updateModel
(
FailureMaintainDto
failureMaintainDto
,
Integer
status
,
ReginParams
userInfo
)
{
}
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureMaintainDto
.
getFaultId
(),
userInfo
);
/**
* 添加报修日志
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
failureMaintainDto
.
getFaultId
());
*/
public
Boolean
repairlog
(
Long
faultId
,
String
processAuditor
,
Integer
processAuditorId
,
Long
departmentId
,
if
(
result
)
{
Date
processTime
,
this
.
updateWithModel
(
failureMaintainDto
);
String
processDepartment
,
String
processResult
,
String
processAuditorCid
)
{
// 根据status修改状态
FailureRepairlogDto
failureRepairlogDto
=
new
FailureRepairlogDto
();
failureRepairlogDto
.
setFaultId
(
faultId
);
String
processResult
=
new
String
();
failureRepairlogDto
.
setProcessAuditor
(
processAuditor
);
failureRepairlogDto
.
setProcessAuditorId
(
processAuditorId
);
String
condition
=
new
String
();
failureRepairlogDto
.
setProcessDepartmentId
(
departmentId
);
failureRepairlogDto
.
setProcessTime
(
processTime
);
if
(
status
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
userInfo
.
getDepartment
().
getSequenceNbr
()
failureRepairlogDto
.
setProcessDepartment
(
processDepartment
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
==
failureDetailsDto
.
getBizCode
())
{
// 同意状态为已完结
failureRepairlogDto
.
setProcessAuditorCid
(
processAuditorCid
);
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
failureDetailsDto
.
setCurrentStatus
(
failureDetailsDto
.
getCurrentStatus
());
if
(
ObjectUtils
.
isNotEmpty
(
failureRepairlogDto
))
{
return
true
;
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
}
return
false
;
processResult
=
PROCESS_RESULT
[
0
];
}
condition
=
AuditResultEnum
.
AGREE
.
getName
();
}
else
if
(
status
==
AuditResultEnum
.
AGREE
.
getCode
())
{
// 同意状态为已完结
failureDetailsDto
.
setCurrentStatus
(
failureDetailsDto
.
getCurrentStatus
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
processResult
=
PROCESS_RESULT
[
0
];
condition
=
AuditResultEnum
.
AGREE
.
getName
();
}
else
{
// 不同意状态为已拒绝
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
REFUSE
.
getCode
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
processResult
=
PROCESS_RESULT
[
1
];
condition
=
AuditResultEnum
.
REFUSE
.
getName
();
}
// 添加报修日志
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
repairlog
(
failureMaintainDto
.
getFaultId
(),
failureMaintainDto
.
getMaintainMan
(),
processAuditorId
,
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditorCid
);
try
{
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
);
}
catch
(
Exception
e
)
{
return
false
;
}
return
true
;
}
return
false
;
}
/**
*
* 查询当前故障报修单的流程的审批历史节点
*
* @param sequenceNbr
*
* @return
*
*/
public
List
<
Object
>
getProcessHistoryList
(
Long
sequenceNbr
)
{
// TODO Auto-generated method stub
return
null
;
}
/**
*
* 添加报修日志
*
*/
@Transactional
public
Boolean
repairlog
(
Long
faultId
,
String
processAuditor
,
Integer
processAuditorId
,
Long
departmentId
,
Date
processTime
,
String
processDepartment
,
String
processResult
,
String
processAuditorCid
)
{
FailureRepairlogDto
failureRepairlogDto
=
new
FailureRepairlogDto
();
failureRepairlogDto
.
setFaultId
(
faultId
);
failureRepairlogDto
.
setProcessAuditor
(
processAuditor
);
failureRepairlogDto
.
setProcessAuditorId
(
processAuditorId
);
failureRepairlogDto
.
setProcessDepartmentId
(
departmentId
);
failureRepairlogDto
.
setProcessTime
(
processTime
);
failureRepairlogDto
.
setProcessDepartment
(
processDepartment
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessAuditorCid
(
processAuditorCid
);
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureRepairlogDto
))
{
return
true
;
}
return
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/FailureVerifyServiceImpl.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureVerifyDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureRepairlogDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureVerify
;
import
com.yeejoin.amos.boot.module.common.api.enums.AuditResultEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.FailureStatuEnum
;
import
com.yeejoin.amos.boot.module.common.api.mapper.FailureVerifyMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IFailureVerifyService
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.Date
;
import
java.util.List
;
/**
* 故障报修验收记录服务实现类
*
* @author system_generator
* @date 2021-08-18
*/
@Service
public
class
FailureVerifyServiceImpl
extends
BaseService
<
FailureVerifyDto
,
FailureVerify
,
FailureVerifyMapper
>
implements
IFailureVerifyService
{
@Autowired
FailureDetailsServiceImpl
failureDetailsService
;
@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
{
int
condition
=
Integer
.
parseInt
(
model
.
getCondition
());
model
.
setVerifyTime
(
new
Date
());
model
.
setVerifyDepartmentId
(
userInfo
.
getDepartment
().
getSequenceNbr
());
model
.
setAcceptor
(
userInfo
.
getUserModel
().
getUserName
());
model
.
setVerifyDepartment
(
userInfo
.
getDepartment
().
getDepartmentName
());
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
int
verifyResult
=
0
;
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureDetailsDto
.
getSequenceNbr
(),
userInfo
);
if
(!
result
)
{
return
new
RuntimeException
(
"无权限"
);
}
Boolean
repairResult
=
null
;
//根据验收的结果进行业务操作
/* if (condition == AuditResultEnum.AGREE.getCode() ) {
verifyResult = AuditResultEnum.AGREE.getCode();
Boolean repairResult = updateStatus(model, FailureStatuEnum.WAITING_ACCEPTANCE, userInfo, condition);
} else*/
if
(
condition
==
(
AuditResultEnum
.
REFUSE
.
getCode
()))
{
verifyResult
=
AuditResultEnum
.
REFUSE
.
getCode
();
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
REFUSE
,
userInfo
,
condition
);
}
/*else if (condition == (AuditResultEnum.SEND_BACK.getCode())) {
verifyResult = AuditResultEnum.SEND_BACK.getCode();
Boolean repairResult = updateStatus(model, FailureStatuEnum.WAITING_SUBMIT, userInfo, condition);
} */
else
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
())
{
verifyResult
=
AuditResultEnum
.
AGREE
.
getCode
();
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
FINISH
,
userInfo
,
condition
);
}
model
.
setVerifyResult
(
verifyResult
);
List
<
FailureVerify
>
byfaultId
=
findByfaultId
(
failureDetailsDto
.
getSequenceNbr
());
/* if (byfaultId.size() == 0) {
this.createWithModel(model);
} else {*/
this
.
createWithModel
(
model
);
if
(!
failureDetailsService
.
excuteTask
(
failureDetailsDto
.
getProcessId
(),
userInfo
,
condition
+
""
))
{
throw
new
Exception
(
"执行流程失败"
);
}
/* }*/
return
true
;
}
/**
* 修改故障保修单任务状态
*/
@Transactional
public
Boolean
updateStatus
(
FailureVerifyDto
model
,
FailureStatuEnum
status
,
ReginParams
userInfo
,
int
condition
)
throws
Exception
{
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
//当前角色部门id为应急指挥科的时候 并且同意时 不修改主表状态 依然为待验收
//当前角色部门id为维修部门的时候 修改状态
List
<
FailureVerify
>
byfaultId
=
findByfaultId
(
failureDetailsDto
.
getSequenceNbr
());
if
(
byfaultId
.
size
()
!=
0
)
{
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
}
failureDetailsDto
.
setSequenceNbr
(
model
.
getFaultId
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
String
conditionText
;
//添加报修日志
Long
faultId
=
model
.
getFaultId
();
Date
processTime
=
model
.
getVerifyTime
();
String
processDepartment
=
model
.
getVerifyDepartment
();
Integer
processAuditorId
=
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
());
String
processVerifyor
=
model
.
getAcceptor
();
String
processAuditorCid
=
userInfo
.
getUserModel
().
getUserName
();
Long
auditDepartmentId
=
(
userInfo
.
getDepartment
().
getSequenceNbr
());
Boolean
repairlog
=
null
;
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
())
{
conditionText
=
AuditResultEnum
.
AGREE
.
getName
();
repairlog
=
repairlog
(
faultId
,
processVerifyor
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditorCid
);
}
else
if
(
condition
==
AuditResultEnum
.
REFUSE
.
getCode
())
{
conditionText
=
AuditResultEnum
.
REFUSE
.
getName
();
repairlog
=
repairlog
(
faultId
,
processVerifyor
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditorCid
);
}
if
(!
repairlog
)
{
throw
new
Exception
(
"执行流程失败"
);
}
else
{
return
true
;
}
}
/**
* 添加报修日志
*/
@Transactional
public
Boolean
repairlog
(
Long
faultId
,
String
processAuditor
,
Integer
processAuditorId
,
Long
departmentId
,
Date
processTime
,
String
processDepartment
,
String
processResult
,
String
processVerifyorCid
)
{
FailureRepairlogDto
failureRepairlogDto
=
new
FailureRepairlogDto
();
failureRepairlogDto
.
setFaultId
(
faultId
);
failureRepairlogDto
.
setProcessAuditor
(
processAuditor
);
failureRepairlogDto
.
setProcessAuditorId
(
processAuditorId
);
failureRepairlogDto
.
setProcessDepartmentId
(
departmentId
);
failureRepairlogDto
.
setProcessTime
(
processTime
);
failureRepairlogDto
.
setProcessDepartment
(
processDepartment
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessAuditorCid
(
processVerifyorCid
);
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureRepairlogDto
))
{
return
true
;
}
return
false
;
}
/**
* 根据FaultId查询
*/
public
List
<
FailureVerify
>
findByfaultId
(
Long
faultId
)
{
Page
<
FailureVerify
>
page
=
new
Page
<>();
QueryWrapper
<
FailureVerify
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"fault_id"
,
faultId
).
orderByDesc
(
"verify_time"
);
return
baseMapper
.
selectList
(
queryWrapper
);
}
public
FailureVerify
findByFaultId
(
Long
faultId
)
{
LambdaQueryWrapper
<
FailureVerify
>
wrapper
=
new
LambdaQueryWrapper
<
FailureVerify
>();
wrapper
.
eq
(
FailureVerify:
:
getIsDelete
,
false
);
wrapper
.
eq
(
FailureVerify:
:
getFaultId
,
faultId
);
wrapper
.
orderByAsc
(
FailureVerify:
:
getVerifyTime
);
wrapper
.
last
(
"LIMIT 1"
);
return
this
.
baseMapper
.
selectOne
(
wrapper
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
ab82a95b
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
...
@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum
;
import
com.yeejoin.amos.boot.module.common.api.enums.OrgPersonEnum
;
import
com.yeejoin.amos.boot.module.common.api.feign.SupervisionFeign
;
import
com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.common.api.mapper.OrgUsrMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
...
@@ -50,7 +51,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -50,7 +51,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
DynamicFormColumnServiceImpl
alertFormServiceImpl
;
DynamicFormColumnServiceImpl
alertFormServiceImpl
;
@Resource
@Resource
OrgUsrMapper
orgUsrMapper
;
OrgUsrMapper
orgUsrMapper
;
@Autowired
SupervisionFeign
supervisionFeign
;
@Autowired
@Autowired
ESOrgUsrService
eSOrgUsrService
;
ESOrgUsrService
eSOrgUsrService
;
@Override
@Override
...
@@ -399,7 +401,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -399,7 +401,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
}
@Override
@Override
public
void
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
{
public
void
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
throws
Exception
{
orgUsr
.
setRecDate
(
new
Date
());
orgUsr
.
setRecDate
(
new
Date
());
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
orgUsr
.
setRecUserName
(
user
.
getRealName
());
orgUsr
.
setRecUserName
(
user
.
getRealName
());
...
@@ -417,6 +419,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
...
@@ -417,6 +419,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
});
});
// 保存动态表单数据
// 保存动态表单数据
alertFormValueServiceImpl
.
saveBatch
(
alertFromValuelist
);
alertFormValueServiceImpl
.
saveBatch
(
alertFromValuelist
);
OrgUsrFormDto
formDto
=
this
.
selectCompanyById
(
orgUsr
.
getSequenceNbr
());
if
(
OrgPersonEnum
.
公司
.
getKey
().
equals
(
orgUsr
.
getBizOrgType
()))
{
supervisionFeign
.
asyncOwner
(
formDto
);
}
}
}
@Override
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/InputItemController.java
View file @
ab82a95b
...
@@ -402,4 +402,18 @@ public class InputItemController extends AbstractBaseController {
...
@@ -402,4 +402,18 @@ public class InputItemController extends AbstractBaseController {
List
<
InputItemTemplateVo
>
itemTemplateVoList
=
ExcelUtils
.
importExcel
(
file
,
1
,
1
,
InputItemTemplateVo
.
class
);
List
<
InputItemTemplateVo
>
itemTemplateVoList
=
ExcelUtils
.
importExcel
(
file
,
1
,
1
,
InputItemTemplateVo
.
class
);
return
CommonResponseUtil
.
success
(
inputItemService
.
uploadListByTemplate
(
itemTemplateVoList
,
orgCode
,
userId
));
return
CommonResponseUtil
.
success
(
inputItemService
.
uploadListByTemplate
(
itemTemplateVoList
,
orgCode
,
userId
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取字典值"
,
notes
=
"获取字典值"
)
@GetMapping
(
value
=
"/diction"
)
public
CommonResponse
getCheckItemClassify
()
{
return
CommonResponseUtil
.
success
(
inputItemService
.
generateDictionaryValue
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取上一级"
,
notes
=
"获取上一级"
)
@GetMapping
(
value
=
"/parent/item"
)
public
CommonResponse
getItemParent
(
@ApiParam
(
value
=
"检查项id"
)
@RequestParam
(
required
=
false
)
String
id
)
{
return
CommonResponseUtil
.
success
(
inputItemService
.
getItemParent
(
id
));
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/PointController.java
View file @
ab82a95b
...
@@ -11,6 +11,7 @@ import java.util.Set;
...
@@ -11,6 +11,7 @@ import java.util.Set;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.supervision.business.vo.MaintenanceResourceData
;
import
com.yeejoin.amos.supervision.business.vo.MaintenanceResourceData
;
import
com.yeejoin.amos.supervision.business.vo.PointClassifyVo
;
import
com.yeejoin.amos.supervision.business.vo.PointClassifyVo
;
import
com.yeejoin.amos.supervision.business.vo.PointInputItemVo
;
import
com.yeejoin.amos.supervision.business.vo.PointInputItemVo
;
...
@@ -216,7 +217,7 @@ public class PointController extends AbstractBaseController {
...
@@ -216,7 +217,7 @@ public class PointController extends AbstractBaseController {
/**
/**
* 查询巡检点信息
* 查询巡检点信息
*
*
* @param
point
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -270,7 +271,7 @@ public class PointController extends AbstractBaseController {
...
@@ -270,7 +271,7 @@ public class PointController extends AbstractBaseController {
/**
/**
* 查询巡检点信息
* 查询巡检点信息
*
*
* @param
point
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -499,7 +500,7 @@ public class PointController extends AbstractBaseController {
...
@@ -499,7 +500,7 @@ public class PointController extends AbstractBaseController {
/**
/**
* 查询巡检点的巡检项
* 查询巡检点的巡检项
*
*
* @param
id
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -518,7 +519,7 @@ public class PointController extends AbstractBaseController {
...
@@ -518,7 +519,7 @@ public class PointController extends AbstractBaseController {
/**
/**
* 查询巡检点的巡检项
* 查询巡检点的巡检项
*
*
* @param
id
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -537,7 +538,7 @@ public class PointController extends AbstractBaseController {
...
@@ -537,7 +538,7 @@ public class PointController extends AbstractBaseController {
/**
/**
* 查询巡检点的分类
* 查询巡检点的分类
*
*
* @param
id
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -556,7 +557,7 @@ public class PointController extends AbstractBaseController {
...
@@ -556,7 +557,7 @@ public class PointController extends AbstractBaseController {
/**
/**
* 根据分类id查询对应项
* 根据分类id查询对应项
*
*
* @param
id
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -576,7 +577,7 @@ public class PointController extends AbstractBaseController {
...
@@ -576,7 +577,7 @@ public class PointController extends AbstractBaseController {
/**
/**
* 根据点id查询点的分类及对应项
* 根据点id查询点的分类及对应项
*
*
* @param
id
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -672,7 +673,7 @@ public class PointController extends AbstractBaseController {
...
@@ -672,7 +673,7 @@ public class PointController extends AbstractBaseController {
/**
/**
* 查询巡检点信息
* 查询巡检点信息
*
*
* @param
point
* @param
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
@@ -808,15 +809,34 @@ public class PointController extends AbstractBaseController {
...
@@ -808,15 +809,34 @@ public class PointController extends AbstractBaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"
装备维保项"
,
notes
=
"装备维保项
"
)
@ApiOperation
(
value
=
"
机场单位同步"
,
notes
=
"机场单位同步
"
)
@RequestMapping
(
value
=
"/
equipment
Input"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/
team
Input"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
syncSavePoint
(
public
CommonResponse
syncSavePoint
(
@ApiParam
(
value
=
"同步请求参数"
)
@RequestBody
()
List
<
MaintenanceResourceData
>
list
)
{
@ApiParam
(
value
=
"同步请求参数"
)
@RequestBody
OrgUsrFormDto
orgUsrFormDto
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
AgencyUserModel
model
=
getUserInfo
();
AgencyUserModel
model
=
getUserInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
String
orgCode
=
getOrgCode
(
reginParams
);
iPointService
.
syncSavePoint
(
list
,
orgCode
,
model
.
getUserId
());
iPointService
.
syncSavePoint
(
orgUsrFormDto
,
orgCode
,
model
.
getUserId
());
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
}
/**
* 删除巡检点
*
* @param id
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"同步删除机场单位"
,
notes
=
"同步删除机场单位"
)
@PostMapping
(
value
=
"/delete"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deleteOwner
(
@ApiParam
(
value
=
"巡检点ID"
,
required
=
true
)
@RequestBody
Long
id
)
{
try
{
iPointService
.
delPointByPointNo
(
id
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"删除检查点失败"
);
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/InputItemMapper.java
View file @
ab82a95b
...
@@ -32,4 +32,6 @@ public interface InputItemMapper {
...
@@ -32,4 +32,6 @@ public interface InputItemMapper {
List
<
PointInputItemVo
>
queryCustomInputItemByPointId
(
@Param
(
"pointId"
)
Long
pointId
,
@Param
(
"equipmentId"
)
String
equipmentName
);
List
<
PointInputItemVo
>
queryCustomInputItemByPointId
(
@Param
(
"pointId"
)
Long
pointId
,
@Param
(
"equipmentId"
)
String
equipmentName
);
Integer
insertList
(
List
<
InputItem
>
list
);
Integer
insertList
(
List
<
InputItem
>
list
);
List
<
InputItemVo
>
getInputItemParent
(
@Param
(
"id"
)
String
id
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IPointDao.java
View file @
ab82a95b
...
@@ -36,4 +36,12 @@ public interface IPointDao extends BaseDao<Point, Long> {
...
@@ -36,4 +36,12 @@ public interface IPointDao extends BaseDao<Point, Long> {
void
delPointBIds
(
Long
id
);
void
delPointBIds
(
Long
id
);
List
<
Point
>
findAllByOriginalId
(
String
relationId
);
List
<
Point
>
findAllByOriginalId
(
String
relationId
);
@Modifying
@Transactional
@Query
(
value
=
"UPDATE p_point SET is_delete = 1 WHERE point_no IN (?1)"
,
nativeQuery
=
true
)
void
delPointByPointNo
(
Long
id
);
@Query
(
value
=
"SELECT id FROM p_point p WHERE is_delete = 0 AND p.point_no = (?1)"
,
nativeQuery
=
true
)
List
<
Long
>
findPointByPointNo
(
String
pointNo
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dto/FormValue.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
*
* @return
* <PRE>
* author tw
* date 2021/6/21
* </PRE>
* 动态表单值
*/
@Data
@ApiModel
(
value
=
"FormValue"
,
description
=
"动态表单值"
)
public
class
FormValue
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"key"
)
private
String
key
;
@ApiModelProperty
(
value
=
"label"
)
private
String
label
;
@ApiModelProperty
(
value
=
"type"
)
private
String
type
;
@ApiModelProperty
(
value
=
"value"
)
private
String
value
;
@ApiModelProperty
(
value
=
"是否一行显示"
)
private
boolean
block
;
public
FormValue
()
{
}
public
FormValue
(
String
key
,
String
label
,
String
type
,
String
value
,
boolean
block
)
{
super
();
this
.
key
=
key
;
this
.
label
=
label
;
this
.
type
=
type
;
this
.
value
=
value
;
this
.
block
=
block
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dto/OrgPersonFormDto.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.util.List
;
/**
* 机构/部门/人员表
*
* @author tb
* @date 2021-06-18
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"cb_org_usr"
)
@ApiModel
(
value
=
"OrgUsrVo"
,
description
=
"人员信息"
)
public
class
OrgPersonFormDto
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"机构/部门id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"amos中公司/部门ID"
)
private
String
amosOrgId
;
@ApiModelProperty
(
value
=
"amos中公司/部门编码"
)
private
String
amosOrgCode
;
@ApiModelProperty
(
value
=
"机构类型`"
)
private
String
bizOrgType
;
@ApiModelProperty
(
value
=
"所属建筑名称"
)
private
String
buildName
;
@ApiModelProperty
(
value
=
"所属建筑ID"
)
private
String
buildId
;
@ApiModelProperty
(
value
=
"归属机构/部门/人员"
)
private
String
parentId
;
@ApiModelProperty
(
value
=
"归属机构/部门/人员"
)
private
String
parentName
;
@ApiModelProperty
(
value
=
"动态表单值"
)
private
List
<
FormValue
>
dynamicFormAlert
;
public
OrgPersonFormDto
()
{
}
public
OrgPersonFormDto
(
List
<
FormValue
>
dynamicFormAlert
)
{
this
.
dynamicFormAlert
=
dynamicFormAlert
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dto/OrgUsrFormDto.java
0 → 100644
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dto
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 机构/部门/人员表
*
* @author tb
* @date 2021-06-18
*/
@Data
@Accessors
(
chain
=
true
)
@TableName
(
"cb_org_usr"
)
@ApiModel
(
value
=
"OrgUsrVo"
,
description
=
"机构/部门/人员表"
)
public
class
OrgUsrFormDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"单位id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"单位id"
)
protected
Long
sequenceNbr
;
@ApiModelProperty
(
value
=
"单位名称"
)
private
String
currentUnit
;
@ApiModelProperty
(
value
=
"归属机构/部门"
)
private
String
parentId
;
@ApiModelProperty
(
value
=
"机构/部门名称"
)
private
String
bizOrgName
;
@ApiModelProperty
(
value
=
"机构编码"
)
private
String
bizOrgCode
;
@ApiModelProperty
(
value
=
"amos中公司/部门ID"
)
private
String
amosOrgId
;
@ApiModelProperty
(
value
=
"amos中公司/部门编码"
)
private
String
amosOrgCode
;
@ApiModelProperty
(
value
=
"机构类型`"
)
private
String
bizOrgType
;
@ApiModelProperty
(
value
=
"所属建筑名称"
)
private
String
buildName
;
@ApiModelProperty
(
value
=
"所属建筑ID"
)
private
String
buildId
;
private
Integer
personNum
;
@ApiModelProperty
(
value
=
"动态表单值"
)
private
List
<
FormValue
>
dynamicFormAlert
;
@ApiModelProperty
(
value
=
"单位人员信息值"
)
private
List
<
OrgPersonFormDto
>
children
;
public
List
<
FormValue
>
getDynamicFormAlert
()
{
return
dynamicFormAlert
;
}
@ApiModelProperty
(
value
=
"转换动态表单"
)
private
Map
<
String
,
Object
>
map
=
new
HashMap
<>();;
public
void
setDynamicFormAlert
(
List
<
FormValue
>
dynamicFormAlert
)
{
if
(
dynamicFormAlert
!=
null
)
{
dynamicFormAlert
.
forEach
(
formValue
->{
this
.
map
.
put
(
formValue
.
getKey
(),
formValue
.
getValue
());
});
}
this
.
dynamicFormAlert
=
dynamicFormAlert
;
}
public
OrgUsrFormDto
()
{
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/InputItemServiceImpl.java
View file @
ab82a95b
...
@@ -10,9 +10,11 @@ import com.yeejoin.amos.supervision.business.param.InputItemPageParam;
...
@@ -10,9 +10,11 @@ import com.yeejoin.amos.supervision.business.param.InputItemPageParam;
import
com.yeejoin.amos.supervision.business.service.intfc.ICatalogTreeService
;
import
com.yeejoin.amos.supervision.business.service.intfc.ICatalogTreeService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IInputItemService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IInputItemService
;
import
com.yeejoin.amos.supervision.business.util.DaoCriteria
;
import
com.yeejoin.amos.supervision.business.util.DaoCriteria
;
import
com.yeejoin.amos.supervision.business.util.StringUtil
;
import
com.yeejoin.amos.supervision.business.vo.InputItemTemplateVo
;
import
com.yeejoin.amos.supervision.business.vo.InputItemTemplateVo
;
import
com.yeejoin.amos.supervision.business.vo.InputItemVo
;
import
com.yeejoin.amos.supervision.business.vo.InputItemVo
;
import
com.yeejoin.amos.supervision.business.vo.PointInputItemVo
;
import
com.yeejoin.amos.supervision.business.vo.PointInputItemVo
;
import
com.yeejoin.amos.supervision.common.enums.DictTypeEnum
;
import
com.yeejoin.amos.supervision.core.util.query.BaseQuerySpecification
;
import
com.yeejoin.amos.supervision.core.util.query.BaseQuerySpecification
;
import
com.yeejoin.amos.supervision.dao.entity.InputItem
;
import
com.yeejoin.amos.supervision.dao.entity.InputItem
;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
...
@@ -25,6 +27,7 @@ import org.springframework.stereotype.Service;
...
@@ -25,6 +27,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.util.*
;
import
java.util.*
;
...
@@ -93,6 +96,46 @@ public class InputItemServiceImpl implements IInputItemService {
...
@@ -93,6 +96,46 @@ public class InputItemServiceImpl implements IInputItemService {
}
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
generateDictionaryValue
()
{
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
for
(
Map
<
String
,
String
>
map
:
DictTypeEnum
.
getEnumList
())
{
JSONArray
jsonArray
=
remoteSecurityService
.
listDictionaryByDictCode
(
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
map
.
get
(
"code"
));
Map
<
String
,
Object
>
map1
=
new
HashMap
<>();
List
lists
=
new
LinkedList
();
for
(
int
i
=
0
,
size
=
jsonArray
.
size
();
i
<
size
;
i
++)
{
Map
<
String
,
String
>
m
=
new
HashMap
<>();
JSONObject
jsonObject
=
jsonArray
.
getJSONObject
(
i
);
m
.
put
(
"id"
,
jsonObject
.
get
(
"dictDataKey"
).
toString
());
m
.
put
(
"name"
,
jsonObject
.
get
(
"dictDataValue"
).
toString
());
lists
.
add
(
m
);
}
if
(
"itemClassify"
.
equals
(
map
.
get
(
"code"
)))
{
map1
.
put
(
"CHECK_ITEM_CLASSIFY"
,
lists
);
list
.
add
(
map1
);
}
if
(
"itemType"
.
equals
(
map
.
get
(
"code"
)))
{
map1
.
put
(
"CHECK_ITEM_TYPE"
,
lists
);
list
.
add
(
map1
);
}
if
(
"itemLevel"
.
equals
(
map
.
get
(
"code"
)))
{
map1
.
put
(
"CHECK_ITEM_LEVEL"
,
lists
);
list
.
add
(
map1
);
}
if
(
"checkType"
.
equals
(
map
.
get
(
"code"
)))
{
map1
.
put
(
"CHECK_ITEM_CONTENT"
,
lists
);
list
.
add
(
map1
);
}
}
return
list
;
}
@Override
public
List
getItemParent
(
String
id
)
{
return
inputItemMapper
.
getInputItemParent
(
id
);
}
@Override
public
List
<
InputItem
>
queryInputItemByCondition
(
List
<
DaoCriteria
>
criterias
)
{
public
List
<
InputItem
>
queryInputItemByCondition
(
List
<
DaoCriteria
>
criterias
)
{
BaseQuerySpecification
<
InputItem
>
specification
=
new
BaseQuerySpecification
<>(
criterias
);
BaseQuerySpecification
<
InputItem
>
specification
=
new
BaseQuerySpecification
<>(
criterias
);
return
inputItemDao
.
findAll
(
specification
);
return
inputItemDao
.
findAll
(
specification
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PointServiceImpl.java
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
...
@@ -20,6 +21,8 @@ import com.yeejoin.amos.supervision.business.dao.repository.IPointInputItemDao;
...
@@ -20,6 +21,8 @@ import com.yeejoin.amos.supervision.business.dao.repository.IPointInputItemDao;
import
com.yeejoin.amos.supervision.business.dao.repository.IPointPhotoDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPointPhotoDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointItemDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointItemDao
;
import
com.yeejoin.amos.supervision.business.dto.FormValue
;
import
com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.supervision.business.dto.PointDto
;
import
com.yeejoin.amos.supervision.business.dto.PointDto
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckPtListBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckPtListBo
;
import
com.yeejoin.amos.supervision.business.feign.EquipFeign
;
import
com.yeejoin.amos.supervision.business.feign.EquipFeign
;
...
@@ -1118,45 +1121,53 @@ public class PointServiceImpl implements IPointService {
...
@@ -1118,45 +1121,53 @@ public class PointServiceImpl implements IPointService {
}
}
@Override
@Override
public
void
syncSavePoint
(
List
<
MaintenanceResourceData
>
list
,
String
orgCode
,
String
userId
)
{
public
void
syncSavePoint
(
OrgUsrFormDto
orgUsrFormDto
,
String
orgCode
,
String
userId
)
{
List
<
Point
>
points
=
new
ArrayList
<>();
List
<
Point
>
points
=
new
ArrayList
<>();
List
<
PointInputItem
>
inputItems
=
new
ArrayList
<>();
List
<
PointInputItem
>
inputItems
=
new
ArrayList
<>();
List
<
Long
>
ids
=
new
ArrayList
<
Long
>();
List
<
Long
>
ids
=
new
ArrayList
<
Long
>();
for
(
MaintenanceResourceData
x
:
list
)
{
Point
point
=
new
Point
();
Point
point
=
new
Point
();
String
pointNo
=
StringUtil
.
isNotEmpty
(
orgUsrFormDto
.
getSequenceNbr
())
?
String
.
valueOf
(
orgUsrFormDto
.
getSequenceNbr
())
:
String
.
valueOf
(
sequence
.
nextId
());
String
pointNo
=
StringUtil
.
isNotEmpty
(
x
.
getFireFacilityCode
())
?
x
.
getFireFacilityCode
()
:
String
.
valueOf
(
sequence
.
nextId
());
point
.
setName
(
orgUsrFormDto
.
getBizOrgName
());
String
originalId
=
String
.
valueOf
(
x
.
getFireFacilityId
());
point
.
setPointNo
(
pointNo
);
point
.
setOriginalId
(
originalId
);
point
.
setOrgCode
(
orgUsrFormDto
.
getBizOrgCode
());
point
.
setName
(
x
.
getFireFacilityName
());
point
.
setBuildingId
(
orgUsrFormDto
.
getBuildId
());
point
.
setPointNo
(
pointNo
);
point
.
setBuildingName
(
orgUsrFormDto
.
getBuildName
());
point
.
setEquipmentId
(
x
.
getClassifyId
()
==
null
?
""
:
x
.
getClassifyId
().
toString
());
point
.
setOriginalId
(
orgUsrFormDto
.
getParentId
());
point
.
setEquipmentName
(
x
.
getClassifyName
());
String
data
=
JSON
.
toJSONString
(
orgUsrFormDto
.
getMap
());
point
.
setBelongSystemId
(
x
.
getFireFightSysId
()
==
null
?
""
:
x
.
getFireFightSysId
().
toString
());
point
.
setExtendJson
(
data
);
point
.
setBelongSystemName
(
x
.
getFireFightSysName
());
point
.
setOwnerId
(
pointNo
);
point
.
setOwnerId
(
String
.
valueOf
(
x
.
getOwnerUnitId
()));
point
.
setOwnerName
(
orgUsrFormDto
.
getBizOrgName
());
point
.
setOwnerName
(
x
.
getOwnerUnitName
());
if
(
0
<
orgUsrFormDto
.
getDynamicFormAlert
().
size
())
{
point
.
setAddress
(
x
.
getLocation
());
for
(
FormValue
formValue
:
orgUsrFormDto
.
getDynamicFormAlert
())
{
point
.
setLevel
(
""
);
if
(
"longitude"
.
equals
(
formValue
.
getKey
()))
{
point
.
setCreatorId
(
userId
);
point
.
setLongitude
(
formValue
.
getValue
());
point
.
setOrgCode
(
orgCode
);
}
points
.
add
(
point
);
if
(
"latitude"
.
equals
(
formValue
.
getKey
()))
{
Long
id
=
iPointDao
.
findPointByEquipmentIdAndFireFacilityId
(
pointNo
,
originalId
);
point
.
setLatitude
(
formValue
.
getValue
());
if
(
null
!=
id
)
{
}
ids
.
add
(
id
);
if
(
"companyLocation"
.
equals
(
formValue
.
getKey
()))
{
iPointDao
.
delPointBIds
(
id
);
point
.
setAddress
(
formValue
.
getValue
());
}
}
iPointDao
.
save
(
point
);
List
<
InputItem
>
inputItemVos
=
inputItemMapper
.
getInputItemByEquipmentName
(
x
.
getClassifyName
(),
orgCode
);
if
(
0
<
inputItemVos
.
size
())
{
inputItemVos
.
forEach
(
y
->
{
PointInputItem
inputItem
=
new
PointInputItem
();
inputItem
.
setPointId
(
point
.
getId
());
inputItem
.
setOrderNo
(
y
.
getOrderNo
());
inputItem
.
setInputItemId
(
y
.
getId
());
inputItems
.
add
(
inputItem
);
});
}
}
}
}
point
.
setOrgCode
(
orgUsrFormDto
.
getAmosOrgCode
());
points
.
add
(
point
);
Long
id
=
iPointDao
.
findPointByEquipmentIdAndFireFacilityId
(
pointNo
,
point
.
getOriginalId
());
if
(
null
!=
id
)
{
ids
.
add
(
id
);
iPointDao
.
delPointBIds
(
id
);
}
iPointDao
.
save
(
point
);
List
<
InputItem
>
inputItemVos
=
inputItemMapper
.
getInputItemByEquipmentName
(
point
.
getName
(),
orgCode
);
if
(
0
<
inputItemVos
.
size
())
{
inputItemVos
.
forEach
(
y
->
{
PointInputItem
inputItem
=
new
PointInputItem
();
inputItem
.
setPointId
(
point
.
getId
());
inputItem
.
setOrderNo
(
y
.
getOrderNo
());
inputItem
.
setInputItemId
(
y
.
getId
());
inputItems
.
add
(
inputItem
);
});
}
if
(
0
<
ids
.
size
())
{
if
(
0
<
ids
.
size
())
{
iPointInputItemDao
.
deleteByPointId
(
ids
);
iPointInputItemDao
.
deleteByPointId
(
ids
);
}
}
...
@@ -1183,4 +1194,12 @@ public class PointServiceImpl implements IPointService {
...
@@ -1183,4 +1194,12 @@ public class PointServiceImpl implements IPointService {
Pageable
pageable
=
new
CommonPageable
(
pointPage
.
getNumber
(),
pointPage
.
getSize
(),
pointPage
.
getSort
());
Pageable
pageable
=
new
CommonPageable
(
pointPage
.
getNumber
(),
pointPage
.
getSize
(),
pointPage
.
getSort
());
return
new
PageImpl
<>(
pointDtos
,
pageable
,
pointPage
.
getTotalElements
());
return
new
PageImpl
<>(
pointDtos
,
pageable
,
pointPage
.
getTotalElements
());
}
}
@Override
public
void
delPointByPointNo
(
Long
id
)
{
List
<
Long
>
idLists
=
new
ArrayList
<>();
idLists
=
iPointDao
.
findPointByPointNo
(
String
.
valueOf
(
id
));
iPointInputItemDao
.
deleteByPointId
(
idLists
);
iPointDao
.
delPointByPointNo
(
id
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IInputItemService.java
View file @
ab82a95b
...
@@ -112,4 +112,8 @@ public interface IInputItemService {
...
@@ -112,4 +112,8 @@ public interface IInputItemService {
Boolean
uploadListByTemplate
(
List
<
InputItemTemplateVo
>
itemTemplateVoList
,
String
orgCode
,
String
userId
)
throws
Exception
;
Boolean
uploadListByTemplate
(
List
<
InputItemTemplateVo
>
itemTemplateVoList
,
String
orgCode
,
String
userId
)
throws
Exception
;
Integer
insertList
(
List
<
InputItem
>
list
);
Integer
insertList
(
List
<
InputItem
>
list
);
List
generateDictionaryValue
();
List
getItemParent
(
String
id
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IPointService.java
View file @
ab82a95b
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
intfc
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.supervision.business.dto.PointDto
;
import
com.yeejoin.amos.supervision.business.dto.PointDto
;
import
com.yeejoin.amos.supervision.business.param.*
;
import
com.yeejoin.amos.supervision.business.param.*
;
import
com.yeejoin.amos.supervision.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckPtListPageParam
;
...
@@ -309,7 +310,7 @@ public interface IPointService {
...
@@ -309,7 +310,7 @@ public interface IPointService {
LinkedHashMap
<
String
,
Object
>
getRegionTress
();
LinkedHashMap
<
String
,
Object
>
getRegionTress
();
void
syncSavePoint
(
List
<
MaintenanceResourceData
>
list
,
String
orgCode
,
String
userId
);
void
syncSavePoint
(
OrgUsrFormDto
orgUsrFormDto
,
String
orgCode
,
String
userId
);
/**
/**
* 查询巡检点及点及点的项
* 查询巡检点及点及点的项
* @param queryRequests 请求参数
* @param queryRequests 请求参数
...
@@ -319,4 +320,11 @@ public interface IPointService {
...
@@ -319,4 +320,11 @@ public interface IPointService {
*/
*/
Page
<
PointDto
>
queryPointInfoWithItem
(
List
<
DaoCriteria
>
queryRequests
,
CommonPageable
commonPageable
,
Long
ownerId
);
Page
<
PointDto
>
queryPointInfoWithItem
(
List
<
DaoCriteria
>
queryRequests
,
CommonPageable
commonPageable
,
Long
ownerId
);
/**
* 删除巡检点
*
* @param ids
*/
void
delPointByPointNo
(
Long
id
);
}
}
amos-boot-system-supervision/src/main/resources/db/changelog/mt-1.0.0.xml
View file @
ab82a95b
...
@@ -16,4 +16,76 @@
...
@@ -16,4 +16,76 @@
ALTER TABLE p_point ADD COLUMN `last_check_id` varchar(32) DEFAULT NULL COMMENT '最近检查记录(漏检不算)' AFTER `original_id`;
ALTER TABLE p_point ADD COLUMN `last_check_id` varchar(32) DEFAULT NULL COMMENT '最近检查记录(漏检不算)' AFTER `original_id`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629261435-1"
runOnChange=
"true"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"check_type"
/>
</not>
</preConditions>
<comment>
p_input_item ADD COLUMN check_type
</comment>
<sql>
ALTER TABLE p_input_item ADD COLUMN `check_type` varchar(32) DEFAULT NULL COMMENT '检查类别' AFTER `test_requirement`;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629261435-2"
runOnChange=
"true"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"item_parent"
/>
</not>
</preConditions>
<comment>
p_input_item ADD COLUMN item_parent
</comment>
<sql>
ALTER TABLE p_input_item ADD COLUMN `item_parent` varchar(50) DEFAULT NULL COMMENT '父类检查项id' AFTER `check_type`;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629261435-3"
runOnChange=
"true"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"item_classify"
/>
</not>
</preConditions>
<comment>
p_input_item ADD COLUMN item_classify
</comment>
<sql>
ALTER TABLE p_input_item ADD COLUMN `item_classify` varchar(50) DEFAULT NULL COMMENT '检查项分类' AFTER `item_parent`;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629261435-4"
runOnChange=
"true"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"item_type_classify"
/>
</not>
</preConditions>
<comment>
p_input_item ADD COLUMN item_type_classify
</comment>
<sql>
ALTER TABLE p_input_item ADD COLUMN `item_type_classify` varchar(50) DEFAULT NULL COMMENT '适用检查类别' AFTER `item_classify`;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629261435-5"
runOnChange=
"true"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"item_level"
/>
</not>
</preConditions>
<comment>
p_input_item ADD COLUMN item_level
</comment>
<sql>
ALTER TABLE p_input_item ADD COLUMN `item_level` varchar(50) DEFAULT NULL COMMENT '检查项等级' AFTER `item_type_classify`;
</sql>
</changeSet>
<changeSet
author=
"keyong"
id=
"1629261435-6"
runOnChange=
"true"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"item_start"
/>
</not>
</preConditions>
<comment>
p_input_item ADD COLUMN item_start
</comment>
<sql>
ALTER TABLE p_input_item ADD COLUMN `item_start` bit(1) DEFAULT b'0' COMMENT '检查项状态' AFTER `item_level`;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
ab82a95b
...
@@ -94,7 +94,8 @@
...
@@ -94,7 +94,8 @@
a.test_requirement,
a.test_requirement,
a.check_method,
a.check_method,
a.create_date,
a.create_date,
a.input_classify
a.input_classify,
a.check_type
from
from
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
where a.is_delete = '0'
where a.is_delete = '0'
...
@@ -226,9 +227,9 @@
...
@@ -226,9 +227,9 @@
from
from
p_input_item pii
p_input_item pii
where is_delete = '0' and input_type = 1 and equipment_name=#{equipmentName}
where is_delete = '0' and input_type = 1 and equipment_name=#{equipmentName}
<if
test=
"orgCode!=null and orgCode !=''"
>
<!-- <if test="orgCode!=null and orgCode !=''">--
>
and org_Code = #{orgCode}
<!-- and org_Code = #{orgCode}-->
</if
>
<!-- </if>--
>
</select>
</select>
<insert
id=
"insertList"
parameterType=
"java.util.List"
>
<insert
id=
"insertList"
parameterType=
"java.util.List"
>
INSERT INTO p_input_item (
INSERT INTO p_input_item (
...
@@ -260,4 +261,18 @@
...
@@ -260,4 +261,18 @@
)
)
</foreach>
</foreach>
</insert>
</insert>
<select
id=
"getInputItemParent"
resultType=
"com.yeejoin.amos.supervision.business.vo.InputItemVo"
>
SELECT
pii.id AS id,
pii.name AS name
FROM
p_input_item pii
WHERE
1=1
<if
test=
"id !=null and id !=''"
>
AND pii.id != #{id}
</if>
ORDER BY create_date DESC;
</select>
</mapper>
</mapper>
\ No newline at end of file
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