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
0c7c3e1b
Commit
0c7c3e1b
authored
Sep 24, 2024
by
韩桐桐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(tcm):人员列表,企业列表数据导出
parent
43e2e535
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
177 additions
and
8 deletions
+177
-8
TzBaseEnterpriseInfoMapper.java
...oot/module/tcm/api/mapper/TzBaseEnterpriseInfoMapper.java
+3
-0
TzsUserInfoMapper.java
...in/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
+3
-0
ITzBaseEnterpriseInfoService.java
.../module/tcm/api/service/ITzBaseEnterpriseInfoService.java
+3
-0
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+3
-0
BaseEnterpriseVo.java
...yeejoin/amos/boot/module/tcm/api/vo/BaseEnterpriseVo.java
+41
-0
UserInfoVo.java
...a/com/yeejoin/amos/boot/module/tcm/api/vo/UserInfoVo.java
+32
-0
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+18
-0
TzsUserInfoMapper.xml
...e-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
+20
-4
TzBaseEnterpriseInfoController.java
...le/tcm/biz/controller/TzBaseEnterpriseInfoController.java
+10
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+11
-4
TzBaseEnterpriseInfoServiceImpl.java
...tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+16
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+17
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/TzBaseEnterpriseInfoMapper.java
View file @
0c7c3e1b
...
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.vo.BaseEnterpriseVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -56,4 +57,6 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
List
<
Map
<
String
,
Object
>>
getEquipType
(
@Param
(
"type"
)
String
type
);
Map
<
String
,
Object
>
getProblemInfoBySourceId
(
@Param
(
"sourceId"
)
String
sourceId
);
List
<
BaseEnterpriseVo
>
queryBaseEnterpriseInIds
(
@Param
(
"ids"
)
List
<
String
>
ids
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/TzsUserInfoMapper.java
View file @
0c7c3e1b
...
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.GroupAndPersonInfoDto;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.vo.UserInfoVo
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -15,6 +16,8 @@ import java.util.Map;
public
interface
TzsUserInfoMapper
extends
BaseMapper
<
TzsUserInfo
>
{
Page
<
TzsUserInfoDto
>
selectPageMessage
(
@Param
(
"page"
)
Page
<
TzsUserInfoDto
>
page
,
@Param
(
"dto"
)
TzsUserInfoDto
dto
);
List
<
UserInfoVo
>
queryUserInfoInIds
(
@Param
(
"ids"
)
List
<
String
>
ids
);
List
<
Map
<
String
,
Object
>>
getUserType
(
@Param
(
"unitType"
)
String
unitType
,
@Param
(
"install"
)
String
install
);
Map
<
String
,
Integer
>
getArrangementStatistic
(
String
companyCode
);
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzBaseEnterpriseInfoService.java
View file @
0c7c3e1b
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.module.tcm.api.entity.BaseUnitLicence;
import
com.yeejoin.amos.boot.module.tcm.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -50,4 +51,6 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
BaseUnitLicence
getUnitLicenceMessage
(
String
unitCode
);
Map
<
String
,
Object
>
getInfoByUseCodeMap
(
String
useCode
);
void
export
(
HttpServletResponse
response
,
List
<
String
>
ids
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzsUserInfoService.java
View file @
0c7c3e1b
...
...
@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserQualifications
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -59,4 +60,6 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
TzIndividualityDto
getIndividualityInfo
();
TzIndividualityDto
updateIndividualityInfo
(
TzIndividualityDto
individualityDto
);
void
userInfoExport
(
HttpServletResponse
response
,
List
<
String
>
ids
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/vo/BaseEnterpriseVo.java
0 → 100644
View file @
0c7c3e1b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
lombok.Data
;
/**
* 企业信息
*/
@Data
public
class
BaseEnterpriseVo
{
@ExcelProperty
(
value
=
"单位类型"
,
index
=
0
)
String
unitType
;
@ExcelProperty
(
value
=
"单位名称"
,
index
=
1
)
String
useUnit
;
@ExcelProperty
(
value
=
"监管标签"
,
index
=
2
)
String
regulatoryLabels
;
@ExcelProperty
(
value
=
"证件类型"
,
index
=
3
)
String
useUnitCertificate
;
@ExcelProperty
(
value
=
"证件号码"
,
index
=
4
)
String
useCode
;
@ExcelProperty
(
value
=
"管辖机构"
,
index
=
5
)
String
superviseOrgName
;
@ExcelProperty
(
value
=
"区域"
,
index
=
6
)
String
region
;
@ExcelProperty
(
value
=
"地址"
,
index
=
7
)
String
address
;
@ExcelProperty
(
value
=
"法人"
,
index
=
8
)
String
legalPerson
;
@ExcelProperty
(
value
=
"法人联系电话"
,
index
=
9
)
String
legalPhone
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/vo/UserInfoVo.java
0 → 100644
View file @
0c7c3e1b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
lombok.Data
;
/**
* 人员列表
*/
@Data
public
class
UserInfoVo
{
@ExcelProperty
(
value
=
"姓名"
,
index
=
0
)
String
name
;
@ExcelProperty
(
value
=
"证件编号"
,
index
=
1
)
String
certificateNum
;
@ExcelProperty
(
value
=
"所在单位"
,
index
=
2
)
String
unitName
;
@ExcelProperty
(
value
=
"联系电话"
,
index
=
3
)
String
phone
;
@ExcelProperty
(
value
=
"系统账号"
,
index
=
4
)
String
amosUserName
;
@ExcelProperty
(
value
=
"人员类型"
,
index
=
5
)
String
postName
;
@ExcelProperty
(
value
=
"是否绑定设备"
,
index
=
6
)
String
state
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
0c7c3e1b
...
...
@@ -176,4 +176,22 @@
select * from tzs_safety_problem_tracing where source_id = #{sourceId} order by rec_date desc limit 1
</select>
<select
id=
"queryBaseEnterpriseInIds"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.vo.BaseEnterpriseVo"
>
SELECT
*,
CONCAT(province,'/',city,'/',district) AS region,
CONCAT(street,'/',address) AS full_address
FROM
tz_base_enterprise_info
<where>
<if
test=
'ids != null'
>
and sequence_nbr in
<foreach
collection=
"ids"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
</where>
order by rec_date desc
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsUserInfoMapper.xml
View file @
0c7c3e1b
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper"
>
<s
elect
id=
"selectPageMessage"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto
"
>
<s
ql
id=
"page_list
"
>
SELECT
sequence_nbr,
name,
...
...
@@ -19,13 +19,16 @@
amos_user_id,
lock_status,
CASE
WHEN gender = 1 THEN
'男' ELSE '女'
END AS gender,
WHEN gender = 1 THEN
'男' ELSE '女'
END AS gender,
unit_code,
case when (SELECT count(1) from tzs_user_equip WHERE user_seq = sequence_nbr )>0 then '是' else '否' END as state
FROM
tzs_user_info
</sql>
<select
id=
"selectPageMessage"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto"
>
<include
refid=
"page_list"
/>
<where>
is_delete = false
and unit_code = #{dto.unitCode}
...
...
@@ -67,6 +70,19 @@
order by rec_date desc
</select>
<select
id=
"queryUserInfoInIds"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.vo.UserInfoVo"
>
<include
refid=
"page_list"
/>
<where>
<if
test=
'ids != null'
>
and sequence_nbr in
<foreach
collection=
"ids"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
</where>
order by rec_date desc
</select>
<select
id=
"getArrangementStatistic"
resultType=
"java.util.Map"
>
SELECT
(SELECT count(1) FROM "tzs_user_info" WHERE unit_code= #{companyCode} AND post like '%6548%') principal,
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzBaseEnterpriseInfoController.java
View file @
0c7c3e1b
...
...
@@ -26,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.http.MediaType
;
import
org.springframework.util.Assert
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
...
@@ -35,6 +36,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
/**
...
...
@@ -295,4 +297,12 @@ public class TzBaseEnterpriseInfoController extends BaseController {
public
ResponseModel
<
BaseUnitLicence
>
getUnitLicenceMessage
(
@RequestParam
(
"unitCode"
)
String
unitCode
)
{
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
getUnitLicenceMessage
(
unitCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业信息列表数据导出"
,
notes
=
"企业信息列表数据导出"
)
public
void
baseEnterpriseExport
(
HttpServletResponse
response
,
String
ids
)
{
Assert
.
hasText
(
ids
,
"未选择导出数据"
);
iTzBaseEnterpriseInfoService
.
export
(
response
,
Arrays
.
asList
(
ids
.
split
(
","
)));
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsUserInfoController.java
View file @
0c7c3e1b
...
...
@@ -24,6 +24,7 @@ import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.Assert
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
...
@@ -33,10 +34,8 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.ArrayList
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
@RestController
@Api
(
tags
=
"用户信息Api"
)
...
...
@@ -329,4 +328,12 @@ public class TzsUserInfoController extends BaseController {
List
<
DataDictionary
>
dataDictionaries
=
tzsUserInfoServiceImpl
.
userTypeUnderMenu
(
menuType
);
return
ResponseHelper
.
buildResponse
(
dataDictionaries
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/export"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"人员列表列表数据导出"
,
notes
=
"人员列表列表数据导出"
)
public
void
userInfoExport
(
HttpServletResponse
response
,
String
ids
)
{
Assert
.
hasText
(
ids
,
"未选择导出数据"
);
tzsUserInfoService
.
userInfoExport
(
response
,
Arrays
.
asList
(
ids
.
split
(
","
)));
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
0c7c3e1b
...
...
@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
...
@@ -28,6 +29,7 @@ import com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzBaseEnterpriseInfoMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzBaseEnterpriseInfoService
;
import
com.yeejoin.amos.boot.module.tcm.api.vo.BaseEnterpriseVo
;
import
com.yeejoin.amos.boot.module.tcm.biz.utils.RedisUtil
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitIcDto
;
import
com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitInfoDto
;
...
...
@@ -54,6 +56,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.function.Predicate
;
...
...
@@ -939,4 +942,17 @@ public class TzBaseEnterpriseInfoServiceImpl
}
/**
* 企业信息列表数据导出
*
* @param response 响应
* @param ids 数据id
*/
@Override
public
void
export
(
HttpServletResponse
response
,
List
<
String
>
ids
)
{
List
<
BaseEnterpriseVo
>
exportData
=
this
.
baseMapper
.
queryBaseEnterpriseInIds
(
ids
);
ExcelUtil
.
createTemplate
(
response
,
"企业信息列表数据"
,
"企业信息列表"
,
exportData
,
BaseEnterpriseVo
.
class
,
null
,
false
);
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
0c7c3e1b
...
...
@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.yeejoin.amos.boot.biz.common.bo.CompanyBo
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
...
...
@@ -25,6 +26,7 @@ import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserEquipMapper;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzsUserInfoService
;
import
com.yeejoin.amos.boot.module.tcm.api.vo.TzsUserInfoVo
;
import
com.yeejoin.amos.boot.module.tcm.api.vo.UserInfoVo
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.utils.FeignUtil
;
import
com.yeejoin.amos.component.robot.AmosRequestContext
;
...
...
@@ -45,6 +47,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -946,4 +949,18 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
return
iDataDictionaryService
.
getBaseMapper
().
selectBatchIds
(
act
);
}
/**
* 人员列表列表数据导出
*
* @param response 响应
* @param ids 数据id
*/
@Override
public
void
userInfoExport
(
HttpServletResponse
response
,
List
<
String
>
ids
)
{
List
<
UserInfoVo
>
exportData
=
tzsUserInfoMapper
.
queryUserInfoInIds
(
ids
);
ExcelUtil
.
createTemplate
(
response
,
"人员列表列表数据"
,
"人员列表列表"
,
exportData
,
UserInfoVo
.
class
,
null
,
false
);
}
}
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