Commit 04fb9df5 authored by fangxinjiang's avatar fangxinjiang

Merge branch 'develop' into MVP1.2

# Conflicts:
#	yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TSettleDomainController.java
#	yifu-common/yifu-common-core/src/main/java/com/yifu/cloud/plus/v1/yifu/common/core/constant/CommonConstants.java
parents c6e32398 d56d42d9
......@@ -102,6 +102,7 @@
<module>yifu-insurances</module>
<module>yifu-salary</module>
<module>yifu-order</module>
<module>yifu-mail</module>
</modules>
<dependencyManagement>
......
......@@ -127,7 +127,7 @@ public class EmployeeProjectExportVO {
/**
* 身份证-省
*/
@ExcelAttribute(name = "户籍所在省", isArea = true)
@ExcelAttribute(name = "户籍所在省")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在省")
private String idProvince;
......@@ -137,7 +137,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在市")
@ExcelAttribute(name = "户籍所在市", isArea = true, parentField = "idProvince")
@ExcelAttribute(name = "户籍所在市")
private String idCity;
/**
......@@ -145,7 +145,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "户籍所在县")
@ExcelAttribute(name = "户籍所在县", isArea = true, parentField = "idCity")
@ExcelAttribute(name = "户籍所在县")
private String idTown;
/**
......@@ -161,7 +161,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在省")
@ExcelAttribute(name = "档案所在省", isArea = true)
@ExcelAttribute(name = "档案所在省")
private String fileProvince;
/**
......@@ -169,7 +169,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在市")
@ExcelAttribute(name = "档案所在市", isArea = true, parentField = "fileProvince")
@ExcelAttribute(name = "档案所在市")
private String fileCity;
/**
......@@ -177,7 +177,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "档案所在县")
@ExcelAttribute(name = "档案所在县", isArea = true, parentField = "fileCity")
@ExcelAttribute(name = "档案所在县")
private String fileTown;
/**
......@@ -243,10 +243,11 @@ public class EmployeeProjectExportVO {
/**
* 人员档案状态(0草稿、1已审核)
* , readConverterExp = "0=草稿,1=已审核"
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value = "人员档案状态")
@ExcelAttribute(name = "人员档案状态", readConverterExp = "0=草稿,1=已审核")
@ExcelAttribute(name = "人员档案状态")
private String proStatus;
/**
......@@ -429,7 +430,7 @@ public class EmployeeProjectExportVO {
*/
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty(value ="近3个月发薪")
@ExcelAttribute(name = "近3个月发薪", readConverterExp = "0=无,1=是,2=否")
@ExcelAttribute(name = "近3个月发薪", isDataId = true,dataType = ExcelAttributeConstants.FILE_SALARY_STATUS)
private String salaryStatus;
/**
......
......@@ -72,7 +72,19 @@ public class TSettleDomainController {
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/page")
public R<IPage<TSettleDomain>> getTSettleDomainPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain) {
return R.ok(tSettleDomainService.page(page, Wrappers.query(tSettleDomain)));
return R.ok(tSettleDomainService.getPage(page, tSettleDomain));
}
/**
* 不分页查询
*
* @param tSettleDomain 项目表
* @return
*/
@Operation(summary = "不分页查询", description = "不分页查询")
@GetMapping("/noPage")
public R<List<TSettleDomain>> getTSettleDomainNoPage(TSettleDomain tSettleDomain) {
return R.ok(tSettleDomainService.getList(tSettleDomain));
}
......@@ -311,5 +323,4 @@ public class TSettleDomainController {
public R<IPage<IdNameNoVo>> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNo) {
return R.ok(tSettleDomainService.getUnitPage(page, idNameNo));
}
}
......@@ -56,12 +56,6 @@ public interface TEmployeeProjectMapper extends BaseMapper<TEmployeeProject> {
IPage<TEmployeeProject> getTEmployeeProjectInfoPage(Page page, @Param("tEmployeeProject") TEmployeeProject tEmployeeProject);
/**
* 获得导出的项目档案列表
* @param tEmployeeProject
* @return
*/
List<EmployeeProjectExportVO> getTEmployeeProjectExportPage(@Param("tEmployeeProject") EmployeeProjectExportParamVO tEmployeeProject);
// getTEmployeeProjectExportPage 改造
List<EmployeeProjectExportVO> noPageDiy(@Param("tEmployeeProject")EmployeeProjectExportParamVO searchVo);
......
......@@ -40,6 +40,8 @@ public interface TSettleDomainMapper extends BaseMapper<TSettleDomain> {
IPage<TSettleDomain> getPage(Page<TSettleDomain> page, @Param("tSettleDomain") TSettleDomain tSettleDomain);
List<TSettleDomain> getPage(@Param("tSettleDomain") TSettleDomain tSettleDomain);
IPage<IdNameNoVo> getUnitPage(Page<IdNameNoVo> page, @Param("idNameNoVo") IdNameNoVo idNameNoVo);
/**
* @param departNo
......
......@@ -35,8 +35,25 @@ import java.util.List;
*/
public interface TSettleDomainService extends IService<TSettleDomain> {
/**
* @param page
* @param tSettleDomain
* @Description: 分页列表
* @Author: hgw
* @Date: 2022/12/1 14:22
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain>
**/
IPage<TSettleDomain> getPage(Page<TSettleDomain> page, TSettleDomain tSettleDomain);
/**
* @param tSettleDomain
* @Description: 全部list
* @Author: hgw
* @Date: 2022/12/1 14:22
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.archives.entity.TSettleDomain>
**/
List<TSettleDomain> getList(TSettleDomain tSettleDomain);
/**
* @param page
* @param idNameNoVo
......
......@@ -1117,24 +1117,23 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
response.setContentType(CommonConstants.MULTIPART_FORM_DATA);
response.setCharacterEncoding("utf-8");
response.setHeader(CommonConstants.CONTENT_DISPOSITION, CommonConstants.ATTACHMENT_FILENAME + URLEncoder.encode(fileName , "UTF-8"));
ExcelUtil<EmployeeProjectExportVO> util = new ExcelUtil<>(EmployeeProjectExportVO.class);
// 获取所有字典type
Map<String,String> nameAndDicTypeMap = util.getConverterDicType();
// 获取所有字典对应的值
Map<String,String> redisLabelMap = (Map<String, String>) RedisUtil.redis.opsForValue().get(CacheConstants.REDIS_DICT_LABLE);
// 这里 需要指定写用哪个class去写,然后写到第一个sheet,然后文件流会自动关闭
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeProjectExportVO.class).includeColumnFieldNames(includeColumnFiledNames).build();
ExcelWriter excelWriter = EasyExcel.write(out, EmployeeProjectExportVO.class)
.registerConverter(new DictConverter(nameAndDicTypeMap,redisLabelMap))
.includeColumnFieldNames(includeColumnFiledNames).build();
int index = 0;
if (count > CommonConstants.ZERO_INT){
Field[] allFields = EmployeeProjectExportVO.class.getDeclaredFields();
WriteSheet writeSheet;
ExcelUtil<EmployeeProjectExportVO> util;
for (int i = 0; i <= count; i += CommonConstants.EXCEL_EXPORT_LIMIT) {
// 获取实际记录
searchVo.setLimitStart(i);
searchVo.setLimitEnd(CommonConstants.EXCEL_EXPORT_LIMIT);
list = noPageDiy(searchVo);
if (Common.isNotNull(list)){
util = new ExcelUtil<>(EmployeeProjectExportVO.class);
for (EmployeeProjectExportVO vo:list){
util.convertEntityAsso(vo,null,null,null,allFields);
}
}
if (Common.isNotNull(list)){
writeSheet = EasyExcel.writerSheet("项目档案批量导出"+index).build();
excelWriter.write(list,writeSheet);
......
......@@ -72,6 +72,11 @@ public class TSettleDomainServiceImpl extends ServiceImpl<TSettleDomainMapper, T
return baseMapper.getPage(page, tSettleDomain);
}
@Override
public List<TSettleDomain> getList(TSettleDomain tSettleDomain) {
return baseMapper.getPage(tSettleDomain);
}
@Override
public IPage<IdNameNoVo> getUnitPage(Page<IdNameNoVo> page, IdNameNoVo idNameNoVo) {
return baseMapper.getUnitPage(page, idNameNoVo);
......
......@@ -194,28 +194,28 @@
a.TRY_PERIOD,
a.PROJECT_SOURCE,
a.CONTRACT_STATUS,
b.STATUS AS PROSTATUS,
if(b.STATUS=0,'草稿','已审核') AS PROSTATUS,
b.CREATE_NAME AS PROCREATE_NAME,
b.CREATE_TIME AS PROCREATE_TIME,
b.EMP_PHONE,
a.INSURANCE_STATUS,
a.SOCIAL_STATUS,
a.FUND_STATUS,
b.FILE_PROVINCE,
b.FILE_CITY,
b.FILE_TOWN,
a.SOCIAL_PROVINCE,
a.SOCIAL_CITY,
a.SOCIAL_TOWN,
a4.AREA_NAME FILE_PROVINCE,
a5.AREA_NAME FILE_CITY,
a6.AREA_NAME FILE_TOWN,
a7.AREA_NAME SOCIAL_PROVINCE,
a8.AREA_NAME SOCIAL_CITY,
a9.AREA_NAME SOCIAL_TOWN,
a.SALARY_STATUS,
b.VALIDITY_START,
b.VALIDITY_END,
b.EMP_MARRI_STATUS,
b.EMP_NATIONAL,
b.POLITICAL_STATUS,
b.ID_PROVINCE,
b.ID_CITY,
b.ID_TOWN,
a1.AREA_NAME ID_PROVINCE,
a2.AREA_NAME ID_CITY,
a3.AREA_NAME ID_TOWN,
b.EMP_REGIS_TYPE,
b.IS_COLLEGE,
b.HIGN_EDUCATION,
......@@ -224,7 +224,7 @@
b.ADMISSION_DATE,
b.GRADUTION_DATE,
b.REMARK,
a.STATUS,
if(a.STATUS=0,'草稿','已审核') STATUS,
a.CREATE_NAME,
a.CREATE_TIME,
b.EMP_EMAIL,
......@@ -799,21 +799,6 @@
</where>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询-->
<select id="getTEmployeeProjectExportPage" resultMap="tEmployeeProjectExportMap">
SELECT
<include refid="Base_Export_List"/>
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
<where>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
<if test="tEmployeeProject.authSql != null and tEmployeeProject.authSql.trim() != ''">
${tEmployeeProject.authSql}
</if>
</where>
order by a.CREATE_TIME desc
</select>
<!--tEmployeeInfo导出查询改造 fxj 2022-11-03-->
<select id="noPageDiy" resultMap="tEmployeeProjectExportMap">
......@@ -821,6 +806,15 @@
<include refid="Base_Export_List"/>
FROM t_employee_project a
left join t_employee_info b on a.EMP_ID = b.id
LEFT JOIN sys_area a1 on a1.id=b.ID_PROVINCE
LEFT JOIN sys_area a2 on a2.id=b.ID_CITY
LEFT JOIN sys_area a3 on a3.id=b.ID_TOWN
LEFT JOIN sys_area a4 on a4.id=b.FILE_PROVINCE
LEFT JOIN sys_area a5 on a5.id=b.FILE_CITY
LEFT JOIN sys_area a6 on a6.id=b.FILE_TOWN
LEFT JOIN sys_area a7 on a7.id=a.SOCIAL_PROVINCE
LEFT JOIN sys_area a8 on a8.id=a.SOCIAL_CITY
LEFT JOIN sys_area a9 on a9.id=a.SOCIAL_TOWN
<where>
a.DELETE_FLAG = '0'
<include refid="exportTEmployeeProject_where"/>
......
......@@ -215,6 +215,7 @@
and a.STOP_FLAG = #{tSettleDomain.stopFlag}
</if>
</if>
order by CREATE_TIME desc
</select>
<select id="getUnitPage" resultType="com.yifu.cloud.plus.v1.yifu.archives.vo.IdNameNoVo">
......@@ -287,8 +288,7 @@
a.INVOICE_TITLE_INSURANCE,
a.BPO_FLAG
FROM t_settle_domain a
where 1=1
and a.DELETE_FLAG = '0'
where a.DELETE_FLAG = '0'
<if test="codes != null and codes.size() > 0">
and a.DEPART_NO in
<foreach collection="codes" item="param" index="index" open="(" close=")" separator=",">
......
......@@ -505,5 +505,6 @@ public interface CommonConstants {
// 权限使用的
public static final String A_DEPT_ID = "a.dept_id";
public static final String A_CREATE_BY = "a.CREATE_BY";
String SETTLE_DOMAIN_GET_ERROR = "获取结算主体信息失败!";
}
......@@ -28,6 +28,8 @@ public class ExcelAttributeConstants {
public static final String SOCIAL_ECURITY_STATE = "social_ecurity_state";
// 公积金状态
public static final String FUND_STATUS = "fund_status";
// 档案近3个月发薪状态
public static final String FILE_SALARY_STATUS = "file_salary_status";
// 减档原因
public static final String DOWNSHIFT_REASON = "downshift_reason";
......
/*
* Copyright (c) 2020 yifu4cloud Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yifu.cloud.plus.v1.yifu.common.dapr.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/*
*
*
* @author fxj
* @date 2022-05-23 14:28
**/
@Data
@Component
@PropertySource("classpath:daprConfig.properties")
@ConfigurationProperties(value = "dapr.mail", ignoreInvalidFields = false)
public class DaprMailProperties {
String appUrl;
String appId;
String appPort;
String httpPort;
String grpcPort;
String metricsPort;
}
package com.yifu.cloud.plus.v1.yifu.common.dapr.util;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprCheckProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprMailProperties;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
/**
* @Author fxj
* @Description 邮件发送工具类
* @Date 17:53 2022/12/1
**/
@Log4j2
@EnableConfigurationProperties(DaprMailProperties.class)
public class MailDaprUtil {
@Autowired
private DaprCheckProperties daprCheckProperties;
/**
* @Author fxj
* @Description 身份证&姓名一致性校验
* @Date 21:15 2022/7/18
* @Param
* @return
**/
/*public R<TCheckIdCard> checkIdCardSingle(TCheckIdCard tCheckIdCard){
R<TCheckIdCard> res = HttpDaprUtil.invokeMethodPost(daprCheckProperties.getAppUrl(),daprCheckProperties.getAppId(),"/tcheckidcard/inner/checkIdCardSingle",JSON.toJSONString(tCheckIdCard), TCheckIdCard.class, SecurityConstants.FROM_IN);
if (Common.isEmpty(res)){
return R.failed("校验身份证信息失败!");
}
return res;
}*/
}
......@@ -22,7 +22,7 @@ public class TInsuranceEnclosure extends BaseEntity {
*/
@TableId(type = IdType.ASSIGN_ID)
@Schema(description = "主键")
private Integer id;
private String id;
/**
* 附件名
......
# 忽略匹配下列规则的Git 提交 V2.1.0
### gradle ###
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar
### STS ###
.settings/
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
bin/
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
*.lock
rebel.xml
### NetBeans ###
nbproject/private/
build/
nbbuild/
nbdist/
.nb-gradle/
### maven ###
target/
*.war
*.ear
*.zip
*.tar
*.tar.gz
### logs ####
/logs/
*.log
### temp ignore ###
*.cache
*.diff
*.patch
*.tmp
*.java~
*.properties~
*.xml~
### system ignore ###
.DS_Store
Thumbs.db
Servers
.metadata
upload
gen_code
### node ###
node_modules
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>yifu-mail</artifactId>
<description>邮件服务</description>
<packaging>pom</packaging>
<!--项目子模块-->
<modules>
<module>yifu-mail-api</module>
<module>yifu-mail-biz</module>
</modules>
</project>
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>yifu-mail-api</artifactId>
<packaging>jar</packaging>
<description>身份证+手机号验证模块</description>
<dependencies>
<!-- core 工具类 -->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-core</artifactId>
</dependency>
<!--swagger 注解-->
<!--<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>-->
<!--feign 注解依赖-->
<!--<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<optional>true</optional>
</dependency>-->
<!--mybatis 依赖-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-mybatis</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
</dependencies>
</project>
package com.yifu.cloud.plus.v1.check.constant;
/**
* @Author fxj
* @Date 2022/6/21
* @Description
* @Version 1.0
*/
public interface ChecksConstants {
String NACOS_CHECK_CONFIG_ERROR="nacos中checks.yaml的配置canCheck未开启!";
String CODE="code";
String DATA="data";
String CODE_200000="200000";
String NO_DATA_RESULT="接口无返回数据";
String MESSAGE="message";
String MESSAGE_INFO = ",msg:";
String MOBILE="mobile";
String AREA="area";
String NUMBER_TYPE ="numberType";
String CHARGES_STATUS = "chargesStatus";
String STATUS="status";
String RESULT="result";
String REMARK="remark";
String APP_ID ="appId";
String APP_KEY="appKey";
String MOBILES="mobiles";
String NAME="name";
String ID_NUM="idNum";
String CARD_NO="cardNo";
}
package com.yifu.cloud.plus.v1.mail.entity;
import lombok.Data;
/**
* @Author fxj
* @Date 2022/12/8
* @Description
* @Version 1.0
*/
@Data
public class Email {
private String[] user;
private String subject;
private String content;
}
package com.yifu.cloud.plus.v1.check.utils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpStatus;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.RequestBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.util.EntityUtils;
import java.nio.charset.Charset;
import java.util.Map;
/**
* @author hgw2
* @description 发送
* @date 2022/5/7
*/
public class HttpUtils {
private static final int REQUEST_TIMEOUT = 3 * 1000; // 设置请求超时10秒钟
private static final int CONNECT_TIMEOUT = 5 * 1000; // 连接超时时间
private static final int SO_TIMEOUT = 10 * 1000; // 数据传输超时
private static final String ENCODING = "UTF-8";
// 务必单例
private static CloseableHttpClient client;
static {
RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(CONNECT_TIMEOUT)
.setConnectionRequestTimeout(REQUEST_TIMEOUT)
.setSocketTimeout(SO_TIMEOUT)
.build();
client = HttpClients.custom().setDefaultRequestConfig(requestConfig).setMaxConnTotal(50).build();
}
public static String get(String url, Map<String, String> paramsMap) {
return send(RequestBuilder.get(url), paramsMap);
}
public static String post(String url, Map<String, String> paramsMap) {
return send(RequestBuilder.post(url), paramsMap);
}
public static String send(RequestBuilder requestBuilder, Map<String, String> paramsMap) {
requestBuilder.setCharset(Charset.forName(ENCODING));
String responseText = "";
if (paramsMap != null) {
for (Map.Entry<String, String> param : paramsMap.entrySet()) {
requestBuilder.addParameter(param.getKey(), param.getValue());
}
CloseableHttpResponse response = null;
try {
response = client.execute(requestBuilder.build());
if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
HttpEntity entity = response.getEntity();
if (entity != null) {
responseText = EntityUtils.toString(entity, ENCODING);
}
}
} catch (Exception e) {
e.printStackTrace();//正式项目中请改为log打印
} finally {
try {
response.close();
} catch (Exception e) {
e.printStackTrace();//正式项目中请改为log打印
}
}
}
return responseText;
}
}
package com.yifu.cloud.plus.v1.mail.utils;
/**
* @author hgw2
* @description 测试身份证
* @date 2022/5/7
*/
public class MailUtil {
}
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.yifu.cloud.plus.v1.mail.utils.MailUtil
\ No newline at end of file
FROM moxm/java:1.8-full
RUN mkdir -p /yifu-mail-biz
WORKDIR yifu-mail-biz
ARG JAR_FILE=target/yifu-mail-biz.jar
COPY ${JAR_FILE} app.jar
EXPOSE 5022
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
CMD sleep 60; java -jar app.jar $JAVA_OPTS
#!/usr/bin/env bash
mvn clean package -Pprd -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
#!/usr/bin/env bash
mvn clean package -Ptest -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
#!/usr/bin/env bash
mvn clean package -Dmaven.test.skip=true docker:build -DpushImage
\ No newline at end of file
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>yifu-mail-biz</artifactId>
<packaging>jar</packaging>
<description>身份证+手机号验证模块</description>
<dependencies>
<!--选配: 依赖seata模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-seata</artifactId>
</dependency>
<!-- email -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>2.6.7</version>
</dependency>
<!--必备: 依赖api模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-mail-api</artifactId>
<version>1.0.0</version>
</dependency>
<!--必备:安全模块-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-security</artifactId>
</dependency>
<!--必备:日志处理-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-log</artifactId>
</dependency>
<!--必备:swagger-->
<dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-swagger</artifactId>
</dependency>
<!--必备:undertow容器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<serverId>docker-hub</serverId>
<!--指定生成的镜像名-->
<imageName>${my.hub.host}/${map.group.name}/${project.artifactId}:${project.version}</imageName>
<dockerDirectory>${project.basedir}/</dockerDirectory>
<!--指定远程 docker api地址-->
<!--<dockerHost>http://172.16.66.232:2375</dockerHost>-->
<!-- 这里是复制 jar 包到 docker 容器指定目录配置-->
<resources>
<resource>
<targetPath>/</targetPath>
<!--jar 包所在的路径 此处配置的 即对应 target 目录-->
<directory>${project.build.directory}</directory>
<!-- 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 -->
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<forceTags>true</forceTags>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.yifu.cloud.plus.v1.mail;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.EnableYifuResourceServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author pig archetype
* <p>
* 项目启动类
*/
@EnableYifuResourceServer
@SpringBootApplication
public class MailApplication {
public static void main(String[] args) {
SpringApplication.run(MailApplication.class, args);
}
}
/*
* 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.mail.controller;
import com.yifu.cloud.plus.v1.mail.service.MailService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Author fxj
* @Description 邮件发送服务
* @Date 17:39 2022/12/1
**/
@RestController
@RequiredArgsConstructor
@RequestMapping("/mail" )
@Tag(name = "邮件发送服务")
public class MailController {
private final MailService mailService;
/**
* 邮件发送服务
* @return
*/
@Operation(summary = "分页查询", description = "分页查询")
@GetMapping("/sendMail" )
public R getTCheckMobilePage() {
return R.ok(mailService.sendMail(null));
}
}
package com.yifu.cloud.plus.v1.mail.service;
import com.yifu.cloud.plus.v1.mail.entity.Email;
/**
* @Author fxj
* @Description
* @Date 17:38 2022/12/1
* @Param
* @return
**/
public interface MailService {
Boolean sendMail(Email email);
}
package com.yifu.cloud.plus.v1.mail.service.impl;
import com.yifu.cloud.plus.v1.mail.entity.Email;
import com.yifu.cloud.plus.v1.mail.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.stereotype.Service;
/**
* @Author fxj
* @Description 邮件发送服务
* @Date 17:41 2022/12/1
**/
@Service("mailService")
public class MailServiceImpl implements MailService {
@Autowired
private JavaMailSender mailSender;
@Override
public Boolean sendMail(Email email) {
SimpleMailMessage mailMessage = new SimpleMailMessage();
mailMessage.setFrom("information@wanxin-holdings.com");
mailMessage.setTo("fangxinjiang@wanxin-holdings.com");
mailMessage.setText("你好 hello world");
mailMessage.setSubject("测试Spring邮箱服务");
mailSender.send(mailMessage);
System.out.println("====完成发送!====");
return null;
}
}
# 数据源配置
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: dev
redis:
host: 127.0.0.1
password: '@yf_2017'
mail:
host: smtp.exmail.qq.com
port: 465
username: information@wanxin-holdings.com
password: QmdCaQSPmCAQEddd
protocol: smtp
default-encoding: UTF-8
properties:
mail.smtp.auth: true
mail.smtp.starttls.enable: true
mail.smtp.starttls.required: true
mail.smtp.socketFactory.port: 465
mail.smtp.socketFactory.class: javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback: false
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_mail?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
## spring security 配置
security:
oauth2:
resource:
loadBalanced: true
token-info-uri: http://127.0.0.1:3000/oauth/check_token
# 直接放行URL
ignore:
urls:
- /v3/api-docs
- /actuator/**
- /swagger-ui/**
- /sendMail/**
\ No newline at end of file
# 数据源配置
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
config:
activate:
on-profile: test
redis:
host: 192.168.1.65
port: 22379
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_job?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
hikari:
driver-class-name: ${spring.datasource.driver-class-name}
jdbc-url: ${spring.datasource.url}
username: ${spring.datasource.username}
password: ${spring.datasource.password}
pool-name: AmytangHikariCP
minimum-idle: 10 # 最小空闲连接数量
idle-timeout: 60000 # 空闲连接存活最大时间,默认600000(10分钟)
maximum-pool-size: 12 # 连接池最大连接数,默认是10
auto-commit: true #此属性控制从池返回的连接的默认自动提交行为,默认值:true
max-lifetime: 0 #此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认1800000即30分钟
## spring security 配置
security:
oauth2:
resource:
loadBalanced: true
token-info-uri: http://127.0.0.1:3000/oauth/check_token
# 直接放行URL
ignore:
urls:
- /v3/api-docs
- /actuator/**
- /swagger-ui/**
\ No newline at end of file
server:
port: 5024
# 加解密根密码
jasypt:
encryptor:
password: yifu #根密码
# 暴露监控端点
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
# mybaits-plus配置
mybatis-plus:
mapper-locations: classpath:/mapper/*Mapper.xml
global-config:
banner: false
db-config:
id-type: auto
table-underline: true
logic-delete-value: 1
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
spring:
application:
name: @artifactId@
#swagger 文档 https://springdoc.org/
### OpenAPI3 注解
# OpenAPI 3 注解位置
# @Tag(name = “接口类描述”) Controller 类上
# @Operation(summary =“接口方法描述”) Controller 方法上
# @Parameters Controller 方法上
# @Parameter(description=“参数描述”) Controller 方法上 @Parameters 里
# @Parameter(description=“参数描述”) Controller 方法的参数上
# @Parameter(hidden = true) 或 @Hidden --
# @Schema DTO类上
# @Schema DTO属性上
springdoc:
api-docs:
#是否开启文档功能
enabled: true
#swagger后端请求地址
path: /api-docs
swagger-ui:
#自定义swagger前端请求路径,输入http:127.0.0.1:8080/test会自动重定向到swagger页面
path: /api
#包扫描路径
packages-to-scan: com.yifu.cloud.plus.v1.mail.controller
#这里定义了两个分组,可定义多个,也可以不定义
group-configs:
#分组名
#- group: admin
#按路径匹配
# pathsToMatch: /admin/**
#分组名
- group: mail
#按包路径匹配
packagesToScan: com.yifu.cloud.plus.v1.mail.controller
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="false">
<springProperty scop="context" name="spring.application.name" source="spring.application.name" defaultValue=""/>
<property name="log.path" value="logs/${spring.application.name}"/>
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN"
value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter"/>
<conversionRule conversionWord="wex"
converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter"/>
<conversionRule conversionWord="wEx"
converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter"/>
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- Log file debug output -->
<appender name="debug" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/debug.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/%d{yyyy-MM, aux}/debug.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
</encoder>
</appender>
<!-- Log file error output -->
<appender name="error" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}/error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${log.path}/%d{yyyy-MM}/error.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
<pattern>%date [%thread] %-5level [%logger{50}] %file:%line - %msg%n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="INFO">
<appender-ref ref="console"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
</root>
</configuration>
......@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.yifu.social.entity;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
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.core.constant.ExcelAttribute;
......@@ -130,4 +131,52 @@ public class SysHouseHoldInfo extends BaseEntity {
@ExcelProperty("所属机构名称")
private String organName;
/**
* 审核人id
*/
@ExcelAttribute(name = "审核人id" )
@Schema(description ="审核人id")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人id")
private String auditUser;
/**
* 办理人id
*/
@ExcelAttribute(name = "办理人id" )
@Schema(description ="办理人id")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("办理人id")
private String handleUser;
/**
* 审核人
*/
@ExcelAttribute(name = "审核人" )
@Schema(description ="审核人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("审核人")
private String auditUserName;
/**
* 办理人
*/
@ExcelAttribute(name = "办理人" )
@Schema(description ="办理人")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("办理人")
private String handleUserName;
/**
* 审核人部门
*/
@TableField(exist = false)
private String auditUserDeptName;
/**
* 办理人部门
*/
@TableField(exist = false)
private String handleUserDeptName;
}
......@@ -47,4 +47,13 @@ public interface TSocialfundHouseResMapper extends BaseMapper<TSocialfundHouseRe
* @return
*/
List<TSocialfundHouseRes> getexportList(@Param("tSocialfundHouseRes") TSocialfundHouseRes tSocialfundHouseRes);
/**
* @Description: 删权限
* @Author: hgw
* @Date: 2022/12/6 16:44
* @return: void
**/
void deleteByUserIdAndHuName(@Param("tSocialfundHouseRes") TSocialfundHouseRes tSocialfundHouseRes);
}
......@@ -18,6 +18,7 @@
package com.yifu.cloud.plus.v1.yifu.social.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialfundHouseRes;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
......@@ -45,4 +46,21 @@ public interface TSocialfundHouseResService extends IService<TSocialfundHouseRes
List<TSocialfundHouseRes> getexportList(TSocialfundHouseRes searchVo);
R saveSocialAuth(TSocialfundHouseRes searchVo);
/**
* @Description: 删除审核人权限
* @Author: hgw
* @Date: 2022/12/6 15:57
* @return: void
**/
void deleteAuditUser(SysHouseHoldInfo holdInfo);
/**
* @Description: 删除办理人权限
* @Author: hgw
* @Date: 2022/12/6 15:57
* @return: void
**/
void deleteHandleUser(SysHouseHoldInfo holdInfo);
}
......@@ -26,10 +26,13 @@ import com.yifu.cloud.plus.v1.yifu.common.core.util.DateUtil;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysBaseSetInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialfundHouseRes;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysBaseSetInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.SysHouseHoldInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.SysHouseHoldInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialfundHouseResService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
......@@ -43,6 +46,10 @@ import org.springframework.stereotype.Service;
public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMapper, SysHouseHoldInfo> implements SysHouseHoldInfoService {
private final SysBaseSetInfoMapper baseSetInfoMapper;
@Autowired
private TSocialfundHouseResService tSocialfundHouseResService;
/**
* 社保户公积金户数据简单分页查询
* @param sysHouseHoldInfo 社保户公积金户数据
......@@ -68,9 +75,45 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (null != info){
return R.failed("对应账户性质、户名的配置已存在!");
}
if (Common.isEmpty(sysHouseHoldInfo.getAuditUser()) || Common.isEmpty(sysHouseHoldInfo.getHandleUser())) {
return R.failed("审核人或办理人必填!");
}
baseMapper.insert(sysHouseHoldInfo);
// 同步审核权限、办理权限
this.saveAuditUserOrHandleUser(sysHouseHoldInfo, CommonConstants.ZERO_STRING);
this.saveAuditUserOrHandleUser(sysHouseHoldInfo, CommonConstants.ONE_STRING);
return R.ok();
}
/**
* @param authType 0 审核人 1办理人
* @Description: 添加审核人、办理人
* @Author: hgw
* @Date: 2022/12/6 15:50
* @return: void
**/
private void saveAuditUserOrHandleUser(SysHouseHoldInfo sysHouseHoldInfo, String authType) {
TSocialfundHouseRes searchVo = new TSocialfundHouseRes();
searchVo.setAuthType(authType);
searchVo.setHouseNameType(sysHouseHoldInfo.getType());
if (CommonConstants.ZERO_STRING.equals(sysHouseHoldInfo.getType())) {
searchVo.setSocialHousehold(sysHouseHoldInfo.getName());
} else {
searchVo.setFundHousehold(sysHouseHoldInfo.getName());
}
if (CommonConstants.ZERO_STRING.equals(authType)) {
searchVo.setUserId(sysHouseHoldInfo.getAuditUser());
searchVo.setUserName(sysHouseHoldInfo.getAuditUserName());
searchVo.setUserDeptName(sysHouseHoldInfo.getAuditUserDeptName());
} else {
searchVo.setUserId(sysHouseHoldInfo.getHandleUser());
searchVo.setUserName(sysHouseHoldInfo.getHandleUserName());
searchVo.setUserDeptName(sysHouseHoldInfo.getHandleUserDeptName());
}
tSocialfundHouseResService.saveSocialAuth(searchVo);
}
/**
* @Author fxj
* @Description 修改社保户公积金户数据
......@@ -85,6 +128,14 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
if (Common.isEmpty(holdInfo)){
return R.failed(CommonConstants.NO_DATA_TO_HANDLE);
}
// 编辑标志 true:编辑;false:启用禁用(说明不需要拦截其他必填项)
boolean isEdit = true;
if (Common.isEmpty(hold.getType()) && Common.isNotNull(hold.getDelFlag())) {
isEdit = false;
}
if (isEdit && (Common.isEmpty(hold.getAuditUser()) || Common.isEmpty(hold.getHandleUser()))) {
return R.failed("审核人或办理人必填!");
}
if (CommonConstants.ONE_STRING.equals(hold.getDelFlag())
&& baseSetInfoMapper.selectCount(Wrappers.<SysBaseSetInfo>query().lambda()
.eq(SysBaseSetInfo::getBaseType, holdInfo.getType())
......@@ -98,6 +149,18 @@ public class SysHouseHoldInfoServiceImpl extends ServiceImpl<SysHouseHoldInfoMap
}
int res = baseMapper.updateById(hold);
if (res >= 0){
if (isEdit) {
// 新老数据审核人办理人不同,先删除,再添加
if (Common.isNotNull(holdInfo.getAuditUser()) && !holdInfo.getAuditUser().equals(hold.getAuditUser())) {
tSocialfundHouseResService.deleteAuditUser(holdInfo);
}
if (Common.isNotNull(holdInfo.getHandleUser()) && !holdInfo.getHandleUser().equals(hold.getHandleUser())) {
tSocialfundHouseResService.deleteHandleUser(holdInfo);
}
// 同步审核权限、办理权限
this.saveAuditUserOrHandleUser(hold, CommonConstants.ZERO_STRING);
this.saveAuditUserOrHandleUser(hold, CommonConstants.ONE_STRING);
}
return R.ok();
}else {
return R.failed(CommonConstants.SAVE_FAILED);
......
......@@ -517,6 +517,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
|| Common.isNotNull(excel.getUnemploymentCardinal()) || Common.isNotNull(excel.getWorkInjuryCardinal())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.SOCIAL_HOLD_IS_EMPTY)));
excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard());
continue;
}
}
if (Common.isNotNull(excel.getProvidentHousehold())){
......@@ -530,6 +531,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
Common.isNotNull(excel.getProvidentPer())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.FUND_HOLD_IS_EMPTY)));
excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard());
continue;
}
}
if (Common.isNotNull(dispatchMap) && Common.isNotNull(dispatchMap.get(excel.getEmpIdcard()))){
......@@ -911,10 +913,6 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setRecordBase(social.getRecordBase());
socialFund.setTrustRemark(social.getTrustRemark());
socialFund.setPaymentType(social.getPaymentType());
socialFund.setUnitSocialSum(BigDecimalUtils.safeAdd(socialFund.getUnitPersionMoney()
, socialFund.getUnitMedicalMoney(), socialFund.getUnitBirthMoney()
, socialFund.getUnitInjuryMoney()
......@@ -1067,6 +1065,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialFund.setUpperLimit(socialSet.getUpperLimit());
socialFund.setPayPolicy(socialSet.getPayPolicy());
socialFund.setLatestCardinality(socialSet.getInsuranceIsLatestCardinality());
//配置没有大病清理社保公积金查询里面残留的历史大病信息
if (CommonConstants.ONE_STRING.equals(socialSet.getIsIllness())
&& Common.isNotNull(socialFund.getBigailmentHandle())){
socialFund.setBigailmentHandle(null);
socialFund.setBigailmentStart(null);
socialFund.setUnitBigailmentCardinal(null);
socialFund.setUnitBigailmentPer(null);
socialFund.setPersonalBigailmentCardinal(null);
socialFund.setPersonalBigailmentPer(null);
socialFund.setPersonalBigailmentMoney(null);
socialFund.setUnitBigailmentMoney(null);
}
}
}
if (Common.isNotNull(excel.getProvidentHousehold())){
......@@ -1924,6 +1934,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
contract.setCustomerId(setInfoVo.getCustomerId());
contract.setSubjectUnit(setInfoVo.getCustomerName());
contract.setSubjectDepart(setInfoVo.getDepartName());
contract.setEmpNatrue(excel.getEmpType());
if (Common.isNotNull(empVo)) {
contract.setEmpId(empVo.getId());
contract.setEmpNo(empVo.getEmpNo());
......
......@@ -40,6 +40,7 @@ import com.yifu.cloud.plus.v1.yifu.social.entity.TIncomeDetail;
import com.yifu.cloud.plus.v1.yifu.social.entity.TPaymentInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSendEkpError;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TIncomeMapper;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TPaymentInfoMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeDetailService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
......@@ -84,6 +85,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
@Autowired
private DoJointSocialTask doJointSocialTask;
@Autowired
private TPaymentInfoMapper tPaymentInfoMapper;
/**
* 收入明细表简单分页查询
*
......@@ -668,19 +672,11 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if (CommonConstants.ZERO_STRING.equals(tIncomeDetail.getRedData())) {
if (insureMap.get(tIncomeDetail.getDataCreateMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) == null
|| insureMap.get(tIncomeDetail.getDataCreateMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) <= CommonConstants.ZERO_INT) {
if (Common.isNotNull(paymentInfo)) {
return this.savePaymentIncome(tIncomeDetail,paymentInfo);
} else {
return this.saveIncome(tIncomeDetail,synFlag);
}
return this.saveIncome(tIncomeDetail,synFlag);
}
} else {
if (this.redDateJudge(tIncomeDetail, numMap)) {
if (Common.isNotNull(paymentInfo)) {
return this.savePaymentIncome(tIncomeDetail,paymentInfo);
} else {
return this.saveIncome(tIncomeDetail,synFlag);
}
return this.saveIncome(tIncomeDetail,synFlag);
}
}
} else {
......@@ -692,11 +688,7 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
if (CommonConstants.TWO_STRING.equals(tIncomeDetail.getFeeMode())) {
if (incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) == null
|| incomeMap.get(tIncomeDetail.getPayMonth() + CommonConstants.DOWN_LINE_STRING + tIncomeDetail.getFeeType()) <= CommonConstants.ZERO_INT) {
if (Common.isNotNull(paymentInfo)) {
return this.savePaymentIncome(tIncomeDetail,paymentInfo);
} else {
return this.saveIncome(tIncomeDetail,synFlag);
}
return this.saveIncome(tIncomeDetail,synFlag);
}
} else {
// 3金额-人次
......@@ -705,6 +697,9 @@ public class TIncomeServiceImpl extends ServiceImpl<TIncomeMapper, TIncome> impl
}
}
}
if (Common.isNotNull(paymentInfo)) {
tPaymentInfoMapper.updateBySocialIncomeFlag(paymentInfo.getId());
}
return true;
}
......
......@@ -45,8 +45,6 @@ import com.yifu.cloud.plus.v1.yifu.common.dapr.util.ArchivesDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.InsuranceDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpFundUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.util.EkpSocialUtil;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushFundParam;
import com.yifu.cloud.plus.v1.yifu.ekp.vo.EkpPushSocialParam;
import com.yifu.cloud.plus.v1.yifu.salary.vo.TPaymentBySalaryVo;
......@@ -60,11 +58,10 @@ import com.yifu.cloud.plus.v1.yifu.social.mapper.*;
import com.yifu.cloud.plus.v1.yifu.social.service.TEkpChangeDeptLogService;
import com.yifu.cloud.plus.v1.yifu.social.service.TIncomeService;
import com.yifu.cloud.plus.v1.yifu.social.service.TPaymentInfoService;
import com.yifu.cloud.plus.v1.yifu.social.service.TSendEkpErrorService;
import com.yifu.cloud.plus.v1.yifu.social.util.DoJointSocialTask;
import com.yifu.cloud.plus.v1.yifu.social.util.ServiceUtil;
import com.yifu.cloud.plus.v1.yifu.social.vo.*;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -113,12 +110,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Autowired
private SysHouseHoldInfoMapper sysHouseHoldInfoMapper;
@Autowired
private EkpFundUtil ekpFundUtil;
@Autowired
private EkpSocialUtil ekpSocialUtil;
@Autowired
private TIncomeDetailMapper detailMapper;
......@@ -128,9 +119,6 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Autowired
private ArchivesDaprUtil archivesDaprUtil;
@Autowired
private TSendEkpErrorService tSendEkpErrorService;
@Autowired
private TForecastLibraryMapper tForecastLibraryMapper;
......@@ -2520,6 +2508,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0){
List<TPaymentInfo> unPushs;
int i = (int)Math.ceil((double)count/CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j=0;j<i;j++){
unPushs = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getPushStatus, CommonConstants.ONE_STRING)
......@@ -2528,10 +2517,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this){
if (Common.isNotNull(unPushs)) {
//推送数据封装并推送
initEkpPushSocialParam(unPushs);
initEkpPushSocialParam(unPushs,mapSelectVo);
}
}
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
}
}
......@@ -2544,6 +2536,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0) {
List<TPaymentInfo> unPushInfo;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) {
//获取所有未推送的公积金实缴明细数据
unPushInfo = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
......@@ -2553,10 +2546,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushFundParam(unPushInfo);
initEkpPushFundParam(unPushInfo,mapSelectVo);
}
}
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
}
}
......@@ -2565,18 +2561,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
YifuUser user = SecurityUtils.getUser();
String key = user.getId() + CommonConstants.DOWN_LINE_STRING + CommonConstants.PAYMENT_SOCIAL_PUSH;
redisUtil.set(key, user.getId(), 36000L);
try {
//手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user,searchVo);
createPaymentFundInfoReal(user,searchVo);
//推送社保公积金收入数据
createPaymentInfoIncomeReal(user,searchVo);
createPaymentFundIncomeReal(user,searchVo);
redisUtil.remove(key);
} catch (Exception e) {
log.error("社保缴费库:" + e);
redisUtil.remove(key);
}
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
//手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal(user, searchVo,mapSelectVo);
createPaymentFundInfoReal(user, searchVo,mapSelectVo);
//推送社保公积金收入数据
createPaymentInfoIncomeReal(user, searchVo,mapSelectVo);
createPaymentFundIncomeReal(user, searchVo,mapSelectVo);
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
redisUtil.remove(key);
}
@Override
......@@ -2606,6 +2602,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0) {
List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) {
//判断缴费库中社保合计和本次导入合计相加是否为0,为0则不生成收入
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
......@@ -2615,10 +2612,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(sumList)) {
//生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING);
createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo);
}
}
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
}
}
......@@ -2632,6 +2632,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
if (count > 0) {
List<TPaymentInfo> sumList;
int i = (int) Math.ceil((double) count / CommonConstants.TEN_THOUSAND_INT);
Map<String,TSettleDomainSelectVo> mapSelectVo = this.getSelectVoMap();
for (int j = 0; j < i; j++) {
sumList = baseMapper.selectList(Wrappers.<TPaymentInfo>query().lambda()
.eq(TPaymentInfo::getIncomeStatus, CommonConstants.ONE_STRING)
......@@ -2640,10 +2641,13 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(sumList)) {
//生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING);
createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo);
}
}
}
if (Common.isNotNull(mapSelectVo)) {
mapSelectVo.clear();
}
}
}
......@@ -2671,7 +2675,8 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
public void createPaymentSocialInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
//获取所有未推送的社保实缴明细数据
searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentSocialPushCount(searchVo,user.getId());
......@@ -2683,14 +2688,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushSocialParam(unPushInfo);
initEkpPushSocialParam(unPushInfo,mapSelectVo);
}
}
}
}
}
public void createPaymentFundInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
public void createPaymentFundInfoReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
//获取所有未推送的公积金实缴明细数据
searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentFundPushCount(searchVo,user.getId());
......@@ -2702,14 +2708,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(unPushInfo)) {
//推送数据封装并推送
initEkpPushFundParam(unPushInfo);
initEkpPushFundParam(unPushInfo,mapSelectVo);
}
}
}
}
}
public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
public void createPaymentInfoIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentSocialIncomeCount(searchVo,user.getId());
if (count > 0) {
......@@ -2720,14 +2727,15 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(sumList)) {
//生成收入
createIncomeInfo(sumList, CommonConstants.ONE_STRING);
createIncomeInfo(sumList, CommonConstants.ONE_STRING,mapSelectVo);
}
}
}
}
}
public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo) {
public void createPaymentFundIncomeReal(YifuUser user,TPaymentInfoSearchVo searchVo,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
searchVo.setLockStatus(CommonConstants.ONE_STRING);
long count = baseMapper.getTPaymentFundIncomeCount(searchVo,user.getId());
if (count > 0) {
......@@ -2738,7 +2746,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
synchronized (this) {
if (Common.isNotNull(sumList)) {
//生成公积金收入
createIncomeInfo(sumList, CommonConstants.TWO_STRING);
createIncomeInfo(sumList, CommonConstants.TWO_STRING,mapSelectVo);
}
}
}
......@@ -2756,372 +2764,365 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return paymentVo;
}
public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo) {
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
public void initEkpPushSocialParam(List<TPaymentInfo> unPushInfo,Map<String,TSettleDomainSelectVo> mapSelectVo) {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
TSettleDomain settleDomain;
try {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
} else {
settleDomain = null;
}
EkpPushSocialParam socialParam = new EkpPushSocialParam();
//员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
//单位医疗金额
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
//单位工伤金额
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
//单位失业金额
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
//单位生育金额
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
//单位大病金额
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
//预估个人养老
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
//预估个人医疗
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
//预估单位合计
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//个人社保合计
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//预估个人大病救助
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
//预估个人失业
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
//结算状态
// hgw2022-9-30 12:03:05根据倩倩的需求,改为默认空,未结算
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
if (Common.isNotNull(library.getUnitBirthMoney())) {
socialParam.setFd_3af9ee3afb34c2(library.getUnitBirthMoney().toString());
} else {
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
}
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
if (Common.isNotNull(library.getSocialSecurityPersonalSum())) {
socialParam.setFd_3af9ee3cb6d4fa(library.getSocialSecurityPersonalSum().toString());
} else {
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
}
//预估合计
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
//实缴单位合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3af9ee3c0bf286(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
}
//实缴个人补缴利息
if (Common.isNotNull(library.getPersonalAccrual())) {
socialParam.setFd_3af9ee3d634946(library.getPersonalAccrual().toString());
} else {
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
}
//实缴单位医疗
if (Common.isNotNull(library.getUnitMedicalMoney())) {
socialParam.setFd_3af9ee39dea6a8(library.getUnitMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
}
//预估个人补缴利息
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
//预估单位补缴利息
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
//实缴单位养老
if (Common.isNotNull(library.getUnitPensionMoney())) {
socialParam.setFd_3af9ee3938170a(library.getUnitPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
}
//实缴个人失业
if (Common.isNotNull(library.getPersonalUnemploymentMoney())) {
socialParam.setFd_3af9ee3db44d96(library.getPersonalUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
}
//实缴单位补缴利息
if (Common.isNotNull(library.getCompanyAccrual())) {
socialParam.setFd_3af9ee3b5ddae8(library.getCompanyAccrual().toString());
} else {
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
}
//实缴单位大病救助
if (Common.isNotNull(library.getUnitBigmailmentMoney())) {
socialParam.setFd_3af9ee3ba76f54(library.getUnitBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
}
//实缴单位工伤
if (Common.isNotNull(library.getUnitInjuryMoney())) {
socialParam.setFd_3af9ee3aa9c84a(library.getUnitInjuryMoney().toString());
} else {
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
}
//实缴合计
if (Common.isNotNull(library.getSocialSum())) {
socialParam.setFd_3af9ee3c6bfc74(library.getSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
}
//实缴个人医疗
if (Common.isNotNull(library.getPersonalMedicalMoney())) {
socialParam.setFd_3af9ee3e066d48(library.getPersonalMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
}
//实缴单位失业
if (Common.isNotNull(library.getUnitUnemploymentMoney())) {
socialParam.setFd_3af9ee3a46b7e6(library.getUnitUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
}
//实缴个人养老
if (Common.isNotNull(library.getPersonalPensionMoney())) {
socialParam.setFd_3af9ee3e513962(library.getPersonalPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
}
//实缴个人大病救助
if (Common.isNotNull(library.getPersonalBigmailmentMoney())) {
socialParam.setFd_3af9ee3d0ba3b6(library.getPersonalBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
doJointSocialTask.asynchronousEkpPaymentSocial(socialParam, library);
}
EkpPushSocialParam socialParam = new EkpPushSocialParam();
//员工姓名
socialParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
socialParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//单位养老金额
socialParam.setFd_3af9ec80a9de7a(CommonConstants.EMPTY_STRING);
//单位医疗金额
socialParam.setFd_3af9eba5899c90(CommonConstants.EMPTY_STRING);
//单位工伤金额
socialParam.setFd_3af9eba684f592(CommonConstants.EMPTY_STRING);
//单位失业金额
socialParam.setFd_3af9eba5f6e19e(CommonConstants.EMPTY_STRING);
//单位生育金额
socialParam.setFd_3af9eba71c0138(CommonConstants.EMPTY_STRING);
//单位大病金额
socialParam.setFd_3af9eba863c0ee(CommonConstants.EMPTY_STRING);
//预估个人养老
socialParam.setFd_3af9ebbd791662(CommonConstants.EMPTY_STRING);
//预估个人医疗
socialParam.setFd_3af9ebbdd9797e(CommonConstants.EMPTY_STRING);
//预估单位合计
socialParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//个人社保合计
socialParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//预估个人大病救助
socialParam.setFd_3af9ebbf3e8be2(CommonConstants.EMPTY_STRING);
//预估个人失业
socialParam.setFd_3af9ebbe29ce1c(CommonConstants.EMPTY_STRING);
//结算状态
// hgw2022-9-30 12:03:05根据倩倩的需求,改为默认空,未结算
socialParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//社保缴纳月份
if (Common.isNotNull(library.getSocialPayMonth())) {
socialParam.setFd_3adfe8cf632700(dateStringInsert(library.getSocialPayMonth()));
} else {
socialParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//社保生成月份
if (Common.isNotNull(library.getSocialCreateMonth())) {
socialParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getSocialCreateMonth()));
} else {
socialParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//订单类型
socialParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain.getSocialType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getSocialType())) {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
socialParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
socialParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
socialParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
socialParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
socialParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
socialParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
socialParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
socialParam.setFd_3b178dfcf9e3e6(settleDomain.getBpoFlag());
} else {
socialParam.setFd_3b178dfcf9e3e6(CommonConstants.EMPTY_STRING);
}
//客户名称
if (Common.isNotNull(library.getUnitName())) {
socialParam.setFd_3adfe8c81a0e42(library.getUnitName());
} else {
socialParam.setFd_3adfe8c81a0e42(CommonConstants.EMPTY_STRING);
}
//社保户
if (Common.isNotNull(library.getSocialHousehold())) {
socialParam.setFd_3aeafa25916e82(library.getSocialHousehold());
} else {
socialParam.setFd_3aeafa25916e82(CommonConstants.EMPTY_STRING);
}
//结算月份
socialParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
socialParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
socialParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
socialParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
socialParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
socialParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
socialParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
socialParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
socialParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
socialParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
socialParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//实缴单位生育
if (Common.isNotNull(library.getUnitBirthMoney())) {
socialParam.setFd_3af9ee3afb34c2(library.getUnitBirthMoney().toString());
} else {
socialParam.setFd_3af9ee3afb34c2(CommonConstants.EMPTY_STRING);
}
//付款单号
socialParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//实缴个人合计
if (Common.isNotNull(library.getSocialSecurityPersonalSum())) {
socialParam.setFd_3af9ee3cb6d4fa(library.getSocialSecurityPersonalSum().toString());
} else {
socialParam.setFd_3af9ee3cb6d4fa(CommonConstants.EMPTY_STRING);
}
//预估合计
socialParam.setFd_3af9ed7e813b86(CommonConstants.EMPTY_STRING);
//实缴单位合计
if (Common.isNotNull(library.getUnitSocialSum())) {
socialParam.setFd_3af9ee3c0bf286(library.getUnitSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c0bf286(CommonConstants.EMPTY_STRING);
}
//实缴个人补缴利息
if (Common.isNotNull(library.getPersonalAccrual())) {
socialParam.setFd_3af9ee3d634946(library.getPersonalAccrual().toString());
} else {
socialParam.setFd_3af9ee3d634946(CommonConstants.EMPTY_STRING);
}
//实缴单位医疗
if (Common.isNotNull(library.getUnitMedicalMoney())) {
socialParam.setFd_3af9ee39dea6a8(library.getUnitMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee39dea6a8(CommonConstants.EMPTY_STRING);
}
//预估个人补缴利息
socialParam.setFd_3af9ebbecc4aa8(CommonConstants.EMPTY_STRING);
//预估单位补缴利息
socialParam.setFd_3af9eba7c3da5e(CommonConstants.EMPTY_STRING);
//实缴单位养老
if (Common.isNotNull(library.getUnitPensionMoney())) {
socialParam.setFd_3af9ee3938170a(library.getUnitPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3938170a(CommonConstants.EMPTY_STRING);
}
//实缴个人失业
if (Common.isNotNull(library.getPersonalUnemploymentMoney())) {
socialParam.setFd_3af9ee3db44d96(library.getPersonalUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3db44d96(CommonConstants.EMPTY_STRING);
}
//实缴单位补缴利息
if (Common.isNotNull(library.getCompanyAccrual())) {
socialParam.setFd_3af9ee3b5ddae8(library.getCompanyAccrual().toString());
} else {
socialParam.setFd_3af9ee3b5ddae8(CommonConstants.EMPTY_STRING);
}
//实缴单位大病救助
if (Common.isNotNull(library.getUnitBigmailmentMoney())) {
socialParam.setFd_3af9ee3ba76f54(library.getUnitBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3ba76f54(CommonConstants.EMPTY_STRING);
}
//实缴单位工伤
if (Common.isNotNull(library.getUnitInjuryMoney())) {
socialParam.setFd_3af9ee3aa9c84a(library.getUnitInjuryMoney().toString());
} else {
socialParam.setFd_3af9ee3aa9c84a(CommonConstants.EMPTY_STRING);
}
//实缴合计
if (Common.isNotNull(library.getSocialSum())) {
socialParam.setFd_3af9ee3c6bfc74(library.getSocialSum().toString());
} else {
socialParam.setFd_3af9ee3c6bfc74(CommonConstants.EMPTY_STRING);
}
//实缴个人医疗
if (Common.isNotNull(library.getPersonalMedicalMoney())) {
socialParam.setFd_3af9ee3e066d48(library.getPersonalMedicalMoney().toString());
} else {
socialParam.setFd_3af9ee3e066d48(CommonConstants.EMPTY_STRING);
}
//实缴单位失业
if (Common.isNotNull(library.getUnitUnemploymentMoney())) {
socialParam.setFd_3af9ee3a46b7e6(library.getUnitUnemploymentMoney().toString());
} else {
socialParam.setFd_3af9ee3a46b7e6(CommonConstants.EMPTY_STRING);
}
//实缴个人养老
if (Common.isNotNull(library.getPersonalPensionMoney())) {
socialParam.setFd_3af9ee3e513962(library.getPersonalPensionMoney().toString());
} else {
socialParam.setFd_3af9ee3e513962(CommonConstants.EMPTY_STRING);
}
//实缴个人大病救助
if (Common.isNotNull(library.getPersonalBigmailmentMoney())) {
socialParam.setFd_3af9ee3d0ba3b6(library.getPersonalBigmailmentMoney().toString());
} else {
socialParam.setFd_3af9ee3d0ba3b6(CommonConstants.EMPTY_STRING);
}
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
socialParam.setFd_3b438e33f37378(library.getCreateName());
} else {
socialParam.setFd_3b438e33f37378(CommonConstants.EMPTY_STRING);
}
//我司到款单位
socialParam.setFd_3b01953871b8be(CommonConstants.EMPTY_STRING);
//社保id
socialParam.setFd_3b0afbe1f94a08(library.getId());
// 薪酬申请编号
socialParam.setFd_3b3cab77923f44(CommonConstants.EMPTY_STRING);
doJointSocialTask.asynchronousEkpPaymentSocial(socialParam, library);
}catch (Exception e) {
log.error("生成社保明细异常",e);
}
}
public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo) {
public void initEkpPushFundParam(List<TPaymentInfo> unPushInfo,Map<String,TSettleDomainSelectVo> mapSelectVo) {
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(library.getSettleDomainId());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
TSettleDomain settleDomain;
try {
for (TPaymentInfo library : unPushInfo) {
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(library.getSettleDomainCode());
} else {
settleDomain = null;
}
EkpPushFundParam fundParam = new EkpPushFundParam();
//员工姓名
fundParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//预估单位代缴
fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//预估个人代缴
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//结算状态
// hgw2022-9-30 12:03:48根绝倩倩需求变更
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getFundType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getFundType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain) && Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
} else {
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
}
//个人代缴
if (Common.isNotNull(library.getPersonalProvidentSum())) {
fundParam.setFd_3adfeb5366dd82(library.getPersonalProvidentSum().toString());
} else {
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
}
//客户名称
fundParam.setFd_3adfe8c81a0e42(library.getUnitName());
//公积金账户
if (Common.isNotNull(library.getProvidentHousehold())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHousehold());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
}
//结算月份
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
fundParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//付款单号
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//我司到款单位
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
fundParam.setFd_3b43922217c6f8(library.getCreateName());
} else {
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING);
}
doJointSocialTask.asynchronousEkpPaymentFund(fundParam, library);
}
EkpPushFundParam fundParam = new EkpPushFundParam();
//员工姓名
fundParam.setFd_3adfe8c79989d4(library.getEmpName());
//员工身份证
fundParam.setFd_3adfe8c7e4cf7a(library.getEmpIdcard());
//预估单位代缴
fundParam.setFd_3adfeb4e8064a8(CommonConstants.EMPTY_STRING);
//预估个人代缴
fundParam.setFd_3adfeb52a4d2e2(CommonConstants.EMPTY_STRING);
//缴纳月份
if (Common.isNotNull(library.getProvidentPayMonth())) {
fundParam.setFd_3adfe8cf632700(dateStringInsert(library.getProvidentPayMonth()));
} else {
fundParam.setFd_3adfe8cf632700(CommonConstants.EMPTY_STRING);
}
//生成月份
if (Common.isNotNull(library.getProvidentCreateMonth())) {
fundParam.setFd_3adfe8cb96c41e(dateStringInsert(library.getProvidentCreateMonth()));
} else {
fundParam.setFd_3adfe8cb96c41e(CommonConstants.EMPTY_STRING);
}
//结算状态
// hgw2022-9-30 12:03:48根绝倩倩需求变更
fundParam.setFd_3add9ea428879a(CommonConstants.SALARY_UNFLAG);
//订单类型
fundParam.setFd_3add9dd7833db8(SocialConstants.DIFF_TYPE_THR);
//是否有预估
if (Common.isNotNull(settleDomain.getFundType()) &&
CommonConstants.ONE_STRING.equals(settleDomain.getFundType())) {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_TRUE);
} else {
fundParam.setFd_3add9de0be85e4(CommonConstants.IS_FALSE);
}
//与工资合并结算
fundParam.setFd_3add9e1a670144(CommonConstants.IS_FALSE);
//项目编码
fundParam.setFd_3adfe8c70d3fd4(library.getSettleDomainCode());
//项目名称
fundParam.setFd_3adfe8c8468e54(library.getSettleDomainName());
//单号
fundParam.setFd_3adfe95c169c48(CommonConstants.EMPTY_STRING);
//客户编码
if (Common.isNotNull(settleDomain.getCustomerNo())) {
fundParam.setFd_3adfe8c73cb5a4(settleDomain.getCustomerNo());
} else {
fundParam.setFd_3adfe8c73cb5a4(CommonConstants.EMPTY_STRING);
}
//是否为BPO业务
if (Common.isNotNull(settleDomain.getBpoFlag())) {
fundParam.setFd_3b178ea361cabe(settleDomain.getBpoFlag());
} else {
fundParam.setFd_3b178ea361cabe(CommonConstants.EMPTY_STRING);
}
//单位代缴
if (Common.isNotNull(library.getUnitProvidentSum())) {
fundParam.setFd_3adfeb52fbe966(library.getUnitProvidentSum().toString());
} else {
fundParam.setFd_3adfeb52fbe966(CommonConstants.EMPTY_STRING);
}
//个人代缴
if (Common.isNotNull(library.getPersonalProvidentSum())) {
fundParam.setFd_3adfeb5366dd82(library.getPersonalProvidentSum().toString());
} else {
fundParam.setFd_3adfeb5366dd82(CommonConstants.EMPTY_STRING);
}
//客户名称
fundParam.setFd_3adfe8c81a0e42(library.getUnitName());
//公积金账户
if (Common.isNotNull(library.getProvidentHousehold())) {
fundParam.setFd_3aeafa8cc144bc(library.getProvidentHousehold());
} else {
fundParam.setFd_3aeafa8cc144bc(CommonConstants.EMPTY_STRING);
}
//结算月份
fundParam.setFd_3adfe8cff746bc(CommonConstants.EMPTY_STRING);
//单位差异
fundParam.setFd_3adfeb53c70f72(CommonConstants.EMPTY_STRING);
//个人差异
fundParam.setFd_3adfeb5413fb44(CommonConstants.EMPTY_STRING);
//应收
fundParam.setFd_3adfeb7b624f06(CommonConstants.EMPTY_STRING);
//收款状态
fundParam.setFd_3add9eaeed2560(CommonConstants.EMPTY_STRING);
//结算单号
fundParam.setFd_3adfeb830523b6(CommonConstants.EMPTY_STRING);
//收款单号
fundParam.setFd_3adfeb8489e6c2(CommonConstants.EMPTY_STRING);
//应支出
fundParam.setFd_3adfeb7bd97464(CommonConstants.EMPTY_STRING);
//支出结算状态
fundParam.setFd_3add9edfbc6f7e(CommonConstants.EMPTY_STRING);
//付款状态
fundParam.setFd_3add9eed23894a(CommonConstants.EMPTY_STRING);
//支出缴纳单号
fundParam.setFd_3adfeb83a704c8(CommonConstants.EMPTY_STRING);
//付款单号
fundParam.setFd_3adfeb84175f28(CommonConstants.EMPTY_STRING);
//我司到款单位
fundParam.setFd_3b019a2e9bfdd6(CommonConstants.EMPTY_STRING);
//公积金id
fundParam.setFd_3b0afbaf10df2c(library.getId());
// 薪酬申请编号
fundParam.setFd_3b3cabde83d1d0(CommonConstants.EMPTY_STRING);
//创建人姓名
if (Common.isNotNull(library.getCreateName())) {
fundParam.setFd_3b43922217c6f8(library.getCreateName());
} else {
fundParam.setFd_3b43922217c6f8(CommonConstants.EMPTY_STRING);
}
doJointSocialTask.asynchronousEkpPaymentFund(fundParam, library);
}catch (Exception e) {
log.error("生成公积金明细异常",e);
}
}
......@@ -3166,124 +3167,123 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
}
public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag) {
public void createIncomeInfo(List<TPaymentInfo> updateList, String socialFundFlag,
Map<String,TSettleDomainSelectVo> mapSelectVo) {
List<TIncomeDetail> exitIncome;
for (TPaymentInfo paymentInfo : updateList) {
boolean exitFlag = false;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
.eq(TIncomeDetail::getPayMonth, paymentInfo.getSocialPayMonth())
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
.eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING));
} else {
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
.eq(TIncomeDetail::getPayMonth, paymentInfo.getProvidentPayMonth())
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
.eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING));
}
if (Common.isNotNull(exitIncome)) {
BigDecimal sumMoney = BigDecimal.ZERO;
for (TIncomeDetail income : exitIncome) {
sumMoney = BigDecimalUtils.safeAdd(income.getMoney(), sumMoney);
if (paymentInfo.getId().equals(income.getSourceId())) {
exitFlag = true;
}
}
if (exitFlag) {
continue;
}
if (sumMoney.compareTo(BigDecimal.ZERO) > 0) {
exitFlag = true;
}
}
//获取项目信息
TSettleDomain settleDomain = new TSettleDomain();
List<TSettleDomainSelectVo> settleDomainR;
R<TSettleDomainListVo> listVo;
listVo = archivesDaprUtil.selectSettleDomainSelectVoById(paymentInfo.getSettleDomainId());
if (Common.isNotNull(listVo)) {
TSettleDomainListVo tSettleDomainListVo = listVo.getData();
if (Common.isNotNull(tSettleDomainListVo) && Common.isNotEmpty(tSettleDomainListVo.getListSelectVO())) {
settleDomainR = tSettleDomainListVo.getListSelectVO();
for (TSettleDomainSelectVo vo : settleDomainR) {
BeanUtils.copyProperties(vo, settleDomain);
}
}
}
int isSum = 0;
if (Common.isNotNull(settleDomain)) {
boolean isIncomeFlag = false;
// 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) {
BigDecimal gMoney;
if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee();
} else {
isSum = 1;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
}
}
if (!exitFlag || isSum == 1) {
isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, socialFundFlag);
}
}
}
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
//预估模式
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
BigDecimal money;
if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee();
} else {
isSum = 2;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else {
money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
}
}
if (!exitFlag || isSum == 2) {
isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, socialFundFlag);
}
}
}
if (!isIncomeFlag) {
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
}
}
}
TSettleDomain settleDomain;
try {
for (TPaymentInfo paymentInfo : updateList) {
boolean exitFlag = false;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
.eq(TIncomeDetail::getPayMonth, paymentInfo.getSocialPayMonth())
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
.eq(TIncomeDetail::getSourceType, CommonConstants.ONE_STRING));
} else {
exitIncome = detailMapper.selectList(Wrappers.<TIncomeDetail>query().lambda()
.eq(TIncomeDetail::getEmpIdcard, paymentInfo.getEmpIdcard())
.eq(TIncomeDetail::getPayMonth, paymentInfo.getProvidentPayMonth())
.eq(TIncomeDetail::getDeptId, paymentInfo.getSettleDomainId())
.eq(TIncomeDetail::getSourceType, CommonConstants.TWO_STRING));
}
if (Common.isNotNull(exitIncome)) {
BigDecimal sumMoney = BigDecimal.ZERO;
for (TIncomeDetail income : exitIncome) {
sumMoney = BigDecimalUtils.safeAdd(income.getMoney(), sumMoney);
if (paymentInfo.getId().equals(income.getSourceId())) {
exitFlag = true;
}
}
if (exitFlag) {
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
continue;
}
if (sumMoney.compareTo(BigDecimal.ZERO) > 0) {
exitFlag = true;
}
}
//获取项目信息
if (Common.isNotNull(mapSelectVo)) {
settleDomain = mapSelectVo.get(paymentInfo.getSettleDomainCode());
} else {
settleDomain = null;
}
int isSum = 0;
if (Common.isNotNull(settleDomain)) {
boolean isIncomeFlag = false;
// 含有社保,则计算收入
if (Common.isNotNull(settleDomain.getManageServerItem()) && ((settleDomain.getManageServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getManageServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getManagementTag())) {
//预估模式
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType())) {
BigDecimal gMoney;
if (CommonConstants.TWO_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getManagementType())) {
gMoney = settleDomain.getManagementFee();
} else {
isSum = 1;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else {
gMoney = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getManagementFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
}
}
if (!exitFlag || isSum == 1) {
isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.ONE_STRING,
settleDomain.getManagementFee().toString(), settleDomain.getManagementType(),
gMoney, socialFundFlag);
}
}
}
if (Common.isNotNull(settleDomain.getRiskServerItem()) && ((settleDomain.getRiskServerItem().contains(CommonConstants.ONE_STRING)
&& CommonConstants.ONE_STRING.equals(socialFundFlag)) || (settleDomain.getRiskServerItem().contains(CommonConstants.TWO_STRING)
&& CommonConstants.TWO_STRING.equals(socialFundFlag))) && CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
//预估模式
if (CommonConstants.TWO_STRING.equals(settleDomain.getMrSettleType()) &&
CommonConstants.ZERO_STRING.equals(settleDomain.getRiskFundTag())) {
BigDecimal money;
if (CommonConstants.TWO_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee();
} else if (CommonConstants.THREE_STRING.equals(settleDomain.getRiskFundType())) {
money = settleDomain.getRiskFundFee();
} else {
isSum = 2;
if (CommonConstants.ONE_STRING.equals(socialFundFlag)) {
money = BigDecimalUtils.safeMultiply(paymentInfo.getSocialSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
} else {
money = BigDecimalUtils.safeMultiply(paymentInfo.getProvidentSum(),
settleDomain.getRiskFundFee().divide(new BigDecimal("100"),
CommonConstants.FIVE_INT, RoundingMode.HALF_UP));
}
}
if (!exitFlag || isSum == 2) {
isIncomeFlag = true;
createIncomeInsurance(paymentInfo, settleDomain, CommonConstants.TWO_STRING,
settleDomain.getRiskFundFee().toString(), settleDomain.getRiskFundType(),
money, socialFundFlag);
}
}
}
if (!isIncomeFlag) {
baseMapper.updateBySocialIncomeFlag(paymentInfo.getId());
}
}
}
}catch (Exception e) {
log.error("生成社保收入异常",e);
}
}
public void createIncomeInsurance(TPaymentInfo library, TSettleDomain settleDomain, String feeType,
......@@ -3459,4 +3459,16 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
public boolean findList(TPaymentInfo t,YifuUser user) {
return CommonConstants.ONE_STRING.equals(t.getLockStatus()) && user.getId().equals(t.getCreateBy());
}
private Map<String, TSettleDomainSelectVo> getSelectVoMap() {
R<TSettleDomainListVo> settleDomainR = archivesDaprUtil.selectAllSettleDomainSelectVos();
Map<String,TSettleDomainSelectVo> mapSelectVo = null;
if (Common.isNotNull(settleDomainR) && Common.isNotNull(settleDomainR.getData())){
mapSelectVo = settleDomainR.getData().getMapSlectVo();
}
if (Common.isEmpty(mapSelectVo)){
ServiceUtil.runTimeExceptionDiy(CommonConstants.SETTLE_DOMAIN_GET_ERROR);
}
return mapSelectVo;
}
}
......@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.R;
import com.yifu.cloud.plus.v1.yifu.social.entity.SysHouseHoldInfo;
import com.yifu.cloud.plus.v1.yifu.social.entity.TSocialfundHouseRes;
import com.yifu.cloud.plus.v1.yifu.social.mapper.TSocialfundHouseResMapper;
import com.yifu.cloud.plus.v1.yifu.social.service.TSocialfundHouseResService;
......@@ -93,4 +94,39 @@ public class TSocialfundHouseResServiceImpl extends ServiceImpl<TSocialfundHouse
return R.ok();
}
}
@Override
public void deleteAuditUser(SysHouseHoldInfo holdInfo) {
if (Common.isNotNull(holdInfo.getType()) && Common.isNotNull(holdInfo.getName())
&& Common.isNotNull(holdInfo.getAuditUser())) {
// 审核权限
TSocialfundHouseRes searchVo = new TSocialfundHouseRes();
if (CommonConstants.ZERO_STRING.equals(holdInfo.getType())) {
searchVo.setSocialHousehold(holdInfo.getName());
} else {
searchVo.setFundHousehold(holdInfo.getName());
}
searchVo.setUserId(holdInfo.getAuditUser());
searchVo.setAuthType(CommonConstants.ZERO_STRING);
baseMapper.deleteByUserIdAndHuName(searchVo);
}
}
@Override
public void deleteHandleUser(SysHouseHoldInfo holdInfo) {
if (Common.isNotNull(holdInfo.getType()) && Common.isNotNull(holdInfo.getName())
&& Common.isNotNull(holdInfo.getHandleUser())) {
// 办理权限
TSocialfundHouseRes searchVo = new TSocialfundHouseRes();
if (CommonConstants.ZERO_STRING.equals(holdInfo.getType())) {
searchVo.setSocialHousehold(holdInfo.getName());
} else {
searchVo.setFundHousehold(holdInfo.getName());
}
searchVo.setUserId(holdInfo.getHandleUser());
searchVo.setAuthType(CommonConstants.ONE_STRING);
baseMapper.deleteByUserIdAndHuName(searchVo);
}
}
}
......@@ -35,6 +35,10 @@
<result property="town" column="TOWN"/>
<result property="rmark" column="RMARK"/>
<result property="organName" column="ORGAN_NAME"/>
<result property="auditUser" column="AUDIT_USER"/>
<result property="auditUserName" column="AUDIT_USER_NAME"/>
<result property="handleUser" column="HANDLE_USER"/>
<result property="handleUserName" column="HANDLE_USER_NAME"/>
<result property="createBy" column="CREATE_BY"/>
<result property="updateBy" column="UPDATE_BY"/>
<result property="createName" column="CREATE_NAME"/>
......@@ -56,7 +60,11 @@
a.CREATE_BY,
a.UPDATE_BY,
a.CREATE_NAME,
a.UPDATE_TIME
a.UPDATE_TIME,
a.AUDIT_USER,
a.AUDIT_USER_NAME,
a.HANDLE_USER,
a.HANDLE_USER_NAME
</sql>
<sql id="sysHouseHoldInfo_where">
<if test="sysHouseHoldInfo != null">
......
......@@ -111,4 +111,19 @@
<include refid="tSocialfundHouseRes_where"/>
</where>
</select>
<!-- 删权限 -->
<delete id="deleteByUserIdAndHuName">
delete from t_socialfund_house_res where USER_ID = #{tSocialfundHouseRes.userId} and AUTH_TYPE = #{tSocialfundHouseRes.authType}
<if test="tSocialfundHouseRes.socialHousehold != null and tSocialfundHouseRes.socialHousehold.trim() != ''">
AND SOCIAL_HOUSEHOLD = #{tSocialfundHouseRes.socialHousehold}
</if>
<if test="tSocialfundHouseRes.fundHousehold != null and tSocialfundHouseRes.fundHousehold.trim() != ''">
AND FUND_HOUSEHOLD = #{tSocialfundHouseRes.fundHousehold}
</if>
<if test="tSocialfundHouseRes.socialHousehold == null and tSocialfundHouseRes.fundHousehold == null">
AND 1=2
</if>
</delete>
</mapper>
/*
* Copyright (c) 2020 yifu4cloud Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.yifu.cloud.plus.v1.yifu.admin.api.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
/**
* @author hgw
* @date 2022-12-7 10:46:38
*/
@Data
public class UserPasswordVo {
@Schema(description = "用户id")
private String userId;
@Schema(description = "用户登录名")
private String userName;
@Schema(description = "原密码")
private String oldPassword;
@Schema(description = "新密码")
private String newPassword;
}
......@@ -173,6 +173,17 @@ public class UserController {
return R.ok(userService.updateUser(userDto));
}
/**
* 修改密码
* @param vo 用户信息
* @return R
*/
@SysLog("修改密码")
@PostMapping("/updatePassword")
public R<String> updatePassword(@RequestBody UserPasswordVo vo) {
return userService.updatePassword(vo);
}
/**
* 分页查询用户
* @param page 参数集
......
......@@ -23,6 +23,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserDTO;
import com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserExcelVO;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserPasswordVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserVO;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import org.springframework.validation.BindingResult;
......@@ -73,6 +74,15 @@ public interface SysUserService extends IService<SysUser> {
*/
Boolean updateUser(UserDTO userDto);
/**
* @param vo
* @Description: 修改密码
* @Author: hgw
* @Date: 2022/12/7 10:48
* @return: java.lang.Boolean
**/
R<String> updatePassword(UserPasswordVo vo);
/**
* 通过ID查询用户信息
* @param id 用户ID
......
......@@ -31,6 +31,7 @@ import com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.*;
import com.yifu.cloud.plus.v1.yifu.admin.api.util.ParamResolver;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserExcelVO;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserPasswordVo;
import com.yifu.cloud.plus.v1.yifu.admin.api.vo.UserVO;
import com.yifu.cloud.plus.v1.yifu.admin.mapper.*;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysMenuService;
......@@ -242,6 +243,20 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
return Boolean.TRUE;
}
@Override
@Transactional(rollbackFor = Exception.class)
@CacheEvict(value = CacheConstants.USER_DETAILS, key = "#vo.userName")
public R<String> updatePassword(UserPasswordVo vo) {
SysUser sysUser = this.getOne(Wrappers.<SysUser>query().lambda().eq(SysUser::getUserId, vo.getUserId()));
if (ENCODER.matches(vo.getOldPassword(), sysUser.getPassword())) {
sysUser.setPassword(ENCODER.encode(vo.getNewPassword()));
} else {
return R.failed("原密码错误");
}
this.updateById(sysUser);
return R.ok();
}
/**
* 查询上级部门的用户信息
* @param username 用户名
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment