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
23a7b027
Commit
23a7b027
authored
Mar 07, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改检索出来异常代码
parent
bc61b69b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
122 additions
and
215 deletions
+122
-215
ExceptionEnum.java
...join/amos/boot/module/common/api/enums/ExceptionEnum.java
+2
-1
AircraftController.java
...os/boot/module/jcs/biz/controller/AircraftController.java
+18
-34
AlertCalledController.java
...boot/module/jcs/biz/controller/AlertCalledController.java
+0
-0
AlertFormController.java
...s/boot/module/jcs/biz/controller/AlertFormController.java
+3
-5
AlertFormTypeController.java
...ot/module/jcs/biz/controller/AlertFormTypeController.java
+4
-3
AlertFormValueController.java
...t/module/jcs/biz/controller/AlertFormValueController.java
+4
-5
AlertSubmittedController.java
...t/module/jcs/biz/controller/AlertSubmittedController.java
+10
-13
AlertSubmittedObjectController.java
...le/jcs/biz/controller/AlertSubmittedObjectController.java
+4
-5
Audio2TextController.java
.../boot/module/jcs/biz/controller/Audio2TextController.java
+0
-7
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+16
-39
FirefightersController.java
...oot/module/jcs/biz/controller/FirefightersController.java
+11
-12
FirefightersJacketController.java
...dule/jcs/biz/controller/FirefightersJacketController.java
+3
-2
FirestationJacketController.java
...odule/jcs/biz/controller/FirestationJacketController.java
+3
-2
OrganizationController.java
...oot/module/jcs/biz/controller/OrganizationController.java
+20
-14
PowerTransferCompanyController.java
...le/jcs/biz/controller/PowerTransferCompanyController.java
+3
-9
PowerTransferCompanyResourcesController.java
...z/controller/PowerTransferCompanyResourcesController.java
+4
-6
PowerTransferController.java
...ot/module/jcs/biz/controller/PowerTransferController.java
+2
-4
ShiftChangeController.java
...boot/module/jcs/biz/controller/ShiftChangeController.java
+2
-1
SignController.java
...n/amos/boot/module/jcs/biz/controller/SignController.java
+0
-8
TemplateController.java
...os/boot/module/jcs/biz/controller/TemplateController.java
+4
-5
UserController.java
...n/amos/boot/module/jcs/biz/controller/UserController.java
+0
-0
VoiceRecordFileController.java
.../module/jcs/biz/controller/VoiceRecordFileController.java
+2
-2
AlertCalledAction.java
...os/boot/module/jcs/biz/rule/action/AlertCalledAction.java
+1
-27
PowerTransferAction.java
.../boot/module/jcs/biz/rule/action/PowerTransferAction.java
+1
-1
AircraftServiceImpl.java
...boot/module/jcs/biz/service/impl/AircraftServiceImpl.java
+5
-9
AlertCalledFeedbackServiceImpl.java
.../jcs/biz/service/impl/AlertCalledFeedbackServiceImpl.java
+0
-1
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/ExceptionEnum.java
View file @
23a7b027
...
@@ -2,7 +2,8 @@ package com.yeejoin.amos.boot.module.common.api.enums;
...
@@ -2,7 +2,8 @@ package com.yeejoin.amos.boot.module.common.api.enums;
public
enum
ExceptionEnum
{
public
enum
ExceptionEnum
{
PARAMETER_TYPE_ERROR
(
"0001"
,
"传入參數异常"
);
PARAMETER_TYPE_ERROR
(
"0001"
,
"传入參數异常"
),
PARAMETER_TYPE_ERR
(
"400"
,
"系统异常!"
);
private
String
eCode
;
private
String
eCode
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AircraftController.java
View file @
23a7b027
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.context.AnalysisContext
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.alibaba.excel.event.AnalysisEventListener
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
@@ -15,6 +16,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceIm
...
@@ -15,6 +16,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceIm
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.DataSourcesImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -50,6 +52,7 @@ import java.util.Map;
...
@@ -50,6 +52,7 @@ import java.util.Map;
* @date 2021-06-29
* @date 2021-06-29
*/
*/
@RestController
@RestController
@Slf4j
@Api
(
tags
=
"航空器信息Api"
)
@Api
(
tags
=
"航空器信息Api"
)
@RequestMapping
(
value
=
"/aircraft"
)
@RequestMapping
(
value
=
"/aircraft"
)
public
class
AircraftController
extends
BaseController
{
public
class
AircraftController
extends
BaseController
{
...
@@ -64,6 +67,7 @@ public class AircraftController extends BaseController {
...
@@ -64,6 +67,7 @@ public class AircraftController extends BaseController {
@Autowired
@Autowired
private
AlertFormValueServiceImpl
iAlertFormValueService
;
private
AlertFormValueServiceImpl
iAlertFormValueService
;
/**
/**
* 新增航空器信息
* 新增航空器信息
*
*
...
@@ -244,19 +248,22 @@ public class AircraftController extends BaseController {
...
@@ -244,19 +248,22 @@ public class AircraftController extends BaseController {
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
getDynamicFlightInfo
(
num
);
ResponseModel
<
Map
<
String
,
Object
>>
dataModel
=
iotFeignClient
.
getDynamicFlightInfo
(
num
);
if
(
dataModel
!=
null
)
{
if
(
dataModel
!=
null
&&
dataModel
.
getResult
()!=
null
)
{
Map
<
String
,
Object
>
map
=
dataModel
.
getResult
()!=
null
?
dataModel
.
getResult
():
null
;
Map
<
String
,
Object
>
map
=
dataModel
.
getResult
();
if
(
map
!=
null
)
{
//sonarLint 报错 需要将多次引用的抽成常量
String
dynamicFlightId
=
"dynamicFlightId"
;
String
runway
=
"runway"
;
String
stand
=
"stand"
;
String
passengerCapacity
=
"passengerCapacity"
;
map1
.
put
(
"aircraftModel"
,
map
.
containsKey
(
"aircraftType"
)?
map
.
get
(
"aircraftType"
):
null
);
map1
.
put
(
"aircraftModel"
,
map
.
containsKey
(
"aircraftType"
)?
map
.
get
(
"aircraftType"
):
null
);
map1
.
put
(
"dynamicFlightId"
,
map
.
containsKey
(
"dynamicFlightId"
)?
map
.
get
(
"dynamicFlightId"
):
null
);
map1
.
put
(
dynamicFlightId
,
map
.
containsKey
(
dynamicFlightId
)?
map
.
get
(
dynamicFlightId
):
null
);
map1
.
put
(
"landingTime"
,
map
.
containsKey
(
"sta"
)?
map
.
get
(
"sta"
):
null
);
map1
.
put
(
"landingTime"
,
map
.
containsKey
(
"sta"
)?
map
.
get
(
"sta"
):
null
);
/* 任务 3488 根据航班号查询航班信息回填 增加跑道,机位字段 start*/
/* 任务 3488 根据航班号查询航班信息回填 增加跑道,机位字段 start*/
map1
.
put
(
"runway"
,
map
.
containsKey
(
"runway"
)?
map
.
get
(
"runway"
):
null
);
map1
.
put
(
runway
,
map
.
containsKey
(
runway
)?
map
.
get
(
runway
):
null
);
map1
.
put
(
"stand"
,
map
.
containsKey
(
"stand"
)?
map
.
get
(
"stand"
):
null
);
map1
.
put
(
stand
,
map
.
containsKey
(
stand
)?
map
.
get
(
stand
):
null
);
/* 任务 3488 根据航班号查询航班信息回填 end*/
/* 任务 3488 根据航班号查询航班信息回填 end*/
// map1.put("fuelQuantity", map.get(""));
map1
.
put
(
passengerCapacity
,
map
.
containsKey
(
passengerCapacity
)?
map
.
get
(
passengerCapacity
):
null
);
map1
.
put
(
"passengerCapacity"
,
map
.
containsKey
(
"passengerCapacity"
)?
map
.
get
(
"passengerCapacity"
):
null
);
}
}
}
return
ResponseHelper
.
buildResponse
(
map1
);
return
ResponseHelper
.
buildResponse
(
map1
);
}
}
...
@@ -273,28 +280,6 @@ public class AircraftController extends BaseController {
...
@@ -273,28 +280,6 @@ public class AircraftController extends BaseController {
/**
/**
*
*
* 导出航空器信息
* 已废弃
* **/
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/exportData")
// @ApiOperation(httpMethod = "GET", value = "导出航空器信息", notes = "导出航空器信息")
// public void exportData ( HttpServletResponse response)throws IOException {
// String fileName = "Aircraft";
// response.setContentType("multipart/form-data");
// response.setCharacterEncoding("utf-8");
// response.addHeader("Content-Disposition", "attachment;filename=" + fileName+ ".xlsx");
// String sheetName = "航空器信息";
// ExcelWriter writer = new ExcelWriter(response.getOutputStream(), ExcelTypeEnum.XLSX);
// Sheet sheet = new Sheet(1, 0,AircraftDtos.class);
// List<AircraftDto> list = aircraftServiceImpl.queryAircraftDtoForList(false);
// sheet.setSheetName(sheetName);
// writer.write(list, sheet);
// writer.finish();
// }
/**
*
* 导入航空器信息
* 导入航空器信息
*
*
* **/
* **/
...
@@ -304,8 +289,7 @@ public class AircraftController extends BaseController {
...
@@ -304,8 +289,7 @@ public class AircraftController extends BaseController {
public
Boolean
ImportData
(
@RequestPart
MultipartFile
multipartFile
)
{
public
Boolean
ImportData
(
@RequestPart
MultipartFile
multipartFile
)
{
List
<
Aircraft
>
aircraftList
=
new
ArrayList
<>();
List
<
Aircraft
>
aircraftList
=
new
ArrayList
<>();
try
{
try
{
// list = ExcelUtil.readFirstSheetExcel(multipartFile, AircraftDto.class, 0);
EasyExcelFactory
.
read
(
multipartFile
.
getInputStream
(),
AircraftDto
.
class
,
new
AnalysisEventListener
<
AircraftDto
>()
{
EasyExcel
.
read
(
multipartFile
.
getInputStream
(),
AircraftDto
.
class
,
new
AnalysisEventListener
<
AircraftDto
>()
{
// 每读取一行就调用该方法
// 每读取一行就调用该方法
@Override
@Override
public
void
invoke
(
AircraftDto
data
,
AnalysisContext
context
)
{
public
void
invoke
(
AircraftDto
data
,
AnalysisContext
context
)
{
...
@@ -317,7 +301,7 @@ public class AircraftController extends BaseController {
...
@@ -317,7 +301,7 @@ public class AircraftController extends BaseController {
// 全部读取完成就调用该方法
// 全部读取完成就调用该方法
@Override
@Override
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
public
void
doAfterAllAnalysed
(
AnalysisContext
context
)
{
System
.
out
.
printl
n
(
"读取完成"
);
log
.
war
n
(
"读取完成"
);
}
}
}).
sheet
().
doRead
();
}).
sheet
().
doRead
();
aircraftServiceImpl
.
saveBatch
(
aircraftList
);
aircraftServiceImpl
.
saveBatch
(
aircraftList
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertCalledController.java
View file @
23a7b027
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertFormController.java
View file @
23a7b027
...
@@ -13,6 +13,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -13,6 +13,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.checkerframework.checker.units.qual.A
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -121,7 +122,7 @@ public class AlertFormController extends BaseController {
...
@@ -121,7 +122,7 @@ public class AlertFormController extends BaseController {
@RequestMapping
(
value
=
"/form/{code}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/form/{code}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据表态类型code查询表单数据项"
,
notes
=
"根据表态类型code查询表单数据项"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据表态类型code查询表单数据项"
,
notes
=
"根据表态类型code查询表单数据项"
)
public
ResponseModel
<
Object
>
selectFormdItem
(
HttpServletRequest
request
,
@PathVariable
String
code
){
public
ResponseModel
<
Object
>
selectFormdItem
(
HttpServletRequest
request
,
@PathVariable
String
code
){
List
<
AlertFormInitDto
>
list
=
new
ArrayList
<
AlertFormInitDto
>()
;
List
<
AlertFormInitDto
>
list
;
if
(
redisUtils
.
hasKey
(
RedisKey
.
FORM_CODE
+
code
)){
if
(
redisUtils
.
hasKey
(
RedisKey
.
FORM_CODE
+
code
)){
Object
obj
=
redisUtils
.
get
(
RedisKey
.
FORM_CODE
+
code
);
Object
obj
=
redisUtils
.
get
(
RedisKey
.
FORM_CODE
+
code
);
JSONArray
arr
=
(
JSONArray
)
obj
;
JSONArray
arr
=
(
JSONArray
)
obj
;
...
@@ -163,7 +164,7 @@ public class AlertFormController extends BaseController {
...
@@ -163,7 +164,7 @@ public class AlertFormController extends BaseController {
Class
<?
extends
AlertForm
>
aClass
=
alertForm
.
getClass
();
Class
<?
extends
AlertForm
>
aClass
=
alertForm
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
alertForm
);
Object
o
=
field
.
get
(
alertForm
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -174,9 +175,6 @@ public class AlertFormController extends BaseController {
...
@@ -174,9 +175,6 @@ public class AlertFormController extends BaseController {
}
else
if
(
type
.
equals
(
Long
.
class
))
{
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertForm
);
Long
fileValue
=
(
Long
)
field
.
get
(
alertForm
);
alertFormQueryWrapper
.
eq
(
name
,
fileValue
);
alertFormQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertForm
);
alertFormQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
alertForm
);
String
fileValue
=
(
String
)
field
.
get
(
alertForm
);
alertFormQueryWrapper
.
eq
(
name
,
fileValue
);
alertFormQueryWrapper
.
eq
(
name
,
fileValue
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertFormTypeController.java
View file @
23a7b027
...
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -24,6 +25,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormTypeServiceImp
...
@@ -24,6 +25,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormTypeServiceImp
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
/**
/**
...
@@ -107,7 +109,7 @@ public class AlertFormTypeController extends BaseController {
...
@@ -107,7 +109,7 @@ public class AlertFormTypeController extends BaseController {
Class
<?
extends
AlertFormType
>
aClass
=
alertFormType
.
getClass
();
Class
<?
extends
AlertFormType
>
aClass
=
alertFormType
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
alertFormType
);
Object
o
=
field
.
get
(
alertFormType
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -126,11 +128,10 @@ public class AlertFormTypeController extends BaseController {
...
@@ -126,11 +128,10 @@ public class AlertFormTypeController extends BaseController {
String
fileValue
=
(
String
)
field
.
get
(
alertFormType
);
String
fileValue
=
(
String
)
field
.
get
(
alertFormType
);
alertFormTypeQueryWrapper
.
eq
(
name
,
fileValue
);
alertFormTypeQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
}
});
});
IPage
<
AlertFormType
>
page
;
IPage
<
AlertFormType
>
page
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertFormValueController.java
View file @
23a7b027
...
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -24,6 +25,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceIm
...
@@ -24,6 +25,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceIm
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
/**
/**
...
@@ -107,7 +109,7 @@ public class AlertFormValueController extends BaseController {
...
@@ -107,7 +109,7 @@ public class AlertFormValueController extends BaseController {
Class
<?
extends
AlertFormValue
>
aClass
=
alertFormValue
.
getClass
();
Class
<?
extends
AlertFormValue
>
aClass
=
alertFormValue
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
alertFormValue
);
Object
o
=
field
.
get
(
alertFormValue
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -118,16 +120,13 @@ public class AlertFormValueController extends BaseController {
...
@@ -118,16 +120,13 @@ public class AlertFormValueController extends BaseController {
}
else
if
(
type
.
equals
(
Long
.
class
))
{
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertFormValue
);
Long
fileValue
=
(
Long
)
field
.
get
(
alertFormValue
);
alertFormValueQueryWrapper
.
eq
(
name
,
fileValue
);
alertFormValueQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertFormValue
);
alertFormValueQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
alertFormValue
);
String
fileValue
=
(
String
)
field
.
get
(
alertFormValue
);
alertFormValueQueryWrapper
.
eq
(
name
,
fileValue
);
alertFormValueQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
}
});
});
IPage
<
AlertFormValue
>
page
;
IPage
<
AlertFormValue
>
page
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertSubmittedController.java
View file @
23a7b027
...
@@ -34,6 +34,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -34,6 +34,7 @@ import io.swagger.annotations.ApiOperation;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -42,6 +43,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -42,6 +43,7 @@ import org.springframework.web.bind.annotation.RestController;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
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.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -171,7 +173,7 @@ public class AlertSubmittedController extends BaseController {
...
@@ -171,7 +173,7 @@ public class AlertSubmittedController extends BaseController {
return
;
return
;
}
}
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
alertSubmitted
);
Object
o
=
field
.
get
(
alertSubmitted
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -182,16 +184,13 @@ public class AlertSubmittedController extends BaseController {
...
@@ -182,16 +184,13 @@ public class AlertSubmittedController extends BaseController {
}
else
if
(
type
.
equals
(
Long
.
class
)
||
"long"
.
equals
(
type
.
toString
()))
{
}
else
if
(
type
.
equals
(
Long
.
class
)
||
"long"
.
equals
(
type
.
toString
()))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertSubmitted
);
Long
fileValue
=
(
Long
)
field
.
get
(
alertSubmitted
);
alertSubmittedQueryWrapper
.
eq
(
name
,
fileValue
);
alertSubmittedQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertSubmitted
);
alertSubmittedQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
alertSubmitted
);
String
fileValue
=
(
String
)
field
.
get
(
alertSubmitted
);
alertSubmittedQueryWrapper
.
eq
(
name
,
fileValue
);
alertSubmittedQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
}
});
});
IPage
<
AlertSubmitted
>
page
;
IPage
<
AlertSubmitted
>
page
;
...
@@ -220,7 +219,7 @@ public class AlertSubmittedController extends BaseController {
...
@@ -220,7 +219,7 @@ public class AlertSubmittedController extends BaseController {
String
companyName
=
getSelectedOrgInfo
().
getCompany
().
getCompanyName
();
String
companyName
=
getSelectedOrgInfo
().
getCompany
().
getCompanyName
();
alertSubmittedService
.
getAlertSubmittedContent
(
alertCalledId
,
templateVos
,
companyName
);
alertSubmittedService
.
getAlertSubmittedContent
(
alertCalledId
,
templateVos
,
companyName
);
}
catch
(
IllegalAccessException
e
)
{
}
catch
(
IllegalAccessException
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
catch
(
ParseException
e
)
{
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -248,10 +247,9 @@ public class AlertSubmittedController extends BaseController {
...
@@ -248,10 +247,9 @@ public class AlertSubmittedController extends BaseController {
TemplateExtendDto
template
=
null
;
TemplateExtendDto
template
=
null
;
Template
templateN
=
null
;
Template
templateN
=
null
;
if
(
schedulingContent
.
getType
().
equals
(
AlertBusinessTypeEnum
.
警情结案
.
getName
())
||
if
(!
schedulingContent
.
getType
().
equals
(
AlertBusinessTypeEnum
.
警情结案
.
getName
())
&&
schedulingContent
.
getType
().
equals
(
AlertBusinessTypeEnum
.
警情续报
.
getName
())
||
!
schedulingContent
.
getType
().
equals
(
AlertBusinessTypeEnum
.
警情续报
.
getName
())
&&
schedulingContent
.
getType
().
equals
(
AlertBusinessTypeEnum
.
非警情确认
.
getName
()))
{
!
schedulingContent
.
getType
().
equals
(
AlertBusinessTypeEnum
.
非警情确认
.
getName
()))
{
}
else
{
// 获取模板
// 获取模板
templateN
=
templateService
templateN
=
templateService
.
getOne
(
new
QueryWrapper
<
Template
>().
eq
(
"type_code"
,
"JQCB"
).
eq
(
"format"
,
false
));
.
getOne
(
new
QueryWrapper
<
Template
>().
eq
(
"type_code"
,
"JQCB"
).
eq
(
"format"
,
false
));
...
@@ -271,18 +269,17 @@ public class AlertSubmittedController extends BaseController {
...
@@ -271,18 +269,17 @@ public class AlertSubmittedController extends BaseController {
definitions
.
put
(
"$callTime"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
definitions
.
put
(
"$callTime"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getCallTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
definitions
.
put
(
"$replaceContent"
,
replaceContent
);
definitions
.
put
(
"$replaceContent"
,
replaceContent
);
definitions
.
put
(
"$address"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getAddress
())
?
""
:
alertCalled
.
getAddress
());
definitions
.
put
(
"$address"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getAddress
())
?
""
:
alertCalled
.
getAddress
());
// definitions.put("$recDate",DateUtils.convertDateToString(alertCalled.getUpdateTime(),DateUtils.DATE_TIME_PATTERN));
definitions
.
put
(
"$contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
?
""
:
alertCalled
.
getContactUser
());
definitions
.
put
(
"$contactUser"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactUser
())
?
""
:
alertCalled
.
getContactUser
());
definitions
.
put
(
"$trappedNum"
,
ValidationUtil
.
isEmpty
(
alertCalledRo
.
getTrappedNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getTrappedNum
()));
definitions
.
put
(
"$trappedNum"
,
ValidationUtil
.
isEmpty
(
alertCalledRo
.
getTrappedNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getTrappedNum
()));
definitions
.
put
(
"$casualtiesNum"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getCasualtiesNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getCasualtiesNum
()));
definitions
.
put
(
"$casualtiesNum"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getCasualtiesNum
())
?
""
:
String
.
valueOf
(
alertCalled
.
getCasualtiesNum
()));
definitions
.
put
(
"$contactPhone"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
())
?
""
:
alertCalled
.
getContactPhone
());
definitions
.
put
(
"$contactPhone"
,
ValidationUtil
.
isEmpty
(
alertCalled
.
getContactPhone
())
?
""
:
alertCalled
.
getContactPhone
());
String
companyName
=
JSON
Object
.
parseObject
(
schedulingContent
.
getSubmissionContent
()).
getString
(
"companyName"
)
;
String
companyName
=
JSON
.
parseObject
(
schedulingContent
.
getSubmissionContent
()).
getString
(
"companyName"
)
;
JSONObject
jsonObject
=
null
;
JSONObject
jsonObject
=
null
;
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
()))
{
if
(!
ValidationUtil
.
isEmpty
(
alertCalled
.
getUpdateTime
()))
{
jsonObject
=
JSON
Object
.
parseObject
(
schedulingContent
.
getSubmissionContent
());
jsonObject
=
JSON
.
parseObject
(
schedulingContent
.
getSubmissionContent
());
jsonObject
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
jsonObject
.
put
(
"recDate"
,
DateUtils
.
convertDateToString
(
alertCalled
.
getUpdateTime
(),
DateUtils
.
DATE_TIME_PATTERN
));
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AlertSubmittedObjectController.java
View file @
23a7b027
...
@@ -11,9 +11,11 @@ import io.swagger.annotations.Api;
...
@@ -11,9 +11,11 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -93,7 +95,7 @@ public class AlertSubmittedObjectController extends BaseController {
...
@@ -93,7 +95,7 @@ public class AlertSubmittedObjectController extends BaseController {
Class
<?
extends
AlertSubmittedObject
>
aClass
=
alertSubmittedObject
.
getClass
();
Class
<?
extends
AlertSubmittedObject
>
aClass
=
alertSubmittedObject
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
alertSubmittedObject
);
Object
o
=
field
.
get
(
alertSubmittedObject
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -104,16 +106,13 @@ public class AlertSubmittedObjectController extends BaseController {
...
@@ -104,16 +106,13 @@ public class AlertSubmittedObjectController extends BaseController {
}
else
if
(
type
.
equals
(
Long
.
class
))
{
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
alertSubmittedObject
);
Long
fileValue
=
(
Long
)
field
.
get
(
alertSubmittedObject
);
alertSubmittedObjectQueryWrapper
.
eq
(
name
,
fileValue
);
alertSubmittedObjectQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
alertSubmittedObject
);
alertSubmittedObjectQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
alertSubmittedObject
);
String
fileValue
=
(
String
)
field
.
get
(
alertSubmittedObject
);
alertSubmittedObjectQueryWrapper
.
eq
(
name
,
fileValue
);
alertSubmittedObjectQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
}
});
});
IPage
<
AlertSubmittedObject
>
page
;
IPage
<
AlertSubmittedObject
>
page
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/Audio2TextController.java
View file @
23a7b027
...
@@ -42,13 +42,6 @@ public class Audio2TextController {
...
@@ -42,13 +42,6 @@ public class Audio2TextController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"测试语音转文字融合接口"
,
notes
=
"测试语音转文字融合接口"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"测试语音转文字融合接口"
,
notes
=
"测试语音转文字融合接口"
)
public
HashMap
<
String
,
Object
>
startConvertAndSendAudio
(
@RequestParam
String
cid
,
@RequestParam
String
myNumber
,
@RequestParam
String
callerNumber
)
{
public
HashMap
<
String
,
Object
>
startConvertAndSendAudio
(
@RequestParam
String
cid
,
@RequestParam
String
myNumber
,
@RequestParam
String
callerNumber
)
{
HashMap
<
String
,
Object
>
convert
=
audio2Text
.
doTranslate
(
cid
,
myNumber
,
callerNumber
);
HashMap
<
String
,
Object
>
convert
=
audio2Text
.
doTranslate
(
cid
,
myNumber
,
callerNumber
);
/* try {
TimeUnit.SECONDS.sleep(1);
socketClient.process((Integer) convert.get(myNumber), 2);
socketClient.process((Integer) convert.get(callerNumber), 3);
} catch (InterruptedException e) {
e.printStackTrace();
}*/
return
convert
;
return
convert
;
}
}
...
...
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 @
23a7b027
...
@@ -4,6 +4,8 @@ import java.util.Map;
...
@@ -4,6 +4,8 @@ import java.util.Map;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.yeejoin.amos.boot.module.common.api.enums.ExceptionEnum
;
import
org.apache.commons.jexl2.UnifiedJEXL
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -59,7 +61,8 @@ public class ExcelController extends BaseController {
...
@@ -59,7 +61,8 @@ public class ExcelController extends BaseController {
@Value
(
"${logic}"
)
@Value
(
"${logic}"
)
Boolean
logic
;
Boolean
logic
;
private
static
final
String
NOT_DUTY
=
"休班"
;
private
static
String
JCDWRY
=
"JCDWRY"
;
private
static
String
DLDWRY
=
"DLDWRY"
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"获取上传excle文件是否成功"
)
@ApiOperation
(
value
=
"获取上传excle文件是否成功"
)
...
@@ -78,8 +81,8 @@ public class ExcelController extends BaseController {
...
@@ -78,8 +81,8 @@ public class ExcelController extends BaseController {
@GetMapping
(
"/download/template/{type}"
)
@GetMapping
(
"/download/template/{type}"
)
public
void
downloadTemplate
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
public
void
downloadTemplate
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
)
{
try
{
try
{
if
(
type
.
equals
(
"JCDWRY"
)
&&
!
logic
){
if
(
type
.
equals
(
JCDWRY
)
&&
logic
!=
null
&&
!
logic
){
type
=
"DLDWRY"
;
type
=
DLDWRY
;
}
}
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
...
@@ -87,7 +90,7 @@ public class ExcelController extends BaseController {
...
@@ -87,7 +90,7 @@ public class ExcelController extends BaseController {
excelService
.
templateExport
(
response
,
excelDto
);
excelService
.
templateExport
(
response
,
excelDto
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
...
@@ -107,8 +110,8 @@ public class ExcelController extends BaseController {
...
@@ -107,8 +110,8 @@ public class ExcelController extends BaseController {
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
public
void
getFireStationFile
(
HttpServletResponse
response
,
@PathVariable
(
value
=
"type"
)
String
type
,
@RequestParam
Map
par
)
{
@RequestParam
Map
par
)
{
try
{
try
{
if
(
type
.
equals
(
"JCDWRY"
)
&&
!
logic
){
if
(
type
.
equals
(
JCDWRY
)
&&
logic
!=
null
&&
!
logic
){
type
=
"DLDWRY"
;
type
=
DLDWRY
;
}
}
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
...
@@ -116,7 +119,7 @@ public class ExcelController extends BaseController {
...
@@ -116,7 +119,7 @@ public class ExcelController extends BaseController {
excelService
.
commonExport
(
response
,
excelDto
,
par
);
excelService
.
commonExport
(
response
,
excelDto
,
par
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
...
@@ -129,8 +132,8 @@ public class ExcelController extends BaseController {
...
@@ -129,8 +132,8 @@ public class ExcelController extends BaseController {
long
uuid
=
sequence
.
nextId
();
long
uuid
=
sequence
.
nextId
();
String
uuidString
=
Long
.
toString
(
uuid
);
String
uuidString
=
Long
.
toString
(
uuid
);
redisUtils
.
set
(
uuidString
,
0
);
redisUtils
.
set
(
uuidString
,
0
);
if
(
type
.
equals
(
"JCDWRY"
)
&&
!
logic
){
if
(
type
.
equals
(
JCDWRY
)
&&
logic
!=
null
&&
!
logic
){
type
=
"DLDWRY"
;
type
=
DLDWRY
;
}
}
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelEnums
excelEnums
=
ExcelEnums
.
getByKey
(
type
);
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
ExcelDto
excelDto
=
new
ExcelDto
(
excelEnums
.
getFileName
(),
excelEnums
.
getSheetName
(),
...
@@ -146,32 +149,6 @@ public class ExcelController extends BaseController {
...
@@ -146,32 +149,6 @@ public class ExcelController extends BaseController {
}
}
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "上传文件数据-2")
// @PostMapping("/upload2")
// public void upload2(@RequestPart("file") MultipartFile multipartFile,
// @RequestParam(required = false) String fileName,
// @RequestParam(required = false) String sheetName,
// @RequestParam String type) {
// try {
// excelService.commonUpload(multipartFile, new ExcelDto(fileName, sheetName, type));
// } catch (Exception e) {
// e.printStackTrace();
// throw new RuntimeException("系统异常!");
// }
// }
// @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
// @ApiOperation(value = "导出公用类2")
// @GetMapping("/export/list")
// public void exportByType(HttpServletResponse response, @RequestParam(required = false) String fileName,
// @RequestParam(required = false) String sheetName, @RequestParam String type) {
// try {
// excelService.commonExport(response, new ExcelDto(fileName, sheetName, type));
// } catch (Exception e) {
// e.printStackTrace();
// throw new RuntimeException("系统异常!");
// }
// }
/**
/**
* 导出值班模板
* 导出值班模板
*
*
...
@@ -193,7 +170,7 @@ public class ExcelController extends BaseController {
...
@@ -193,7 +170,7 @@ public class ExcelController extends BaseController {
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
...
@@ -206,7 +183,7 @@ public class ExcelController extends BaseController {
...
@@ -206,7 +183,7 @@ public class ExcelController extends BaseController {
excelService
.
dutyInfoExport
(
response
,
beginDate
,
endDate
,
excelDto
);
excelService
.
dutyInfoExport
(
response
,
beginDate
,
endDate
,
excelDto
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
...
@@ -222,7 +199,7 @@ public class ExcelController extends BaseController {
...
@@ -222,7 +199,7 @@ public class ExcelController extends BaseController {
excelService
.
exportByParams
(
response
,
excelDto
,
params
);
excelService
.
exportByParams
(
response
,
excelDto
,
params
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
...
@@ -234,7 +211,7 @@ public class ExcelController extends BaseController {
...
@@ -234,7 +211,7 @@ public class ExcelController extends BaseController {
return
ResponseHelper
.
buildResponse
(
dataSources
.
selectList
(
type
,
method
));
return
ResponseHelper
.
buildResponse
(
dataSources
.
selectList
(
type
,
method
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
}
}
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 @
23a7b027
...
@@ -5,12 +5,14 @@ import java.util.*;
...
@@ -5,12 +5,14 @@ import java.util.*;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.common.api.enums.ExceptionEnum
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -22,6 +24,7 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
...
@@ -22,6 +24,7 @@ import org.typroject.tyboot.core.foundation.context.RequestContext;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
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.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -138,7 +141,7 @@ public class FirefightersController extends BaseController {
...
@@ -138,7 +141,7 @@ public class FirefightersController extends BaseController {
iFirefightersService
.
saveFirefighters
(
firefighters
);
iFirefightersService
.
saveFirefighters
(
firefighters
);
return
ResponseHelper
.
buildResponse
(
firefighters
);
return
ResponseHelper
.
buildResponse
(
firefighters
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
...
@@ -155,7 +158,7 @@ public class FirefightersController extends BaseController {
...
@@ -155,7 +158,7 @@ public class FirefightersController extends BaseController {
@Transactional
@Transactional
public
ResponseModel
<
Object
>
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
public
ResponseModel
<
Object
>
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
//BUG 2761 判断人员删除时的逻辑 如果被选为队伍联系人则无法被删除 bykongfm
//BUG 2761 判断人员删除时的逻辑 如果被选为队伍联系人则无法被删除 bykongfm
List
fireTeam
=
iFireTeamService
.
list
(
new
LambdaQueryWrapper
<
FireTeam
>().
eq
(
FireTeam:
:
getIsDelete
,
false
).
eq
(
FireTeam:
:
getContactUserId
,
id
));
List
<
FireTeam
>
fireTeam
=
iFireTeamService
.
list
(
new
LambdaQueryWrapper
<
FireTeam
>().
eq
(
FireTeam:
:
getIsDelete
,
false
).
eq
(
FireTeam:
:
getContactUserId
,
id
));
if
(
fireTeam
.
size
()
>
0
)
{
if
(
fireTeam
.
size
()
>
0
)
{
return
ResponseHelper
.
buildResponse
(
"-1"
);
return
ResponseHelper
.
buildResponse
(
"-1"
);
}
}
...
@@ -186,7 +189,7 @@ public class FirefightersController extends BaseController {
...
@@ -186,7 +189,7 @@ public class FirefightersController extends BaseController {
return
ResponseHelper
.
buildResponse
(
"0"
);
return
ResponseHelper
.
buildResponse
(
"0"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"删除失败!"
);
throw
new
BadRequest
(
"删除失败!"
);
}
}
}
}
...
@@ -219,7 +222,7 @@ public class FirefightersController extends BaseController {
...
@@ -219,7 +222,7 @@ public class FirefightersController extends BaseController {
userCarService
.
delete
(
userCar
);
userCarService
.
delete
(
userCar
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
...
@@ -270,7 +273,7 @@ public class FirefightersController extends BaseController {
...
@@ -270,7 +273,7 @@ public class FirefightersController extends BaseController {
return
ResponseHelper
.
buildResponse
(
null
);
return
ResponseHelper
.
buildResponse
(
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
...
@@ -343,7 +346,7 @@ public class FirefightersController extends BaseController {
...
@@ -343,7 +346,7 @@ public class FirefightersController extends BaseController {
Class
<?
extends
Firefighters
>
aClass
=
firefighters
.
getClass
();
Class
<?
extends
Firefighters
>
aClass
=
firefighters
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
firefighters
);
Object
o
=
field
.
get
(
firefighters
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -365,7 +368,7 @@ public class FirefightersController extends BaseController {
...
@@ -365,7 +368,7 @@ public class FirefightersController extends BaseController {
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
});
});
IPage
<
Firefighters
>
page
;
IPage
<
Firefighters
>
page
;
...
@@ -500,7 +503,7 @@ public class FirefightersController extends BaseController {
...
@@ -500,7 +503,7 @@ public class FirefightersController extends BaseController {
}
}
return
ResponseHelper
.
buildResponse
(
iFirefightersService
.
updatePeopleById
(
firefighters
,
id
));
return
ResponseHelper
.
buildResponse
(
iFirefightersService
.
updatePeopleById
(
firefighters
,
id
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
ExceptionEnum
.
PARAMETER_TYPE_ERR
.
getEmsg
()
);
}
}
}
}
...
@@ -519,10 +522,6 @@ public class FirefightersController extends BaseController {
...
@@ -519,10 +522,6 @@ public class FirefightersController extends BaseController {
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
ReginParams
reginParam
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
if
(
null
!=
reginParam
)
{
if
(
null
!=
reginParam
)
{
String
bizOrgCode
=
reginParam
.
getPersonIdentity
().
getBizOrgCode
();
String
bizOrgCode
=
reginParam
.
getPersonIdentity
().
getBizOrgCode
();
// String bizOrgName = reginParam.getPersonIdentity().getCompanyName();
// QueryWrapper<Firefighters> firefightersQueryWrapper2 = new QueryWrapper<>();
// firefightersQueryWrapper2.eq("amos_user_id",reginParam.getUserModel().getUserId());
// Firefighters one = iFirefightersService.getOne(firefightersQueryWrapper2);
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
list
=
new
ArrayList
<>();
Map
<
String
,
Object
>
bizOrgCodeAndBizOrgName
=
iFirefightersService
.
getCompanyName
(
bizOrgCode
);
Map
<
String
,
Object
>
bizOrgCodeAndBizOrgName
=
iFirefightersService
.
getCompanyName
(
bizOrgCode
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirefightersJacketController.java
View file @
23a7b027
...
@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -128,7 +129,7 @@ public class FirefightersJacketController extends BaseController {
...
@@ -128,7 +129,7 @@ public class FirefightersJacketController extends BaseController {
Class
<?
extends
FirefightersJacket
>
aClass
=
firefightersJacket
.
getClass
();
Class
<?
extends
FirefightersJacket
>
aClass
=
firefightersJacket
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
firefightersJacket
);
Object
o
=
field
.
get
(
firefightersJacket
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -158,7 +159,7 @@ public class FirefightersJacketController extends BaseController {
...
@@ -158,7 +159,7 @@ public class FirefightersJacketController extends BaseController {
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
}
});
});
IPage
<
FirefightersJacket
>
page
;
IPage
<
FirefightersJacket
>
page
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/FirestationJacketController.java
View file @
23a7b027
...
@@ -17,6 +17,7 @@ import io.swagger.annotations.ApiParam;
...
@@ -17,6 +17,7 @@ import io.swagger.annotations.ApiParam;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -147,7 +148,7 @@ public class FirestationJacketController extends BaseController {
...
@@ -147,7 +148,7 @@ public class FirestationJacketController extends BaseController {
Class
<?
extends
FirestationJacket
>
aClass
=
firestationJacket
.
getClass
();
Class
<?
extends
FirestationJacket
>
aClass
=
firestationJacket
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
firestationJacket
);
Object
o
=
field
.
get
(
firestationJacket
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -177,7 +178,7 @@ public class FirestationJacketController extends BaseController {
...
@@ -177,7 +178,7 @@ public class FirestationJacketController extends BaseController {
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
}
});
});
IPage
<
FirestationJacket
>
page
;
IPage
<
FirestationJacket
>
page
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/OrganizationController.java
View file @
23a7b027
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.EasyExcelFactory
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.ExcelWriter
;
import
com.alibaba.excel.read.builder.ExcelReaderSheetBuilder
;
import
com.alibaba.excel.read.builder.ExcelReaderSheetBuilder
;
...
@@ -30,6 +31,7 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -30,6 +31,7 @@ import org.springframework.web.multipart.MultipartFile;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
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.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -52,6 +54,10 @@ public class OrganizationController extends BaseController {
...
@@ -52,6 +54,10 @@ public class OrganizationController extends BaseController {
@Autowired
@Autowired
private
OrganizationService
organizationService
;
private
OrganizationService
organizationService
;
@Autowired
private
static
String
UTF8
=
"UTF-8"
;
private
static
String
CONTENTDISPOSITION
=
"Content-Disposition"
;
@PersonIdentify
@PersonIdentify
@GetMapping
(
value
=
"/getOrganizationInfo"
)
@GetMapping
(
value
=
"/getOrganizationInfo"
)
...
@@ -100,21 +106,21 @@ public class OrganizationController extends BaseController {
...
@@ -100,21 +106,21 @@ public class OrganizationController extends BaseController {
public
void
export
(
HttpServletResponse
response
)
{
public
void
export
(
HttpServletResponse
response
)
{
String
file_name
=
null
;
String
file_name
=
null
;
try
{
try
{
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setCharacterEncoding
(
UTF8
);
response
.
setHeader
(
"content-Type"
,
"application/vnd.ms-excel"
);
response
.
setHeader
(
"content-Type"
,
"application/vnd.ms-excel"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
"组织机构信息.xlsx"
,
"UTF-8"
)
);
response
.
setHeader
(
CONTENTDISPOSITION
,
"attachment;filename="
+
URLEncoder
.
encode
(
"组织机构信息.xlsx"
,
UTF8
)
);
response
.
setHeader
(
"Access-Control-Expose-Headers"
,
"Content-Disposition"
);
response
.
setHeader
(
"Access-Control-Expose-Headers"
,
CONTENTDISPOSITION
);
List
<
OrganizationExportDto
>
firstSheetVOS
=
new
ArrayList
<>();
List
<
OrganizationExportDto
>
firstSheetVOS
=
new
ArrayList
<>();
List
<
OrganizationUserExportDto
>
secondSheetVOS
=
new
ArrayList
<>();
List
<
OrganizationUserExportDto
>
secondSheetVOS
=
new
ArrayList
<>();
// 应急救援小组写入
// 应急救援小组写入
ExcelWriter
writer
=
EasyExcel
.
write
(
response
.
getOutputStream
(),
OrganizationExportDto
.
class
).
build
();
ExcelWriter
writer
=
EasyExcel
Factory
.
write
(
response
.
getOutputStream
(),
OrganizationExportDto
.
class
).
build
();
WriteSheet
sheet
=
EasyExcel
.
writerSheet
(
0
,
"应急救援小组"
).
build
();
WriteSheet
sheet
=
EasyExcel
Factory
.
writerSheet
(
0
,
"应急救援小组"
).
build
();
writer
.
write
(
firstSheetVOS
,
sheet
);
writer
.
write
(
firstSheetVOS
,
sheet
);
// 组员写入
// 组员写入
WriteSheet
sheet2
=
EasyExcel
.
writerSheet
(
1
,
"组员"
).
head
(
OrganizationUserExportDto
.
class
).
build
();
WriteSheet
sheet2
=
EasyExcel
Factory
.
writerSheet
(
1
,
"组员"
).
head
(
OrganizationUserExportDto
.
class
).
build
();
writer
.
write
(
secondSheetVOS
,
sheet2
);
writer
.
write
(
secondSheetVOS
,
sheet2
);
// 关闭流
// 关闭流
...
@@ -140,21 +146,21 @@ public class OrganizationController extends BaseController {
...
@@ -140,21 +146,21 @@ public class OrganizationController extends BaseController {
}
}
}
}
try
{
try
{
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setCharacterEncoding
(
UTF8
);
response
.
setHeader
(
"content-Type"
,
"application/vnd.ms-excel"
);
response
.
setHeader
(
"content-Type"
,
"application/vnd.ms-excel"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
"组织机构信息.xlsx"
,
"UTF-8"
)
);
response
.
setHeader
(
CONTENTDISPOSITION
,
"attachment;filename="
+
URLEncoder
.
encode
(
"组织机构信息.xlsx"
,
UTF8
)
);
response
.
setHeader
(
"Access-Control-Expose-Headers"
,
"Content-Disposition"
);
response
.
setHeader
(
"Access-Control-Expose-Headers"
,
CONTENTDISPOSITION
);
// 应急小组信息
// 应急小组信息
List
<
OrganizationExportDto
>
organizationList
=
organizationService
.
selectOrganization
(
bizOrgCode
);
List
<
OrganizationExportDto
>
organizationList
=
organizationService
.
selectOrganization
(
bizOrgCode
);
// 应急小组人员信息
// 应急小组人员信息
List
<
OrganizationUserExportDto
>
organizationUserList
=
organizationService
.
selectOrganizationUserList
(
bizOrgCode
);
List
<
OrganizationUserExportDto
>
organizationUserList
=
organizationService
.
selectOrganizationUserList
(
bizOrgCode
);
// 应急小组写入
// 应急小组写入
ExcelWriter
writer
=
EasyExcel
.
write
(
response
.
getOutputStream
(),
OrganizationExportDto
.
class
).
build
();
ExcelWriter
writer
=
EasyExcel
Factory
.
write
(
response
.
getOutputStream
(),
OrganizationExportDto
.
class
).
build
();
WriteSheet
sheet
=
EasyExcel
.
writerSheet
(
0
,
"应急救援小组"
).
build
();
WriteSheet
sheet
=
EasyExcel
Factory
.
writerSheet
(
0
,
"应急救援小组"
).
build
();
writer
.
write
(
organizationList
,
sheet
);
writer
.
write
(
organizationList
,
sheet
);
// 组员写入
// 组员写入
WriteSheet
sheet2
=
EasyExcel
.
writerSheet
(
1
,
"组员"
).
head
(
OrganizationUserExportDto
.
class
).
build
();
WriteSheet
sheet2
=
EasyExcel
Factory
.
writerSheet
(
1
,
"组员"
).
head
(
OrganizationUserExportDto
.
class
).
build
();
writer
.
write
(
organizationUserList
,
sheet2
);
writer
.
write
(
organizationUserList
,
sheet2
);
// 关闭流
// 关闭流
...
@@ -179,14 +185,14 @@ public class OrganizationController extends BaseController {
...
@@ -179,14 +185,14 @@ public class OrganizationController extends BaseController {
}
}
}
}
try
{
try
{
ExcelReader
reader
=
EasyExcel
.
read
(
file
.
getInputStream
()).
build
();
ExcelReader
reader
=
EasyExcel
Factory
.
read
(
file
.
getInputStream
()).
build
();
List
<
OrganizationExportDto
>
organizationList
=
ExcelUtil
.
readExcel
(
reader
,
OrganizationExportDto
.
class
,
0
);
List
<
OrganizationExportDto
>
organizationList
=
ExcelUtil
.
readExcel
(
reader
,
OrganizationExportDto
.
class
,
0
);
List
<
OrganizationUserExportDto
>
organizationUserList
=
ExcelUtil
.
readExcel
(
reader
,
OrganizationUserExportDto
.
class
,
1
);
List
<
OrganizationUserExportDto
>
organizationUserList
=
ExcelUtil
.
readExcel
(
reader
,
OrganizationUserExportDto
.
class
,
1
);
organizationService
.
saveOrganization
(
organizationList
,
organizationUserList
,
bizOrgCode
);
organizationService
.
saveOrganization
(
organizationList
,
organizationUserList
,
bizOrgCode
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
e
.
getMessage
());
throw
new
BadRequest
(
e
.
getMessage
());
}
}
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/PowerTransferCompanyController.java
View file @
23a7b027
...
@@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -130,7 +131,7 @@ public class PowerTransferCompanyController extends BaseController {
...
@@ -130,7 +131,7 @@ public class PowerTransferCompanyController extends BaseController {
Class
<?
extends
PowerTransferCompany
>
aClass
=
powerTransferCompany
.
getClass
();
Class
<?
extends
PowerTransferCompany
>
aClass
=
powerTransferCompany
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
powerTransferCompany
);
Object
o
=
field
.
get
(
powerTransferCompany
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -141,16 +142,13 @@ public class PowerTransferCompanyController extends BaseController {
...
@@ -141,16 +142,13 @@ public class PowerTransferCompanyController extends BaseController {
}
else
if
(
type
.
equals
(
Long
.
class
))
{
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
powerTransferCompany
);
Long
fileValue
=
(
Long
)
field
.
get
(
powerTransferCompany
);
powerTransferCompanyQueryWrapper
.
eq
(
name
,
fileValue
);
powerTransferCompanyQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
powerTransferCompany
);
powerTransferCompanyQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
powerTransferCompany
);
String
fileValue
=
(
String
)
field
.
get
(
powerTransferCompany
);
powerTransferCompanyQueryWrapper
.
eq
(
name
,
fileValue
);
powerTransferCompanyQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
}
});
});
IPage
<
PowerTransferCompany
>
page
;
IPage
<
PowerTransferCompany
>
page
;
...
@@ -176,10 +174,6 @@ public class PowerTransferCompanyController extends BaseController {
...
@@ -176,10 +174,6 @@ public class PowerTransferCompanyController extends BaseController {
throw
new
BadRequest
(
"警情ID不能为空"
);
throw
new
BadRequest
(
"警情ID不能为空"
);
}
}
jcSituationDetailMapper
.
insert
(
jcSituationDetail
);
jcSituationDetailMapper
.
insert
(
jcSituationDetail
);
// if (ObjectUtils.isNotEmpty(jcSituationDetail.getAttachments())) {
// sourceFileService.saveAttachments(jcSituationDetail.getSequenceNbr(), jcSituationDetail.getAttachments());
// }
// 自定义指令信息消息推送
// 自定义指令信息消息推送
// 定义指令信息消息推送 页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
// 定义指令信息消息推送 页面发送mqtt 默认发送 String 类型 0, 新警情 1 警情状态变化
emqKeeper
.
getMqttClient
().
publish
(
topic
,
"0"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
topic
,
"0"
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/PowerTransferCompanyResourcesController.java
View file @
23a7b027
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IUserCarService;
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IUserCarService;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -27,6 +28,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerTransferCompanyRes
...
@@ -27,6 +28,7 @@ import com.yeejoin.amos.boot.module.jcs.biz.service.impl.PowerTransferCompanyRes
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
/**
/**
...
@@ -95,7 +97,6 @@ public class PowerTransferCompanyResourcesController extends BaseController {
...
@@ -95,7 +97,6 @@ public class PowerTransferCompanyResourcesController extends BaseController {
//获取用户已绑定车辆id、
//获取用户已绑定车辆id、
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
UserCar
userCar
=
userCarService
.
selectByAmosUserId
(
Long
.
valueOf
(
agencyUserModel
.
getUserId
()));
id
=
userCar
!=
null
?
userCar
.
getCarId
():
null
;
id
=
userCar
!=
null
?
userCar
.
getCarId
():
null
;
UpdateWrapper
<
PowerTransferCompanyResources
>
up
=
new
UpdateWrapper
<>();
return
powerTransferCompanyResourcesService
.
update
(
new
UpdateWrapper
<
PowerTransferCompanyResources
>().
eq
(
"resources_id"
,
id
).
set
(
"status"
,
code
));
return
powerTransferCompanyResourcesService
.
update
(
new
UpdateWrapper
<
PowerTransferCompanyResources
>().
eq
(
"resources_id"
,
id
).
set
(
"status"
,
code
));
}
}
...
@@ -138,7 +139,7 @@ public class PowerTransferCompanyResourcesController extends BaseController {
...
@@ -138,7 +139,7 @@ public class PowerTransferCompanyResourcesController extends BaseController {
Class
<?
extends
PowerTransferCompanyResources
>
aClass
=
powerTransferCompanyResources
.
getClass
();
Class
<?
extends
PowerTransferCompanyResources
>
aClass
=
powerTransferCompanyResources
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
powerTransferCompanyResources
);
Object
o
=
field
.
get
(
powerTransferCompanyResources
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -149,16 +150,13 @@ public class PowerTransferCompanyResourcesController extends BaseController {
...
@@ -149,16 +150,13 @@ public class PowerTransferCompanyResourcesController extends BaseController {
}
else
if
(
type
.
equals
(
Long
.
class
))
{
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
powerTransferCompanyResources
);
Long
fileValue
=
(
Long
)
field
.
get
(
powerTransferCompanyResources
);
powerTransferCompanyResourcesQueryWrapper
.
eq
(
name
,
fileValue
);
powerTransferCompanyResourcesQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
powerTransferCompanyResources
);
powerTransferCompanyResourcesQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
powerTransferCompanyResources
);
String
fileValue
=
(
String
)
field
.
get
(
powerTransferCompanyResources
);
powerTransferCompanyResourcesQueryWrapper
.
eq
(
name
,
fileValue
);
powerTransferCompanyResourcesQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
}
});
});
IPage
<
PowerTransferCompanyResources
>
page
;
IPage
<
PowerTransferCompanyResources
>
page
;
...
...
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 @
23a7b027
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.UserCar;
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.UserCar;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.UserCarMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.UserCarMapper
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -128,7 +129,7 @@ public class PowerTransferController extends BaseController {
...
@@ -128,7 +129,7 @@ public class PowerTransferController extends BaseController {
Class
<?
extends
PowerTransfer
>
aClass
=
powerTransfer
.
getClass
();
Class
<?
extends
PowerTransfer
>
aClass
=
powerTransfer
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
powerTransfer
);
Object
o
=
field
.
get
(
powerTransfer
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -139,9 +140,6 @@ public class PowerTransferController extends BaseController {
...
@@ -139,9 +140,6 @@ public class PowerTransferController extends BaseController {
}
else
if
(
type
.
equals
(
Long
.
class
))
{
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
powerTransfer
);
Long
fileValue
=
(
Long
)
field
.
get
(
powerTransfer
);
powerTransferQueryWrapper
.
eq
(
name
,
fileValue
);
powerTransferQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
powerTransfer
);
powerTransferQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
powerTransfer
);
String
fileValue
=
(
String
)
field
.
get
(
powerTransfer
);
powerTransferQueryWrapper
.
eq
(
name
,
fileValue
);
powerTransferQueryWrapper
.
eq
(
name
,
fileValue
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ShiftChangeController.java
View file @
23a7b027
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
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.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -128,7 +129,7 @@ public class ShiftChangeController extends BaseController {
...
@@ -128,7 +129,7 @@ public class ShiftChangeController extends BaseController {
iShiftChangeService
.
exportPdfById
(
response
,
shiftChangeId
);
iShiftChangeService
.
exportPdfById
(
response
,
shiftChangeId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
RuntimeException
(
"系统异常!"
);
throw
new
BadRequest
(
"系统异常!"
);
}
}
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/SignController.java
View file @
23a7b027
...
@@ -179,14 +179,6 @@ public class SignController extends BaseController {
...
@@ -179,14 +179,6 @@ public class SignController extends BaseController {
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"保存打卡记录"
,
notes
=
"保存打卡记录"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"保存打卡记录"
,
notes
=
"保存打卡记录"
)
@PostMapping
(
value
=
"/saveSign"
)
@PostMapping
(
value
=
"/saveSign"
)
public
ResponseModel
<
Boolean
>
hasSign
(
@RequestBody
SignDto
dto
)
{
public
ResponseModel
<
Boolean
>
hasSign
(
@RequestBody
SignDto
dto
)
{
// QueryWrapper<Sign> signQueryWrapper = new QueryWrapper<>();
// signQueryWrapper.eq("user_id",dto.getSignUserId());
// signQueryWrapper.eq("date",dto.getDate());
// signQueryWrapper.eq("type",dto.getType());
// Sign one = signServiceImpl.getOne(signQueryWrapper);
// if(null != one) {
// return ResponseHelper.buildResponse(true);
// }
return
ResponseHelper
.
buildResponse
(
signServiceImpl
.
saveSign
(
dto
));
return
ResponseHelper
.
buildResponse
(
signServiceImpl
.
saveSign
(
dto
));
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/TemplateController.java
View file @
23a7b027
...
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ReflectionUtils
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
...
@@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
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.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
@@ -115,7 +117,7 @@ public class TemplateController extends BaseController {
...
@@ -115,7 +117,7 @@ public class TemplateController extends BaseController {
Class
<?
extends
Template
>
aClass
=
template
.
getClass
();
Class
<?
extends
Template
>
aClass
=
template
.
getClass
();
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
Arrays
.
stream
(
aClass
.
getDeclaredFields
()).
forEach
(
field
->
{
try
{
try
{
field
.
setAccessible
(
true
);
ReflectionUtils
.
makeAccessible
(
field
);
Object
o
=
field
.
get
(
template
);
Object
o
=
field
.
get
(
template
);
if
(
o
!=
null
)
{
if
(
o
!=
null
)
{
Class
<?>
type
=
field
.
getType
();
Class
<?>
type
=
field
.
getType
();
...
@@ -126,16 +128,13 @@ public class TemplateController extends BaseController {
...
@@ -126,16 +128,13 @@ public class TemplateController extends BaseController {
}
else
if
(
type
.
equals
(
Long
.
class
))
{
}
else
if
(
type
.
equals
(
Long
.
class
))
{
Long
fileValue
=
(
Long
)
field
.
get
(
template
);
Long
fileValue
=
(
Long
)
field
.
get
(
template
);
templateQueryWrapper
.
eq
(
name
,
fileValue
);
templateQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
if
(
type
.
equals
(
String
.
class
))
{
String
fileValue
=
(
String
)
field
.
get
(
template
);
templateQueryWrapper
.
eq
(
name
,
fileValue
);
}
else
{
}
else
{
String
fileValue
=
(
String
)
field
.
get
(
template
);
String
fileValue
=
(
String
)
field
.
get
(
template
);
templateQueryWrapper
.
eq
(
name
,
fileValue
);
templateQueryWrapper
.
eq
(
name
,
fileValue
);
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"系统异常"
);
throw
new
BadRequest
(
"系统异常"
);
}
}
});
});
IPage
<
Template
>
page
;
IPage
<
Template
>
page
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/UserController.java
deleted
100644 → 0
View file @
bc61b69b
This diff is collapsed.
Click to expand it.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/VoiceRecordFileController.java
View file @
23a7b027
...
@@ -58,8 +58,8 @@ public class VoiceRecordFileController extends BaseController {
...
@@ -58,8 +58,8 @@ public class VoiceRecordFileController extends BaseController {
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
public
ResponseModel
<
VoiceRecordFileDto
>
getRecordById
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
VoiceRecordFileDto
>
getRecordById
(
@PathVariable
Long
sequenceNbr
)
{
VoiceRecordFileDto
record
=
voiceRecordFileService
.
getRecordById
(
sequenceNbr
);
VoiceRecordFileDto
data
=
voiceRecordFileService
.
getRecordById
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
record
);
return
ResponseHelper
.
buildResponse
(
data
);
}
}
/**
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/rule/action/AlertCalledAction.java
View file @
23a7b027
...
@@ -35,31 +35,6 @@ public class AlertCalledAction {
...
@@ -35,31 +35,6 @@ public class AlertCalledAction {
@Autowired
@Autowired
private
AlertSubmittedServiceImpl
alertSubmittedService
;
private
AlertSubmittedServiceImpl
alertSubmittedService
;
public
void
sendSysMessage
(
String
msgType
,
AlertCalledRo
contingency
)
{
// ContingencyRo ro = (ContingencyRo)contingency;
// ro.setTelemetryMap(null);
// ro.setTelesignallingMap(null);
// Constructor<?> constructor;
// try {
// constructor = Class.forName(
// PACKAGEURL + result.getClass().getSimpleName() + "Message")
// .getConstructor(ActionResult.class);
// AbstractActionResultMessage<?> action = (AbstractActionResultMessage<?>) constructor.newInstance(result);
// ToipResponse toipResponse = action.buildResponse(msgType, contingency, result.toJson());
// String topic = String.format("/%s/%s/%s", serviceName, stationName,"numberPlan");
// log.info(String.format("mqtt[%s]:【 %s 】", topic, toipResponse.toJsonStr()));
// webMqttComponent.publish(topic, toipResponse.toJsonStr());
// ContingencyEvent event = new ContingencyEvent(this);
// event.setMsgBody(toipResponse.toJsonStr());
// event.setTopic(topic);
// event.setMsgType(msgType);
// event.setContingency(contingency);
// contingencyLogPublisher.publish(event);
//
// } catch (Exception e) {
// e.printStackTrace();
// }
}
/**
/**
* 短信报送
* 短信报送
...
@@ -71,8 +46,7 @@ public class AlertCalledAction {
...
@@ -71,8 +46,7 @@ public class AlertCalledAction {
*/
*/
@RuleMethod
(
methodLabel
=
"短信报送"
,
project
=
"西咸机场119接处警规则"
)
@RuleMethod
(
methodLabel
=
"短信报送"
,
project
=
"西咸机场119接处警规则"
)
public
void
sendcmd
(
String
smsCode
,
String
sendType
,
List
<
Map
<
String
,
Object
>>
submittedList
,
Object
object
)
throws
Exception
{
public
void
sendcmd
(
String
smsCode
,
String
sendType
,
List
<
Map
<
String
,
Object
>>
submittedList
,
Object
object
)
throws
Exception
{
log
.
warn
(
"接收到规则调用--------------西咸机场119接处警规则/alertCalledRule"
);
System
.
out
.
println
(
"接收到规则调用--------------西咸机场119接处警规则/alertCalledRule"
);
alertSubmittedService
.
ruleCallbackAction
(
smsCode
,
submittedList
,
object
);
alertSubmittedService
.
ruleCallbackAction
(
smsCode
,
submittedList
,
object
);
}
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/rule/action/PowerTransferAction.java
View file @
23a7b027
...
@@ -58,7 +58,7 @@ public class PowerTransferAction {
...
@@ -58,7 +58,7 @@ public class PowerTransferAction {
AlertCallePowerTransferRo
calledRo
=
(
AlertCallePowerTransferRo
)
object
;
AlertCallePowerTransferRo
calledRo
=
(
AlertCallePowerTransferRo
)
object
;
// 获取力量调派发送人员
// 获取力量调派发送人员
List
<
String
>
persons
=
n
ew
ArrayList
<>()
;
List
<
String
>
persons
=
n
ull
;
List
<
Map
<
String
,
Object
>>
personslist
=
new
ArrayList
<
Map
<
String
,
Object
>>();
List
<
Map
<
String
,
Object
>>
personslist
=
new
ArrayList
<
Map
<
String
,
Object
>>();
if
(
FireBrigadeTypeEnum
.
专职消防队
.
getKey
().
equals
(
calledRo
.
getPowerTransType
()))
{
if
(
FireBrigadeTypeEnum
.
专职消防队
.
getKey
().
equals
(
calledRo
.
getPowerTransType
()))
{
alertSubmittedService
.
ruleCallbackActionForPowerTransferForCar
(
smsCode
,
sendIds
,
object
,
personslist
);
//消防车辆
alertSubmittedService
.
ruleCallbackActionForPowerTransferForCar
(
smsCode
,
sendIds
,
object
,
personslist
);
//消防车辆
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AircraftServiceImpl.java
View file @
23a7b027
...
@@ -64,6 +64,8 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
...
@@ -64,6 +64,8 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
@Autowired
@Autowired
private
AlertFormValueServiceImpl
iAlertFormValueService
;
private
AlertFormValueServiceImpl
iAlertFormValueService
;
private
static
String
aircraftModel
=
"aircraftModel"
;
/**
/**
* <pre>
* <pre>
* 保存
* 保存
...
@@ -121,7 +123,7 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
...
@@ -121,7 +123,7 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
AlertCalledObjsDto
dto
=
(
AlertCalledObjsDto
)
iAlertCalledService
.
selectAlertCalledByIdNoRedisNew
(
seq
);
AlertCalledObjsDto
dto
=
(
AlertCalledObjsDto
)
iAlertCalledService
.
selectAlertCalledByIdNoRedisNew
(
seq
);
List
<
AlertFormValue
>
list
=
dto
.
getAlertFormValue
();
List
<
AlertFormValue
>
list
=
dto
.
getAlertFormValue
();
String
aircraft
=
""
;
String
aircraft
=
""
;
List
<
AlertFormValue
>
list1
=
list
.
stream
().
filter
(
formValue
->
formValue
.
getFieldCode
().
equals
(
"aircraft"
)
||
formValue
.
getFieldCode
().
equals
(
"aircraftModel"
)).
collect
(
Collectors
.
toList
());
List
<
AlertFormValue
>
list1
=
list
.
stream
().
filter
(
formValue
->
formValue
.
getFieldCode
().
equals
(
"aircraft"
)
||
formValue
.
getFieldCode
().
equals
(
aircraftModel
)).
collect
(
Collectors
.
toList
());
if
(
list1
.
size
()
>
0
)
{
if
(
list1
.
size
()
>
0
)
{
if
(!
ValidationUtil
.
isEmpty
(
list1
.
get
(
0
).
getFieldValue
()))
{
if
(!
ValidationUtil
.
isEmpty
(
list1
.
get
(
0
).
getFieldValue
()))
{
aircraft
=
list1
.
get
(
0
).
getFieldValue
();
aircraft
=
list1
.
get
(
0
).
getFieldValue
();
...
@@ -158,7 +160,7 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
...
@@ -158,7 +160,7 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
AlertCalledObjsDto
dto
=
(
AlertCalledObjsDto
)
iAlertCalledService
.
selectAlertCalledByIdNoRedisNew
(
seq
);
AlertCalledObjsDto
dto
=
(
AlertCalledObjsDto
)
iAlertCalledService
.
selectAlertCalledByIdNoRedisNew
(
seq
);
List
<
AlertFormValue
>
list
=
dto
.
getAlertFormValue
();
List
<
AlertFormValue
>
list
=
dto
.
getAlertFormValue
();
String
aircraft
=
""
;
String
aircraft
=
""
;
List
<
AlertFormValue
>
list1
=
list
.
stream
().
filter
(
formValue
->
formValue
.
getFieldCode
().
equals
(
"aircraft"
)
||
formValue
.
getFieldCode
().
equals
(
"aircraftModel"
)).
collect
(
Collectors
.
toList
());
List
<
AlertFormValue
>
list1
=
list
.
stream
().
filter
(
formValue
->
formValue
.
getFieldCode
().
equals
(
"aircraft"
)
||
formValue
.
getFieldCode
().
equals
(
aircraftModel
)).
collect
(
Collectors
.
toList
());
if
(
list1
.
size
()
>
0
)
{
if
(
list1
.
size
()
>
0
)
{
if
(!
ValidationUtil
.
isEmpty
(
list1
.
get
(
0
).
getFieldValue
()))
{
if
(!
ValidationUtil
.
isEmpty
(
list1
.
get
(
0
).
getFieldValue
()))
{
aircraft
=
list1
.
get
(
0
).
getFieldValue
();
aircraft
=
list1
.
get
(
0
).
getFieldValue
();
...
@@ -260,11 +262,6 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
...
@@ -260,11 +262,6 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
AircraftDto
aircraftDto
=
this
.
queryBySeq
(
id
);
AircraftDto
aircraftDto
=
this
.
queryBySeq
(
id
);
aircraftDto
.
setIsDelete
(
true
);
aircraftDto
.
setIsDelete
(
true
);
this
.
updateWithModel
(
aircraftDto
);
this
.
updateWithModel
(
aircraftDto
);
// //删除附件信息
// Systemctl.fileInfoClient.deleteByAlias(agencyCode, Aircraft.class.getSimpleName(),
// String.valueOf(id), null);
// //删除航空器信息
// this.deleteBySeq(id);
}
}
return
seqs
;
return
seqs
;
}
}
...
@@ -395,7 +392,7 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
...
@@ -395,7 +392,7 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
@Override
@Override
public
Aircraft
queryByaircraftModel
(
String
seq
)
{
public
Aircraft
queryByaircraftModel
(
String
seq
)
{
QueryWrapper
<
Aircraft
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
Aircraft
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"aircraftModel"
,
seq
);
queryWrapper
.
eq
(
aircraftModel
,
seq
);
// 警情动态表单数据
// 警情动态表单数据
Aircraft
aircraft
=
this
.
getOne
(
queryWrapper
);
Aircraft
aircraft
=
this
.
getOne
(
queryWrapper
);
return
aircraft
;
return
aircraft
;
...
@@ -412,7 +409,6 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
...
@@ -412,7 +409,6 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
AlertFormValue
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"alert_called_id"
,
alertId
);
queryWrapper
.
eq
(
"alert_called_id"
,
alertId
);
// 警情动态表单数据
// 警情动态表单数据
List
<
KeyValueLabel
>
listdate
=
new
ArrayList
<>();
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
List
<
AlertFormValue
>
list
=
iAlertFormValueService
.
list
(
queryWrapper
);
String
num
=
null
;
String
num
=
null
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledFeedbackServiceImpl.java
View file @
23a7b027
...
@@ -46,7 +46,6 @@ public class AlertCalledFeedbackServiceImpl extends BaseService<AlertCalledFeedb
...
@@ -46,7 +46,6 @@ public class AlertCalledFeedbackServiceImpl extends BaseService<AlertCalledFeedb
public
boolean
handleFeedback
(
AlertCalledFeedbackDto
model
)
{
public
boolean
handleFeedback
(
AlertCalledFeedbackDto
model
)
{
Long
alertCalledId
=
model
.
getAlertCalledId
();
Long
alertCalledId
=
model
.
getAlertCalledId
();
// 更新警情调派任务状态
// 更新警情调派任务状态
List
<
String
>
carIdList
=
powerTransferMapper
.
queryTransferCarIdsByAlertCalledId
(
alertCalledId
);
// 保存警情反馈
// 保存警情反馈
model
=
createWithModel
(
model
);
model
=
createWithModel
(
model
);
...
...
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