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
b0c6ee8b
Commit
b0c6ee8b
authored
Feb 24, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加建筑导入接口
parent
d4163dea
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
0 deletions
+97
-0
BuildingImportDto.java
...com/yeejoin/equipmanage/common/dto/BuildingImportDto.java
+59
-0
BuildingController.java
...om/yeejoin/equipmanage/controller/BuildingController.java
+20
-0
FormInstanceMapper.java
...va/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
+7
-0
IBuilldService.java
.../java/com/yeejoin/equipmanage/service/IBuilldService.java
+8
-0
BuildingServiceImpl.java
...yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
+0
-0
FormInstanceMapper.xml
...em-equip/src/main/resources/mapper/FormInstanceMapper.xml
+3
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/dto/BuildingImportDto.java
0 → 100644
View file @
b0c6ee8b
package
com
.
yeejoin
.
equipmanage
.
common
.
dto
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
lombok.Data
;
@Data
public
class
BuildingImportDto
{
@ColumnWidth
(
40
)
@ExcelProperty
(
value
=
"数据类型"
,
index
=
0
)
private
String
dataType
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"建筑类型"
,
index
=
1
)
private
String
buildingType
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"编号"
,
index
=
2
)
private
String
code
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"建筑类别"
,
index
=
3
)
private
String
buildingCategory
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"建筑地址"
,
index
=
4
)
private
String
buildingAddress
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"建筑名称"
,
index
=
5
)
private
String
buildName
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"所在建筑"
,
index
=
6
)
private
String
inWhichBuild
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"建造日期"
,
index
=
7
)
private
String
buildDate
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"保护对象"
,
index
=
8
)
private
String
protectedObjects
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"责任人"
,
index
=
9
)
private
String
dutyUser
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"投用日期"
,
index
=
10
)
private
String
putDate
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"维保单位"
,
index
=
11
)
private
String
maintenanceCompany
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"每班人数"
,
index
=
12
)
private
String
personNumber
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"安装位置描述"
,
index
=
13
)
private
String
locationDescription
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"火灾预案(有、无)"
,
index
=
14
)
private
String
firePlan
;
@ColumnWidth
(
25
)
@ExcelProperty
(
value
=
"消防控制室操作人员持证数"
,
index
=
15
)
private
String
licensesNumber
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/BuildingController.java
View file @
b0c6ee8b
package
com
.
yeejoin
.
equipmanage
.
controller
;
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.alibaba.excel.EasyExcel
;
import
com.alibaba.excel.ExcelReader
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.equipmanage.common.dto.OrgUsrDto
;
import
com.yeejoin.equipmanage.common.dto.OrgUsrDto
;
import
com.yeejoin.equipmanage.common.utils.CommonResponseUtil
;
import
com.yeejoin.equipmanage.config.PersonIdentify
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
import
com.yeejoin.equipmanage.fegin.JcsFeign
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -25,6 +33,8 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -25,6 +33,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
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.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
@@ -419,4 +429,14 @@ public class BuildingController extends AbstractBaseController {
...
@@ -419,4 +429,14 @@ public class BuildingController extends AbstractBaseController {
return
buildService
.
getBuildingTreeInMyOrgCodeList
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
return
buildService
.
getBuildingTreeInMyOrgCodeList
(
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
}
}
@PersonIdentify
@PostMapping
(
value
=
"/upload"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"建筑导入(实施导数据使用)"
,
notes
=
"建筑导入"
)
public
void
upload
(
MultipartFile
file
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
buildService
.
importBuilding
(
file
,
reginParams
);
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/mapper/FormInstanceMapper.java
View file @
b0c6ee8b
...
@@ -216,4 +216,11 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
...
@@ -216,4 +216,11 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
int
updateFormFieldValue
(
@Param
(
"id"
)
Long
id
,
@Param
(
"name"
)
String
name
,
@Param
(
"value"
)
String
value
);
int
updateFormFieldValue
(
@Param
(
"id"
)
Long
id
,
@Param
(
"name"
)
String
name
,
@Param
(
"value"
)
String
value
);
Long
queryVideoCountByBizOrgCode
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
Long
queryVideoCountByBizOrgCode
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
/**
* 建筑导入-导入楼层或房间 根据编码查询父级建筑id
* @param code
* @return
*/
String
selectParentBuildId
(
@Param
(
"code"
)
String
code
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IBuilldService.java
View file @
b0c6ee8b
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service;
...
@@ -2,6 +2,7 @@ package com.yeejoin.equipmanage.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.biz.common.dto.OrgMenuDto
;
import
com.yeejoin.amos.feign.morphic.model.ResourceDTO
;
import
com.yeejoin.amos.feign.morphic.model.ResourceDTO
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
...
@@ -17,6 +18,7 @@ import com.yeejoin.equipmanage.common.entity.vo.PointTreeVo;
...
@@ -17,6 +18,7 @@ import com.yeejoin.equipmanage.common.entity.vo.PointTreeVo;
import
com.yeejoin.equipmanage.common.vo.BuildingTreeAndEquipVO
;
import
com.yeejoin.equipmanage.common.vo.BuildingTreeAndEquipVO
;
import
com.yeejoin.equipmanage.common.vo.BuildingTreeVo
;
import
com.yeejoin.equipmanage.common.vo.BuildingTreeVo
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -351,4 +353,10 @@ public interface IBuilldService extends IService<Building> {
...
@@ -351,4 +353,10 @@ public interface IBuilldService extends IService<Building> {
List
<
OrgMenuDto
>
companyTreeByUserAndType
();
List
<
OrgMenuDto
>
companyTreeByUserAndType
();
List
<
BuildingTreeVo
>
treeByName
(
String
bizOrgCode
,
String
name
);
List
<
BuildingTreeVo
>
treeByName
(
String
bizOrgCode
,
String
name
);
/**
* 导入建筑信息
* @param file
*/
void
importBuilding
(
MultipartFile
file
,
ReginParams
reginParams
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/BuildingServiceImpl.java
View file @
b0c6ee8b
This diff is collapsed.
Click to expand it.
amos-boot-system-equip/src/main/resources/mapper/FormInstanceMapper.xml
View file @
b0c6ee8b
...
@@ -650,4 +650,7 @@ AND field_name =#{name}
...
@@ -650,4 +650,7 @@ AND field_name =#{name}
<select
id=
"queryVideoCountByBizOrgCode"
resultType=
"java.lang.Long"
>
<select
id=
"queryVideoCountByBizOrgCode"
resultType=
"java.lang.Long"
>
select count(1) from wl_video where biz_org_code like concat(#{bizOrgCode}, '%')
select count(1) from wl_video where biz_org_code like concat(#{bizOrgCode}, '%')
</select>
</select>
<select
id=
"selectParentBuildId"
resultType=
"java.lang.String"
>
SELECT instance_id FROM `wl_form_instance` f where f.field_name = 'code' and f.field_value = #{code}
</select>
</mapper>
</mapper>
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