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
16df87ff
Commit
16df87ff
authored
Dec 23, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.人员导入
parent
64ee542e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
424 additions
and
3 deletions
+424
-3
CertificateTypeConverter.java
...ot/module/tcm/api/converter/CertificateTypeConverter.java
+41
-0
EducationConverter.java
...mos/boot/module/tcm/api/converter/EducationConverter.java
+44
-0
EquipTypeConverter.java
...mos/boot/module/tcm/api/converter/EquipTypeConverter.java
+46
-0
GenderConverter.java
...n/amos/boot/module/tcm/api/converter/GenderConverter.java
+39
-0
PostTypeConverter.java
...amos/boot/module/tcm/api/converter/PostTypeConverter.java
+51
-0
CustomerEquipTypeCheck.java
.../boot/module/tcm/api/customer/CustomerEquipTypeCheck.java
+20
-0
CustomerEquipTypeValidator.java
...t/module/tcm/api/customer/CustomerEquipTypeValidator.java
+40
-0
UserImportDto.java
...m/yeejoin/amos/boot/module/tcm/api/dto/UserImportDto.java
+100
-0
TzBaseEnterpriseInfoMapper.java
...oot/module/tcm/api/mapper/TzBaseEnterpriseInfoMapper.java
+4
-0
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+9
-0
TzBaseEnterpriseInfoMapper.xml
.../src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
+3
-0
ValidationConfig.java
...oin/amos/boot/module/tcm/biz/config/ValidationConfig.java
+18
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+9
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+0
-0
RegUnitInfoServiceImpl.java
...dule/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
+0
-3
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/converter/CertificateTypeConverter.java
0 → 100644
View file @
16df87ff
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
CertificateTypeConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
CODE_MAP
=
new
HashMap
<>();
static
{
CODE_MAP
.
put
(
"身份证"
,
"344"
);
CODE_MAP
.
put
(
"军官证"
,
"345"
);
}
@Override
public
Class
supportJavaTypeKey
()
{
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
String
cellDataStr
=
cellData
.
getStringValue
();
return
CODE_MAP
.
getOrDefault
(
cellDataStr
,
"344"
);
}
@Override
public
CellData
convertToExcelData
(
String
value
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/converter/EducationConverter.java
0 → 100644
View file @
16df87ff
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
EducationConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
CODE_MAP
=
new
HashMap
<>();
static
{
CODE_MAP
.
put
(
"其他"
,
"6545"
);
CODE_MAP
.
put
(
"专科"
,
"6544"
);
CODE_MAP
.
put
(
"本科"
,
"6543"
);
CODE_MAP
.
put
(
"硕士研究生"
,
"6542"
);
CODE_MAP
.
put
(
"博士研究生"
,
"6541"
);
}
@Override
public
Class
supportJavaTypeKey
()
{
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
String
cellDataStr
=
cellData
.
getStringValue
();
return
CODE_MAP
.
get
(
cellDataStr
);
}
@Override
public
CellData
convertToExcelData
(
String
value
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/converter/EquipTypeConverter.java
0 → 100644
View file @
16df87ff
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
EquipTypeConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
CODE_MAP
=
new
HashMap
<>();
static
{
CODE_MAP
.
put
(
"锅炉"
,
"1000"
);
CODE_MAP
.
put
(
"压力容器"
,
"2000"
);
CODE_MAP
.
put
(
"电梯"
,
"3000"
);
CODE_MAP
.
put
(
"起重机械"
,
"4000"
);
CODE_MAP
.
put
(
"场(厂)内专用机动车辆"
,
"5000"
);
CODE_MAP
.
put
(
"大型游乐设施"
,
"6000"
);
CODE_MAP
.
put
(
"压力管道"
,
"8000"
);
CODE_MAP
.
put
(
"客运索道"
,
"9000"
);
}
@Override
public
Class
supportJavaTypeKey
()
{
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
String
cellDataStr
=
cellData
.
getStringValue
();
return
CODE_MAP
.
get
(
cellDataStr
);
}
@Override
public
CellData
convertToExcelData
(
String
value
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/converter/GenderConverter.java
0 → 100644
View file @
16df87ff
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
GenderConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
CODE_MAP
=
new
HashMap
<>();
static
{
CODE_MAP
.
put
(
"男"
,
"1"
);
CODE_MAP
.
put
(
"女"
,
"0"
);
}
@Override
public
Class
supportJavaTypeKey
()
{
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
{
return
CODE_MAP
.
get
(
cellData
.
getStringValue
());
}
@Override
public
CellData
convertToExcelData
(
String
value
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
{
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/converter/PostTypeConverter.java
0 → 100644
View file @
16df87ff
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
converter
;
import
com.alibaba.excel.converters.Converter
;
import
com.alibaba.excel.enums.CellDataTypeEnum
;
import
com.alibaba.excel.metadata.CellData
;
import
com.alibaba.excel.metadata.GlobalConfiguration
;
import
com.alibaba.excel.metadata.property.ExcelContentProperty
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
PostTypeConverter
implements
Converter
<
String
>
{
private
static
final
Map
<
String
,
String
>
CODE_MAP
=
new
HashMap
<>();
static
{
CODE_MAP
.
put
(
"安全员"
,
"6549"
);
CODE_MAP
.
put
(
"主要负责人"
,
"6548"
);
CODE_MAP
.
put
(
"安全总监"
,
"6547"
);
CODE_MAP
.
put
(
"普通员工"
,
"6546"
);
CODE_MAP
.
put
(
"作业人员"
,
"6552"
);
CODE_MAP
.
put
(
"质量安全员"
,
"6551"
);
CODE_MAP
.
put
(
"质量安全总监"
,
"6550"
);
CODE_MAP
.
put
(
"业务办理人员"
,
"6616"
);
CODE_MAP
.
put
(
"安改维负责人"
,
"6553"
);
CODE_MAP
.
put
(
"安全管理员"
,
"6617"
);
CODE_MAP
.
put
(
"维保人员"
,
"6618"
);
CODE_MAP
.
put
(
"检验人员"
,
"66151"
);
CODE_MAP
.
put
(
"检测人员"
,
"66152"
);
CODE_MAP
.
put
(
"质量保证体系人员"
,
"6619"
);
}
@Override
public
Class
supportJavaTypeKey
()
{
return
String
.
class
;
}
@Override
public
CellDataTypeEnum
supportExcelTypeKey
()
{
return
CellDataTypeEnum
.
STRING
;
}
@Override
public
String
convertToJavaData
(
CellData
cellData
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
String
cellDataStr
=
cellData
.
getStringValue
();
return
CODE_MAP
.
getOrDefault
(
cellDataStr
,
"6546"
);
}
@Override
public
CellData
convertToExcelData
(
String
value
,
ExcelContentProperty
contentProperty
,
GlobalConfiguration
globalConfiguration
)
throws
Exception
{
return
null
;
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/customer/CustomerEquipTypeCheck.java
0 → 100644
View file @
16df87ff
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
customer
;
import
javax.validation.Constraint
;
import
javax.validation.Payload
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Target
({
ElementType
.
FIELD
,
ElementType
.
ANNOTATION_TYPE
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Constraint
(
validatedBy
=
CustomerEquipTypeValidator
.
class
)
public
@interface
CustomerEquipTypeCheck
{
String
message
();
Class
<?>[]
groups
()
default
{};
Class
<?
extends
Payload
>[]
payload
()
default
{};
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/customer/CustomerEquipTypeValidator.java
0 → 100644
View file @
16df87ff
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
customer
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.UserImportDto
;
import
org.apache.commons.lang3.StringUtils
;
import
javax.validation.ConstraintValidator
;
import
javax.validation.ConstraintValidatorContext
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
CustomerEquipTypeValidator
implements
ConstraintValidator
<
CustomerEquipTypeCheck
,
UserImportDto
>
{
/**
* 需要填写设备类型的单位类型(字符串汉字数据库如此)及人员类型
*/
private
static
final
Map
<
String
,
List
<
String
>>
NEED_EQUIP_TYPE_UNIT_TYPE
=
new
HashMap
<>();
static
{
// ("安全总监", "6547");
// ("安全员", "6549");
// ("质量安全总监", "6550");
// ("质量安全员", "6551");
NEED_EQUIP_TYPE_UNIT_TYPE
.
put
(
"使用单位"
,
Arrays
.
asList
(
"6547"
,
"6549"
));
NEED_EQUIP_TYPE_UNIT_TYPE
.
put
(
"安装改造维修单位"
,
Arrays
.
asList
(
"6550"
,
"6551"
));
}
@Override
public
boolean
isValid
(
UserImportDto
userImportDto
,
ConstraintValidatorContext
context
)
{
if
(
NEED_EQUIP_TYPE_UNIT_TYPE
.
containsKey
(
userImportDto
.
getUnitType
()))
{
List
<
String
>
postTypes
=
NEED_EQUIP_TYPE_UNIT_TYPE
.
get
(
userImportDto
.
getUnitType
());
// 单位类型是指定的且设备类型未空时校验不通过
return
!
postTypes
.
contains
(
userImportDto
.
getPost
())
||
!
StringUtils
.
isEmpty
(
userImportDto
.
getEquipType
());
}
else
{
return
true
;
}
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/dto/UserImportDto.java
0 → 100644
View file @
16df87ff
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
dto
;
import
cn.afterturn.easypoi.excel.annotation.ExcelIgnore
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.format.DateTimeFormat
;
import
com.yeejoin.amos.boot.module.tcm.api.converter.*
;
import
com.yeejoin.amos.boot.module.tcm.api.customer.CustomerEquipTypeCheck
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
java.util.Date
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Set
;
@Data
public
class
UserImportDto
{
@NotBlank
(
message
=
"单位名称不能为空"
)
@ExcelProperty
(
value
=
"单位名称"
)
private
String
unitName
;
@NotBlank
(
message
=
"单位统一信用代码不能为空"
)
@ExcelProperty
(
value
=
"单位统一信用代码"
)
private
String
unitCode
;
@NotBlank
(
message
=
"单位类型不能为空"
)
@ExcelProperty
(
value
=
"单位类型"
)
private
String
unitType
;
@NotBlank
(
message
=
"姓名不能为空"
)
@ExcelProperty
(
value
=
"姓名"
)
private
String
name
;
@NotBlank
(
message
=
"联系电话不能为空"
)
@ExcelProperty
(
value
=
"联系电话"
)
private
String
phone
;
@NotBlank
(
message
=
"证件类型不能为空"
)
@ExcelProperty
(
value
=
"证件类型"
,
converter
=
CertificateTypeConverter
.
class
)
private
String
certificateType
;
@NotBlank
(
message
=
"证件编号不能为空"
)
@ExcelProperty
(
value
=
"证件编号"
)
private
String
certificateNum
;
@NotBlank
(
message
=
"人员类型不能为空"
)
@ExcelProperty
(
value
=
"人员类型"
,
converter
=
PostTypeConverter
.
class
)
private
String
post
;
@CustomerEquipTypeCheck
(
message
=
"设备类型不能为空"
)
@ExcelProperty
(
value
=
"设备类型"
,
converter
=
EquipTypeConverter
.
class
)
private
String
equipType
;
@ExcelProperty
(
value
=
"性别"
,
converter
=
GenderConverter
.
class
)
private
String
gender
;
@ExcelProperty
(
value
=
"出生日期"
)
@DateTimeFormat
(
"yyyy-MM-dd"
)
private
Date
birthday
;
@ExcelProperty
(
value
=
"学历"
,
converter
=
EducationConverter
.
class
)
private
String
education
;
@ExcelProperty
(
value
=
"住址"
)
private
String
address
;
@ExcelProperty
(
value
=
"邮箱"
)
private
String
email
;
@ExcelProperty
(
value
=
"职称"
)
private
String
jobTitle
;
@ExcelProperty
(
value
=
"专业"
)
private
String
speciality
;
/**
* 存放单位类型:List人员类型的对象
*/
@ExcelIgnore
private
Map
<
String
,
Set
<
String
>>
unitTypePostMap
;
@ExcelProperty
private
Long
seq
;
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
UserImportDto
that
=
(
UserImportDto
)
o
;
return
Objects
.
equals
(
phone
,
that
.
phone
);
}
@Override
public
int
hashCode
()
{
return
Objects
.
hash
(
phone
);
}
}
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 @
16df87ff
...
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -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.EquEnterDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto
;
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.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -43,6 +44,9 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
...
@@ -43,6 +44,9 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
TzBaseEnterpriseInfo
selectByUseUnit
(
String
useUnit
);
TzBaseEnterpriseInfo
selectByUseUnit
(
String
useUnit
);
CompanyModel
getOneByCompanyCode
(
String
companyCode
);
IPage
<
TzBaseEnterpriseInfoDto
>
page
(
Page
<
TzBaseEnterpriseInfoDto
>
page
,
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
);
IPage
<
TzBaseEnterpriseInfoDto
>
page
(
Page
<
TzBaseEnterpriseInfoDto
>
page
,
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
);
IPage
<
TzBaseEnterpriseInfoDto
>
pageList
(
Page
<
TzBaseEnterpriseInfoDto
>
page
,
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
,
List
orgCodeList
);
IPage
<
TzBaseEnterpriseInfoDto
>
pageList
(
Page
<
TzBaseEnterpriseInfoDto
>
page
,
TzBaseEnterpriseInfoDto
tzBaseEnterpriseInfoDto
,
List
orgCodeList
);
...
...
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 @
16df87ff
...
@@ -9,6 +9,8 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto;
...
@@ -9,6 +9,8 @@ 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.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserQualifications
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserQualifications
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.List
;
...
@@ -62,4 +64,11 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
...
@@ -62,4 +64,11 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
TzIndividualityDto
updateIndividualityInfo
(
TzIndividualityDto
individualityDto
);
TzIndividualityDto
updateIndividualityInfo
(
TzIndividualityDto
individualityDto
);
void
userInfoExport
(
HttpServletResponse
response
,
List
<
String
>
ids
);
void
userInfoExport
(
HttpServletResponse
response
,
List
<
String
>
ids
);
/**
* 批量导入人员
* @param file 导入的文件
* @return 失败时返回失败信息,提供时返回success
*/
ResponseModel
<?>
importUserBatch
(
MultipartFile
file
);
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzBaseEnterpriseInfoMapper.xml
View file @
16df87ff
...
@@ -175,5 +175,8 @@
...
@@ -175,5 +175,8 @@
<select
id=
"getProblemInfoBySourceId"
resultType=
"java.util.Map"
>
<select
id=
"getProblemInfoBySourceId"
resultType=
"java.util.Map"
>
select * from tzs_safety_problem_tracing where source_id = #{sourceId} order by rec_date desc limit 1
select * from tzs_safety_problem_tracing where source_id = #{sourceId} order by rec_date desc limit 1
</select>
</select>
<select
id=
"getOneByCompanyCode"
resultType=
"com.yeejoin.amos.feign.privilege.model.CompanyModel"
>
select sequence_nbr, org_code, company_code, company_name, company_type from privilege_company where company_code = #{companyCode} and is_deleted = false limit 1
</select>
</mapper>
</mapper>
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/config/ValidationConfig.java
0 → 100644
View file @
16df87ff
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
javax.validation.Validation
;
import
javax.validation.Validator
;
import
javax.validation.ValidatorFactory
;
@Configuration
public
class
ValidationConfig
{
@Bean
public
Validator
validator
()
{
ValidatorFactory
validatorFactory
=
Validation
.
buildDefaultValidatorFactory
();
return
validatorFactory
.
getValidator
();
}
}
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 @
16df87ff
...
@@ -29,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -29,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.util.Assert
;
import
org.springframework.util.Assert
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
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
;
...
@@ -36,6 +37,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...
@@ -36,6 +37,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.*
;
import
java.util.*
;
...
@@ -351,4 +353,11 @@ public class TzsUserInfoController extends BaseController {
...
@@ -351,4 +353,11 @@ public class TzsUserInfoController extends BaseController {
List
<
JGUserInfoVo
>
exportData
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
userPermissionDtos
.
getRecords
()),
JGUserInfoVo
.
class
);
List
<
JGUserInfoVo
>
exportData
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
userPermissionDtos
.
getRecords
()),
JGUserInfoVo
.
class
);
ExcelUtil
.
createTemplate
(
response
,
"人员列表数据"
,
"人员列表"
,
exportData
,
JGUserInfoVo
.
class
,
null
,
false
);
ExcelUtil
.
createTemplate
(
response
,
"人员列表数据"
,
"人员列表"
,
exportData
,
JGUserInfoVo
.
class
,
null
,
false
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/import"
)
@ApiOperation
(
value
=
"人员导入"
,
httpMethod
=
"POST"
)
public
ResponseModel
<?>
importUser
(
@RequestBody
MultipartFile
file
)
{
return
tzsUserInfoService
.
importUserBatch
(
file
);
}
}
}
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 @
16df87ff
This diff is collapsed.
Click to expand it.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/flc/biz/service/impl/RegUnitInfoServiceImpl.java
View file @
16df87ff
...
@@ -141,9 +141,6 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
...
@@ -141,9 +141,6 @@ public class RegUnitInfoServiceImpl extends BaseService<RegUnitInfoDto, RegUnitI
@Autowired
@Autowired
TzsBaseInstitutionMapper
tzsBaseInstitutionMapper
;
TzsBaseInstitutionMapper
tzsBaseInstitutionMapper
;
@Autowired
TzsUserInfoServiceImpl
tzsUserInfoService
;
private
final
Logger
logger
=
LogManager
.
getLogger
(
RegUnitInfoServiceImpl
.
class
);
private
final
Logger
logger
=
LogManager
.
getLogger
(
RegUnitInfoServiceImpl
.
class
);
/**
/**
...
...
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