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
c19ca472
Commit
c19ca472
authored
Aug 20, 2021
by
李成龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
c3a5c80e
04ddc68d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
441 additions
and
264 deletions
+441
-264
CurrentStatusDto.java
...oin/amos/boot/module/common/api/dto/CurrentStatusDto.java
+9
-0
DynamicFormInitDto.java
...n/amos/boot/module/common/api/dto/DynamicFormInitDto.java
+4
-1
FailureRepairlogDto.java
.../amos/boot/module/common/api/dto/FailureRepairlogDto.java
+1
-2
StatusDto.java
...om/yeejoin/amos/boot/module/common/api/dto/StatusDto.java
+9
-0
UserUnitDto.java
.../yeejoin/amos/boot/module/common/api/dto/UserUnitDto.java
+29
-0
FailureRepairlog.java
.../amos/boot/module/common/api/entity/FailureRepairlog.java
+0
-2
UserRolesEnum.java
...join/amos/boot/module/common/api/enums/UserRolesEnum.java
+31
-0
UserUnitTypeEnum.java
...n/amos/boot/module/common/api/enums/UserUnitTypeEnum.java
+15
-0
FailureDetailsMapper.java
...s/boot/module/common/api/mapper/FailureDetailsMapper.java
+33
-0
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+7
-0
IOrgUsrService.java
...n/amos/boot/module/common/api/service/IOrgUsrService.java
+51
-29
FailureDetailsMapper.xml
...on-api/src/main/resources/mapper/FailureDetailsMapper.xml
+69
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+66
-2
FailureAuditController.java
.../module/common/biz/controller/FailureAuditController.java
+0
-31
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+2
-2
FailureMaintainController.java
...dule/common/biz/controller/FailureMaintainController.java
+4
-69
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+0
-0
DynamicFormColumnServiceImpl.java
...common/biz/service/impl/DynamicFormColumnServiceImpl.java
+15
-0
FailureAuditServiceImpl.java
...dule/common/biz/service/impl/FailureAuditServiceImpl.java
+13
-28
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+0
-0
FailureMaintainServiceImpl.java
...e/common/biz/service/impl/FailureMaintainServiceImpl.java
+6
-77
FailureVerifyServiceImpl.java
...ule/common/biz/service/impl/FailureVerifyServiceImpl.java
+3
-16
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+0
-0
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+2
-1
OpreateLogEventHandler.java
...dule/jcs/biz/controller/event/OpreateLogEventHandler.java
+48
-0
pom.xml
amos-boot-module/amos-boot-module-biz/pom.xml
+15
-1
application.properties
...boot-system-jcs/src/main/resources/application.properties
+1
-2
mt-sql-task.xml
...intenance/src/main/resources/db/changelog/mt-sql-task.xml
+8
-1
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/CurrentStatusDto.java
0 → 100644
View file @
c19ca472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
lombok.Data
;
@Data
public
class
CurrentStatusDto
{
private
String
cutrentStatusName
;
private
Integer
cutrentStatusCount
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/DynamicFormInitDto.java
View file @
c19ca472
...
...
@@ -37,11 +37,14 @@ public class DynamicFormInitDto implements Serializable{
@ApiModelProperty
(
value
=
"提交表单附加字段"
)
private
DynamicFormInstanceDto
formItemDescr
;
@ApiModelProperty
(
value
=
"
接口地址
"
)
@ApiModelProperty
(
value
=
"
配置
"
)
private
String
columnConfig
;
private
int
sort
;
@ApiModelProperty
(
value
=
"接口地址"
)
private
String
url
;
public
DynamicFormInitDto
()
{
super
();
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FailureRepairlogDto.java
View file @
c19ca472
...
...
@@ -24,7 +24,6 @@ public class FailureRepairlogDto extends BaseDto {
@ApiModelProperty
(
value
=
"流程处理人Id"
)
private
Integer
processAuditorId
;
@ApiModelProperty
(
value
=
"处理人所属部门"
)
private
String
processDepartment
;
...
...
@@ -41,6 +40,6 @@ public class FailureRepairlogDto extends BaseDto {
private
Long
faultId
;
@ApiModelProperty
(
value
=
"流程处理人"
)
private
String
processAuditor
Cid
;
private
String
processAuditor
Name
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/StatusDto.java
0 → 100644
View file @
c19ca472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
lombok.Data
;
@Data
public
class
StatusDto
{
private
Integer
currentStatus
;
private
Integer
currentStatusCount
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/UserUnitDto.java
0 → 100644
View file @
c19ca472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 单位归属
*
* @author gaojianqiang
* @date 2021-08-19
*/
@Data
@ApiModel
(
value
=
"UserUnitDto"
,
description
=
"用户单位归属"
)
public
class
UserUnitDto
{
@ApiModelProperty
(
value
=
"人员类型1-维保公司;2-业主单位"
)
private
String
identityType
;
@ApiModelProperty
(
value
=
"人员id"
)
private
String
personSeq
;
@ApiModelProperty
(
value
=
"人员名称"
)
private
String
personName
;
@ApiModelProperty
(
value
=
"公司id"
)
private
String
companyId
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/FailureRepairlog.java
View file @
c19ca472
...
...
@@ -62,6 +62,4 @@ public class FailureRepairlog extends BaseEntity {
@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/enums/UserRolesEnum.java
0 → 100644
View file @
c19ca472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
enums
;
public
enum
UserRolesEnum
{
ADMIN
(
"admin"
,
"机场单位"
),
AIRPORTUNIT
(
"AIRPORTUNIT"
,
"机场单位"
);
private
String
code
;
private
String
name
;
UserRolesEnum
(
String
code
,
String
name
){
this
.
code
=
code
;
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/UserUnitTypeEnum.java
0 → 100644
View file @
c19ca472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
enums
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
UserUnitTypeEnum
{
MAINTENANCE_COMPANY
(
"1"
,
"维保公司"
),
OWNER_UNIT
(
"2"
,
"业主单位"
);
private
String
value
;
private
String
name
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/FailureDetailsMapper.java
View file @
c19ca472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureDetailsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.StatusDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FailureDetails
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* Mapper 接口
...
...
@@ -10,4 +19,28 @@ import com.yeejoin.amos.boot.module.common.api.entity.FailureDetails;
* @date 2021-08-04
*/
public
interface
FailureDetailsMapper
extends
BaseMapper
<
FailureDetails
>
{
/**
*查询全部 分页
* @param page
* @return
*/
IPage
<
FailureDetails
>
selectAllPage
(
Page
page
);
/**
*查询我发起的 分页
* current 当前页
* size 条数
* @return
*/
IPage
<
FailureDetails
>
selectISubPage
(
Page
page
,
String
submissionPid
);
/**
*查询待处理 分页
* @param page
* @return
*/
IPage
<
FailureDetails
>
selectInProcessing
(
Page
page
);
List
<
StatusDto
>
selectStatusCount
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
c19ca472
...
...
@@ -63,4 +63,11 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List
<
Map
<
String
,
Object
>>
getparent
();
List
<
OrgUsrExcelDto
>
exportToExcel
();
/**
* 查询单位基本信息列表和单位下所有的重点部位数量。
*/
List
<
OrgUsrTreeDto
>
getCompanyAndKeySite
(
Long
companyId
);
List
<
UserUnitDto
>
getUserUnit
(
String
id
,
String
type
,
String
code
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IOrgUsrService.java
View file @
c19ca472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
service
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.Map
;
/**
* 机构/部门/人员表 服务类
...
...
@@ -21,6 +18,7 @@ import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
public
interface
IOrgUsrService
{
/**
* 查询上级单位
*
* @param parent_id
* @return
*/
...
...
@@ -28,6 +26,7 @@ public interface IOrgUsrService {
/**
* 获取父级
*
* @param topId
* @param entityList
* @param packageURL
...
...
@@ -44,6 +43,7 @@ public interface IOrgUsrService {
/**
* 获取子数据集合
*
* @param topId
* @param entityList
* @param packageURL
...
...
@@ -60,6 +60,7 @@ public interface IOrgUsrService {
/**
* 组装融合调度单位人员信息
*
* @param ids
* @return
* @throws Exception
...
...
@@ -68,6 +69,7 @@ public interface IOrgUsrService {
/**
* 获取动态表单数据
*
* @param id
* @return
* @throws Exception
...
...
@@ -76,17 +78,19 @@ public interface IOrgUsrService {
/**
* 保存 机构/部门/人员基本信息
*
* @param
* @throws Exception
*/
void
saveOrgUsr
(
OrgUsr
orgUsr
,
OrgUsr
oriOrgUsr
)
throws
Exception
;
void
saveOrgUsr
(
OrgUsr
orgUsr
,
OrgUsr
oriOrgUsr
)
throws
Exception
;
/**
* 新增机构/部门/人员基本信息和动态表单数据
*
* @param orgUsr
* @param alertFromValuelist
*/
void
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
throws
Exception
;
void
saveOrgUsrDynamicFormInstance
(
OrgUsr
orgUsr
,
List
<
DynamicFormInstance
>
alertFromValuelist
)
throws
Exception
;
/**
* 更新机构/部门/人员基本信息和动态表单数据
...
...
@@ -95,32 +99,31 @@ public interface IOrgUsrService {
* @param fromValueList 动态表单数据列表
* @throws Exception
*/
void
updateDynamicFormInstance
(
Long
instanceId
,
List
<
DynamicFormInstance
>
fromValueList
)
throws
Exception
;
void
updateDynamicFormInstance
(
Long
instanceId
,
List
<
DynamicFormInstance
>
fromValueList
)
throws
Exception
;
/**
*
* @param id
* @throws Exception
*/
Map
<
String
,
Object
>
selectForShowById
(
OrgUsr
orgUsr
,
Long
id
)
throws
Exception
;
Map
<
String
,
Object
>
selectForShowById
(
OrgUsr
orgUsr
,
Long
id
)
throws
Exception
;
List
<
OrgUsr
>
selectCompanyDepartmentMsg
();
void
saveOrgUsr
(
OrgUsrDto
OrgUsrDto
)
throws
Exception
;
void
saveOrgUsr
(
OrgUsrDto
OrgUsrDto
)
throws
Exception
;
void
saveOrgPerson
(
OrgPersonDto
OrgPersonDto
)
throws
Exception
;
void
saveOrgPerson
(
OrgPersonDto
OrgPersonDto
)
throws
Exception
;
void
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrDto
,
Long
id
)
throws
Exception
;
void
updateByIdOrgUsr
(
OrgUsrDto
OrgUsrDto
,
Long
id
)
throws
Exception
;
void
updateByIdOrgPerson
(
OrgPersonDto
OrgPersonDto
,
Long
id
)
throws
Exception
;
void
updateByIdOrgPerson
(
OrgPersonDto
OrgPersonDto
,
Long
id
)
throws
Exception
;
OrgUsrFormDto
selectCompanyById
(
Long
id
)
throws
Exception
;
IPage
bizOrgTypeListPage
(
String
pageNum
,
String
pageSize
,
String
bizOrgType
)
throws
Exception
;
void
saveDepartment
(
List
<
OrgDepartmentDto
>
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
void
saveDepartment
(
List
<
OrgDepartmentDto
>
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
void
saveCompany
(
List
<
OrgUsrDto
>
OrgUsrDto
)
throws
Exception
;
void
saveCompany
(
List
<
OrgUsrDto
>
OrgUsrDto
)
throws
Exception
;
OrgPersonFormDto
selectPersonById
(
Long
id
)
throws
Exception
;
...
...
@@ -128,11 +131,11 @@ public interface IOrgUsrService {
List
<
OrgMenuDto
>
selectPersonTree
()
throws
Exception
;
void
savePersonList
(
List
<
OrgPersonDto
>
OrgPersonDto
)
throws
Exception
;
void
savePersonList
(
List
<
OrgPersonDto
>
OrgPersonDto
)
throws
Exception
;
void
saveOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
)
throws
Exception
;
void
updateByIdOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
void
updateByIdOrgDepartment
(
OrgDepartmentDto
OrgDepartmentDto
,
Long
id
)
throws
Exception
;
OrgDepartmentFormDto
selectDepartmentById
(
Long
id
)
throws
Exception
;
...
...
@@ -141,18 +144,19 @@ public interface IOrgUsrService {
/**
* * @param null
* @return
*
<PRE>
*
* @return
<PRE>
* author tw
* date 2021/7/20
* </PRE>
* 列表
*/
List
<
CompanyDto
>
listContractDto
(
Integer
pageNum
,
Integer
pageSize
,
RequestData
requestData
);
/**
* * @param null
* @return
*
<PRE>
*
* @return
<PRE>
* author tw
* date 2021/7/20
* </PRE>
...
...
@@ -162,8 +166,8 @@ public interface IOrgUsrService {
/**
* * @param null
* @return
*
<PRE>
*
* @return
<PRE>
* author tw
* date 2021/7/26
* </PRE>
...
...
@@ -171,9 +175,27 @@ public interface IOrgUsrService {
List
<
OrgUsrzhDto
>
getOrgUsrzhDto
(
String
name
);
List
<
ESOrgUsrDto
>
selectByIddata
(
String
name
);
List
<
Map
<
String
,
Object
>>
getparent
();
List
<
OrgUsrExcelDto
>
exportToExcel
();
List
<
Map
<
String
,
Object
>>
getparent
();
List
<
OrgUsrExcelDto
>
exportToExcel
();
UserUnitDto
getUserUnit
(
String
id
,
String
type
,
String
code
);
/**
* 根据登陆人获取公司部门人员树
*/
List
<
OrgMenuDto
>
companyUserTreeByUser
(
AgencyUserModel
user
);
/**
* 根据登陆人获取公司部门树
*/
List
<
OrgMenuDto
>
companyTreeByUser
(
AgencyUserModel
user
);
/**
* 根据登陆人获取公司列表(关联重点部位)
*/
List
<
OrgUsrTreeDto
>
companyListByUser
(
AgencyUserModel
user
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FailureDetailsMapper.xml
View file @
c19ca472
<?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.FailureDetailsMapper"
>
<select
id=
"selectAllPage"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.FailureDetails"
>
SELECT
sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM
cb_failure_details
</select>
<select
id=
"selectISubPage"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.FailureDetails"
>
SELECT
sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM
cb_failure_details
WHERE
submission_pid = #{submissionPid}
</select>
<select
id=
"selectInProcessing"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.FailureDetails"
>
SELECT
sequence_nbr,
current_status,
failure_equipment_id,
failure_equipment,
fault_time,
fault_phenomenon,
submission_name,
submission_pid,
biz_code,
submission_time,
submission_branch,
submission_branch_id
FROM
cb_failure_details
WHERE
is_delete = 0
</select>
<select
id=
"selectStatusCount"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.StatusDto"
>
SELECT
cb_failure_details.current_status ,
count(cb_failure_details.current_status)
AS currentStatusCount
FROM
cb_failure_details
GROUP BY
cb_failure_details.current_status
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
c19ca472
...
...
@@ -307,8 +307,28 @@ LEFT JOIN (
FROM important_companys
</select>
<select
id=
"getUserUnit"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.UserUnitDto"
>
SELECT
u.sequence_nbr AS personSeq,
u.biz_org_name AS personName,
'2' AS identityType,
IFNULL( LEFT ( u.biz_org_code, 6 ), '' ) AS companyId
FROM
`cb_org_usr` u
<where>
<if
test=
"id != null and id != ''"
>
u.amos_org_id = #{id}
</if>
<if
test=
"type != null and type != ''"
>
AND u.biz_org_type = #{type}
</if>
<if
test=
"code != null and code != ''"
>
AND u.biz_org_code LIKE CONCAT(#{code}, '%')
</if>
</where>
ORDER BY
u.sequence_nbr DESC
</select>
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto"
>
select
a.biz_org_name bizOrgName,
...
...
@@ -335,5 +355,49 @@ LEFT JOIN (
on b.instance_id=a.sequence_nbr where a.biz_org_name is not null
</select>
<select
id=
"getCompanyAndKeySite"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrTreeDto"
>
SELECT
company_sur.sequence_nbr as sequenceNbr,
company_sur.biz_org_name as bizOrgName ,
company_sur.parent_id as parentId,
company_sur.biz_org_type as bizOrgType,
-- cb.field_value_label,
CASE
WHEN keysite_sur.num IS NULL THEN
0
ELSE
keysite_sur.num
END AS num
FROM
(
SELECT
company.sequence_nbr,
company.parent_id,
company.biz_org_name,
company.biz_org_type
FROM
cb_org_usr company
WHERE
(company.biz_org_type = 'COMPANY' OR company.biz_org_type = 'DEPARTMENT')
AND company.is_delete = FALSE
<if
test=
"companyId != null and companyId != ''"
>
AND biz_org_code LIKE CONCAT((SELECT biz_org_code FROM cb_org_usr WHERE sequence_nbr = #{companyId}),'%')
</if>
) company_sur
LEFT JOIN (
SELECT
keysite.belong_id,
COUNT(keysite.belong_id) as num
FROM
cb_key_site keysite
WHERE
keysite.is_delete = FALSE
GROUP BY
keysite.belong_id
) keysite_sur ON company_sur.sequence_nbr = keysite_sur.belong_id
-- LEFT JOIN cb_dynamic_form_instance as cb ON company_sur.sequence_nbr = cb.instance_id where field_code = 'companyNature'
</select>
</mapper>
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 @
c19ca472
...
...
@@ -49,8 +49,6 @@ public class FailureAuditController extends BaseController {
}
}
/**
* 根据sequenceNbr查询
*
...
...
@@ -64,35 +62,6 @@ public class FailureAuditController extends BaseController {
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
FailureAuditDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
FailureAuditDto
>
page
=
new
Page
<
FailureAuditDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
queryForFailureAuditPage
(
page
));
}
/**
* 列表全部数据查询
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
FailureAuditDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
failureAuditServiceImpl
.
queryForFailureAuditList
());
}
/**
* 审核列表记录查询
...
...
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 @
c19ca472
...
...
@@ -181,8 +181,8 @@ public class FailureDetailsController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询当前状态任务数量"
,
notes
=
"查询当前状态任务数量"
)
@GetMapping
(
value
=
"/list/count"
)
public
ResponseModel
<
List
<
FailureStatusCountDto
>>
selectStatusCount
(
@RequestParam
Integer
type
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryStatusCount
(
type
));
public
ResponseModel
<
Object
>
selectStatusCount
(
)
{
return
ResponseHelper
.
buildResponse
(
failureDetailsServiceImpl
.
queryStatusCount
());
}
...
...
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 @
c19ca472
...
...
@@ -2,23 +2,23 @@ package com.yeejoin.amos.boot.module.common.biz.controller;
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.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.FailureMaintainDto
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FailureMaintainServiceImpl
;
...
...
@@ -59,71 +59,6 @@ public class FailureMaintainController extends BaseController {
}
/**
* 根据sequenceNbr更新
* 根据传递的Status状态确认验收状态
*
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/verify"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"验收操作"
,
notes
=
"根据sequenceNbr更新"
)
public
Object
updateBySequenceNbrFailureMaintain
(
@RequestBody
FailureMaintainDto
model
)
{
try
{
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
updateModel
(
model
,
getSelectedOrgInfo
()));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
ResponseHelper
.
buildResponse
(
false
);
}
}
/*
*/
/**
* 根据sequenceNbr更新
* 根据传递的Status状态确认验收状态
*
* @param sequenceNbr 主键
* @return
*//*
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/update/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "维修完成", notes = "根据sequenceNbr更新")
public Object updateByFailureMaintain(@RequestBody FailureMaintainDto model,@PathVariable(value = "sequenceNbr") Long sequenceNbr) {
model.setSequenceNbr(sequenceNbr);
try {
return ResponseHelper.buildResponse(failureMaintainServiceImpl.updateStatus(model,getSelectedOrgInfo()));
} catch (Exception e) {
return ResponseHelper.buildResponse(false);
}
}
*/
/**
* 列表分页查询
*
* @param current 当前页
* @param current 每页大小
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
FailureMaintainDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
FailureMaintainDto
>
page
=
new
Page
<
FailureMaintainDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
failureMaintainServiceImpl
.
queryForFailureMaintainPage
(
page
));
}
/**
* 维修列表记录查询
*根据关联主表faultId查询
* @return
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
c19ca472
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DynamicFormColumnServiceImpl.java
View file @
c19ca472
...
...
@@ -66,6 +66,7 @@ public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnD
QueryWrapper
<
DynamicFormColumn
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"group_code"
,
code
);
queryWrapper
.
eq
(
"is_delete"
,
false
);
queryWrapper
.
orderByAsc
(
"sort"
);
List
<
DynamicFormColumn
>
dynamicFormColumn
=
this
.
list
(
queryWrapper
);
List
<
DynamicFormInitDto
>
listForm
=
new
ArrayList
<
DynamicFormInitDto
>();
...
...
@@ -161,6 +162,20 @@ public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnD
vo
.
setSort
(
dynamicFormValue
.
getSort
());
listForm
.
add
(
vo
);
break
;
case
"url"
:
vo
=
new
DynamicFormInitDto
(
dynamicForm
.
getFieldCode
(),
dynamicForm
.
getFieldName
(),
dynamicForm
.
getFieldType
(),
new
SelectItems
(
new
ArrayList
<>()),
columnConfigJson
.
toJSONString
());
vo
.
setUrl
(
columnConfigJson
.
getString
(
"url"
));
dynamicFormValue
=
new
DynamicFormInstanceDto
();
BeanUtils
.
copyProperties
(
dynamicForm
,
dynamicFormValue
);
dynamicFormValue
.
setSequenceNbr
(
null
);
dynamicFormValue
.
setFormColumnId
(
dynamicForm
.
getSequenceNbr
());
dynamicFormValue
.
setAppKey
(
appKey
);
vo
.
setFormItemDescr
(
dynamicFormValue
);
vo
.
setSort
(
dynamicFormValue
.
getSort
());
listForm
.
add
(
vo
);
break
;
default
:
vo
=
new
DynamicFormInitDto
(
dynamicForm
.
getFieldCode
(),
dynamicForm
.
getFieldName
(),
dynamicForm
.
getFieldType
(),
new
SelectItems
(
new
ArrayList
<>()),
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 @
c19ca472
...
...
@@ -44,21 +44,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
@Autowired
FailureRepairlogServiceImpl
failureRepairlogService
;
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FailureAuditServiceImpl
.
class
);
/**
* 分页查询
*/
public
Page
<
FailureAuditDto
>
queryForFailureAuditPage
(
Page
<
FailureAuditDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
FailureAuditDto
>
queryForFailureAuditList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 发起审核
...
...
@@ -75,23 +61,23 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
FailureDetailsDto
failureDetailsDto
=
failureDetailsService
.
queryBySeq
(
model
.
getFaultId
());
int
auditResult
=
0
;
Boolean
repairResult
=
null
;
//根据审核的结果进行业务操作
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
userInfo
.
getDepartment
().
getSequenceNbr
().
equals
(
failureDetailsDto
.
getBizCode
()))
{
auditResult
=
AuditResultEnum
.
AGREE
.
getCode
();
Boolean
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_AUDIT
,
userInfo
,
condition
);
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_AUDIT
,
userInfo
,
condition
);
}
else
if
(
condition
==
(
AuditResultEnum
.
REFUSE
.
getCode
()))
{
auditResult
=
AuditResultEnum
.
REFUSE
.
getCode
();
Boolean
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
REFUSE
,
userInfo
,
condition
);
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
);
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
);
repairResult
=
updateStatus
(
model
,
FailureStatuEnum
.
WAITING_MAINTAIN
,
userInfo
,
condition
);
}
if
(
ObjectUtils
.
isEmpty
(
auditResult
)
)
{
if
(
!
repairResult
)
{
throw
new
Exception
(
"添加报修日志失败"
);
}
model
.
setAuditResult
(
auditResult
);
...
...
@@ -115,7 +101,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
//当前角色部门id为维修部门的时候 修改状态
failureDetailsDto
.
setCurrentStatus
(
status
.
getCode
());
failureDetailsDto
.
setSequenceNbr
(
model
.
getFaultId
());
FailureDetailsDto
failureDetailsDtos
=
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
String
conditionText
;
boolean
result
=
failureDetailsService
.
checkExcuteTaskAuth
(
failureDetailsDto
.
getSequenceNbr
(),
userInfo
);
...
...
@@ -124,19 +110,18 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
Long
faultId
=
model
.
getFaultId
();
Date
processTime
=
model
.
getAuditTime
();
String
processDepartment
=
model
.
getAuditDepartment
();
// String processAuditor = model.getAuditor();
Integer
processAuditorId
=
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
());
String
processAuditor
Cid
=
userInfo
.
getRole
().
getRole
Name
();
String
processAuditor
Name
=
userInfo
.
getUserModel
().
getReal
Name
();
Long
auditDepartmentId
=
(
userInfo
.
getDepartment
().
getSequenceNbr
());
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
())
{
conditionText
=
AuditResultEnum
.
AGREE
.
getName
();
repairlog
(
faultId
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditor
Cid
);
repairlog
(
faultId
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditor
Name
);
}
else
if
(
condition
==
AuditResultEnum
.
SEND_BACK
.
getCode
())
{
conditionText
=
AuditResultEnum
.
SEND_BACK
.
getName
();
repairlog
(
faultId
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditor
Cid
);
repairlog
(
faultId
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditor
Name
);
}
else
if
(
condition
==
AuditResultEnum
.
REFUSE
.
getCode
())
{
conditionText
=
AuditResultEnum
.
REFUSE
.
getName
();
repairlog
(
faultId
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditor
Cid
);
repairlog
(
faultId
,
processAuditorId
,
auditDepartmentId
,
processTime
,
processDepartment
,
conditionText
,
processAuditor
Name
);
}
if
(
failureDetailsService
.
excuteTask
(
failureDetailsDto
.
getProcessId
(),
userInfo
,
condition
+
""
)){
return
true
;
...
...
@@ -152,7 +137,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
*/
@Transactional
public
Boolean
repairlog
(
Long
faultId
,
Integer
processAuditorId
,
Long
departmentId
,
Date
processTime
,
String
processDepartment
,
String
processResult
,
String
processAuditor
Cid
)
{
String
processDepartment
,
String
processResult
,
String
processAuditor
Name
)
{
FailureRepairlogDto
failureRepairlogDto
=
new
FailureRepairlogDto
();
failureRepairlogDto
.
setFaultId
(
faultId
);
failureRepairlogDto
.
setProcessAuditorId
(
processAuditorId
);
...
...
@@ -160,7 +145,7 @@ public class FailureAuditServiceImpl extends BaseService<FailureAuditDto, Failur
failureRepairlogDto
.
setProcessTime
(
processTime
);
failureRepairlogDto
.
setProcessDepartment
(
processDepartment
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessAuditor
Cid
(
processAuditorCid
);
failureRepairlogDto
.
setProcessAuditor
Name
(
processAuditorName
);
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureRepairlogDto
))
{
return
true
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureDetailsServiceImpl.java
View file @
c19ca472
This diff is collapsed.
Click to expand it.
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 @
c19ca472
...
...
@@ -76,8 +76,6 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
WorkflowFeignService
workflowFeignService
;
private
static
String
RECORE_TYPE
=
"维修记录"
;
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FailureMaintainServiceImpl
.
class
);
private
static
String
[]
MAINTENANCE_STATUS
=
{
"维修完成"
,
"维修中"
};
private
static
int
MAINTENANCE_COMPLETE
=
0
;
...
...
@@ -86,25 +84,7 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
private
static
String
[]
PROCESS_RESULT
=
{
"验证通过"
,
"验证未通过"
};
/**
* 分页查询
*/
public
Page
<
FailureMaintainDto
>
queryForFailureMaintainPage
(
Page
<
FailureMaintainDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
FailureMaintainDto
>
queryForFailureMaintainList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 添加维修记录
...
...
@@ -132,10 +112,10 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
// 添加报修日志
String
processResult
=
MAINTENANCE_STATUS
[
1
];
// 维修中
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
String
processAuditor
Cid
=
userInfo
.
getRole
().
getRole
Name
();
String
processAuditor
Name
=
userInfo
.
getUserModel
().
getReal
Name
();
repairlog
(
failureMaintainDto
.
getFaultId
(),
processAuditorId
,
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditor
Cid
);
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditor
Name
);
if
(
ObjectUtils
.
isNotEmpty
(
failureMaintainDto
.
getAttachment
()))
{
sourceFileServiceImpl
.
saveSourceFile
(
failureMaintainDto
.
getSequenceNbr
(),
failureMaintainDto
.
getAttachment
());
...
...
@@ -179,10 +159,10 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
// 添加报修日志
String
processResult
=
MAINTENANCE_STATUS
[
0
];
// 维修完成
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
String
processAuditor
Cid
=
userInfo
.
getRole
().
getRole
Name
();
String
processAuditor
Name
=
userInfo
.
getUserModel
().
getReal
Name
();
repairlog
(
failureMaintainDto
.
getFaultId
(),
processAuditorId
,
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditor
Cid
);
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditor
Name
);
if
(
ObjectUtils
.
isNotEmpty
(
failureMaintainDto
.
getAttachment
()))
{
sourceFileServiceImpl
.
saveSourceFile
(
failureMaintainDto
.
getSequenceNbr
(),
failureMaintainDto
.
getAttachment
());
...
...
@@ -195,55 +175,6 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
return
true
;
}
/**
* 根据审核结果更新维修表
*/
public
Boolean
updateModel
(
FailureMaintainDto
failureMaintainDto
,
ReginParams
userInfo
)
throws
Exception
{
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
);
if
(
conditionStatus
==
AuditResultEnum
.
AGREE
.
getCode
()
&&
userInfo
.
getDepartment
().
getSequenceNbr
()
==
failureDetailsDto
.
getBizCode
())
{
// 同意状态为已完结
processResult
=
PROCESS_RESULT
[
0
];
}
else
if
(
conditionStatus
==
AuditResultEnum
.
AGREE
.
getCode
())
{
// 同意状态为已完结
failureDetailsDto
.
setCurrentStatus
(
failureDetailsDto
.
getCurrentStatus
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
processResult
=
PROCESS_RESULT
[
0
];
}
else
if
(
conditionStatus
==
AuditResultEnum
.
REFUSE
.
getCode
()){
// 不同意状态为已拒绝
failureDetailsDto
.
setCurrentStatus
(
FailureStatuEnum
.
REFUSE
.
getCode
());
failureDetailsService
.
updateWithModel
(
failureDetailsDto
);
processResult
=
PROCESS_RESULT
[
1
];
}
// 添加报修日志
Integer
processAuditorId
=
Integer
.
parseInt
(
failureMaintainDto
.
getRecUserId
());
String
processAuditorCid
=
userInfo
.
getRole
().
getRoleName
();
Boolean
repairlog
=
repairlog
(
failureMaintainDto
.
getFaultId
(),
processAuditorId
,
userInfo
.
getDepartment
().
getSequenceNbr
(),
failureMaintainDto
.
getMaintainTime
(),
failureMaintainDto
.
getDepartment
(),
processResult
,
processAuditorCid
);
if
(
ObjectUtils
.
isEmpty
(
repairlog
)){
throw
new
RuntimeException
(
"验收添加报修日志出错"
);
}
if
(
failureDetailsService
.
excuteTask
(
failureMaintainDto
.
getFaultId
(),
userInfo
,
condition
)){
return
true
;
}
else
{
throw
new
RuntimeException
(
"验收执行流程失败"
);
}
}
return
false
;
}
/**
* 根据FaultId查询
...
...
@@ -273,9 +204,7 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
* 添加报修日志
*/
public
Boolean
repairlog
(
Long
faultId
,
Integer
processAuditorId
,
Long
departmentId
,
Date
processTime
,
String
processDepartment
,
String
processResult
,
String
processAuditorCid
)
{
Date
processTime
,
String
processDepartment
,
String
processResult
,
String
processAuditorName
)
{
FailureRepairlogDto
failureRepairlogDto
=
new
FailureRepairlogDto
();
failureRepairlogDto
.
setFaultId
(
faultId
);
...
...
@@ -284,7 +213,7 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
failureRepairlogDto
.
setProcessTime
(
processTime
);
failureRepairlogDto
.
setProcessDepartment
(
processDepartment
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessAuditor
Cid
(
processAuditorCid
);
failureRepairlogDto
.
setProcessAuditor
Name
(
processAuditorName
);
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureRepairlogDto
))
{
return
true
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/FailureVerifyServiceImpl.java
View file @
c19ca472
...
...
@@ -66,33 +66,21 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
}
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
())
{
}
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
.
getSequenceNbr
(),
userInfo
,
condition
+
""
))
{
throw
new
Exception
(
"执行流程失败"
);
}
/* }*/
return
true
;
}
...
...
@@ -154,7 +142,7 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
failureRepairlogDto
.
setProcessTime
(
processTime
);
failureRepairlogDto
.
setProcessDepartment
(
processDepartment
);
failureRepairlogDto
.
setProcessResult
(
processResult
);
failureRepairlogDto
.
setProcessAuditor
Cid
(
processVerifyorCid
);
failureRepairlogDto
.
setProcessAuditor
Name
(
processVerifyorCid
);
failureRepairlogService
.
createWithModel
(
failureRepairlogDto
);
if
(
ObjectUtils
.
isNotEmpty
(
failureRepairlogDto
))
{
return
true
;
...
...
@@ -166,7 +154,6 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
* 根据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
);
...
...
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 @
c19ca472
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
c19ca472
...
...
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -27,7 +28,6 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -294,6 +294,7 @@ public class AlertCalledController extends BaseController {
@PostMapping
(
value
=
"/billsend"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备联动紧急响应"
,
notes
=
"启动所有消防队伍的警铃、广播,并自动开启所有车库门"
)
@Transactional
@RestEventTrigger
(
value
=
"opreateLogEventHandler"
)
public
ResponseModel
<
Boolean
>
controlEquip
()
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
controlEquip
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/event/OpreateLogEventHandler.java
0 → 100644
View file @
c19ca472
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
.
event
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.OperateLogModel
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.event.RestEvent
;
import
org.typroject.tyboot.component.event.RestEventHandler
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
/**
*
* <pre>
* controller层操作日志事件监听
* </pre>
*
* @author gwb
* @version $Id: OpreateLogEventHandler.java, v 0.1 2021年8月19日 下午6:38:36 gwb Exp $
*/
@Component
(
"opreateLogEventHandler"
)
public
class
OpreateLogEventHandler
extends
RestEventHandler
{
static
ObjectMapper
objectMapper
=
new
ObjectMapper
();
@Override
protected
void
handleEvent
(
RestEvent
restEvent
)
throws
Exception
{
OperateLogModel
operateLogModel
=
new
OperateLogModel
();
operateLogModel
.
setMethodLabel
(
restEvent
.
getMethodLabel
());
operateLogModel
.
setMethodName
(
restEvent
.
getMethodName
());
operateLogModel
.
setParams
(
objectMapper
.
writeValueAsString
(
restEvent
.
getParams
()));
operateLogModel
.
setResult
(
objectMapper
.
writeValueAsString
(
restEvent
.
getSource
()));
operateLogModel
.
setUserId
(
restEvent
.
getRequestContextModel
().
getExcutedUserId
());
operateLogModel
.
setRemoteIp
(
restEvent
.
getRequestContextModel
().
getRequestIP
());
operateLogModel
.
setToken
(
restEvent
.
getRequestContextModel
().
getToken
());
operateLogModel
.
setTraceId
(
restEvent
.
getRequestContextModel
().
getTraceId
());
operateLogModel
.
setAgencyCode
(
restEvent
.
getRequestContextModel
().
getAgencyCode
());
operateLogModel
.
setAppCode
(
restEvent
.
getRequestContextModel
().
getAppKey
());
RequestContext
.
setAppKey
(
restEvent
.
getRequestContextModel
().
getAppKey
());
RequestContext
.
setProduct
(
restEvent
.
getRequestContextModel
().
getProduct
());
RequestContext
.
setToken
(
restEvent
.
getRequestContextModel
().
getToken
());
Systemctl
.
operateLogClient
.
create
(
operateLogModel
);
}
}
amos-boot-module/amos-boot-module-biz/pom.xml
View file @
c19ca472
...
...
@@ -13,7 +13,21 @@
<packaging>
pom
</packaging>
<dependencies>
<dependency>
<groupId>
org.typroject
</groupId>
<artifactId>
tyboot-component-event
</artifactId>
<version>
${tyboot-version}
</version>
<exclusions>
<exclusion>
<groupId>
org.typroject
</groupId>
<artifactId>
*
</artifactId>
</exclusion>
<exclusion>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<modules>
...
...
amos-boot-system-jcs/src/main/resources/application.properties
View file @
c19ca472
spring.application.name
=
JCS_chenhao
server.servlet.context-path
=
/jcs
spring.application.name
=
JCS_cz
server.port
=
11100
spring.profiles.active
=
dev
...
...
amos-boot-system-maintenance/src/main/resources/db/changelog/mt-sql-task.xml
View file @
c19ca472
...
...
@@ -24,6 +24,12 @@
end if;
END
</createProcedure>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629352951339-1"
runOnChange=
"true"
>
<sql>
DROP TRIGGER IF EXISTS `addPointConfig`;
DROP TRIGGER IF EXISTS `updatePointConfig`;
DROP TRIGGER IF EXISTS `updatePointConfig`;
</sql>
</changeSet>
</databaseChangeLog>
\ 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