Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
93638134
Commit
93638134
authored
Dec 09, 2024
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-户配置调整
parent
8396f62f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
2289 additions
and
35 deletions
+2289
-35
TAttaInfo.java
...om/yifu/cloud/plus/v1/yifu/archives/entity/TAttaInfo.java
+2
-2
TCompleteMonitor.java
.../cloud/plus/v1/yifu/archives/entity/TCompleteMonitor.java
+1
-0
TCompleteMonitorSearchVo.java
...ud/plus/v1/yifu/archives/vo/TCompleteMonitorSearchVo.java
+7
-0
TRiskMonitorSearchVo.java
.../cloud/plus/v1/yifu/archives/vo/TRiskMonitorSearchVo.java
+9
-0
TCompleteMonitorController.java
.../yifu/archives/controller/TCompleteMonitorController.java
+4
-4
TCompleteMonitorMapper.java
.../plus/v1/yifu/archives/mapper/TCompleteMonitorMapper.java
+1
-1
TCompleteMonitorService.java
...lus/v1/yifu/archives/service/TCompleteMonitorService.java
+1
-1
TCompleteMonitorServiceImpl.java
...fu/archives/service/impl/TCompleteMonitorServiceImpl.java
+19
-19
TCompleteMonitorMapper.xml
...-biz/src/main/resources/mapper/TCompleteMonitorMapper.xml
+7
-0
TRiskMonitorMapper.xml
...ives-biz/src/main/resources/mapper/TRiskMonitorMapper.xml
+6
-0
UpmsDaprUtils.java
...fu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
+15
-0
SysConfigLimit.java
...yifu/cloud/plus/v1/yifu/social/entity/SysConfigLimit.java
+75
-0
SysHouseHoldInfo.java
...fu/cloud/plus/v1/yifu/social/entity/SysHouseHoldInfo.java
+66
-0
TAttaInfo.java
.../com/yifu/cloud/plus/v1/yifu/social/entity/TAttaInfo.java
+94
-0
TSocialHouseholdInsertVo.java
...loud/plus/v1/yifu/social/vo/TSocialHouseholdInsertVo.java
+204
-0
TSocialHouseholdUpdateVo.java
...loud/plus/v1/yifu/social/vo/TSocialHouseholdUpdateVo.java
+185
-0
FileUploadController.java
.../plus/v1/yifu/social/controller/FileUploadController.java
+164
-0
SysHouseHoldInfoController.java
...v1/yifu/social/controller/SysHouseHoldInfoController.java
+48
-1
SysConfigLimitMapper.java
...loud/plus/v1/yifu/social/mapper/SysConfigLimitMapper.java
+40
-0
SysHouseHoldInfoMapper.java
...ud/plus/v1/yifu/social/mapper/SysHouseHoldInfoMapper.java
+17
-0
TAttaInfoMapper.java
...ifu/cloud/plus/v1/yifu/social/mapper/TAttaInfoMapper.java
+54
-0
FileUploadService.java
.../cloud/plus/v1/yifu/social/service/FileUploadService.java
+24
-0
SysHouseHoldInfoService.java
.../plus/v1/yifu/social/service/SysHouseHoldInfoService.java
+18
-0
TAttaInfoService.java
...u/cloud/plus/v1/yifu/social/service/TAttaInfoService.java
+86
-0
FileUploadServiceImpl.java
...us/v1/yifu/social/service/impl/FileUploadServiceImpl.java
+259
-0
SysHouseHoldInfoServiceImpl.java
...yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
+466
-4
TAttaInfoServiceImpl.java
...lus/v1/yifu/social/service/impl/TAttaInfoServiceImpl.java
+157
-0
SysConfigLimitMapper.xml
...al-biz/src/main/resources/mapper/SysConfigLimitMapper.xml
+38
-0
SysHouseHoldInfoMapper.xml
...-biz/src/main/resources/mapper/SysHouseHoldInfoMapper.xml
+57
-3
TAttaInfoMapper.xml
...-social-biz/src/main/resources/mapper/TAttaInfoMapper.xml
+138
-0
AllUserNaVo.java
...com/yifu.cloud.plus.v1/yifu/admin/api/vo/AllUserNaVo.java
+3
-0
UserController.java
...u/cloud/plus/v1/yifu/admin/controller/UserController.java
+24
-0
No files found.
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TAttaInfo.java
View file @
93638134
...
...
@@ -59,11 +59,11 @@ public class TAttaInfo extends BaseEntity {
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件
* 25 户口本本人页26学信27预入职其他附件
28户配置
*/
@NotBlank
(
message
=
"关系类型不能为空"
)
@Length
(
max
=
2
,
message
=
"关系类型不能超过2个字符"
)
@Schema
(
description
=
"关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信)"
)
@Schema
(
description
=
"关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信
28户配置
)"
)
private
String
relationType
;
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/entity/TCompleteMonitor.java
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
...
...
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TCompleteMonitorSearchVo.java
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TCompleteMonitor
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -42,4 +43,10 @@ public class TCompleteMonitorSearchVo extends TCompleteMonitor {
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
@Schema
(
description
=
"在项人数区间开始"
)
private
Integer
inusePersonNumStart
;
@Schema
(
description
=
"在项人数区间结束"
)
private
Integer
inusePersonNumEnd
;
}
yifu-archives/yifu-archives-api/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/vo/TRiskMonitorSearchVo.java
View file @
93638134
...
...
@@ -16,6 +16,7 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
archives
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.TRiskMonitor
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
...
...
@@ -49,4 +50,12 @@ public class TRiskMonitorSearchVo extends TRiskMonitor {
@Schema
(
description
=
"查询limit 数据条数"
)
private
int
limitEnd
;
@Schema
(
description
=
"在项人数区间开始"
)
@TableField
(
exist
=
false
)
private
Integer
projectNumStart
;
@Schema
(
description
=
"在项人数区间结束"
)
@TableField
(
exist
=
false
)
private
Integer
projectNumEnd
;
}
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TCompleteMonitorController.java
View file @
93638134
...
...
@@ -57,15 +57,15 @@ public class TCompleteMonitorController {
/**
* 简单分页查询
* @param page 分页对象
* @param
tCompleteMonitor
档案完整度监控
* @param
searchVo
档案完整度监控
* @return
*/
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TCompleteMonitor
>>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
TCompleteMonitor
tCompleteMonitor
)
{
public
R
<
IPage
<
TCompleteMonitor
>>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
TCompleteMonitor
SearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
tCompleteMonitor
);
return
new
R
<>(
tCompleteMonitorService
.
getTCompleteMonitorPage
(
page
,
tCompleteMonitor
));
menuUtil
.
setAuthSql
(
user
,
searchVo
);
return
new
R
<>(
tCompleteMonitorService
.
getTCompleteMonitorPage
(
page
,
searchVo
));
}
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/mapper/TCompleteMonitorMapper.java
View file @
93638134
...
...
@@ -40,7 +40,7 @@ public interface TCompleteMonitorMapper extends BaseMapper<TCompleteMonitor> {
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage
<
TCompleteMonitor
>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
@Param
(
"tCompleteMonitor"
)
TCompleteMonitor
tCompleteMonitor
);
IPage
<
TCompleteMonitor
>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
@Param
(
"tCompleteMonitor"
)
TCompleteMonitor
SearchVo
tCompleteMonitor
);
/**
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/TCompleteMonitorService.java
View file @
93638134
...
...
@@ -24,7 +24,7 @@ public interface TCompleteMonitorService extends IService<TCompleteMonitor> {
* @param tCompleteMonitor 档案完整度监控
* @return
*/
IPage
<
TCompleteMonitor
>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
TCompleteMonitor
tCompleteMonitor
);
IPage
<
TCompleteMonitor
>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
TCompleteMonitor
SearchVo
tCompleteMonitor
);
/**
* @Description: 详情
...
...
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TCompleteMonitorServiceImpl.java
View file @
93638134
...
...
@@ -88,7 +88,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
* @return
*/
@Override
public
IPage
<
TCompleteMonitor
>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
TCompleteMonitor
tCompleteMonitor
){
public
IPage
<
TCompleteMonitor
>
getTCompleteMonitorPage
(
Page
<
TCompleteMonitor
>
page
,
TCompleteMonitor
SearchVo
tCompleteMonitor
){
return
baseMapper
.
getTCompleteMonitorPage
(
page
,
tCompleteMonitor
);
}
...
...
@@ -465,8 +465,8 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
ExcelWriterSheetBuilder
writeSheet
;
List
<
TMainExportAllVO
>
listWork
;
Map
<
String
,
TMainExportAllVO
>
mapWork
;
List
<
TMainExportAllVO
>
listContract
;
Map
<
String
,
TMainExportAllVO
>
mapContract
;
//
List<TMainExportAllVO> listContract;
//
Map<String, TMainExportAllVO> mapContract;
List
<
TMainExportAllVO
>
listEducation
;
Map
<
String
,
TMainExportAllVO
>
mapEducation
;
List
<
TMainExportAllVO
>
listBad
;
...
...
@@ -492,25 +492,25 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
for
(
TMainExportAllVO
vo
:
list
)
{
empIdList
.
add
(
vo
.
getMainId
());
}
listContract
=
baseMapper
.
getTEmpMainAllListByContract
(
empIdList
);
//
listContract = baseMapper.getTEmpMainAllListByContract(empIdList);
listEducation
=
baseMapper
.
getTEmpMainAllListByEducation
(
empIdList
);
listBad
=
baseMapper
.
getTEmpMainAllListByBad
(
empIdList
);
listDisability
=
baseMapper
.
getTEmpMainAllListByDisability
(
empIdList
);
listWork
=
baseMapper
.
getTEmpMainAllListByWork
(
empIdList
);
listFamily
=
baseMapper
.
getTEmpMainAllListByFamily
(
empIdList
);
listProfessional
=
baseMapper
.
getTEmpMainAllListByProfessional
(
empIdList
);
mapContract
=
new
HashMap
<>();
//
mapContract = new HashMap<>();
mapEducation
=
new
HashMap
<>();
mapBad
=
new
HashMap
<>();
mapDisability
=
new
HashMap
<>();
mapWork
=
new
HashMap
<>();
mapFamily
=
new
HashMap
<>();
mapProfessional
=
new
HashMap
<>();
if
(
listContract
!=
null
&&
!
listContract
.
isEmpty
())
{
for
(
TMainExportAllVO
vo
:
listContract
)
{
mapContract
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
}
}
//
if (listContract != null && !listContract.isEmpty()) {
//
for (TMainExportAllVO vo : listContract) {
//
mapContract.putIfAbsent(vo.getMainId(), vo);
//
}
//
}
if
(
listEducation
!=
null
&&
!
listEducation
.
isEmpty
())
{
for
(
TMainExportAllVO
vo
:
listEducation
)
{
mapEducation
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
...
...
@@ -518,7 +518,7 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
}
if
(
listBad
!=
null
&&
!
listBad
.
isEmpty
())
{
for
(
TMainExportAllVO
vo
:
listBad
)
{
map
Education
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
map
Bad
.
putIfAbsent
(
vo
.
getMainId
(),
vo
);
}
}
if
(
listDisability
!=
null
&&
!
listDisability
.
isEmpty
())
{
...
...
@@ -542,14 +542,14 @@ public class TCompleteMonitorServiceImpl extends ServiceImpl<TCompleteMonitorMap
}
}
for
(
TMainExportAllVO
vo
:
list
)
{
temp
=
mapContract
.
get
(
vo
.
getMainId
());
if
(
temp
!=
null
)
{
vo
.
setField26
(
temp
.
getField26
());
vo
.
setField27
(
temp
.
getField27
());
vo
.
setField28
(
temp
.
getField28
());
vo
.
setField29
(
temp
.
getField29
());
vo
.
setField30
(
temp
.
getField30
());
}
//
temp = mapContract.get(vo.getMainId());
//
if (temp != null) {
//
vo.setField26(temp.getField26());
//
vo.setField27(temp.getField27());
//
vo.setField28(temp.getField28());
//
vo.setField29(temp.getField29());
//
vo.setField30(temp.getField30());
//
}
temp
=
mapEducation
.
get
(
vo
.
getMainId
());
if
(
temp
!=
null
)
{
vo
.
setField36
(
temp
.
getField36
());
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TCompleteMonitorMapper.xml
View file @
93638134
...
...
@@ -85,6 +85,12 @@
<if
test=
"tCompleteMonitor.afterIsComplete != null and tCompleteMonitor.afterIsComplete.trim() != ''"
>
AND a.AFTER_IS_COMPLETE = #{tCompleteMonitor.afterIsComplete}
</if>
<if
test=
"tCompleteMonitor.inusePersonNumStart != null"
>
AND a.INUSE_PERSON_NUM
<![CDATA[ >= ]]>
#{tCompleteMonitor.inusePersonNumStart}
</if>
<if
test=
"tCompleteMonitor.inusePersonNumEnd != null"
>
AND a.INUSE_PERSON_NUM
<![CDATA[ <= ]]>
#{tCompleteMonitor.inusePersonNumEnd}
</if>
<if
test=
"tCompleteMonitor.authSql != null and tCompleteMonitor.authSql.trim() != ''"
>
${tCompleteMonitor.authSql}
</if>
...
...
@@ -348,6 +354,7 @@
,e.FILE_PROVINCE field20,e.FILE_CITY field71,e.FILE_TOWN field72,if(e.status=0,'草稿','已审核') field21
,e.CONTACT_ADDRESS field22,p.UNIT_NAME field23,p.DEPT_NAME field24,p.DEPT_NO field64
,concat(p.BUSINESS_PRIMARY_TYPE,'-',ifnull(p.BUSINESS_SECOND_TYPE,''),'-',ifnull(p.BUSINESS_THIRD_TYPE,'')) field25
,p.CONTRACT_TYPE field26,p.WORKING_HOURS field27,p.POST field28,p.ENJOIN_DATE field29,p.TRY_PERIOD field30
,p.EMP_LABEL field31
,ec.EMP_NAME field32,ec.RELATION_TYPE field33,ec.ADDRESS field34,ec.TEL field35
,if(e.IS_COLLEGE=0,'否','是') field39
...
...
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TRiskMonitorMapper.xml
View file @
93638134
...
...
@@ -157,6 +157,12 @@
<if
test=
"tRiskMonitor.riskType != null and tRiskMonitor.riskType.trim() != ''"
>
AND a.RISK_TYPE regexp #{tRiskMonitor.riskType}
</if>
<if
test=
"tRiskMonitor.projectNumStart != null"
>
AND a.PROJECT_NUM
<![CDATA[ >= ]]>
#{tRiskMonitor.projectNumStart}
</if>
<if
test=
"tRiskMonitor.projectNumEnd != null"
>
AND a.PROJECT_NUM
<![CDATA[ <= ]]>
#{tRiskMonitor.projectNumEnd}
</if>
<if
test=
"tRiskMonitor.authSql != null and tRiskMonitor.authSql.trim() != ''"
>
${tRiskMonitor.authSql}
</if>
...
...
yifu-common/yifu-common-dapr/src/main/java/com/yifu/cloud/plus/v1/yifu/common/dapr/util/UpmsDaprUtils.java
View file @
93638134
...
...
@@ -68,6 +68,21 @@ public class UpmsDaprUtils {
return
allUserVoR
;
}
/**
* @Author fxj
* @Description 获取所有用户数据
* @Date 17:57 2022/8/16
* @Param
* @return
**/
public
R
<
AllUserNaVo
>
getAllUserIds
()
{
R
<
AllUserNaVo
>
allUserVoR
=
HttpDaprUtil
.
invokeMethodPost
(
daprUpmsProperties
.
getAppUrl
(),
daprUpmsProperties
.
getAppId
(),
"/user/inner/getAllUserIdDTO"
,
""
,
AllUserNaVo
.
class
,
SecurityConstants
.
FROM_IN
);
if
(
Common
.
isEmpty
(
allUserVoR
)){
return
R
.
failed
(
"获取所有用户数据失败!"
);
}
return
allUserVoR
;
}
/**
* @Author fxj
* @Description 获取指定用户名对应用户IDs
...
...
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/SysConfigLimit.java
0 → 100644
View file @
93638134
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* 系统限制配置表
*
* @author hgw
* @date 2024-09-24 17:39:57
*/
@Data
@TableName
(
"sys_config_limit"
)
@Schema
(
description
=
"系统限制配置表"
)
public
class
SysConfigLimit
{
/**
* id
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@ExcelProperty
(
"id"
)
@Schema
(
description
=
"id"
)
private
String
id
;
/**
* 限制键
*/
@ExcelAttribute
(
name
=
"限制键"
,
isNotEmpty
=
true
,
errorInfo
=
"限制键不能为空"
,
maxLength
=
32
)
@NotBlank
(
message
=
"限制键不能为空"
)
@Length
(
max
=
32
,
message
=
"限制键不能超过32个字符"
)
@ExcelProperty
(
"限制键"
)
@Schema
(
description
=
"限制键"
)
private
String
configKey
;
/**
* 限制值
*/
@ExcelAttribute
(
name
=
"限制值"
,
isNotEmpty
=
true
,
errorInfo
=
"限制值不能为空"
)
@NotBlank
(
message
=
"限制值不能为空"
)
@ExcelProperty
(
"限制值"
)
@Schema
(
description
=
"限制值"
)
private
Integer
configValue
;
/**
* 备注
*/
@ExcelAttribute
(
name
=
"备注"
,
maxLength
=
255
)
@Length
(
max
=
255
,
message
=
"备注不能超过255个字符"
)
@ExcelProperty
(
"备注"
)
@Schema
(
description
=
"备注"
)
private
String
remark
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/SysHouseHoldInfo.java
View file @
93638134
...
...
@@ -203,6 +203,60 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty
(
"公积金承办银行"
)
private
String
fundBank
;
/**
* 手机号
*/
@ExcelAttribute
(
name
=
"手机号"
,
maxLength
=
50
)
@Schema
(
description
=
"手机号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"手机号"
)
private
String
phone
;
/**
* 社保-登录账户
*/
@ExcelAttribute
(
name
=
"社保-登录账户"
)
@Schema
(
description
=
"社保-登录账户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保-登录账户"
)
private
String
socialAccount
;
/**
* 社保-登录密码
*/
@ExcelAttribute
(
name
=
"社保-登录密码"
)
@Schema
(
description
=
"社保-登录密码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保-登录密码"
)
private
String
socialPassword
;
/**
* 医保-登录账户
*/
@ExcelAttribute
(
name
=
"医保-登录账户"
)
@Schema
(
description
=
"医保-登录账户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医保-登录账户"
)
private
String
mediclAccount
;
/**
* 医保-登录密码
*/
@ExcelAttribute
(
name
=
"医保-登录密码"
)
@Schema
(
description
=
"医保-登录密码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医保-登录密码"
)
private
String
mediclPassword
;
/**
* 是否配置公章
*/
@ExcelAttribute
(
name
=
"是否配置公章"
)
@Schema
(
description
=
"是否配置公章"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否配置公章"
)
private
String
isSign
;
/**
* 自动化配置状态 0 启用 1 禁用
*/
...
...
@@ -221,4 +275,16 @@ public class SysHouseHoldInfo extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
handleUserDeptName
;
/**
* 附件Id
*/
@TableField
(
exist
=
false
)
private
String
attaId
;
/**
* 印章附件
*/
@TableField
(
exist
=
false
)
private
TAttaInfo
atta
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/entity/TAttaInfo.java
0 → 100644
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
org.hibernate.validator.constraints.Length
;
import
javax.validation.constraints.NotBlank
;
/**
* @Author fxj
* @Description 附件信息表
* @Date 11:07 2022/6/22
**/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_atta_info"
)
@Tag
(
name
=
"附件信息表"
)
public
class
TAttaInfo
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 资源名称
*/
@NotBlank
(
message
=
"资源名称不能为空"
)
@Length
(
max
=
50
,
message
=
"资源名称不能超过50个字符"
)
@Schema
(
description
=
"资源名称"
)
private
String
attaName
;
/**
* 资源地址
*/
@NotBlank
(
message
=
"资源地址不能为空"
)
@Length
(
max
=
100
,
message
=
"资源地址不能超过100个字符"
)
@Schema
(
description
=
"资源地址"
)
private
String
attaSrc
;
/**
* 资源大小
*/
@Schema
(
description
=
"资源大小"
)
private
Long
attaSize
;
/**
* 资源类型
*/
@Length
(
max
=
10
,
message
=
"资源类型不能超过10个字符"
)
@Schema
(
description
=
"资源类型"
)
private
String
attaType
;
/**
* 关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本
* ;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽
* 25 户口本本人页26学信27预入职其他附件28户配置
*/
@NotBlank
(
message
=
"关系类型不能为空"
)
@Length
(
max
=
2
,
message
=
"关系类型不能超过2个字符"
)
@Schema
(
description
=
"关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招投标7业务评估8二维码9身份证 10 户口本;21(预入职申明签名);22(预入职确认签名);23(预入职pdf文件);0(最高教育经历);2(执业资格证书);24 身份证国徽 25 户口本本人页26学信28户配置)"
)
private
String
relationType
;
/**
* 实体id和关系类型共同确定附件所属(9、10、21、22、23、24、25存项目档案id,0、2、26存附属表id)
*/
@NotBlank
(
message
=
"实体id和关系类型共同确定附件所属不能为空"
)
@Length
(
max
=
32
,
message
=
"实体id和关系类型共同确定附件所属不能超过32个字符"
)
@Schema
(
description
=
"实体id和关系类型共同确定附件所属"
)
private
String
domainId
;
/**
* 地址URL
*/
@Length
(
max
=
100
,
message
=
"地址URL不能超过100个字符"
)
@Schema
(
description
=
"地址URL"
)
@TableField
(
exist
=
false
)
private
String
attaUrl
;
/**
* 附件变更类型:0 新增 1 更新 2 删除 3 不变 档案编辑附件时需要告知后端是增加还是减少
*/
@TableField
(
exist
=
false
)
private
String
handleType
;
/**
* 其他分租名称
*/
@TableField
(
exist
=
false
)
private
String
groupName
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TSocialHouseholdInsertVo.java
0 → 100644
View file @
93638134
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
java.io.Serializable
;
/**
* 社保户批量新增
*
* @author huych
* @date 2024-12-5 11:38:05
*/
@Data
public
class
TSocialHouseholdInsertVo
extends
RowIndex
implements
Serializable
{
/**
* 账户性质
*/
@ExcelAttribute
(
name
=
"账户性质"
)
@Schema
(
description
=
"账户性质"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"账户性质"
)
private
String
type
;
/**
* 员工姓名
*/
@Length
(
max
=
50
,
message
=
"户名不能超过50个字符"
)
@ExcelAttribute
(
name
=
"户名"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"户名"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"户名"
)
private
String
name
;
/**
* 缴纳地所在省
*/
@Length
(
max
=
50
,
message
=
"缴纳地所在省不能超过32个字符"
)
@ExcelAttribute
(
name
=
"缴纳地所在省"
,
maxLength
=
50
,
isNotEmpty
=
true
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
""
)
@Schema
(
description
=
"缴纳地所在省"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"缴纳地所在省"
)
private
Integer
province
;
/**
* 缴纳地所在市
*/
@Length
(
max
=
50
,
message
=
"缴纳地所在市不能超过50个字符"
)
@ExcelAttribute
(
name
=
"缴纳地所在市"
,
maxLength
=
50
,
isNotEmpty
=
true
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
"province"
)
@Schema
(
description
=
"缴纳地所在市"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"缴纳地所在市"
)
private
Integer
city
;
/**
* 缴纳地所在县
*/
@Length
(
max
=
50
,
message
=
"缴纳地所在县不能超过50个字符"
)
@ExcelAttribute
(
name
=
"缴纳地所在县"
,
maxLength
=
50
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
"city"
)
@Schema
(
description
=
"缴纳地所在县"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"缴纳地所在县"
)
private
Integer
town
;
/**
* 所属机构
*/
@ExcelAttribute
(
name
=
"所属机构"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"所属机构"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"所属机构"
)
private
String
organName
;
/**
* 审核人
*/
@ExcelAttribute
(
name
=
"审核人"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"审核人"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"审核人"
)
private
String
auditUserName
;
/**
* 办理人
*/
@ExcelAttribute
(
name
=
"办理人"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"办理人"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"办理人"
)
private
String
handleUserName
;
/**
* 手机号
*/
@ExcelAttribute
(
name
=
"手机号"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"手机号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"手机号"
)
private
String
phone
;
/**
* 类型 0 独立户 1 自由户
*/
@ExcelAttribute
(
name
=
"户类型"
,
maxLength
=
3
,
isNotEmpty
=
true
)
@Schema
(
description
=
"户类型"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"户类型"
)
private
String
houseType
;
/**
* 单位编号
*/
@ExcelAttribute
(
name
=
"单位编号"
)
@Schema
(
description
=
"单位编号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位编号"
)
private
String
customerNo
;
/**
* 单位统一信用代码
*/
@ExcelAttribute
(
name
=
"单位统一信用代码"
)
@Schema
(
description
=
"单位统一信用代码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位统一信用代码"
)
private
String
unitCreditCode
;
/**
* 自动化配置状态 0 是 1 否
*/
@ExcelAttribute
(
name
=
"是否自动办理"
)
@Schema
(
description
=
"是否自动办理"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否自动办理"
)
private
String
autoStatus
;
/**
* 社保-登录账户
*/
@ExcelAttribute
(
name
=
"社保-登录账户"
)
@Schema
(
description
=
"社保-登录账户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保-登录账户"
)
private
String
socialAccount
;
/**
* 社保-登录密码
*/
@ExcelAttribute
(
name
=
"社保-登录密码"
)
@Schema
(
description
=
"社保-登录密码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保-登录密码"
)
private
String
socialPassword
;
/**
* 医保-登录账户
*/
@ExcelAttribute
(
name
=
"医保-登录账户"
)
@Schema
(
description
=
"医保-登录账户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医保-登录账户"
)
private
String
mediclAccount
;
/**
* 医保-登录密码
*/
@ExcelAttribute
(
name
=
"医保-登录密码"
)
@Schema
(
description
=
"医保-登录密码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医保-登录密码"
)
private
String
mediclPassword
;
/**
* 是否配置公章
*/
@ExcelAttribute
(
name
=
"是否配置公章"
)
@Schema
(
description
=
"是否配置公章"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否配置公章"
)
private
String
isSign
;
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/TSocialHouseholdUpdateVo.java
0 → 100644
View file @
93638134
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.RowIndex
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
import
java.io.Serializable
;
/**
* 社保户批量新增
*
* @author huych
* @date 2024-12-5 11:38:05
*/
@Data
public
class
TSocialHouseholdUpdateVo
extends
RowIndex
implements
Serializable
{
/**
* 员工姓名
*/
@Length
(
max
=
50
,
message
=
"户名不能超过50个字符"
)
@ExcelAttribute
(
name
=
"户名"
,
maxLength
=
50
,
isNotEmpty
=
true
)
@Schema
(
description
=
"户名"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"户名"
)
private
String
name
;
/**
* 缴纳地所在省
*/
@Length
(
max
=
32
,
message
=
"不能超过32个字符"
)
@ExcelAttribute
(
name
=
"缴纳地所在省"
,
maxLength
=
32
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
""
)
@Schema
(
description
=
"缴纳地所在省"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"缴纳地所在省"
)
private
Integer
province
;
/**
* 缴纳地所在市
*/
@Length
(
max
=
32
,
message
=
"不能超过32个字符"
)
@ExcelAttribute
(
name
=
"缴纳地所在市"
,
maxLength
=
32
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
"province"
)
@Schema
(
description
=
"缴纳地所在市"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"缴纳地所在市"
)
private
Integer
city
;
/**
* 缴纳地所在县
*/
@Length
(
max
=
32
,
message
=
"不能超过32个字符"
)
@ExcelAttribute
(
name
=
"缴纳地所在县"
,
maxLength
=
32
,
isDataId
=
true
,
isArea
=
true
,
parentField
=
"city"
)
@Schema
(
description
=
"缴纳地所在县"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
value
=
"缴纳地所在县"
)
private
Integer
town
;
/**
* 所属机构
*/
@ExcelAttribute
(
name
=
"所属机构"
,
maxLength
=
50
)
@Schema
(
description
=
"所属机构"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"所属机构"
)
private
String
organName
;
/**
* 审核人
*/
@ExcelAttribute
(
name
=
"审核人"
,
maxLength
=
50
)
@Schema
(
description
=
"审核人"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"审核人"
)
private
String
auditUserName
;
/**
* 办理人
*/
@ExcelAttribute
(
name
=
"办理人"
,
maxLength
=
50
)
@Schema
(
description
=
"办理人"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"办理人"
)
private
String
handleUserName
;
/**
* 手机号
*/
@ExcelAttribute
(
name
=
"手机号"
,
maxLength
=
50
)
@Schema
(
description
=
"手机号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"手机号"
)
private
String
phone
;
/**
* 类型 0 独立户 1 自由户
*/
@ExcelAttribute
(
name
=
"户类型"
,
maxLength
=
3
)
@Schema
(
description
=
"户类型"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"户类型"
)
private
String
houseType
;
/**
* 单位编号
*/
@ExcelAttribute
(
name
=
"单位编号"
)
@Schema
(
description
=
"单位编号"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位编号"
)
private
String
customerNo
;
/**
* 单位统一信用代码
*/
@ExcelAttribute
(
name
=
"单位统一信用代码"
)
@Schema
(
description
=
"单位统一信用代码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"单位统一信用代码"
)
private
String
unitCreditCode
;
/**
* 社保-登录账户
*/
@ExcelAttribute
(
name
=
"社保-登录账户"
)
@Schema
(
description
=
"社保-登录账户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保-登录账户"
)
private
String
socialAccount
;
/**
* 社保-登录密码
*/
@ExcelAttribute
(
name
=
"社保-登录密码"
)
@Schema
(
description
=
"社保-登录密码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"社保-登录密码"
)
private
String
socialPassword
;
/**
* 医保-登录账户
*/
@ExcelAttribute
(
name
=
"医保-登录账户"
)
@Schema
(
description
=
"医保-登录账户"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医保-登录账户"
)
private
String
mediclAccount
;
/**
* 医保-登录密码
*/
@ExcelAttribute
(
name
=
"医保-登录密码"
)
@Schema
(
description
=
"医保-登录密码"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"医保-登录密码"
)
private
String
mediclPassword
;
/**
* 自动化配置状态 0 是 1 否
*/
@ExcelAttribute
(
name
=
"是否自动办理"
,
maxLength
=
1
,
isNotEmpty
=
true
)
@Schema
(
description
=
"是否自动办理"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否自动办理"
)
private
String
autoStatus
;
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/FileUploadController.java
0 → 100644
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
controller
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.salary.vo.SalaryAttaVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.service.FileUploadService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* @author fang
* 文件上传接口
*/
@RestController
@RequestMapping
(
"/fileUpload"
)
@Tag
(
name
=
"文件上传接口"
)
@Slf4j
public
class
FileUploadController
{
@Autowired
private
OSSUtil
ossUtil
;
@Autowired
private
TAttaInfoService
tAttaInfoService
;
@Autowired
private
FileUploadService
fileUploadService
;
/**
* @Author fxj
* @Description
* @Date 13:49 2022/6/17
* @Param
* @return
**/
@Operation
(
description
=
"OSS文件上传接口"
+
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同;5收入证明)\", required = true, dataType = \"int\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n"
+
"\t"
)
/*@ApiImplicitParams({
@ApiImplicitParam(name = "file", value = "Form文件上传", required = true, dataType = "__file", paramType = "form"),
@ApiImplicitParam(name = "filePath", value = "文件上传路径", required = false, dataType = "String", paramType = "form"),
@ApiImplicitParam(name = "type", value = "关系类型(0客户附件1联系人附件2跟进记录附件3合同附件4合同归档附件5报价单6招标信息7业务评估8电子档案)", required = true, dataType = "int", paramType = "form"),
@ApiImplicitParam(name = "domain", value = "实体id(传入就插入对应关系,用于编辑)", required = false, paramType = "form")
})*/
@PostMapping
(
value
=
"/ossUploadFile"
)
public
R
<
T
>
uploadImg
(
@RequestBody
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
)
throws
IOException
{
return
fileUploadService
.
uploadAsso
(
file
,
filePath
,
type
,
domain
,
CommonConstants
.
ZERO_STRING
);
}
/**
* @Author hgw
* @Description 改编自ossUploadFile接口,改变了回传信息——专为预入职微信端使用——忽略了token,其余人慎用
* @Date 13:49 2022/6/17
* @Param relationTypeSub 预入职其他附件的子类型
* @return
**/
@Operation
(
description
=
"OSS文件上传接口"
+
"@ApiImplicitParam(name = \"file\", value = \"Form文件上传\", required = true, dataType = \"__file\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"filePath\", value = \"文件上传路径\", required = false, dataType = \"String\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"type\", value = \"关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业 3.员工附件-不良记录 4.员工附件-合同;5收入证明)\", required = true, dataType = \"int\", paramType = \"form\"),\n"
+
"\t\t\t@ApiImplicitParam(name = \"domain\", value = \"实体id(传入就插入对应关系,用于编辑)\", required = false, paramType = \"form\")\n"
+
"\t"
)
@PostMapping
(
value
=
"/uploadFileReturnAtta"
)
public
R
<
T
>
uploadFileReturnAtta
(
@RequestBody
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domainId
)
throws
IOException
{
return
fileUploadService
.
uploadAsso
(
file
,
filePath
,
type
,
domainId
,
CommonConstants
.
ONE_STRING
);
}
/**
* @Author fxj
* @Description
* @Date 13:51 2022/6/17
* @Param
* @return
**/
@Operation
(
description
=
"附件删除"
)
@SysLog
(
"附件删除"
)
@DeleteMapping
(
"/ossFileDelete/{id}"
)
public
R
<
Boolean
>
ossFileDelete
(
@PathVariable
String
id
)
{
try
{
TAttaInfo
attaInfo
=
tAttaInfoService
.
getById
(
id
);
if
(
null
==
attaInfo
)
{
return
R
.
failed
(
"无对应附件信息"
);
}
if
(
tAttaInfoService
.
removeById
(
id
))
{
ossUtil
.
deleteObject
(
null
,
attaInfo
.
getAttaSrc
());
return
R
.
ok
(
null
,
"删除成功!"
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"附件删除异常:"
+
e
.
getMessage
());
return
R
.
failed
(
"附件删除异常!"
);
}
return
R
.
ok
(
null
,
"删除失败!"
);
}
/**
* 获取附件下载地址
*
* @param id
* @return
* @Author fxj
* @Date 2019-08-16
* @param id domainId
**/
@Operation
(
description
=
"附件预览下载地址 type:关系类型(0员工附件-学历 1 员工附件-伤残 2.员工附件-职业"
)
@GetMapping
(
"/ossFileUrl/{id}"
)
public
R
<
List
<
TAttaInfo
>>
ossFileUrl
(
@PathVariable
String
id
)
{
List
<
TAttaInfo
>
attas
=
tAttaInfoService
.
list
(
Wrappers
.<
TAttaInfo
>
query
().
lambda
().
eq
(
TAttaInfo:
:
getDomainId
,
id
));
if
(
Common
.
isEmpty
(
attas
))
{
return
new
R
<>(
attas
);
}
for
(
TAttaInfo
atta:
attas
){
URL
url
=
ossUtil
.
getObjectUrl
(
null
,
atta
.
getAttaSrc
());
atta
.
setAttaUrl
(
url
.
toString
().
replace
(
"http"
,
"https"
));
}
return
new
R
<>(
attas
);
}
/**
* 获取附件
* @author hgw
* @return R
*/
@Operation
(
summary
=
"获取薪资原表附件--EKP调用接口"
,
description
=
"获取薪资原表附件--EKP调用接口"
)
@SysLog
(
"获取薪资原表附件--EKP调用接口"
)
@GetMapping
(
"/getAttaListBySalaryId"
)
public
R
<
List
<
SalaryAttaVo
>>
getAttaListBySalaryId
(
@RequestParam
String
salaryId
)
{
List
<
SalaryAttaVo
>
voList
=
new
ArrayList
<>();
List
<
TAttaInfo
>
attaList
=
tAttaInfoService
.
list
(
Wrappers
.<
TAttaInfo
>
query
().
lambda
()
.
eq
(
TAttaInfo:
:
getRelationType
,
11
)
.
eq
(
TAttaInfo:
:
getDomainId
,
salaryId
));
if
(
attaList
!=
null
&&
!
attaList
.
isEmpty
())
{
SalaryAttaVo
vo
;
URL
url
;
for
(
TAttaInfo
a
:
attaList
){
url
=
ossUtil
.
getObjectUrl
(
null
,
a
.
getAttaSrc
());
vo
=
new
SalaryAttaVo
();
vo
.
setAttaName
(
a
.
getAttaName
());
vo
.
setAttaUrl
(
url
.
toString
().
replace
(
"http"
,
"https"
));
voList
.
add
(
vo
);
}
}
return
R
.
ok
(
voList
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/SysHouseHoldInfoController.java
View file @
93638134
...
...
@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo
;
...
...
@@ -30,9 +31,12 @@ import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
...
...
@@ -93,7 +97,7 @@ public class SysHouseHoldInfoController {
@Operation
(
summary
=
"通过id查询"
,
description
=
"通过id查询:hasPermission('demo_syshouseholdinfo_get')"
)
@GetMapping
(
"/{id}"
)
public
R
<
SysHouseHoldInfo
>
getById
(
@PathVariable
(
"id"
)
String
id
)
{
return
R
.
ok
(
sysHouseHoldInfoService
.
getById
(
id
)
);
return
sysHouseHoldInfoService
.
getByIdAtta
(
id
);
}
/**
...
...
@@ -210,4 +214,47 @@ public class SysHouseHoldInfoController {
return
R
.
ok
(
1
);
}
/**
* 批量新增社保户配置数据
*
* @author huyc
* @date 2024-12-5 10:18:05
**/
@SneakyThrows
@Operation
(
description
=
"批量新增社保户配置数据 hasPermission('syshouseholdinfo_batch_add')"
)
@SysLog
(
"批量新增社保户配置数据"
)
@PostMapping
(
"/importListAdd"
)
@PreAuthorize
(
"@pms.hasPermission('syshouseholdinfo_batch_add')"
)
public
R
<
List
<
ErrorMessage
>>
importListAdd
(
@RequestBody
MultipartFile
file
){
return
sysHouseHoldInfoService
.
importListAdd
(
file
.
getInputStream
());
}
/**
* 批量更新社保户配置数据
*
* @author huyc
* @date 2024-12-5 10:18:05
**/
@SneakyThrows
@Operation
(
description
=
"批量更新社保户配置数据 hasPermission('syshouseholdinfo_batch_update')"
)
@SysLog
(
"批量更新社保户配置数据"
)
@PostMapping
(
"/importListUpdate"
)
@PreAuthorize
(
"@pms.hasPermission('syshouseholdinfo_batch_add')"
)
public
R
<
List
<
ErrorMessage
>>
importListUpdate
(
@RequestBody
MultipartFile
file
){
return
sysHouseHoldInfoService
.
importListUpdate
(
file
.
getInputStream
());
}
/**
* 导出社保户配置数据
*
* @author huyc
* @date 2024-12-5 11:32:08
**/
@Operation
(
description
=
"导出社保户配置数据"
)
@PostMapping
(
"/export"
)
@PreAuthorize
(
"@pms.hasPermission('syshouseholdinfo_export')"
)
public
void
export
(
HttpServletResponse
response
,
@RequestBody
SysHouseHoldInfo
sysHouseHoldInfo
)
{
sysHouseHoldInfoService
.
listExport
(
response
,
sysHouseHoldInfo
);
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/SysConfigLimitMapper.java
0 → 100644
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
mapper
;
/*
* Copyright (c) 2018-2025, lengleng All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the yifu4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: lengleng (wangiegie@gmail.com)
*/
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.yifu.archives.entity.SysConfigLimit
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* 系统限制配置表
*
* @author hgw
* @date 2024-09-24 17:39:57
*/
@Mapper
public
interface
SysConfigLimitMapper
extends
BaseMapper
<
SysConfigLimit
>
{
/**
* 系统限制配置表简单分页查询
*
* @param configKey 键
* @return
*/
Integer
getSysConfigLimitByKey
(
@Param
(
"configKey"
)
String
configKey
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/SysHouseHoldInfoMapper.java
View file @
93638134
...
...
@@ -21,9 +21,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.vo.TSocialHouseholdInsertVo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 社保户公积金户数据
*
...
...
@@ -45,4 +48,18 @@ public interface SysHouseHoldInfoMapper extends BaseMapper<SysHouseHoldInfo> {
* @return
*/
IPage
<
SysHouseHoldInfo
>
getAllSingleSocailPage
(
Page
<
SysHouseHoldInfo
>
page
);
/**
* 查询导出的数量
* @param sysHouseHoldInfo
* @return
*/
long
selectExportCount
(
@Param
(
"sysHouseHoldInfo"
)
SysHouseHoldInfo
sysHouseHoldInfo
);
/**
* 查询导出的集合
* @param sysHouseHoldInfo
* @return
*/
List
<
TSocialHouseholdInsertVo
>
selectExportList
(
@Param
(
"sysHouseHoldInfo"
)
SysHouseHoldInfo
sysHouseHoldInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/mapper/TAttaInfoMapper.java
0 → 100644
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Mapper
public
interface
TAttaInfoMapper
extends
BaseMapper
<
TAttaInfo
>
{
/**
* 附件信息表简单分页查询
*
* @param tAttaInfo 附件信息表
* @return
*/
IPage
<
TAttaInfo
>
getTAttaInfoPage
(
Page
<
TAttaInfo
>
page
,
@Param
(
"tAttaInfo"
)
TAttaInfo
tAttaInfo
);
/**
* @param tAttaInfo
* @Description: 获取list
* @Author: hgw
* @Date: 2021/5/28 16:02
* @return: java.util.List<com.yifu.cloud.v1.crm.api.entity.TAttaInfo>
**/
List
<
TAttaInfo
>
getTAttaInfoList
(
@Param
(
"tAttaInfo"
)
TAttaInfo
tAttaInfo
);
List
<
TAttaInfo
>
getTAttaInfoListByDoMainId
(
@Param
(
"domainId"
)
String
domainId
);
List
<
TAttaInfo
>
getKeenAtta
(
@Param
(
"dayStart"
)
LocalDateTime
dayStart
,
@Param
(
"values"
)
Collection
<
String
>
values
);
int
updateDomainId
(
@Param
(
"domainId"
)
String
domainId
,
@Param
(
"ids"
)
List
<
String
>
ids
);
List
<
TAttaInfo
>
getAttaByApplyId
(
@Param
(
"applyId"
)
String
applyId
);
void
deleteByDomainId
(
@Param
(
"domainId"
)
String
domainId
);
void
deleteByDomainIdAndType
(
@Param
(
"domainId"
)
String
domainId
,
@Param
(
"relationType"
)
String
relationType
);
// 删除学历与职业资格之外的附件
void
deleteByDomainIdAndOther
(
@Param
(
"domainId"
)
String
domainId
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/FileUploadService.java
0 → 100644
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
/**
* 文件上传
*
* @author pwang
* @date 2022-07-27 16:16:07
*/
public
interface
FileUploadService
{
R
<
FileVo
>
uploadImg
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
)
throws
IOException
;
R
<
TAttaInfo
>
uploadFileReturnAtta
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domainId
)
throws
IOException
;
R
<
T
>
uploadAsso
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
,
String
uploadType
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/SysHouseHoldInfoService.java
View file @
93638134
...
...
@@ -21,9 +21,14 @@ package com.yifu.cloud.plus.v1.yifu.social.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.util.List
;
/**
* 社保户公积金户数据
*
...
...
@@ -45,7 +50,20 @@ public interface SysHouseHoldInfoService extends IService<SysHouseHoldInfo> {
*/
R
<
Boolean
>
saveInfo
(
SysHouseHoldInfo
sysHouseHoldInfo
);
/**
* 户新增
* @param id
* @return R
*/
R
<
SysHouseHoldInfo
>
getByIdAtta
(
String
id
);
R
<
Boolean
>
updateByIdAsso
(
SysHouseHoldInfo
sysHouseHoldInfo
);
IPage
<
SysHouseHoldInfo
>
getAllSingleSocailPage
(
Page
<
SysHouseHoldInfo
>
page
);
R
<
List
<
ErrorMessage
>>
importListAdd
(
InputStream
inputStream
);
R
<
List
<
ErrorMessage
>>
importListUpdate
(
InputStream
inputStream
);
void
listExport
(
HttpServletResponse
response
,
SysHouseHoldInfo
sysHouseHoldInfo
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/TAttaInfoService.java
0 → 100644
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
public
interface
TAttaInfoService
extends
IService
<
TAttaInfo
>
{
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
IPage
<
TAttaInfo
>
getTAttaInfoPage
(
Page
<
TAttaInfo
>
page
,
TAttaInfo
tAttaInfo
);
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
List
<
TAttaInfo
>
getTAttaInfoList
(
TAttaInfo
tAttaInfo
);
/**
* @param domainId 关联id
* @Description: 根据domainId获取附件
* @Author: hgw
* @Date: 2024/6/17 18:23
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>
**/
List
<
TAttaInfo
>
getTAttaInfoListByDoMainId
(
String
domainId
);
TAttaInfo
add
(
TAttaInfo
attaInfo
);
void
update
(
List
<
TAttaInfo
>
attaList
,
String
domainId
,
String
relationType
);
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
Boolean
batchOssFileDelete
(
List
<
TAttaInfo
>
delAttaList
);
List
<
TAttaInfo
>
getKeenAtta
(
LocalDateTime
dayStart
,
Collection
<
String
>
values
);
Boolean
updateDomainId
(
String
domainId
,
List
<
String
>
ids
);
/**
* @param applyId
* @Description: 收入证明使用
* @Author: hgw
* @Date: 2023/2/22 10:50
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.util.List < com.yifu.cloud.plus.v1.yifu.archives.entity.TAttaInfo>>
**/
R
<
List
<
TAttaInfo
>>
getAttaByApplyId
(
String
applyId
);
/**
* @param domainId 关联id
* @Description: 删除附件
* @Author: hgw
* @Date: 2024/6/20 14:50
* @return: void
**/
void
deleteByDomainId
(
String
domainId
);
void
deleteByDomainIdAndOther
(
String
domainId
);
void
deleteByDomainIdAndType
(
String
domainId
,
int
relationType
);
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/FileUploadServiceImpl.java
0 → 100644
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ResultConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.FileVo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.SysConfigLimitMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.FileUploadService
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.authority.AuthorityUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.Set
;
import
java.util.concurrent.atomic.AtomicInteger
;
@Service
@RequiredArgsConstructor
@Slf4j
public
class
FileUploadServiceImpl
implements
FileUploadService
{
private
final
OSSUtil
ossUtil
;
private
final
TAttaInfoService
tAttaInfoService
;
private
AtomicInteger
atomicInteger
=
new
AtomicInteger
(
0
);
//初始化附件上传队列上限值
private
int
maxLimit
=
1
;
private
final
SysConfigLimitMapper
configLimitMapper
;
@Override
public
R
<
TAttaInfo
>
uploadFileReturnAtta
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domainId
)
throws
IOException
{
if
(
null
==
file
)
{
return
R
.
failed
(
"文件删除异常,请重新上传!"
);
}
String
fileName
=
file
.
getOriginalFilename
();
if
(
fileName
==
null
||
Common
.
isEmpty
(
fileName
))
{
return
R
.
failed
(
"文件名不能为空!!"
);
}
if
(
fileName
.
length
()
>
100
)
{
return
R
.
failed
(
"文件名不能超过100个字符!"
);
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String
key
=
""
;
if
(
Common
.
isNotNull
(
filePath
))
{
key
=
filePath
+
"/"
+
System
.
currentTimeMillis
()
+
fileName
;
}
else
{
key
=
System
.
currentTimeMillis
()
+
fileName
;
}
if
(!
Common
.
checkFile
(
key
))
{
return
R
.
failed
(
"非法上传类型:"
+
fileName
);
}
boolean
flag
=
ossUtil
.
uploadFileByStream
(
file
.
getInputStream
(),
key
,
null
);
TAttaInfo
attaInfo
;
URL
url
;
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传到存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
attaInfo
=
initUnitAttaForInsert
(
fileName
,
key
,
file
.
getSize
());
attaInfo
.
setRelationType
(
String
.
valueOf
(
type
));
try
{
attaInfo
.
setDomainId
(
domainId
);
Set
<
String
>
dbAuthsSet
=
new
HashSet
<>();
Collection
<?
extends
GrantedAuthority
>
authorities
=
AuthorityUtils
.
createAuthorityList
(
dbAuthsSet
.
toArray
(
new
String
[
0
]));
YifuUser
user
=
new
YifuUser
(
"2"
,
1L
,
""
,
"预入职扫码"
,
"预入职扫码"
,
"0"
,
SecurityConstants
.
BCRYPT
+
"123456"
,
"12345678911"
,
true
,
true
,
true
,
true
,
"1"
,
authorities
,
"1"
,
null
,
null
,
null
);
attaInfo
.
setCreateBy
(
user
.
getId
());
attaInfo
.
setCreateName
(
user
.
getNickname
());
attaInfo
=
tAttaInfoService
.
add
(
attaInfo
);
}
catch
(
Exception
e
)
{
log
.
error
(
"OSS文件上传异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"上传异常:"
+
e
.
getMessage
());
}
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
attaInfo
.
setAttaUrl
(
String
.
valueOf
(
url
));
return
R
.
ok
(
attaInfo
);
}
else
{
return
R
.
failed
(
"fail:上传异常"
);
}
}
@Override
public
R
<
FileVo
>
uploadImg
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
)
throws
IOException
{
if
(
null
==
file
)
{
return
R
.
failed
(
"文件删除异常,请重新上传!"
);
}
String
fileName
=
file
.
getOriginalFilename
();
if
(
Common
.
isEmpty
(
fileName
))
{
return
R
.
failed
(
"文件名不能为空!"
);
}
if
(
fileName
.
length
()
>
100
)
{
return
R
.
failed
(
"文件名不能超过100个字符!"
);
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String
key
=
""
;
if
(
Common
.
isNotNull
(
filePath
))
{
key
=
filePath
+
"/"
+
System
.
currentTimeMillis
()
+
fileName
;
}
else
{
key
=
System
.
currentTimeMillis
()
+
fileName
;
}
if
(!
Common
.
checkFile
(
key
))
{
return
R
.
failed
(
"非法上传类型!"
);
}
boolean
flag
=
ossUtil
.
uploadFileByStream
(
file
.
getInputStream
(),
key
,
null
);
FileVo
fileVo
;
TAttaInfo
attaInfo
;
URL
url
;
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
attaInfo
=
initUnitAttaForInsert
(
fileName
,
key
,
file
.
getSize
());
attaInfo
.
setRelationType
(
String
.
valueOf
(
type
));
try
{
attaInfo
.
setDomainId
(
domain
);
attaInfo
=
tAttaInfoService
.
add
(
attaInfo
);
}
catch
(
Exception
e
)
{
log
.
error
(
"OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"fail:"
+
e
.
getMessage
());
}
//有实体id则插入关系,用于编辑
if
(
Common
.
isNotNull
(
domain
))
{
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
fileVo
=
new
FileVo
(
attaInfo
.
getId
(),
attaInfo
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
,
"success"
);
}
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
fileVo
=
new
FileVo
(
attaInfo
.
getId
(),
attaInfo
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
,
"success"
);
}
else
{
return
R
.
failed
(
"fail:上传失败"
);
}
}
private
R
<
FileVo
>
uploadImg2
(
InputStream
fileIn
,
String
filePath
,
Integer
type
,
String
domain
,
String
fileName
)
throws
IOException
{
if
(
null
==
fileIn
)
{
return
R
.
failed
(
"文件上传异常,请重新上传!"
);
}
if
(
Common
.
isEmpty
(
fileName
))
{
return
R
.
failed
(
"文件名不能为空!"
);
}
//filePath不传默认存储空间的根目录
//jpg,jpeg,png,bmp
String
key
=
System
.
currentTimeMillis
()
+
fileName
;
boolean
flag
=
ossUtil
.
uploadFileByStream
(
fileIn
,
key
,
null
);
FileVo
fileVo
;
TAttaInfo
attaInfo
;
URL
url
;
if
(
flag
)
{
log
.
info
(
"文件:"
+
fileName
+
"上传至存储空间"
+
ossUtil
.
getBucketName
()
+
"成功!"
);
attaInfo
=
initUnitAttaForInsert
(
fileName
,
key
,
0
);
attaInfo
.
setRelationType
(
String
.
valueOf
(
type
));
try
{
attaInfo
.
setDomainId
(
domain
);
attaInfo
=
tAttaInfoService
.
add
(
attaInfo
);
}
catch
(
Exception
e
)
{
log
.
error
(
"OSS文件上传接口异常:"
+
e
.
getMessage
());
ossUtil
.
deleteObject
(
null
,
key
);
return
R
.
failed
(
"fail:"
+
e
.
getMessage
());
}
//有实体id则插入关系,用于编辑
if
(
Common
.
isNotNull
(
domain
))
{
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
fileVo
=
new
FileVo
(
attaInfo
.
getId
(),
attaInfo
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
,
"success"
);
}
url
=
ossUtil
.
getObjectUrl
(
null
,
attaInfo
.
getAttaSrc
());
fileVo
=
new
FileVo
(
attaInfo
.
getId
(),
attaInfo
.
getAttaName
(),
url
.
toString
());
return
R
.
ok
(
fileVo
,
"success"
);
}
else
{
return
R
.
failed
(
"fail:上传失败"
);
}
}
/**
* 对象初始化
*
* @param fileName
* @param key
* @param fileSize
* @return
*/
private
TAttaInfo
initUnitAttaForInsert
(
String
fileName
,
String
key
,
long
fileSize
)
{
TAttaInfo
unitAtta
=
new
TAttaInfo
();
char
slash
=
'/'
;
char
point
=
'.'
;
if
(
fileName
.
lastIndexOf
(
slash
)
>=
0
)
{
unitAtta
.
setAttaName
(
fileName
.
substring
(
fileName
.
lastIndexOf
(
slash
)));
}
else
{
unitAtta
.
setAttaName
(
fileName
);
}
unitAtta
.
setAttaSize
(
fileSize
);
unitAtta
.
setAttaSrc
(
key
);
if
(
key
.
lastIndexOf
(
point
)
>=
0
)
{
unitAtta
.
setAttaType
(
key
.
substring
(
key
.
lastIndexOf
(
point
)));
}
unitAtta
.
setCreateTime
(
LocalDateTime
.
now
());
return
unitAtta
;
}
/**
* @return
* @Author fxj
* @Description 整合接口
* @Date 15:24 2024/9/24
* @Param
**/
@Override
public
R
uploadAsso
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
,
String
uploadType
)
{
return
getR
(
file
,
filePath
,
type
,
domain
,
uploadType
);
}
public
R
getR
(
MultipartFile
file
,
String
filePath
,
Integer
type
,
String
domain
,
String
uploadType
)
{
maxLimit
=
configLimitMapper
.
getSysConfigLimitByKey
(
"UPLOAD_MAX_LIMIT"
);
if
(
atomicInteger
.
incrementAndGet
()
<=
maxLimit
)
{
try
{
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
uploadType
))
{
return
uploadImg
(
file
,
filePath
,
type
,
domain
);
}
else
if
(
CommonConstants
.
ONE_STRING
.
equals
(
uploadType
))
{
return
uploadFileReturnAtta
(
file
,
filePath
,
type
,
domain
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"附件上传异常:"
,
e
);
}
finally
{
atomicInteger
.
decrementAndGet
();
}
}
else
{
atomicInteger
.
decrementAndGet
();
log
.
error
(
"超出阈值:"
+
ResultConstants
.
FILE_UPLOADING_DATA
);
return
R
.
failed
(
ResultConstants
.
FILE_UPLOADING_DATA
);
}
return
null
;
}
}
\ No newline at end of file
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
View file @
93638134
This diff is collapsed.
Click to expand it.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TAttaInfoServiceImpl.java
0 → 100644
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo
;
import
com.yifu.cloud.plus.v1.yifu.social.mapper.TAttaInfoMapper
;
import
com.yifu.cloud.plus.v1.yifu.social.service.TAttaInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.net.URL
;
import
java.time.LocalDateTime
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 附件信息表
*
* @author pwang
* @date 2021-02-19 16:16:07
*/
@Service
public
class
TAttaInfoServiceImpl
extends
ServiceImpl
<
TAttaInfoMapper
,
TAttaInfo
>
implements
TAttaInfoService
{
@Autowired
private
OSSUtil
ossUtil
;
/**
* 附件信息表简单分页查询
*
* @param tAttaInfo 附件信息表
* @return
*/
@Override
public
IPage
<
TAttaInfo
>
getTAttaInfoPage
(
Page
<
TAttaInfo
>
page
,
TAttaInfo
tAttaInfo
)
{
return
baseMapper
.
getTAttaInfoPage
(
page
,
tAttaInfo
);
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public
List
<
TAttaInfo
>
getTAttaInfoList
(
TAttaInfo
tAttaInfo
)
{
return
baseMapper
.
getTAttaInfoList
(
tAttaInfo
);
}
@Override
public
List
<
TAttaInfo
>
getTAttaInfoListByDoMainId
(
String
domainId
)
{
return
baseMapper
.
getTAttaInfoListByDoMainId
(
domainId
);
}
@Override
public
TAttaInfo
add
(
TAttaInfo
attaInfo
)
{
this
.
save
(
attaInfo
);
return
attaInfo
;
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public
void
update
(
List
<
TAttaInfo
>
attaInfoList
,
String
domainId
,
String
relationType
)
{
if
(
attaInfoList
!=
null
)
{
for
(
TAttaInfo
attaInfo
:
attaInfoList
)
{
attaInfo
.
setDomainId
(
domainId
);
attaInfo
.
setRelationType
(
relationType
);
this
.
updateById
(
attaInfo
);
}
}
}
/**
* @Author fxj
* @Description
* @Date 13:48 2022/6/17
* @Param
* @return
**/
@Override
public
Boolean
batchOssFileDelete
(
List
<
TAttaInfo
>
delAttaList
)
{
try
{
for
(
TAttaInfo
delAtta
:
delAttaList
)
{
if
(
this
.
removeById
(
delAtta
.
getId
()))
{
ossUtil
.
deleteObject
(
null
,
delAtta
.
getAttaSrc
());
}
}
return
true
;
}
catch
(
Exception
e
)
{
log
.
error
(
"附件删除异常:"
+
e
.
getMessage
());
return
false
;
}
}
@Override
public
List
<
TAttaInfo
>
getKeenAtta
(
LocalDateTime
dayStart
,
Collection
<
String
>
values
)
{
return
baseMapper
.
getKeenAtta
(
dayStart
,
values
);
}
@Override
public
Boolean
updateDomainId
(
String
domainId
,
List
<
String
>
ids
){
if
(
Common
.
isEmpty
(
domainId
)
||
!
Common
.
isNotEmpty
(
ids
)){
return
false
;
}
return
baseMapper
.
updateDomainId
(
domainId
,
ids
)
>
0
;
}
@Override
public
R
<
List
<
TAttaInfo
>>
getAttaByApplyId
(
String
applyId
)
{
List
<
TAttaInfo
>
list
=
baseMapper
.
getAttaByApplyId
(
applyId
);
if
(
Common
.
isNotNull
(
list
))
{
URL
url
;
for
(
TAttaInfo
atta:
list
)
{
url
=
ossUtil
.
getObjectUrl
(
null
,
atta
.
getAttaSrc
());
atta
.
setAttaUrl
(
url
.
toString
());
}
return
R
.
ok
(
list
);
}
else
{
return
R
.
failed
(
"没有附件"
);
}
}
@Override
public
void
deleteByDomainId
(
String
domainId
)
{
baseMapper
.
deleteByDomainId
(
domainId
);
}
@Override
public
void
deleteByDomainIdAndOther
(
String
domainId
)
{
baseMapper
.
deleteByDomainIdAndOther
(
domainId
);
}
@Override
public
void
deleteByDomainIdAndType
(
String
domainId
,
int
relationType
)
{
// 学历
if
(
relationType
==
0
)
{
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"0"
);
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"26"
);
}
else
if
(
relationType
==
1
)
{
// 执业资格证书
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"2"
);
}
else
if
(
relationType
==
2
)
{
// 其他附件
baseMapper
.
deleteByDomainIdAndType
(
domainId
,
"27"
);
}
}
}
yifu-social/yifu-social-biz/src/main/resources/mapper/SysConfigLimitMapper.xml
0 → 100644
View file @
93638134
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the yifu4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.social.mapper.SysConfigLimitMapper"
>
<resultMap
id=
"sysConfigLimitMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.SysConfigLimit"
>
<id
property=
"id"
column=
"ID"
/>
<result
property=
"configKey"
column=
"CONFIG_KEY"
/>
<result
property=
"configValue"
column=
"CONFIG_VALUE"
/>
<result
property=
"remark"
column=
"REMARK"
/>
</resultMap>
<!-- 根据key获取value -->
<select
id=
"getSysConfigLimitByKey"
resultType=
"java.lang.Integer"
>
SELECT a.CONFIG_VALUE
FROM sys_config_limit a
where a.CONFIG_KEY = #{configKey} limit 1
</select>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/SysHouseHoldInfoMapper.xml
View file @
93638134
...
...
@@ -47,8 +47,14 @@
<result
property=
"houseType"
column=
"HOUSE_TYPE"
/>
<result
property=
"customerNo"
column=
"CUSTOMER_NO"
/>
<result
property=
"unitCreditCode"
column=
"UNIT_CREDIT_CODE"
/>
<result
property=
"fundBank"
column=
"FUND_BANK"
/>
<result
property=
"autoStatus"
column=
"AUTO_STATUS"
/>
<result
property=
"fundBank"
column=
"FUND_BANK"
/>
<result
property=
"autoStatus"
column=
"AUTO_STATUS"
/>
<result
property=
"phone"
column=
"PHONE"
/>
<result
property=
"socialAccount"
column=
"SOCIAL_ACCOUNT"
/>
<result
property=
"mediclAccount"
column=
"MEDICL_ACCOUNT"
/>
<result
property=
"socialPassword"
column=
"SOCIAL_PASSWORD"
/>
<result
property=
"mediclPassword"
column=
"MEDICL_PASSWORD"
/>
<result
property=
"isSign"
column=
"IS_SIGN"
/>
</resultMap>
<resultMap
id=
"sysHouseHoldSingleInfoMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo"
>
...
...
@@ -83,7 +89,13 @@
a.UNIT_CREDIT_CODE,
a.FUND_BANK,
a.HANDLE_USER_NAME,
a.AUTO_STATUS
a.AUTO_STATUS,
a.PHONE,
a.SOCIAL_ACCOUNT,
a.MEDICL_ACCOUNT,
a.SOCIAL_PASSWORD,
a.MEDICL_PASSWORD,
a.IS_SIGN
</sql>
<sql
id=
"sysHouseHoldInfo_where"
>
<if
test=
"sysHouseHoldInfo != null"
>
...
...
@@ -164,4 +176,46 @@
where HOUSE_TYPE = '0'
order by a.CREATE_TIME desc
</select>
<select
id=
"selectExportCount"
resultType=
"java.lang.Long"
>
SELECT
count(1)
FROM sys_house_hold_info a
<where>
1=1
<include
refid=
"sysHouseHoldInfo_where"
/>
</where>
order by a.CREATE_TIME desc
</select>
<select
id=
"selectExportList"
resultType=
"com.yifu.cloud.plus.v1.yifu.social.vo.TSocialHouseholdInsertVo"
>
SELECT
if(a.TYPE = '0','社保户','公积金户') type,
a.NAME,
a1.AREA_NAME PROVINCE,
a2.AREA_NAME CITY,
ifnull(a3.AREA_NAME,'') TOWN,
a.ORGAN_NAME organName,
a.AUDIT_USER_NAME auditUserName,
a.HANDLE_USER_NAME handleUserName,
a.PHONE,
if(a.HOUSE_TYPE = '0','独立户','自有户') houseType,
a.CUSTOMER_NO customerNo,
a.UNIT_CREDIT_CODE unitCreditCode,
a.SOCIAL_ACCOUNT socialAccount,
a.SOCIAL_PASSWORD socialPassword,
a.MEDICL_ACCOUNT mediclAccount,
a.MEDICL_PASSWORD mediclPassword,
if(a.IS_SIGN = '0','是','否') isSign,
if(a.AUTO_STATUS = '0','启用','禁用') autoStatus
FROM sys_house_hold_info a
LEFT JOIN sys_area a1 on a1.id=a.PROVINCE
LEFT JOIN sys_area a2 on a2.id=a.CITY
LEFT JOIN sys_area a3 on a3.id=a.TOWN
<where>
1 = 1
<include
refid=
"sysHouseHoldInfo_where"
/>
</where>
order by a.CREATE_TIME desc
</select>
</mapper>
yifu-social/yifu-social-biz/src/main/resources/mapper/TAttaInfoMapper.xml
0 → 100644
View file @
93638134
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.yifu.social.mapper.TAttaInfoMapper"
>
<resultMap
id=
"tAttaInfoMap"
type=
"com.yifu.cloud.plus.v1.yifu.social.entity.TAttaInfo"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"attaName"
column=
"atta_name"
/>
<result
property=
"attaSrc"
column=
"atta_src"
/>
<result
property=
"attaSize"
column=
"atta_size"
/>
<result
property=
"attaType"
column=
"atta_type"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"relationType"
column=
"relation_type"
/>
<result
property=
"domainId"
column=
"domain_id"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.id,
a.atta_name,
a.atta_src,
a.atta_size,
a.atta_type,
a.create_by,
a.create_time,
a.relation_type,
a.domain_id
</sql>
<sql
id=
"tAttaInfo_where"
>
<if
test=
"tAttaInfo != null"
>
<if
test=
"tAttaInfo.id != null and tAttaInfo.id.trim() != ''"
>
AND a.id = #{tAttaInfo.id}
</if>
<if
test=
"tAttaInfo.attaName != null and tAttaInfo.attaName.trim() != ''"
>
AND a.atta_name = #{tAttaInfo.attaName}
</if>
<if
test=
"tAttaInfo.attaSrc != null and tAttaInfo.attaSrc.trim() != ''"
>
AND a.atta_src = #{tAttaInfo.attaSrc}
</if>
<if
test=
"tAttaInfo.attaSize != null"
>
AND a.atta_size = #{tAttaInfo.attaSize}
</if>
<if
test=
"tAttaInfo.attaType != null and tAttaInfo.attaType.trim() != ''"
>
AND a.atta_type = #{tAttaInfo.attaType}
</if>
<if
test=
"tAttaInfo.createBy != null and tAttaInfo.createBy.trim() != ''"
>
AND a.create_by = #{tAttaInfo.createBy}
</if>
<if
test=
"tAttaInfo.createTime != null"
>
AND a.create_time = #{tAttaInfo.createTime}
</if>
<if
test=
"tAttaInfo.relationType != null and tAttaInfo.relationType.trim() != ''"
>
AND a.relation_type = #{tAttaInfo.relationType}
</if>
<if
test=
"tAttaInfo.domainId != null and tAttaInfo.domainId.trim() != ''"
>
AND a.domain_id = #{tAttaInfo.domainId}
</if>
</if>
</sql>
<!--tAttaInfo简单分页查询-->
<select
id=
"getTAttaInfoPage"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
<where>
1=1
<include
refid=
"tAttaInfo_where"
/>
</where>
</select>
<!--tAttaInfo 获取list-->
<select
id=
"getTAttaInfoList"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
<where>
1=1
<include
refid=
"tAttaInfo_where"
/>
</where>
</select>
<!--根据domainId 获取list-->
<select
id=
"getTAttaInfoListByDoMainId"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
where a.domain_id = #{domainId}
</select>
<select
id=
"getKeenAtta"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
<where>
1=1
<if
test=
"values != null and values.size() > 0"
>
and a.domain_id in
<foreach
collection=
"values"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
and a.create_time >= #{dayStart}
and a.relation_type in ("3","4")
</where>
</select>
<update
id=
"updateDomainId"
>
update t_atta_info
<trim
prefix=
"set"
suffixOverrides=
","
>
domain_id=#{domainId}
</trim>
WHERE
<if
test=
"ids != null and ids.size() > 0"
>
id in
<foreach
collection=
"ids"
item=
"param"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{param}
</foreach>
</if>
</update>
<select
id=
"getAttaByApplyId"
resultMap=
"tAttaInfoMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM t_atta_info a
where EXISTS (select 1 from m_salary_prova_atta b where b.SALARY_PROVA_ID = #{applyId} and a.id = b.ATTA_ID);
</select>
<delete
id=
"deleteByDomainId"
>
delete from t_atta_info where domain_id=#{domainId}
</delete>
<delete
id=
"deleteByDomainIdAndType"
>
delete from t_atta_info where domain_id=#{domainId} and relation_type = #{relationType}
</delete>
<delete
id=
"deleteByDomainIdAndOther"
>
delete from t_atta_info where domain_id=#{domainId} and relation_type not in ('0','2','26','27')
</delete>
</mapper>
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/vo/AllUserNaVo.java
View file @
93638134
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
vo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
lombok.Data
;
import
java.io.Serializable
;
...
...
@@ -26,4 +27,6 @@ public class AllUserNaVo implements Serializable {
* @Date 17:05 2022/9/19
**/
private
List
<
String
>
userIds
;
private
HashMap
<
String
,
SysUser
>
allUser
;
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/admin/controller/UserController.java
View file @
93638134
...
...
@@ -342,6 +342,30 @@ public class UserController {
return
naVo
;
}
/**
* @return
* @Author huyc
* @Description 获取所有用户id
* @Date 10:20 2024/12/6
* @Param
**/
@Inner
@PostMapping
(
value
=
{
"/inner/getAllUserIdDTO"
})
public
AllUserNaVo
getAllUserIdDTO
()
{
AllUserNaVo
naVo
=
new
AllUserNaVo
();
List
<
SysUser
>
sysUsers
=
userService
.
list
(
Wrappers
.<
SysUser
>
query
().
lambda
()
.
eq
(
SysUser:
:
getDelFlag
,
CommonConstants
.
ZERO_STRING
)
.
eq
(
SysUser:
:
getType
,
CommonConstants
.
ZERO_STRING
));
if
(
Common
.
isNotEmpty
(
sysUsers
))
{
HashMap
<
String
,
SysUser
>
nameMap
=
new
HashMap
<>();
for
(
SysUser
u
:
sysUsers
)
{
nameMap
.
put
(
u
.
getNickname
(),
u
);
}
naVo
.
setAllUser
(
nameMap
);
}
return
naVo
;
}
/**
* @return
* @Author fxj
...
...
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