获取考勤机人员考勤 记录 及导出
This commit is contained in:
parent
f966a1588f
commit
587ee26fd9
|
|
@ -2,7 +2,10 @@ package com.bonus.bmw.controller;
|
|||
|
||||
import com.bonus.bmw.domain.vo.DeviceConfigVo;
|
||||
import com.bonus.bmw.domain.vo.KqCmdBean;
|
||||
import com.bonus.bmw.domain.vo.ProStatisticsPo;
|
||||
import com.bonus.bmw.domain.vo.SalaryStatisticsVo;
|
||||
import com.bonus.bmw.service.KqCmdService;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
|
|
@ -12,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -250,6 +254,18 @@ public class KqCmdController extends BaseController {
|
|||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
@PostMapping("getDevAttr")
|
||||
@SysLog(title = "同步考勤记录", businessType = OperaType.UPDATE, logType = 0, module = "设置配置信息", details = "同步考勤记录")
|
||||
public AjaxResult getDevAttr(@RequestBody DeviceConfigVo o) {
|
||||
try {
|
||||
return service.getDevAttr(o);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常,请联系管理员");
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getKqList")
|
||||
@SysLog(title = "考勤列表", businessType = OperaType.QUERY, logType = 0, module = "获取考勤机考勤打卡记录", details = "获取考勤机考勤打卡记录")
|
||||
public TableDataInfo getKqList(KqCmdBean o) {
|
||||
|
|
@ -263,6 +279,18 @@ public class KqCmdController extends BaseController {
|
|||
return getDataTableError(new ArrayList<>());
|
||||
}
|
||||
|
||||
@PostMapping("/exportAttrExcel")
|
||||
@SysLog(title = "考勤列表", businessType = OperaType.QUERY, logType = 0, module = "考勤机->获取考勤机考勤打卡记录", details = "导出考勤打卡记录")
|
||||
public void exportAttrExcel(HttpServletResponse response, KqCmdBean proStatisticsPo) {
|
||||
try {
|
||||
List<KqCmdBean> list = service.getKqList(proStatisticsPo);
|
||||
ExcelUtil<KqCmdBean> util = new ExcelUtil<>(KqCmdBean.class);
|
||||
util.exportExcel(response, list, "考勤统计");
|
||||
} catch (Exception e) {
|
||||
logger.error(e.toString(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getWrcKqList")
|
||||
@SysLog(title = "考勤列表", businessType = OperaType.QUERY, logType = 0, module = "获取考勤机考勤未入场打卡记录", details = "获取考勤机考勤未入场打卡记录")
|
||||
|
|
|
|||
|
|
@ -37,4 +37,12 @@ public class DeviceConfigVo {
|
|||
|
||||
|
||||
private String json;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private String endTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.bmw.domain.vo;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
|
@ -9,6 +10,7 @@ import java.util.Date;
|
|||
*/
|
||||
@Data
|
||||
public class KqCmdBean {
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
|
|
@ -66,10 +68,7 @@ public class KqCmdBean {
|
|||
* 设备编码
|
||||
*/
|
||||
private String devCode;
|
||||
/**
|
||||
* 人员名称
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 是否在库
|
||||
*/
|
||||
|
|
@ -121,18 +120,34 @@ public class KqCmdBean {
|
|||
private Integer proId;
|
||||
private Integer subId;
|
||||
private Integer teamId;
|
||||
/**
|
||||
* 人员名称
|
||||
*/
|
||||
@Excel(name = "姓名",sort = 1)
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "工程名称",sort = 2)
|
||||
private String proName;
|
||||
|
||||
@Excel(name = "分包单位",sort = 3)
|
||||
private String subName;
|
||||
|
||||
@Excel(name = "班组名称",sort = 4)
|
||||
private String teamName;
|
||||
/**
|
||||
* 打卡日期
|
||||
*/
|
||||
|
||||
@Excel(name = "考勤日期",sort = 5)
|
||||
private String attDay;
|
||||
/**
|
||||
* 打卡时间
|
||||
*/
|
||||
|
||||
@Excel(name = "打卡时间",sort = 6)
|
||||
private String attTime;
|
||||
|
||||
private String proName;
|
||||
private String subName;
|
||||
private String teamName;
|
||||
|
||||
|
||||
private String workerId;
|
||||
|
||||
|
|
|
|||
|
|
@ -85,4 +85,11 @@ public interface KqCmdService{
|
|||
* @return
|
||||
*/
|
||||
List<KqCmdBean> getWrcKqList(KqCmdBean o);
|
||||
|
||||
/**
|
||||
* 获取设备
|
||||
* @param o
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getDevAttr(DeviceConfigVo o);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,6 +217,17 @@ public class KqCmdServiceImpl implements KqCmdService {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getDevAttr(DeviceConfigVo o) {
|
||||
try{
|
||||
urkSendServiceImpl.getDevAttr(o.getDevCode(),o.getStartTime(),o.getEndTime());
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(), e);
|
||||
return AjaxResult.error("同步失败");
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建设备树
|
||||
* @param data 包含pro_id和device_code的数据列表
|
||||
|
|
|
|||
Loading…
Reference in New Issue