调整考勤算法
This commit is contained in:
parent
5acd7aaaf4
commit
e2cf37df5d
@ -395,16 +395,4 @@ public interface SalaryCalculationStrategyExchangeProcessor {
|
||||
// return new BigDecimal("0");
|
||||
// }
|
||||
// }
|
||||
|
||||
public static void main(String[] args) {
|
||||
String cva = "郝新苹-17100-63;" +
|
||||
"耿胜果-19500-135;" +
|
||||
"孔盈莹-7666.47-0";
|
||||
for (String cv : cva.split(";")){
|
||||
String[] x = cv.split("-");
|
||||
System.out.println("update sys_staff_detail set total_wages='"+x[1]+"', aggregate_personal_income_tax='"+x[2]+"' where staff_id = (select user_id from sys_staff where name='"+x[0]+"' and del_flag='0');");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -47,10 +47,6 @@ public class DailyWageStrategyExchangeProcessor implements SalaryCalculationStra
|
||||
|
||||
@Override
|
||||
public void exchangeSalaryCalculation(SysStaff sysStaff, SysStaffDetail sysStaffDetail, RzSalaryDetail rzSalaryDetail, RzAttendanceStatistical attendanceStatistical, Map<Long, Boolean> overTimeMap) {
|
||||
if(Collections.asList("李亚茹","侯阔","周红娟","刘晓谦").contains(sysStaff.getName())){
|
||||
System.out.println(11111);
|
||||
}
|
||||
|
||||
//计算社保
|
||||
socialSecurity(sysStaff,sysStaffDetail, attendanceStatistical);
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
package com.evo.system.utils;
|
||||
|
||||
import com.alibaba.fastjson2.util.BeanUtils;
|
||||
import com.evo.common.constant.Constants;
|
||||
import com.evo.common.core.domain.entity.SysDictData;
|
||||
import com.evo.common.utils.Collections;
|
||||
import com.evo.common.utils.DateUtils;
|
||||
import com.evo.common.utils.spring.SpringUtils;
|
||||
@ -17,8 +15,6 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -45,7 +41,11 @@ public class SubsidyCalculationUtils {
|
||||
|
||||
public static SysStaffDetail subsidyCalculation(SysStaff staff, SysStaffDetail staffDetail, List<RzSubsidyInfo> subsidyInfoList){
|
||||
//正式员工并且有补助信息
|
||||
if(Constants.JOB_STATIS_1.equals(staff.getStatus())){
|
||||
Boolean isOfficial = Constants.JOB_STATIS_1.equals(staff.getStatus());
|
||||
/***
|
||||
* 2025-7-15 跟人力在工位面谈, 其中, 夜餐, 夜班, 中班, 入职享有, 不在是转正后享有, 所以调整代码
|
||||
*/
|
||||
// if(Constants.JOB_STATIS_1.equals(staff.getStatus())){
|
||||
if(Collections.isEmpty(subsidyInfoList)){
|
||||
subsidyInfoList = SpringUtils.getBean(IRzSubsidyInfoService.class).list();
|
||||
}
|
||||
@ -57,17 +57,17 @@ public class SubsidyCalculationUtils {
|
||||
RzSubsidyInfo rzSubsidyInfo = map.get(Long.valueOf(subsidyId));
|
||||
String key = rzSubsidyInfo.getName();
|
||||
BigDecimal value = rzSubsidyInfo.getValue();
|
||||
if(ht.equals(subsidyId) && staff.getContractStart() != null && staff.getContractEnd() != null){
|
||||
if(ht.equals(subsidyId) && isOfficial && staff.getContractStart() != null && staff.getContractEnd() != null){
|
||||
Integer year= DateUtils.getBetweenYear(staff.getContractStart(), staff.getContractEnd(), 1);
|
||||
value = value.multiply(new BigDecimal(year));
|
||||
isAdd = true;
|
||||
}else if(gl.equals(subsidyId)){
|
||||
}else if(gl.equals(subsidyId) && isOfficial ){
|
||||
Integer year= DateUtils.getBetweenYearByDays(staff.getEmploymentDate(), new Date());
|
||||
//最多只允许10年的工龄补贴
|
||||
if(year > 10) year=10;
|
||||
value = value.multiply(new BigDecimal(year));
|
||||
isAdd = true;
|
||||
}else if(xnh.equals(subsidyId)){
|
||||
}else if(xnh.equals(subsidyId) && isOfficial){
|
||||
isAdd = "新农合".equals(staff.getSocialType()) && ("是".equals(staff.getSocialSubsidy()) || "享有".equals(staff.getSocialSubsidy()));
|
||||
}else if(yc.equals(subsidyId)){
|
||||
isAdd = "否".equals(staff.getZsFlag());
|
||||
@ -77,7 +77,7 @@ public class SubsidyCalculationUtils {
|
||||
}
|
||||
}
|
||||
//计算学历补助
|
||||
if(StringUtils.isNotEmpty(staff.getLevel())){
|
||||
if(StringUtils.isNotEmpty(staff.getLevel()) && isOfficial){
|
||||
//查询学历
|
||||
String label = SpringUtils.getBean(SysDictDataMapper.class).selectDictLabel(Constants.SYS_LEVEL, staff.getLevel());
|
||||
if(StringUtils.isNotEmpty(label)){
|
||||
@ -87,8 +87,7 @@ public class SubsidyCalculationUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
return staffDetail;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
89
evo-admin/src/main/resources/application-local.yml
Normal file
89
evo-admin/src/main/resources/application-local.yml
Normal file
@ -0,0 +1,89 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
enabled: false
|
||||
# 热部署开关
|
||||
redis:
|
||||
# 地址
|
||||
host: 192.168.16.128
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
# 密码
|
||||
password: hbyt2025
|
||||
# 连接超时时间
|
||||
timeout: 10s
|
||||
lettuce:
|
||||
pool:
|
||||
# 连接池中的最小空闲连接
|
||||
min-idle: 0
|
||||
# 连接池中的最大空闲连接
|
||||
max-idle: 8
|
||||
# 连接池的最大数据库连接数
|
||||
max-active: 8
|
||||
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-wait: -1ms
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/evo_cw_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: hbyt123456
|
||||
#username: root
|
||||
#password: yj.chen@001
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
minIdle: 10
|
||||
# 最大连接池数量
|
||||
maxActive: 20
|
||||
# 配置获取连接等待超时的时间
|
||||
maxWait: 60000
|
||||
# 配置连接超时时间
|
||||
connectTimeout: 30000
|
||||
# 配置网络超时时间
|
||||
socketTimeout: 60000
|
||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||
maxEvictableIdleTimeMillis: 900000
|
||||
# 配置检测连接是否有效
|
||||
validationQuery: SELECT 1 FROM DUAL
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
# 设置白名单,不填则允许所有访问
|
||||
allow:
|
||||
url-pattern: /druid/*
|
||||
# 控制台管理用户名和密码
|
||||
login-username: evo
|
||||
login-password: 123456
|
||||
filter:
|
||||
stat:
|
||||
enabled: true
|
||||
# 慢SQL记录
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
Loading…
Reference in New Issue
Block a user