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
8a62f863
Commit
8a62f863
authored
Aug 25, 2021
by
KeYong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of 172.16.10.76:moa/amos-boot-biz into develop
parents
e8026901
b2b01429
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
651 additions
and
205 deletions
+651
-205
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+5
-5
FailureStatuEnum.java
...n/amos/boot/module/common/api/enums/FailureStatuEnum.java
+14
-0
FailureDetailsMapper.java
...s/boot/module/common/api/mapper/FailureDetailsMapper.java
+80
-15
LinkageUnitMapper.java
...amos/boot/module/common/api/mapper/LinkageUnitMapper.java
+5
-6
FailureDetailsMapper.xml
...on-api/src/main/resources/mapper/FailureDetailsMapper.xml
+0
-0
LinkageUnitMapper.xml
...ommon-api/src/main/resources/mapper/LinkageUnitMapper.xml
+49
-23
PowerTransferResourceDto.java
...mos/boot/module/jcs/api/dto/PowerTransferResourceDto.java
+0
-2
ResourceStatisticsDto.java
...n/amos/boot/module/jcs/api/dto/ResourceStatisticsDto.java
+41
-0
PowerTransferMapper.java
.../amos/boot/module/jcs/api/mapper/PowerTransferMapper.java
+10
-0
IPowerTransferService.java
...os/boot/module/jcs/api/service/IPowerTransferService.java
+10
-0
PowerTransferMapper.xml
...jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
+26
-0
InputItem.java
...va/com/yeejoin/amos/maintenance/dao/entity/InputItem.java
+26
-0
Plan.java
...in/java/com/yeejoin/amos/maintenance/dao/entity/Plan.java
+28
-2
Point.java
...n/java/com/yeejoin/amos/maintenance/dao/entity/Point.java
+26
-0
Route.java
...n/java/com/yeejoin/amos/maintenance/dao/entity/Route.java
+26
-0
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+14
-3
FailureDetailsController.java
...odule/common/biz/controller/FailureDetailsController.java
+0
-0
LinkageUnitController.java
...t/module/common/biz/controller/LinkageUnitController.java
+2
-2
MaintenanceCompanyController.java
...e/common/biz/controller/MaintenanceCompanyController.java
+13
-16
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+3
-4
FailureDetailsServiceImpl.java
...le/common/biz/service/impl/FailureDetailsServiceImpl.java
+45
-61
FailureVerifyServiceImpl.java
...ule/common/biz/service/impl/FailureVerifyServiceImpl.java
+1
-1
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+3
-4
MaintenanceCompanyServiceImpl.java
...ommon/biz/service/impl/MaintenanceCompanyServiceImpl.java
+2
-1
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+3
-2
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+25
-4
CheckController.java
...amos/maintenance/business/controller/CheckController.java
+4
-4
InputItemController.java
.../maintenance/business/controller/InputItemController.java
+14
-17
PlanController.java
.../amos/maintenance/business/controller/PlanController.java
+8
-3
PlanTaskController.java
...s/maintenance/business/controller/PlanTaskController.java
+17
-17
PointController.java
...amos/maintenance/business/controller/PointController.java
+13
-3
RouteController.java
...amos/maintenance/business/controller/RouteController.java
+13
-2
PlanTaskServiceImpl.java
...aintenance/business/service/impl/PlanTaskServiceImpl.java
+10
-2
RouteServiceImpl.java
...s/maintenance/business/service/impl/RouteServiceImpl.java
+1
-1
IPlanTaskService.java
.../maintenance/business/service/intfc/IPlanTaskService.java
+1
-1
pom.xml
amos-boot-system-maintenance/pom.xml
+0
-4
mt-1.0.0.xml
...-maintenance/src/main/resources/db/changelog/mt-1.0.0.xml
+111
-0
dbTemplate_input_item.xml
...ce/src/main/resources/db/mapper/dbTemplate_input_item.xml
+2
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
8a62f863
...
...
@@ -11,9 +11,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import
com.alibaba.fastjson.JSONObject
;
import
javax.servlet.http.HttpServlet
Response
;
import
feign.
Response
;
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW
-CHENZHAO
"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
public
interface
WorkflowFeignService
{
/**
* 发起流程
...
...
@@ -109,11 +109,11 @@ public interface WorkflowFeignService {
/**
* 流程图高亮
* */
@RequestMapping
(
value
=
"/activitiHistory/gethighLineImg/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
thighLineImg
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
,
HttpServletResponse
resp
)
;
@RequestMapping
(
value
=
"/activitiHistory/gethighLineImg/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
Response
thighLineImg
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
)
;
/**
* 流程图高亮图片
* */
@RequestMapping
(
value
=
"/activitiHistory/gethighLine"
,
method
=
RequestMethod
.
GET
)
JSONObject
thighLine
(
@RequestParam
(
"instanceId"
)
String
instanceId
);
Response
thighLine
(
@RequestParam
(
"instanceId"
)
String
instanceId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/FailureStatuEnum.java
View file @
8a62f863
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
enums
;
import
java.util.ArrayList
;
import
java.util.EnumSet
;
import
java.util.HashMap
;
import
java.util.List
;
public
enum
FailureStatuEnum
{
WAITING_AUDIT
(
0
,
"待审核"
),
...
...
@@ -27,5 +32,14 @@ public enum FailureStatuEnum {
return
name
;
}
public
static
List
<
HashMap
<
String
,
String
>>
getEnumList
()
{
List
<
HashMap
<
String
,
String
>>
list
=
new
ArrayList
<>();
for
(
FailureStatuEnum
testEnum
:
EnumSet
.
allOf
(
FailureStatuEnum
.
class
))
{
HashMap
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
testEnum
.
name
,
testEnum
.
code
.
toString
());
list
.
add
(
map
);
}
return
list
;
}
}
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 @
8a62f863
...
...
@@ -23,10 +23,12 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
/**
* 查询全部 分页
*
* @param
page
* @param
current 当前页
* @return
*/
IPage
<
FailureDetails
>
selectAllPage
(
Page
page
);
List
<
FailureDetails
>
selectAllPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 查询我发起的 分页
...
...
@@ -35,31 +37,94 @@ public interface FailureDetailsMapper extends BaseMapper<FailureDetails> {
*
* @return
*/
IPage
<
FailureDetails
>
selectISubPage
(
Page
page
,
String
submissionPid
);
List
<
FailureDetails
>
selectISubPage
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 查询待处理 分页
*
* @param
page
* @param
* @return
*/
IPage
<
FailureDetails
>
selectInProcessing
(
Page
page
);
IPage
<
FailureDetails
>
selectStatusWaitTj
(
Page
page
);
IPage
<
FailureDetails
>
selectStatusWaitWx
();
List
<
FailureDetails
>
selectInProcessing
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 查询待处理 应急指挥科人员分页
*
* @param
* @return
*/
List
<
FailureDetails
>
selectStatusWaitTj
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 查询待处理 维修人员分页
*
* @param
* @return
*/
List
<
FailureDetails
>
selectStatusWaitWx
(
Long
current
,
Long
size
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
List
<
StatusDto
>
selectStatusCount
();
/**
* 统计 全部
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List
<
StatusDto
>
selectStatusCount
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
List
<
StatusDto
>
selectStatusWx
();
List
<
StatusDto
>
selectStatusFq
();
/**
* 统计 维修人员
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List
<
StatusDto
>
selectStatusWx
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 统计 应急指挥科人员
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List
<
StatusDto
>
selectStatusFq
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 统计 我发起
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List
<
StatusDto
>
selectStatusFqp
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
/**
* 统计 领导
*
* @param currentStatus 状态
* @param startTime 起始时间
* @param endTime 结束时间
* @param submissionPid 报送人
*
* @return
*/
List
<
StatusDto
>
selectStatusLeader
(
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
submissionPid
);
List
<
StatusDto
>
selectStatusFqp
(
Integer
submissionPid
);
List
<
StatusDto
>
selectStatusLeader
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/LinkageUnitMapper.java
View file @
8a62f863
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -12,6 +7,10 @@ import com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitZhDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RequestData
;
import
com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* 联动单位 Mapper 接口
...
...
@@ -59,7 +58,7 @@ public interface LinkageUnitMapper extends BaseMapper<LinkageUnit> {
* @return
*/
Page
<
List
<
LinkageUnitDto
>>
getEmergencyLinkageUnitList
(
IPage
<
LinkageUnitDto
>
page
,
String
unitName
,
String
linkageUnitType
Code
,
String
emergencyLinkageUnitCode
);
String
linkageUnitType
,
String
emergencyLinkageUnitCode
);
List
<
LinkageUnitDto
>
exportToExcel
();
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FailureDetailsMapper.xml
View file @
8a62f863
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/LinkageUnitMapper.xml
View file @
8a62f863
...
...
@@ -45,8 +45,17 @@
a.latitude,
a.longitude,
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
AS distance
FROM cb_linkage_unit a
AS distance,
case when csps.person_number is null then 0 else
csps.person_number end as userNum,
case when cre.vehicle_number is null then 0 else cre.vehicle_number end as
carNum
FROM
cb_linkage_unit a
LEFT JOIN cb_special_position_staff csps ON a.sequence_nbr =
csps.company_id
LEFT JOIN cb_rescue_equipment cre on a.sequence_nbr = cre.company_id
where a.longitude is not null and
a.latitude is not null
<if
test=
'par.distance!=null'
>
...
...
@@ -87,28 +96,38 @@
emergency_linkage_unit_code
</select>
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
>
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
>
select
a.unit_name unitName,
a.linkage_unit_type linkageUnitType,
a.linkage_unit_type
linkageUnitType,
a.address ,
a.latitude,
a.longitude,
a.agreement_start_date agreementStartDate,
a.agreement_end_date agreementEndDate,
a.agreement_end_date
agreementEndDate,
a.contact_user contactUser,
a.contact_phone contactPhone,
a.contact_phone
contactPhone,
b.*
from cb_linkage_unit a LEFT JOIN
(SELECT
m.instance_id,
max(case m.field_code when 'emergencyServiceContent' then m.field_value end) emergencyServiceContent,
max(case m.field_code when 'fireRescueCapability' then m.field_value end) fireRescueCapability,
max(case m.field_code when 'responsibilitiesSituation' then m.field_value end) responsibilitiesSituation,
max(case m.field_code when 'unitSituation' then m.field_value end) unitSituation
FROM cb_dynamic_form_instance m GROUP BY m.instance_id) b
max(case m.field_code when 'emergencyServiceContent' then
m.field_value end) emergencyServiceContent,
max(case m.field_code when
'fireRescueCapability' then m.field_value end) fireRescueCapability,
max(case m.field_code when 'responsibilitiesSituation' then
m.field_value end) responsibilitiesSituation,
max(case m.field_code
when 'unitSituation' then m.field_value end) unitSituation
FROM
cb_dynamic_form_instance m GROUP BY m.instance_id) b
on b.instance_id=a.instance_id where a.unit_name is not null
on
b.instance_id=a.instance_id where a.unit_name is not null
</select>
...
...
@@ -120,13 +139,18 @@
clu.unit_code AS unitCode,
clu.parent_id AS parentId,
clu.linkage_unit_type AS linkageUnitType,
clu.linkage_unit_type_code AS linkageUnitTypeCode,
clu.administrative_divisions AS administrativeDivisions,
clu.administrative_divisions_code AS administrativeDivisionsCode,
clu.linkage_unit_type_code AS
linkageUnitTypeCode,
clu.administrative_divisions AS
administrativeDivisions,
clu.administrative_divisions_code AS
administrativeDivisionsCode,
clu.address AS address,
clu.longitude AS longitude,
clu.longitude AS
longitude,
clu.latitude AS latitude,
clu.agreement_start_date AS agreementStartDate,
clu.agreement_start_date AS
agreementStartDate,
clu.agreement_end_date AS agreementEndDate,
clu.emergency_linkage_unit AS emergencyLinkageUnit,
clu.emergency_linkage_unit_code AS emergencyLinkageUnitCode,
...
...
@@ -157,14 +181,16 @@
FROM
cb_linkage_unit clu
WHERE clu.is_delete=0
<if
test=
"unitName != null and unitName != ''"
>
AND clu.unit_name LIKE concat(#{unitName}, '%')
<if
test=
"unitName != null and unitName != ''"
>
AND clu.unit_name LIKE concat(#{unitName}, '%')
</if>
<if
test=
"linkageUnitTypeCode != null and linkageUnitTypeCode != ''"
>
AND clu.linkage_unit_type_code =#{linkageUnitTypeCode}
<if
test=
"linkageUnitType != null and linkageUnitType != ''"
>
AND clu.linkage_unit_type =#{linkageUnitType}
</if>
<if
test=
"emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''"
>
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
<if
test=
"emergencyLinkageUnitCode != null and emergencyLinkageUnitCode != ''"
>
AND clu.emergency_linkage_unit_code =#{emergencyLinkageUnitCode}
</if>
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/PowerTransferResourceDto.java
View file @
8a62f863
...
...
@@ -6,8 +6,6 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.List
;
/**
* 调派资源dto
*
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/ResourceStatisticsDto.java
0 → 100644
View file @
8a62f863
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 调派资源统计dto
*
* @author tb
* @date 2021-08-20
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@AllArgsConstructor
@ApiModel
(
value
=
"ResourceStatisticsDto"
,
description
=
"调派资源统计dto"
)
public
class
ResourceStatisticsDto
extends
BaseDto
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"类型"
)
private
String
type
;
@ApiModelProperty
(
value
=
"全部"
)
private
Integer
allCount
=
0
;
@ApiModelProperty
(
value
=
"到场"
)
private
Integer
arrived
=
0
;
@ApiModelProperty
(
value
=
"途中"
)
private
Integer
underway
=
0
;
public
ResourceStatisticsDto
(
String
type
,
Integer
allCount
)
{
this
.
type
=
type
;
this
.
allCount
=
allCount
;
this
.
arrived
=
0
;
this
.
underway
=
0
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/PowerTransferMapper.java
View file @
8a62f863
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ResourceStatisticsDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -96,6 +97,15 @@ public interface PowerTransferMapper extends BaseMapper<PowerTransfer> {
@Param
(
"alertCalledId"
)
Long
alertCalledId
);
/**
* 根据类型查询力量调派统计
*
* @param alertCalledId
* @param type
* @return
*/
List
<
ResourceStatisticsDto
>
getPowerTransferTeamResourceCount
(
Long
alertCalledId
,
String
type
);
/**
* 根据参数获取警情当前已调派车辆资源列表信息
*
* @param alertCalledId 警情id
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IPowerTransferService.java
View file @
8a62f863
...
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerCompanyCountDto;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ResourceStatisticsDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferSimpleDto
;
...
...
@@ -43,4 +44,13 @@ public interface IPowerTransferService extends IService<PowerTransfer> {
* @return
*/
IPage
<
PowerTransferResourceDto
>
getPowerTransferPageByParam
(
Long
alertCalledId
,
String
type
,
Page
<
PowerTransferResourceDto
>
page
);
/**
* 根据参数查询力量调派资源统计信息
*
* @param alertCalledId 警情id
* @param type 查询类型
* @return
*/
List
<
ResourceStatisticsDto
>
getPowerTransferStatistics
(
Long
alertCalledId
,
String
type
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/PowerTransferMapper.xml
View file @
8a62f863
...
...
@@ -210,6 +210,32 @@
transfer.alert_called_id = #{alertCalledId}
AND is_distribution_agencies = 0
</select>
<select
id=
"getPowerTransferTeamResourceCount"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.ResourceStatisticsDto"
>
SELECT
"team" type,
count( DISTINCT company.company_id ) allCount
FROM
jc_power_transfer_company company
LEFT JOIN jc_power_transfer transfer ON transfer.sequence_nbr = company.power_transfer_id
WHERE
transfer.alert_called_id = #{alertCalledId}
AND is_distribution_agencies = 0 UNION ALL
SELECT
"car" type,
count( DISTINCT car.resources_id ) allCount
FROM
jc_power_transfer_company_resources car
LEFT JOIN jc_power_transfer_company company ON company.sequence_nbr = car.power_transfer_company_id
LEFT JOIN jc_power_transfer transfer ON transfer.sequence_nbr = company.power_transfer_id
WHERE
transfer.alert_called_id = #{alertCalledId}
AND is_distribution_agencies = 0
UNION ALL
SELECT
"person" type,
0 allCount
</select>
<select
id=
"getPowerTransferCarResource"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto"
>
SELECT DISTINCT
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/dao/entity/InputItem.java
View file @
8a62f863
...
...
@@ -390,6 +390,32 @@ public class InputItem extends BasicEntity {
return
this
.
getId
()
==
inputItem
.
getId
();
}
/**
* 维保公司id
*/
private
String
companyId
;
/**
* 维保公司名称
*/
private
String
companyName
;
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
public
String
getLevel
()
{
return
level
;
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/dao/entity/Plan.java
View file @
8a62f863
...
...
@@ -2,9 +2,9 @@ package com.yeejoin.amos.maintenance.dao.entity;
import
java.sql.Time
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.data.annotation.LastModifiedDate
;
...
...
@@ -65,6 +65,32 @@ public class Plan extends BasicEntity {
private
String
ownerId
;
/**
* 维保公司id
*/
private
String
companyId
;
/**
* 维保公司名称
*/
private
String
companyName
;
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
@Transient
public
String
getOwnerId
()
{
return
ownerId
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/dao/entity/Point.java
View file @
8a62f863
...
...
@@ -80,6 +80,32 @@ public class Point extends BasicEntity {
private
String
extendJson
;
/**
* 维保公司id
*/
private
String
companyId
;
/**
* 维保公司名称
*/
private
String
companyName
;
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
/**
* 定点拍照数
*/
@Column
(
name
=
"fixed_shot"
)
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/dao/entity/Route.java
View file @
8a62f863
...
...
@@ -51,6 +51,16 @@ public class Route extends BasicEntity {
private
String
orgCode
;
/**
* 维保公司id
*/
private
String
companyId
;
/**
* 维保公司名称
*/
private
String
companyName
;
/**
* 备注说明
*/
private
String
remark
;
...
...
@@ -133,6 +143,22 @@ public class Route extends BasicEntity {
return
coordinates
;
}
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getCompanyName
()
{
return
companyName
;
}
public
void
setCompanyName
(
String
companyName
)
{
this
.
companyName
=
companyName
;
}
public
void
setCoordinates
(
String
coordinates
)
{
this
.
coordinates
=
coordinates
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-command-biz/src/main/java/com/yeejoin/amos/boot/module/command/biz/controller/CommandController.java
View file @
8a62f863
...
...
@@ -422,8 +422,10 @@ public class CommandController extends BaseController {
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/SY"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id查询水源"
,
notes
=
"根据id查询水源"
)
public
ResponseModel
<
WaterResourceDto
>
selectOne
(
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iWaterResourceService
.
selectBySequenceNbr
(
id
));
public
ResponseModel
<
JSONObject
>
selectOne
(
Long
id
)
{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
iWaterResourceService
.
selectBySequenceNbr
(
id
)));
jsonObject
.
remove
(
"managementUnit"
);
return
ResponseHelper
.
buildResponse
(
jsonObject
);
}
...
...
@@ -945,7 +947,7 @@ public class CommandController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派列表"
,
notes
=
"app-根据警情id查询力量调派列表"
)
@GetMapping
(
value
=
"/app/transferList"
)
public
ResponseModel
getPowerTransferList
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"
company
"
)
String
type
,
@RequestParam
(
defaultValue
=
"
team
"
)
String
type
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
page
=
new
Page
();
...
...
@@ -953,4 +955,12 @@ public class CommandController extends BaseController {
page
.
setCurrent
(
current
);
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTransferPageByParam
(
Long
.
valueOf
(
alertId
),
type
,
page
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派资源统计"
,
notes
=
"app-根据警情id查询力量调派资源统计"
)
@GetMapping
(
value
=
"/app/transfer/statistics"
)
public
ResponseModel
getPowerTransferStatistics
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTransferStatistics
(
Long
.
valueOf
(
alertId
),
type
));
}
}
\ 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/controller/FailureDetailsController.java
View file @
8a62f863
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/controller/LinkageUnitController.java
View file @
8a62f863
...
...
@@ -123,12 +123,12 @@ public class LinkageUnitController extends BaseController {
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动单位分页查询"
,
notes
=
"联动单位分页查询"
)
public
ResponseModel
<
Page
<
LinkageUnitDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
String
unitName
,
String
linkageUnitType
Code
,
String
inAgreement
,
String
emergencyLinkageUnitCode
)
{
(
value
=
"size"
)
int
size
,
String
unitName
,
String
linkageUnitType
,
String
inAgreement
,
String
emergencyLinkageUnitCode
)
{
Page
<
LinkageUnitDto
>
page
=
new
Page
<
LinkageUnitDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
Page
<
LinkageUnitDto
>
linkageUnitDtoPage
=
linkageUnitServiceImpl
.
queryForLinkageUnitPage
(
page
,
false
,
unitName
,
linkageUnitType
Code
,
emergencyLinkageUnitCode
,
inAgreement
);
unitName
,
linkageUnitType
,
emergencyLinkageUnitCode
,
inAgreement
);
return
ResponseHelper
.
buildResponse
(
linkageUnitDtoPage
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/MaintenanceCompanyController.java
View file @
8a62f863
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
controller
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
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.OrgMenuDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany
;
import
com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.MaintenanceCompanyServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.utils.MyException
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -22,17 +27,9 @@ 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.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany
;
import
com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.MaintenanceCompanyServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.utils.MyException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
* 维保单位
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
8a62f863
...
...
@@ -384,10 +384,9 @@ public class WaterResourceController extends BaseController {
@GetMapping
(
value
=
"/select_list"
)
public
ResponseModel
<
List
<
WaterResourceDto
>>
selectList
(
String
name
,
Long
sequenceNbr
,
Long
belongFightingSystemId
,
Long
belongBuildingId
,
String
belongBuilding
,
String
resourceType
)
{
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryWaterResourceList
(
true
,
name
,
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
belongBuilding
,
resourceType
));
String
belongBuilding
,
String
resourceType
,
String
classifyId
)
{
return
ResponseHelper
.
buildResponse
(
waterResourceServiceImpl
.
queryWaterResourceList
(
true
,
name
,
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
belongBuilding
,
resourceType
,
classifyId
));
}
/**
...
...
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 @
8a62f863
...
...
@@ -73,65 +73,62 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
public
static
Integer
SELECY_ISUBMIT
=
8
;
public
String
[]
roleName
=
{
"maintenance_department_maintenance_personnel"
,
"emergency_command_staff"
};
/**
* 分页查询
* 分页查询接口
* @param type 查询类型
* @param currentStatus 状态
* @param startTime 起始时间
* @param startTime 结束时间
* @param userId 用户id
*/
public
IPage
<
FailureDetails
>
queryAllPage
(
long
size
,
long
current
)
{
Page
pages
=
new
Page
<>(
current
,
size
);
LambdaQueryWrapper
<
FailureDetails
>
lambdaQueryWrapper
=
new
LambdaQueryWrapper
();
lambdaQueryWrapper
.
orderByDesc
(
FailureDetails:
:
getSubmissionTime
);
return
page
(
pages
,
lambdaQueryWrapper
);
}
public
IPage
<
FailureDetails
>
queryForFailureDetailsPage
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
,
Integer
type
)
{
public
IPage
<
FailureDetails
>
queryForFailureDetailsPage
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
userId
,
Integer
type
)
{
//当传递类型参数为全部查询时
if
(
type
.
equals
(
SELECY_ALL
))
{
return
this
.
baseMapper
.
selectAllPage
(
page
);
List
<
FailureDetails
>
list
=
this
.
baseMapper
.
selectAllPage
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
return
iPage
;
}
//当传递类型参数为我提交时
if
(
type
.
equals
(
SELECY_ISUBMIT
))
{
return
baseMapper
.
selectISubPage
(
page
,
userInfo
.
getUserModel
().
getUserId
());
List
<
FailureDetails
>
list
=
baseMapper
.
selectISubPage
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
()));
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
return
iPage
;
}
return
this
.
queryForWaitManage
(
page
,
userInfo
);
//否则就查询待处理
return
this
.
queryForWaitManage
(
page
,
userInfo
,
currentStatus
,
startTime
,
endTime
,
userId
);
}
/**
* 我发起分页查询
*/
public
IPage
<
FailureDetails
>
queryForPage
(
Page
<
FailureDetails
>
page
,
String
submissionPid
)
{
if
(
submissionPid
==
null
)
{
return
null
;
}
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
);
}
/**
* 待处理分页查询
*/
public
IPage
<
FailureDetails
>
queryForWaitManage
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
)
{
public
IPage
<
FailureDetails
>
queryForWaitManage
(
Page
<
FailureDetails
>
page
,
ReginParams
userInfo
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
userId
)
{
if
(
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
0
]))
{
return
baseMapper
.
selectStatusWaitWx
();
IPage
<
FailureDetails
>
wxIpage
=
new
Page
<>();
List
<
FailureDetails
>
list
=
baseMapper
.
selectStatusWaitWx
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
wxIpage
.
setRecords
(
list
);
return
wxIpage
;
}
else
if
(
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
1
]))
{
return
baseMapper
.
selectStatusWaitTj
(
page
);
currentStatus
=
FailureStatuEnum
.
WAITING_SUBMIT
.
getCode
().
longValue
();
List
<
FailureDetails
>
list
=
baseMapper
.
selectStatusWaitTj
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
return
iPage
;
}
return
baseMapper
.
selectInProcessing
(
page
);
List
<
FailureDetails
>
list
=
baseMapper
.
selectInProcessing
(
page
.
getCurrent
(),
page
.
getSize
(),
currentStatus
,
startTime
,
endTime
,
userId
);
IPage
<
FailureDetails
>
iPage
=
new
Page
<>();
iPage
.
setRecords
(
list
);
return
iPage
;
}
/**
* 列表查询 示例
*/
public
List
<
FailureDetailsDto
>
queryForFailureDetailsList
()
{
return
this
.
queryForList
(
""
,
false
);
}
/**
* 根据状态查询
*/
...
...
@@ -169,18 +166,18 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
/**
* 查询任务状态数量
*/
public
List
<
CurrentStatusDto
>
queryStatusCount
(
ReginParams
userInfo
,
Integer
type
)
{
public
List
<
CurrentStatusDto
>
queryStatusCount
(
ReginParams
userInfo
,
Integer
type
,
Long
currentStatus
,
String
startTime
,
String
endTime
,
Integer
userId
)
{
List
<
StatusDto
>
statusDtos
=
null
;
if
(
type
.
equals
(
SELECY_STATUS
)
&&
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
0
]))
{
statusDtos
=
baseMapper
.
selectStatusWx
();
if
(
type
.
equals
(
SELECY_STATUS
)
&&
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
0
]))
{
statusDtos
=
baseMapper
.
selectStatusWx
(
currentStatus
,
startTime
,
endTime
,
userId
);
}
else
if
(
type
.
equals
(
SELECY_STATUS
)
&&
userInfo
.
getRole
().
getRoleName
().
equals
(
roleName
[
1
]))
{
statusDtos
=
baseMapper
.
selectStatusFq
();
statusDtos
=
baseMapper
.
selectStatusFq
(
currentStatus
,
startTime
,
endTime
,
userId
);
}
else
if
(
type
.
equals
(
SELECY_ISUBMIT
))
{
statusDtos
=
baseMapper
.
selectStatusFqp
(
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
()));
}
else
if
(
type
.
equals
(
SELECY_ALL
)){
statusDtos
=
baseMapper
.
selectStatusCount
();
}
else
{
statusDtos
=
baseMapper
.
selectStatusLeader
();
statusDtos
=
baseMapper
.
selectStatusFqp
(
currentStatus
,
startTime
,
endTime
,
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
()));
}
else
if
(
type
.
equals
(
SELECY_ALL
))
{
statusDtos
=
baseMapper
.
selectStatusCount
(
currentStatus
,
startTime
,
endTime
,
userId
);
}
else
{
statusDtos
=
baseMapper
.
selectStatusLeader
(
currentStatus
,
startTime
,
endTime
,
userId
);
}
List
<
CurrentStatusDto
>
currentStatusDtoList
=
new
ArrayList
<>();
statusDtos
.
forEach
(
e
->
{
...
...
@@ -515,16 +512,6 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
}
list
.
add
(
detail
);
}
// datArray.stream().forEach(i -> {
// JSONObject detail = JSONObject.parseObject(JSONObject.toJSONString(i));
// if (detail.containsKey("operator") && !detail.getString("name").equals("维修中")) {
// // 从流程记录表中拿到处理人的名称
// FailureRepairlog failureRepairlog = failureRepairlogService
// .findByprocessAuditor(detail.getString("operator"));
// detail.replace("operator", failureRepairlog.getProcessAuditorName());
// list.add(detail);
// }
// });
}
return
list
;
}
...
...
@@ -617,7 +604,5 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
}
}
return
list
;
}
}
\ 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/FailureVerifyServiceImpl.java
View file @
8a62f863
...
...
@@ -110,7 +110,7 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
Date
processTime
=
model
.
getVerifyTime
();
String
processDepartment
=
model
.
getVerifyDepartment
();
Integer
processAuditorId
=
Integer
.
parseInt
(
userInfo
.
getUserModel
().
getUserId
());
String
processAuditorCid
=
userInfo
.
get
Role
().
getRole
Name
();
String
processAuditorCid
=
userInfo
.
get
UserModel
().
getReal
Name
();
Long
auditDepartmentId
=
(
userInfo
.
getDepartment
().
getSequenceNbr
());
Boolean
repairlog
=
null
;
if
(
condition
==
AuditResultEnum
.
AGREE
.
getCode
())
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/LinkageUnitServiceImpl.java
View file @
8a62f863
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -74,9 +73,9 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
@Override
public
Page
<
LinkageUnitDto
>
queryForLinkageUnitPage
(
IPage
<
LinkageUnitDto
>
page
,
@Condition
(
Operator
.
eq
)
Boolean
isDelete
,
@Condition
(
Operator
.
like
)
String
unitName
,
@Condition
(
Operator
.
eq
)
String
linkageUnitType
Code
,
@Condition
(
Operator
.
eq
)
String
emergencyLinkageUnitCode
,
@Condition
(
Operator
.
eq
)
String
linkageUnitType
,
@Condition
(
Operator
.
eq
)
String
emergencyLinkageUnitCode
,
String
inAgreement
)
{
Page
<
List
<
LinkageUnitDto
>>
linkageUnitList
=
linkageUnitMapper
.
getEmergencyLinkageUnitList
(
page
,
unitName
,
linkageUnitType
Code
,
emergencyLinkageUnitCode
);
Page
<
List
<
LinkageUnitDto
>>
linkageUnitList
=
linkageUnitMapper
.
getEmergencyLinkageUnitList
(
page
,
unitName
,
linkageUnitType
,
emergencyLinkageUnitCode
);
List
<
Map
>
linkageUnitListMap
=
JSONArray
.
parseArray
(
JSONArray
.
toJSONString
(
linkageUnitList
.
getRecords
()),
Map
.
class
);
List
<
Map
<
String
,
Object
>>
pageList
=
dynamicFormInstanceService
.
listAll
(
getGroupCode
());
...
...
@@ -104,7 +103,7 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
Page
<
LinkageUnitDto
>
page1
=
new
Page
<
LinkageUnitDto
>();
page1
.
setCurrent
(
page
.
getCurrent
());
page1
.
setSize
(
page
.
getSize
());
page1
.
setTotal
(
detaiList
.
size
());
page1
.
setTotal
(
linkageUnitList
.
getTotal
());
// TOTAL 需要统计所有存在的数据BUG2590 by kongfm
page1
.
setRecords
(
detaiList
);
return
page1
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/MaintenanceCompanyServiceImpl.java
View file @
8a62f863
...
...
@@ -579,6 +579,7 @@ public class MaintenanceCompanyServiceImpl
MaintenanceCompany
maintenanceCompany
=
new
MaintenanceCompany
();
if
(
ValidationUtil
.
isEmpty
(
seq
))
{
maintenanceCompany
=
getMaintenanceCompany
(
amosUserId
);
seq
=
maintenanceCompany
.
getSequenceNbr
();
}
// 机场单位列表基本信息
if
(
pageNum
==
-
1
||
pageSize
==
-
1
)
{
...
...
@@ -586,7 +587,7 @@ public class MaintenanceCompanyServiceImpl
}
Page
page
=
new
Page
(
pageNum
,
pageSize
);
Page
<
Map
<
String
,
Object
>>
companys
=
new
Page
<>(
pageNum
,
pageSize
);
Page
<
OrgUsrDto
>
pageResult
=
this
.
baseMapper
.
selectOrgUsrPageList
(
page
,
maintenanceCompany
.
getSequenceNbr
()
);
Page
<
OrgUsrDto
>
pageResult
=
this
.
baseMapper
.
selectOrgUsrPageList
(
page
,
seq
);
List
<
Map
<
String
,
Object
>>
finalResultMap
=
Lists
.
newArrayList
();
// 机场组装单位动态表单数据
pageResult
.
getRecords
().
forEach
(
orgUsrDto
->
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
8a62f863
...
...
@@ -82,9 +82,10 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
@Condition
(
Operator
.
eq
)
Long
belongFightingSystemId
,
@Condition
(
Operator
.
eq
)
Long
belongBuildingId
,
@Condition
(
Operator
.
like
)
String
belongBuilding
,
@Condition
(
Operator
.
eq
)
String
resourceType
)
{
@Condition
(
Operator
.
eq
)
String
resourceType
,
@Condition
(
Operator
.
eq
)
String
equipId
)
{
return
this
.
queryForList
(
""
,
false
,
isDelete
,
name
,
sequenceNbr
,
belongFightingSystemId
,
belongBuildingId
,
belongBuilding
,
resourceType
);
belongBuilding
,
resourceType
,
equipId
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/PowerTransferServiceImpl.java
View file @
8a62f863
...
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferCompanyResourcesDto
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferResourceDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferSimpleDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ResourceStatisticsDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.AlertFormValue
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
...
...
@@ -372,8 +373,8 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
}
IPage
<
PowerTransferResourceDto
>
resultPage
=
null
;
switch
(
type
)
{
case
"
company
"
:
resultPage
=
powerTransferMapper
.
getPowerTransferTeamResource
(
page
,
alertCalledId
);
case
"
team
"
:
resultPage
=
getPowerTransferTeamResource
(
page
,
alertCalledId
);
break
;
case
"car"
:
resultPage
=
getPowerTransferCarResource
(
page
,
alertCalledId
);
...
...
@@ -388,7 +389,28 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
return
resultPage
;
}
private
IPage
<
PowerTransferResourceDto
>
getPowerTransferCarResource
(
Page
<
PowerTransferResourceDto
>
page
,
Long
alertCalledId
)
{
@Override
public
List
<
ResourceStatisticsDto
>
getPowerTransferStatistics
(
Long
alertCalledId
,
String
type
)
{
List
<
ResourceStatisticsDto
>
result
;
result
=
powerTransferMapper
.
getPowerTransferTeamResourceCount
(
alertCalledId
,
type
);
if
(
ValidationUtil
.
isEmpty
(
result
))
{
ResourceStatisticsDto
team
=
new
ResourceStatisticsDto
(
"team"
,
0
,
0
,
0
);
ResourceStatisticsDto
car
=
new
ResourceStatisticsDto
(
"car"
,
0
,
0
,
0
);
ResourceStatisticsDto
person
=
new
ResourceStatisticsDto
(
"person"
,
0
,
0
,
0
);
result
.
add
(
team
);
result
.
add
(
car
);
result
.
add
(
person
);
}
return
result
;
}
public
IPage
<
PowerTransferResourceDto
>
getPowerTransferTeamResource
(
Page
<
PowerTransferResourceDto
>
page
,
Long
alertCalledId
)
{
return
powerTransferMapper
.
getPowerTransferTeamResource
(
page
,
alertCalledId
);
}
private
IPage
<
PowerTransferResourceDto
>
getPowerTransferCarResource
(
Page
<
PowerTransferResourceDto
>
page
,
Long
alertCalledId
)
{
ResponseModel
<
Object
>
result
=
equipFeignClient
.
getFireCarListAll
();
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
carInfoMap
=
Maps
.
newConcurrentMap
();
if
(!
ValidationUtil
.
isEmpty
(
result
))
{
...
...
@@ -405,7 +427,6 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
String
seq
=
car
.
getSequenceNbr
().
toString
();
car
.
setName
((
String
)
finalCarInfoMap
.
get
(
seq
).
get
(
0
).
get
(
"name"
));
String
carStateCode
=
(
String
)
finalCarInfoMap
.
get
(
seq
).
get
(
0
).
get
(
"carState"
);
FireCarStatusEnum
.
getEnum
(
carStateCode
);
car
.
setCarState
(!
ValidationUtil
.
isEmpty
(
FireCarStatusEnum
.
getEnum
(
carStateCode
))
?
FireCarStatusEnum
.
getEnum
(
carStateCode
).
getName
()
:
""
);
List
<
String
>
images
=
(
List
<
String
>)
finalCarInfoMap
.
get
(
seq
).
get
(
0
).
get
(
"image"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/CheckController.java
View file @
8a62f863
...
...
@@ -528,19 +528,19 @@ public class CheckController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"维保记录排序条件列表"
,
notes
=
"维保记录排序条件列表"
)
@RequestMapping
(
value
=
"/orderBy/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getOrderByList
()
{
return
CommonResponseUtil
.
success
(
CheckRecordOrderByEnum
.
getEnumList
());
public
ResponseModel
getOrderByList
()
{
return
ResponseHelper
.
buildResponse
(
CheckRecordOrderByEnum
.
getEnumList
());
}
@ApiOperation
(
value
=
"/设备设施维保记录分页列表"
,
notes
=
"外部接口装备和者水源使用"
)
@GetMapping
(
value
=
"page/{originalId}/list"
)
public
CommonResponse
getCheckListByOriginalId
(
public
ResponseModel
getCheckListByOriginalId
(
@PathVariable
String
originalId
,
@RequestParam
(
value
=
"current"
)
int
pageNum
,
@RequestParam
(
value
=
"size"
)
int
pageSize
){
CommonPageable
pageable
=
new
CommonPageable
(
pageNum
,
pageSize
);
return
CommonResponseUtil
.
success
(
checkService
.
getCheckListByOriginalId
(
originalId
,
pageable
));
return
ResponseHelper
.
buildResponse
(
checkService
.
getCheckListByOriginalId
(
originalId
,
pageable
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/InputItemController.java
View file @
8a62f863
...
...
@@ -9,6 +9,7 @@ import java.util.List;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.WorkbookFactory
;
...
...
@@ -27,6 +28,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -79,23 +81,20 @@ public class InputItemController extends AbstractBaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PersonIdentify
@ApiOperation
(
value
=
"新增检查项"
,
notes
=
"新增检查项"
)
@RequestMapping
(
value
=
"/addItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
addNewItem
(
@ApiParam
(
value
=
"检查项信息"
)
@RequestBody
InputItemParam
param
)
{
if
(
ObjectUtils
.
isEmpty
(
param
.
getId
()))
{
return
updateItem
(
param
);
}
AgencyUserModel
user
=
getUserInfo
();
if
(
ObjectUtils
.
isEmpty
(
user
))
{
return
CommonResponseUtil
.
failure
(
"用户session过期"
);
}
try
{
InputItem
inputItem
=
new
InputItem
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
InputItem
inputItem
=
new
InputItem
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
BeanUtils
.
copyProperties
(
param
,
inputItem
);
inputItem
.
setCompanyId
(
personIdentity
.
getCompanyId
());
inputItem
.
setCompanyName
(
personIdentity
.
getCompanyName
());
inputItem
.
setOrgCode
(
loginOrgCode
);
inputItem
.
setCreateBy
(
user
.
get
UserId
());
inputItem
.
setCreateBy
(
RequestContext
.
getExe
UserId
());
inputItemService
.
addNewInputItem
(
inputItem
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
...
...
@@ -122,19 +121,17 @@ public class InputItemController extends AbstractBaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"更新检查项"
,
notes
=
"更新检查项"
)
@PersonIdentify
@ApiOperation
(
value
=
"更新检查项,没用到"
,
notes
=
"更新检查项"
)
@RequestMapping
(
value
=
"/updateItem"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
PUT
)
public
CommonResponse
updateItem
(
@ApiParam
(
value
=
"检查项详情"
,
required
=
false
)
@RequestBody
InputItemParam
param
)
{
if
(
ObjectUtils
.
isEmpty
(
param
.
getId
()))
{
return
addNewItem
(
param
);
}
AgencyUserModel
user
=
getUserInfo
();
if
(
ObjectUtils
.
isEmpty
(
user
))
{
return
CommonResponseUtil
.
failure
(
"用户session过期"
);
}
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
InputItem
inputItem
=
new
InputItem
();
BeanUtils
.
copyProperties
(
param
,
inputItem
);
inputItem
.
setCompanyId
(
personIdentity
.
getCompanyId
());
inputItem
.
setCompanyName
(
personIdentity
.
getCompanyName
());
inputItem
.
setId
(
param
.
getId
());
inputItemService
.
updateInputItem
(
inputItem
);
return
CommonResponseUtil
.
success
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/PlanController.java
View file @
8a62f863
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.maintenance.business.controller;
import
java.util.HashMap
;
import
java.util.List
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -12,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -84,16 +86,19 @@ public class PlanController extends AbstractBaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PersonIdentify
@ApiOperation
(
value
=
"巡检计划新增及编辑"
,
notes
=
"巡检计划新增及编辑"
)
@RequestMapping
(
value
=
"/addPlan"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
checkPlanAdd
(
@ApiParam
(
value
=
"巡检计划"
,
required
=
true
)
@RequestBody
Plan
param
)
{
try
{
String
userId
=
getUserId
();
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
HashMap
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
param
.
setCompanyId
(
personIdentity
.
getCompanyId
());
param
.
setCompanyName
(
personIdentity
.
getCompanyName
());
map
.
put
(
"org_code"
,
loginOrgCode
);
map
.
put
(
"user_id"
,
userId
);
map
.
put
(
"user_id"
,
RequestContext
.
getExeUserId
()
);
map
.
put
(
"param"
,
param
);
planService
.
addPlan
(
map
);
return
CommonResponseUtil
.
success
();
...
...
@@ -150,7 +155,7 @@ public class PlanController extends AbstractBaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询
巡检计划明细"
,
notes
=
"查询巡检
计划明细"
)
@ApiOperation
(
value
=
"查询
维保计划明细"
,
notes
=
"查询维保
计划明细"
)
@RequestMapping
(
value
=
"/detail/{id}"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
queryPointById
(
@ApiParam
(
value
=
"计划id"
,
required
=
true
)
@PathVariable
(
name
=
"id"
)
Long
id
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/PlanTaskController.java
View file @
8a62f863
...
...
@@ -27,6 +27,8 @@ import org.springframework.web.bind.annotation.*;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
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
javax.servlet.http.HttpServletResponse
;
import
java.util.HashMap
;
...
...
@@ -47,6 +49,7 @@ public class PlanTaskController extends AbstractBaseController {
/**
* 计划执行查询
*
* @param queryRequests
* @param commonPageable
* @return
...
...
@@ -196,10 +199,10 @@ public class PlanTaskController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保任务查询-mobile"
,
notes
=
"根据用户条件查询所有计划任务-mobile"
)
@RequestMapping
(
value
=
"/queryPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryLoginUserPlanTask
(
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
qryLoginUserPlanTask
(
@ApiParam
(
value
=
"人员"
)
@RequestParam
(
value
=
"userId"
,
required
=
false
)
Long
userId
,
@ApiParam
(
value
=
"开始日期"
)
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startTime
,
@ApiParam
(
value
=
"结束日期"
)
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endTime
,
@ApiParam
(
value
=
"开始日期"
)
@RequestParam
(
value
=
"startDate"
,
required
=
false
)
String
startTime
,
@ApiParam
(
value
=
"结束日期"
)
@RequestParam
(
value
=
"endDate"
,
required
=
false
)
String
endTime
,
@ApiParam
(
value
=
"维保状态"
)
@RequestParam
(
value
=
"finishStatus"
,
required
=
false
)
Integer
finishStatus
,
@ApiParam
(
value
=
"排序条件"
)
@RequestParam
(
value
=
"orderBy"
,
defaultValue
=
"1"
)
String
orderBy
,
@ApiParam
(
value
=
"业主单位"
)
@RequestParam
(
value
=
"companyId"
,
required
=
false
)
String
companyId
,
...
...
@@ -218,13 +221,13 @@ public class PlanTaskController extends AbstractBaseController {
params
.
put
(
"finishStatus"
,
finishStatus
);
params
.
put
(
"orderBy"
,
PlanTaskOrderByEnum
.
getEumByCode
(
orderBy
).
getOderBy
());
CommonPageable
pageable
=
new
CommonPageable
(
pageNumber
,
pageSize
);
return
CommonResponseUtil
.
success
(
planTaskService
.
getPlanTasks
(
params
,
pageable
));
return
ResponseHelper
.
buildResponse
(
planTaskService
.
getPlanTasks
(
params
,
pageable
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保设施分页列表-mobile"
,
notes
=
"维保设施分页列表-mobile"
)
@RequestMapping
(
value
=
"/point/{planTaskId}/list"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryPlanTaskById
(
public
ResponseModel
qryPlanTaskById
(
@ApiParam
(
value
=
"巡检计划任务ID"
,
required
=
true
)
@PathVariable
Long
planTaskId
,
@ApiParam
(
value
=
"建筑id"
,
required
=
true
)
@RequestParam
(
value
=
"buildingId"
,
required
=
false
)
String
buildingId
,
@ApiParam
(
value
=
"维保状态"
,
required
=
true
)
@RequestParam
(
value
=
"isFinish"
,
required
=
false
)
String
isFinish
,
...
...
@@ -239,39 +242,37 @@ public class PlanTaskController extends AbstractBaseController {
param
.
put
(
"systemId"
,
systemId
);
param
.
put
(
"pointNo"
,
pointNo
);
param
.
put
(
"pointName"
,
pointName
);
return
CommonResponseUtil
.
success
(
planTaskService
.
getPlanTaskPoints
(
param
));
return
ResponseHelper
.
buildResponse
(
planTaskService
.
getPlanTaskPoints
(
param
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"查询维保设施,检查内容详情"
)
@GetMapping
(
value
=
"/task-point-detail"
)
public
CommonResponse
planTaskPointDetail
(
public
ResponseModel
planTaskPointDetail
(
@RequestParam
(
value
=
"routePointId"
)
String
routePointId
,
@RequestParam
(
value
=
"id"
)
String
planTaskDetailId
)
{
return
CommonResponseUtil
.
success
(
planTaskService
.
planTaskPointDetail
(
planTaskDetailId
,
routePointId
));
return
ResponseHelper
.
buildResponse
(
planTaskService
.
planTaskPointDetail
(
planTaskDetailId
,
routePointId
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"维保设施完成状态下拉列表"
)
@GetMapping
(
value
=
"/taskDetail/finishStatus/list"
)
public
CommonResponse
planTaskPointDetail
()
{
return
CommonResponseUtil
.
success
(
PlanTaskDetailIsFinishEnum
.
getEnumList
());
public
ResponseModel
planTaskPointDetail
()
{
return
ResponseHelper
.
buildResponse
(
PlanTaskDetailIsFinishEnum
.
getEnumList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"计划任务完成状态列表"
,
notes
=
"计划任务完成状态列表"
)
@RequestMapping
(
value
=
"/finishStatus/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getPlanTaskFinishStatus
()
{
return
CommonResponseUtil
.
success
(
PlanTaskFinishStatusEnum
.
getEnumList
());
public
ResponseModel
getPlanTaskFinishStatus
()
{
return
ResponseHelper
.
buildResponse
(
PlanTaskFinishStatusEnum
.
getEnumList
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"维保任务排序条件"
,
notes
=
"维保任务排序条件"
)
@RequestMapping
(
value
=
"/orderBy/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
getOrderByList
()
{
return
CommonResponseUtil
.
success
(
PlanTaskOrderByEnum
.
getEnumList
());
public
ResponseModel
getOrderByList
()
{
return
ResponseHelper
.
buildResponse
(
PlanTaskOrderByEnum
.
getEnumList
());
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/PointController.java
View file @
8a62f863
...
...
@@ -15,6 +15,7 @@ import com.yeejoin.amos.maintenance.business.vo.PointInputItemVo;
import
com.yeejoin.amos.maintenance.business.vo.PointVo
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
com.yeejoin.amos.maintenance.dao.entity.Point
;
import
com.yeejoin.amos.maintenance.dao.entity.PointClassify
;
import
io.swagger.annotations.Api
;
...
...
@@ -27,6 +28,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -53,14 +55,17 @@ public class PointController extends AbstractBaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PersonIdentify
@ApiOperation
(
value
=
"新增巡检点"
,
notes
=
"新增巡检点"
)
@PostMapping
(
value
=
"/addPoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addPoint
(
@ApiParam
(
value
=
"巡检点"
,
required
=
true
)
@RequestBody
PointParam
pointParam
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
//点归属于公司
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
pointParam
.
getPoint
().
setCompanyId
(
personIdentity
.
getCompanyId
());
pointParam
.
getPoint
().
setCompanyName
(
personIdentity
.
getCompanyName
());
pointParam
.
getPoint
().
setOrgCode
(
loginOrgCode
);
pointParam
.
getPoint
().
setCreatorId
(
get
UserId
());
pointParam
.
getPoint
().
setCreatorId
(
RequestContext
.
getExe
UserId
());
Point
point
=
iPointService
.
addPoint
(
pointParam
);
return
CommonResponseUtil
.
success
(
point
);
...
...
@@ -92,14 +97,19 @@ public class PointController extends AbstractBaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PersonIdentify
@ApiOperation
(
value
=
"更新巡检点"
,
notes
=
"更新巡检点"
)
@PutMapping
(
value
=
"/updatePoint"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updatePoint
(
@ApiParam
(
value
=
"巡检点"
,
required
=
true
)
@RequestBody
PointParam
pointParam
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
pointParam
.
getPoint
().
setCompanyId
(
personIdentity
.
getCompanyId
());
pointParam
.
getPoint
().
setCompanyName
(
personIdentity
.
getCompanyName
());
pointParam
.
getPoint
().
setCreatorId
(
RequestContext
.
getExeUserId
());
iPointService
.
updatePoint
(
pointParam
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"更新巡检点失败"
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/controller/RouteController.java
View file @
8a62f863
...
...
@@ -7,8 +7,10 @@ import java.util.List;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -58,18 +61,22 @@ public class RouteController extends AbstractBaseController {
* @return CommonResponse
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PersonIdentify
@ApiOperation
(
value
=
"新增巡检路线"
,
notes
=
"新增巡检路线"
)
@PostMapping
(
value
=
"/addRoute"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addRoute
(
@ApiParam
(
value
=
"巡检路线"
,
required
=
true
)
@RequestBody
Route
route
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
route
.
setOrgCode
(
loginOrgCode
);
route
.
setIsDelete
(
false
);
if
(
routeService
.
existRouteName
(
loginOrgCode
,
route
.
getName
()))
{
return
CommonResponseUtil
.
failure
(
"巡检路线名称重复"
);
}
route
.
setCreatorId
(
getUserId
());
route
.
setCompanyId
(
personIdentity
.
getCompanyId
());
route
.
setCompanyName
(
personIdentity
.
getCompanyName
());
route
.
setCreatorId
(
RequestContext
.
getExeUserId
());
routeService
.
addRoute
(
route
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
...
...
@@ -85,14 +92,18 @@ public class RouteController extends AbstractBaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PersonIdentify
@ApiOperation
(
value
=
"更新巡检路线"
,
notes
=
"更新巡检路线"
)
@PutMapping
(
value
=
"/updateRoute"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
updateRoute
(
@ApiParam
(
value
=
"巡检路线"
,
required
=
true
)
@RequestBody
Route
route
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
String
orgCode
=
getOrgCode
(
reginParams
);
route
.
setCompanyId
(
personIdentity
.
getCompanyId
());
route
.
setCompanyName
(
personIdentity
.
getCompanyName
());
route
.
setOrgCode
(
orgCode
);
route
.
setCreatorId
(
get
UserId
());
route
.
setCreatorId
(
RequestContext
.
getExe
UserId
());
routeService
.
updateRoute
(
route
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/PlanTaskServiceImpl.java
View file @
8a62f863
...
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.maintenance.business.service.intfc.IPlanTaskService;
import
com.yeejoin.amos.maintenance.business.util.PlanTaskUtil
;
import
com.yeejoin.amos.maintenance.business.vo.CalDateVo
;
import
com.yeejoin.amos.maintenance.business.vo.PlanTaskVo
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskDetailIsFinishEnum
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskFinishStatusEnum
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.util.DateUtil
;
...
...
@@ -512,8 +513,15 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Override
public
List
getPlanTaskPoints
(
Map
<
String
,
Object
>
param
)
{
return
planTaskMapper
.
getPlanTaskPoints
(
param
);
public
List
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
Map
<
String
,
Object
>
param
)
{
List
<
Map
<
String
,
Object
>>
result
=
planTaskMapper
.
getPlanTaskPoints
(
param
);
result
.
forEach
(
r
->{
if
(
r
.
containsKey
(
"isFinish"
)){
String
isFinishDesc
=
PlanTaskDetailIsFinishEnum
.
getName
(
Integer
.
parseInt
(
r
.
get
(
"isFinish"
).
toString
()));
r
.
put
(
"isFinishDesc"
,
isFinishDesc
);
}
});
return
result
;
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/RouteServiceImpl.java
View file @
8a62f863
...
...
@@ -76,7 +76,7 @@ public class RouteServiceImpl implements IRouteService {
@Override
@Transactional
public
Route
addRoute
(
Route
route
)
{
public
Route
addRoute
(
Route
route
)
{
String
creatorId
=
route
.
getCreatorId
();
String
orgCode
=
route
.
getOrgCode
();
route
=
iRouteDao
.
saveAndFlush
(
route
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/intfc/IPlanTaskService.java
View file @
8a62f863
...
...
@@ -75,7 +75,7 @@ public interface IPlanTaskService {
* @param param
* @return
*/
List
getPlanTaskPoints
(
Map
<
String
,
Object
>
param
);
List
<
Map
<
String
,
Object
>>
getPlanTaskPoints
(
Map
<
String
,
Object
>
param
);
/**
* 今日执行情况
...
...
amos-boot-system-maintenance/pom.xml
View file @
8a62f863
...
...
@@ -12,10 +12,6 @@
<groupId>
com.amosframework.boot
</groupId>
<artifactId>
amos-boot-module-maintenance-biz
</artifactId>
<version>
${amos-biz-boot.version}
</version>
</dependency>
<dependency>
<artifactId>
mysql-connector-java
</artifactId>
<groupId>
mysql
</groupId>
</dependency>
</dependencies>
<build>
...
...
amos-boot-system-maintenance/src/main/resources/db/changelog/mt-1.0.0.xml
View file @
8a62f863
...
...
@@ -58,4 +58,114 @@
ALTER TABLE p_check_shot add COLUMN `photo_conf_key` varchar(32) DEFAULT NULL COMMENT '照片配置key(关联照片和拍照设置)';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"company_id"
/>
</not>
</preConditions>
<comment>
p_input_item add COLUMN company_id 维保公司id
</comment>
<sql>
ALTER TABLE p_input_item add COLUMN `company_id` varchar(32) DEFAULT NULL COMMENT '维保公司id';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"company_name"
/>
</not>
</preConditions>
<comment>
p_input_item add COLUMN company_name '维保公司名称'
</comment>
<sql>
ALTER TABLE p_input_item add COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '维保公司名称';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point"
columnName=
"company_id"
/>
</not>
</preConditions>
<comment>
p_point add COLUMN company_id 维保公司id
</comment>
<sql>
ALTER TABLE p_point add COLUMN `company_id` varchar(32) DEFAULT NULL COMMENT '维保公司id';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-5"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_point"
columnName=
"company_name"
/>
</not>
</preConditions>
<comment>
p_point add COLUMN company_name '维保公司名称'
</comment>
<sql>
ALTER TABLE p_point add COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '维保公司名称';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-6"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_route"
columnName=
"company_id"
/>
</not>
</preConditions>
<comment>
p_route add COLUMN company_id 维保公司id
</comment>
<sql>
ALTER TABLE p_route add COLUMN `company_id` varchar(32) DEFAULT NULL COMMENT '维保公司id';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-7"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_route"
columnName=
"company_name"
/>
</not>
</preConditions>
<comment>
p_route add COLUMN company_name '维保公司名称'
</comment>
<sql>
ALTER TABLE p_route add COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '维保公司名称';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-8"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_plan"
columnName=
"company_id"
/>
</not>
</preConditions>
<comment>
p_plan add COLUMN company_id 维保公司id
</comment>
<sql>
ALTER TABLE p_plan add COLUMN `company_id` varchar(32) DEFAULT NULL COMMENT '维保公司id';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-9"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_plan"
columnName=
"company_name"
/>
</not>
</preConditions>
<comment>
p_plan add COLUMN company_name '维保公司名称'
</comment>
<sql>
ALTER TABLE p_plan add COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '维保公司名称';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-10"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check"
columnName=
"company_id"
/>
</not>
</preConditions>
<comment>
p_check add COLUMN company_id 维保公司id
</comment>
<sql>
ALTER TABLE p_check add COLUMN `company_id` varchar(32) DEFAULT NULL COMMENT '维保公司id';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-11"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check"
columnName=
"company_name"
/>
</not>
</preConditions>
<comment>
p_check add COLUMN company_name '维保公司名称'
</comment>
<sql>
ALTER TABLE p_check add COLUMN `company_name` varchar(255) DEFAULT NULL COMMENT '维保公司名称';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
8a62f863
...
...
@@ -26,6 +26,8 @@
<if
test=
"testRequirement != null "
>
test_requirement=#{testRequirement},
</if>
<if
test=
"inputClassify != null "
>
input_classify=#{inputClassify},
</if>
<if
test=
"unit != null "
>
unit=#{unit},
</if>
<if
test=
"companyId != null "
>
company_id=#{companyId},
</if>
<if
test=
"companyName != null "
>
company_name=#{companyName}
</if>
</trim>
WHERE id=#{id}
</update>
...
...
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