|
@@ -11,12 +11,16 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
|
import org.jeecg.modules.geke.attendance.entity.Attendance;
|
|
|
import org.jeecg.modules.geke.attendance.service.IAttendanceService;
|
|
|
+import org.jeecg.modules.geke.shift.entity.Shift;
|
|
|
+import org.jeecg.modules.geke.shift.service.IShiftService;
|
|
|
+import org.jeecg.modules.system.entity.SysDepart;
|
|
|
import org.jeecg.modules.system.entity.SysUser;
|
|
|
import org.jeecg.modules.system.util.DateUtils2;
|
|
|
import org.jeecg.modules.viewClockIn.entity.ViewClockIn;
|
|
@@ -46,12 +50,19 @@ import io.swagger.annotations.ApiOperation;
|
|
|
@RestController
|
|
|
@RequestMapping("/viewClockIn/viewClockIn")
|
|
|
public class viewClockInController extends JeecgController<ViewClockIn, IviewClockInService> {
|
|
|
- @Autowired
|
|
|
- private IviewClockInService viewClockInService;
|
|
|
+ @Autowired
|
|
|
+ private IviewClockInService viewClockInService;
|
|
|
@Autowired
|
|
|
private IbdClockinMonthService bdClockinMonthService;
|
|
|
@Autowired
|
|
|
private IAttendanceService attendanceService;
|
|
|
+ @Autowired
|
|
|
+ private IShiftService shiftService;
|
|
|
+
|
|
|
+// public List<Map> getMap(){
|
|
|
+// LambdaQueryWrapper<Shift> query = new LambdaQueryWrapper<Shift>();
|
|
|
+// shiftService.getMap(query);
|
|
|
+// }
|
|
|
|
|
|
@RequestMapping(value = "/jiaozhun", method = RequestMethod.PUT)
|
|
|
public String jiaozhun(@RequestBody JSONObject jsonObject) throws ParseException {
|
|
@@ -123,10 +134,32 @@ public class viewClockInController extends JeecgController<ViewClockIn, IviewClo
|
|
|
public Result<?> queryPageList(ViewClockIn viewClockIn,
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
+ @RequestParam(name="beginViewDate", defaultValue="1") String beginViewDate,
|
|
|
+ @RequestParam(name="endViewDate", defaultValue="1") String endViewDate,
|
|
|
HttpServletRequest req) {
|
|
|
- QueryWrapper<ViewClockIn> queryWrapper = QueryGenerator.initQueryWrapper(viewClockIn, req.getParameterMap());
|
|
|
+
|
|
|
+ LambdaQueryWrapper<ViewClockIn> query = new LambdaQueryWrapper<ViewClockIn>();
|
|
|
+ if(viewClockIn.getRealname() != null && viewClockIn.getRealname() != ""){
|
|
|
+ query.like(ViewClockIn::getRealname,viewClockIn.getRealname());//姓名
|
|
|
+ }
|
|
|
+ if(viewClockIn.getDepartNames() != null && viewClockIn.getDepartNames() != ""){
|
|
|
+ query.like(ViewClockIn::getDepartNames,viewClockIn.getDepartNames());//部门
|
|
|
+ }
|
|
|
+ if(viewClockIn.getWorkNo() != null && viewClockIn.getWorkNo() != ""){
|
|
|
+ query.eq(ViewClockIn::getWorkNo,viewClockIn.getWorkNo());//工号
|
|
|
+ }
|
|
|
+ if(viewClockIn.getName() != null && viewClockIn.getName() != ""){
|
|
|
+ query.eq(ViewClockIn::getName,viewClockIn.getName());//班次
|
|
|
+ }
|
|
|
+ if(viewClockIn.getViewDate() != null && viewClockIn.getViewDate() != ""){
|
|
|
+ query.eq(ViewClockIn::getViewDate,viewClockIn.getViewDate());//日期
|
|
|
+ }
|
|
|
+ if(beginViewDate != null && beginViewDate != "" && !beginViewDate.equals("1")){
|
|
|
+ query.between(ViewClockIn::getViewDate,beginViewDate,endViewDate);
|
|
|
+ }
|
|
|
+ query.orderByDesc(ViewClockIn::getViewDate);
|
|
|
Page<ViewClockIn> page = new Page<ViewClockIn>(pageNo, pageSize);
|
|
|
- IPage<ViewClockIn> pageList = viewClockInService.page(page, queryWrapper);
|
|
|
+ IPage<ViewClockIn> pageList = viewClockInService.page(page, query);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
|