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
6b883ebe
Commit
6b883ebe
authored
Oct 10, 2022
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:装备属性扩展
parent
b81b8506
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
150 additions
and
26 deletions
+150
-26
FormGroupColumnDto.java
...oin/equipmanage/common/entity/dto/FormGroupColumnDto.java
+33
-0
FormGroupColumnController.java
...oin/equipmanage/controller/FormGroupColumnController.java
+43
-0
FormInstanceController.java
...eejoin/equipmanage/controller/FormInstanceController.java
+45
-0
IFormInstanceService.java
...com/yeejoin/equipmanage/service/IFormInstanceService.java
+3
-1
EquipmentSpecificSerivceImpl.java
...quipmanage/service/impl/EquipmentSpecificSerivceImpl.java
+6
-25
FormInstanceServiceImpl.java
...oin/equipmanage/service/impl/FormInstanceServiceImpl.java
+20
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/dto/FormGroupColumnDto.java
0 → 100644
View file @
6b883ebe
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @author DELL
*/
@Data
@ApiModel
(
value
=
"FormGroupColumnDto对象"
,
description
=
"分组Dto对象"
)
public
class
FormGroupColumnDto
{
@ApiModelProperty
(
value
=
"字段名"
)
private
String
fieldName
;
@ApiModelProperty
(
value
=
"中文名"
)
private
String
fieldLabel
;
@ApiModelProperty
(
value
=
"值"
)
private
String
fieldValue
;
@ApiModelProperty
(
value
=
"数据类型:文本,数字,枚举,日期"
)
private
String
dataType
;
@ApiModelProperty
(
value
=
"查询策略;全等,模糊,区间"
)
private
String
queryStrategy
;
@ApiModelProperty
(
value
=
"分组编号"
)
private
String
groupCode
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FormGroupColumnController.java
0 → 100644
View file @
6b883ebe
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.yeejoin.equipmanage.common.entity.FormGroupColumn
;
import
com.yeejoin.equipmanage.service.IFormGroupColumnService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
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.restful.doc.TycloudOperation
;
import
java.util.List
;
/**
* 动态表单控制器
*
* @author gaojianqiang
* @date 2022-10-09
*/
@RestController
@Api
(
tags
=
"动态表单分组列Api"
)
@RequestMapping
(
value
=
"/form-group-column"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
class
FormGroupColumnController
extends
AbstractBaseController
{
@Autowired
IFormGroupColumnService
formGroupColumnService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"通过分组code查询列信息"
,
notes
=
"通过分组code查询列信息"
)
@RequestMapping
(
value
=
"/queryByGroup"
,
method
=
RequestMethod
.
GET
)
public
List
<
FormGroupColumn
>
queryByGroup
(
@RequestParam
String
groupCode
)
{
return
formGroupColumnService
.
queryByGroup
(
groupCode
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/FormInstanceController.java
0 → 100644
View file @
6b883ebe
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.yeejoin.equipmanage.common.entity.FormGroupColumn
;
import
com.yeejoin.equipmanage.common.entity.dto.FormGroupColumnDto
;
import
com.yeejoin.equipmanage.service.IFormGroupColumnService
;
import
com.yeejoin.equipmanage.service.IFormInstanceService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
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.restful.doc.TycloudOperation
;
import
java.util.List
;
/**
* 动态表单控制器
*
* @author gaojianqiang
* @date 2022-10-09
*/
@RestController
@Api
(
tags
=
"动态表单实例Api"
)
@RequestMapping
(
value
=
"/form-instance"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
class
FormInstanceController
extends
AbstractBaseController
{
@Autowired
private
IFormInstanceService
formInstanceService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"通过分组code查询列及值信息"
,
notes
=
"通过分组code查询列及值信息"
)
@RequestMapping
(
value
=
"/queryColumnAndValueByGroup"
,
method
=
RequestMethod
.
GET
)
public
List
<
FormGroupColumnDto
>
queryColumnAndValueByGroup
(
@RequestParam
String
groupCode
,
@RequestParam
(
required
=
false
)
Long
instanceId
)
{
return
formInstanceService
.
queryColumnAndValueByGroup
(
groupCode
,
instanceId
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFormInstanceService.java
View file @
6b883ebe
...
...
@@ -4,8 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.equipmanage.common.entity.FormInstance
;
import
com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.FormGroupColumnDto
;
import
com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO
;
import
com.yeejoin.equipmanage.common.vo.AreaTreeVo
;
import
com.yeejoin.equipmanage.common.vo.UnitAreaTreeVo
;
import
java.util.LinkedHashMap
;
...
...
@@ -172,4 +172,6 @@ public interface IFormInstanceService extends IService<FormInstance> {
* @return List<Map < String, Object>>
*/
List
<
Map
<
String
,
Object
>>
getSpecialChildrenListByName
(
String
parentId
,
String
bizOrgCode
,
String
name
);
List
<
FormGroupColumnDto
>
queryColumnAndValueByGroup
(
String
groupCode
,
Long
instanceId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/EquipmentSpecificSerivceImpl.java
View file @
6b883ebe
...
...
@@ -7,10 +7,9 @@ import java.util.stream.Collectors;
import
com.alibaba.fastjson.JSONArray
;
import
com.yeejoin.equipmanage.common.entity.vo.*
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.common.vo.*
;
import
com.yeejoin.equipmanage.fegin.IotFeign
;
import
com.yeejoin.equipmanage.mapper.*
;
import
com.yeejoin.equipmanage.service.*
;
import
org.apache.catalina.util.IOTools
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -73,28 +72,6 @@ import com.yeejoin.equipmanage.common.exception.BaseException;
import
com.yeejoin.equipmanage.common.utils.DateUtils
;
import
com.yeejoin.equipmanage.common.utils.QRCodeUtil
;
import
com.yeejoin.equipmanage.common.utils.StringUtil
;
import
com.yeejoin.equipmanage.service.ICarService
;
import
com.yeejoin.equipmanage.service.IEquPropertyService
;
import
com.yeejoin.equipmanage.service.IEquipmentCategoryService
;
import
com.yeejoin.equipmanage.service.IEquipmentDetailService
;
import
com.yeejoin.equipmanage.service.IEquipmentIndexService
;
import
com.yeejoin.equipmanage.service.IEquipmentService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificAlarmService
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificIndexSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSpecificSerivce
;
import
com.yeejoin.equipmanage.service.IEquipmentSystemSourceStatisticsService
;
import
com.yeejoin.equipmanage.service.IFireFightingSystemService
;
import
com.yeejoin.equipmanage.service.IStockBillDetailService
;
import
com.yeejoin.equipmanage.service.IStockBillService
;
import
com.yeejoin.equipmanage.service.IStockDetailService
;
import
com.yeejoin.equipmanage.service.IStockService
;
import
com.yeejoin.equipmanage.service.ISyncDataService
;
import
com.yeejoin.equipmanage.service.ISystemDicService
;
import
com.yeejoin.equipmanage.service.IUploadFileService
;
import
com.yeejoin.equipmanage.service.IVideoEquipmentSpecificService
;
import
com.yeejoin.equipmanage.service.IVideoService
;
import
com.yeejoin.equipmanage.service.IWarehouseService
;
import
com.yeejoin.equipmanage.service.IWarehouseStructureService
;
import
com.yeejoin.equipmanage.utils.RelationRedisUtil
;
import
org.typroject.tyboot.core.foundation.utils.DateTimeUtil
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -173,6 +150,9 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
@Autowired
private
IVideoEquipmentSpecificService
videoEquipmentSpecificService
;
@Autowired
private
IFormInstanceService
formInstanceService
;
@Value
(
"${systemctl.dict.iot-core-param}"
)
private
String
iotCoreParam
;
...
...
@@ -1023,7 +1003,8 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
equipmentDetailService
.
removeById
(
equipmentSpecific
.
getEquipmentDetailId
());
}
if
(
res
>
0
)
{
return
true
;
// 删除设备动态表单扩展属性
return
formInstanceService
.
deleteInstanceById
(
id
);
}
else
{
return
false
;
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FormInstanceServiceImpl.java
View file @
6b883ebe
...
...
@@ -13,6 +13,7 @@ import com.yeejoin.equipmanage.common.entity.FormGroupColumn;
import
com.yeejoin.equipmanage.common.entity.FormInstance
;
import
com.yeejoin.equipmanage.common.entity.SourceFile
;
import
com.yeejoin.equipmanage.common.entity.dto.BuildSearchDTO
;
import
com.yeejoin.equipmanage.common.entity.dto.FormGroupColumnDto
;
import
com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO
;
import
com.yeejoin.equipmanage.common.enums.GroupCodeEnum
;
import
com.yeejoin.equipmanage.common.enums.GroupColumnDataType
;
...
...
@@ -23,6 +24,7 @@ import com.yeejoin.equipmanage.mapper.FormInstanceMapper;
import
com.yeejoin.equipmanage.remote.RemoteSecurityService
;
import
com.yeejoin.equipmanage.service.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
...
...
@@ -564,4 +566,22 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
public
List
<
Map
<
String
,
Object
>>
getSpecialChildrenListByName
(
String
parentId
,
String
bizOrgCode
,
String
name
)
{
return
this
.
baseMapper
.
querySpecialChildrenListByName
(
parentId
,
bizOrgCode
,
name
);
}
@Override
public
List
<
FormGroupColumnDto
>
queryColumnAndValueByGroup
(
String
groupCode
,
Long
instanceId
)
{
List
<
FormGroupColumnDto
>
list
=
new
ArrayList
<>();
List
<
FormGroupColumn
>
columnList
=
iFormGroupColumnService
.
queryByGroup
(
groupCode
);
if
(!
CollectionUtils
.
isEmpty
(
columnList
))
{
Map
<
String
,
Object
>
map
=
queryForMap
(
instanceId
);
columnList
.
forEach
(
x
->
{
FormGroupColumnDto
dto
=
new
FormGroupColumnDto
();
BeanUtils
.
copyProperties
(
x
,
dto
);
if
(!
map
.
isEmpty
())
{
dto
.
setFieldValue
(
map
.
get
(
dto
.
getFieldName
()).
toString
());
}
list
.
add
(
dto
);
});
}
return
list
;
}
}
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