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
a6c96af0
Commit
a6c96af0
authored
Jul 17, 2024
by
王果
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
21080 添加设备时,设备品种可以为空进行提交,导致设备原本有品种提交了无品种数据的设备。
parent
4b823c1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
564 additions
and
560 deletions
+564
-560
EquipmentCategoryController.java
...odule/ymt/biz/controller/EquipmentCategoryController.java
+564
-560
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/controller/EquipmentCategoryController.java
View file @
a6c96af0
...
@@ -12,11 +12,7 @@ import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
...
@@ -12,11 +12,7 @@ import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipExportDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipExportDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentMessageDto
;
import
com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentMessageDto
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.*
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ImageSizeEnums
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.ImageSizeEnums
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
import
com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgOtherInfoMapper
;
...
@@ -32,15 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -32,15 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.*
;
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.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
;
...
@@ -67,555 +55,571 @@ import java.util.stream.Collectors;
...
@@ -67,555 +55,571 @@ import java.util.stream.Collectors;
@RequestMapping
(
value
=
"/equipment-category"
)
@RequestMapping
(
value
=
"/equipment-category"
)
public
class
EquipmentCategoryController
extends
BaseController
{
public
class
EquipmentCategoryController
extends
BaseController
{
@Autowired
@Autowired
EquipmentCategoryServiceImpl
equipmentCategoryServiceImpl
;
EquipmentCategoryServiceImpl
equipmentCategoryServiceImpl
;
@Autowired
@Autowired
IEquipmentCategoryService
equipmentCategoryService
;
IEquipmentCategoryService
equipmentCategoryService
;
@Autowired
@Autowired
EquipmentCategoryMapper
equipmentCategoryMapper
;
EquipmentCategoryMapper
equipmentCategoryMapper
;
@Value
(
"${regulatory_code_prefix}"
)
@Value
(
"${regulatory_code_prefix}"
)
String
REGULATORY_CODE_PREFIX
;
String
REGULATORY_CODE_PREFIX
;
@Autowired
@Autowired
IdxBizJgOtherInfoMapper
idxBizJgOtherInfoMapper
;
IdxBizJgOtherInfoMapper
idxBizJgOtherInfoMapper
;
/**
/**
* 新增装备分类
* 新增装备分类
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增装备分类"
,
notes
=
"新增装备分类"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增装备分类"
,
notes
=
"新增装备分类"
)
public
ResponseModel
<
EquipmentCategoryDto
>
save
(
@RequestBody
EquipmentCategoryDto
model
)
{
public
ResponseModel
<
EquipmentCategoryDto
>
save
(
@RequestBody
EquipmentCategoryDto
model
)
{
model
=
equipmentCategoryServiceImpl
.
createWithModel
(
model
);
model
=
equipmentCategoryServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
}
/**
/**
* 根据sequenceNbr删除
* 根据sequenceNbr删除
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除装备分类"
,
notes
=
"根据sequenceNbr删除装备分类"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除装备分类"
,
notes
=
"根据sequenceNbr删除装备分类"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
removeById
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
removeById
(
sequenceNbr
));
}
}
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个装备分类"
,
notes
=
"根据sequenceNbr查询单个装备分类"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个装备分类"
,
notes
=
"根据sequenceNbr查询单个装备分类"
)
public
ResponseModel
<
EquipmentCategoryDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
EquipmentCategoryDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
* @param current 当前页
* @param current 当前页
* @param current 每页大小
* @param current 每页大小
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"装备分类分页查询"
,
notes
=
"装备分类分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"装备分类分页查询"
,
notes
=
"装备分类分页查询"
)
public
ResponseModel
<
Page
<
EquipmentCategoryDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
public
ResponseModel
<
Page
<
EquipmentCategoryDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
EquipmentCategoryDto
>
page
=
new
Page
<
EquipmentCategoryDto
>();
Page
<
EquipmentCategoryDto
>
page
=
new
Page
<
EquipmentCategoryDto
>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
queryForEquipmentCategoryPage
(
page
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
queryForEquipmentCategoryPage
(
page
));
}
}
/**
/**
* 列表全部数据查询
* 列表全部数据查询
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"装备分类列表全部数据查询"
,
notes
=
"装备分类列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"装备分类列表全部数据查询"
,
notes
=
"装备分类列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
EquipmentCategoryDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
EquipmentCategoryDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
queryForEquipmentCategoryList
());
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
queryForEquipmentCategoryList
());
}
}
/**
/**
* 树
* 树
*
*
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"装备分类列表全部数据查询"
,
notes
=
"装备分类列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"装备分类列表全部数据查询"
,
notes
=
"装备分类列表全部数据查询"
)
@GetMapping
(
value
=
"/tree"
)
@GetMapping
(
value
=
"/tree"
)
public
ResponseModel
<
Object
>
tree
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
throws
Exception
{
public
ResponseModel
<
Object
>
tree
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
throws
Exception
{
if
(
ObjectUtils
.
isEmpty
(
code
)){
if
(
ObjectUtils
.
isEmpty
(
code
))
{
return
ResponseHelper
.
buildResponse
(
new
ArrayList
<>());
return
ResponseHelper
.
buildResponse
(
new
ArrayList
<>());
}
}
EquipmentCategory
root
=
equipmentCategoryServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
EquipmentCategory
>().
eq
(
EquipmentCategory:
:
getCode
,
code
));
EquipmentCategory
root
=
equipmentCategoryServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
EquipmentCategory
>().
eq
(
EquipmentCategory:
:
getCode
,
code
));
QueryWrapper
<
EquipmentCategory
>
queryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
EquipmentCategory
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
likeRight
(
"code"
,
code
.
replaceAll
(
"0+$"
,
""
));
queryWrapper
.
likeRight
(
"code"
,
code
.
replaceAll
(
"0+$"
,
""
));
Collection
<
EquipmentCategory
>
list
=
equipmentCategoryServiceImpl
.
list
(
queryWrapper
);
Collection
<
EquipmentCategory
>
list
=
equipmentCategoryServiceImpl
.
list
(
queryWrapper
);
Menu
menu
=
new
Menu
(
root
.
getId
(),
root
.
getName
(),
0L
,
0
);
Menu
menu
=
new
Menu
(
root
.
getId
(),
root
.
getName
(),
0L
,
0
);
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
root
.
getId
(),
list
,
EquipmentCategory
.
class
.
getName
(),
"getId"
,
0
,
"getName"
,
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
root
.
getId
(),
list
,
EquipmentCategory
.
class
.
getName
(),
"getId"
,
0
,
"getName"
,
"getParentId"
,
null
,
"getCode"
);
"getParentId"
,
null
,
"getCode"
);
menu
.
setChildren
(
menus
);
menu
.
setChildren
(
menus
);
List
<
Menu
>
tree
=
new
ArrayList
<>();
List
<
Menu
>
tree
=
new
ArrayList
<>();
tree
.
add
(
menu
);
tree
.
add
(
menu
);
return
ResponseHelper
.
buildResponse
(
tree
);
return
ResponseHelper
.
buildResponse
(
tree
);
}
}
/**
/**
* 返回设备品种树第一个节点
* 设备类别下是否有设备品种。有返回数量,没有返回0
*
*
* @return
* @return
* @throws Exception
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备类别下是否有设备品种"
,
notes
=
"设备类别下是否有设备品种"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"装备分类列表全部数据查询"
,
notes
=
"装备分类列表全部数据查询"
)
@GetMapping
(
value
=
"/haveTree"
)
@GetMapping
(
value
=
"/firstNode"
)
public
ResponseModel
<
String
>
haveTree
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
{
public
ResponseModel
<
Object
>
firstNode
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
throws
Exception
{
if
(
ObjectUtils
.
isEmpty
(
code
))
{
if
(
ObjectUtils
.
isEmpty
(
code
)){
return
ResponseHelper
.
buildResponse
(
"0"
);
return
ResponseHelper
.
buildResponse
(
new
ArrayList
<>());
}
}
QueryWrapper
<
EquipmentCategory
>
queryWrapper
=
new
QueryWrapper
<>();
EquipmentCategory
root
=
equipmentCategoryServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
EquipmentCategory
>().
eq
(
EquipmentCategory:
:
getCode
,
code
));
queryWrapper
.
likeRight
(
"code"
,
code
.
replaceAll
(
"0+$"
,
""
));
QueryWrapper
<
EquipmentCategory
>
queryWrapper
=
new
QueryWrapper
<>();
int
count
=
equipmentCategoryServiceImpl
.
count
(
queryWrapper
);
queryWrapper
.
likeRight
(
"code"
,
code
.
replaceAll
(
"0+$"
,
""
));
return
ResponseHelper
.
buildResponse
(
count
+
""
);
Collection
<
EquipmentCategory
>
list
=
equipmentCategoryServiceImpl
.
list
(
queryWrapper
);
}
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
root
.
getId
(),
list
,
EquipmentCategory
.
class
.
getName
(),
"getId"
,
0
,
"getName"
,
"getParentId"
,
null
,
"getCode"
);
/**
return
ResponseHelper
.
buildResponse
(
ValidationUtil
.
isEmpty
(
menus
)
?
null
:
menus
.
get
(
0
));
* 返回设备品种树第一个节点
}
*
* @return
/**
* @throws Exception
* 设备分类八大类
*/
*
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
* @return
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"装备分类列表全部数据查询"
,
notes
=
"装备分类列表全部数据查询"
)
*/
@GetMapping
(
value
=
"/firstNode"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
<
Object
>
firstNode
(
@RequestParam
(
value
=
"code"
,
required
=
false
)
String
code
)
throws
Exception
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备分类八大类"
,
notes
=
"设备分类八大类"
)
if
(
ObjectUtils
.
isEmpty
(
code
))
{
@GetMapping
(
value
=
"/selectClassify"
)
return
ResponseHelper
.
buildResponse
(
new
ArrayList
<>());
public
ResponseModel
<
JSONArray
>
selectClassify
()
{
}
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
=
equipmentCategoryServiceImpl
.
selectClassify
();
EquipmentCategory
root
=
equipmentCategoryServiceImpl
.
getOne
(
new
LambdaQueryWrapper
<
EquipmentCategory
>().
eq
(
EquipmentCategory:
:
getCode
,
code
));
JSONArray
jsonArray
=
new
JSONArray
();
QueryWrapper
<
EquipmentCategory
>
queryWrapper
=
new
QueryWrapper
<>();
equipmentCategoryDtos
.
forEach
(
e
->{
queryWrapper
.
likeRight
(
"code"
,
code
.
replaceAll
(
"0+$"
,
""
));
jsonArray
.
add
(
e
.
getName
());
Collection
<
EquipmentCategory
>
list
=
equipmentCategoryServiceImpl
.
list
(
queryWrapper
);
}
List
<
Menu
>
menus
=
TreeParser
.
getTree
(
root
.
getId
(),
list
,
EquipmentCategory
.
class
.
getName
(),
"getId"
,
0
,
"getName"
,
);
"getParentId"
,
null
,
"getCode"
);
return
ResponseHelper
.
buildResponse
(
jsonArray
);
return
ResponseHelper
.
buildResponse
(
ValidationUtil
.
isEmpty
(
menus
)
?
null
:
menus
.
get
(
0
));
}
}
/**
/**
* 设备八大类列表树
* 设备分类八大类
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备八大类列表树"
,
notes
=
"设备八大类列表树"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备分类八大类"
,
notes
=
"设备分类八大类"
)
@GetMapping
(
value
=
"/equipTree"
)
@GetMapping
(
value
=
"/selectClassify"
)
public
ResponseModel
<
Object
>
equipTree
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
public
ResponseModel
<
JSONArray
>
selectClassify
()
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
equipTree
(
type
));
List
<
EquipmentCategoryDto
>
equipmentCategoryDtos
=
equipmentCategoryServiceImpl
.
selectClassify
();
}
JSONArray
jsonArray
=
new
JSONArray
();
equipmentCategoryDtos
.
forEach
(
e
->
{
/**
jsonArray
.
add
(
e
.
getName
());
* 设备认领总览
}
*
);
* @return
return
ResponseHelper
.
buildResponse
(
jsonArray
);
*/
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备认领总览"
,
notes
=
"设备认领总览"
)
/**
@GetMapping
(
value
=
"/equipClaimOverview"
)
* 设备八大类列表树
public
ResponseModel
<
Object
>
equipClaimOverview
()
{
*
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
equipClaimOverview
());
* @return
}
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
/**
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备八大类列表树"
,
notes
=
"设备八大类列表树"
)
* 生成监管码和96333码
@GetMapping
(
value
=
"/equipTree"
)
*
public
ResponseModel
<
Object
>
equipTree
(
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
* @return
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
equipTree
(
type
));
*/
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/createSupervisorCode"
,
method
=
RequestMethod
.
POST
)
/**
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"生成监管码和96333码"
,
notes
=
"生成监管码和96333码"
)
* 设备认领总览
public
ResponseModel
<
Object
>
createSupervisorCode
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
*
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
createSupervisorCode
(
map
));
* @return
}
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
/**
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备认领总览"
,
notes
=
"设备认领总览"
)
* 修改数据状态是否显示编辑按钮
@GetMapping
(
value
=
"/equipClaimOverview"
)
* @return
public
ResponseModel
<
Object
>
equipClaimOverview
()
{
*/
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
equipClaimOverview
());
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
}
@RequestMapping
(
value
=
"/updateOtherInfo"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改数据状态"
,
notes
=
"修改数据状态"
)
/**
public
ResponseModel
<
Object
>
updateOtherInfo
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
* 生成监管码和96333码
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
updateOtherInfo
(
map
));
*
}
* @return
*/
/**
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
* 根据record查询表格数据详情
@RequestMapping
(
value
=
"/createSupervisorCode"
,
method
=
RequestMethod
.
POST
)
*
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"生成监管码和96333码"
,
notes
=
"生成监管码和96333码"
)
* @return
public
ResponseModel
<
Object
>
createSupervisorCode
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
*/
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
createSupervisorCode
(
map
));
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
}
@RequestMapping
(
value
=
"/getFormRecordById"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"表格查询详情"
,
notes
=
"表格查询详情"
)
/**
public
ResponseModel
<
Object
>
getFormRecordById
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
* 修改数据状态是否显示编辑按钮
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getFormRecordById
(
map
));
*
}
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/checkCode"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/updateOtherInfo"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"校验使用登记证编号、设备代码、96333码重复"
,
notes
=
"校验使用登记证编号、设备代码、96333码重复"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改数据状态"
,
notes
=
"修改数据状态"
)
public
ResponseModel
<
Object
>
checkCode
(
@RequestBody
Map
<
String
,
Object
>
obj
){
public
ResponseModel
<
Object
>
updateOtherInfo
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
String
message
=
equipmentCategoryService
.
checkCode
(
obj
);
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
updateOtherInfo
(
map
));
if
(
ObjectUtils
.
isEmpty
(
message
)){
}
return
ResponseHelper
.
buildResponse
(
true
);
}
else
{
/**
ResponseModel
<
Object
>
response
=
new
ResponseModel
();
* 根据record查询表格数据详情
response
.
setResult
(
null
);
*
response
.
setMessage
(
message
);
* @return
response
.
setStatus
(
HttpStatus
.
BAD_REQUEST
.
value
());
*/
return
response
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
}
@RequestMapping
(
value
=
"/getFormRecordById"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"表格查询详情"
,
notes
=
"表格查询详情"
)
}
public
ResponseModel
<
Object
>
getFormRecordById
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getFormRecordById
(
map
));
/**
}
* 一码通八大类设备数据操作接口
*
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
* @return
@RequestMapping
(
value
=
"/checkCode"
,
method
=
RequestMethod
.
POST
)
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"校验使用登记证编号、设备代码、96333码重复"
,
notes
=
"校验使用登记证编号、设备代码、96333码重复"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
<
Object
>
checkCode
(
@RequestBody
Map
<
String
,
Object
>
obj
)
{
@RequestMapping
(
value
=
"/submit"
,
method
=
RequestMethod
.
POST
)
String
message
=
equipmentCategoryService
.
checkCode
(
obj
);
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"一码通八大类设备数据操作接口"
,
notes
=
"一码通八大类设备数据操作接口"
)
if
(
ObjectUtils
.
isEmpty
(
message
))
{
public
ResponseModel
<
Object
>
submit
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
true
);
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
submit
(
map
));
}
else
{
}
ResponseModel
<
Object
>
response
=
new
ResponseModel
();
response
.
setResult
(
null
);
response
.
setMessage
(
message
);
/**
response
.
setStatus
(
HttpStatus
.
BAD_REQUEST
.
value
());
* 批量一码通删除数据
return
response
;
*
}
* @return
*/
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/deleteBatch"
,
method
=
RequestMethod
.
POST
)
/**
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除一码通数据"
,
notes
=
"批量删除一码通数据"
)
* 一码通八大类设备数据操作接口
public
ResponseModel
<
Object
>
deleteBatch
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
*
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
deleteBatch
(
map
));
* @return
}
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/submit"
,
method
=
RequestMethod
.
POST
)
/**
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"一码通八大类设备数据操作接口"
,
notes
=
"一码通八大类设备数据操作接口"
)
* 获取管辖分局树
public
ResponseModel
<
Object
>
submit
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
*
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
submit
(
map
));
* @return
}
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/creatTree"
)
/**
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
* 批量一码通删除数据
public
ResponseModel
<
Object
>
creatTree
()
{
*
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getTree
());
* @return
}
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/deleteBatch"
,
method
=
RequestMethod
.
POST
)
/**
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"批量删除一码通数据"
,
notes
=
"批量删除一码通数据"
)
* 重新生成西咸新区的码
public
ResponseModel
<
Object
>
deleteBatch
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
*
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
deleteBatch
(
map
));
* @return
}
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/creatXiXian"
)
/**
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"西咸存量数据处理功能"
,
notes
=
"西咸存量数据处理功能"
)
* 获取管辖分局树
public
ResponseModel
<
Object
>
creatXiXian
(
@RequestParam
String
type
)
{
*
equipmentCategoryService
.
creatXiXian
(
type
);
* @return
return
ResponseHelper
.
buildResponse
(
"ok"
);
*/
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/creatTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
public
ResponseModel
<
Object
>
creatTree
()
{
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getTree
());
@GetMapping
(
value
=
"/getTable"
)
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备认领和设备管理通用接口"
,
notes
=
"设备认领和设备管理通用接口"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getTable
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
getTable
(
map
));
/**
}
* 重新生成西咸新区的码
*
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
* @return
@GetMapping
(
value
=
"/exportData"
)
*/
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备信息导出"
,
notes
=
"设备信息导出"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
public
void
exportData
(
HttpServletResponse
response
,
EquipExportDto
dto
)
{
@GetMapping
(
value
=
"/creatXiXian"
)
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getUSE_PLACE
()))
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"西咸存量数据处理功能"
,
notes
=
"西咸存量数据处理功能"
)
String
address
=
dto
.
getUSE_PLACE
().
substring
(
1
,
dto
.
getUSE_PLACE
().
length
()
-
1
);
public
ResponseModel
<
Object
>
creatXiXian
(
@RequestParam
String
type
)
{
address
=
address
.
replace
(
", "
,
"/"
);
equipmentCategoryService
.
creatXiXian
(
type
);
dto
.
setUSE_PLACE
(
address
);
return
ResponseHelper
.
buildResponse
(
"ok"
);
}
}
List
<
EquipExportVo
>
equipExportData
=
equipmentCategoryServiceImpl
.
getEquipExportData
(
dto
);
ExcelUtil
.
createTemplate
(
response
,
"设备信息"
,
"设备信息"
,
equipExportData
,
EquipExportVo
.
class
,
null
,
false
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getTable"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备认领和设备管理通用接口"
,
notes
=
"设备认领和设备管理通用接口"
)
public
ResponseModel
<
Page
<
Map
<
String
,
Object
>>>
getTable
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
getTable
(
map
));
@GetMapping
(
value
=
"/scalp"
)
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备筛选下拉"
,
notes
=
"设备筛选下拉"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
scalp
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
scalp
(
map
));
@GetMapping
(
value
=
"/exportData"
)
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备信息导出"
,
notes
=
"设备信息导出"
)
public
void
exportData
(
HttpServletResponse
response
,
EquipExportDto
dto
)
{
if
(!
ObjectUtils
.
isEmpty
(
dto
.
getUSE_PLACE
()))
{
String
address
=
dto
.
getUSE_PLACE
().
substring
(
1
,
dto
.
getUSE_PLACE
().
length
()
-
1
);
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
address
=
address
.
replace
(
", "
,
"/"
);
@GetMapping
(
value
=
"/getChildren"
)
dto
.
setUSE_PLACE
(
address
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过设备种类code获取设备类别"
,
notes
=
"通过设备种类code获取设备类别"
)
}
public
ResponseModel
<
List
<
EquipmentCategory
>>
getChildren
(
String
code
)
{
List
<
EquipExportVo
>
equipExportData
=
equipmentCategoryServiceImpl
.
getEquipExportData
(
dto
);
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
getChildren
(
code
));
ExcelUtil
.
createTemplate
(
response
,
"设备信息"
,
"设备信息"
,
equipExportData
,
EquipExportVo
.
class
,
null
,
false
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
/**
@GetMapping
(
value
=
"/scalp"
)
* 获取行政区划
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备筛选下拉"
,
notes
=
"设备筛选下拉"
)
*
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
scalp
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
* @return
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
scalp
(
map
));
*/
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"getRegion"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取行政区划"
,
notes
=
"获取行政区划"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
<
Object
>
getRegion
(
@RequestParam
(
value
=
"level"
,
required
=
false
)
String
level
,
@GetMapping
(
value
=
"/getChildren"
)
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
)
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过设备种类code获取设备类别"
,
notes
=
"通过设备种类code获取设备类别"
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getRegion
(
level
,
parentId
));
public
ResponseModel
<
List
<
EquipmentCategory
>>
getChildren
(
String
code
)
{
}
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
getChildren
(
code
));
}
/**
* 根据Record获取类别和品种
/**
*
* 获取行政区划
* @return
*
*/
* @return
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
*/
@GetMapping
(
value
=
"/getCategoryAndDefineByRecord"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据Record获取类别和品种"
,
notes
=
"根据Record获取类别和品种"
)
@GetMapping
(
value
=
"getRegion"
)
public
ResponseModel
<
Object
>
getCategoryAndDefineById
(
@RequestParam
(
value
=
"rowId"
,
required
=
false
)
String
rowId
)
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取行政区划"
,
notes
=
"获取行政区划"
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getCategoryAndDefineByRecord
(
rowId
));
public
ResponseModel
<
Object
>
getRegion
(
@RequestParam
(
value
=
"level"
,
required
=
false
)
String
level
,
}
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getRegion
(
level
,
parentId
));
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
}
@GetMapping
(
value
=
"saveEquipmentCategoryToEs"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"一码通数据初始化至es"
,
notes
=
"一码通数据初始化至es"
)
public
ResponseModel
<
String
>
saveEquipmentCategoryToEs
()
{
/**
equipmentCategoryServiceImpl
.
saveEs
();
* 根据Record获取类别和品种
return
ResponseHelper
.
buildResponse
(
"success"
);
*
}
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCategoryAndDefineByRecord"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据Record获取类别和品种"
,
notes
=
"根据Record获取类别和品种"
)
@GetMapping
(
value
=
"/viewJgAll"
)
public
ResponseModel
<
Object
>
getCategoryAndDefineById
(
@RequestParam
(
value
=
"rowId"
,
required
=
false
)
String
rowId
)
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"viewJgAll"
,
notes
=
"viewJgAll"
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
getCategoryAndDefineByRecord
(
rowId
));
public
ResponseModel
<
Page
<
JSONObject
>>
viewJgAll
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
}
JSONObject
jsonObject
=
new
JSONObject
(
map
);
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
queryByKeys
(
jsonObject
));
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
}
@GetMapping
(
value
=
"saveEquipmentCategoryToEs"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"一码通数据初始化至es"
,
notes
=
"一码通数据初始化至es"
)
public
ResponseModel
<
String
>
saveEquipmentCategoryToEs
()
{
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
equipmentCategoryServiceImpl
.
saveEs
();
@GetMapping
(
value
=
"/checkRepeat"
)
return
ResponseHelper
.
buildResponse
(
"success"
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"校验码重复"
,
notes
=
"校验码重复"
)
}
public
ResponseModel
<
Boolean
>
checkRepeat
(
@RequestParam
(
value
=
"code"
)
String
code
,
@RequestParam
(
value
=
"elevatorCode"
,
required
=
false
)
String
elevatorCode
)
{
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
return
ResponseHelper
.
buildResponse
(
repeat
(
code
,
elevatorCode
));
@GetMapping
(
value
=
"/viewJgAll"
)
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"viewJgAll"
,
notes
=
"viewJgAll"
)
public
ResponseModel
<
Page
<
JSONObject
>>
viewJgAll
(
@RequestParam
Map
<
String
,
Object
>
map
)
{
JSONObject
jsonObject
=
new
JSONObject
(
map
);
private
Boolean
repeat
(
String
code
,
String
elevatorCode
){
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
queryByKeys
(
jsonObject
));
boolean
flag
=
true
;
}
if
(!
ObjectUtils
.
isEmpty
(
code
))
{
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getClaimStatus
,
"已认领"
);
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getSupervisoryCode
,
code
);
@GetMapping
(
value
=
"/checkRepeat"
)
Integer
integer
=
idxBizJgOtherInfoMapper
.
selectCount
(
lambda
);
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"校验码重复"
,
notes
=
"校验码重复"
)
if
(
integer
>
1
)
{
public
ResponseModel
<
Boolean
>
checkRepeat
(
@RequestParam
(
value
=
"code"
)
String
code
,
flag
=
false
;
@RequestParam
(
value
=
"elevatorCode"
,
required
=
false
)
String
elevatorCode
)
{
}
}
return
ResponseHelper
.
buildResponse
(
repeat
(
code
,
elevatorCode
));
if
(!
ObjectUtils
.
isEmpty
(
elevatorCode
))
{
}
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getClaimStatus
,
"已认领"
);
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getCode96333
,
elevatorCode
);
private
Boolean
repeat
(
String
code
,
String
elevatorCode
)
{
Integer
integer
=
idxBizJgOtherInfoMapper
.
selectCount
(
lambda
);
boolean
flag
=
true
;
if
(
integer
>
1
)
{
if
(!
ObjectUtils
.
isEmpty
(
code
))
{
flag
=
false
;
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
}
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getClaimStatus
,
"已认领"
);
}
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getSupervisoryCode
,
code
);
return
flag
;
Integer
integer
=
idxBizJgOtherInfoMapper
.
selectCount
(
lambda
);
}
if
(
integer
>
1
)
{
flag
=
false
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
}
@GetMapping
(
value
=
"/exportImage"
)
}
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备监管码下载"
,
notes
=
"设备监管码下载"
)
if
(!
ObjectUtils
.
isEmpty
(
elevatorCode
))
{
public
void
exportImage
(
HttpServletResponse
response
,
@RequestParam
(
"code"
)
String
code
,
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
value
=
"elevatorCode"
,
required
=
false
)
String
elevatorCode
)
throws
IOException
,
FileNotFoundException
{
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
ImageSizeEnums
imageSizeEnums
=
ImageSizeEnums
.
getEnumByCode
(
type
);
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getClaimStatus
,
"已认领"
);
// 获取resources目录下的文件输入流
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getCode96333
,
elevatorCode
);
InputStream
bgImgFile
=
getClass
().
getClassLoader
().
getResourceAsStream
(
"temp/"
+
imageSizeEnums
.
getBgPath
());
Integer
integer
=
idxBizJgOtherInfoMapper
.
selectCount
(
lambda
);
File
QrCodeFile
;
if
(
integer
>
1
)
{
boolean
repeat
=
repeat
(
code
,
elevatorCode
);
flag
=
false
;
if
(!
repeat
)
{
}
throw
new
BadRequest
(
"存在重复数据,请联系管理员!"
);
}
}
return
flag
;
if
(
ImageSizeEnums
.
DT
.
getCode
().
equals
(
type
))
{
}
QrCodeFile
=
File
.
createTempFile
(
elevatorCode
,
".png"
);
ImageUtils
.
creatQRCode
(
QrCodeFile
,
bgImgFile
,
imageSizeEnums
.
getWith
(),
imageSizeEnums
.
getHeight
(),
REGULATORY_CODE_PREFIX
+
code
,
""
,
elevatorCode
,
imageSizeEnums
.
getSize
(),
imageSizeEnums
.
getImagesX
(),
imageSizeEnums
.
getImagesY
(),
imageSizeEnums
.
getText1X
(),
imageSizeEnums
.
getText1Y
(),
imageSizeEnums
.
getText2X
(),
imageSizeEnums
.
getText2Y
());
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
ImageUtils
.
downloadResource
(
elevatorCode
+
".png"
,
QrCodeFile
.
getAbsolutePath
(),
response
);
@GetMapping
(
value
=
"/exportImage"
)
}
else
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备监管码下载"
,
notes
=
"设备监管码下载"
)
QrCodeFile
=
File
.
createTempFile
(
code
,
".png"
);
public
void
exportImage
(
HttpServletResponse
response
,
@RequestParam
(
"code"
)
String
code
,
@RequestParam
(
"type"
)
String
type
,
@RequestParam
(
value
=
"elevatorCode"
,
required
=
false
)
String
elevatorCode
)
throws
IOException
,
FileNotFoundException
{
ImageUtils
.
creatQRCode
(
QrCodeFile
,
bgImgFile
,
imageSizeEnums
.
getWith
(),
imageSizeEnums
.
getHeight
(),
REGULATORY_CODE_PREFIX
+
code
,
""
,
code
,
imageSizeEnums
.
getSize
(),
imageSizeEnums
.
getImagesX
(),
imageSizeEnums
.
getImagesY
(),
imageSizeEnums
.
getText1X
(),
imageSizeEnums
.
getText1Y
(),
imageSizeEnums
.
getText2X
(),
imageSizeEnums
.
getText2Y
());
ImageSizeEnums
imageSizeEnums
=
ImageSizeEnums
.
getEnumByCode
(
type
);
ImageUtils
.
downloadResource
(
code
+
".png"
,
QrCodeFile
.
getAbsolutePath
(),
response
);
// 获取resources目录下的文件输入流
}
InputStream
bgImgFile
=
getClass
().
getClassLoader
().
getResourceAsStream
(
"temp/"
+
imageSizeEnums
.
getBgPath
());
QrCodeFile
.
delete
();
File
QrCodeFile
;
}
boolean
repeat
=
repeat
(
code
,
elevatorCode
);
if
(!
repeat
)
{
throw
new
BadRequest
(
"存在重复数据,请联系管理员!"
);
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
}
@GetMapping
(
value
=
"/exportImageZip"
)
if
(
ImageSizeEnums
.
DT
.
getCode
().
equals
(
type
))
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备监管码、电梯码批量导出压缩包"
,
notes
=
"设备监管码、电梯码批量导出压缩包"
)
QrCodeFile
=
File
.
createTempFile
(
elevatorCode
,
".png"
);
public
void
exportImageZip
(
HttpServletResponse
response
,
@RequestParam
Map
<
String
,
Object
>
map
)
throws
IOException
{
ImageUtils
.
creatQRCode
(
QrCodeFile
,
bgImgFile
,
imageSizeEnums
.
getWith
(),
imageSizeEnums
.
getHeight
(),
REGULATORY_CODE_PREFIX
+
code
,
""
,
elevatorCode
,
imageSizeEnums
.
getSize
(),
imageSizeEnums
.
getImagesX
(),
imageSizeEnums
.
getImagesY
(),
imageSizeEnums
.
getText1X
(),
imageSizeEnums
.
getText1Y
(),
imageSizeEnums
.
getText2X
(),
imageSizeEnums
.
getText2Y
());
String
type
=
String
.
valueOf
(
map
.
get
(
"type"
));
ImageUtils
.
downloadResource
(
elevatorCode
+
".png"
,
QrCodeFile
.
getAbsolutePath
(),
response
);
ImageSizeEnums
imageSizeEnums
=
ImageSizeEnums
.
getEnumByCode
(
type
);
}
else
{
//创建list 存放图片
QrCodeFile
=
File
.
createTempFile
(
code
,
".png"
);
List
<
File
>
fileList
=
new
ArrayList
<>();
ImageUtils
.
creatQRCode
(
QrCodeFile
,
bgImgFile
,
imageSizeEnums
.
getWith
(),
imageSizeEnums
.
getHeight
(),
REGULATORY_CODE_PREFIX
+
code
,
""
,
code
,
imageSizeEnums
.
getSize
(),
imageSizeEnums
.
getImagesX
(),
imageSizeEnums
.
getImagesY
(),
imageSizeEnums
.
getText1X
(),
imageSizeEnums
.
getText1Y
(),
imageSizeEnums
.
getText2X
(),
imageSizeEnums
.
getText2Y
());
JSONObject
jsonObject
=
new
JSONObject
(
map
);
ImageUtils
.
downloadResource
(
code
+
".png"
,
QrCodeFile
.
getAbsolutePath
(),
response
);
Page
<
JSONObject
>
pageList
=
equipmentCategoryServiceImpl
.
queryByKeys
(
jsonObject
);
}
List
<
JSONObject
>
equipExportData
;
QrCodeFile
.
delete
();
List
<
String
>
strings
=
null
;
}
if
(
map
.
containsKey
(
"ids"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"ids"
)))
{
strings
=
Arrays
.
asList
(
String
.
valueOf
(
map
.
get
(
"ids"
)).
split
(
","
));
List
<
String
>
finalStrings
=
strings
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
equipExportData
=
pageList
.
getRecords
().
stream
().
filter
(
item
->
finalStrings
.
contains
(
String
.
valueOf
(
item
.
get
(
"SEQUENCE_NBR"
)))).
collect
(
Collectors
.
toList
());
@GetMapping
(
value
=
"/exportImageZip"
)
}
else
{
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"设备监管码、电梯码批量导出压缩包"
,
notes
=
"设备监管码、电梯码批量导出压缩包"
)
equipExportData
=
pageList
.
getRecords
();
public
void
exportImageZip
(
HttpServletResponse
response
,
@RequestParam
Map
<
String
,
Object
>
map
)
throws
IOException
{
}
String
type
=
String
.
valueOf
(
map
.
get
(
"type"
));
ImageSizeEnums
imageSizeEnums
=
ImageSizeEnums
.
getEnumByCode
(
type
);
if
(
ObjectUtils
.
isEmpty
(
equipExportData
))
{
//创建list 存放图片
File
zipFile
=
File
.
createTempFile
(
"设备码信息"
,
".zip"
);
List
<
File
>
fileList
=
new
ArrayList
<>();
File
nullFile
=
File
.
createTempFile
(
"当前导出数据为空+"
,
".txt"
);
JSONObject
jsonObject
=
new
JSONObject
(
map
);
fileList
.
add
(
nullFile
);
Page
<
JSONObject
>
pageList
=
equipmentCategoryServiceImpl
.
queryByKeys
(
jsonObject
);
// 调用压缩方法
List
<
JSONObject
>
equipExportData
;
ImageUtils
.
zipFiles
(
fileList
,
zipFile
,
".txt"
);
List
<
String
>
strings
=
null
;
ImageUtils
.
downloadResourceZip
(
"设备码信息.zip"
,
zipFile
.
getAbsolutePath
(),
response
);
if
(
map
.
containsKey
(
"ids"
)
&&
!
ObjectUtils
.
isEmpty
(
map
.
get
(
"ids"
)))
{
zipFile
.
delete
();
strings
=
Arrays
.
asList
(
String
.
valueOf
(
map
.
get
(
"ids"
)).
split
(
","
));
}
List
<
String
>
finalStrings
=
strings
;
List
<
Object
>
code96333
=
equipExportData
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"CODE96333"
))).
map
(
item
->
item
.
get
(
"CODE96333"
)).
collect
(
Collectors
.
toList
());
equipExportData
=
pageList
.
getRecords
().
stream
().
filter
(
item
->
finalStrings
.
contains
(
String
.
valueOf
(
item
.
get
(
"SEQUENCE_NBR"
)))).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
code96333
)
&&
ImageSizeEnums
.
DT
.
getCode
().
equals
(
type
)){
}
else
{
throw
new
FileDownLoadException
(
"96333码为空!"
);
equipExportData
=
pageList
.
getRecords
();
}
}
if
(!
ObjectUtils
.
isEmpty
(
code96333
))
{
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
if
(
ObjectUtils
.
isEmpty
(
equipExportData
))
{
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getClaimStatus
,
"已认领"
);
File
zipFile
=
File
.
createTempFile
(
"设备码信息"
,
".zip"
);
lambda
.
in
(
IdxBizJgOtherInfo:
:
getCode96333
,
code96333
);
File
nullFile
=
File
.
createTempFile
(
"当前导出数据为空+"
,
".txt"
);
fileList
.
add
(
nullFile
);
// 调用压缩方法
ImageUtils
.
zipFiles
(
fileList
,
zipFile
,
".txt"
);
ImageUtils
.
downloadResourceZip
(
"设备码信息.zip"
,
zipFile
.
getAbsolutePath
(),
response
);
zipFile
.
delete
();
}
List
<
Object
>
code96333
=
equipExportData
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"CODE96333"
))).
map
(
item
->
item
.
get
(
"CODE96333"
)).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
code96333
)
&&
ImageSizeEnums
.
DT
.
getCode
().
equals
(
type
))
{
throw
new
FileDownLoadException
(
"96333码为空!"
);
}
if
(!
ObjectUtils
.
isEmpty
(
code96333
))
{
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getClaimStatus
,
"已认领"
);
lambda
.
in
(
IdxBizJgOtherInfo:
:
getCode96333
,
code96333
);
// Integer integer = idxBizJgOtherInfoMapper.selectCount(lambda);
// Integer integer = idxBizJgOtherInfoMapper.selectCount(lambda);
List
<
IdxBizJgOtherInfo
>
idxBizJgOtherInfos
=
idxBizJgOtherInfoMapper
.
selectList
(
lambda
);
List
<
IdxBizJgOtherInfo
>
idxBizJgOtherInfos
=
idxBizJgOtherInfoMapper
.
selectList
(
lambda
);
List
<
String
>
collect
=
idxBizJgOtherInfos
.
stream
().
map
(
IdxBizJgOtherInfo:
:
getCode96333
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
idxBizJgOtherInfos
.
stream
().
map
(
IdxBizJgOtherInfo:
:
getCode96333
).
collect
(
Collectors
.
toList
());
HashSet
<
String
>
strings1
=
new
HashSet
<>(
collect
);
HashSet
<
String
>
strings1
=
new
HashSet
<>(
collect
);
// if (!ObjectUtils.isEmpty(strings) && strings.size() != strings1.size()){
// if (!ObjectUtils.isEmpty(strings) && strings.size() != strings1.size()){
// throw new FileDownLoadException("96333码存在重复数据,请联系管理员!");
// throw new FileDownLoadException("96333码存在重复数据,请联系管理员!");
// }
// }
if
(
code96333
.
size
()!=
strings1
.
size
()
||
idxBizJgOtherInfos
.
size
()
!=
code96333
.
size
())
{
if
(
code96333
.
size
()
!=
strings1
.
size
()
||
idxBizJgOtherInfos
.
size
()
!=
code96333
.
size
())
{
throw
new
FileDownLoadException
(
"96333码存在重复数据,请联系管理员!"
);
throw
new
FileDownLoadException
(
"96333码存在重复数据,请联系管理员!"
);
}
}
}
}
List
<
Object
>
supervisoryCode
=
equipExportData
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"SUPERVISORY_CODE"
))).
map
(
item
->
item
.
get
(
"SUPERVISORY_CODE"
)).
collect
(
Collectors
.
toList
());
List
<
Object
>
supervisoryCode
=
equipExportData
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"SUPERVISORY_CODE"
))).
map
(
item
->
item
.
get
(
"SUPERVISORY_CODE"
)).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
supervisoryCode
))
{
if
(!
ObjectUtils
.
isEmpty
(
supervisoryCode
))
{
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
LambdaQueryWrapper
<
IdxBizJgOtherInfo
>
lambda
=
new
QueryWrapper
<
IdxBizJgOtherInfo
>().
lambda
();
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getClaimStatus
,
"已认领"
);
lambda
.
eq
(
IdxBizJgOtherInfo:
:
getClaimStatus
,
"已认领"
);
lambda
.
in
(
IdxBizJgOtherInfo:
:
getSupervisoryCode
,
supervisoryCode
);
lambda
.
in
(
IdxBizJgOtherInfo:
:
getSupervisoryCode
,
supervisoryCode
);
// Integer integer = idxBizJgOtherInfoMapper.selectCount(lambda);
// Integer integer = idxBizJgOtherInfoMapper.selectCount(lambda);
List
<
IdxBizJgOtherInfo
>
idxBizJgOtherInfos
=
idxBizJgOtherInfoMapper
.
selectList
(
lambda
);
List
<
IdxBizJgOtherInfo
>
idxBizJgOtherInfos
=
idxBizJgOtherInfoMapper
.
selectList
(
lambda
);
List
<
String
>
collect
=
idxBizJgOtherInfos
.
stream
().
map
(
IdxBizJgOtherInfo:
:
getSupervisoryCode
).
collect
(
Collectors
.
toList
());
List
<
String
>
collect
=
idxBizJgOtherInfos
.
stream
().
map
(
IdxBizJgOtherInfo:
:
getSupervisoryCode
).
collect
(
Collectors
.
toList
());
HashSet
<
String
>
strings1
=
new
HashSet
<>(
collect
);
HashSet
<
String
>
strings1
=
new
HashSet
<>(
collect
);
if
(
supervisoryCode
.
size
()
!=
strings1
.
size
()
||
supervisoryCode
.
size
()
!=
idxBizJgOtherInfos
.
size
())
{
if
(
supervisoryCode
.
size
()
!=
strings1
.
size
()
||
supervisoryCode
.
size
()
!=
idxBizJgOtherInfos
.
size
())
{
throw
new
FileDownLoadException
(
"监管码存在重复数据,请联系管理员!"
);
throw
new
FileDownLoadException
(
"监管码存在重复数据,请联系管理员!"
);
}
}
}
}
if
(
ImageSizeEnums
.
DT
.
getCode
().
equals
(
type
))
{
if
(
ImageSizeEnums
.
DT
.
getCode
().
equals
(
type
))
{
for
(
JSONObject
equipExportDatum
:
equipExportData
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"CODE96333"
))).
collect
(
Collectors
.
toList
()))
{
for
(
JSONObject
equipExportDatum
:
equipExportData
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"CODE96333"
))).
collect
(
Collectors
.
toList
()))
{
InputStream
bgImgFile
=
getClass
().
getClassLoader
().
getResourceAsStream
(
"temp/"
+
imageSizeEnums
.
getBgPath
());
InputStream
bgImgFile
=
getClass
().
getClassLoader
().
getResourceAsStream
(
"temp/"
+
imageSizeEnums
.
getBgPath
());
File
QrCodeFile
=
File
.
createTempFile
(
equipExportDatum
.
get
(
"CODE96333"
)
+
"+"
,
".png"
);
File
QrCodeFile
=
File
.
createTempFile
(
equipExportDatum
.
get
(
"CODE96333"
)
+
"+"
,
".png"
);
ImageUtils
.
creatQRCode
(
QrCodeFile
,
bgImgFile
,
imageSizeEnums
.
getWith
(),
imageSizeEnums
.
getHeight
(),
REGULATORY_CODE_PREFIX
+
equipExportDatum
.
get
(
"SUPERVISORY_CODE"
),
""
,
String
.
valueOf
(
equipExportDatum
.
get
(
"CODE96333"
)),
imageSizeEnums
.
getSize
(),
imageSizeEnums
.
getImagesX
(),
imageSizeEnums
.
getImagesY
(),
imageSizeEnums
.
getText1X
(),
imageSizeEnums
.
getText1Y
(),
imageSizeEnums
.
getText2X
(),
imageSizeEnums
.
getText2Y
());
ImageUtils
.
creatQRCode
(
QrCodeFile
,
bgImgFile
,
imageSizeEnums
.
getWith
(),
imageSizeEnums
.
getHeight
(),
REGULATORY_CODE_PREFIX
+
equipExportDatum
.
get
(
"SUPERVISORY_CODE"
),
""
,
String
.
valueOf
(
equipExportDatum
.
get
(
"CODE96333"
)),
imageSizeEnums
.
getSize
(),
imageSizeEnums
.
getImagesX
(),
imageSizeEnums
.
getImagesY
(),
imageSizeEnums
.
getText1X
(),
imageSizeEnums
.
getText1Y
(),
imageSizeEnums
.
getText2X
(),
imageSizeEnums
.
getText2Y
());
fileList
.
add
(
new
File
(
QrCodeFile
.
getAbsolutePath
()));
fileList
.
add
(
new
File
(
QrCodeFile
.
getAbsolutePath
()));
bgImgFile
.
close
();
bgImgFile
.
close
();
}
}
}
else
{
}
else
{
for
(
JSONObject
equipExportDatum
:
equipExportData
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"SUPERVISORY_CODE"
))).
collect
(
Collectors
.
toList
()))
{
for
(
JSONObject
equipExportDatum
:
equipExportData
.
stream
().
filter
(
item
->
!
ObjectUtils
.
isEmpty
(
item
.
get
(
"SUPERVISORY_CODE"
))).
collect
(
Collectors
.
toList
()))
{
InputStream
bgImgFile
=
getClass
().
getClassLoader
().
getResourceAsStream
(
"temp/"
+
imageSizeEnums
.
getBgPath
());
InputStream
bgImgFile
=
getClass
().
getClassLoader
().
getResourceAsStream
(
"temp/"
+
imageSizeEnums
.
getBgPath
());
File
QrCodeFile
=
File
.
createTempFile
(
equipExportDatum
.
get
(
"SUPERVISORY_CODE"
)
+
"+"
,
".png"
);
File
QrCodeFile
=
File
.
createTempFile
(
equipExportDatum
.
get
(
"SUPERVISORY_CODE"
)
+
"+"
,
".png"
);
ImageUtils
.
creatQRCode
(
QrCodeFile
,
bgImgFile
,
imageSizeEnums
.
getWith
(),
imageSizeEnums
.
getHeight
(),
REGULATORY_CODE_PREFIX
+
equipExportDatum
.
get
(
"SUPERVISORY_CODE"
),
""
,
String
.
valueOf
(
equipExportDatum
.
get
(
"SUPERVISORY_CODE"
)),
imageSizeEnums
.
getSize
(),
imageSizeEnums
.
getImagesX
(),
imageSizeEnums
.
getImagesY
(),
imageSizeEnums
.
getText1X
(),
imageSizeEnums
.
getText1Y
(),
imageSizeEnums
.
getText2X
(),
imageSizeEnums
.
getText2Y
());
ImageUtils
.
creatQRCode
(
QrCodeFile
,
bgImgFile
,
imageSizeEnums
.
getWith
(),
imageSizeEnums
.
getHeight
(),
REGULATORY_CODE_PREFIX
+
equipExportDatum
.
get
(
"SUPERVISORY_CODE"
),
""
,
String
.
valueOf
(
equipExportDatum
.
get
(
"SUPERVISORY_CODE"
)),
imageSizeEnums
.
getSize
(),
imageSizeEnums
.
getImagesX
(),
imageSizeEnums
.
getImagesY
(),
imageSizeEnums
.
getText1X
(),
imageSizeEnums
.
getText1Y
(),
imageSizeEnums
.
getText2X
(),
imageSizeEnums
.
getText2Y
());
fileList
.
add
(
new
File
(
QrCodeFile
.
getAbsolutePath
()));
fileList
.
add
(
new
File
(
QrCodeFile
.
getAbsolutePath
()));
bgImgFile
.
close
();
bgImgFile
.
close
();
}
}
}
}
File
zipFile
=
File
.
createTempFile
(
"设备码信息"
,
".zip"
);
File
zipFile
=
File
.
createTempFile
(
"设备码信息"
,
".zip"
);
// 调用压缩方法
// 调用压缩方法
ImageUtils
.
zipFiles
(
fileList
,
zipFile
,
".png"
);
ImageUtils
.
zipFiles
(
fileList
,
zipFile
,
".png"
);
ImageUtils
.
downloadResourceZip
(
"设备码信息.zip"
,
zipFile
.
getAbsolutePath
(),
response
);
ImageUtils
.
downloadResourceZip
(
"设备码信息.zip"
,
zipFile
.
getAbsolutePath
(),
response
);
zipFile
.
delete
();
zipFile
.
delete
();
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveSupervisoryData"
)
@PostMapping
(
value
=
"/saveSupervisoryData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备数据保存"
,
notes
=
"监管设备保存"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备数据保存"
,
notes
=
"监管设备保存"
)
public
ResponseModel
<
Boolean
>
saveSupervisoryData
(
@RequestBody
EquipmentMessageDto
data
)
{
public
ResponseModel
<
Boolean
>
saveSupervisoryData
(
@RequestBody
EquipmentMessageDto
data
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveSupervisoryData
(
data
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveSupervisoryData
(
data
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveConstructionInfoData"
)
@PostMapping
(
value
=
"/saveConstructionInfoData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备施工数据保存"
,
notes
=
"监管设备施工数据保存"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备施工数据保存"
,
notes
=
"监管设备施工数据保存"
)
public
ResponseModel
<
Boolean
>
saveConstructionInfoData
(
@RequestBody
IdxBizJgConstructionInfo
data
)
{
public
ResponseModel
<
Boolean
>
saveConstructionInfoData
(
@RequestBody
IdxBizJgConstructionInfo
data
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveConstructionInfoData
(
data
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveConstructionInfoData
(
data
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveMaintenanceRecordInfoData"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备维保数据保存"
,
notes
=
"监管设备维保数据保存"
)
@PostMapping
(
value
=
"/saveMaintenanceRecordInfoData"
)
public
ResponseModel
<
Boolean
>
saveMaintenanceRecordInfoData
(
@RequestBody
IdxBizJgMaintenanceRecordInfo
data
)
{
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备维保数据保存"
,
notes
=
"监管设备维保数据保存"
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveMaintenanceRecordInfoData
(
data
));
public
ResponseModel
<
Boolean
>
saveMaintenanceRecordInfoData
(
@RequestBody
IdxBizJgMaintenanceRecordInfo
data
)
{
}
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveMaintenanceRecordInfoData
(
data
));
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
}
@PostMapping
(
value
=
"/saveDetectionInfoData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备检验检测数据保存"
,
notes
=
"监管设备检验检测数据保存"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestBody
IdxBizJgInspectionDetectionInfo
data
)
{
@PostMapping
(
value
=
"/saveDetectionInfoData"
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveDetectionInfoData
(
data
));
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备检验检测数据保存"
,
notes
=
"监管设备检验检测数据保存"
)
}
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestBody
IdxBizJgInspectionDetectionInfo
data
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveDetectionInfoData
(
data
));
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
}
@PostMapping
(
value
=
"/deleteByRecord"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"数据异常回滚"
,
notes
=
"数据异常回滚"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestParam
(
"record"
)
String
record
)
{
@PostMapping
(
value
=
"/deleteByRecord"
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
deleteByRecord
(
record
));
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"数据异常回滚"
,
notes
=
"数据异常回滚"
)
}
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestParam
(
"record"
)
String
record
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
deleteByRecord
(
record
));
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
}
@PostMapping
(
value
=
"/commonUpdateEsData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新ES中的数据(公共方法)"
,
notes
=
"更新ES中的数据(公共方法)"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
public
ResponseModel
<
Map
<
String
,
Object
>>
commonUpdateEsDataByIds
(
@RequestBody
Map
<
String
,
Map
<
String
,
Object
>>
paramMap
)
{
@PostMapping
(
value
=
"/commonUpdateEsData"
)
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
commonUpdateEsDataByIds
(
paramMap
));
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"更新ES中的数据(公共方法)"
,
notes
=
"更新ES中的数据(公共方法)"
)
}
public
ResponseModel
<
Map
<
String
,
Object
>>
commonUpdateEsDataByIds
(
@RequestBody
Map
<
String
,
Map
<
String
,
Object
>>
paramMap
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryService
.
commonUpdateEsDataByIds
(
paramMap
));
}
}
}
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