Commit bbfe519f authored by litengwei's avatar litengwei

任务 8612

parent a02200af
...@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -6,6 +6,8 @@ import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Date; import java.util.Date;
/** /**
...@@ -22,6 +24,12 @@ public class SignDto extends BaseDto { ...@@ -22,6 +24,12 @@ public class SignDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "当前页")
private int current;
@ApiModelProperty(value = "每页几条")
private int size;
@ApiModelProperty(value = "打卡人名字") @ApiModelProperty(value = "打卡人名字")
private String name; private String name;
...@@ -58,6 +66,12 @@ public class SignDto extends BaseDto { ...@@ -58,6 +66,12 @@ public class SignDto extends BaseDto {
@ApiModelProperty(value = "组件机构") @ApiModelProperty(value = "组件机构")
private String orgCode; private String orgCode;
@ApiModelProperty(value = "开始时间")
private String signTimeBIGGER;
@ApiModelProperty(value = "结束时间")
private String signTimeLESS;
@ApiModelProperty(value = "打卡类型") @ApiModelProperty(value = "打卡类型")
private String type; private String type;
......
package com.yeejoin.amos.boot.module.jcs.api.mapper; package com.yeejoin.amos.boot.module.jcs.api.mapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.jcs.api.dto.SignDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.Sign; import com.yeejoin.amos.boot.module.jcs.api.entity.Sign;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
...@@ -12,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -12,4 +14,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface SignMapper extends BaseMapper<Sign> { public interface SignMapper extends BaseMapper<Sign> {
IPage<SignDto> queryForPage(IPage page,SignDto dto);
} }
...@@ -2,4 +2,37 @@ ...@@ -2,4 +2,37 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.SignMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jcs.api.mapper.SignMapper">
<select id="queryForPage"
resultType="com.yeejoin.amos.boot.module.jcs.api.dto.SignDto">
SELECT
sign.`sequence_nbr` sequenceNbr,
sign.name ,
sign.`job_title` jobTitle,
sign.`user_id` categoryName,
sign.type ,
sign.`biz_org_code` bizOrgCode,
sign.`biz_org_name` bizOrgName,
sign.`sign_time` signTime
FROM
cb_sign sign
<where>
<if test="dto.name!=null and dto.name!=''">
and sign.`name`=#{dto.name}
</if>
<if test="dto.type!=null and dto.type!=''">
and sign.type=#{dto.type})
</if>
<if test="dto.signTimeBIGGER!=null and dto.signTimeBIGGER!=''">
and sign.sign_time >= #{dto.signTimeBIGGER}
</if>
<if test="dto.signTimeLESS!=null and dto.signTimeLESS!=''">
and #{dto.signTimeLESS} >= sign.sign_time
</if>
<if test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
and sign.biz_org_code like CONCAT(#{dto.bizOrgCode},'%')
</if>
</where>
order by sign.rec_date desc
</select>
</mapper> </mapper>
package com.yeejoin.amos.boot.module.jcs.biz.controller; package com.yeejoin.amos.boot.module.jcs.biz.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -90,19 +91,16 @@ public class SignController extends BaseController { ...@@ -90,19 +91,16 @@ public class SignController extends BaseController {
/** /**
* 列表分页查询 * 列表分页查询
* *
* @param current 当前页
* @param current 每页大小
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page") @PostMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "打卡记录分页查询", notes = "打卡记录分页查询") @ApiOperation(httpMethod = "POST",value = "打卡记录分页查询", notes = "打卡记录分页查询")
public ResponseModel<Page<SignDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<IPage<SignDto>> queryForPage(@RequestBody SignDto dto) {
(value = "size") int size) {
Page<SignDto> page = new Page<SignDto>(); Page<SignDto> page = new Page<SignDto>();
page.setCurrent(current); page.setCurrent(dto.getCurrent());
page.setSize(size); page.setSize(dto.getSize());
return ResponseHelper.buildResponse(signServiceImpl.queryForSignPage(page)); return ResponseHelper.buildResponse(signServiceImpl.queryForSignPageByMapper(page, dto));
} }
/** /**
......
package com.yeejoin.amos.boot.module.jcs.biz.service.impl; package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yeejoin.amos.boot.module.jcs.api.entity.Sign; import com.yeejoin.amos.boot.module.jcs.api.entity.Sign;
import com.yeejoin.amos.boot.module.jcs.api.mapper.SignMapper; import com.yeejoin.amos.boot.module.jcs.api.mapper.SignMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.ISignService; import com.yeejoin.amos.boot.module.jcs.api.service.ISignService;
...@@ -29,6 +30,13 @@ public class SignServiceImpl extends BaseService<SignDto,Sign,SignMapper> implem ...@@ -29,6 +30,13 @@ public class SignServiceImpl extends BaseService<SignDto,Sign,SignMapper> implem
} }
/** /**
* 分页查询
*/
public IPage<SignDto> queryForSignPageByMapper(IPage<SignDto> page, SignDto dto) {
return this.baseMapper.queryForPage(page,dto);
}
/**
* 列表查询 示例 * 列表查询 示例
*/ */
public List<SignDto> queryForSignList() { public List<SignDto> queryForSignList() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment