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
517a8d98
Commit
517a8d98
authored
Sep 16, 2021
by
kongfm
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into chenhao
parents
20555c9b
bdc92b74
Show whitespace changes
Inline
Side-by-side
Showing
122 changed files
with
3148 additions
and
690 deletions
+3148
-690
HomePageEnum.java
.../com/yeejoin/amos/boot/biz/common/enums/HomePageEnum.java
+7
-7
CodeInfoEnum.java
.../com/yeejoin/amos/boot/biz/common/utils/CodeInfoEnum.java
+64
-0
DynamicEnumUtils.java
.../yeejoin/amos/boot/biz/common/utils/DynamicEnumUtils.java
+185
-0
DutyCarDto.java
...m/yeejoin/amos/boot/module/common/api/dto/DutyCarDto.java
+13
-0
DutyCarExcelDto.java
...join/amos/boot/module/common/api/dto/DutyCarExcelDto.java
+5
-0
DutyPersonDto.java
...eejoin/amos/boot/module/common/api/dto/DutyPersonDto.java
+13
-0
DutyPersonExcelDto.java
...n/amos/boot/module/common/api/dto/DutyPersonExcelDto.java
+5
-0
EquipmentDetailDownloadTemplateDto.java
...le/common/api/dto/EquipmentDetailDownloadTemplateDto.java
+68
-0
FireChemicalDto.java
...join/amos/boot/module/common/api/dto/FireChemicalDto.java
+10
-10
FireExpertsDto.java
...ejoin/amos/boot/module/common/api/dto/FireExpertsDto.java
+5
-3
FireTeamDto.java
.../yeejoin/amos/boot/module/common/api/dto/FireTeamDto.java
+1
-0
FirefightersExcelDto.java
...amos/boot/module/common/api/dto/FirefightersExcelDto.java
+107
-25
KeySiteExcleDto.java
...join/amos/boot/module/common/api/dto/KeySiteExcleDto.java
+14
-14
WaterResourceDto.java
...oin/amos/boot/module/common/api/dto/WaterResourceDto.java
+2
-1
Firefighters.java
...join/amos/boot/module/common/api/entity/Firefighters.java
+7
-0
TemplateCellWriteHandlerDate.java
...module/common/api/excel/TemplateCellWriteHandlerDate.java
+22
-12
EquipFeignClient.java
...n/amos/boot/module/common/api/feign/EquipFeignClient.java
+17
-1
DynamicFormInstanceMapper.java
...t/module/common/api/mapper/DynamicFormInstanceMapper.java
+19
-0
FireTeamMapper.java
...in/amos/boot/module/common/api/mapper/FireTeamMapper.java
+1
-1
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+3
-0
IDutyPersonService.java
...os/boot/module/common/api/service/IDutyPersonService.java
+9
-0
IOrgUsrService.java
...n/amos/boot/module/common/api/service/IOrgUsrService.java
+1
-1
DutyPersonShiftMapper.xml
...n-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
+3
-0
DynamicFormInstanceMapper.xml
...i/src/main/resources/mapper/DynamicFormInstanceMapper.xml
+57
-0
FireTeamMapper.xml
...e-common-api/src/main/resources/mapper/FireTeamMapper.xml
+1
-1
FirefightersMapper.xml
...mmon-api/src/main/resources/mapper/FirefightersMapper.xml
+80
-15
LinkageUnitMapper.xml
...ommon-api/src/main/resources/mapper/LinkageUnitMapper.xml
+2
-2
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+15
-0
WaterResourceMapper.xml
...mon-api/src/main/resources/mapper/WaterResourceMapper.xml
+9
-5
AlertNewsDto.java
...om/yeejoin/amos/boot/module/jcs/api/dto/AlertNewsDto.java
+65
-0
NewsDate.java
...va/com/yeejoin/amos/boot/module/jcs/api/dto/NewsDate.java
+58
-0
ExcelEnums.java
...om/yeejoin/amos/boot/module/jcs/api/enums/ExcelEnums.java
+3
-2
FireBrigadeTypeEnum.java
...n/amos/boot/module/jcs/api/enums/FireBrigadeTypeEnum.java
+1
-0
AlertCalledMapper.java
...in/amos/boot/module/jcs/api/mapper/AlertCalledMapper.java
+3
-0
IAlertCalledService.java
...amos/boot/module/jcs/api/service/IAlertCalledService.java
+2
-0
IPowerTransferService.java
...os/boot/module/jcs/api/service/IPowerTransferService.java
+1
-1
AlertCalledMapper.xml
...e-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
+14
-0
PlanCheckLevelEnum.java
...oin/amos/supervision/common/enums/PlanCheckLevelEnum.java
+103
-0
PlanStatusEnum.java
...yeejoin/amos/supervision/common/enums/PlanStatusEnum.java
+108
-0
InputItem.java
...va/com/yeejoin/amos/supervision/dao/entity/InputItem.java
+37
-12
Plan.java
...in/java/com/yeejoin/amos/supervision/dao/entity/Plan.java
+20
-4
RoutePointItem.java
...m/yeejoin/amos/supervision/dao/entity/RoutePointItem.java
+43
-18
CommandController.java
...boot/module/command/biz/controller/CommandController.java
+18
-35
DutyCarController.java
.../boot/module/common/biz/controller/DutyCarController.java
+1
-1
DutyPersonController.java
...ot/module/common/biz/controller/DutyPersonController.java
+14
-0
LinkageUnitController.java
...t/module/common/biz/controller/LinkageUnitController.java
+0
-1
OrgPersonController.java
...oot/module/common/biz/controller/OrgPersonController.java
+16
-2
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+5
-5
DutyCarServiceImpl.java
...ot/module/common/biz/service/impl/DutyCarServiceImpl.java
+83
-2
DutyCommonServiceImpl.java
...module/common/biz/service/impl/DutyCommonServiceImpl.java
+26
-3
DutyPersonServiceImpl.java
...module/common/biz/service/impl/DutyPersonServiceImpl.java
+145
-1
DynamicFormColumnServiceImpl.java
...common/biz/service/impl/DynamicFormColumnServiceImpl.java
+2
-2
DynamicFormInstanceServiceImpl.java
...mmon/biz/service/impl/DynamicFormInstanceServiceImpl.java
+8
-0
KeySiteServiceImpl.java
...ot/module/common/biz/service/impl/KeySiteServiceImpl.java
+14
-1
MaintenanceCompanyServiceImpl.java
...ommon/biz/service/impl/MaintenanceCompanyServiceImpl.java
+1
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+92
-20
StartLoader.java
.../yeejoin/amos/boot/module/jcs/biz/config/StartLoader.java
+67
-0
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+36
-11
FireTeamController.java
...os/boot/module/jcs/biz/controller/FireTeamController.java
+2
-6
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+3
-1
PowerTransferController.java
...ot/module/jcs/biz/controller/PowerTransferController.java
+9
-3
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+6
-4
DataSourcesImpl.java
...mos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
+15
-0
DispatchMapServiceImpl.java
...t/module/jcs/biz/service/impl/DispatchMapServiceImpl.java
+1
-1
DispatchTaskServiceImpl.java
.../module/jcs/biz/service/impl/DispatchTaskServiceImpl.java
+1
-1
ExcelServiceImpl.java
...os/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
+196
-60
FaultServiceImpl.java
...os/boot/module/jcs/biz/service/impl/FaultServiceImpl.java
+2
-2
FireAlarmServiceImpl.java
...oot/module/jcs/biz/service/impl/FireAlarmServiceImpl.java
+2
-2
FireTeamServiceImpl.java
...boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
+4
-4
NoServiceImpl.java
.../amos/boot/module/jcs/biz/service/impl/NoServiceImpl.java
+2
-2
PowerTransferServiceImpl.java
...module/jcs/biz/service/impl/PowerTransferServiceImpl.java
+18
-2
ShieldServiceImpl.java
...s/boot/module/jcs/biz/service/impl/ShieldServiceImpl.java
+2
-2
WarningServiceImpl.java
.../boot/module/jcs/biz/service/impl/WarningServiceImpl.java
+2
-2
YesServiceImpl.java
...amos/boot/module/jcs/biz/service/impl/YesServiceImpl.java
+17
-3
CheckController.java
...join/amos/patrol/business/controller/CheckController.java
+6
-4
GroupController.java
...join/amos/patrol/business/controller/GroupController.java
+3
-3
LatentDangerController.java
...os/patrol/business/controller/LatentDangerController.java
+0
-1
EquipmentInputItemRo.java
.../patrol/business/entity/mybatis/EquipmentInputItemRo.java
+1
-1
LatentDangerNormalParam.java
...n/amos/patrol/business/param/LatentDangerNormalParam.java
+15
-0
LatentDangerPatrolItemParam.java
...os/patrol/business/param/LatentDangerPatrolItemParam.java
+2
-2
CheckServiceImpl.java
...n/amos/patrol/business/service/impl/CheckServiceImpl.java
+18
-11
LatentDangerServiceImpl.java
...patrol/business/service/impl/LatentDangerServiceImpl.java
+38
-37
TaskServiceImpl.java
...in/amos/patrol/business/service/impl/TaskServiceImpl.java
+4
-3
RemoteWorkFlowService.java
...join/amos/patrol/common/remote/RemoteWorkFlowService.java
+1
-1
pom.xml
...-boot-module-biz/amos-boot-module-supervision-biz/pom.xml
+4
-0
CheckController.java
...amos/supervision/business/controller/CheckController.java
+54
-59
InputItemController.java
.../supervision/business/controller/InputItemController.java
+22
-0
PlanController.java
.../amos/supervision/business/controller/PlanController.java
+1
-1
RoutePointItemController.java
...rvision/business/controller/RoutePointItemController.java
+107
-0
CheckMapper.java
...oin/amos/supervision/business/dao/mapper/CheckMapper.java
+46
-36
InputItemMapper.java
...amos/supervision/business/dao/mapper/InputItemMapper.java
+6
-0
RoutePointItemMapper.java
...supervision/business/dao/mapper/RoutePointItemMapper.java
+10
-2
IPlanDao.java
...in/amos/supervision/business/dao/repository/IPlanDao.java
+5
-0
IRoutePointItemDao.java
...pervision/business/dao/repository/IRoutePointItemDao.java
+6
-1
CheckPageParam.java
...ejoin/amos/supervision/business/param/CheckPageParam.java
+12
-0
InputItemPageParam.java
...n/amos/supervision/business/param/InputItemPageParam.java
+48
-1
CheckServiceImpl.java
...s/supervision/business/service/impl/CheckServiceImpl.java
+43
-82
InputItemServiceImpl.java
...pervision/business/service/impl/InputItemServiceImpl.java
+8
-0
PlanServiceImpl.java
...os/supervision/business/service/impl/PlanServiceImpl.java
+19
-14
PointServiceImpl.java
...s/supervision/business/service/impl/PointServiceImpl.java
+2
-34
RoutePointItemServiceImpl.java
...sion/business/service/impl/RoutePointItemServiceImpl.java
+97
-0
SynDataServiceImpl.java
...supervision/business/service/impl/SynDataServiceImpl.java
+2
-2
ICheckService.java
...mos/supervision/business/service/intfc/ICheckService.java
+31
-36
IInputItemService.java
...supervision/business/service/intfc/IInputItemService.java
+2
-0
IPlanService.java
...amos/supervision/business/service/intfc/IPlanService.java
+1
-1
IRoutePointItemService.java
...vision/business/service/intfc/IRoutePointItemService.java
+18
-0
CheckParamUtil.java
...eejoin/amos/supervision/business/util/CheckParamUtil.java
+40
-9
InputItemParamUtil.java
...in/amos/supervision/business/util/InputItemParamUtil.java
+12
-6
CheckVo.java
...ava/com/yeejoin/amos/supervision/business/vo/CheckVo.java
+54
-0
InputItemVo.java
...com/yeejoin/amos/supervision/business/vo/InputItemVo.java
+21
-1
RoutePointItemVo.java
...eejoin/amos/supervision/business/vo/RoutePointItemVo.java
+26
-0
PersonIdentifyAspect.java
...amos/supervision/core/framework/PersonIdentifyAspect.java
+1
-1
application.properties
...boot-system-jcs/src/main/resources/application.properties
+17
-9
jcs-1.0.0.0.xml
...ystem-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
+55
-0
application.properties
...t-system-patrol/src/main/resources/application.properties
+5
-0
patrol-3.0.1.xml
...m-patrol/src/main/resources/db/changelog/patrol-3.0.1.xml
+38
-0
mt-1.0.0.xml
...-supervision/src/main/resources/db/changelog/mt-1.0.0.xml
+45
-0
dbTemplate_check.xml
...rvision/src/main/resources/db/mapper/dbTemplate_check.xml
+53
-1
dbTemplate_input_item.xml
...on/src/main/resources/db/mapper/dbTemplate_input_item.xml
+84
-12
dbTemplate_plan.xml
...ervision/src/main/resources/db/mapper/dbTemplate_plan.xml
+6
-4
routePointItemMapper.xml
...ion/src/main/resources/db/mapper/routePointItemMapper.xml
+38
-0
pom.xml
amos-boot-utils/amos-boot-utils-video/pom.xml
+8
-1
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/enums/HomePageEnum.java
View file @
517a8d98
...
...
@@ -12,13 +12,13 @@ import lombok.AllArgsConstructor;
public
enum
HomePageEnum
{
DISPATCHALARM
(
"dispatchAlarm"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.DispatchMapServiceImpl"
),
DISPATCHTASK
(
"dispatchTask"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.Dispatch
Map
ServiceImpl"
),
FIREALARM
(
"fireAlarm"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
DispatchMap
ServiceImpl"
),
FAULT
(
"fault"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
DispatchMap
ServiceImpl"
),
SHIELD
(
"shield"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
DispatchMap
ServiceImpl"
),
WARNING
(
"warning"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
DispatchMap
ServiceImpl"
),
NO
(
"no"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
DispatchMap
ServiceImpl"
),
YES
(
"yes"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
DispatchMap
ServiceImpl"
);
DISPATCHTASK
(
"dispatchTask"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.Dispatch
Task
ServiceImpl"
),
FIREALARM
(
"fireAlarm"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
FireAlarm
ServiceImpl"
),
FAULT
(
"fault"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
Fault
ServiceImpl"
),
SHIELD
(
"shield"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
Shield
ServiceImpl"
),
WARNING
(
"warning"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
Warning
ServiceImpl"
),
NO
(
"no"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
No
ServiceImpl"
),
YES
(
"yes"
,
"com.yeejoin.amos.boot.module.jcs.biz.service.impl.
Yes
ServiceImpl"
);
...
...
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/CodeInfoEnum.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
public
enum
CodeInfoEnum
{
LOCK
(
1L
,
1L
,
"LOCK_TYPE"
,
"LOCK"
),
UNLOCK
(
1L
,
2L
,
"LOCK_TYPE"
,
"LOCK"
);
public
Long
classId
;
public
Long
infoId
;
public
String
classCode
;
public
String
infoCode
;
CodeInfoEnum
(
Long
classId
,
Long
infoId
,
String
classCode
,
String
infoCode
)
{
this
.
classId
=
classId
;
this
.
infoId
=
infoId
;
this
.
classCode
=
classCode
;
this
.
infoCode
=
infoCode
;
}
public
static
CodeInfoEnum
getByInfoId
(
Long
infoId
)
{
return
CodeInfoEnum
.
valueOf
(
infoId
+
""
);
}
public
static
List
getByClassId
(
Long
classId
)
{
return
Arrays
.
stream
(
CodeInfoEnum
.
values
()).
filter
(
item
->
item
.
classId
.
equals
(
classId
)).
collect
(
Collectors
.
toList
());
}
public
static
CodeInfoEnum
getByClassCodeAndInfoCode
(
String
classCode
,
String
infoCode
)
{
Optional
opt
=
Arrays
.
stream
(
CodeInfoEnum
.
values
()).
filter
(
item
->
item
.
classCode
.
equals
(
classCode
)
&&
item
.
infoCode
.
equals
(
infoCode
)).
findFirst
();
return
(
CodeInfoEnum
)
opt
.
orElse
(
null
);
}
@Override
public
String
toString
()
{
return
"CodeInfoEnum{"
+
"classId="
+
classId
+
", infoId="
+
infoId
+
", classCode='"
+
classCode
+
'\''
+
", infoCode='"
+
infoCode
+
'\''
+
'}'
;
}
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/utils/DynamicEnumUtils.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
utils
;
import
sun.reflect.ConstructorAccessor
;
import
sun.reflect.FieldAccessor
;
import
sun.reflect.ReflectionFactory
;
import
java.lang.reflect.AccessibleObject
;
import
java.lang.reflect.Array
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Modifier
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
public
class
DynamicEnumUtils
{
private
static
ReflectionFactory
reflectionFactory
=
ReflectionFactory
.
getReflectionFactory
();
private
static
void
setFailsafeFieldValue
(
Field
field
,
Object
target
,
Object
value
)
throws
NoSuchFieldException
,
IllegalAccessException
{
// 反射访问私有变量
field
.
setAccessible
(
true
);
/**
* 接下来,我们将字段实例中的修饰符更改为不再是final,
* 从而使反射允许我们修改静态final字段。
*/
Field
modifiersField
=
Field
.
class
.
getDeclaredField
(
"modifiers"
);
modifiersField
.
setAccessible
(
true
);
int
modifiers
=
modifiersField
.
getInt
(
field
);
// 去掉修饰符int中的最后一位
modifiers
&=
~
Modifier
.
FINAL
;
modifiersField
.
setInt
(
field
,
modifiers
);
FieldAccessor
fa
=
reflectionFactory
.
newFieldAccessor
(
field
,
false
);
fa
.
set
(
target
,
value
);
}
private
static
void
blankField
(
Class
<?>
enumClass
,
String
fieldName
)
throws
NoSuchFieldException
,
IllegalAccessException
{
for
(
Field
field
:
Class
.
class
.
getDeclaredFields
())
{
if
(
field
.
getName
().
contains
(
fieldName
))
{
AccessibleObject
.
setAccessible
(
new
Field
[]{
field
},
true
);
setFailsafeFieldValue
(
field
,
enumClass
,
null
);
break
;
}
}
}
private
static
void
cleanEnumCache
(
Class
<?>
enumClass
)
throws
NoSuchFieldException
,
IllegalAccessException
{
blankField
(
enumClass
,
"enumConstantDirectory"
);
// Sun (Oracle?!?) JDK 1.5/6
blankField
(
enumClass
,
"enumConstants"
);
// IBM JDK
}
private
static
ConstructorAccessor
getConstructorAccessor
(
Class
<?>
enumClass
,
Class
<?>[]
additionalParameterTypes
)
throws
NoSuchMethodException
{
Class
<?>[]
parameterTypes
=
new
Class
[
additionalParameterTypes
.
length
+
2
];
parameterTypes
[
0
]
=
String
.
class
;
parameterTypes
[
1
]
=
int
.
class
;
System
.
arraycopy
(
additionalParameterTypes
,
0
,
parameterTypes
,
2
,
additionalParameterTypes
.
length
);
return
reflectionFactory
.
newConstructorAccessor
(
enumClass
.
getDeclaredConstructor
(
parameterTypes
));
}
private
static
Object
makeEnum
(
Class
<?>
enumClass
,
String
value
,
int
ordinal
,
Class
<?>[]
additionalTypes
,
Object
[]
additionalValues
)
throws
Exception
{
Object
[]
parms
=
new
Object
[
additionalValues
.
length
+
2
];
parms
[
0
]
=
value
;
parms
[
1
]
=
Integer
.
valueOf
(
ordinal
);
System
.
arraycopy
(
additionalValues
,
0
,
parms
,
2
,
additionalValues
.
length
);
return
enumClass
.
cast
(
getConstructorAccessor
(
enumClass
,
additionalTypes
).
newInstance
(
parms
));
}
/**
* 将枚举实例添加到作为参数提供的枚举类中
*
* @param enumType 要修改的枚举类型
* @param enumName 添加的枚举类型名字
* @param additionalTypes 枚举类型参数类型列表
* @param additionalValues 枚举类型参数值列表
* @param <T>
*/
@SuppressWarnings
(
"unchecked"
)
public
static
<
T
extends
Enum
<?>>
void
addEnum
(
Class
<
T
>
enumType
,
String
enumName
,
Class
<?>[]
additionalTypes
,
Object
[]
additionalValues
)
{
// 0. 检查类型
if
(!
Enum
.
class
.
isAssignableFrom
(
enumType
))
{
throw
new
RuntimeException
(
"class "
+
enumType
+
" is not an instance of Enum"
);
}
// 1. 在枚举类中查找“$values”持有者并获取以前的枚举实例
Field
valuesField
=
null
;
Field
[]
fields
=
enumType
.
getDeclaredFields
();
for
(
Field
field
:
fields
)
{
if
(
field
.
getName
().
contains
(
"$VALUES"
))
{
valuesField
=
field
;
break
;
}
}
AccessibleObject
.
setAccessible
(
new
Field
[]{
valuesField
},
true
);
try
{
// 2. 将他拷贝到数组
T
[]
previousValues
=
(
T
[])
valuesField
.
get
(
enumType
);
List
<
T
>
values
=
new
ArrayList
<
T
>(
Arrays
.
asList
(
previousValues
));
// 3. 创建新的枚举项
T
newValue
=
(
T
)
makeEnum
(
enumType
,
enumName
,
values
.
size
(),
additionalTypes
,
additionalValues
);
// 4. 添加新的枚举项
values
.
add
(
newValue
);
// 5. 设定拷贝的数组,到枚举类型
setFailsafeFieldValue
(
valuesField
,
null
,
values
.
toArray
((
T
[])
Array
.
newInstance
(
enumType
,
0
)));
// 6. 清楚枚举的缓存
cleanEnumCache
(
enumType
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
.
getMessage
(),
e
);
}
}
public
static
void
main
(
String
[]
args
)
{
//
synchronized
(
CodeInfoEnum
.
class
)
{
addEnum
(
CodeInfoEnum
.
class
,
"3"
,
new
Class
[]{
Long
.
class
,
Long
.
class
,
String
.
class
,
String
.
class
},
new
Object
[]{
2L
,
3L
,
"ActiveStatus"
,
"Active"
});
addEnum
(
CodeInfoEnum
.
class
,
"4"
,
new
Class
[]{
Long
.
class
,
Long
.
class
,
String
.
class
,
String
.
class
},
new
Object
[]{
2L
,
4L
,
"ActiveStatus"
,
"Inactive"
});
addEnum
(
CodeInfoEnum
.
class
,
"5"
,
new
Class
[]{
Long
.
class
,
Long
.
class
,
String
.
class
,
String
.
class
},
new
Object
[]{
3L
,
5L
,
"Optype"
,
"OP1"
});
addEnum
(
CodeInfoEnum
.
class
,
"6"
,
new
Class
[]{
Long
.
class
,
Long
.
class
,
String
.
class
,
String
.
class
},
new
Object
[]{
3L
,
6L
,
"Optype"
,
"OP2"
});
addEnum
(
CodeInfoEnum
.
class
,
"7"
,
new
Class
[]{
Long
.
class
,
Long
.
class
,
String
.
class
,
String
.
class
},
new
Object
[]{
3L
,
7L
,
"Optype"
,
"OP3"
});
addEnum
(
CodeInfoEnum
.
class
,
"8"
,
new
Class
[]{
Long
.
class
,
Long
.
class
,
String
.
class
,
String
.
class
},
new
Object
[]{
3L
,
8L
,
"Optype"
,
"OP4"
});
}
CodeInfoEnum
codeInfoEnum
=
CodeInfoEnum
.
valueOf
(
"5"
);
System
.
out
.
println
(
codeInfoEnum
);
// Run a few tests just to show it works OK.
System
.
out
.
println
(
Arrays
.
deepToString
(
CodeInfoEnum
.
values
()));
System
.
out
.
println
(
"============================打印所有枚举(包括固定的和动态的),可以将数据库中保存的CIC以枚举的形式加载到JVM"
);
for
(
CodeInfoEnum
codeInfo
:
CodeInfoEnum
.
values
())
{
System
.
out
.
println
(
codeInfo
.
toString
());
}
System
.
out
.
println
(
"============================通过codeId找到的枚举,用于PO转VO的处理"
);
CodeInfoEnum
activeStatus_Active
=
CodeInfoEnum
.
getByInfoId
(
3L
);
System
.
out
.
println
(
activeStatus_Active
);
System
.
out
.
println
(
"============================通过ClassId找到的枚举列表"
);
List
<
CodeInfoEnum
>
activeStatusEnumList
=
CodeInfoEnum
.
getByClassId
(
3L
);
for
(
CodeInfoEnum
codeInfo
:
activeStatusEnumList
)
{
System
.
out
.
println
(
codeInfo
);
}
System
.
out
.
println
(
"============================通过ClassCode和InfoCode获取枚举,用于导入验证CIC合法性"
);
CodeInfoEnum
toGetActiveStatus_Active
=
CodeInfoEnum
.
getByClassCodeAndInfoCode
(
"ActiveStatus"
,
"Active"
);
System
.
out
.
println
(
toGetActiveStatus_Active
);
System
.
out
.
println
(
"============================通过ClassCode和InfoCode获取枚举,输入不存在的Code,则返回NULL"
);
CodeInfoEnum
toGetActiveStatus_miss
=
CodeInfoEnum
.
getByClassCodeAndInfoCode
(
"ActiveStatus"
,
"MISS"
);
System
.
out
.
println
(
toGetActiveStatus_miss
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/DutyCarDto.java
View file @
517a8d98
...
...
@@ -46,4 +46,17 @@ public class DutyCarDto implements Serializable {
@ApiModelProperty
(
value
=
"值班信息"
)
private
List
<
DutyPersonShiftDto
>
dutyShift
=
new
ArrayList
<>();
// BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。 同步修改 查询 导出相关逻辑 by kongfm 2021-09-14
@ApiModelProperty
(
value
=
"值班开始时间"
)
private
String
startTime
;
@ApiModelProperty
(
value
=
"值班结束时间"
)
private
String
endTime
;
// 需求 958 新增值班区域 值班区域id 字段 前台保存字段 by kongfm 2021-09-15
@ApiModelProperty
(
value
=
"值班区域"
)
private
String
dutyArea
;
@ApiModelProperty
(
value
=
"值班区域Id"
)
private
String
dutyAreaId
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/DutyCarExcelDto.java
View file @
517a8d98
...
...
@@ -62,4 +62,9 @@ public class DutyCarExcelDto implements Serializable {
@ExcelProperty
(
value
=
"车辆名称(车牌)"
,
index
=
4
)
@ApiModelProperty
(
value
=
"车辆名称"
)
private
String
carName
;
// 需求 958 新增值班区域 值班区域id 字段 导出字段 by kongfm 2021-09-15
@ExplicitConstraint
(
indexNum
=
5
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getDutyArea"
)
//固定下拉内容
@ExcelProperty
(
value
=
"值班区域"
,
index
=
5
)
@ApiModelProperty
(
value
=
"值班区域"
)
private
String
dutyArea
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/DutyPersonDto.java
View file @
517a8d98
...
...
@@ -39,4 +39,17 @@ public class DutyPersonDto implements Serializable {
@ApiModelProperty
(
value
=
"值班信息"
)
private
List
<
DutyPersonShiftDto
>
dutyShift
;
// BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。 同步修改 查询 导出相关逻辑 by kongfm 2021-09-14
@ApiModelProperty
(
value
=
"值班开始时间"
)
private
String
startTime
;
@ApiModelProperty
(
value
=
"值班结束时间"
)
private
String
endTime
;
// 需求 958 新增值班区域 值班区域id 字段 前台保存字段 by kongfm 2021-09-15
@ApiModelProperty
(
value
=
"值班区域"
)
private
String
dutyArea
;
@ApiModelProperty
(
value
=
"值班区域Id"
)
private
String
dutyAreaId
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/DutyPersonExcelDto.java
View file @
517a8d98
...
...
@@ -52,4 +52,9 @@ public class DutyPersonExcelDto implements Serializable {
@ExcelProperty
(
value
=
"岗位"
,
index
=
4
)
@ApiModelProperty
(
value
=
"岗位名称"
)
private
String
postTypeName
;
// 需求 958 新增值班区域 值班区域id 字段 导出字段 by kongfm 2021-09-15
@ExplicitConstraint
(
indexNum
=
5
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getDutyArea"
)
//固定下拉内容
@ExcelProperty
(
value
=
"值班区域"
,
index
=
5
)
@ApiModelProperty
(
value
=
"值班区域"
)
private
String
dutyArea
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/EquipmentDetailDownloadTemplateDto.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @author ZeHua Li
* @date 2020/9/8 13:46
* @since v2.0
*/
@Data
public
class
EquipmentDetailDownloadTemplateDto
implements
Serializable
{
@ExcelProperty
(
value
=
"器材名称"
,
index
=
0
)
// @Excel(name = "器材名称", width = 30, orderNum = "1")
private
String
name
;
@ExcelProperty
(
value
=
"器材编码(从装备定义中获取)"
,
index
=
1
)
//@Excel(name = "器材编码(从装备定义中获取)", width = 30, orderNum = "2")
private
String
code
;
@ExcelProperty
(
value
=
"规格型号"
,
index
=
2
)
//@Excel(name = "规格型号", width = 30, orderNum = "3")
private
String
standard
;
@ExcelProperty
(
value
=
"品牌"
,
index
=
3
)
//@Excel(name = "品牌", width = 30, orderNum = "4")
private
String
brand
;
@ExcelProperty
(
value
=
"生产厂家名称"
,
index
=
4
)
//@Excel(name = "生产厂家名称", width = 30, orderNum = "5")
private
String
manufacturerName
;
@ExcelProperty
(
value
=
"设备编码"
,
index
=
5
)
//@Excel(name = "设备编码", width = 30, orderNum = "6")
private
String
systemCode
;
@ExcelProperty
(
value
=
"物联编码"
,
index
=
6
)
//@Excel(name = "物联编码", width = 30, orderNum = "7")
private
String
iotCode
;
@ExcelProperty
(
value
=
"存放位置(货位编码)"
,
index
=
7
)
//@Excel(name = "存放位置(货位编码)", width = 30, orderNum = "8")
private
String
warehouseStructCode
;
@ExcelProperty
(
value
=
"位置信息"
,
index
=
8
)
//@Excel(name = "位置信息", width = 30, orderNum = "9")
private
String
description
;
@ExcelProperty
(
value
=
"消防系统编码"
,
index
=
9
)
//@Excel(name = "消防系统编码", width = 30, orderNum = "10")
private
String
fightingSysCodes
;
@ExplicitConstraint
(
indexNum
=
10
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getFireTeam"
)
//动态下拉内容
@ExcelProperty
(
value
=
"所属队伍"
,
index
=
10
)
//@Excel(name = "所属队伍",width = 30,orderNum = "11")
private
String
fireTeam
;
//动态下拉内容
@ExplicitConstraint
(
indexNum
=
11
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getCompany"
)
//动态下拉内容
@ExcelProperty
(
value
=
"所属单位"
,
index
=
11
)
//@Excel(name = "所属单位",width = 30,orderNum = "12")
private
String
companyName
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FireChemicalDto.java
View file @
517a8d98
...
...
@@ -52,46 +52,46 @@ public class FireChemicalDto extends BaseDto {
private
String
formula
;
@ApiModelProperty
(
value
=
"主要成分"
)
@Excel
Property
(
value
=
"主要成分"
,
index
=
7
)
@Excel
Ignore
private
String
ingredient
;
@ApiModelProperty
(
value
=
"泄漏处理"
)
@ExcelProperty
(
value
=
"泄漏处理"
,
index
=
8
)
@ExcelProperty
(
value
=
"泄漏处理"
,
index
=
7
)
private
String
leakWay
;
@ExcelProperty
(
value
=
"中文名"
,
index
=
0
)
@ApiModelProperty
(
value
=
"中文名"
)
private
String
name
;
@ApiModelProperty
(
value
=
"性状"
)
@ExcelProperty
(
value
=
"性状"
,
index
=
9
)
@ExcelProperty
(
value
=
"性状"
,
index
=
8
)
private
String
property
;
@ApiModelProperty
(
value
=
"贮藏方法"
)
@ExcelProperty
(
value
=
"贮藏方法"
,
index
=
10
)
@ExcelProperty
(
value
=
"贮藏方法"
,
index
=
9
)
private
String
store
;
@ApiModelProperty
(
value
=
"症状"
)
@ExcelProperty
(
value
=
"症状"
,
index
=
1
1
)
@ExcelProperty
(
value
=
"症状"
,
index
=
1
0
)
private
String
symptom
;
@ApiModelProperty
(
value
=
"禁忌物/禁忌"
)
@ExcelProperty
(
value
=
"禁忌物/禁忌"
,
index
=
1
2
)
@ExcelProperty
(
value
=
"禁忌物/禁忌"
,
index
=
1
1
)
private
String
tabu
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"类型code"
)
private
String
typeCode
;
@ExplicitConstraint
(
type
=
"CHEMICALTYPE"
,
indexNum
=
1
3
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExplicitConstraint
(
type
=
"CHEMICALTYPE"
,
indexNum
=
1
2
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ApiModelProperty
(
value
=
"类型名称"
)
@ExcelProperty
(
value
=
"类型名称"
,
index
=
1
3
)
@ExcelProperty
(
value
=
"类型名称"
,
index
=
1
2
)
private
String
type
;
// @ExplicitConstraint(indexNum=14,source = {"男","女"}) //固定下拉内容
@ExcelProperty
(
value
=
"国标号"
,
index
=
1
4
)
@ExcelProperty
(
value
=
"国标号"
,
index
=
1
3
)
@ApiModelProperty
(
value
=
"国标号"
)
private
String
un
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"化学品图片"
)
@ExcelProperty
(
value
=
"化学品图片"
,
index
=
15
)
private
String
image
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"更新时间"
)
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FireExpertsDto.java
View file @
517a8d98
...
...
@@ -107,11 +107,13 @@ public class FireExpertsDto extends BaseDto {
@ApiModelProperty
(
value
=
"消防专家领域code"
)
private
String
expertCode
;
@ExcelProperty
(
value
=
"人员照片"
,
index
=
16
)
// @ExcelProperty(value = "人员照片", index = 16)
@ExcelIgnore
@ApiModelProperty
(
value
=
"人员照片"
)
private
String
personnelPhotos
;
@ExcelProperty
(
value
=
"资质证书"
,
index
=
17
)
// @ExcelProperty(value = "资质证书", index = 17)
@ExcelIgnore
@ApiModelProperty
(
value
=
"资质证书"
)
private
String
qualificationCertificate
;
...
...
@@ -131,7 +133,7 @@ public class FireExpertsDto extends BaseDto {
@ApiModelProperty
(
value
=
"消防机构name"
)
private
Long
fireTeamName
;
@ExcelProperty
(
value
=
"备注"
,
index
=
1
8
)
@ExcelProperty
(
value
=
"备注"
,
index
=
1
6
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
note
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FireTeamDto.java
View file @
517a8d98
...
...
@@ -28,6 +28,7 @@ public class FireTeamDto extends BaseDto {
@ExcelProperty
(
value
=
"所属单位"
,
index
=
0
)
@ApiModelProperty
(
value
=
"机构名称"
)
@ExplicitConstraint
(
indexNum
=
0
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getCompanyDetailTree"
)
//动态下拉内容
private
String
companyName
;
@ExcelIgnore
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/FirefightersExcelDto.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
api
.
dto
;
import
java.util.Date
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 消防队员
*
...
...
@@ -83,39 +87,42 @@ public class FirefightersExcelDto extends BaseDto {
@ApiModelProperty
(
value
=
"婚姻状况"
)
private
String
maritalStatus
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"籍贯/户口所在地"
)
private
String
nativePlace
;
@ExplicitConstraint
(
indexNum
=
10
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getCitys"
)
//动态下拉内容// BUG 2760 修改消防人员导出模板和 导入问题 bykongfm
@ExcelProperty
(
value
=
"户籍所在地"
,
index
=
10
)
@ApiModelProperty
(
value
=
"籍贯/户口所在地的值"
)
private
String
nativePlaceValue
;
@ExplicitConstraint
(
indexNum
=
11
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getPoliticalOutlook"
)
//固定下拉内容
@ExcelProperty
(
value
=
"政治面貌"
,
index
=
11
)
// BUG 3658 优化 by kongfm 2021-09-13 需求详细说明 1. 添加两个字段 2. 地区选择联动 只有新增时带联动 编辑时不带联动 3. 导出模板及导入同步修改
@ExcelProperty
(
value
=
"籍贯/户口所在地详细地址"
,
index
=
11
)
@ApiModelProperty
(
value
=
"籍贯/户口所在地详细地址"
)
private
String
nativePlaceVal
;
@ExplicitConstraint
(
indexNum
=
12
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getPoliticalOutlook"
)
//固定下拉内容
@ExcelProperty
(
value
=
"政治面貌"
,
index
=
12
)
@ApiModelProperty
(
value
=
"政治面貌代码"
)
private
String
politicalOutlook
;
@ExplicitConstraint
(
indexNum
=
1
2
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getCitys"
)
//动态下拉内容// BUG 2760 修改消防人员导出模板和 导入问题 bykongfm
@ExcelProperty
(
value
=
"现居住地"
,
index
=
1
2
)
@ExplicitConstraint
(
indexNum
=
1
3
,
sourceClass
=
RoleNameExplicitConstraint
.
class
,
method
=
"getCitys"
)
//动态下拉内容// BUG 2760 修改消防人员导出模板和 导入问题 bykongfm
@ExcelProperty
(
value
=
"现居住地"
,
index
=
1
3
)
@ApiModelProperty
(
value
=
"现居住地"
)
private
String
residence
;
// BUG 3658 优化 by kongfm 2021-09-13 需求详细说明 1. 添加两个字段 2. 地区选择联动 只有新增时带联动 编辑时不带联动 3. 导出模板及导入同步修改
@ExcelProperty
(
value
=
"现居住地详细地址"
,
index
=
14
)
@ApiModelProperty
(
value
=
"现居住地详细地址"
)
private
String
residenceDetailVal
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"现居住地详情"
)
private
String
residenceDetails
;
@ExcelProperty
(
value
=
"机场住宿情况"
,
index
=
13
)
@ExcelProperty
(
value
=
"机场住宿情况"
,
index
=
15
)
@ApiModelProperty
(
value
=
"机场住宿情况"
)
private
String
airportAccommodation
;
@ExcelProperty
(
value
=
"联系电话"
,
index
=
1
4
)
@ExcelProperty
(
value
=
"联系电话"
,
index
=
1
6
)
@ApiModelProperty
(
value
=
"手机"
)
private
String
mobilePhone
;
@ExplicitConstraint
(
type
=
"RYZT"
,
indexNum
=
1
5
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"人员状态"
,
index
=
1
5
)
@ExplicitConstraint
(
type
=
"RYZT"
,
indexNum
=
1
7
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"人员状态"
,
index
=
1
7
)
@ApiModelProperty
(
value
=
"人员状态,在职/离职"
)
private
String
state
;
...
...
@@ -123,21 +130,21 @@ public class FirefightersExcelDto extends BaseDto {
@ApiModelProperty
(
value
=
"人员状态,在职/离职字典code"
)
private
String
stateCode
;
@ExplicitConstraint
(
type
=
"GWMC"
,
indexNum
=
1
6
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"岗位名称"
,
index
=
1
6
)
@ExplicitConstraint
(
type
=
"GWMC"
,
indexNum
=
1
8
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"岗位名称"
,
index
=
1
8
)
@ApiModelProperty
(
value
=
"岗位名称"
)
private
String
jobTitle
;
@ExcelProperty
(
value
=
"紧急联系人姓名"
,
index
=
1
7
)
@ExcelProperty
(
value
=
"紧急联系人姓名"
,
index
=
1
9
)
@ApiModelProperty
(
value
=
"紧急联系人姓名"
)
private
String
emergencyContact
;
@ExplicitConstraint
(
type
=
"RJGX"
,
indexNum
=
18
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"与紧急联系人关系"
,
index
=
18
)
@ExplicitConstraint
(
type
=
"RJGX"
,
indexNum
=
20
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"与紧急联系人关系"
,
index
=
20
)
@ApiModelProperty
(
value
=
"紧急联系人与本人所属关系"
)
private
String
relationship
;
@ExcelProperty
(
value
=
"紧急联系人电话"
,
index
=
19
)
@ExcelProperty
(
value
=
"紧急联系人电话"
,
index
=
21
)
@ApiModelProperty
(
value
=
"紧急联系人电话"
)
private
String
emergencyContactPhone
;
...
...
@@ -170,11 +177,86 @@ public class FirefightersExcelDto extends BaseDto {
private
String
recUserName
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"人员id"
)
private
Long
firefightersId
;
/*************************岗位职级***********************/
@ApiModelProperty
(
value
=
"员工层级"
)
@ExcelProperty
(
value
=
"员工层级"
,
index
=
22
)
@ExplicitConstraint
(
type
=
"YGCJ"
,
indexNum
=
22
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
private
String
employeeHierarchy
;
@ApiModelProperty
(
value
=
"行政职务"
)
@ExplicitConstraint
(
type
=
"XZZW"
,
indexNum
=
23
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"行政职务"
,
index
=
23
)
private
String
administrativePosition
;
@ApiModelProperty
(
value
=
"岗位资质"
)
@ExplicitConstraint
(
type
=
"GWZZ"
,
indexNum
=
24
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"岗位资质"
,
index
=
24
)
private
String
postQualification
;
@ExcelIgnore
@ApiModelProperty
(
value
=
"专家领域"
)
@ApiModelProperty
(
value
=
"消防救援人员类别"
)
@ExplicitConstraint
(
type
=
"XFRYLB"
,
indexNum
=
25
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"消防救援人员类别"
,
index
=
25
)
private
String
category
;
// @ApiModelProperty(value = "消防救援人员状态")
// private String state;
@ApiModelProperty
(
value
=
"消防救援衔级别代码"
)
@ExplicitConstraint
(
type
=
"XFJYJB"
,
indexNum
=
26
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"消防救援衔级别代码"
,
index
=
26
)
private
String
level
;
@ApiModelProperty
(
value
=
"消防专家领域"
)
@ExplicitConstraint
(
type
=
"ZJLY"
,
indexNum
=
27
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"消防专家领域"
,
index
=
27
)
private
String
areasExpertise
;
/*************************学历教育***********************/
@ApiModelProperty
(
value
=
"第一学历"
)
@ExplicitConstraint
(
type
=
"XLLX"
,
indexNum
=
28
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"第一学历"
,
index
=
28
)
private
String
firstDegree
;
@ApiModelProperty
(
value
=
"最高学历"
)
@ExplicitConstraint
(
type
=
"XLLX"
,
indexNum
=
29
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"最高学历"
,
index
=
29
)
private
String
highestEducation
;
@ApiModelProperty
(
value
=
"学位"
)
@ExplicitConstraint
(
type
=
"XWLX"
,
indexNum
=
30
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"学位"
,
index
=
30
)
private
String
academicDegree
;
@ApiModelProperty
(
value
=
"毕业院校"
)
@ExcelProperty
(
value
=
"毕业院校"
,
index
=
31
)
private
String
school
;
@ApiModelProperty
(
value
=
"毕业专业名称"
)
@ExcelProperty
(
value
=
"毕业专业名称"
,
index
=
32
)
private
String
professionalName
;
/*************************工作履历岗***********************/
@ApiModelProperty
(
value
=
"参加工作时间"
)
@ExcelProperty
(
value
=
"参加工作时间"
,
index
=
33
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
workingHours
;
@ApiModelProperty
(
value
=
"参加消防部门工作时间"
)
@ExcelProperty
(
value
=
"参加消防部门工作时间"
,
index
=
34
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
fireWorkingHours
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/KeySiteExcleDto.java
View file @
517a8d98
...
...
@@ -52,53 +52,53 @@ public class KeySiteExcleDto implements Serializable {
@ApiModelProperty
(
value
=
"建筑面积(㎡)"
)
private
String
buildingArea
;
@Excel
Property
(
value
=
"建筑高度(m)"
,
index
=
5
)
@Excel
Ignore
@ApiModelProperty
(
value
=
"建筑高度(m)"
)
private
String
buildingHeight
;
@ExplicitConstraint
(
type
=
"NHDJ"
,
indexNum
=
6
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"耐火等级"
,
index
=
6
)
@ExplicitConstraint
(
type
=
"NHDJ"
,
indexNum
=
5
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"耐火等级"
,
index
=
5
)
@ApiModelProperty
(
value
=
"耐火等级"
)
private
String
fireEnduranceRate
;
@ExplicitConstraint
(
type
=
"JZWSYXZ"
,
indexNum
=
7
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"使用性质"
,
index
=
7
)
@ExplicitConstraint
(
type
=
"JZWSYXZ"
,
indexNum
=
6
,
sourceClass
=
RoleNameExplicitConstraint
.
class
)
//动态下拉内容
@ExcelProperty
(
value
=
"使用性质"
,
index
=
6
)
@ApiModelProperty
(
value
=
"使用性质"
)
private
String
useNature
;
@ExcelProperty
(
value
=
"责任人"
,
index
=
8
)
@ExcelProperty
(
value
=
"责任人"
,
index
=
7
)
@ApiModelProperty
(
value
=
"责任人"
)
private
String
chargePerson
;
@ExcelProperty
(
value
=
"责任人身份证"
,
index
=
9
)
@ExcelProperty
(
value
=
"责任人身份证"
,
index
=
8
)
@ApiModelProperty
(
value
=
"责任人身份证"
)
private
String
chargePersonId
;
@ExcelProperty
(
value
=
"确定重点防火部位的原因"
,
index
=
10
)
@ExcelProperty
(
value
=
"确定重点防火部位的原因"
,
index
=
9
)
@ApiModelProperty
(
value
=
"确定重点防火部位的原因"
)
private
String
keyPreventionReason
;
@ExcelProperty
(
value
=
"消防设施情况"
,
index
=
1
1
)
@ExcelProperty
(
value
=
"消防设施情况"
,
index
=
1
0
)
@ExplicitConstraint
(
indexNum
=
11
,
source
=
{
"有"
,
"无"
})
@ApiModelProperty
(
value
=
"消防设施情况"
)
private
String
fireFacilitiesInfo
;
@ExcelProperty
(
value
=
"防火标志设立情况"
,
index
=
1
2
)
@ExcelProperty
(
value
=
"防火标志设立情况"
,
index
=
1
1
)
@ApiModelProperty
(
value
=
"防火标志设立情况"
)
private
String
firePreventionFlagName
;
@ExcelProperty
(
value
=
"危险源"
,
index
=
1
3
)
@ExcelProperty
(
value
=
"危险源"
,
index
=
1
2
)
@ApiModelProperty
(
value
=
"危险源"
)
private
String
hazard
;
@ExcelProperty
(
value
=
"消防安全管理措施"
,
index
=
1
4
)
@ExcelProperty
(
value
=
"消防安全管理措施"
,
index
=
1
3
)
@ApiModelProperty
(
value
=
"消防安全管理措施"
)
private
String
safetyManagementMeasures
;
@ExcelProperty
(
value
=
"防范手段措施"
,
index
=
1
5
)
@ExcelProperty
(
value
=
"防范手段措施"
,
index
=
1
4
)
@ApiModelProperty
(
value
=
"防范手段措施"
)
private
String
preventiveMeasures
;
@ExcelProperty
(
value
=
"备注"
,
index
=
1
6
)
@ExcelProperty
(
value
=
"备注"
,
index
=
1
5
)
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/dto/WaterResourceDto.java
View file @
517a8d98
...
...
@@ -2,7 +2,6 @@ package com.yeejoin.amos.boot.module.common.api.dto;
import
com.alibaba.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExplicitConstraint
;
import
com.yeejoin.amos.boot.module.common.api.excel.RoleNameExplicitConstraint
;
...
...
@@ -306,6 +305,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty
(
value
=
"物联参数"
)
private
WaterResourceIotDto
waterResourceIotDto
;
@ExcelIgnore
@ApiModelProperty
(
"设施定义id"
)
private
Long
equipId
;
...
...
@@ -313,6 +313,7 @@ public class WaterResourceDto extends BaseDto {
@ExcelProperty
(
value
=
"设施定义名称"
,
index
=
44
)
private
String
equipName
;
@ExcelIgnore
@ApiModelProperty
(
"设施分类id"
)
private
Long
equipCategoryId
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/entity/Firefighters.java
View file @
517a8d98
...
...
@@ -122,4 +122,11 @@ public class Firefighters extends BaseEntity {
@ApiModelProperty
(
value
=
"籍贯/户口所在地的值"
)
private
String
nativePlaceValue
;
// BUG 3658 优化 by kongfm 2021-09-13 需求详细说明 1. 添加两个字段 2. 地区选择联动 只有新增时带联动 编辑时不带联动 3. 导出模板及导入同步修改
@ApiModelProperty
(
value
=
"户籍所在地详细地址"
)
private
String
nativePlaceVal
;
@ApiModelProperty
(
value
=
"现居住地详细地址"
)
private
String
residenceDetailVal
;
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/excel/TemplateCellWriteHandlerDate.java
View file @
517a8d98
...
...
@@ -11,6 +11,8 @@ import org.apache.poi.ss.usermodel.DataValidation;
import
org.apache.poi.ss.usermodel.DataValidationConstraint
;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.poi.ss.util.CellRangeAddressList
;
import
org.apache.poi.xssf.usermodel.XSSFDataValidation
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -30,7 +32,7 @@ public class TemplateCellWriteHandlerDate implements SheetWriteHandler {
/**
* 避免生成的导入模板下拉值获取不到
*/
private
static
final
Integer
LIMIT_NUMBER
=
1
0
;
private
static
final
Integer
LIMIT_NUMBER
=
1
;
...
...
@@ -88,6 +90,14 @@ public class TemplateCellWriteHandlerDate implements SheetWriteHandler {
// 将刚才设置的sheet引用到你的下拉列表中
DataValidationConstraint
constraint
=
helper
.
createFormulaListConstraint
(
refers
);
DataValidation
dataValidation
=
helper
.
createValidation
(
constraint
,
rangeList
);
if
(
dataValidation
instanceof
XSSFDataValidation
){
dataValidation
.
setSuppressDropDownArrow
(
true
);
dataValidation
.
setShowErrorBox
(
true
);
}
else
{
dataValidation
.
setSuppressDropDownArrow
(
false
);
}
writeSheetHolder
.
getSheet
().
addValidationData
(
dataValidation
);
// 设置存储下拉列值得sheet为隐藏
int
hiddenIndex
=
workbook
.
getSheetIndex
(
sheetName
);
...
...
@@ -95,17 +105,17 @@ public class TemplateCellWriteHandlerDate implements SheetWriteHandler {
workbook
.
setSheetHidden
(
hiddenIndex
,
true
);
}
}
// 下拉列表约束数据
DataValidationConstraint
constraint
=
helper
.
createExplicitListConstraint
(
v
);
// 设置约束
DataValidation
validation
=
helper
.
createValidation
(
constraint
,
rangeList
);
// 阻止输入非下拉选项的值
validation
.
setErrorStyle
(
DataValidation
.
ErrorStyle
.
STOP
);
validation
.
setShowErrorBox
(
true
);
validation
.
setSuppressDropDownArrow
(
true
);
validation
.
createErrorBox
(
"提示"
,
"此值与单元格定义格式不一致"
);
// validation.createPromptBox("填写说明:","填写内容只能为下拉数据集中的单位,其他单位将会导致无法入仓");
sheet
.
addValidationData
(
validation
);
//
// 下拉列表约束数据
//
DataValidationConstraint constraint = helper.createExplicitListConstraint(v);
//
// 设置约束
//
DataValidation validation = helper.createValidation(constraint, rangeList);
//
// 阻止输入非下拉选项的值
//
validation.setErrorStyle(DataValidation.ErrorStyle.STOP);
//
validation.setShowErrorBox(true);
//
validation.setSuppressDropDownArrow(true);
//
validation.createErrorBox("提示", "此值与单元格定义格式不一致");
//
// validation.createPromptBox("填写说明:","填写内容只能为下拉数据集中的单位,其他单位将会导致无法入仓");
//
sheet.addValidationData(validation);
});
}
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/feign/EquipFeignClient.java
View file @
517a8d98
...
...
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -182,6 +183,21 @@ public interface EquipFeignClient {
* 统计
**/
@RequestMapping
(
value
=
"/equipSpecificAlarm/getcountAlarmHandle/{type}"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Integer
>
getCountEquipment
(
@PathVariable
String
type
);
ResponseModel
<
Integer
>
getcountAlarmHandle
(
@PathVariable
String
type
);
/**
* 根据实例id 获取实例信息 // 需求 958 新增值班区域 值班区域id 字段 获取名称 by kongfm 2021-09-15
*
* @return
*/
@RequestMapping
(
value
=
"/building/getFormInstanceById"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
Map
<
String
,
Object
>>
getFormInstanceById
(
@RequestParam
Long
instanceId
);
/**
* 查询所有建筑的数据字典 // 需求 958 新增值班区域 值班区域id 字段 获取下拉列表 by kongfm 2021-09-15
* @return
*/
@RequestMapping
(
value
=
"/building/getAllBuilding"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
List
<
LinkedHashMap
<
String
,
Object
>>>
getAllBuilding
();
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/DynamicFormInstanceMapper.java
View file @
517a8d98
...
...
@@ -86,4 +86,23 @@ public interface DynamicFormInstanceMapper extends BaseMapper<DynamicFormInstanc
@Param
(
"groupCode"
)
String
groupCode
);
List
<
DynamicFormInstance
>
getInstanceByCodeAndValue
(
String
code
,
String
value
);
/**
* 新分页查询带日期过滤// 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14
*
* @param page 分页信息
* @param appKey 应用
* @param fieldCodes 字段
* @param groupCode 表单类型
* @return IPage<Map < String, Object>>
*/
IPage
<
Map
<
String
,
Object
>>
pageListNew
(
Page
page
,
@Param
(
"appKey"
)
String
appKey
,
@Param
(
"fieldCodes"
)
Map
<
String
,
Object
>
fieldCodes
,
@Param
(
"groupCode"
)
String
groupCode
,
@Param
(
"params"
)
Map
<
String
,
String
>
params
,
@Param
(
"stratTime"
)
String
stratTime
,
@Param
(
"endTime"
)
String
endTime
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/FireTeamMapper.java
View file @
517a8d98
...
...
@@ -39,7 +39,7 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> {
*
* @return
*/
List
<
FireBrigadeResourceDto
>
listMonitorFireBrigade
();
List
<
FireBrigadeResourceDto
>
listMonitorFireBrigade
(
@Param
(
"code"
)
String
code
);
/**
* 查询消防队伍卡片分页列表
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
517a8d98
...
...
@@ -23,6 +23,9 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
List
<
Map
<
String
,
Object
>>
selectPersonList
(
@Param
(
"map"
)
Map
<
String
,
Object
>
map
);
//BUG 2880 by litw start 2021年9月16日
List
<
OrgUsr
>
selectAllChildrenList
(
@Param
(
"map"
)
Map
<
String
,
Object
>
map
);
List
<
OrgUsr
>
selectCompanyDepartmentMsg
();
List
<
Map
<
String
,
Object
>>
selectPersonAllList
(
Map
<
String
,
Object
>
map
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IDutyPersonService.java
View file @
517a8d98
...
...
@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.common.api.service;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto
;
import
java.util.List
;
/**
* @author DELL
*/
...
...
@@ -23,4 +25,11 @@ public interface IDutyPersonService extends IDutyCommonService {
* @return List<DutyCarDto>
*/
DutyPersonDto
update
(
Long
instanceId
,
DutyPersonDto
dutyPersonDto
);
/**
* 根据区域ID 查询此时该区域值班人员 新需求 提供根据区域ID 获取值班人员 by kongfm 2021-09-15
* @param dutyAreaId
* @return
*/
List
<
DutyPersonDto
>
findByDutyAreaId
(
Long
dutyAreaId
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IOrgUsrService.java
View file @
517a8d98
...
...
@@ -223,7 +223,7 @@ public interface IOrgUsrService {
/**
* 获取登陆人关联机场单位人员信息,部门信息
*/
List
<
Map
<
String
,
Object
>>
getLoginUserDetails
(
String
userId
);
List
<
Map
<
String
,
Object
>>
getLoginUserDetails
(
String
userId
,
AgencyUserModel
user
);
List
<
OrgUsr
>
getPersonListByParentId
(
Long
id
);
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/DutyPersonShiftMapper.xml
View file @
517a8d98
...
...
@@ -18,6 +18,7 @@
AND i.field_code = 'userId'
and s.duty_date >= #{beginDate}
and s.duty_date
<![CDATA[<=]]>
#{endDate}
AND s.shift_id is not null
<!--// BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。 同步修改 查询 导出相关逻辑 by kongfm 2021-09-14-->
and s.app_Key = #{appKey}
GROUP BY s.duty_date,s.shift_id
<!--增添分组条件 根据班次分组技术 -->
) a) as maxDutyPersonNumDay,
...
...
@@ -56,6 +57,7 @@
AND ds.sequence_nbr = s.shift_id
AND i.field_code = 'userName'
AND s.duty_date = #{dutyDate}
AND s.shift_id is not null
AND s.app_key = #{appKey}
and i.group_code =#{groupCode}
GROUP BY
...
...
@@ -76,6 +78,7 @@
s.instance_id = i.instance_id
and i.field_code = 'postTypeName'
AND s.duty_date = #{dutyDate}
AND s.shift_id is not null
AND s.app_key = #{appKey}
and i.group_code =#{groupCode}
GROUP BY i.field_value
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/DynamicFormInstanceMapper.xml
View file @
517a8d98
...
...
@@ -198,4 +198,61 @@
</if>
</where>
</select>
<!--不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14-->
<select
id=
"pageListNew"
resultType=
"java.util.Map"
>
select
d.*
from
(
select
i.INSTANCE_ID instanceId,
i.GROUP_CODE groupCode,
<foreach
collection=
"fieldCodes"
item=
"value"
index=
"key"
separator=
","
>
MAX(CASE WHEN i.FIELD_CODE = #{key} THEN i.FIELD_VALUE END) as ${key},
IF(FIND_IN_SET(i.field_type,'radio,select,treeSelect'), MAX(CASE WHEN i.FIELD_CODE = #{key} THEN
i.FIELD_VALUE_LABEL END), null) as ${key}Label
</foreach>
from
cb_dynamic_form_instance i
where
i.GROUP_CODE = #{groupCode}
and i.is_delete = 0
<if
test=
"appKey != null and appKey !=''"
>
and i.APP_KEY = #{appKey}
</if>
<foreach
collection=
"params"
index=
"key"
item=
"value"
separator=
""
>
<if
test=
"key != null and key == 'instanceIds' "
>
and find_in_set(i.instance_id, #{value}) > 0
</if>
</foreach>
GROUP by
i.INSTANCE_ID) d
<if
test=
"params != null and params.size() > 0"
>
where
d.instanceId in (
select tt.instance_id from cb_duty_person_shift tt where tt.duty_date >= #{stratTime}
and tt.duty_date
<![CDATA[<=]]>
#{endTime}
)
<foreach
collection=
"params"
index=
"key"
item=
"value"
separator=
""
>
<choose>
<when
test=
"fieldCodes[key] == 'like' and value !=null and value !=''"
>
and d.${key} like concat('%',#{value},'%')
</when>
<when
test=
"fieldCodes[key] == 'eq' and value !=null and value !=''"
>
and d.${key} = #{value}
</when>
<when
test=
"fieldCodes[key] == 'ge' and value !=null and value !=''"
>
and d.${key} >= #{value}
</when>
<when
test=
"fieldCodes[key] == 'le' and value !=null and value !=''"
>
and d.${key}
<![CDATA[<=]]>
#{value}
</when>
</choose>
</foreach>
</if>
order by instanceId desc
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FireTeamMapper.xml
View file @
517a8d98
...
...
@@ -10,7 +10,7 @@
FROM cb_fire_team ft
LEFT JOIN cb_firefighters ff ON ff.fire_team_id = ft.sequence_nbr
WHERE ft.is_delete = 0
and ft.type_code =
118
and ft.type_code =
#{code}
GROUP BY ft.sequence_nbr
</select>
<select
id=
"queryFighterByTeamId"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto"
>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/FirefightersMapper.xml
View file @
517a8d98
...
...
@@ -5,10 +5,12 @@
<select
id=
"getFirefightersJobTitleCount"
resultType=
"com.yeejoin.amos.boot.biz.common.utils.FirefightersTreeDto"
>
select COUNT(a.sequence_nbr) num, a.job_title_code jobTitleCode
select COUNT(a.sequence_nbr) num, a.job_title_code
jobTitleCode
from cb_firefighters a
where a.is_delete = 0
GROUP BY a.job_title_code
GROUP BY
a.job_title_code
</select>
<!--消防队员列表按时间倒叙排列add desc 2021-09-08 by kongfm -->
<select
id=
"getFirefighters"
...
...
@@ -16,7 +18,8 @@
select a.*,b.areas_expertise areasExpertise ,b.areas_expertise_code
areasExpertiseCode from cb_firefighters a LEFT JOIN
cb_firefighters_post b on
a.sequence_nbr=b.firefighters_id where a.is_delete=0
a.sequence_nbr=b.firefighters_id where
a.is_delete=0
<if
test=
'par.postQualification!=null'
>
and b.post_qualification_code = #{par.postQualification}
</if>
<if
test=
'par.areasExpertise!=null'
>
and b.areas_expertise_code= #{par.areasExpertise}
</if>
<if
test=
'par.name!=null'
>
and a.name like concat ('%',#{par.name},'%')
</if>
...
...
@@ -48,7 +51,8 @@
<select
id=
"listToSelectById"
resultType=
"Map"
>
SELECT IFNULL(a.personnel_photos, '') personnelPhotos,
SELECT
IFNULL(a.personnel_photos, '') personnelPhotos,
a.sequence_nbr
sequenceNbr,
IFNULL(a.`name`, '无') `name`,
...
...
@@ -65,31 +69,92 @@
IFNULL(b.post_qualification, '无')
postQualification, year ( from_days( datediff( now( ),
a.birthday_time))) age
FROM cb_firefighters a LEFT JOIN cb_firefighters_post b
FROM cb_firefighters a LEFT JOIN
cb_firefighters_post b
ON a.sequence_nbr
= b.firefighters_id LEFT JOIN cb_fire_team c on
= b.firefighters_id LEFT JOIN
cb_fire_team c on
c.sequence_nbr=a.fire_team_id
WHERE a.is_delete =0
and a.sequence_nbr=#{id}
and
a.sequence_nbr=#{id}
</select>
<!-- BUG3553 BY kongfm 人员关系显示汉字 -->
<!---陈浩修改导出的数据量 2021-09-13-->
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto"
>
<!-- SELECT f.*, ( SELECT cb_fire_team.NAME FROM cb_fire_team WHERE cb_fire_team.sequence_nbr
= f.fire_team_id ) fireTeam, emergency_contact, da.NAME AS relationship,
emergency_contact_phone FROM cb_firefighters f LEFT JOIN cb_firefighters_contacts
fc ON f.sequence_nbr = fc.firefighters_id left join cb_data_dictionary da
on da.CODE = fc.relationship where f.is_delete = #{isDelete} -->
SELECT
f.*,
( SELECT cb_fire_team.NAME FROM cb_fire_team WHERE
cb_fire_team.sequence_nbr = f.fire_team_id ) fireTeam,
(
SELECT
cb_fire_team. NAME
FROM
cb_fire_team
WHERE
cb_fire_team.sequence_nbr = f.fire_team_id
) fireTeam,
emergency_contact,
da.NAME AS relationship,
emergency_contact_phone
(
SELECT
NAME
FROM
cb_data_dictionary
WHERE
CODE = fc.relationship
AND type = 'RJGX'
) AS relationship,
emergency_contact_phone,
fw.working_hours,
fw.fire_working_hours,
(
SELECT
NAME
FROM
cb_data_dictionary
WHERE
CODE = fe.first_degree
AND type = 'XLLX'
) AS first_degree,
(
SELECT
NAME
FROM
cb_data_dictionary
WHERE
CODE = fe.highest_education
AND type = 'XLLX'
) AS highest_education,
(
SELECT
NAME
FROM
cb_data_dictionary
WHERE
CODE = fe.academic_degree
AND type = 'XWLX'
) AS academic_degree,
fe.school,
fe.professional_name,
fp.*
FROM
cb_firefighters f
LEFT JOIN cb_firefighters_contacts fc ON f.sequence_nbr =
fc.firefighters_id
left join cb_data_dictionary da on da.CODE = fc.relationship
where f.is_delete = #{isDelete}
LEFT JOIN cb_firefighters_contacts fc ON f.sequence_nbr = fc.firefighters_id
LEFT JOIN cb_firefighters_workexperience fw ON f.sequence_nbr = fw.firefighters_id
LEFT JOIN cb_firefighters_education fe ON f.sequence_nbr = fe.firefighters_id
LEFT JOIN cb_firefighters_post fp ON f.sequence_nbr = fp.firefighters_id
WHERE
f.is_delete = 0
AND fc.is_delete = 0
AND fw.is_delete = 0
AND fe.is_delete = 0
AND fp.is_delete = 0
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/LinkageUnitMapper.xml
View file @
517a8d98
...
...
@@ -127,7 +127,7 @@
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
b.instance_id=a.instance_id where a.unit_name is not null
and a.is_delete=0
</select>
<!--联动单位列表按时间倒叙排列add order by clu.rec_date desc 同时处理单位根节点-1时查询全部数据问题 2021-09-08 by kongfm -->
...
...
@@ -182,7 +182,7 @@
cb_linkage_unit clu
WHERE clu.is_delete=0
<if
test=
"unitName != null and unitName != ''"
>
AND clu.unit_name LIKE concat(#{unitName}, '%')
AND clu.unit_name LIKE concat(
'%',
#{unitName}, '%')
</if>
<if
test=
"linkageUnitType != null and linkageUnitType != ''"
>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
517a8d98
...
...
@@ -94,6 +94,21 @@
LIMIT #{map.pageNum}, #{map.pageSize}
</select>
<!--机场单位查询机构下所有子数据 2021-09-16 by litw -->
<select
id=
"selectAllChildrenList"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.OrgUsr"
>
select
u.sequence_nbr sequenceNbr,
u.biz_org_name bizOrgName,
u.biz_org_code bizOrgCode
FROM
cb_org_usr u
where
u.is_delete = 0
<if
test=
"map.bizOrgCode != null and map.bizOrgCode != '-1'"
>
AND u.biz_org_code like concat(#{map.bizOrgCode}, '%')
</if>
</select>
<select
id=
"selectPersonAllList"
resultType=
"Map"
>
select * from (
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/WaterResourceMapper.xml
View file @
517a8d98
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.common.api.mapper.WaterResourceMapper"
>
<!--BUG 2919 消防水源导出没有设施定义 分类名称 设施编码 维保周期 by kongfm 2021-09-16 -->
<select
id=
"exportToExcel"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto"
>
select r.name,
r.address,
...
...
@@ -16,6 +16,10 @@
r.reality_img,
r.contact_user,
r.contact_phone,
r.equip_name,
r.equip_category_name,
r.equip_code,
r.maintenance_period,
(case r.resource_type when 'crane' then rc.height when 'natural' then rn.height end) height,
(case r.resource_type
when 'crane' then rc.status
...
...
@@ -82,8 +86,8 @@
and a.resource_type= #{par.resourceType}
</if>
<if
test=
'par.distance!=null'
>
<!--
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) <=
#{par.distance}
-->
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
=
#{par.distance}
</if>
ORDER BY distance limit #{pageNum},#{pageSize}
</select>
...
...
@@ -97,8 +101,8 @@
and a.resource_type= #{par.resourceType}
</if>
<if
test=
'par.distance!=null'
>
<!--
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) <=
#{par.distance}
-->
and Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1)
<
=
#{par.distance}
</if>
</select>
<select
id=
"getWaterResourceTypeList"
resultType=
"com.yeejoin.amos.boot.module.common.api.dto.WaterResourceTypeDto"
>
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/AlertNewsDto.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
/**
* @description:
* @author: tw
* @createDate: 2021/9/15
*/
/**
*物联消息
*
* */
public
class
AlertNewsDto
{
private
String
title
;
private
String
content
;
private
String
id
;
private
Object
data
;
public
String
getTitle
()
{
return
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
Object
getData
()
{
return
data
;
}
public
void
setData
(
Object
data
)
{
this
.
data
=
data
;
}
public
AlertNewsDto
()
{
}
public
AlertNewsDto
(
String
title
,
String
content
,
String
id
,
Object
data
)
{
this
.
title
=
title
;
this
.
content
=
content
;
this
.
id
=
id
;
this
.
data
=
data
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/dto/NewsDate.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
dto
;
/**
* @description:
* @author: tw
* @createDate: 2021/9/16
*/
public
class
NewsDate
{
private
Long
id
;
// 物联警情id
private
Double
floorLongitude
;
// 建筑经度
private
Double
floorLatitude
;
// 建筑纬度
private
String
floorName
;
// 建筑名称
private
String
unitInvolvedId
;
// 事发单位
private
String
unitInvolvedName
;
// 事发单位名称
public
Double
getFloorLongitude
()
{
return
floorLongitude
;
}
public
void
setFloorLongitude
(
Double
floorLongitude
)
{
this
.
floorLongitude
=
floorLongitude
;
}
public
Double
getFloorLatitude
()
{
return
floorLatitude
;
}
public
void
setFloorLatitude
(
Double
floorLatitude
)
{
this
.
floorLatitude
=
floorLatitude
;
}
public
String
getFloorName
()
{
return
floorName
;
}
public
void
setFloorName
(
String
floorName
)
{
this
.
floorName
=
floorName
;
}
public
String
getUnitInvolvedId
()
{
return
unitInvolvedId
;
}
public
void
setUnitInvolvedId
(
String
unitInvolvedId
)
{
this
.
unitInvolvedId
=
unitInvolvedId
;
}
public
String
getUnitInvolvedName
()
{
return
unitInvolvedName
;
}
public
void
setUnitInvolvedName
(
String
unitInvolvedName
)
{
this
.
unitInvolvedName
=
unitInvolvedName
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/ExcelEnums.java
View file @
517a8d98
...
...
@@ -17,14 +17,15 @@ public enum ExcelEnums {
WXXFZ
(
"微型消防站"
,
"微型消防站"
,
"com.yeejoin.amos.boot.module.common.api.dto.FireStationDto"
,
"WXXFZ"
),
//("WXXFZ","微型消防站")
XFRY
(
"消防人员"
,
"消防人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto"
,
"XFRY"
),
//("XFRY","消防人员")
WBRY
(
"维保人员"
,
"维保人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto"
,
"WBRY"
),
//("WBRY",维保人员)
KEYSITE
(
"重
點部位"
,
"重點
部位"
,
"com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto"
,
"KEYSITE"
),
//{"KEYSITE":重點部位}
KEYSITE
(
"重
点部位"
,
"重点
部位"
,
"com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto"
,
"KEYSITE"
),
//{"KEYSITE":重點部位}
CLZQ
(
"车辆执勤"
,
"车辆执勤"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyCarExcelDto"
,
"CLZQ"
),
//("CLZQ","车辆执勤")
JCDWRY
(
"机场单位人员"
,
"机场单位人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto"
,
"JCDWRY"
),
//("JCDW","机场单位")
LDDW
(
"联动单位"
,
"联动单位"
,
"com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto"
,
"LDDW"
),
//("JCDW","机场单位")
RYZB
(
"人员值班"
,
"人员值班"
,
"com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto"
,
"RYZB"
),
//("RYZB","人员值班")
// BUG 2455 相关代码 bykongfm
TGRY
(
"特岗人员"
,
"特岗人员"
,
"com.yeejoin.amos.boot.module.common.api.dto.SpecialPositionStaffDto"
,
"TGRY"
),
//("TGRY","特岗人员")
JYZB
(
"救援装备"
,
"救援装备"
,
"com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto"
,
"JYZB"
);
//("JYZB","救援装备")
JYZB
(
"救援装备"
,
"救援装备"
,
"com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto"
,
"JYZB"
),
//("JYZB","救援装备")
XFZB
(
"消防装备"
,
"消防装备"
,
"com.yeejoin.amos.boot.module.common.api.dto.EquipmentDetailDownloadTemplateDto"
,
"XFZB"
);
//("XFZB","消防装备")
private
String
fileName
;
private
String
sheetName
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/enums/FireBrigadeTypeEnum.java
View file @
517a8d98
...
...
@@ -12,6 +12,7 @@ import lombok.Getter;
@AllArgsConstructor
public
enum
FireBrigadeTypeEnum
{
专职消防队
(
"fullTime"
,
"116"
,
"专职消防队"
),
医疗救援队
(
"monitorTeam"
,
"830"
,
"医疗救援队"
),
监控大队
(
"monitorTeam"
,
"118"
,
"监控大队"
);
private
String
key
;
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/mapper/AlertCalledMapper.java
View file @
517a8d98
...
...
@@ -47,4 +47,7 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
Integer
AlertCalledcount
(
@Param
(
"alertStatus"
)
int
alertStatus
);
//未结束灾情列表
List
<
AlertCalled
>
AlertCalledStatusPage
(
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IAlertCalledService.java
View file @
517a8d98
...
...
@@ -75,4 +75,6 @@ public interface IAlertCalledService {
Integer
AlertCalledcount
(
int
type
);
List
<
AlertCalled
>
AlertCalledStatusPage
(
Integer
current
,
Integer
size
);
}
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 @
517a8d98
...
...
@@ -33,7 +33,7 @@ public interface IPowerTransferService extends IService<PowerTransfer> {
/**
* 获取力量调派资源树
*/
List
<
FireBrigadeResourceDto
>
getPowerTree
();
List
<
FireBrigadeResourceDto
>
getPowerTree
(
String
type
);
List
<
PowerCompanyCountDto
>
getPowerCompanyCountDtocount
(
Long
id
);
/**
...
...
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/resources/mapper/AlertCalledMapper.xml
View file @
517a8d98
...
...
@@ -186,5 +186,19 @@
</select>
<!-- 未结束警情列表 -->
<select
id=
"AlertCalledStatusPage"
resultType=
"com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled"
>
select * from jc_alert_called where is_delete=0 and alert_status = 0 ORDER BY response_level_code desc
,call_time limit #{current},#{size}
</select>
</mapper>
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/common/enums/PlanCheckLevelEnum.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
enum
PlanCheckLevelEnum
{
DRAFT
(
"单位级"
,
0
),
EXAMINE_ONE
(
"公司级"
,
1
);
/**
* 名称
*/
private
String
name
;
/**
* 值
*/
private
int
value
;
private
PlanCheckLevelEnum
(
String
name
,
int
value
)
{
this
.
name
=
name
;
this
.
value
=
value
;
}
public
static
String
getName
(
int
value
)
{
for
(
PlanCheckLevelEnum
c
:
PlanCheckLevelEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
.
name
;
}
}
return
null
;
}
public
static
int
getValue
(
String
name
)
{
for
(
PlanCheckLevelEnum
c
:
PlanCheckLevelEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
.
value
;
}
}
return
-
1
;
}
public
static
PlanCheckLevelEnum
getEnum
(
int
value
)
{
for
(
PlanCheckLevelEnum
c
:
PlanCheckLevelEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
;
}
}
return
null
;
}
public
static
PlanCheckLevelEnum
getEnum
(
String
name
)
{
for
(
PlanCheckLevelEnum
c
:
PlanCheckLevelEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
;
}
}
return
null
;
}
public
static
List
<
Map
<
String
,
String
>>
getEnumList
()
{
List
<
Map
<
String
,
String
>>
nameList
=
new
ArrayList
<>();
for
(
PlanCheckLevelEnum
c:
PlanCheckLevelEnum
.
values
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"value"
,
c
.
getValue
()
+
""
);
nameList
.
add
(
map
);
}
return
nameList
;
}
public
static
List
<
String
>
getEnumNameList
()
{
List
<
String
>
nameList
=
new
ArrayList
<
String
>();
for
(
PlanCheckLevelEnum
c:
PlanCheckLevelEnum
.
values
())
{
nameList
.
add
(
c
.
getName
());
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
int
getValue
()
{
return
value
;
}
public
void
setValue
(
int
value
)
{
this
.
value
=
value
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/common/enums/PlanStatusEnum.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
enum
PlanStatusEnum
{
DRAFT
(
"草稿"
,
0
),
EXAMINE_ONE
(
"一级待审核"
,
1
),
EXAMINE_TWO
(
"二级待审核"
,
2
),
EXAMINE_THREE
(
"三级待审核"
,
3
),
EXAMINE_FORMULATE
(
"已审核/检查内容未制定"
,
4
),
EXAMINE_DEVELOPED
(
"已审核/检查内容已制定"
,
5
);
/**
* 名称
*/
private
String
name
;
/**
* 值
*/
private
int
value
;
private
PlanStatusEnum
(
String
name
,
int
value
)
{
this
.
name
=
name
;
this
.
value
=
value
;
}
public
static
String
getName
(
int
value
)
{
for
(
PlanStatusEnum
c
:
PlanStatusEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
.
name
;
}
}
return
null
;
}
public
static
int
getValue
(
String
name
)
{
for
(
PlanStatusEnum
c
:
PlanStatusEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
.
value
;
}
}
return
-
1
;
}
public
static
PlanStatusEnum
getEnum
(
int
value
)
{
for
(
PlanStatusEnum
c
:
PlanStatusEnum
.
values
())
{
if
(
c
.
getValue
()
==
value
)
{
return
c
;
}
}
return
null
;
}
public
static
PlanStatusEnum
getEnum
(
String
name
)
{
for
(
PlanStatusEnum
c
:
PlanStatusEnum
.
values
())
{
if
(
c
.
getName
().
equals
(
name
))
{
return
c
;
}
}
return
null
;
}
public
static
List
<
Map
<
String
,
String
>>
getEnumList
()
{
List
<
Map
<
String
,
String
>>
nameList
=
new
ArrayList
<>();
for
(
PlanStatusEnum
c:
PlanStatusEnum
.
values
())
{
Map
<
String
,
String
>
map
=
new
HashMap
<
String
,
String
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"value"
,
c
.
getValue
()
+
""
);
nameList
.
add
(
map
);
}
return
nameList
;
}
public
static
List
<
String
>
getEnumNameList
()
{
List
<
String
>
nameList
=
new
ArrayList
<
String
>();
for
(
PlanStatusEnum
c:
PlanStatusEnum
.
values
())
{
nameList
.
add
(
c
.
getName
());
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
int
getValue
()
{
return
value
;
}
public
void
setValue
(
int
value
)
{
this
.
value
=
value
;
}
}
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/dao/entity/InputItem.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Lob
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
org.hibernate.annotations.Where
;
import
javax.persistence.*
;
/**
* 检查项
...
...
@@ -183,42 +179,54 @@ public class InputItem extends BasicEntity {
private
String
testRequirement
;
/**
* 检查类型字典值
*/
@Column
(
name
=
"check_type_Val"
)
private
String
checkTypeId
;
/**
* 检查类型
*/
@Column
(
name
=
"check_type"
)
@Column
(
name
=
"check_type"
)
private
String
checkType
;
/**
* 父类检查项id
*/
@Column
(
name
=
"item_parent"
)
@Column
(
name
=
"item_parent"
)
private
String
itemParent
;
/**
* 检查项分类
*/
@Column
(
name
=
"item_classify"
)
@Column
(
name
=
"item_classify"
)
private
String
itemClassify
;
/**
* 适用检查类别
*/
@Lob
@Column
(
name
=
"item_type_classify"
)
@Column
(
name
=
"item_type_classify"
)
private
String
itemTypeClassify
;
/**
* 检查项等级
*/
@Column
(
name
=
"item_level"
)
@Column
(
name
=
"item_level"
)
private
String
itemLevel
;
/**
* 检查项启用
*/
@Column
(
name
=
"item_start"
)
@Column
(
name
=
"item_start"
)
private
Integer
itemStart
;
/**
* 扩展属性
*/
@Transient
private
String
ext
;
public
Integer
getItemStart
()
{
return
itemStart
;
}
...
...
@@ -498,4 +506,20 @@ public class InputItem extends BasicEntity {
public
void
setBasisJson
(
String
basisJson
)
{
this
.
basisJson
=
basisJson
;
}
public
String
getCheckTypeId
()
{
return
checkTypeId
;
}
public
void
setCheckTypeId
(
String
checkTypeId
)
{
this
.
checkTypeId
=
checkTypeId
;
}
public
String
getExt
()
{
return
ext
;
}
public
void
setExt
(
String
ext
)
{
this
.
ext
=
ext
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/dao/entity/Plan.java
View file @
517a8d98
...
...
@@ -163,6 +163,13 @@ public class Plan extends BasicEntity {
*/
@Column
(
name
=
"plan_type"
)
private
String
planType
;
/**
* 检查级别
*/
@Column
(
name
=
"check_level"
)
private
String
checkLevel
;
/**
* 备注
*/
...
...
@@ -188,8 +195,8 @@ public class Plan extends BasicEntity {
/**
* 状态:0-已停用;1-正常
*/
@Column
(
name
=
"
[status]
"
)
private
byte
status
;
@Column
(
name
=
"
status
"
)
private
Integer
status
;
/**
* 用户编号
*/
...
...
@@ -555,11 +562,11 @@ public class Plan extends BasicEntity {
this
.
scoreFormula
=
scoreFormula
;
}
public
byte
getStatus
()
{
public
Integer
getStatus
()
{
return
this
.
status
;
}
public
void
setStatus
(
byte
status
)
{
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
...
...
@@ -745,4 +752,12 @@ public class Plan extends BasicEntity {
public
void
setMakerUserDeptName
(
String
makerUserDeptName
)
{
this
.
makerUserDeptName
=
makerUserDeptName
;
}
public
String
getCheckLevel
()
{
return
checkLevel
;
}
public
void
setCheckLevel
(
String
checkLevel
)
{
this
.
checkLevel
=
checkLevel
;
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-supervision-api/src/main/java/com/yeejoin/amos/supervision/dao/entity/RoutePointItem.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.NamedQuery
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
javax.persistence.*
;
/**
* The persistent class for the p_route_point_item database table.
*
*/
@Entity
@Table
(
name
=
"p_route_point_item"
)
@NamedQuery
(
name
=
"RoutePointItem.findAll"
,
query
=
"SELECT r FROM RoutePointItem r"
)
@Table
(
name
=
"p_route_point_item"
)
@NamedQuery
(
name
=
"RoutePointItem.findAll"
,
query
=
"SELECT r FROM RoutePointItem r"
)
public
class
RoutePointItem
extends
BasicEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
* 创建者
*/
@Column
(
name
=
"creator_id"
)
@Column
(
name
=
"creator_id"
)
private
String
creatorId
;
/**
* 排序
*/
@Column
(
name
=
"order_no"
)
@Column
(
name
=
"order_no"
)
private
int
orderNo
;
/**
* 巡检点检查项id
*/
@Column
(
name
=
"point_input_item_id"
)
@Column
(
name
=
"point_input_item_id"
)
private
long
pointInputItemId
;
/**
* 路线点表id
*/
@Column
(
name
=
"route_point_id"
)
@Column
(
name
=
"route_point_id"
)
private
long
routePointId
;
/**
* 点分类id
*/
@Column
(
name
=
"point_classify_id"
)
@Column
(
name
=
"point_classify_id"
)
private
Long
pointClassifyId
;
/**
* 前端标记是否绑定
*/
...
...
@@ -66,7 +58,21 @@ public class RoutePointItem extends BasicEntity {
*/
@Column
(
name
=
"basis_json"
,
columnDefinition
=
"text COMMENT '标准依据'"
)
private
String
basisJson
;
/**
* 检查项ID
*/
@Column
(
name
=
"input_item_id"
)
private
Long
inputItemId
;
/**
* 计划ID
*/
@Column
(
name
=
"plan_id"
)
private
Long
planId
;
private
long
pointId
;
public
RoutePointItem
()
{
}
...
...
@@ -107,6 +113,7 @@ public class RoutePointItem extends BasicEntity {
public
RoutePoint
getRoutePoint
()
{
return
routePoint
;
}
@JsonBackReference
public
void
setRoutePoint
(
RoutePoint
routePoint
)
{
this
.
routePoint
=
routePoint
;
...
...
@@ -129,6 +136,7 @@ public class RoutePointItem extends BasicEntity {
public
void
setBasisJson
(
String
basisJson
)
{
this
.
basisJson
=
basisJson
;
}
@Transient
public
long
getPointId
()
{
return
pointId
;
...
...
@@ -146,4 +154,20 @@ public class RoutePointItem extends BasicEntity {
public
void
setIsBound
(
boolean
bound
)
{
isBound
=
bound
;
}
public
Long
getInputItemId
()
{
return
inputItemId
;
}
public
void
setInputItemId
(
Long
inputItemId
)
{
this
.
inputItemId
=
inputItemId
;
}
public
Long
getPlanId
()
{
return
planId
;
}
public
void
setPlanId
(
Long
planId
)
{
this
.
planId
=
planId
;
}
}
\ No newline at end of file
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 @
517a8d98
...
...
@@ -580,15 +580,11 @@ public class CommandController extends BaseController {
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"LinkageUnitDto/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"联动单位分页查询"
,
notes
=
"联动单位分页查询"
)
public
ResponseModel
<
Page
<
LinkageUnitDto
>>
LinkageUnitDtoQueryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
String
unitName
,
String
linkageUnitTypeCode
,
String
linkageUnitType
,
String
inAgreement
)
{
public
ResponseModel
<
Page
<
LinkageUnitDto
>>
LinkageUnitDtoQueryForPage
(
@RequestParam
(
value
=
"pageNum"
)
int
pageNum
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
String
unitName
,
String
linkageUnitTypeCode
,
String
linkageUnitType
,
String
inAgreement
)
{
Page
<
LinkageUnitDto
>
page
=
new
Page
<
LinkageUnitDto
>();
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
pageSize
);
Page
<
LinkageUnitDto
>
linkageUnitDtoPage
=
iLinkageUnitService
.
queryForLinkageUnitPage
(
page
,
false
,
unitName
,
linkageUnitTypeCode
,
linkageUnitType
,
null
,
inAgreement
);
Page
<
LinkageUnitDto
>
linkageUnitDtoPage
=
iLinkageUnitService
.
queryForLinkageUnitPage
(
page
,
false
,
unitName
,
linkageUnitTypeCode
,
linkageUnitType
,
null
,
inAgreement
);
return
ResponseHelper
.
buildResponse
(
linkageUnitDtoPage
);
}
...
...
@@ -627,9 +623,7 @@ public class CommandController extends BaseController {
@GetMapping
(
value
=
"statistics/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"火灾现场统计"
,
notes
=
"火灾现场统计"
)
public
ResponseModel
<
Object
>
getStatistics
(
@PathVariable
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
iAlertCalledService
.
selectAlertCalledcount
(
id
));
}
/**
* * @param null
...
...
@@ -673,7 +667,6 @@ public class CommandController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取灾情当前阶段"
,
notes
=
"获取灾情当前阶段"
)
public
ResponseModel
<
Object
>
getstate
(
@PathVariable
Long
id
)
{
AlertCalled
AlertCalled
=
iAlertCalledService
.
getAlertCalledById
(
id
);
List
<
StateDot
>
list
=
new
ArrayList
<>();
list
.
add
(
new
StateDot
(
"警情接报"
));
list
.
add
(
new
StateDot
(
"力量调派"
));
...
...
@@ -780,15 +773,11 @@ public class CommandController extends BaseController {
public
ResponseModel
<
Object
>
lookHtmlText
(
HttpServletResponse
response
,
@RequestParam
(
value
=
"fileUrl"
)
String
fileUrl
,
@RequestParam
(
value
=
"product"
)
String
product
,
@RequestParam
(
value
=
"appKey"
)
String
appKey
,
@RequestParam
(
value
=
"token"
)
String
token
/* @PathVariable String fileName */
)
throws
Exception
{
String
fileName
=
readUrl
+
fileUrl
;
//目标文件
if
(
fileName
.
endsWith
(
".doc"
)
||
fileName
.
endsWith
(
".docx"
))
{
String
htmlPath
=
System
.
getProperty
(
"user.dir"
)+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"file"
+
File
.
separator
;
String
imagePathStr
=
System
.
getProperty
(
"user.dir"
)+
File
.
separator
+
"lookHtml"
+
File
.
separator
+
"image"
+
File
.
separator
;
String
name
=
fileUrl
.
substring
(
fileUrl
.
lastIndexOf
(
'/'
)+
1
);
String
htmlFileName
=
htmlPath
+
name
.
substring
(
0
,
name
.
indexOf
(
"."
))
+
".html"
;
File
htmlP
=
new
File
(
htmlPath
);
if
(!
htmlP
.
exists
())
{
htmlP
.
mkdirs
();
...
...
@@ -827,24 +816,18 @@ public class CommandController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情查询单个航空器信息"
,
notes
=
"根据灾情查询单个航空器信息"
)
public
ResponseModel
<
AircraftDto
>
seleteaircraftOne
(
@PathVariable
Long
sequenceNbr
)
{
// 警情动态表单数据
List
<
AlertFormValue
>
list
=
alertFormValueService
.
getzqlist
(
sequenceNbr
);
for
(
AlertFormValue
alertFormValue
:
list
)
{
if
(
"aircraftModel"
.
equals
(
alertFormValue
.
getFieldCode
()))
{
String
aircraftModel
=
alertFormValue
.
getFieldValue
();
if
(
aircraftModel
!=
null
&&!
""
.
equals
(
aircraftModel
))
{
AircraftDto
aircraftDto
=
aircraftService
.
queryByAircraftSeq
(
RequestContext
.
getAgencyCode
(),
1411994005943717890L
);
//现场照片 待完成,
return
ResponseHelper
.
buildResponse
(
aircraftDto
);
}
}
}
return
ResponseHelper
.
buildResponse
(
null
);
}
...
...
@@ -852,7 +835,6 @@ public class CommandController extends BaseController {
@GetMapping
(
value
=
"/getOrgUsrzhDto/{id}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据灾情id处置对象单位详情"
,
notes
=
"根据灾情id处置对象单位详情"
)
public
ResponseModel
<
OrgusrDataxDto
>
getOrgUsrzhDto
(
@PathVariable
Long
id
)
{
AlertCalled
AlertCalled
=
iAlertCalledService
.
getAlertCalledById
(
id
);
String
buildId
=
null
;
OrgusrDataxDto
orgusrDataxDto
=
new
OrgusrDataxDto
();
...
...
@@ -949,8 +931,6 @@ public class CommandController extends BaseController {
@RequestMapping
(
value
=
"/getVideo"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页获取视频"
,
notes
=
"分页获取视频"
)
public
ResponseModel
<
Object
>
getVideo
(
long
current
,
long
size
)
throws
Exception
{
Page
page
=
new
Page
(
current
,
size
);
List
<
OrderItem
>
list
=
OrderItem
.
ascs
(
"id"
);
page
.
setOrders
(
list
);
...
...
@@ -1011,7 +991,6 @@ public class CommandController extends BaseController {
OrgusrDataxDto
orgusrDataxDto
=
new
OrgusrDataxDto
();
if
(
AlertCalled
.
getUnitInvolved
()!=
null
&&!
""
.
equals
(
AlertCalled
.
getUnitInvolved
()))
{
List
<
OrgUsrzhDto
>
orgUsrzhDto
=
iOrgUsrService
.
getOrgUsrzhDto
(
AlertCalled
.
getUnitInvolved
());
if
(
orgUsrzhDto
!=
null
&&
orgUsrzhDto
.
size
()>
0
&&
orgUsrzhDto
.
get
(
0
)!=
null
){
buildId
=
orgUsrzhDto
.
get
(
0
).
getBuildId
()==
null
?
null
:
Long
.
valueOf
(
orgUsrzhDto
.
get
(
0
).
getBuildId
());
}
...
...
@@ -1046,10 +1025,7 @@ public class CommandController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"app-根据警情id查询力量调派列表"
,
notes
=
"app-根据警情id查询力量调派列表"
)
@GetMapping
(
value
=
"/app/transferList"
)
public
ResponseModel
getPowerTransferList
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
public
ResponseModel
getPowerTransferList
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
,
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
page
=
new
Page
();
page
.
setSize
(
size
);
page
.
setCurrent
(
current
);
...
...
@@ -1059,8 +1035,7 @@ public class CommandController extends BaseController {
@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
)
{
public
ResponseModel
getPowerTransferStatistics
(
@RequestParam
String
alertId
,
@RequestParam
(
defaultValue
=
"team"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTransferStatistics
(
Long
.
valueOf
(
alertId
),
type
));
}
...
...
@@ -1076,7 +1051,6 @@ public class CommandController extends BaseController {
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"更新车辆状态异常"
,
""
,
e
.
getMessage
());
}
return
ResponseHelper
.
buildResponse
(
true
);
}
...
...
@@ -1149,20 +1123,29 @@ public class CommandController extends BaseController {
@GetMapping
(
value
=
"/DynamicFlightInfo/{dynamicFlightId}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"航班信息"
,
notes
=
"航班信息"
)
public
ResponseModel
<
Object
>
DynamicFlightInfo
(
@PathVariable
String
dynamicFlightId
)
{
ResponseModel
<
Object
>
dataModel
=
iotFeignClient
.
DynamicFlightInfo
(
dynamicFlightId
);
if
(
dataModel
!=
null
)
{
return
ResponseHelper
.
buildResponse
(
dataModel
.
getResult
());
}
return
ResponseHelper
.
buildResponse
(
null
);
}
@TycloudOperation
(
needAuth
=
true
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"AlertCalledStatusPage"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"未结束的灾情列表"
,
notes
=
"未结束的灾情列表"
)
public
ResponseModel
<
Page
<
AlertCalled
>>
AlertCalledStatusPage
(
@RequestParam
(
value
=
"current"
)
Integer
current
,
@RequestParam
(
value
=
"size"
)
Integer
size
)
{
if
(
null
==
current
||
null
==
size
)
{
current
=
1
;
size
=
Integer
.
MAX_VALUE
;
}
List
<
AlertCalled
>
list
=
iAlertCalledService
.
AlertCalledStatusPage
(
current
,
size
);
int
num
=
iAlertCalledService
.
AlertCalledcount
(
0
);
Page
<
AlertCalled
>
pageBean
=
new
Page
<>(
current
,
size
,
num
);
pageBean
.
setRecords
(
list
);
return
ResponseHelper
.
buildResponse
(
pageBean
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyCarController.java
View file @
517a8d98
...
...
@@ -134,7 +134,7 @@ public class DutyCarController extends BaseController {
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
"/{instanceId}"
)
@DeleteMapping
(
"/{instanceId}
/{startTime}/{endTime}
"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"值班数据删除"
,
notes
=
"值班数据删除"
)
public
ResponseModel
deleteDutyData
(
@PathVariable
Long
instanceId
,
@PathVariable
String
startTime
,
@PathVariable
String
endTime
)
{
if
(
ValidationUtil
.
isEmpty
(
instanceId
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/DutyPersonController.java
View file @
517a8d98
...
...
@@ -166,4 +166,18 @@ public class DutyPersonController extends BaseController {
}
/**
*
* 新接口 根据值班区域id 查询值班人 by kongfm 2021-09-15
* @return ResponseModel
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/findByDutyAreaId/{dutyAreaId}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据值班区域ID查询当前值班人"
,
notes
=
"根据值班区域ID查询当前值班人"
)
public
ResponseModel
<
List
<
DutyPersonDto
>>
findByDutyAreaId
(
@PathVariable
Long
dutyAreaId
)
throws
ParseException
{
return
ResponseHelper
.
buildResponse
(
iDutyPersonService
.
findByDutyAreaId
(
dutyAreaId
));
}
}
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 @
517a8d98
...
...
@@ -20,7 +20,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.LinkageUnit
;
import
com.yeejoin.amos.boot.module.common.api.service.ILinkageUnitService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.LinkageUnitServiceImpl
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgPersonController.java
View file @
517a8d98
...
...
@@ -7,8 +7,12 @@ import com.yeejoin.amos.boot.module.common.api.dto.*;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -165,12 +169,22 @@ public class OrgPersonController {
@RequestMapping
(
value
=
"/{orgCode}/users"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据orgCode查询"
,
notes
=
"根据orgCode查询"
)
public
ResponseModel
<
Collection
<
OrgUsr
>>
selectUsersByOrgCode
(
HttpServletRequest
request
,
String
pageNum
,
String
pageSize
,
@PathVariable
Lo
ng
orgCode
)
{
String
pageSize
,
@PathVariable
Stri
ng
orgCode
)
{
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
columnMap
.
put
(
"is_delete"
,
CommonConstant
.
IS_DELETE_00
);
columnMap
.
put
(
"biz_org_code"
,
orgCode
);
columnMap
.
put
(
"biz_org_type"
,
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
listByMap
(
columnMap
));
Collection
<
OrgUsr
>
temp
=
iOrgUsrService
.
listByMap
(
columnMap
);
temp
.
stream
().
forEach
(
t
->
{
// BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
if
(
StringUtils
.
isNotEmpty
(
t
.
getAmosOrgId
()))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
t
.
getAmosOrgId
());
if
(
null
!=
result1
.
getResult
())
{
t
.
setAmosOrgCode
(
result1
.
getResult
().
getRealName
());
}
}
});
return
ResponseHelper
.
buildResponse
(
temp
);
}
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
517a8d98
...
...
@@ -342,7 +342,7 @@ public class OrgUsrController extends BaseController {
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/companyTreeByUser"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登陆人获取单位部门树"
,
notes
=
"根据登陆人获取单位部门树"
)
public
ResponseModel
<
List
<
OrgMenuDto
>>
selectCompanyTreeByUser
()
throws
Exception
{
...
...
@@ -358,7 +358,7 @@ public class OrgUsrController extends BaseController {
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/companyUserTreeByUser"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登陆人获取单位部门用户树"
,
notes
=
"根据登陆人获取单位部门用户树"
)
public
ResponseModel
<
List
<
OrgMenuDto
>>
companyUserTreeByUser
()
{
...
...
@@ -374,7 +374,7 @@ public class OrgUsrController extends BaseController {
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/companyListByUser"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登陆人获取单位列表"
,
notes
=
"根据登陆人获取单位列表"
)
public
ResponseModel
<
List
<
CheckObjectDto
>>
companyListByUser
()
{
...
...
@@ -404,7 +404,7 @@ public class OrgUsrController extends BaseController {
* @param
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/getLoginUserDetails"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取登陆人绑定的人员关系"
,
notes
=
"获取登陆人绑定的人员关系"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getLoginUserDetails
(
@RequestParam
(
value
=
"userId"
,
required
=
false
)
String
userId
)
{
...
...
@@ -413,7 +413,7 @@ public class OrgUsrController extends BaseController {
if
(
StringUtils
.
isEmpty
(
userIds
))
{
userIds
=
user
.
getUserId
();
}
List
<
Map
<
String
,
Object
>>
loginUserDetails
=
iOrgUsrService
.
getLoginUserDetails
(
userIds
);
List
<
Map
<
String
,
Object
>>
loginUserDetails
=
iOrgUsrService
.
getLoginUserDetails
(
userIds
,
user
);
return
ResponseHelper
.
buildResponse
(
loginUserDetails
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyCarServiceImpl.java
View file @
517a8d98
...
...
@@ -12,14 +12,18 @@ import com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient;
import
com.yeejoin.amos.boot.module.common.api.mapper.FirefightersMapper
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyCarService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -42,6 +46,9 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
String
driverPostTypeCode
=
"5"
;
@Autowired
EquipFeignClient
equipFeign
;
@Override
public
String
getGroupCode
()
{
return
"dutyCar"
;
...
...
@@ -49,14 +56,83 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
@Override
public
DutyCarDto
save
(
DutyCarDto
dutyCarDto
)
{
// BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。 同步修改 查询 导出相关逻辑 by kongfm 2021-09-14
//1.保存行数据
String
groupCode
=
this
.
getGroupCode
();
String
userId
=
dutyCarDto
.
getUserId
();
List
<
DynamicFormInstance
>
instances
=
dynamicFormInstanceService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormInstance
>().
eq
(
DynamicFormInstance:
:
getFieldCode
,
"userId"
)
.
eq
(
DynamicFormInstance:
:
getFieldValue
,
userId
)
.
eq
(
DynamicFormInstance:
:
getGroupCode
,
this
.
getGroupCode
()));
Long
instanceId
=
null
;
if
(
StringUtils
.
isNotEmpty
(
dutyCarDto
.
getDutyAreaId
()))
{
// 根据建筑id 查找建筑
ResponseModel
<
Map
<
String
,
Object
>>
response
=
null
;
try
{
response
=
equipFeign
.
getFormInstanceById
(
Long
.
parseLong
(
dutyCarDto
.
getDutyAreaId
()));
}
catch
(
NumberFormatException
e
)
{
throw
new
BadRequest
(
"值班区域id异常!"
);
}
Map
<
String
,
Object
>
result
=
response
.
getResult
();
dutyCarDto
.
setDutyArea
(
result
.
get
(
"name"
).
toString
());
}
Map
<
String
,
Object
>
map
=
Bean
.
BeantoMap
(
dutyCarDto
);
Long
instanceId
=
dynamicFormInstanceService
.
commonSave
(
groupCode
,
map
);
if
(!
instances
.
isEmpty
())
{
// 0.定位instanceId,准备进行更新操作
instanceId
=
instances
.
get
(
0
).
getInstanceId
();
// 已经有了走更新方法
//1.查询已有数据
List
<
DynamicFormInstance
>
hasInstances
=
dynamicFormInstanceService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormInstance
>().
eq
(
DynamicFormInstance:
:
getInstanceId
,
instanceId
));
//2.list 转 map
Map
<
Object
,
DynamicFormInstance
>
instanceMap
=
Bean
.
listToMap
(
hasInstances
,
"fieldCode"
,
DynamicFormInstance
.
class
);
//3.查询列数据,已列为主
List
<
DynamicFormColumn
>
columns
=
dynamicFormColumnService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormColumn
>().
eq
(
DynamicFormColumn:
:
getGroupCode
,
groupCode
));
//4.已列为主 填充动态表单数据
List
<
DynamicFormInstance
>
entrys
=
new
ArrayList
<>();
for
(
DynamicFormColumn
column
:
columns
)
{
DynamicFormInstance
formInstance
=
instanceMap
.
get
(
column
.
getFieldCode
());
if
(!
ObjectUtils
.
isEmpty
(
formInstance
))
{
//有的更新
formInstance
.
setFieldValue
(
map
.
get
(
column
.
getFieldCode
())
!=
null
?
map
.
get
(
column
.
getFieldCode
()).
toString
()
:
""
);
}
else
{
//没有的新增
formInstance
=
new
DynamicFormInstance
();
buildFormInstanceData
(
instanceId
,
map
,
column
,
formInstance
);
}
entrys
.
add
(
formInstance
);
}
if
(!
entrys
.
isEmpty
()){
dynamicFormInstanceService
.
saveOrUpdateBatch
(
entrys
);
}
}
else
{
instanceId
=
dynamicFormInstanceService
.
commonSave
(
groupCode
,
map
);
}
if
(
dutyCarDto
.
getDutyShift
()
!=
null
&&
dutyCarDto
.
getDutyShift
().
size
()
==
0
)
{
Calendar
startDate
=
Calendar
.
getInstance
();
startDate
.
setTime
(
DateUtils
.
longStr2Date
(
dutyCarDto
.
getStartTime
()));
int
dates
=
startDate
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
);
startDate
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
List
<
DutyPersonShift
>
dutyShift
=
new
ArrayList
<>(
dates
);
for
(
int
i
=
0
;
i
<
dates
;
i
++)
{
DutyPersonShift
temp
=
new
DutyPersonShift
();
temp
.
setAppKey
(
RequestContext
.
getAppKey
());
temp
.
setDutyDate
(
startDate
.
getTime
());
temp
.
setIsDelete
(
false
);
temp
.
setInstanceId
(
instanceId
);
dutyShift
.
add
(
temp
);
startDate
.
add
(
Calendar
.
DAY_OF_YEAR
,
1
);
}
dutyPersonShiftService
.
saveOrUpdateBatch
(
dutyShift
);
}
//2.保存值班信息
insertPersonShift
(
instanceId
,
dutyCarDto
);
//3.返回保存后的数据
return
dutyCarDto
;
}
@Override
...
...
@@ -83,7 +159,12 @@ public class DutyCarServiceImpl extends DutyCommonServiceImpl implements IDutyCa
private
void
insertPersonShift
(
Long
instanceId
,
DutyCarDto
dutyCarDto
)
{
Set
<
DutyPersonShift
>
personShiftList
=
dutyCarDto
.
getDutyShift
().
stream
().
map
(
dto
->
{
DutyPersonShift
dutyPersonShift
=
new
DutyPersonShift
();
// BUG 2807 修改时发现BUG 车辆保存有问题 by kongfm 2021-09-14
// 根据instanceId 和 日期查找 如果有则更新
DutyPersonShift
dutyPersonShift
=
dutyPersonShiftService
.
getOne
(
new
LambdaQueryWrapper
<
DutyPersonShift
>().
eq
(
DutyPersonShift:
:
getInstanceId
,
instanceId
).
eq
(
DutyPersonShift:
:
getDutyDate
,
dto
.
getDutyDate
()));
if
(
dutyPersonShift
==
null
)
{
dutyPersonShift
=
new
DutyPersonShift
();
}
dto
.
setInstanceId
(
instanceId
);
Bean
.
copyExistPropertis
(
dto
,
dutyPersonShift
);
dutyPersonShift
.
setAppKey
(
RequestContext
.
getAppKey
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyCommonServiceImpl.java
View file @
517a8d98
...
...
@@ -30,6 +30,7 @@ import org.typroject.tyboot.core.foundation.utils.Bean;
import
javax.servlet.http.HttpServletRequest
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -77,10 +78,13 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
throws
ParseException
{
// 1.已column为准 进行返回
String
groupCode
=
this
.
getGroupCode
();
IPage
<
Map
<
String
,
Object
>>
iPage
=
dynamicFormInstanceService
.
pageList
(
current
,
size
,
groupCode
);
// 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14
IPage
<
Map
<
String
,
Object
>>
iPage
=
dynamicFormInstanceService
.
pageListNew
(
current
,
size
,
groupCode
,
beginDate
,
endDate
);
for
(
Map
<
String
,
Object
>
m
:
iPage
.
getRecords
())
{
this
.
fillDutyShiftData
(
beginDate
,
endDate
,
m
);
}
// 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14
return
iPage
;
}
...
...
@@ -96,9 +100,14 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
// 根据时间 查询值班关系表
// BUG 2806 获取月份第一天和最后一天 2021-09-09 by kongfm
SimpleDateFormat
shortformat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
if
(
beginDate
!=
null
)
{
Calendar
c
=
Calendar
.
getInstance
();
if
(
DateUtils
.
longStr2Date
(
beginDate
)
!=
null
)
{
c
.
setTime
(
DateUtils
.
longStr2Date
(
beginDate
));
}
else
{
c
.
setTime
(
shortformat
.
parse
(
beginDate
));
}
c
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
c
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
c
.
set
(
Calendar
.
MINUTE
,
0
);
...
...
@@ -107,7 +116,11 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
}
if
(
endDate
!=
null
)
{
Calendar
c
=
Calendar
.
getInstance
();
c
.
setTime
(
DateUtils
.
longStr2Date
(
beginDate
));
if
(
DateUtils
.
longStr2Date
(
endDate
)
!=
null
)
{
c
.
setTime
(
DateUtils
.
longStr2Date
(
endDate
));
}
else
{
c
.
setTime
(
shortformat
.
parse
(
endDate
));
}
c
.
add
(
Calendar
.
MONTH
,
1
);
c
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
c
.
add
(
Calendar
.
DATE
,
-
1
);
...
...
@@ -126,7 +139,7 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
Bean
.
copyExistPropertis
(
e
,
dto
);
// 没值班信息,默认休
DutyShift
dutyShift
=
keyNameMap
.
get
(
e
.
getShiftId
());
dto
.
setShiftName
(
dutyShift
!=
null
?
dutyShift
.
getName
()
:
"休"
);
dto
.
setShiftName
(
dutyShift
!=
null
?
dutyShift
.
getName
()
:
"休
班
"
);
dto
.
setColor
(
dutyShift
!=
null
?
dutyShift
.
getColor
()
:
""
);
return
dto
;
}).
collect
(
Collectors
.
toList
());
...
...
@@ -186,6 +199,11 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
for
(
Map
<
String
,
Object
>
map
:
list
)
{
this
.
fillDutyShiftData
(
beginDate
,
endDate
,
map
);
}
// BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。 同步修改 查询 导出相关逻辑 by kongfm 2021-09-14
list
=
list
.
stream
().
filter
(
m
->
m
.
get
(
"dutyShift"
)
!=
null
&&
((
List
<
DutyPersonShiftDto
>)
m
.
get
(
"dutyShift"
)).
size
()
>
0
).
collect
(
Collectors
.
toList
());
/*bug2472 添加根据部门id筛选数据的方法 陈浩 2021-08-21 开始 */
if
(
teamId
!=
null
&&
teamId
.
intValue
()!=
0
)
{
List
<
OrgUsr
>
orgUsrList
=
orgUsrService
.
getPersonListByParentId
(
teamId
);
...
...
@@ -211,6 +229,11 @@ public class DutyCommonServiceImpl implements IDutyCommonService {
@Override
public
List
downloadList
(
String
beginDate
,
String
endDate
)
throws
ParseException
{
List
<
Map
<
String
,
Object
>>
maps
=
this
.
list
(
null
,
beginDate
,
endDate
);
// BUG 2807 如果不存在值班数据则不显示
maps
=
maps
.
stream
().
filter
(
m
->
m
.
get
(
"dutyShift"
)
!=
null
&&
((
List
<
DutyPersonShiftDto
>)
m
.
get
(
"dutyShift"
)).
size
()
>
0
).
collect
(
Collectors
.
toList
());
JSONArray
jsonArray
=
new
JSONArray
();
jsonArray
.
addAll
(
maps
);
List
<?>
list
=
new
ArrayList
<>();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DutyPersonServiceImpl.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyPersonShift
;
import
com.yeejoin.amos.boot.module.common.api.entity.DutyShift
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyPersonService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
...
...
@@ -24,6 +34,9 @@ import java.util.stream.Collectors;
@Service
public
class
DutyPersonServiceImpl
extends
DutyCommonServiceImpl
implements
IDutyPersonService
{
@Autowired
EquipFeignClient
equipFeign
;
@Override
public
String
getGroupCode
(){
return
"dutyPerson"
;
...
...
@@ -31,14 +44,86 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
@Override
public
DutyPersonDto
save
(
DutyPersonDto
dutyPersonDto
)
{
// BUG 2807 更新人员车辆排版值班的保存逻辑 如果没有填写数据则保存空数据 。 同步修改 查询 导出相关逻辑 by kongfm 2021-09-14
//1.保存行数据
String
groupCode
=
this
.
getGroupCode
();
String
userId
=
dutyPersonDto
.
getUserId
();
List
<
DynamicFormInstance
>
instances
=
dynamicFormInstanceService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormInstance
>().
eq
(
DynamicFormInstance:
:
getFieldCode
,
"userId"
)
.
eq
(
DynamicFormInstance:
:
getFieldValue
,
userId
)
.
eq
(
DynamicFormInstance:
:
getGroupCode
,
this
.
getGroupCode
()));
Long
instanceId
=
null
;
// 如果人员有区域id 则创建区域字段
if
(
StringUtils
.
isNotEmpty
(
dutyPersonDto
.
getDutyAreaId
()))
{
// 根据建筑id 查找建筑
ResponseModel
<
Map
<
String
,
Object
>>
response
=
null
;
try
{
response
=
equipFeign
.
getFormInstanceById
(
Long
.
parseLong
(
dutyPersonDto
.
getDutyAreaId
()));
}
catch
(
NumberFormatException
e
)
{
throw
new
BadRequest
(
"值班区域id异常!"
);
}
Map
<
String
,
Object
>
result
=
response
.
getResult
();
dutyPersonDto
.
setDutyArea
(
result
.
get
(
"name"
).
toString
());
}
Map
<
String
,
Object
>
map
=
Bean
.
BeantoMap
(
dutyPersonDto
);
Long
instanceId
=
dynamicFormInstanceService
.
commonSave
(
groupCode
,
map
);
if
(!
instances
.
isEmpty
())
{
// 0.定位instanceId,准备进行更新操作
instanceId
=
instances
.
get
(
0
).
getInstanceId
();
// 已经有了走更新方法
//1.查询已有数据
List
<
DynamicFormInstance
>
hasInstances
=
dynamicFormInstanceService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormInstance
>().
eq
(
DynamicFormInstance:
:
getInstanceId
,
instanceId
));
//2.list 转 map
Map
<
Object
,
DynamicFormInstance
>
instanceMap
=
Bean
.
listToMap
(
hasInstances
,
"fieldCode"
,
DynamicFormInstance
.
class
);
//3.查询列数据,已列为主
List
<
DynamicFormColumn
>
columns
=
dynamicFormColumnService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormColumn
>().
eq
(
DynamicFormColumn:
:
getGroupCode
,
groupCode
));
//4.已列为主 填充动态表单数据
List
<
DynamicFormInstance
>
entrys
=
new
ArrayList
<>();
for
(
DynamicFormColumn
column
:
columns
)
{
DynamicFormInstance
formInstance
=
instanceMap
.
get
(
column
.
getFieldCode
());
if
(!
ObjectUtils
.
isEmpty
(
formInstance
))
{
//有的更新
formInstance
.
setFieldValue
(
map
.
get
(
column
.
getFieldCode
())
!=
null
?
map
.
get
(
column
.
getFieldCode
()).
toString
()
:
""
);
}
else
{
//没有的新增
formInstance
=
new
DynamicFormInstance
();
buildFormInstanceData
(
instanceId
,
map
,
column
,
formInstance
);
}
entrys
.
add
(
formInstance
);
}
if
(!
entrys
.
isEmpty
()){
dynamicFormInstanceService
.
saveOrUpdateBatch
(
entrys
);
}
}
else
{
instanceId
=
dynamicFormInstanceService
.
commonSave
(
groupCode
,
map
);
}
// 如果当前保存没有保存调班记录 需要默认保存一个月的空数据
if
(
dutyPersonDto
.
getDutyShift
()
!=
null
&&
dutyPersonDto
.
getDutyShift
().
size
()
==
0
)
{
Calendar
startDate
=
Calendar
.
getInstance
();
startDate
.
setTime
(
DateUtils
.
longStr2Date
(
dutyPersonDto
.
getStartTime
()));
int
dates
=
startDate
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
);
startDate
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
List
<
DutyPersonShift
>
dutyShift
=
new
ArrayList
<>(
dates
);
for
(
int
i
=
0
;
i
<
dates
;
i
++)
{
DutyPersonShift
temp
=
new
DutyPersonShift
();
temp
.
setAppKey
(
RequestContext
.
getAppKey
());
temp
.
setDutyDate
(
startDate
.
getTime
());
temp
.
setIsDelete
(
false
);
temp
.
setInstanceId
(
instanceId
);
dutyShift
.
add
(
temp
);
startDate
.
add
(
Calendar
.
DAY_OF_YEAR
,
1
);
}
dutyPersonShiftService
.
saveOrUpdateBatch
(
dutyShift
);
}
//2.保存值班信息
insertPersonShift
(
instanceId
,
dutyPersonDto
);
//3.返回保存后的数据
return
dutyPersonDto
;
}
@Override
...
...
@@ -90,4 +175,63 @@ public class DutyPersonServiceImpl extends DutyCommonServiceImpl implements IDut
private
void
buildFormInstanceData
(
Long
instanceId
,
Map
<
String
,
Object
>
map
,
DynamicFormColumn
column
,
DynamicFormInstance
formInstance
)
{
fillFormInstanceData
(
instanceId
,
map
,
column
,
formInstance
,
sequence
.
nextId
());
}
@Override
public
List
<
DutyPersonDto
>
findByDutyAreaId
(
Long
dutyAreaId
)
{
Date
now
=
new
Date
();
Calendar
c
=
Calendar
.
getInstance
();
c
.
setTime
(
now
);
c
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
c
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
c
.
set
(
Calendar
.
MINUTE
,
0
);
c
.
set
(
Calendar
.
SECOND
,
0
);
String
beginDate
=
DateUtils
.
date2LongStr
(
c
.
getTime
());
c
.
setTime
(
now
);
c
.
add
(
Calendar
.
MONTH
,
1
);
c
.
set
(
Calendar
.
DAY_OF_MONTH
,
1
);
c
.
add
(
Calendar
.
DATE
,
-
1
);
c
.
set
(
Calendar
.
HOUR_OF_DAY
,
23
);
c
.
set
(
Calendar
.
MINUTE
,
59
);
c
.
set
(
Calendar
.
SECOND
,
59
);
String
endDate
=
DateUtils
.
date2LongStr
(
c
.
getTime
());
List
<
DutyPersonDto
>
temp
=
new
ArrayList
<>();
dutyPersonShiftService
.
list
(
new
LambdaQueryWrapper
<
DutyPersonShift
>()
.
ge
(
beginDate
!=
null
,
DutyPersonShift:
:
getDutyDate
,
beginDate
)
.
le
(
endDate
!=
null
,
DutyPersonShift:
:
getDutyDate
,
endDate
).
groupBy
(
DutyPersonShift:
:
getInstanceId
))
.
stream
().
forEach
(
e
->
{
//1.查询已有数据
List
<
DynamicFormInstance
>
instances
=
dynamicFormInstanceService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormInstance
>().
eq
(
DynamicFormInstance:
:
getInstanceId
,
e
.
getInstanceId
()).
eq
(
DynamicFormInstance:
:
getGroupCode
,
this
.
getGroupCode
()));
if
(
instances
.
size
()
>
0
)
{
DutyPersonDto
dto
=
new
DutyPersonDto
();
boolean
add
=
false
;
for
(
DynamicFormInstance
t
:
instances
)
{
if
(
"userId"
.
equals
(
t
.
getFieldCode
()))
{
dto
.
setUserId
(
t
.
getFieldValue
());
}
else
if
(
"userName"
.
equals
(
t
.
getFieldCode
()))
{
dto
.
setUserName
(
t
.
getFieldValue
());
}
else
if
(
"deptId"
.
equals
(
t
.
getFieldCode
()))
{
dto
.
setDeptId
(
t
.
getFieldValue
());
}
else
if
(
"deptName"
.
equals
(
t
.
getFieldCode
()))
{
dto
.
setDeptName
(
t
.
getFieldValue
());
}
else
if
(
"postType"
.
equals
(
t
.
getFieldCode
()))
{
dto
.
setPostType
(
t
.
getFieldValue
());
}
else
if
(
"postTypeName"
.
equals
(
t
.
getFieldCode
()))
{
dto
.
setPostTypeName
(
t
.
getFieldValue
());
}
else
if
(
"dutyArea"
.
equals
(
t
.
getFieldCode
()))
{
dto
.
setDutyArea
(
t
.
getFieldValue
());
}
else
if
(
"dutyAreaId"
.
equals
(
t
.
getFieldCode
()))
{
if
(
dutyAreaId
.
toString
().
equals
(
t
.
getFieldValue
()))
{
add
=
true
;
}
dto
.
setDutyAreaId
(
t
.
getFieldValue
());
}
}
if
(
add
)
{
temp
.
add
(
dto
);
}
}
});
return
temp
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DynamicFormColumnServiceImpl.java
View file @
517a8d98
...
...
@@ -72,7 +72,7 @@ public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnD
List
<
DynamicFormInitDto
>
listForm
=
new
ArrayList
<
DynamicFormInitDto
>();
String
appKey
=
RequestContext
.
getAppKey
();
// 组装数据
dynamicFormColumn
.
parallelS
tream
().
forEach
(
dynamicForm
->
{
dynamicFormColumn
.
s
tream
().
forEach
(
dynamicForm
->
{
if
(
dynamicForm
.
getFieldType
().
equals
(
"input"
)
||
dynamicForm
.
getFieldType
().
equals
(
"string"
)
||
dynamicForm
.
getFieldType
().
equals
(
"datetime"
)
||
...
...
@@ -193,7 +193,7 @@ public class DynamicFormColumnServiceImpl extends BaseService<DynamicFormColumnD
}
});
return
listForm
.
stream
().
sorted
(
Comparator
.
comparing
(
DynamicFormInitDto:
:
getSort
)).
collect
(
Collectors
.
toList
());
return
listForm
.
stream
().
sorted
(
Comparator
.
nullsFirst
(
Comparator
.
comparing
(
DynamicFormInitDto:
:
getSort
)
)).
collect
(
Collectors
.
toList
());
}
public
List
<
SelectItem
>
getdata
(
Collection
<
DataDictionary
>
list
)
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DynamicFormInstanceServiceImpl.java
View file @
517a8d98
...
...
@@ -132,6 +132,14 @@ public class DynamicFormInstanceServiceImpl extends BaseService<DynamicFormInsta
Page
page
=
new
Page
(
current
,
size
);
return
this
.
getBaseMapper
().
pageList
(
page
,
RequestContext
.
getAppKey
(),
fieldCodes
,
groupCode
,
params
);
}
// 不存在值班数据则不查找 修改sql 方法去除 by kongfm 2021-09-14
public
IPage
<
Map
<
String
,
Object
>>
pageListNew
(
int
current
,
int
size
,
String
groupCode
,
String
beginDate
,
String
endDate
)
{
Map
<
String
,
String
>
params
=
this
.
getRequestParamMap
();
List
<
DynamicFormColumn
>
columns
=
dynamicFormColumnService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormColumn
>().
eq
(
DynamicFormColumn:
:
getGroupCode
,
groupCode
));
Map
<
String
,
Object
>
fieldCodes
=
Bean
.
listToMap
(
columns
,
"fieldCode"
,
"queryStrategy"
,
DynamicFormColumn
.
class
);
Page
page
=
new
Page
(
current
,
size
);
return
this
.
getBaseMapper
().
pageListNew
(
page
,
RequestContext
.
getAppKey
(),
fieldCodes
,
groupCode
,
params
,
beginDate
,
endDate
);
}
public
IPage
<
Map
<
String
,
Object
>>
pageList
(
int
current
,
int
size
,
String
groupCode
,
Map
<
String
,
String
>
params
)
{
List
<
DynamicFormColumn
>
columns
=
dynamicFormColumnService
.
list
(
new
LambdaQueryWrapper
<
DynamicFormColumn
>().
eq
(
DynamicFormColumn:
:
getGroupCode
,
groupCode
));
...
...
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 @
517a8d98
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.KeySiteDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto
;
...
...
@@ -264,11 +265,23 @@ public class KeySiteServiceImpl extends BaseService<KeySiteDto, KeySite, KeySite
}
else
{
keySiteDto
.
setFirePreventionFlag
(
false
);
}
keySiteDto
=
Bean
.
toPo
(
getCurrentInfo
(),
keySiteDto
);
excelList
.
add
(
keySiteDto
);
}
return
this
.
saveBatch
(
excelList
);
}
public
BaseEntity
getCurrentInfo
()
{
BaseEntity
userModel
=
new
BaseEntity
();
/* String keyString= RequestContext.getExeUserId();
String token=RequestContext.getToken();
ReginParams params = JSONObject.parseObject(redisUtils
.get(RedisKey.buildReginKey(keyString, token)).toString(),
ReginParams.class);*/
userModel
.
setRecUserId
(
"3141675"
);
userModel
.
setRecUserName
(
"admin_jcs"
);
userModel
.
setRecDate
(
new
Date
());
return
userModel
;
}
@Override
public
List
<
OrgMenuDto
>
getBuildAndKeyTree
(
Long
sequenceNbr
)
{
LambdaQueryWrapper
<
KeySite
>
mapper
=
new
LambdaQueryWrapper
<
KeySite
>();
...
...
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 @
517a8d98
...
...
@@ -210,6 +210,7 @@ public class MaintenanceCompanyServiceImpl
// 新增删除维保单位逻辑,BUG 2500 单位下有子单位或者人员时应无法直接删除. by litw satrt
LambdaQueryWrapper
<
MaintenanceCompany
>
wrapperCompany
=
new
LambdaQueryWrapper
<
MaintenanceCompany
>();
wrapperCompany
.
eq
(
MaintenanceCompany:
:
getParentId
,
sequenceNbr
);
wrapperCompany
.
eq
(
MaintenanceCompany:
:
getIsDelete
,
false
);
int
count
=
maintenanceCompanyMapper
.
selectCount
(
wrapperCompany
);
if
(
count
>
0
)
{
throw
new
BadRequest
(
"单位下有子单位或者人员,无法删除"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
common
.
biz
.
service
.
impl
;
import
java.io.Serializable
;
import
java.lang.reflect.Method
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -14,8 +15,10 @@ import java.util.stream.Collectors;
import
javax.annotation.Resource
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.DataValidationConstraint
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -377,7 +380,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
map
.
put
(
"pageNum"
,
(
pageBean
.
getCurrent
()
-
1
)
*
pageBean
.
getSize
());
map
.
put
(
"pageSize"
,
pageBean
.
getSize
());
List
<
Map
<
String
,
Object
>>
list
=
this
.
baseMapper
.
selectPersonList
(
map
);
list
.
stream
().
forEach
(
t
->
{
// BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
if
(
null
!=
t
.
get
(
"amosOrgId"
)
&&
StringUtils
.
isNotEmpty
(
t
.
get
(
"amosOrgId"
).
toString
()))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
t
.
get
(
"amosOrgId"
).
toString
());
if
(
null
!=
result1
.
getResult
())
{
t
.
put
(
"amosOrgCode"
,
result1
.
getResult
().
getRealName
());
}
}
});
/*Bug2652 根据名字和工号模糊查询失效 已添加模糊匹配 2021-09-01 陈召 结束*/
pageBean
.
setRecords
(
list
);
return
pageBean
;
...
...
@@ -539,6 +551,15 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// 动态表单数据
List
<
DynamicFormInstanceDto
>
list
=
alertFormValueServiceImpl
.
listByCalledId
(
id
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
// 机场人员AMOS角色丢失修正, by litw start 2021年9月10日
if
(
StringUtils
.
isNotEmpty
(
orgUsr
.
getAmosOrgId
()))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
orgUsr
.
getAmosOrgId
());
if
(
null
!=
result1
.
getResult
())
{
orgUsr
.
setAmosOrgCode
(
result1
.
getResult
().
getRealName
());
}
}
// 机场人员AMOS角色丢失修正, by litw end 2021年9月10日
result
=
Bean
.
BeantoMap
(
orgUsr
);
/*bug 2869 部门为空人员详情报空指针 2021-09-15 陈召 开始*/
if
(
orgUsr
.
getParentId
()!=
null
){
...
...
@@ -613,11 +634,6 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
orgUsr
.
setBizOrgCode
(
getOrgCodeStr
());
}
if
(!
ObjectUtils
.
isEmpty
(
OrgPersonVo
.
getAmosOrgId
()))
{
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
queryByUserId
(
OrgPersonVo
.
getAmosOrgId
()).
getResult
();
OrgPersonVo
.
setAmosOrgCode
(
user
.
getRealName
());
}
saveOrgUsrDynamicFormInstance
(
orgUsr
,
OrgPersonVo
.
getDynamicFormValue
());
}
...
...
@@ -656,6 +672,16 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
orgUsr
.
setBizOrgCode
(
parent
.
getBizOrgCode
()
+
getOrgCodeStr
());
}
orgUsr
.
setSequenceNbr
(
id
);
// 查询机构下的所有部门单位人员数据,进行bizOrgCode的统一修改 BUG 2880 by litw start 2021年9月16日
String
oriOrgCode
=
oriOrgUsr
.
getBizOrgCode
();
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
columnMap
.
put
(
"bizOrgCode"
,
oriOrgCode
);
List
<
OrgUsr
>
list
=
orgUsrMapper
.
selectAllChildrenList
(
columnMap
);
list
.
stream
().
forEach
(
e
->{
e
.
setBizOrgCode
(
e
.
getBizOrgCode
().
replace
(
oriOrgCode
,
orgUsr
.
getBizOrgCode
()));
});
this
.
updateBatchById
(
list
);
/*单位编辑后 code值也应做出修改 2021-09-09 陈召 结束 */
saveOrgUsr
(
orgUsr
,
oriOrgUsr
);
// 保存动态表单数据
...
...
@@ -681,9 +707,9 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
orgUsr
.
setSequenceNbr
(
id
);
if
(!
ObjectUtils
.
isEmpty
(
OrgPersonVo
.
getAmosOrgId
()))
{
AgencyUserModel
user
=
Privilege
.
agencyUserClient
.
queryByUserId
(
OrgPersonVo
.
getAmosOrgId
()).
getResult
();
oriOrgUsr
.
setAmosOrgCode
(
user
.
getRealName
());
// oriOrgUsr.setAmosOrgCode(user.getRealName()); 去掉AmosOrgCode by litw 2021年9月10日
oriOrgUsr
.
setAmosOrgId
(
user
.
getUserId
());
orgUsr
.
setAmosOrgCode
(
user
.
getRealName
());
//orgUsr.setAmosOrgCode(user.getRealName()); 去掉AmosOrgCode by litw 2021年9月10日
orgUsr
.
setAmosOrgId
(
user
.
getUserId
());
}
...
...
@@ -762,6 +788,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
OrgPersonFormDto
selectPersonByIdDetail
(
Long
id
)
throws
Exception
{
OrgUsr
orgUsr
=
getById
(
id
);
// 动态表单数据
List
<
FormValue
>
formValue
=
getFormValueDetail
(
id
);
OrgPersonFormDto
orgPersonFormVo
=
new
OrgPersonFormDto
(
formValue
);
...
...
@@ -782,6 +809,15 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
columnMap
.
put
(
"is_delete"
,
CommonConstant
.
IS_DELETE_00
);
columnMap
.
put
(
"biz_org_type"
,
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
Collection
<
OrgUsr
>
list
=
listByMap
(
columnMap
);
// list.stream().forEach(t-> {
// // BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
// if(StringUtils.isNotEmpty(t.getAmosOrgId())) {
// FeignClientResult<AgencyUserModel> result1 = Privilege.agencyUserClient.queryByUserId(t.getAmosOrgId());
// if(null !=result1.getResult()) {
// t.setAmosOrgCode(result1.getResult().getRealName());
// }
// }
// });
return
getTree
(
null
,
list
,
OrgUsr
.
class
.
getName
(),
"getSequenceNbr"
,
2
,
"getBizOrgName"
,
"getParentId"
,
"getBizOrgType"
);
}
...
...
@@ -1010,28 +1046,39 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if
(
ObjectUtils
.
isEmpty
(
ids
))
{
return
null
;
}
return
ids
.
stream
().
map
(
m
->
{
List
<
CompanyPerson
>
tempList
=
new
ArrayList
<
CompanyPerson
>();
for
(
Long
tempId
:
ids
)
{
// BUG 2740 机场单位主键varchar 导致 通过主键搜索返回多条数据 2021 - 09 - 09by kongfm
OrgUsr
org
=
getById
(
m
.
toString
());
OrgUsr
org
=
getById
(
tempId
.
toString
());
if
(
ObjectUtils
.
isEmpty
(
org
))
{
return
null
;
continue
;
}
CompanyPerson
company
=
new
CompanyPerson
();
BeanUtils
.
copyProperties
(
org
,
company
);
company
.
setPersons
(
this
.
queryForListByParentIdAndOrgType
(
org
.
getSequenceNbr
(),
OrgPersonEnum
.
人员
.
getKey
()));
return
company
;
}).
filter
(
c
->
{
return
c
!=
null
;
}).
collect
(
Collectors
.
toList
());
tempList
.
add
(
company
);
}
return
tempList
;
}
// BUG 2736 人员导出过滤已经删除的数据by kongfm
// 该方法使用时参数有问题 会有下标越界问题,现在更改为public List<OrgUsrDto> queryForListByParentIdAndOrgType(Long parentId, String bizOrgType) 2021-09-13 by kongfm
public
List
<
OrgUsrDto
>
queryForListByParentIdAndOrgType
(
Long
parentId
,
String
bizOrgType
,
Boolean
isDelete
)
{
return
this
.
queryForList
(
null
,
false
,
parentId
,
bizOrgType
,
isDelete
);
}
public
List
<
OrgUsrDto
>
queryForListByParentIdAndOrgType
(
Long
parentId
,
String
bizOrgType
)
{
return
Bean
.
toModels
(
this
.
list
(
new
LambdaQueryWrapper
<
OrgUsr
>().
eq
(
OrgUsr:
:
getIsDelete
,
false
).
eq
(
OrgUsr:
:
getParentId
,
parentId
).
eq
(
OrgUsr:
:
getBizOrgType
,
bizOrgType
)),
this
.
getModelClass
());
// BUG 2843 过滤没有绑定关联账户的user by kongfm 2021-09-16
List
<
OrgUsr
>
tempUserList
=
this
.
list
(
new
LambdaQueryWrapper
<
OrgUsr
>().
eq
(
OrgUsr:
:
getIsDelete
,
false
).
eq
(
OrgUsr:
:
getParentId
,
parentId
).
eq
(
OrgUsr:
:
getBizOrgType
,
bizOrgType
).
isNotNull
(
OrgUsr:
:
getAmosOrgId
));
tempUserList
.
stream
().
forEach
(
m
->
{
if
(
StringUtils
.
isNotEmpty
(
m
.
getAmosOrgId
()))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
m
.
getAmosOrgId
());
if
(
null
!=
result1
.
getResult
())
{
m
.
setAmosOrgCode
(
result1
.
getResult
().
getRealName
());
}
}
});
return
Bean
.
toModels
(
tempUserList
,
this
.
getModelClass
());
}
public
OrgUsrDto
getOrg
(
String
amosUserId
)
{
...
...
@@ -1205,12 +1252,14 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}
Set
<
Long
>
set
=
new
HashSet
<>();
orgUsrList
.
forEach
(
orgUsr
->
{
Long
parent
=
ObjectUtils
.
isEmpty
(
orgUsr
.
getParentId
())
?
0L
:
Long
.
parseLong
(
orgUsr
.
getParentId
());
if
(!
StringUtils
.
isEmpty
(
orgUsr
.
getParentId
()))
{
Long
parent
=
Long
.
parseLong
(
orgUsr
.
getParentId
());
if
(
set
.
add
(
parent
))
{
Long
companyIdByDto
=
getCompanyIdByDto
(
parent
,
companyList
);
List
<
CheckObjectDto
>
orgUsrTreeDtoList
=
this
.
baseMapper
.
getCompanyAndKeySite
(
companyIdByDto
);
list
.
addAll
(
companyAndKeySiteList
(
orgUsrTreeDtoList
));
}
}
});
// 返回所在用户单位列表
return
list
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
...
...
@@ -1229,10 +1278,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if
(
orgUsr
.
getBizOrgType
().
equals
(
OrgPersonEnum
.
公司
.
getKey
())
&&
ObjectUtils
.
isEmpty
(
orgUsr
.
getParentId
()))
{
return
orgUsr
.
getSequenceNbr
();
}
else
{
if
(!
StringUtils
.
isEmpty
(
orgUsr
.
getParentId
()))
{
pid
=
getCompanyIdByDto
(
Long
.
parseLong
(
orgUsr
.
getParentId
()),
companyDepartmentMsgList
);
}
}
}
}
return
pid
;
}
...
...
@@ -1332,8 +1383,10 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
List
<
OrgMenuDto
>
treeList
=
buildTreeParallel
(
companyDepartmentMsgList
);
Set
<
Long
>
set
=
new
HashSet
<>();
orgUsrList
.
forEach
(
orgUsr
->
{
if
(!
StringUtils
.
isEmpty
(
orgUsr
.
getParentId
()))
{
Long
parentId
=
Long
.
parseLong
(
orgUsr
.
getParentId
());
getTreeChildre
(
list
,
treeList
,
parentId
,
set
,
companyDepartmentMsgList
);
}
});
return
list
;
}
...
...
@@ -1362,7 +1415,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
// 获取登陆人所在公司
Long
pid
=
getCompanyId
(
parentId
,
companyDepartmentMsgList
);
if
(
set
.
add
(
pid
))
{
List
<
OrgMenuDto
>
list1
=
treeList
.
stream
().
filter
(
orgMenuDto
->
orgMenuDto
.
getKey
().
equals
(
pid
)).
collect
(
Collectors
.
toList
());
List
<
OrgMenuDto
>
list1
=
treeList
.
stream
().
filter
(
orgMenuDto
->
!
ObjectUtils
.
isEmpty
(
orgMenuDto
)
&&
pid
.
equals
(
orgMenuDto
.
getKey
()
)).
collect
(
Collectors
.
toList
());
list
.
addAll
(
list1
);
}
}
...
...
@@ -1377,10 +1430,12 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
if
(
orgUsr
.
getBizOrgType
().
equals
(
OrgPersonEnum
.
公司
.
getKey
())
&&
ObjectUtils
.
isEmpty
(
orgUsr
.
getParentId
()))
{
return
orgUsr
.
getSequenceNbr
();
}
else
{
if
(!
StringUtils
.
isEmpty
(
orgUsr
.
getParentId
()))
{
pid
=
getCompanyId
(
Long
.
parseLong
(
orgUsr
.
getParentId
()),
companyDepartmentMsgList
);
}
}
}
}
return
pid
;
}
...
...
@@ -1404,7 +1459,7 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
@Override
public
List
<
Map
<
String
,
Object
>>
getLoginUserDetails
(
String
userId
)
{
public
List
<
Map
<
String
,
Object
>>
getLoginUserDetails
(
String
userId
,
AgencyUserModel
user
)
{
// 获取登陆人关联账号
List
<
OrgUsr
>
orgUsrs
=
getUsrList
(
userId
);
...
...
@@ -1418,7 +1473,8 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
wrapper
.
eq
(
OrgUsr:
:
getIsDelete
,
false
);
wrapper
.
eq
(
BaseEntity:
:
getSequenceNbr
,
orgUsr
.
getParentId
());
OrgUsr
one
=
this
.
getOne
(
wrapper
);
map
.
put
(
"other"
,
one
);
map
.
put
(
OrgPersonEnum
.
部门
.
getKey
(),
one
);
map
.
put
(
"AMOSUSER"
,
user
);
list
.
add
(
map
);
});
...
...
@@ -1439,7 +1495,23 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
orgUsrList
;
}
/**
* 重写getByid 方法 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
* @param id
* @return
*/
@Override
public
OrgUsr
getById
(
Serializable
id
)
{
OrgUsr
orgUser
=
this
.
baseMapper
.
selectById
(
id
);
// BUG2886 因为前期沟通 人员code 可能会发生改变 所以 现在接口code 不再保存,查询数据时通过接口重新赋值 by kongfm 2021-09-16
if
(
orgUser
!=
null
&&
StringUtils
.
isNotEmpty
(
orgUser
.
getAmosOrgId
()))
{
FeignClientResult
<
AgencyUserModel
>
result1
=
Privilege
.
agencyUserClient
.
queryByUserId
(
orgUser
.
getAmosOrgId
());
if
(
null
!=
result1
.
getResult
())
{
orgUser
.
setAmosOrgCode
(
result1
.
getResult
().
getRealName
());
}
}
return
orgUser
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/config/StartLoader.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
config
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AlertNewsDto
;
import
com.yeejoin.amos.component.rule.config.ClazzUtils
;
import
com.yeejoin.amos.component.rule.config.RuleConfig
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationRunner
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
java.util.List
;
/**
* @description:
* @author: tw
* @createDate: 2021/9/16
*/
@Component
public
class
StartLoader
implements
ApplicationRunner
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
StartLoader
.
class
);
@Autowired
private
EmqKeeper
emqKeeper
;
@Value
(
"${mqtt.topic.alert.iot}"
)
private
String
topic
;
@Value
(
"${mqtt.topic.alert.iot.web}"
)
private
String
topicweb
;
@Override
public
void
run
(
ApplicationArguments
args
)
throws
Exception
{
logger
.
info
(
"開始監聽物聯警情======================================"
);
loadSysParams
();
}
public
void
loadSysParams
(){
try
{
emqKeeper
.
getMqttClient
().
subscribe
(
topic
,
(
s
,
mqttMessage
)
->
{
byte
[]
payload
=
mqttMessage
.
getPayload
();
try
{
String
obj
=
new
String
(
payload
);
if
(!
ValidationUtil
.
isEmpty
(
obj
))
{
JSONObject
json
=
JSON
.
parseObject
(
obj
);
JSONObject
date
=
(
JSONObject
)
JSON
.
toJSON
(
json
.
get
(
"data"
));
AlertNewsDto
alertNewsDto
=
new
AlertNewsDto
(
"物联警情"
,
date
.
get
(
"unitInvolvedName"
)+
","
+
date
.
get
(
"floorName"
)+
"楼,发生警情,请处理。"
,
date
.
get
(
"id"
).
toString
(),
obj
);
emqKeeper
.
getMqttClient
().
publish
(
topicweb
,
JSONObject
.
toJSON
(
alertNewsDto
).
toString
().
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
true
);
}
}
catch
(
Exception
e
)
{
logger
.
error
(
"系统异常"
,
e
);
}
});
}
catch
(
MqttException
e
)
{
logger
.
info
(
"订阅物联警情异常"
,
e
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ExcelController.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.netflix.discovery.converters.Auto
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.ExcelServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestPart
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.Map
;
/**
* 导出导入
...
...
@@ -36,6 +34,9 @@ public class ExcelController extends BaseController {
@Autowired
ExcelServiceImpl
excelService
;
@Autowired
DataSourcesImpl
dataSources
;
private
static
final
String
NOT_DUTY
=
"休班"
;
...
...
@@ -53,15 +54,22 @@ public class ExcelController extends BaseController {
throw
new
RuntimeException
(
"系统异常!"
);
}
}
/**
* * @param Map par 可以传递过滤条件,传入具体实现类中
* @return
* <PRE>
* author tw
* date 2021/9/13
* </PRE>
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出公用类"
)
@GetMapping
(
"/export/{type}"
)
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
Map
par
)
{
try
{
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
commonExport
(
response
,
excelDto
);
excelService
.
commonExport
(
response
,
excelDto
,
par
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
...
...
@@ -79,10 +87,14 @@ public class ExcelController extends BaseController {
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
excelEnums
.
getClassUrl
(),
excelEnums
.
getType
());
excelService
.
commonUpload
(
multipartFile
,
excelDto
);
return
ResponseHelper
.
buildResponse
(
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Runtime
Exception
e
)
{
e
.
printStackTrace
();
throw
new
BadRequest
(
"文件格式不正确或excel 模板不匹配"
);
// BUG 2821 by litw 2021年9月16日
}
catch
(
Exception
e
){
throw
new
RuntimeException
(
"系统异常!"
);
}
}
...
...
@@ -165,4 +177,17 @@ public class ExcelController extends BaseController {
throw
new
RuntimeException
(
"系统异常!"
);
}
}
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"导出给提供设备接口"
)
@PostMapping
(
"/exportForEquipment"
)
public
ResponseModel
<
String
[]>
getFireStationFileByParams
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"method"
)
String
method
)
{
try
{
return
ResponseHelper
.
buildResponse
(
dataSources
.
selectList
(
type
,
method
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FireTeamController.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -27,16 +23,16 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
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.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireTeamListDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireTeamServiceImpl
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersController.java
View file @
517a8d98
...
...
@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -130,7 +131,8 @@ public class FirefightersController extends BaseController {
queryWrapper
.
eq
(
"is_delete"
,
0
);
List
<
FirefightersJacket
>
firefightersJacket
=
iFirefightersJacketService
.
list
(
queryWrapper
);
if
(
firefightersJacket
!=
null
&&
firefightersJacket
.
size
()
>
0
)
{
throw
new
RuntimeException
(
"该消防还有在装装备!"
);
// BUG 2222 by litw start 2021年9月10日
throw
new
BadRequest
(
"该消防还有在装装备!"
);
}
try
{
iFirefightersService
.
update
(
new
UpdateWrapper
<
Firefighters
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
1
));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/PowerTransferController.java
View file @
517a8d98
...
...
@@ -5,10 +5,13 @@ 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.biz.common.utils.NameUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.PowerTransferSimpleDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.PowerTransfer
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.FireBrigadeTypeEnum
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireTeamServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerTransferServiceImpl
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
...
...
@@ -29,6 +32,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* 力量调派
...
...
@@ -43,7 +47,8 @@ public class PowerTransferController extends BaseController {
@Autowired
PowerTransferServiceImpl
powerTransferService
;
@Autowired
FireTeamServiceImpl
fireTeamService
;
@Autowired
EquipFeignClient
equipFeignClient
;
...
...
@@ -184,10 +189,11 @@ public class PowerTransferController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/power/tree"
)
@ApiOperation
(
value
=
"力量调派资源树"
,
notes
=
"力量调派资源树"
)
public
ResponseModel
<
Object
>
getPowerTree
()
{
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTree
());
public
ResponseModel
<
Object
>
getPowerTree
(
@RequestParam
String
type
)
{
return
ResponseHelper
.
buildResponse
(
powerTransferService
.
getPowerTree
(
type
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/power/list"
)
@ApiOperation
(
value
=
"力量出动列表"
,
notes
=
"力量调派资源树"
)
...
...
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 @
517a8d98
...
...
@@ -449,7 +449,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
listdate
.
add
(
new
KeyValueLabel
(
"伤亡人数"
,
"casualtiesNum"
,
alertCalled
.
getCasualtiesNum
()));
listdate
.
add
(
new
KeyValueLabel
(
"联系人"
,
"contactUser"
,
alertCalled
.
getContactUser
()));
listdate
.
add
(
new
KeyValueLabel
(
"联系电话"
,
"contactPhone"
,
alertCalled
.
getContactPhone
()));
listdate
.
add
(
new
KeyValueLabel
(
"联系人电话"
,
"contactPhone"
,
alertCalled
.
getContactPhone
()));
//
listdate.add(new KeyValueLabel("联系人电话", "contactPhone", alertCalled.getContactPhone()));
list
.
stream
().
forEach
(
alertFormValue
->
{
String
valueCode
=
alertFormValue
.
getFieldValueCode
();
if
(
null
==
valueCode
)
{
...
...
@@ -674,11 +674,13 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
//未结案警情统计
@Override
public
Integer
AlertCalledcount
(
int
type
)
{
return
alertCalledMapper
.
AlertCalledcount
(
1
);
return
alertCalledMapper
.
AlertCalledcount
(
0
);
}
@Override
public
List
<
AlertCalled
>
AlertCalledStatusPage
(
Integer
current
,
Integer
size
)
{
return
alertCalledMapper
.
AlertCalledStatusPage
(
current
,
size
);
}
@Override
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DataSourcesImpl.java
View file @
517a8d98
...
...
@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -152,6 +153,9 @@ public class DataSourcesImpl implements DataSources {
case
"getCitys"
:
str
=
getCitys
();
break
;
case
"getDutyArea"
:
str
=
getDutyArea
();
break
;
}
}
return
str
;
...
...
@@ -362,4 +366,15 @@ public class DataSourcesImpl implements DataSources {
}
});
}
private
String
[]
getDutyArea
()
{
ResponseModel
<
List
<
LinkedHashMap
<
String
,
Object
>>>
response
=
equipFeignClient
.
getAllBuilding
();
List
<
LinkedHashMap
<
String
,
Object
>>
buildingList
=
response
.
getResult
();
List
<
String
>
areaList
=
Lists
.
newArrayList
();
buildingList
.
forEach
(
building
->
{
areaList
.
add
(
building
.
get
(
"buildName"
)
+
"@"
+
building
.
get
(
"instanceId"
));
});
String
[]
str
=
areaList
.
toArray
(
new
String
[
buildingList
.
size
()]);
return
str
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DispatchMapServiceImpl.java
View file @
517a8d98
...
...
@@ -29,7 +29,7 @@ public class DispatchMapServiceImpl implements IHomePageService {
@Override
public
Object
getHomePageData
()
{
Integer
num
=
alertCalledMapper1
.
AlertCalledcount
(
1
);
Integer
num
=
alertCalledMapper1
.
AlertCalledcount
(
0
);
return
num
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/DispatchTaskServiceImpl.java
View file @
517a8d98
...
...
@@ -28,7 +28,7 @@ public class DispatchTaskServiceImpl implements IHomePageService {
@Override
public
Object
getHomePageData
()
{
Integer
num
=
alertCalledMapper1
.
AlertCalledcount
(
1
);
Integer
num
=
alertCalledMapper1
.
AlertCalledcount
(
0
);
return
num
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ExcelServiceImpl.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
java.io.InputStream
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.beanutils.ConvertUtils
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.Row
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
com.alibaba.excel.support.ExcelTypeEnum
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.google.common.collect.Lists
;
import
com.itextpdf.text.pdf.PdfStructTreeController.returnType
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.dto.CompanyPerson
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyCarDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyPersonShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DutyShiftDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.DynamicFormInstanceDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireChemicalDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireExpertsDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireStationDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.FirefightersInfoDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.KeySiteExcleDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.LinkageUnitDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.MaintenancePersonExcleDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrExcelDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.RescueEquipmentDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.SpecialPositionStaffDto
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceDto
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormColumn
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
com.yeejoin.amos.boot.module.common.api.entity.FireChemical
;
...
...
@@ -21,6 +65,9 @@ import com.yeejoin.amos.boot.module.common.api.entity.FireStation;
import
com.yeejoin.amos.boot.module.common.api.entity.FireTeam
;
import
com.yeejoin.amos.boot.module.common.api.entity.Firefighters
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersContacts
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersEducation
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersPost
;
import
com.yeejoin.amos.boot.module.common.api.entity.FirefightersWorkexperience
;
import
com.yeejoin.amos.boot.module.common.api.entity.MaintenanceCompany
;
import
com.yeejoin.amos.boot.module.common.api.entity.RescueEquipment
;
import
com.yeejoin.amos.boot.module.common.api.entity.SpecialPositionStaff
;
...
...
@@ -28,42 +75,28 @@ import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import
com.yeejoin.amos.boot.module.common.api.service.IDutyPersonService
;
import
com.yeejoin.amos.boot.module.common.api.service.IKeySiteService
;
import
com.yeejoin.amos.boot.module.common.api.service.IMaintenanceCompanyService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.*
;
import
com.yeejoin.amos.boot.module.common.api.service.IOrgUsrService
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.DutyCarServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.DutyPersonShiftServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.DutyShiftServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.DynamicFormColumnServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireChemicalServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireExpertsServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FireStationServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersContactsServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersEducationServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersPostServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.FirefightersWorkexperienceServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.LinkageUnitServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.RescueEquipmentServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.SpecialPositionStaffServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.WaterResourceServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Aircraft
;
import
com.yeejoin.amos.boot.module.jcs.api.enums.ExcelEnums
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
ch.qos.logback.core.subst.Token
;
import
org.apache.commons.beanutils.ConvertUtils
;
import
org.apache.ibatis.annotations.Case
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.Row
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.elasticsearch.search.aggregations.metrics.ParsedSingleValueNumericMetricsAggregation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicInteger
;
/**
* @author tb
...
...
@@ -76,8 +109,6 @@ public class ExcelServiceImpl {
private
static
final
String
MAINTENANCE_PERSON
=
"maintenancePerson"
;
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
DataSourcesImpl
dataSourcesImpl
;
@Autowired
FireChemicalServiceImpl
fireChemicalServiceImpl
;
...
...
@@ -121,6 +152,17 @@ public class ExcelServiceImpl {
SpecialPositionStaffServiceImpl
specialPositionStaffServiceImpl
;
@Autowired
RescueEquipmentServiceImpl
rescueEquipmentServiceImpl
;
@Autowired
IOrgUsrService
orgUsrServer
;
@Autowired
FirefightersPostServiceImpl
iFirefightersPostService
;
@Autowired
FirefightersContactsServiceImpl
ifirefightersContactsService
;
@Autowired
FirefightersEducationServiceImpl
ifirefightersEducationService
;
@Autowired
FirefightersWorkexperienceServiceImpl
ifirefightersWorkexperienceService
;
public
void
templateExport
(
HttpServletResponse
response
,
ExcelDto
excelDto
)
throws
ClassNotFoundException
{
String
url
=
excelDto
.
getClassUrl
();
...
...
@@ -129,7 +171,7 @@ public class ExcelServiceImpl {
true
);
}
public
void
commonExport
(
HttpServletResponse
response
,
ExcelDto
excelDto
)
{
public
void
commonExport
(
HttpServletResponse
response
,
ExcelDto
excelDto
,
Map
par
)
{
switch
(
excelDto
.
getType
())
{
case
"WHP"
:
...
...
@@ -281,6 +323,7 @@ public class ExcelServiceImpl {
}
else
{
continue
;
}
positionStaffDto
=
Bean
.
toPo
(
getCurrentInfo
(),
positionStaffDto
);
specialPositionStaffServiceImpl
.
createWithModel
(
positionStaffDto
);
}
}
...
...
@@ -317,7 +360,7 @@ public class ExcelServiceImpl {
}
else
{
continue
;
}
rescueEquipmentDto
=
Bean
.
toPo
(
getCurrentInfo
(),
rescueEquipmentDto
);
rescueEquipmentServiceImpl
.
createWithModel
(
rescueEquipmentDto
);
}
...
...
@@ -327,7 +370,7 @@ public class ExcelServiceImpl {
private
void
excelImportLinkageUnitZhDto
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
LinkageUnitDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
LinkageUnitDto
.
class
,
1
);
if
(
excelDtoList
!=
null
&&
excelDtoList
.
size
()
>
0
)
{
if
(
excelDtoList
!=
null
&&
excelDtoList
.
size
()
>
0
)
{
excelDtoList
.
forEach
(
linkageUnitDto
->
{
if
(
linkageUnitDto
.
getLinkageUnitType
()
!=
null
)
{
String
[]
certificates
=
linkageUnitDto
.
getLinkageUnitType
().
split
(
"@"
);
...
...
@@ -339,7 +382,7 @@ public class ExcelServiceImpl {
linkageUnitDto
.
setEmergencyLinkageUnit
(
certificates
[
0
]);
linkageUnitDto
.
setEmergencyLinkageUnitCode
(
certificates
[
1
]);
}
linkageUnitDto
=
Bean
.
toPo
(
getCurrentInfo
(),
linkageUnitDto
);
linkageUnitServiceImpl
.
saveLinkageModel
(
linkageUnitDto
);
});
}
...
...
@@ -369,13 +412,11 @@ public class ExcelServiceImpl {
dynamicFormValue
.
forEach
(
dynamicFormInstanceDto
->
{
switch
(
dynamicFormInstanceDto
.
getFieldCode
())
{
case
"administrativePositionCode"
:
if
(
orgUsrExcelDto
.
getAdministrativePositionCode
()
!=
null
)
{
String
[]
certificates
=
orgUsrExcelDto
.
getAdministrativePositionCode
().
split
(
"@"
);
dynamicFormInstanceDto
.
setFieldValue
(
certificates
[
1
]);
dynamicFormInstanceDto
.
setFieldValueLabel
(
certificates
[
0
]);
}
break
;
case
"auditCycle"
:
...
...
@@ -397,23 +438,26 @@ public class ExcelServiceImpl {
}
break
;
case
"certificateType"
:
case
"certificateType"
:
//持证类别
if
(
orgUsrExcelDto
.
getCertificateType
()
!=
null
)
{
String
[]
certificates
=
orgUsrExcelDto
.
getCertificateType
().
split
(
"@"
);
dynamicFormInstanceDto
.
setFieldValue
(
certificates
[
1
]);
dynamicFormInstanceDto
.
setFieldValueLabel
(
certificates
[
0
]);
}
break
;
// BUG 2892 导入机场单位没有持证类别和 人员性别 处理 by kongfm 2021-09-16
case
"fireManagementPostCode"
:
if
(
orgUsrExcelDto
.
getFireManagementPostCode
()
!=
null
)
{
String
[]
certificates
=
orgUsrExcelDto
.
getFireManagementPostCode
().
split
(
"@"
);
dynamicFormInstanceDto
.
setFieldValue
(
certificates
[
1
]);
dynamicFormInstanceDto
.
setFieldValueLabel
(
certificates
[
0
]);
}
break
;
case
"gender"
:
dynamicFormInstanceDto
.
setFieldValue
(
orgUsrExcelDto
.
getGender
());
if
(
orgUsrExcelDto
.
getGender
()
!=
null
)
{
// BUG 2892 导入机场单位没有持证类别和 人员性别 处理 by kongfm 2021-09-16
String
[]
gender
=
orgUsrExcelDto
.
getGender
().
split
(
"@"
);
dynamicFormInstanceDto
.
setFieldValue
(
gender
[
1
]);
dynamicFormInstanceDto
.
setFieldValueLabel
(
gender
[
0
]);
}
break
;
case
"internalPositionCode"
:
if
(
orgUsrExcelDto
.
getInternalPositionCode
()
!=
null
)
{
...
...
@@ -461,9 +505,8 @@ public class ExcelServiceImpl {
dynamicFormInstancelist
.
add
(
dynamicFormInstance
);
});
orgUsrExcelDto
.
setDynamicFormValue
(
dynamicFormInstancelist
);
Bean
.
toPo
(
getCurrentInfo
(),
orgUsrExcelDto
);
try
{
orgUsrService
.
saveOrgPersonExcel
(
orgUsrExcelDto
);
}
catch
(
Exception
e
)
{
...
...
@@ -482,7 +525,20 @@ public class ExcelServiceImpl {
FirefightersContacts
firefightersContacts
=
new
FirefightersContacts
();
firefighters
=
Bean
.
toPo
(
item
,
firefighters
);
firefighters
=
Bean
.
toPo
(
getCurrentInfo
(),
firefighters
);
//手动添加主键,以便于给岗位、职位等实体赋值id
Long
sequenceId
=
sequence
.
nextId
();
firefighters
.
setSequenceNbr
(
sequenceId
);
item
.
setFirefightersId
(
sequenceId
);
firefightersContacts
=
Bean
.
toPo
(
item
,
firefightersContacts
);
FirefightersWorkexperience
firefightersWorkexperience
=
new
FirefightersWorkexperience
();
FirefightersEducation
firefightersEducation
=
new
FirefightersEducation
();
FirefightersPost
firefightersPost
=
new
FirefightersPost
();
firefightersWorkexperience
=
Bean
.
toPo
(
item
,
firefightersWorkexperience
);
firefightersEducation
=
Bean
.
toPo
(
item
,
firefightersEducation
);
firefightersPost
=
Bean
.
toPo
(
item
,
firefightersPost
);
if
(
item
.
getFireTeam
()
!=
null
)
{
Long
fireTeamId
=
Long
.
valueOf
(
item
.
getFireTeam
().
split
(
"@"
)[
1
]);
firefighters
.
setFireTeamId
(
fireTeamId
);
...
...
@@ -521,6 +577,56 @@ public class ExcelServiceImpl {
firefighters
.
setResidence
(
tempCity
[
0
]);
firefighters
.
setResidenceDetails
(
tempCity
[
1
]);
}
/*************************岗位职级***********************/
if
(
item
.
getEmployeeHierarchy
()!=
null
)
{
String
[]
employeeHierarchy
=
item
.
getEmployeeHierarchy
().
split
(
"@"
);
firefightersPost
.
setEmployeeHierarchy
(
employeeHierarchy
[
0
]);
firefightersPost
.
setEmployeeHierarchyCode
(
employeeHierarchy
[
1
]);
}
if
(
item
.
getAdministrativePosition
()!=
null
)
{
String
[]
employeeHierarchy
=
item
.
getAdministrativePosition
().
split
(
"@"
);
firefightersPost
.
setAdministrativePosition
(
employeeHierarchy
[
0
]);
firefightersPost
.
setAdministrativePositionCode
(
employeeHierarchy
[
1
]);
}
if
(
item
.
getEmployeeHierarchy
()!=
null
)
{
String
[]
employeeHierarchy
=
item
.
getEmployeeHierarchy
().
split
(
"@"
);
firefightersPost
.
setEmployeeHierarchy
(
employeeHierarchy
[
0
]);
firefightersPost
.
setEmployeeHierarchyCode
(
employeeHierarchy
[
1
]);
}
if
(
item
.
getPostQualification
()!=
null
)
{
String
[]
employeeHierarchy
=
item
.
getPostQualification
().
split
(
"@"
);
firefightersPost
.
setPostQualification
(
employeeHierarchy
[
0
]);
firefightersPost
.
setPostQualificationCode
(
employeeHierarchy
[
1
]);
}
if
(
item
.
getCategory
()!=
null
)
{
String
[]
employeeHierarchy
=
item
.
getCategory
().
split
(
"@"
);
firefightersPost
.
setCategory
(
employeeHierarchy
[
0
]);
firefightersPost
.
setCategoryCode
(
employeeHierarchy
[
1
]);
}
if
(
item
.
getLevel
()!=
null
)
{
String
[]
employeeHierarchy
=
item
.
getLevel
().
split
(
"@"
);
firefightersPost
.
setLevel
(
employeeHierarchy
[
0
]);
firefightersPost
.
setLevelCode
(
employeeHierarchy
[
1
]);
}
if
(
item
.
getAreasExpertise
()!=
null
)
{
String
[]
employeeHierarchy
=
item
.
getAreasExpertise
().
split
(
"@"
);
firefightersPost
.
setAreasExpertise
(
employeeHierarchy
[
0
]);
firefightersPost
.
setAreasExpertiseCode
(
employeeHierarchy
[
1
]);
}
/*************************学历教育***********************/
if
(
item
.
getFirstDegree
()!=
null
)
{
String
[]
employeeHierarchy
=
item
.
getFirstDegree
().
split
(
"@"
);
firefightersEducation
.
setFirstDegree
(
employeeHierarchy
[
1
]);
}
if
(
item
.
getHighestEducation
()!=
null
)
{
String
[]
employeeHierarchy
=
item
.
getHighestEducation
().
split
(
"@"
);
firefightersEducation
.
setHighestEducation
(
employeeHierarchy
[
1
]);
}
iFirefightersPostService
.
save
(
firefightersPost
);
ifirefightersEducationService
.
save
(
firefightersEducation
);
ifirefightersWorkexperienceService
.
save
(
firefightersWorkexperience
);
// BUG 2760 修改消防人员导出模板和 导入问题 bykongfm
FirefightersInfoDto
firefightersInfo
=
new
FirefightersInfoDto
(
firefighters
,
firefightersContacts
);
firefightersService
.
saveFirefighters
(
firefightersInfo
);
...
...
@@ -550,13 +656,28 @@ public class ExcelServiceImpl {
fireStationService
.
saveBatch
(
excelEntityList
);
}
private
void
excelImportFireTeam
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
FireTeamDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
FireTeamDto
.
class
,
1
);
List
<
FireTeam
>
excelEntityList
=
new
ArrayList
<>();
excelDtoList
.
forEach
(
item
->
{
FireTeam
fireTeam
=
new
FireTeam
();
fireTeam
=
Bean
.
toPo
(
item
,
fireTeam
);
fireTeam
=
Bean
.
toPo
(
getCurrentInfo
(),
fireTeam
);
/* bug2835 添加获取上级单位的信息方法 陈浩 2021-09-10 --start*/
if
(
fireTeam
.
getCompanyName
()!=
null
)
{
String
[]
companyArray
=
fireTeam
.
getCompanyName
().
split
(
"@"
);
fireTeam
.
setCompany
(
Long
.
parseLong
(
companyArray
[
1
]));
fireTeam
.
setCompanyName
(
companyArray
[
0
]);
try
{
OrgUsrFormDto
companyDto
=
orgUsrServer
.
selectCompanyById
(
Long
.
parseLong
(
companyArray
[
1
]));
fireTeam
.
setCompanyCode
(
companyDto
.
getBizOrgCode
());
}
catch
(
Exception
e
)
{
}
}
/* bug2835 添加获取上级单位的信息方法 陈浩 2021-09-10 --end*/
if
(
fireTeam
.
getType
()
!=
null
)
{
String
[]
type
=
fireTeam
.
getType
().
split
(
"@"
);
fireTeam
.
setType
(
type
[
0
]);
...
...
@@ -688,6 +809,7 @@ public class ExcelServiceImpl {
excelDtoList
.
forEach
(
fireExpertsDto
->
{
FireExperts
fireExperts
=
new
FireExperts
();
fireExperts
=
Bean
.
toPo
(
fireExpertsDto
,
fireExperts
);
fireExperts
=
Bean
.
toPo
(
getCurrentInfo
(),
fireExperts
);
if
(
fireExperts
.
getCertificatesType
()
!=
null
)
{
String
[]
certificates
=
fireExperts
.
getCertificatesType
().
split
(
"@"
);
fireExperts
.
setCertificatesType
(
certificates
[
0
]);
...
...
@@ -729,7 +851,8 @@ public class ExcelServiceImpl {
if
(
sheet
!=
null
)
{
// 获取表头月份
Row
titleRow
=
sheet
.
getRow
(
0
);
Cell
monthCell
=
titleRow
.
getCell
(
5
);
// 958
Cell
monthCell
=
titleRow
.
getCell
(
6
);
String
dateStr
=
monthCell
==
null
?
""
:
monthCell
.
toString
();
List
<
Date
>
dayByMonth
=
DateUtils
.
getDayByMonth
(
dateStr
);
...
...
@@ -776,9 +899,15 @@ public class ExcelServiceImpl {
dutyCarDto
.
setCarName
(
carName
[
0
]);
dutyCarDto
.
setCarId
(
carName
[
1
]);
}
cell
=
row
.
getCell
(
5
);
if
(
cell
!=
null
)
{
String
[]
dutyArea
=
cell
.
toString
().
split
(
"@"
);
dutyCarDto
.
setDutyArea
(
dutyArea
[
0
]);
dutyCarDto
.
setDutyAreaId
(
dutyArea
[
1
]);
}
List
<
DutyPersonShiftDto
>
dutyShift
=
dutyCarDto
.
getDutyShift
();
for
(
int
j
=
0
;
j
<
dayByMonth
.
size
();
j
++)
{
cell
=
row
.
getCell
(
5
+
j
);
cell
=
row
.
getCell
(
6
+
j
);
String
dutyType
=
cell
==
null
?
""
:
cell
.
toString
();
if
(!
StringUtils
.
isEmpty
(
dutyType
))
{
DutyPersonShiftDto
dutyPersonShiftDto
=
new
DutyPersonShiftDto
();
...
...
@@ -821,9 +950,16 @@ public class ExcelServiceImpl {
dutyPersonDto
.
setPostTypeName
(
split
[
0
]);
dutyPersonDto
.
setPostType
(
split
[
1
]);
}
//需求958 添加值班区域 导入 by kongfm 2021-09-15
cell
=
row
.
getCell
(
5
);
if
(
cell
!=
null
)
{
String
[]
dutyArea
=
cell
.
toString
().
split
(
"@"
);
dutyPersonDto
.
setDutyArea
(
dutyArea
[
0
]);
dutyPersonDto
.
setDutyAreaId
(
dutyArea
[
1
]);
}
List
<
DutyPersonShiftDto
>
dutyShift
=
new
ArrayList
<>();
for
(
int
j
=
0
;
j
<
dayByMonth
.
size
();
j
++)
{
cell
=
row
.
getCell
(
5
+
j
);
cell
=
row
.
getCell
(
6
+
j
);
String
dutyType
=
cell
==
null
?
""
:
cell
.
toString
();
if
(!
StringUtils
.
isEmpty
(
dutyType
))
{
DutyPersonShiftDto
dutyPersonShiftDto
=
new
DutyPersonShiftDto
();
...
...
@@ -851,6 +987,7 @@ public class ExcelServiceImpl {
// 先填充主表的属性
MaintenanceCompany
maintenanceCompany
=
new
MaintenanceCompany
();
maintenanceCompany
=
Bean
.
toPo
(
maintenancePersonExcleDto
,
maintenanceCompany
);
maintenanceCompany
=
Bean
.
toPo
(
getCurrentInfo
(),
maintenanceCompany
);
maintenanceCompany
.
setType
(
PERSON
);
if
(
maintenanceCompany
.
getParentId
()
!=
null
)
{
long
getParentId
=
Long
.
valueOf
(
maintenancePersonExcleDto
.
getParentName
().
split
(
"@"
)[
1
]);
...
...
@@ -1001,7 +1138,7 @@ public class ExcelServiceImpl {
list
.
add
(
o
.
getUserName
());
list
.
add
(
o
.
getPostTypeName
());
list
.
add
(
o
.
getCarName
());
list
.
add
(
o
.
getDutyArea
());
List
<
DutyPersonShiftDto
>
dutyShift
=
o
.
getDutyShift
();
initDutyShift
(
dayByMonth
,
dutyShift
,
list
);
...
...
@@ -1040,7 +1177,7 @@ public class ExcelServiceImpl {
list
.
add
(
o
.
getUserName
());
list
.
add
(
o
.
getDeptName
());
list
.
add
(
o
.
getPostTypeName
());
list
.
add
(
o
.
getDutyArea
());
List
<
DutyPersonShiftDto
>
dutyShift
=
o
.
getDutyShift
();
initDutyShift
(
dayByMonth
,
dutyShift
,
list
);
...
...
@@ -1133,7 +1270,6 @@ public class ExcelServiceImpl {
userModel
.
setRecUserId
(
"3141675"
);
userModel
.
setRecUserName
(
"admin_jcs"
);
userModel
.
setRecDate
(
new
Date
());
userModel
.
setIsDelete
(
false
);
return
userModel
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FaultServiceImpl.java
View file @
517a8d98
...
...
@@ -30,7 +30,7 @@ public class FaultServiceImpl implements IHomePageService {
@Override
public
Object
getHomePageData
()
{
ResponseModel
<
Integer
>
data
=
quipFeignClient
.
getCountAlarm
(
"BREAKDOWN"
);
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
():
0
)
;
ResponseModel
<
Integer
>
data
=
quipFeignClient
1
.
getCountAlarm
(
"BREAKDOWN"
);
return
data
!=
null
?
data
.
getResult
():
0
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireAlarmServiceImpl.java
View file @
517a8d98
...
...
@@ -31,7 +31,7 @@ public class FireAlarmServiceImpl implements IHomePageService {
@Override
public
Object
getHomePageData
()
{
ResponseModel
<
Integer
>
data
=
quipFeignClient
.
getCountAlarm
(
"FIREALARM"
);
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
():
0
)
;
ResponseModel
<
Integer
>
data
=
quipFeignClient
1
.
getCountAlarm
(
"FIREALARM"
);
return
data
!=
null
?
data
.
getResult
():
0
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/FireTeamServiceImpl.java
View file @
517a8d98
...
...
@@ -67,8 +67,8 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
*
* @return
*/
public
List
<
FireBrigadeResourceDto
>
listMonitorFireBrigade
()
{
return
fireTeamMapper
.
listMonitorFireBrigade
();
public
List
<
FireBrigadeResourceDto
>
listMonitorFireBrigade
(
String
code
)
{
return
fireTeamMapper
.
listMonitorFireBrigade
(
code
);
}
/**
...
...
@@ -200,8 +200,8 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
if
(
fireTeam
.
getAddress
()!=
null
){
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
fireTeam
.
getAddress
());
fireTeam
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
fireTeam
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
fireTeam
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
//
fireTeam.setLongitude(Double.valueOf(address.getString(BizConstant.LONGITUDE)));
//
fireTeam.setLatitude(Double.valueOf(address.getString(BizConstant.LATITUDE)));
}
if
(
ValidationUtil
.
isEmpty
(
fireTeam
.
getParent
()))
{
fireTeam
.
setTreeCode
(
TreeParser
.
genTreeCode
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/NoServiceImpl.java
View file @
517a8d98
...
...
@@ -30,7 +30,7 @@ public class NoServiceImpl implements IHomePageService {
@Override
public
Object
getHomePageData
()
{
ResponseModel
<
Integer
>
data
=
quipFeignClient
.
getCountAlarm
(
"NOTICE
"
);
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
():
0
)
;
ResponseModel
<
Integer
>
data
=
quipFeignClient
1
.
getcountAlarmHandle
(
"no
"
);
return
data
!=
null
?
data
.
getResult
():
0
;
}
}
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 @
517a8d98
...
...
@@ -154,9 +154,22 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
}
@Override
public
List
<
FireBrigadeResourceDto
>
getPowerTree
()
{
public
List
<
FireBrigadeResourceDto
>
getPowerTree
(
String
type
)
{
List
<
FireBrigadeResourceDto
>
fireBrigadeResourceList
=
Lists
.
newArrayList
();
if
(
type
!=
null
&&!
""
.
equals
(
type
)){
// 3.消防队伍-监控大队
List
<
FireBrigadeResourceDto
>
monitorFireBrigadeList1
=
fireTeamService
.
listMonitorFireBrigade
(
FireBrigadeTypeEnum
.
医疗救援队
.
getCode
());
FireBrigadeResourceDto
monitorResourceDto1
=
new
FireBrigadeResourceDto
();
monitorResourceDto1
.
setId
(
"0"
);
monitorResourceDto1
.
setName
(
FireBrigadeTypeEnum
.
医疗救援队
.
getName
());
monitorResourceDto1
.
setType
(
FireBrigadeTypeEnum
.
医疗救援队
.
getKey
());
monitorResourceDto1
.
setChildren
(
monitorFireBrigadeList1
);
if
(!
CollectionUtils
.
isEmpty
(
monitorFireBrigadeList1
))
{
fireBrigadeResourceList
.
add
(
monitorResourceDto1
);
}
}
// 1.调用装备服务接口查询车辆列表
List
<
FireBrigadeResourceDto
>
fireCarDtoList
=
Lists
.
newArrayList
();
ResponseModel
<
Object
>
result
=
equipFeignService
.
getFireCarListAll
();
...
...
@@ -208,7 +221,7 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
}
// 3.消防队伍-监控大队
List
<
FireBrigadeResourceDto
>
monitorFireBrigadeList
=
fireTeamService
.
listMonitorFireBrigade
();
List
<
FireBrigadeResourceDto
>
monitorFireBrigadeList
=
fireTeamService
.
listMonitorFireBrigade
(
FireBrigadeTypeEnum
.
监控大队
.
getCode
()
);
FireBrigadeResourceDto
monitorResourceDto
=
new
FireBrigadeResourceDto
();
monitorResourceDto
.
setId
(
"0"
);
monitorResourceDto
.
setName
(
FireBrigadeTypeEnum
.
监控大队
.
getName
());
...
...
@@ -219,6 +232,9 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
fireBrigadeResourceList
.
add
(
monitorResourceDto
);
}
return
fireBrigadeResourceList
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/ShieldServiceImpl.java
View file @
517a8d98
...
...
@@ -30,7 +30,7 @@ public class ShieldServiceImpl implements IHomePageService {
@Override
public
Object
getHomePageData
()
{
ResponseModel
<
Integer
>
data
=
quipFeignClient
.
getCountAlarm
(
"SHIELD"
);
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
():
0
)
;
ResponseModel
<
Integer
>
data
=
quipFeignClient
1
.
getCountAlarm
(
"SHIELD"
);
return
data
!=
null
?
data
.
getResult
():
0
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/WarningServiceImpl.java
View file @
517a8d98
...
...
@@ -30,7 +30,7 @@ public class WarningServiceImpl implements IHomePageService {
@Override
public
Object
getHomePageData
()
{
ResponseModel
<
Integer
>
data
=
quipFeignClient
.
getCountAlarm
(
"NOTICE"
);
return
ResponseHelper
.
buildResponse
(
data
!=
null
?
data
.
getResult
():
0
)
;
ResponseModel
<
Integer
>
data
=
quipFeignClient
1
.
getCountAlarm
(
"NOTICE"
);
return
data
!=
null
?
data
.
getResult
():
0
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/YesServiceImpl.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.biz.common.service.IHomePageService
;
import
com.yeejoin.amos.boot.module.common.api.feign.EquipFeignClient
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.annotation.PostConstruct
;
/**
* @description:
...
...
@@ -11,12 +17,20 @@ import org.springframework.stereotype.Service;
@Service
public
class
YesServiceImpl
implements
IHomePageService
{
//实现首页dispatchMap
@Autowired
EquipFeignClient
quipFeignClient
;
private
static
EquipFeignClient
quipFeignClient1
;
@PostConstruct
public
void
init
(){
quipFeignClient1
=
quipFeignClient
;
}
//火警
@Override
public
Object
getHomePageData
()
{
return
0
;
ResponseModel
<
Integer
>
data
=
quipFeignClient1
.
getcountAlarmHandle
(
"yes"
);
return
data
!=
null
?
data
.
getResult
():
0
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/CheckController.java
View file @
517a8d98
...
...
@@ -104,8 +104,8 @@ public class CheckController extends AbstractBaseController {
// @Value("${file.port}")
// private String filePort;
@Value
(
"${file.url}"
)
private
String
fileUrl
;
//
@Value("${file.url}")
//
private String fileUrl;
@Value
(
"${amosRefresh.patrol.topic}"
)
private
String
patrolTopic
;
...
...
@@ -196,7 +196,8 @@ public class CheckController extends AbstractBaseController {
String
fileName
=
"巡检记录图片"
+
new
Date
().
getTime
()
+
".zip"
;
// String rootPath = "http://" + fileIp + ":" + filePort + "/";
for
(
Map
<
String
,
Object
>
map
:
list
)
{
map
.
put
(
"photoData"
,
fileUrl
+
map
.
get
(
"photoData"
).
toString
());
// map.put("photoData", fileUrl + map.get("photoData").toString());
map
.
put
(
"photoData"
,
map
.
get
(
"photoData"
).
toString
());
}
FileHelper
.
exportZip
(
list
,
fileName
,
response
);
}
...
...
@@ -210,7 +211,8 @@ public class CheckController extends AbstractBaseController {
String
fileName
=
"巡检记录图片"
+
new
Date
().
getTime
()
+
".zip"
;
// String rootPath = "http://" + fileIp + ":" + filePort + "/";
for
(
Map
<
String
,
Object
>
map
:
list
)
{
map
.
put
(
"photoData"
,
fileUrl
+
map
.
get
(
"photoData"
).
toString
());
// map.put("photoData", fileUrl + map.get("photoData").toString());
map
.
put
(
"photoData"
,
map
.
get
(
"photoData"
).
toString
());
}
FileHelper
.
exportZip
(
list
,
fileName
,
response
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/GroupController.java
View file @
517a8d98
...
...
@@ -95,9 +95,9 @@ public class GroupController extends AbstractBaseController{
for
(
DepartmentBo
d
:
departmentBos
)
{
LinkedHashMap
<
String
,
Object
>
dept
=
new
LinkedHashMap
<>();
dept
.
put
(
"id"
,
d
.
getSequenceNbr
(
));
dept
.
put
(
"key"
,
d
.
getSequenceNbr
(
));
dept
.
put
(
"value"
,
d
.
getSequenceNbr
(
));
dept
.
put
(
"id"
,
String
.
valueOf
(
d
.
getSequenceNbr
()
));
dept
.
put
(
"key"
,
String
.
valueOf
(
d
.
getSequenceNbr
()
));
dept
.
put
(
"value"
,
String
.
valueOf
(
d
.
getSequenceNbr
()
));
dept
.
put
(
"state"
,
"open"
);
dept
.
put
(
"type"
,
"department"
);
dept
.
put
(
"orgCode"
,
loginOrgCode
+
"-"
+
d
.
getSequenceNbr
());
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/controller/LatentDangerController.java
View file @
517a8d98
...
...
@@ -56,7 +56,6 @@ public class LatentDangerController extends AbstractBaseController {
@PostMapping
(
value
=
"/normal/save"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
CommonResponse
saveNormal
(
@ApiParam
(
value
=
"隐患对象"
,
required
=
true
)
@RequestBody
LatentDangerNormalParam
latentDangerParam
)
{
CommonResponse
commonResponse
=
new
CommonResponse
();
try
{
AgencyUserModel
user
=
getUserInfo
();
if
(
ObjectUtils
.
isEmpty
(
user
))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/entity/mybatis/EquipmentInputItemRo.java
View file @
517a8d98
...
...
@@ -8,7 +8,7 @@ import java.io.Serializable;
@RuleFact
(
value
=
"消防设备"
,
project
=
"维保规范"
)
public
class
EquipmentInputItemRo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
7088399431688039744
L
;
private
static
final
long
serialVersionUID
=
2994025183812872473
L
;
@Label
(
"设备名称"
)
private
String
equipmentName
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/param/LatentDangerNormalParam.java
View file @
517a8d98
...
...
@@ -47,4 +47,19 @@ public class LatentDangerNormalParam {
* 建筑名称
*/
private
String
structureName
;
/**
* 隐患地址经度
*/
private
String
longitude
;
/**
* 隐患地址纬度
*/
private
String
latitude
;
/**
* 业务类型(不同业务创建的隐患以此区分)
*/
private
String
bizType
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/param/LatentDangerPatrolItemParam.java
View file @
517a8d98
...
...
@@ -44,9 +44,9 @@ public class LatentDangerPatrolItemParam {
private
String
instanceKey
;
/*
/*
*
* 隐患名称
*
*
/
*/
private
String
name
;
private
String
limitDate
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/CheckServiceImpl.java
View file @
517a8d98
...
...
@@ -142,8 +142,8 @@ public class CheckServiceImpl implements ICheckService {
//
// @Value("${file.port}")
// private String filePort;
@Value
(
"${file.url}"
)
private
String
fileUrl
;
//
@Value("${file.url}")
//
private String fileUrl;
@Override
public
Page
<
CheckInfoVo
>
getCheckInfo
(
String
toke
,
String
product
,
String
appKey
,
CheckInfoPageParam
param
)
{
...
...
@@ -549,7 +549,8 @@ public class CheckServiceImpl implements ICheckService {
PointCheckDetailBo
pointCheckDetailBo
=
list
.
get
(
0
);
List
<
CheckShot
>
pointShot
=
checkShotDao
.
findAllByCheckIdAndCheckInputIdAndClassifyId
(
pointCheckDetailBo
.
getCheckId
(),
0
l
,
0
l
);
pointShot
.
forEach
(
action
->
{
pointImgUrls
.
add
(
fileUrl
+
action
.
getPhotoData
());
// pointImgUrls.add(fileUrl + action.getPhotoData());
pointImgUrls
.
add
(
action
.
getPhotoData
());
});
Check
check
=
checkDao
.
findById
(
checkId
).
get
();
pointCheckRespone
.
setPointId
(
pointCheckDetailBo
.
getPointId
());
...
...
@@ -586,7 +587,8 @@ public class CheckServiceImpl implements ICheckService {
List
<
String
>
pointInputImgUrls
=
new
ArrayList
<>();
List
<
CheckShot
>
pointInputShot
=
checkShotDao
.
findAllByCheckIdAndCheckInputIdAndClassifyId
(
pointCheckDetailBo
.
getCheckId
(),
action
.
getCheckInputId
(),
action
.
getClassifyId
());
pointInputShot
.
forEach
(
inputShot
->
{
pointInputImgUrls
.
add
(
fileUrl
+
inputShot
.
getPhotoData
());
// pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
pointInputImgUrls
.
add
(
inputShot
.
getPhotoData
());
});
AppCheckInputRespone
appCheckInputRespone
=
new
AppCheckInputRespone
();
appCheckInputRespone
.
setCheckInputId
(
action
.
getCheckInputId
());
...
...
@@ -633,7 +635,8 @@ public class CheckServiceImpl implements ICheckService {
PointCheckDetailBo
pointCheckDetailBo
=
list
.
get
(
0
);
List
<
CheckShot
>
pointShot
=
checkShotDao
.
findAllByCheckIdAndCheckInputIdAndClassifyId
(
pointCheckDetailBo
.
getCheckId
(),
0
l
,
0
l
);
pointShot
.
forEach
(
action
->
{
pointImgUrls
.
add
(
fileUrl
+
action
.
getPhotoData
());
// pointImgUrls.add(fileUrl + action.getPhotoData());
pointImgUrls
.
add
(
action
.
getPhotoData
());
});
Check
check
=
checkDao
.
findById
(
checkId
).
get
();
pointCheckRespone
.
setPointId
(
pointCheckDetailBo
.
getPointId
());
...
...
@@ -674,7 +677,8 @@ public class CheckServiceImpl implements ICheckService {
List
<
String
>
pointInputImgUrls
=
new
ArrayList
<>();
List
<
CheckShot
>
pointInputShot
=
checkShotDao
.
findAllByCheckIdAndCheckInputIdAndClassifyId
(
pointCheckDetailBo
.
getCheckId
(),
action
.
getCheckInputId
(),
action
.
getClassifyId
());
pointInputShot
.
forEach
(
inputShot
->
{
pointInputImgUrls
.
add
(
fileUrl
+
inputShot
.
getPhotoData
());
// pointInputImgUrls.add(fileUrl + inputShot.getPhotoData());
pointInputImgUrls
.
add
(
inputShot
.
getPhotoData
());
});
AppCheckInputRespone
appCheckInputRespone
=
new
AppCheckInputRespone
();
appCheckInputRespone
.
setCheckInputId
(
action
.
getCheckInputId
());
...
...
@@ -765,8 +769,10 @@ public class CheckServiceImpl implements ICheckService {
// String ipPort = "http://" + fileIp + ":" + filePort + "/";
for
(
Map
<
String
,
Object
>
map
:
checkimgs
)
{
String
imgPath
=
map
.
get
(
"photoData"
).
toString
().
replace
(
"\\"
,
"/"
);
map
.
put
(
"photoData"
,
fileUrl
+
imgPath
);
map
.
put
(
"openOperUrl"
,
"window.open('"
+
fileUrl
+
imgPath
+
"')"
);
// map.put("photoData", fileUrl + imgPath);
// map.put("openOperUrl", "window.open('" + fileUrl + imgPath + "')");
map
.
put
(
"photoData"
,
imgPath
);
map
.
put
(
"openOperUrl"
,
"window.open('"
+
imgPath
+
"')"
);
}
resp
.
put
(
"imgs"
,
checkimgs
);
return
resp
;
...
...
@@ -1118,8 +1124,8 @@ public class CheckServiceImpl implements ICheckService {
//checkInputId
if
(
e
.
get
(
"inputId"
).
toString
().
equals
(
imgContent
.
get
(
i
).
get
(
"checkInputId"
).
toString
())
&&
e
.
get
(
"classifyId"
).
toString
().
equals
(
imgContent
.
get
(
i
).
get
(
"classifyId"
).
toString
()))
{
photoList
.
add
(
fileUrl
+
imgContent
.
get
(
i
).
get
(
"photoData"
));
//
photoList.add(fileUrl + imgContent.get(i).get("photoData"));
photoList
.
add
(
String
.
valueOf
(
imgContent
.
get
(
i
).
get
(
"photoData"
)));
}
if
(
PointStatusEnum
.
UNQUALIFIED
.
getName
().
equals
(
e
.
get
(
"IsOK"
).
toString
()))
{
equip
.
put
(
"IsOK"
,
PointStatusEnum
.
UNQUALIFIED
.
getName
());
...
...
@@ -1177,7 +1183,8 @@ public class CheckServiceImpl implements ICheckService {
//checkInputId
if
(
e
.
get
(
"checkInputId"
).
toString
().
equals
(
imgContent
.
get
(
i
).
get
(
"checkInputId"
).
toString
())
&&
e
.
get
(
"classifyId"
).
toString
().
equals
(
imgContent
.
get
(
i
).
get
(
"classifyId"
).
toString
())){
e
.
put
(
"photoData"
,
fileUrl
+
imgContent
.
get
(
i
).
get
(
"photoData"
));
// e.put("photoData",fileUrl+imgContent.get(i).get("photoData"));
e
.
put
(
"photoData"
,
imgContent
.
get
(
i
).
get
(
"photoData"
));
}
}
});
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/LatentDangerServiceImpl.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
service
.
impl
;
import
static
org
.
typroject
.
tyboot
.
core
.
foundation
.
context
.
RequestContext
.
getProduct
;
import
java.net.InetAddress
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -106,6 +77,34 @@ import com.yeejoin.amos.patrol.dao.entity.PointClassify;
import
com.yeejoin.amos.patrol.exception.YeeException
;
import
com.yeejoin.amos.patrol.feign.RemoteSecurityService
;
import
com.yeejoin.amos.patrol.mqtt.WebMqttComponent
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
java.net.InetAddress
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
static
org
.
typroject
.
tyboot
.
core
.
foundation
.
context
.
RequestContext
.
getProduct
;
@Service
(
"latentDangerService"
)
public
class
LatentDangerServiceImpl
implements
ILatentDangerService
{
...
...
@@ -180,8 +179,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
// @Value("${LatentDanger.flow.photoUrls}")
// private String photoUrlPre;
@Value
(
"${file.url}"
)
private
String
fileUrl
;
//
@Value("${file.url}")
//
private String fileUrl;
@Value
(
"${file.url}"
)
private
String
fileServerAddress
;
...
...
@@ -419,7 +418,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
String
[]
photoUrlsList
=
photoUrls
.
split
(
","
);
for
(
String
url
:
photoUrlsList
)
{
if
(!
""
.
equals
(
url
)){
photoUrlsB
.
append
(
fileUrl
+
url
);
// photoUrlsB.append(fileUrl+url);
photoUrlsB
.
append
(
url
);
photoUrlsB
.
append
(
","
);
}
}
...
...
@@ -440,7 +440,8 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
record
.
setExcuteUserId
(
userId
);
record
.
setExcuteDepartmentId
(
departmentId
);
if
(
flowJson
!=
null
&&
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
flowJson
.
getString
(
"photoUrls"
))){
flowJson
.
put
(
"photoUrls"
,
fileUrl
+
flowJson
.
getString
(
"photoUrls"
));
// flowJson.put("photoUrls",fileUrl+flowJson.getString("photoUrls"));
flowJson
.
put
(
"photoUrls"
,
flowJson
.
getString
(
"photoUrls"
));
}
record
.
setFlowJson
(
flowJson
!=
null
?
flowJson
.
toJSONString
()
:
null
);
record
.
setFlowTaskName
(
taskName
);
...
...
@@ -547,7 +548,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
respBody
=
remoteWorkFlowService
.
pageTask
(
user
.
getUserId
(),
latentDangerListParam
.
getBelongType
());
}
Date
endDate
=
new
Date
();
logger
.
info
(
"-------------------------工作流列表时间"
+
(
endDate
.
getTime
()-
startDate
.
getTime
()));
logger
.
info
(
"-------------------------工作流列表时间"
+
(
endDate
.
getTime
()
-
startDate
.
getTime
()));
JSONArray
taskJsonList
=
respBody
.
getJSONArray
(
"data"
);
List
<
JSONObject
>
taskList
=
JSONObject
.
parseArray
(
taskJsonList
.
toJSONString
(),
JSONObject
.
class
);
List
<
String
>
bussinessKeys
=
new
ArrayList
<>();
...
...
@@ -720,9 +721,9 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
}
@Override
public
CommonResponse
detail
(
String
id
,
String
userId
,
boolean
isFinish
)
{
public
CommonResponse
detail
(
String
id
,
String
userId
,
boolean
isFinish
)
{
JSONObject
jsonObject
;
if
(
isFinish
==
true
){
if
(
isFinish
){
jsonObject
=
remoteWorkFlowService
.
queryFinishTaskDetail
(
id
);
}
else
{
jsonObject
=
remoteWorkFlowService
.
queryTaskDetail
(
id
);
...
...
@@ -1172,7 +1173,7 @@ public class LatentDangerServiceImpl implements ILatentDangerService {
String
departmentName
,
DangerExecuteSubmitDto
executeSubmitDto
,
RoleBo
role
)
{
JSONObject
executeJson
=
remoteWorkFlowService
.
excute
(
param
.
getTaskId
(),
executeTypeEnum
.
getRequestBody
());
JSONObject
executeJson
=
remoteWorkFlowService
.
ex
e
cute
(
param
.
getTaskId
(),
executeTypeEnum
.
getRequestBody
());
if
(
executeJson
==
null
)
{
executeSubmitDto
.
setIsOk
(
false
);
executeSubmitDto
.
setMsg
(
"执行失败"
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/TaskServiceImpl.java
View file @
517a8d98
...
...
@@ -105,8 +105,8 @@ public class TaskServiceImpl implements ITaskService {
// @Value("${LatentDanger.flow.photoUrls}")
// private String photoUrl;
@Value
(
"${file.url}"
)
private
String
fileUrl
;
//
@Value("${file.url}")
//
private String fileUrl;
@Override
@Transactional
public
Long
addNewTask
(
TaskParam
param
)
{
...
...
@@ -174,7 +174,8 @@ public class TaskServiceImpl implements ITaskService {
List
<
String
>
list
=
new
ArrayList
<>();
List
<
String
>
picList
=
taskPictureMapper
.
queryTaskFeedbackPic
(
feedback
.
getId
());
for
(
int
i
=
0
;
i
<
picList
.
size
()
;
i
++)
{
list
.
add
(
fileUrl
+
picList
.
get
(
i
));
// list.add(fileUrl+ picList.get(i));
list
.
add
(
picList
.
get
(
i
));
}
feedbackBo
.
setFeedbackPics
(
list
);
feedbackList
.
add
(
feedbackBo
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/common/remote/RemoteWorkFlowService.java
View file @
517a8d98
...
...
@@ -173,7 +173,7 @@ public class RemoteWorkFlowService {
// return json;
// }
public
JSONObject
excute
(
String
taskId
,
String
requestBody
)
{
public
JSONObject
ex
e
cute
(
String
taskId
,
String
requestBody
)
{
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
map
.
put
(
"taskId"
,
taskId
);
Map
<
String
,
String
>
headerMap
=
Maps
.
newHashMap
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/pom.xml
View file @
517a8d98
...
...
@@ -95,6 +95,10 @@
<artifactId>
spring-boot-starter-mail
</artifactId>
</dependency>
<dependency>
<groupId>
org.liquibase
</groupId>
<artifactId>
liquibase-core
</artifactId>
</dependency>
<dependency>
<groupId>
cn.jpush.api
</groupId>
<artifactId>
jpush-client
</artifactId>
</dependency>
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/CheckController.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
controller
;
import
java.io.ByteArrayInputStream
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.xml.transform.Result
;
import
javax.xml.transform.Source
;
import
javax.xml.transform.Transformer
;
import
javax.xml.transform.TransformerException
;
import
javax.xml.transform.TransformerFactory
;
import
javax.xml.transform.stream.StreamResult
;
import
javax.xml.transform.stream.StreamSource
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.supervision.business.constants.XJConstant
;
import
com.yeejoin.amos.supervision.business.dto.CheckDto
;
import
com.yeejoin.amos.supervision.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckRecordParam
;
import
com.yeejoin.amos.supervision.business.param.CheckStatisticalParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.ICheckService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.supervision.business.service.intfc.ISafety3DDataSendService
;
import
com.yeejoin.amos.supervision.business.util.*
;
import
com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckVo
;
import
com.yeejoin.amos.supervision.core.async.AsyncTask
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.request.CommonRequest
;
import
com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.supervision.core.framework.PersonIdentify
;
import
com.yeejoin.amos.supervision.core.util.DateUtil
;
import
com.yeejoin.amos.supervision.core.util.StringUtil
;
import
com.yeejoin.amos.supervision.mqtt.WebMqttComponent
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang.BooleanUtils
;
import
org.slf4j.Logger
;
...
...
@@ -35,48 +34,22 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.data.domain.Page
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
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.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.supervision.business.constants.XJConstant
;
import
com.yeejoin.amos.supervision.business.dto.CheckDto
;
import
com.yeejoin.amos.supervision.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckRecordParam
;
import
com.yeejoin.amos.supervision.business.param.CheckStatisticalParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.ICheckService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.supervision.business.service.intfc.ISafety3DDataSendService
;
import
com.yeejoin.amos.supervision.business.util.CheckPageParamUtil
;
import
com.yeejoin.amos.supervision.business.util.CheckParamUtil
;
import
com.yeejoin.amos.supervision.business.util.CommonResponse
;
import
com.yeejoin.amos.supervision.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.supervision.business.util.DaoCriteria
;
import
com.yeejoin.amos.supervision.business.util.FileHelper
;
import
com.yeejoin.amos.supervision.business.util.Toke
;
import
com.yeejoin.amos.supervision.business.util.ToolUtils
;
import
com.yeejoin.amos.supervision.common.enums.PlanTaskFinishStatusEnum
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.request.CommonRequest
;
import
com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.supervision.dao.entity.PlanTask
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
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.*
;
import
javax.xml.transform.stream.StreamResult
;
import
javax.xml.transform.stream.StreamSource
;
import
java.io.*
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
value
=
"/api/check"
)
@Api
(
tags
=
"巡检记录api"
)
...
...
@@ -100,7 +73,7 @@ public class CheckController extends AbstractBaseController {
@Value
(
"${linux.img.path}"
)
private
String
linuxImgPath
;
// @Value("${file.ip}")
// @Value("${file.ip}")
// private String fileIp;
//
// @Value("${file.port}")
...
...
@@ -572,7 +545,7 @@ public class CheckController extends AbstractBaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"保存检查记录"
,
notes
=
"保存检查记录"
)
@RequestMapping
(
value
=
"/saveRecord"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
ResponseModel
saveSupervisionCheckRecord
(
@ApiParam
(
value
=
"检查信息"
,
required
=
false
)
@RequestBody
(
required
=
true
)
CheckRecordParam
requestParam
)
{
public
ResponseModel
saveSupervisionCheckRecord
(
@ApiParam
(
value
=
"检查信息"
,
required
=
false
)
@RequestBody
(
required
=
true
)
CheckRecordParam
requestParam
)
{
try
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
...
...
@@ -585,4 +558,26 @@ public class CheckController extends AbstractBaseController {
}
}
/**
* 分页查询检查项
*
* @param queryRequests
* @param pageable
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询检查记录"
,
notes
=
"分页查询检查记录"
)
@RequestMapping
(
value
=
"/queryPage"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryPage
(
@ApiParam
(
value
=
"组合查询条件"
,
required
=
false
,
defaultValue
=
"[]"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
false
,
defaultValue
=
"current=0&pageSize=10或pageNumber0&pageSize=10"
)
CommonPageable
pageable
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
HashMap
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"orgCode"
,
loginOrgCode
);
CheckPageParam
criterias
=
CheckParamUtil
.
fillCheckPageParam
(
queryRequests
,
pageable
,
paramMap
);
Page
<
CheckVo
>
page
=
checkService
.
queryPage
(
criterias
);
return
CommonResponseUtil
.
success
(
page
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/InputItemController.java
View file @
517a8d98
...
...
@@ -231,6 +231,28 @@ public class InputItemController extends AbstractBaseController {
}
/**
* 分页查询检查项
*
* @param queryRequests
* @param pageable
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询检查项"
,
notes
=
"分页查询检查项"
)
@RequestMapping
(
value
=
"/queryPage"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryPage
(
@ApiParam
(
value
=
"组合查询条件"
,
required
=
false
,
defaultValue
=
"[]"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
false
,
defaultValue
=
"current=0&pageSize=10或pageNumber0&pageSize=10"
)
CommonPageable
pageable
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
HashMap
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"orgCode"
,
loginOrgCode
);
InputItemPageParam
criterias
=
InputItemParamUtil
.
fillInputItemPageParam
(
queryRequests
,
pageable
,
paramMap
);
Page
<
InputItemVo
>
page
=
inputItemService
.
queryPage
(
criterias
);
return
CommonResponseUtil
.
success
(
page
);
}
/**
* 条件查询检查项
*
* @param queryRequests
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/PlanController.java
View file @
517a8d98
...
...
@@ -196,7 +196,7 @@ public class PlanController extends AbstractBaseController {
@RequestMapping
(
value
=
"/setPlanStatus"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
GET
)
public
CommonResponse
setPlanStatus
(
@ApiParam
(
value
=
"计划id"
)
@RequestParam
(
value
=
"planId"
,
required
=
false
)
Long
planId
,
@ApiParam
(
value
=
"计划状态"
)
@RequestParam
(
value
=
"status"
,
required
=
false
)
byte
status
)
{
@ApiParam
(
value
=
"计划状态"
)
@RequestParam
(
value
=
"status"
,
required
=
false
)
Integer
status
)
{
planService
.
setplanstatus
(
planId
,
status
);
return
CommonResponseUtil
.
success
();
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/controller/RoutePointItemController.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
controller
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemService
;
import
com.yeejoin.amos.supervision.business.util.CommonResponse
;
import
com.yeejoin.amos.supervision.business.util.CommonResponseUtil
;
import
com.yeejoin.amos.supervision.business.util.InputItemParamUtil
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.request.CommonRequest
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
java.util.HashMap
;
import
java.util.List
;
/**
* @author gaojianqiang
* @date 2021/09/10 11:28
*/
@RestController
@RequestMapping
(
value
=
"/api/routePointItem"
)
@Api
(
tags
=
"巡检路线点项api"
)
public
class
RoutePointItemController
extends
AbstractBaseController
{
private
final
Logger
log
=
LoggerFactory
.
getLogger
(
RoutePointItemController
.
class
);
@Autowired
private
IRoutePointItemService
routePointItemService
;
/**
* 增加巡检路线点项关系
*
* @param plan 巡检计划
* @param inputItemIds 巡检项IDS
* @return CommonResponse
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"新增巡检路线点项关系"
,
notes
=
"新增巡检路线点项关系"
)
@PostMapping
(
value
=
"/addRoutePointItem"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
addRoute
(
@ApiParam
(
value
=
"巡检计划"
,
required
=
true
)
@RequestBody
Plan
plan
,
@ApiParam
(
value
=
"检查项IDS"
,
required
=
false
)
@RequestParam
List
<
Long
>
inputItemIds
,
@ApiParam
(
value
=
"是否保存并提交"
,
required
=
true
)
@RequestParam
Boolean
status
)
{
try
{
String
userId
=
getUserId
();
if
(
StringUtils
.
isNotBlank
(
userId
))
{
return
CommonResponseUtil
.
success
(
routePointItemService
.
addRoutePointItemList
(
plan
,
inputItemIds
,
status
,
userId
));
}
return
CommonResponseUtil
.
failure
(
"创建用户为空!"
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"巡检路线点项关系新增失败!"
);
}
}
/**
* 分页查询检查项
*
* @param queryRequests
* @param pageable
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"分页查询检查项"
,
notes
=
"分页查询检查项"
)
@RequestMapping
(
value
=
"/queryPage"
,
produces
=
"application/json;charset=UTF-8"
,
method
=
RequestMethod
.
POST
)
public
CommonResponse
queryPage
(
@ApiParam
(
value
=
"组合查询条件"
,
required
=
false
,
defaultValue
=
"[]"
)
@RequestBody
(
required
=
false
)
List
<
CommonRequest
>
queryRequests
,
@ApiParam
(
value
=
"分页参数"
,
required
=
false
,
defaultValue
=
"current=0&pageSize=10或pageNumber0&pageSize=10"
)
CommonPageable
pageable
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
loginOrgCode
=
getOrgCode
(
reginParams
);
HashMap
<
String
,
Object
>
paramMap
=
new
HashMap
<
String
,
Object
>();
paramMap
.
put
(
"orgCode"
,
loginOrgCode
);
InputItemPageParam
criterias
=
InputItemParamUtil
.
fillInputItemPageParam
(
queryRequests
,
pageable
,
paramMap
);
Page
<
RoutePointItemVo
>
page
=
routePointItemService
.
queryPage
(
criterias
);
return
CommonResponseUtil
.
success
(
page
);
}
/**
* 删除巡检路线点项关系
*
* @param ids
* @return CommonResponse
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"删除巡检路线点项关系"
,
notes
=
"删除巡检路线点项关系"
)
@PostMapping
(
value
=
"/deleteByIdIn"
,
produces
=
"application/json;charset=UTF-8"
)
public
CommonResponse
deleteByIdIn
(
@ApiParam
(
value
=
"ids"
,
required
=
true
)
@RequestParam
List
<
Long
>
ids
)
{
try
{
routePointItemService
.
deleteByIdIn
(
ids
);
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResponseUtil
.
failure
(
"删除巡检路线点项关系失败!"
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/CheckMapper.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dao
.
mapper
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.supervision.business.param.CheckStatisticalParam
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.*
;
import
com.yeejoin.amos.supervision.business.param.*
;
import
com.yeejoin.amos.supervision.business.util.CheckDetailInputPageParam
;
import
org.apache.ibatis.annotations.Param
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckDetailBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckInfoBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckInputBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckTraListBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckUserBo
;
import
com.yeejoin.amos.supervision.business.param.CheckInfoListPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckRecordParam
;
import
com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckVo
;
import
com.yeejoin.amos.supervision.core.common.response.PointCheckInfoBusinessRespone
;
import
com.yeejoin.amos.supervision.core.common.response.PointCheckInfoRespone
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PlanRoutePointBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
interface
CheckMapper
extends
BaseMapper
{
...
...
@@ -30,40 +20,43 @@ public interface CheckMapper extends BaseMapper {
List
<
CheckInfoVo
>
getCheckInfo
(
CheckInfoPageParam
param
);
List
<
Map
>
queryUnqualifiedInputItem
(
@Param
(
value
=
"checkId"
)
int
checkId
);
List
<
Map
>
queryUnqualifiedInputItem
(
@Param
(
value
=
"checkId"
)
int
checkId
);
List
<
Map
>
queryCheckPointInputItem
(
@Param
(
value
=
"planTaskId"
)
int
planTaskId
,
@Param
(
value
=
"pointId"
)
int
pointId
);
List
<
Map
>
queryCheckPointInputItem
(
@Param
(
value
=
"planTaskId"
)
int
planTaskId
,
@Param
(
value
=
"pointId"
)
int
pointId
);
List
<
PointCheckDetailBo
>
findCheckPointInputItem
(
@Param
(
value
=
"checkId"
)
long
checkId
);
List
<
PointCheckDetailBo
>
findCheckPointInputItem
(
@Param
(
value
=
"checkId"
)
long
checkId
);
int
checkHasRecord
(
CheckRecordParam
requestParam
);
List
<
Map
<
String
,
Object
>>
queryCheckPointImgs
(
@Param
(
value
=
"planTaskId"
)
int
planTaskId
,
@Param
(
value
=
"pointId"
)
int
pointId
);
List
<
Map
<
String
,
Object
>>
queryCheckPointImgs
(
@Param
(
value
=
"planTaskId"
)
int
planTaskId
,
@Param
(
value
=
"pointId"
)
int
pointId
);
/**
* 巡检日历饼图数据
*
* @param param
* @return
*/
Map
<
String
,
Object
>
pieChartData
(
CheckRecordParam
param
);
Map
<
String
,
Object
>
pieChartData
(
CheckRecordParam
param
);
/**
* 巡检日历日历数据
*
* @param param
* @return
*/
List
<
Map
<
String
,
Object
>>
calendarData
(
CheckRecordParam
param
);
List
<
Map
<
String
,
Object
>>
calendarData
(
CheckRecordParam
param
);
List
<
Map
<
String
,
Object
>>
queryRecordByPointId
(
HashMap
<
String
,
Object
>
req
);
Map
<
String
,
Object
>
queryCheckById
(
@Param
(
value
=
"checkId"
)
int
checkId
);
Map
<
String
,
Object
>
queryCheckById
(
@Param
(
value
=
"checkId"
)
int
checkId
);
List
<
Map
<
String
,
Object
>>
queryCheckInputItems
(
@Param
(
value
=
"checkId"
)
int
checkId
);
List
<
Map
<
String
,
Object
>>
queryCheckInputItems
(
@Param
(
value
=
"checkId"
)
int
checkId
);
List
<
Map
<
String
,
Object
>>
queryCheckImgs
(
@Param
(
value
=
"checkId"
)
int
checkId
);
List
<
Map
<
String
,
Object
>>
queryCheckImgs
(
@Param
(
value
=
"checkId"
)
int
checkId
);
/**
* 查询所有巡检记录图片
*
* @param param
* @return
*/
...
...
@@ -71,20 +64,23 @@ public interface CheckMapper extends BaseMapper {
/**
* 根据巡检记录id获取所有图片
*
* @param ids
* @return
*/
List
<
Map
<
String
,
Object
>>
getCheckInfoImgsByCheckIdsList
(
@Param
(
value
=
"checkIds"
)
Long
[]
ids
);
List
<
Map
<
String
,
Object
>>
getCheckInfoImgsByCheckIdsList
(
@Param
(
value
=
"checkIds"
)
Long
[]
ids
);
/**
* 根据ids获取巡检记录
*
* @param ids
* @return
*/
List
<
CheckInfoVo
>
getSelectedCheckInfoList
(
@Param
(
value
=
"checkIds"
)
Long
[]
ids
);
List
<
CheckInfoVo
>
getSelectedCheckInfoList
(
@Param
(
value
=
"checkIds"
)
Long
[]
ids
);
/**
* 月巡检情况统计
*
* @param param
* @return
*/
...
...
@@ -92,6 +88,7 @@ public interface CheckMapper extends BaseMapper {
/**
* 月巡检情况统计
*
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getCountMonthChkNew
();
...
...
@@ -129,7 +126,6 @@ public interface CheckMapper extends BaseMapper {
long
countCheckInputByMybatis
(
@Param
(
value
=
"checkID"
)
Long
checkID
);
/**
* 根据巡检记录ID查询装备个数
*
...
...
@@ -152,7 +148,7 @@ public interface CheckMapper extends BaseMapper {
* @param param
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getEquipInputByCheckId
(
CheckDetailInputPageParam
param
);
List
<
HashMap
<
String
,
Object
>>
getEquipInputByCheckId
(
CheckDetailInputPageParam
param
);
/**
* 根据巡检记录ID查询巡检装备
...
...
@@ -160,14 +156,16 @@ public interface CheckMapper extends BaseMapper {
* @param checkID
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getCheckEquipByCheckID
(
Long
checkID
);
List
<
HashMap
<
String
,
Object
>>
getCheckEquipByCheckID
(
Long
checkID
);
/**
* 根据巡检记录ID获取图片信息
*
* @param param
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getEquipInfoImgsByCheckIdsList
(
Long
checkID
);
List
<
HashMap
<
String
,
Object
>>
getEquipInfoImgsByCheckIdsList
(
Long
checkID
);
/**
* 根据巡检记录ID和点ID获取巡检记录详情
*
...
...
@@ -202,6 +200,7 @@ public interface CheckMapper extends BaseMapper {
/**
* 根据检查id获取检查信息
*
* @param checkId
* @return
*/
...
...
@@ -209,6 +208,7 @@ public interface CheckMapper extends BaseMapper {
/**
* 计划路线点最新巡检记录查询
*
* @param params
* @return
*/
...
...
@@ -216,6 +216,7 @@ public interface CheckMapper extends BaseMapper {
/**
* 计划路线点最新巡检记录分页统计用
*
* @param params
* @return
*/
...
...
@@ -228,6 +229,7 @@ public interface CheckMapper extends BaseMapper {
* @return
*/
long
countCheckInfoListData
(
CheckInfoListPageParam
params
);
long
countCheckInfoListData1
(
CheckInfoListPageParam
params
);
/**
...
...
@@ -238,15 +240,18 @@ public interface CheckMapper extends BaseMapper {
*/
List
<
CheckInfoBo
>
getCheckInfoList
(
CheckInfoListPageParam
params
);
List
<
Map
<
String
,
Object
>>
getCheckInfoList1
(
CheckInfoListPageParam
params
);
List
<
Map
<
String
,
Object
>>
getCheckInfoList1
(
CheckInfoListPageParam
params
);
/**
* 查询点及线路信息
*
* @return
*/
public
List
<
Map
<
String
,
Object
>>
getRoutesAndPointsInfo
();
public
List
<
Map
<
String
,
Object
>>
getRoutesAndPointsInfo
();
/**
* 巡检情况统计分析
*
* @param param
* @return
*/
...
...
@@ -254,6 +259,7 @@ public interface CheckMapper extends BaseMapper {
/**
* 根据orgCode查询公司累计巡检次数
*
* @param loginOrgCode
* @return
*/
...
...
@@ -261,6 +267,7 @@ public interface CheckMapper extends BaseMapper {
/**
* 根据条件查询日巡检次数
*
* @param param
* @return
*/
...
...
@@ -271,7 +278,7 @@ public interface CheckMapper extends BaseMapper {
List
<
String
>
getLivePhotos
(
@Param
(
value
=
"checkId"
)
Long
checkID
);
List
<
String
>
getPhotosByCheckIDAndInputId
(
@Param
(
value
=
"checkId"
)
int
checkId
,
@Param
(
value
=
"checkInputId"
)
int
checkInputId
,
@Param
(
value
=
"classifyId"
)
int
classifyId
);
List
<
String
>
getPhotosByCheckIDAndInputId
(
@Param
(
value
=
"checkId"
)
int
checkId
,
@Param
(
value
=
"checkInputId"
)
int
checkInputId
,
@Param
(
value
=
"classifyId"
)
int
classifyId
);
List
<
Long
>
getPlanCheckDataCount
(
HashMap
<
String
,
Object
>
param
);
...
...
@@ -285,4 +292,7 @@ public interface CheckMapper extends BaseMapper {
int
checkHasRecord
(
@Param
(
value
=
"planTaskId"
)
Long
planTaskId
,
@Param
(
value
=
"pointId"
)
Long
pointId
);
long
queryPageCount
(
CheckPageParam
param
);
List
<
CheckVo
>
queryPage
(
CheckPageParam
param
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/InputItemMapper.java
View file @
517a8d98
...
...
@@ -38,4 +38,10 @@ public interface InputItemMapper {
void
updatePointById
(
Map
<
String
,
Object
>
param
);
List
<
Long
>
getIds
();
List
<
InputItem
>
findByIdIn
(
@Param
(
"list"
)
List
<
Long
>
inputItemIds
);
long
queryPageCount
(
InputItemPageParam
param
);
List
<
InputItemVo
>
queryPage
(
InputItemPageParam
param
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/mapper/RoutePointItemMapper.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
dao
.
mapper
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePointItem
;
public
interface
RoutePointItemMapper
extends
BaseMapper
{
import
java.util.List
;
public
void
updateRoutePointItem
(
RoutePointItem
pointItem
);
public
interface
RoutePointItemMapper
extends
BaseMapper
{
public
void
updateRoutePointItem
(
RoutePointItem
pointItem
);
int
delRoutePointItemByRouteId
(
Long
routeId
);
long
queryPageCount
(
InputItemPageParam
param
);
List
<
RoutePointItemVo
>
queryPage
(
InputItemPageParam
param
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IPlanDao.java
View file @
517a8d98
...
...
@@ -30,6 +30,11 @@ public interface IPlanDao extends BaseDao<Plan, Long> {
@Query
(
value
=
"UPDATE p_plan SET is_delete = 1,`status` = 1 WHERE id IN (?1)"
,
nativeQuery
=
true
)
void
updatePlanDel
(
List
<
Long
>
ids
);
@Modifying
@Transactional
@Query
(
value
=
"UPDATE p_plan SET `status` = (?1) WHERE id = (?2)"
,
nativeQuery
=
true
)
void
updatePlanStatus
(
Integer
status
,
Long
planId
);
Plan
findByOriginalId
(
String
originalId
);
@Query
(
value
=
"select * from p_plan where original_id in (?1) and is_delete = 0"
,
nativeQuery
=
true
)
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/dao/repository/IRoutePointItemDao.java
View file @
517a8d98
...
...
@@ -22,5 +22,10 @@ public interface IRoutePointItemDao extends BaseDao<RoutePointItem, Long> {
@Modifying
@Transactional
@Query
(
value
=
"delete from p_route_point_item WHERE id in (?1)"
,
nativeQuery
=
true
)
void
deleteByRoutePointItemId
(
List
<
Long
>
delRoutePointItemIds
);
int
deleteByRoutePointItemId
(
List
<
Long
>
delRoutePointItemIds
);
@Modifying
@Transactional
@Query
(
value
=
"delete from p_route_point_item WHERE plan_id = ?1"
,
nativeQuery
=
true
)
void
deleteByPlanId
(
Long
planId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/param/CheckPageParam.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
param
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
lombok.Data
;
@Data
public
class
CheckPageParam
extends
CommonPageable
{
private
Long
planId
;
private
Long
companyId
;
private
String
orgCode
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/param/InputItemPageParam.java
View file @
517a8d98
...
...
@@ -4,13 +4,17 @@ import com.yeejoin.amos.supervision.core.common.request.CommonPageable;
import
java.util.List
;
public
class
InputItemPageParam
extends
CommonPageable
{
public
class
InputItemPageParam
extends
CommonPageable
{
private
String
isScore
;
private
String
itemType
;
private
String
name
;
private
String
level
;
private
String
itemNo
;
private
String
checkTypeId
;
private
String
itemStart
;
private
Long
planId
;
private
String
itemTypeClassifyIds
;
/**
* 机构
*/
...
...
@@ -41,36 +45,47 @@ public class InputItemPageParam extends CommonPageable{
public
String
getItemNo
()
{
return
itemNo
;
}
public
void
setItemNo
(
String
itemNo
)
{
this
.
itemNo
=
itemNo
;
}
public
String
getLevel
()
{
return
level
;
}
public
void
setLevel
(
String
level
)
{
this
.
level
=
level
;
}
public
String
getIsScore
()
{
return
isScore
;
}
public
void
setIsScore
(
String
isScore
)
{
this
.
isScore
=
isScore
;
}
public
String
getItemType
()
{
return
itemType
;
}
public
void
setItemType
(
String
itemType
)
{
this
.
itemType
=
itemType
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getOrgCode
()
{
return
orgCode
;
}
public
void
setOrgCode
(
String
orgCode
)
{
this
.
orgCode
=
orgCode
;
}
...
...
@@ -82,4 +97,36 @@ public class InputItemPageParam extends CommonPageable{
public
void
setCatalogIds
(
List
<
Long
>
catalogIds
)
{
this
.
catalogIds
=
catalogIds
;
}
public
String
getCheckTypeId
()
{
return
checkTypeId
;
}
public
void
setCheckTypeId
(
String
checkTypeId
)
{
this
.
checkTypeId
=
checkTypeId
;
}
public
String
getItemStart
()
{
return
itemStart
;
}
public
void
setItemStart
(
String
itemStart
)
{
this
.
itemStart
=
itemStart
;
}
public
Long
getPlanId
()
{
return
planId
;
}
public
void
setPlanId
(
Long
planId
)
{
this
.
planId
=
planId
;
}
public
String
getItemTypeClassifyIds
()
{
return
itemTypeClassifyIds
;
}
public
void
setItemTypeClassifyIds
(
String
itemTypeClassifyIds
)
{
this
.
itemTypeClassifyIds
=
itemTypeClassifyIds
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/CheckServiceImpl.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
javax.annotation.Resource
;
import
javax.transaction.Transactional
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.supervision.business.constants.XJConstant
;
import
com.yeejoin.amos.supervision.business.dao.mapper.CheckMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskDetailMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.*
;
import
com.yeejoin.amos.supervision.business.dto.CheckDto
;
import
com.yeejoin.amos.supervision.business.dto.CheckRecordDto
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.*
;
import
com.yeejoin.amos.supervision.business.feign.EquipFeign
;
import
com.yeejoin.amos.supervision.business.param.*
;
import
com.yeejoin.amos.supervision.business.service.intfc.ICheckService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IEquipmentHandlerService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanTaskService
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPointService
;
import
com.yeejoin.amos.supervision.business.util.CheckDetailInputPageParam
;
import
com.yeejoin.amos.supervision.business.util.ToolUtils
;
import
com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckVo
;
import
com.yeejoin.amos.supervision.common.enums.*
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.response.*
;
import
com.yeejoin.amos.supervision.core.util.DateUtil
;
import
com.yeejoin.amos.supervision.core.util.StringUtil
;
import
com.yeejoin.amos.supervision.dao.entity.*
;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.cxf.common.util.CollectionUtils
;
...
...
@@ -43,64 +50,10 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.DepartmentModel
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskDetailMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PlanTaskMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.ICatalogTreeDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.ICheckDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.ICheckInputDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.ICheckShotDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IInputItemDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanTaskDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanTaskDetailDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPointClassifyDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPointDao
;
import
com.yeejoin.amos.supervision.business.dto.CheckDto
;
import
com.yeejoin.amos.supervision.business.dto.CheckRecordDto
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckDetailBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckInfoBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckInputBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckTraListBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckUserBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.EquipmentInputItemRo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PlanRoutePointBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PointCheckDetailBo
;
import
com.yeejoin.amos.supervision.business.feign.EquipFeign
;
import
com.yeejoin.amos.supervision.business.param.CheckInfoListPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckInputParam
;
import
com.yeejoin.amos.supervision.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckRecordParam
;
import
com.yeejoin.amos.supervision.business.param.CheckStatisticalParam
;
import
com.yeejoin.amos.supervision.business.util.CheckDetailInputPageParam
;
import
com.yeejoin.amos.supervision.business.util.Toke
;
import
com.yeejoin.amos.supervision.core.common.response.AppCheckInputRespone
;
import
com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.supervision.core.common.response.CalendarStatusCountRespone
;
import
com.yeejoin.amos.supervision.core.common.response.CommonPage
;
import
com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.supervision.core.common.response.PatrolUserRespone
;
import
com.yeejoin.amos.supervision.core.common.response.PointInfoResponse
;
import
com.yeejoin.amos.supervision.core.common.response.PointPositionInfoSyn3DRespone
;
import
com.yeejoin.amos.supervision.core.common.response.QueryCriteriaRespone
;
import
com.yeejoin.amos.supervision.core.common.response.RouteResponse
;
import
com.yeejoin.amos.supervision.dao.entity.Check
;
import
com.yeejoin.amos.supervision.dao.entity.CheckInput
;
import
com.yeejoin.amos.supervision.dao.entity.CheckShot
;
import
com.yeejoin.amos.supervision.dao.entity.InputItem
;
import
com.yeejoin.amos.supervision.dao.entity.PlanTask
;
import
com.yeejoin.amos.supervision.dao.entity.PlanTaskDetail
;
import
com.yeejoin.amos.supervision.dao.entity.Point
;
import
com.yeejoin.amos.supervision.dao.entity.PointClassify
;
import
javax.annotation.Resource
;
import
javax.transaction.Transactional
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
(
"checkService"
)
public
class
CheckServiceImpl
implements
ICheckService
{
...
...
@@ -150,7 +103,7 @@ public class CheckServiceImpl implements ICheckService {
@Autowired
IPlanTaskService
planTaskService
;
// @Value("${file.ip}")
// @Value("${file.ip}")
// private String fileIp;
//
// @Value("${file.port}")
...
...
@@ -1384,7 +1337,7 @@ public class CheckServiceImpl implements ICheckService {
@Transactional
public
CheckDto
saveCheckRecord
(
CheckRecordParam
recordParam
,
ReginParams
reginParams
)
throws
Exception
{
ReginParams
.
PersonIdentity
personIdentity
=
reginParams
.
getPersonIdentity
();
if
(
ObjectUtils
.
isEmpty
(
reginParams
.
getUserModel
())
&&
ObjectUtils
.
isEmpty
(
reginParams
.
getCompany
())
&&
ObjectUtils
.
isEmpty
(
personIdentity
)
)
{
if
(
ObjectUtils
.
isEmpty
(
reginParams
.
getUserModel
())
&&
ObjectUtils
.
isEmpty
(
reginParams
.
getCompany
())
&&
ObjectUtils
.
isEmpty
(
personIdentity
))
{
throw
new
RuntimeException
(
"获取用户信息失败"
);
}
String
mtUserSeq
=
personIdentity
.
getPersonSeq
();
...
...
@@ -1435,20 +1388,20 @@ public class CheckServiceImpl implements ICheckService {
String
depId
=
check
.
getDepId
();
String
depName
=
check
.
getDepName
();
if
(!
userId
.
contains
(
mtUserSeq
))
{
check
.
setUserId
(
userId
+
","
+
mtUserSeq
);
check
.
setUserName
(
userName1
+
","
+
userName
);
check
.
setUserId
(
userId
+
","
+
mtUserSeq
);
check
.
setUserName
(
userName1
+
","
+
userName
);
}
if
(!
companyId
.
contains
(
reginParams
.
getCompany
().
getSequenceNbr
().
toString
()))
{
check
.
setCompanyId
(
companyId
+
","
+
reginParams
.
getCompany
().
getSequenceNbr
().
toString
());
check
.
setCompanyId
(
companyId
+
","
+
reginParams
.
getCompany
().
getSequenceNbr
().
toString
());
}
if
(!
companyName
.
contains
(
reginParams
.
getCompany
().
getCompanyName
()))
{
check
.
setCompanyName
(
companyName
+
","
+
reginParams
.
getCompany
().
getCompanyName
());
check
.
setCompanyName
(
companyName
+
","
+
reginParams
.
getCompany
().
getCompanyName
());
}
if
(!
depId
.
contains
(
personIdentity
.
getCompanyId
()))
{
check
.
setDepId
(
depId
+
","
+
personIdentity
.
getCompanyId
());
check
.
setDepId
(
depId
+
","
+
personIdentity
.
getCompanyId
());
}
if
(!
depName
.
contains
(
personIdentity
.
getCompanyName
()))
{
check
.
setDepName
(
depName
+
","
+
personIdentity
.
getCompanyName
());
check
.
setDepName
(
depName
+
","
+
personIdentity
.
getCompanyName
());
}
}
...
...
@@ -1561,7 +1514,7 @@ public class CheckServiceImpl implements ICheckService {
//7.返回不合格记录
return
new
CheckDto
(
check
.
getId
(),
unqualifiedCheckItemList
);
}
catch
(
Exception
e
)
{
throw
new
Exception
(
e
.
getMessage
(),
e
);
throw
new
Exception
(
e
.
getMessage
(),
e
);
}
}
...
...
@@ -1595,5 +1548,13 @@ public class CheckServiceImpl implements ICheckService {
return
checkMapper
.
checkHasRecord
(
planTaskId
,
pointId
);
}
@Override
public
Page
<
CheckVo
>
queryPage
(
CheckPageParam
param
)
{
long
total
=
checkMapper
.
queryPageCount
(
param
);
List
<
CheckVo
>
content
=
checkMapper
.
queryPage
(
param
);
Page
<
CheckVo
>
result
=
new
PageImpl
<
CheckVo
>(
content
,
param
,
total
);
return
result
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/InputItemServiceImpl.java
View file @
517a8d98
...
...
@@ -277,4 +277,12 @@ public class InputItemServiceImpl implements IInputItemService {
inputItemMapper
.
updatePointById
(
param
);
}
@Override
public
Page
<
InputItemVo
>
queryPage
(
InputItemPageParam
param
)
{
long
total
=
inputItemMapper
.
queryPageCount
(
param
);
List
<
InputItemVo
>
content
=
inputItemMapper
.
queryPage
(
param
);
Page
<
InputItemVo
>
result
=
new
PageImpl
<
InputItemVo
>(
content
,
param
,
total
);
return
result
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PlanServiceImpl.java
View file @
517a8d98
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.supervision.business.dao.mapper.RouteMapper;
import
com.yeejoin.amos.supervision.business.dao.repository.*
;
import
com.yeejoin.amos.supervision.business.param.PlanInfoPageParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPlanService
;
import
com.yeejoin.amos.supervision.common.enums.PlanStatusEnum
;
import
com.yeejoin.amos.supervision.core.common.request.AddPlanRequest
;
import
com.yeejoin.amos.supervision.core.common.response.PlanPointRespone
;
import
com.yeejoin.amos.supervision.core.util.DateUtil
;
...
...
@@ -81,6 +82,10 @@ public class PlanServiceImpl implements IPlanService {
Map
<
String
,
String
>
userIdNameMap
=
userModels
.
stream
().
collect
(
Collectors
.
toMap
(
AgencyUserModel:
:
getUserId
,
AgencyUserModel:
:
getRealName
));
content
.
forEach
(
c
->
{
this
.
buildUserName
(
c
,
"createBy"
,
userIdNameMap
);
if
(
c
.
containsKey
(
"status"
))
{
String
finishStatusDesc
=
PlanStatusEnum
.
getName
(
Integer
.
parseInt
(
c
.
get
(
"status"
).
toString
()));
c
.
put
(
"statusDesc"
,
finishStatusDesc
);
}
});
return
new
PageImpl
<>(
content
,
param
,
total
);
}
...
...
@@ -110,7 +115,7 @@ public class PlanServiceImpl implements IPlanService {
String
orgCode
=
map
.
get
(
"org_code"
)
==
null
?
""
:
map
.
get
(
"org_code"
).
toString
();
String
userId
=
map
.
get
(
"user_id"
)
==
null
?
""
:
map
.
get
(
"user_id"
).
toString
();
param
.
setOrgCode
(
orgCode
);
param
.
setStatus
(
Byte
.
parseByte
(
XJConstant
.
PLAN_STATUS_STOP
));
//
param.setStatus(Byte.parseByte(XJConstant.PLAN_STATUS_STOP));
param
.
setNextGenDate
(
DateUtil
.
getIntervalDate
(
new
Date
(),
0
));
param
.
setCreateBy
(
userId
);
addPlanRequest
.
setPlan
(
param
);
...
...
@@ -144,7 +149,7 @@ public class PlanServiceImpl implements IPlanService {
if
(
plan
.
getId
()>
0
)
{
// 删除相关点项内容
iRoutePointDao
.
delRoutePointByRouteId
(
plan
.
getRouteId
());
iRoutePointItemDao
.
delRoutePointItem
(
plan
.
getRouteId
());
//
iRoutePointItemDao.delRoutePointItem(plan.getRouteId());
saveRoute
.
setId
(
plan
.
getRouteId
());
}
...
...
@@ -173,16 +178,16 @@ public class PlanServiceImpl implements IPlanService {
iRoutePointDao
.
save
(
routePoint
);
// List<PointInputItem> pointInputItems = pointMapper.getCheckPointById(point);
List
<
PointInputItem
>
pointInputItems
=
iPointInputItemDao
.
getPointInputItemByPointId
(
point
);
pointMapper
.
getPointClassInputItemById
(
point
);
if
(!
ObjectUtils
.
isEmpty
(
pointInputItems
))
{
pointInputItems
.
forEach
(
pointInputItem
->
{
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setRoutePointId
(
routePoint
.
getId
());
routePointItem
.
setPointInputItemId
(
pointInputItem
.
getId
());
iRoutePointItemDao
.
save
(
routePointItem
);
});
}
//
List<PointInputItem> pointInputItems = iPointInputItemDao.getPointInputItemByPointId(point);
//
pointMapper.getPointClassInputItemById(point);
//
if (!ObjectUtils.isEmpty(pointInputItems)) {
//
pointInputItems.forEach(pointInputItem -> {
//
RoutePointItem routePointItem = new RoutePointItem();
//
routePointItem.setRoutePointId(routePoint.getId());
//
routePointItem.setPointInputItemId(pointInputItem.getId());
//
iRoutePointItemDao.save(routePointItem);
//
});
//
}
});
}
}
...
...
@@ -236,7 +241,7 @@ public class PlanServiceImpl implements IPlanService {
for
(
long
planId
:
planIds
)
{
List
<
Plan
>
planList
=
getPlanByRouteId
(
planId
);
for
(
Plan
plan
:
planList
)
{
plan
.
setStatus
(
(
byte
)
1
);
plan
.
setStatus
(
1
);
planDao
.
save
(
plan
);
}
}
...
...
@@ -265,7 +270,7 @@ public class PlanServiceImpl implements IPlanService {
}
@Override
public
void
setplanstatus
(
Long
id
,
byte
status
)
{
public
void
setplanstatus
(
Long
id
,
Integer
status
)
{
Plan
oriPlan
=
planDao
.
findById
(
id
).
get
();
oriPlan
.
setStatus
(
status
);
planDao
.
save
(
oriPlan
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/PointServiceImpl.java
View file @
517a8d98
...
...
@@ -3,46 +3,25 @@ package com.yeejoin.amos.supervision.business.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Sequence
;
import
com.google.common.base.Joiner
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.safety.common.cache.PointStatusCache
;
import
com.yeejoin.amos.supervision.business.constants.XJConstant
;
import
com.yeejoin.amos.supervision.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.PointMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.RouteMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.*
;
import
com.yeejoin.amos.supervision.business.dao.repository.ICatalogTreeDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanTaskDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanTaskDetailDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPointClassifyDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPointDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPointInputItemDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPointPhotoDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointItemDao
;
import
com.yeejoin.amos.supervision.business.dto.FormValue
;
import
com.yeejoin.amos.supervision.business.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.supervision.business.dto.PointDto
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckPtListBo
;
import
com.yeejoin.amos.supervision.business.feign.EquipFeign
;
import
com.yeejoin.amos.supervision.business.param.*
;
import
com.yeejoin.amos.supervision.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.supervision.business.param.MovePointParam
;
import
com.yeejoin.amos.supervision.business.param.PointImportParam
;
import
com.yeejoin.amos.supervision.business.param.PointImportQueryParam
;
import
com.yeejoin.amos.supervision.business.param.PointParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.IPointService
;
import
com.yeejoin.amos.supervision.business.util.DaoCriteria
;
import
com.yeejoin.amos.supervision.business.vo.*
;
import
com.yeejoin.amos.supervision.business.vo.InputItemVo
;
import
com.yeejoin.amos.supervision.business.vo.LeavelMovePointVo
;
import
com.yeejoin.amos.supervision.business.vo.MaintenanceResourceData
;
import
com.yeejoin.amos.supervision.business.vo.PointClassifyVo
;
import
com.yeejoin.amos.supervision.business.vo.PointInputItemVo
;
import
com.yeejoin.amos.supervision.business.vo.PointVo
;
import
com.yeejoin.amos.supervision.common.enums.PointStatusEnum
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.response.PointResponse
;
...
...
@@ -51,19 +30,8 @@ import com.yeejoin.amos.supervision.core.util.query.BaseQuerySpecification;
import
com.yeejoin.amos.supervision.dao.entity.*
;
import
com.yeejoin.amos.supervision.exception.YeeException
;
import
com.yeejoin.amos.supervision.feign.RemoteSecurityService
;
import
com.yeejoin.amos.safety.common.cache.PointStatusCache
;
import
com.yeejoin.amos.supervision.dao.entity.CatalogTree
;
import
com.yeejoin.amos.supervision.dao.entity.InputItem
;
import
com.yeejoin.amos.supervision.dao.entity.PlanTask
;
import
com.yeejoin.amos.supervision.dao.entity.PlanTaskDetail
;
import
com.yeejoin.amos.supervision.dao.entity.Point
;
import
com.yeejoin.amos.supervision.dao.entity.PointClassify
;
import
com.yeejoin.amos.supervision.dao.entity.PointInputItem
;
import
com.yeejoin.amos.supervision.dao.entity.PointPhoto
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.assertj.core.util.Sets
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -141,7 +109,7 @@ public class PointServiceImpl implements IPointService {
Point
point
=
pointParam
.
getPoint
();
point
.
setIsDelete
(
false
);
iPointDao
.
saveAndFlush
(
point
);
addClassifyAndInputItem
(
pointParam
,
point
);
//
addClassifyAndInputItem(pointParam, point);
return
point
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/RoutePointItemServiceImpl.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
impl
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.supervision.business.dao.mapper.InputItemMapper
;
import
com.yeejoin.amos.supervision.business.dao.mapper.RoutePointItemMapper
;
import
com.yeejoin.amos.supervision.business.dao.repository.IPlanDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointDao
;
import
com.yeejoin.amos.supervision.business.dao.repository.IRoutePointItemDao
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.service.intfc.IRoutePointItemService
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.common.enums.PlanStatusEnum
;
import
com.yeejoin.amos.supervision.dao.entity.InputItem
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePoint
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePointItem
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
@Service
(
"routePointItemService"
)
public
class
RoutePointItemServiceImpl
implements
IRoutePointItemService
{
@Autowired
private
IRoutePointItemDao
routePointItemDao
;
@Autowired
private
IRoutePointDao
routePointDao
;
@Autowired
private
IPlanDao
planDao
;
@Autowired
private
InputItemMapper
inputItemMapper
;
@Autowired
private
RoutePointItemMapper
routePointItemMapper
;
@Override
@Transactional
public
List
<
RoutePointItem
>
addRoutePointItemList
(
Plan
plan
,
List
<
Long
>
inputItemIds
,
Boolean
status
,
String
userId
)
{
Long
planId
=
plan
.
getId
();
Long
routeId
=
plan
.
getRouteId
();
if
(
routeId
!=
null
&&
planId
!=
null
)
{
if
(
status
)
{
planDao
.
updatePlanStatus
(
PlanStatusEnum
.
EXAMINE_DEVELOPED
.
getValue
(),
planId
);
}
else
{
if
(
CollectionUtils
.
isNotEmpty
(
inputItemIds
))
{
List
<
InputItem
>
inputItemList
=
inputItemMapper
.
findByIdIn
(
inputItemIds
);
List
<
RoutePoint
>
routePointList
=
routePointDao
.
findByRouteId
(
routeId
);
if
(
CollectionUtils
.
isNotEmpty
(
inputItemList
)
&&
CollectionUtils
.
isNotEmpty
(
routePointList
))
{
List
<
RoutePointItem
>
list
=
new
ArrayList
<>();
routePointList
.
stream
().
forEach
(
route
->
{
Long
routePointId
=
route
.
getId
();
inputItemList
.
stream
().
forEach
(
item
->
{
RoutePointItem
routePointItem
=
new
RoutePointItem
();
routePointItem
.
setPlanId
(
planId
);
routePointItem
.
setInputItemId
(
item
.
getId
());
routePointItem
.
setBasisJson
(
item
.
getBasisJson
());
routePointItem
.
setOrderNo
(
item
.
getOrderNo
());
routePointItem
.
setRoutePointId
(
routePointId
);
routePointItem
.
setCreatorId
(
userId
);
routePointItem
.
setCreateDate
(
new
Date
());
list
.
add
(
routePointItem
);
});
});
return
routePointItemDao
.
saveAll
(
list
);
}
}
}
}
return
Lists
.
newArrayList
();
}
@Override
public
Page
<
RoutePointItemVo
>
queryPage
(
InputItemPageParam
param
)
{
long
total
=
routePointItemMapper
.
queryPageCount
(
param
);
List
<
RoutePointItemVo
>
content
=
routePointItemMapper
.
queryPage
(
param
);
Page
<
RoutePointItemVo
>
result
=
new
PageImpl
<
RoutePointItemVo
>(
content
,
param
,
total
);
return
result
;
}
@Override
public
Integer
deleteByIdIn
(
List
<
Long
>
ids
)
{
if
(
CollectionUtils
.
isNotEmpty
(
ids
))
{
return
routePointItemDao
.
deleteByRoutePointItemId
(
ids
);
}
return
0
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/impl/SynDataServiceImpl.java
View file @
517a8d98
...
...
@@ -294,7 +294,7 @@ public class SynDataServiceImpl implements ISynDataService {
plan
.
setMinSpace
(
0
);
plan
.
setIsScore
(
"1"
);
plan
.
setError
(
0
);
plan
.
setStatus
(
Byte
.
parseByte
(
XJConstant
.
PLAN_STATUS_START
));
plan
.
setStatus
(
Integer
.
parseInt
(
XJConstant
.
PLAN_STATUS_START
));
plan
.
setNextGenDate
(
DateUtil
.
getIntervalDate
(
now
,
0
));
plan
.
setCreateBy
(
userId
.
toString
());
plan
.
setRemark1
(
synPlanParam
.
getRemark
());
...
...
@@ -381,7 +381,7 @@ public class SynDataServiceImpl implements ISynDataService {
public
CommonResponse
stopPlan
(
String
originalId
)
{
Plan
plan
=
iPlanDao
.
findByOriginalId
(
originalId
);
if
(
plan
!=
null
)
{
plan
.
setStatus
(
Byte
.
parseByte
(
XJConstant
.
PLAN_STATUS_STOP
));
plan
.
setStatus
(
Integer
.
parseInt
(
XJConstant
.
PLAN_STATUS_STOP
));
iPlanDao
.
save
(
plan
);
List
<
PlanTask
>
planTasks
=
iplanTaskDao
.
findByPlanId
(
plan
.
getId
());
if
(!
CollectionUtils
.
isEmpty
(
planTasks
))
{
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/ICheckService.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
intfc
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.exception.YeeException
;
import
org.springframework.data.domain.Page
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.yeejoin.amos.boot.biz.common.bo.DepartmentBo
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.supervision.business.dto.CheckDto
;
import
com.yeejoin.amos.supervision.business.dto.CheckRecordDto
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckDetailBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckInfoBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckInputBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckTraListBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.CheckUserBo
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.PlanRoutePointBo
;
import
com.yeejoin.amos.supervision.business.param.CheckInfoListPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckInfoPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckPtListPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckRecordParam
;
import
com.yeejoin.amos.supervision.business.param.CheckStatisticalParam
;
import
com.yeejoin.amos.supervision.business.entity.mybatis.*
;
import
com.yeejoin.amos.supervision.business.param.*
;
import
com.yeejoin.amos.supervision.business.util.CheckDetailInputPageParam
;
import
com.yeejoin.amos.supervision.business.util.Toke
;
import
com.yeejoin.amos.supervision.business.vo.CheckAnalysisVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckInfoVo
;
import
com.yeejoin.amos.supervision.business.vo.CheckVo
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.response.AppPointCheckRespone
;
import
com.yeejoin.amos.supervision.core.common.response.CommonPage
;
import
com.yeejoin.amos.supervision.core.common.response.GraphInitDataResponse
;
import
com.yeejoin.amos.supervision.core.common.response.QueryCriteriaRespone
;
import
com.yeejoin.amos.supervision.dao.entity.CheckShot
;
import
com.yeejoin.amos.supervision.exception.YeeException
;
import
org.springframework.data.domain.Page
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
interface
ICheckService
{
/**
...
...
@@ -65,9 +53,9 @@ public interface ICheckService {
*/
List
<
Map
>
queryUnqualifiedInputItem
(
int
checkId
);
AppPointCheckRespone
queryCheckPointDetail
(
String
toke
,
String
product
,
String
appKey
,
long
checkId
);
AppPointCheckRespone
queryCheckPointDetail
(
String
toke
,
String
product
,
String
appKey
,
long
checkId
);
AppPointCheckRespone
queryCheckPointDetailInVersion2
(
String
toke
,
String
product
,
String
appKey
,
long
checkId
);
AppPointCheckRespone
queryCheckPointDetailInVersion2
(
String
toke
,
String
product
,
String
appKey
,
long
checkId
);
/**
* 巡检统计
...
...
@@ -93,7 +81,7 @@ public interface ICheckService {
*/
Map
<
String
,
Object
>
queryRecordById
(
int
checkId
);
List
<
CheckInfoVo
>
getCheckInfoList
(
String
toke
,
String
product
,
String
appKey
,
CheckInfoPageParam
param
);
List
<
CheckInfoVo
>
getCheckInfoList
(
String
toke
,
String
product
,
String
appKey
,
CheckInfoPageParam
param
);
/**
* 查询巡检记录所有图片
...
...
@@ -117,7 +105,7 @@ public interface ICheckService {
* @param ids
* @return
*/
List
<
CheckInfoVo
>
getSelectedCheckInfoList
(
String
toke
,
String
product
,
String
appKey
,
Long
[]
ids
);
List
<
CheckInfoVo
>
getSelectedCheckInfoList
(
String
toke
,
String
product
,
String
appKey
,
Long
[]
ids
);
/**
* 本月隐患治理趋势统计
...
...
@@ -135,7 +123,7 @@ public interface ICheckService {
* @param userInfo
* @return
*/
QueryCriteriaRespone
getQueryCriteriaInit
(
String
toke
,
String
product
,
String
appKey
,
String
loginOrgCode
,
String
roleTypeName
,
String
departmentId
,
String
companyId
);
QueryCriteriaRespone
getQueryCriteriaInit
(
String
toke
,
String
product
,
String
appKey
,
String
loginOrgCode
,
String
roleTypeName
,
String
departmentId
,
String
companyId
);
List
<
HashMap
<
String
,
String
>>
getCalCountChkInfo
(
HashMap
<
String
,
Object
>
paramMap
);
...
...
@@ -161,7 +149,8 @@ public interface ICheckService {
* @param param
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getEquipInputByCheckId
(
CheckDetailInputPageParam
param
);
List
<
HashMap
<
String
,
Object
>>
getEquipInputByCheckId
(
CheckDetailInputPageParam
param
);
/**
* 根据巡检记录ID和巡检点ID获取巡检记录详情
*
...
...
@@ -202,7 +191,7 @@ public interface ICheckService {
* @param user
* @return
*/
QueryCriteriaRespone
findCheckSystemInit
(
String
toke
,
String
product
,
String
appKey
,
String
type
,
String
orgCode
,
String
roleTypeName
,
String
departmentId
,
String
companyId
);
QueryCriteriaRespone
findCheckSystemInit
(
String
toke
,
String
product
,
String
appKey
,
String
type
,
String
orgCode
,
String
roleTypeName
,
String
departmentId
,
String
companyId
);
/**
* 巡检记录查询
...
...
@@ -212,7 +201,7 @@ public interface ICheckService {
*/
Page
<
CheckInfoBo
>
getCheckInfoList
(
CheckInfoListPageParam
params
);
Page
<
Map
<
String
,
Object
>>
getCheckInfoList1
(
String
toke
,
String
product
,
String
appKey
,
CheckInfoListPageParam
params
);
Page
<
Map
<
String
,
Object
>>
getCheckInfoList1
(
String
toke
,
String
product
,
String
appKey
,
CheckInfoListPageParam
params
);
/**
* 视图模块初始化数据
...
...
@@ -245,25 +234,27 @@ public interface ICheckService {
*/
List
<
Long
>
getCheckDataCount
(
HashMap
<
String
,
Object
>
param
);
List
<
String
>
getCheckPhotosByCheckAndInputId
(
int
checkId
,
int
checkInputId
,
int
classifyId
);
List
<
String
>
getCheckPhotosByCheckAndInputId
(
int
checkId
,
int
checkInputId
,
int
classifyId
);
List
<
String
>
getLivePhotos
(
Long
checkID
);
List
<
Long
>
getPlanCheckDataCount
(
HashMap
<
String
,
Object
>
param
);
/**
* 查询巡检装备
*
* @param param
* @return
*/
List
<
HashMap
<
String
,
Object
>>
getEquipByCheckId
(
CheckDetailInputPageParam
param
);
List
<
HashMap
<
String
,
Object
>>
getEquipByCheckId
(
CheckDetailInputPageParam
param
);
/**
* 最近一次漏检记录
*
* @param relationId 关系id
* @return CheckRecordDto
*/
Map
<
String
,
CheckRecordDto
>
obtainLastCheckRecord
(
String
[]
relationId
);
Map
<
String
,
CheckRecordDto
>
obtainLastCheckRecord
(
String
[]
relationId
);
Page
<
HashMap
<
String
,
Object
>>
getPlanExecuteInfo
(
HashMap
<
String
,
Object
>
map
,
CommonPageable
page
);
...
...
@@ -273,6 +264,7 @@ public interface ICheckService {
/**
* 保存检查记录
*
* @param recordParam 填写记录
* @param reginParams 权限信息
* @return CheckDto
...
...
@@ -281,9 +273,12 @@ public interface ICheckService {
/**
* 校验是否已经填写过
*
* @param planTaskId
* @param pointId
* @return
*/
int
checkHasRecord
(
Long
planTaskId
,
Long
pointId
);
Page
<
CheckVo
>
queryPage
(
CheckPageParam
criterias
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IInputItemService.java
View file @
517a8d98
...
...
@@ -118,4 +118,6 @@ public interface IInputItemService {
List
getItemParent
(
String
id
);
void
updatePointById
(
Map
<
String
,
Object
>
param
);
Page
<
InputItemVo
>
queryPage
(
InputItemPageParam
criterias
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IPlanService.java
View file @
517a8d98
...
...
@@ -76,7 +76,7 @@ public interface IPlanService {
/**
* 计划启用停用
*/
void
setplanstatus
(
Long
id
,
byte
status
);
void
setplanstatus
(
Long
id
,
Integer
status
);
/**
* 获取计划详情
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/service/intfc/IRoutePointItemService.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
service
.
intfc
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
com.yeejoin.amos.supervision.business.vo.RoutePointItemVo
;
import
com.yeejoin.amos.supervision.dao.entity.Plan
;
import
com.yeejoin.amos.supervision.dao.entity.RoutePointItem
;
import
org.springframework.data.domain.Page
;
import
java.util.List
;
public
interface
IRoutePointItemService
{
List
<
RoutePointItem
>
addRoutePointItemList
(
Plan
plan
,
List
<
Long
>
inputItemIds
,
Boolean
status
,
String
userId
);
Page
<
RoutePointItemVo
>
queryPage
(
InputItemPageParam
criterias
);
Integer
deleteByIdIn
(
List
<
Long
>
ids
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/util/CheckParamUtil.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
util
;
import
java.text.SimpleDateFormat
;
import
java.util.List
;
import
com.yeejoin.amos.supervision.business.param.CheckPageParam
;
import
com.yeejoin.amos.supervision.business.param.CheckRecordParam
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.request.CommonRequest
;
import
com.yeejoin.amos.supervision.core.enums.QueryOperatorEnum
;
import
org.springframework.util.ObjectUtils
;
import
java.text.SimpleDateFormat
;
import
java.util.HashMap
;
import
java.util.List
;
public
class
CheckParamUtil
{
public
static
CheckRecordParam
checkCalendar
(
List
<
DaoCriteria
>
daoCriterias
)
{
public
static
CheckRecordParam
checkCalendar
(
List
<
DaoCriteria
>
daoCriterias
)
{
CheckRecordParam
param
=
new
CheckRecordParam
();
for
(
int
i
=
0
;
i
<
daoCriterias
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
daoCriterias
.
size
();
i
++)
{
DaoCriteria
daoCriteria
=
daoCriterias
.
get
(
i
);
String
operator
=
daoCriteria
.
getOperator
();
String
name
=
daoCriteria
.
getPropertyName
();
if
(
"checkTime"
.
equals
(
name
))
{
if
(
"checkTime"
.
equals
(
name
))
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM"
);
param
.
setCheckTime
(
daoCriterias
.
get
(
i
).
getValue
().
toString
());
}
else
if
(
"routeId"
.
equals
(
name
))
{
}
else
if
(
"routeId"
.
equals
(
name
))
{
param
.
setRouteId
(
Long
.
valueOf
(
daoCriterias
.
get
(
i
).
getValue
().
toString
()));
}
else
if
(
"orgCode"
.
equals
(
name
)
&&
operator
.
equals
(
QueryOperatorEnum
.
EQUAL
.
getName
())){
param
.
setOrgCode
(
daoCriterias
.
get
(
i
).
getValue
().
toString
()+
"%"
);
}
else
if
(
"orgCode"
.
equals
(
name
)
&&
operator
.
equals
(
QueryOperatorEnum
.
EQUAL
.
getName
()))
{
param
.
setOrgCode
(
daoCriterias
.
get
(
i
).
getValue
().
toString
()
+
"%"
);
}
}
return
param
;
}
public
static
CheckPageParam
fillCheckPageParam
(
List
<
CommonRequest
>
queryRequests
,
CommonPageable
commonPageable
,
HashMap
<
String
,
Object
>
perMap
)
{
CheckPageParam
param
=
new
CheckPageParam
();
if
(
queryRequests
!=
null
&&
!
queryRequests
.
isEmpty
())
{
for
(
int
i
=
0
;
i
<
queryRequests
.
size
();
i
++)
{
String
name
=
queryRequests
.
get
(
i
).
getName
();
if
(
ObjectUtils
.
isEmpty
(
queryRequests
.
get
(
i
).
getValue
()))
{
continue
;
}
if
(
"planId"
.
equals
(
name
))
{
param
.
setPlanId
(
Long
.
parseLong
(
queryRequests
.
get
(
i
).
getValue
().
toString
()));
}
else
if
(
"companyId"
.
equals
(
name
))
{
param
.
setCompanyId
(
Long
.
parseLong
(
queryRequests
.
get
(
i
).
getValue
().
toString
()));
}
}
}
param
.
setOrgCode
(
perMap
.
get
(
"orgCode"
).
toString
());
if
(
commonPageable
!=
null
)
{
param
.
setOffset
(
Integer
.
parseInt
(
String
.
valueOf
(
commonPageable
.
getOffset
())));
param
.
setPageNumber
(
commonPageable
.
getPageNumber
());
param
.
setPageSize
(
commonPageable
.
getPageSize
());
}
return
param
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/util/InputItemParamUtil.java
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
util
;
import
java.sql.PreparedStatement
;
import
java.util.HashMap
;
import
java.util.List
;
import
com.yeejoin.amos.supervision.business.param.InputItemPageParam
;
import
org.springframework.util.ObjectUtils
;
import
com.yeejoin.amos.supervision.core.common.request.CommonPageable
;
import
com.yeejoin.amos.supervision.core.common.request.CommonRequest
;
import
com.yeejoin.amos.supervision.dao.entity.InputItem
;
import
org.springframework.util.ObjectUtils
;
import
java.util.HashMap
;
import
java.util.List
;
public
class
InputItemParamUtil
{
...
...
@@ -58,6 +56,14 @@ public class InputItemParamUtil {
param
.
setInputClassify
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"itemClassify"
.
equals
(
name
))
{
param
.
setItemClassify
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"checkTypeId"
.
equals
(
name
))
{
param
.
setCheckTypeId
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"itemStart"
.
equals
(
name
))
{
param
.
setItemStart
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
else
if
(
"planId"
.
equals
(
name
))
{
param
.
setPlanId
(
Long
.
parseLong
(
queryRequests
.
get
(
i
).
getValue
().
toString
()));
}
else
if
(
"itemTypeClassifyIds"
.
equals
(
name
))
{
param
.
setItemTypeClassifyIds
(
toString
(
queryRequests
.
get
(
i
).
getValue
()));
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/vo/CheckVo.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
vo
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
CheckVo
{
/**
* 检查项ID
*/
private
Long
inputItemId
;
/**
* 检查项名称
*/
private
String
inputItemName
;
/**
* 安全隐患个数
*/
private
Integer
safetyDangerNum
;
/**
* 重大隐患个数
*/
private
Integer
majorDangerNum
;
/**
* 检查时间
*/
private
Date
checkTime
;
/**
* 检查人
*/
private
String
userName
;
/**
* 责任单位ID
*/
private
String
companyId
;
/**
* 责任单位
*/
private
String
companyName
;
/**
* 扩展属性
*/
private
String
ext
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/vo/InputItemVo.java
View file @
517a8d98
...
...
@@ -4,7 +4,7 @@ import java.util.Date;
public
class
InputItemVo
{
private
long
id
;
private
long
id
;
/**
* 分类ID
*/
...
...
@@ -121,12 +121,17 @@ public class InputItemVo {
*/
private
String
inputClassify
;
private
String
checkTypeId
;
private
String
checkType
;
private
String
itemParent
;
private
String
itemClassify
;
private
String
itemTypeClassify
;
private
String
itemLevel
;
private
String
itemStart
;
/**
* 扩展属性
*/
private
String
ext
;
public
String
getCheckType
()
{
return
checkType
;
...
...
@@ -381,4 +386,19 @@ public class InputItemVo {
this
.
riskDesc
=
riskDesc
;
}
public
String
getCheckTypeId
()
{
return
checkTypeId
;
}
public
void
setCheckTypeId
(
String
checkTypeId
)
{
this
.
checkTypeId
=
checkTypeId
;
}
public
String
getExt
()
{
return
ext
;
}
public
void
setExt
(
String
ext
)
{
this
.
ext
=
ext
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/business/vo/RoutePointItemVo.java
0 → 100644
View file @
517a8d98
package
com
.
yeejoin
.
amos
.
supervision
.
business
.
vo
;
import
lombok.Data
;
@Data
public
class
RoutePointItemVo
{
private
Long
id
;
/**
* 检查项ID
*/
private
Long
itemId
;
/**
* 检查项名称
*/
private
String
name
;
private
String
itemType
;
private
String
inputClassify
;
private
String
checkType
;
private
String
itemClassify
;
private
String
itemTypeClassify
;
private
String
itemLevel
;
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-supervision-biz/src/main/java/com/yeejoin/amos/supervision/core/framework/PersonIdentifyAspect.java
View file @
517a8d98
...
...
@@ -53,7 +53,7 @@ public class PersonIdentifyAspect {
ReginParams
.
PersonIdentity
personIdentity
=
new
ReginParams
.
PersonIdentity
();
if
(!
ObjectUtils
.
isEmpty
(
result
))
{
Map
map
=
(
Map
)
result
.
get
(
0
);
Map
other
=
(
Map
)
map
.
get
(
"
other
"
);
Map
other
=
(
Map
)
map
.
get
(
"
DEPARTMENT
"
);
Map
person
=
(
Map
)
map
.
get
(
"PERSON"
);
if
(!
ObjectUtils
.
isEmpty
(
person
))
{
personIdentity
.
setPersonSeq
((
String
)
person
.
get
(
"sequenceNbr"
));
...
...
amos-boot-system-jcs/src/main/resources/application.properties
View file @
517a8d98
spring.application.name
=
JCS
-chenhao
spring.application.name
=
JCS
server.servlet.context-path
=
/jcs
server.port
=
11100
spring.profiles.active
=
dev
...
...
@@ -7,10 +7,10 @@ spring.jackson.time-zone=GMT+8
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
logging.config
=
classpath:logback-${spring.profiles.active}.xml
## mybatis-plus
é ç½®æ§å¶å°æå°å®æ´å¸¦åæ°SQLè¯å¥
## mybatis-plus
配置控制台打印完整带参数SQL语句
mybatis-plus.configuration.log-impl
=
org.apache.ibatis.logging.stdout.StdOutImpl
## redis
å¤±ææ¶é´
## redis
失效时间
redis.cache.failure.time
=
10800
## unit(h)
...
...
@@ -52,17 +52,21 @@ spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time
=
300
#在重启服务的过程中是否清空缓存的标识符 --2021-09-09
my.spring.redis.cache.isclean
=
false
## mqtt-
è¦æ åæ¥æ¶æ¯ä¸»é¢
## mqtt-
警情初报消息主题
mqtt.topic.alert.reporting
=
alertReporting
##
å®æææ¥æ°è¦æ �?�æ¥ä¸»é¢
##
实战指挥新警情主题
mqtt.topic.command.alert.notice
=
alertNotice
##
è·é©¬ç¯å°éï¼å¤©æ°é¢è¦ä¿¡æ¯
##
跑马灯地震、天气预警信息
mqtt.topic.command.meteorological.notice
=
meteorological
mqtt.topic.command.power.deployment
=
power
mqtt.topic.alert.iot
=
iotnews
mqtt.topic.alert.iot.web
=
iotNewsWeb
security.systemctl.name
=
AMOS-API-SYSTEMCTL
jcs.company.topic.add
=
jcs/company/topic/add
...
...
@@ -70,10 +74,13 @@ jcs.company.topic.delete=jcs/company/topic/delete
iot.fegin.name
=
AMOS-API-IOT
equip.fegin.name
=
AMOS-EQUIPMANAGE
equip.fegin.name
=
AMOS-EQUIPMANAGE
-kfm
##
设å¤è卿å¡ï¼è½¦åºé¨ã广æãè¦éï¼
##
设备联动服务(车库门、广播、警铃)
control.fegin.name
=
JCS-API-CONTROL
##
æ éæ¥ä¿®æµç¨
##
故障报修流程
failure.work.flow.processDefinitionKey
=
malfunction_repair
#设置文件上传的大小限制
spring.servlet.multipart.maxFileSize
=
3MB
spring.servlet.multipart.maxRequestSize
=
3MB
\ No newline at end of file
amos-boot-system-jcs/src/main/resources/db/changelog/jcs-1.0.0.0.xml
View file @
517a8d98
...
...
@@ -163,7 +163,13 @@
</changeSet>
<changeSet
author=
"litengwei"
id=
"2021-09-01-litengwei-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_data_dictionary"
/>
<!-- <sqlCheck expectedResult="0">select count(*) from cb_data_dictionary where sequence_nbr between 1152 and-->
<!-- 1166</sqlCheck>-->
<not>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"cb_data_dictionary"
/>
</not>
</preConditions>
<comment>
add data cb_data_dictionary
</comment>
<sql>
...
...
@@ -187,6 +193,9 @@
<changeSet
author=
"litengwei"
id=
"2021-09-01-litengwei-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"jc_alert_form"
/>
<not>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"jc_alert_form"
/>
</not>
</preConditions>
<comment>
add data jc_alert_form
</comment>
<sql>
...
...
@@ -270,6 +279,9 @@
<changeSet
author=
"chenhao"
id=
"2021-09-06-chenhao-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_data_dictionary"
/>
<not>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"cb_data_dictionary"
/>
</not>
</preConditions>
<comment>
insert data cb_data_dictionary
</comment>
<sql>
...
...
@@ -313,6 +325,24 @@
</sql>
</changeSet>
<changeSet
author=
"chenhao"
id=
"2021-09-13-chenhao-1"
>
<comment>
update data cb_firefighters_workexperience
</comment>
<sql>
ALTER TABLE `cb_firefighters_workexperience` modify working_hours date COMMENT '参加工作时间';
ALTER TABLE `cb_firefighters_workexperience` modify fire_working_hours date COMMENT '参加消防部门工作时间';
</sql>
</changeSet>
<changeSet
author=
"kongfm"
id=
"2021-09-13-kongfm-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_firefighters"
/>
</preConditions>
<comment>
BUG 3658 优化 by kongfm 2021-09-13 需求详细说明 1. 添加两个字段 2. 地区选择联动 只有新增时带联动 编辑时不带联动 3. 导出模板及导入同步修改
</comment>
<sql>
ALTER TABLE `cb_firefighters` add native_place_val varchar(255) COMMENT '户籍所在地详细地址';
ALTER TABLE `cb_firefighters` add residence_detail_val varchar(255) COMMENT '现居住地详细地址';
</sql>
</changeSet>
<changeSet
author=
"chenzhao"
id=
"2021-09-07-chenzhao"
>
<preConditions
onFail=
"MARK_RAN"
>
...
...
@@ -428,4 +458,29 @@
</sql>
</changeSet>
<changeSet
author=
"kongfm"
id=
"2021-09-15-kongfm-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_org_usr"
/>
</preConditions>
<comment>
BUG 2889 机场单位主键不为long 导致一系列报错,修改主键类型
</comment>
<sql>
alter table cb_org_usr MODIFY sequence_nbr BIGINT(32);
</sql>
</changeSet>
<changeSet
author=
"kongfm"
id=
"2021-09-15-kongfm-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"cb_dynamic_form_column"
/>
<not>
<primaryKeyExists
primaryKeyName=
"sequence_nbr"
tableName=
"cb_dynamic_form_column"
/>
</not>
</preConditions>
<comment>
优化项958 值班区域字段添加
</comment>
<sql>
INSERT INTO cb_dynamic_form_column (sequence_nbr, field_code, field_name, field_type, group_id, query_strategy, not_null, block, group_code, rec_date, is_delete) VALUES ('132828674811007', 'dutyArea', '值班区域', 'input', '132828674811', 'like', b'0', b'0', 'dutyPerson', '2021-09-14 02:29:15', b'0');
INSERT INTO cb_dynamic_form_column (sequence_nbr, field_code, field_name, field_type, group_id, query_strategy, not_null, block, group_code, rec_date, is_delete) VALUES ('132828674811008', 'dutyAreaId', '值班区域Id', 'input', '132828674811', 'eq', b'1', b'0', 'dutyPerson', '2021-09-14 02:29:15', b'0');
INSERT INTO cb_dynamic_form_column (sequence_nbr, field_code, field_name, field_type, group_id, query_strategy, not_null, block, group_code, rec_date, is_delete) VALUES ('132828674810009', 'dutyArea', '值班区域', 'input', '132828674810', 'like', b'0', b'0', 'dutyCar', '2021-09-14 02:29:15', b'0');
INSERT INTO cb_dynamic_form_column (sequence_nbr, field_code, field_name, field_type, group_id, query_strategy, not_null, block, group_code, rec_date, is_delete) VALUES ('132828674810010', 'dutyAreaId', '值班区域Id', 'input', '132828674810', 'eq', b'1', b'0', 'dutyCar', '2021-09-14 02:29:15', b'0');
</sql>
</changeSet>
</databaseChangeLog>
amos-boot-system-patrol/src/main/resources/application.properties
View file @
517a8d98
...
...
@@ -48,3 +48,7 @@ amosRefresh.patrol.topic =patrolCheckInsert
management.endpoints.web.exposure.exclude
=
*
## redis失效时间
redis.cache.failure.time
=
10800
rule.definition.load
=
false
rule.definition.model-package
=
com.yeejoin.amos.patrol.business.entity.mybatis
rule.definition.default-agency
=
STATE_GRID
\ No newline at end of file
amos-boot-system-patrol/src/main/resources/db/changelog/patrol-3.0.1.xml
View file @
517a8d98
...
...
@@ -84,4 +84,41 @@
MODIFY COLUMN `dep_name` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '执行部门名称';
</sql>
</changeSet>
<changeSet
author=
"tb"
id=
"tb-202109101731-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_latent_danger"
columnName=
"biz_type"
/>
</not>
</preConditions>
<comment>
p_latent_danger add COLUMN biz_type '业务类型(不同业务创建的隐患以此区分)'
</comment>
<sql>
ALTER TABLE p_latent_danger add COLUMN `biz_type` varchar(30) DEFAULT NULL COMMENT '业务类型(不同业务创建的隐患以此区分)' after
`id`;
</sql>
</changeSet>
<changeSet
author=
"tb"
id=
"tb-202109101731-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_latent_danger"
columnName=
"longitude"
/>
</not>
</preConditions>
<comment>
p_latent_danger add COLUMN longitude '隐患地址经度'
</comment>
<sql>
ALTER TABLE p_latent_danger add COLUMN `longitude` varchar(30) DEFAULT NULL COMMENT '隐患地址经度' after
`danger_position`;
</sql>
</changeSet>
<changeSet
author=
"tb"
id=
"tb-202109101731-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_latent_danger"
columnName=
"latitude"
/>
</not>
</preConditions>
<comment>
p_latent_danger add COLUMN latitude '隐患地址纬度'
</comment>
<sql>
ALTER TABLE p_latent_danger add COLUMN `latitude` varchar(30) DEFAULT NULL COMMENT '隐患地址纬度' after
`longitude`;
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/changelog/mt-1.0.0.xml
View file @
517a8d98
...
...
@@ -216,4 +216,48 @@
ALTER TABLE `p_check_input` ADD COLUMN `major_danger_num` int(11) DEFAULT NULL COMMENT '重大隐患个数' AFTER `safety_danger_num`;
</sql>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"1630567666-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"check_type_id"
/>
</not>
</preConditions>
<comment>
p_input_item ADD COLUMN check_type_id
</comment>
<sql>
ALTER TABLE `p_input_item` ADD COLUMN `check_type_id` varchar(32) DEFAULT NULL COMMENT '检查类别字典值';
</sql>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"1630567666-2"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_route_point_item"
columnName=
"input_item_id"
/>
</not>
</preConditions>
<comment>
p_route_point_item ADD COLUMN input_item_id
</comment>
<sql>
ALTER TABLE `p_route_point_item` ADD COLUMN `input_item_id` bigint(20) DEFAULT NULL COMMENT '巡检项id';
</sql>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"1630567666-3"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_route_point_item"
columnName=
"plan_id"
/>
</not>
</preConditions>
<comment>
p_route_point_item ADD COLUMN plan_id
</comment>
<sql>
ALTER TABLE `p_route_point_item` ADD COLUMN `plan_id` bigint(20) DEFAULT NULL COMMENT '计划ID';
</sql>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"1630567666-4"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"p_input_item"
columnName=
"item_type_classify_ids"
/>
</not>
</preConditions>
<comment>
p_input_item ADD COLUMN item_type_classify_ids
</comment>
<sql>
ALTER TABLE `p_input_item` ADD COLUMN `item_type_classify_ids` varchar(64) DEFAULT NULL COMMENT '检查类别IDS';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_check.xml
View file @
517a8d98
...
...
@@ -1981,5 +1981,56 @@
c.point_id = #{pointId}
and c.plan_task_id = #{planTaskId}
</select>
<select
id=
"queryPageCount"
resultType=
"long"
>
SELECT
COUNT(1)
FROM
p_check c
LEFT JOIN p_check_input ci ON ci.check_id = c.id
LEFT JOIN p_input_item i ON i.id = ci.input_id
<where>
<if
test=
"planId != null"
>
c.plan_id = #{planId}
</if>
<if
test=
"companyId != null"
>
AND c.company_id = #{companyId}
</if>
<if
test=
"orgCode != null"
>
c.org_code = #{orgCode}
</if>
</where>
</select>
<select
id=
"queryPage"
resultType=
"com.yeejoin.amos.supervision.business.vo.CheckVo"
>
SELECT
i.id,
i.`name`,
ci.safety_danger_num,
ci.major_danger_num,
c.check_time,
c.user_name,
c.company_id,
c.company_name,
IF
( c.check_time IS NULL, 0, 1 ) AS ext
FROM
p_check c
LEFT JOIN p_check_input ci ON ci.check_id = c.id
LEFT JOIN p_input_item i ON i.id = ci.input_id
<where>
<if
test=
"planId != null"
>
c.plan_id = #{planId}
</if>
<if
test=
"companyId != null"
>
AND c.company_id = #{companyId}
</if>
<if
test=
"orgCode != null"
>
c.org_code = #{orgCode}
</if>
ORDER BY c.check_time DESC
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</where>
</select>
</mapper>
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_input_item.xml
View file @
517a8d98
...
...
@@ -66,12 +66,14 @@
<result
property=
"checkMethod"
column=
"check_method"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"inputClassify"
column=
"input_classify"
/>
<result
property=
"checkTypeId"
column=
"check_type_id"
/>
<result
property=
"checkType"
column=
"check_type"
/>
<result
property=
"itemParent"
column=
"item_parent"
/>
<result
property=
"itemClassify"
column=
"item_classify"
/>
<result
property=
"itemTypeClassify"
column=
"item_type_classify"
/>
<result
property=
"itemLevel"
column=
"item_level"
/>
<result
property=
"itemStart"
column=
"item_start"
/>
<result
property=
"ext"
column=
"ext"
/>
</resultMap>
<!--统计 -->
<select
id=
"countInputItemInfoData"
resultType=
"long"
>
...
...
@@ -80,26 +82,29 @@
FROM
p_input_item a
where a.is_delete = '0' and a.input_type != '1'
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"name!=null
and name!=''
"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"inputClassify != null"
>
and a.input_classify = #{inputClassify}
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"checkTypeId!=null and checkTypeId!=''"
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"itemStart!=null"
>
and a.item_start = #{itemStart}
</if>
<if
test=
"orgCode!=null"
>
and a.org_Code = #{orgCode}
</if>
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
<if
test=
"itemTypeClassifyIds != null"
>
and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)
</if>
order by a.id desc
</select>
<!--查询 -->
<select
id=
"getInputItemInfo"
resultMap=
"inputItemMap"
>
SELECT
a.id,
a.
name
,
a.
NAME
,
a.item_no,
a.item_type,
a.is_must,
a.default_value,
a.is_score,
b.
name as
catalog_name,
b.
NAME AS
catalog_name,
a.remark,
a.
level
,
a.
LEVEL
,
a.risk_desc,
a.maintenance_content,
a.test_requirement,
...
...
@@ -111,16 +116,24 @@
a.item_classify,
a.item_type_classify,
a.item_level,
a.item_start
from
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
where a.is_delete = '0'
and a.input_type != '1'
<if
test=
"name!=null"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
a.item_start,
IF
( i.input_item_id IS NULL, 0, 1 ) AS ext
FROM
p_input_item a
LEFT JOIN p_catalog_tree b ON a.catalog_id = b.id
LEFT JOIN p_route_point_item i ON a.id = i.input_item_id
WHERE
a.is_delete = '0'
AND a.input_type != '1'
<if
test=
"name!=null and name!=''"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<!-- <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>-->
<if
test=
"checkTypeId!=null and checkTypeId!=''"
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"itemStart!=null"
>
and a.item_start = #{itemStart}
</if>
<if
test=
"orgCode!=null"
>
and a.org_Code = #{orgCode}
</if>
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
<if
test=
"itemTypeClassifyIds != null"
>
and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)
</if>
order by a.id desc
<choose>
<when
test=
"pageSize==-1"
></when>
...
...
@@ -305,4 +318,62 @@
WHERE
is_delete = 0
</select>
<select
id=
"findByIdIn"
resultType=
"com.yeejoin.amos.supervision.dao.entity.InputItem"
>
SELECT
*
FROM
p_input_item
<where>
is_delete = 0
<if
test=
"list != null and list.size() >0"
>
AND id IN
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
</select>
<!--统计 -->
<select
id=
"queryPageCount"
resultType=
"long"
>
SELECT
count(1) AS total_num
FROM
p_input_item a
WHERE
a.is_delete = '0'
AND a.input_type != '1'
<if
test=
"name!=null and name!=''"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"checkTypeId!=null and checkTypeId!=''"
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"itemStart!=null"
>
and a.item_start = #{itemStart}
</if>
<!--<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>-->
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
<if
test=
"itemTypeClassifyIds != null"
>
and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)
</if>
<if
test=
"planId != null"
>
and a.id NOT IN ( SELECT p.input_item_id FROM p_route_point_item p WHERE p.plan_id = #{planId} )
</if>
</select>
<!--查询 -->
<select
id=
"queryPage"
resultType=
"com.yeejoin.amos.supervision.business.vo.InputItemVo"
>
SELECT
a.*
FROM
p_input_item a
WHERE
a.is_delete = '0'
AND a.input_type != '1'
<if
test=
"name!=null and name!=''"
>
and a.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"itemNo!=null"
>
and a.item_no like concat(concat("%",#{itemNo}),"%")
</if>
<if
test=
"itemType!=null"
>
and a.item_Type = #{itemType}
</if>
<if
test=
"checkTypeId!=null and checkTypeId!=''"
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"itemStart!=null"
>
and a.item_start = #{itemStart}
</if>
<!--<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>-->
<if
test=
"itemClassify != null"
>
and a.item_classify = #{itemClassify}
</if>
<if
test=
"itemTypeClassifyIds != null"
>
and FIND_IN_SET(#{itemTypeClassifyIds}, a.item_type_classify_ids)
</if>
<if
test=
"planId != null"
>
and a.id NOT IN ( SELECT p.input_item_id FROM p_route_point_item p WHERE p.plan_id = #{planId} )
</if>
order by a.id desc
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
</mapper>
\ No newline at end of file
amos-boot-system-supervision/src/main/resources/db/mapper/dbTemplate_plan.xml
View file @
517a8d98
...
...
@@ -119,12 +119,13 @@
WHERE
a.route_Id = b.id and a.is_delete = 0
<if
test=
"planName!=null"
>
and a.name like concat(concat("%",#{planName}),"%")
</if>
<if
test=
"planType!=null"
>
and a.plan_Type = #{planType}
</if>
<if
test=
"checkTypeId!=null and checkTypeId != '' "
>
and a.check_type_id = #{checkTypeId}
</if>
<if
test=
"leadPerson!=null and leadPerson != '' "
>
and a.lead_people_ids = #{leadPerson}
</if>
<if
test=
"routeId!=null"
>
and a.route_Id = #{routeId}
</if>
<if
test=
"remark!=null"
>
and a.remark like concat(concat("%",#{remark}),"%")
</if>
<if
test=
"deptId!=null"
>
and a.dept_id = #{deptId}
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"remark!=null"
>
and a.remark1 like concat(concat("%",#{remark}),"%")
</if>
<if
test=
"userId!=null"
>
and FIND_IN_SET(#{userId},a.user_id)
</if>
<if
test=
"orgCode!=null"
>
and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})
</if>
<if
test=
"ownerId!=null"
>
and b.owner_id = #{ownerId}
</if>
</select>
<!--巡检计划查询 -->
<select
id=
"getPlanInfo"
resultType=
"java.util.HashMap"
>
...
...
@@ -156,6 +157,7 @@
a.maker_user_id as makerUserId,
a.maker_user_name as makerUserName,
a.maker_user_dept_name as makerUserDeptName,
a.check_level as checkLevel,
(select count(1) from p_route_point ppo where ppo.route_id = b.id) as totalPoint,
(select count(1) from p_plan_task t where t.plan_id = a.id) as totalPlanTask,
(select count(1) from p_plan_task t where t.plan_id = a.id and t.finish_status
<![CDATA[<=]]>
1 ) as waitFinishPlanTask
...
...
amos-boot-system-supervision/src/main/resources/db/mapper/routePointItemMapper.xml
View file @
517a8d98
...
...
@@ -43,4 +43,41 @@
route_id = #{routeId}
)
</delete>
<!--统计 -->
<select
id=
"queryPageCount"
resultType=
"long"
>
SELECT
COUNT(1)
FROM
p_route_point_item pi
LEFT JOIN p_input_item i ON i.id = pi.input_item_id
<where>
<if
test=
"name!=null"
>
and i.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"planId!=null"
>
and pi.plan_id = #{planId}
</if>
<!-- <if test="orgCode!=null"> and i.org_Code = #{orgCode}</if>-->
</where>
</select>
<!--查询 -->
<select
id=
"queryPage"
resultType=
"com.yeejoin.amos.supervision.business.vo.RoutePointItemVo"
>
SELECT
pi.id,
i.id AS itemId,
i.`name`,
i.item_type,
i.input_classify,
i.check_type,
i.item_classify,
i.item_type_classify,i.item_level
FROM
p_route_point_item pi
LEFT JOIN p_input_item i ON i.id = pi.input_item_id
<where>
<if
test=
"name!=null"
>
and i.name like concat(concat("%",#{name}),"%")
</if>
<if
test=
"planId!=null"
>
and pi.plan_id = #{planId}
</if>
<!-- <if test="orgCode!=null"> and i.org_Code = #{orgCode}</if>-->
</where>
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
</choose>
</select>
</mapper>
\ No newline at end of file
amos-boot-utils/amos-boot-utils-video/pom.xml
View file @
517a8d98
...
...
@@ -25,6 +25,13 @@
<artifactId>
spring-boot-starter-data-elasticsearch
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
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