Compare commits
2 Commits
f5b1453b36
...
33eddc864f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33eddc864f | ||
|
|
948fed4a7c |
47
.gitignore
vendored
47
.gitignore
vendored
@ -1,47 +0,0 @@
|
|||||||
######################################################################
|
|
||||||
# Build Tools
|
|
||||||
|
|
||||||
.gradle
|
|
||||||
/build/
|
|
||||||
!gradle/wrapper/gradle-wrapper.jar
|
|
||||||
|
|
||||||
target/
|
|
||||||
!.mvn/wrapper/maven-wrapper.jar
|
|
||||||
|
|
||||||
######################################################################
|
|
||||||
# IDE
|
|
||||||
|
|
||||||
### STS ###
|
|
||||||
.apt_generated
|
|
||||||
.classpath
|
|
||||||
.factorypath
|
|
||||||
.project
|
|
||||||
.settings
|
|
||||||
.springBeans
|
|
||||||
|
|
||||||
### IntelliJ IDEA ###
|
|
||||||
.idea
|
|
||||||
*.iws
|
|
||||||
*.iml
|
|
||||||
*.ipr
|
|
||||||
|
|
||||||
### JRebel ###
|
|
||||||
rebel.xml
|
|
||||||
|
|
||||||
### NetBeans ###
|
|
||||||
nbproject/private/
|
|
||||||
build/*
|
|
||||||
nbbuild/
|
|
||||||
dist/
|
|
||||||
nbdist/
|
|
||||||
.nb-gradle/
|
|
||||||
|
|
||||||
######################################################################
|
|
||||||
# Others
|
|
||||||
*.log
|
|
||||||
*.xml.versionsBackup
|
|
||||||
*.swp
|
|
||||||
|
|
||||||
!*/build/*.java
|
|
||||||
!*/build/*.html
|
|
||||||
!*/build/*.xml
|
|
||||||
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
18
.idea/compiler.xml
Normal file
18
.idea/compiler.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<annotationProcessing>
|
||||||
|
<profile name="Maven default annotation processors profile" enabled="true">
|
||||||
|
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||||
|
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||||
|
<outputRelativeToContentRoot value="true" />
|
||||||
|
<module name="evo-tech" />
|
||||||
|
</profile>
|
||||||
|
</annotationProcessing>
|
||||||
|
<bytecodeTargetLevel>
|
||||||
|
<module name="evo (1)" target="1.8" />
|
||||||
|
<module name="evo (2)" target="1.8" />
|
||||||
|
<module name="evo-admin" target="1.8" />
|
||||||
|
</bytecodeTargetLevel>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
10
.idea/encodings.xml
Normal file
10
.idea/encodings.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
|
||||||
|
<file url="file://$PROJECT_DIR$/evo-admin/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/evo-admin/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||||
|
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||||
|
<file url="PROJECT" charset="UTF-8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
35
.idea/jarRepositories.xml
Normal file
35
.idea/jarRepositories.xml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="public" />
|
||||||
|
<option name="name" value="aliyun nexus" />
|
||||||
|
<option name="url" value="https://maven.aliyun.com/repository/public" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Central Repository" />
|
||||||
|
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Central Repository" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="public" />
|
||||||
|
<option name="name" value="aliyun nexus" />
|
||||||
|
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
12
.idea/misc.xml
Normal file
12
.idea/misc.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
|
<component name="MavenProjectsManager">
|
||||||
|
<option name="originalFiles">
|
||||||
|
<list>
|
||||||
|
<option value="$PROJECT_DIR$/pom.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="17" project-jdk-type="JavaSDK" />
|
||||||
|
</project>
|
||||||
@ -44,7 +44,9 @@ public interface RzAttendanceDetailMapper
|
|||||||
* @param staffId
|
* @param staffId
|
||||||
* @return 考勤明细集合
|
* @return 考勤明细集合
|
||||||
*/
|
*/
|
||||||
public RzAttendanceDetail selectRzAttendanceDetailByStaffId(@Param("staffId") Long staffId);
|
public default RzAttendanceDetail selectRzAttendanceDetailByStaffId(@Param("staffId") Long staffId) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public List<RzAttendanceDetail> selectRzAttendanceDetailByMonth(Date date);
|
public List<RzAttendanceDetail> selectRzAttendanceDetailByMonth(Date date);
|
||||||
|
|
||||||
|
|||||||
@ -59,10 +59,4 @@ public interface RzAttendanceStatisticalMapper
|
|||||||
*/
|
*/
|
||||||
public List<RzAttendanceStatistical> queryStatisticalByMonth(Date month);
|
public List<RzAttendanceStatistical> queryStatisticalByMonth(Date month);
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询某个人考勤月的考勤统计信息 *
|
|
||||||
* @return 考勤统计集合
|
|
||||||
*/
|
|
||||||
public List<RzAttendanceStatistical> queryStatisticalByMonthAndName(@Param("attendanceDate") Date attendanceDate,@Param("name") String name);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,12 +52,4 @@ public interface IRzAttendanceService
|
|||||||
* @return 考勤记录集合
|
* @return 考勤记录集合
|
||||||
*/
|
*/
|
||||||
public List<RzAttendance> listAttendanceByParams(RzAttendance rzAttendance);
|
public List<RzAttendance> listAttendanceByParams(RzAttendance rzAttendance);
|
||||||
|
|
||||||
/**
|
|
||||||
* 手动更改考勤记录时更新考勤统计信息
|
|
||||||
*
|
|
||||||
* @param rzAttendance 考勤记录
|
|
||||||
* @return 考勤记录集合
|
|
||||||
*/
|
|
||||||
public AjaxResult upateStatisticalByRzAttendance(RzAttendance rzAttendance);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.evo.attendance.service.impl;
|
package com.evo.attendance.service.impl;
|
||||||
|
|
||||||
import com.evo.attendance.domain.RzAttendanceStatistical;
|
|
||||||
import com.evo.common.annotation.DataScope;
|
import com.evo.common.annotation.DataScope;
|
||||||
import com.evo.common.core.domain.AjaxResult;
|
import com.evo.common.core.domain.AjaxResult;
|
||||||
import com.evo.common.core.domain.entity.SysDept;
|
import com.evo.common.core.domain.entity.SysDept;
|
||||||
@ -11,15 +10,11 @@ import com.evo.attendance.mapper.RzAttendanceMapper;
|
|||||||
import com.evo.attendance.mapper.RzAttendanceStatisticalMapper;
|
import com.evo.attendance.mapper.RzAttendanceStatisticalMapper;
|
||||||
import com.evo.attendance.service.IRzAttendanceService;
|
import com.evo.attendance.service.IRzAttendanceService;
|
||||||
import com.evo.common.utils.StringUtils;
|
import com.evo.common.utils.StringUtils;
|
||||||
import com.evo.personnelMatters.domain.RzOverTime;
|
|
||||||
import com.evo.personnelMatters.mapper.RzOverTimeMapper;
|
|
||||||
import com.evo.system.mapper.SysDeptMapper;
|
import com.evo.system.mapper.SysDeptMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.ZoneId;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -38,8 +33,6 @@ public class RzAttendanceServiceImpl implements IRzAttendanceService
|
|||||||
private SysDeptMapper deptMapper; //部门
|
private SysDeptMapper deptMapper; //部门
|
||||||
@Resource
|
@Resource
|
||||||
private RzAttendanceStatisticalMapper rzAttendanceStatisticalMapper; //考勤汇总
|
private RzAttendanceStatisticalMapper rzAttendanceStatisticalMapper; //考勤汇总
|
||||||
@Resource
|
|
||||||
private RzOverTimeMapper rzOverTimeMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询考勤记录
|
* 查询考勤记录
|
||||||
@ -86,7 +79,7 @@ public class RzAttendanceServiceImpl implements IRzAttendanceService
|
|||||||
public int updateRzAttendance(RzAttendance rzAttendance)
|
public int updateRzAttendance(RzAttendance rzAttendance)
|
||||||
{
|
{
|
||||||
//判断考勤时间
|
//判断考勤时间
|
||||||
long sj = (rzAttendance.getWorkEndTime().getTime() - rzAttendance.getWorkStartTime().getTime())/1000/60/60;
|
Long sj = (rzAttendance.getWorkEndTime().getTime() - rzAttendance.getWorkStartTime().getTime())/1000/60/60;
|
||||||
if(sj >= 8){
|
if(sj >= 8){
|
||||||
rzAttendance.setWorkSum(new BigDecimal(8));
|
rzAttendance.setWorkSum(new BigDecimal(8));
|
||||||
}else if(sj >= 4){
|
}else if(sj >= 4){
|
||||||
@ -96,12 +89,7 @@ public class RzAttendanceServiceImpl implements IRzAttendanceService
|
|||||||
rzAttendance.setYcxFlag("0");
|
rzAttendance.setYcxFlag("0");
|
||||||
rzAttendance.setUpdateBy(SecurityUtils.getUsername());
|
rzAttendance.setUpdateBy(SecurityUtils.getUsername());
|
||||||
rzAttendance.setUpdateTime(DateUtils.getNowDate());
|
rzAttendance.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return rzAttendanceMapper.updateRzAttendance(rzAttendance);
|
||||||
int count = rzAttendanceMapper.updateRzAttendance(rzAttendance);
|
|
||||||
if (count >0) {
|
|
||||||
upateStatisticalByRzAttendance(rzAttendance);
|
|
||||||
}
|
|
||||||
return count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -201,50 +189,4 @@ public class RzAttendanceServiceImpl implements IRzAttendanceService
|
|||||||
return rzAttendanceMapper.listAttendanceByParams(rzAttendance);
|
return rzAttendanceMapper.listAttendanceByParams(rzAttendance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getMonthFromDate(Date date) {
|
|
||||||
if (date == null) {
|
|
||||||
return -1; // 或者抛出异常
|
|
||||||
}
|
|
||||||
LocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
|
|
||||||
return localDate.getMonthValue(); // 返回 1-12
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 手动更改考勤记录时更新考勤统计信息
|
|
||||||
*
|
|
||||||
* @param rzAttendance 考勤记录
|
|
||||||
* @return 考勤记录集合
|
|
||||||
*/
|
|
||||||
public AjaxResult upateStatisticalByRzAttendance(RzAttendance rzAttendance) {
|
|
||||||
|
|
||||||
//查询条件月统计的数据
|
|
||||||
List<RzAttendanceStatistical> ms_list = rzAttendanceStatisticalMapper.queryStatisticalByMonthAndName(rzAttendance.getAttendanceDate(),rzAttendance.getName());
|
|
||||||
if (null != ms_list && ms_list.size() > 0) {
|
|
||||||
//初始化打卡记录
|
|
||||||
RzAttendanceStatistical attendanceStatistical = ms_list.get(0);
|
|
||||||
attendanceStatistical.setEssentialAttendance(new BigDecimal("0.0"));
|
|
||||||
attendanceStatistical.setWorkOvertimeNumber(new BigDecimal("0.0"));
|
|
||||||
attendanceStatistical.setMiddleShiftNumber(0l);
|
|
||||||
attendanceStatistical.setNightNumber(0l);
|
|
||||||
//查询打卡记录
|
|
||||||
// RzAttendance rzAttendance = new RzAttendance();
|
|
||||||
rzAttendance.setAttendanceDate(rzAttendance.getAttendanceDate());
|
|
||||||
rzAttendance.setStaffId(attendanceStatistical.getStaffId());
|
|
||||||
List<RzAttendance> at_list = rzAttendanceMapper.listAttendanceByParams(rzAttendance);
|
|
||||||
for (RzAttendance attendance : at_list) {
|
|
||||||
attendanceStatistical.setEssentialAttendance(attendanceStatistical.getEssentialAttendance().add(attendance.getWorkSum()));
|
|
||||||
attendanceStatistical.setMiddleShiftNumber(attendanceStatistical.getMiddleShiftNumber() + attendance.getMiddleShiftNumber());
|
|
||||||
attendanceStatistical.setNightNumber(attendanceStatistical.getNightNumber() + attendance.getNightNumber());
|
|
||||||
}
|
|
||||||
//获取加班数据
|
|
||||||
RzOverTime rzOverTime = rzOverTimeMapper.selectRzOverTimeByNameAndMonth(attendanceStatistical.getStaffId(), rzAttendance.getAttendanceDate());
|
|
||||||
if (StringUtils.isNotNull(rzOverTime)) {
|
|
||||||
attendanceStatistical.setWorkOvertimeNumber(rzOverTime.getOverHours());
|
|
||||||
}
|
|
||||||
attendanceStatistical.setRealAttendance(attendanceStatistical.getEssentialAttendance().add(attendanceStatistical.getWorkOvertimeNumber()));
|
|
||||||
rzAttendanceStatisticalMapper.updateRzAttendanceStatistical(attendanceStatistical);
|
|
||||||
}
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -360,7 +360,6 @@ public class ExcelUtilSs<T>{
|
|||||||
return AjaxResult.success(filename);
|
return AjaxResult.success(filename);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
log.error("导出Excel异常{}", e.getMessage());
|
log.error("导出Excel异常{}", e.getMessage());
|
||||||
System.out.println("导出Excel异常"+e.getMessage());
|
|
||||||
throw new CustomException("导出Excel失败,请联系网站管理员!");
|
throw new CustomException("导出Excel失败,请联系网站管理员!");
|
||||||
}
|
}
|
||||||
finally{
|
finally{
|
||||||
@ -396,35 +395,30 @@ public class ExcelUtilSs<T>{
|
|||||||
* @param row 单元格行
|
* @param row 单元格行
|
||||||
*/
|
*/
|
||||||
public void fillExcelData(int index, Row row){
|
public void fillExcelData(int index, Row row){
|
||||||
try {
|
int startNo = 0;
|
||||||
int startNo = 0;
|
int endNo = 0;
|
||||||
int endNo = 0;
|
if(index == 0){
|
||||||
if(index == 0){
|
startNo = index * sheetSize;
|
||||||
startNo = index * sheetSize;
|
endNo = Math.min(startNo + sheetSize, list.size());
|
||||||
endNo = Math.min(startNo + sheetSize, list.size());
|
} else{
|
||||||
} else{
|
endNo = Math.min(startNo + sheetSize, lists.get(index-1).size());
|
||||||
endNo = Math.min(startNo + sheetSize, lists.get(index-1).size());
|
}
|
||||||
}
|
for (int i = startNo; i < endNo; i++){
|
||||||
for (int i = startNo; i < endNo; i++){
|
row = sheet.createRow(i + 2 - startNo);
|
||||||
row = sheet.createRow(i + 2 - startNo);
|
// 得到导出对象.
|
||||||
// 得到导出对象.
|
T vo = (T) list.get(i);
|
||||||
T vo = (T) list.get(i);
|
int column = 0;
|
||||||
int column = 0;
|
//当index为0时,默认是第一个sheet,需要把list[1]姓名列删掉
|
||||||
//当index为0时,默认是第一个sheet,需要把list[1]姓名列删掉
|
List<Object[]> fields2 = new ArrayList<>();
|
||||||
List<Object[]> fields2 = new ArrayList<>();
|
fields2.addAll(fields);
|
||||||
fields2.addAll(fields);
|
for (Object[] os : fields2){
|
||||||
for (Object[] os : fields2){
|
Field field = (Field) os[0];
|
||||||
Field field = (Field) os[0];
|
Excel excel = (Excel) os[1];
|
||||||
Excel excel = (Excel) os[1];
|
// 设置实体类私有属性可访问
|
||||||
// 设置实体类私有属性可访问
|
field.setAccessible(true);
|
||||||
field.setAccessible(true);
|
this.addCell(excel, row, vo, field, column++,index);
|
||||||
this.addCell(excel, row, vo, field, column++,index);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}catch (Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package com.evo.equipment.service;
|
|||||||
|
|
||||||
import com.evo.common.core.domain.AjaxResult;
|
import com.evo.common.core.domain.AjaxResult;
|
||||||
import com.evo.equipment.domain.EqButton;
|
import com.evo.equipment.domain.EqButton;
|
||||||
import com.evo.equipment.domain.EqSnDetail;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -61,7 +60,4 @@ public interface IEqButtonService
|
|||||||
* @return 按钮信息
|
* @return 按钮信息
|
||||||
*/
|
*/
|
||||||
public EqButton selectEqButtonByName(String name);
|
public EqButton selectEqButtonByName(String name);
|
||||||
|
|
||||||
|
|
||||||
public void sendButton(EqSnDetail snDetail);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -205,34 +205,4 @@ public class EqButtonServiceImpl implements IEqButtonService
|
|||||||
return eqButtonMapper.selectEqButtonByName(name);
|
return eqButtonMapper.selectEqButtonByName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void sendButton(EqSnDetail snDetail) {
|
|
||||||
//获取所有打卡按钮
|
|
||||||
List<EqButton> bt_list = eqButtonMapper.selectEqButtonList(null);
|
|
||||||
|
|
||||||
CwButtonVo cbv = new CwButtonVo();
|
|
||||||
CwButtonData cbd = new CwButtonData();
|
|
||||||
//该接口固定为to_device,发送给设备用于识别对应哪个指令
|
|
||||||
cbv.setCmd("to_device");
|
|
||||||
//无用值,空串
|
|
||||||
cbv.setForm("");
|
|
||||||
//设备号
|
|
||||||
cbv.setTo(snDetail.getSn());
|
|
||||||
//发送的数据
|
|
||||||
cbd.setCmd("setButtons");
|
|
||||||
//按钮对象
|
|
||||||
CwBottonDto cwBottonDto = null;
|
|
||||||
//按钮集合
|
|
||||||
List<CwBottonDto> list2 = new ArrayList<CwBottonDto>();
|
|
||||||
for (EqButton button : bt_list) {
|
|
||||||
cwBottonDto = new CwBottonDto();
|
|
||||||
cwBottonDto.setIcon(button.getImage());
|
|
||||||
list2.add(cwBottonDto);
|
|
||||||
}
|
|
||||||
cbd.setValue(list2);
|
|
||||||
cbv.setData(cbd);
|
|
||||||
//调用websocket,推送给设备
|
|
||||||
WebSocketUsers.sendMessageToUsersByText(JSONObject.toJSONString(cbv));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import com.evo.common.core.domain.entity.SysDictData;
|
|||||||
import com.evo.common.utils.StringUtils;
|
import com.evo.common.utils.StringUtils;
|
||||||
import com.evo.common.utils.poi.ExcelUtilSs;
|
import com.evo.common.utils.poi.ExcelUtilSs;
|
||||||
import com.evo.finance.domain.vo.SalaryVo;
|
import com.evo.finance.domain.vo.SalaryVo;
|
||||||
import com.evo.restaurant.domain.RzRestaurantStatistics;
|
|
||||||
import com.evo.system.mapper.SysDictDataMapper;
|
import com.evo.system.mapper.SysDictDataMapper;
|
||||||
import com.evo.system.service.ISysDeptService;
|
import com.evo.system.service.ISysDeptService;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
@ -111,7 +110,7 @@ public class RzSalaryDetailController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('finance:financeDetail:export')")
|
@PreAuthorize("@ss.hasPermi('finance:financeDetail:export')")
|
||||||
@Log(title = "工资详情", businessType = BusinessType.EXPORT)
|
@Log(title = "工资详情", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public AjaxResult export(@RequestBody RzSalaryDetail rzSalaryDetail)
|
public AjaxResult export(RzSalaryDetail rzSalaryDetail)
|
||||||
{
|
{
|
||||||
ExcelUtilSs<SalaryVo> util = new ExcelUtilSs<SalaryVo>(SalaryVo.class);
|
ExcelUtilSs<SalaryVo> util = new ExcelUtilSs<SalaryVo>(SalaryVo.class);
|
||||||
//创建总表
|
//创建总表
|
||||||
@ -129,10 +128,7 @@ public class RzSalaryDetailController extends BaseController
|
|||||||
//工资数据转化的保存
|
//工资数据转化的保存
|
||||||
List<SalaryVo> list0 =new ArrayList<SalaryVo>();
|
List<SalaryVo> list0 =new ArrayList<SalaryVo>();
|
||||||
for (SysDept sysDept : dept_list) {
|
for (SysDept sysDept : dept_list) {
|
||||||
if(!sysDept.getDeptName().equals("晋辅") && !sysDept.getDeptName().equals("元氏鑫源达")){
|
sheetNameList.add(sysDept.getDeptName());
|
||||||
sheetNameList.add(sysDept.getDeptName());
|
|
||||||
}
|
|
||||||
list0 = new ArrayList<SalaryVo>();
|
|
||||||
//部门小计
|
//部门小计
|
||||||
SalaryVo xj_salaryVo = new SalaryVo();
|
SalaryVo xj_salaryVo = new SalaryVo();
|
||||||
xj_salaryVo.setName("小计:");
|
xj_salaryVo.setName("小计:");
|
||||||
@ -232,27 +228,17 @@ public class RzSalaryDetailController extends BaseController
|
|||||||
xj_salaryVo.setTaxPayable(new BigDecimal("0.00"));
|
xj_salaryVo.setTaxPayable(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
xj_salaryVo.setTaxPayable(xj_salaryVo.getTaxPayable().add(salaryDetail.getTaxPayable()));
|
xj_salaryVo.setTaxPayable(xj_salaryVo.getTaxPayable().add(salaryDetail.getTaxPayable()));
|
||||||
|
|
||||||
//实发工资
|
|
||||||
if(StringUtils.isNull(xj_salaryVo.getNetPayroll())){
|
if(StringUtils.isNull(xj_salaryVo.getNetPayroll())){
|
||||||
xj_salaryVo.setNetPayroll(new BigDecimal("0.00"));
|
xj_salaryVo.setNetPayroll(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
xj_salaryVo.setNetPayroll(xj_salaryVo.getNetPayroll().add(salaryDetail.getNetPayroll()));
|
xj_salaryVo.setNetPayroll(xj_salaryVo.getNetPayroll().add(salaryDetail.getNetPayroll()));
|
||||||
BeanUtils.copyProperties(salaryDetail, salaryVo);
|
BeanUtils.copyProperties(salaryDetail, salaryVo);
|
||||||
salaryVo.setDeptName(sysDept.getDeptName());
|
salaryVo.setDeptName(sysDept.getDeptName());
|
||||||
list0.add(salaryVo);//1、汇总一个部门下所有人员工资明细
|
list0.add(salaryVo);
|
||||||
}
|
}
|
||||||
|
list0.add(xj_salaryVo);
|
||||||
|
|
||||||
if(StringUtils.isNull(xj_salaryVo.getBasicSalary())){
|
|
||||||
xj_salaryVo.setBasicSalary(new BigDecimal("0.00"));
|
|
||||||
}
|
|
||||||
if(StringUtils.isNull(xj_salaryVo.getOvertimeSalary())){
|
|
||||||
xj_salaryVo.setOvertimeSalary(new BigDecimal("0.00"));
|
|
||||||
}
|
|
||||||
list0.add(xj_salaryVo);//2、人员工资明细下面存放一条小计信息
|
|
||||||
lists.add(list0);
|
lists.add(list0);
|
||||||
list.add(xj_salaryVo);//3、存放所有部门小计信息
|
list.add(xj_salaryVo);
|
||||||
}
|
}
|
||||||
//计算伊特总计数据
|
//计算伊特总计数据
|
||||||
SalaryVo gj_salaryVo = new SalaryVo();
|
SalaryVo gj_salaryVo = new SalaryVo();
|
||||||
@ -268,91 +254,91 @@ public class RzSalaryDetailController extends BaseController
|
|||||||
if(StringUtils.isNull(gj_salaryVo.getLevelSubsidies())){
|
if(StringUtils.isNull(gj_salaryVo.getLevelSubsidies())){
|
||||||
gj_salaryVo.setLevelSubsidies(new BigDecimal("0.00"));
|
gj_salaryVo.setLevelSubsidies(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setLevelSubsidies(gj_salaryVo.getLevelSubsidies().add(salaryVoz.getLevelSubsidies()==null?new BigDecimal("0.00"):salaryVoz.getLevelSubsidies()));
|
gj_salaryVo.setLevelSubsidies(gj_salaryVo.getLevelSubsidies().add(salaryVoz.getLevelSubsidies()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getContractSubsidies())){
|
if(StringUtils.isNull(gj_salaryVo.getContractSubsidies())){
|
||||||
gj_salaryVo.setContractSubsidies(new BigDecimal("0.00"));
|
gj_salaryVo.setContractSubsidies(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setContractSubsidies(gj_salaryVo.getContractSubsidies().add(salaryVoz.getContractSubsidies()==null?new BigDecimal("0.00"):salaryVoz.getContractSubsidies()));
|
gj_salaryVo.setContractSubsidies(gj_salaryVo.getContractSubsidies().add(salaryVoz.getContractSubsidies()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getSenioritySalary())){
|
if(StringUtils.isNull(gj_salaryVo.getSenioritySalary())){
|
||||||
gj_salaryVo.setSenioritySalary(new BigDecimal("0.00"));
|
gj_salaryVo.setSenioritySalary(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setSenioritySalary(gj_salaryVo.getSenioritySalary().add(salaryVoz.getSenioritySalary()==null?new BigDecimal("0.00"):salaryVoz.getSenioritySalary()));
|
gj_salaryVo.setSenioritySalary(gj_salaryVo.getSenioritySalary().add(salaryVoz.getSenioritySalary()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getSocialSubsidies())){
|
if(StringUtils.isNull(gj_salaryVo.getSocialSubsidies())){
|
||||||
gj_salaryVo.setSocialSubsidies(new BigDecimal("0.00"));
|
gj_salaryVo.setSocialSubsidies(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setSocialSubsidies(gj_salaryVo.getSocialSubsidies().add(salaryVoz.getSocialSubsidies()==null?new BigDecimal("0.00"):salaryVoz.getSocialSubsidies()));
|
gj_salaryVo.setSocialSubsidies(gj_salaryVo.getSocialSubsidies().add(salaryVoz.getSocialSubsidies()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getFullSubsidies())){
|
if(StringUtils.isNull(gj_salaryVo.getFullSubsidies())){
|
||||||
gj_salaryVo.setFullSubsidies(new BigDecimal("0.00"));
|
gj_salaryVo.setFullSubsidies(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setFullSubsidies(gj_salaryVo.getFullSubsidies().add(salaryVoz.getFullSubsidies()==null?new BigDecimal("0.00"):salaryVoz.getFullSubsidies()));
|
gj_salaryVo.setFullSubsidies(gj_salaryVo.getFullSubsidies().add(salaryVoz.getFullSubsidies()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getNightSubsidies())){
|
if(StringUtils.isNull(gj_salaryVo.getNightSubsidies())){
|
||||||
gj_salaryVo.setNightSubsidies(new BigDecimal("0.00"));
|
gj_salaryVo.setNightSubsidies(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setNightSubsidies(gj_salaryVo.getNightSubsidies().add(salaryVoz.getNightSubsidies()==null?new BigDecimal("0.00"):salaryVoz.getNightSubsidies()));
|
gj_salaryVo.setNightSubsidies(gj_salaryVo.getNightSubsidies().add(salaryVoz.getNightSubsidies()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getDinnerSubsidies())){
|
if(StringUtils.isNull(gj_salaryVo.getDinnerSubsidies())){
|
||||||
gj_salaryVo.setDinnerSubsidies(new BigDecimal("0.00"));
|
gj_salaryVo.setDinnerSubsidies(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setDinnerSubsidies(gj_salaryVo.getDinnerSubsidies().add(salaryVoz.getDinnerSubsidies()==null?new BigDecimal("0.00"):salaryVoz.getNightSubsidies()));
|
gj_salaryVo.setDinnerSubsidies(gj_salaryVo.getDinnerSubsidies().add(salaryVoz.getDinnerSubsidies()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getSubsidyOrBonus())){
|
if(StringUtils.isNull(gj_salaryVo.getSubsidyOrBonus())){
|
||||||
gj_salaryVo.setSubsidyOrBonus(new BigDecimal("0.00"));
|
gj_salaryVo.setSubsidyOrBonus(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setSubsidyOrBonus(gj_salaryVo.getSubsidyOrBonus().add(salaryVoz.getSubsidyOrBonus()==null?new BigDecimal("0.00"):salaryVoz.getSubsidyOrBonus()));
|
gj_salaryVo.setSubsidyOrBonus(gj_salaryVo.getSubsidyOrBonus().add(salaryVoz.getSubsidyOrBonus()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getAbsenteeismSalary())){
|
if(StringUtils.isNull(gj_salaryVo.getAbsenteeismSalary())){
|
||||||
gj_salaryVo.setAbsenteeismSalary(new BigDecimal("0.00"));
|
gj_salaryVo.setAbsenteeismSalary(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setAbsenteeismSalary(gj_salaryVo.getAbsenteeismSalary().add(salaryVoz.getAbsenteeismSalary()==null?new BigDecimal("0.00"):salaryVoz.getAbsenteeismSalary()));
|
gj_salaryVo.setAbsenteeismSalary(gj_salaryVo.getAbsenteeismSalary().add(salaryVoz.getAbsenteeismSalary()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getAbsenteeismSubsidies())){
|
if(StringUtils.isNull(gj_salaryVo.getAbsenteeismSubsidies())){
|
||||||
gj_salaryVo.setAbsenteeismSubsidies(new BigDecimal("0.00"));
|
gj_salaryVo.setAbsenteeismSubsidies(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setAbsenteeismSubsidies(gj_salaryVo.getAbsenteeismSubsidies().add(salaryVoz.getAbsenteeismSubsidies()==null?new BigDecimal("0.00"):salaryVoz.getAbsenteeismSubsidies()));
|
gj_salaryVo.setAbsenteeismSubsidies(gj_salaryVo.getAbsenteeismSubsidies().add(salaryVoz.getAbsenteeismSubsidies()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getMealFee())){
|
if(StringUtils.isNull(gj_salaryVo.getMealFee())){
|
||||||
gj_salaryVo.setMealFee(new BigDecimal("0.00"));
|
gj_salaryVo.setMealFee(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setMealFee(gj_salaryVo.getMealFee().add(salaryVoz.getMealFee()==null?new BigDecimal("0.00"):salaryVoz.getMealFee()));
|
gj_salaryVo.setMealFee(gj_salaryVo.getMealFee().add(salaryVoz.getMealFee()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getDeductions())){
|
if(StringUtils.isNull(gj_salaryVo.getDeductions())){
|
||||||
gj_salaryVo.setDeductions(new BigDecimal("0.00"));
|
gj_salaryVo.setDeductions(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setDeductions(gj_salaryVo.getDeductions().add(salaryVoz.getDeductions()==null?new BigDecimal("0.00"):salaryVoz.getDeductions()));
|
gj_salaryVo.setDeductions(gj_salaryVo.getDeductions().add(salaryVoz.getDeductions()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getSalary())){
|
if(StringUtils.isNull(gj_salaryVo.getSalary())){
|
||||||
gj_salaryVo.setSalary(new BigDecimal("0.00"));
|
gj_salaryVo.setSalary(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setSalary(gj_salaryVo.getSalary().add(salaryVoz.getSalary()==null?new BigDecimal("0.00"):salaryVoz.getSalary()));
|
gj_salaryVo.setSalary(gj_salaryVo.getSalary().add(salaryVoz.getSalary()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getPayInsurance())){
|
if(StringUtils.isNull(gj_salaryVo.getPayInsurance())){
|
||||||
gj_salaryVo.setPayInsurance(new BigDecimal("0.00"));
|
gj_salaryVo.setPayInsurance(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setPayInsurance(gj_salaryVo.getPayInsurance().add(salaryVoz.getPayInsurance()==null?new BigDecimal("0.00"):salaryVoz.getPayInsurance()));
|
gj_salaryVo.setPayInsurance(gj_salaryVo.getPayInsurance().add(salaryVoz.getPayInsurance()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getSalaryBeforeTax())){
|
if(StringUtils.isNull(gj_salaryVo.getSalaryBeforeTax())){
|
||||||
gj_salaryVo.setSalaryBeforeTax(new BigDecimal("0.00"));
|
gj_salaryVo.setSalaryBeforeTax(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setSalaryBeforeTax(gj_salaryVo.getSalaryBeforeTax().add(salaryVoz.getSalaryBeforeTax()==null?new BigDecimal("0.00"):salaryVoz.getSalaryBeforeTax()));
|
gj_salaryVo.setSalaryBeforeTax(gj_salaryVo.getSalaryBeforeTax().add(salaryVoz.getSalaryBeforeTax()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getTotalWages())){
|
if(StringUtils.isNull(gj_salaryVo.getTotalWages())){
|
||||||
gj_salaryVo.setTotalWages(new BigDecimal("0.00"));
|
gj_salaryVo.setTotalWages(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setTotalWages(gj_salaryVo.getTotalWages().add(salaryVoz.getTotalWages()==null?new BigDecimal("0.00"):salaryVoz.getTotalWages()));
|
gj_salaryVo.setTotalWages(gj_salaryVo.getTotalWages().add(salaryVoz.getTotalWages()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getAnnualExemptionAmount())){
|
if(StringUtils.isNull(gj_salaryVo.getAnnualExemptionAmount())){
|
||||||
gj_salaryVo.setAnnualExemptionAmount(new BigDecimal("0.00"));
|
gj_salaryVo.setAnnualExemptionAmount(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setAnnualExemptionAmount(gj_salaryVo.getAnnualExemptionAmount().add(salaryVoz.getAnnualExemptionAmount()==null?new BigDecimal("0.00"):salaryVoz.getAnnualExemptionAmount()));
|
gj_salaryVo.setAnnualExemptionAmount(gj_salaryVo.getAnnualExemptionAmount().add(salaryVoz.getAnnualExemptionAmount()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getSpecialDeduction())){
|
if(StringUtils.isNull(gj_salaryVo.getSpecialDeduction())){
|
||||||
gj_salaryVo.setSpecialDeduction(new BigDecimal("0.00"));
|
gj_salaryVo.setSpecialDeduction(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setSpecialDeduction(gj_salaryVo.getSpecialDeduction().add(salaryVoz.getSpecialDeduction()==null?new BigDecimal("0.00"):salaryVoz.getSpecialDeduction()));
|
gj_salaryVo.setSpecialDeduction(gj_salaryVo.getSpecialDeduction().add(salaryVoz.getSpecialDeduction()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getSlowDownTheDeduction())){
|
if(StringUtils.isNull(gj_salaryVo.getSlowDownTheDeduction())){
|
||||||
gj_salaryVo.setSlowDownTheDeduction(new BigDecimal("0.00"));
|
gj_salaryVo.setSlowDownTheDeduction(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setSlowDownTheDeduction(gj_salaryVo.getSlowDownTheDeduction().add(salaryVoz.getSlowDownTheDeduction()==null?new BigDecimal("0.00"):salaryVoz.getSlowDownTheDeduction()));
|
gj_salaryVo.setSlowDownTheDeduction(gj_salaryVo.getSlowDownTheDeduction().add(salaryVoz.getSlowDownTheDeduction()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getAggregatePersonalIncomeTax())){
|
if(StringUtils.isNull(gj_salaryVo.getAggregatePersonalIncomeTax())){
|
||||||
gj_salaryVo.setAggregatePersonalIncomeTax(new BigDecimal("0.00"));
|
gj_salaryVo.setAggregatePersonalIncomeTax(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setAggregatePersonalIncomeTax(gj_salaryVo.getAggregatePersonalIncomeTax().add(salaryVoz.getAggregatePersonalIncomeTax()==null?new BigDecimal("0.00"):salaryVoz.getAggregatePersonalIncomeTax()));
|
gj_salaryVo.setAggregatePersonalIncomeTax(gj_salaryVo.getAggregatePersonalIncomeTax().add(salaryVoz.getAggregatePersonalIncomeTax()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getTaxPayable())){
|
if(StringUtils.isNull(gj_salaryVo.getTaxPayable())){
|
||||||
gj_salaryVo.setTaxPayable(new BigDecimal("0.00"));
|
gj_salaryVo.setTaxPayable(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setTaxPayable(gj_salaryVo.getTaxPayable().add(salaryVoz.getTaxPayable()==null?new BigDecimal("0.00"):salaryVoz.getTaxPayable()));
|
gj_salaryVo.setTaxPayable(gj_salaryVo.getTaxPayable().add(salaryVoz.getTaxPayable()));
|
||||||
if(StringUtils.isNull(gj_salaryVo.getNetPayroll())){
|
if(StringUtils.isNull(gj_salaryVo.getNetPayroll())){
|
||||||
gj_salaryVo.setNetPayroll(new BigDecimal("0.00"));
|
gj_salaryVo.setNetPayroll(new BigDecimal("0.00"));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setNetPayroll(gj_salaryVo.getNetPayroll().add(salaryVoz.getNetPayroll()==null?new BigDecimal("0.00"):salaryVoz.getNetPayroll()));
|
gj_salaryVo.setNetPayroll(gj_salaryVo.getNetPayroll().add(salaryVoz.getNetPayroll()));
|
||||||
}
|
}
|
||||||
gj_salaryVo.setName("伊特总计:");
|
gj_salaryVo.setName("伊特总计:");
|
||||||
list.add(gj_salaryVo);
|
list.add(gj_salaryVo);
|
||||||
@ -474,34 +460,34 @@ public class RzSalaryDetailController extends BaseController
|
|||||||
list0.add(salaryVo);
|
list0.add(salaryVo);
|
||||||
}
|
}
|
||||||
list.add(xj_salaryVo);
|
list.add(xj_salaryVo);
|
||||||
payRollZong.setBasicSalary(xj_salaryVo.getBasicSalary()==null?new BigDecimal("0.00"):xj_salaryVo.getBasicSalary().add(payRollZong.getBasicSalary()));
|
payRollZong.setBasicSalary(xj_salaryVo.getBasicSalary().add(payRollZong.getBasicSalary()));
|
||||||
payRollZong.setOvertimeSalary(xj_salaryVo.getOvertimeSalary()==null?new BigDecimal("0.00"):xj_salaryVo.getOvertimeSalary().add(payRollZong.getOvertimeSalary()));
|
payRollZong.setOvertimeSalary(xj_salaryVo.getOvertimeSalary().add(payRollZong.getOvertimeSalary()));
|
||||||
payRollZong.setLevelSubsidies(xj_salaryVo.getLevelSubsidies()==null?new BigDecimal("0.00"):xj_salaryVo.getLevelSubsidies().add(payRollZong.getLevelSubsidies()));
|
payRollZong.setLevelSubsidies(xj_salaryVo.getLevelSubsidies().add(payRollZong.getLevelSubsidies()));
|
||||||
payRollZong.setContractSubsidies(xj_salaryVo.getContractSubsidies()==null?new BigDecimal("0.00"):xj_salaryVo.getContractSubsidies().add(payRollZong.getContractSubsidies()));
|
payRollZong.setContractSubsidies(xj_salaryVo.getContractSubsidies().add(payRollZong.getContractSubsidies()));
|
||||||
payRollZong.setSenioritySalary(xj_salaryVo.getSenioritySalary()==null?new BigDecimal("0.00"):xj_salaryVo.getSenioritySalary().add(payRollZong.getSenioritySalary()));
|
payRollZong.setSenioritySalary(xj_salaryVo.getSenioritySalary().add(payRollZong.getSenioritySalary()));
|
||||||
payRollZong.setSocialSubsidies(xj_salaryVo.getSocialSubsidies()==null?new BigDecimal("0.00"):xj_salaryVo.getSocialSubsidies().add(payRollZong.getSocialSubsidies()));
|
payRollZong.setSocialSubsidies(xj_salaryVo.getSocialSubsidies().add(payRollZong.getSocialSubsidies()));
|
||||||
payRollZong.setFullSubsidies(xj_salaryVo.getFullSubsidies()==null?new BigDecimal("0.00"):xj_salaryVo.getFullSubsidies().add(payRollZong.getFullSubsidies()));
|
payRollZong.setFullSubsidies(xj_salaryVo.getFullSubsidies().add(payRollZong.getFullSubsidies()));
|
||||||
payRollZong.setNightSubsidies(xj_salaryVo.getNightSubsidies()==null?new BigDecimal("0.00"):xj_salaryVo.getNightSubsidies().add(payRollZong.getNightSubsidies()));
|
payRollZong.setNightSubsidies(xj_salaryVo.getNightSubsidies().add(payRollZong.getNightSubsidies()));
|
||||||
payRollZong.setDinnerSubsidies(xj_salaryVo.getDinnerSubsidies()==null?new BigDecimal("0.00"):xj_salaryVo.getDinnerSubsidies().add(payRollZong.getDinnerSubsidies()));
|
payRollZong.setDinnerSubsidies(xj_salaryVo.getDinnerSubsidies().add(payRollZong.getDinnerSubsidies()));
|
||||||
payRollZong.setSubsidyOrBonus(xj_salaryVo.getSubsidyOrBonus()==null?new BigDecimal("0.00"):xj_salaryVo.getSubsidyOrBonus().add(payRollZong.getSubsidyOrBonus()));
|
payRollZong.setSubsidyOrBonus(xj_salaryVo.getSubsidyOrBonus().add(payRollZong.getSubsidyOrBonus()));
|
||||||
payRollZong.setAbsenteeismSalary(xj_salaryVo.getAbsenteeismSalary()==null?new BigDecimal("0.00"):xj_salaryVo.getAbsenteeismSalary().add(payRollZong.getAbsenteeismSalary()));
|
payRollZong.setAbsenteeismSalary(xj_salaryVo.getAbsenteeismSalary().add(payRollZong.getAbsenteeismSalary()));
|
||||||
payRollZong.setAbsenteeismSubsidies(xj_salaryVo.getAbsenteeismSubsidies()==null?new BigDecimal("0.00"):xj_salaryVo.getAbsenteeismSubsidies().add(payRollZong.getAbsenteeismSubsidies()));
|
payRollZong.setAbsenteeismSubsidies(xj_salaryVo.getAbsenteeismSubsidies().add(payRollZong.getAbsenteeismSubsidies()));
|
||||||
payRollZong.setMealFee(xj_salaryVo.getMealFee()==null?new BigDecimal("0.00"):xj_salaryVo.getMealFee().add(payRollZong.getMealFee()));
|
payRollZong.setMealFee(xj_salaryVo.getMealFee().add(payRollZong.getMealFee()));
|
||||||
payRollZong.setDeductions(xj_salaryVo.getDeductions()==null?new BigDecimal("0.00"):xj_salaryVo.getDeductions().add(payRollZong.getDeductions()));
|
payRollZong.setDeductions(xj_salaryVo.getDeductions().add(payRollZong.getDeductions()));
|
||||||
payRollZong.setSalary(xj_salaryVo.getSalary()==null ?new BigDecimal("0.00"):xj_salaryVo.getSalary().add(payRollZong.getSalary()));
|
payRollZong.setSalary(xj_salaryVo.getSalary().add(payRollZong.getSalary()));
|
||||||
payRollZong.setPayInsurance(xj_salaryVo.getPayInsurance()==null ?new BigDecimal("0.00"):xj_salaryVo.getPayInsurance().add(payRollZong.getPayInsurance()));
|
payRollZong.setPayInsurance(xj_salaryVo.getPayInsurance().add(payRollZong.getPayInsurance()));
|
||||||
payRollZong.setSalaryBeforeTax(xj_salaryVo.getSalaryBeforeTax()==null?new BigDecimal("0.00"):xj_salaryVo.getSalaryBeforeTax().add(payRollZong.getSalaryBeforeTax()));
|
payRollZong.setSalaryBeforeTax(xj_salaryVo.getSalaryBeforeTax().add(payRollZong.getSalaryBeforeTax()));
|
||||||
payRollZong.setTotalWages(xj_salaryVo.getTotalWages()==null ?new BigDecimal("0.00"):xj_salaryVo.getTotalWages().add(payRollZong.getTotalWages()));
|
payRollZong.setTotalWages(xj_salaryVo.getTotalWages().add(payRollZong.getTotalWages()));
|
||||||
payRollZong.setAnnualExemptionAmount(xj_salaryVo.getAnnualExemptionAmount()==null ?new BigDecimal("0.00"):xj_salaryVo.getAnnualExemptionAmount().add(payRollZong.getAnnualExemptionAmount()));
|
payRollZong.setAnnualExemptionAmount(xj_salaryVo.getAnnualExemptionAmount().add(payRollZong.getAnnualExemptionAmount()));
|
||||||
payRollZong.setSpecialDeduction(xj_salaryVo.getSpecialDeduction()==null ?new BigDecimal("0.00"):xj_salaryVo.getSpecialDeduction().add(payRollZong.getSpecialDeduction()));
|
payRollZong.setSpecialDeduction(xj_salaryVo.getSpecialDeduction().add(payRollZong.getSpecialDeduction()));
|
||||||
payRollZong.setSlowDownTheDeduction(xj_salaryVo.getSlowDownTheDeduction()==null ?new BigDecimal("0.00"):xj_salaryVo.getSlowDownTheDeduction().add(payRollZong.getSlowDownTheDeduction()));
|
payRollZong.setSlowDownTheDeduction(xj_salaryVo.getSlowDownTheDeduction().add(payRollZong.getSlowDownTheDeduction()));
|
||||||
payRollZong.setAggregatePersonalIncomeTax(xj_salaryVo.getAggregatePersonalIncomeTax()==null ?new BigDecimal("0.00"):xj_salaryVo.getAggregatePersonalIncomeTax().add(payRollZong.getAggregatePersonalIncomeTax()));
|
payRollZong.setAggregatePersonalIncomeTax(xj_salaryVo.getAggregatePersonalIncomeTax().add(payRollZong.getAggregatePersonalIncomeTax()));
|
||||||
payRollZong.setTaxPayable(xj_salaryVo.getTaxPayable()==null ?new BigDecimal("0.00"):xj_salaryVo.getTaxPayable().add(payRollZong.getTaxPayable()));
|
payRollZong.setTaxPayable(xj_salaryVo.getTaxPayable().add(payRollZong.getTaxPayable()));
|
||||||
payRollZong.setNetPayroll(xj_salaryVo.getNetPayroll()==null ?new BigDecimal("0.00"):xj_salaryVo.getNetPayroll().add(payRollZong.getNetPayroll()));
|
payRollZong.setNetPayroll(xj_salaryVo.getNetPayroll().add(payRollZong.getNetPayroll()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list.add(payRollZong);//部门小计+总计
|
list.add(payRollZong);
|
||||||
//表尾 list=[部门小计,总计,部门小计+总计];lists=人员工资明细下面存放一条小计信息;sheetNameLis=所有sheet表名字
|
//表尾
|
||||||
String footer = "制表: "+"审核: "+"经理签字: "+"总经理签字: ";
|
String footer = "制表: "+"审核: "+"经理签字: "+"总经理签字: ";
|
||||||
return util.exportExcel(list,lists,"总表",sheetNameList,title,footer);
|
return util.exportExcel(list,lists,"总表",sheetNameList,title,footer);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,9 +151,7 @@ public class RzSalaryDetailServiceImpl implements IRzSalaryDetailService
|
|||||||
rzSalaryDetail.setWbFlag(sysStaff.getCompanyName()); //公司
|
rzSalaryDetail.setWbFlag(sysStaff.getCompanyName()); //公司
|
||||||
//计算获得的工资
|
//计算获得的工资
|
||||||
SysStaffDetail salaryDetail = calculateSalary(sysStaff,rzSalaryDetail.getMonth(),sbrq);
|
SysStaffDetail salaryDetail = calculateSalary(sysStaff,rzSalaryDetail.getMonth(),sbrq);
|
||||||
rzSalaryDetail.setBasicSalary(salaryDetail.getBasicSalary());//基本工资
|
rzSalaryDetail.setMonthSalary(salaryDetail.getBasicSalary()); //基本工资
|
||||||
rzSalaryDetail.setJobSalary(salaryDetail.getJobsSalary());//岗位工资
|
|
||||||
rzSalaryDetail.setMonthSalary(salaryDetail.getBasicSalary().add(salaryDetail.getJobsSalary())); //月工资
|
|
||||||
rzSalaryDetail.setAbsenteeismSalary(salaryDetail.getAbsenteeismSalary()); //请假扣除工资
|
rzSalaryDetail.setAbsenteeismSalary(salaryDetail.getAbsenteeismSalary()); //请假扣除工资
|
||||||
rzSalaryDetail.setOvertimeSalary(salaryDetail.getOverWages()); //加班工资
|
rzSalaryDetail.setOvertimeSalary(salaryDetail.getOverWages()); //加班工资
|
||||||
rzSalaryDetail.setNightSubsidies(salaryDetail.getNightShiftSubsidies()); //夜班补助
|
rzSalaryDetail.setNightSubsidies(salaryDetail.getNightShiftSubsidies()); //夜班补助
|
||||||
@ -166,7 +164,7 @@ public class RzSalaryDetailServiceImpl implements IRzSalaryDetailService
|
|||||||
rzSalaryDetail.setContractSubsidies(sysStaffDetail.getContractSubsidies()); //合同
|
rzSalaryDetail.setContractSubsidies(sysStaffDetail.getContractSubsidies()); //合同
|
||||||
rzSalaryDetail.setSocialSubsidies(sysStaffDetail.getSocialSecuritySubsidies()); //社保
|
rzSalaryDetail.setSocialSubsidies(sysStaffDetail.getSocialSecuritySubsidies()); //社保
|
||||||
rzSalaryDetail.setSubsidyOrBonus(sysStaffDetail.getOtherSubsidies().add(sysStaffDetail.getFixedAllowance())); //其他补助
|
rzSalaryDetail.setSubsidyOrBonus(sysStaffDetail.getOtherSubsidies().add(sysStaffDetail.getFixedAllowance())); //其他补助
|
||||||
//补助扣除 TODO 福利扣除百分比:各种补助*扣除系数
|
//补助扣除 TODO 福利扣除百分比
|
||||||
rzSalaryDetail.setAbsenteeismSubsidies(sysStaffDetail.getLevelOfEducationSubsidies().add(sysStaffDetail.getContractSubsidies())
|
rzSalaryDetail.setAbsenteeismSubsidies(sysStaffDetail.getLevelOfEducationSubsidies().add(sysStaffDetail.getContractSubsidies())
|
||||||
.add(sysStaffDetail.getSenioritySubsidies()).add(sysStaffDetail.getSocialSecuritySubsidies()).multiply(salaryDetail.getAbsenteeismSubsidies()));
|
.add(sysStaffDetail.getSenioritySubsidies()).add(sysStaffDetail.getSocialSecuritySubsidies()).multiply(salaryDetail.getAbsenteeismSubsidies()));
|
||||||
rzSalaryDetail.setDeductions(sysStaffDetail.getDeductions()); //其他扣款
|
rzSalaryDetail.setDeductions(sysStaffDetail.getDeductions()); //其他扣款
|
||||||
@ -229,37 +227,37 @@ public class RzSalaryDetailServiceImpl implements IRzSalaryDetailService
|
|||||||
.add(sysStaffDetail.getHousingRents()).add(sysStaffDetail.getAdultEducation()).add(sysStaffDetail.getTreatmentForSeriousDisease()));
|
.add(sysStaffDetail.getHousingRents()).add(sysStaffDetail.getAdultEducation()).add(sysStaffDetail.getTreatmentForSeriousDisease()));
|
||||||
|
|
||||||
// 判断应纳税所得额额度(额度不一样税率不一样)
|
// 判断应纳税所得额额度(额度不一样税率不一样)
|
||||||
if (null!=rzSalaryDetail.getTaxableIncome() && rzSalaryDetail.getTaxableIncome().doubleValue() > 0 && rzSalaryDetail.getTaxableIncome().doubleValue() <= 36000l) {
|
if (rzSalaryDetail.getTaxableIncome().doubleValue() > 0 && rzSalaryDetail.getTaxableIncome().doubleValue() <= 36000l) {
|
||||||
// 此阶税率为百分之3,速减数为0
|
// 此阶税率为百分之3,速减数为0
|
||||||
rzSalaryDetail.setTaxRate(new BigDecimal("0.03"));
|
rzSalaryDetail.setTaxRate(new BigDecimal("0.03"));
|
||||||
// 速算扣除数(速算扣除数跟税率同步)
|
// 速算扣除数(速算扣除数跟税率同步)
|
||||||
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("0"));
|
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("0"));
|
||||||
} else if (null!=rzSalaryDetail.getTaxableIncome() &&rzSalaryDetail.getTaxableIncome().doubleValue() > 36000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 144000L) {
|
} else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 36000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 144000L) {
|
||||||
// 此阶税率为百分之3,速减数为0
|
// 此阶税率为百分之3,速减数为0
|
||||||
rzSalaryDetail.setTaxRate(new BigDecimal("0.10"));
|
rzSalaryDetail.setTaxRate(new BigDecimal("0.10"));
|
||||||
// 速算扣除数(速算扣除数跟税率同步)
|
// 速算扣除数(速算扣除数跟税率同步)
|
||||||
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("2520"));
|
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("2520"));
|
||||||
} else if (null!=rzSalaryDetail.getTaxableIncome() &&rzSalaryDetail.getTaxableIncome().doubleValue() > 144000L && rzSalaryDetail.getTaxableIncome().doubleValue() <= 300000l) {
|
} else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 144000L && rzSalaryDetail.getTaxableIncome().doubleValue() <= 300000l) {
|
||||||
// 此阶税率为百分之3,速减数为0
|
// 此阶税率为百分之3,速减数为0
|
||||||
rzSalaryDetail.setTaxRate(new BigDecimal("0.20"));
|
rzSalaryDetail.setTaxRate(new BigDecimal("0.20"));
|
||||||
// 速算扣除数(速算扣除数跟税率同步)
|
// 速算扣除数(速算扣除数跟税率同步)
|
||||||
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("16920"));
|
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("16920"));
|
||||||
} else if (null!=rzSalaryDetail.getTaxableIncome() &&rzSalaryDetail.getTaxableIncome().doubleValue() > 300000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 420000l) {
|
} else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 300000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 420000l) {
|
||||||
// 此阶税率为百分之3,速减数为0
|
// 此阶税率为百分之3,速减数为0
|
||||||
rzSalaryDetail.setTaxRate(new BigDecimal("0.25"));
|
rzSalaryDetail.setTaxRate(new BigDecimal("0.25"));
|
||||||
// 速算扣除数(速算扣除数跟税率同步)
|
// 速算扣除数(速算扣除数跟税率同步)
|
||||||
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("31920"));
|
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("31920"));
|
||||||
} else if (null!=rzSalaryDetail.getTaxableIncome() &&rzSalaryDetail.getTaxableIncome().doubleValue() > 420000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 660000l) {
|
} else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 420000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 660000l) {
|
||||||
// 此阶税率为百分之3,速减数为0
|
// 此阶税率为百分之3,速减数为0
|
||||||
rzSalaryDetail.setTaxRate(new BigDecimal("0.30"));
|
rzSalaryDetail.setTaxRate(new BigDecimal("0.30"));
|
||||||
// 速算扣除数(速算扣除数跟税率同步)
|
// 速算扣除数(速算扣除数跟税率同步)
|
||||||
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("52920"));
|
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("52920"));
|
||||||
} else if (null!=rzSalaryDetail.getTaxableIncome() &&rzSalaryDetail.getTaxableIncome().doubleValue() > 660000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 960000l) {
|
} else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 660000l && rzSalaryDetail.getTaxableIncome().doubleValue() <= 960000l) {
|
||||||
// 此阶税率为百分之3,速减数为0
|
// 此阶税率为百分之3,速减数为0
|
||||||
rzSalaryDetail.setTaxRate(new BigDecimal("0.35"));
|
rzSalaryDetail.setTaxRate(new BigDecimal("0.35"));
|
||||||
// 速算扣除数(速算扣除数跟税率同步)
|
// 速算扣除数(速算扣除数跟税率同步)
|
||||||
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("85920"));
|
rzSalaryDetail.setSlowDownTheDeduction(new BigDecimal("85920"));
|
||||||
} else if (null!=rzSalaryDetail.getTaxableIncome() &&rzSalaryDetail.getTaxableIncome().doubleValue() > 960000l) {
|
} else if (rzSalaryDetail.getTaxableIncome().doubleValue() > 960000l) {
|
||||||
// 此阶税率为百分之3,速减数为0
|
// 此阶税率为百分之3,速减数为0
|
||||||
rzSalaryDetail.setTaxRate(new BigDecimal("0.45"));
|
rzSalaryDetail.setTaxRate(new BigDecimal("0.45"));
|
||||||
// 速算扣除数(速算扣除数跟税率同步)
|
// 速算扣除数(速算扣除数跟税率同步)
|
||||||
@ -382,24 +380,15 @@ public class RzSalaryDetailServiceImpl implements IRzSalaryDetailService
|
|||||||
BigDecimal bfb = new BigDecimal("0.00");
|
BigDecimal bfb = new BigDecimal("0.00");
|
||||||
//获取考勤统计
|
//获取考勤统计
|
||||||
RzAttendanceStatistical rzAttendanceStatistical = rzAttendanceStatisticalMapper.getRzAttendanceStatisticalByDateAndName(sysStaff.getUserId(),month);
|
RzAttendanceStatistical rzAttendanceStatistical = rzAttendanceStatisticalMapper.getRzAttendanceStatisticalByDateAndName(sysStaff.getUserId(),month);
|
||||||
//判断入职日期,社保缴纳日期以前入职,计算补助扣除比例==请假4小时 扣补助的5% 请假十天 补助就扣没了
|
//判断入职日期,社保缴纳日期以前入职,计算补助扣除比例
|
||||||
/*if(sysStaff.getEmploymentDate().before(date)){
|
if(sysStaff.getEmploymentDate().before(date)){
|
||||||
//计算请假百分比
|
//计算请假百分比
|
||||||
BigDecimal b = rzAttendanceStatistical.getAbsenteeism().divide(new BigDecimal("4"));//????
|
BigDecimal b = rzAttendanceStatistical.getAbsenteeism().divide(new BigDecimal("4"));
|
||||||
bfb = b.multiply(new BigDecimal(Constants.SUBSIDY_PROPORTION));
|
bfb = b.multiply(new BigDecimal(Constants.SUBSIDY_PROPORTION));
|
||||||
sysStaffDetail.setAbsenteeismSubsidies(bfb);
|
sysStaffDetail.setAbsenteeismSubsidies(bfb);
|
||||||
}else{
|
}else{
|
||||||
sysStaffDetail.setAbsenteeismSubsidies(new BigDecimal("1.00"));
|
sysStaffDetail.setAbsenteeismSubsidies(new BigDecimal("1.00"));
|
||||||
}*/
|
|
||||||
//计算步骤扣除比例:请假4小时 扣补助5% 8小时 10% 12小时 15% 以此类推;请假十天(80小时) 补助全扣
|
|
||||||
if(null!=rzAttendanceStatistical.getAbsenteeism() && rzAttendanceStatistical.getAbsenteeism().compareTo(new BigDecimal("80")) < 0){
|
|
||||||
BigDecimal b = rzAttendanceStatistical.getAbsenteeism().divide(new BigDecimal("4"));
|
|
||||||
bfb = b.multiply(new BigDecimal(Constants.SUBSIDY_PROPORTION));
|
|
||||||
sysStaffDetail.setAbsenteeismSubsidies(bfb);
|
|
||||||
}else if(null!=rzAttendanceStatistical.getAbsenteeism() && rzAttendanceStatistical.getAbsenteeism().compareTo(new BigDecimal("80")) >= 0){
|
|
||||||
sysStaffDetail.setAbsenteeismSubsidies(new BigDecimal("1.00"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sysStaffDetail.setNightShiftSubsidies(sysStaffDetail.getNightShiftSubsidies().multiply(new BigDecimal(rzAttendanceStatistical.getNightNumber())));
|
sysStaffDetail.setNightShiftSubsidies(sysStaffDetail.getNightShiftSubsidies().multiply(new BigDecimal(rzAttendanceStatistical.getNightNumber())));
|
||||||
sysStaffDetail.setDinnerSubsidies(sysStaffDetail.getDinnerSubsidies().multiply(new BigDecimal(rzAttendanceStatistical.getNightNumber())));
|
sysStaffDetail.setDinnerSubsidies(sysStaffDetail.getDinnerSubsidies().multiply(new BigDecimal(rzAttendanceStatistical.getNightNumber())));
|
||||||
//是否打卡
|
//是否打卡
|
||||||
@ -412,24 +401,24 @@ public class RzSalaryDetailServiceImpl implements IRzSalaryDetailService
|
|||||||
if(sysStaffDetail.getDailyWage().doubleValue() > 0) {
|
if(sysStaffDetail.getDailyWage().doubleValue() > 0) {
|
||||||
//额薪资日期在工资月下一个月
|
//额薪资日期在工资月下一个月
|
||||||
calendar.set(Calendar.MONTH,1);
|
calendar.set(Calendar.MONTH,1);
|
||||||
//全额薪资日期在工资月以前----null != sysStaff.getWagesRatioDate() &&
|
//全额薪资日期在工资月以前
|
||||||
if(null != sysStaff.getWagesRatioDate() && sysStaff.getWagesRatioDate().before(month)) {
|
if(sysStaff.getWagesRatioDate().before(month)) {
|
||||||
sysStaffDetail.setMonthSalary(sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP)
|
sysStaffDetail.setBasicSalary(sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP)
|
||||||
.multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())));
|
.multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())));
|
||||||
}else if(null != sysStaff.getWagesRatioDate() && sysStaff.getWagesRatioDate().after(calendar.getTime())) {
|
}else if(sysStaff.getWagesRatioDate().after(calendar.getTime())) {
|
||||||
sysStaffDetail.setMonthSalary(sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP)
|
sysStaffDetail.setBasicSalary(sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP)
|
||||||
.multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD)));
|
.multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD)));
|
||||||
}else {
|
}else {
|
||||||
//根据转正日期,查询员工的打卡信息
|
//根据转正日期,查询员工的打卡信息
|
||||||
BigDecimal att_work = new BigDecimal("0.0");
|
BigDecimal att_work = new BigDecimal("0.0");
|
||||||
for (RzAttendance rzAttendance : att_list) {
|
for (RzAttendance rzAttendance : att_list) {
|
||||||
if(null != sysStaff.getWagesRatioDate() && rzAttendance.getAttendanceDate().before(sysStaff.getWagesRatioDate())) {
|
if(rzAttendance.getAttendanceDate().before(sysStaff.getWagesRatioDate())) {
|
||||||
att_work = att_work.add(rzAttendance.getWorkSum());
|
att_work = att_work.add(rzAttendance.getWorkSum());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//未转正需要扣除的工资
|
//未转正需要扣除的工资
|
||||||
BigDecimal work = sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP).multiply(att_work).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD_1));
|
BigDecimal work = sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP).multiply(att_work).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD_1));
|
||||||
sysStaffDetail.setMonthSalary(sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP)
|
sysStaffDetail.setBasicSalary(sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP)
|
||||||
.multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())).subtract(work));
|
.multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())).subtract(work));
|
||||||
}
|
}
|
||||||
sysStaffDetail.setOverWages(sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP).multiply(rzAttendanceStatistical.getWorkOvertimeNumber()));
|
sysStaffDetail.setOverWages(sysStaffDetail.getDailyWage().divide(new BigDecimal("8.0"),2, RoundingMode.HALF_UP).multiply(rzAttendanceStatistical.getWorkOvertimeNumber()));
|
||||||
@ -442,9 +431,9 @@ public class RzSalaryDetailServiceImpl implements IRzSalaryDetailService
|
|||||||
calendar.set(Calendar.MONTH,1);
|
calendar.set(Calendar.MONTH,1);
|
||||||
//全额薪资日期在工资月以前
|
//全额薪资日期在工资月以前
|
||||||
if(sysStaff.getWagesRatioDate().before(month)) {
|
if(sysStaff.getWagesRatioDate().before(month)) {
|
||||||
sysStaffDetail.setMonthSalary(sysStaffDetail.getHoursSalary().multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())));
|
sysStaffDetail.setBasicSalary(sysStaffDetail.getHoursSalary().multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())));
|
||||||
}else if(sysStaff.getWagesRatioDate().after(calendar.getTime())) {
|
}else if(sysStaff.getWagesRatioDate().after(calendar.getTime())) {
|
||||||
sysStaffDetail.setMonthSalary(sysStaffDetail.getHoursSalary().multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD)));
|
sysStaffDetail.setBasicSalary(sysStaffDetail.getHoursSalary().multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD)));
|
||||||
}else {
|
}else {
|
||||||
//根据转正日期,查询员工的打卡信息
|
//根据转正日期,查询员工的打卡信息
|
||||||
BigDecimal att_work = new BigDecimal("0.0");
|
BigDecimal att_work = new BigDecimal("0.0");
|
||||||
@ -455,7 +444,7 @@ public class RzSalaryDetailServiceImpl implements IRzSalaryDetailService
|
|||||||
}
|
}
|
||||||
//未转正需要扣除的工资
|
//未转正需要扣除的工资
|
||||||
BigDecimal work = sysStaffDetail.getHoursSalary().multiply(att_work).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD_1));
|
BigDecimal work = sysStaffDetail.getHoursSalary().multiply(att_work).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD_1));
|
||||||
sysStaffDetail.setMonthSalary(sysStaffDetail.getHoursSalary().multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())).subtract(work));
|
sysStaffDetail.setBasicSalary(sysStaffDetail.getHoursSalary().multiply(rzAttendanceStatistical.getRealAttendance().add(rzAttendanceStatistical.getWorkOvertimeNumber())).subtract(work));
|
||||||
}
|
}
|
||||||
sysStaffDetail.setOverWages(sysStaffDetail.getHoursSalary().multiply(rzAttendanceStatistical.getWorkOvertimeNumber()));
|
sysStaffDetail.setOverWages(sysStaffDetail.getHoursSalary().multiply(rzAttendanceStatistical.getWorkOvertimeNumber()));
|
||||||
sysStaffDetail.setAbsenteeismSalary(new BigDecimal("0.00"));
|
sysStaffDetail.setAbsenteeismSalary(new BigDecimal("0.00"));
|
||||||
@ -467,10 +456,10 @@ public class RzSalaryDetailServiceImpl implements IRzSalaryDetailService
|
|||||||
calendar.set(Calendar.MONTH,1);
|
calendar.set(Calendar.MONTH,1);
|
||||||
//全额薪资日期在工资月以前
|
//全额薪资日期在工资月以前
|
||||||
if(sysStaff.getWagesRatioDate().before(month)) {
|
if(sysStaff.getWagesRatioDate().before(month)) {
|
||||||
sysStaffDetail.setMonthSalary(sysStaffDetail.getBasicSalary().add(sysStaffDetail.getJobsSalary()));
|
sysStaffDetail.setBasicSalary(sysStaffDetail.getBasicSalary().add(sysStaffDetail.getJobsSalary()));
|
||||||
}else if(sysStaff.getWagesRatioDate().after(calendar.getTime())) {
|
}else if(sysStaff.getWagesRatioDate().after(calendar.getTime())) {
|
||||||
BigDecimal hours = sysStaffDetail.getBasicSalary().add(sysStaffDetail.getJobsSalary()).divide(rzAttendanceStatistical.getShouldAttendance(),2, RoundingMode.HALF_UP);
|
BigDecimal hours = sysStaffDetail.getBasicSalary().add(sysStaffDetail.getJobsSalary()).divide(rzAttendanceStatistical.getShouldAttendance(),2, RoundingMode.HALF_UP);
|
||||||
sysStaffDetail.setMonthSalary(hours.multiply(rzAttendanceStatistical.getRealAttendance()).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD)));
|
sysStaffDetail.setBasicSalary(hours.multiply(rzAttendanceStatistical.getRealAttendance()).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD)));
|
||||||
}else {
|
}else {
|
||||||
//根据转正日期,查询员工的打卡信息
|
//根据转正日期,查询员工的打卡信息
|
||||||
BigDecimal att_work = new BigDecimal("0.0");
|
BigDecimal att_work = new BigDecimal("0.0");
|
||||||
@ -482,22 +471,20 @@ public class RzSalaryDetailServiceImpl implements IRzSalaryDetailService
|
|||||||
//未转正需要扣除的工资
|
//未转正需要扣除的工资
|
||||||
BigDecimal work = sysStaffDetail.getBasicSalary().add(sysStaffDetail.getJobsSalary()).divide(rzAttendanceStatistical.getShouldAttendance(),2, RoundingMode.HALF_UP)
|
BigDecimal work = sysStaffDetail.getBasicSalary().add(sysStaffDetail.getJobsSalary()).divide(rzAttendanceStatistical.getShouldAttendance(),2, RoundingMode.HALF_UP)
|
||||||
.multiply(att_work).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD_1));
|
.multiply(att_work).multiply(new BigDecimal(Constants.SUBSIDY_PERIOD_1));
|
||||||
sysStaffDetail.setMonthSalary(sysStaffDetail.getBasicSalary().add(sysStaffDetail.getJobsSalary()).subtract(work));
|
sysStaffDetail.setBasicSalary(sysStaffDetail.getBasicSalary().add(sysStaffDetail.getJobsSalary()).subtract(work));
|
||||||
}
|
}
|
||||||
//计算月工资的每小时,工资
|
//计算月工资的每小时,工资
|
||||||
/*BigDecimal evrymoney = sysStaffDetail.getBasicSalary().multiply(new BigDecimal("11.00"))
|
BigDecimal evrymoney = sysStaffDetail.getBasicSalary().multiply(new BigDecimal("11.00"))
|
||||||
.add(sysStaffDetail.getBasicSalary().multiply(new BigDecimal(Constants.SUBSIDY_PERIOD)))
|
.add(sysStaffDetail.getBasicSalary().multiply(new BigDecimal(Constants.SUBSIDY_PERIOD)))
|
||||||
.divide(new BigDecimal(days).multiply(new BigDecimal("8.00")),2, RoundingMode.HALF_UP);*///????
|
.divide(new BigDecimal(days).multiply(new BigDecimal("8.00")),2, RoundingMode.HALF_UP);
|
||||||
BigDecimal divide = sysStaffDetail.getMonthSalary().divide(new BigDecimal(26), 2).divide(new BigDecimal("8"));
|
sysStaffDetail.setAbsenteeismSalary(evrymoney.multiply(rzAttendanceStatistical.getShouldAttendance().subtract(rzAttendanceStatistical.getRealAttendance())));
|
||||||
|
|
||||||
sysStaffDetail.setAbsenteeismSalary(divide.multiply(rzAttendanceStatistical.getShouldAttendance().subtract(rzAttendanceStatistical.getRealAttendance())));
|
|
||||||
sysStaffDetail.setMiddleSubsidies(new BigDecimal("0.00"));
|
sysStaffDetail.setMiddleSubsidies(new BigDecimal("0.00"));
|
||||||
//根据用户获取当前的加班情况
|
//根据用户获取当前的加班情况
|
||||||
RzSpecialOverTime rSpecialOverTime = rzSpecialOverTimeMapper.selectRzSpecialOverTimeByUserIdAndDate(sysStaff.getUserId(),month);
|
RzSpecialOverTime rSpecialOverTime = rzSpecialOverTimeMapper.selectRzSpecialOverTimeByUserIdAndDate(sysStaff.getUserId(),month);
|
||||||
if(StringUtils.isNull(rSpecialOverTime)){
|
if(StringUtils.isNull(rSpecialOverTime)){
|
||||||
sysStaffDetail.setOverWages(new BigDecimal("0.00"));
|
sysStaffDetail.setOverWages(new BigDecimal("0.00"));
|
||||||
}else{
|
}else{
|
||||||
sysStaffDetail.setOverWages(divide.multiply(rSpecialOverTime.getSickHours()));
|
sysStaffDetail.setOverWages(evrymoney.multiply(rSpecialOverTime.getSickHours()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断员工的上班时长,设置保险的补交
|
//判断员工的上班时长,设置保险的补交
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package com.evo.framework.websocket;
|
|||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.evo.common.constant.Constants;
|
import com.evo.common.constant.Constants;
|
||||||
import com.evo.equipment.domain.EqSnDetail;
|
import com.evo.equipment.domain.EqSnDetail;
|
||||||
import com.evo.equipment.service.IEqButtonService;
|
|
||||||
import com.evo.equipment.service.IEqSnDetailService;
|
import com.evo.equipment.service.IEqSnDetailService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -27,12 +26,9 @@ public class WebSocketServer{
|
|||||||
|
|
||||||
private static IEqSnDetailService snDetailService;
|
private static IEqSnDetailService snDetailService;
|
||||||
|
|
||||||
private static IEqButtonService qButtonService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public void setBrandService(IEqSnDetailService snDetailService, IEqButtonService qButtonService) {
|
public void setBrandService(IEqSnDetailService snDetailService) {
|
||||||
WebSocketServer.snDetailService = snDetailService;
|
WebSocketServer.snDetailService = snDetailService;
|
||||||
WebSocketServer.qButtonService = qButtonService;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,8 +158,6 @@ public class WebSocketServer{
|
|||||||
//添加
|
//添加
|
||||||
snDetailService.insertEqSnDetail(snDetail);
|
snDetailService.insertEqSnDetail(snDetail);
|
||||||
}
|
}
|
||||||
//更新按钮
|
|
||||||
qButtonService.sendButton(snDetail);
|
|
||||||
}else{
|
}else{
|
||||||
//接受设备端返回的数据,先不做处理
|
//接受设备端返回的数据,先不做处理
|
||||||
System.out.println("设备返回信息:"+message);
|
System.out.println("设备返回信息:"+message);
|
||||||
|
|||||||
@ -85,15 +85,5 @@ public class RzRestaurantDetailController extends BaseController
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 新旧系统切换临时处理历史数据方法
|
|
||||||
* @param
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/initDaka")
|
|
||||||
public String initDaka(){
|
|
||||||
return rzRestaurantDetailService.initRzRestaurantDetail();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,22 +44,13 @@ public class RzRestaurantStatisticsController extends BaseController
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response,RzRestaurantStatistics rzRestaurantStatistics){
|
|
||||||
// List<RzRestaurantStatistics> list = rzRestaurantStatisticsService.selectRzRestaurantStatisticsListBySxs(rzRestaurantStatistics);
|
|
||||||
List<RzRestaurantStatistics> res_list = rzRestaurantStatisticsService.selectRzRestaurantStatisticsList(rzRestaurantStatistics);
|
|
||||||
ExcelUtil<RzRestaurantStatistics> util = new ExcelUtil<RzRestaurantStatistics>(RzRestaurantStatistics.class);
|
|
||||||
util.exportExcel(response, res_list, "餐费明细表");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出餐饮统计列表
|
* 导出餐饮统计列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('restaurant:statistics:export')")
|
@PreAuthorize("@ss.hasPermi('restaurant:statistics:export')")
|
||||||
@Log(title = "餐饮统计", businessType = BusinessType.EXPORT)
|
@Log(title = "餐饮统计", businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export0")
|
@GetMapping("/export")
|
||||||
public AjaxResult export0(RzRestaurantStatistics rzRestaurantStatistics)
|
public AjaxResult export(RzRestaurantStatistics rzRestaurantStatistics)
|
||||||
{
|
{
|
||||||
ExcelUtilCy<RzRestaurantStatistics> util = new ExcelUtilCy<RzRestaurantStatistics>(RzRestaurantStatistics.class);
|
ExcelUtilCy<RzRestaurantStatistics> util = new ExcelUtilCy<RzRestaurantStatistics>(RzRestaurantStatistics.class);
|
||||||
//创建总表
|
//创建总表
|
||||||
@ -89,7 +80,7 @@ public class RzRestaurantStatisticsController extends BaseController
|
|||||||
vo_obj = new RzRestaurantStatistics();
|
vo_obj = new RzRestaurantStatistics();
|
||||||
res_obj = new RzRestaurantStatistics();
|
res_obj = new RzRestaurantStatistics();
|
||||||
for (RzRestaurantStatistics restaurantStatistics : res_list) {
|
for (RzRestaurantStatistics restaurantStatistics : res_list) {
|
||||||
if(null!=restaurantStatistics && null!=restaurantStatistics.getCompanyName() && s.equals(restaurantStatistics.getCompanyName())){
|
if(s.equals(restaurantStatistics.getCompanyName())){
|
||||||
if(null == vo_obj.getBreakfastNumber()){
|
if(null == vo_obj.getBreakfastNumber()){
|
||||||
vo_obj.setBreakfastNumber(0l);
|
vo_obj.setBreakfastNumber(0l);
|
||||||
}
|
}
|
||||||
@ -223,7 +214,7 @@ public class RzRestaurantStatisticsController extends BaseController
|
|||||||
return util.exportExcel(list,lists,"总表",sheetNameList);
|
return util.exportExcel(list,lists,"总表",sheetNameList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/exportkd")
|
@GetMapping("/exportkd")
|
||||||
public void exportkd(HttpServletResponse response,RzRestaurantStatistics rzRestaurantStatistics){
|
public void exportkd(HttpServletResponse response,RzRestaurantStatistics rzRestaurantStatistics){
|
||||||
List<RzRestaurantStatistics> list = rzRestaurantStatisticsService.selectRzRestaurantStatisticsListBySxs(rzRestaurantStatistics);
|
List<RzRestaurantStatistics> list = rzRestaurantStatisticsService.selectRzRestaurantStatisticsListBySxs(rzRestaurantStatistics);
|
||||||
ExcelUtil<RzRestaurantStatistics> util = new ExcelUtil<RzRestaurantStatistics>(RzRestaurantStatistics.class);
|
ExcelUtil<RzRestaurantStatistics> util = new ExcelUtil<RzRestaurantStatistics>(RzRestaurantStatistics.class);
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
package com.evo.restaurant.mapper;
|
package com.evo.restaurant.mapper;
|
||||||
|
|
||||||
import com.evo.restaurant.domain.CyConsumptionInfo;
|
|
||||||
import com.evo.restaurant.domain.RzRestaurantStatistics;
|
import com.evo.restaurant.domain.RzRestaurantStatistics;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -22,8 +21,6 @@ public interface RzRestaurantStatisticsMapper
|
|||||||
*/
|
*/
|
||||||
public RzRestaurantStatistics selectRzRestaurantStatisticsById(Long id);
|
public RzRestaurantStatistics selectRzRestaurantStatisticsById(Long id);
|
||||||
|
|
||||||
public List<CyConsumptionInfo> selectRzRestaurantStatisticsById2(String name);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询餐饮统计列表
|
* 查询餐饮统计列表
|
||||||
*
|
*
|
||||||
@ -58,6 +55,4 @@ public interface RzRestaurantStatisticsMapper
|
|||||||
|
|
||||||
public List<RzRestaurantStatistics> selectRzRestaurantStatisticsByDate(Date date);
|
public List<RzRestaurantStatistics> selectRzRestaurantStatisticsByDate(Date date);
|
||||||
|
|
||||||
public List<RzRestaurantStatistics> selectRzRestaurantStatisticsByDate2(Date date);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,8 +30,6 @@ public interface IRzRestaurantDetailService
|
|||||||
*/
|
*/
|
||||||
public String insertRzRestaurantDetail(String json);
|
public String insertRzRestaurantDetail(String json);
|
||||||
|
|
||||||
public String initRzRestaurantDetail();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 当前时间的就餐人数
|
* 当前时间的就餐人数
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import com.evo.common.core.domain.AjaxResult;
|
|||||||
import com.evo.common.utils.DateUtils;
|
import com.evo.common.utils.DateUtils;
|
||||||
import com.evo.common.utils.SecurityUtils;
|
import com.evo.common.utils.SecurityUtils;
|
||||||
import com.evo.common.utils.StringUtils;
|
import com.evo.common.utils.StringUtils;
|
||||||
import com.evo.restaurant.domain.CyConsumptionInfo;
|
|
||||||
import com.evo.restaurant.domain.RzRestaurantDetail;
|
import com.evo.restaurant.domain.RzRestaurantDetail;
|
||||||
import com.evo.restaurant.domain.RzRestaurantImages;
|
import com.evo.restaurant.domain.RzRestaurantImages;
|
||||||
import com.evo.restaurant.domain.RzRestaurantStatistics;
|
import com.evo.restaurant.domain.RzRestaurantStatistics;
|
||||||
@ -20,7 +19,6 @@ import com.evo.system.domain.SysStaff;
|
|||||||
import com.evo.system.mapper.SysStaffMapper;
|
import com.evo.system.mapper.SysStaffMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -145,150 +143,6 @@ public class RzRestaurantDetailServiceImpl implements IRzRestaurantDetailService
|
|||||||
cfiv.setResult(0);
|
cfiv.setResult(0);
|
||||||
return JSONObject.toJSONString(cfiv);
|
return JSONObject.toJSONString(cfiv);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String initRzRestaurantDetail()
|
|
||||||
{
|
|
||||||
|
|
||||||
RzRestaurantStatistics rzRestaurantStatistics = new RzRestaurantStatistics();
|
|
||||||
String dateStr = "2025-04-01";
|
|
||||||
SimpleDateFormat sdf0 = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
try {
|
|
||||||
Date date = sdf0.parse(dateStr);
|
|
||||||
System.out.println(date);
|
|
||||||
rzRestaurantStatistics.setMonth(date);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
//根据日期查询统计日期内的统计信息
|
|
||||||
List<RzRestaurantStatistics> rt_list = rzRestaurantStatisticsMapper.selectRzRestaurantStatisticsList(rzRestaurantStatistics);
|
|
||||||
//循环统计信息
|
|
||||||
/**
|
|
||||||
* 1、查询出统计表需要循环的人员信息
|
|
||||||
* 2、遍历统计记录,拿 name和(shang_ban、xia_ban不为空并且4-1到4-14日的记录)字段去查询cy_consumption_info表
|
|
||||||
* 3、二层循环遍历cy_consumption_info表:
|
|
||||||
*/
|
|
||||||
for (RzRestaurantStatistics restaurantStatistics : rt_list) {
|
|
||||||
String name = restaurantStatistics.getName();
|
|
||||||
List<CyConsumptionInfo> cyConsumptionInfoList= rzRestaurantStatisticsMapper.selectRzRestaurantStatisticsById2(name);
|
|
||||||
|
|
||||||
for (CyConsumptionInfo cyConsumptionInfo : cyConsumptionInfoList) {
|
|
||||||
// 创建日期格式化对象
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
||||||
|
|
||||||
// Date 转 String
|
|
||||||
Date date_time = cyConsumptionInfo.getDateTime();
|
|
||||||
String formattedDate = sdf.format(date_time);
|
|
||||||
String formattedDate1 = formattedDate + " 08:10:00";
|
|
||||||
String formattedDate2 = formattedDate + " 12:10:00";
|
|
||||||
String formattedDate3 = formattedDate + " 18:10:00";
|
|
||||||
System.out.println("Formatted Date: " + formattedDate);
|
|
||||||
SimpleDateFormat sdff = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
||||||
Date date1 =null;
|
|
||||||
Date date2 =null;
|
|
||||||
Date date3 =null;
|
|
||||||
try {
|
|
||||||
date1 = sdff.parse(formattedDate1);
|
|
||||||
date2 = sdff.parse(formattedDate2);
|
|
||||||
date3 = sdff.parse(formattedDate3);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(cyConsumptionInfo.getBreakfastNumber()==1){
|
|
||||||
|
|
||||||
RzRestaurantDetail cyFaceInfo = new RzRestaurantDetail();
|
|
||||||
cyFaceInfo.setDate(date1);
|
|
||||||
cyFaceInfo.setStaffId(restaurantStatistics.getStaffId());
|
|
||||||
cyFaceInfo.setName(restaurantStatistics.getName());
|
|
||||||
cyFaceInfo.setTime(date1);
|
|
||||||
|
|
||||||
cyFaceInfo.setSign("早餐");
|
|
||||||
// restaurantStatistics.setBreakfastNumber(restaurantStatistics.getBreakfastNumber() + 1);
|
|
||||||
|
|
||||||
cyFaceInfo.setDelFlag(Constants.DELETE_FLAG_0);
|
|
||||||
cyFaceInfo.setCreateTime(date1);
|
|
||||||
rzRestaurantDetailMapper.insertRzRestaurantDetail(cyFaceInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(cyConsumptionInfo.getLunchNumber()==1){
|
|
||||||
RzRestaurantDetail cyFaceInfo = new RzRestaurantDetail();
|
|
||||||
cyFaceInfo.setDate(date2);
|
|
||||||
cyFaceInfo.setStaffId(restaurantStatistics.getStaffId());
|
|
||||||
cyFaceInfo.setName(restaurantStatistics.getName());
|
|
||||||
cyFaceInfo.setTime(date2);
|
|
||||||
|
|
||||||
cyFaceInfo.setSign("午餐");
|
|
||||||
// restaurantStatistics.setBreakfastNumber(restaurantStatistics.getBreakfastNumber() + 1);
|
|
||||||
|
|
||||||
cyFaceInfo.setDelFlag(Constants.DELETE_FLAG_0);
|
|
||||||
cyFaceInfo.setCreateTime(date2);
|
|
||||||
rzRestaurantDetailMapper.insertRzRestaurantDetail(cyFaceInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(cyConsumptionInfo.getSupperNumber()==1){
|
|
||||||
RzRestaurantDetail cyFaceInfo = new RzRestaurantDetail();
|
|
||||||
cyFaceInfo.setDate(date3);
|
|
||||||
cyFaceInfo.setStaffId(restaurantStatistics.getStaffId());
|
|
||||||
cyFaceInfo.setName(restaurantStatistics.getName());
|
|
||||||
cyFaceInfo.setTime(date3);
|
|
||||||
|
|
||||||
cyFaceInfo.setSign("晚餐");
|
|
||||||
// restaurantStatistics.setBreakfastNumber(restaurantStatistics.getBreakfastNumber() + 1);
|
|
||||||
|
|
||||||
cyFaceInfo.setDelFlag(Constants.DELETE_FLAG_0);
|
|
||||||
cyFaceInfo.setCreateTime(date3);
|
|
||||||
rzRestaurantDetailMapper.insertRzRestaurantDetail(cyFaceInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//根据员工ID和打卡时间查询本月的打卡统计信息
|
|
||||||
/*List<RzRestaurantStatistics> restaurantStatistics = rzRestaurantStatisticsMapper.selectRzRestaurantStatisticsByDate2(new Date());
|
|
||||||
//增加打卡记录
|
|
||||||
RzRestaurantDetail cyFaceInfo = new RzRestaurantDetail();
|
|
||||||
cyFaceInfo.setDate(new Date());
|
|
||||||
cyFaceInfo.setStaffId(restaurantStatistics.getStaffId());
|
|
||||||
cyFaceInfo.setName(restaurantStatistics.getName());
|
|
||||||
cyFaceInfo.setTime(new Date());
|
|
||||||
//判断刷脸时间是早餐还是午餐还是晚餐
|
|
||||||
if(hour>6&&hour<9){
|
|
||||||
//说明是早餐
|
|
||||||
cyFaceInfo.setSign("早餐");
|
|
||||||
restaurantStatistics.setBreakfastNumber(restaurantStatistics.getBreakfastNumber() + 1);
|
|
||||||
}else if(hour>=11&&hour<=14){
|
|
||||||
//说明是午餐
|
|
||||||
cyFaceInfo.setSign("午餐");
|
|
||||||
restaurantStatistics.setLunchNumber(restaurantStatistics.getLunchNumber() + 1);
|
|
||||||
}else if(hour>=18&&hour<=20){
|
|
||||||
//说明是晚餐
|
|
||||||
cyFaceInfo.setSign("晚餐");
|
|
||||||
restaurantStatistics.setSupperNumber(restaurantStatistics.getSupperNumber() + 1);
|
|
||||||
}
|
|
||||||
cyFaceInfo.setDelFlag(Constants.DELETE_FLAG_0);
|
|
||||||
cyFaceInfo.setCreateTime(new Date());
|
|
||||||
int i = rzRestaurantDetailMapper.insertRzRestaurantDetail(cyFaceInfo);
|
|
||||||
if(i<1){
|
|
||||||
cfiv.setResult(2);
|
|
||||||
cfiv.setMsg("{\"Result\":1,\"Msg\":\"打卡失败\"}");
|
|
||||||
return JSONObject.toJSONString(cfiv);
|
|
||||||
}
|
|
||||||
//反写统计次数
|
|
||||||
i = rzRestaurantStatisticsMapper.updateRzRestaurantStatistics(restaurantStatistics);
|
|
||||||
if(i<1){
|
|
||||||
cfiv.setResult(2);
|
|
||||||
cfiv.setMsg("{\"Result\":1,\"Msg\":\"打卡失败\"}");
|
|
||||||
return JSONObject.toJSONString(cfiv);
|
|
||||||
}
|
|
||||||
cfiv.setMsg("{\"Result\":1,\"Msg\":\"打卡成功!\"}");
|
|
||||||
cfd.setClock_in_count(1);
|
|
||||||
cfiv.setContent(cfd);
|
|
||||||
cfiv.setResult(0);*/
|
|
||||||
return JSONObject.toJSONString("");
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 统计当餐刷卡人数
|
* 统计当餐刷卡人数
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package com.evo.restaurant.service.impl;
|
|||||||
|
|
||||||
import com.evo.common.constant.Constants;
|
import com.evo.common.constant.Constants;
|
||||||
import com.evo.common.core.domain.AjaxResult;
|
import com.evo.common.core.domain.AjaxResult;
|
||||||
import com.evo.common.core.domain.entity.SysDept;
|
|
||||||
import com.evo.common.core.domain.entity.SysDictData;
|
import com.evo.common.core.domain.entity.SysDictData;
|
||||||
import com.evo.common.utils.DateUtils;
|
import com.evo.common.utils.DateUtils;
|
||||||
import com.evo.common.utils.StringUtils;
|
import com.evo.common.utils.StringUtils;
|
||||||
@ -66,12 +65,7 @@ public class RzRestaurantStatisticsServiceImpl implements IRzRestaurantStatistic
|
|||||||
{
|
{
|
||||||
List<RzRestaurantStatistics> res_list = rzRestaurantStatisticsMapper.selectRzRestaurantStatisticsList(rzRestaurantStatistics);
|
List<RzRestaurantStatistics> res_list = rzRestaurantStatisticsMapper.selectRzRestaurantStatisticsList(rzRestaurantStatistics);
|
||||||
for (RzRestaurantStatistics restaurantStatistics : res_list) {
|
for (RzRestaurantStatistics restaurantStatistics : res_list) {
|
||||||
SysDept sysDept = deptMapper.selectDeptById(restaurantStatistics.getDeptId());
|
restaurantStatistics.setCompanyName(deptMapper.selectDeptById(restaurantStatistics.getDeptId()).getDeptName());
|
||||||
if(null !=sysDept){
|
|
||||||
restaurantStatistics.setCompanyName(sysDept.getDeptName());
|
|
||||||
}else{
|
|
||||||
restaurantStatistics.setCompanyName("实习生");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return res_list;
|
return res_list;
|
||||||
}
|
}
|
||||||
@ -130,11 +124,11 @@ public class RzRestaurantStatisticsServiceImpl implements IRzRestaurantStatistic
|
|||||||
return AjaxResult.error("请输入校正日期!!");
|
return AjaxResult.error("请输入校正日期!!");
|
||||||
}
|
}
|
||||||
//根据日期查询统计日期内的统计信息
|
//根据日期查询统计日期内的统计信息
|
||||||
List<RzRestaurantStatistics> rt_list = rzRestaurantStatisticsMapper.selectRzRestaurantStatisticsList(rzRestaurantStatistics);//临时查询一条数据
|
List<RzRestaurantStatistics> rt_list = rzRestaurantStatisticsMapper.selectRzRestaurantStatisticsList(rzRestaurantStatistics);
|
||||||
//根据月份统计打卡信息
|
//根据月份统计打卡信息
|
||||||
RzRestaurantDetail rzRestaurantDetail = new RzRestaurantDetail();
|
RzRestaurantDetail rzRestaurantDetail = new RzRestaurantDetail();
|
||||||
rzRestaurantDetail.setMonth(rzRestaurantStatistics.getMonth());
|
rzRestaurantDetail.setMonth(rzRestaurantStatistics.getMonth());
|
||||||
List<RzRestaurantDetail> rd_list = rzRestaurantDetailMapper.selectRzRestaurantDetailList(rzRestaurantDetail);//临时查询一条数据
|
List<RzRestaurantDetail> rd_list = rzRestaurantDetailMapper.selectRzRestaurantDetailList(rzRestaurantDetail);
|
||||||
//查询消费情况
|
//查询消费情况
|
||||||
List<SysDictData> dic_list = sysDictDataMapper.selectDictDataByType(Constants.SYS_RESTAUTANT);
|
List<SysDictData> dic_list = sysDictDataMapper.selectDictDataByType(Constants.SYS_RESTAUTANT);
|
||||||
//循环统计信息
|
//循环统计信息
|
||||||
@ -145,15 +139,7 @@ public class RzRestaurantStatisticsServiceImpl implements IRzRestaurantStatistic
|
|||||||
Long supper = 0l;
|
Long supper = 0l;
|
||||||
//循环打卡详情
|
//循环打卡详情
|
||||||
for (RzRestaurantDetail restaurantDetail : rd_list) {
|
for (RzRestaurantDetail restaurantDetail : rd_list) {
|
||||||
if(restaurantStatistics.getStaffId().equals(restaurantDetail.getStaffId())){
|
if(restaurantStatistics.getStaffId() == restaurantDetail.getStaffId()){
|
||||||
SysStaffDetail sysStaffDetail = new SysStaffDetail();
|
|
||||||
sysStaffDetail.setStaffId(restaurantDetail.getStaffId());
|
|
||||||
List<SysStaffDetail> staffDetailList = sysStaffDetailMapper.selectSysStaffDetailList(sysStaffDetail);
|
|
||||||
if(null!=staffDetailList && staffDetailList.size()>0){
|
|
||||||
restaurantStatistics.setBreakfastExpend(staffDetailList.get(0).getBreakfastExpend());
|
|
||||||
restaurantStatistics.setLunchExpend(staffDetailList.get(0).getLunchExpend());
|
|
||||||
restaurantStatistics.setSupperExpend(staffDetailList.get(0).getSupperExpend());
|
|
||||||
}
|
|
||||||
if("早餐".equals(restaurantDetail.getSign())){
|
if("早餐".equals(restaurantDetail.getSign())){
|
||||||
breakfast += 1;
|
breakfast += 1;
|
||||||
continue;
|
continue;
|
||||||
@ -171,17 +157,17 @@ public class RzRestaurantStatisticsServiceImpl implements IRzRestaurantStatistic
|
|||||||
restaurantStatistics.setLunchNumber(lunch);
|
restaurantStatistics.setLunchNumber(lunch);
|
||||||
restaurantStatistics.setSupperNumber(supper);
|
restaurantStatistics.setSupperNumber(supper);
|
||||||
//计算费用
|
//计算费用
|
||||||
restaurantStatistics.setBreakfastPreSumExpend(restaurantStatistics.getBreakfastExpend().multiply(new BigDecimal(restaurantStatistics.getBreakfastNumber())));//个人消费
|
restaurantStatistics.setBreakfastPreSumExpend(restaurantStatistics.getBreakfastExpend().multiply(new BigDecimal(restaurantStatistics.getBreakfastNumber())));
|
||||||
restaurantStatistics.setLunchPreSumExpend(restaurantStatistics.getLunchExpend().multiply(new BigDecimal(restaurantStatistics.getLunchNumber())));
|
restaurantStatistics.setLunchPreSumExpend(restaurantStatistics.getLunchExpend().multiply(new BigDecimal(restaurantStatistics.getLunchNumber())));
|
||||||
restaurantStatistics.setSupperPreSumExpend(restaurantStatistics.getSupperExpend().multiply(new BigDecimal(restaurantStatistics.getSupperNumber())));
|
restaurantStatistics.setSupperPreSumExpend(restaurantStatistics.getSupperExpend().multiply(new BigDecimal(restaurantStatistics.getSupperNumber())));
|
||||||
for (SysDictData sysDictData : dic_list) {
|
for (SysDictData sysDictData : dic_list) {
|
||||||
if(sysDictData.getDictLabel().indexOf("早餐消费") != -1){
|
if(sysDictData.getDictLabel().indexOf("早餐") != -1){
|
||||||
restaurantStatistics.setBreakfastSumExpend(new BigDecimal(sysDictData.getDictValue()).multiply(new BigDecimal(restaurantStatistics.getBreakfastNumber())));//总消费
|
restaurantStatistics.setBreakfastSumExpend(new BigDecimal(sysDictData.getDictValue()).multiply(new BigDecimal(restaurantStatistics.getBreakfastNumber())));
|
||||||
}
|
}
|
||||||
if(sysDictData.getDictLabel().indexOf("午餐消费") != -1){
|
if(sysDictData.getDictLabel().indexOf("午餐") != -1){
|
||||||
restaurantStatistics.setLunchSumExpend(new BigDecimal(sysDictData.getDictValue()).multiply(new BigDecimal(restaurantStatistics.getLunchNumber())));
|
restaurantStatistics.setLunchSumExpend(new BigDecimal(sysDictData.getDictValue()).multiply(new BigDecimal(restaurantStatistics.getLunchNumber())));
|
||||||
}
|
}
|
||||||
if(sysDictData.getDictLabel().indexOf("晚餐消费") != -1){
|
if(sysDictData.getDictLabel().indexOf("晚餐") != -1){
|
||||||
restaurantStatistics.setSupperSumExpend(new BigDecimal(sysDictData.getDictValue()).multiply(new BigDecimal(restaurantStatistics.getSupperNumber())));
|
restaurantStatistics.setSupperSumExpend(new BigDecimal(sysDictData.getDictValue()).multiply(new BigDecimal(restaurantStatistics.getSupperNumber())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,8 +58,6 @@ public class SysStaffDetail extends BaseEntity
|
|||||||
/** 社保补助 */
|
/** 社保补助 */
|
||||||
@Excel(name = "社保补助")
|
@Excel(name = "社保补助")
|
||||||
private BigDecimal socialSecuritySubsidies;
|
private BigDecimal socialSecuritySubsidies;
|
||||||
|
|
||||||
/** 中班补助 */
|
|
||||||
@Excel(name = "中班补助")
|
@Excel(name = "中班补助")
|
||||||
private BigDecimal middleSubsidies;
|
private BigDecimal middleSubsidies;
|
||||||
|
|
||||||
@ -164,24 +162,13 @@ public class SysStaffDetail extends BaseEntity
|
|||||||
/** 备注 */
|
/** 备注 */
|
||||||
@Excel(name = "备注")
|
@Excel(name = "备注")
|
||||||
private String remarks;
|
private String remarks;
|
||||||
|
private BigDecimal OverWages; //加班工资
|
||||||
/**加班工资*/
|
private BigDecimal absenteeismSalary; //请假扣款
|
||||||
private BigDecimal OverWages;
|
private BigDecimal absenteeismSubsidies; //补助扣除
|
||||||
|
|
||||||
/**请假扣款 */
|
|
||||||
private BigDecimal absenteeismSalary;
|
|
||||||
|
|
||||||
/**补助扣除 */
|
|
||||||
private BigDecimal absenteeismSubsidies;
|
|
||||||
|
|
||||||
/** 删除标识 */
|
/** 删除标识 */
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
|
|
||||||
/** 月工资 */
|
|
||||||
private BigDecimal monthSalary;
|
|
||||||
|
|
||||||
|
|
||||||
public BigDecimal getMiddleSubsidies() {
|
public BigDecimal getMiddleSubsidies() {
|
||||||
return middleSubsidies;
|
return middleSubsidies;
|
||||||
}
|
}
|
||||||
@ -556,14 +543,6 @@ public class SysStaffDetail extends BaseEntity
|
|||||||
return delFlag;
|
return delFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getMonthSalary() {
|
|
||||||
return monthSalary;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMonthSalary(BigDecimal monthSalary) {
|
|
||||||
this.monthSalary = monthSalary;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|||||||
@ -88,7 +88,7 @@ public class SysStaffDetailServiceImpl implements ISysStaffDetailService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
//非住宿,月工资==4,3,3
|
//非住宿,月工资
|
||||||
if(StringUtils.isNotNull(sysStaffDetail.getBasicSalary())){
|
if(StringUtils.isNotNull(sysStaffDetail.getBasicSalary())){
|
||||||
for (SysDictData sysDictData : cy_list) {
|
for (SysDictData sysDictData : cy_list) {
|
||||||
if("早餐消费".equals(sysDictData.getDictLabel())){
|
if("早餐消费".equals(sysDictData.getDictLabel())){
|
||||||
@ -101,7 +101,7 @@ public class SysStaffDetailServiceImpl implements ISysStaffDetailService
|
|||||||
sysStaffDetail.setSupperExpend(new BigDecimal(sysDictData.getDictValue()));
|
sysStaffDetail.setSupperExpend(new BigDecimal(sysDictData.getDictValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{//非住宿,日工资==4,3,8
|
}else{
|
||||||
for (SysDictData sysDictData : cy_list) {
|
for (SysDictData sysDictData : cy_list) {
|
||||||
if("早餐消费".equals(sysDictData.getDictLabel())){
|
if("早餐消费".equals(sysDictData.getDictLabel())){
|
||||||
sysStaffDetail.setBreakfastExpend(new BigDecimal(sysDictData.getDictValue()));
|
sysStaffDetail.setBreakfastExpend(new BigDecimal(sysDictData.getDictValue()));
|
||||||
|
|||||||
@ -431,9 +431,6 @@ public class SysStaffServiceImpl implements ISysStaffService
|
|||||||
//根据身份证查询员工是否已经入职过现在的公司
|
//根据身份证查询员工是否已经入职过现在的公司
|
||||||
SysStaff param_staff = sysStaffMapper.queryysStaffByIdCardAndDeptId(sysStaff.getIdCard(),sysStaff.getDeptId());
|
SysStaff param_staff = sysStaffMapper.queryysStaffByIdCardAndDeptId(sysStaff.getIdCard(),sysStaff.getDeptId());
|
||||||
if(StringUtils.isNotNull(param_staff)){
|
if(StringUtils.isNotNull(param_staff)){
|
||||||
param_staff.setCompanyName(sysStaff.getCompanyName());
|
|
||||||
param_staff.setRegularDate(sysStaff.getRegularDate());
|
|
||||||
param_staff.setIsLeader(sysStaff.getIsLeader());
|
|
||||||
param_staff.setDelFlag(Constants.DELETE_FLAG_0);
|
param_staff.setDelFlag(Constants.DELETE_FLAG_0);
|
||||||
param_staff.setUpdateBy(SecurityUtils.getUsername());
|
param_staff.setUpdateBy(SecurityUtils.getUsername());
|
||||||
param_staff.setUpdateTime(DateUtils.getNowDate());
|
param_staff.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
|||||||
@ -136,10 +136,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<include refid="selectRzAttendanceStatisticalVo"/>
|
<include refid="selectRzAttendanceStatisticalVo"/>
|
||||||
where DATE_FORMAT( month, '%Y%m' ) = DATE_FORMAT(#{month} , '%Y%m' ) AND del_flag = '0'
|
where DATE_FORMAT( month, '%Y%m' ) = DATE_FORMAT(#{month} , '%Y%m' ) AND del_flag = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询某个人考勤月所有的考勤统计 -->
|
|
||||||
<select id="queryStatisticalByMonthAndName" resultMap="RzAttendanceStatisticalResult">
|
|
||||||
<include refid="selectRzAttendanceStatisticalVo"/>
|
|
||||||
where DATE_FORMAT( month, '%Y%m' ) = DATE_FORMAT(#{attendanceDate} , '%Y%m' ) and name = #{name} AND del_flag = '0'
|
|
||||||
</select>
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -32,44 +32,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap type="CyConsumptionInfo" id="CyConsumptionInfoResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="statisticsId" column="statistics_id" />
|
|
||||||
<result property="createTime" column="create_time" />
|
|
||||||
<result property="dateTime" column="date_time" />
|
|
||||||
<result property="name" column="name" />
|
|
||||||
<result property="shangBan" column="shang_ban" />
|
|
||||||
<result property="xiaBan" column="xia_ban" />
|
|
||||||
<result property="duration" column="duration" />
|
|
||||||
<result property="breakfastNumber" column="breakfast_number" />
|
|
||||||
<result property="breakfastSubsidy" column="breakfast_subsidy" />
|
|
||||||
<result property="breakfastPersonalConsumption" column="breakfast_personal_consumption" />
|
|
||||||
<result property="breakfastSumConsumption" column="breakfast_sum_consumption" />
|
|
||||||
<result property="lunchNumber" column="lunch_number" />
|
|
||||||
<result property="lunchSubsidy" column="lunch_subsidy" />
|
|
||||||
<result property="lunchPresonalConsumption" column="lunch_presonal_consumption" />
|
|
||||||
<result property="lunchSumConsumption" column="lunch_sum_consumption" />
|
|
||||||
<result property="supperNumber" column="supper_number" />
|
|
||||||
<result property="supperSubsidy" column="supper_subsidy" />
|
|
||||||
<result property="supperPersonalConsumption" column="supper_personal_consumption" />
|
|
||||||
<result property="supperSumConsumption" column="supper_sum_consumption" />
|
|
||||||
<result property="sumSubsidy" column="sum_subsidy" />
|
|
||||||
<result property="personalSumConsumption" column="personal_sum_consumption" />
|
|
||||||
<result property="sumConsumption" column="sum_consumption" />
|
|
||||||
<result property="sparedOne" column="spared_one" />
|
|
||||||
<result property="sparedTwo" column="spared_two" />
|
|
||||||
<result property="sparedThree" column="spared_three" />
|
|
||||||
<result property="sparedFour" column="spared_four" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectRzRestaurantStatisticsVo">
|
<sql id="selectRzRestaurantStatisticsVo">
|
||||||
select id, staff_id, dept_id, name, month, breakfast_expend, breakfast_number, breakfast_pre_sum_expend, breakfast_sum_expend, lunch_expend, lunch_number, lunch_pre_sum_expend, lunch_sum_expend, supper_expend, supper_number, supper_pre_sum_expend, supper_sum_expend, personal_sum_consumption, sum_consumption, remarks, del_flag, create_by, create_time, update_by, update_time from rz_restaurant_statistics
|
select id, staff_id, dept_id, name, month, breakfast_expend, breakfast_number, breakfast_pre_sum_expend, breakfast_sum_expend, lunch_expend, lunch_number, lunch_pre_sum_expend, lunch_sum_expend, supper_expend, supper_number, supper_pre_sum_expend, supper_sum_expend, personal_sum_consumption, sum_consumption, remarks, del_flag, create_by, create_time, update_by, update_time from rz_restaurant_statistics
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<sql id="selectCyConsumptionInfoVo">
|
|
||||||
select id,statistics_id, create_time, date_time, name, shang_ban, xia_ban, duration, breakfast_number, breakfast_subsidy, breakfast_personal_consumption, breakfast_sum_consumption, lunch_number, lunch_subsidy, lunch_presonal_consumption, lunch_sum_consumption, supper_number, supper_subsidy, supper_personal_consumption, supper_sum_consumption, sum_subsidy, personal_sum_consumption, sum_consumption, spared_one, spared_two, spared_three, spared_four from cy_consumption_info
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectRzRestaurantStatisticsList" parameterType="RzRestaurantStatistics" resultMap="RzRestaurantStatisticsResult">
|
<select id="selectRzRestaurantStatisticsList" parameterType="RzRestaurantStatistics" resultMap="RzRestaurantStatisticsResult">
|
||||||
<include refid="selectRzRestaurantStatisticsVo"/>
|
<include refid="selectRzRestaurantStatisticsVo"/>
|
||||||
<where>
|
<where>
|
||||||
@ -90,13 +56,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectRzRestaurantStatisticsById2" parameterType="String" resultMap="CyConsumptionInfoResult">
|
|
||||||
<include refid="selectCyConsumptionInfoVo"/>
|
|
||||||
where name = #{name}
|
|
||||||
AND date_format(date_time,'%Y%m%d') >= date_format('2025-04-01','%Y%m%d')
|
|
||||||
AND date_format(date_time,'%Y%m%d') <= date_format('2025-04-14','%Y%m%d')
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertRzRestaurantStatistics" parameterType="RzRestaurantStatistics" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertRzRestaurantStatistics" parameterType="RzRestaurantStatistics" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into rz_restaurant_statistics
|
insert into rz_restaurant_statistics
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
@ -188,11 +147,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<include refid="selectRzRestaurantStatisticsVo"/>
|
<include refid="selectRzRestaurantStatisticsVo"/>
|
||||||
where staff_id = #{staffId} and del_flag = '0' and DATE_FORMAT( month, '%Y%m' ) = DATE_FORMAT(#{date} , '%Y%m' )
|
where staff_id = #{staffId} and del_flag = '0' and DATE_FORMAT( month, '%Y%m' ) = DATE_FORMAT(#{date} , '%Y%m' )
|
||||||
</select>
|
</select>
|
||||||
<!-- 临时同步数据 -->
|
|
||||||
<select id="selectRzRestaurantStatisticsByDate2" resultMap="RzRestaurantStatisticsResult">
|
|
||||||
<include refid="selectRzRestaurantStatisticsVo"/>
|
|
||||||
where del_flag = '0' and DATE_FORMAT( month, '%Y%m' ) = DATE_FORMAT(#{date} , '%Y%m' )
|
|
||||||
</select>
|
|
||||||
<!-- 实习生统计信息 -->
|
<!-- 实习生统计信息 -->
|
||||||
<select id="selectRzRestaurantStatisticsByDate" resultMap="RzRestaurantStatisticsResult">
|
<select id="selectRzRestaurantStatisticsByDate" resultMap="RzRestaurantStatisticsResult">
|
||||||
<include refid="selectRzRestaurantStatisticsVo"/>
|
<include refid="selectRzRestaurantStatisticsVo"/>
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
restart.include.json=/com.alibaba.fastjson2.*.jar
|
||||||
63
evo-admin/target/classes/application-druid.yml
Normal file
63
evo-admin/target/classes/application-druid.yml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# 数据源配置
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
druid:
|
||||||
|
# 主库数据源
|
||||||
|
master:
|
||||||
|
url: jdbc:mysql://192.168.5.12:3306/evo_cw_new?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
username: yite
|
||||||
|
password: hbyt2024
|
||||||
|
#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
|
||||||
127
evo-admin/target/classes/application.yml
Normal file
127
evo-admin/target/classes/application.yml
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
# 项目相关配置
|
||||||
|
evo:
|
||||||
|
# 名称
|
||||||
|
name: evo
|
||||||
|
# 版本
|
||||||
|
version: 3.8.8
|
||||||
|
# 版权年份
|
||||||
|
copyrightYear: 2024
|
||||||
|
# 文件路径 示例( Windows配置D:/evo/uploadPath,Linux配置 /home/evo/uploadPath)
|
||||||
|
profile: D:/evo/uploadPath
|
||||||
|
# 获取ip地址开关
|
||||||
|
addressEnabled: false
|
||||||
|
|
||||||
|
# 开发环境配置
|
||||||
|
server:
|
||||||
|
# 服务器的HTTP端口,默认为8080
|
||||||
|
port: 8081
|
||||||
|
servlet:
|
||||||
|
# 应用的访问路径
|
||||||
|
context-path: /
|
||||||
|
tomcat:
|
||||||
|
# tomcat的URI编码
|
||||||
|
uri-encoding: UTF-8
|
||||||
|
# 连接数满后的排队数,默认为100
|
||||||
|
accept-count: 1000
|
||||||
|
threads:
|
||||||
|
# tomcat最大线程数,默认为200
|
||||||
|
max: 800
|
||||||
|
# Tomcat启动初始化的线程数,默认值10
|
||||||
|
min-spare: 100
|
||||||
|
|
||||||
|
# 日志配置
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
com.evo: debug
|
||||||
|
org.springframework: warn
|
||||||
|
|
||||||
|
# 用户配置
|
||||||
|
user:
|
||||||
|
password:
|
||||||
|
# 密码最大错误次数
|
||||||
|
maxRetryCount: 5
|
||||||
|
# 密码锁定时间(默认10分钟)
|
||||||
|
lockTime: 10
|
||||||
|
|
||||||
|
# Spring配置
|
||||||
|
spring:
|
||||||
|
# 资源信息
|
||||||
|
messages:
|
||||||
|
# 国际化资源文件路径
|
||||||
|
basename: i18n/messages
|
||||||
|
profiles:
|
||||||
|
active: druid
|
||||||
|
# 文件上传
|
||||||
|
servlet:
|
||||||
|
multipart:
|
||||||
|
# 单个文件大小
|
||||||
|
max-file-size: 20MB
|
||||||
|
# 设置总上传的文件大小
|
||||||
|
max-request-size: 300MB
|
||||||
|
# 服务模块
|
||||||
|
devtools:
|
||||||
|
restart:
|
||||||
|
# 热部署开关
|
||||||
|
enabled: true
|
||||||
|
# redis 配置
|
||||||
|
redis:
|
||||||
|
# 地址
|
||||||
|
host: localhost
|
||||||
|
# 端口,默认为6379
|
||||||
|
port: 6379
|
||||||
|
# 数据库索引
|
||||||
|
database: 0
|
||||||
|
# 密码
|
||||||
|
password:
|
||||||
|
# 连接超时时间
|
||||||
|
timeout: 10s
|
||||||
|
lettuce:
|
||||||
|
pool:
|
||||||
|
# 连接池中的最小空闲连接
|
||||||
|
min-idle: 0
|
||||||
|
# 连接池中的最大空闲连接
|
||||||
|
max-idle: 8
|
||||||
|
# 连接池的最大数据库连接数
|
||||||
|
max-active: 8
|
||||||
|
# #连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||||
|
max-wait: -1ms
|
||||||
|
|
||||||
|
# token配置
|
||||||
|
token:
|
||||||
|
# 令牌自定义标识
|
||||||
|
header: Authorization
|
||||||
|
# 令牌密钥
|
||||||
|
secret: abcdefghijklmnopqrstuvwxyz
|
||||||
|
# 令牌有效期(默认30分钟)
|
||||||
|
expireTime: 480
|
||||||
|
|
||||||
|
# MyBatis配置
|
||||||
|
mybatis:
|
||||||
|
# 搜索指定包别名
|
||||||
|
typeAliasesPackage: com.evo.**.domain
|
||||||
|
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||||
|
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||||
|
# 加载全局的配置文件
|
||||||
|
configLocation: classpath:mybatis/mybatis-config.xml
|
||||||
|
|
||||||
|
# PageHelper分页插件
|
||||||
|
pagehelper:
|
||||||
|
helperDialect: mysql
|
||||||
|
supportMethodsArguments: true
|
||||||
|
params: count=countSql
|
||||||
|
|
||||||
|
# Swagger配置
|
||||||
|
swagger:
|
||||||
|
# 是否开启swagger
|
||||||
|
enabled: true
|
||||||
|
# 请求前缀
|
||||||
|
pathMapping: /dev-api
|
||||||
|
|
||||||
|
# 防止XSS攻击
|
||||||
|
xss:
|
||||||
|
# 过滤开关
|
||||||
|
enabled: true
|
||||||
|
# 排除链接(多个用逗号分隔)
|
||||||
|
excludes: /system/notice
|
||||||
|
# 匹配链接
|
||||||
|
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||||
24
evo-admin/target/classes/banner.txt
Normal file
24
evo-admin/target/classes/banner.txt
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
Application Version: ${evo.version}
|
||||||
|
Spring Boot Version: ${spring-boot.version}
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// _ooOoo_ //
|
||||||
|
// o8888888o //
|
||||||
|
// 88" . "88 //
|
||||||
|
// (| ^_^ |) //
|
||||||
|
// O\ = /O //
|
||||||
|
// ____/`---'\____ //
|
||||||
|
// .' \\| |// `. //
|
||||||
|
// / \\||| : |||// \ //
|
||||||
|
// / _||||| -:- |||||- \ //
|
||||||
|
// | | \\\ - /// | | //
|
||||||
|
// | \_| ''\---/'' | | //
|
||||||
|
// \ .-\__ `-` ___/-. / //
|
||||||
|
// ___`. .' /--.--\ `. . ___ //
|
||||||
|
// ."" '< `.___\_<|>_/___.' >'"". //
|
||||||
|
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
|
||||||
|
// \ \ `-. \_ __\ /__ _/ .-` / / //
|
||||||
|
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
||||||
|
// `=---=' //
|
||||||
|
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||||
|
// 佛祖保佑 永不宕机 永无BUG //
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
BIN
evo-admin/target/classes/com/evo/EvoApplication.class
Normal file
BIN
evo-admin/target/classes/com/evo/EvoApplication.class
Normal file
Binary file not shown.
BIN
evo-admin/target/classes/com/evo/EvoServletInitializer.class
Normal file
BIN
evo-admin/target/classes/com/evo/EvoServletInitializer.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
evo-admin/target/classes/com/evo/common/annotation/Excel.class
Normal file
BIN
evo-admin/target/classes/com/evo/common/annotation/Excel.class
Normal file
Binary file not shown.
BIN
evo-admin/target/classes/com/evo/common/annotation/Excels.class
Normal file
BIN
evo-admin/target/classes/com/evo/common/annotation/Excels.class
Normal file
Binary file not shown.
BIN
evo-admin/target/classes/com/evo/common/annotation/Log.class
Normal file
BIN
evo-admin/target/classes/com/evo/common/annotation/Log.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
evo-admin/target/classes/com/evo/common/config/EvoConfig.class
Normal file
BIN
evo-admin/target/classes/com/evo/common/config/EvoConfig.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
evo-admin/target/classes/com/evo/common/constant/Constants.class
Normal file
BIN
evo-admin/target/classes/com/evo/common/constant/Constants.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
evo-admin/target/classes/com/evo/common/core/domain/R.class
Normal file
BIN
evo-admin/target/classes/com/evo/common/core/domain/R.class
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user