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
1711358a
Commit
1711358a
authored
Nov 02, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug xiugai1102
parent
ead9443e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
63 additions
and
16 deletions
+63
-16
KeySiteServiceImpl.java
...ot/module/common/biz/service/impl/KeySiteServiceImpl.java
+35
-0
PlanController.java
...ejoin/amos/patrol/business/controller/PlanController.java
+1
-2
PointController.java
...join/amos/patrol/business/controller/PointController.java
+4
-0
RouteController.java
...join/amos/patrol/business/controller/RouteController.java
+13
-10
IRouteDao.java
...eejoin/amos/patrol/business/dao/repository/IRouteDao.java
+3
-0
PlanServiceImpl.java
...in/amos/patrol/business/service/impl/PlanServiceImpl.java
+2
-2
IPlanService.java
...join/amos/patrol/business/service/intfc/IPlanService.java
+1
-1
EquipmentManageMapper.xml
...equip/src/main/resources/mapper/EquipmentManageMapper.xml
+1
-0
CheckReportImpl.java
...mos/boot/module/tdc/biz/service/impl/CheckReportImpl.java
+3
-1
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/KeySiteServiceImpl.java
View file @
1711358a
...
...
@@ -10,6 +10,11 @@ import java.util.Set;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.component.robot.BadRequest
;
import
org.apache.commons.lang.ArrayUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -50,6 +55,8 @@ import com.yeejoin.amos.boot.module.common.api.service.IKeySiteService;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
javax.annotation.Resource
;
/**
* 重点部位服务实现类
*
...
...
@@ -83,6 +90,10 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
@Autowired
private
RedisUtils
redisUtils
;
@Resource
DataDictionaryMapper
dataDictionaryMapper
;
/**
* 分页查询
*/
...
...
@@ -279,6 +290,19 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
return
keySiteMapper
.
getSequenceNbr
(
sequenceNbr
);
}
private
String
[]
getDataDictionary
(
String
type
)
{
QueryWrapper
<
DataDictionary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"type"
,
type
);
queryWrapper
.
orderByAsc
(
"sort_num"
);
List
<
DataDictionary
>
list
=
dataDictionaryMapper
.
selectList
(
queryWrapper
);
List
<
String
>
names
=
list
.
stream
().
map
(
dataDictionary
->
{
return
dataDictionary
.
getName
()
+
"@"
+
dataDictionary
.
getCode
();
}).
collect
(
Collectors
.
toList
());
String
[]
str
=
names
.
toArray
(
new
String
[
names
.
size
()]);
return
str
;
}
@Override
public
boolean
saveExcel
(
List
<
KeySiteExcleDto
>
excelDtoList
)
{
Map
<
String
,
String
>
maps
=
getAllBuildingIdForParentBuilingIds
(
excelDtoList
);
...
...
@@ -291,6 +315,11 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
List
<
OrgUsr
>
comDeptList
=
orgUsrMapper
.
companyTreeByUserAndType
(
param
);
Map
<
Long
,
OrgUsr
>
comDeptMap
=
comDeptList
.
stream
()
.
collect
(
Collectors
.
toMap
(
BaseEntity:
:
getSequenceNbr
,
Function
.
identity
()));
//耐火等级
String
[]
nhdjs
=
getDataDictionary
(
"NHDJ"
);
//使用性质
String
[]
jzwsyxzs
=
getDataDictionary
(
"JZWSYXZ"
);
for
(
KeySiteExcleDto
keySiteExcleDto
:
excelDtoList
)
{
KeySite
keySiteDto
=
new
KeySite
();
Bean
.
copyExistPropertis
(
keySiteExcleDto
,
keySiteDto
);
...
...
@@ -315,6 +344,9 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
}
if
(
StringUtils
.
isNotBlank
(
keySiteExcleDto
.
getFireEnduranceRate
())
&&
keySiteExcleDto
.
getFireEnduranceRate
().
contains
(
"@"
))
{
if
(!
ArrayUtils
.
contains
(
nhdjs
,
keySiteExcleDto
.
getFireEnduranceRate
()))
{
throw
new
BadRequest
(
"请检查耐火等级选择是否正确"
);
}
String
[]
fireEnduranceRateArray
=
keySiteExcleDto
.
getFireEnduranceRate
().
split
(
"@"
);
if
(
fireEnduranceRateArray
.
length
>
1
)
{
keySiteDto
.
setFireEnduranceRate
(
fireEnduranceRateArray
[
1
]);
...
...
@@ -323,6 +355,9 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
}
if
(
StringUtils
.
isNotBlank
(
keySiteExcleDto
.
getUseNature
())
&&
keySiteExcleDto
.
getUseNature
().
contains
(
"@"
))
{
if
(!
ArrayUtils
.
contains
(
jzwsyxzs
,
keySiteExcleDto
.
getUseNature
()))
{
throw
new
BadRequest
(
"请检查使用性质选择是否正确"
);
}
String
[]
useNatureArray
=
keySiteExcleDto
.
getUseNature
().
split
(
"@"
);
if
(
useNatureArray
.
length
>
1
)
{
keySiteDto
.
setUseNature
(
useNatureArray
[
1
]);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PlanController.java
View file @
1711358a
...
...
@@ -181,8 +181,7 @@ public class PlanController extends AbstractBaseController {
}
}
map
.
put
(
"param"
,
param
);
planService
.
addPlan
(
map
);
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
(
planService
.
addPlan
(
map
));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"巡检计划新增失败"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/PointController.java
View file @
1711358a
...
...
@@ -340,6 +340,10 @@ public class PointController extends AbstractBaseController {
if
(
pointClassify
.
getId
()!=
null
){
newPointClassify
.
setId
(
pointClassify
.
getId
());
}
List
<
PointClassify
>
pointClassifies
=
iPointClassifyDao
.
queryByPointIdAndEquipmentId
(
pointClassify
.
getPointId
(),
pointClassify
.
getEquipmentId
());
if
(
pointClassifies
.
size
()
>
0
)
{
return
CommonResponseUtil
.
failure
(
"该巡查对象已存在,不可再添加!"
);
}
iPointService
.
addPointClassifyByPointId
(
newPointClassify
);
List
<
PointInputItemVo
>
customInputList
=
pointClassify
.
getEquipIputDetailData
();
//巡检项
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/RouteController.java
View file @
1711358a
...
...
@@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.patrol.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.patrol.business.dao.mapper.RoutePointItemMapper
;
import
com.yeejoin.amos.patrol.business.dao.repository.IRouteDao
;
import
com.yeejoin.amos.patrol.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.patrol.business.feign.JcsFeignClient
;
import
com.yeejoin.amos.patrol.business.service.impl.RouteServiceImpl
;
...
...
@@ -91,6 +92,9 @@ public class RouteController extends AbstractBaseController {
private
IRoutePointDao
iRoutePointDao
;
@Autowired
private
RouteServiceImpl
routeServiceImpl
;
@Autowired
private
IRouteDao
iRouteDao
;
/**
*
* 新增接口
...
...
@@ -104,15 +108,16 @@ public class RouteController extends AbstractBaseController {
@ApiParam
(
value
=
"查询条件"
,
required
=
false
)
@RequestBody
(
required
=
false
)
RoutePageParam
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
true
,
defaultValue
=
"pageNumber=0&pageSize=10"
)
CommonPageable
commonPageable
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
//获取所在公司code
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
queryRequests
.
setBizOrgCode
(
bizOrgCode
);
if
(
commonPageable
!=
null
){
queryRequests
.
setPageNumber
(
commonPageable
.
getPageNumber
()-
1
);
if
(
StringUtils
.
isEmpty
(
queryRequests
.
getBizOrgCode
()))
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
//获取所在公司code
String
bizOrgCode
=
reginParams
.
getPersonIdentity
().
getBizOrgCode
();
queryRequests
.
setBizOrgCode
(
bizOrgCode
);
}
if
(
commonPageable
!=
null
)
{
queryRequests
.
setPageNumber
(
commonPageable
.
getPageNumber
()
-
1
);
queryRequests
.
setPageSize
(
commonPageable
.
getPageSize
());
}
Page
<
HashMap
<
String
,
Object
>>
routeList
=
routeService
.
getRouteInfo
(
null
,
null
,
null
,
queryRequests
);
return
CommonResponseUtil
.
success
(
routeList
);
...
...
@@ -179,9 +184,7 @@ public class RouteController extends AbstractBaseController {
route
.
setOrgCode
(
loginOrgCode
);
if
(!
StringUtils
.
isEmpty
(
route
.
getName
())){
LambdaQueryWrapper
<
Route
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Route:
:
getName
,
route
.
getName
());
List
<
Route
>
list
=
routeServiceImpl
.
list
(
wrapper
);
List
<
Route
>
list
=
iRouteDao
.
getListByName
(
route
.
getName
());
if
(!
ObjectUtils
.
isEmpty
(
list
)
||
list
.
size
()>
0
){
throw
new
BadRequest
(
"该名称路线已存在"
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/repository/IRouteDao.java
View file @
1711358a
...
...
@@ -22,4 +22,7 @@ public interface IRouteDao extends BaseDao<Route, Long> {
@Query
(
value
=
"select * from p_route where original_id in ?1 and is_delete =0"
,
nativeQuery
=
true
)
List
<
Route
>
listByOriginalIds
(
List
<
String
>
originalIds
);
@Query
(
value
=
"select * from p_route where `name` = ?1 and is_delete =0"
,
nativeQuery
=
true
)
List
<
Route
>
getListByName
(
String
name
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PlanServiceImpl.java
View file @
1711358a
...
...
@@ -45,7 +45,7 @@ public class PlanServiceImpl implements IPlanService {
}
@Override
public
void
addPlan
(
HashMap
<
String
,
Object
>
map
)
{
public
Plan
addPlan
(
HashMap
<
String
,
Object
>
map
)
{
Plan
param
=
(
Plan
)
map
.
get
(
"param"
);
String
userDept
=
param
.
getUserDept
();
...
...
@@ -84,7 +84,7 @@ public class PlanServiceImpl implements IPlanService {
param
.
setDayBegin
(
DateUtil
.
formatStrToTime
(
"00:00:00"
));
param
.
setDayEnd
(
DateUtil
.
formatStrToTime
(
"23:59:59"
));
}
planDao
.
save
(
param
);
return
planDao
.
save
(
param
);
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/intfc/IPlanService.java
View file @
1711358a
...
...
@@ -21,7 +21,7 @@ public interface IPlanService {
* 巡检计划新增及维护
* @param map
*/
void
addPlan
(
HashMap
<
String
,
Object
>
map
);
Plan
addPlan
(
HashMap
<
String
,
Object
>
map
);
/**
* 巡检计划删除
...
...
amos-boot-system-equip/src/main/resources/mapper/EquipmentManageMapper.xml
View file @
1711358a
...
...
@@ -32,6 +32,7 @@
from
f_fire_fighting_system as sys
left join wl_warehouse_structure wws on wws.id = sys.contro_box_build
LEFT JOIN wl_equipment_category wec ON wec.id = sys.system_type
<where>
<if
test=
"equimentName != null and equimentName !='' and equimentCode !='null' "
>
AND sys.name like CONCAT('%',#{equimentName},'%')
...
...
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/service/impl/CheckReportImpl.java
View file @
1711358a
...
...
@@ -61,5 +61,6 @@ public class CheckReportImpl extends ServiceImpl<CheckReportMapper, CheckReport>
return
map
;
}
return
null
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment