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
017deecf
Commit
017deecf
authored
Nov 20, 2023
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register
parents
31e3fc6c
432c65c6
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
433 additions
and
114 deletions
+433
-114
SuperviseController.java
...join/amos/api/openapi/controller/SuperviseController.java
+66
-9
EquipmentInfoDto.java
...m/yeejoin/amos/api/openapi/face/dto/EquipmentInfoDto.java
+82
-0
ConstructionInfoService.java
...mos/api/openapi/face/service/ConstructionInfoService.java
+22
-0
MaintenanceInfoService.java
...amos/api/openapi/face/service/MaintenanceInfoService.java
+56
-35
UseInfoService.java
...yeejoin/amos/api/openapi/face/service/UseInfoService.java
+58
-25
TzsServiceFeignClient.java
...yeejoin/amos/api/openapi/feign/TzsServiceFeignClient.java
+41
-1
ViewJgClaimMapper.java
...in/amos/boot/module/app/api/mapper/ViewJgClaimMapper.java
+2
-0
ViewJgClaimMapper.xml
...e-app-api/src/main/resources/mapper/ViewJgClaimMapper.xml
+4
-0
TzsAppController.java
...amos/boot/module/app/biz/controller/TzsAppController.java
+30
-1
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+4
-0
pom.xml
...t-module-tzspatrol/amos-boot-module-tzspatrol-api/pom.xml
+6
-0
pom.xml
...t-module-tzspatrol/amos-boot-module-tzspatrol-biz/pom.xml
+6
-0
PlanTaskVo.java
.../java/com/yeejoin/amos/patrol/business/vo/PlanTaskVo.java
+9
-8
InspectionDetectionInfoMapper.xml
...c/main/resources/mapper/InspectionDetectionInfoMapper.xml
+6
-12
EquipmentCategoryController.java
...odule/ymt/biz/controller/EquipmentCategoryController.java
+25
-10
EquipmentCategoryServiceImpl.java
...le/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
+2
-1
InspectionDetectionInfoServiceImpl.java
.../biz/service/impl/InspectionDetectionInfoServiceImpl.java
+14
-12
No files found.
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/controller/SuperviseController.java
View file @
017deecf
...
@@ -2,17 +2,55 @@ package com.yeejoin.amos.api.openapi.controller;
...
@@ -2,17 +2,55 @@ package com.yeejoin.amos.api.openapi.controller;
import
com.yeejoin.amos.api.common.restful.utils.ResponseHelper
;
import
com.yeejoin.amos.api.common.restful.utils.ResponseHelper
;
import
com.yeejoin.amos.api.common.restful.utils.ResponseModel
;
import
com.yeejoin.amos.api.common.restful.utils.ResponseModel
;
import
com.yeejoin.amos.api.openapi.face.model.*
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.*
;
import
com.yeejoin.amos.api.openapi.face.model.ElevatorTechInfoModel
;
import
com.yeejoin.amos.api.openapi.face.service.*
;
import
com.yeejoin.amos.api.openapi.face.model.EnterpriseInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.InspectionDetectionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.InspectionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.ProduceInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.RegistrationInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.StaffQualifInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.DesignInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.EnclosureInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.OtherInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.StaffBaseInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.SuperviseInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo
;
import
com.yeejoin.amos.api.openapi.face.service.ConstructionInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.CreateCodeService
;
import
com.yeejoin.amos.api.openapi.face.service.DesignInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.ElevatorTechInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.EnclosureInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.EnterpriseInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.InspectionInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.MaintenanceInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.OtherInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.ProduceInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.RegistrationInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.StaffBaseInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.StaffQualifInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.SuperviseInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.TechInfoService
;
import
com.yeejoin.amos.api.openapi.face.service.UnitLicenceService
;
import
com.yeejoin.amos.api.openapi.face.service.UseInfoService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
import
org.typroject.tyboot.component.event.RestEventTrigger
;
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.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -98,8 +136,11 @@ public class SuperviseController {
...
@@ -98,8 +136,11 @@ public class SuperviseController {
@ApiOperation
(
value
=
"新增施工信息"
)
@ApiOperation
(
value
=
"新增施工信息"
)
@PostMapping
(
value
=
"/constructionInfo"
)
@PostMapping
(
value
=
"/constructionInfo"
)
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
public
ResponseModel
<
String
>
saveConstructionInfo
(
@RequestBody
List
<
ConstructionInfo
>
constructionInfo
)
throws
Exception
{
public
ResponseModel
<
String
>
saveConstructionInfo
(
@RequestBody
List
<
ConstructionInfo
>
constructionInfoList
)
{
return
ResponseHelper
.
buildResponse
(
constructionInfoService
.
saveConstructionInfo
(
constructionInfo
));
if
(
ValidationUtil
.
isEmpty
(
constructionInfoList
))
{
throw
new
BadRequest
(
"上送数据为空"
);
}
return
ResponseHelper
.
buildResponse
(
constructionInfoService
.
saveConstructionInfo
(
constructionInfoList
.
get
(
0
)));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
@@ -122,8 +163,11 @@ public class SuperviseController {
...
@@ -122,8 +163,11 @@ public class SuperviseController {
@ApiOperation
(
value
=
"新增维保单位信息"
)
@ApiOperation
(
value
=
"新增维保单位信息"
)
@PostMapping
(
value
=
"/maintenanceInfo"
)
@PostMapping
(
value
=
"/maintenanceInfo"
)
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
public
ResponseModel
<
String
>
saveMaintenanceInfo
(
@RequestBody
List
<
MaintenanceInfoModel
>
maintenanceInfo
)
throws
Exception
{
public
ResponseModel
<
String
>
saveMaintenanceInfo
(
@RequestBody
List
<
MaintenanceInfo
>
maintenanceInfoList
)
{
return
ResponseHelper
.
buildResponse
(
maintenanceInfoService
.
saveMaintenanceInfo
(
maintenanceInfo
));
if
(
ValidationUtil
.
isEmpty
(
maintenanceInfoList
))
{
throw
new
BadRequest
(
"上送数据为空"
);
}
return
ResponseHelper
.
buildResponse
(
maintenanceInfoService
.
saveMaintenanceInfo
(
maintenanceInfoList
.
get
(
0
)));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
...
@@ -207,7 +251,7 @@ public class SuperviseController {
...
@@ -207,7 +251,7 @@ public class SuperviseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"赋码"
)
@ApiOperation
(
value
=
"赋码"
)
@PostMapping
(
value
=
"/generation/code"
)
@PostMapping
(
value
=
"/generation/code"
)
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
...
@@ -230,4 +274,17 @@ public class SuperviseController {
...
@@ -230,4 +274,17 @@ public class SuperviseController {
public
ResponseModel
<
InspectionDetectionInfoModel
>
selectInspect
(
@RequestParam
String
superviseCode
)
{
public
ResponseModel
<
InspectionDetectionInfoModel
>
selectInspect
(
@RequestParam
String
superviseCode
)
{
return
ResponseHelper
.
buildResponse
(
inspectionInfoService
.
selectInspect
(
superviseCode
));
return
ResponseHelper
.
buildResponse
(
inspectionInfoService
.
selectInspect
(
superviseCode
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
value
=
"监管设备信息"
)
@PostMapping
(
value
=
"/equipment/info"
)
@RestEventTrigger
(
value
=
"openapiLogEventHandler"
)
public
ResponseModel
<
String
>
saveEquipmentInfo
(
@RequestBody
EquipmentInfoDto
equipmentInfoDto
)
{
String
supervisoryCode
=
equipmentInfoDto
.
getSupervisoryCode
();
if
(
ValidationUtil
.
isEmpty
(
supervisoryCode
))
{
throw
new
BadRequest
(
"监管码信息不存在"
);
}
return
ResponseHelper
.
buildResponse
(
useInfoService
.
saveEquipmentInfo
(
equipmentInfoDto
));
}
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/dto/EquipmentInfoDto.java
0 → 100644
View file @
017deecf
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
dto
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.DesignInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.MainParts
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.OtherInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.ProduceInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.ProtectionDevices
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.RegistrationInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.SuperviseInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.Map
;
/**
* 监管设备信息
* */
@Data
public
class
EquipmentInfoDto
{
/**
* 使用信息
*/
private
UseInfo
useInfo
;
/**
* 设计制造
*/
private
DesignInfo
designInfo
;
/**
* 制造信息
*/
private
ProduceInfo
factoryInfo
;
/**
* 监管信息
*/
private
SuperviseInfo
supervisionInfo
;
/**
* 注册登记
*/
private
RegistrationInfo
registerInfo
;
/**
* 维保备案
*/
private
MaintenanceInfo
maintenanceRecordInfo
;
/**
* 其他信息
*/
private
OtherInfo
otherInfo
;
/**
* 主要零部件
*/
private
List
<
MainParts
>
mainParts
;
/**
* 保护装置
*/
private
List
<
ProtectionDevices
>
protectionDevices
;
/**
* 设备参数信息
*/
private
Map
<
String
,
Object
>
params
;
/**
* 操作类型 1 新增 0 修改
*/
private
Integer
saveStatus
;
/**
* 监管码
*/
private
String
supervisoryCode
;
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/ConstructionInfoService.java
View file @
017deecf
...
@@ -3,6 +3,10 @@ package com.yeejoin.amos.api.openapi.face.service;
...
@@ -3,6 +3,10 @@ package com.yeejoin.amos.api.openapi.face.service;
import
com.yeejoin.amos.api.openapi.face.model.ConstructionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.ConstructionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.ConstructionInfoMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.ConstructionInfoMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo
;
import
com.yeejoin.amos.api.openapi.feign.TzsServiceFeignClient
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
...
@@ -19,6 +23,24 @@ import java.util.List;
...
@@ -19,6 +23,24 @@ import java.util.List;
*/
*/
@Component
@Component
public
class
ConstructionInfoService
extends
AppBaseService
<
ConstructionInfoModel
,
ConstructionInfo
,
ConstructionInfoMapper
>
{
public
class
ConstructionInfoService
extends
AppBaseService
<
ConstructionInfoModel
,
ConstructionInfo
,
ConstructionInfoMapper
>
{
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
ConstructionInfoService
.
class
);
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
/**
* @param constructionInfo 施工信息
* @return "OK"
*/
public
String
saveConstructionInfo
(
ConstructionInfo
constructionInfo
)
{
try
{
tzsServiceFeignClient
.
saveConstructionInfo
(
constructionInfo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"施工信息保存失败--->{}"
,
e
.
getMessage
());
e
.
printStackTrace
();
}
return
"OK"
;
}
/**
/**
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/MaintenanceInfoService.java
View file @
017deecf
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
service
;
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.api.openapi.enums.JgFileAttributeEnum
;
import
com.yeejoin.amos.api.openapi.enums.JgFileObjectEnum
;
import
com.yeejoin.amos.api.openapi.face.model.MaintenanceInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.MaintenanceInfoModel
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.MaintenanceInfoMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.MaintenanceInfoMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.*
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo
;
import
com.yeejoin.amos.api.openapi.feign.TzsServiceFeignClient
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
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.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -26,32 +26,53 @@ import java.util.List;
...
@@ -26,32 +26,53 @@ import java.util.List;
@Component
@Component
public
class
MaintenanceInfoService
extends
AppBaseService
<
MaintenanceInfoModel
,
MaintenanceInfo
,
MaintenanceInfoMapper
>
{
public
class
MaintenanceInfoService
extends
AppBaseService
<
MaintenanceInfoModel
,
MaintenanceInfo
,
MaintenanceInfoMapper
>
{
@Autowired
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
ConstructionInfoService
.
class
);
private
JgFileService
fileService
;
/**
@Autowired
*
TzsServiceFeignClient
tzsServiceFeignClient
;
* 新增维保备案信息
*
* @param model 维保备案信息实体类集合
* @return 成功返回“OK”
*/
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
public
String
saveMaintenanceInfo
(
List
<
MaintenanceInfoModel
>
model
)
{
// TODO Auto-generated method stub
if
(
ValidationUtil
.
isEmpty
(
model
))
{
throw
new
BadRequest
(
"维保备案信息为空."
);
}
List
<
MaintenanceInfo
>
mainList
=
new
ArrayList
<>();
@Autowired
private
JgFileService
fileService
;
/**
* 新增维保备案信息
*
* @param maintenanceInfo 维保备案信息
* @return 成功返回“OK”
*/
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
public
String
saveMaintenanceInfo
(
MaintenanceInfo
maintenanceInfo
)
{
try
{
tzsServiceFeignClient
.
saveMaintenanceRecordInfo
(
maintenanceInfo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"维保备案信息保存失败--->{}"
,
e
.
getMessage
());
e
.
printStackTrace
();
}
return
"OK"
;
}
/**
* 新增维保备案信息
*
* @param model 维保备案信息实体类集合
* @return 成功返回“OK”
*/
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
public
String
saveMaintenanceInfo
(
List
<
MaintenanceInfoModel
>
model
)
{
// TODO Auto-generated method stub
if
(
ValidationUtil
.
isEmpty
(
model
))
{
throw
new
BadRequest
(
"维保备案信息为空."
);
}
List
<
MaintenanceInfo
>
mainList
=
new
ArrayList
<>();
// List<JgFile> fileList = new ArrayList<>();
// List<JgFile> fileList = new ArrayList<>();
// List<JgFile> repairInformList;
// List<JgFile> repairInformList;
for
(
MaintenanceInfoModel
models
:
model
)
{
for
(
MaintenanceInfoModel
models
:
model
)
{
MaintenanceInfo
maintenanceInfo
=
new
MaintenanceInfo
();
MaintenanceInfo
maintenanceInfo
=
new
MaintenanceInfo
();
// checkModel(models);
// checkModel(models);
models
.
setRecDate
(
new
Date
());
models
.
setRecDate
(
new
Date
());
models
.
setAppId
(
getAppId
());
models
.
setAppId
(
getAppId
());
// repairInformList = JSONObject.parseArray(JSONObject.toJSONString(models.getRepairInform()), JgFile.class);
// repairInformList = JSONObject.parseArray(JSONObject.toJSONString(models.getRepairInform()), JgFile.class);
//
//
...
@@ -67,19 +88,19 @@ public class MaintenanceInfoService extends AppBaseService<MaintenanceInfoModel,
...
@@ -67,19 +88,19 @@ public class MaintenanceInfoService extends AppBaseService<MaintenanceInfoModel,
// file.setRecDate(new Date());
// file.setRecDate(new Date());
// fileList.add(file);
// fileList.add(file);
// }
// }
BeanUtils
.
copyProperties
(
models
,
maintenanceInfo
);
BeanUtils
.
copyProperties
(
models
,
maintenanceInfo
);
mainList
.
add
(
maintenanceInfo
);
mainList
.
add
(
maintenanceInfo
);
}
}
this
.
saveBatch
(
mainList
);
this
.
saveBatch
(
mainList
);
// fileService.saveBatch(fileList);
// fileService.saveBatch(fileList);
return
"OK"
;
return
"OK"
;
}
}
/**
/**
* 信息校验
* 信息校验
*
*
* @param models
* @param models
*/
*/
// private static void checkModel(MaintenanceInfoModel models) {
// private static void checkModel(MaintenanceInfoModel models) {
// if(ValidationUtil.isEmpty(models.getSequenceCode())) {
// if(ValidationUtil.isEmpty(models.getSequenceCode())) {
// throw new BadRequest("设备唯一标识码不能为空!");
// throw new BadRequest("设备唯一标识码不能为空!");
...
...
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/face/service/UseInfoService.java
View file @
017deecf
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
service
;
package
com
.
yeejoin
.
amos
.
api
.
openapi
.
face
.
service
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto
;
import
com.yeejoin.amos.api.openapi.face.model.UseInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.UseInfoModel
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.UseInfoMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.dao.UseInfoMapper
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.UseInfo
;
import
com.yeejoin.amos.api.openapi.feign.TzsServiceFeignClient
;
import
feign.FeignException
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -20,34 +27,41 @@ import java.util.List;
...
@@ -20,34 +27,41 @@ import java.util.List;
@Component
@Component
public
class
UseInfoService
extends
AppBaseService
<
UseInfoModel
,
UseInfo
,
UseInfoMapper
>
{
public
class
UseInfoService
extends
AppBaseService
<
UseInfoModel
,
UseInfo
,
UseInfoMapper
>
{
/**
private
static
final
Logger
logger
=
LogManager
.
getLogger
(
UseInfoService
.
class
);
*
* 新增使用信息
*
* @param model 使用信息实体类集合
* @return 成功返回“OK”
*/
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
public
String
saveUseInfo
(
List
<
UseInfo
>
model
)
{
// TODO Auto-generated method stub
if
(
ValidationUtil
.
isEmpty
(
model
))
{
throw
new
BadRequest
(
"使用信息为空."
);
}
for
(
UseInfo
models
:
model
)
{
@Autowired
TzsServiceFeignClient
tzsServiceFeignClient
;
// @Autowired
// AmosRequestContext amosRequestContext;
/**
* 新增使用信息
*
* @param model 使用信息实体类集合
* @return 成功返回“OK”
*/
@Transactional
(
rollbackFor
=
{
Exception
.
class
})
public
String
saveUseInfo
(
List
<
UseInfo
>
model
)
{
// TODO Auto-generated method stub
if
(
ValidationUtil
.
isEmpty
(
model
))
{
throw
new
BadRequest
(
"使用信息为空."
);
}
for
(
UseInfo
models
:
model
)
{
// checkModel(models);
// checkModel(models);
models
.
setRecDate
(
new
Date
());
models
.
setRecDate
(
new
Date
());
models
.
setAppId
(
getAppId
());
models
.
setAppId
(
getAppId
());
}
}
this
.
saveBatch
(
model
);
this
.
saveBatch
(
model
);
return
"OK"
;
return
"OK"
;
}
}
/**
//
/**
* 信息校验
//
* 信息校验
*
//
*
* @param models
//
* @param models
*/
//
*/
// private static void checkModel(UseInfo models) {
// private static void checkModel(UseInfo models) {
// if(ValidationUtil.isEmpty(models.getSequenceCode())) {
// if(ValidationUtil.isEmpty(models.getSequenceCode())) {
// throw new BadRequest("设备唯一标识码不能为空!");
// throw new BadRequest("设备唯一标识码不能为空!");
...
@@ -104,5 +118,24 @@ public class UseInfoService extends AppBaseService<UseInfoModel, UseInfo, UseInf
...
@@ -104,5 +118,24 @@ public class UseInfoService extends AppBaseService<UseInfoModel, UseInfo, UseInf
// throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"同步状态不能为空!");
// throw new BadRequest("设备标识码为:"+models.getSequenceCode()+"的设备,"+"同步状态不能为空!");
// }
// }
// }
// }
public
String
saveEquipmentInfo
(
EquipmentInfoDto
equipmentInfoDto
)
{
String
supervisoryCode
=
equipmentInfoDto
.
getSupervisoryCode
();
try
{
logger
.
info
(
"supervisoryCode--->"
+
supervisoryCode
);
ResponseModel
<
Boolean
>
responseModel
=
tzsServiceFeignClient
.
saveEquipmentInfo
(
equipmentInfoDto
);
if
(
responseModel
.
getResult
())
{
return
supervisoryCode
;
}
}
catch
(
FeignException
e
)
{
tzsServiceFeignClient
.
deleteEquipmentInfo
(
supervisoryCode
);
logger
.
error
(
"监管数据远程调用保存失败--->"
,
e
);
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"监管数据保存失败--->"
,
e
);
e
.
printStackTrace
();
}
return
null
;
}
}
}
amos-boot-data/amos-boot-data-openapi/src/main/java/com/yeejoin/amos/api/openapi/feign/TzsServiceFeignClient.java
View file @
017deecf
...
@@ -2,8 +2,11 @@ package com.yeejoin.amos.api.openapi.feign;
...
@@ -2,8 +2,11 @@ package com.yeejoin.amos.api.openapi.feign;
import
com.yeejoin.amos.api.openapi.config.MultipartSupportConfig
;
import
com.yeejoin.amos.api.openapi.config.MultipartSupportConfig
;
import
com.yeejoin.amos.api.openapi.face.dto.EquipmentInfoDto
;
import
com.yeejoin.amos.api.openapi.face.model.InspectionDetectionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.InspectionDetectionInfoModel
;
import
com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel
;
import
com.yeejoin.amos.api.openapi.face.model.UnitLicenceModel
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.ConstructionInfo
;
import
com.yeejoin.amos.api.openapi.face.orm.entity.MaintenanceInfo
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
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
;
...
@@ -14,7 +17,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
...
@@ -14,7 +17,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
@FeignClient
(
name
=
"TZS-YMT"
,
url
=
"http://36.46.151.113:11000"
,
path
=
"/ymt"
,
configuration
=
@FeignClient
(
name
=
"TZS-YMT"
,
path
=
"/ymt"
,
configuration
=
{
MultipartSupportConfig
.
class
})
{
MultipartSupportConfig
.
class
})
public
interface
TzsServiceFeignClient
{
public
interface
TzsServiceFeignClient
{
...
@@ -55,4 +58,41 @@ public interface TzsServiceFeignClient {
...
@@ -55,4 +58,41 @@ public interface TzsServiceFeignClient {
*/
*/
@RequestMapping
(
value
=
"/api/inspectiondetectioninfo/selectInspect"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/api/inspectiondetectioninfo/selectInspect"
,
method
=
RequestMethod
.
GET
)
ResponseModel
<
InspectionDetectionInfoModel
>
selectInspect
(
@RequestParam
String
superviseCode
);
ResponseModel
<
InspectionDetectionInfoModel
>
selectInspect
(
@RequestParam
String
superviseCode
);
/**
* 保存监管设备数据
*
* @param equipmentInfoDto 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/saveSupervisoryData"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Boolean
>
saveEquipmentInfo
(
@RequestBody
EquipmentInfoDto
equipmentInfoDto
);
/**
* 保存监管设备施工数据
*
* @param constructionInfo 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/saveConstructionInfoData"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Boolean
>
saveConstructionInfo
(
@RequestBody
ConstructionInfo
constructionInfo
);
/**
* 保存监管维保数据
*
* @param maintenanceInfo 请求体
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/saveMaintenanceRecordInfoData"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Boolean
>
saveMaintenanceRecordInfo
(
@RequestBody
MaintenanceInfo
maintenanceInfo
);
/**
* 删除监管设备数据
*
* @param record
* @return
*/
@RequestMapping
(
value
=
"/equipment-category/deleteByRecord"
,
method
=
RequestMethod
.
POST
)
ResponseModel
<
Boolean
>
deleteEquipmentInfo
(
@RequestParam
String
record
);
}
}
amos-boot-system-tzs/amos-boot-module-app/amos-boot-module-app-api/src/main/java/com/yeejoin/amos/boot/module/app/api/mapper/ViewJgClaimMapper.java
View file @
017deecf
...
@@ -9,5 +9,7 @@ import java.util.Map;
...
@@ -9,5 +9,7 @@ import java.util.Map;
public
interface
ViewJgClaimMapper
{
public
interface
ViewJgClaimMapper
{
String
supervisoryCode
(
String
code
);
String
supervisoryCode
(
String
code
);
Map
<
String
,
String
>
getDetialByCode
(
String
code
);
List
<
Map
<
String
,
Object
>>
getDetialMapList
(
String
record
);
List
<
Map
<
String
,
Object
>>
getDetialMapList
(
String
record
);
}
}
amos-boot-system-tzs/amos-boot-module-app/amos-boot-module-app-api/src/main/resources/mapper/ViewJgClaimMapper.xml
View file @
017deecf
...
@@ -8,6 +8,10 @@
...
@@ -8,6 +8,10 @@
</select>
</select>
<select
id=
"getDetialByCode"
resultType=
"java.util.Map"
>
SELECT * FROM idx_biz_view_jg_claim WHERE SEQUENCE_NBR=#{code}
</select>
<select
id=
"getDetialMapList"
resultType=
"java.util.Map"
>
<select
id=
"getDetialMapList"
resultType=
"java.util.Map"
>
SELECT
SELECT
...
...
amos-boot-system-tzs/amos-boot-module-app/amos-boot-module-app-biz/src/main/java/com/yeejoin/amos/boot/module/app/biz/controller/TzsAppController.java
View file @
017deecf
package
com
.
yeejoin
.
amos
.
boot
.
module
.
app
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
app
.
biz
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.app.api.common.MobileLoginParam
;
import
com.yeejoin.amos.boot.module.app.api.common.MobileLoginParam
;
import
com.yeejoin.amos.boot.module.app.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.app.api.dto.TzBaseEnterpriseInfoDto
;
...
@@ -23,6 +27,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
...
@@ -23,6 +27,7 @@ import com.yeejoin.amos.component.feign.model.FeignClientResult;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.privilege.model.PermissionModel
;
import
com.yeejoin.amos.feign.privilege.model.PermissionModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -37,6 +42,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -37,6 +42,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
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
;
...
@@ -57,6 +63,9 @@ import java.util.stream.Collectors;
...
@@ -57,6 +63,9 @@ import java.util.stream.Collectors;
public
class
TzsAppController
{
public
class
TzsAppController
{
@Autowired
@Autowired
private
RedisUtils
redisUtils
;
@Autowired
TzsAppService
appService
;
TzsAppService
appService
;
@Autowired
@Autowired
private
RegUnitInfoMapper
regUnitInfoMapper
;
private
RegUnitInfoMapper
regUnitInfoMapper
;
...
@@ -86,7 +95,27 @@ public class TzsAppController {
...
@@ -86,7 +95,27 @@ public class TzsAppController {
@GetMapping
(
value
=
"/equipmentInfo"
)
@GetMapping
(
value
=
"/equipmentInfo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"小程序获取设备详情"
,
notes
=
"小程序获取设备详情"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"小程序获取设备详情"
,
notes
=
"小程序获取设备详情"
)
public
ResponseModel
<
Object
>
getEquipmentInfo
(
String
record
)
{
public
ResponseModel
<
Object
>
getEquipmentInfo
(
String
record
)
{
return
ResponseHelper
.
buildResponse
(
appService
.
getEquipmentInfo
(
record
));
ReginParams
reginParams
=
JSON
.
parseObject
(
redisUtils
.
get
(
RedisKey
.
buildReginKey
(
RequestContext
.
getExeUserId
(),
RequestContext
.
getToken
())).
toString
(),
ReginParams
.
class
);
CompanyModel
companys
=
reginParams
.
getUserModel
().
getCompanys
().
get
(
0
);
Map
<
String
,
String
>
detial
=
viewJgClaimMapper
.
getDetialByCode
(
record
);
Map
<
String
,
Object
>
equipmentInfo
;
//判断是否有权限查看全部信息
if
(
LEVEL
.
equals
(
companys
.
getLevel
()))
{
//企业
if
(
detial
.
get
(
"USE_UNIT_CREDIT_CODE"
).
equals
(
companys
.
getCompanyCode
()))
{
equipmentInfo
=
appService
.
getEquipmentInfo
(
record
);
}
else
{
equipmentInfo
=
appService
.
getEquipmentInfoWX
(
record
);
}
}
else
{
//监管
if
(
detial
.
get
(
"ORG_BRANCH_CODE"
).
contains
(
companys
.
getOrgCode
()))
{
equipmentInfo
=
appService
.
getEquipmentInfo
(
record
);
}
else
{
equipmentInfo
=
appService
.
getEquipmentInfoWX
(
record
);
}
}
return
ResponseHelper
.
buildResponse
(
equipmentInfo
);
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
017deecf
...
@@ -196,7 +196,11 @@
...
@@ -196,7 +196,11 @@
LEFT JOIN privilege_company pc ON tui.unit_code = pc.company_code
LEFT JOIN privilege_company pc ON tui.unit_code = pc.company_code
WHERE
WHERE
tzei.equip_category IS NOT NULL
tzei.equip_category IS NOT NULL
AND tui.userId IS NOT NULL
AND tui.unit_code IS NOT NULL
AND pc.org_code IS NOT NULL
AND tzei.is_delete = '0'
AND tzei.is_delete = '0'
AND pc.is_deleted = 'f'
AND tzei.unit_type
<![CDATA[<>]]>
'检验检测机构'
AND tzei.unit_type
<![CDATA[<>]]>
'检验检测机构'
AND tui.amos_user_id IN (SELECT USER_ID FROM privilege_group_user WHERE GROUP_SEQ = #{groupId})
AND tui.amos_user_id IN (SELECT USER_ID FROM privilege_group_user WHERE GROUP_SEQ = #{groupId})
</select>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-api/pom.xml
View file @
017deecf
...
@@ -39,6 +39,12 @@
...
@@ -39,6 +39,12 @@
<artifactId>
jsoup
</artifactId>
<artifactId>
jsoup
</artifactId>
<version>
1.11.2
</version>
<version>
1.11.2
</version>
</dependency>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-annotation
</artifactId>
<version>
4.0.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/pom.xml
View file @
017deecf
...
@@ -162,6 +162,12 @@
...
@@ -162,6 +162,12 @@
<artifactId>
vastbase-jdbc
</artifactId>
<artifactId>
vastbase-jdbc
</artifactId>
<version>
2.7v
</version>
<version>
2.7v
</version>
</dependency>
</dependency>
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-base
</artifactId>
<version>
4.0.0
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<plugins>
<plugins>
...
...
amos-boot-system-tzs/amos-boot-module-tzspatrol/amos-boot-module-tzspatrol-biz/src/main/java/com/yeejoin/amos/patrol/business/vo/PlanTaskVo.java
View file @
017deecf
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
vo
;
package
com
.
yeejoin
.
amos
.
patrol
.
business
.
vo
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
lombok.Data
;
import
lombok.Data
;
@Data
@Data
public
class
PlanTaskVo
{
public
class
PlanTaskVo
{
private
long
id
;
private
long
id
;
@Excel
(
name
=
"计划批号"
,
orderNum
=
"0"
)
@Excel
(
name
=
"计划批号"
,
orderNum
=
"0"
,
width
=
30
)
private
String
batchNo
;
private
String
batchNo
;
@Excel
(
name
=
"计划名称"
,
orderNum
=
"1"
)
@Excel
(
name
=
"计划名称"
,
orderNum
=
"1"
,
width
=
30
)
private
String
planName
;
private
String
planName
;
private
long
planId
;
private
long
planId
;
@Excel
(
name
=
"巡检路线"
,
orderNum
=
"2"
)
@Excel
(
name
=
"巡检路线"
,
orderNum
=
"2"
,
width
=
20
)
private
String
routeName
;
private
String
routeName
;
@Excel
(
name
=
"点编号"
,
orderNum
=
"3"
)
@Excel
(
name
=
"点编号"
,
orderNum
=
"3"
)
private
String
pointNo
;
private
String
pointNo
;
@Excel
(
name
=
"点名称"
,
orderNum
=
"4"
)
@Excel
(
name
=
"点名称"
,
orderNum
=
"4"
,
width
=
30
)
private
String
pointName
;
private
String
pointName
;
@Excel
(
name
=
"开始时间"
,
orderNum
=
"5"
)
@Excel
(
name
=
"开始时间"
,
orderNum
=
"5"
,
width
=
20
)
private
String
beginTime
;
private
String
beginTime
;
@Excel
(
name
=
"结束时间"
,
orderNum
=
"6"
)
@Excel
(
name
=
"结束时间"
,
orderNum
=
"6"
,
width
=
20
)
private
String
endTime
;
private
String
endTime
;
@Excel
(
name
=
"执行情况"
,
replace
=
{
"尚未巡检_0"
,
"按时完成_1"
,
"超时漏检_2"
},
orderNum
=
"7"
)
@Excel
(
name
=
"执行情况"
,
replace
=
{
"尚未巡检_0"
,
"按时完成_1"
,
"超时漏检_2"
},
orderNum
=
"7"
)
private
String
status
;
private
String
status
;
@Excel
(
name
=
"巡检人员"
,
orderNum
=
"8"
)
@Excel
(
name
=
"巡检人员"
,
orderNum
=
"8"
,
width
=
20
)
private
String
userName
;
private
String
userName
;
private
long
deptId
;
private
long
deptId
;
@Excel
(
name
=
"巡检部门"
,
orderNum
=
"9"
)
@Excel
(
name
=
"巡检部门"
,
orderNum
=
"9"
,
width
=
30
)
private
String
deptName
;
private
String
deptName
;
@Excel
(
name
=
"备注说明"
,
orderNum
=
"10"
)
@Excel
(
name
=
"备注说明"
,
orderNum
=
"10"
)
private
String
remark
;
private
String
remark
;
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/InspectionDetectionInfoMapper.xml
View file @
017deecf
...
@@ -3,18 +3,11 @@
...
@@ -3,18 +3,11 @@
<mapper
namespace=
"com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.ymt.api.mapper.InspectionDetectionInfoMapper"
>
<select
id=
"selectInspection"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo"
>
<select
id=
"selectInspection"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.InspectionDetectionInfo"
>
SELECT *
SELECT
FROM idx_biz_jg_inspection_detection_info
*
WHERE "RECORD" = (SELECT "RECORD" FROM "idx_biz_jg_other_info" WHERE "SUPERVISORY_CODE" = #{superviseCode})
FROM
ORDER BY "INSPECT_DATE" DESC
idx_biz_jg_inspection_detection_info
LIMIT 1
WHERE
"RECORD" = ( SELECT "RECORD" FROM "idx_biz_jg_other_info" WHERE "SUPERVISORY_CODE" = #{superviseCode} )
ORDER BY
"INSPECT_DATE" DESC
LIMIT 1
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
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 @
017deecf
...
@@ -9,12 +9,14 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
...
@@ -9,12 +9,14 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.Menu
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.biz.common.utils.TreeParser
;
import
com.yeejoin.amos.boot.module.ymt.api.common.CommonException
;
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.dto.IdxBizJgConstructionInfoDto
;
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
;
...
@@ -30,7 +32,15 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -30,7 +32,15 @@ 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.*
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
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.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
...
@@ -42,7 +52,12 @@ import java.io.File;
...
@@ -42,7 +52,12 @@ import java.io.File;
import
java.io.FileNotFoundException
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -545,33 +560,33 @@ public class EquipmentCategoryController extends BaseController {
...
@@ -545,33 +560,33 @@ public class EquipmentCategoryController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@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
,
needAuth
=
false
)
@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
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/saveMaintenanceRecordInfoData"
)
@PostMapping
(
value
=
"/saveMaintenanceRecordInfoData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备维保数据保存"
,
notes
=
"监管设备维保数据保存"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备维保数据保存"
,
notes
=
"监管设备维保数据保存"
)
public
ResponseModel
<
Boolean
>
saveMaintenanceRecordInfoData
(
@RequestBody
IdxBizJgMaintenanceRecordInfo
data
)
{
public
ResponseModel
<
Boolean
>
saveMaintenanceRecordInfoData
(
@RequestBody
IdxBizJgMaintenanceRecordInfo
data
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveMaintenanceRecordInfoData
(
data
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveMaintenanceRecordInfoData
(
data
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/saveDetectionInfoData"
)
@PostMapping
(
value
=
"/saveDetectionInfoData"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备检验检测数据保存"
,
notes
=
"监管设备检验检测数据保存"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"监管设备检验检测数据保存"
,
notes
=
"监管设备检验检测数据保存"
)
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestBody
IdxBizJgInspectionDetectionInfo
data
)
{
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestBody
IdxBizJgInspectionDetectionInfo
data
)
{
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveDetectionInfoData
(
data
));
return
ResponseHelper
.
buildResponse
(
equipmentCategoryServiceImpl
.
saveDetectionInfoData
(
data
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@PostMapping
(
value
=
"/deleteByRecord"
)
@PostMapping
(
value
=
"/deleteByRecord"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"数据异常回滚"
,
notes
=
"数据异常回滚"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"数据异常回滚"
,
notes
=
"数据异常回滚"
)
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestParam
(
"record"
)
String
record
)
{
public
ResponseModel
<
Boolean
>
saveDetectionInfoData
(
@RequestParam
(
"record"
)
String
record
)
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/EquipmentCategoryServiceImpl.java
View file @
017deecf
...
@@ -2274,7 +2274,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
...
@@ -2274,7 +2274,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
registerInfo
.
setRecDate
(
date
);
registerInfo
.
setRecDate
(
date
);
if
(
saveStatus
==
1
)
{
if
(
saveStatus
==
1
)
{
registerInfo
.
setRecord
(
supervisoryCode
);
registerInfo
.
setRecord
(
supervisoryCode
);
alias
=
Integer
.
parseInt
(
String
.
valueOf
(
registerInfo
.
getEquList
()));
alias
=
Integer
.
parseInt
(
String
.
valueOf
(
ValidationUtil
.
isEmpty
(
registerInfo
.
getEquList
())
?
3000
:
registerInfo
.
getEquList
()));
registerInfo
.
setEquList
(
"3000"
);
registerInfo
.
setEquList
(
"3000"
);
idxBizJgRegisterInfoService
.
save
(
registerInfo
);
idxBizJgRegisterInfoService
.
save
(
registerInfo
);
}
else
{
}
else
{
...
...
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-biz/src/main/java/com/yeejoin/amos/boot/module/ymt/biz/service/impl/InspectionDetectionInfoServiceImpl.java
View file @
017deecf
...
@@ -20,16 +20,17 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -20,16 +20,17 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
@Service
@Service
public
class
InspectionDetectionInfoServiceImpl
extends
BaseService
<
InspectionDetectionInfoModel
,
InspectionDetectionInfo
,
InspectionDetectionInfoMapper
>
implements
InspectionDetectionInfoService
{
public
class
InspectionDetectionInfoServiceImpl
extends
BaseService
<
InspectionDetectionInfoModel
,
InspectionDetectionInfo
,
InspectionDetectionInfoMapper
>
implements
InspectionDetectionInfoService
{
@Autowired
@Autowired
private
InspectionDetectionInfoMapper
inspectionDetectionInfo
;
private
InspectionDetectionInfoMapper
inspectionDetectionInfo
;
public
InspectionDetectionInfoModel
selectInspect
(
String
superviseCode
)
{
InspectionDetectionInfoModel
inspectionDetectionInfoDto
=
new
InspectionDetectionInfoModel
();
public
InspectionDetectionInfoModel
selectInspect
(
String
superviseCode
)
{
if
(
ValidationUtil
.
isEmpty
(
superviseCode
))
{
InspectionDetectionInfoModel
inspectionDetectionInfoDto
=
new
InspectionDetectionInfoModel
();
return
inspectionDetectionInfoDto
;
if
(
ValidationUtil
.
isEmpty
(
superviseCode
))
{
}
return
inspectionDetectionInfoDto
;
InspectionDetectionInfo
inspectionDetectionInfo
=
this
.
inspectionDetectionInfo
.
selectInspection
(
superviseCode
);
}
BeanUtils
.
copyProperties
(
inspectionDetectionInfo
,
inspectionDetectionInfoDto
);
InspectionDetectionInfo
inspectionDetectionInfo
=
this
.
inspectionDetectionInfo
.
selectInspection
(
superviseCode
);
inspectionDetectionInfoDto
.
setSuperviseCode
(
superviseCode
);
BeanUtils
.
copyProperties
(
inspectionDetectionInfo
,
inspectionDetectionInfoDto
);
return
inspectionDetectionInfoDto
;
inspectionDetectionInfoDto
.
setSuperviseCode
(
superviseCode
);
}
return
inspectionDetectionInfoDto
;
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment