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
afa2d7a4
Commit
afa2d7a4
authored
Aug 16, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://172.16.10.76/moa/amos-boot-biz
into developer
parents
8c13a0c3
8a246fbf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
173 additions
and
85 deletions
+173
-85
BizConstant.java
...m/yeejoin/amos/boot/biz/common/constants/BizConstant.java
+24
-0
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+8
-8
DispatchSaveFeedbackDto.java
...amos/boot/module/tzs/api/dto/DispatchSaveFeedbackDto.java
+3
-0
TzsCommonParam.java
...eejoin/amos/boot/module/tzs/api/enums/TzsCommonParam.java
+39
-0
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+12
-27
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+14
-24
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+30
-0
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+0
-0
CheckServiceImpl.java
...s/maintenance/business/service/impl/CheckServiceImpl.java
+8
-1
DispatchPaperServiceImpl.java
...module/tzs/biz/service/impl/DispatchPaperServiceImpl.java
+0
-0
DispatchTaskServiceImpl.java
.../module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
+2
-2
RepairConsultServiceImpl.java
...module/tzs/biz/service/impl/RepairConsultServiceImpl.java
+25
-20
RescueProcessServiceImpl.java
...module/tzs/biz/service/impl/RescueProcessServiceImpl.java
+0
-1
dbTemplate_check.xml
...tenance/src/main/resources/db/mapper/dbTemplate_check.xml
+8
-2
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/constants/BizConstant.java
0 → 100644
View file @
afa2d7a4
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
constants
;
/**
* @Description: 业务通用常量类
* @Author: DELL
* @Date: 2021/5/26
*/
public
interface
BizConstant
{
/**
* 经度
*/
public
final
static
String
LONGITUDE
=
"longitude"
;
/**
* 纬度
*/
public
final
static
String
LATITUDE
=
"latitude"
;
/**
* 地址
*/
public
final
static
String
ADDRESS
=
"address"
;
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
afa2d7a4
...
...
@@ -11,11 +11,11 @@ import org.springframework.web.bind.annotation.RequestParam;
import
com.alibaba.fastjson.JSONObject
;
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW
-CJHENHAO
"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
public
interface
WorkflowFeignService
{
/**
* 发起流程
*
*
* @param params
* @return
*/
...
...
@@ -24,7 +24,7 @@ public interface WorkflowFeignService {
/**
* 完成任务
*
*
* @param taskID
* @param variable
* @return
...
...
@@ -36,7 +36,7 @@ public interface WorkflowFeignService {
/**
* 查询当前流程下所有的可执行任务
*
*
* @param processInstanceId
* @return
*/
...
...
@@ -45,13 +45,13 @@ public interface WorkflowFeignService {
/**
* 查询当前任务的执行用户组
*
*
* @param processInstanceId
* @return
*/
@RequestMapping
(
value
=
"/task/getTaskGroupName/{taskId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
getTaskGroupName
(
@PathVariable
(
"taskId"
)
String
taskId
);
/**
* 我的待办
* @param processDefinitionKey
...
...
@@ -74,7 +74,7 @@ public interface WorkflowFeignService {
* @param processInstanceId
* @return
*/
@RequestMapping
(
value
=
"/activitiHistory/
tasks
/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
queryTasksByProcessInstanceId
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
);
@RequestMapping
(
value
=
"/activitiHistory/
historyTask
/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
query
History
TasksByProcessInstanceId
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/dto/DispatchSaveFeedbackDto.java
View file @
afa2d7a4
...
...
@@ -72,6 +72,9 @@ public class DispatchSaveFeedbackDto extends BaseDto {
@ApiModelProperty
(
value
=
"回访时间"
)
private
Date
feedbackTime
;
@ApiModelProperty
(
value
=
"维修备注"
)
private
String
fixRemark
;
public
DispatchSaveFeedbackDto
()
{
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-tzs-api/src/main/java/com/yeejoin/amos/boot/module/tzs/api/enums/TzsCommonParam.java
0 → 100644
View file @
afa2d7a4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tzs
.
api
.
enums
;
/**
* @author kongfm
* @date 2021/8/16.
*/
public
class
TzsCommonParam
{
public
static
final
String
SAVE_FEEDBACK_TIME
=
"save_feedback_time"
;
public
static
final
String
SAVE_FEEDBACK_USER
=
"save_feedback_user"
;
public
static
final
String
SAVE_FEEDBACK_UID
=
"save_feedback_uid"
;
public
static
final
String
SAVE_FEEDBACK_RESULT
=
"save_feedback_result"
;
public
static
final
String
FIX_RESULT
=
"fix_result"
;
public
static
final
String
ERROR_RESULT
=
"error_result"
;
public
static
final
String
FIX_REMARK
=
"fix_remark"
;
public
static
final
String
FIX_FEEDBACK_TIME
=
"fix_feedback_time"
;
public
static
final
String
FEEDBACK_RESULT
=
"feedback_result"
;
public
static
final
String
FIX_FEEDBACK_TYPE
=
"fix_feedback_type"
;
public
static
final
String
FIX_FEEDBACK_UNAME
=
"fix_feedback_uname"
;
public
static
final
String
FIX_FEEDBACK_UID
=
"fix_feedback_uid"
;
public
static
final
String
CONSULT_FEEDBACK_TIME
=
"consult_feedback_time"
;
public
static
final
String
ACTION_RESULT
=
"action_result"
;
public
static
final
String
CONSULT_FEEDBACK_TYPE
=
"consult_feedback_type"
;
public
static
final
String
CONSULT_FEEDBACK_UNAME
=
"consult_feedback_uname"
;
public
static
final
String
CONSULT_FEEDBACK_UID
=
"consult_feedback_uid"
;
public
static
final
String
MAIN_FEEDBACK_RESULT
=
"main_feedback_result"
;
public
static
final
String
PQ
=
"PQ"
;
public
static
final
String
JYHF
=
"JYHF"
;
public
static
final
String
WXJG
=
"WXJG"
;
public
static
final
String
GZYY
=
"GZYY"
;
public
static
final
String
WXFK
=
"WXFK"
;
public
static
final
String
BXFK
=
"BXFK"
;
public
static
final
String
FKFS
=
"FKFS"
;
public
static
final
String
TSRFK
=
"TSRFK"
;
public
static
final
String
CZJG
=
"CZJG"
;
public
static
final
String
FKJG
=
"FKJG"
;
public
static
final
String
WXFK_TS
=
"WXFK_TS"
;
public
static
final
String
DD
=
"DD"
;
public
static
final
String
JC
=
"JC"
;
}
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 @
afa2d7a4
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.EnumsUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceCraneDto
;
...
...
@@ -91,19 +92,11 @@ public class WaterResourceController extends BaseController {
model
.
setRealityImg
(
JSONArray
.
toJSONString
(
model
.
getRealityImgList
()));
model
.
setOrientationImg
(
JSONArray
.
toJSONString
(
model
.
getOrientationImgList
()));
if
(
model
.
getAddress
()!=
null
){
String
[]
data
=
model
.
getAddress
().
split
(
"@address@"
);
model
.
setAddress
(
data
[
0
]);
if
(
data
[
1
]!=
null
&&!
""
.
equals
(
data
[
1
])){
JSONObject
jSONObject
=
JSON
.
parseObject
(
data
[
1
]);
if
(
jSONObject
.
getString
(
"longitude"
)!=
null
&&!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
model
.
setLongitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"longitude"
)));
}
if
(
jSONObject
.
getString
(
"longitude"
)!=
null
&&!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
model
.
setLatitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"latitude"
)));
}
}
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
model
.
getAddress
());
model
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
model
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
if
(!
StringUtils
.
isEmpty
(
resourceType
))
{
...
...
@@ -174,21 +167,13 @@ public class WaterResourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
WaterResourceDto
>
updateBySequenceNbrWaterResource
(
@RequestBody
WaterResourceDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
if
(
model
.
getAddress
()!=
null
){
String
[]
data
=
model
.
getAddress
().
split
(
"@address@"
);
model
.
setAddress
(
data
[
0
]);
if
(
data
[
1
]!=
null
&&!
""
.
equals
(
data
[
1
])){
JSONObject
jSONObject
=
JSON
.
parseObject
(
data
[
1
]);
if
(
jSONObject
.
getString
(
"longitude"
)!=
null
&&!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
model
.
setLongitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"longitude"
)));
}
if
(
jSONObject
.
getString
(
"longitude"
)!=
null
&&!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
model
.
setLatitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"latitude"
)));
}
}
}
if
(
StringUtils
.
isNotEmpty
(
model
.
getAddress
()))
{
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
model
.
getAddress
());
model
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
model
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
// 更新基本信息
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setRealityImg
(
JSONArray
.
toJSONString
(
model
.
getRealityImgList
()));
...
...
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 @
afa2d7a4
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
...
...
@@ -26,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -124,17 +126,10 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
public
LinkageUnitDto
saveModel
(
LinkageUnitDto
linkageUnitDto
)
{
if
(
linkageUnitDto
.
getAddress
()
!=
null
)
{
String
[]
data
=
linkageUnitDto
.
getAddress
().
split
(
"@address@"
);
linkageUnitDto
.
setAddress
(
data
[
0
]);
if
(
data
[
1
]
!=
null
&&
!
""
.
equals
(
data
[
1
]))
{
JSONObject
jSONObject
=
JSON
.
parseObject
(
data
[
1
]);
if
(
jSONObject
.
getString
(
"longitude"
)
!=
null
&&
!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
linkageUnitDto
.
setLongitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"longitude"
)));
}
if
(
jSONObject
.
getString
(
"longitude"
)
!=
null
&&
!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
linkageUnitDto
.
setLatitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"latitude"
)));
}
}
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
linkageUnitDto
.
getAddress
());
linkageUnitDto
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
linkageUnitDto
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
linkageUnitDto
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
// 1.保存行数据
String
groupCode
=
this
.
getGroupCode
();
...
...
@@ -178,8 +173,10 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
.
list
(
new
LambdaQueryWrapper
<
DynamicFormColumn
>().
eq
(
DynamicFormColumn:
:
getGroupCode
,
groupCode
));
Map
<
String
,
Object
>
fieldCodes
=
Bean
.
listToMap
(
columns
,
"fieldCode"
,
"queryStrategy"
,
DynamicFormColumn
.
class
);
LinkageUnitDto
linkageUnitDto
=
linkageUnitMapper
.
selectOne
(
false
,
fieldCodes
,
groupCode
,
sequenceNbr
);
List
<
SourceFile
>
sourceFiles
=
sourceFileServiceImpl
.
findBySourceId
(
linkageUnitDto
.
getSequenceNbr
());
linkageUnitDto
.
setImage
(
sourceFiles
);
if
(!
ValidationUtil
.
isEmpty
(
linkageUnitDto
))
{
List
<
SourceFile
>
sourceFiles
=
sourceFileServiceImpl
.
findBySourceId
(
linkageUnitDto
.
getSequenceNbr
());
linkageUnitDto
.
setImage
(
sourceFiles
);
}
return
linkageUnitDto
;
}
...
...
@@ -204,17 +201,10 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
public
LinkageUnitDto
updateById
(
LinkageUnitDto
linkageUnitDto
)
{
if
(
linkageUnitDto
.
getAddress
()
!=
null
)
{
String
[]
data
=
linkageUnitDto
.
getAddress
().
split
(
"@address@"
);
linkageUnitDto
.
setAddress
(
data
[
0
]);
if
(
data
[
1
]
!=
null
&&
!
""
.
equals
(
data
[
1
]))
{
JSONObject
jSONObject
=
JSON
.
parseObject
(
data
[
1
]);
if
(
jSONObject
.
getString
(
"longitude"
)
!=
null
&&
!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
linkageUnitDto
.
setLongitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"longitude"
)));
}
if
(
jSONObject
.
getString
(
"longitude"
)
!=
null
&&
!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
linkageUnitDto
.
setLatitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"latitude"
)));
}
}
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
linkageUnitDto
.
getAddress
());
linkageUnitDto
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
linkageUnitDto
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
linkageUnitDto
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
// 修改基本信息
updateWithModel
(
linkageUnitDto
);
...
...
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 @
afa2d7a4
...
...
@@ -6,7 +6,10 @@ import java.util.Optional;
import
javax.annotation.Resource
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.*
;
...
...
@@ -235,4 +238,31 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
public
List
<
WaterResourceTypeDto
>
getWaterResourceTypeList
(
Boolean
isDelete
)
{
return
waterResourceMapper
.
getWaterResourceTypeList
(
isDelete
);
}
public
static
JSONObject
getLongLatFromAddress
(
String
address
)
{
JSONObject
result
=
new
JSONObject
();
result
.
put
(
BizConstant
.
ADDRESS
,
""
);
result
.
put
(
BizConstant
.
LONGITUDE
,
"0"
);
result
.
put
(
BizConstant
.
LATITUDE
,
"0"
);
if
(
StringUtils
.
isNotEmpty
(
address
))
{
String
[]
addressData
=
address
.
split
(
"@address@"
);
if
(
addressData
.
length
>
1
)
{
result
.
put
(
BizConstant
.
ADDRESS
,
addressData
[
0
]);
JSONObject
langLatObj
=
JSON
.
parseObject
(
addressData
[
1
]);
if
(
StringUtils
.
isNotEmpty
(
langLatObj
.
getString
(
BizConstant
.
LONGITUDE
)))
{
result
.
put
(
BizConstant
.
LONGITUDE
,
langLatObj
.
getString
(
BizConstant
.
LONGITUDE
));
}
else
{
result
.
put
(
BizConstant
.
LONGITUDE
,
"0"
);
}
if
(
StringUtils
.
isNotEmpty
(
langLatObj
.
getString
(
BizConstant
.
LATITUDE
)))
{
result
.
put
(
BizConstant
.
LATITUDE
,
langLatObj
.
getString
(
BizConstant
.
LATITUDE
));
}
else
{
result
.
put
(
BizConstant
.
LATITUDE
,
"0"
);
}
}
else
{
result
.
put
(
BizConstant
.
ADDRESS
,
addressData
[
0
]);
}
}
return
result
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
afa2d7a4
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/CheckServiceImpl.java
View file @
afa2d7a4
...
...
@@ -1052,7 +1052,14 @@ public class CheckServiceImpl implements ICheckService {
@Override
public
Map
<
String
,
Object
>
getCheckDetail
(
String
id
)
{
return
checkMapper
.
getCheckDetail
(
id
);
Map
<
String
,
Object
>
map
=
checkMapper
.
getCheckDetail
(
id
);
if
(
map
.
containsKey
(
"isOk"
))
{
map
.
put
(
"status"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
map
.
get
(
"isOk"
))).
getName
());
}
if
(
map
.
containsKey
(
"picture"
))
{
map
.
put
(
"picture"
,
fileUrl
+
map
.
get
(
"picture"
));
}
return
map
;
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/DispatchPaperServiceImpl.java
View file @
afa2d7a4
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/DispatchTaskServiceImpl.java
View file @
afa2d7a4
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.tzs.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.AlertCalledDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchPaperFormDto
;
import
com.yeejoin.amos.boot.module.tzs.api.dto.DispatchTaskDto
;
...
...
@@ -105,8 +106,7 @@ public class DispatchTaskServiceImpl extends BaseService<DispatchTaskDto,Dispatc
String
content
=
template
.
getContent
();
// 替换模板内容
// 通用替换字段 报修时间 地址 电梯识别码 使用单位分类
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"YYYY-MM-dd HH:mm:ss"
);
String
createTime
=
sdf
.
format
(
alertCalledDto
.
getCallTime
());
String
createTime
=
DateUtils
.
date2LongStr
(
alertCalledDto
.
getCallTime
());
String
rescueCode
=
alertCalledDto
.
getDeviceId
();
String
emergencyCall
=
alertCalledDto
.
getEmergencyCall
()
==
null
?
""
:
alertCalledDto
.
getEmergencyCall
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/RepairConsultServiceImpl.java
View file @
afa2d7a4
...
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.module.tzs.api.entity.DispatchTask;
import
com.yeejoin.amos.boot.module.tzs.api.entity.RepairConsult
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.Template
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.AlertStageEnums
;
import
com.yeejoin.amos.boot.module.tzs.api.enums.TzsCommonParam
;
import
com.yeejoin.amos.boot.module.tzs.api.mapper.RepairConsultMapper
;
import
com.yeejoin.amos.boot.module.tzs.api.service.IRepairConsultService
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -83,7 +84,11 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
AlertCalledDto
alertCalledVo
=
alertCallFrom
.
getAlertCalledDto
();
// 获取模板 拼接json
QueryWrapper
<
Template
>
templateQueryWrapper
=
new
QueryWrapper
<>();
templateQueryWrapper
.
eq
(
"type_code"
,
"RECORD-"
+
type
);
if
(
TzsCommonParam
.
WXFK_TS
.
equals
(
type
))
{
templateQueryWrapper
.
eq
(
"type_code"
,
"RECORD-WXFK"
);
}
else
{
templateQueryWrapper
.
eq
(
"type_code"
,
"RECORD-"
+
type
);
}
Template
template
=
templateServiceImpl
.
getOne
(
templateQueryWrapper
);
String
content
=
template
.
getContent
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
...
...
@@ -103,7 +108,7 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
throw
new
BadRequest
(
"警情类型缺失"
);
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$createUser"
,
createUser
).
replace
(
"$call"
,
emergency_call
);
content
=
content
.
replace
(
"$area"
,
area
).
replace
(
"$alertType"
,
alertType
);
}
else
if
(
"PQ"
.
equals
(
type
))
{
}
else
if
(
TzsCommonParam
.
PQ
.
equals
(
type
))
{
String
createUser
=
user
.
getUserName
();
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
unit
=
dispatchTask
.
getResponseOrgName
();
...
...
@@ -125,25 +130,25 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
}
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$createUser"
,
createUser
).
replace
(
"$unit"
,
unit
);
content
=
content
.
replace
(
"$person"
,
person
).
replace
(
"$phone"
,
phone
).
replace
(
"$taskType"
,
taskType
);
}
else
if
(
"DD"
.
equals
(
type
))
{
}
else
if
(
TzsCommonParam
.
DD
.
equals
(
type
))
{
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
RescueProcessDto
rescueProcessDto
=
rescueProcessServiceImpl
.
getProcessByAlertId
(
alertId
);
String
FKFS
=
rescueProcessDto
.
getArriveFeedbackType
();
content
=
content
.
replace
(
"$FKFS"
,
FKFS
);
}
else
if
(
"JC"
.
equals
(
type
))
{
}
else
if
(
TzsCommonParam
.
JC
.
equals
(
type
))
{
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
RescueProcessDto
rescueProcessDto
=
rescueProcessServiceImpl
.
getProcessByAlertId
(
alertId
);
String
FKFS
=
rescueProcessDto
.
getArriveFeedbackType
();
content
=
content
.
replace
(
"$FKFS"
,
FKFS
);
}
else
if
(
"JYHF"
.
equals
(
type
))
{
}
else
if
(
TzsCommonParam
.
JYHF
.
equals
(
type
))
{
String
createUser
=
user
.
getUserName
();
String
create
=
alertCalledVo
.
getEmergencyPerson
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$createUser"
,
createUser
).
replace
(
"$create"
,
create
);
}
else
if
(
"WXFK"
.
equals
(
type
))
{
//从派遣单获取数据
}
else
if
(
TzsCommonParam
.
WXFK
.
equals
(
type
))
{
//从派遣单获取数据
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
...
...
@@ -152,12 +157,12 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
List
<
AlertFormValue
>
dynamicForm
=
dispatchPaperFormDto
.
getDynamicFormAlert
();
Map
<
String
,
String
>
tempMap
=
new
HashMap
<
String
,
String
>();
dynamicForm
.
stream
().
forEach
(
alertFormValue
->
{
if
(
"fix_result"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
if
(
TzsCommonParam
.
FIX_RESULT
.
equals
(
alertFormValue
.
getFieldCode
()))
{
tempMap
.
put
(
"fixResult"
,
alertFormValue
.
getFieldValue
());
}
});
content
=
content
.
replace
(
"$FKFS"
,
dispatchPaper
.
getFeedbackType
()).
replace
(
"$fixResult"
,
tempMap
.
get
(
"fixResult"
));
}
else
if
(
"WXFK-TS"
.
equals
(
type
))
{
//从派遣单获取数据
}
else
if
(
TzsCommonParam
.
WXFK_TS
.
equals
(
type
))
{
//从派遣单获取数据
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
...
...
@@ -166,13 +171,13 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
List
<
AlertFormValue
>
dynamicForm
=
dispatchPaperFormDto
.
getDynamicFormAlert
();
Map
<
String
,
String
>
tempMap
=
new
HashMap
<
String
,
String
>();
dynamicForm
.
stream
().
forEach
(
alertFormValue
->
{
if
(
"action_result"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
if
(
TzsCommonParam
.
ACTION_RESULT
.
equals
(
alertFormValue
.
getFieldCode
()))
{
tempMap
.
put
(
"fixResult"
,
alertFormValue
.
getFieldValue
());
}
});
content
=
content
.
replace
(
"$FKFS"
,
dispatchPaper
.
getFeedbackType
()).
replace
(
"$fixResult"
,
tempMap
.
get
(
"fixResult"
));
type
=
"WXFK"
;
}
else
if
(
"BXFK"
.
equals
(
type
))
{
type
=
TzsCommonParam
.
WXFK
;
}
else
if
(
TzsCommonParam
.
BXFK
.
equals
(
type
))
{
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
...
...
@@ -180,14 +185,14 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
List
<
AlertFormValue
>
dynamicForm
=
dispatchPaperFormDto
.
getDynamicFormAlert
();
Map
<
String
,
String
>
tempMap
=
new
HashMap
<
String
,
String
>();
dynamicForm
.
stream
().
forEach
(
alertFormValue
->
{
if
(
"fix_feedback_type"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
tempMap
.
put
(
"FKFS"
,
alertFormValue
.
getFieldValue
());
}
else
if
(
"fix_result"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
if
(
TzsCommonParam
.
FIX_FEEDBACK_TYPE
.
equals
(
alertFormValue
.
getFieldCode
()))
{
tempMap
.
put
(
TzsCommonParam
.
FKFS
,
alertFormValue
.
getFieldValue
());
}
else
if
(
TzsCommonParam
.
FIX_RESULT
.
equals
(
alertFormValue
.
getFieldCode
()))
{
tempMap
.
put
(
"fixResult"
,
alertFormValue
.
getFieldValue
());
}
});
content
=
content
.
replace
(
"$FKFS"
,
tempMap
.
get
(
"FKFS"
)).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"fixResult"
));
}
else
if
(
"TSRFK"
.
equals
(
type
))
{
content
=
content
.
replace
(
"$FKFS"
,
tempMap
.
get
(
TzsCommonParam
.
FKFS
)).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"fixResult"
));
}
else
if
(
TzsCommonParam
.
TSRFK
.
equals
(
type
))
{
DispatchTask
dispatchTask
=
dispatchTaskServiceImpl
.
getById
(
taskId
);
String
person
=
dispatchTask
.
getResponseUserName
();
content
=
content
.
replace
(
"$createTime"
,
createTime
).
replace
(
"$person"
,
person
);
...
...
@@ -195,13 +200,13 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
List
<
AlertFormValue
>
dynamicForm
=
dispatchPaperFormDto
.
getDynamicFormAlert
();
Map
<
String
,
String
>
tempMap
=
new
HashMap
<
String
,
String
>();
dynamicForm
.
stream
().
forEach
(
alertFormValue
->
{
if
(
"consult_feedback_type"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
tempMap
.
put
(
"FKFS"
,
alertFormValue
.
getFieldValue
());
}
else
if
(
"action_result"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
if
(
TzsCommonParam
.
CONSULT_FEEDBACK_TYPE
.
equals
(
alertFormValue
.
getFieldCode
()))
{
tempMap
.
put
(
TzsCommonParam
.
FKFS
,
alertFormValue
.
getFieldValue
());
}
else
if
(
TzsCommonParam
.
ACTION_RESULT
.
equals
(
alertFormValue
.
getFieldCode
()))
{
tempMap
.
put
(
"action_result"
,
alertFormValue
.
getFieldValue
());
}
});
content
=
content
.
replace
(
"$FKFS"
,
tempMap
.
get
(
"FKFS"
)).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"action_result"
));
content
=
content
.
replace
(
"$FKFS"
,
tempMap
.
get
(
TzsCommonParam
.
FKFS
)).
replace
(
"$feedbackResult"
,
tempMap
.
get
(
"action_result"
));
}
repairConsult
.
setType
(
AlertStageEnums
.
getEnumByCode
(
type
).
getId
());
repairConsult
.
setAlertStageCode
(
AlertStageEnums
.
getEnumByCode
(
type
).
getId
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/RescueProcessServiceImpl.java
View file @
afa2d7a4
...
...
@@ -96,7 +96,6 @@ public class RescueProcessServiceImpl extends BaseService<RescueProcessDto,Rescu
if
(
arriveTime
!=
null
&&
dispatchTime
!=
null
)
{
Long
arriveTimes
=
arriveTime
.
getTime
()
-
dispatchTime
.
getTime
();
// 相差毫秒数
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
//这里想要只保留分秒可以写成"mm:ss"
formatter
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"GMT+00:00"
));
String
hms
=
formatter
.
format
(
arriveTimes
);
rescueProcessDto
.
setIsTimeout
(
arriveTimes
<
1800000
?
false
:
true
);
rescueProcessDto
.
setArriveUseTime
(
hms
);
...
...
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
afa2d7a4
...
...
@@ -2016,13 +2016,14 @@
<select
id=
"getCheckDetail"
resultType=
"Map"
>
SELECT
pc.id checkId,
pc.is_ok isOk,
pc
i
.is_ok isOk,
date_format(
pc.check_time,
'%Y-%m-%d %H:%i:%s'
) maintenanceDate,
pp.id pointId,
pp.equipment_id equipmentId,
pp.remark remark,
pp.owner_name ownerName,
pp.equipment_name equipmentName,
pp.belong_system_id systemId,
...
...
@@ -2038,12 +2039,17 @@
ppl.name planName,
pp.plan_type planType,
ppt.user_name planUser,
pii.name itemName
pci.input_name itemName,
pii.maintenance_content itemContent,
pcs.photo_data picture,
pcs.point_name pointName,
pcs.shot_type shotType
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
LEFT JOIN p_plan ppl ON ppl.id = pc.plan_id
LEFT JOIN p_check_input pci ON pci.check_id = pc.id
LEFT JOIN p_input_item pii ON pii.id = pci.input_id
LEFT JOIN p_check_shot pcs ON pcs.check_id = pc.id
LEFT JOIN p_plan_task ppt ON ppt.id = pc.plan_task_id
WHERE
pc.id = #{id}
...
...
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