update code
parent
03ee180175
commit
7172e929b5
|
@ -433,10 +433,41 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
let postData = {};
|
||||
if (this.queryParams.attendanceTime) {
|
||||
postData.attendanceTime = this.$dt(this.queryParams.attendanceTime).format(
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
}
|
||||
if (this.queryParams.attendanceOutTime) {
|
||||
postData.attendanceOutTime = this.$dt(this.queryParams.attendanceOutTime).format(
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
}
|
||||
let tmps = this.cfgList.filter(
|
||||
(d) =>
|
||||
d.projectId == this.queryParams.projectId &&
|
||||
d.subDeptId == this.queryParams.deptId
|
||||
);
|
||||
if (tmps.length > 0) {
|
||||
postData.cfgid = tmps[0].id;
|
||||
} else {
|
||||
postData.projectId = this.queryParams.projectId;
|
||||
postData.deptId = this.queryParams.deptId;
|
||||
}
|
||||
postData.pageNum = this.queryParams.pageNum;
|
||||
postData.pageSize = this.queryParams.pageSize;
|
||||
if (this.queryParams.workerName) {
|
||||
postData.workerName = this.queryParams.workerName;
|
||||
}
|
||||
if (this.queryParams.companyTypeId && this.queryParams.companyTypeId > 0) {
|
||||
postData.companyTypeId = this.queryParams.companyTypeId;
|
||||
}
|
||||
|
||||
this.download(
|
||||
"project/attendance/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
...postData,
|
||||
},
|
||||
`attendance_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
|
|
|
@ -36,6 +36,7 @@ module.exports = {
|
|||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: `http://127.0.0.1:8090/jhapi`,
|
||||
//target: `http://192.168.126.20:808/jhapi`,
|
||||
//target: `http://szgc.jhncidg.com/jhapi`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
|
|
@ -66,6 +66,11 @@ public class SurProjectAttendanceDataController extends BaseController
|
|||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SurProjectAttendanceData surProjectAttendanceData)
|
||||
{
|
||||
String tmp=surProjectAttendanceData.getAttendanceTime();
|
||||
if(StrUtil.isNotEmpty(tmp)){
|
||||
int year= DateUtil.parse(tmp).year();
|
||||
surProjectAttendanceData.setYear(year);
|
||||
}
|
||||
List<SurProjectAttendanceData> list = surProjectAttendanceDataService.selectSurProjectAttendanceDataList(surProjectAttendanceData);
|
||||
ExcelUtil<SurProjectAttendanceData> util = new ExcelUtil<SurProjectAttendanceData>(SurProjectAttendanceData.class);
|
||||
util.exportExcel(response, list, "劳务实名制管理数据");
|
||||
|
|
|
@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!--管理员放开查询条件-->
|
||||
<if test='nowRole != "1" and nowRole != "2"'> and a.witness_user like concat('%', #{nowUserName}, '%')</if>
|
||||
<if test='activeName == "await"'> and a.approve_status='1'</if>
|
||||
<if test='activeName == "awaitSum"'> and a.approve_status in ('1','3') or a.approve_status is null</if>
|
||||
<if test='activeName == "awaitSum"'> and (a.approve_status in ('1','3') or a.approve_status is null)</if>
|
||||
<if test='activeName == "finished"'> and a.approve_status in ('3','4')</if>
|
||||
<if test="businessKey != null and businessKey != ''"> and sp.id = #{businessKey}</if>
|
||||
<if test="businessKeyName != null and businessKeyName != ''"> and sp.projectName like concat('%', #{businessKeyName}, '%')</if>
|
||||
|
|
Loading…
Reference in New Issue