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
507b4f9c
Commit
507b4f9c
authored
Dec 13, 2024
by
hongguangwu
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/MVP-1.7.3-shuiyou' into MVP-1.7.3-shuiyou
parents
ec323865
00d62fa4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
337 additions
and
165 deletions
+337
-165
CommonConstants.java
...ud/plus/v1/yifu/common/core/constant/CommonConstants.java
+2
-0
SocialHandleSearchVo.java
...fu/cloud/plus/v1/yifu/social/vo/SocialHandleSearchVo.java
+8
-0
pom.xml
yifu-social/yifu-social-biz/pom.xml
+1
-16
SysHouseHoldInfoServiceImpl.java
...yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
+52
-17
TDispatchInfoServiceImpl.java
...v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
+177
-43
TForecastLibraryServiceImpl.java
...yifu/social/service/impl/TForecastLibraryServiceImpl.java
+2
-2
TSocialDeadlineInfoServiceImpl.java
...u/social/service/impl/TSocialDeadlineInfoServiceImpl.java
+40
-0
ExcelMergeImage.java
.../yifu/cloud/plus/v1/yifu/social/util/ExcelMergeImage.java
+31
-80
ExcelToImage.java
...com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
+13
-2
TDispatchInfoMapper.xml
...ial-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
+11
-5
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
View file @
507b4f9c
...
@@ -632,4 +632,6 @@ public interface CommonConstants {
...
@@ -632,4 +632,6 @@ public interface CommonConstants {
List
<
String
>
socialInfoStatus
=
Stream
.
of
(
"1"
,
"3"
,
"5"
,
"7"
).
collect
(
Collectors
.
toList
());
List
<
String
>
socialInfoStatus
=
Stream
.
of
(
"1"
,
"3"
,
"5"
,
"7"
).
collect
(
Collectors
.
toList
());
String
USER_DIR
=
"user.dir"
;
String
DOUBLE_LINE
=
"//"
;
}
}
yifu-social/yifu-social-api/src/main/java/com/yifu/cloud/plus/v1/yifu/social/vo/SocialHandleSearchVo.java
View file @
507b4f9c
...
@@ -153,4 +153,12 @@ public class SocialHandleSearchVo extends TDispatchInfo {
...
@@ -153,4 +153,12 @@ public class SocialHandleSearchVo extends TDispatchInfo {
@Schema
(
description
=
"社保ID"
)
@Schema
(
description
=
"社保ID"
)
@ExcelIgnore
@ExcelIgnore
private
String
socialId
;
private
String
socialId
;
/**
* 税友自动化办理,此标识区分于页面的导出功能,值为1 时 默认取值派单审核通过 且 未办理的派单数据
*/
@ExcelAttribute
(
name
=
"税友自动化办理"
)
@ExcelIgnore
@Schema
(
description
=
"税友自动化办理"
)
private
String
syFlag
;
}
}
yifu-social/yifu-social-biz/pom.xml
View file @
507b4f9c
...
@@ -99,22 +99,7 @@
...
@@ -99,22 +99,7 @@
<version>
1.0.0
</version>
<version>
1.0.0
</version>
</dependency>
</dependency>
<!-- Apache POI -->
<!-- excel to image -->
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi
</artifactId>
<version>
5.2.3
</version>
<!-- 使用最新版本 -->
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
5.2.3
</version>
</dependency>
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<version>
2.12.0
</version>
</dependency>
<dependency>
<dependency>
<groupId>
spire.xls
</groupId>
<groupId>
spire.xls
</groupId>
<artifactId>
spire.xls
</artifactId>
<artifactId>
spire.xls
</artifactId>
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/SysHouseHoldInfoServiceImpl.java
View file @
507b4f9c
...
@@ -28,9 +28,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...
@@ -28,9 +28,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysArea
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.AllUserNaVo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.Area
Map
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.vo.Area
Vo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.*
;
...
@@ -129,6 +130,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -129,6 +130,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if
(
Common
.
isEmpty
(
sysHouseHoldInfo
.
getAuditUser
())
||
Common
.
isEmpty
(
sysHouseHoldInfo
.
getHandleUser
()))
{
if
(
Common
.
isEmpty
(
sysHouseHoldInfo
.
getAuditUser
())
||
Common
.
isEmpty
(
sysHouseHoldInfo
.
getHandleUser
()))
{
return
R
.
failed
(
"审核人或办理人必填!"
);
return
R
.
failed
(
"审核人或办理人必填!"
);
}
}
//获取行政区化代码
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
sysHouseHoldInfo
.
getType
()))
{
HashMap
<
String
,
SysArea
>
map
=
initAreaMap
();
if
(
Common
.
isNotNull
(
map
)
&&
map
.
size
()
>
0
)
{
SysArea
area
=
map
.
get
(
sysHouseHoldInfo
.
getCity
());
if
(
Common
.
isNotNull
(
area
))
{
sysHouseHoldInfo
.
setAreaCode
(
area
.
getAreaCode
());
}
}
}
baseMapper
.
insert
(
sysHouseHoldInfo
);
baseMapper
.
insert
(
sysHouseHoldInfo
);
//维护附件信息
//维护附件信息
if
(
Common
.
isNotNull
(
sysHouseHoldInfo
.
getAttaId
()))
{
if
(
Common
.
isNotNull
(
sysHouseHoldInfo
.
getAttaId
()))
{
...
@@ -225,6 +236,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -225,6 +236,16 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
.
ge
(
SysBaseSetInfo:
:
getApplyEndDate
,
DateUtil
.
getCurrentDateTime
())))
>
CommonConstants
.
ZERO_INT
){
.
ge
(
SysBaseSetInfo:
:
getApplyEndDate
,
DateUtil
.
getCurrentDateTime
())))
>
CommonConstants
.
ZERO_INT
){
return
R
.
failed
(
"户下存在可用基数配置,请禁用可用基数配置后禁用户配置!"
);
return
R
.
failed
(
"户下存在可用基数配置,请禁用可用基数配置后禁用户配置!"
);
}
}
//更新行政区划代码
if
(
CommonConstants
.
ZERO_STRING
.
equals
(
hold
.
getType
())
&&
Common
.
isNotNull
(
hold
.
getCity
()))
{
HashMap
<
String
,
SysArea
>
map
=
initAreaMap
();
if
(
Common
.
isNotNull
(
map
)
&&
map
.
size
()
>
0
)
{
SysArea
area
=
map
.
get
(
hold
.
getCity
());
if
(
Common
.
isNotNull
(
area
))
{
hold
.
setAreaCode
(
area
.
getAreaCode
());
}
}
}
int
res
=
baseMapper
.
updateById
(
hold
);
int
res
=
baseMapper
.
updateById
(
hold
);
if
(
res
>=
0
){
if
(
res
>=
0
){
if
(
isEdit
)
{
if
(
isEdit
)
{
...
@@ -401,11 +422,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -401,11 +422,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
return
;
return
;
}
}
//获取所有区域数据
//获取所有区域数据
Map
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
SysArea
>
areaMap
=
initAreaMap
();
R
<
AreaMap
>
areaListR
=
upmsDaprUtils
.
getAreaMapR
();
if
(
Common
.
isEmpty
(
areaMap
))
{
if
(
null
!=
areaListR
&&
!
Common
.
isEmpty
(
areaListR
.
getData
()))
{
areaMap
=
areaListR
.
getData
().
getIdLabelMap
();
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
1
,
"获取区域数据失败"
));
errorMessageList
.
add
(
new
ErrorMessage
(
1
,
"获取区域数据失败"
));
}
}
//获取所有的人员信息
//获取所有的人员信息
...
@@ -433,10 +451,10 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -433,10 +451,10 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
excel
.
setOrganName
(
excel
.
getOrganName
().
trim
());
excel
.
setOrganName
(
excel
.
getOrganName
().
trim
());
SysHouseHoldInfo
household
=
new
SysHouseHoldInfo
();
SysHouseHoldInfo
household
=
new
SysHouseHoldInfo
();
BeanCopyUtils
.
copyProperties
(
excel
,
household
);
BeanCopyUtils
.
copyProperties
(
excel
,
household
);
excel
.
setProvince
(
areaMap
.
get
(
excel
.
getProvince
()));
excel
.
setProvince
(
areaMap
.
get
(
excel
.
getProvince
())
.
getAreaName
()
);
excel
.
setCity
(
areaMap
.
get
(
excel
.
getCity
()));
excel
.
setCity
(
areaMap
.
get
(
excel
.
getCity
())
.
getAreaName
()
);
if
(
Common
.
isNotNull
(
excel
.
getTown
()))
{
if
(
Common
.
isNotNull
(
excel
.
getTown
()))
{
excel
.
setTown
(
areaMap
.
get
(
excel
.
getTown
()));
excel
.
setTown
(
areaMap
.
get
(
excel
.
getTown
())
.
getAreaName
()
);
}
}
//判断模板中是否有户重复的数据
//判断模板中是否有户重复的数据
if
(
null
==
exitNameMap
.
get
(
excel
.
getName
()))
{
if
(
null
==
exitNameMap
.
get
(
excel
.
getName
()))
{
...
@@ -490,6 +508,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -490,6 +508,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
continue
;
continue
;
}
}
//封装和插入数据
//封装和插入数据
household
.
setAreaCode
(
areaMap
.
get
(
household
.
getCity
()).
getAreaCode
());
household
.
setAutoStatus
(
excel
.
getAutoStatus
().
equals
(
CommonConstants
.
IS_TRUE
)
?
"0"
:
"1"
);
household
.
setAutoStatus
(
excel
.
getAutoStatus
().
equals
(
CommonConstants
.
IS_TRUE
)
?
"0"
:
"1"
);
household
.
setType
(
"0"
);
household
.
setType
(
"0"
);
household
.
setHouseType
(
excel
.
getHouseType
().
equals
(
HouseConfigConstants
.
HOUSE_TYPE_ONE
)
?
"0"
:
"1"
);
household
.
setHouseType
(
excel
.
getHouseType
().
equals
(
HouseConfigConstants
.
HOUSE_TYPE_ONE
)
?
"0"
:
"1"
);
...
@@ -511,11 +530,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -511,11 +530,8 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
return
;
return
;
}
}
//获取所有区域数据
//获取所有区域数据
Map
<
String
,
String
>
areaMap
=
new
HashMap
<>();
HashMap
<
String
,
SysArea
>
areaMap
=
initAreaMap
();
R
<
AreaMap
>
areaListR
=
upmsDaprUtils
.
getAreaMapR
();
if
(
Common
.
isEmpty
(
areaMap
))
{
if
(
null
!=
areaListR
&&
!
Common
.
isEmpty
(
areaListR
.
getData
()))
{
areaMap
=
areaListR
.
getData
().
getIdLabelMap
();
}
else
{
errorMessageList
.
add
(
new
ErrorMessage
(
1
,
"获取区域数据失败"
));
errorMessageList
.
add
(
new
ErrorMessage
(
1
,
"获取区域数据失败"
));
}
}
//获取所有的人员信息
//获取所有的人员信息
...
@@ -548,6 +564,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -548,6 +564,7 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if
(
Common
.
isNotNull
(
excel
.
getProvince
())
&&
Common
.
isNotNull
(
excel
.
getCity
()))
{
if
(
Common
.
isNotNull
(
excel
.
getProvince
())
&&
Common
.
isNotNull
(
excel
.
getCity
()))
{
info
.
setProvince
(
excel
.
getProvince
());
info
.
setProvince
(
excel
.
getProvince
());
info
.
setCity
(
excel
.
getCity
());
info
.
setCity
(
excel
.
getCity
());
info
.
setAreaCode
(
areaMap
.
get
(
excel
.
getCity
()).
getAreaCode
());
if
(
Common
.
isNotNull
(
excel
.
getTown
()))
{
if
(
Common
.
isNotNull
(
excel
.
getTown
()))
{
info
.
setTown
(
excel
.
getTown
());
info
.
setTown
(
excel
.
getTown
());
}
else
{
}
else
{
...
@@ -555,13 +572,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -555,13 +572,13 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
}
}
}
}
if
(
Common
.
isNotNull
(
excel
.
getProvince
()))
{
if
(
Common
.
isNotNull
(
excel
.
getProvince
()))
{
excel
.
setProvince
(
areaMap
.
get
(
excel
.
getProvince
()));
excel
.
setProvince
(
areaMap
.
get
(
excel
.
getProvince
())
.
getAreaName
()
);
}
}
if
(
Common
.
isNotNull
(
excel
.
getCity
()))
{
if
(
Common
.
isNotNull
(
excel
.
getCity
()))
{
excel
.
setCity
(
areaMap
.
get
(
excel
.
getCity
()));
excel
.
setCity
(
areaMap
.
get
(
excel
.
getCity
())
.
getAreaName
()
);
}
}
if
(
Common
.
isNotNull
(
excel
.
getTown
()))
{
if
(
Common
.
isNotNull
(
excel
.
getTown
()))
{
excel
.
setTown
(
areaMap
.
get
(
excel
.
getTown
()));
excel
.
setTown
(
areaMap
.
get
(
excel
.
getTown
())
.
getAreaName
()
);
}
}
if
(
Common
.
isEmpty
(
info
)){
if
(
Common
.
isEmpty
(
info
)){
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_NOT_EXIT
,
excel
));
errorMessageList
.
add
(
new
ErrorMessage
(
excel
.
getRowIndex
(),
HouseConfigConstants
.
ERROR_NOT_EXIT
,
excel
));
...
@@ -696,4 +713,22 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
...
@@ -696,4 +713,22 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
}
}
baseMapper
.
updateById
(
info
);
baseMapper
.
updateById
(
info
);
}
}
//获取所有区域数据
private
HashMap
<
String
,
SysArea
>
initAreaMap
()
{
HashMap
<
String
,
SysArea
>
areaMap
=
new
HashMap
<>();
R
<
AreaVo
>
areaListR
=
upmsDaprUtils
.
getAreaListR
();
if
(
null
==
areaListR
||
areaListR
.
getCode
()
!=
CommonConstants
.
SUCCESS
)
{
return
new
HashMap
<>();
}
AreaVo
areaList
=
areaListR
.
getData
();
if
(
null
!=
areaList
&&
!
areaList
.
getSysAreaList
().
isEmpty
())
{
for
(
SysArea
area
:
areaList
.
getSysAreaList
())
{
areaMap
.
put
(
Integer
.
toString
(
area
.
getId
()),
area
);
}
}
else
{
return
new
HashMap
<>();
}
return
areaMap
;
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
View file @
507b4f9c
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/TForecastLibraryServiceImpl.java
View file @
507b4f9c
...
@@ -1274,11 +1274,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
...
@@ -1274,11 +1274,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
}
if
(
CommonConstants
.
ONE_STRING
.
equals
(
social
.
getCollectType
())
if
(
CommonConstants
.
ONE_STRING
.
equals
(
social
.
getCollectType
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
social
.
getValueType
()))
{
&&
CommonConstants
.
ONE_STRING
.
equals
(
social
.
getValueType
()))
{
if
(
social
.
getUnitBigailmentCardinal
(
).
compareTo
(
socialSet
.
getLowerBig
())
<
CommonConstants
.
ZERO_INT
)
{
if
(
BigDecimalUtils
.
isNullToZero
(
social
.
getUnitBigailmentCardinal
()
).
compareTo
(
socialSet
.
getLowerBig
())
<
CommonConstants
.
ZERO_INT
)
{
//按年收取大病方式按定值
//按年收取大病方式按定值
social
.
setPersonalBigailmentCardinal
(
socialSet
.
getLowerBig
());
social
.
setPersonalBigailmentCardinal
(
socialSet
.
getLowerBig
());
social
.
setUnitBigailmentCardinal
(
socialSet
.
getLowerBig
());
social
.
setUnitBigailmentCardinal
(
socialSet
.
getLowerBig
());
}
else
if
(
social
.
getUnitBigailmentCardinal
(
).
compareTo
(
socialSet
.
getUpBig
())
>
CommonConstants
.
ZERO_INT
)
{
}
else
if
(
BigDecimalUtils
.
isNullToZero
(
social
.
getUnitBigailmentCardinal
()
).
compareTo
(
socialSet
.
getUpBig
())
>
CommonConstants
.
ZERO_INT
)
{
social
.
setPersonalBigailmentCardinal
(
socialSet
.
getUpBig
());
social
.
setPersonalBigailmentCardinal
(
socialSet
.
getUpBig
());
social
.
setUnitBigailmentCardinal
(
socialSet
.
getUpBig
());
social
.
setUnitBigailmentCardinal
(
socialSet
.
getUpBig
());
}
}
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TSocialDeadlineInfoServiceImpl.java
View file @
507b4f9c
...
@@ -307,12 +307,30 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
...
@@ -307,12 +307,30 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
if
(
Common
.
isNotNull
(
save
.
getSocialEndDate
()))
{
if
(
Common
.
isNotNull
(
save
.
getSocialEndDate
()))
{
save
.
setSocialEndDate
(
this
.
getNewDateByOldDate
(
save
.
getSocialEndDate
()));
save
.
setSocialEndDate
(
this
.
getNewDateByOldDate
(
save
.
getSocialEndDate
()));
}
}
//2024-12-09 fxj v1.7.3
if
(
Common
.
isNotNull
(
save
.
getSocialStartDateReduce
())){
save
.
setSocialStartDateReduce
(
this
.
getNewDateByOldDate
(
save
.
getSocialStartDateReduce
()));
}
if
(
Common
.
isNotNull
(
save
.
getSocialEndDateReduce
())){
save
.
setSocialEndDateReduce
(
this
.
getNewDateByOldDate
(
save
.
getSocialEndDateReduce
()));
//处理社保减少截止时间和医保减少截止时间
initSocialEndDateReduce
(
holidayMap
,
save
);
}
if
(
Common
.
isNotNull
(
save
.
getMedicalStartDateReduce
())){
save
.
setMedicalStartDateReduce
(
this
.
getNewDateByOldDate
(
save
.
getMedicalStartDateReduce
()));
}
if
(
Common
.
isNotNull
(
save
.
getMedicalEndDateReduce
())){
save
.
setMedicalEndDateReduce
(
this
.
getNewDateByOldDate
(
save
.
getMedicalEndDateReduce
()));
//处理社保减少截止时间和医保减少截止时间
initMedicalEndDateReduce
(
holidayMap
,
save
);
}
initSocialEndDate
(
holidayMap
,
save
);
initSocialEndDate
(
holidayMap
,
save
);
initMedicalEndDate
(
holidayMap
,
save
);
initMedicalEndDate
(
holidayMap
,
save
);
save
.
setUpdateTime
(
null
);
save
.
setUpdateTime
(
null
);
save
.
setUpdateBy
(
null
);
save
.
setUpdateBy
(
null
);
save
.
setUpdateName
(
null
);
save
.
setUpdateName
(
null
);
//已存在跳过
queryWrapper
=
initCountQuery
(
save
,
queryWrapper
);
queryWrapper
=
initCountQuery
(
save
,
queryWrapper
);
if
(
baseMapper
.
selectCount
(
queryWrapper
)
>
0
){
if
(
baseMapper
.
selectCount
(
queryWrapper
)
>
0
){
continue
;
continue
;
...
@@ -458,6 +476,28 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
...
@@ -458,6 +476,28 @@ public class TSocialDeadlineInfoServiceImpl extends ServiceImpl<TSocialDeadlineI
initSocialEndDate
(
holidayMap
,
save
);
initSocialEndDate
(
holidayMap
,
save
);
}
}
private
void
initSocialEndDateReduce
(
Map
<
String
,
String
>
holidayMap
,
TSocialDeadlineInfo
save
)
{
// type 0 休假 1 补班
String
day
=
holidayMap
.
get
(
DateUtil
.
getDay
(
save
.
getSocialEndDateReduce
()));
if
(
Common
.
isNotNull
(
day
)){
save
.
setSocialEndDateReduce
(
DateUtil
.
addDayByDate
(
save
.
getSocialEndDateReduce
(),
CommonConstants
.
ONE_INT_NEGATE
));
}
else
{
return
;
}
initSocialEndDateReduce
(
holidayMap
,
save
);
}
private
void
initMedicalEndDateReduce
(
Map
<
String
,
String
>
holidayMap
,
TSocialDeadlineInfo
save
)
{
// type 0 休假 1 补班
String
day
=
holidayMap
.
get
(
DateUtil
.
getDay
(
save
.
getMedicalEndDateReduce
()));
if
(
Common
.
isNotNull
(
day
)){
save
.
setMedicalEndDateReduce
(
DateUtil
.
addDayByDate
(
save
.
getMedicalEndDateReduce
(),
CommonConstants
.
ONE_INT_NEGATE
));
}
else
{
return
;
}
initMedicalEndDateReduce
(
holidayMap
,
save
);
}
/**
/**
* @Description: 获取 当月启用 的配置
* @Description: 获取 当月启用 的配置
* @Author: hgw
* @Author: hgw
...
...
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelMergeImage.java
View file @
507b4f9c
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
util
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
social
.
util
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
lombok.extern.log4j.Log4j2
;
import
org.apache.commons.compress.utils.IOUtils
;
import
org.apache.commons.compress.utils.IOUtils
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
javax.imageio.ImageIO
;
import
java.io.FileInputStream
;
import
java.awt.Color
;
import
java.io.FileOutputStream
;
import
java.awt.*
;
import
java.io.IOException
;
import
java.awt.image.BufferedImage
;
import
java.io.InputStream
;
import
java.io.*
;
/**
/**
* @Author fxj
* @Author fxj
...
@@ -18,74 +18,10 @@ import java.io.*;
...
@@ -18,74 +18,10 @@ import java.io.*;
* @Description
* @Description
* @Version 1.0
* @Version 1.0
*/
*/
@Log4j2
@Component
@Component
public
class
ExcelMergeImage
{
public
class
ExcelMergeImage
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
excelFilePath
=
"E:\\test\\11\\1.xls"
;
String
imageFilePath
=
"E:\\test\\11\\1.png"
;
//convertExcelToImage(excelFilePath, imageFilePath);
//stampAdder();
}
public
static
void
convertExcelToImage
(
String
excelFilePath
,
String
imageFilePath
)
throws
IOException
{
FileInputStream
fis
=
new
FileInputStream
(
new
File
(
excelFilePath
));
Workbook
workbook
;
if
(
excelFilePath
.
endsWith
(
".xls"
))
{
workbook
=
new
HSSFWorkbook
(
fis
);
// For Excel 97-2003 (.xls) format
}
else
if
(
excelFilePath
.
endsWith
(
".xlsx"
))
{
workbook
=
new
XSSFWorkbook
(
fis
);
// For Excel 2007 and later (.xlsx) format
}
else
{
throw
new
IllegalArgumentException
(
"Unsupported file type"
);
}
Sheet
sheet
=
workbook
.
getSheetAt
(
0
);
int
rowCount
=
16
;
//sheet.getPhysicalNumberOfRows();
int
colCount
=
25
;
//sheet.getRow(0).getPhysicalNumberOfCells();
BufferedImage
image
=
new
BufferedImage
(
896
,
424
,
BufferedImage
.
TYPE_INT_RGB
);
Graphics2D
graphics
=
image
.
createGraphics
();
for
(
int
i
=
0
;
i
<
rowCount
;
i
++)
{
Row
row
=
sheet
.
getRow
(
i
);
for
(
int
j
=
0
;
j
<
colCount
;
j
++)
{
Cell
cell
=
row
.
getCell
(
j
);
if
(
cell
!=
null
)
{
graphics
.
fillRect
(
j
*
150
,
i
*
47
,
896
,
424
);
graphics
.
setColor
(
Color
.
black
);
// 设置边框颜色
graphics
.
drawRect
(
j
*
150
,
i
*
47
,
896
,
424
);
String
cellValue
=
getCellValueAsString
(
cell
);
graphics
.
drawString
(
cellValue
,
j
*
150
+
10
,
i
*
45
+
30
);
}
}
}
graphics
.
dispose
();
ImageIO
.
write
(
image
,
"png"
,
new
File
(
imageFilePath
));
workbook
.
close
();
fis
.
close
();
}
private
static
String
getCellValueAsString
(
Cell
cell
)
{
String
cellValue
=
""
;
if
(
cell
!=
null
)
{
switch
(
cell
.
getCellType
())
{
case
STRING:
cellValue
=
cell
.
getStringCellValue
();
break
;
case
NUMERIC:
cellValue
=
String
.
valueOf
(
cell
.
getNumericCellValue
());
break
;
case
BOOLEAN:
cellValue
=
String
.
valueOf
(
cell
.
getBooleanCellValue
());
break
;
case
FORMULA:
cellValue
=
cell
.
getCellFormula
();
break
;
default
:
cellValue
=
""
;
}
}
return
cellValue
;
}
/**
/**
* @Author fxj
* @Author fxj
* @Description 03格式excel添加电子印章或图片
* @Description 03格式excel添加电子印章或图片
...
@@ -93,10 +29,10 @@ public class ExcelMergeImage {
...
@@ -93,10 +29,10 @@ public class ExcelMergeImage {
* @Param
* @Param
* @return
* @return
**/
**/
public
FileOutputStream
addPictureToExcel
(
FileInputStream
fis
,
public
void
addPictureToExcel
(
FileInputStream
fis
,
InputStream
imageIs
,
InputStream
imageIs
,
FileOutputStream
fileOut
,
FileOutputStream
fileOut
,
int
SheetNum
){
int
SheetNum
,
String
type
){
Workbook
workbook
=
null
;
Workbook
workbook
=
null
;
try
{
try
{
workbook
=
new
HSSFWorkbook
(
fis
);
workbook
=
new
HSSFWorkbook
(
fis
);
...
@@ -104,17 +40,27 @@ public class ExcelMergeImage {
...
@@ -104,17 +40,27 @@ public class ExcelMergeImage {
// 在合适的位置添加印章
// 在合适的位置添加印章
Drawing
<?>
drawing
=
sheet
.
createDrawingPatriarch
();
Drawing
<?>
drawing
=
sheet
.
createDrawingPatriarch
();
CreationHelper
helper
=
workbook
.
getCreationHelper
();
CreationHelper
helper
=
workbook
.
getCreationHelper
();
ClientAnchor
anchor
=
helper
.
createClientAnchor
();
ClientAnchor
anchor
=
helper
.
createClientAnchor
();
anchor
.
setCol1
(
2
);
anchor
.
setCol1
(
2
);
anchor
.
setRow1
(
0
);
anchor
.
setRow1
(
0
);
anchor
.
setCol2
(
4
);
// 按花名册类型特殊处理对应印章的效果
anchor
.
setRow2
(
7
);
if
(
CommonConstants
.
TWO_STRING
.
equals
(
type
)){
anchor
.
setCol2
(
5
);
anchor
.
setRow2
(
6
);
}
else
if
(
CommonConstants
.
FOUR_STRING
.
equals
(
type
)
||
CommonConstants
.
THREE_STRING
.
equals
(
type
)){
anchor
.
setCol2
(
5
);
anchor
.
setRow2
(
8
);
}
else
{
anchor
.
setCol2
(
4
);
anchor
.
setRow2
(
7
);
}
// 添加印章图片
// 添加印章图片
int
pictureIdx
=
workbook
.
addPicture
(
IOUtils
.
toByteArray
(
imageIs
),
Workbook
.
PICTURE_TYPE_PNG
);
int
pictureIdx
=
workbook
.
addPicture
(
IOUtils
.
toByteArray
(
imageIs
),
Workbook
.
PICTURE_TYPE_PNG
);
drawing
.
createPicture
(
anchor
,
pictureIdx
);
drawing
.
createPicture
(
anchor
,
pictureIdx
);
workbook
.
write
(
fileOut
);
workbook
.
write
(
fileOut
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
e
.
printStackTrace
(
);
log
.
error
(
"excel插入电子印章异常:{}"
,
e
.
getMessage
()
);
}
finally
{
}
finally
{
try
{
try
{
if
(
null
!=
fis
){
if
(
null
!=
fis
){
...
@@ -123,10 +69,15 @@ public class ExcelMergeImage {
...
@@ -123,10 +69,15 @@ public class ExcelMergeImage {
if
(
null
!=
workbook
){
if
(
null
!=
workbook
){
workbook
.
close
();
workbook
.
close
();
}
}
if
(
null
!=
imageIs
){
imageIs
.
close
();
}
if
(
null
!=
fileOut
){
fileOut
.
close
();
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
return
fileOut
;
}
}
}
}
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/util/ExcelToImage.java
View file @
507b4f9c
...
@@ -6,9 +6,11 @@ import com.spire.xls.Worksheet;
...
@@ -6,9 +6,11 @@ import com.spire.xls.Worksheet;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.OSSUtil
;
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.util.R
;
import
groovyjarjarpicocli.CommandLine
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.net.URL
;
...
@@ -22,7 +24,10 @@ import java.net.URL;
...
@@ -22,7 +24,10 @@ import java.net.URL;
public
class
ExcelToImage
{
public
class
ExcelToImage
{
public
R
<
URL
>
excelToImg
(
InputStream
inputStream
,
OSSUtil
ossUtil
){
public
R
<
URL
>
excelToImg
(
InputStream
inputStream
,
OSSUtil
ossUtil
){
String
projectRoot
=
System
.
getProperty
(
"user.dir"
);
if
(
null
==
inputStream
||
null
==
ossUtil
){
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
":带印章excel生成图片传参异常"
);
}
String
projectRoot
=
System
.
getProperty
(
CommonConstants
.
USER_DIR
);
//加载Excel工作表
//加载Excel工作表
Workbook
wb
=
new
Workbook
();
Workbook
wb
=
new
Workbook
();
wb
.
loadFromHtml
(
inputStream
);
wb
.
loadFromHtml
(
inputStream
);
...
@@ -42,12 +47,18 @@ public class ExcelToImage {
...
@@ -42,12 +47,18 @@ public class ExcelToImage {
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
":ExcelToImage转换异常-"
+
e
.
getMessage
());
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
+
":ExcelToImage转换异常-"
+
e
.
getMessage
());
}
finally
{
}
finally
{
if
(
file
.
exists
()){
if
(
file
.
exists
()){
file
.
delete
();
file
.
delete
();
}
}
if
(
null
!=
inputStream
){
try
{
inputStream
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
);
return
R
.
failed
(
CommonConstants
.
RESULT_DATA_FAIL
);
//调用方法,将指定Excel单元格数据范围保存为图片
//调用方法,将指定Excel单元格数据范围保存为图片
...
...
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoMapper.xml
View file @
507b4f9c
...
@@ -2260,10 +2260,12 @@
...
@@ -2260,10 +2260,12 @@
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
AND a.social_id is not null
AND a.social_id is not null
<if
test=
'tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() == "0" '
>
<if
test=
"tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() != ''"
>
AND a.social_id = #{tDispatchInfo.socialId}
AND a.SOCIAL_ID = #{tDispatchInfo.socialId}
</if>
<if
test=
"tDispatchInfo.syFlag != null and tDispatchInfo.syFlag.trim() == '1'"
>
AND a.STATUS = '2'
</if>
</if>
<!-- dispatch-status 未提交1待审核2审核通过3审核不通过4办理完成5待SSC审核 -->
<!-- dispatch-status 未提交1待审核2审核通过3审核不通过4办理完成5待SSC审核 -->
<if
test=
'tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "0" '
>
<if
test=
'tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "0" '
>
AND a.STATUS in ('2','4')
AND a.STATUS in ('2','4')
...
@@ -2360,9 +2362,13 @@
...
@@ -2360,9 +2362,13 @@
<sql
id=
"where_getSocialPersionDisRecord"
>
<sql
id=
"where_getSocialPersionDisRecord"
>
a.DELETE_FLAG = 0
a.DELETE_FLAG = 0
AND a.social_id is not null
AND a.social_id is not null
<if
test=
'tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() == "0" '
>
<if
test=
"tDispatchInfo.socialId != null and tDispatchInfo.socialId.trim() != ''"
>
AND a.
social_id
= #{tDispatchInfo.socialId}
AND a.
SOCIAL_ID
= #{tDispatchInfo.socialId}
</if>
</if>
<if
test=
"tDispatchInfo.syFlag != null and tDispatchInfo.syFlag.trim() == '1'"
>
AND a.STATUS = '2'
</if>
<!-- dispatch-status 未提交1待审核2审核通过3审核不通过4办理完成5待SSC审核 -->
<!-- dispatch-status 未提交1待审核2审核通过3审核不通过4办理完成5待SSC审核 -->
<if
test=
'tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "0"'
>
<if
test=
'tDispatchInfo.auditStatus != null and tDispatchInfo.auditStatus.trim() == "0"'
>
AND a.STATUS in ('2','4')
AND a.STATUS in ('2','4')
...
...
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