Merge remote-tracking branch 'remotes/origin/master' into dingding
This commit is contained in:
commit
5242b4f3d3
@ -64,6 +64,7 @@ public class RzAttendanceStatisticalController extends BaseController
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RzAttendanceStatistical rzAttendanceStatistical)
|
||||
{
|
||||
rzAttendanceStatistical.setExport(1);
|
||||
List<RzAttendanceStatistical> list = rzAttendanceStatisticalService.selectRzAttendanceStatisticalList(rzAttendanceStatistical);
|
||||
ExcelUtil<RzAttendanceStatistical> util = new ExcelUtil<RzAttendanceStatistical>(RzAttendanceStatistical.class);
|
||||
util.exportExcel(response, list, "考勤统计数据");
|
||||
|
||||
@ -101,6 +101,8 @@ public class RzAttendanceStatistical extends BaseEntity
|
||||
@TableField(exist = false)
|
||||
private Boolean allowAdjustment;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer export;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@ -322,9 +322,9 @@ public class ExcelUtilSs<T>{
|
||||
Cell cell = row.createCell(0);
|
||||
cell.setCellStyle(styles.get("title"));
|
||||
if(index == 0){
|
||||
cell.setCellValue(this.title+"("+this.sheetName+")");
|
||||
cell.setCellValue(this.title+"汇总表"+"("+this.sheetName+")");
|
||||
}else{
|
||||
cell.setCellValue(this.title+"("+this.sheetNameList.get(index-1)+")");
|
||||
cell.setCellValue(this.title+"明细表"+"("+this.sheetNameList.get(index-1)+")");
|
||||
}
|
||||
int column = 0;
|
||||
// 写入各个字段的列头名称
|
||||
|
||||
@ -8,6 +8,9 @@ import java.math.BigDecimal;
|
||||
@Data
|
||||
public class SalaryVo {
|
||||
|
||||
@Excel(name = "序号")
|
||||
private Integer seqNo;
|
||||
|
||||
@Excel(name = "部门名称")
|
||||
private String deptName;
|
||||
|
||||
|
||||
@ -274,6 +274,10 @@ public class RzSalaryDetailServiceImpl extends ServiceImpl<RzSalaryDetailMapper,
|
||||
//处理部门的合计
|
||||
hjResult.setDeptName("合计");
|
||||
depts.add(hjResult);
|
||||
/* int i = 1;
|
||||
for (SalaryVo salaryVo : depts){
|
||||
salaryVo.setSeqNo(i++);
|
||||
}*/
|
||||
deptLists.add(depts);
|
||||
}
|
||||
SalaryVo result = sumSalaryVo(allList);
|
||||
@ -308,9 +312,23 @@ public class RzSalaryDetailServiceImpl extends ServiceImpl<RzSalaryDetailMapper,
|
||||
SalaryVo result = sumSalaryVo(allList.stream().filter(d->!d.getDeptName().equals("小计")).collect(Collectors.toList()));
|
||||
result.setDeptName("总计");
|
||||
allList.add(result);
|
||||
int i = 1;
|
||||
for (SalaryVo salaryVo : allList){
|
||||
salaryVo.setSeqNo(i++);
|
||||
}
|
||||
|
||||
// allSheetNames.remove("河北伊特");
|
||||
companyLists.addAll(deptLists);
|
||||
return util.exportExcel(allList,companyLists,"总表", allSheetNames, new SimpleDateFormat("yyyy-MM").format(rzSalaryDetail.getMonth())+"月工资汇总表", "制表: "+"审核: "+"经理签字: "+"总经理签字:");
|
||||
|
||||
companyLists.stream().forEach(dataList
|
||||
->{
|
||||
int x = 1;
|
||||
for (SalaryVo salaryVo : dataList){
|
||||
salaryVo.setSeqNo(x++);
|
||||
}
|
||||
});
|
||||
|
||||
return util.exportExcel(allList,companyLists,"总表", allSheetNames, new SimpleDateFormat("yyyy-MM").format(rzSalaryDetail.getMonth())+"月工资", "制表: "+"审核: "+"经理签字: "+"总经理签字:");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ spring:
|
||||
# 热部署开关
|
||||
redis:
|
||||
# 地址
|
||||
host: 192.168.5.112
|
||||
host: 192.168.5.232
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
|
||||
@ -34,8 +34,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectRzAttendanceStatisticalList" parameterType="RzAttendanceStatistical" resultMap="RzAttendanceStatisticalResult">
|
||||
select * from rz_attendance_statistical d
|
||||
<if test="export != null "> left join sys_staff ss on ss.user_id = d.staff_id</if>
|
||||
<where>
|
||||
d.del_flag = '0'
|
||||
<if test="export != null "> and ss.status != -1 </if>
|
||||
<if test="staffId != null "> and d.staff_id = #{staffId}</if>
|
||||
<if test="deptId != null "> and d.dept_id = #{deptId}</if>
|
||||
<choose>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user