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
d26fa61c
Commit
d26fa61c
authored
Aug 24, 2021
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.检查记录照片和检查项增加对应关系
2.增加检查记录详情接口
parent
6f90dc7a
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
231 additions
and
45 deletions
+231
-45
CheckShot.java
...va/com/yeejoin/amos/maintenance/dao/entity/CheckShot.java
+13
-0
CheckController.java
...amos/maintenance/business/controller/CheckController.java
+11
-2
PlanTaskController.java
...s/maintenance/business/controller/PlanTaskController.java
+4
-4
CheckMapper.java
...oin/amos/maintenance/business/dao/mapper/CheckMapper.java
+8
-1
PlanTaskMapper.java
.../amos/maintenance/business/dao/mapper/PlanTaskMapper.java
+8
-2
CheckInputDto.java
.../yeejoin/amos/maintenance/business/dto/CheckInputDto.java
+25
-0
CheckShotDto.java
...m/yeejoin/amos/maintenance/business/dto/CheckShotDto.java
+13
-0
PictureJsonConfig.java
...join/amos/maintenance/business/dto/PictureJsonConfig.java
+31
-0
CheckRecordParam.java
...oin/amos/maintenance/business/param/CheckRecordParam.java
+1
-1
AcceptEquipmentRules.java
...tenance/business/service/action/AcceptEquipmentRules.java
+4
-0
CheckServiceImpl.java
...s/maintenance/business/service/impl/CheckServiceImpl.java
+25
-11
InputItemServiceImpl.java
...intenance/business/service/impl/InputItemServiceImpl.java
+18
-4
PlanTaskServiceImpl.java
...aintenance/business/service/impl/PlanTaskServiceImpl.java
+9
-17
ICheckService.java
...mos/maintenance/business/service/intfc/ICheckService.java
+8
-0
IPlanTaskService.java
.../maintenance/business/service/intfc/IPlanTaskService.java
+1
-1
mt-1.0.0.xml
...-maintenance/src/main/resources/db/changelog/mt-1.0.0.xml
+12
-0
dbTemplate_check.xml
...tenance/src/main/resources/db/mapper/dbTemplate_check.xml
+38
-0
dbTemplate_plan_task.xml
...nce/src/main/resources/db/mapper/dbTemplate_plan_task.xml
+2
-2
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-maintenance-api/src/main/java/com/yeejoin/amos/maintenance/dao/entity/CheckShot.java
View file @
d26fa61c
...
...
@@ -62,6 +62,11 @@ public class CheckShot extends BasicEntity {
private
long
checkInputId
;
/**
* 照片配置key(关联照片和拍照设置),来源picture_json
*/
private
String
photoConfKey
;
/**
* 扩展分类id
*/
@Column
(
name
=
"classify_id"
)
...
...
@@ -113,6 +118,14 @@ public class CheckShot extends BasicEntity {
this
.
photoData
=
photoData
;
}
public
String
getPhotoConfKey
()
{
return
photoConfKey
;
}
public
void
setPhotoConfKey
(
String
photoConfKey
)
{
this
.
photoConfKey
=
photoConfKey
;
}
public
String
getPointName
()
{
return
this
.
pointName
;
}
...
...
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 @
d26fa61c
...
...
@@ -3,6 +3,8 @@ package com.yeejoin.amos.maintenance.business.controller;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dto.CheckDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckInputDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckShotDto
;
import
com.yeejoin.amos.maintenance.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckRecordParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckStatisticalParam
;
...
...
@@ -11,7 +13,6 @@ import com.yeejoin.amos.maintenance.business.util.*;
import
com.yeejoin.amos.maintenance.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.maintenance.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.maintenance.common.enums.CheckRecordOrderByEnum
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskOrderByEnum
;
import
com.yeejoin.amos.maintenance.core.async.AsyncTask
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonRequest
;
...
...
@@ -19,7 +20,6 @@ import com.yeejoin.amos.maintenance.core.common.response.AppPointCheckRespone;
import
com.yeejoin.amos.maintenance.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.maintenance.core.framework.PersonIdentify
;
import
com.yeejoin.amos.maintenance.core.util.StringUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.Check
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
...
...
@@ -36,6 +36,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
javax.xml.transform.*
;
...
...
@@ -540,4 +542,11 @@ public class CheckController extends AbstractBaseController {
CommonPageable
pageable
=
new
CommonPageable
(
pageNum
,
pageSize
);
return
CommonResponseUtil
.
success
(
checkService
.
getCheckListByOriginalId
(
originalId
,
pageable
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"web端维保记录详情"
)
@GetMapping
(
value
=
"input/{checkId}/detail"
)
public
ResponseModel
inputDetail
(
@ApiParam
(
value
=
"记录主表id"
)
@PathVariable
String
checkId
){
return
ResponseHelper
.
buildResponse
(
checkService
.
getInputDetail
(
checkId
));
}
}
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 @
d26fa61c
...
...
@@ -9,9 +9,9 @@ import com.yeejoin.amos.maintenance.business.util.CommonResponseUtil;
import
com.yeejoin.amos.maintenance.business.util.FileHelper
;
import
com.yeejoin.amos.maintenance.business.util.PlanTaskPageParamUtil
;
import
com.yeejoin.amos.maintenance.business.vo.PlanTaskVo
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskOrderByEnum
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskDetailIsFinishEnum
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskFinishStatusEnum
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskOrderByEnum
;
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
;
...
...
@@ -198,14 +198,14 @@ public class PlanTaskController extends AbstractBaseController {
@RequestMapping
(
value
=
"/queryPlanTask"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
qryLoginUserPlanTask
(
@ApiParam
(
value
=
"人员"
)
@RequestParam
(
value
=
"userId"
,
required
=
false
)
Long
userId
,
@ApiParam
(
value
=
"开始日期"
,
required
=
true
)
@RequestParam
(
value
=
"startDate"
)
String
startTime
,
@ApiParam
(
value
=
"结束日期"
,
required
=
true
)
@RequestParam
(
value
=
"endDate"
)
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
,
@ApiParam
(
value
=
"当前页"
,
required
=
true
)
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@ApiParam
(
value
=
"页大小"
,
required
=
true
)
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
)
throws
Exception
{
Hash
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
Map
<
String
,
Object
>
authMap
=
Bean
.
BeantoMap
(
reginParams
.
getPersonIdentity
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/mapper/CheckMapper.java
View file @
d26fa61c
...
...
@@ -4,6 +4,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.maintenance.business.dto.CheckInputDto
;
import
com.yeejoin.amos.maintenance.business.param.CheckStatisticalParam
;
import
com.yeejoin.amos.maintenance.business.util.CheckDetailInputPageParam
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -16,7 +17,6 @@ import com.yeejoin.amos.maintenance.business.entity.mybatis.CheckUserBo;
import
com.yeejoin.amos.maintenance.business.param.CheckInfoListPageParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.maintenance.business.param.CheckRecordParam
;
import
com.yeejoin.amos.maintenance.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.maintenance.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.maintenance.core.common.response.PointCheckInfoBusinessRespone
;
...
...
@@ -283,4 +283,11 @@ public interface CheckMapper extends BaseMapper {
Map
<
String
,
Object
>
getCheckDetail
(
@Param
(
value
=
"id"
)
String
id
);
/**
* 检查项结果列表
* @param checkId 检查记录主表id
* @param fileUrl 文件服务器前缀
* @return List<CheckInputDto>
*/
List
<
CheckInputDto
>
queryCheckInputDetail
(
@Param
(
"checkId"
)
String
checkId
,
@Param
(
"fileUrl"
)
String
fileUrl
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dao/mapper/PlanTaskMapper.java
View file @
d26fa61c
...
...
@@ -68,7 +68,7 @@ public interface PlanTaskMapper extends BaseMapper {
* @param params
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
Hash
Map
<
String
,
Object
>
params
);
List
<
Map
<
String
,
Object
>>
getPlanTasks
(
Map
<
String
,
Object
>
params
);
/**
* 通过计划任务Id获得计划任务信息
* @param planTaskId
...
...
@@ -120,7 +120,13 @@ public interface PlanTaskMapper extends BaseMapper {
* @return
*/
List
<
CheckChkExListBo
>
getChkExList
(
CheckPtListPageParam
param
);
long
getPlanTasksCount
(
HashMap
<
String
,
Object
>
params
);
/**
* 数量统计
* @param params
* @return
*/
long
getPlanTasksCount
(
Map
<
String
,
Object
>
params
);
Map
<
String
,
Object
>
getPlanTaskStatisticsForApp
(
HashMap
<
String
,
Object
>
params
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dto/CheckInputDto.java
0 → 100644
View file @
d26fa61c
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* @author DELL
*/
@Data
public
class
CheckInputDto
{
private
Long
checkInputId
;
private
Long
inputId
;
private
String
inputName
;
private
Integer
orderNo
;
private
String
inputValue
;
private
String
isOk
;
private
String
isOkDesc
;
private
String
pictureJson
;
private
String
dataJson
;
private
String
remark
;
private
List
<
CheckShotDto
>
checkInputShot
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dto/CheckShotDto.java
View file @
d26fa61c
...
...
@@ -7,6 +7,19 @@ import lombok.Data;
*/
@Data
public
class
CheckShotDto
{
private
Long
checkShotId
;
/**
* 照片类型:1-检查项照片;2-不合格照片
*/
private
String
shotType
;
/**
* 照片路径
*/
private
String
fileUrl
;
/**
* 照片配置key,用来照片和具体的拍照配置对应
*/
private
String
photoConfKey
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/dto/PictureJsonConfig.java
0 → 100644
View file @
d26fa61c
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
dto
;
import
lombok.Data
;
/**
* @author DELL
*/
@Data
public
class
PictureJsonConfig
{
/**
* 是否必输
*/
private
String
isMust
;
/**
* 名称
*/
private
String
name
;
/**
* 排序
*/
private
Integer
orderNo
;
/**
* 拍照数量
*/
private
String
picNumber
;
/**
* 配置key
*/
private
String
photoConfKey
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/param/CheckRecordParam.java
View file @
d26fa61c
...
...
@@ -21,7 +21,7 @@ public class CheckRecordParam {
@ApiModelProperty
(
value
=
"点id"
,
required
=
true
)
private
Long
pointId
;
@ApiModelProperty
(
value
=
"组织机构"
,
required
=
false
)
@ApiModelProperty
(
value
=
"组织机构"
)
private
String
orgCode
;
@ApiModelProperty
(
value
=
"备注"
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/action/AcceptEquipmentRules.java
View file @
d26fa61c
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.maintenance.business.service.action;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.yeejoin.amos.maintenance.business.dao.repository.ICheckInputDao
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IInputItemDao
;
import
com.yeejoin.amos.maintenance.business.entity.mybatis.EquipmentInputItemRo
;
...
...
@@ -37,6 +38,8 @@ public class AcceptEquipmentRules {
private
ICheckInputDao
checkInputDao
;
@Value
(
"${input.statute.prefix}"
)
private
String
statutePre
;
@Autowired
private
Sequence
sequence
;
public
void
getContent
(
...
...
@@ -71,6 +74,7 @@ public class AcceptEquipmentRules {
pictureObject
.
put
(
"name"
,
"拍照"
);
pictureObject
.
put
(
"orderNo"
,
"0"
);
pictureObject
.
put
(
"picNumber"
,
0
);
pictureObject
.
put
(
"photoConfKey"
,
String
.
valueOf
(
sequence
.
nextId
()));
pictureArray
.
add
(
pictureObject
);
item
.
setPictureJson
(
pictureArray
.
toJSONString
());
}
else
{
...
...
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 @
d26fa61c
...
...
@@ -18,6 +18,7 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper;
import
com.yeejoin.amos.maintenance.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.maintenance.business.dao.repository.*
;
import
com.yeejoin.amos.maintenance.business.dto.CheckDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckInputDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckRecordDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckShotDto
;
import
com.yeejoin.amos.maintenance.business.entity.mybatis.*
;
...
...
@@ -210,6 +211,7 @@ public class CheckServiceImpl implements ICheckService {
img
.
setPointName
(
check
.
getPointName
());
img
.
setShotType
(
shotDto
.
getShotType
());
img
.
setPhotoData
(
shotDto
.
getFileUrl
());
img
.
setPhotoConfKey
(
shotDto
.
getPhotoConfKey
());
checkShots
.
add
(
img
);
}
checkInput
.
setCheckShotList
(
checkShots
);
...
...
@@ -236,7 +238,7 @@ public class CheckServiceImpl implements ICheckService {
Check
finalCheck
=
check
;
//4.检查项入库
checkItemList
.
forEach
(
checkInput
->
checkInput
.
setCheckId
(
finalCheck
.
getId
()));
if
(!
checkItemList
.
isEmpty
())
{
if
(!
checkItemList
.
isEmpty
())
{
checkInputDao
.
saveAll
(
checkItemList
);
}
List
<
CheckShot
>
allShot
=
new
ArrayList
<>();
...
...
@@ -255,11 +257,11 @@ public class CheckServiceImpl implements ICheckService {
planTaskDetailMapper
.
finishTaskDetail
(
Long
.
parseLong
(
detail
.
get
(
"planTaskDetailId"
).
toString
()),
recordParam
.
getPointId
(),
recordParam
.
getPlanTaskId
(),
mtUserSeq
);
//6.消息广播最近维保日期
if
(
StringUtil
.
isNotEmpty
(
point
.
getOriginalId
()))
{
if
(
StringUtil
.
isNotEmpty
(
point
.
getOriginalId
()))
{
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"fireFacilityId"
,
point
.
getOriginalId
());
jsonObject
.
put
(
"maintenanceTime"
,
check
.
getCheckTime
());
mqttGateway
.
publish
(
CHECK_UPDATE_TOPIC
,
jsonObject
.
toJSONString
());
jsonObject
.
put
(
"fireFacilityId"
,
point
.
getOriginalId
());
jsonObject
.
put
(
"maintenanceTime"
,
check
.
getCheckTime
());
mqttGateway
.
publish
(
CHECK_UPDATE_TOPIC
,
jsonObject
.
toJSONString
());
}
//7.返回不合格记录
return
new
CheckDto
(
check
.
getId
(),
unqualifiedCheckItemList
);
...
...
@@ -271,7 +273,7 @@ public class CheckServiceImpl implements ICheckService {
private
void
checkCanFinishTask
(
String
mtUserSeq
,
PlanTask
planTask
,
Long
pointId
)
throws
Exception
{
int
status
;
int
count
=
checkService
.
checkHasRecord
(
planTask
.
getId
(),
pointId
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
throw
new
RuntimeException
(
"任务已执行,不能重复执行"
);
}
if
(!
ToolUtils
.
transBeanList
(
planTask
.
getUserId
()).
contains
(
mtUserSeq
))
{
...
...
@@ -414,7 +416,7 @@ public class CheckServiceImpl implements ICheckService {
@Override
public
Page
<
Check
>
getCheckListByOriginalId
(
String
originalId
,
CommonPageable
pageable
)
{
Point
point
=
iPointDao
.
findByOriginalId
(
originalId
);
if
(
point
==
null
)
{
if
(
point
==
null
)
{
throw
new
RuntimeException
(
"不存在该设备设施"
);
}
List
<
DaoCriteria
>
criterias
=
new
ArrayList
<>();
...
...
@@ -429,7 +431,19 @@ public class CheckServiceImpl implements ICheckService {
orders
.
add
(
idOrder
);
Sort
sort
=
Sort
.
by
(
orders
);
pageable
.
setSort
(
sort
);
return
checkDao
.
findAll
(
spec
,
pageable
);
return
checkDao
.
findAll
(
spec
,
pageable
);
}
@Override
public
List
<
CheckInputDto
>
getInputDetail
(
String
checkId
)
{
List
<
CheckInputDto
>
list
=
this
.
checkMapper
.
queryCheckInputDetail
(
checkId
,
fileUrl
);
list
.
forEach
(
input
->{
CheckStatusEnum
statusEnum
=
CheckStatusEnum
.
getEnum
(
input
.
getIsOk
());
if
(
statusEnum
!=
null
){
input
.
setIsOkDesc
(
statusEnum
.
getName
());
}
});
return
list
;
}
@Override
...
...
@@ -674,12 +688,12 @@ public class CheckServiceImpl implements ICheckService {
Map
<
String
,
Object
>
charData
=
checkMapper
.
pieChartData
(
param
);
List
<
Map
<
String
,
Object
>>
calendarData
=
checkMapper
.
calendarData
(
param
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
List
<
CalendarStatusCountRespone
>>
calendarMap
=
calendarData
.
stream
().
collect
(
Collectors
.
groupingBy
(
map
->
map
.
get
(
"time"
).
toString
(),
Collectors
.
mapping
(
c
->
{
Map
<
String
,
List
<
CalendarStatusCountRespone
>>
calendarMap
=
calendarData
.
stream
().
collect
(
Collectors
.
groupingBy
(
map
->
map
.
get
(
"time"
).
toString
(),
Collectors
.
mapping
(
c
->
{
CalendarStatusCountRespone
countRespone
=
new
CalendarStatusCountRespone
();
countRespone
.
setCount
(
Long
.
parseLong
(
c
.
get
(
"count"
).
toString
()));
countRespone
.
setStatus
(
c
.
get
(
"status"
).
toString
());
return
countRespone
;
},
Collectors
.
toList
())));
},
Collectors
.
toList
())));
result
.
put
(
"charData"
,
charData
);
result
.
put
(
"calendarData"
,
calendarMap
);
return
result
;
...
...
@@ -1077,7 +1091,7 @@ public class CheckServiceImpl implements ICheckService {
params
.
put
(
"pageSize"
,
page
.
getPageSize
());
content
=
checkMapper
.
getChecks
(
params
);
if
(
0
<
content
.
size
())
{
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
for
(
HashMap
<
String
,
Object
>
map
:
content
)
{
if
(
map
.
containsKey
(
"isOk"
))
{
map
.
put
(
"status"
,
CheckStatusEnum
.
getEnum
(
String
.
valueOf
(
map
.
get
(
"isOk"
))).
getName
());
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/impl/InputItemServiceImpl.java
View file @
d26fa61c
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IInputItemDao
;
import
com.yeejoin.amos.maintenance.business.dao.repository.IPointInputItemDao
;
import
com.yeejoin.amos.maintenance.business.dto.PictureJsonConfig
;
import
com.yeejoin.amos.maintenance.business.param.CheckInputParam
;
import
com.yeejoin.amos.maintenance.business.param.InputItemPageParam
;
import
com.yeejoin.amos.maintenance.business.service.intfc.ICatalogTreeService
;
...
...
@@ -15,6 +18,7 @@ import com.yeejoin.amos.maintenance.business.util.DaoCriteria;
import
com.yeejoin.amos.maintenance.business.vo.InputItemTemplateVo
;
import
com.yeejoin.amos.maintenance.business.vo.InputItemVo
;
import
com.yeejoin.amos.maintenance.business.vo.PointInputItemVo
;
import
com.yeejoin.amos.maintenance.core.util.StringUtil
;
import
com.yeejoin.amos.maintenance.core.util.query.BaseQuerySpecification
;
import
com.yeejoin.amos.maintenance.dao.entity.CheckInput
;
import
com.yeejoin.amos.maintenance.dao.entity.InputItem
;
...
...
@@ -28,6 +32,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.*
;
...
...
@@ -42,17 +47,26 @@ public class InputItemServiceImpl implements IInputItemService {
RouteMapper
routeMapper
;
@Autowired
InputItemMapper
inputItemMapper
;
@Autowired
private
ICatalogTreeService
iCatalogTreeService
;
@Value
(
"${input.custom.prefix}"
)
private
String
customPre
;
@Autowired
private
RemoteSecurityService
remoteSecurityService
;
@Autowired
private
Sequence
sequence
;
@Override
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
long
addNewInputItem
(
InputItem
param
)
{
List
<
PictureJsonConfig
>
pictureJsonConfigs
=
JSON
.
parseArray
(
param
.
getPictureJson
(),
PictureJsonConfig
.
class
);
for
(
PictureJsonConfig
p:
pictureJsonConfigs
){
if
(
StringUtils
.
isEmpty
(
p
.
getPhotoConfKey
())){
p
.
setPhotoConfKey
(
String
.
valueOf
(
sequence
.
nextId
()));
}
}
param
.
setPictureJson
(
JSONObject
.
toJSONString
(
pictureJsonConfigs
));
if
(
param
.
getId
()
>
0
)
{
inputItemMapper
.
updateInputItem
(
param
);
}
else
{
...
...
@@ -200,7 +214,7 @@ public class InputItemServiceImpl implements IInputItemService {
public
Boolean
uploadListByTemplate
(
List
<
InputItemTemplateVo
>
itemTemplateVoList
,
String
orgCode
,
String
userId
)
throws
Exception
{
List
<
InputItem
>
list
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
itemTemplateVoList
))
{
itemTemplateVoList
.
stream
().
forEach
(
x
->
{
itemTemplateVoList
.
forEach
(
x
->
{
InputItem
inputItem
=
new
InputItem
();
BeanUtils
.
copyProperties
(
x
,
inputItem
);
inputItem
.
setOrgCode
(
orgCode
);
...
...
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 @
d26fa61c
package
com
.
yeejoin
.
amos
.
maintenance
.
business
.
service
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.beust.jcommander.internal.Sets
;
import
com.google.common.base.Joiner
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.maintenance.business.constants.XJConstant
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanMapper
;
...
...
@@ -13,20 +8,16 @@ import com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskDetailMapper;
import
com.yeejoin.amos.maintenance.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.maintenance.business.dao.repository.*
;
import
com.yeejoin.amos.maintenance.business.entity.mybatis.CheckChkExListBo
;
import
com.yeejoin.amos.maintenance.business.entity.mybatis.PointCheckDetailBo
;
import
com.yeejoin.amos.maintenance.business.feign.EquipFeignClient
;
import
com.yeejoin.amos.maintenance.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.maintenance.business.param.PlanTaskPageParam
;
import
com.yeejoin.amos.maintenance.business.service.intfc.ICheckService
;
import
com.yeejoin.amos.maintenance.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.maintenance.business.util.PlanTaskUtil
;
import
com.yeejoin.amos.maintenance.business.util.Toke
;
import
com.yeejoin.amos.maintenance.business.vo.CalDateVo
;
import
com.yeejoin.amos.maintenance.business.vo.LeavePlanTaskVo
;
import
com.yeejoin.amos.maintenance.business.vo.PlanTaskVo
;
import
com.yeejoin.amos.maintenance.common.enums.PlanTaskFinishStatusEnum
;
import
com.yeejoin.amos.maintenance.core.common.request.CommonPageable
;
import
com.yeejoin.amos.maintenance.core.common.response.AppCheckInputRespone
;
import
com.yeejoin.amos.maintenance.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.maintenance.core.util.DateUtil
;
import
com.yeejoin.amos.maintenance.core.util.StringUtil
;
import
com.yeejoin.amos.maintenance.dao.entity.*
;
...
...
@@ -42,7 +33,6 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
...
@@ -503,8 +493,8 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
@Override
public
Page
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
Hash
Map
<
String
,
Object
>
params
,
CommonPageable
pageParam
)
{
List
<
Hash
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
public
Page
<
Map
<
String
,
Object
>>
getPlanTasks
(
Map
<
String
,
Object
>
params
,
CommonPageable
pageParam
)
{
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
long
total
=
planTaskMapper
.
getPlanTasksCount
(
params
);
if
(
total
==
0
)
{
return
new
PageImpl
<>(
content
,
pageParam
,
total
);
...
...
@@ -512,6 +502,12 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
params
.
put
(
"offset"
,
pageParam
.
getOffset
());
params
.
put
(
"pageSize"
,
pageParam
.
getPageSize
());
content
=
planTaskMapper
.
getPlanTasks
(
params
);
content
.
forEach
(
c
->
{
if
(
c
.
containsKey
(
"finishStatus"
))
{
String
finishStatusDesc
=
PlanTaskFinishStatusEnum
.
getName
(
Integer
.
parseInt
(
c
.
get
(
"finishStatus"
).
toString
()));
c
.
put
(
"finishStatusDesc"
,
finishStatusDesc
);
}
});
return
new
PageImpl
<>(
content
,
pageParam
,
total
);
}
...
...
@@ -656,10 +652,6 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
}
@Override
public
String
getCumulativePlanCountByOrgCode
(
String
loginOrgCode
)
{
return
planTaskMapper
.
getCumulativePlanCountByOrgCode
(
loginOrgCode
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-maintenance-biz/src/main/java/com/yeejoin/amos/maintenance/business/service/intfc/ICheckService.java
View file @
d26fa61c
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.maintenance.business.service.intfc;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.maintenance.business.dto.CheckDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckInputDto
;
import
com.yeejoin.amos.maintenance.business.dto.CheckRecordDto
;
import
com.yeejoin.amos.maintenance.business.entity.mybatis.*
;
import
com.yeejoin.amos.maintenance.business.param.*
;
...
...
@@ -269,4 +270,11 @@ public interface ICheckService {
int
checkHasRecord
(
Long
planTaskId
,
Long
pointId
);
Page
<
Check
>
getCheckListByOriginalId
(
String
originalId
,
CommonPageable
pageable
);
/**
* 维保检查项详情
* @param checkId 记录ID
* @return List<CheckInputDto>
*/
List
<
CheckInputDto
>
getInputDetail
(
String
checkId
);
}
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 @
d26fa61c
...
...
@@ -66,7 +66,7 @@ public interface IPlanTaskService {
* @param page
* @return
*/
Page
<
HashMap
<
String
,
Object
>>
getPlanTasks
(
Hash
Map
<
String
,
Object
>
params
,
CommonPageable
page
);
Page
<
Map
<
String
,
Object
>>
getPlanTasks
(
Map
<
String
,
Object
>
params
,
CommonPageable
page
);
/**
...
...
amos-boot-system-maintenance/src/main/resources/db/changelog/mt-1.0.0.xml
View file @
d26fa61c
...
...
@@ -47,4 +47,15 @@
ALTER TABLE p_check_shot modify `org_code` varchar(100) DEFAULT NULL COMMENT '权限系统org code';
</sql>
</changeSet>
<changeSet
author=
"suhuiguang"
id=
"1629788256095-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_check_shot"
columnName=
"photo_conf_key"
/>
</not>
</preConditions>
<comment>
p_check_shot add COLUMN photo_conf_key 增加项和照片关联
</comment>
<sql>
ALTER TABLE p_check_shot add COLUMN `photo_conf_key` varchar(32) DEFAULT NULL COMMENT '照片配置key(关联照片和拍照设置)';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
d26fa61c
...
...
@@ -2063,4 +2063,41 @@
WHERE
pc.id = #{id}
</select>
<select
id=
"queryCheckInputDetail"
resultMap=
"checkInputWithPhotoMap"
>
select
ci.id,
ci.input_id,
ci.input_name,
ci.input_value,
ci.is_ok,
ci.remark,
ci.order_no,
#{fileUrl} as prefix,
ii.picture_json,
ii.data_json
from p_check_input ci
left join p_input_item ii on ci.input_id = ii.id
where ci.check_id=#{checkId}
order by order_no
</select>
<resultMap
id=
"checkInputWithPhotoMap"
type=
"com.yeejoin.amos.maintenance.business.dto.CheckInputDto"
>
<result
column=
"id"
property=
"checkInputId"
/>
<collection
property=
"checkInputShot"
ofType=
"com.yeejoin.amos.maintenance.business.dto.CheckShotDto"
select=
"queryCheckShot"
column=
"{checkInputId=id,prefix=prefix}"
/>
</resultMap>
<select
id=
"queryCheckShot"
resultType=
"com.yeejoin.amos.maintenance.business.dto.CheckShotDto"
>
select
id as checkShotId,
check_input_id,
shot_type,
photo_conf_key,
concat(#{prefix},photo_data) as fileUrl
from
p_check_shot
where check_input_id = #{checkInputId}
</select>
</mapper>
\ No newline at end of file
amos-boot-system-maintenance/src/main/resources/db/mapper/dbTemplate_plan_task.xml
View file @
d26fa61c
...
...
@@ -214,7 +214,7 @@
<sql
id=
"mobile-plan-task-where"
>
<where>
<if
test=
"userId != null and userId > 0 "
>
and find_in_set(#{userId},a.userId)>0
</if>
<if
test=
"finishStatus != null"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"finishStatus != null
and finishStatus!=''
"
>
and a.finishStatus = #{finishStatus}
</if>
<if
test=
"startTime != null and startTime != '' and endTime != null and endTime != '' "
>
AND (
(
...
...
@@ -238,7 +238,7 @@
<choose>
<when
test=
"identityType==1"
>
And (a.orgCode LIKE CONCAT( #{orgCode}, '-%' ) or a.orgCode= #{orgCode} )
<if
test=
"companyId != null"
>
and a.owner_id = #{companyId}
</if>
<if
test=
"companyId != null
and companyId != ''
"
>
and a.owner_id = #{companyId}
</if>
</when>
<when
test=
"identityType==2"
>
And a.owner_id = #{companyId}
...
...
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